WXL
2024-01-16 ad70f145e8bea957b41043b4a1e37ce37cc5ed1e
src/views/patient/propaganda/index.vue
@@ -134,12 +134,13 @@
      >
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column
        fixed
          label="序号"
          align="center"
          key="userId"
          prop="userId"
          key="id"
          prop="id"
        />
<el-table-column label="姓名" fixed align="center" key="types" prop="types" />
        <el-table-column
          label="病历号"
          align="center"
@@ -148,7 +149,7 @@
          prop="userName"
          width="120"
        />
        <el-table-column label="姓名" align="center" key="types" prop="types" />
        <el-table-column
          label="年龄"
          align="center"
@@ -182,18 +183,7 @@
            <div>轻度骨裂</div>
          </template>
        </el-table-column>
        <el-table-column
          label="通知状态"
          align="center"
          key="topicnumber"
          prop="topicnumber"
          width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <div>未完成</div>
          </template>
        </el-table-column>
        <el-table-column
          label="宣教内容"
          align="center"
@@ -256,8 +246,21 @@
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
<el-table-column
          label="通知状态"
          fixed="right"
          align="center"
          key="topicnumber"
          prop="topicnumber"
          width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <div>未完成</div>
          </template>
        </el-table-column>
        <el-table-column
        fixed="right"
          label="任务详情"
          align="center"
          width="200"
@@ -294,60 +297,6 @@
        @pagination="getList"
      />
    </el-row>
    <!-- 添加或修改门诊宣教对话框 -->
    <el-dialog
      :title="title"
      :visible.sync="addalteropen"
      width="700px"
      append-to-body
    >
      <el-form ref="form" :model="form" label-width="100px">
        <el-row :gutter="20">
          <el-col :span="12"
            ><el-form-item label="任务名称">
              <el-input v-model="form.name"></el-input> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24"
            ><el-form-item label="所属科室">
              <el-select v-model="form.region" placeholder="请选择科室">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select> </el-form-item></el-col
        ></el-row>
        <el-row :gutter="20">
          <el-col :span="24"
            ><el-form-item label="宣教类型">
              <el-select v-model="form.region" placeholder="请选择宣教类型">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="服务模块">
              <el-select v-model="form.region" placeholder="请选择模块">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="门诊宣教要求">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">提 交</el-button>
        <el-button @click="cancel">返 回</el-button>
      </div>
    </el-dialog>
  </div>
</template>
@@ -361,6 +310,7 @@
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { gethetasklist, delhetaskinfo } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -386,8 +336,7 @@
      userList: null,
      // 弹出层标题
      title: "新增门诊宣教",
      // 是否显示修改、添加弹出层
      addalteropen: false,
      // 部门名称
      deptName: undefined,
      // 默认密码
@@ -414,58 +363,7 @@
      value: [],
      list: [],
      loading: false,
      states: [
        "Alabama",
        "Alaska",
        "Arizona",
        "Arkansas",
        "California",
        "Colorado",
        "Connecticut",
        "Delaware",
        "Florida",
        "Georgia",
        "Hawaii",
        "Idaho",
        "Illinois",
        "Indiana",
        "Iowa",
        "Kansas",
        "Kentucky",
        "Louisiana",
        "Maine",
        "Maryland",
        "Massachusetts",
        "Michigan",
        "Minnesota",
        "Mississippi",
        "Missouri",
        "Montana",
        "Nebraska",
        "Nevada",
        "New Hampshire",
        "New Jersey",
        "New Mexico",
        "New York",
        "North Carolina",
        "North Dakota",
        "Ohio",
        "Oklahoma",
        "Oregon",
        "Pennsylvania",
        "Rhode Island",
        "South Carolina",
        "South Dakota",
        "Tennessee",
        "Texas",
        "Utah",
        "Vermont",
        "Virginia",
        "Washington",
        "West Virginia",
        "Wisconsin",
        "Wyoming",
      ],
      states: ["Alabama", "North Dakota", "Ohio", "Oklahoma", "Oregon", ,],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
@@ -508,9 +406,6 @@
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        userName: undefined,
        tagid: undefined,
        topic: undefined,
      },
      propss: { multiple: true },
      options: [],
@@ -598,13 +493,11 @@
    /** 查询门诊宣教列表 */
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then(
        (response) => {
          this.userList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
      );
      gethetasklist(this.topqueryParams).then((response) => {
        this.userList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 查看门诊宣教详情
    Referencequestion(row) {
@@ -630,7 +523,7 @@
      this.$modal
        .confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
        .then(function () {
          return changeUserStatus(row.userId, row.status);
          return changeUserStatus(row.id, row.status);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
@@ -647,7 +540,7 @@
    // 表单重置
    reset() {
      this.form = {
        userId: undefined,
        id: undefined,
        deptId: undefined,
        userName: undefined,
        nickName: undefined,
@@ -705,61 +598,23 @@
    handleAdd() {
      this.$router.push({
        path: "/followvisit/particty",
        query: { type: 1, },
        query: { type: 1 },
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
            this.$router.push({
      this.$router.push({
        path: "/followvisit/record/detailpage/",
        query: { id: "1" },
      });
    },
    /** 重置密码按钮操作 */
    handleResetPwd(row) {
      this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnClickModal: false,
        inputPattern: /^.{5,20}$/,
        inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
      })
        .then(({ value }) => {
          resetUserPwd(row.userId, value).then((response) => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        })
        .catch(() => {});
    },
    /** 提交按钮 */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      const userIds = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .confirm('是否确认删除用户编号为"' + ids + '"的数据项?')
        .then(function () {
          return delUser(userIds);
          return delhetaskinfo(ids);
        })
        .then(() => {
          this.getList();