diff --git a/epmet-oper-web/src/App.vue b/epmet-oper-web/src/App.vue index 89fa5d2..20a9614 100644 --- a/epmet-oper-web/src/App.vue +++ b/epmet-oper-web/src/App.vue @@ -80,6 +80,7 @@ export default { Vue.prototype.$ELEMENT = { size: 'medium', zIndex: 3000 } } + window.onresize = () => { return (() => { if (!that.timer) { diff --git a/epmet-oper-web/src/assets/scss/variables.scss b/epmet-oper-web/src/assets/scss/variables.scss index 81814d1..171d572 100644 --- a/epmet-oper-web/src/assets/scss/variables.scss +++ b/epmet-oper-web/src/assets/scss/variables.scss @@ -12,11 +12,16 @@ $sidebar--text-color-dark: #8a979e; $sidebar--menu-item-height: 48px; // Content -$content--padding: 15px; +$content--padding: 10px; $content--background-color: #f1f4f5; $content--card-header-height: 60px; $content--tabs-header-height: 38px; // Content, 填充整屏高度(非tabs状态) = 整屏高度 - 导航条高度 - aui-content上下内边距高度 -$content--fill-height: calc(100vh - #{$navbar--height} - #{$content--padding * 2}); +$content--fill-height: calc( + 100vh - #{$navbar--height} - #{$content--padding * 2} +); // Content, 填充整屏高度(是tabs状态) = 整屏高度 - 导航条高度 - tabs组件header高度 - tabs组件content上下内边距高度 -$content--fill-height-tabs: calc(100vh - #{$navbar--height} - #{$content--tabs-header-height} - #{$content--padding * 2}); +$content--fill-height-tabs: calc( + 100vh - #{$navbar--height} - #{$content--tabs-header-height} - #{$content--padding * + 2} +); diff --git a/epmet-oper-web/src/js/columns/columns.js b/epmet-oper-web/src/js/columns/columns.js index 7526a94..0803124 100644 --- a/epmet-oper-web/src/js/columns/columns.js +++ b/epmet-oper-web/src/js/columns/columns.js @@ -10,6 +10,9 @@ import Category from './code/category' // 产品配置 import CustomizedFunction from './miniPro/customizedFunction' +import FootBar from './productConfig/footBar' + +//外部客户 import partner from './miniPro/partner' import partnerApp from './miniPro/partnerApp' @@ -25,10 +28,12 @@ export default { OperHistory: OperHistory, // 客户管理——代小程序管理——版本管理——操作历史 Category: Category, // 客户管理——代小程序管理——类目 - // 小程序管理 - CustomizedFunction: CustomizedFunction, // 定制功能 + FootBarCustomize: FootBar['customize'], // 客户定制化——FootBar配置 + + CustomizedFunction: CustomizedFunction, // 产品配置——定制功能 + FootBar: FootBar['default'], // 产品配置——FootBar配置 // 外部客户 partnerApp, // 外部客户 partner // 外部客户应用 -} \ 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 b690b62..97924dc 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/js/columns/productConfig/footBar.js b/epmet-oper-web/src/js/columns/productConfig/footBar.js new file mode 100644 index 0000000..7c7123c --- /dev/null +++ b/epmet-oper-web/src/js/columns/productConfig/footBar.js @@ -0,0 +1,132 @@ +export default { + default: [ + { + key: 'barKey', + title: 'Key', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 80 + }, + { + key: 'barName', + title: '导航栏名称', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 80 + }, + { + key: 'pageTitle', + title: '页面标题', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 120 + }, + { + key: 'iconPath', + title: '图标', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: 100, + width: 120, + tableType: 'image', + imgWidth: '50px', + imgHeight: '50px' + }, + { + key: 'selectedIconPath', + title: '选中图标', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 100, + tableType: 'image', + imgWidth: '50px', + imgHeight: '50px' + }, + { + key: 'display', + title: '状态', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 80, + format: (cellValue, index) => { + if (cellValue === 0) { + return '隐藏' + } else if (cellValue === 1) { + return '显示' + } else { + return '未知' + } + } + } + ], + customize: [ + { + key: 'defaultName', + title: '默认导航栏名称', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 80 + }, + { + key: 'barName', + title: '导航栏名称', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 80 + }, + { + key: 'pageTitle', + title: '页面标题', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 120 + }, + { + key: 'iconPath', + title: '图标', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: 100, + width: 120, + tableType: 'image', + imgWidth: '50px', + imgHeight: '50px' + }, + { + key: 'selectedIconPath', + title: '选中图标', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 100, + tableType: 'image', + imgWidth: '50px', + imgHeight: '50px' + }, + { + key: 'display', + title: '状态', + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 80, + format: (cellValue, index) => { + if (cellValue === 0) { + return '隐藏' + } else if (cellValue === 1) { + return '显示' + } else { + return '未知' + } + } + } + ] +} diff --git a/epmet-oper-web/src/views/components/CForm.vue b/epmet-oper-web/src/views/components/CForm.vue index 6a8f672..b21b1ee 100644 --- a/epmet-oper-web/src/views/components/CForm.vue +++ b/epmet-oper-web/src/views/components/CForm.vue @@ -525,9 +525,16 @@ export default { this.model = window.app.service.getModel(this.keyWord) }, validate (callback) { - this.$refs['form'].validate((valid) => { + this.$refs['form'].validate((valid, messageObj) => { if (!valid) { - this.$message.error('表单验证失败!') + let message = '' + for (var oneObj in messageObj) { + + message = message + (messageObj[oneObj])[0].message + ' \n ' + } + + this.$message.error(message) + } else { if (typeof callback === 'function') callback(valid) } diff --git a/epmet-oper-web/src/views/components/CTableNoPage.vue b/epmet-oper-web/src/views/components/CTableNoPage.vue index 404058a..45e86b6 100644 --- a/epmet-oper-web/src/views/components/CTableNoPage.vue +++ b/epmet-oper-web/src/views/components/CTableNoPage.vue @@ -37,7 +37,7 @@ + + + + - + + + + @@ -140,17 +184,27 @@ export default { return [{}] } }, + orderOperations: { + type: Array, + default () { + return [{}] + } + }, tableHeight: { type: Number }, pageVisible: Boolean // 是否显示page分页 lyx 20190411 }, + activated () { + // debugger + // this.$nextTick(() => { + // this.$refs.table.doLayout() // 解决表格错位 + // }) + }, computed: { // 操作列宽度 - operationWidth: function () { - // return this.operations.includes('add') - // ? (this.operations.length - 1) * 80 - // : this.operations.length * 80 + operationWidth: function() { + if (this.operations.includes('add')) { return (this.operations.length - 1) * 80 // 操作列包含add类型按钮时返回 } else if (this.operations.includes('analyze')) { @@ -159,6 +213,13 @@ export default { return this.operations.length * 80 } }, + // 移动操作列宽度 + orderOperationWidth: function() { + + + return this.orderOperations.length * 50 + + }, ...mapGetters(['resolution']) }, methods: { @@ -166,6 +227,7 @@ export default { this.loadData() }, loadData () { + this.$refs.table.doLayout() // 解决表格错位 this.templateRadio = '' this.loading = true Object.keys(this.params).forEach(key => { @@ -181,6 +243,7 @@ export default { (data, rspMsg) => { if (data) { this.tableData = data + } this.loading = false }, @@ -256,8 +319,13 @@ export default { handleMethod (index, row, methodName) { this.handleClearSelection() this.$refs['table'].toggleRowSelection(row, true) - this.$emit(methodName, row) + this.$emit(methodName, row, index) + }, + getTableData () { + return this.tableData } + + } } diff --git a/epmet-oper-web/src/views/main-content.vue b/epmet-oper-web/src/views/main-content.vue index 3c85a63..174cd4d 100644 --- a/epmet-oper-web/src/views/main-content.vue +++ b/epmet-oper-web/src/views/main-content.vue @@ -34,7 +34,8 @@ frameborder="0" scrolling="yes"> - + @@ -56,12 +57,16 @@ export default { } }, methods: { + changeCustomerName (customerName) { + this.$emit('changeCustomerName', customerName) + }, // tabs, 是否通过iframe展示 tabIsIframe (url) { return isURL(url) }, // tabs, 选中tab tabSelectedHandle (tab) { + alert(111) tab = this.$store.state.contentTabs.filter(item => item.name === tab.name)[0] if (tab) { this.$router.push({ diff --git a/epmet-oper-web/src/views/main-navbar.vue b/epmet-oper-web/src/views/main-navbar.vue index d1fa10f..038b406 100644 --- a/epmet-oper-web/src/views/main-navbar.vue +++ b/epmet-oper-web/src/views/main-navbar.vue @@ -96,7 +96,10 @@ export default { data () { return { i18nMessages: messages, - updatePassowrdVisible: false + updatePassowrdVisible: false, + customerName: localStorage.getItem('customerName') + + } }, components: { @@ -107,13 +110,12 @@ export default { return localStorage.getItem('userType') }, - customerName () { - // console.log(localStorage.getItem('userType')) - return localStorage.getItem('customerName') - } }, methods: { + changeCustomerName (customerName) { + this.customerName = localStorage.getItem('customerName') + }, // 全屏 fullscreenHandle () { if (!screenfull.enabled) { diff --git a/epmet-oper-web/src/views/main-sidebar.vue b/epmet-oper-web/src/views/main-sidebar.vue index 4c6de80..c88a7c6 100644 --- a/epmet-oper-web/src/views/main-sidebar.vue +++ b/epmet-oper-web/src/views/main-sidebar.vue @@ -26,7 +26,6 @@ export default { }, created () { this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList'] - console.log(this.$store.state.sidebarMenuList) } } diff --git a/epmet-oper-web/src/views/main.vue b/epmet-oper-web/src/views/main.vue index 13d2102..65888a5 100644 --- a/epmet-oper-web/src/views/main.vue +++ b/epmet-oper-web/src/views/main.vue @@ -3,10 +3,11 @@ :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]"> @@ -70,6 +71,10 @@ export default { computed: { }, methods: { + changeCustomerName (customerName) { + this.$refs['ref_navbar'].changeCustomerName(customerName) + + }, // 窗口改变大小 windowResizeHandle () { this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false diff --git a/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue index fbde498..7292618 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue @@ -1,6 +1,7 @@ + + diff --git a/epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue b/epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue new file mode 100644 index 0000000..db0423d --- /dev/null +++ b/epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue @@ -0,0 +1,321 @@ + + + + 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 ef3971e..26bb2c3 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue @@ -539,7 +539,6 @@ export default { return this.cptList.filter(item => this.checkCptRegion(item) === 'ban') }, cntCptList () { - console.log('cntCpt发生了变化') let arr = this.cptList.filter(item => this.checkCptRegion(item) === 'cnt') arr.sort((f, s) => f.displayOrder - s.displayOrder) return arr 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 40c1242..f60ad49 100644 --- a/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue +++ b/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue @@ -31,7 +31,7 @@
+ +
+ {{tokenForm.customerName}}
+
@@ -205,32 +210,38 @@ export default { //删除客户,开发和体验服显示 del (row) { - this.startLoading() - const url = 'https://epmet-cloud.elinkservice.cn/third/pacustomer/deletepubliccustomer' - const param = { - customerId: row.customerId, - source: this.env - } - window.app.ajax.post( - url, - param, - (data, rspMsg) => { - this.endLoading() - this.$message.success('删除成功') - this.loadData() - // eslint-disable-next-line - }, - (rspMsg, data) => { - this.endLoading() - this.$message.error(rspMsg) + this.$confirm('确认删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.startLoading() + const url = 'https://epmet-cloud.elinkservice.cn/api/third/pacustomer/deletepubliccustomer' + const param = { + customerId: row.customerId, + source: this.env } - ) + window.app.ajax.post( + url, + param, + (data, rspMsg) => { + this.endLoading() + this.$message.success('删除成功') + this.loadData() + // eslint-disable-next-line + }, + (rspMsg, data) => { + this.endLoading() + this.$message.error(rspMsg) + } + ) + }) }, //获取token,开发和体验服显示 showToken (row) { this.startLoading() - const url = 'https://epmet-cloud.elinkservice.cn/third/pacustomer/tokenlist' + const url = 'https://epmet-cloud.elinkservice.cn/api/third/pacustomer/tokenlist' const param = { customerId: row.customerId } @@ -239,7 +250,6 @@ export default { param, (data, rspMsg) => { this.endLoading() - this.$message.success('初始化成功') this.diaVisible = true this.$nextTick(() => { this.tokenForm = data @@ -255,7 +265,6 @@ export default { // 取消 diaCancel () { - this.diaVisible = false }, diff --git a/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue b/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue index 341416d..b86eead 100644 --- a/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue +++ b/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue @@ -80,7 +80,7 @@ 跟管理员信息 + style="width:100%;margin-top:10px">根管理员信息

{ this.endLoading() + localStorage.setItem('customerName', this.dataForm.customerInfoDTO.customerName) + this.$emit('changeCustomerName', this.dataForm.customerInfoDTO.customerName) + this.$message.success('修改成功') this.loadData() }, diff --git a/epmet-oper-web/src/views/modules/productConfig/customizeFunction/CustomFun.vue b/epmet-oper-web/src/views/modules/productConfig/customizeFunction/CustomFun.vue index 4953006..456de81 100644 --- a/epmet-oper-web/src/views/modules/productConfig/customizeFunction/CustomFun.vue +++ b/epmet-oper-web/src/views/modules/productConfig/customizeFunction/CustomFun.vue @@ -149,9 +149,9 @@ export default { }, computed: { tableHeight () { - return this.clientHeight - 60 - 80 - 80 - 90 + return this.clientHeight - 60 - 80 - 80 - 45 }, - ...mapGetters(['clientHeight', 'env']) + ...mapGetters(['clientHeight']) }, methods: { // 刷新 diff --git a/epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue b/epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue index 4b49e99..a674db9 100644 --- a/epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue +++ b/epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue @@ -13,9 +13,18 @@ :label-width="'120px'"> - + + + + +
2-5个字
@@ -184,28 +193,28 @@ export default { dataRule () { return { functionName: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '功能名称不能为空', trigger: 'blur' } + ], + domainName: [ + { required: true, message: '业务域名不能为空', trigger: 'blur' } ], - // domainName: [ - // { required: true, message: this.$t('validate.required'), trigger: 'blur' } - // ], iconLargeImg: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '大图标不能为空', trigger: 'blur' } ], iconSmallImg: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '小图标不能为空', trigger: 'blur' } ], fromApp: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '来源不能为空', trigger: 'blur' } ], shoppingStatus: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '上架状态不能为空', trigger: 'blur' } ], functionExplain: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '功能描述不能为空', trigger: 'blur' } ], targetLink: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } + { required: true, message: '不能为空', trigger: 'blur' } ] } } @@ -290,9 +299,17 @@ export default { }, saveForm () { - this.$refs['dataForm'].validate((valid) => { + this.$refs['dataForm'].validate((valid, messageObj) => { + if (!valid) { - this.$message.error('表单验证失败!') + let message = '' + for (var oneObj in messageObj) { + // debugger + // console.log(messageObj[oneObj]) + message = message + (messageObj[oneObj])[0].message + ' \n ' + } + // message = message.substring(0, message.length - 1) + this.$message.error(message) } else { if (this.dataForm.functionName.length > 5) { this.$message.warning('功能名称长度不能大于5个字!') diff --git a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue new file mode 100644 index 0000000..49d9200 --- /dev/null +++ b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue new file mode 100644 index 0000000..dbbe539 --- /dev/null +++ b/epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue @@ -0,0 +1,352 @@ + + + + diff --git a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue index 5d8ede7..d548c4f 100644 --- a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue +++ b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue @@ -4,11 +4,11 @@ shadow="never" class="aui-card--fill"> 居民端 + size="small" + @click="startSetWxIndex('', '', 0)">居民端 工作端 + size="small" + @click="startSetWxIndex('', '', 1)">工作端
this.checkCptRegion(item) === 'ban') }, cntCptList () { - console.log('cntCpt发生了变化') let arr = this.cptList.filter(item => this.checkCptRegion(item) === 'cnt') arr.sort((f, s) => f.displayOrder - s.displayOrder) return arr diff --git a/epmet-oper-web/src/views/modules/wx-mini/index-set.vue b/epmet-oper-web/src/views/modules/wx-mini/index-set.vue index 1f30650..2ca0b4f 100644 --- a/epmet-oper-web/src/views/modules/wx-mini/index-set.vue +++ b/epmet-oper-web/src/views/modules/wx-mini/index-set.vue @@ -562,7 +562,6 @@ export default { return this.cptList.filter(item => this.checkCptRegion(item) === 'ban') }, cntCptList () { - console.log('cntCpt发生了变化') let arr = this.cptList.filter(item => this.checkCptRegion(item) === 'cnt') arr.sort((f, s) => f.displayOrder - s.displayOrder) return arr diff --git a/epmet-oper-web/src/views/pages/login.vue b/epmet-oper-web/src/views/pages/login.vue index df5a429..3d15bc6 100644 --- a/epmet-oper-web/src/views/pages/login.vue +++ b/epmet-oper-web/src/views/pages/login.vue @@ -12,7 +12,7 @@ ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" status-icon> - + diff --git a/epmet-oper-web/src/views/pages/loginWork.vue b/epmet-oper-web/src/views/pages/loginWork.vue index a65bac1..f5350b0 100644 --- a/epmet-oper-web/src/views/pages/loginWork.vue +++ b/epmet-oper-web/src/views/pages/loginWork.vue @@ -13,7 +13,7 @@ ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" status-icon> - +