WXL (wul)
5 天以前 d0c13711e4a03409c28d7a01716218689e52c11c
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -260,29 +260,6 @@
                  ></el-col>
                </el-row>
                <el-row v-if="form.appltype == 3">
                  <!-- <el-col :span="20"
                    ><el-form-item label="适用疾病" prop="region">
                      <el-select
                        v-model="illnesscodes"
                        style="width: 400px"
                        @remove-tag="removediagg"
                        size="medium"
                        :remote-method="remotedonor"
                        multiple
                        filterable
                        remote
                        placeholder="请选择病区"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in donorchargeList"
                          :key="item.icdcode"
                          :label="item.icdname"
                          :value="item.icdcode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col> -->
                  <div class="xinz-infs">
                    <el-form-item>
                      <template #label>
@@ -319,12 +296,11 @@
                  <el-col :span="20"
                    ><el-form-item label="适用手术" prop="region">
                      <el-select
                        v-model="operationcodes"
                        v-model="form.oplevelcode"
                        style="width: 400px"
                        @remove-tag="removeopera"
                        size="medium"
                        :remote-method="remoteopcode"
                        multiple
                        filterable
                        remote
                        placeholder="请选择手术"
@@ -332,8 +308,8 @@
                        <el-option
                          class="ruleFormaa"
                          v-for="item in baseoperaList"
                          :label="item.opdesc"
                          :value="item.opcode"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </el-select> </el-form-item
@@ -917,6 +893,7 @@
  Externallist,
  getQtemplatelist,
  getQtemplateobj,
  taskgetQtemplateobj,
  TaskQuestioncomit,
  deleteTaskQuestioncomit,
  Questionnairetaskgetson,
@@ -965,14 +942,18 @@
      dialogVisiblepatientjb: false, //添加疾病弹框
      deptcodesWards: [], //科室数据
      leavehospitaldistrictcodes: [], //病区数据
      operationcodes: [], //手术数据
      illnesscodes: [], //疾病数据
      radio: 1,
      checkboxlist: [],
      tableLabel: [],
      questionList: [],
      donorchargeList: [],
      baseoperaList: [],
      baseoperaList: [
        { value: "1", label: "一级手术" },
        { value: "2", label: "二级手术" },
        { value: "3", label: "三级手术" },
        { value: "4", label: "四级手术" },
      ],
      usable: [
        { value: "0", label: "可用" },
        { value: "1", label: "停用" },
@@ -1203,8 +1184,9 @@
        sendType: [
          { required: true, message: "发送设置不能为空", trigger: "blur" },
        ],
        deptcode: [
          { required: true, message: "适用科室不能为空", trigger: "blur" },
        longTask: [
          { required: true, message: "请选择执行周期", trigger: "blur" },
        ],
        // leavehospitaldistrictcode: [
        //   { required: true, message: "适用病区不能为空", trigger: "blur" },
@@ -1452,16 +1434,16 @@
        ];
        if (this.form.appltype == 1) {
          this.leavehospitaldistrictcodes = [];
          this.operationcodes = [];
          this.form.oplevelcode = null;
          this.illnesscodes = [];
        } else if (this.form.appltype == 2) {
          this.deptcodesWards = [];
          this.operationcodes = [];
          this.form.oplevelcode = null;
          this.illnesscodes = [];
        } else if (this.form.appltype == 3) {
          this.deptcodesWards = [];
          this.leavehospitaldistrictcodes = [];
          this.operationcodes = [];
          this.form.oplevelcode = null;
        } else if (this.form.appltype == 4) {
          this.deptcodesWards = [];
          this.illnesscodes = [];
@@ -1472,21 +1454,22 @@
          this.form.preachformList = this.selectedOrder;
        } else {
          this.$modal.msgError("请选择服务类型");
          this.submitLoading = false;
          return;
        }
        console.log(this.operationcodes[0]);
        console.log(this.operationcodes);
        if (
          this.deptcodesWards[0] ||
          this.leavehospitaldistrictcodes[0] ||
          this.diagglist[0] ||
          this.operationcodes[0] ||
          this.form.oplevelcode ||
          this.form.longTask == 2 ||
          this.serviceType == 3
        ) {
        } else {
          this.$modal.msgError("请选择任务关联条件");
          this.submitLoading = false;
          return;
        }
        //暂停任务患者限制
@@ -1497,6 +1480,8 @@
        if (!this.form.templatename && !this.templateor) {
          this.$modal.msgError("未选择模板");
          this.submitLoading = false;
          return;
        }
@@ -1509,6 +1494,7 @@
          this.form.longTask
        ) {
        } else {
          this.submitLoading = false;
          return this.$modal.msgError("时间信息缺失");
        }
        const filteredArray = this.variableList.filter(
@@ -1528,7 +1514,7 @@
        this.form.deptcode = this.deptcodesWards.join(",");
        this.form.leavehospitaldistrictcode =
          this.leavehospitaldistrictcodes.join(",");
        this.form.opcode = this.operationcodes.join(",");
        // this.form.opcode = this.operationcodes.join(",");
        this.form.icd10code = this.diagglist
          .map((item) => item.icdcode)
          .join(",");
@@ -1587,6 +1573,8 @@
    },
    // 预览
    previewfnmb() {
      // taskgetQtemplateobj({ id: this.form.templateid });
      getTaskQuestioncomit(this.form.templateid).then((res) => {
        if (res.code == 200) {
          console.log(res, "预览数据");
@@ -1597,15 +1585,17 @@
          this.getillness(this.form.libtemplateid);
          this.previewtf = true;
          getQtemplateobj({ svyid: this.form.libtemplateid }).then((res) => {
          taskgetQtemplateobj({ id: this.form.templateid }).then((res) => {
            if (res.code == 200) {
              this.questionList = res.rows[0].svyTemplateLibScripts;
              this.questionList = res.data.svyTaskTemplateScriptVOS;
              this.questionList.forEach((item) => {
                item.qremark = [];
                item.svyLibTemplateTargetoptions =
                  item.svyTaskTemplateTargetoptions;
              });
              this.previewtftype = 1;
              this.objyl.svyTemplateLibScripts =
                res.rows[0].svyTemplateLibScripts;
                res.data.svyTaskTemplateScriptVOS;
            }
          });
        }
@@ -1649,36 +1639,36 @@
      }).then((res) => {
        this.donorchargeList = res.rows;
      });
      getbaseopera({
        pageNum: 1,
        pageSize: 1000,
      }).then((res) => {
        this.baseoperaList = res.rows;
      });
      // getbaseopera({
      //   pageNum: 1,
      //   pageSize: 1000,
      // }).then((res) => {
      //   this.baseoperaList = res.rows;
      // });
    },
    // 手术查询
    remoteopcode(name) {
      if (name) {
        getbaseopera({
          pageNum: 1,
          pageSize: 1000,
          opdesc: name,
        }).then((res) => {
          this.baseoperaList = res.rows;
        });
      }
      // if (name) {
      //   getbaseopera({
      //     pageNum: 1,
      //     pageSize: 1000,
      //     opdesc: name,
      //   }).then((res) => {
      //     this.baseoperaList = res.rows;
      //   });
      // }
    },
    // 疾病查询
    remotedonor(name) {
      if (name) {
        getbaseopera({
          pageNum: 1,
          pageSize: 1000,
          opdesc: name,
        }).then((res) => {
          this.baseoperaList = res.rows;
        });
      }
      // if (name) {
      //   getbaseopera({
      //     pageNum: 1,
      //     pageSize: 1000,
      //     opdesc: name,
      //   }).then((res) => {
      //     this.baseoperaList = res.rows;
      //   });
      // }
    },
    // 处理问题层变量
    Variablehandling(arr, type) {
@@ -2128,6 +2118,9 @@
    },
    // 疾病删除触发
    removediagg(row) {
      console.log(row, "row");
      console.log(this.diagglist, "this.diagglist");
      let result = this.diagglist
        .filter((item) => item.icd10code == row)
        .map((item) => item.id);
@@ -2260,6 +2253,7 @@
              TaskQuestioncomit(this.objyl).then((response) => {
                this.previewtf = false;
                this.form.libtemplateid = this.objyl.svyid;
                this.form.libtemplatename = this.objyl.svyname;
                this.form.templateid = response.data;
                this.form.templatename = this.objyl.svyname;
                this.$modal.msgSuccess("选择模板成功");
@@ -2270,6 +2264,7 @@
        TaskQuestioncomit(this.objyl).then((response) => {
          this.previewtf = false;
          this.form.libtemplateid = this.objyl.svyid;
          this.form.libtemplatename = this.objyl.svyname;
          this.form.templateid = response.data;
          this.form.templatename = this.objyl.svyname;
          this.$modal.msgSuccess("选择模板成功");