WXL (wul)
昨天 e06cd3953ba8a6e0eee11c235bce9ced419a2800
src/views/patient/propaganda/particty.vue
@@ -310,6 +310,83 @@
                      <!-- <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"
@@ -736,7 +813,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">
@@ -758,7 +835,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="qremark">
@@ -781,7 +858,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
@@ -904,6 +981,7 @@
  getbaseopera,
  getFollowuplist,
  getvFollowup,
  selectInfoByCondition,
  Taskparticty,
  deleteTaskparticty,
  getTaskInfo,
@@ -966,6 +1044,8 @@
      donorchargeList: [],
      baseoperaList: [],
      selectedOrder: [],
      diseaseDept: null, // 疾病关联下的科室(存储整个对象)
      diseaseWard: null, // 疾病关联下的病区(存储整个对象)
      usable: [
        { value: "0", label: "可用" },
@@ -999,7 +1079,6 @@
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "出院天数", width: "", prop: "endDay" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
@@ -1199,6 +1278,9 @@
        sendType: [
          { required: true, message: "发送设置不能为空", trigger: "blur" },
        ],
        longTask: [
          { required: true, message: "请选择执行周期", trigger: "blur" },
        ],
        // deptcode: [
        //   { required: true, message: "适用科室不能为空", trigger: "blur" },
        // ],
@@ -1306,7 +1388,7 @@
      };
      this.currenttype = this.$route.query.type;
      this.title = "随访内容列表";
      this.tableLabel = this.tableLabelwj;
      this.tableLabel = this.tableLabelwj || [];
      if (this.form.serviceType == 1) {
        this.checkboxlist = [
          {
@@ -1326,8 +1408,16 @@
            label: "微信公众号",
          },
        ];
      } else if (this.form.serviceType == 6) {
      } else if (
        this.form.serviceType == 6 ||
        this.form.serviceType == 14 ||
        this.form.serviceType == 15
      ) {
        this.checkboxlist = [
          {
            value: "1",
            label: "人工",
          },
          {
            value: "3",
            label: "智能语音",
@@ -1391,6 +1481,8 @@
        ];
      } else if (
        this.form.serviceType == 2 ||
        this.form.serviceType == 18 ||
        this.form.serviceType == 19 ||
        this.form.serviceType == 3 ||
        this.form.serviceType == 16 ||
        this.form.serviceType == 4
@@ -1475,10 +1567,12 @@
          this.leavehospitaldistrictcodes = [];
        }
        if (this.checkList) {
          this.form.preachform = this.checkList.join(",");
          this.form.preachformList = this.selectedOrder;
          this.form.preachform = this.checkList.join(",") || [];
          this.form.preachformList = this.selectedOrder || [];
        } else {
          this.$modal.msgError("请选择服务类型");
          this.submitLoading = false;
          return;
        }
@@ -1492,6 +1586,8 @@
        ) {
        } else {
          this.$modal.msgError("请选择任务关联条件");
          this.submitLoading = false;
          return;
        }
        // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
@@ -1501,6 +1597,8 @@
        if (!this.form.templatename && !this.templateor) {
          this.$modal.msgError("未选择模板");
          this.submitLoading = false;
          return;
        }
@@ -1513,6 +1611,8 @@
          this.form.longTask
        ) {
        } else {
          this.submitLoading = false;
          return this.$modal.msgError("时间信息缺失");
        }
        const filteredArray = this.variableList.filter(
@@ -1528,6 +1628,17 @@
        if (!this.form.type) {
          this.form.type = this.$route.query.type;
        }
        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.serviceType = this.serviceType;
        this.form.deptcode = this.deptcodesWards.join(",");
        this.form.leavehospitaldistrictcode =
@@ -1535,6 +1646,9 @@
        this.form.opcode = this.operationcodes.join(",");
        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) {
@@ -1556,7 +1670,17 @@
        // 第四步:无论成功或失败,最终都关闭加载状态
      }
    },
    handleDiseaseDeptChange(dept) {
      console.log(dept, "dept");
      // 当选择科室时,存储整个科室对象
      this.diseaseDept = dept;
    },
    handleDiseaseWardChange(ward) {
      // 当选择病区时,存储整个病区对象
      this.diseaseWard = ward;
    },
    // ----------------------表格子组件事件
    // 选择预览
@@ -1600,13 +1724,18 @@
          // 疾病
          this.getillness(this.form.libtemplateid);
          getvFollowup({ id: this.form.libtemplateid }).then((res) => {
          selectInfoByCondition({ id: this.form.templateid }).then((res) => {
            if (res.code == 200) {
              this.previewtf = true;
              this.previewtftype = 1;
              this.questionList = res.data.ivrLibaTemplateScriptVOList;
              this.objyl.ivrLibaTemplateScriptVOList =
                res.data.ivrLibaTemplateScriptVOList;
              this.questionList = res.data.ivrTaskTemplateScriptVOList;
              this.questionList.forEach((item) => {
                item.qremark = [];
                item.ivrLibaScriptTargetoptionList =
                  item.ivrTaskScriptTargetoptionList;
              });
              this.objyl.ivrLibaScriptTargetoptionList =
                res.data.ivrTaskScriptTargetoptionList;
            } else {
            }
          });
@@ -1920,8 +2049,8 @@
              ? this.form.patTaskRelevances
              : [];
            this.overallCase = this.form.patTaskRelevances.concat();
            this.checkList = this.form.preachform.split(",");
            this.selectedOrder = this.form.preachformList;
            this.checkList = this.form.preachform.split(",") || [];
            this.selectedOrder = this.form.preachformList || [];
            this.overallCase.forEach((item) => {
              if (item.endtime) {
@@ -1994,7 +2123,7 @@
          let arr = res.rows;
          arr.forEach((item) => {
            getillnesslist({
              icdcode: item.icd10code,
              icdname: item.icd10name,
            }).then((res) => {
              item.icdname = res.rows[0].icdname;
              this.diagglist.push(item);
@@ -2208,6 +2337,7 @@
            Taskparticty(this.objyl).then((response) => {
              this.previewtf = false;
              this.form.libtemplateid = this.objyl.id;
              this.form.libtemplatename = this.objyl.templateName;
              this.form.templateid = response.data;
              this.putbelongDepts(response.data);
              this.form.templatename = this.objyl.templateName;
@@ -2228,6 +2358,7 @@
        Taskparticty(this.objyl).then((response) => {
          this.previewtf = false;
          this.form.libtemplateid = this.objyl.id;
          this.form.libtemplatename = this.objyl.templateName;
          this.form.templateid = response.data;
          this.putbelongDepts(response.data);
          this.form.templatename = this.objyl.templateName;
@@ -2266,7 +2397,7 @@
      });
    },
    checkSelectionChange(selectedValues, selectedOrder) {
      this.selectedOrder = selectedValues;
      this.selectedOrder = selectedValues || [];
      console.log("当前选中:", selectedValues);
      console.log("选中顺序:", selectedOrder);
    },
@@ -2303,8 +2434,12 @@
            if (Array.isArray(this.objyl.suitway)) {
              this.objyl.suitway = this.objyl.suitway.join(",");
            }
            this.objyl.templateid = this.objyl.id;
            this.objyl.libtemplateid = this.objyl.id;
            this.form.libtemplateid = this.objyl.id;
            this.objyl.isoperation = 1;
            console.log(this.objyl, "this.objyl");
            this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => {
              item.ivrTaskScriptTargetoptionList =
                item.ivrLibaScriptTargetoptionList;