diff --git a/epmet-oper-web/src/assets/scss/common.scss b/epmet-oper-web/src/assets/scss/common.scss index fcbacf7..1509b2a 100644 --- a/epmet-oper-web/src/assets/scss/common.scss +++ b/epmet-oper-web/src/assets/scss/common.scss @@ -4,7 +4,8 @@ box-sizing: border-box; } body { - font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; + font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', + 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-size: $--font-size-base; line-height: $base--line-height; color: $--color-text-primary; @@ -34,7 +35,7 @@ img { } .clearfix:before, .clearfix:after { - content: " "; + content: ' '; display: table; } .clearfix:after { @@ -80,7 +81,6 @@ img { line-height: $base--line-height !important; } - /* Reset element-ui ------------------------------ */ .aui-wrapper { @@ -110,7 +110,6 @@ img { } } - /* Common ------------------------------ */ // 图标 @@ -145,8 +144,8 @@ img { background-color: transparent; } &-add { - > span > *[class*="el-icon-"], - > span > *[class*="icon"] { + > span > *[class*='el-icon-'], + > span > *[class*='icon'] { vertical-align: middle; font-size: 18px; margin-right: 5px; @@ -161,7 +160,7 @@ img { bottom: 0; z-index: 1010; width: 210px; - transition: right .3s; + transition: right 0.3s; &--open { right: 0; } @@ -197,7 +196,6 @@ img { } } - /* Layout ------------------------------ */ .aui-wrapper { @@ -205,7 +203,6 @@ img { padding-top: $navbar--height; } - /* Sidebar fold ------------------------------ */ .aui-sidebar--fold { @@ -252,7 +249,6 @@ img { } } - /* Navbar ------------------------------ */ .aui-navbar { @@ -265,7 +261,7 @@ img { align-items: stretch; height: $navbar--height; background-color: $--color-primary; - box-shadow: 0 1px 0 0 rgba(0, 0, 0, .05); + box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05); &--colorful { .aui-navbar__body { background-color: transparent; @@ -316,7 +312,7 @@ img { position: relative; width: $sidebar--width; height: $navbar--height; - transition: width .3s; + transition: width 0.3s; } &__brand { display: flex; @@ -331,7 +327,7 @@ img { white-space: nowrap; color: #fff; overflow: hidden; - transition: width .3s; + transition: width 0.3s; &-lg, &-mini { max-width: 100%; @@ -402,7 +398,7 @@ img { width: auto; font-size: 12px; margin: 0 0 0 5px; - transition: transform .3s; + transition: transform 0.3s; } } } @@ -415,14 +411,14 @@ img { } } &__search { - > *[class*="el-icon-"], - > *[class*="icon"] { + > *[class*='el-icon-'], + > *[class*='icon'] { display: inline-block; vertical-align: middle; } &-txt { width: 0; - transition: width .3s, margin-left .3s; + transition: width 0.3s, margin-left 0.3s; &.is-show { width: 210px; margin-left: 8px; @@ -453,7 +449,6 @@ img { } } - /* Sidebar ------------------------------ */ .aui-sidebar { @@ -464,9 +459,9 @@ img { z-index: 1020; width: $sidebar--width; background-color: #fff; - box-shadow: 1px 0 2px 0 rgba(0, 0, 0, .05); + box-shadow: 1px 0 2px 0 rgba(0, 0, 0, 0.05); overflow: hidden; - transition: width .3s; + transition: width 0.3s; &--dark { background-color: $sidebar--background-color-dark; .aui-sidebar__menu, @@ -499,12 +494,12 @@ img { padding-bottom: 15px; overflow-x: hidden; overflow-y: scroll; - transition: width .3s; + transition: width 0.3s; } &__menu { width: $sidebar--width; border-right: 0; - transition: width .3s; + transition: width 0.3s; .el-menu-item, .el-submenu__title { height: $sidebar--menu-item-height; @@ -519,11 +514,10 @@ img { text-align: center; font-size: 16px; color: inherit !important; - transition: font-size .3s; + transition: font-size 0.3s; } } - /* Content ------------------------------ */ .aui-content { @@ -535,13 +529,15 @@ img { margin-left: $sidebar--width; min-height: calc(100vh - #{$navbar--height}); background-color: $content--background-color; - transition: margin-left .3s; + transition: margin-left 0.3s; } > .aui-card--fill > .el-card__body { min-height: calc(#{$content--fill-height} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px); + min-height: calc( + #{$content--fill-height} - #{$content--card-header-height} - 2px + ); } &--tabs { padding: $content--tabs-header-height 0 0; @@ -574,9 +570,9 @@ img { z-index: 930; padding: 0 55px 0 15px; margin: 0; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); background-color: #fff; - transition: left .3s; + transition: left 0.3s; > .el-tabs__nav-wrap { margin-bottom: 0; &:after { @@ -646,10 +642,15 @@ img { min-height: calc(#{$content--fill-height-tabs} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); + min-height: calc( + #{$content--fill-height-tabs} - #{$content--card-header-height} - + 2px + ); } &.is-iframe { - height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2}); + height: calc( + #{$content--fill-height-tabs} + #{$content--padding * 2} + ); margin: -$content--padding; min-height: auto; > .aui-card--fill { @@ -668,7 +669,10 @@ img { background-color: #fff; } > .aui-card--fill > .el-card__header + .el-card__body { - height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); + height: calc( + #{$content--fill-height-tabs} - #{$content--card-header-height} - + 2px + ); } } } @@ -692,10 +696,13 @@ img { } } +.el-loading-mask { + z-index: 5001 !important; +} /* Page ------------------------------ */ -*[class*="aui-page__"] { +*[class*='aui-page__'] { padding-top: 0; .aui-content { min-height: auto; @@ -707,7 +714,9 @@ img { min-height: calc(100vh - #{$content--padding * 2} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px); + min-height: calc( + 100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px + ); } } } diff --git a/epmet-oper-web/src/js/columns/columns.js b/epmet-oper-web/src/js/columns/columns.js index 13d439d..7c489e4 100644 --- a/epmet-oper-web/src/js/columns/columns.js +++ b/epmet-oper-web/src/js/columns/columns.js @@ -1,23 +1,27 @@ +// 客户管理 +import CustomerList from './customer/manage/customer' +import RegisterInfo from './customer/init/customer' + +import miniProManage from './customer/miniProManage' import Temp from './code/temp' import CommitCode from './code/commitCode' import OperHistory from './code/operHistory' import Category from './code/category' -import RegisterInfo from './customer/customer' -import MiniProManage from './customer/miniProManage' -import Version from './customer/version' +// 产品配置 import CustomizedFunction from './miniPro/customizedFunction' export default { - Temp: Temp, // 代码上传——模板list - CommitCodeList: CommitCode['list'], // 代码上传——已上传的代码列表 - CommitCodeForm: CommitCode['form'], // 代码上传——代码form - OperHistory: OperHistory, // 代码上传——操作历史 - Category: Category, // 代码上传——审核项——类目 - + CustomerList: CustomerList['list'], // 客户管理——客户管理——客户列表 + ConfigForm: CustomerList['configForm'], // 客户管理——客户管理——配置 RegisterInfo: RegisterInfo, // 客户管理——客户注册信息 - MiniProManage: MiniProManage, // 客户管理——客户小程序管理 - Version: Version, // 客户管理——基础库 + + MiniProList: miniProManage, // 客户管理——代小程序管理——客户小程序列表 + Temp: Temp, // 客户管理——代小程序管理——版本管理——模板list + CommitCodeList: CommitCode['list'], // 客户管理——代小程序管理——版本管理——代码上传——已上传的代码列表 + CommitCodeForm: CommitCode['form'], // 客户管理——代小程序管理——版本管理——代码上传——代码form + OperHistory: OperHistory, // 客户管理——代小程序管理——版本管理——操作历史 + Category: Category, // 客户管理——代小程序管理——类目 // 小程序管理 CustomizedFunction: CustomizedFunction // 定制功能 diff --git a/epmet-oper-web/src/js/columns/customer/customer.js b/epmet-oper-web/src/js/columns/customer/init/customer.js similarity index 78% rename from epmet-oper-web/src/js/columns/customer/customer.js rename to epmet-oper-web/src/js/columns/customer/init/customer.js index 8b6178b..10a5598 100644 --- a/epmet-oper-web/src/js/columns/customer/customer.js +++ b/epmet-oper-web/src/js/columns/customer/init/customer.js @@ -17,27 +17,15 @@ export default [ }, { key: 'province', - title: '省', - display: ['formA', 'formU', 'table', 'model'], - fixed: false, - block: true, - width: 120 - }, - { - key: 'city', - title: '市', - display: ['formA', 'formU', 'table', 'model'], + title: '组织地区', + display: ['table', 'model'], fixed: false, block: true, - width: 120 - }, - { - key: 'district', - title: '区', - display: ['formA', 'formU', 'table', 'model'], - fixed: false, - block: true, - width: 120 + provinceKey: 'province', + cityKey: 'city', + countyKey: 'district', + format: 'address', + width: 150 }, // { // key: 'location', @@ -68,7 +56,7 @@ export default [ title: '居民端', display: ['formA', 'formU', 'table', 'model'], block: true, - format: function (cellValue, index) { + format: (cellValue, index) => { if (cellValue === 1) { return '已授权' } else if (cellValue === 0) { @@ -84,7 +72,7 @@ export default [ title: '工作端', display: ['formA', 'formU', 'table', 'model'], block: true, - format: function (cellValue, index) { + format: (cellValue, index) => { if (cellValue === 1) { return '已授权' } else if (cellValue === 0) { @@ -100,7 +88,7 @@ export default [ title: '初始化', display: ['formA', 'formU', 'table', 'model'], block: true, - format: function (cellValue, index) { + format: (cellValue, index) => { if (cellValue === 1) { return '已初始化' } else if (cellValue === 0) { diff --git a/epmet-oper-web/src/js/columns/customer/manage/customer.js b/epmet-oper-web/src/js/columns/customer/manage/customer.js new file mode 100644 index 0000000..8c7f53e --- /dev/null +++ b/epmet-oper-web/src/js/columns/customer/manage/customer.js @@ -0,0 +1,174 @@ +export default { + list: [ + { + key: 'logo', + title: 'Logo', + display: ['table', 'model'], + fixed: false, + block: true, + width: 80, + tableType: 'image' + }, + { + key: 'customerName', + title: '客户名称', + display: ['formA', 'formU', 'table', 'model'], + type: 'input', + rule: [ + { + required: true, + message: '请输入客户名称', + trigger: 'blur' + } + ], + fixed: false, + block: true, + width: 100 + }, + { + key: 'organizationLevels', + title: '组织级别', + display: ['table', 'model'], + fixed: false, + block: true, + width: 50, + format: (cellValue, index) => { + // 客户组织级别:0.省级,1市级,2.区县级,3.乡镇街道级 字典表key:organizationlevel + if (cellValue === '0') { + return '省级' + } else if (cellValue === '1') { + return '市级' + } else if (cellValue === '2') { + return '区县级' + } else if (cellValue === '3') { + return '乡镇街道级' + } else { + return '未知' + } + } + }, + { + key: 'province', + title: '组织地区', + display: ['table', 'model'], + fixed: false, + block: true, + provinceKey: 'province', + cityKey: 'city', + countyKey: 'county', + format: 'address', + width: 150 + }, + { + key: 'gridNumber', + title: '网格数', + display: ['table', 'model'], + block: true, + width: 60 + }, + { + key: 'validityTime', + title: '有效期', + display: ['table', 'model'], + block: true, + width: 60 + }, + { + key: 'rootManageName', + title: '管理员', + display: ['formA', 'formU', 'table', 'model'], + type: 'input', + rule: [ + { + required: true, + message: '请输入管理员姓名', + trigger: 'blur' + } + ], + block: true, + width: 60 + }, + { + key: 'rootManagePhone', + title: '联系方式', + display: ['formA', 'formU', 'table', 'model'], + type: 'input', + rule: [ + { + required: true, + message: '请输入管理员联系方式', + trigger: 'blur' + } + ], + block: true, + width: 60 + } + ], + configForm: [ + { + key: 'customerName', + title: '客户名称', + display: ['formA', 'formU', 'table', 'model'], + type: 'input', + rule: [ + { + required: true, + message: '请输入客户名称', + trigger: 'blur' + } + ], + fixed: false, + block: true, + width: 100 + }, + { + key: 'validityTime', + title: '有效期', + display: ['formA', 'formU', 'table', 'model'], + type: 'date', + rule: [ + { + required: true, + message: '请选择有效期', + trigger: 'blur' + } + ], + + fixed: false, + block: true, + width: 100 + }, + { + key: 'createGridNumber', + title: '已创建网格数', + display: ['formA', 'formU', 'table', 'model'], + type: 'span', + rule: [ + { + required: true, + message: '请输入有效期', + trigger: 'blur' + } + ], + fixed: false, + block: true, + width: 100 + }, + { + key: 'gridNumber', + title: '最大网格数', + display: ['formA', 'formU', 'table', 'model'], + type: 'counter', + rule: [ + { + required: true, + message: '请输入最大网格数', + trigger: 'blur' + } + ], + fixed: false, + block: true, + width: 100 + } + ] +} diff --git a/epmet-oper-web/src/js/columns/customer/miniProManage.js b/epmet-oper-web/src/js/columns/customer/miniProManage.js index a4d6425..ec581b5 100644 --- a/epmet-oper-web/src/js/columns/customer/miniProManage.js +++ b/epmet-oper-web/src/js/columns/customer/miniProManage.js @@ -40,6 +40,22 @@ export default [ } } }, + { + key: 'miniName', + title: '小程序名称', + type: 'radio', + rule: [ + { + required: true, + message: '请输入小程序名称', + trigger: 'blur' + } + ], + display: ['formA', 'formU', 'table', 'model'], + fixed: false, + block: true, + width: 120 + }, { key: 'appId', title: 'appId', diff --git a/epmet-oper-web/src/js/columns/customer/version.js b/epmet-oper-web/src/js/columns/customer/version.js deleted file mode 100644 index fcd4032..0000000 --- a/epmet-oper-web/src/js/columns/customer/version.js +++ /dev/null @@ -1,20 +0,0 @@ -export default [ - { - key: 'percentage', - title: '百分比', - type: 'select', - display: ['formA', 'formU', 'table', 'model'], - fixed: false, - block: false, - width: 120 - }, - { - key: 'version', - title: '版本', - type: 'radio', - display: ['formA', 'formU', 'table', 'model'], - fixed: false, - block: false, - width: 80 - } -] diff --git a/epmet-oper-web/src/js/columns/miniPro/customizedFunction.js b/epmet-oper-web/src/js/columns/miniPro/customizedFunction.js index c099d3e..974529c 100644 --- a/epmet-oper-web/src/js/columns/miniPro/customizedFunction.js +++ b/epmet-oper-web/src/js/columns/miniPro/customizedFunction.js @@ -14,9 +14,9 @@ export default [ fixed: false, block: true, format: (cellValue, index) => { - if (cellValue === 0) { + if (cellValue === '0') { return '下架' - } else if (cellValue === 1) { + } else if (cellValue === '1') { return '上架' } else { return '未知' diff --git a/epmet-oper-web/src/js/service.js b/epmet-oper-web/src/js/service.js index 7b689db..ccab78e 100644 --- a/epmet-oper-web/src/js/service.js +++ b/epmet-oper-web/src/js/service.js @@ -69,6 +69,13 @@ export default { case 'decimal': // 数字格式化 return Number(rowData[column.key].toFixed(column.num)) break + case 'address': // 地址组合 + let address = + rowData[column.provinceKey] + + rowData[column.cityKey] + + rowData[column.countyKey] + return address + break default: return column.format(rowData[column.key]) } diff --git a/epmet-oper-web/src/views/components/CForm.vue b/epmet-oper-web/src/views/components/CForm.vue index 2e4257a..6a8f672 100644 --- a/epmet-oper-web/src/views/components/CForm.vue +++ b/epmet-oper-web/src/views/components/CForm.vue @@ -107,10 +107,10 @@ 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 8f2c71b..7d7ea21 100644 --- a/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue @@ -9,44 +9,82 @@ :rules="dataRule" ref="dataForm" :label-width="'120px'"> - - - - - - - - - - - - - - - - - +
+ +
+ {{dataForm.customizedName}}
+
+ + + +
+
+ +
+ +
+ +
+ + + + + 恢复默认 + + + +
+
+ +
+ +
+ +
+ + + + + + 恢复默认 + + + +