WXL (wul)
7 天以前 fb34ba28cb908bd328cf6690ab0b19a56428f4e2
src/views/patient/propaganda/particty.vue
@@ -70,6 +70,23 @@
                  />
                </el-form-item>
                <!-- <el-form-item label="点位编码" v-if="isTongdeCampus&& (serviceType == 6 || serviceType == 14)">
                  <el-select
                    v-model="form.pointLocation"
                    style="width: 220px"
                    clearable
                    filterable
                    placeholder="请选择点位"
                  >
                    <el-option
                      v-for="item in pointOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item> -->
                <el-form-item label="服务形式">
                  <SortCheckbox
                    v-model="checkList"
@@ -206,8 +223,29 @@
                    <el-radio label="4">手术关联</el-radio>
                    <el-radio label="5">任务组</el-radio>
                    <el-radio label="6">药品关联</el-radio>
                    <el-radio label="7"v-if="isTongdeCampus&& (serviceType == 6 || serviceType == 14)">点位关联</el-radio>
                  </el-radio-group>
                </el-form-item>
                <!-- 点位关联 -->
                <el-row v-if="form.appltype == 7">
                  <el-form-item label="关联点位" prop="pointLocation">
                    <el-select
                      v-model="form.pointLocation"
                      style="width: 400px"
                      clearable
                      filterable
                      placeholder="请选择点位"
                    >
                      <el-option
                        v-for="item in pointOptions"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </el-form-item>
                </el-row>
                <!-- 药品关联 -->
                <el-row v-if="form.appltype == 6">
@@ -1702,6 +1740,7 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        pointLocation: "",
        kcb:
          "亲爱的患者/家属,您好!我们是" +
          localStorage.getItem("orgname") +
@@ -1722,13 +1761,6 @@
          detailList: [],
        },
      },
      taskoptions: [
        { value: "4", label: "出院病人" },
        { value: "1", label: "在院病人" },
        { value: "2", label: "门诊病人" },
        { value: "3", label: "体检病人" },
        { value: "5", label: "手术病人" },
      ],
      source: [
        { value: 0, label: "所属患者" },
        { value: 1, label: "科室患者" },
@@ -1770,6 +1802,8 @@
      belongDepts: [],
      quote: false,
      serviceType: null,
      // 可选点位(同德院区,deptType=3)
      pointOptions: [],
      // 再次随访关联任务(缙云县人民医院)
      orgname: localStorage.getItem("orgname"),
      nextTaskDialogVisible: false,
@@ -1800,6 +1834,7 @@
    this.getillnesslist();
    this.Getdetails();
    this.getFollowupclassify();
    this.getPointOptions();
  },
  activated() {
    if (this.id != this.$route.query.id) {
@@ -1813,6 +1848,27 @@
      this.Getdetails();
      this.getFollowupclassify();
    }
  },
  computed: {
    // 患者类型下拉(新增类型):按任务类型限制可选范围
    taskoptions() {
      const options = [
        { value: "4", label: "出院病人" },
        { value: "1", label: "在院病人" },
        { value: "2", label: "门诊病人" },
        { value: "3", label: "体检病人" },
        { value: "5", label: "手术病人" },
      ];
      // 出院随访(serviceType=2):只能选择在院患者
      if (this.serviceType == 2) {
        return options.filter((item) => item.value == "1");
      }
      // 入院随访(serviceType=18):不可选择出院患者
      if (this.serviceType == 18) {
        return options.filter((item) => item.value != "4");
      }
      return options;
    },
  },
  methods: {
    // ---------- 工具方法 ----------
@@ -1859,6 +1915,23 @@
    },
    // ---------- 数据加载 ----------
    getPointOptions() {
      // 仅同德院区:点位下拉(deptType=3)
      if (!this.isTongdeCampus) return;
      deptTreeSelect(3).then((response) => {
        const flat = [];
        const walk = (nodes) => {
          (Array.isArray(nodes) ? nodes : []).forEach((n) => {
            if (n.label && n.deptCode) {
              flat.push({ label: n.label, value: String(n.deptCode) });
            }
            if (n.children && n.children.length) walk(n.children);
          });
        };
        walk(response && response.data);
        this.pointOptions = flat;
      });
    },
    Acquisitiontype() {
      let queryParams = {
        pageNum: this.topqueryParams.pageNum,
@@ -1961,6 +2034,7 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        pointLocation: "",
        kcb:
          "亲爱的患者/家属,您好!我们是" +
          localStorage.getItem("orgname") +
@@ -2280,6 +2354,7 @@
      this.deptcodesWards = [];
      this.medicalCodes = [];
      this.medicalOptions = [];
      this.queryParamsdept.taskid = this.form.taskid;
      this.queryParamsdept.taskId = this.form.taskid;
      if (this.form.appltype == 5) {
@@ -2938,6 +3013,12 @@
          this.leavehospitaldistrictcodes = [];
          this.illnesscodes = [];
          this.operationcodes = [];
        } else if (this.form.appltype == 7) {
          this.deptcodesWards = [];
          this.leavehospitaldistrictcodes = [];
          this.illnesscodes = [];
          this.operationcodes = [];
          this.medicalCodes = [];
        }
        // 服务形式校验
@@ -2957,6 +3038,7 @@
          this.diagglist[0] ||
          this.operationcodes[0] ||
          this.medicalCodes[0] ||
          this.form.pointLocation ||
          this.form.longTask == 2 ||
          this.serviceType == 3 ||
          this.form.appltype == 5; // 任务组跳过强制关联