lucw 7 ماه پیش
والد
کامیت
d13bc66702
2فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 4 4
      src/store/getters.js
  2. 0 1
      src/views/produce/components/footBtn.vue

+ 4 - 4
src/store/getters.js

@@ -20,7 +20,7 @@ export default {
       return item.dictCode === dictCode + '';
     });
 
-    if (!obj) {
+    if (!state.dict[dictEnum[enumName]]) {
       // 提交dict模块下的actions的requestDict
       store.dispatch('dict/requestDict', enumName);
       return '';
@@ -29,10 +29,10 @@ export default {
     return obj && obj.dictValue;
   },
   // 根据字典enumName 获取字典列表 label value 格式
-  getDictListByName: (sate) => (enumName) => {
-    const dList = sate.dict[dictEnum[enumName]] || [];
+  getDictListByName: (state) => (enumName) => {
+    const dList = state.dict[dictEnum[enumName]] || [];
 
-    if (!dList.length) {
+    if (!state.dict[dictEnum[enumName]]) {
       // 提交dict模块下的actions的requestDict
       store.dispatch('dict/requestDict', enumName);
       return '';

+ 0 - 1
src/views/produce/components/footBtn.vue

@@ -265,7 +265,6 @@
         btnList: [],
         // 未完成产前准备 需要禁用的按钮
         disable: [
-          '领料',
           '投料',
           '过程监测',
           '报工',