WXL (wul)
昨天 feb5a669dced68415bc7e32f237f77bf9842fe8b
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -69,7 +69,7 @@
                    placeholder="请输入任务描述"
                  />
                </el-form-item>
                <el-form-item label="服务形式">
                <!-- <el-form-item label="服务形式">
                  <el-radio-group v-model="checkList">
                    <el-radio
                      v-for="(item, index) in checkboxlist"
@@ -79,11 +79,22 @@
                      {{ item.label }}</el-radio
                    >
                  </el-radio-group>
                </el-form-item> -->
                <el-form-item label="服务形式">
                  <SortCheckbox
                    v-model="checkList"
                    :options="checkboxlist"
                    :initialselectedOrder="selectedOrder"
                    value-key="value"
                    label-key="label"
                    @change="checkSelectionChange"
                  />
                </el-form-item>
                <el-form-item label="执行周期" prop="longTask">
                  <el-radio-group v-model="form.longTask">
                    <el-radio :label="0">自定义周期</el-radio>
                    <el-radio :label="1">长期任务</el-radio>
                    <el-radio :label="2">固定任务</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-row :gutter="20" v-if="form.longTask">
@@ -249,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>
@@ -303,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="请选择手术"
@@ -321,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
@@ -364,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"
@@ -431,14 +492,20 @@
            </div>
          </div>
        </div>
        <el-button type="success" @click="nextstep('ruleForm')">{{
          quote ? "立即创建" : "任务详情配置"
        <el-button type="primary" @click="nextstep('ruleForm')">{{
          quote ? "立即创建" : "派发患者配置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
        <el-button
          :loading="submitLoading"
          type="success"
          @click="submitForm('ruleForm')"
          >{{ quote ? "立即创建" : "确认服务配置" }}</el-button
        >
        <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
      </div>
      <!-- 任务详情 -->
      <div v-if="Editprogress == 2">
        <el-alert title="在本阶段选择宣教病人" type="success" effect="dark">
        <el-alert title="在本阶段选择随访病人" type="success" effect="dark">
        </el-alert>
        <div class="leftvlue-jbxx">
          <div class="examine-jic">
@@ -515,10 +582,13 @@
          </div>
        </div>
        <el-button type="primary" @click="laststep()">上一步</el-button>
        <el-button type="success" @click="submitForm('ruleForm')">{{
          quote ? "立即创建" : "确认任务配置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
        <el-button
          :loading="submitLoading"
          type="success"
          @click="submitForm('ruleForm')"
          >{{ quote ? "立即创建" : "确认服务配置" }}</el-button
        >
        <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
      </div>
    </div>
    <!-- 添加患者 -->
@@ -550,6 +620,12 @@
              <el-form-item label="患者诊断:">
                <el-input
                  v-model="patientqueryParams.leavediagname"
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
              <el-form-item label="主治医生:">
                <el-input
                  v-model="patientqueryParams.drname"
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
@@ -613,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">
@@ -704,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
@@ -716,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">
@@ -736,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">
@@ -757,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
@@ -768,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">
@@ -891,6 +969,7 @@
  Externallist,
  getQtemplatelist,
  getQtemplateobj,
  taskgetQtemplateobj,
  TaskQuestioncomit,
  deleteTaskQuestioncomit,
  Questionnairetaskgetson,
@@ -904,8 +983,10 @@
  taskdiaggetlist,
  taskopergetlist,
} from "@/api/AiCentre/index";
import OptionalForm from "@/components/OptionalForm"; //正则组件
import OptionalForm from "@/components/OptionalForm"; //疾病添加组件
import SFtable from "@/components/SFtable"; //表格组件
import SortCheckbox from "@/components/SortCheckbox"; //表格组件
import { MessageBox } from "element-ui";
export default {
@@ -918,6 +999,7 @@
      previewid: "", //任务模板传递id
      libName: "",
      templateor: false,
      submitLoading: false, // 控制按钮加载状态
      objyl: {},
      overallCase: [], //选择患者总
      allpids: [],
@@ -936,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: "停用" },
@@ -962,6 +1048,7 @@
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
        { label: "科室", width: "240", prop: "dept" },
@@ -975,6 +1062,7 @@
        { label: "身份证", width: "200", prop: "sfzh" },
        { 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" },
@@ -1010,6 +1098,10 @@
      // 时间处理
      daytime: [], //日期
      applydaytime: [], //计算日期
      diseaseDept: null, // 疾病关联下的科室(存储整个对象)
      diseaseWard: null, // 疾病关联下的病区(存储整个对象)
      diseaseDepts: "",
      diseaseWards: "",
      time1: "", //上午时间段
      time2: "", //下午时间段
      time3: "", //晚上时间段
@@ -1019,6 +1111,7 @@
        pageSize: 10,
      },
      checkList: "",
      selectedOrder: [],
      deliverytopqueryParams: {
        pageNum: 1, //
        pageSize: 10,
@@ -1108,11 +1201,11 @@
      },
      taskoptions: [
        {
          value: "1",
          value: "4",
          label: "出院病人",
        },
        {
          value: "4",
          value: "1",
          label: "在院病人",
        },
        {
@@ -1147,60 +1240,7 @@
        },
      ],
      tasktypes: [
        {
          value: 1,
          label: "监测评估",
        },
        {
          value: 2,
          label: "出院随访",
        },
        {
          value: 3,
          label: "门诊随访",
        },
        {
          value: 4,
          label: "宣教关怀",
        },
        {
          value: 5,
          label: "复诊管理",
        },
        // {
        //   value: 5,
        //   label: "满意度调查",
        // },
        {
          value: 7,
          label: "患者报告",
        },
        // {
        //   value: 8,
        //   label: "其他通知",
        // },
        {
          value: 9,
          label: "体检随访",
        },
        // {
        //   value: 1",
        //   label: "医技随访",
        // },
        {
          value: 11,
          label: "影像随访",
        },
        {
          value: 12,
          label: "心电随访",
        },
        // {
        //   value: "13",
        //   label: "专病随访",
        // },
      ],
      tasktypes: store.getters.tasktypes,
      // 科室/病区
      belongWards: [],
      deptlist: [],
@@ -1224,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" },
@@ -1238,7 +1279,7 @@
      serviceType: null,
    };
  },
  components: { SFtable, OptionalForm },
  components: { SFtable, OptionalForm, SortCheckbox },
  created() {
    this.appraiselist = store.getters.appraiselist;
@@ -1330,10 +1371,18 @@
            value: "5",
            label: "微信公众号",
          },
          { label: "微信小程序", value: 6 },
          { label: "微信小程序", value: "6" },
        ];
      } 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: "智能语音",
@@ -1399,6 +1448,9 @@
        this.form.serviceType == 2 ||
        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 = [
@@ -1447,106 +1499,160 @@
    },
    // 保存
    submitForm(formName) {
      if (this.time4 && this.form.sendType == 3)
        this.form.showTimeMorn = this.time4;
      this.form.sendTimeslot = [
        {
          begantime: this.time4,
          endtime: "",
          xh: 1,
        },
      ];
      if (this.form.appltype == 1) {
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 2) {
        this.deptcodesWards = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 3) {
        this.deptcodesWards = [];
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
      } else if (this.form.appltype == 4) {
        this.deptcodesWards = [];
        this.illnesscodes = [];
        this.leavehospitaldistrictcodes = [];
      }
      if (this.checkList) {
        this.form.preachform = this.checkList;
      } else {
        this.$modal.msgError("请选择服务类型");
      console.log(this.submitLoading, "1");
      if (this.submitLoading) {
        return;
      }
      console.log(this.operationcodes[0]);
      console.log(this.operationcodes);
      // 第二步:开启加载状态,禁用按钮
      this.submitLoading = true;
      console.log(this.submitLoading);
      if (
        this.deptcodesWards[0] ||
        this.leavehospitaldistrictcodes[0] ||
        this.diagglist[0] ||
        this.operationcodes[0]
      ) {
      } else {
        this.$modal.msgError("请选择任务关联条件");
        return;
      }
      try {
        if (this.time4 && this.form.sendType == 3)
          this.form.showTimeMorn = this.time4;
        this.form.sendTimeslot = [
          {
            begantime: this.time4,
            endtime: "",
            xh: 1,
          },
        ];
        console.log(1);
      if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
        this.$modal.msgError("请选择病人");
        return;
      }
      if (!this.form.templatename && !this.templateor) {
        this.$modal.msgError("未选择模板");
        return;
      }
      if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) {
      } else if (
        (this.form.sendType == 3 && this.time4) ||
        this.form.longTask
      ) {
      } else {
        return this.$modal.msgError("时间信息缺失");
      }
      const filteredArray = this.variableList.filter(
        (item) =>
          item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
      );
      this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
      if (this.form.taskid) {
        this.form.isoperation = 2;
      } else {
        this.form.isoperation = 1;
      }
      if (!this.form.type) {
        this.form.type = this.$route.query.type;
      }
      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.icd10code = this.diagglist
        .map((item) => item.icdcode)
        .join(",");
      Editsingletask(this.form).then((res) => {
        if (res.code == 200) {
          if (this.form.taskid) {
            this.$modal.msgSuccess("修改成功");
          } else {
            this.$modal.msgSuccess("新增成功");
          }
          this.$router.push({
            path: "/followvisit/tasklist",
            query: { tasktopic: this.form.serviceType },
          });
        if (this.form.appltype == 1) {
          this.leavehospitaldistrictcodes = [];
          this.form.oplevelcode = null;
          this.illnesscodes = [];
        } else if (this.form.appltype == 2) {
          this.deptcodesWards = [];
          this.form.oplevelcode = null;
          this.illnesscodes = [];
        } else if (this.form.appltype == 3) {
          this.deptcodesWards = [];
          this.leavehospitaldistrictcodes = [];
          this.form.oplevelcode = null;
        } else if (this.form.appltype == 4) {
          this.deptcodesWards = [];
          this.illnesscodes = [];
          this.leavehospitaldistrictcodes = [];
        }
      });
        if (this.checkList) {
          this.form.preachform = this.checkList.join(",");
          this.form.preachformList = this.selectedOrder;
        } else {
          this.$modal.msgError("请选择服务类型");
          this.submitLoading = false;
          return;
        }
        console.log(2);
        if (
          this.deptcodesWards[0] ||
          this.leavehospitaldistrictcodes[0] ||
          this.diagglist[0] ||
          this.form.oplevelcode ||
          this.form.longTask == 2 ||
          this.serviceType == 3
        ) {
        } else {
          this.$modal.msgError("请选择任务关联条件");
          this.submitLoading = false;
          return;
        }
        //暂停任务患者限制
        // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
        //   this.$modal.msgError("请选择病人");
        //   return;
        // }
        console.log(3);
        if (!this.form.templatename && !this.templateor) {
          this.$modal.msgError("未选择模板");
          this.submitLoading = false;
          return;
        }
        if (
          (this.form.sendType == 1 && this.time1) ||
          this.form.sendType == 2
        ) {
        } else if (
          (this.form.sendType == 3 && this.time4) ||
          this.form.longTask
        ) {
        } else {
          this.submitLoading = false;
          return this.$modal.msgError("时间信息缺失");
        }
        const filteredArray = this.variableList.filter(
          (item) =>
            item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
        );
        this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
        if (this.form.taskid) {
          this.form.isoperation = 2;
        } else {
          this.form.isoperation = 1;
        }
        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(",");
        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) {
            if (this.form.taskid) {
              this.$modal.msgSuccess("修改成功");
            } else {
              this.$modal.msgSuccess("新增成功");
            }
            this.$router.push({
              path: "/followvisit/tasklist",
              query: { tasktopic: this.form.serviceType },
            });
            this.submitLoading = false;
          }
        });
      } catch (error) {
        this.submitLoading = false;
      } finally {
        // 第四步:无论成功或失败,最终都关闭加载状态
      }
    },
    handleDiseaseDeptChange(dept) {
      // 当选择科室时,存储整个科室对象
      this.diseaseDept = dept;
    },
    handleDiseaseWardChange(ward) {
      // 当选择病区时,存储整个病区对象
      this.diseaseWard = ward;
    },
    // ----------------------表格子组件事件
    // 选择预览
    selectfn(row, type) {
@@ -1566,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 = [];
            });
@@ -1581,6 +1689,8 @@
    },
    // 预览
    previewfnmb() {
      // taskgetQtemplateobj({ id: this.form.templateid });
      getTaskQuestioncomit(this.form.templateid).then((res) => {
        if (res.code == 200) {
          console.log(res, "预览数据");
@@ -1591,19 +1701,42 @@
          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;
            }
          });
        }
      });
    },
    checkSelectionChange(selectedValues, selectedOrder) {
      this.selectedOrder = selectedValues;
      console.log("当前选中:", selectedValues);
      console.log("选中顺序:", selectedOrder);
    },
    // 服务形式选取
    handleCheckedCitiesChange(row) {
      console.log(row, "服务");
      this.foncheckList = this.checkboxlist.filter((obj) =>
        row.includes(obj.value)
      );
    },
    // 服务形式删除
    handleClosetag(tag) {
      console.log(tag, "tag");
      console.log(this.foncheckList, "foncheckList");
      this.checkList = this.checkList.filter((item) => item != tag.value);
      this.foncheckList = this.foncheckList.filter(
        (obj) => obj.value !== tag.value
      );
    },
    getillness(id) {
      if (id) {
@@ -1622,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) {
@@ -1686,9 +1819,7 @@
      this.overallCase.forEach((item) => {
        this.allpids.push(item.patid);
      });
      if (
        this.patientqueryParams.allhosp == 4
      ) {
      if (this.patientqueryParams.allhosp == 4) {
        this.tableLabelhz = [
          // { label: "入院日期", width: "170", prop: "starttime" },
          { label: "出院日期", width: "150", prop: "endtime" },
@@ -1697,6 +1828,7 @@
          { label: "身份证", width: "200", prop: "idcardno" },
          { 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" },
@@ -1711,6 +1843,22 @@
          { label: "身份证", width: "200", prop: "idcardno" },
          { 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" },
          { label: "科室", width: "180", prop: "dept" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
        ];
      } else if (this.patientqueryParams.allhosp == 2) {
        this.tableLabelhz = [
          { label: "就诊日期", width: "150", prop: "admitdate" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { 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" },
@@ -1725,21 +1873,16 @@
      }
      // 来源判断
      if (this.patientqueryParams.searchscope == 1) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
      if (this.patientqueryParams.allhosp == 4) {
        this.patientqueryParams.hospitaldistrictcodes = [];
        this.patientqueryParams.deptcodes = [];
      } else if (this.patientqueryParams.allhosp == 1) {
        this.patientqueryParams.deptcodes =
          this.patientqueryParams.leaveldeptcodes;
        this.patientqueryParams.hospitaldistrictcodes =
          this.patientqueryParams.leavehospitaldistrictcodes;
        this.patientqueryParams.leavehospitaldistrictcodes = [];
      } else if (this.patientqueryParams.searchscope == 2) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.patientqueryParams.leaveldeptcodes = [];
      } else {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      getTaskpatientQC(this.patientqueryParams).then((response) => {
        this.patientuserList = response.rows;
@@ -1757,6 +1900,7 @@
    handleUpdate() {},
    handleDelete() {},
    handleExport() {},
    // 选择患者表数据
    handleSelectionChange(selection) {
      this.SelectPatientslist = structuredClone(selection);
@@ -1770,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;
@@ -1777,6 +1922,13 @@
          item.sfzh = item.idcardno;
          if (this.patientqueryParams.allhosp == 6) {
            item.patfrom = 1;
          }
          if (this.patientqueryParams.allhosp == 1) {
            item.visittime = item.endtime;
          } else if (this.patientqueryParams.allhosp == 4) {
            item.visittime = item.starttime;
          } else if (this.patientqueryParams.allhosp == 2) {
            item.visittime = item.admitdate;
          }
          this.overallCase.push(item);
          this.form.patTaskRelevances.push(item);
@@ -1834,6 +1986,25 @@
        return;
      }
      if (
        this.patientqueryParams.searchscope == 1 ||
        this.patientqueryParams.allhosp == 2
      ) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes = [];
      } else if (this.patientqueryParams.searchscope == 2) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.patientqueryParams.leaveldeptcodes = [];
      } else {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      if (
        !this.patientqueryParams.leavehospitaldistrictcodes ||
        !this.patientqueryParams.leavehospitaldistrictcodes[0]
      )
@@ -1852,6 +2023,7 @@
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "出院天数", width: "", prop: "endDay" },
      ];
      this.patientqueryParams.pageSize = 1000;
@@ -1932,8 +2104,8 @@
              ? this.form.patTaskRelevances
              : [];
            this.overallCase = this.form.patTaskRelevances.concat();
            this.checkList = this.form.preachform;
            this.checkList = this.form.preachform.split(",");
            this.selectedOrder = this.form.preachformList;
            this.overallCase.forEach((item) => {
              if (item.endtime) {
                item.endDay = this.daysBetween(item.endtime);
@@ -2005,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);
          });
        }
@@ -2067,6 +2244,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);
@@ -2199,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("选择模板成功");
@@ -2209,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("选择模板成功");
@@ -2259,9 +2441,13 @@
            this.objyl.isoperation = 1;
            this.objyl.svyTaskTemplateScriptVOS =
              this.objyl.svyTemplateLibScripts;
            this.objyl.svyTaskTemplateScriptVOS.forEach((item) => {
              item.svyTaskTemplateTargetoptions =
                item.svyLibTemplateTargetoptions;
            });
            this.form.svyTaskTemplateVO = this.objyl;
            this.form.templatename = this.objyl.svyname;
            this.$modal.msgSuccess("暂存成功保存任务后模板失效");
            this.$modal.msgSuccess("暂存成功保存任务后模板生效");
            this.drawermb = false;
            this.previewtf = false;
          })
@@ -2282,9 +2468,11 @@
<style lang="scss" scoped>
.Questionnairemanagement {
}
.leftvlue-jbxx {
  margin-top: 10px;
}
.sidecolumn {
  width: 100%;
  // min-height: 12vh;
@@ -2296,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;
@@ -2308,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;
@@ -2317,6 +2508,7 @@
    padding-left: 5px;
    margin-bottom: 10px;
    display: flex;
    // justify-content: space-between;
    .Add-details {
      font-size: 18px;
@@ -2324,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;
@@ -2352,6 +2549,7 @@
    }
  }
}
.xinz-infs {
  font-size: 18px;
  line-height: 48px;
@@ -2360,6 +2558,7 @@
    margin-left: 10px;
  }
}
// .leftvlue-jbxx {
//   margin-bottom: 50px;
//   font-size: 20px;
@@ -2382,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;
@@ -2420,6 +2626,7 @@
    }
  }
}
::v-deep .addtopic-input {
  input {
    background: #02a7f0;
@@ -2427,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;
// }
@@ -2441,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;
// }
@@ -2457,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;