WXL (wul)
16 小时以前 d93ed5c5aadcf3d49f824339c26ebfac911be06d
src/views/patient/propaganda/Missioncreation.vue
@@ -253,7 +253,7 @@
                      /> </el-form-item
                  ></el-col>
                </el-row>
                <el-form-item label="服务形式">
                <!-- <el-form-item label="服务形式">
                  <el-checkbox-group v-model="checkList">
                    <el-checkbox
                      v-for="(item, index) in checkboxlist"
@@ -263,6 +263,16 @@
                      {{ item.label }}</el-checkbox
                    >
                  </el-checkbox-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>
            </div>
@@ -520,7 +530,7 @@
            />
          </el-row>
          <pagination
            v-show="patienttotal > 0"
            v-show="patienttotal > 0 && this.patientqueryParams.allhosp != 6"
            :total="patienttotal"
            :page.sync="patientqueryParams.pageNum"
            :limit.sync="patientqueryParams.pageSize"
@@ -759,7 +769,7 @@
import store from "@/store";
import {
  getTaskpatient,
  getTaskpatientQC,
  getlibrarylist,
  getFollowuplist,
  getQtemplatelist,
@@ -773,6 +783,7 @@
import { listDept } from "@/api/system/dept";
import { getToken } from "@/utils/auth";
import SFtable from "@/components/SFtable"; //表格组件
import SortCheckbox from "@/components/SortCheckbox"; //表格组件
export default {
  name: "ServiceDetails",
@@ -796,6 +807,7 @@
      dialogVisiblepatient: false, //添加患者弹框
      radio: 1,
      checkboxlist: [],
      selectedOrder: [],
      // 科室/病区
      belongWards: [],
      belongWards: [],
@@ -805,9 +817,10 @@
      htmlRichText: "<p>Hello, <strong>world</strong>!</p>",
      // 患者表单
      tableLabelhz: [
        { label: "出院日期", width: "150", prop: "inhosptime" },
        { label: "出院日期", width: "150", prop: "endtime" },
        { label: "患者", width: "", prop: "name" },
        { label: "身份证", width: "200", prop: "sfzh" },
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "责任护士", width: "", prop: "nurseName" },
@@ -820,6 +833,7 @@
        { label: "出院日期", width: "150", prop: "endtime" },
        { label: "患者", width: "", prop: "name" },
        { label: "身份证", width: "200", prop: "sfzh" },
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "责任护士", width: "", prop: "nurseName" },
@@ -966,11 +980,11 @@
      },
      taskoptions: [
        {
          value: "1",
          value: "4",
          label: "出院病人",
        },
        {
          value: "4",
          value: "1",
          label: "在院病人",
        },
        {
@@ -980,6 +994,14 @@
        {
          value: "3",
          label: "体检病人",
        },
        {
          value: "6",
          label: "院外患者",
        },
        {
          value: "5",
          label: "手术病人",
        },
      ],
      source: [
@@ -999,7 +1021,7 @@
      quote: false,
    };
  },
  components: { SFtable },
  components: { SFtable, SortCheckbox },
  created() {
    this.id = this.$route.query.id;
@@ -1126,12 +1148,21 @@
    submitForm(formName) {
      this.form.preachform = this.checkList.join(",");
      // this.formatFn(1);
      if (!this.form.patTaskRelevances[0]&&this.form.longTask==0) {
      if (!this.form.patTaskRelevances[0] && this.form.longTask == 0) {
        this.$modal.msgError("请选择病人");
        return;
      }
      if (!this.form.templatename) {
        this.$modal.msgError("未选择模板");
        return;
      }
      if (this.checkList) {
        this.form.preachform = this.checkList.join(",");
        this.form.preachformList = this.selectedOrder;
      } else {
        this.$modal.msgError("请选择服务类型");
        this.submitLoading = false;
        return;
      }
      const filteredArray = this.variableList.filter(
@@ -1242,13 +1273,32 @@
      this.overallCase.forEach((item) => {
        this.allpids.push(item.patid);
      });
      if (this.patientqueryParams.allhosp == 1) {
      if (this.patientqueryParams.allhosp == 4) {
        this.tableLabelhz = [
          // { label: "入院日期", width: "170", prop: "starttime" },
          { label: "出院日期", width: "150", prop: "endtime" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "sfzh" },
          { label: "患者诊断", width: "", prop: "leavediagname" },
          { 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 == 1) {
        this.tableLabelhz = [
          { label: "入院日期", width: "150", prop: "starttime" },
          { label: "患者", width: "", prop: "name" },
          { label: "患者诊断", width: "", prop: "leavediagname" },
          { 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" },
@@ -1256,14 +1306,18 @@
        ];
      } else if (this.patientqueryParams.allhosp == 2) {
        this.tableLabelhz = [
          { label: "序号", width: "", prop: "patid" },
          { label: "患者名称", width: "", prop: "name" },
          { 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: "diagname" },
          { label: "就诊科室", width: "", prop: "deptName" },
          { label: "入院日期", width: "", prop: "inhosptime" },
          { label: "创建人", width: "", prop: "createBy" },
          { 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" },
        ];
      }
      if (this.allpids[0]) {
@@ -1271,33 +1325,26 @@
      } 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";
      }
      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);
      }
      getTaskpatient(this.patientqueryParams).then((response) => {
      getTaskpatientQC(this.patientqueryParams).then((response) => {
        console.log(response);
        this.patientuserList = response.rows;
        this.patientuserList.forEach((item) => {
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
        });
        this.patienttotal = response.total;
        this.loading = false;
        this.Restorecheck();
@@ -1309,9 +1356,8 @@
    handleExport() {},
    // 选择患者表数据
    handleSelectionChange(selection, type) {
      console.log("多选患者");
      this.SelectPatientslist = selection;
    handleSelectionChange(selection) {
      this.SelectPatientslist = structuredClone(selection);
      this.multiple = !selection.length;
      // 赋值给整体选中数组
@@ -1320,13 +1366,22 @@
        if (!isExist) {
          item.isoperation = 1;
          item.patid = item.id;
          if (item.idcardno) {
            item.sfzh = item.idcardno;
          item.hospType = this.patientqueryParams.allhosp;
          item.sfzh = item.idcardno;
          item.deptCode = item.deptcode;
          item.deptName = item.dept;
          item.admindate = item.inhosptime;
          item.diagname = item.leavediagname;
          item.sfzh = item.idcardno;
          if (this.patientqueryParams.allhosp == 6) {
            item.patfrom = 1;
          }
          if (type) {
            item.hospType = type;
          } else {
            item.hospType = this.patientqueryParams.allhosp;
          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);
@@ -1422,6 +1477,7 @@
              : [];
            this.overallCase = this.form.patTaskRelevances.concat();
            this.checkList = this.form.preachform.split(",");
            this.selectedOrder = this.form.preachformList;
            console.log(this.form.showDate, "this.form");
            if (this.form.daytime) this.daytime = this.form.showDate.split(",");
            console.log(this.newadd, "依照");
@@ -1448,6 +1504,11 @@
          }
        });
      }
    },
    checkSelectionChange(selectedValues, selectedOrder) {
      this.selectedOrder = selectedValues;
      console.log("当前选中:", selectedValues);
      console.log("选中顺序:", selectedOrder);
    },
    // 依照新增时处理
    neWaddfn() {
@@ -1581,6 +1642,7 @@
      TaskQuestioncomit(this.Tasktemplate).then((response) => {
        console.log(response);
        this.previewtf = false;
        this.drawermb =false;
        this.form.templateid = response.data;
        this.form.libtemplateid = this.libId;
        this.form.templatename = this.libName;
@@ -1839,7 +1901,7 @@
  }
}
.button-textsc {
  color: #3664D9;
  color: #3664d9;
}
.button-textxg {
  color: #de7897;