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/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 = {};