yxh
sendo
2025-09-29 c0da9cfc05fc3b92cff8c1dc0298e9ea0d4889d2
src/views/patient/propaganda/particty.vue
@@ -69,7 +69,7 @@
                    placeholder="请输入任务描述"
                  />
                </el-form-item>
                <el-form-item label="服务形式">
                <!-- <el-form-item label="服务形式">
                  <el-radio-group
                    v-model="checkList"
                    @change="handleCheckedCitiesChange"
@@ -78,11 +78,20 @@
                      v-for="(item, index) in checkboxlist"
                      :key="index"
                      :label="item.value"
                      @change="checkboxChange($event, item.value)"
                    >
                      {{ item.label }}</el-radio
                    >
                  </el-radio-group>
                </el-form-item> -->
                <el-form-item label="服务形式">
                  <SortCheckbox
                    v-model="checkList"
                    :options="checkboxlist"
                    :selectedOrder="selectedOrder"
                    value-key="value"
                    label-key="label"
                    @change="checkSelectionChange"
                  />
                </el-form-item>
                <!-- <div class="xinz-infs">
                  <el-form-item label="服务执行顺序" prop="daytime">
@@ -267,7 +276,6 @@
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
                <el-row v-if="form.appltype == 3">
                  <div class="xinz-infs">
@@ -376,7 +384,7 @@
                    ></el-button>
                    <el-button
                      v-if="form.templatename"
                      v-if="form.templateid"
                      type="success"
                      icon="el-icon-search"
                      @click="previewfnmb()"
@@ -472,7 +480,7 @@
                        size="medium"
                        :disabled="!patientqueryParams.allhosp"
                        @click="handleQuery"
                        >新增</el-button
                        >添加患者</el-button
                      >
                    </el-col>
@@ -541,6 +549,12 @@
              v-show="showSearch"
              label-width="98px"
            >
              <el-form-item label="主治医生:">
                <el-input
                  v-model="patientqueryParams.drname"
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
              <el-form-item label="患者:">
                <el-input
                  v-model="patientqueryParams.name"
@@ -787,13 +801,13 @@
          @click="Departmenttreatment"
          >{{ form.templateid ? "替换使用" : "选择使用" }}</el-button
        >
        <!-- <el-button
        <el-button
          :type="previewtftype ? 'success' : 'warning'"
          @click="Modifytemplate"
          >{{
            previewtftype ? "前往修改已选择模板" : "新增保存并前往修改"
          }}</el-button
        > -->
        >
      </span>
    </el-dialog>
    <el-drawer
@@ -882,7 +896,7 @@
import { messagelistpatient } from "@/api/patient/homepage";
import store from "@/store";
import {
  getTaskpatient,
  getTaskpatientQC,
  getillnesslist,
  getbaseopera,
  getFollowuplist,
@@ -904,6 +918,7 @@
} from "@/api/AiCentre/index";
import { deptTreeSelect } from "@/api/system/user";
import OptionalForm from "@/components/OptionalForm";
import SortCheckbox from "@/components/SortCheckbox"; //表格组件
import { MessageBox } from "element-ui";
import SFtable from "@/components/SFtable"; //表格组件
@@ -946,6 +961,8 @@
      skip: false,
      donorchargeList: [],
      baseoperaList: [],
      selectedOrder: [],
      usable: [
        { value: "0", label: "可用" },
        { value: "1", label: "停用" },
@@ -1020,7 +1037,7 @@
        pageNum: 1, //
        pageSize: 10,
      },
      checkList: "",
      checkList: [],
      foncheckList: [],
      formatvalue: {
        format1: "",
@@ -1109,16 +1126,19 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb: "亲爱的患者/家属,您好!我们是景宁人民医院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,进行本次回访服务。",
        kcb:
          "亲爱的患者/家属,您好!我们是" +
          localStorage.getItem("orgname") +
          "的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,进行本次回访服务。",
        jsy: "请您注意休息和营养,生活上要劳逸结合,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访内容就到这里,祝您身体健康!",
      },
      taskoptions: [
        {
          value: "1",
          value: "4",
          label: "出院病人",
        },
        {
          value: "4",
          value: "1",
          label: "在院病人",
        },
        {
@@ -1149,36 +1169,7 @@
        },
      ],
      tasktypes: [
        {
          value: 1,
          label: "心电随访",
        },
        {
          value: 2,
          label: "出院随访",
        },
        {
          value: 3,
          label: "影像随访",
        },
        {
          value: 4,
          label: "宣教关怀",
        },
        {
          value: 5,
          label: "体检随访",
        },
        {
          value: 11,
          label: "医技随访",
        },
        {
          value: 10,
          label: "专科随访",
        },
      ],
      tasktypes: store.getters.tasktypes,
      // 科室/病区
      belongWards: [],
      deptlist: [],
@@ -1219,7 +1210,7 @@
      serviceType: null,
    };
  },
  components: { SFtable, OptionalForm },
  components: { SFtable, OptionalForm, SortCheckbox },
  created() {
    this.appraiselist = store.getters.appraiselist;
@@ -1233,6 +1224,8 @@
    this.form.typename = this.$route.query.typename;
    this.serviceType = Number(this.$route.query.serviceType);
    this.form.serviceType = Number(this.$route.query.serviceType);
    console.log(localStorage.getItem("orgid"), "orgid");
    this.Acquisitiontype();
    this.getillnesslist();
    this.Getdetails();
@@ -1351,7 +1344,15 @@
          //   label: "智能机器人",
          // },
        ];
      } else if (this.form.serviceType == 7 || this.form.serviceType == 5|| this.form.serviceType == 10|| this.form.serviceType == 11) {
      } else if (
        this.form.serviceType == 7 ||
        this.form.serviceType == 5 ||
        this.form.serviceType == 8 ||
        this.form.serviceType == 9 ||
        this.form.serviceType == 11 ||
        this.form.serviceType == 12 ||
        this.form.serviceType == 10
      ) {
        this.checkboxlist = [
          {
            value: "1",
@@ -1382,7 +1383,12 @@
            label: "术后随访",
          },
        ];
      } else if (this.form.serviceType == 2 || this.form.serviceType == 3) {
      } else if (
        this.form.serviceType == 2 ||
        this.form.serviceType == 3 ||
        this.form.serviceType == 16 ||
        this.form.serviceType == 4
      ) {
        this.checkboxlist = [
          {
            value: "1",
@@ -1440,24 +1446,25 @@
        },
      ];
      if (this.form.appltype == 1) {
        this.leavehospitaldistrictcodes=[];
        this.operationcodes=[];
        this.illnesscodes=[];
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 2) {
        this.deptcodesWards=[];
        this.operationcodes=[];
        this.illnesscodes=[];
        this.deptcodesWards = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 3) {
        this.deptcodesWards=[];
        this.leavehospitaldistrictcodes=[];
        this.operationcodes=[];
        this.deptcodesWards = [];
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
      } else if (this.form.appltype == 4) {
        this.deptcodesWards=[];
        this.illnesscodes=[];
        this.leavehospitaldistrictcodes=[];
        this.deptcodesWards = [];
        this.illnesscodes = [];
        this.leavehospitaldistrictcodes = [];
      }
      if (this.checkList) {
        this.form.preachform = this.checkList;
        this.form.preachform = this.checkList.join(",");
        this.form.preachformList = this.selectedOrder;
      } else {
        this.$modal.msgError("请选择服务类型");
        return;
@@ -1473,10 +1480,10 @@
        this.$modal.msgError("请选择任务关联条件");
        return;
      }
      if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
        this.$modal.msgError("请选择病人");
        return;
      }
      // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
      //   this.$modal.msgError("请选择病人");
      //   return;
      // }
      if (!this.form.templatename && !this.templateor) {
        this.$modal.msgError("未选择模板");
@@ -1511,7 +1518,8 @@
      this.form.opcode = this.operationcodes.join(",");
      this.form.icd10code = this.diagglist
        .map((item) => item.icdcode)
        .join(",");      Editsingletask(this.form).then((res) => {
        .join(",");
      Editsingletask(this.form).then((res) => {
        if (res.code == 200) {
          if (this.form.taskid) {
            this.$modal.msgSuccess("修改成功");
@@ -1655,18 +1663,31 @@
          { 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: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "180", prop: "dept" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
        ];
      }
      if (this.allpids[0]) {
        this.patientqueryParams.pids = this.allpids;
      } else {
        this.patientqueryParams.pids = null;
      }
      // 类型判断
      if (this.patientqueryParams.allhosp == 1) {
        this.patientqueryParams.cry = 1;
      } else if (this.patientqueryParams.allhosp == 4) {
        this.patientqueryParams.cry = 0;
        this.patientqueryParams.allhosp = "1";
      //  this.patientqueryParams.cry = 0;
      //  this.patientqueryParams.allhosp = "1";
      }
      // 来源判断
@@ -1686,7 +1707,7 @@
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      getTaskpatient(this.patientqueryParams).then((response) => {
      getTaskpatientQC(this.patientqueryParams).then((response) => {
        this.patientuserList = response.rows;
        this.patientuserList.forEach((item) => {
          if (item.endtime) {
@@ -1721,6 +1742,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);
@@ -1769,16 +1797,15 @@
    },
    getList() {},
    handleQuery() {
      console.log("this.patientqueryParams.allhosp",this.patientqueryParams.allhosp);
      if (this.patientqueryParams.topica == 0) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leavehospitaldistrictcodes = store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leaveldeptcodes = store.getters.leaveldeptcodes;
      } else if (this.patientqueryParams.topica == 1) {
        this.patientqueryParams.leavehospitaldistrictcodes = null;
        this.patientqueryParams.leaveldeptcodes = store.getters.leaveldeptcodes;
      } else if (this.patientqueryParams.topica == 2) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leavehospitaldistrictcodes =   store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leaveldeptcodes = null;
      }
      if (
@@ -1792,8 +1819,24 @@
      )
        this.patientqueryParams.leaveldeptcodes = null;
      this.handleAddpatient();
      console.log("this.patientqueryParams.allhosp",this.patientqueryParams.allhosp);
    },
    resetQuery() {},
    resetQuerymb() {
      this.topqueryParams = { svyname: "" };
      this.handleQuerymb();
    },
    resetQuery() {
      this.patientqueryParams = {
        pageNum: 1, //
        pageSize: 10,
        topica: 1, //0全部1科室2病区
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery();
    },
    handleQuerymb() {
      getFollowuplist(this.topqueryParams).then((response) => {
        this.userList = response.rows;
@@ -1825,7 +1868,10 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb: "亲爱的患者/家属,您好!我们是景宁人民医院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访。",
        kcb:
          "亲爱的患者/家属,您好!我们是" +
          localStorage.getItem("orgname") +
          "的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,进行本次回访服务。",
        jsy: "请您注意休息和营养,生活上要劳逸结合,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访就到这里,祝您身体健康!",
      };
@@ -1840,7 +1886,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) {
@@ -1916,7 +1963,7 @@
              icdcode: item.icd10code,
            }).then((res) => {
              item.icdname = res.rows[0].icdname;
            this.diagglist.push(item);
              this.diagglist.push(item);
            });
            this.illnesscodes.push(item.icd10code);
          });
@@ -1949,18 +1996,6 @@
    // 手术查询
    remoteopcode(name) {
      if (name) {
        getillnesslist({
          pageNum: 1,
          pageSize: 1000,
          icdname: name,
        }).then((res) => {
          this.donorchargeList = res.rows;
        });
      }
    },
    // 疾病查询
    remotedonor(name) {
      if (name) {
        getbaseopera({
          pageNum: 1,
          pageSize: 1000,
@@ -1970,6 +2005,7 @@
        });
      }
    },
    // 任务科室删除触发
    removetag(row) {
      let result = this.deptlist
@@ -2018,7 +2054,9 @@
      if (result.length) {
        taskdiaghospgetsondel(result).then((res) => {
          if (res.code) {
            this.diagglist=this.diagglist.filter(item => item.icd10code != row);
            this.diagglist = this.diagglist.filter(
              (item) => item.icd10code != row
            );
            this.$modal.msgSuccess("删除成功");
          }
        });
@@ -2193,7 +2231,11 @@
        }
      });
    },
    checkboxChange(checked, value) {},
    checkSelectionChange(selectedValues, selectedOrder) {
      this.selectedOrder = selectedValues;
      console.log("当前选中:", selectedValues);
      console.log("选中顺序:", selectedOrder);
    },
    // 服务形式选取
    handleCheckedCitiesChange(row) {
      console.log(row, "服务");
@@ -2215,11 +2257,11 @@
      if (!this.form.taskid) {
        this.templateor = true;
        MessageBox.confirm(
          "当前为新增任务未保存不可关联模板,是否先保存任务?",
          "当前为新增任务未保存不可关联模板,是否先暂存模板保存任务后生效?",
          "功能提示",
          {
            confirmButtonText: "保存任务",
            cancelButtonText: "暂存模板",
            confirmButtonText: "暂存模板",
            cancelButtonText: "取消",
            type: "warning",
          }
        )
@@ -2236,26 +2278,14 @@
            this.objyl.ivrTaskTemplateScriptVOList =
              this.objyl.ivrLibaTemplateScriptVOList;
            this.form.ivrTaskTemplateVO = this.objyl;
            this.submitForm();
          })
          .catch(() => {
            if (Array.isArray(this.objyl.suitway)) {
              this.objyl.suitway = this.objyl.suitway.join(",");
            }
            this.objyl.templateid = this.objyl.id;
            this.objyl.isoperation = 1;
            this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => {
              item.ivrTaskScriptTargetoptionList =
                item.ivrLibaScriptTargetoptionList;
            });
            this.objyl.ivrTaskTemplateScriptVOList =
              this.objyl.ivrLibaTemplateScriptVOList;
            this.form.ivrTaskTemplateVO = this.objyl;
            this.form.templatename = this.objyl.templateName;
            this.$modal.msgSuccess("暂存成功保存任务后模板失效");
            this.drawermb = false;
            this.previewtf = false;
          })
          .catch(() => {
            this.drawermb = false;
            this.previewtf = false;
          });
      } else {
        setTimeout(() => {