From f917dd45f8bb708321390d6f34635a5a26050bc2 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 7 Sep 2020 17:00:46 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=88=B1=E5=BF=83?= =?UTF-8?q?=E4=BA=92=E5=8A=A9banner=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/modules/customer/customize/MiniHome.vue | 2 +- .../src/views/modules/productConfig/homeCustom/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue b/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue index 96995ef..6ca1920 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue @@ -180,7 +180,7 @@ {{ focusedCpt.configurationDescription }} -
+
Banner图 {{ focusedCpt.configurationDescription }}
-
+
Banner图 Date: Tue, 8 Sep 2020 17:02:13 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9D=83=E9=99=90?= =?UTF-8?q?=EF=BC=9B=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-oper-web/src/js/dai/config.js | 21 +- epmet-oper-web/src/js/dai/request.js | 133 +++--- .../modules/customer/customize/ConfigItem.vue | 269 ++++++++--- .../customer/customize/CustomerList.vue | 6 + .../src/views/modules/partner/index.vue | 54 ++- .../productConfig/subscribe/MyTemp.vue | 432 ++++++++++++++++++ .../productConfig/subscribe/TempEdit.vue | 278 +++++++++++ .../productConfig/subscribe/TempList.vue | 242 ++++++++++ 8 files changed, 1296 insertions(+), 139 deletions(-) create mode 100644 epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue create mode 100644 epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue create mode 100644 epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue diff --git a/epmet-oper-web/src/js/dai/config.js b/epmet-oper-web/src/js/dai/config.js index 7750c34..6df826c 100644 --- a/epmet-oper-web/src/js/dai/config.js +++ b/epmet-oper-web/src/js/dai/config.js @@ -1,3 +1,20 @@ -export const mockUrlPrefix = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad'; +export const mockUrlPrefix = + 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad' -export const envIsDev = process.env.VUE_APP_NODE_ENV === "dev"; \ No newline at end of file +export const envIsDev = process.env.VUE_APP_NODE_ENV === 'dev' + +export default { + appid: { + //开发环境appid + devResiAppid: 'wx0301bf7f534d97d1', // 风凌石居民端 + devWorkAppid: 'wx2679392c4cc2af22', //风凌石工作端 + + //体验环境appid + testResiAppid: 'wxd0795b37d0f0bf08', // 风凌石居民端测试号 + testWorkAppid: 'wx6a57bdefa9d9ec93', //风凌石工作端测试号 + + //生产环境appid + prodResiAppid: 'wxcb1a6bb4706538d3', // 风凌石测试1 + prodWorkAppid: 'wx0ea975d0b484ae27' //以风凌石 + } +} diff --git a/epmet-oper-web/src/js/dai/request.js b/epmet-oper-web/src/js/dai/request.js index bc22042..5701ea4 100644 --- a/epmet-oper-web/src/js/dai/request.js +++ b/epmet-oper-web/src/js/dai/request.js @@ -2,77 +2,86 @@ | 请求接口封装 | ---------------------------------------------------------------*/ import axios from 'axios' -import log from 'dai-js/modules/log'; -import curry from 'dai-js/tools/curry'; +import log from 'dai-js/modules/log' +import curry from 'dai-js/tools/curry' -const request = curry((method, url, data = {}, headers = {}, progress = () => {}) => { - return new Promise(reslove => { - let returnIniData = { - httpCode: '', - data: {}, - msg: '', - code: '', - }; +const request = curry( + (method, url, data = {}, headers = {}, progress = () => {}) => { + return new Promise((reslove) => { + let returnIniData = { + httpCode: '', + data: {}, + msg: '', + code: '' + } - // 添加服务器端URL - function processUrl(url) { + // 添加服务器端URL + function processUrl(url) { + if (url.indexOf('http://') > -1 || url.indexOf('https://') > -1) { + return url + } + return process.env.VUE_APP_API_SERVER + url + } - if (url.indexOf('http://') > -1 || url.indexOf('https://') > -1) { - return url - } - return process.env.VUE_APP_API_SERVER + url - } + url = processUrl(url) - url = processUrl(url); + const succFn = (res) => { + // log(`[request成功] ${url}`, data, res); + let retData = { + ...returnIniData, + ...res.data, + httpCode: res.statusCode + } + // if(typeof Vue.$afterRequestHook == 'function'){ + // retData = Vue.$afterRequestHook(retData); + // } - const succFn = (res) => { - log(`[request成功] ${url}`, data, res); - let retData = { - ...returnIniData, - ...res.data, - httpCode: res.statusCode - }; - // if(typeof Vue.$afterRequestHook == 'function'){ - // retData = Vue.$afterRequestHook(retData); - // } + reslove(retData) + } - reslove(retData); - }; + const failFn = (err) => { + // log(`[request失败] ${url}`, data, err); - const failFn = (err) => { - log(`[request失败] ${url}`, data, err); + reslove( + Object.assign({}, returnIniData, { + httpCode: '9999', //访问出现意外 + msg: '网络错误' + }) + ) + } - reslove(Object.assign({}, returnIniData, { - httpCode: '9999', //访问出现意外 - msg: '网络错误', - })); - }; + if (method.toUpperCase() == 'POST') { + axios + .post(url, data, { + headers, + responseType: 'json' + // progress, + // credentials: false, + }) + .then(succFn) + .catch(failFn) + } else { + axios + .get(url, { + params: data, + headers, + responseType: 'json' + // credentials: true, + }) + .then(succFn) + .catch(failFn) + } + }) + } +) - if (method.toUpperCase() == 'POST') { - axios.post(url, data, { - headers, - responseType: 'json', - // progress, - // credentials: false, - }).then(succFn).catch(failFn); - } else { - axios.get(url, { - params: data, - headers, - responseType: 'json', - // credentials: true, - }).then(succFn).catch(failFn); - } - }); -}); +export const requestGet = request('get') -export const requestGet = request('get'); - -export const requestPost = request('post'); +export const requestPost = request('post') export default { - install(Vue) { - Vue.prototype.$requestGet = requestGet; - Vue.prototype.$requestPost = requestPost; - } -}; \ No newline at end of file + install(Vue) { + Vue.prototype.$requestGet = requestGet + Vue.prototype.$requestPost = requestPost + } +} diff --git a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue index 248c95b..84190b4 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue @@ -13,6 +13,7 @@
@@ -110,7 +111,7 @@ header-align="center" align="center" class="operate" - width="200"> + width="250"> @@ -275,7 +280,7 @@ header-align="center" align="center" class="operate" - width="200"> + width="250"> @@ -347,20 +356,49 @@ -
- - +
+ + + + 全选 + + + {{item.roleName}} + + + + + + + + + +
@@ -377,8 +415,10 @@ import CDialog from '@c/CDialog' import ConfigEdit from './ConfigEdit' import { mapGetters } from 'vuex' import { Loading } from 'element-ui' // 引入Loading服务 +import { requestPost } from "@/js/dai/request"; let loading // 加载动画 +const cityOptions = ['上海', '北京', '广州', '深圳']; export default { data () { return { @@ -408,9 +448,18 @@ export default { customerId: '', functionId: '', shoppingStatus: '', - reason: '' + reason: '', + roleList: [], }, - optionType: '' // 1 上架 /下架 2采集 + // resiRoleList:[],//居民端角色 + // govRoleList:[],//工作端角色 + roleList: {},//所有端的角色列表 + roleAllList: [],//所有的角色列表 + roleCheckedArray: [],//选择的角色列表 + checkAll: true,//是否全选 + isIndeterminate: true, + + optionType: '' // 1 上架 /下架 2采集 3权限 } }, @@ -418,6 +467,7 @@ export default { CDialog, ConfigEdit }, mounted () { + this.renderSelData() this.initData(localStorage.getItem('customerId'), localStorage.getItem('customerName')) }, computed: { @@ -435,28 +485,48 @@ export default { tableHeight2 () { return (this.clientHeight - 220) / 2 - 60 }, + dialogHeight () { + return 0.8 + }, + dialogWidth () { + + this.resolution === 'small' ? '40%' : '30%' + }, ...mapGetters(['clientHeight', 'resolution']), - dataRule () { + formRule () { return { - customizedName: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], - functionIcon: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], - functionGroup: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], - shoppingStatus: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], - functionExplain: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + reason: [ + { required: true, message: "请填写理由", trigger: 'blur' } ] + } } }, methods: { + async renderSelData () { + this.startLoading() + const url = "/epmetuser/govstaffrole/resigovrolelist" + // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/govstaffrole/resigovrolelist" + const params = {} + const { data, code, msg } = await requestPost(url, params) + if (code === 0) { + this.roleList = data + this.roleAllList = this.activeName === 'resi' ? data.resiRoleList : data.govRoleList + this.roleAllList.forEach(item => { + this.roleCheckedArray.push(item.roleKey) + }) + + } + this.endLoading() + }, + tabChange (val) { + + if (val.name === 'resi') { + this.roleAllList = this.roleList.resiRoleList + } else { + this.roleAllList = this.roleList.govRoleList + } + }, initData (customerId, customerName) { this.customerId = customerId this.customerName = customerName @@ -531,27 +601,41 @@ export default { this.upOrDownDia.visible = false }, upOrDownDiaOk () { - let url = '' - // const url = '/oper/customize/customerfunctiondetail/updateshoppingstatus' - if (this.optionType === '1') { - // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updateshoppingstatus' - url = '/oper/customize/customerfunctiondetail/updateshoppingstatus' - } else { - // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/customerfunctioncollect' - url = '/oper/customize/customerfunctiondetail/customerfunctioncollect' - } - this.startLoading() + this.$refs['upOrDownForm'].validate((valid, messageObj) => { + if (!valid) { + app.util.validateRule(messageObj) + return false + } + let url = '' + // const url = '/oper/customize/customerfunctiondetail/updateshoppingstatus' + if (this.optionType === '3') { + this.savePermission() + return + } else if (this.optionType === '1') { + // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updateshoppingstatus' + url = '/oper/customize/customerfunctiondetail/updateshoppingstatus' + } else if (this.optionType === '2') { + // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/customerfunctioncollect' + url = '/oper/customize/customerfunctiondetail/customerfunctioncollect' + } + this.startLoading() - window.app.ajax.post(url, this.upOrDownForm, - (data, rspMsg) => { - this.$message.success('操作成功') - this.upOrDownDia.visible = false - this.loadTableData() - }, - (rspMsg, data) => { - this.$message.error(rspMsg) - }) - this.endLoading() + window.app.ajax.post(url, this.upOrDownForm, + (data, rspMsg) => { + + if (this.optionType === '2') { + this.savePermission() + } else { + this.$message.success('操作成功') + } + this.upOrDownDia.visible = false + this.loadTableData() + this.endLoading() + }, + (rspMsg, data) => { + this.$message.error(rspMsg) + }) + }) }, // 编辑 editResiShow (index) { @@ -565,10 +649,93 @@ export default { this.loadTableData() }, + // 设置权限 + showPermission (functionId) { + + this.optionType = '3' + this.upOrDownDia.title = "角色权限" + this.upOrDownForm = { + customerId: this.customerId, + functionId: functionId, + } + this.getPermission() + this.upOrDownDia.visible = true + + }, + //获取权限 + async getPermission () { + this.startLoading() + // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctionrole/customerfunctionrolelist" + const url = "/oper/customize/customerfunctionrole/customerfunctionrolelist" + // this.upOrDownForm.roleList = roleList + + const { data, code, msg } = await requestPost(url, this.upOrDownForm) + + if (code === 0) { + this.roleCheckedArray = [] + data.forEach(item => { + this.roleCheckedArray.push(item.roleKey) + }) + this.endLoading() + } + + }, + //设置权限 + async savePermission () { + this.startLoading() + if (this.roleCheckedArray.length === 0) { + this.$message.warning('所选角色数量必须大于1') + return false + } + this.upOrDownForm.roleList = [] + this.roleAllList.forEach(allItem => { + this.roleCheckedArray.forEach(selItem => { + let obj = {} + if (selItem === allItem.roleKey) { + obj.roleKey = allItem.roleKey + obj.roleName = allItem.roleName + this.upOrDownForm.roleList.push(obj) + + } + }) + }) + this.upOrDownForm.fromApp = this.activeName + console.log(this.upOrDownForm) + const url = "/oper/customize/customerfunctionrole/savecustomerfunctionrole" + // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctionrole/savecustomerfunctionrole" + // this.upOrDownForm.roleList = roleList + + const { data, code, msg } = await requestPost(url, this.upOrDownForm) + if (code === 0) { + this.$message.success('操作成功') + this.upOrDownDia.visible = false + + } else { + this.$message.error(msg) + } + this.endLoading() + }, + handleCheckAllChange (val) { + if (val) { + this.roleAllList.forEach(item => { + this.roleCheckedArray.push(item.roleKey) + }) + } else { + this.roleCheckedArray = [] + } + + this.isIndeterminate = false; + }, + handleCheckedCitiesChange (value) { + let checkedCount = value.length; + this.checkAll = checkedCount === this.roleAllList.length; + this.isIndeterminate = checkedCount > 0 && checkedCount < this.roleAllList.length; + }, + // 采集 addFunction (row) { this.optionType = '2' - this.upOrDownDia.title = '采集原因' + this.upOrDownDia.title = '采集' this.upOrDownForm = { customerId: row.customerId, functionId: row.functionId, diff --git a/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue b/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue index 47922f6..c9160f2 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue @@ -17,6 +17,7 @@ { this.$refs['ref_footbarlist'].doLayout() // 解决表格错位 }) + } else if (this.showType === 'list') { + this.$nextTick(() => { + this.$refs['ref_customertable'].doLayout() // 解决表格错位 + }) + } }, diff --git a/epmet-oper-web/src/views/modules/partner/index.vue b/epmet-oper-web/src/views/modules/partner/index.vue index 6ce808a..d959314 100644 --- a/epmet-oper-web/src/views/modules/partner/index.vue +++ b/epmet-oper-web/src/views/modules/partner/index.vue @@ -1,27 +1,29 @@ @@ -44,7 +46,7 @@ export default { mixins: [], components: { CTable, edit }, - data() { + data () { return { tableUrl: requestUrlPrefix + "/commonservice/externalcustomer/list", // 查询条件 @@ -78,26 +80,30 @@ export default { ], }; }, - + activated () { + this.$nextTick(() => { + this.$refs.table.doLayout() // 解决表格错位 + }) + }, computed: { - tableHeight() { + tableHeight () { return this.clientHeight - 60 - 80 - 80 - 90; }, ...mapGetters(["clientHeight", "env"]), }, - created() { + created () { this.refresh(); }, methods: { // 刷新 - async refresh() { + async refresh () { await nextTick(); this.$refs.table.loadData(); // 获取表格数据 }, // 新增 - addShow() { + addShow () { const row = { customerId: "", customerName: "", @@ -105,16 +111,16 @@ export default { this.$refs["edit"].init(row, "A"); }, // 编辑 - editShow(row) { + editShow (row) { this.$refs["edit"].init(row, "U"); }, - del(row) { + del (row) { this.$message({ type: "error", message: "无法删除,因为没有提供接口", }); }, - editDiaOK() { + editDiaOK () { this.refresh(); }, }, diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue new file mode 100644 index 0000000..9fc8e90 --- /dev/null +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue @@ -0,0 +1,432 @@ + + + + diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue new file mode 100644 index 0000000..0f93e2f --- /dev/null +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue @@ -0,0 +1,278 @@ + + + + + + \ No newline at end of file diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue new file mode 100644 index 0000000..2667cdc --- /dev/null +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue @@ -0,0 +1,242 @@ + + + + From 035c0f4051a931eef5b29f93c67c3c0802037ddc Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 9 Sep 2020 17:04:54 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-oper-web/src/js/dai/config.js | 2 +- .../modules/customer/customize/ConfigItem.vue | 43 +- .../productConfig/subscribe/MyTemp.vue | 368 ++---------------- .../productConfig/subscribe/MyTempList.vue | 221 +++++++++++ .../productConfig/subscribe/TempDetail.vue | 247 ++++++++++++ .../productConfig/subscribe/TempEdit.vue | 162 +++++--- .../productConfig/subscribe/TempList.vue | 78 ++-- 7 files changed, 704 insertions(+), 417 deletions(-) create mode 100644 epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue create mode 100644 epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue diff --git a/epmet-oper-web/src/js/dai/config.js b/epmet-oper-web/src/js/dai/config.js index 6df826c..ace8d46 100644 --- a/epmet-oper-web/src/js/dai/config.js +++ b/epmet-oper-web/src/js/dai/config.js @@ -4,7 +4,7 @@ export const mockUrlPrefix = export const envIsDev = process.env.VUE_APP_NODE_ENV === 'dev' export default { - appid: { + appId: { //开发环境appid devResiAppid: 'wx0301bf7f534d97d1', // 风凌石居民端 devWorkAppid: 'wx2679392c4cc2af22', //风凌石工作端 diff --git a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue index 84190b4..ed486fc 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue @@ -361,7 +361,7 @@ :visible="upOrDownDia.visible" @cancel="upOrDownDiaCancel" @ok="upOrDownDiaOk"> -
+
{ this.roleCheckedArray.push(item.roleKey) }) - this.endLoading() + if (this.roleCheckedArray.length === 0) { + this.checkAll = false + this.isIndeterminate = false + } else if (this.roleCheckedArray.length === this.roleAllList.length) { + this.checkAll = true + this.isIndeterminate = false + } else { + this.checkAll = false + this.isIndeterminate = true + } + + + + } else { + this.$message.error(m) } + this.endLoading() }, //设置权限 async savePermission () { - this.startLoading() + if (this.roleCheckedArray.length === 0) { this.$message.warning('所选角色数量必须大于1') return false } + this.startLoading() this.upOrDownForm.roleList = [] this.roleAllList.forEach(allItem => { this.roleCheckedArray.forEach(selItem => { @@ -727,6 +747,7 @@ export default { this.isIndeterminate = false; }, handleCheckedCitiesChange (value) { + let checkedCount = value.length; this.checkAll = checkedCount === this.roleAllList.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.roleAllList.length; @@ -741,6 +762,12 @@ export default { functionId: row.functionId, reason: '' } + this.roleCheckedArray = [] + this.roleAllList.forEach(item => { + this.roleCheckedArray.push(item.roleKey) + }) + this.checkAll = true + this.isIndeterminate = false this.upOrDownDia.visible = true }, diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue index 9fc8e90..58385bf 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue @@ -4,57 +4,25 @@ - - - + name="resi"> + - - + name="gov"> + - - -
+ diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue new file mode 100644 index 0000000..3395158 --- /dev/null +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue @@ -0,0 +1,247 @@ + + + + + + \ No newline at end of file diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue index 0f93e2f..6c32291 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue @@ -9,13 +9,34 @@
- + -
111
+
+
消息示例
+ +
+ +
+ + + + {{item}}: + + + {{kidSelExampleList[index]}} + + +
+ +
+
- + @@ -45,9 +66,10 @@ :min="1" :max="5">
- {{item}} + {{item}}
@@ -56,12 +78,13 @@
{{item}} -
@@ -105,19 +128,20 @@ export default { visible: false, workAppid: '', resiAppid: '', - tid: '',// dataForm: { appId: '', tid: '', sceneDesc: '', - kidList: [] + kidList: [], + nameList: [] }, kidAllList: [],//全部的关键字对象 kidAllName: [],//全部的关键字name - kidSelNameList: [], - kidSelList2: [], + kidSelNameList: [],//选择的关键字name + kidSelIdList: [],//选择的关键字id + kidSelExampleList: [],//选择的关键字example } }, created () { @@ -129,7 +153,7 @@ export default { this.workAppid = workAppid this.resiAppid = resiAppid this.dataForm.appId = resiAppid - this.tid = row.tid + this.dataForm.tid = row.tid this.visible = true @@ -150,49 +174,81 @@ export default { this.kidAllName.push(item.name) }) + } else { + this.$message.error(msg) } this.endLoading() }, - moveUp () { - + moveUp (index) { + this.kidSelNameList.splice(index - 1, 1, ...this.kidSelNameList.splice(index, 1, this.kidSelNameList[index - 1])) + this.kidSelIdList.splice(index - 1, 1, ...this.kidSelIdList.splice(index, 1, this.kidSelIdList[index - 1])) + this.kidSelExampleList.splice(index - 1, 1, ...this.kidSelExampleList.splice(index, 1, this.kidSelExampleList[index - 1])) + console.log(this.kidSelNameList) + console.log(this.kidSelIdList) + console.log(this.kidSelExampleList) + }, + checkboxChange (val, item, index) { + // debugger + const kid = this.kidAllList[index].kid + const example = this.kidAllList[index].example + if (val) { + this.kidSelIdList.push(kid) + this.kidSelExampleList.push(example) + } else { + this.kidSelIdList = this.kidSelIdList.filter(idItem => idItem !== kid) + this.kidSelExampleList = this.kidSelExampleList.filter(exampleItem => exampleItem !== example) + } + console.log("kidSelIdList") + console.log(this.kidSelIdList) + console.log("kidSelExampleList") + console.log(this.kidSelExampleList) }, - saveForm () { - this.$refs['dataForm'].validate((valid, messageObj) => { - - if (!valid) { - app.util.validateRule(messageObj) - } else { - - let url = '' - if (this.type === 'U') { - url = '/oper/customize/customerfootbar/updatefootbar' - // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/updatefootbar' - } else { - // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/createfootbar' - url = '/oper/customize/customerfootbar/createfootbar' - this.dataForm.id = '' - this.dataForm.customerId = 'default' - } - window.app.ajax.post(url, this.dataForm, - (data, rspMsg) => { - this.$message({ - type: 'success', - message: '保存成功' - }) - this.$emit('editDiaOK') - this.visible = false - }, - (rspMsg, data) => { - this.endLoading() - this.$message.error(rspMsg) - }) - } - }) + async saveForm () { + if (this.kidSelIdList.length === 0) { + this.$message.warning('请选择至少一个关键词') + return false + } + if (this.dataForm.sceneDesc === '') { + this.$message.warning('请填写场景描述') + return false + } + const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/addtemplate' + // const url = '/third/subscribe/addtemplate' + this.dataForm.kidList = this.kidSelIdList + this.dataForm.nameList = this.kidSelNameList + + const { data, code, msg } = await requestPost(url, this.dataForm) + if (code === 0) { + let clientType = this.dataForm.appId === this.resiAppid ? 'resi' : 'gov' + this.$emit('editDiaOK', clientType) + this.handleClose() + } else { + this.$message.error(msg) + } + + }, handleClose () { + this.resetData() this.visible = false }, + //重置数据 + resetData () { + this.dataForm = { + appId: '', + tid: '', + sceneDesc: '', + kidList: [], + nameList: [] + } + + this.kidAllList = []//全部的关键字对象 + this.kidAllName = []//全部的关键字name + this.kidSelNameList = []//选择的关键字name + this.kidSelIdList = []//选择的关键字id + this.kidSelExampleList = []//选择的关键字example + }, // 开启加载动画 startLoading () { @@ -229,13 +285,14 @@ export default { return this.resolution === 'small' ? 80 : 70 }, diaTop () { - return this.resolution === 'small' ? '30px' : '100px' + return this.resolution === 'small' ? '20px' : '100px' }, formHeight () { return this.clientHeight * 0.6 }, rowHeight () { return (this.formHeight - 70) + 'px' + }, ...mapGetters(['clientHeight', 'resolution']), }, @@ -274,5 +331,14 @@ export default { float: right; margin-right: 10px; } + +.div_left { + margin: 20px 0 0 0; +} +.div_left_item { + background-color: white; + margin: 0 0 10px 0; + padding: 0 0 0 10px; +} \ No newline at end of file diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue index 2667cdc..0dc8bb9 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue @@ -22,11 +22,16 @@ header-align="left" :min-width="100" align="left"> - + { if (this.activeName === 'mine') { - // this.$refs['table_work'].doLayout() // 解决表格错位 + this.$refs.ref_mytemp.doLayout() // 解决表格错位 } else if (this.activeName === 'public') { this.$refs.ref_publictable.doLayout() // 解决表格错位 } @@ -145,16 +144,35 @@ export default { methods: { //加载列表数据 - loadData () { + async loadData () { + this.dataListLoading = true + const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getpubtemplatetitles' + // const url = '/third/subscribe/getpubtemplatetitles' + + this.tableParams.appId = this.workAppid + this.tableParams.ids = '794' + const { data, code, msg } = await requestPost(url, this.tableParams) + if (code === 0) { + this.total = data.total + this.dataList = data.list + this.dataList.forEach(element => { + element.typeShow = element.type === 2 ? '一次性订阅' : '长期订阅' + element.keywordsShow = element.keywords.join() + }) + } else { + this.$message.error(msg) + } + this.dataListLoading = false }, - tabClick (tab) { - if (tab.name === 'mine') { + tabClick () { + if (this.activeName === 'mine') { + this.$refs['ref_mytemp'].init(this.workAppid, this.resiAppid) } - if (tab.name === 'public') { - + if (this.activeName === 'public') { + this.loadData() } }, @@ -167,8 +185,10 @@ export default { diaCancel () { this.$emit('cancleBack') }, - editDiaOK () { - this.refresh() + editDiaOK (clientType) { + this.activeName = 'mine' + this.$refs['ref_mytemp'].init(this.workAppid, this.resiAppid, clientType) + }, editDiaCancel () { From e6c2971bbb2b5212fea133b7c4bf7084703b5599 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 9 Sep 2020 17:05:06 +0800 Subject: [PATCH 04/11] 11 --- .../src/views/modules/productConfig/subscribe/TempDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue index 3395158..092e27d 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue @@ -149,7 +149,7 @@ export default { let oneArray = element.split(':') let obj = Object obj.title = oneArray[0] - obj.content = oneArray[1s] + obj.content = oneArray[1] }) this.dataForm.exampleArray = console.log(this.dataForm.exampleArray) From 86f5808fcc414b64a74c61523d7036089508c8c1 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 11 Sep 2020 09:05:41 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-oper-web/.env.development | 4 +- .../js/columns/customer/manage/customer.js | 2 +- .../src/views/components/CTable.vue | 60 ++++---- .../src/views/components/CTableNoPage.vue | 12 +- .../modules/customer/customize/ConfigItem.vue | 1 + .../modules/customer/manage/CustomerInfo.vue | 2 +- .../miniProAgent/version/CommitForm.vue | 6 +- .../productConfig/subscribe/MyTemp.vue | 54 ++++---- .../productConfig/subscribe/MyTempList.vue | 35 ++--- .../productConfig/subscribe/TempDetail.vue | 128 +++++++++++------- .../productConfig/subscribe/TempEdit.vue | 35 +++-- .../productConfig/subscribe/TempList.vue | 40 ++++-- epmet-oper-web/src/views/pages/loginWork.vue | 2 +- 13 files changed, 220 insertions(+), 161 deletions(-) diff --git a/epmet-oper-web/.env.development b/epmet-oper-web/.env.development index 91d7451..eabfef7 100644 --- a/epmet-oper-web/.env.development +++ b/epmet-oper-web/.env.development @@ -1,5 +1,5 @@ NODE_ENV=development -VUE_APP_API_SERVER = http://192.168.1.130:8080/api -# VUE_APP_API_SERVER = http://10.10.10.207:8080/api +# VUE_APP_API_SERVER = http://192.168.1.130:8080/api +VUE_APP_API_SERVER = http://10.10.10.50:8080/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api VUE_APP_NODE_ENV=dev \ No newline at end of file diff --git a/epmet-oper-web/src/js/columns/customer/manage/customer.js b/epmet-oper-web/src/js/columns/customer/manage/customer.js index 97924dc..38fb175 100644 --- a/epmet-oper-web/src/js/columns/customer/manage/customer.js +++ b/epmet-oper-web/src/js/columns/customer/manage/customer.js @@ -77,7 +77,7 @@ export default { }, { key: 'rootManageName', - title: '根管理员', + title: '超级管理员', display: ['table', 'model'], type: 'input', rule: [ diff --git a/epmet-oper-web/src/views/components/CTable.vue b/epmet-oper-web/src/views/components/CTable.vue index a20538c..b905e31 100644 --- a/epmet-oper-web/src/views/components/CTable.vue +++ b/epmet-oper-web/src/views/components/CTable.vue @@ -67,7 +67,8 @@ :fit=" col.fill?col.fill:'fill'"> -- - + + @@ -137,7 +138,7 @@ export default { table: { height: this.tableHeight, params: { - pageSize: this.pageSize, // 当前页数显示记录数 + pageSize: Number, // 当前页数显示记录数 pageNo: this.pageNo // 当前页数 } }, @@ -150,7 +151,7 @@ export default { watch: { tableHeight (height) { this.table.height = height - } + }, }, props: { keyword: { @@ -188,10 +189,7 @@ export default { type: Number, default: 1 }, - pageSize: { - type: Number, - default: 10 - }, + tableHeight: { type: Number }, @@ -206,23 +204,30 @@ export default { }, computed: { - // 操作列宽度 - // operationWidth: () => { - // return 120 - // // if (this.operations.includes('add')) { - // // return (this.operations.length - 1) * 80 // 操作列包含add类型按钮时返回 - // // } else if (this.operations.includes('analyze')) { - // // return (this.operations.length + 0.5) * 80 // 操作列包含analyze类型按钮时返回 - // // } else { - // // return this.operations.length * 140 - // // } - // }, - tableSize () { - if (this.resolution === 'small') { - return 10 - } else { - return 20 + + pageSize: { + + //getter 方法 + get () { + if (this.resolution === 'small') { + this.table.params.pageSize = 10 + + return 10 + } else { + this.table.params.pageSize = 20 + return 20 + } + }, + //setter 方法 + set (newValue) { + + console.log('computed setter...') + this.table.params.pageSize = newValue + // return newValue } + + + }, tablePageSizes () { if (this.resolution === 'small') { @@ -248,13 +253,14 @@ export default { }) Object.assign(this.table.params, this.params) + console.log(this.table.params) // 获取数据 window.app.ajax.post( this.url, this.table.params, (data, rspMsg) => { if (data) { - // debugger + this.tableData = data.list this.total = data.total } @@ -307,8 +313,10 @@ export default { scope._self.$refs[`popover-${scope.$index}`].doClose() }, handleSizeChange (pageSize) { + this.table.params.pageSize = pageSize - this.table.params.pageNo = 0 + + this.table.params.pageNo = 1 this.$nextTick(() => { this.loadData() }) diff --git a/epmet-oper-web/src/views/components/CTableNoPage.vue b/epmet-oper-web/src/views/components/CTableNoPage.vue index 10a0d72..cc38a03 100644 --- a/epmet-oper-web/src/views/components/CTableNoPage.vue +++ b/epmet-oper-web/src/views/components/CTableNoPage.vue @@ -66,7 +66,8 @@ class="function-icon" :fit=" col.fill?col.fill:'fill'"> - + + - + @@ -92,14 +91,15 @@ export default { init (appId) { this.appId = appId + this.loadData() }, //加载列表数据 async loadData () { this.dataListLoading = true - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/gettemplate' - // const url = '/third/subscribe/gettemplate' + // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/gettemplate' + const url = '/third/subscribe/gettemplate' const params = { appId: this.appId } @@ -115,12 +115,9 @@ export default { }, // 刷新 - refresh () { - if (this.activeName === 'gov') { - this.loadWorkTableData() // 获取表格数据 - } else if (this.activeName === 'resi') { - this.loadResiTableData() // 获取表格数据 - } + refreshTable (appId) { + this.appId = appId + this.loadData() }, // 详情 @@ -143,8 +140,8 @@ export default { async del (row) { this.startLoading() - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/deltemplate' - // const url = '/third/subscribe/deltemplate' + // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/deltemplate' + const url = '/third/subscribe/deltemplate' const params = { appId: this.appId, priTmplId: row.priTmplId @@ -153,26 +150,14 @@ export default { const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.$message.success('删除成功') + this.loadData() } else { this.$message.error(msg) } this.endLoading() }, - // 取消 - diaCancel () { - this.$emit('cancleBack') - }, - editDiaOK () { - this.refresh() - }, - editDiaCancel () { - - }, - async renderSelData () { // 渲染下拉框/单选框/复选框等数据 - - }, // 开启加载动画 startLoading () { diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue index 092e27d..f9c8649 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempDetail.vue @@ -17,20 +17,20 @@
- +
+ + + + {{item.title}} + + + {{item.content}} + + +
@@ -39,58 +39,70 @@ -
+
- 模板ID + 模板ID - {{dataForm.priTmplId}} + {{dataForm.priTmplId}}
-
+
- 标题 + 标题 - {{dataForm.title}} + {{dataForm.title}}
-
+
- 类目 + 类目 - {{'社区/论坛'}} + {{'社区/论坛'}}
-
+
- 详细内容 + 详细内容 - {{dataForm.content}} +
+ + + {{item.title}} + + + {{item.content}} + + +
+
-
+
- 场景说明 + 场景说明 - {{dataForm.sceneDesc}} + {{dataForm.sceneDesc}}
@@ -120,14 +132,15 @@ export default { priTmplId: '', title: '', content: '', - contentShow: [], example: '', - exampleArray: [], type: '', kidNames: '', - kidNamesArray: [], sceneDesc: '' - } + }, + + exampleArray: [], + contentArray: [], + kidNamesArray: [], } }, created () { @@ -144,15 +157,28 @@ export default { }, loadData () { + //左侧示例解析 + this.exampleArray = [] let array = this.dataForm.example.split('\\n') - array.forEach(element => { - let oneArray = element.split(':') - let obj = Object + for (let i = 0; i < array.length - 1; i++) { + let oneArray = array[i].split(':') + let obj = {} obj.title = oneArray[0] obj.content = oneArray[1] - }) - this.dataForm.exampleArray = - console.log(this.dataForm.exampleArray) + this.exampleArray.push(obj) + } + + //右侧详细内容解析 + + this.contentArray = [] + let arrayContent = this.dataForm.content.split('\\n') + for (let i = 0; i < arrayContent.length - 1; i++) { + let oneArray = arrayContent[i].split(':') + let obj = {} + obj.title = oneArray[0] + obj.content = oneArray[1] + this.contentArray.push(obj) + } }, handleClose () { @@ -181,7 +207,7 @@ export default { computed: { diaWidth () { - return this.resolution === 'small' ? 80 : 70 + return this.resolution === 'small' ? 70 : 60 }, diaTop () { return this.resolution === 'small' ? '20px' : '100px' @@ -221,18 +247,18 @@ export default { margin: 10px 10px; font-size: 18px; } +.padding_10 { + padding-left: 10px; +} .div_left { - margin: 20px 20px 20px 20px; + margin: 40px 20px 20px 20px; } .div_left_item { background-color: white; margin: 0 0 10px 0; - padding: 0 0 0 10px; } -.div_left_item_total { - margin: 10px 0 10px 20px; - +.span_left_item_title { color: rgb(121, 121, 121); font-size: 15px; } @@ -240,7 +266,17 @@ export default { color: rgb(31, 31, 31); font-size: 15px; } -.span_left_item_title { + +.div_right_item_total { + margin: 10px 0 10px 20px; +} +.span_right_item_content { + color: rgb(31, 31, 31); + font-size: 15px; +} +.span_right_item_title { + color: rgb(121, 121, 121); + font-size: 15px; padding-left: 40px; } diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue index 6c32291..e8c69fd 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue @@ -132,6 +132,8 @@ export default { dataForm: { appId: '', tid: '', + title: '', + type: Number, sceneDesc: '', kidList: [], nameList: [] @@ -154,6 +156,8 @@ export default { this.resiAppid = resiAppid this.dataForm.appId = resiAppid this.dataForm.tid = row.tid + this.dataForm.type = row.type + this.dataForm.title = row.title this.visible = true @@ -162,12 +166,13 @@ export default { }, async getkeywords () { this.startLoading() - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getkeywords' - // const url = '/third/subscribe/getkeywords' + // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getkeywords' + const url = '/third/subscribe/getkeywords' let _data = { - appId: this.appId + appId: this.resiAppid, + titleId: this.dataForm.tid } - const { data, code, msg } = await requestPost(url, _data) + const { data, code, msg, internalMsg } = await requestPost(url, _data) if (code === 0) { this.kidAllList = data this.kidAllList.forEach(item => { @@ -175,7 +180,7 @@ export default { }) } else { - this.$message.error(msg) + this.$message.error(msg + ":" + internalMsg) } this.endLoading() }, @@ -183,9 +188,9 @@ export default { this.kidSelNameList.splice(index - 1, 1, ...this.kidSelNameList.splice(index, 1, this.kidSelNameList[index - 1])) this.kidSelIdList.splice(index - 1, 1, ...this.kidSelIdList.splice(index, 1, this.kidSelIdList[index - 1])) this.kidSelExampleList.splice(index - 1, 1, ...this.kidSelExampleList.splice(index, 1, this.kidSelExampleList[index - 1])) - console.log(this.kidSelNameList) - console.log(this.kidSelIdList) - console.log(this.kidSelExampleList) + // console.log(this.kidSelNameList) + // console.log(this.kidSelIdList) + // console.log(this.kidSelExampleList) }, checkboxChange (val, item, index) { // debugger @@ -198,10 +203,10 @@ export default { this.kidSelIdList = this.kidSelIdList.filter(idItem => idItem !== kid) this.kidSelExampleList = this.kidSelExampleList.filter(exampleItem => exampleItem !== example) } - console.log("kidSelIdList") - console.log(this.kidSelIdList) - console.log("kidSelExampleList") - console.log(this.kidSelExampleList) + // console.log("kidSelIdList") + // console.log(this.kidSelIdList) + // console.log("kidSelExampleList") + // console.log(this.kidSelExampleList) }, async saveForm () { @@ -213,11 +218,11 @@ export default { this.$message.warning('请填写场景描述') return false } - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/addtemplate' - // const url = '/third/subscribe/addtemplate' + // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/addtemplate' + const url = '/third/subscribe/addtemplate' this.dataForm.kidList = this.kidSelIdList this.dataForm.nameList = this.kidSelNameList - + console.log(this.dataForm) const { data, code, msg } = await requestPost(url, this.dataForm) if (code === 0) { let clientType = this.dataForm.appId === this.resiAppid ? 'resi' : 'gov' diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue index 0dc8bb9..7b22cc9 100644 --- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue +++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue @@ -86,12 +86,12 @@ export default { resiAppid: '', //分页 - pageNo: 0, + pageNo: 1, pageSize: 10, total: 0, tableParams: { - pageNo: 0, + pageNo: 1, pageSize: 10 }, @@ -146,10 +146,10 @@ export default { //加载列表数据 async loadData () { this.dataListLoading = true - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getpubtemplatetitles' - // const url = '/third/subscribe/getpubtemplatetitles' + // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getpubtemplatetitles' + const url = '/third/subscribe/getpubtemplatetitles' - this.tableParams.appId = this.workAppid + this.tableParams.appId = this.resiAppid this.tableParams.ids = '794' const { data, code, msg } = await requestPost(url, this.tableParams) @@ -166,13 +166,35 @@ export default { this.dataListLoading = false }, + loadData2 () { + this.total = 10 + this.dataList = [ + { + "tid": 484, + "title": "新的评论提醒", + "type": 2, + "categoryId": + "794", + "keywords": ["文章标题", "评论内容", "评论时间", "取消提醒", "评论用户", "帖子内容", "评论类型", "评论人数", "备注"] + }, + { "tid": 523, "title": "评论成功提醒", "type": 2, "categoryId": "794", "keywords": ["时间", "评论人", "温馨提示"] }, { "tid": 529, "title": "便民信息审核结果通知", "type": 2, "categoryId": "794", "keywords": ["审核结果", "审核人员", "联系电话", "审核时间", "拒绝理由"] }, { "tid": 569, "title": "签到提醒", "type": 2, "categoryId": "794", "keywords": ["签到人", "签到时间", "活动名称", "温馨提示", "连续签到", "待领奖励", "累计签到"] }, { "tid": 572, "title": "活动成功通知", "type": 2, "categoryId": "794", "keywords": ["活动标题", "完成时间", "参与人数", "执行情况"] }, { "tid": 577, "title": "挑战开始提醒", "type": 2, "categoryId": "794", "keywords": ["挑战名称", "开始时间", "结束时间", "挑战目标", "奖金池"] }, { "tid": 579, "title": "动态点赞通知", "type": 2, "categoryId": "794", "keywords": ["点赞用户", "点赞时间", "帖子标题", "被赞次数", "温馨提示", "帖子内容", "动态标题", "动态内容"] }, { "tid": 688, "title": "挑战结果通知", "type": 2, "categoryId": "794", "keywords": ["挑战名称", "挑战结果", "当前排名", "挑战项目", "挑战时间", "奖励信息", "备注"] }, { "tid": 696, "title": "新的回复提醒", "type": 2, "categoryId": "794", "keywords": ["留言主题", "回复内容", "回复时间", "留言分区", "取消提醒", "用户"] }, { "tid": 726, "title": "审核通过提醒", "type": 2, "categoryId": "794", "keywords": ["审核结果", "帖子主题", "会员昵称", "通过时间", "备注", "活动名称", "活动时间", "组队发起人", "报名时间", "申请方"] } + ] + this.dataList.forEach(element => { + element.typeShow = element.type === 2 ? '一次性订阅' : '长期订阅' + element.keywordsShow = element.keywords.join() + }) + }, + tabClick () { if (this.activeName === 'mine') { this.$refs['ref_mytemp'].init(this.workAppid, this.resiAppid) } if (this.activeName === 'public') { - this.loadData() + if (this.dataList.length === 0) { + this.loadData2() + } + } }, @@ -187,7 +209,7 @@ export default { }, editDiaOK (clientType) { this.activeName = 'mine' - this.$refs['ref_mytemp'].init(this.workAppid, this.resiAppid, clientType) + this.$refs['ref_mytemp'].refreshTable(clientType) }, editDiaCancel () { @@ -196,14 +218,14 @@ export default { handleSizeChange (pageSize) { this.tableParams.pageSize = pageSize - this.tableParams.pageNo = 0 + this.tableParams.pageNo = 1 this.$nextTick(() => { this.loadData() }) }, // 改变当前页 handleCurrentChange (pageNo) { - this.tableParams.pageNo = pageNo - 1 + this.tableParams.pageNo = pageNo this.$nextTick(() => { this.loadData() }) diff --git a/epmet-oper-web/src/views/pages/loginWork.vue b/epmet-oper-web/src/views/pages/loginWork.vue index d155329..d294254 100644 --- a/epmet-oper-web/src/views/pages/loginWork.vue +++ b/epmet-oper-web/src/views/pages/loginWork.vue @@ -318,7 +318,7 @@ export default { float: left; } .span_name { - font-size: 20px; + font-size: 18px; cursor: pointer; /* color: rgb(37, 156, 235); */ float: left; From d27d085229978df9ecb56a248e7aa733a92b63a5 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 14 Sep 2020 09:04:08 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-oper-web/.env.development | 2 +- .../modules/customer/customize/ConfigItem.vue | 13 +- .../modules/customer/init/RegisterList.vue | 259 ++++++++++++++++-- .../src/views/modules/partner/app/edit.vue | 4 +- .../productConfig/subscribe/MyTempList.vue | 8 +- .../productConfig/subscribe/TempEdit.vue | 4 +- .../productConfig/subscribe/TempList.vue | 131 ++++++--- 7 files changed, 356 insertions(+), 65 deletions(-) diff --git a/epmet-oper-web/.env.development b/epmet-oper-web/.env.development index eabfef7..1706469 100644 --- a/epmet-oper-web/.env.development +++ b/epmet-oper-web/.env.development @@ -1,5 +1,5 @@ NODE_ENV=development # VUE_APP_API_SERVER = http://192.168.1.130:8080/api -VUE_APP_API_SERVER = http://10.10.10.50:8080/api +VUE_APP_API_SERVER = http://10.10.10.17:8080/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api VUE_APP_NODE_ENV=dev \ No newline at end of file diff --git a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue index 6c04b78..a8101f1 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue @@ -508,14 +508,15 @@ export default { const url = "/epmetuser/govstaffrole/resigovrolelist" // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/govstaffrole/resigovrolelist" const params = {} - const { data, code, msg } = await requestPost(url, params) + const { data, code, msg, internalMsg } = await requestPost(url, params) if (code === 0) { this.roleList = data this.roleAllList = this.activeName === 'resi' ? data.resiRoleList : data.govRoleList this.roleAllList.forEach(item => { this.roleCheckedArray.push(item.roleKey) }) - + } else { + this.$message.error(msg + ":" + internalMsg) } this.endLoading() }, @@ -673,7 +674,7 @@ export default { const url = "/oper/customize/customerfunctionrole/customerfunctionrolelist" // this.upOrDownForm.roleList = roleList - const { data, code, msg } = await requestPost(url, this.upOrDownForm) + const { data, code, msg, internalMsg } = await requestPost(url, this.upOrDownForm) if (code === 0) { this.roleCheckedArray = [] @@ -695,7 +696,7 @@ export default { } else { - this.$message.error(m) + this.$message.error(msg + ":" + internalMsg) } this.endLoading() @@ -726,13 +727,13 @@ export default { // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctionrole/savecustomerfunctionrole" // this.upOrDownForm.roleList = roleList - const { data, code, msg } = await requestPost(url, this.upOrDownForm) + const { data, code, msg, internalMsg } = await requestPost(url, this.upOrDownForm) if (code === 0) { this.$message.success('操作成功') this.upOrDownDia.visible = false } else { - this.$message.error(msg) + this.$message.error(msg + ":" + internalMsg) } this.endLoading() }, diff --git a/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue b/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue index f330d24..e54e2d2 100644 --- a/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue +++ b/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue @@ -26,7 +26,8 @@ :tableHeight="tableHeight" @init="init" @delete="del" - @showToken="showToken"> + @showToken="showToken" + @showSubscribe="showSubscribe">
@@ -45,36 +46,132 @@
- {{tokenForm.customerName}}
+ {{tokenForm.customerName}} +
- {{tokenForm.componentAccessToken}}
+ {{tokenForm.componentAccessToken}} +
- {{tokenForm.workAuthorizerToken}}
+ {{tokenForm.workAuthorizerToken}} +
- {{tokenForm.resiAuthorizerToken}}
+ {{tokenForm.resiAuthorizerToken}} +
+ + +
+
+ + 同步默认订阅消息 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+