WXL
2024-08-09 1b7eb0871a246af9c6dc64f2fa25348831fe0073
测试完成
已修改6个文件
166 ■■■■ 文件已修改
src/store/getters.js 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/permission.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/tasklist/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionbank/particulars/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/repositoryai/intention/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/getters.js
@@ -15,6 +15,7 @@
  topbarRouters: (state) => state.permission.topbarRouters,
  defaultRoutes: (state) => state.permission.defaultRoutes,
  sidebarRouters: (state) => state.permission.sidebarRouters,
  Serviceauthority: (state) => state.user.Serviceauthority,
  // 正则
  regular: (state) => state.regular.regular,
  noregular: (state) => state.regular.noregular,
@@ -106,7 +107,6 @@
        listClass: "",
      },
    },
  ],
  // 服务状态
  serviceState: (state) => [
@@ -166,7 +166,7 @@
   // 值类型(问卷)
   askvaluetype: (state) => [
    {
      value: '1',
      value: "1",
      label: "单选",
      raw: {
        cssClass: "",
@@ -174,7 +174,7 @@
      },
    },
    {
      value: '2',
      value: "2",
      label: "多选",
      raw: {
        cssClass: "",
@@ -182,7 +182,7 @@
      },
    },
    {
      value: '3',
      value: "3",
      label: "填空",
      raw: {
        cssClass: "",
@@ -190,7 +190,7 @@
      },
    },
    {
      value: '4',
      value: "4",
      label: "问答",
      raw: {
        cssClass: "",
@@ -201,7 +201,7 @@
    // 值类型(列表展示)
    valuetypelb: (state) => [
      {
        value: '1',
      value: "1",
        label: "选项",
        raw: {
          cssClass: "",
@@ -209,7 +209,7 @@
        },
      },
      {
        value: '2',
      value: "2",
        label: "文本",
        raw: {
          cssClass: "",
@@ -217,7 +217,7 @@
        },
      },
      {
        value: '3',
      value: "3",
        label: "数值",
        raw: {
          cssClass: "",
@@ -318,7 +318,8 @@
        cssClass: "",
        listClass: "",
      },
    },{
    },
    {
      value: 3,
      label: "患者拒绝服务",
      raw: {
@@ -333,7 +334,8 @@
        cssClass: "",
        listClass: "",
      },
    },{
    },
    {
      value: 5,
      label: "黑名单",
      raw: {
@@ -521,7 +523,6 @@
        listClass: "",
      },
    },
  ],
  // 题目类别(随访)
  xjxsoptions:(state) => [
@@ -541,8 +542,6 @@
        listClass: "",
      },
    },
  ],
   // 评价类型
   appraiselist:(state) => [
@@ -579,9 +578,9 @@
        listClass: "",
      },
    },
  ],
  // 正则
};
export default getters;
src/store/modules/permission.js
@@ -4,6 +4,8 @@
import Layout from '@/layout/index'
import ParentView from '@/components/ParentView'
import InnerLink from '@/layout/components/InnerLink'
import store from "@/store";
const permission = {
  state: {
@@ -47,12 +49,31 @@
          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);
}
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
src/store/modules/user.js
@@ -7,7 +7,73 @@
    name: '',
    avatar: '',
    roles: [],
    permissions: []
    permissions: [],
    // 服务类型
  Serviceauthority:  [
    {
      value: "1",
      label: "患者报告",
      route: "followvisit/QuestionnaireTask",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
    {
      value: "2",
      label: "监测评估",
      route: "followvisit/QuestionnaireTask",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
    {
      value: "3",
      label: "复诊管理",
      route: "followvisit/particty",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
    {
      value: "4",
      label: "宣教关怀",
      route: "followvisit/Missioncreation",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
    {
      value: "5",
      label: "出院随访",
      route: "followvisit/particty",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
    {
      value: "6",
      label: "门诊随访",
      route: "followvisit/particty",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
    {
      value: "7",
      label: "通知服务",
      route: "followvisit/Missioncreation",
      raw: {
        cssClass: "",
        listClass: "",
      },
    },
  ],
  },
  mutations: {
@@ -25,6 +91,9 @@
    },
    SET_PERMISSIONS: (state, permissions) => {
      state.permissions = permissions
    },
    SET_Serviceauthority: (state, Serviceauthority) => {
      state.Serviceauthority = Serviceauthority
    }
  },
src/views/followvisit/tasklist/index.vue
@@ -352,6 +352,7 @@
  Questionnairetasksponsor,
  TaskTemplateSendExecution,
} from "@/api/AiCentre/index";
import store from "@/store";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -615,6 +616,7 @@
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
    this.taskoptions = store.getters.Serviceauthority;
  },
  // 搜索
  mounted() {
src/views/knowledge/questionbank/particulars/index.vue
@@ -180,15 +180,16 @@
              v-if="topicobj.scriptType == 3"
            >
              <div style="display: flex; margin-bottom: 10px">
                <div class="tsgnames" @click="tsgnametos">插入填空</div>
                <div class="tsgnames" @click="tsgnametos">插入填空标记</div>
              </div>
            </el-form-item>
            <el-row>
              <el-col :span="20">
                <el-form-item label="收集信息" v-if="topicobj.scriptType == 3">
                  <el-card class="box-card" style="width: 200%">
                <el-form-item label="填空信息" v-if="topicobj.scriptType == 3">
                  <el-card class="box-card" style="width: 200%;">
                    <div
                      v-for="item in topicobj.svyLibScriptOptions"
                      v-if="item.isoperation != 3"
                      style="margin-bottom: 10px"
                    >
                      <el-input
@@ -886,6 +887,7 @@
          .confirm("更改类型后选项将清空是否继续?")
          .then(() => {
            this.scriptTypels = this.topicobj.scriptType;
            this.topicobj.svyLibScriptOptions = [];
          })
          .catch(() => {
            this.topicobj.scriptType = this.scriptTypels;
@@ -899,7 +901,11 @@
        this.topicobj.svyLibScriptOptions,
        row
      );
      console.log(this.topicobj.svyLibScriptOptions);
      if (this.topicobj.svyLibScriptOptions[index].id) {
        console.log(2);
        this.topicobj.svyLibScriptOptions[index].isoperation = 3;
      } else {
        this.topicobj.svyLibScriptOptions.splice(index, 1);
@@ -1070,12 +1076,14 @@
    // 便捷标签插入填空
    tsgnametos(row) {
      let inputValueArr = "";
      let value = this.testuserList.length + 1;
      let value = this.topicobj.svyLibScriptOptions.length + 1;
      let el = document.querySelector("#" + this.currentInputId);
      //el.selectionStart; 这就是当前光标所在的位置(字符串中字符的index)
      if (this.currentInputId == "targetdesc") {
        inputValueArr = this.indexform.targetdesc.split("");
      if (this.currentInputId == "scriptContent") {
        console.log(1);
        inputValueArr = this.topicobj.scriptContent.split("");
        console.log(2);
      } else {
        return;
      }
@@ -1089,7 +1097,7 @@
        selectLength,
        "__" + value + "__"
      );
      this.testuserList.push({
      this.topicobj.svyLibScriptOptions.push({
        orderno: value,
        optiondesc: "",
        isoperation: 1,
@@ -1098,8 +1106,8 @@
      inputValueArr = inputValueArr.join("");
      console.log(inputValueArr);
      if (this.currentInputId == "targetdesc") {
        this.indexform.targetdesc = inputValueArr;
      if (this.currentInputId == "scriptContent") {
        this.topicobj.scriptContent = inputValueArr;
      } else {
        return;
      }
src/views/repositoryai/intention/index.vue
@@ -104,7 +104,7 @@
                  placeholder="请选择"
                >
                  <el-option
                    v-for="(item, index) in qyoptions"
                    v-for="(item, index) in askvaluetype"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
@@ -190,14 +190,14 @@
                label="指标类型"
                fixed
                align="center"
                key="scriptType"
                prop="scriptType"
                key="valueType"
                prop="valueType"
                :show-overflow-tooltip="true"
              >
                <template slot-scope="scope">
                  <dict-tag
                    :options="valuetypelb"
                    :value="scope.row.scriptType"
                    :value="scope.row.valueType"
                  />
                </template>
              </el-table-column>
@@ -406,7 +406,7 @@
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="index in qyoptions"
                      v-for="index in usable"
                      :key="index.value"
                      :label="index.label"
                      :value="index.value"
@@ -768,7 +768,6 @@
      illnesslist: [],
      illnesslistapi: [],
      optionsillness: [],
      qyoptions: [],
      mode: [],
      optionstag: [],
      targetoptionList: [],
@@ -779,7 +778,7 @@
        pageNum: 1,
        pageSize: 10,
      },
      valuetypelb: [],
      askvaluetype: [],
      // 表单校验
      rules: {
@@ -811,9 +810,9 @@
    this.gettabList();
    this.getDeptTree();
    this.mode = store.getters.mode;
    this.valuetypelb = store.getters.askvaluetype;
    this.askvaluetype = store.getters.askvaluetype;
    this.valuetypelb = store.getters.valuetypelb;
    this.languagelist = store.getters.languagelist;
    this.qyoptions = store.getters.askvaluetype;
    this.usable = store.getters.usable;
  },
  methods: {