From c5382c2906f0289217bbfb235aaed6f996aa23fc Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 18 Aug 2020 14:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-oper-web/.env.development | 4 +- epmet-oper-web/public/index.html | 8 +- .../src/views/modules/code/CommitList.vue | 659 ------------------ .../ConfigEdit.vue | 0 .../ConfigItem.vue | 190 ++++- .../CustomerList.vue | 13 +- .../{miniCustomize => customize}/MiniHome.vue | 0 .../customer/{ => init}/RegisterList.vue | 0 .../customer/{ => manage}/customer-info.vue | 0 .../customer/{ => manage}/customer-manage.vue | 0 .../miniProAgent}/BasicInfo.vue | 0 .../miniProAgent}/Category.vue | 0 .../miniProAgent}/LowVersion.vue | 0 .../miniProAgent/MiniProList.vue} | 3 +- .../miniProAgent/version}/CommitForm.vue | 0 .../miniProAgent/version}/OperHistory.vue | 0 .../version}/SubmitFailReason.vue | 0 .../miniProAgent/version}/SubmitForm.vue | 3 +- .../version}/SubmitFormReject.vue | 4 +- .../miniProAgent/version}/SubmitItem.vue | 0 .../miniProAgent/version}/VersionItem.vue | 0 .../customizeFunction}/CustomFun.vue | 0 .../customizeFunction}/Edit.vue | 0 .../CustomizedFunction copy.vue | 0 .../function-add-or-update.vue | 84 ++- .../defaultFunction}/function.vue | 0 .../homeComponent}/functionconfiguration.vue | 0 .../homecomponent-add-or-update.vue | 0 .../homeComponent}/homecomponent.vue | 0 29 files changed, 230 insertions(+), 738 deletions(-) delete mode 100644 epmet-oper-web/src/views/modules/code/CommitList.vue rename epmet-oper-web/src/views/modules/customer/{miniCustomize => customize}/ConfigEdit.vue (100%) rename epmet-oper-web/src/views/modules/customer/{miniCustomize => customize}/ConfigItem.vue (63%) rename epmet-oper-web/src/views/modules/customer/{miniCustomize => customize}/CustomerList.vue (91%) rename epmet-oper-web/src/views/modules/customer/{miniCustomize => customize}/MiniHome.vue (100%) rename epmet-oper-web/src/views/modules/customer/{ => init}/RegisterList.vue (100%) rename epmet-oper-web/src/views/modules/customer/{ => manage}/customer-info.vue (100%) rename epmet-oper-web/src/views/modules/customer/{ => manage}/customer-manage.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent}/BasicInfo.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent}/Category.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent}/LowVersion.vue (100%) rename epmet-oper-web/src/views/modules/{code/VersionManage.vue => customer/miniProAgent/MiniProList.vue} (99%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/CommitForm.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/OperHistory.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/SubmitFailReason.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/SubmitForm.vue (99%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/SubmitFormReject.vue (98%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/SubmitItem.vue (100%) rename epmet-oper-web/src/views/modules/{code => customer/miniProAgent/version}/VersionItem.vue (100%) rename epmet-oper-web/src/views/modules/{miniPro/customFun => productConfig/customizeFunction}/CustomFun.vue (100%) rename epmet-oper-web/src/views/modules/{miniPro/customFun => productConfig/customizeFunction}/Edit.vue (100%) rename epmet-oper-web/src/views/modules/{customize => productConfig/defaultFunction}/CustomizedFunction copy.vue (100%) rename epmet-oper-web/src/views/modules/{customize => productConfig/defaultFunction}/function-add-or-update.vue (64%) rename epmet-oper-web/src/views/modules/{customize => productConfig/defaultFunction}/function.vue (100%) rename epmet-oper-web/src/views/modules/{customize => productConfig/homeComponent}/functionconfiguration.vue (100%) rename epmet-oper-web/src/views/modules/{customize => productConfig/homeComponent}/homecomponent-add-or-update.vue (100%) rename epmet-oper-web/src/views/modules/{customize => productConfig/homeComponent}/homecomponent.vue (100%) diff --git a/epmet-oper-web/.env.development b/epmet-oper-web/.env.development index 46bff07..91d7451 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://192.168.1.130:8080/api # VUE_APP_API_SERVER = http://10.10.10.207:8080/api -VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/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/public/index.html b/epmet-oper-web/public/index.html index 8ddaf91..2d7cdff 100644 --- a/epmet-oper-web/public/index.html +++ b/epmet-oper-web/public/index.html @@ -34,13 +34,13 @@ <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> - + - --> <% } %> <% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %> diff --git a/epmet-oper-web/src/views/modules/code/CommitList.vue b/epmet-oper-web/src/views/modules/code/CommitList.vue deleted file mode 100644 index b126581..0000000 --- a/epmet-oper-web/src/views/modules/code/CommitList.vue +++ /dev/null @@ -1,659 +0,0 @@ - - - - diff --git a/epmet-oper-web/src/views/modules/customer/miniCustomize/ConfigEdit.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customer/miniCustomize/ConfigEdit.vue rename to epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue diff --git a/epmet-oper-web/src/views/modules/customer/miniCustomize/ConfigItem.vue b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue similarity index 63% rename from epmet-oper-web/src/views/modules/customer/miniCustomize/ConfigItem.vue rename to epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue index 9567762..20d2301 100644 --- a/epmet-oper-web/src/views/modules/customer/miniCustomize/ConfigItem.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue @@ -5,12 +5,20 @@ 取消返回 + {{customerName}} + @@ -63,11 +76,16 @@ width="110" prop="customizedName"> @@ -79,13 +97,27 @@ prop="shoppingStatusShow"> + + + + + width="200"> + + + + + + + + + + + + + + + + + @@ -149,12 +229,17 @@ export default { data () { return { loading: false, - customerId: '', // 上传代码定制id,父组件传 + noLoading: false, + customerId: '', // 客户id,父组件传 + customerName: '', // 客户名称,父组件传 // 定制功能 customizedList: [], customizeForm: [], + // 未添加的功能 + functionList: [], + uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload', // 新增定制功能相关 @@ -173,14 +258,17 @@ export default { } }, components: { - CDialog + CDialog, ConfigEdit }, mounted () { }, computed: { - tableHeight () { - return this.clientHeight - 220 + tableHeight1 () { + return (this.clientHeight - 220) / 2 + }, + tableHeight2 () { + return (this.clientHeight - 220) / 2 }, ...mapGetters(['clientHeight']), dataRule () { @@ -204,13 +292,15 @@ export default { } }, methods: { - initData (customerId) { + initData (customerId, customerName) { this.customerId = customerId + this.customerName = customerName this.loadTableData() }, // 获取列表数据 loadTableData () { + this.loading = true let params = { customerId: this.customerId } @@ -219,7 +309,8 @@ export default { window.app.ajax.post(url, params, (data, rspMsg) => { this.$nextTick(() => { - this.customizedList = data + this.customizedList = data.customerList + this.functionList = data.functionList this.customizedList.forEach(element => { element.shoppingStatusShow = element.shoppingStatus === '0' ? element.shoppingStatusShow = '下架' : '上架' @@ -230,6 +321,7 @@ export default { this.endLoading() this.$message.error(rspMsg) }) + this.loading = false }, // 上架 @@ -273,6 +365,11 @@ export default { }, + // 采集 + addFunction (functionId) { + + }, + // 上传大图标成功 handleLargeSuccess (res, file, index) { if (res.code === 0 && res.msg === 'success') { @@ -303,26 +400,55 @@ export default { }, // 上移 - moveUp () { - console.log(this.customizedList) - this.customizedList.forEach((element, index) => { - element.displayOrder = index - }) - const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updatedisplayorder' - // const url = '/oper/customize/customerfunctiondetail/updatedisplayorder' - window.app.ajax.post(url, this.customizedList, - (data, rspMsg) => { - // this.$message.success('操作成功') + moveUp (index) { + console.log(index) + if (index > 0) { + this.startLoading() + let resultList = [] + let one = {} + for (let i = 0; i < this.customizedList.length; i++) { + let obj = {} + // eslint-disable-next-line + // debugger + if (i === index - 1) { + one.customerId = this.customizedList[i].customerId + one.functionId = this.customizedList[i].functionId + one.displayOrder = i + } else if (i === index) { + obj.customerId = this.customizedList[i].customerId + obj.functionId = this.customizedList[i].functionId + obj.displayOrder = i + resultList.push(obj) + resultList.push(one) + } else { + obj.customerId = this.customizedList[i].customerId + obj.functionId = this.customizedList[i].functionId + obj.displayOrder = i + resultList.push(obj) + } + + const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updatedisplayorder' + // const url = '/oper/customize/customerfunctiondetail/updatedisplayorder' + window.app.ajax.post(url, resultList, + (data, rspMsg) => { + // this.$message.success('操作成功') + + }, + (rspMsg, data) => { + this.$message.error(rspMsg) + }) + this.endLoading() + } + } else { + this.$message.warning('无法上移') - }, - (rspMsg, data) => { - this.$message.error(rspMsg) - }) + return false + } }, // 取消 diaCancel () { - this.$emit('cancleSubmit') + this.$emit('cancleBack') }, // 开启加载动画 @@ -342,7 +468,7 @@ export default { } }, props: { - ConfigEdit + } } @@ -367,4 +493,8 @@ export default { background-color: rgb(89, 161, 255); border-color: rgb(89, 161, 255); } +.el-icon-top { + font-weight: 600 !important; + font-size: 100px !important; +} diff --git a/epmet-oper-web/src/views/modules/customer/miniCustomize/CustomerList.vue b/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue similarity index 91% rename from epmet-oper-web/src/views/modules/customer/miniCustomize/CustomerList.vue rename to epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue index 52913d1..1e66f46 100644 --- a/epmet-oper-web/src/views/modules/customer/miniCustomize/CustomerList.vue +++ b/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue @@ -47,10 +47,10 @@ @click="showMiniHome(scope.row.customerId,scope.row.customerName,1)">工作端首页 功能配置 + @click="showConfigItem(scope.row.customerId,scope.row.customerName)">功能配置 角色权限 + @click="showLimitConfig(scope.row.customerId,scope.row.customerName)">角色权限 @@ -136,9 +136,14 @@ export default { }, // 功能配置 - showConfigItem (customerId) { + showConfigItem (customerId, customerName) { this.showType = 'config' - this.$refs['ref_config_item'].initData(customerId) + this.$refs['ref_config_item'].initData(customerId, customerName) + }, + + // 显示权限配置 + showLimitConfig (customerId, customerName) { + this.$message.warning('当前功能还未开发') }, pageCurrentChangeHandle (val) { diff --git a/epmet-oper-web/src/views/modules/customer/miniCustomize/MiniHome.vue b/epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customer/miniCustomize/MiniHome.vue rename to epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue diff --git a/epmet-oper-web/src/views/modules/customer/RegisterList.vue b/epmet-oper-web/src/views/modules/customer/init/RegisterList.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customer/RegisterList.vue rename to epmet-oper-web/src/views/modules/customer/init/RegisterList.vue diff --git a/epmet-oper-web/src/views/modules/customer/customer-info.vue b/epmet-oper-web/src/views/modules/customer/manage/customer-info.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customer/customer-info.vue rename to epmet-oper-web/src/views/modules/customer/manage/customer-info.vue diff --git a/epmet-oper-web/src/views/modules/customer/customer-manage.vue b/epmet-oper-web/src/views/modules/customer/manage/customer-manage.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customer/customer-manage.vue rename to epmet-oper-web/src/views/modules/customer/manage/customer-manage.vue diff --git a/epmet-oper-web/src/views/modules/code/BasicInfo.vue b/epmet-oper-web/src/views/modules/customer/miniProAgent/BasicInfo.vue similarity index 100% rename from epmet-oper-web/src/views/modules/code/BasicInfo.vue rename to epmet-oper-web/src/views/modules/customer/miniProAgent/BasicInfo.vue diff --git a/epmet-oper-web/src/views/modules/code/Category.vue b/epmet-oper-web/src/views/modules/customer/miniProAgent/Category.vue similarity index 100% rename from epmet-oper-web/src/views/modules/code/Category.vue rename to epmet-oper-web/src/views/modules/customer/miniProAgent/Category.vue diff --git a/epmet-oper-web/src/views/modules/code/LowVersion.vue b/epmet-oper-web/src/views/modules/customer/miniProAgent/LowVersion.vue similarity index 100% rename from epmet-oper-web/src/views/modules/code/LowVersion.vue rename to epmet-oper-web/src/views/modules/customer/miniProAgent/LowVersion.vue diff --git a/epmet-oper-web/src/views/modules/code/VersionManage.vue b/epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue similarity index 99% rename from epmet-oper-web/src/views/modules/code/VersionManage.vue rename to epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue index 72905cf..3489154 100644 --- a/epmet-oper-web/src/views/modules/code/VersionManage.vue +++ b/epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue @@ -71,10 +71,9 @@ diff --git a/epmet-oper-web/src/views/modules/customize/function.vue b/epmet-oper-web/src/views/modules/productConfig/defaultFunction/function.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customize/function.vue rename to epmet-oper-web/src/views/modules/productConfig/defaultFunction/function.vue diff --git a/epmet-oper-web/src/views/modules/customize/functionconfiguration.vue b/epmet-oper-web/src/views/modules/productConfig/homeComponent/functionconfiguration.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customize/functionconfiguration.vue rename to epmet-oper-web/src/views/modules/productConfig/homeComponent/functionconfiguration.vue diff --git a/epmet-oper-web/src/views/modules/customize/homecomponent-add-or-update.vue b/epmet-oper-web/src/views/modules/productConfig/homeComponent/homecomponent-add-or-update.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customize/homecomponent-add-or-update.vue rename to epmet-oper-web/src/views/modules/productConfig/homeComponent/homecomponent-add-or-update.vue diff --git a/epmet-oper-web/src/views/modules/customize/homecomponent.vue b/epmet-oper-web/src/views/modules/productConfig/homeComponent/homecomponent.vue similarity index 100% rename from epmet-oper-web/src/views/modules/customize/homecomponent.vue rename to epmet-oper-web/src/views/modules/productConfig/homeComponent/homecomponent.vue