From 841763d48ab4334d3b04645e133ddf691a952036 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 17 Jun 2021 17:52:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E5=9C=A8=E4=BB=BF=E7=9C=9F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/rtSimulation.js | 21 ++- src/api/simulation.js | 32 ++--- .../QueryListPage/QueryListPage.vue | 9 +- src/views/system/existingSimulation/index.vue | 133 +++++++++--------- .../system/existingSimulation/viewMember.vue | 61 ++++++++ 5 files changed, 167 insertions(+), 89 deletions(-) create mode 100644 src/views/system/existingSimulation/viewMember.vue diff --git a/src/api/rtSimulation.js b/src/api/rtSimulation.js index de35255a2..519419e1a 100644 --- a/src/api/rtSimulation.js +++ b/src/api/rtSimulation.js @@ -29,10 +29,10 @@ export function sendSimulationCommand(group, memberId, type, data) { }); } /** 获取仿真成员列表 */ -export function getMemberListCommon(group,role) { +export function getMemberListCommon(group, role) { - if(!role){ - role = ""; + if (!role) { + role = ''; } return request({ url: `/common/simulation/${group}/members?role=${role}`, @@ -96,3 +96,18 @@ export function simulationStart(group) { method: 'put' }); } +/** 获取存在的仿真列表 */ +export function getExistSimulationList(params) { + return request({ + url: `/common/simulation/list`, + method: 'get', + params + }); +} +/** 获取仿真用户信息 */ +export function getSimulationUserInfo(id) { + return request({ + url: `/common/simulation/${id}/users`, + method: 'get' + }); +} diff --git a/src/api/simulation.js b/src/api/simulation.js index 077a341da..cf4a1156a 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -163,22 +163,22 @@ export function cancelReplaceBg(group) { }); } -/** 分页查询存在的仿真 */ -export function getExistingSimulation(params) { - return request({ - url: `/manage/simulation/exists`, - method: 'get', - params - }); -} - -/** 删除存在的仿真 */ -export function deleteExistingSimulation(group) { - return request({ - url: `/manage/simulation/${group}`, - method: 'delete' - }); -} +// /** 分页查询存在的仿真 */ +// export function getExistingSimulation(params) { +// return request({ +// url: `/manage/simulation/exists`, +// method: 'get', +// params +// }); +// } +// +// /** 删除存在的仿真 */ +// export function deleteExistingSimulation(group) { +// return request({ +// url: `/manage/simulation/${group}`, +// method: 'delete' +// }); +// } /** 获取任务录制的所有动作(新版)*/ export function getScriptAllAction(group) { diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index 324d21971..ffc413e88 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -377,8 +377,10 @@ export default { query(queryData) { this.queryData = queryData; // this.pageIndex = 1; - this.queryData[this.currentpagerConfig.pageSize] = this.pageSize; - this.queryData[this.currentpagerConfig.pageIndex] = this.pageIndex; + if (!this.queryList.paginationHiden) { + this.queryData[this.currentpagerConfig.pageSize] = this.pageSize; + this.queryData[this.currentpagerConfig.pageIndex] = this.pageIndex; + } // this.queryList.reload(); this.choose = null; this.commitQuery(); @@ -512,6 +514,7 @@ export default { self.enableQuery(); return; } + delete this.queryData.undefined; if (this.queryList.query instanceof Function) { this.queryList.query(this.queryData).then(response => { self.enableQuery(); @@ -519,7 +522,7 @@ export default { this.queryList.afterQuery(response.data); } const resultData = response.data; - this.$set(this.queryList, 'data', resultData.list); + this.$set(this.queryList, 'data', this.queryList.paginationHiden ? resultData : resultData.list); this.$set(this.queryList, 'total', resultData.total); if (resultData.pageNum) { this.pageIndex = resultData.pageNum; diff --git a/src/views/system/existingSimulation/index.vue b/src/views/system/existingSimulation/index.vue index 5fd0aba96..86bdc1ed4 100644 --- a/src/views/system/existingSimulation/index.vue +++ b/src/views/system/existingSimulation/index.vue @@ -1,15 +1,19 @@