yusheng 11 месяцев назад
Родитель
Сommit
1ff1c9cbd1

+ 51 - 4
src/enum/dict.js

@@ -65,13 +65,12 @@ export default {
   条码分类: 'strip_type',
   链接分类: 'link_type',
   架构分类: 'archit_type',
-  业务模块: 'business_module',
+  // 业务模块: 'business_module',
   事项类型: 'matter_type',
   贮藏: 'layBy',
   执行标准: 'enforceStandards',
   产地: 'purchase_origin',
-  文档类型: 'doc_type',
-
+  文档类型: 'doc_type'
 };
 
 export const numberList = [
@@ -232,7 +231,7 @@ export const produceTypeList = [
     value: 3
   }
 ];
- 
+
 //持证类型
 export const holderTypeOptions = [
   {
@@ -257,3 +256,51 @@ export const holderTypeOptions = [
     value: '6'
   }
 ];
+//业务模块
+export const businessModule = [
+  {
+    label: '系统管理',
+    value: 'sys_'
+  },
+
+  {
+    label: '主数据',
+    value: 'main_'
+  },
+  {
+    label: '文档管理',
+    value: 'doc_'
+  },
+  {
+    label: '企业运营',
+    value: 'eom_'
+  },
+  {
+    label: '排程',
+    value: 'aps_'
+  },
+  {
+    label: '制造执行',
+    value: 'mes_'
+  },
+  {
+    label: '设备管理',
+    value: 'eam_'
+  },
+  {
+    label: '仓储管理',
+    value: 'wms_'
+  },
+  {
+    label: '质量管理',
+    value: 'qms_'
+  },
+  {
+    label: '项目管理',
+    value: 'pro_'
+  },
+  {
+    label: '数据看板',
+    value: 'datascreen_'
+  }
+];

+ 14 - 8
src/views/system/dictionary/components/dict-data.vue

@@ -6,7 +6,6 @@
       :columns="columns"
       :datasource="datasource"
       :need-page="true"
-      :toolkit="[]"
       :selection.sync="selection"
       height="calc(100vh - 350px)"
       full-height="calc(100vh - 116px)"
@@ -14,6 +13,8 @@
       cache-key="systemDictDataTable"
       :pageSize="this.$store.state.tablePageSize"
       @filter-change="selectType"
+      @columns-change="handleColumnChange"
+      :cache-key="cacheKeyUrl"
     >
       <!-- 表头工具栏 -->
       <!-- <template v-slot:toolbar>
@@ -81,11 +82,15 @@
   } from '@/api/system/dictionary-data';
   import { listDictionaries, removeDictionary } from '@/api/system/dictionary';
   import DictEdit from './dict-edit.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
     components: { DictDataSearch, DictDataEdit, DictEdit },
+    mixins: [tabMixins],
+
     data() {
       return {
+        cacheKeyUrl: 'main-ad4181af-syste-dictionary',
         // 表格列配置
         columns: [
           {
@@ -120,15 +125,16 @@
           //   showOverflowTooltip: true,
           //   minWidth: 110
           // },
-          {//修改此prop名称时,请同步修改columnKey属性和下方selectType方法
+          {
+            //修改此prop名称时,请同步修改columnKey属性和下方selectType方法
             prop: 'appType',
             align: 'center',
             label: '应用类型',
             showOverflowTooltip: true,
             slot: 'appType',
-            filters:[
-              { value: 1, text:'业务字段' },
-              { value: 2, text:'数据字典' },
+            filters: [
+              { value: 1, text: '业务字段' },
+              { value: 2, text: '数据字典' }
             ],
             filterMultiple: false,
             columnKey: 'appType'
@@ -175,11 +181,11 @@
 
     methods: {
       selectType(value) {
-        let where = {}
+        let where = {};
         if (value.appType.length > 0) {
-          where['appType'] = value.appType[0]
+          where['appType'] = value.appType[0];
         }
-        this.reload(where)
+        this.reload(where);
       },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {

+ 1 - 5
src/views/system/dictionary/index.vue

@@ -50,10 +50,9 @@
           :current.sync="current"
           highlight-current-row
           class="dict-table"
+          :toolkit="[]"
           tool-class="ele-toolbar-actions"
           @done="done"
-          @columns-change="handleColumnChange"
-          :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar> </template>
@@ -75,16 +74,13 @@
   import DictEdit from './components/dict-edit.vue';
   import DictDataSearch from './components/dict-data-search.vue';
   import { listDictionaries, removeDictionary } from '@/api/system/dictionary';
-  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
     name: 'SystemDictionary',
     components: { DictData, DictEdit, DictDataSearch },
-    mixins: [tabMixins],
 
     data() {
       return {
-        cacheKeyUrl: 'main-ad4181af-syste-dictionary',
         // 表格列配置
         columns: [
           {

+ 23 - 3
src/views/system/parmasManage/addOrEditDialog.vue

@@ -13,7 +13,24 @@
       <el-row>
         <el-col :span="24">
           <el-form-item label="模块名称:" prop="moduleCode">
-            <dictSelection :isProhibit="type=='view'" v-model="dialogForm.moduleCode" clearable dict-name="业务模块" @itemChange="(val)=>getDictName(val,'moduleName') "></dictSelection>
+            
+            <el-select
+              style="width: 100%"
+              v-model="dialogForm.moduleCode"
+              @change="holderTypeChange"
+              :disabled="type=='view'"
+              clearable
+            >
+              <el-option
+                :label="item.label"
+                :value="item.value"
+                v-for="(item, index) in businessModule"
+                :key="index"
+                @click="getDictName(item)"
+              >
+              </el-option>
+            </el-select>
+            <!-- <dictSelection :isProhibit="type=='view'" v-model="dialogForm.moduleCode" clearable dict-name="业务模块" @itemChange="(val)=>getDictName(val,'moduleName') "></dictSelection> -->
           </el-form-item>
         </el-col>
         <el-col :span="24">
@@ -54,6 +71,8 @@
 
 <script>
 import {parameterGetByIdAPI, parameterSaveAPI, updateParameterAPI} from "@/api/system/parmasManage";
+import { businessModule } from '@/enum/dict.js';
+
 
 export default {
   name: "addOrEditDialog",
@@ -73,6 +92,7 @@ export default {
         name: '',
         value: '',
       },
+      businessModule,
       rules: {
         moduleCode:{required:true,message:'请选择模块名称',trigger:'change'},
         code:{required:true,message:'请输入编码',trigger:'blur'},
@@ -98,8 +118,8 @@ export default {
     async getInfo(id) {
       this.dialogForm = await parameterGetByIdAPI(id)
     },
-    getDictName(val,name){
-      this.dialogForm[name] = val.dictValue;
+    getDictName(item){
+      this.dialogForm[name] = item.label;
     },
     handelConfirm() {
       this.$refs.form.validate(async (valid) => {

+ 52 - 42
src/views/system/parmasManage/search.vue

@@ -10,20 +10,28 @@
     <el-row :gutter="15">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="编码:">
-          <el-input
-            clearable
-            v-model.trim="where.code"
-            placeholder="请输入"
-          />
+          <el-input clearable v-model.trim="where.code" placeholder="请输入" />
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="模块名称:">
-          <dictSelection v-model="where.moduleCode" clearable dict-name="业务模块"></dictSelection>
+          <el-select style="width: 100%" v-model="where.moduleCode" clearable>
+            <el-option
+              :label="item.label"
+              :value="item.value"
+              v-for="(item, index) in businessModule"
+              :key="index"
+            >
+            </el-option>
+          </el-select>
+          <!-- <dictSelection v-model="where.moduleCode" clearable dict-name="业务模块"></dictSelection> -->
         </el-form-item>
       </el-col>
 
-      <el-col style="display: flex;justify-content: flex-end" v-bind="styleResponsive ? { lg: 12, md: 24 } : { span: 12 }">
+      <el-col
+        style="display: flex; justify-content: flex-end"
+        v-bind="styleResponsive ? { lg: 12, md: 24 } : { span: 12 }"
+      >
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -41,43 +49,45 @@
 </template>
 
 <script>
-import { getRolesListAPI } from '@/api/system/role';
+  import { getRolesListAPI } from '@/api/system/role';
+  import { businessModule } from '@/enum/dict.js';
 
-export default {
-  data() {
-    // 默认表单数据
-    const defaultWhere = {
-      moduleCode: '',
-      code:''
-    };
-    return {
-      // 表单数据
-      where: { ...defaultWhere },
-      roleList: []
-    };
-  },
-  computed: {
-    // 是否开启响应式布局
-    styleResponsive() {
-      return this.$store.state.theme.styleResponsive;
-    }
-  },
-  created() {
-    this.getRolesList();
-  },
-  methods: {
-    async getRolesList() {
-      this.roleList = await getRolesListAPI();
+  export default {
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        moduleCode: '',
+        code: ''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere },
+        roleList: [],
+        businessModule
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
     },
-    /* 搜索 */
-    search() {
-      this.$emit('search', this.where);
+    created() {
+      this.getRolesList();
     },
-    /*  重置 */
-    reset() {
-      this.where = { ...this.defaultWhere };
-      this.search();
+    methods: {
+      async getRolesList() {
+        this.roleList = await getRolesListAPI();
+      },
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      }
     }
-  }
-};
+  };
 </script>