From 3711ca26b8d93c5017fde3ed3b95b712320bb26f Mon Sep 17 00:00:00 2001 From: xu_lw Date: Sun, 1 Sep 2019 20:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=94=BE=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console-web/src/main.js | 2 + console-web/src/store/index.js | 4 +- .../src/views/modules/opn/opn-gateway.vue | 49 ++++-- .../src/views/modules/opn/opninterfaceinf.vue | 17 +- .../opn/opnstrategyauthinf-add-or-update.vue | 65 ++----- .../views/modules/opn/opnstrategyauthinf.vue | 136 ++++----------- .../views/modules/opn/opnstrategyflowinf.vue | 160 +++++------------- .../opn/opnstrategyinf-add-or-update.vue | 55 +++--- .../src/views/modules/opn/opnstrategyinf.vue | 2 +- .../views/modules/opn/opnstrategyipinf.vue | 113 +++---------- .../OpnStrategyInfListByGatewayAction.java | 63 +++++++ .../web/opn/dal/dao/OpnStrategyInfMapper.java | 4 + .../OpnStrategyInfListByGatewayReqBO.java | 18 ++ .../etc/opn/mapper/OpnStrategyInfMapper.xml | 6 + .../webapp/WEB-INF/conf/action_config.xml | 4 + 15 files changed, 281 insertions(+), 417 deletions(-) create mode 100644 ecp-mbu-web/src/main/java/com/murong/ecp/netpay/mbu/web/opn/action/buiopnbpc1/OpnStrategyInfListByGatewayAction.java create mode 100644 ecp-mbu-web/src/main/java/com/murong/ecp/netpay/mbu/web/opn/model/OpnStrategyInfListByGatewayReqBO.java diff --git a/console-web/src/main.js b/console-web/src/main.js index 3017d64a..f6b129e7 100644 --- a/console-web/src/main.js +++ b/console-web/src/main.js @@ -13,11 +13,13 @@ import cloneDeep from 'lodash/cloneDeep' import './utils/directives.js' import dict from './utils/dict' import { Scrollbar } from 'element-ui' // 滚动条 +import storage from './utils/storage' // 滚动条 Vue.use(Scrollbar) Vue.use(VueCookie) Vue.config.productionTip = false Vue.prototype.dict = dict +Vue.prototype.storage = storage // 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock if (process.env.NODE_ENV !== 'production') { diff --git a/console-web/src/store/index.js b/console-web/src/store/index.js index 258c9f1e..45322a68 100644 --- a/console-web/src/store/index.js +++ b/console-web/src/store/index.js @@ -13,8 +13,8 @@ export default new Vuex.Store({ }, mutations: { // 重置vuex本地储存状态 - resetStore (state) { - Object.keys(state).forEach((key) => { + resetStore(state) { + Object.keys(state).forEach(key => { state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key]) }) } diff --git a/console-web/src/views/modules/opn/opn-gateway.vue b/console-web/src/views/modules/opn/opn-gateway.vue index 33347ace..4b1e8dd0 100644 --- a/console-web/src/views/modules/opn/opn-gateway.vue +++ b/console-web/src/views/modules/opn/opn-gateway.vue @@ -32,21 +32,17 @@ -
- - - - - +
+
-
- +
+
-
- +
+
-
- +
+
@@ -81,10 +77,20 @@ activated() { this.getGatewayList() }, + computed: { + gatewayId: { + get() { return this.storage.get('openapi/gatewayId') }, + set(val) { + console.log('gatewayId:' + val) + this.storage.set('openapi/gatewayId', val) + } + } + }, methods: { handleSelect(key, keyPath) { let value = key[0] this.activeIndex = value + this.gatewaySelectChange() }, getGatewayList() { // 获取网关列表 @@ -97,13 +103,24 @@ if (isGDASucc(data)) { this.gatewayList = data.data this.dataForm.gateway_id = this.gatewayList[0]['id'] - this.$refs.opnInterfaceInf.refreshGatewayId(this.dataForm.gateway_id) + this.gatewayId = this.dataForm.gateway_id + this.gatewaySelectChange() } }) }, - gatewaySelectChange(value) { - this.$refs.opnInterfaceInf.refreshGatewayId(value) - this.$refs.opnBackendServerInf.refreshGatewayId(value) + gatewaySelectChange() { + this.gatewayId = this.dataForm.gateway_id + this.$nextTick(() => { + if (this.activeIndex === '1') { + this.$refs.opnInterfaceInf.refresh(this.dataForm.gateway_id) + } else if (this.activeIndex === '2') { + this.$refs.opnBackendServerInf.refresh(this.dataForm.gateway_id) + } else if (this.activeIndex === '3') { + this.$refs.opnStrategyMng.refresh(this.dataForm.gateway_id) + } else if (this.activeIndex === '4') { + this.$refs.opnStrategyIpInf.refresh(this.dataForm.gateway_id) + } + }) } } } diff --git a/console-web/src/views/modules/opn/opninterfaceinf.vue b/console-web/src/views/modules/opn/opninterfaceinf.vue index 4450b145..d3af1412 100644 --- a/console-web/src/views/modules/opn/opninterfaceinf.vue +++ b/console-web/src/views/modules/opn/opninterfaceinf.vue @@ -8,7 +8,8 @@ - 管理 + 刷新 + 管理 @@ -78,7 +79,6 @@ import InterfaceGroupInf from './opninterfacegroupinf' import { isGDASucc } from '@/utils' - import { debug } from 'util' export default { data() { @@ -107,13 +107,21 @@ // this.getGroupList() }, methods: { + refresh(gatewayId) { + this.dataForm.gateway_id = gatewayId + this.getGroupList() + }, // 获取数据列表 getDataList01() { this.pageIndex = 1 this.$refs.pagination.lastEmittedPage = 1 this.getDataList() }, + getGatewayId() { + return this.storage.get('openapi/gatewayId') + }, getDataList() { + this.dataForm.gateway_id = this.getGatewayId() this.dataListLoading = true this.$http({ url: this.$http.adornUrl('/buiopnbpc1/opninterfaceinf/listByGatewayAndGroup.do'), @@ -146,6 +154,7 @@ this.getDataList01() }, getGroupList() { + this.dataForm.gateway_id = this.getGatewayId() // 获取接口组 this.$http({ url: this.$http.adornUrl(`/buiopnbpc1/opninterfacegroupinf/listByGateway.do?gateway_id=${this.dataForm.gateway_id}`), @@ -164,10 +173,6 @@ } }) }, - refreshGatewayId(gatewayId) { - this.dataForm.gateway_id = gatewayId - this.getGroupList() - }, // 每页数 sizeChangeHandle(val) { this.pageSize = val diff --git a/console-web/src/views/modules/opn/opnstrategyauthinf-add-or-update.vue b/console-web/src/views/modules/opn/opnstrategyauthinf-add-or-update.vue index 9c701ab9..4e453e7e 100644 --- a/console-web/src/views/modules/opn/opnstrategyauthinf-add-or-update.vue +++ b/console-web/src/views/modules/opn/opnstrategyauthinf-add-or-update.vue @@ -1,24 +1,6 @@