Browse Source

footbar联调

master
jiangyy 5 years ago
parent
commit
f567853533
  1. 12
      epmet-oper-web/src/js/columns/productConfig/footBar.js
  2. 17
      epmet-oper-web/src/js/util.js
  3. 1
      epmet-oper-web/src/views/components/CTable.vue
  4. 5
      epmet-oper-web/src/views/components/CTableNoPage.vue
  5. 1
      epmet-oper-web/src/views/main-content.vue
  6. 30
      epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue
  7. 21
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  8. 41
      epmet-oper-web/src/views/modules/customer/customize/FootbarEdit.vue
  9. 23
      epmet-oper-web/src/views/modules/customer/customize/FootbarList.vue
  10. 31
      epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue
  11. 50
      epmet-oper-web/src/views/modules/productConfig/footbar/FootbarDefault.vue
  12. 99
      epmet-oper-web/src/views/modules/productConfig/footbar/FootbarEdit.vue
  13. 247
      epmet-oper-web/src/views/modules/productConfig/footbar/FootbarList.vue
  14. 10
      epmet-oper-web/src/views/pages/login.vue
  15. 10
      epmet-oper-web/src/views/pages/loginWork.vue
  16. BIN
      epmet-oper-web/web-src.rar

12
epmet-oper-web/src/js/columns/productConfig/footBar.js

@ -54,9 +54,9 @@ export default {
block: true,
width: 80,
format: (cellValue, index) => {
if (cellValue === 0) {
if (cellValue === false) {
return '隐藏'
} else if (cellValue === 1) {
} else if (cellValue === true) {
return '显示'
} else {
return '未知'
@ -66,12 +66,12 @@ export default {
],
customize: [
{
key: 'defaultName',
key: 'defaultBarName',
title: '默认导航栏名称',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 80
width: 100
},
{
key: 'barName',
@ -119,9 +119,9 @@ export default {
block: true,
width: 80,
format: (cellValue, index) => {
if (cellValue === 0) {
if (cellValue === false) {
return '隐藏'
} else if (cellValue === 1) {
} 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

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>

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

@ -115,6 +115,7 @@
<!--传入的操作按钮属性 lyx 20190411 -->
<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
@ -202,6 +203,7 @@ export default {
// })
},
computed: {
//
operationWidth: function() {
@ -223,6 +225,9 @@ export default {
...mapGetters(['resolution'])
},
methods: {
doLayout () {
this.$refs.table.doLayout() //
},
render () {
this.loadData()
},

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

@ -66,7 +66,6 @@ export default {
},
// tabs, tab
tabSelectedHandle (tab) {
alert(111)
tab = this.$store.state.contentTabs.filter(item => item.name === tab.name)[0]
if (tab) {
this.$router.push({

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

@ -18,9 +18,14 @@
</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"
v-model="dataForm.functionName"
placeholder="功能名称"></el-input>
</el-tooltip>
</el-form-item>
</div>
<div style="margin-top:20px">
@ -126,13 +131,14 @@ 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' }
]
}
@ -191,17 +197,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'

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

@ -28,10 +28,13 @@
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')"
@ -75,7 +78,9 @@
@cancleBack="cancleBack"></config-item>
</div>
<div v-show="showType==='footbar'">
<footbar-list ref="ref_footbar"
<footbar-list ref="ref_footbarlist"
:showFrom="'customize'"
:tableKeywork="'FootBarCustomize'"
@cancleBack="cancleBack"></footbar-list>
</div>
@ -95,7 +100,7 @@
<script>
import ConfigItem from './ConfigItem'
import FootbarList from './FootbarList'
import FootbarList from '../../productConfig/footbar/FootbarList'
import MiniHome from './MiniHome'
import RoleList from './roleList'
export default {
@ -125,8 +130,12 @@ export default {
RoleList,
FootbarList
},
created () {
activated () {
if (this.showType === 'footbar') {
this.$nextTick(() => {
this.$refs['ref_footbarlist'].doLayout() //
})
}
},
mounted () {
@ -184,7 +193,7 @@ export default {
// footbar
showFootbar (customerId, customerName) {
this.showType = 'footbar'
this.$refs['ref_footbar'].initData(customerId, customerName)
this.$refs['ref_footbarlist'].initData(customerId, customerName)
},
//

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

@ -11,8 +11,7 @@
:rules="dataRule"
ref="dataForm"
:label-width="'120px'">
<el-form-item label="默认导航栏名称"
prop="defaultName">
<el-form-item label="默认导航栏名称">
<div class="item_width_1">
<span>{{dataForm.defaultName}}</span>
</div>
@ -22,21 +21,28 @@
<el-tooltip class="item"
effect="dark"
content="请输入2-5个字"
placement="top-start">
placement="bottom-start">
<el-input class="item_width_1"
oninput="if(value.length>5)value=value.slice(0,5)"
: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="top-start">
placement="bottom-start">
<el-input class="item_width_1"
oninput="if(value.length>10)value=value.slice(0,10)"
:maxlength="10"
:minlength="2"
v-model="dataForm.pageTitle"
placeholder="页面标题"></el-input>
</el-tooltip>
@ -140,13 +146,15 @@ export default {
{ required: true, message: 'Key不能为空', trigger: 'blur' }
],
barName: [
{ required: true, message: '导航栏标题不能为空', trigger: 'blur' }
{ 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' }
{ required: true, message: '页面标题不能为空', trigger: 'blur' },
{ min: 2, max: 10, message: '页面标题长度在 2 到 10 个字符', trigger: 'blur' }
],
iconPath: [
{ required: true, message: '图标不能为空', trigger: 'blur' }
@ -229,22 +237,8 @@ export default {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
let message = ''
for (var oneObj in messageObj) {
// debugger
// console.log(messageObj[oneObj])
message = message + (messageObj[oneObj])[0].message + ' \n '
}
// message = message.substring(0, message.length - 1)
this.$message.error(message)
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
// }
let url = ''
if (this.type === 'U') {
@ -254,6 +248,7 @@ export default {
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) => {

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

@ -76,10 +76,10 @@ export default {
//
tableParamsWork: {
appType: 'gov'
appType: 'gov',
},
tableParamsResi: {
appType: 'resi'
appType: 'resi',
},
tableData: [],
//
@ -120,10 +120,7 @@ export default {
}
],
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',
@ -167,10 +164,24 @@ export default {
},
...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()
},
//

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

@ -16,9 +16,8 @@
<el-tooltip class="item"
effect="dark"
content="请输入2-5个字"
placement="top-start">
placement="bottom-start">
<el-input class="item_width_1"
oninput="if(value.length>5)value=value.slice(0,5)"
v-model="dataForm.functionName"
placeholder="功能名称"></el-input>
</el-tooltip>
@ -94,7 +93,7 @@
</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"
@ -193,11 +192,12 @@ export default {
dataRule () {
return {
functionName: [
{ required: true, message: '功能名称不能为空', trigger: 'blur' }
],
domainName: [
{ required: true, message: '业务域名不能为空', trigger: 'blur' }
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
{ min: 2, max: 5, message: '功能名称长度在 2 到 5 个字符', trigger: 'blur' }
],
// domainNameList: [
// { required: true, message: '', trigger: 'blur' }
// ],
iconLargeImg: [
{ required: true, message: '大图标不能为空', trigger: 'blur' }
],
@ -302,22 +302,9 @@ export default {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
let message = ''
for (var oneObj in messageObj) {
// debugger
// console.log(messageObj[oneObj])
message = message + (messageObj[oneObj])[0].message + ' \n '
}
// message = message.substring(0, message.length - 1)
this.$message.error(message)
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>

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

@ -11,7 +11,8 @@
:rules="dataRule"
ref="dataForm"
:label-width="'120px'">
<el-form-item label="Key"
<el-form-item v-if="showForm==='default'"
label="Key"
prop="barKey">
<el-input :disabled="type==='U'"
@ -20,32 +21,47 @@
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="top-start">
placement="bottom-start">
<el-input class="item_width_1"
oninput="if(value.length>5)value=value.slice(0,5)"
: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="top-start">
placement="bottom-start">
<el-input class="item_width_1"
oninput="if(value.length>10)value=value.slice(0,10)"
:maxlength="10"
:minlength="2"
v-model="dataForm.pageTitle"
placeholder="页面标题"></el-input>
</el-tooltip>
</el-form-item>
<el-form-item label="App类型"
<el-form-item v-if="showForm==='default'"
label="App类型"
prop="appType">
<el-select :disabled="type==='U'"
class="item_width_1"
@ -60,6 +76,14 @@
</el-select>
</el-form-item>
<el-form-item v-if="showForm==='customize'"
label="默认图标">
<img :src="dataForm.defaultIconPath"
style="width:70px;height:70px"
class="function-icon">
</el-form-item>
<el-form-item prop="iconPath"
label="图标">
<el-upload class="item_width_1 avatar-uploader"
@ -75,7 +99,14 @@
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item v-if="showForm==='customize'"
label="默认选中图标">
<img :src="dataForm.defaultSelectedIconPath"
style="width:70px;height:70px"
class="function-icon">
</el-form-item>
<el-form-item prop="selectedIconPath"
label="选中图标">
<el-upload class="item_width_1 avatar-uploader"
@ -111,14 +142,19 @@ export default {
visible: false,
type: '', // A/U
id: '', // id
showForm: 'default',//defaultcustomize
dataForm: {
customerId: '',
barName: '',
defaultBarName: '',
barKey: '',
appType: '',
defaultPageTitle: '',
pageTitle: '',
iconPath: '',
selectedIconPath: ''
defaultIconPath: '',
selectedIconPath: '',
defaultSelectedIconPath: ''
},
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload',
@ -143,13 +179,16 @@ export default {
{ required: true, message: 'Key不能为空', trigger: 'blur' }
],
barName: [
{ required: true, message: '导航栏标题不能为空', trigger: 'blur' }
{ 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' }
{ required: true, message: '页面标题不能为空', trigger: 'blur' },
{ min: 2, max: 10, message: '页面标题长度在 2 到 10 个字符', trigger: 'blur' }
],
iconPath: [
{ required: true, message: '图标不能为空', trigger: 'blur' }
@ -161,8 +200,10 @@ export default {
}
},
methods: {
init (id, type, appType) {
init (id, type, appType, showForm) {
this.type = type
this.showForm = showForm
this.visible = true
this.id = id
@ -170,11 +211,15 @@ export default {
this.dataForm = {
customerId: '',
barName: '',
defaultBarName: '',
barKey: '',
appType: appType,
defaultPageTitle: '',
pageTitle: '',
iconPath: '',
selectedIconPath: ''
defaultIconPath: '',
selectedIconPath: '',
defaultSelectedIconPath: ''
}
} else {
@ -183,8 +228,8 @@ export default {
},
loadFormData () {
const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/footbardetail'
// const url = '/oper/customize/customerfootbar/footbardetail'
// 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
}
@ -206,7 +251,7 @@ export default {
if (res.code === 0 && res.msg === 'success') {
if (type === 'sel') {
this.dataForm.selectedIconPath = res.data.url
} else if (type === 'small') {
} else if (type === '') {
this.dataForm.iconPath = res.data.url
}
} else {
@ -222,7 +267,7 @@ export default {
// this.$message.error(' PNG !')
// }
if (!isLt1M) {
this.$message.error('上传图片大小不能超过 1MB!')
this.$message.error('上传图片大小不能超过20k!')
}
// return isPNG && isLt1M
return isLt1M
@ -232,30 +277,16 @@ export default {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
let message = ''
for (var oneObj in messageObj) {
// debugger
// console.log(messageObj[oneObj])
message = message + (messageObj[oneObj])[0].message + ' \n '
}
// message = message.substring(0, message.length - 1)
this.$message.error(message)
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
// }
let url = ''
if (this.type === 'U') {
// url = '/oper/customize/customerfootbar/updatefootbar'
url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/updatefootbar'
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'
// url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/createfootbar'
url = '/oper/customize/customerfootbar/createfootbar'
this.dataForm.id = ''
}
window.app.ajax.post(url, this.dataForm,

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

@ -1,55 +1,64 @@
<template>
<div>
<el-card shadow="never"
class="aui-card--fill">
<div class="div_btn">
<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="FootBar"
: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="FootBar"
:operations="operations"
:orderOperations="orderOperations"
:tableHeight="tableHeight"
@editShow="editShow"
@changeState="changeState"
@moveUp="moveUp"
@del="del">
</c-table>
</el-tab-pane>
</el-tabs>
</el-card>
<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">
@ -73,28 +82,33 @@ export default {
data () {
return {
activeName: 'resi',
customerId: '', // id
customerName: '', //
//
tableParamsWork: {
appType: 'gov'
appType: 'gov',
customerId: 'default'
},
tableParamsResi: {
appType: 'resi'
appType: 'resi',
customerId: 'default'
},
tableData: [],
//
tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/customerfootbars',
// tableUrl: '/oper/customize/customerfootbar/customerfootbars',
// tableUrl: 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/customerfootbars',
tableUrl: '/oper/customize/customerfootbar/customerfootbars4oper',
operations: [
{
lable: (display) => {
if (display === 0) {
if (display === true) {
return '隐藏'
} else {
return '显示'
}
}, //
key: 'display',
size: 'mini',
style: 'margin: 0 6px;',
type: 'text',
@ -126,7 +140,7 @@ export default {
plain: false,
methodName: 'del', //
isShow: (row) => {
if (env === 'prod') {
if (this.env === 'prod' || this.showFrom === 'customize') {
return false
} else {
return true
@ -174,8 +188,15 @@ export default {
},
mounted () {
this.renderSelData()
this.loadResiTableData()
this.activeName = 'resi'
if (this.showFrom === 'default') {//
this.tableParamsWork.customerId = 'default'
this.tableParamsResi.customerId = 'default'
this.loadResiTableData()
} else if (this.showFrom === 'customize') {//
}
},
computed: {
tableHeight () {
@ -184,9 +205,27 @@ export default {
...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') {
@ -215,17 +254,17 @@ export default {
},
//
addShow () {
this.$refs['ref_edit'].init('', 'A', this.activeName)
this.$refs['ref_edit'].init('', 'A', this.activeName, this.showFrom)
},
//
editShow (row) {
this.$refs['ref_edit'].init(row.id, 'U')
this.$refs['ref_edit'].init(row.id, 'U', this.activeName, this.showFrom)
},
//
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'
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
@ -243,7 +282,11 @@ export default {
moveUp (row, index) {
if (index > 0) {
this.tableData = this.$refs.table.getTableData() //
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 = []
@ -251,7 +294,7 @@ export default {
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
@ -267,13 +310,21 @@ export default {
}
}
console.log(resultList)
let params = {
orderList: 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,
// 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()
this.loadTableData()
if (this.activeName == 'resi') {
this.loadResiTableData()
} else {
this.loadWorkTableData()
}
},
(rspMsg, data) => {
this.endLoading()
@ -287,6 +338,31 @@ export default {
}
},
//
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('确认删除当前导航', '提示', {
@ -294,8 +370,8 @@ export default {
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 url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfootbar/deletefootbar'
const url = '/oper/customize/customerfootbar/deletefootbar'
const param = {
id: row.id
}
@ -311,7 +387,10 @@ export default {
})
},
//
diaCancel () {
this.$emit('cancleBack')
},
editDiaOK () {
this.refresh()
},
@ -338,11 +417,29 @@ export default {
loading.close()
}
}
},
props: {
showFrom: {
type: String,
default: 'default'
},
//table
tableKeywork: {
type: String,
default: 'FootBar'
}
}
}
</script>
<style>
.div_btn {
.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;

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

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

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

@ -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'

BIN
epmet-oper-web/web-src.rar

Binary file not shown.
Loading…
Cancel
Save