ソースを参照

教育培训 bug修改

jingyuanchao 2 年 前
コミット
98c4fd51c3

+ 1 - 0
src/components/orgTree/index.vue

@@ -121,6 +121,7 @@ export default {
     },
     dataFn(arr){
       console.log(arr,'arrr')
+      if(arr.length==0)return
       this.defaultKeys.push(arr[0].id);
       this.$emit("defaultKey", arr[0].id);
       this.$emit("defaultOrg", arr[0]);

+ 4 - 0
src/store/modules/user.js

@@ -44,6 +44,9 @@ const user = {
     SET_ORG_ID: (state, orgId) => {
       state.orgId = orgId
     },
+    SET_ORG_TYPE: (state, orgType) => {
+      state.orgType = orgType
+    },
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
     },
@@ -122,6 +125,7 @@ const user = {
           commit('SET_AVATAR', avatar)
           commit('SET_ORG_ID', user.orgId)
           commit('SET_ORG_NAME', user.orgName)
+          commit('SET_ORG_TYPE', user.orgType)
           resolve(res)
         }).catch(error => {
           reject(error)

+ 17 - 0
src/views/core/edu/plan/index.vue

@@ -310,6 +310,7 @@ export default {
       open: false,
       isUnfold: false,
       defaultSelect: [],
+      filterOrtTypeOptions: [],
       orgId: null,
       type: null,
       // 查询参数
@@ -612,6 +613,22 @@ export default {
       //this.form.fileList=this.form.fileList.concat(tempArry);
       this.formFileListDefualtValue =this.form.fileList.concat(tempArry);
     },
+  },
+  mounted() {
+    console.log("this.dict.type.sys_org_type", this.dict.type.sys_org_type);
+    let from = Array.from(this.dict.type.sys_org_typ);
+    console.log("from", from)
+    //循环 this.dict.type.sys_org_type 拿到每个项的value等于3的数据,放到this.filterOrtTypeOptions中
+    let newArr = [];
+    from.map(element => {
+      newArr.push(element);
+    });
+
+    console.log("newArr", newArr);
+    this.filterOrtTypeOptions =newArr.filter(element => element.value > 3);
+
+
+    console.log("this.filterOrtTypeOptions", this.filterOrtTypeOptions)
   }
 };
 </script>

+ 4 - 5
src/views/core/knowledge/index.vue

@@ -48,23 +48,22 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['core:knowledge:remove']"
-        >删除</el-button>-->
+        >删除</el-button>
       </el-col>
       <el-col :span="1.5">
-<!--        <el-button
+        <el-button
           type="warning"
           plain
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
           v-hasPermi="['core:knowledge:export']"
-        >导出</el-button>-->
-      </el-col>
+        >导出</el-button>
+      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="knowledgeList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="名称" align="center" prop="name" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">