WXL (wul)
昨天 feb5a669dced68415bc7e32f237f77bf9842fe8b
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>
@@ -314,17 +291,93 @@
                      <!-- <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag> -->
                    </el-form-item>
                  </div>
                  <div
                    style="
                      margin-bottom: 20px;
                      padding: 8px 12px;
                      background-color: #f0f9ff;
                      border-left: 4px solid #409eff;
                    "
                  >
                    <p
                      style="
                        margin: 0;
                        color: #606266;
                        font-size: 13px;
                        line-height: 1.4;
                      "
                    >
                      <i
                        class="el-icon-info"
                        style="color: #409eff; margin-right: 6px"
                      ></i>
                      针对同一疾病在多科室/病区下存在的情况,可选择性配置固定科室/病区
                    </p>
                  </div>
                  <!-- 新增:疾病关联下的科室配置(单选) -->
                  <el-row :gutter="20" style="margin-top: 20px">
                    <el-col :span="12">
                      <el-form-item label="关联科室" prop="diseaseDept">
                        <el-select
                          v-model="diseaseDept"
                          style="width: 100%"
                          clearable
                          filterable
                          placeholder="请选择科室(可选)"
                          value-key="deptCode"
                          @change="handleDiseaseDeptChange"
                        >
                          <el-option
                            v-for="item in belongDepts"
                            :key="item.deptCode"
                            :label="item.deptName"
                            :value="item"
                          ></el-option>
                        </el-select>
                        <div v-if="diseaseDept" class="selected-info">
                          已选择: {{ diseaseDept.deptName }} ({{
                            diseaseDept.deptCode
                          }})
                        </div>
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="关联病区" prop="diseaseWard">
                        <el-select
                          v-model="diseaseWard"
                          style="width: 100%"
                          clearable
                          filterable
                          placeholder="请选择病区(可选)"
                          value-key="districtCode"
                          @change="handleDiseaseWardChange"
                        >
                          <el-option
                            v-for="item in belongWards"
                            :key="item.districtCode"
                            :label="item.districtName"
                            :value="item"
                          ></el-option>
                        </el-select>
                        <div v-if="diseaseWard" class="selected-info">
                          已选择: {{ diseaseWard.districtName }} ({{
                            diseaseWard.districtCode
                          }})
                        </div>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-row>
                <el-row v-if="form.appltype == 4">
                  <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 +385,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
@@ -375,10 +428,7 @@
                      placeholder="请点击右侧选择"
                    />
                    <el-button
                      v-if="
                        (form.templateid && form.sendState == 1) ||
                        !form.templateid
                      "
                      v-if="form.templateid"
                      style="margin-left: 10px"
                      type="primary"
                      icon="el-icon-edit"
@@ -639,8 +689,8 @@
    <!-- 模板预览 -->
    <el-dialog title="模板预览" :visible.sync="previewtf" width="70%">
      <el-tabs type="border-card">
        <el-tab-pane label="模板基础数据"
          ><div class="preview-left">
        <el-tab-pane label="模板基础数据">
          <div class="preview-left">
            <el-form :model="objyl" label-width="100px" class="demo-objyl">
              <el-row :gutter="10">
                <el-col :span="14">
@@ -730,10 +780,11 @@
                >
                </el-input
              ></el-form-item>
            </el-form></div
        ></el-tab-pane>
        <el-tab-pane label="问题展示"
          ><div class="preview-left">
            </el-form>
          </div>
        </el-tab-pane>
        <el-tab-pane label="问题展示">
          <div class="preview-left">
            <div v-for="item in questionList">
              <!-- 单选 -->
              <div
@@ -742,7 +793,7 @@
                v-if="item.scriptType == 1"
              >
                <div class="dev-text">
                  {{ item.sort }}、[单选]<span>{{ item.scriptContent }}</span>
                  {{ item.sort }}. [单选]<span>{{ item.scriptContent }}</span>
                </div>
                <div class="dev-xx">
                  <el-radio-group v-model="item.remark">
@@ -762,7 +813,7 @@
                v-if="item.scriptType == 2"
              >
                <div class="dev-text">
                  {{ item.sort }}、[多选]<span>{{ item.scriptContent }}</span>
                  {{ item.sort }}. [多选]<span>{{ item.scriptContent }}</span>
                </div>
                <div class="dev-xx">
                  <el-checkbox-group v-model="item.qremark">
@@ -783,7 +834,7 @@
                v-if="item.scriptType == 4"
              >
                <div class="dev-text">
                  {{ item.sort }}、[问答]<span>{{ item.scriptContent }}</span>
                  {{ item.sort }}. [问答]<span>{{ item.scriptContent }}</span>
                </div>
                <div class="dev-xx">
                  <el-input
@@ -794,8 +845,9 @@
                  </el-input>
                </div>
              </div>
            </div></div
        ></el-tab-pane>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
      <span slot="footer" class="dialog-footer">
@@ -917,6 +969,7 @@
  Externallist,
  getQtemplatelist,
  getQtemplateobj,
  taskgetQtemplateobj,
  TaskQuestioncomit,
  deleteTaskQuestioncomit,
  Questionnairetaskgetson,
@@ -965,14 +1018,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: "停用" },
@@ -1041,6 +1098,10 @@
      // 时间处理
      daytime: [], //日期
      applydaytime: [], //计算日期
      diseaseDept: null, // 疾病关联下的科室(存储整个对象)
      diseaseWard: null, // 疾病关联下的病区(存储整个对象)
      diseaseDepts: "",
      diseaseWards: "",
      time1: "", //上午时间段
      time2: "", //下午时间段
      time3: "", //晚上时间段
@@ -1203,8 +1264,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" },
@@ -1318,6 +1380,10 @@
      ) {
        this.checkboxlist = [
          {
            value: "1",
            label: "人工",
          },
          {
            value: "3",
            label: "智能语音",
          },
@@ -1383,6 +1449,8 @@
        this.form.serviceType == 3 ||
        this.form.serviceType == 5 ||
        this.form.serviceType == 16 ||
        this.form.serviceType == 18 ||
        this.form.serviceType == 19 ||
        this.form.serviceType == 4
      ) {
        this.checkboxlist = [
@@ -1431,7 +1499,7 @@
    },
    // 保存
    submitForm(formName) {
      console.log(this.submitLoading);
      console.log(this.submitLoading, "1");
      if (this.submitLoading) {
        return;
@@ -1450,18 +1518,20 @@
            xh: 1,
          },
        ];
        console.log(1);
        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 +1542,23 @@
          this.form.preachformList = this.selectedOrder;
        } else {
          this.$modal.msgError("请选择服务类型");
          this.submitLoading = false;
          return;
        }
        console.log(this.operationcodes[0]);
        console.log(this.operationcodes);
        console.log(2);
        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;
        }
        //暂停任务患者限制
@@ -1494,9 +1566,12 @@
        //   this.$modal.msgError("请选择病人");
        //   return;
        // }
        console.log(3);
        if (!this.form.templatename && !this.templateor) {
          this.$modal.msgError("未选择模板");
          this.submitLoading = false;
          return;
        }
@@ -1509,6 +1584,7 @@
          this.form.longTask
        ) {
        } else {
          this.submitLoading = false;
          return this.$modal.msgError("时间信息缺失");
        }
        const filteredArray = this.variableList.filter(
@@ -1524,13 +1600,29 @@
        if (!this.form.type) {
          this.form.type = this.$route.query.type;
        }
        console.log(4);
        this.form.serviceType = this.serviceType;
        this.form.deptcode = this.deptcodesWards.join(",");
        this.form.leavehospitaldistrictcode =
          this.leavehospitaldistrictcodes.join(",");
        this.form.opcode = this.operationcodes.join(",");
        // this.form.opcode = this.operationcodes.join(",");
        if (this.form.appltype == 3) {
          if (this.diseaseDept) {
            this.form.deptcode = this.diseaseDept.deptCode;
            this.form.deptname = this.diseaseDept.deptName;
          }
          if (this.diseaseWard) {
            this.form.leavehospitaldistrictcode = this.diseaseWard.districtCode;
            this.form.leavehospitaldistrictname = this.diseaseWard.districtName;
          }
        }
        this.form.icd10code = this.diagglist
          .map((item) => item.icdcode)
          .join(",");
        this.form.icd10name = this.diagglist
          .map((item) => item.icdname)
          .join(",");
        Editsingletask(this.form).then((res) => {
          if (res.code == 200) {
@@ -1552,7 +1644,15 @@
        // 第四步:无论成功或失败,最终都关闭加载状态
      }
    },
    handleDiseaseDeptChange(dept) {
      // 当选择科室时,存储整个科室对象
      this.diseaseDept = dept;
    },
    handleDiseaseWardChange(ward) {
      // 当选择病区时,存储整个病区对象
      this.diseaseWard = ward;
    },
    // ----------------------表格子组件事件
    // 选择预览
    selectfn(row, type) {
@@ -1572,6 +1672,8 @@
            this.tempbelongWards = [];
            this.objyl.suitway = this.objyl.suitway.split(",");
            this.questionList = res.rows[0].svyTemplateLibScripts;
            console.log(this.questionList, "this.questionList");
            this.questionList.forEach((item) => {
              item.qremark = [];
            });
@@ -1587,6 +1689,8 @@
    },
    // 预览
    previewfnmb() {
      // taskgetQtemplateobj({ id: this.form.templateid });
      getTaskQuestioncomit(this.form.templateid).then((res) => {
        if (res.code == 200) {
          console.log(res, "预览数据");
@@ -1597,15 +1701,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 +1755,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) {
@@ -1794,6 +1900,7 @@
    handleUpdate() {},
    handleDelete() {},
    handleExport() {},
    // 选择患者表数据
    handleSelectionChange(selection) {
      this.SelectPatientslist = structuredClone(selection);
@@ -1807,6 +1914,7 @@
          item.patid = item.id;
          item.hospType = this.patientqueryParams.allhosp;
          item.sfzh = item.idcardno;
          item.telshortcode = item.telshortcode;
          item.deptCode = item.deptcode;
          item.deptName = item.dept;
          item.admindate = item.inhosptime;
@@ -1877,7 +1985,10 @@
        return;
      }
      if (this.patientqueryParams.searchscope == 1) {
      if (
        this.patientqueryParams.searchscope == 1 ||
        this.patientqueryParams.allhosp == 2
      ) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
@@ -2066,12 +2177,17 @@
        if (res.code == 200) {
          let arr = res.rows;
          arr.forEach((item) => {
            getillnesslist({
              icdcode: item.icd10code,
            }).then((res) => {
              item.icdname = res.rows[0].icdname;
            if (localStorage.getItem("orgname") == "南华大学附属第一医院") {
              item.icdname = item.icd10name;
              this.diagglist.push(item);
            });
            } else {
              getillnesslist({
                icdname: item.icd10name,
              }).then((res) => {
                item.icdname = res.rows[0].icdname;
                this.diagglist.push(item);
              });
            }
            this.illnesscodes.push(item.icd10code);
          });
        }
@@ -2128,8 +2244,8 @@
    },
    // 疾病删除触发
    removediagg(row) {
      console.log(row,'row');
console.log(this.diagglist,'this.diagglist');
      console.log(row, "row");
      console.log(this.diagglist, "this.diagglist");
      let result = this.diagglist
        .filter((item) => item.icd10code == row)
@@ -2263,6 +2379,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("选择模板成功");
@@ -2273,6 +2390,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("选择模板成功");
@@ -2321,9 +2439,9 @@
            this.objyl.templateid = this.objyl.svyid;
            this.form.libtemplateid = this.objyl.svyid;
            this.objyl.isoperation = 1;
            this.objyl.svyLibTemplateScriptVOS =
            this.objyl.svyTaskTemplateScriptVOS =
              this.objyl.svyTemplateLibScripts;
            this.objyl.svyLibTemplateScriptVOS.forEach((item) => {
            this.objyl.svyTaskTemplateScriptVOS.forEach((item) => {
              item.svyTaskTemplateTargetoptions =
                item.svyLibTemplateTargetoptions;
            });
@@ -2350,9 +2468,11 @@
<style lang="scss" scoped>
.Questionnairemanagement {
}
.leftvlue-jbxx {
  margin-top: 10px;
}
.sidecolumn {
  width: 100%;
  // min-height: 12vh;
@@ -2364,6 +2484,7 @@
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
}
.leftvlue {
  //   display: flex;
  //   flex: 1;
@@ -2376,8 +2497,10 @@
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
}
.examine-jic {
  margin: 20px;
  .headline {
    font-size: 24px;
    height: 40px;
@@ -2385,6 +2508,7 @@
    padding-left: 5px;
    margin-bottom: 10px;
    display: flex;
    // justify-content: space-between;
    .Add-details {
      font-size: 18px;
@@ -2392,25 +2516,30 @@
      cursor: pointer;
    }
  }
  .jic-value {
    font-size: 20px;
    border-top: 1px solid #a7abac;
    padding: 10px;
    margin-bottom: 10px;
    .details-jic {
      padding: 10px 15px;
      border: 1px solid #dcdfe6;
      -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
        0 0 6px 0 rgba(0, 0, 0, 0.04);
      .details-title {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        div:nth-child(2) {
          color: #02a7f0;
          cursor: pointer;
        }
      }
      .details-renw {
        background: #e4ebfc;
        padding: 15px 5px;
@@ -2420,6 +2549,7 @@
    }
  }
}
.xinz-infs {
  font-size: 18px;
  line-height: 48px;
@@ -2428,6 +2558,7 @@
    margin-left: 10px;
  }
}
// .leftvlue-jbxx {
//   margin-bottom: 50px;
//   font-size: 20px;
@@ -2450,36 +2581,43 @@
  //   margin: 20px;
  padding: 30px;
  background: #ffff;
  // border: 1px solid #dcdfe6;
  // -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
  //   0 0 6px 0 rgba(0, 0, 0, 0.04);
  .scriptTopic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
.jic-value {
  font-size: 20px;
  border-top: 1px solid #a7abac;
  padding: 10px;
  margin-bottom: 10px;
  .details-jic {
    padding: 10px 15px;
    border: 1px solid #dcdfe6;
    -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
      0 0 6px 0 rgba(0, 0, 0, 0.04);
    .details-title {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      div:nth-child(2) {
        color: #02a7f0;
        cursor: pointer;
      }
    }
    .details-renw {
      background: #e4ebfc;
      padding: 15px 5px;
@@ -2488,6 +2626,7 @@
    }
  }
}
::v-deep .addtopic-input {
  input {
    background: #02a7f0;
@@ -2495,12 +2634,15 @@
    width: 150px;
  }
}
::v-deep.el-step.is-vertical .el-step__title {
  font-size: 25px;
}
::v-deep.el-row {
  margin-bottom: 10px;
}
// ::v-deep.el-input--medium {
//   font-size: 24px !important;
// }
@@ -2509,14 +2651,17 @@
  position: relative;
  width: 700px;
}
.el-select__tags {
  font-size: 20px;
  max-width: 888px !important;
}
::v-deep.el-radio__inner {
  width: 22px;
  height: 22px;
}
// ::v-deep.topic-dev.el-radio__label {
//   font-size: 24px;
// }
@@ -2525,12 +2670,14 @@
    font-size: 18px;
  }
}
::v-deep.el-input.is-disabled .el-input__inner {
  background-color: #f5f7fa;
  border-color: #dfe4ed;
  color: rgb(253, 66, 66);
  cursor: not-allowed;
}
::v-deep.el-checkbox-group {
  span {
    font-size: 18px;