WXL
2025-01-16 eef0168f78d81a6eb8856976c3e04cc1046c32df
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -651,7 +651,7 @@
                    </el-select> </el-form-item
                ></el-col>
              </el-row>
              <el-row>
              <!-- <el-row>
                <el-col :span="20"
                  ><el-form-item label="适用病区" prop="region">
                    <el-select
@@ -672,7 +672,7 @@
                      </el-option>
                    </el-select> </el-form-item
                ></el-col>
              </el-row>
              </el-row> -->
              <div class="xinz-infs">
                <el-form-item>
@@ -872,7 +872,7 @@
import { messagelistpatient } from "@/api/patient/homepage";
import store from "@/store";
import {
  getTaskpatient,
  getTaskpatientQC,
  getlibrarylist,
  getFollowuplist,
  getQtemplatelist,
@@ -998,6 +998,8 @@
        pageNum: 1, //
        pageSize: 10,
        topica: 1, //0全部1科室2病区
        leavehospitaldistrictcodes:[],
        leaveldeptcodes:[],
      },
      topicoptions: [{ children: [{ children: [] }] }],
      showSearch: true, //
@@ -1070,7 +1072,7 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb: "亲爱的患者/家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。",
        kcb: "亲爱的患者/家属,您好!我们是景宁人民医院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。",
        jsy: "请您注意休息和营养,生活上要劳逸结合,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次宣教内容就到这里,祝您身体健康!",
      },
      taskoptions: [
@@ -1163,6 +1165,12 @@
        sendType: [
          { required: true, message: "发送设置不能为空", trigger: "blur" },
        ],
        deptcode: [
          { required: true, message: "适用科室不能为空", trigger: "blur" },
        ],
        // leavehospitaldistrictcode: [
        //   { required: true, message: "适用病区不能为空", trigger: "blur" },
        // ],
      },
      // 科室院区查询入参
      queryParamsdept: {
@@ -1249,9 +1257,14 @@
            label: "纸质",
          },
          {
            value: "4",
            label: "短信",
          },
          {
            value: "5",
            label: "微信公众号",
          },
          { label: "微信小程序", value: 6 },
        ];
      } else if (this.form.serviceType == 6) {
        this.checkboxlist = [
@@ -1262,6 +1275,7 @@
          {
            value: "4",
            label: "短信",
          },
          {
            value: "5",
@@ -1294,6 +1308,7 @@
          {
            value: "4",
            label: "短信",
          },
          {
            value: "5",
@@ -1304,7 +1319,7 @@
            label: "微信小程序",
          },
        ];
      } else if (this.form.serviceType == 2 || this.form.serviceType == 3) {
      } else if (this.form.serviceType == 2 || this.form.serviceType == 3|| this.form.serviceType == 5|| this.form.serviceType == 4) {
        this.checkboxlist = [
          {
            value: "1",
@@ -1317,6 +1332,7 @@
          {
            value: "4",
            label: "短信",
          },
          {
            value: "5",
@@ -1360,6 +1376,7 @@
          xh: 1,
        },
      ];
      if (this.checkList[0]) {
        this.form.preachform = this.checkList.join(",");
      } else {
@@ -1402,6 +1419,12 @@
      this.form.leavehospitaldistrictcodes = store.getters.belongWards.map(
        (obj) => obj.districtCode
      );
      console.log(this.form.longTask);
      console.log(this.form.preachform);
      if (this.form.longTask && this.form.preachform == 6) {
        this.form.patCycle = 1;
      }
      Editsingletask(this.form).then((res) => {
        if (res.code == 200) {
          if (this.form.taskid) {
@@ -1422,12 +1445,15 @@
      getTaskQuestioncomit(this.form.templateid).then((res) => {
        if (res.code == 200) {
          this.objyl = res.data;
          if (this.objyl.taskid = data.taskId) {
          this.objyl.isoperation = 1;
          }else{
          this.objyl.isoperation = 2;
          if (this.objyl.taskid == data.taskId) {
            this.objyl.isoperation = 2;
          } else {
            this.objyl.isoperation = 1;
          }
          this.objyl.taskid = data.taskId;
          if (!this.objyl.sendDay) {
        this.objyl.sendDay='5';
      }
          TaskQuestioncomit(this.objyl).then((response) => {
            this.previewtf = false;
            this.form.libtemplateid = this.objyl.svyid;
@@ -1538,7 +1564,11 @@
      this.overallCase.forEach((item) => {
        this.allpids.push(item.patid);
      });
      if (this.patientqueryParams.allhosp == 1) {
      if (
        this.patientqueryParams.allhosp == 1 ||
        (this.patientqueryParams.allhosp == 1 &&
          this.patientqueryParams.cry == 1)
      ) {
        this.tableLabelhz = [
          // { label: "入院日期", width: "170", prop: "starttime" },
          { label: "出院日期", width: "150", prop: "endtime" },
@@ -1554,7 +1584,7 @@
        ];
      } else if (this.patientqueryParams.allhosp == 4) {
        this.tableLabelhz = [
        { label: "入院日期", width: "150", prop: "starttime" },
          { label: "入院日期", width: "150", prop: "starttime" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
@@ -1576,6 +1606,7 @@
        this.patientqueryParams.cry = 1;
      } else if (this.patientqueryParams.allhosp == 4) {
        this.patientqueryParams.cry = 0;
        this.patientqueryParams.allhosp = "1";
      }
      // 来源判断
@@ -1595,7 +1626,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) {
@@ -1665,7 +1696,11 @@
          let indexa = this.overallCase.indexOf(row);
          let indexb = this.form.patTaskRelevances.indexOf(row);
          this.overallCase.splice(indexa, 1);
          this.form.patTaskRelevances[indexb].isoperation = 3;
          if (!this.form.taskid) {
            this.form.patTaskRelevances.splice(indexa, 1);
          } else {
            this.form.patTaskRelevances[indexb].isoperation = 3;
          }
          this.$modal.msgSuccess("删除成功");
        });
    },
@@ -1683,6 +1718,13 @@
          store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leaveldeptcodes = null;
      }
      console.log(this.patientqueryParams.leavehospitaldistrictcodes);
      console.log(this.patientqueryParams.leaveldeptcodes);
      if (!this.patientqueryParams.leavehospitaldistrictcodes||!this.patientqueryParams.leavehospitaldistrictcodes[0])
        this.patientqueryParams.leavehospitaldistrictcodes = null;
      if (!this.patientqueryParams.leaveldeptcodes||!this.patientqueryParams.leaveldeptcodes[0])
        this.patientqueryParams.leaveldeptcodes = null;
      this.handleAddpatient();
    },
    resetQuery() {},
@@ -1716,7 +1758,7 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb: "亲爱的患者/家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。",
        kcb: "亲爱的患者/家属,您好!我们是景宁人民医院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。",
        jsy: "请您注意休息和营养,生活上要劳逸结合,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访就到这里,祝您身体健康!",
      };
@@ -1757,25 +1799,25 @@
            this.$modal.msgError(res.code);
          }
        if (this.newadd) {
          this.neWaddfn();
        }
          if (this.newadd) {
            this.neWaddfn();
          }
        });
      }
    },
    // 依照新增时处理
    neWaddfn(){
      this.id=null;
      this.form.taskName='';
    neWaddfn() {
      this.id = null;
      this.form.taskName = "";
      this.form.taskid = null;
      this.overallCase=[];
      this.form.patTaskRelevances=[];
      this.daytime=[]; //日期
      this.applydaytime=[]; //计算日期
      this.time1=""; //上午时间段
      this.time2=""; //下午时间段
      this.time3=""; //晚上时间段
      this.time4=""; //晚上时间段
      this.overallCase = [];
      this.form.patTaskRelevances = [];
      this.daytime = []; //日期
      this.applydaytime = []; //计算日期
      this.time1 = ""; //上午时间段
      this.time2 = ""; //下午时间段
      this.time3 = ""; //晚上时间段
      this.time4 = ""; //晚上时间段
    },
    // 获取科室列表
    listDept() {
@@ -1904,6 +1946,9 @@
      this.objyl.isoperation = 1;
      console.log(this.objyl.id);
      if (!this.objyl.sendDay) {
        this.objyl.sendDay='5';
      }
      if (this.objyl.id) {
        deleteTaskQuestioncomit(this.objyl.id).then((res) => {