From 1b7eb0871a246af9c6dc64f2fa25348831fe0073 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 09 八月 2024 18:35:25 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/tasklist/index.vue               |    2 
 src/store/modules/user.js                              |   71 +++++++++++++++++
 src/views/knowledge/questionbank/particulars/index.vue |   26 ++++--
 src/store/modules/permission.js                        |   21 +++++
 src/store/getters.js                                   |   91 +++++++++++-----------
 src/views/repositoryai/intention/index.vue             |   17 ++--
 6 files changed, 163 insertions(+), 65 deletions(-)

diff --git a/src/store/getters.js b/src/store/getters.js
index b25f633..ec37e40 100644
--- a/src/store/getters.js
+++ b/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,
   // 姝e垯
   regular: (state) => state.regular.regular,
   noregular: (state) => state.regular.noregular,
@@ -106,7 +107,6 @@
         listClass: "",
       },
     },
-
   ],
   // 鏈嶅姟鐘舵��
   serviceState: (state) => [
@@ -163,10 +163,10 @@
       },
     },
   ],
-   // 鍊肩被鍨嬶紙闂嵎锛�
-   askvaluetype: (state) => [
+  // 鍊肩被鍨嬶紙闂嵎锛�
+  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: "",
@@ -198,33 +198,33 @@
       },
     },
   ],
-    // 鍊肩被鍨�(鍒楄〃灞曠ず)
-    valuetypelb: (state) => [
-      {
-        value: '1',
-        label: "閫夐」",
-        raw: {
-          cssClass: "",
-          listClass: "",
-        },
+  // 鍊肩被鍨�(鍒楄〃灞曠ず)
+  valuetypelb: (state) => [
+    {
+      value: "1",
+      label: "閫夐」",
+      raw: {
+        cssClass: "",
+        listClass: "",
       },
-      {
-        value: '2',
-        label: "鏂囨湰",
-        raw: {
-          cssClass: "",
-          listClass: "",
-        },
+    },
+    {
+      value: "2",
+      label: "鏂囨湰",
+      raw: {
+        cssClass: "",
+        listClass: "",
       },
-      {
-        value: '3',
-        label: "鏁板��",
-        raw: {
-          cssClass: "",
-          listClass: "",
-        },
+    },
+    {
+      value: "3",
+      label: "鏁板��",
+      raw: {
+        cssClass: "",
+        listClass: "",
       },
-    ],
+    },
+  ],
   // 鏄惁鍙敤
   usable: (state) => [
     {
@@ -244,8 +244,8 @@
       },
     },
   ],
-   // 鏄惁鍙敤锛堟暟锛�
-   usablesz: (state) => [
+  // 鏄惁鍙敤锛堟暟锛�
+  usablesz: (state) => [
     {
       value: 0,
       label: "鍚敤",
@@ -263,8 +263,8 @@
       },
     },
   ],
-   // 鏄惁蹇呭~
-   required: (state) => [
+  // 鏄惁蹇呭~
+  required: (state) => [
     {
       value: "1",
       label: "蹇呭~",
@@ -318,7 +318,8 @@
         cssClass: "",
         listClass: "",
       },
-    },{
+    },
+    {
       value: 3,
       label: "鎮h�呮嫆缁濇湇鍔�",
       raw: {
@@ -333,7 +334,8 @@
         cssClass: "",
         listClass: "",
       },
-    },{
+    },
+    {
       value: 5,
       label: "榛戝悕鍗�",
       raw: {
@@ -480,7 +482,7 @@
     },
   ],
   // 瀹f暀褰㈠紡
-  editabshape  : (state) => [
+  editabshape: (state) => [
     {
       label: "鏂囨湰",
       value: "1",
@@ -521,10 +523,9 @@
         listClass: "",
       },
     },
-
   ],
   // 棰樼洰绫诲埆锛堥殢璁匡級
-  xjxsoptions:(state) => [
+  xjxsoptions: (state) => [
     {
       value: "1",
       label: "鍗曢��",
@@ -541,11 +542,9 @@
         listClass: "",
       },
     },
-
-
   ],
-   // 璇勪环绫诲瀷
-   appraiselist:(state) => [
+  // 璇勪环绫诲瀷
+  appraiselist: (state) => [
     {
       value: "1",
       label: "鍒嗘暟",
@@ -579,9 +578,9 @@
         listClass: "",
       },
     },
-
   ],
-  // 姝e垯
+
+
 };
 
 export default getters;
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index a88584c..90e3782 100644
--- a/src/store/modules/permission.js
+++ b/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) {
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index ab0a6fe..09507cf 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -7,7 +7,73 @@
     name: '',
     avatar: '',
     roles: [],
-    permissions: []
+    permissions: [],
+    // 鏈嶅姟绫诲瀷
+  Serviceauthority:  [
+    {
+      value: "1",
+      label: "鎮h�呮姤鍛�",
+      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: "瀹f暀鍏虫��",
+      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
     }
   },
 
diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue
index d1a480b..cd4b95d 100644
--- a/src/views/followvisit/tasklist/index.vue
+++ b/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() {
diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index 9d0809d..317f038 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/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;
       }
diff --git a/src/views/repositoryai/intention/index.vue b/src/views/repositoryai/intention/index.vue
index 42db8bd..079123e 100644
--- a/src/views/repositoryai/intention/index.vue
+++ b/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: {

--
Gitblit v1.9.3