WXL
3 天以前 37d2ba3d2c1902202c8c7ee9485267b5a1945742
src/views/patient/propaganda/index.vue
@@ -51,6 +51,15 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="患者范围" prop="status">
          <el-cascader
            v-model="topqueryParams.scopetype"
            placeholder="默认全部"
            :options="sourcetype"
            :props="{ expandTrigger: 'hover' }"
            @change="handleChange"
          ></el-cascader>
        </el-form-item>
        <el-form-item label="宣教状态" prop="status">
          <el-select v-model="topqueryParams.sendstate" placeholder="请选择">
@@ -266,9 +275,7 @@
          prop="endDay"
        >
          <template slot-scope="scope">
            <span>{{
              scope.row.endDay ? scope.row.endDay + "天" : ""
            }}</span>
            <span>{{ scope.row.endDay ? scope.row.endDay + "天" : "" }}</span>
          </template>
        </el-table-column>
        <el-table-column
@@ -292,7 +299,6 @@
          key="drname"
          prop="drname"
        />
        <!-- <el-table-column
          label="病历号"
@@ -366,20 +372,28 @@
          </template>
        </el-table-column> -->
        <el-table-column
        fixed="right"
          fixed="right"
          label="任务结果记录"
          width="120"
          align="center"
          key="remark"
          prop="remark"
        >
        <template slot-scope="scope" v-if="scope.row.remark">
          <el-tag type="success" v-if="scope.row.sendstate!=5&&scope.row.sendstate!=4&&scope.row.remark">{{ scope.row.remark }}</el-tag>
          <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
        </template>
      </el-table-column>
          <template slot-scope="scope" v-if="scope.row.remark">
            <el-tag
              type="success"
              v-if="
                scope.row.sendstate != 5 &&
                scope.row.sendstate != 4 &&
                scope.row.remark
              "
              >{{ scope.row.remark }}</el-tag
            >
            <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column
        fixed="right"
          fixed="right"
          label="宣教时间"
          sortable
          align="center"
@@ -597,6 +611,22 @@
      ruleForm: {
        type: [],
      },
      sourcetype: [
        {
          value: 1,
          label: "科室",
          children: [],
        },
        {
          value: 2,
          label: "病区",
          children: [],
        },
        {
          value: 3,
          label: "全部",
        },
      ],
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      inputValue: "",
@@ -723,7 +753,7 @@
        pageSize: 10,
        serviceType: 4,
        searchscope: 2,
        sendstate:2,
        sendstate: 2,
      },
      propss: { multiple: true },
      options: [],
@@ -772,7 +802,18 @@
  watch: {},
  created() {
    this.serviceState = store.getters.serviceState;
    console.log(this.serviceState,'this.serviceState');
    this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
      return {
        label: dept.deptName,
        value: dept.deptCode,
      };
    });
    this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
      return {
        label: dept.districtName,
        value: dept.districtCode,
      };
    });
    this.getList();
    this.getConfigKey("sys.user.initPassword").then((response) => {
@@ -791,16 +832,7 @@
  methods: {
    /** 查询门诊宣教服务列表 */
    getList() {
      if (this.topqueryParams.searchscope == 1) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes = [];
      } else if (this.topqueryParams.searchscope == 2) {
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.topqueryParams.leaveldeptcodes = [];
      } else {
       if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
@@ -809,10 +841,13 @@
      }
      this.loading = true;
      if (this.topqueryParams.leavehospitaldistrictcodes[0]&&this.topqueryParams.leaveldeptcodes[0]) {
        this.topqueryParams.deptOrDistrict=2;
      }else{
        this.topqueryParams.deptOrDistrict=1;
      if (
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.leaveldeptcodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 2;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
@@ -841,6 +876,24 @@
        }, 200);
      } else {
        this.options = [];
      }
    },
    // 患者范围处理
    handleChange(value) {
      let type = value[0];
      let code = value.slice(-1)[0];
      this.topqueryParams.leavehospitaldistrictcodes = [];
      this.topqueryParams.leaveldeptcodes = [];
      if (type == 1) {
        this.topqueryParams.leaveldeptcodes.push(code);
        this.topqueryParams.leavehospitaldistrictcodes = [];
        this.topqueryParams.searchscope = 1;
      } else if (type == 2) {
        this.topqueryParams.leavehospitaldistrictcodes.push(code);
        this.topqueryParams.leaveldeptcodes = [];
        this.topqueryParams.searchscope = 2;
      } else {
        this.topqueryParams.searchscope = 3;
      }
    },
    // 门诊宣教状态修改
@@ -912,7 +965,7 @@
        pageNum: 1,
        pageSize: 10,
        serviceType: 4,
        sendstate:2,
        sendstate: 2,
      };
      this.handleQuery();
    },