WXL (wul)
2 天以前 3573a134c7c7d4d99f605420f9afb2f80e9b8967
宣教更新
已修改3个文件
已添加1个文件
754 ■■■■■ 文件已修改
dist (3).zip 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/permission.js 191 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/Missioncreation.vue 538 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/QuestionnaireTask.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dist (3).zip
Binary files differ
src/store/modules/permission.js
@@ -1,11 +1,10 @@
import auth from '@/plugins/auth'
import router, { constantRoutes, dynamicRoutes } from '@/router'
import { getRouters } from '@/api/menu'
import Layout from '@/layout/index'
import ParentView from '@/components/ParentView'
import InnerLink from '@/layout/components/InnerLink'
import auth from "@/plugins/auth";
import router, { constantRoutes, dynamicRoutes } from "@/router";
import { getRouters } from "@/api/menu";
import Layout from "@/layout/index";
import ParentView from "@/components/ParentView";
import InnerLink from "@/layout/components/InnerLink";
import store from "@/store";
const permission = {
  state: {
@@ -13,144 +12,162 @@
    addRoutes: [],
    defaultRoutes: [],
    topbarRouters: [],
    sidebarRouters: []
    sidebarRouters: [],
  },
  mutations: {
    SET_ROUTES: (state, routes) => {
      state.addRoutes = routes
      state.routes = constantRoutes.concat(routes)
      state.addRoutes = routes;
      state.routes = constantRoutes.concat(routes);
    },
    SET_DEFAULT_ROUTES: (state, routes) => {
      state.defaultRoutes = constantRoutes.concat(routes)
      state.defaultRoutes = constantRoutes.concat(routes);
    },
    SET_TOPBAR_ROUTES: (state, routes) => {
      state.topbarRouters = routes
      state.topbarRouters = routes;
    },
    SET_SIDEBAR_ROUTERS: (state, routes) => {
      state.sidebarRouters = routes
      state.sidebarRouters = routes;
    },
  },
  actions: {
    // 生成路由
    GenerateRoutes({ commit }) {
      return new Promise(resolve => {
      return new Promise((resolve) => {
        // 向后端请求路由数据
        getRouters().then(res => {
          const sdata = JSON.parse(JSON.stringify(res.data))
          const rdata = JSON.parse(JSON.stringify(res.data))
          const sidebarRoutes = filterAsyncRouter(sdata)
          const rewriteRoutes = filterAsyncRouter(rdata, false, true)
          const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
          rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
          router.addRoutes(asyncRoutes);
          commit('SET_ROUTES', rewriteRoutes)
          commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
          commit('SET_DEFAULT_ROUTES', sidebarRoutes)
          commit('SET_TOPBAR_ROUTES', sidebarRoutes)
          resolve(rewriteRoutes)
          console.log(res.data,'路由数据');
          const result = res.data.find(item => item.name == "Followvisit");
          Processrouting(result)
        getRouters().then((res) => {
          const sdata = JSON.parse(JSON.stringify(res.data));
          const rdata = JSON.parse(JSON.stringify(res.data));
          const sidebarRoutes = filterAsyncRouter(sdata);
          const rewriteRoutes = filterAsyncRouter(rdata, false, true);
          // 关键修改:对静态路由也进行权限过滤
          console.log(constantRoutes,'静');
          console.log(dynamicRoutes,'动');
        })
      })
    }
  }
}
function Processrouting(result){
  const arrf=[];
  const arr=store.getters.Serviceauthority;
  console.log(result,'result');
  console.log(arr,'arr');
  result.children.forEach(objA => {
    arr.forEach(objB => {
          const filteredConstantRoutes = filterDynamicRoutes(constantRoutes);
          const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
          rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
          // 添加过滤后的路由
          router.addRoutes(filteredConstantRoutes);
          router.addRoutes(asyncRoutes);
          // 提交到store时也使用过滤后的路由
          commit("SET_ROUTES", rewriteRoutes);
          commit(
            "SET_SIDEBAR_ROUTERS",
            filteredConstantRoutes.concat(sidebarRoutes)
          );
          commit("SET_DEFAULT_ROUTES", sidebarRoutes);
          commit("SET_TOPBAR_ROUTES", sidebarRoutes);
          resolve(rewriteRoutes);
          console.log(res.data, "路由数据");
          const result = res.data.find((item) => item.name == "Followvisit");
          Processrouting(result);
        });
      });
    },
  },
};
function Processrouting(result) {
  const arrf = [];
  const arr = store.getters.Serviceauthority;
  console.log(result, "result");
  console.log(arr, "arr");
  result.children.forEach((objA) => {
    arr.forEach((objB) => {
      if (objA.meta.title === objB.label) {
        arrf.push(objB);
      }
    });
  });
  console.log(arrf,'arrf');
  store.commit('SET_Serviceauthority', arrf);
  console.log(arrf, "arrf");
  store.commit("SET_Serviceauthority", arrf);
}
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
  return asyncRouterMap.filter(route => {
  return asyncRouterMap.filter((route) => {
    if (type && route.children) {
      route.children = filterChildren(route.children)
      route.children = filterChildren(route.children);
    }
    if (route.component) {
      // Layout ParentView 组件特殊处理
      if (route.component === 'Layout') {
        route.component = Layout
      } else if (route.component === 'ParentView') {
        route.component = ParentView
      } else if (route.component === 'InnerLink') {
        route.component = InnerLink
      if (route.component === "Layout") {
        route.component = Layout;
      } else if (route.component === "ParentView") {
        route.component = ParentView;
      } else if (route.component === "InnerLink") {
        route.component = InnerLink;
      } else {
        route.component = loadView(route.component)
        route.component = loadView(route.component);
      }
    }
    if (route.children != null && route.children && route.children.length) {
      route.children = filterAsyncRouter(route.children, route, type)
      route.children = filterAsyncRouter(route.children, route, type);
    } else {
      delete route['children']
      delete route['redirect']
      delete route["children"];
      delete route["redirect"];
    }
    return true
  })
    return true;
  });
}
function filterChildren(childrenMap, lastRouter = false) {
  var children = []
  var children = [];
  childrenMap.forEach((el, index) => {
    if (el.children && el.children.length) {
      if (el.component === 'ParentView' && !lastRouter) {
        el.children.forEach(c => {
          c.path = el.path + '/' + c.path
      if (el.component === "ParentView" && !lastRouter) {
        el.children.forEach((c) => {
          c.path = el.path + "/" + c.path;
          if (c.children && c.children.length) {
            children = children.concat(filterChildren(c.children, c))
            return
            children = children.concat(filterChildren(c.children, c));
            return;
          }
          children.push(c)
        })
        return
          children.push(c);
        });
        return;
      }
    }
    if (lastRouter) {
      el.path = lastRouter.path + '/' + el.path
      el.path = lastRouter.path + "/" + el.path;
    }
    children = children.concat(el)
  })
  return children
    children = children.concat(el);
  });
  return children;
}
// 动态路由遍历,验证是否具备权限
export function filterDynamicRoutes(routes) {
  const res = []
  routes.forEach(route => {
  const res = [];
  routes.forEach((route) => {
    // 首先检查权限字符串 (permissions)
    if (route.permissions) {
      if (auth.hasPermiOr(route.permissions)) {
        res.push(route)
      }
    } else if (route.roles) {
      if (auth.hasRoleOr(route.roles)) {
        res.push(route)
        res.push(route);
      }
    }
  })
  return res
    // 然后检查角色权限 (roles) - 这是您需要重点关注的部分
    else if (route.roles) {
      if (auth.hasRoleOr(route.roles)) {
        res.push(route);
      }
    }
    // 对于没有设置权限的路由,默认允许访问
    else {
      res.push(route);
    }
  });
  return res;
}
export const loadView = (view) => {
  if (process.env.NODE_ENV === 'development') {
    return (resolve) => require([`@/views/${view}`], resolve)
  if (process.env.NODE_ENV === "development") {
    return (resolve) => require([`@/views/${view}`], resolve);
  } else {
    // 使用 import 实现生产环境的路由懒加载
    return () => import(`@/views/${view}`)
    return () => import(`@/views/${view}`);
  }
}
};
export default permission
export default permission;
src/views/patient/propaganda/Missioncreation.vue
@@ -82,48 +82,17 @@
                    placeholder="请输入任务描述"
                  />
                </el-form-item>
                <el-row>
                  <el-col :span="20"
                    ><el-form-item label="适用科室" prop="region">
                      <el-select
                        v-model="form.deptcode"
                        style="width: 400px"
                        size="medium"
                        filterable
                        placeholder="请选择科室"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in belongDepts"
                          :key="item.deptCode"
                          :label="item.deptName"
                          :value="item.deptCode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
                <el-row>
                  <el-col :span="20"
                    ><el-form-item label="适用病区" prop="region">
                      <el-select
                        v-model="form.leavehospitaldistrictcode"
                        style="width: 400px"
                        size="medium"
                        filterable
                        placeholder="请选择病区"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in belongWards"
                          :key="item.districtCode"
                          :label="item.districtName"
                          :value="item.districtCode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
                <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-item label="执行周期" prop="longTask">
                  <el-radio-group v-model="form.longTask">
                    <el-radio :label="0">自定义周期</el-radio>
@@ -253,27 +222,116 @@
                      /> </el-form-item
                  ></el-col>
                </el-row>
                <!-- <el-form-item label="服务形式">
                  <el-checkbox-group v-model="checkList">
                    <el-checkbox
                      v-for="(item, index) in checkboxlist"
                      :key="index"
                      :label="item.value"
                    >
                      {{ 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 label="任务关联" prop="longTask">
                  <el-radio-group v-model="form.appltype">
                    <el-radio label="1">科室关联</el-radio>
                    <el-radio label="2">病区关联</el-radio>
                    <el-radio label="3">疾病关联</el-radio>
                    <el-radio label="4">手术关联</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-row v-if="form.appltype == 1">
                  <el-col :span="20"
                    ><el-form-item label="适用科室" prop="region">
                      <el-select
                        v-model="deptcodesWards"
                        @remove-tag="removetag"
                        style="width: 400px"
                        size="medium"
                        multiple
                        filterable
                        placeholder="请选择科室"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in belongDepts"
                          :label="item.deptName"
                          :value="item.deptCode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
                <el-row v-if="form.appltype == 2">
                  <el-col :span="20"
                    ><el-form-item label="适用病区" prop="region">
                      <el-select
                        v-model="leavehospitaldistrictcodes"
                        style="width: 400px"
                        @remove-tag="removehpsp"
                        size="medium"
                        multiple
                        filterable
                        placeholder="请选择病区"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in belongWards"
                          :label="item.districtName"
                          :value="item.districtCode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
                <el-row v-if="form.appltype == 3">
                  <div class="xinz-infs">
                    <el-form-item>
                      <template #label>
                        <el-tooltip
                          class="item"
                          effect="light"
                          content="选择好适用疾病后,可以方便您通过疾病诊断查找到对应的病人!"
                          placement="top-start"
                        >
                          <i class="el-icon-warning-outline"></i>
                        </el-tooltip>
                      </template>
                      <div style="margin-bottom: 10px">
                        <el-button
                          type="warning"
                          @click="$refs.child.handleAddpatient()"
                          >添加疾病诊断</el-button
                        >
                      </div>
                      <el-tag
                        v-for="tag in diagglist"
                        @close="removediagg(tag.icd10code)"
                        type="warning"
                        closable
                        :disable-transitions="false"
                      >
                        {{ tag.icdname }}
                      </el-tag>
                      <!-- <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag> -->
                    </el-form-item>
                  </div>
                </el-row>
                <el-row v-if="form.appltype == 4">
                  <el-col :span="20"
                    ><el-form-item label="适用手术" prop="region">
                      <el-select
                        v-model="operationcodes"
                        style="width: 400px"
                        @remove-tag="removeopera"
                        size="medium"
                        :remote-method="remoteopcode"
                        multiple
                        filterable
                        remote
                        placeholder="请选择手术"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in baseoperaList"
                          :label="item.opdesc"
                          :value="item.opcode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
              </el-form>
            </div>
          </div>
@@ -341,45 +399,6 @@
            <div class="examine-jic">
              <div class="jic-value">
                <el-row :gutter="20">
                  <!--用户数据-->
                  <!-- <el-form
                    :model="topqueryParams"
                    ref="queryForm"
                    size="small"
                    :inline="true"
                    v-show="showSearch"
                    label-width="98px"
                  >
                    <el-form-item label="患者名称">
                      <el-input v-model="topqueryParams.name"></el-input>
                    </el-form-item>
                    <el-form-item label="就诊科室">
                      <el-input v-model="topqueryParams.deptName"></el-input>
                    </el-form-item>
                    <el-form-item>
                      <el-button
                        type="primary"
                        icon="el-icon-search"
                        size="medium"
                        @click="handleQuery"
                        >搜索</el-button
                      >
                      <el-button
                        icon="el-icon-refresh"
                        size="medium"
                        @click="resetQuery"
                        >重置</el-button
                      >
                      <el-button
                        icon="el-icon-upload2"
                        size="medium"
                        type="warning"
                        >当前患者一键发送</el-button
                      >
                    </el-form-item>
                  </el-form> -->
                  <!-- <el-divider></el-divider> -->
                  <el-row :gutter="10" class="mb8">
                    <el-col :span="1.5">
                      <el-select
@@ -402,7 +421,7 @@
                        icon="el-icon-plus"
                        size="medium"
                        :disabled="!patientqueryParams.allhosp"
                        @click="handleAddpatient"
                        @click="handleQuery"
                        >新增</el-button
                      >
                    </el-col>
@@ -485,6 +504,18 @@
              <el-form-item label="患者:">
                <el-input
                  v-model="patientqueryParams.name"
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
              <el-form-item label="患者诊断:">
                <el-input
                  v-model="patientqueryParams.leavediagname"
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
              <el-form-item label="主治医生:">
                <el-input
                  v-model="patientqueryParams.drname"
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
@@ -733,7 +764,7 @@
                <el-button
                  icon="el-icon-refresh"
                  size="medium"
                  @click="resetQuery"
                  @click="resetQuerymb"
                  >重置</el-button
                >
              </el-form-item>
@@ -760,6 +791,13 @@
        </div>
      </div>
    </el-drawer>
    <Optional-Form
      ref="child"
      :dialogVisiblepatient="dialogVisiblepatientjb"
      :overallCase="diagglist"
      @addoption="dialogVisiblepatientjb = false"
      @kkoption="dialogVisiblepatientjb = true"
    />
  </div>
</template>
@@ -770,19 +808,34 @@
import store from "@/store";
import {
  getTaskpatientQC,
  getlibrarylist,
  getFollowuplist,
  taskoperhospgetsondel,
  taskdiaghospgetsondel,
  getillnesslist,
  getbaseopera,
  Externallist,
  getQtemplatelist,
  getQtemplateobj,
  taskgetQtemplateobj,
  TaskQuestioncomit,
  getTaskInfo,
  gethetaskinfo,
  delhetaskinfo,
  deleteTaskQuestioncomit,
  Questionnairetaskgetson,
  getTaskQuestioncomit,
  depthospgetson,
  getillness,
  Editsingletask,
  getQtemplateclassify,
  taskdepthospgetsondel,
  taskdepthospgetsonlist,
  taskdiaggetlist,
  taskopergetlist,
  getTaskInfo,
  getheLibraryAssort,
  getlibrarylist,
} from "@/api/AiCentre/index";
import { listDept } from "@/api/system/dept";
import { getToken } from "@/utils/auth";
import SFtable from "@/components/SFtable"; //表格组件
import OptionalForm from "@/components/OptionalForm";
import SortCheckbox from "@/components/SortCheckbox"; //表格组件
export default {
@@ -798,6 +851,7 @@
      libName: "",
      overallCase: [], //选择患者总
      allpids: [],
      diagglist: [],
      libId: null, //模板库模板id
      Editprogress: 1, //编辑进度
      drawermb: false, //选择模板弹窗
@@ -805,15 +859,20 @@
      loading: false, // 遮罩层
      patientloading: false, // 遮罩层
      dialogVisiblepatient: false, //添加患者弹框
      dialogVisiblepatientjb: false, //添加疾病弹框
      radio: 1,
      checkboxlist: [],
      selectedOrder: [],
      baseoperaList: [],
      // 科室/病区
      belongWards: [],
      belongWards: [],
      tableLabel: [],
      questionList: [],
      uploadingData: [],
      deptcodesWards: [], //科室数据
      leavehospitaldistrictcodes: [], //病区数据
      operationcodes: [], //手术数据
      illnesscodes: [], //疾病数据
      htmlRichText: "<p>Hello, <strong>world</strong>!</p>",
      // 患者表单
      tableLabelhz: [
@@ -900,6 +959,8 @@
      patientqueryParams: {
        pageNum: 1, //
        pageSize: 10,
        leavehospitaldistrictcodes: [],
        leaveldeptcodes: [],
      },
      topicoptions: [{ children: [{ children: [] }] }],
      showSearch: true, //
@@ -965,6 +1026,8 @@
      ],
      tasktopic: null, //新增类型
      SelectPatientslist: [],
      belongDepts: [],
      form: {
        patTaskRelevances: [],
        sendType: 1,
@@ -1021,7 +1084,7 @@
      quote: false,
    };
  },
  components: { SFtable, SortCheckbox },
  components: { SFtable, OptionalForm, SortCheckbox },
  created() {
    this.id = this.$route.query.id;
@@ -1145,20 +1208,20 @@
      }
    },
    // 保存
   async submitForm(formName) {
    async submitForm(formName) {
      this.form.preachform = this.checkList.join(",");
      // this.formatFn(1);
  if (!this.form.patTaskRelevances[0] && this.form.longTask == 0) {
    try {
      // 等待用户确认
      await this.$modal.confirm("当前任务未选择患者是否保存?");
      // 只有用户点击“确认”后,代码才会执行到这里
    } catch (error) {
      // 用户点击了“取消”,直接中断函数执行
      this.$modal.msgWarning("操作已取消");
      return; // 关键:这里return直接退出函数
    }
  }
      if (!this.form.patTaskRelevances[0] && this.form.longTask == 0) {
        try {
          // 等待用户确认
          await this.$modal.confirm("当前任务未选择患者是否保存?");
          // 只有用户点击“确认”后,代码才会执行到这里
        } catch (error) {
          // 用户点击了“取消”,直接中断函数执行
          this.$modal.msgWarning("操作已取消");
          return; // 关键:这里return直接退出函数
        }
      }
      if (!this.form.templatename) {
        this.$modal.msgError("未选择模板");
        return;
@@ -1170,6 +1233,36 @@
        this.$modal.msgError("请选择服务类型");
        this.submitLoading = false;
        return;
      }
      if (this.form.appltype == 1) {
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 2) {
        this.deptcodesWards = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 3) {
        this.deptcodesWards = [];
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
      } else if (this.form.appltype == 4) {
        this.deptcodesWards = [];
        this.illnesscodes = [];
        this.leavehospitaldistrictcodes = [];
      }
      if (
        this.deptcodesWards[0] ||
        this.leavehospitaldistrictcodes[0] ||
        this.diagglist[0] ||
        this.operationcodes[0] ||
        this.form.longTask == 2 ||
        this.serviceType == 3
      ) {
      } else {
        this.$modal.msgError("请选择任务关联条件");
        this.submitLoading = false;
        return;
      }
      const filteredArray = this.variableList.filter(
@@ -1187,12 +1280,13 @@
      if (!this.form.type) {
        this.form.type = this.$route.query.type;
      }
      this.form.leaveldeptcodes = store.getters.belongDepts.map(
        (obj) => obj.deptCode
      );
      this.form.leavehospitaldistrictcodes = store.getters.belongWards.map(
        (obj) => obj.districtCode
      );
      this.form.deptcode = this.deptcodesWards.join(",");
      this.form.leavehospitaldistrictcode =
        this.leavehospitaldistrictcodes.join(",");
      this.form.opcode = this.operationcodes.join(",");
      this.form.icd10code = this.diagglist
        .map((item) => item.icdcode)
        .join(",");
      Editsingletask(this.form).then((res) => {
        if (res.code == 200) {
          if (this.form.taskid) {
@@ -1437,9 +1531,54 @@
    },
    getList() {},
    handleQuery() {
      if (this.patientqueryParams.allhosp == 6) {
        this.Externallist();
        console.log();
        return;
      }
      if (this.patientqueryParams.searchscope == 1) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        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);
      }
      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() {},
    resetQuery() {
      this.patientqueryParams = {
        pageNum: 1, //
        pageSize: 10,
        topica: 1, //0全部1科室2病区
        leavehospitaldistrictcodes: [],
        leaveldeptcodes: [],
      };
      this.handleQuery();
    },
    resetQuerymb() {
      this.topqueryParams = { svyname: "" };
      this.handleQuerymb();
    },
    handleClosehz() {
      this.dialogVisiblepatient = false;
    },
@@ -1517,6 +1656,44 @@
      console.log("当前选中:", selectedValues);
      console.log("选中顺序:", selectedOrder);
    },
    getillnesslist() {
      getillnesslist({
        pageNum: 1,
        pageSize: 1000,
      }).then((res) => {
        this.donorchargeList = res.rows;
      });
      getbaseopera({
        pageNum: 1,
        pageSize: 1000,
      }).then((res) => {
        this.baseoperaList = res.rows;
      });
    },
    // 手术查询
    remoteopcode(name) {
      if (name) {
        getbaseopera({
          pageNum: 1,
          pageSize: 1000,
          opdesc: name,
        }).then((res) => {
          this.baseoperaList = res.rows;
        });
      }
    },
    // 疾病查询
    remotedonor(name) {
      if (name) {
        getbaseopera({
          pageNum: 1,
          pageSize: 1000,
          opdesc: name,
        }).then((res) => {
          this.baseoperaList = res.rows;
        });
      }
    },
    // 依照新增时处理
    neWaddfn() {
      this.id = null;
@@ -1541,9 +1718,45 @@
    },
    // 获取科室列表
    listDept() {
      listDept().then((res) => {
        this.topicoptions = this.handleTree(res.data, "deptId");
        console.log(this.topicoptions, "topicoptions");
      this.leavehospitaldistrictcodes = [];
      this.deptcodesWards = [];
      this.queryParamsdept.taskId = this.form.taskid;
      taskdepthospgetsonlist(this.queryParamsdept).then((res) => {
        if (res.code == 200) {
          let arr = res.rows;
          arr.forEach((item) => {
            if (item.deptType == 1) {
              this.deptlist.push(item);
              this.deptcodesWards.push(item.deptCode);
            } else if (item.deptType == 2) {
              this.hosplist.push(item);
              this.leavehospitaldistrictcodes.push(item.deptCode);
            }
          });
        }
      });
      taskdiaggetlist(this.queryParamsdept).then((res) => {
        if (res.code == 200) {
          let arr = res.rows;
          arr.forEach((item) => {
            getillnesslist({
              icdcode: item.icd10code,
            }).then((res) => {
              item.icdname = res.rows[0].icdname;
              this.diagglist.push(item);
            });
            this.illnesscodes.push(item.icd10code);
          });
        }
      });
      taskopergetlist(this.queryParamsdept).then((res) => {
        if (res.code == 200) {
          let arr = res.rows;
          arr.forEach((item) => {
            this.operlist.push(item);
            this.operationcodes.push(item.opcode);
          });
        }
      });
    },
    // 新增派送患者
@@ -1649,7 +1862,7 @@
      TaskQuestioncomit(this.Tasktemplate).then((response) => {
        console.log(response);
        this.previewtf = false;
        this.drawermb =false;
        this.drawermb = false;
        this.form.templateid = response.data;
        this.form.libtemplateid = this.libId;
        this.form.templatename = this.libName;
@@ -1686,6 +1899,65 @@
        this.checkList = list;
      }
    },
    // 任务科室删除触发
    removetag(row) {
      let result = this.deptlist
        .filter((item) => item.deptCode == row)
        .map((item) => item.id);
      if (result.length) {
        taskdepthospgetsondel(result).then((res) => {
          if (res.code) {
            this.$modal.msgSuccess("删除成功");
          }
        });
      }
    },
    // 院区删除删除触发
    removehpsp(row) {
      let result = this.hosplist
        .filter((item) => item.deptCode == row)
        .map((item) => item.id);
      if (result.length) {
        taskdepthospgetsondel(result).then((res) => {
          if (res.code) {
            this.$modal.msgSuccess("删除成功");
          }
        });
      }
    },
    // 手术删除触发
    removeopera(row) {
      let result = this.operlist
        .filter((item) => item.opcode == row)
        .map((item) => item.id);
      if (result.length) {
        taskoperhospgetsondel(result).then((res) => {
          if (res.code) {
            this.$modal.msgSuccess("删除成功");
          }
        });
      }
    },
    // 疾病删除触发
    removediagg(row) {
      console.log(row, "row");
      console.log(this.diagglist, "this.diagglist");
      let result = this.diagglist
        .filter((item) => item.icd10code == row)
        .map((item) => item.id);
      if (result.length) {
        taskdiaghospgetsondel(result).then((res) => {
          if (res.code) {
            this.diagglist = this.diagglist.filter(
              (item) => item.icd10code != row
            );
            this.$modal.msgSuccess("删除成功");
          }
        });
      }
    },
    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = "用户导入";
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -260,29 +260,6 @@
                  ></el-col>
                </el-row>
                <el-row v-if="form.appltype == 3">
                  <!-- <el-col :span="20"
                    ><el-form-item label="适用疾病" prop="region">
                      <el-select
                        v-model="illnesscodes"
                        style="width: 400px"
                        @remove-tag="removediagg"
                        size="medium"
                        :remote-method="remotedonor"
                        multiple
                        filterable
                        remote
                        placeholder="请选择病区"
                      >
                        <el-option
                          class="ruleFormaa"
                          v-for="item in donorchargeList"
                          :key="item.icdcode"
                          :label="item.icdname"
                          :value="item.icdcode"
                        >
                        </el-option>
                      </el-select> </el-form-item
                  ></el-col> -->
                  <div class="xinz-infs">
                    <el-form-item>
                      <template #label>
@@ -1478,8 +1455,6 @@
          return;
        }
        console.log(this.operationcodes[0]);
        console.log(this.operationcodes);
        if (
          this.deptcodesWards[0] ||