diff --git a/vue/src/app.js b/vue/src/app.js index ed06cce..4a5c519 100644 --- a/vue/src/app.js +++ b/vue/src/app.js @@ -1,6 +1,6 @@ import Layout from "./layout/index.vue"; +import dict from "./pages/dict"; import Routes from "./pages/routes"; -const dict = require("./pages/dict.json"); __webpack_public_path__ = zen.path("iot"); zen.setup({ com: Layout, routes: Routes, dict }); diff --git a/vue/src/pages/dict.js b/vue/src/pages/dict.js new file mode 100644 index 0000000..693764d --- /dev/null +++ b/vue/src/pages/dict.js @@ -0,0 +1,54 @@ +export default [ + { + key: "mealType", + title: "套餐类型", + type: 1, + content: [ + { value: 1, label: "大王卡", color: "#FF6900" }, + { value: 2, label: "东风卡", color: "#C71585" }, + { value: 3, label: "动感地带", color: "#559B7B" }, + ], + }, + { + key: "cardFrom", + title: "通信通道", + type: 1, + content: [ + { value: 1, label: "移动卡", color: "#999000" }, + { value: 2, label: "联通卡", color: "#06EDA4" }, + { value: 3, label: "电信卡", color: "#E004F4" }, + ], + }, + { + key: "cardStatus", + title: "卡状态", + type: 1, + content: [ + { value: 7, label: "已激活", color: "#559B7B" }, + { value: 5, label: "待激活", color: "#666666" }, + { value: 9, label: "已欠费", color: "#FF4500" }, + { value: 3, label: "已锁定", color: "#F8D03F" }, + ], + }, + { + key: "inlineMode", + title: "接入类型", + type: 1, + content: [ + { value: 1, label: "网关接入", color: "#F8D03F" }, + { value: 2, label: "睿盾接入", color: "#C36EB5" }, + { value: 3, label: "MQTT接入", color: "#999000" }, + ], + }, + { + key: "machineStatus", + title: "设备状态", + type: 1, + content: [ + { value: 5, label: "正常", color: "#559B7B" }, + { value: 3, label: "停用", color: "#FF4500" }, + { value: 2, label: "已下线", color: "#FF8C00" }, + { value: 4, label: "未接入", color: "#00CED1" }, + ], + }, +]; diff --git a/vue/src/pages/dict.json b/vue/src/pages/dict.json deleted file mode 100644 index 959490b..0000000 --- a/vue/src/pages/dict.json +++ /dev/null @@ -1 +0,0 @@ -[{"key":"mealType","title":"套餐类型","type":1,"content":[{"value":1,"label":"大王卡","color":"#FF6900"},{"value":2,"label":"东风卡","color":"#C71585"},{"value":3,"label":"动感地带","color":"#559B7B"}]},{"key":"cardFrom","title":"通信通道","type":1,"content":[{"value":1,"label":"移动卡","color":"#999000"},{"value":2,"label":"联通卡","color":"#06EDA4"},{"value":3,"label":"电信卡","color":"#E004F4"}]},{"key":"cardStatus","title":"卡状态","type":1,"content":[{"value":7,"label":"已激活","color":"#559B7B"},{"value":5,"label":"待激活","color":"#666666"},{"value":9,"label":"已欠费","color":"#FF4500"},{"value":3,"label":"已锁定","color":"#F8D03F"}]},{"key":"inlineMode","title":"接入类型","type":1,"content":[{"value":1,"label":"网关接入","color":"#F8D03F"},{"value":2,"label":"睿盾接入","color":"#C36EB5"},{"value":3,"label":"MQTT接入","color":"#999000"}]},{"key":"machineStatus","title":"设备状态","type":1,"content":[{"value":5,"label":"正常","color":"#559B7B"},{"value":3,"label":"停用","color":"#FF4500"},{"value":2,"label":"已下线","color":"#FF8C00"},{"value":4,"label":"未接入","color":"#00CED1"}]}] \ No newline at end of file