Browse Source

Merge branch 'dev'

preview
jiangyy 5 years ago
parent
commit
f7fb79d387
  1. 1
      epmet-oper-web/src/App.vue
  2. 11
      epmet-oper-web/src/assets/scss/variables.scss
  3. 11
      epmet-oper-web/src/js/columns/columns.js
  4. 2
      epmet-oper-web/src/js/columns/customer/manage/customer.js
  5. 132
      epmet-oper-web/src/js/columns/productConfig/footBar.js
  6. 17
      epmet-oper-web/src/js/util.js
  7. 7
      epmet-oper-web/src/router/index.js
  8. 11
      epmet-oper-web/src/views/components/CForm.vue
  9. 1
      epmet-oper-web/src/views/components/CTable.vue
  10. 93
      epmet-oper-web/src/views/components/CTableNoPage.vue
  11. 6
      epmet-oper-web/src/views/main-content.vue
  12. 22
      epmet-oper-web/src/views/main-navbar.vue
  13. 4
      epmet-oper-web/src/views/main-sidebar-sub-menu.vue
  14. 1
      epmet-oper-web/src/views/main-sidebar.vue
  15. 9
      epmet-oper-web/src/views/main.vue
  16. 14
      epmet-oper-web/src/views/modules/HomeWork.vue
  17. 42
      epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue
  18. 115
      epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue
  19. 33
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  20. 312
      epmet-oper-web/src/views/modules/customer/customize/FootbarEdit.vue
  21. 332
      epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue
  22. 1
      epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue
  23. 65
      epmet-oper-web/src/views/modules/customer/init/RegisterList.vue
  24. 5
      epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
  25. 12
      epmet-oper-web/src/views/modules/customer/miniProAgent/version/SubmitForm.vue
  26. 9
      epmet-oper-web/src/views/modules/customer/miniProAgent/version/SubmitFormReject.vue
  27. 25
      epmet-oper-web/src/views/modules/customer/miniProAgent/version/VersionItem.vue
  28. 48
      epmet-oper-web/src/views/modules/home.vue
  29. 4
      epmet-oper-web/src/views/modules/productConfig/customizeFunction/CustomFun.vue
  30. 105
      epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue
  31. 50
      epmet-oper-web/src/views/modules/productConfig/footbar/FootbarDefault.vue
  32. 385
      epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue
  33. 449
      epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue
  34. 9
      epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue
  35. 1
      epmet-oper-web/src/views/modules/wx-mini/index-set.vue
  36. 14
      epmet-oper-web/src/views/pages/login.vue
  37. 14
      epmet-oper-web/src/views/pages/loginWork.vue

1
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) {

11
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}
);

11
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 // 外部客户应用
}
}

2
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: [

132
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 === false) {
return '隐藏'
} else if (cellValue === true) {
return '显示'
} else {
return '未知'
}
}
}
],
customize: [
{
key: 'defaultBarName',
title: '默认导航栏名称',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
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 === false) {
return '隐藏'
} else if (cellValue === true) {
return '显示'
} else {
return '未知'
}
}
}
]
}

17
epmet-oper-web/src/js/util.js

@ -4,8 +4,25 @@
var crypto = require('crypto')
let Base64 = require('js-base64').Base64
import Vue from 'vue'
export default {
/**
*
* @param {*} messageObj
*/
validateRule(messageObj) {
let message = ''
for (var oneObj in messageObj) {
message = message + messageObj[oneObj][0].message + ' <br/> '
}
Vue.prototype.$message({
dangerouslyUseHTMLString: true,
message: message,
type: 'error'
})
},
/**
* 日期格式化
* @param date

7
epmet-oper-web/src/router/index.js

@ -50,6 +50,12 @@ export const moduleRoutes = {
name: 'home',
meta: { title: '首页', isTab: true }
}
// {
// path: '/homeWork',
// component: () => import('@/views/modules/HomeWork'),
// name: 'homeWork',
// meta: { title: '首页', isTab: true }
// }
]
}
@ -111,6 +117,7 @@ router.beforeEach((to, from, next) => {
// })
// .catch(() => {})
// 获取菜单列表, 添加并全局变量保存
const userType = localStorage.getItem('userType')
console.log('获取菜单::::' + localStorage.getItem('userType'))

11
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)
}

1
epmet-oper-web/src/views/components/CTable.vue

@ -65,6 +65,7 @@
:style="{width: col.imgWidth?col.imgWidth:'50px',height:col.imgHeight?col.imgHeight:'50px'}"
class="function-icon"
:fit=" col.fill?col.fill:'fill'">
<span v-else>--</span>
</template></el-table-column>

93
epmet-oper-web/src/views/components/CTableNoPage.vue

@ -37,7 +37,7 @@
</div>
<template v-for="col in tableColumn">
<!--渲染列-->
<el-table-column v-if="col.render"
<el-table-column v-if="col.tableType==='span'"
:key="col.key"
:label="col.title"
:min-width="col.width"
@ -49,8 +49,27 @@
<span v-html="col.render(scope.row[col.key])"></span>
</template>
</el-table-column>
<!--图片列-->
<el-table-column v-if="col.tableType==='image'"
:key="col.key"
:label="col.title"
:min-width="col.width"
:fixed="col.isFrozen"
show-overflow-tooltip
:align="'center'"
:header-align="headerAlign"
:formatter="col.formatter">
<template slot-scope="scope">
<img v-if="scope.row[col.key]"
:src="scope.row[col.key]"
:style="{width: col.imgWidth?col.imgWidth:'50px',height:col.imgHeight?col.imgHeight:'50px'}"
class="function-icon"
:fit=" col.fill?col.fill:'fill'">
</template></el-table-column>
<!--普通列-->
<el-table-column v-else
<el-table-column v-if="!col.tableType||col.tableType===''"
:key="col.key"
:label="col.title"
:min-width="col.width"
@ -60,6 +79,31 @@
:header-align="headerAlign"
:formatter="col.formatter"></el-table-column>
</template>
<!--排序操作列-->
<el-table-column v-if="orderOperations.length && orderOperations.length > 0"
label="移动"
:width="orderOperationWidth"
fixed="right"
align="center"
header-align="center"
class="operate">
<template slot-scope="scope">
<!-- <el-button type="text"
style="width=100px;height=100px"
icon="el-icon-top"></el-button> -->
<el-button v-for="(item,index) in orderOperations"
:key="index"
:style=item.style
:type=item.type
:size=item.size
:icon=item.icon
:plain=item.plain
@click.stop="handleMethod(scope.$index, scope.row,item.methodName)"></el-button>
</template>
</el-table-column>
<!--操作列-->
<el-table-column v-if="operations.length && operations.length > 0"
label="操作"
@ -69,13 +113,14 @@
class="operate">
<template slot-scope="scope">
<!--传入的操作按钮属性 lyx 20190411 -->
<el-button v-for="item in operations"
:key="item.lable"
<el-button v-for="(item,index) in operations"
:key="index"
v-show="item.isShow(scope.row)"
:style=item.style
:type=item.type
:size=item.size
:plain=item.plain
@click.stop="handleMethod(scope.$index, scope.row,item.methodName)">{{item.lable}}</el-button>
@click.stop="handleMethod(scope.$index, scope.row,item.methodName)">{{typeof (item.lable) === 'function'?(item.lable)(scope.row[item.key]) :item.lable}}</el-button>
</template>
</el-table-column>
</el-table>
@ -140,17 +185,28 @@ 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,13 +215,24 @@ export default {
return this.operations.length * 80
}
},
//
orderOperationWidth: function() {
return this.orderOperations.length * 50
},
...mapGetters(['resolution'])
},
methods: {
doLayout () {
this.$refs.table.doLayout() //
},
render () {
this.loadData()
},
loadData () {
this.$refs.table.doLayout() //
this.templateRadio = ''
this.loading = true
Object.keys(this.params).forEach(key => {
@ -181,6 +248,7 @@ export default {
(data, rspMsg) => {
if (data) {
this.tableData = data
}
this.loading = false
},
@ -256,8 +324,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
}
}
}
</script>

6
epmet-oper-web/src/views/main-content.vue

@ -34,7 +34,8 @@
frameborder="0"
scrolling="yes"></iframe>
<keep-alive v-else>
<router-view v-if="item.name === $store.state.contentTabsActiveName" />
<router-view v-if="item.name === $store.state.contentTabsActiveName"
@changeCustomerName="changeCustomerName" />
</keep-alive>
</el-tab-pane>
</el-tabs>
@ -56,6 +57,9 @@ export default {
}
},
methods: {
changeCustomerName (customerName) {
this.$emit('changeCustomerName', customerName)
},
// tabs, iframe
tabIsIframe (url) {
return isURL(url)

22
epmet-oper-web/src/views/main-navbar.vue

@ -72,7 +72,7 @@
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
<!-- <el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item> -->
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -96,7 +96,10 @@ export default {
data () {
return {
i18nMessages: messages,
updatePassowrdVisible: false
updatePassowrdVisible: false,
customerName: localStorage.getItem('customerName')
}
},
components: {
@ -107,13 +110,13 @@ 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) {
@ -139,13 +142,18 @@ export default {
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home')
this.$http.post('/auth/login/logout').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
clearLoginInfo()
console.log('logout:::::' + localStorage.getItem('userType'))
if (localStorage.getItem('userType') === 'work') {
this.$router.push({ name: 'loginWork' })
} else {

4
epmet-oper-web/src/views/main-sidebar-sub-menu.vue

@ -1,5 +1,5 @@
<template>
<!-- <div v-if="menu.showFlag"> -->
<div v-if="menu.showFlag">
<el-submenu
v-if="menu.children && menu.children.length >= 1"
:index="menu.id"
@ -20,7 +20,7 @@
</svg>
<span>{{ menu.name }}</span>
</el-menu-item>
<!-- </div> -->
</div>
</template>
<script>

1
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)
}
}
</script>

9
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 }]">
<template v-if="!loading">
<main-navbar />
<main-navbar ref="ref_navbar" />
<main-sidebar />
<div class="aui-content__wrapper">
<main-content v-if="!$store.state.contentIsNeedRefresh" />
<main-content v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName" />
</div>
<main-theme-tools />
</template>
@ -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

14
epmet-oper-web/src/views/modules/HomeWork.vue

@ -0,0 +1,14 @@
<template>
<div>
<customer-info></customer-info>
</div>
</template>
<script>
import CustomerInfo from './customer/manage/CustomerInfo'
export default {
components: {
CustomerInfo
}
}
</script>

42
epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue

@ -1,6 +1,7 @@
<template>
<el-dialog :visible.sync="visible"
:title="'修改定制功能'"
:width="diaWidth+'%'"
:close-on-click-modal="false"
:before-close="handleClose"
:close-on-press-escape="false">
@ -17,9 +18,16 @@
</el-form-item>
<el-form-item label="功能名称"
prop="functionName">
<el-input class="item_width_1"
v-model="dataForm.functionName"
placeholder="功能名称"></el-input>
<el-tooltip class="item"
effect="dark"
content="请输入2-5个字"
placement="bottom-start">
<el-input class="item_width_1"
:maxlength="5"
:minlength="2"
v-model="dataForm.functionName"
placeholder="功能名称"></el-input>
</el-tooltip>
</el-form-item>
</div>
<div style="margin-top:20px">
@ -98,7 +106,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data () {
return {
@ -125,17 +133,23 @@ export default {
dataRule () {
return {
functionName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
{ min: 2, max: 5, message: '功能名称长度在 2 到 5 个字符', 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' }
]
}
}
},
diaWidth () {
console.log(this.resolution)
return this.resolution === 'small' ? 60 : 40
},
...mapGetters(['clientHeight', 'resolution']),
},
methods: {
init (dataForm) {
@ -185,17 +199,11 @@ export default {
},
saveForm () {
this.$refs['dataForm'].validate((valid) => {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
this.$message.error('表单验证失败!')
app.util.validateRule(messageObj)
} else {
if (this.dataForm.functionName.length > 5) {
this.$message.warning('功能名称长度不能大于5个字!')
return false
} else if (this.dataForm.functionName.length < 2) {
this.$message.warning('功能名称长度不能小于2个字!')
return false
}
// console.log(this.dataForm)
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updatecustomerfunction'
const url = '/oper/customize/customerfunctiondetail/updatecustomerfunction'

115
epmet-oper-web/src/views/modules/customer/customize/ConfigItem.vue

@ -35,14 +35,14 @@
<el-table-column label="默认名称"
header-align="center"
align="center"
width="150"
width="120"
prop="customizedName">
</el-table-column>
<el-table-column label="自定义名称"
header-align="center"
align="center"
width="150"
width="120"
prop="functionName">
</el-table-column>
@ -100,7 +100,7 @@
<el-button type="text"
style="width=100px;height=100px"
@click.stop="moveUp( scope.$index)"
@click.stop="moveUpResi( scope.$index)"
icon="el-icon-top"></el-button>
</template>
@ -125,10 +125,8 @@
@click.stop="upOrDown(scope.row.functionId, '0')">下架</el-button>
<el-button size="mini"
type="primary"
@click.stop="editShow( scope.$index)">修改</el-button>
<!-- <el-button size="mini"
type="primary"
@click.stop="moveUp( scope.$index)">上移</el-button> -->
@click.stop="editResiShow( scope.$index)">修改</el-button>
</template>
</el-table-column>
</el-table>
@ -223,7 +221,7 @@
<el-table-column label="大图标"
header-align="center"
align="center"
width="150"
min-width="100"
prop="iconLargeImg">
<template slot-scope="scope">
<el-image v-if="scope.row.iconLargeImg"
@ -238,7 +236,7 @@
<el-table-column label="小图标"
header-align="center"
align="center"
width="110"
min-width="100"
prop="iconSmallImg">
<template slot-scope="scope">
<el-image v-if="scope.row.iconSmallImg"
@ -267,7 +265,7 @@
<el-button type="text"
style="width=100px;height=100px"
@click.stop="moveUp( scope.$index)"
@click.stop="moveUpWork( scope.$index)"
icon="el-icon-top"></el-button>
</template>
@ -292,10 +290,8 @@
@click.stop="upOrDown(scope.row.functionId, '0')">下架</el-button>
<el-button size="mini"
type="primary"
@click.stop="editShow( scope.$index)">修改</el-button>
<!-- <el-button size="mini"
type="primary"
@click.stop="moveUp( scope.$index)">上移</el-button> -->
@click.stop="editWorkShow( scope.$index)">修改</el-button>
</template>
</el-table-column>
</el-table>
@ -439,7 +435,7 @@ export default {
tableHeight2 () {
return (this.clientHeight - 220) / 2 - 60
},
...mapGetters(['clientHeight']),
...mapGetters(['clientHeight', 'resolution']),
dataRule () {
return {
customizedName: [
@ -519,8 +515,9 @@ export default {
// /
upOrDown (functionId, shoppingStatus) {
this.optionType = '1'
this.upOrDownDia.title = shoppingStatus === 0 ? '下架原因' : '上架原因'
this.upOrDownDia.title = shoppingStatus === '0' ? '下架原因' : '上架原因'
this.upOrDownForm = {
customerId: this.customerId,
functionId: functionId,
@ -557,9 +554,13 @@ export default {
this.endLoading()
},
//
editShow (index) {
editResiShow (index) {
this.$refs['ref_config_edit'].init(this.resiHaveList[index])
},
//
editWorkShow (index) {
this.$refs['ref_config_edit'].init(this.workHaveList[index])
},
editDiaOK () {
this.loadTableData()
},
@ -576,37 +577,8 @@ export default {
this.upOrDownDia.visible = true
},
//
handleLargeSuccess (res, file, index) {
if (res.code === 0 && res.msg === 'success') {
this.resiHaveList[index].iconLargeImg = res.data.url
} else {
this.$message.error(res.msg)
}
},
//
handleSmallSuccess (res, file, index) {
if (res.code === 0 && res.msg === 'success') {
this.resiHaveList[index].iconSmallImg = res.data.url
} else {
this.$message.error(res.msg)
}
},
beforeAvatarUpload (file) {
// const isPNG = file.type === 'image/png'
// const isLt1M = file.size / 1024 / 1024 < 1
// if (!isPNG) {
// this.$message.error(' PNG !')
// }
// if (!isLt1M) {
// this.$message.error(' 1MB!')
// }
// return isPNG && isLt1M
},
//
moveUp (index) {
moveUpResi (index) {
if (index > 0) {
console.log(this.resiHaveList)
this.startLoading()
@ -654,6 +626,55 @@ export default {
return false
}
},
//
moveUpWork (index) {
if (index > 0) {
console.log(this.workHaveList)
this.startLoading()
let resultList = []
let one = {}
for (let i = 0; i < this.workHaveList.length; i++) {
let obj = {}
// eslint-disable-next-line
// debugger
if (i === index - 1) {
one.customerId = this.workHaveList[i].customerId
one.functionId = this.workHaveList[i].functionId
one.displayOrder = index
} else if (i === index) {
obj.customerId = this.workHaveList[i].customerId
obj.functionId = this.workHaveList[i].functionId
obj.displayOrder = index - 1
resultList.push(obj)
resultList.push(one)
} else {
obj.customerId = this.workHaveList[i].customerId
obj.functionId = this.workHaveList[i].functionId
obj.displayOrder = i
resultList.push(obj)
}
}
console.log(resultList)
// 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.endLoading()
// this.$message.success('')
this.loadTableData()
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
} else {
this.$message.warning('无法上移')
return false
}
},
//
diaCancel () {

33
epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue

@ -28,17 +28,20 @@
align="center"
prop="logo">
<template slot-scope="scope">
<el-image style="width: 50px; height: 50px"
<el-image v-if="scope.row.logo"
style="width: 50px; height: 50px"
:src="scope.row.logo"
@click="addSrcList(scope.row.logo)"
:preview-src-list="srcList"></el-image>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column :label="$t('handle')"
fixed="right"
header-align="center"
align="center"
width="350">
width="400">
<template slot-scope="scope">
<el-button type="text"
size="small"
@ -49,6 +52,9 @@
<el-button type="text"
size="small"
@click="showConfigItem(scope.row.customerId,scope.row.customerName)">功能配置</el-button>
<el-button type="text"
size="small"
@click="showFootbar(scope.row.customerId,scope.row.customerName)">FootBar配置</el-button>
<el-button type="text"
size="small"
@click="showLimitConfig(scope.row.customerId,scope.row.customerName)">角色权限</el-button>
@ -71,6 +77,12 @@
<config-item ref="ref_config_item"
@cancleBack="cancleBack"></config-item>
</div>
<div v-show="showType==='footbar'">
<footbar-list ref="ref_footbarlist"
:showFrom="'customize'"
:tableKeywork="'FootBarCustomize'"
@cancleBack="cancleBack"></footbar-list>
</div>
<el-dialog :visible.sync="funcVisible"
title="功能列表"
@ -88,6 +100,7 @@
<script>
import ConfigItem from './ConfigItem'
import FootbarList from '../../productConfig/footbar/FootbarList'
import MiniHome from './MiniHome'
import RoleList from './roleList'
export default {
@ -114,10 +127,15 @@ export default {
components: {
ConfigItem,
MiniHome,
RoleList
RoleList,
FootbarList
},
created () {
activated () {
if (this.showType === 'footbar') {
this.$nextTick(() => {
this.$refs['ref_footbarlist'].doLayout() //
})
}
},
mounted () {
@ -172,6 +190,11 @@ export default {
this.showType = 'config'
this.$refs['ref_config_item'].initData(customerId, customerName)
},
// footbar
showFootbar (customerId, customerName) {
this.showType = 'footbar'
this.$refs['ref_footbarlist'].initData(customerId, customerName)
},
//
showLimitConfig (customerId, customerName) {

312
epmet-oper-web/src/views/modules/customer/customize/FootbarEdit.vue

@ -0,0 +1,312 @@
<template>
<el-dialog :visible.sync="visible"
:title="'修改Footbar'"
:close-on-click-modal="false"
:before-close="handleClose"
:close-on-press-escape="false"
:width="60+'%'"
:top="'30px'">
<el-form :inline="true"
:model="dataForm"
:rules="dataRule"
ref="dataForm"
:label-width="'120px'">
<el-form-item label="默认导航栏名称">
<div class="item_width_1">
<span>{{dataForm.defaultName}}</span>
</div>
</el-form-item>
<el-form-item label="导航栏名称"
prop="barName">
<el-tooltip class="item"
effect="dark"
content="请输入2-5个字"
placement="bottom-start">
<el-input class="item_width_1"
:maxlength="5"
:minlength="2"
v-model="dataForm.barName"
placeholder="导航栏名称"></el-input>
</el-tooltip>
</el-form-item>
<el-form-item label="默认页面标题">
<div class="item_width_1">
<span>{{dataForm.defaultPageTitle}}</span>
</div>
</el-form-item>
<el-form-item label="页面标题"
prop="pageTitle">
<el-tooltip class="item"
effect="dark"
content="请输入2-10个字"
placement="bottom-start">
<el-input class="item_width_1"
:maxlength="10"
:minlength="2"
v-model="dataForm.pageTitle"
placeholder="页面标题"></el-input>
</el-tooltip>
</el-form-item>
<el-form-item label="App类型"
prop="appType">
<el-select :disabled="type==='U'"
class="item_width_1"
v-model="dataForm.appType"
placeholder="请选择"
clearable>
<el-option v-for="item in fromAppList"
:key="item.dictValue"
:label="item.dictName"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="iconPath"
label="图标">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="function (res, file) { return handleImgSuccess(res, file, '')}"
:before-upload="beforeImgUpload">
<img v-if="dataForm.iconPath"
:src="dataForm.iconPath"
style="width:70px;height:70px"
class="function-icon">
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item prop="selectedIconPath"
label="选中图标">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="function (res, file) { return handleImgSuccess(res, file, 'sel')}"
:before-upload="beforeImgUpload">
<img v-if="dataForm.selectedIconPath"
:src="dataForm.selectedIconPath"
style="width:70px;height:70px"
class="function-icon">
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary"
@click="saveForm()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import { Loading } from 'element-ui' // Loading
let loading//
export default {
data () {
return {
visible: false,
type: '', // A/U
id: '', // id
dataForm: {
customerId: '',
barName: '',
barKey: '',
appType: '',
pageTitle: '',
iconPath: '',
selectedIconPath: ''
},
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload',
fromAppList: [
{
'dictName': '工作端',
'dictValue': 'gov'
}, {
'dictName': '居民端',
'dictValue': 'resi'
}
]
}
},
created () {
// this.queryFunctionList()
},
computed: {
dataRule () {
return {
barKey: [
{ required: true, message: 'Key不能为空', trigger: 'blur' }
],
barName: [
{ required: true, message: '导航栏标题不能为空', trigger: 'blur' },
{ min: 2, max: 5, message: '导航栏标题长度在 2 到 5 个字符', trigger: 'blur' }
],
appType: [
{ required: true, message: '类型不能为空', trigger: 'blur' }
],
pageTitle: [
{ required: true, message: '页面标题不能为空', trigger: 'blur' },
{ min: 2, max: 10, message: '页面标题长度在 2 到 10 个字符', trigger: 'blur' }
]
// iconPath: [
// { required: true, message: '', trigger: 'blur' }
// ],
// selectedIconPath: [
// { required: true, message: '', trigger: 'blur' }
// ]
}
}
},
methods: {
init (id, type, appType) {
this.type = type
this.visible = true
this.id = id
if (type === 'A') {
this.dataForm = {
customerId: '',
barName: '',
barKey: '',
appType: appType,
pageTitle: '',
iconPath: '',
selectedIconPath: ''
}
} else {
this.loadFormData()
}
},
loadFormData () {
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/footbardetail'
// const url = '/oper/customize/customerfootbar/footbardetail'
let _data = {
id: this.id
}
this.startLoading()
window.app.ajax.post(url, _data,
(data, rspMsg) => {
this.endLoading()
this.dataForm = data
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
},
//
handleImgSuccess (res, file, type) {
if (res.code === 0 && res.msg === 'success') {
if (type === 'sel') {
this.dataForm.selectedIconPath = res.data.url
} else if (type === 'small') {
this.dataForm.iconPath = res.data.url
}
} else {
this.$message.error(res.msg)
}
},
beforeImgUpload (file) {
// const isPNG = file.type === 'image/png'
const isLt1M = file.size / 1024 < 20
// if (!isPNG) {
// this.$message.error(' PNG !')
// }
if (!isLt1M) {
this.$message.error('上传图片大小不能超过 1MB!')
}
// return isPNG && isLt1M
return isLt1M
},
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)
})
}
})
},
handleClose () {
this.visible = false
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
}
}
</script>
<style scoped>
.function-icon {
width: 28px;
}
.item_width_1 {
width: 300px;
}
.item_width_2 {
width: 500px;
}
.block {
display: block;
}
.btn_serve {
float: left;
margin-top: 4px;
margin-left: 10px;
vertical-align: bottom;
}
</style>

332
epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue

@ -0,0 +1,332 @@
<template>
<div>
<div class="div_btn">
<span style="margin-right:20px">{{customerName}}</span>
<el-button type="default"
size="mini"
@click="diaCancel">取消返回</el-button>
<el-button type="primary"
size="mini"
@click="addShow">自定义初始化</el-button>
</div>
<el-tabs v-model="activeName"
@tab-click="tabClick"
class="el-tabs">
<el-tab-pane label="居民端"
name="resi">
<c-table column-type="index"
ref="table_resi"
:url="tableUrl"
:params="tableParamsResi"
:operationWidth="80"
keyword="FootBarCustomize"
:operations="operations"
:orderOperations="orderOperations"
:tableHeight="tableHeight"
@editShow="editShow"
@changeState="changeState"
@moveUp="moveUp">
</c-table>
</el-tab-pane>
<el-tab-pane label="工作端"
name="gov">
<c-table column-type="index"
ref="table_work"
:url="tableUrl"
:params="tableParamsWork"
:operationWidth="80"
keyword="FootBar"
:operations="operations"
:orderOperations="orderOperations"
:tableHeight="tableHeight"
@editShow="editShow"
@changeState="changeState"
@moveUp="moveUp">
</c-table>
</el-tab-pane>
</el-tabs>
<edit ref="ref_edit"
@editDiaOK="editDiaOK">
</edit>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import CTable from '@c/CTableNoPage'
import Edit from './FootbarEdit'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading//
export default {
data () {
return {
activeName: 'resi',
customerId: '', // id
customerName: '', //
//
tableParamsWork: {
appType: 'gov',
},
tableParamsResi: {
appType: 'resi',
},
tableData: [],
//
tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/customerfootbars',
// tableUrl: '/oper/customize/customerfootbar/customerfootbars',
operations: [
{
lable: (display) => {
if (display === 0) {
return '隐藏'
} else {
return '显示'
}
}, //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'changeState', //
isShow: (row) => {
return true
}
},
{
lable: '修改', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'editShow', //
isShow: (row) => {
return true
}
}
],
orderOperations: [
{
style: 'width=100px;height=100px',
type: 'text',
icon: "el-icon-top",
methodName: 'moveUp', //
isShow: (row) => {
return true
}
},
],
//
form: {
dataUrl: [], // //url
data: { //
fromApp: [
{
value: 'resi',
label: '居民端'
},
{
value: 'gov',
label: '工作端'
}
]
}
}
}
},
components: {
CDialog, CTable, Edit
},
mounted () {
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80
},
...mapGetters(['clientHeight', 'env'])
},
activated () {
debugger
this.$nextTick(() => {
if (this.activeName === 'gov') {
this.$refs['table_work'].doLayout() //
} else if (this.activeName === 'resi') {
this.$refs['table_resi'].doLayout() //
}
})
},
methods: {
initData (customerId, customerName) {
this.customerId = customerId
this.customerName = customerName
this.tableParamsWork.customerId = customerId
this.tableParamsResi.customerId = customerId
this.loadResiTableData()
},
//
refresh () {
if (this.activeName === 'gov') {
this.loadWorkTableData() //
} else if (this.activeName === 'resi') {
this.loadResiTableData() //
}
},
tabClick (tab) {
if (tab.name === 'gov') {
this.loadWorkTableData() //
}
if (tab.name === 'resi') {
this.loadResiTableData() //
}
},
//
loadWorkTableData () {
this.$nextTick(() => {
this.$refs['table_work'].loadData() //
})
},
//
loadResiTableData () {
this.$nextTick(() => {
this.$refs['table_resi'].loadData() //
})
},
//
addShow () {
this.$refs['ref_edit'].init('', 'A', this.activeName)
},
//
editShow (row) {
this.$refs['ref_edit'].init(row.id, 'U')
},
//
changeState (row, index) {
let display = row.display === 0 ? 1 : 0
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/updatedisplaystatus'
// const url = '/oper/customize/customerfootbar/updatedisplaystatus'
const param = {
id: row.id,
display: display
}
window.app.ajax.post(url, param,
(data, rspMsg) => {
this.$message.success('操作成功' + rspMsg)
this.refresh()
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
},
//
moveUp (row, index) {
if (index > 0) {
this.tableData = this.$refs.table.getTableData() //
console.log(this.tableData)
this.startLoading()
let resultList = []
let one = {}
for (let i = 0; i < this.tableData.length; i++) {
let obj = {}
// eslint-disable-next-line
// debugger
if (i === index - 1) {
one.id = this.tableData[i].id
one.orderIndex = index
} else if (i === index) {
obj.id = this.tableData[i].id
obj.orderIndex = index - 1
resultList.push(obj)
resultList.push(one)
} else {
obj.id = this.tableData[i].id
obj.orderIndex = i
resultList.push(obj)
}
}
console.log(resultList)
// 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.endLoading()
this.loadTableData()
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
} else {
this.$message.warning('无法上移')
return false
}
},
//
diaCancel () {
this.$emit('cancleBack')
},
editDiaOK () {
this.refresh()
},
editDiaCancel () {
},
async renderSelData () { // //
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
}
}
</script>
<style>
.div_btn {
z-index: 10;
position: absolute;
right: 40px;
top: 35px;
/* margin: 0 0 20px 0; */
}
</style>

1
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

65
epmet-oper-web/src/views/modules/customer/init/RegisterList.vue

@ -31,7 +31,7 @@
</div>
</el-card>
<c-dialog :showFooter='false'
:title="'客户列表'"
:title="'Token信息'"
:isNest="false"
:visible="diaVisible"
:dialogHeight="1.1"
@ -42,6 +42,11 @@
ref="tokenForm"
:label-width="'120px'">
<div style="margin-top:20px">
<el-form-item label="客户名称"
prop="customerName">
<div class="item_width_1">
<span>{{tokenForm.customerName}}</span></div>
</el-form-item>
<el-form-item label="开发token"
prop="componentAccessToken">
<div class="item_width_1">
@ -134,11 +139,11 @@ export default {
plain: false,
methodName: 'showToken', //
isShow: (row) => {
if (this.env !== 'prod') {
return true
} else {
return false
}
// if (this.env !== 'prod') {
return true
// } else {
// return false
// }
}
}
],
@ -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
},

5
epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue

@ -80,7 +80,7 @@
<el-tag type="info"
class="eltag"
size="medium"
style="width:100%;margin-top:10px">管理员信息
style="width:100%;margin-top:10px">管理员信息
</el-tag><br /><br />
<el-form :inline="false"
:model="dataForm.managers[0]"
@ -228,6 +228,9 @@ export default {
window.app.ajax.post(url, params,
(data, rspMsg) => {
this.endLoading()
localStorage.setItem('customerName', this.dataForm.customerInfoDTO.customerName)
this.$emit('changeCustomerName', this.dataForm.customerInfoDTO.customerName)
this.$message.success('修改成功')
this.loadData()
},

12
epmet-oper-web/src/views/modules/customer/miniProAgent/version/SubmitForm.vue

@ -69,7 +69,7 @@
class="el-upload__tip">可上传小程序使用录屏最多上传1个视频视频支持mp4格式视频大小不超过20M</div>
</el-upload>
</el-form-item>
<el-form-item label="审核加急"
<!-- <el-form-item label="审核加急"
label-width="150px"
style="display:block">
<el-radio-group v-model="dataForm.isSpeed">
@ -77,7 +77,7 @@
<el-radio :label="true">加急 </el-radio>
</el-radio-group>
<div class="el-upload__tip">一年3次不加急预计在1-7天内完成加急预计再2-12小时内完成</div>
</el-form-item>
</el-form-item> -->
</el-form>
</el-tab-pane>
@ -189,6 +189,7 @@ export default {
sceneOtherDisabled: true, //
dataForm: {
isSpeed: false, //
isRepeat: false, // false
versionDesc: '', //
ugcDeclare: { // UGC
scene: [1, 2, 4], // UGC 0,, 1.,2.,3.,4.,5, ,scene0
@ -231,6 +232,7 @@ export default {
reseatDataForm () {
this.dataForm = {
isSpeed: false, //
isRepeat: false, // false
versionDesc: '', //
ugcDeclare: { // UGC
scene: [1, 2, 4], // UGC 0,, 1.,2.,3.,4.,5, ,scene0
@ -436,8 +438,10 @@ export default {
// console.log('')
// console.log(params.previewInfo.videoIdList)
}
//
params.isSpeed = this.dataForm.isSpeed
//
// params.isSpeed = this.dataForm.isSpeed
params.isSpeed = false
params.isRepeat = false// false
//
if (this.dataForm.versionDesc !== '') {

9
epmet-oper-web/src/views/modules/customer/miniProAgent/version/SubmitFormReject.vue

@ -60,8 +60,10 @@ export default {
return {
loading: false,
codeId: '', // id
isRepeat: false, //
dataForm: {
feedbackInfo: '', //
feedbackStuff: '' //
},
@ -91,8 +93,10 @@ export default {
...mapGetters(['clientHeight'])
},
methods: {
initData (codeId) {
initData (codeId, isRepeat) {
this.codeId = codeId
this.isRepeat = isRepeat //
},
reseatDataForm () {
this.dataForm = {
@ -165,7 +169,8 @@ export default {
submitCode () {
let params = {
codeId: this.codeId,
isSpeed: false
isSpeed: false,//false
isRepeat: this.isRepeat, //
}
//

25
epmet-oper-web/src/views/modules/customer/miniProAgent/version/VersionItem.vue

@ -86,11 +86,11 @@
size="mini"
type="primary"
@click="submitRecall">审核撤回</el-button>
<el-button v-if="audit.status==='auditing'||audit.status==='delay'"
<!-- <el-button v-if="!audit.isSpeed&&(audit.status==='auditing'||audit.status==='delay')"
class="btn_card"
size="mini"
type="primary"
@click="speedupaudit">加急申请</el-button>
@click="speedupaudit">加急申请</el-button> -->
<el-button v-if="audit.status==='audit_success'||audit.status==='release_failed'"
class="btn_card"
@ -132,6 +132,10 @@
label="上传时间">
<span>{{ audit.commitTime }}</span>
</el-form-item>
<!-- <el-form-item :label-width="labelWidth"
label="是否加急">
<span>{{ audit.isSpeedShow }}</span>
</el-form-item> -->
<el-form-item :label-width="labelWidth"
label="审核状态">
<span>{{ audit.statusShow }}</span>
@ -383,6 +387,12 @@ export default {
} else {
this.audit.statusShow = '审核延后'
}
// if (this.audit.isSpeed) {
// this.audit.isSpeedShow = ''
// } else {
// this.audit.isSpeedShow = ''
// }
}
this.commit = data.commit
@ -445,10 +455,11 @@ export default {
//
submitCodeRejectShow () {
if (this.audit.status === 'audit_failed') {
this.showSubmit = '2'
this.$refs['ref_submit_form_reject'].initData(this.audit.codeId)
this.showSubmit = '2'//div
// this.$refs['ref_submit_form_reject'].initData(this.audit.codeId, this.audit.isSpeed)
this.$refs['ref_submit_form_reject'].initData(this.audit.codeId, false)
} else {
this.showSubmit = '1'
this.showSubmit = '1'//div
this.$refs['ref_submit_form'].initData(this.audit.codeId)
}
},
@ -552,7 +563,8 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const url = 'https://epmet-cloud.elinkservice.cn/api/third/code/release'
this.startLoading()
const url = 'https://epmet-cloud.elinkservice.cn/api/third/code/speedupaudit'
// const url = '/third/code/speedupaudit'
const param = {
codeId: this.audit.codeId
@ -563,6 +575,7 @@ export default {
this.refresh()
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
}).catch(() => { })

48
epmet-oper-web/src/views/modules/home.vue

@ -1,15 +1,47 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-home">
<h3>{{ $t('home.desc.title') }}</h3>
<ul>
<li v-for="item in $t('home.desc.list')" :key="item" v-html="item"></li>
</ul>
</div>
</el-card>
<div>
<el-card v-if="userType==='oper'"
shadow="never"
class="aui-card--fill">
<div class="mod-home">
<h3>{{ $t('home.desc.title') }}</h3>
<ul>
<li v-for="item in $t('home.desc.list')"
:key="item"
v-html="item"></li>
</ul>
</div>
</el-card>
<customer-info @changeCustomerName="changeCustomerName"
v-if="userType==='work'"></customer-info>
</div>
</template>
<script>
import CustomerInfo from './customer/manage/CustomerInfo'
export default {
data () {
return {
// i18nMessages: messages,
updatePassowrdVisible: false,
customerName: localStorage.getItem('customerName'),
userType: localStorage.getItem('userType')
}
},
components: {
CustomerInfo
},
mounted () {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home')
},
methods: {
changeCustomerName (customerName) {
this.$emit('changeCustomerName', customerName)
},
}
}
</script>

4
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: {
//

105
epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue

@ -13,9 +13,19 @@
:label-width="'120px'">
<el-form-item label="功能名称"
prop="functionName">
<el-input class="item_width_1"
v-model="dataForm.functionName"
placeholder="功能名称"></el-input>
<el-tooltip class="item"
effect="dark"
content="请输入2-5个字"
placement="bottom-start">
<el-input class="item_width_1"
:maxlength="5"
:minlength="2"
v-model="dataForm.functionName"
placeholder="功能名称"></el-input>
</el-tooltip>
<div slot="tip"
class="el-upload__tip">2-5个字</div>
</el-form-item>
<el-form-item label="来源"
prop="fromApp">
@ -47,10 +57,12 @@
</el-form-item>
<el-form-item label="外链地址"
prop="targetLink">
<el-input class="item_width_1"
:disabled="isApply===1"
<el-input v-if="isApply===0"
class="item_width_1"
v-model="dataForm.targetLink"
placeholder="外链地址"></el-input>
<span v-else
style="width:300px;display:block;margin-bottom:10px; float:left">{{dataForm.targetLink}} </span>
</el-form-item>
<el-form-item prop="iconLargeImg"
@ -85,31 +97,40 @@
</el-upload>
</el-form-item>
<el-form-item prop="domainName"
<el-form-item prop="domainNameList"
class="block"
label="业务域名">
<div v-for="(item, index) in domainNameList"
:key="index">
<el-input :disabled="isApply===1"
style="width:300px;display:block;margin-bottom:10px; float:left"
placeholder='请输入业务域名'
v-model="domainNameList[index]"> </el-input>
<div v-if="type==='A'||isApply===0">
<div v-for="(item, index) in domainNameList"
:key="index">
<el-input :disabled="isApply===1"
style="width:300px;display:block;margin-bottom:10px; float:left"
placeholder='请输入业务域名'
v-model="domainNameList[index]"> </el-input>
<el-button v-if="index===0"
size="mini"
class="btn_serve"
type="primary"
icon="el-icon-plus"
@click="addRequest()"
circle></el-button>
<el-button v-if="index!==0"
size="mini"
type="danger"
class="btn_serve"
icon="el-icon-minus"
@click="delRequest(index)"
circle></el-button>
<el-button v-if="index===0&&isApply===0"
size="mini"
class="btn_serve"
type="primary"
icon="el-icon-plus"
@click="addRequest()"
circle></el-button>
<el-button v-if="index!==0&&isApply===0"
size="mini"
type="danger"
class="btn_serve"
icon="el-icon-minus"
@click="delRequest(index)"
circle></el-button>
</div>
</div>
<div v-else>
<div v-for="(item, index) in domainNameList"
:key="index">
<span style="width:300px;display:block;margin-bottom:10px; float:left">{{domainNameList[index]}} </span>
</div>
</div>
</el-form-item>
@ -184,28 +205,29 @@ export default {
dataRule () {
return {
functionName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
{ min: 2, max: 5, message: '功能名称长度在 2 到 5 个字符', trigger: 'blur' }
],
// domainName: [
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
// domainNameList: [
// { required: true, message: '', 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,17 +312,12 @@ export default {
},
saveForm () {
this.$refs['dataForm'].validate((valid) => {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
this.$message.error('表单验证失败!')
app.util.validateRule(messageObj)
} else {
if (this.dataForm.functionName.length > 5) {
this.$message.warning('功能名称长度不能大于5个字!')
return false
} else if (this.dataForm.functionName.length < 2) {
this.$message.warning('功能名称长度不能小于2个字!')
return false
}
// eslint-disable-next-line
// debugger
let domainName = ''

50
epmet-oper-web/src/views/modules/productConfig/footbar/FootbarDefault.vue

@ -0,0 +1,50 @@
<template>
<div>
<el-card shadow="never"
class="aui-card--fill">
<footbar-list ref="ref_footbarlist"
:showFrom="'default'"
:tableKeywork="'FootBar'"></footbar-list>
</el-card>
</div>
</template>
<script>
import FootbarList from './FootbarList'
export default {
data () {
return {
}
},
activated () {
this.$nextTick(() => {
this.$refs['ref_footbarlist'].doLayout() //
})
},
components: {
FootbarList
},
mounted () {
},
computed: {
},
methods: {
}
}
</script>
<style>
</style>

385
epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue

@ -0,0 +1,385 @@
<template>
<el-dialog :visible.sync="visible"
:title="'修改Footbar'"
:close-on-click-modal="false"
:before-close="handleClose"
:close-on-press-escape="false"
:width="diaWidth+'%'"
:top="diaTop">
<el-form :inline="showForm==='customize'"
:model="dataForm"
:rules="dataRule"
ref="dataForm"
:label-width="'120px'">
<el-form-item v-if="showForm==='default'"
label="Key"
prop="barKey">
<el-input :disabled="type==='U'"
class="item_width_1"
v-model="dataForm.barKey"
placeholder="Key"></el-input>
</el-form-item>
<el-form-item v-if="showForm==='customize'"
label="默认导航栏名称">
<div class="item_width_1">
<span>{{dataForm.defaultBarName}}</span>
</div>
</el-form-item>
<el-form-item label="导航栏名称"
prop="barName">
<el-tooltip class="item"
effect="dark"
content="请输入2-5个字"
placement="bottom-start">
<el-input class="item_width_1"
:maxlength="5"
:minlength="2"
v-model="dataForm.barName"
placeholder="导航栏名称"></el-input>
</el-tooltip>
</el-form-item>
<el-form-item v-if="showForm==='customize'"
label="默认页面标题">
<div class="item_width_1">
<span>{{dataForm.defaultPageTitle}}</span>
</div>
</el-form-item>
<el-form-item label="页面标题"
prop="pageTitle">
<el-tooltip class="item"
effect="dark"
content="请输入2-10个字"
placement="bottom-start">
<el-input class="item_width_1"
:maxlength="10"
:minlength="2"
v-model="dataForm.pageTitle"
placeholder="页面标题"></el-input>
</el-tooltip>
</el-form-item>
<el-form-item v-if="showForm==='default'"
label="App类型"
prop="appType">
<el-select :disabled="type==='U'"
class="item_width_1"
v-model="dataForm.appType"
placeholder="请选择"
clearable>
<el-option v-for="item in fromAppList"
:key="item.dictValue"
:label="item.dictName"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="showForm==='customize'"
label="默认图标">
<div class="item_width_1">
<img :src="dataForm.defaultIconPath"
style="width:60px;height:60px"
class="function-icon">
</div>
</el-form-item>
<el-form-item label="图标">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="function (res, file) { return handleImgSuccess(res, file, '')}"
:before-upload="beforeImgUpload">
<img v-if="dataForm.iconPath"
:src="dataForm.iconPath"
style="width:60px;height:60px"
class="function-icon">
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<el-button v-if="showForm==='customize'"
class="btn_reset"
type="primary"
size="mini"
@click="resetIcon">恢复默认</el-button>
</el-form-item>
<el-form-item v-if="showForm==='customize'"
label="默认选中图标">
<div class="item_width_1">
<img :src="dataForm.defaultSelectedIconPath"
style="width:60px;height:60px"
class="function-icon">
</div>
</el-form-item>
<el-form-item label="选中图标">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="function (res, file) { return handleImgSuccess(res, file, 'sel')}"
:before-upload="beforeImgUpload">
<img v-if="dataForm.selectedIconPath"
:src="dataForm.selectedIconPath"
style="width:60px;height:60px"
class="function-icon">
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<el-button v-if="showForm==='customize'"
class="btn_reset"
type="primary"
size="mini"
@click="resetSelectIcon">恢复默认</el-button>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary"
@click="saveForm()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading//
export default {
data () {
return {
visible: false,
title: '新增Footbar',
type: '', // A/U
id: '', // id
showForm: 'default',//defaultcustomize
dataForm: {
customerId: '',
barName: '',
defaultBarName: '',
barKey: '',
appType: '',
defaultPageTitle: '',
pageTitle: '',
iconPath: '',
defaultIconPath: '',
selectedIconPath: '',
defaultSelectedIconPath: ''
},
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload',
fromAppList: [
{
'dictName': '工作端',
'dictValue': 'gov'
}, {
'dictName': '居民端',
'dictValue': 'resi'
}
]
}
},
created () {
// this.queryFunctionList()
},
computed: {
dataRule () {
return {
barKey: [
{ required: true, message: 'Key不能为空', trigger: 'blur' }
],
barName: [
{ required: true, message: '导航栏标题不能为空', trigger: 'blur' },
{ min: 2, max: 5, message: '导航栏标题长度在 2 到 5 个字符', trigger: 'blur' }
],
appType: [
{ required: true, message: '类型不能为空', trigger: 'blur' }
],
pageTitle: [
{ required: true, message: '页面标题不能为空', trigger: 'blur' },
{ min: 2, max: 10, message: '页面标题长度在 2 到 10 个字符', trigger: 'blur' }
]
// iconPath: [
// { required: true, message: '', trigger: 'blur' }
// ],
// selectedIconPath: [
// { required: true, message: '', trigger: 'blur' }
// ]
}
},
diaWidth () {
return this.resolution === 'small' ? 60 : 50
},
diaTop () {
return this.resolution === 'small' ? '30px' : '100px'
},
...mapGetters(['clientHeight', 'resolution']),
},
methods: {
init (id, type, appType, showForm) {
this.type = type
this.showForm = showForm
this.visible = true
this.id = id
if (type === 'A') {
this.title = '新增Footbar'
this.dataForm = {
customerId: '',
barName: '',
defaultBarName: '',
barKey: '',
appType: appType,
defaultPageTitle: '',
pageTitle: '',
iconPath: '',
defaultIconPath: '',
selectedIconPath: '',
defaultSelectedIconPath: ''
}
} else {
this.title = '修改Footbar'
this.loadFormData()
}
},
loadFormData () {
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/footbardetail'
const url = '/oper/customize/customerfootbar/footbardetail'
let _data = {
id: this.id
}
this.startLoading()
window.app.ajax.post(url, _data,
(data, rspMsg) => {
this.endLoading()
this.dataForm = data
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
},
//
resetIcon () {
this.dataForm.iconPath = this.dataForm.defaultIconPath
},
//
resetSelectIcon () {
this.dataForm.selectedIconPath = this.dataForm.defaultSelectedIconPath
},
//
handleImgSuccess (res, file, type) {
if (res.code === 0 && res.msg === 'success') {
if (type === 'sel') {
this.dataForm.selectedIconPath = res.data.url
} else if (type === '') {
this.dataForm.iconPath = res.data.url
}
} else {
this.$message.error(res.msg)
}
},
beforeImgUpload (file) {
// const isPNG = file.type === 'image/png'
const isLt1M = file.size / 1024 < 20
// if (!isPNG) {
// this.$message.error(' PNG !')
// }
if (!isLt1M) {
this.$message.error('上传图片大小不能超过20k!')
}
// return isPNG && isLt1M
return isLt1M
},
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)
})
}
})
},
handleClose () {
this.visible = false
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
}
}
</script>
<style scoped>
.function-icon {
width: 28px;
}
.item_width_1 {
width: 200px;
}
.item_width_2 {
width: 500px;
}
.block {
display: block;
}
.btn_serve {
float: left;
margin-top: 4px;
margin-left: 10px;
vertical-align: bottom;
}
.btn_reset {
vertical-align: bottom;
margin-left: 10px;
}
</style>

449
epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue

@ -0,0 +1,449 @@
<template>
<div>
<div v-if="showFrom==='customize'"
class="div_btn_customize">
<span style="margin-right:20px">{{customerName}}</span>
<el-button type="default"
size="mini"
@click="diaCancel">取消返回</el-button>
<el-button type="primary"
size="mini"
@click="initDefault">自定义初始化</el-button>
</div>
<div v-if="showFrom==='default'"
class="div_btn_default">
<el-button type="primary"
size="mini"
@click="addShow">新增</el-button>
</div>
<el-tabs v-model="activeName"
@tab-click="tabClick"
class="el-tabs">
<el-tab-pane label="居民端"
name="resi">
<c-table column-type="index"
ref="table_resi"
:url="tableUrl"
:params="tableParamsResi"
:operationWidth="80"
:keyword="tableKeywork"
:operations="operations"
:orderOperations="orderOperations"
:tableHeight="tableHeight"
@editShow="editShow"
@changeState="changeState"
@moveUp="moveUp"
@del="del">
</c-table>
</el-tab-pane>
<el-tab-pane label="工作端"
name="gov">
<c-table column-type="index"
ref="table_work"
:url="tableUrl"
:params="tableParamsWork"
:operationWidth="80"
:keyword="tableKeywork"
:operations="operations"
:orderOperations="orderOperations"
:tableHeight="tableHeight"
@editShow="editShow"
@changeState="changeState"
@moveUp="moveUp"
@del="del">
</c-table>
</el-tab-pane>
</el-tabs>
<edit ref="ref_edit"
@editDiaOK="editDiaOK">
</edit>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import CTable from '@c/CTableNoPage'
import Edit from './FootbarEdit'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading//
export default {
data () {
return {
activeName: 'resi',
customerId: '', // id
customerName: '', //
//
tableParamsWork: {
appType: 'gov',
customerId: 'default'
},
tableParamsResi: {
appType: 'resi',
customerId: 'default'
},
tableData: [],
//
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/customerfootbars',
tableUrl: '/oper/customize/customerfootbar/customerfootbars4oper',
operations: [
{
lable: (display) => {
if (display === true) {
return '隐藏'
} else {
return '显示'
}
}, //
key: 'display',
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'changeState', //
isShow: (row) => {
return true
}
},
{
lable: '修改', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'editShow', //
isShow: (row) => {
return true
}
},
{
lable: '删除', //
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
slot: '',
plain: false,
methodName: 'del', //
isShow: (row) => {
if (this.env === 'prod' || this.showFrom === 'customize') {
return false
} else {
return true
}
}
}
],
orderOperations: [
// <el-button type="text"
// style="width=100px;height=100px"
// @click.stop="moveUpResi( scope.$index)"
// icon="el-icon-top"></el-button>
{
style: 'width=100px;height=100px',
type: 'text',
icon: "el-icon-top",
methodName: 'moveUp', //
isShow: (row) => {
return true
}
},
],
//
form: {
dataUrl: [], // //url
data: { //
fromApp: [
{
value: 'resi',
label: '居民端'
},
{
value: 'gov',
label: '工作端'
}
]
}
}
}
},
components: {
CDialog, CTable, Edit
},
mounted () {
this.activeName = 'resi'
if (this.showFrom === 'default') {//
this.tableParamsWork.customerId = 'default'
this.tableParamsResi.customerId = 'default'
this.loadResiTableData()
} else if (this.showFrom === 'customize') {//
}
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80
},
...mapGetters(['clientHeight', 'env'])
},
methods: {
doLayout () {
this.$nextTick(() => {
if (this.activeName === 'gov') {
this.$refs['table_work'].doLayout() //
} else if (this.activeName === 'resi') {
this.$refs['table_resi'].doLayout() //
}
})
},
initData (customerId, customerName) {
this.customerId = customerId
this.customerName = customerName
this.tableParamsWork.customerId = customerId
this.tableParamsResi.customerId = customerId
this.loadResiTableData()
},
//
refresh () {
if (this.activeName === 'gov') {
this.loadWorkTableData() //
} else if (this.activeName === 'resi') {
this.loadResiTableData() //
}
},
tabClick (tab) {
if (tab.name === 'gov') {
this.loadWorkTableData() //
}
if (tab.name === 'resi') {
this.loadResiTableData() //
}
},
//
loadWorkTableData () {
this.$nextTick(() => {
this.$refs['table_work'].loadData() //
})
},
//
loadResiTableData () {
this.$nextTick(() => {
this.$refs['table_resi'].loadData() //
})
},
//
addShow () {
this.$refs['ref_edit'].init('', 'A', this.activeName, this.showFrom)
},
//
editShow (row) {
this.$refs['ref_edit'].init(row.id, 'U', this.activeName, this.showFrom)
},
//
changeState (row, index) {
let display = row.display ? 0 : 1
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/updatedisplaystatus'
const url = '/oper/customize/customerfootbar/updatedisplaystatus'
const param = {
id: row.id,
display: display
}
window.app.ajax.post(url, param,
(data, rspMsg) => {
this.$message.success('操作成功' + rspMsg)
this.refresh()
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
},
//
moveUp (row, index) {
if (index > 0) {
if (this.activeName == 'resi') {
this.tableData = this.$refs['table_resi'].getTableData() //
} else {
this.tableData = this.$refs['table_work'].getTableData() //
}
console.log(this.tableData)
this.startLoading()
let resultList = []
let one = {}
for (let i = 0; i < this.tableData.length; i++) {
let obj = {}
// eslint-disable-next-line
if (i === index - 1) {
one.id = this.tableData[i].id
one.orderIndex = index
} else if (i === index) {
obj.id = this.tableData[i].id
obj.orderIndex = index - 1
resultList.push(obj)
resultList.push(one)
} else {
obj.id = this.tableData[i].id
obj.orderIndex = i
resultList.push(obj)
}
}
console.log(resultList)
let params = {
orderList: resultList
}
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/saveorder'
const url = '/oper/customize/customerfootbar/saveorder'
window.app.ajax.post(url, params,
(data, rspMsg) => {
this.endLoading()
if (this.activeName == 'resi') {
this.loadResiTableData()
} else {
this.loadWorkTableData()
}
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
} else {
this.$message.warning('无法上移')
return false
}
},
//
initDefault (row) {
this.$confirm('确认初始化客户Footbar', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/initdefault4customer'
const url = '/oper/customize/customerfootbar/initdefault4customer'
const param = {
customerId: this.customerId,
appType: this.activeName
}
window.app.ajax.post(url, param,
(data, rspMsg) => {
this.$message.success('初始化成功' + rspMsg)
this.refresh()
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
}).catch(() => {
})
},
//
del (row) {
this.$confirm('确认删除当前导航', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/deletefootbar'
const url = '/oper/customize/customerfootbar/deletefootbar'
const param = {
id: row.id
}
window.app.ajax.post(url, param,
(data, rspMsg) => {
this.$message.success('删除成功' + rspMsg)
this.refresh()
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
}).catch(() => {
})
},
//
diaCancel () {
this.$emit('cancleBack')
},
editDiaOK () {
this.refresh()
},
editDiaCancel () {
},
async renderSelData () { // //
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
props: {
showFrom: {
type: String,
default: 'default'
},
//table
tableKeywork: {
type: String,
default: 'FootBar'
}
}
}
</script>
<style>
.div_btn_default {
z-index: 10;
position: absolute;
right: 40px;
top: 35px;
/* margin: 0 0 20px 0; */
}
.div_btn_customize {
z-index: 10;
position: absolute;
right: 40px;
top: 35px;
/* margin: 0 0 20px 0; */
}
</style>

9
epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue

@ -4,11 +4,11 @@
shadow="never"
class="aui-card--fill">
<el-button type="text"
size="small"
@click="startSetWxIndex('', '', 0)">居民端</el-button>
size="small"
@click="startSetWxIndex('', '', 0)">居民端</el-button>
<el-button type="text"
size="small"
@click="startSetWxIndex('', '', 1)">工作端</el-button>
size="small"
@click="startSetWxIndex('', '', 1)">工作端</el-button>
</el-card>
<div class="m-wx_index"
@ -543,7 +543,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

1
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

14
epmet-oper-web/src/views/pages/login.vue

@ -12,7 +12,7 @@
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
status-icon>
<el-form-item>
<!-- <el-form-item>
<el-select v-model="$i18n.locale"
class="w-percent-100">
<el-option v-for="(val, key) in i18nMessages"
@ -20,7 +20,7 @@
:label="val._lang"
:value="key"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item prop="phone">
<el-input v-model="dataForm.phone"
placeholder="手机号">
@ -113,13 +113,13 @@ export default {
dataRule () {
return {
phone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '手机号不能为空', trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '密码不能为空', trigger: 'blur' }
],
captcha: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '验证码不能为空', trigger: 'blur' }
]
}
}
@ -135,9 +135,9 @@ export default {
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs['dataForm'].validate((valid) => {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
return false
app.util.validateRule(messageObj)
}
this.$http.post('/auth/login/operweb/loginbypassword', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {

14
epmet-oper-web/src/views/pages/loginWork.vue

@ -13,7 +13,7 @@
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
status-icon>
<el-form-item>
<!-- <el-form-item>
<el-select v-model="$i18n.locale"
class="w-percent-100">
<el-option v-for="(val, key) in i18nMessages"
@ -21,7 +21,7 @@
:label="val._lang"
:value="key"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item prop="phone">
<el-input v-model="dataForm.phone"
placeholder="手机号">
@ -178,13 +178,13 @@ export default {
dataRule () {
return {
phone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '手机号不能为空', trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '密码不能为空', trigger: 'blur' }
],
captcha: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
{ required: true, message: '验证码不能为空', trigger: 'blur' }
]
}
}
@ -201,9 +201,9 @@ export default {
},
//
dataFormSubmitHandle () {
this.$refs['dataForm'].validate((valid) => {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
return false
app.util.validateRule(messageObj)
}
this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/customerstaff/customerlist'

Loading…
Cancel
Save