Преглед на файлове

大屏图表动态数据细化字典

Raod преди 4 години
родител
ревизия
101d91e2ce

+ 1 - 1
report-ui/src/router/index.js

@@ -57,7 +57,7 @@ export const constantRouterMap = [
     children: [
       { path: 'file', name: 'file', component: () => import('@/views/file-management/index'), meta: { title: '文件管理', icon: 'iconfill_folder', keepAlive: true, requireAuth: true, permission: 'fileManage'} },
       { path: 'dict', name: 'dict', component: () => import('@/views/dict/index'), meta: { title: '数据字典', icon: 'iconzidian', keepAlive: true, requireAuth: true, permission: 'dictManage'} },
-      { path: 'dictItem', name: 'dictItem', component: () => import('@/views/dict/dict-item'), meta: { title: '字典项', icon: 'iconzidianxiang', keepAlive: true, requireAuth: true, permission: 'dictItemManage'} },
+      { path: 'dictItem', name: 'dictItem', component: () => import('@/views/dict/dict-item'), hidden: true, meta: { title: '字典项', icon: 'iconzidianxiang', keepAlive: true, requireAuth: true, permission: 'dictItemManage'} },
     ]
   },
   { path: '/bigscreen/viewer', component: () => import('@/views/report/bigscreen/viewer'), hidden: true, meta: { requireAuth: true }},

+ 2 - 1
report-ui/src/views/dict/dict-item.vue

@@ -177,7 +177,8 @@ export default {
             rules: [
               { required: true, message: "状态不能为空", trigger: "blur" }
             ],
-            disabled: false
+            disabled: false,
+            defaultValue: 1
           },
           {
             label: "排序", // 排序

+ 6 - 2
report-ui/src/views/report/bigscreen/designer/form/dynamicComponents.vue

@@ -27,7 +27,7 @@
       <el-form-item v-for="item in setParamList" :key="item" :label="item">
         <Dictionary
           v-model="params"
-          :dict-key="'CHART_PROPERTIES'"
+          :dict-key="getDictKey()"
           @input="selectParams($event, item)"
         />
       </el-form-item>
@@ -57,6 +57,7 @@ export default {
   },
   props: {
     chartType: String,
+    dictKey: String,
     props: ["formData"]
   },
   data() {
@@ -66,7 +67,7 @@ export default {
       userNameList: [], // 用户
       setParamList: [], // 对应的不同的图形数据参数
       params: {},
-      chartProperties: {}
+      chartProperties: {},
     };
   },
   computed: {
@@ -113,6 +114,9 @@ export default {
     },
     selectParams(val, key) {
       this.chartProperties[key] = val;
+    },
+    getDictKey(){
+      return this.dictKey == null ? 'CHART_PROPERTIES' : this.dictKey
     }
   }
 };

+ 1 - 0
report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue

@@ -137,6 +137,7 @@
             v-if="item.type == 'dycustComponents' && inputShow[item.name]"
             v-model="formData[item.name]"
             :chart-type="item.chartType"
+            :dict-key='item.dictKey'
             @change="changed($event, item.name)"
           />
           <dynamic-add-table

+ 14 - 0
report-ui/src/views/report/bigscreen/designer/tools.js

@@ -192,6 +192,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           relactiveDomValue: 'dynamicData',
           chartType: 'widget-text',
+          dictKey: 'TEXT_PROPERTIES',
           value: '',
         }
       ],
@@ -360,6 +361,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           relactiveDomValue: 'dynamicData',
           chartType: 'widget-text',
+          dictKey: 'TEXT_PROPERTIES',
           value: '',
         }
       ],
@@ -1142,6 +1144,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           relactiveDomValue: 'dynamicData',
           chartType: 'widget-table',
+          dictKey: 'TEXT_PROPERTIES', //表格的暂不起作用
           value: '',
         },
       ],
@@ -1833,6 +1836,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           relactiveDomValue: 'dynamicData',
           chartType: 'widget-barchart',
+          dictKey: 'BAR_PROPERTIES',
           value: '',
         },
       ],
@@ -2391,6 +2395,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           relactiveDomValue: 'dynamicData',
           chartType: 'widget-barchart',
+          dictKey: 'BAR_PROPERTIES',
           value: '',
         },
       ],
@@ -3033,6 +3038,7 @@ const widgetTools = [
           placeholder: 'px',
           relactiveDom: 'dataType',
           chartType: 'widget-linechart',
+          dictKey: 'LINE_PROPERTIES',
           relactiveDomValue: 'dynamicData',
         },
       ],
@@ -3658,6 +3664,7 @@ const widgetTools = [
           placeholder: 'px',
           relactiveDom: 'dataType',
           chartType: 'widget-barlinechart',
+          dictKey: 'BAR_LINE_PROPERTIES',
           relactiveDomValue: 'dynamicData',
         },
       ],
@@ -4052,6 +4059,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           chartType: 'widget-piechart',
           relactiveDomValue: 'dynamicData',
+          dictKey: 'PIE_PROPERTIES',
           value: '',
         },
       ],
@@ -4426,6 +4434,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           chartType: 'widget-funnel',
           relactiveDomValue: 'dynamicData',
+          dictKey: 'PIE_PROPERTIES',
           value: '',
         },
       ],
@@ -4578,6 +4587,7 @@ const widgetTools = [
           placeholder: 'px',
           relactiveDom: 'dataType',
           chartType: 'widget-gauge',
+          dictKey: 'TEXT_PROPERTIES',
           relactiveDomValue: 'dynamicData',
           value: '',
         },
@@ -5025,6 +5035,7 @@ const widgetTools = [
           placeholder: 'px',
           relactiveDom: 'dataType',
           chartType: 'widget-piechart',
+          dictKey: 'PIE_PROPERTIES',
           relactiveDomValue: 'dynamicData',
           value: '',
         },
@@ -5271,6 +5282,7 @@ const widgetTools = [
           placeholder: 'px',
           relactiveDom: 'dataType',
           chartType: 'widget-piechart',
+          dictKey: 'TEXT_PROPERTIES',
           relactiveDomValue: 'dynamicData',
           value: '',
         },
@@ -5645,6 +5657,7 @@ const widgetTools = [
           placeholder: 'px',
           relactiveDom: 'dataType',
           chartType: 'widget-piechart',
+          dictKey: 'MAP_PROPERTIES',
           relactiveDomValue: 'dynamicData',
           value: '',
         },
@@ -6288,6 +6301,7 @@ const widgetTools = [
           relactiveDom: 'dataType',
           relactiveDomValue: 'dynamicData',
           chartType: 'widget-stackchart',
+          dictKey: 'STACK_PROPERTIES',
           value: '',
         },
       ],