diff --git a/src/api/model/system.js b/src/api/model/system.js index c1b3b76d..155fa53c 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -262,15 +262,6 @@ export default { return await http.post(this.url,data); } }, - /*update: { - name: "更新岗位", - req: async function(id, data){ - return await http.put( - `${config.API_URL}/system/post_role/${id}/`, - data - ); - } - },*/ delete: { name: "删除岗位", req: async function(id){ diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index ab45a7f8..e640a97c 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -310,7 +310,7 @@ export default { this.$emit("dataChange", res, this.tableData); } catch (error) { this.loading = false; - if(error.response.data){ + if(error.response && error.response.data){ this.emptyText = error.response.data.err_msg; }else{ this.emptyText = error.statusText || "数据格式错误"; diff --git a/src/config/route.js b/src/config/route.js index 7327bf3d..5f60b9b9 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -34,6 +34,7 @@ const routes = [ "title": "首页", "icon": "el-icon-home-filled", "type": "menu", + "perms": ["home"] }, "children": [ { @@ -43,6 +44,7 @@ const routes = [ "title": "控制台", "icon": "el-icon-monitor", "affix": true, + "perms": ["dashboard"] }, "component": "home" }, @@ -52,7 +54,8 @@ const routes = [ "meta": { "title": "驾驶舱", "icon": "el-icon-position", - "fullpage": true + "fullpage": true, + "perms": ["bigScreen"] }, "component": "bigScreen" }, @@ -61,7 +64,8 @@ const routes = [ "path": "/usercenter", "meta": { "title": "帐号信息", - "icon": "el-icon-user" + "icon": "el-icon-user", + "perms": ["userCenter"] }, "component": "userCenter" } @@ -74,6 +78,7 @@ const routes = [ "title": "事件", "icon": "el-icon-goods-filled", "type": "menu", + "perms": ["ecm"] }, "children": [ { @@ -114,6 +119,7 @@ const routes = [ "meta": { "title": "我的事件", "icon": "el-icon-document-remove", + "perms": ["myevent"] }, "component": "ecm/myevent" }, @@ -123,6 +129,7 @@ const routes = [ "meta": { "title": "提醒配置", "icon": "el-icon-setting", + "perms": ["notify_setting"] }, "component": "ecm/notify_setting" }, @@ -133,6 +140,7 @@ const routes = [ "meta": { "title": "算法配置", "icon": "el-icon-setting", + "perms": ["algo"] }, "component": "ecm/algo" } @@ -144,7 +152,8 @@ const routes = [ "meta": { "title": "工单", "icon": "el-icon-circle-check-filled", - "type": "menu" + "type": "menu", + "perms": ["wf"] }, "children": [ { @@ -153,6 +162,7 @@ const routes = [ "meta": { "title": "工作流", "icon": "el-icon-guide", + "perms": ["workflow"] }, "component": "wf/workflow" }, @@ -173,6 +183,7 @@ const routes = [ "meta": { "title": "全部工单", "icon": "el-icon-folder", + "perms": ["allwork"] }, "component": "wf/allwork" @@ -183,7 +194,7 @@ const routes = [ "meta": { "title": "我创建的", "icon": "el-icon-folder-add", - + "perms": ["ownerwork"] }, "component": "wf/ownerwork" } @@ -195,7 +206,7 @@ const routes = [ "meta": { "title": "待办工单", "icon": "el-icon-folder-opened", - + "perms": ["duyt"] }, "component": "wf/dutywork" }, @@ -205,7 +216,7 @@ const routes = [ "meta": { "title": "我处理的", "icon": "el-icon-expand", - + "perms": ["worked"] }, "component": "wf/worked" }, @@ -215,7 +226,7 @@ const routes = [ "meta": { "title": "抄送我的", "icon": "el-icon-edit-pen", - + "perms": ["ccwork"] }, "component": "wf/ccwork" }, @@ -240,7 +251,8 @@ const routes = [ "meta": { "title": "作业", "icon": "el-icon-list", - "type": "menu" + "type": "menu", + "perms": ["opm"] }, "children": [ { @@ -249,6 +261,7 @@ const routes = [ "meta": { "title": "作业列表", "icon": "el-icon-tickets", + "perms": ["operation"] }, "component": "opm/operation" }, @@ -258,6 +271,7 @@ const routes = [ "meta": { "title": "许可证分类", "icon": "el-icon-ticket", + "perms": ["oplcate"] }, "component": "opm/oplcate" }, @@ -369,7 +383,8 @@ const routes = [ "meta": { "title": "相关方", "icon": "el-icon-avatar", - "type": "menu" + "type": "menu", + "perms": ["rpm"] }, "children": [ { @@ -378,6 +393,7 @@ const routes = [ "meta": { "title": "相关方列表", "icon": "el-icon-tickets", + "perms": ["rparty"] }, "component": "rpm/rparty" }, @@ -387,6 +403,7 @@ const routes = [ "meta": { "title": "相关方人员", "icon": "el-icon-user", + "perms": ["remployee"] }, "component": "rpm/remployee" }, @@ -396,6 +413,7 @@ const routes = [ "meta": { "title": "人员证书", "icon": "el-icon-postcard", + "perms": ["rcertificate"] }, "component": "rpm/rcertificate" }, @@ -405,6 +423,7 @@ const routes = [ "meta": { "title": "资料库", "icon": "el-icon-shopping-bag", + "perms": ["rfile"] }, "component": "rpm/rfile" }, @@ -414,6 +433,7 @@ const routes = [ "meta": { "title": "入厂项目", "icon": "el-icon-calendar", + "perms": ["rpj"] }, "component": "rpm/rpj" }, @@ -436,7 +456,8 @@ const routes = [ "meta": { "title": "访客", "icon": "el-icon-user-filled", - "type": "menu" + "type": "menu", + "perms": ["vm"] }, "children": [ { @@ -445,6 +466,7 @@ const routes = [ "meta": { "title": "来访项目", "icon": "el-icon-tickets", + "perms": ["visit"] }, "component": "vm/visit" }, @@ -454,6 +476,7 @@ const routes = [ "meta": { "title": "来访人员", "icon": "el-icon-user", + "perms": ["visitor"] }, "component": "vm/visitor" },{ @@ -486,7 +509,8 @@ const routes = [ "meta": { "title": "区域", "icon": "el-icon-location-filled", - "type": "menu" + "type": "menu", + "perms": ["am"] }, "children": [ { @@ -495,6 +519,7 @@ const routes = [ "meta": { "title": "区域列表", "icon": "el-icon-tickets", + "perms": ["area"] }, "component": "am/area" }, @@ -504,6 +529,7 @@ const routes = [ "meta": { "title": "门禁通道", "icon": "el-icon-phone", + "perms": ["eqm"] }, "component": "am/em1" }, @@ -513,6 +539,7 @@ const routes = [ "meta": { "title": "视频通道", "icon": "el-icon-video-camera", + "perms": ["monitor"] }, "component": "am/monitor" }, @@ -522,6 +549,7 @@ const routes = [ "meta": { "title": "喇叭通道", "icon": "el-icon-mic", + "perms": ["audio"] }, "component": "am/audio" },{ @@ -530,6 +558,7 @@ const routes = [ "meta": { "title": "定位标签", "icon": "el-icon-map-location", + "perms": ["blt"] }, "component": "am/blt" }, @@ -541,7 +570,8 @@ const routes = [ "meta": { "title": "人事", "icon": "el-icon-platform", - "type": "menu" + "type": "menu", + "perms": ["hrm"] }, "children": [ @@ -551,6 +581,7 @@ const routes = [ "meta": { "title": "企业员工", "icon": "el-icon-user", + "perms": ["employee"] }, "component": "hrm/employee" } @@ -561,6 +592,7 @@ const routes = [ "meta": { "title": "证书列表", "icon": "el-icon-tickets", + "perms": ["certificates"] }, "component": "hrm/certificates" } @@ -571,7 +603,8 @@ const routes = [ "meta": { "title": "相关证书", "icon": "el-icon-menu", - "hidden": true + "hidden": true, + "perms": ["certificates"] }, "component": "hrm/certificate" }, @@ -584,7 +617,8 @@ const routes = [ "meta": { "title": "系统", "icon": "el-icon-tools", - "type": "menu" + "type": "menu", + "perms": ["sys"] }, "children": [ { @@ -593,7 +627,8 @@ const routes = [ "meta": { "title": "账户管理", "icon": "el-icon-user", - "type": "menu" + "type": "menu", + "perms": ["user"] }, "component": "sys/user" }, @@ -603,7 +638,8 @@ const routes = [ "meta": { "title": "部门管理", "icon": "sc-icon-organization", - "type": "menu" + "type": "menu", + "perms": ["dept"] }, "component": "sys/dept" }, @@ -613,7 +649,8 @@ const routes = [ "meta": { "title": "岗位管理", "icon": "el-icon-postcard", - "type": "menu" + "type": "menu", + "perms": ["post"] }, "component": "sys/post" }, @@ -623,7 +660,8 @@ const routes = [ "meta": { "title": "角色管理", "icon": "el-icon-notebook", - "type": "menu" + "type": "menu", + "perms": ["role"] }, "component": "sys/role" }, @@ -633,7 +671,8 @@ const routes = [ "meta": { "title": "字典管理", "icon": "el-icon-document", - "type": "menu" + "type": "menu", + "perms": ["dict"] }, "component": "sys/dict" }, @@ -643,7 +682,8 @@ const routes = [ "meta": { "title": "计划任务", "icon": "el-icon-alarm-clock", - "type": "menu" + "type": "menu", + "perms": ["task"] }, "component": "sys/task" } diff --git a/src/utils/permission.js b/src/utils/permission.js index a8dd63e7..8b75d1b0 100644 --- a/src/utils/permission.js +++ b/src/utils/permission.js @@ -2,6 +2,9 @@ import tool from '@/utils/tool'; export function permission(data) { let permissions = tool.data.get("PERMISSIONS"); + if (permissions.indexOf('superuser')>-1){ + return true + } if(!permissions){ return false; } diff --git a/src/views/am/audio.vue b/src/views/am/audio.vue index 2429ef40..71e552b7 100644 --- a/src/views/am/audio.vue +++ b/src/views/am/audio.vue @@ -2,34 +2,37 @@
- 同步
- + @click="handleQuery" + > -->
- + - + @@ -105,6 +108,15 @@ export default { return { syncLoading: false, apiObj: this.$API.am.tdevice.speaker, + pageStr: "page", + pageSizeStr: "pageSize", + parseData: (res) => { + return { + data: res, //分析无分页的数据字段结构 + rows: res.rows, //分析行数据字段结构 + total: res.total, //分析总数字段结构 + }; + }, dialogSave: false, limitedVisible: false, query: {}, @@ -128,7 +140,9 @@ export default { }, //搜索 - upsearch() {}, + handleQuery() { + this.$refs.table.refresh(); + }, resetQuery() { this.query = {}; diff --git a/src/views/am/monitor.vue b/src/views/am/monitor.vue index a0461164..44b1b84f 100644 --- a/src/views/am/monitor.vue +++ b/src/views/am/monitor.vue @@ -11,17 +11,17 @@ >
- + @click="handleQuery" + > -->
@@ -151,9 +151,6 @@ export default { syncLoading: false, query: {}, selection: [], - search: { - keyword: null, - }, channelId: "", params: { json: { @@ -246,7 +243,7 @@ export default { }, //搜索 - upsearch() {}, + handleQuery() {this.$refs.table.refresh();}, resetQuery() { this.query = {}; diff --git a/src/views/sys/post.vue b/src/views/sys/post.vue index d32c9869..cf39ccd6 100644 --- a/src/views/sys/post.vue +++ b/src/views/sys/post.vue @@ -1,199 +1,259 @@