Browse Source

pc端人员管理

master
jiangyy 5 years ago
parent
commit
de122e39e9
  1. 52
      epmet-oper-web/src/js/columns/customer/manage/customer.js
  2. 3
      epmet-oper-web/src/js/store/modules/user.js
  3. 3
      epmet-oper-web/src/main.js
  4. 3
      epmet-oper-web/src/views/components/CTable.vue
  5. 32
      epmet-oper-web/src/views/main.vue
  6. 16
      epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue
  7. 333
      epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
  8. 1
      epmet-oper-web/src/views/modules/customer/manage/CustomerList.vue
  9. 9
      epmet-oper-web/src/views/modules/productConfig/customizeFunction/Edit.vue
  10. 2
      epmet-oper-web/src/views/modules/sys/user.vue

52
epmet-oper-web/src/js/columns/customer/manage/customer.js

@ -26,22 +26,24 @@ export default {
width: 100
},
{
key: 'organizationLevels',
key: 'organizationLevel',
title: '组织级别',
display: ['table', 'model'],
fixed: false,
block: true,
width: 50,
width: 60,
format: (cellValue, index) => {
// 客户组织级别:0.省级,1市级,2.区县级,3.乡镇街道级 字典表key:organizationlevel
if (cellValue === '0') {
//机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province)
if (cellValue === 'province') {
return '省级'
} else if (cellValue === '1') {
} else if (cellValue === 'city') {
return '市级'
} else if (cellValue === '2') {
} else if (cellValue === 'district') {
return '区县级'
} else if (cellValue === '3') {
} else if (cellValue === 'street') {
return '乡镇街道级'
} else if (cellValue === 'community') {
return '社区级'
} else {
return '未知'
}
@ -75,7 +77,7 @@ export default {
},
{
key: 'rootManageName',
title: '管理员',
title: '管理员',
display: ['table', 'model'],
type: 'input',
rule: [
@ -105,22 +107,22 @@ export default {
}
],
configForm: [
{
key: 'customerName',
title: '客户名称',
display: ['formA', 'formU', 'table', 'model'],
type: 'input',
rule: [
{
required: true,
message: '请输入客户名称',
trigger: 'blur'
}
],
fixed: false,
block: true,
width: 100
},
// {
// key: 'customerName',
// title: '客户名称',
// display: ['formA', 'formU', 'table', 'model'],
// type: 'input',
// rule: [
// {
// required: true,
// message: '请输入客户名称',
// trigger: 'blur'
// }
// ],
// fixed: false,
// block: true,
// width: 100
// },
{
key: 'validityTime',
title: '有效期',
@ -155,7 +157,7 @@ export default {
width: 100
},
{
key: 'gridNumber',
key: 'maxGridNumber',
title: '最大网格数',
display: ['formA', 'formU', 'table', 'model'],
type: 'counter',

3
epmet-oper-web/src/js/store/modules/user.js

@ -3,6 +3,7 @@ export default {
id: 0,
name: '',
realName: '',
superAdmin: 0
superAdmin: 0,
customerId: ''
}
}

3
epmet-oper-web/src/main.js

@ -17,7 +17,6 @@ import renProcessRunning from '@/components/ren-process-running'
import renProcessDetail from '@/components/ren-process-detail'
import renDeptTree from '@/components/ren-dept-tree'
import renRegionTree from '@/components/ren-region-tree'
import { getDictLabel } from '@/utils'
import cloneDeep from 'lodash/cloneDeep'
// axios封装
@ -57,7 +56,7 @@ Vue.use(Element, {
// 挂载全局
Vue.prototype.$http = http
Vue.prototype.$getDictLabel = getDictLabel
// Vue.prototype.$getDictLabel = getDictLabel
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)

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

@ -60,7 +60,8 @@
:header-align="headerAlign"
:formatter="col.formatter">
<template slot-scope="scope">
<img :src="scope.row[col.key]"
<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'">

32
epmet-oper-web/src/views/main.vue

@ -53,7 +53,6 @@ export default {
Promise.all([
this.getWorkUserInfo(),
]).then(() => {
this.loading = false
})
@ -105,23 +104,38 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$store.state.user.id = res.data.id
this.$store.state.user.realName = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin
this.$store.state.user.customerId = ''
}).catch(() => { })
},
//
getWorkUserInfo () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
let params = {
}
window.app.ajax.post(url, params,
(data, rspMsg) => {
return this.$http.get(url).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$store.state.user.id = res.data.id
this.$store.state.user.realName = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin
}).catch(() => { })
this.$store.state.user.id = data.id
this.$store.state.user.realName = data.realName
this.$store.state.user.superAdmin = data.superAdmin
this.$store.state.user.customerId = data.customerId
console.log(this.$store.state.user)
},
(rspMsg, data) => {
this.$message.error(rspMsg)
})
// return this.$http.get(url).then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg)
// }
// }).catch(() => { })
}
}
}

16
epmet-oper-web/src/views/modules/customer/manage/ConfigForm.vue

@ -69,12 +69,16 @@ export default {
},
loadData () {
this.startLoading()
let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/getcustomerparameter'
// let url='/oper/crm/customer/getcustomerparameter'
// let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/getcustomerparameter'
let url = '/oper/crm/customer/getcustomerparameter'
let params = {
customerId: this.customerId
}
//
let _data = this.$refs['ref_form'].model
window.app.ajax.post(url, _data,
window.app.ajax.post(url, params,
(data, rspMsg) => {
this.endLoading()
this.formData = data
@ -92,8 +96,8 @@ export default {
if (valid) {
this.startLoading()
let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/updatecustomerparameter'
// let url='/oper/crm/customer/updatecustomerparameter'
// let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/updatecustomerparameter'
let url = '/oper/crm/customer/updatecustomerparameter'
//
let _data = this.$refs['ref_form'].model

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

@ -0,0 +1,333 @@
<!-- 客户信息 -->
<template>
<div>
<!-- <el-button @click="backStep" type="primary" icon="el-icon-back">返回</el-button> -->
<el-card shadow="never"
class="aui-card--fill">
<el-row>
<el-tag type="info"
class="eltag"
size="medium"
style="width:100%;margin-top:10px">客户信息
</el-tag><br /><br />
<el-form :inline="false"
:model="dataForm.customerInfoDTO"
:rules="dataRule"
ref="dataForm"
:label-width="'120px'">
<el-form-item label="客户名称"
prop="customerName">
<el-input class="item_width_1"
v-model="dataForm.customerInfoDTO.customerName"
placeholder="客户名称"></el-input>
</el-form-item>
<el-form-item prop="logo"
label="Logo">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="handleImgSuccess"
:before-upload="beforeImgUpload">
<img v-if="dataForm.customerInfoDTO.logo"
:src="dataForm.customerInfoDTO.logo"
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-button size="mini"
class="btn_save"
type="primary"
@click="saveInfo()">保存客户信息</el-button>
</el-form>
</el-row>
<el-row>
<el-tag type="info"
class="eltag"
size="medium"
style="width:100%;margin-top:10px">根级组织信息
</el-tag><br /><br />
<el-form :inline="false"
:model="dataForm.rootAgencyDTO"
ref="dataForm"
:label-width="'120px'">
<el-form-item class="item_width_1"
label="组织名称">
<span class="item_width_1">{{dataForm.rootAgencyDTO.agencyName}}</span>
</el-form-item>
<el-form-item class="item_width_1"
label="组织级别">
<span class="item_width_1">{{dataForm.rootAgencyDTO.level|showInfo}}</span>
</el-form-item>
<el-form-item class="item_width_1"
label="地区编码">
<span class="item_width_1">{{dataForm.rootAgencyDTO.areaCode}}</span>
</el-form-item>
<el-form-item class="item_width_1"
label="所属地区">
<span class="item_width_1">{{dataForm.rootAgencyDTO.province+dataForm.rootAgencyDTO.city+dataForm.rootAgencyDTO.district}}</span>
</el-form-item>
</el-form>
</el-row>
<el-row>
<el-tag type="info"
class="eltag"
size="medium"
style="width:100%;margin-top:10px">跟管理员信息
</el-tag><br /><br />
<el-form :inline="false"
:model="dataForm.managers[0]"
ref="dataForm"
:label-width="'120px'">
<el-form-item class="item_width_1"
label="姓名">
<span>{{dataForm.managers[0].realName}}</span>
</el-form-item>
<el-form-item class="item_width_1"
label="性别">
<span>{{dataForm.managers[0].gender|showGender}}</span>
</el-form-item>
<el-form-item class="item_width_1"
label="电话">
<span>{{dataForm.managers[0].mobile}}</span>
</el-form-item>
</el-form>
</el-row>
<!-- <el-row>
<el-tag type="info"
class="eltag"
size="medium"
style="width:100%;margin-top:10px">配置信息
</el-tag><br /><br />
<el-row v-for="(val, index) in data.managers"
:key="index"
style="margin:10px;font-size:16px;height:30px;line-height:30px;border-bottom:1px solid grey;"
:gutter="20">
<el-col :span="6">{{val.realName}}</el-col>
<el-col :span="4">{{val.gender|genderName}}</el-col>
<el-col :span="14">{{val.mobile}}</el-col>
</el-row>
</el-row> -->
</el-card>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
let loading //
export default {
props: {
},
data () {
return {
customerId: '',
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload',
dataForm: {
rootAgencyDTO: {
agencyName: '成都市',
level: 'city',
areaCode: '123456',
province: '四川省',
city: '成都市',
district: 'SN4FHbIZtK',
},
customerInfoDTO: {
customerName: '成都市',
organizationLevel: 'city',
logo: ''
},
managers: [
{
realName: '王显章',
gender: '1',
mobile: '18560677960'
}
]
}
}
},
mounted () {
this.$nextTick(() => {
console.log(this.$store.state.user.customerId)
this.customerId = this.$store.state.user.customerId
this.loadData()
})
},
methods: {
//
loadData () {
this.startLoading()
//
const url = '/oper/crm/customer/detail'
let params = {
customerId: this.customerId,
}
window.app.ajax.post(url, params,
(data, rspMsg) => {
this.endLoading()
this.dataForm = data
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
},
//
async loadConfigData () {
//
const url = '/oper/crm/customer/getcustomerparameter'
let params = {
customerId: this.customerId,
}
window.app.ajax.post(url, params,
(data, rspMsg) => {
this.endLoading()
this.$message.success('修改成功')
this.diaCancel()
this.$emit('refresh')
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
},
saveInfo () {
//
// let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/updatecustomer'
let url = '/oper/crm/customer/updatecustomer'
//
let params = {
customerId: this.customerId,
customerName: this.dataForm.customerInfoDTO.customerName,
logo: this.dataForm.customerInfoDTO.logo
}
window.app.ajax.post(url, params,
(data, rspMsg) => {
this.endLoading()
this.$message.success('修改成功')
this.loadData()
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
},
//
handleImgSuccess (res, file) {
if (res.code === 0 && res.msg === 'success') {
this.dataForm.customerInfoDTO.logo = res.data.url
} else {
this.$message.error(res.msg)
}
},
beforeImgUpload (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
return isLt1M
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
dataRule () {
return {
logo: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
customerName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
filters: {
showInfo (key) {
if (key === 'province') {
return '省级'
} else if (key === 'city') {
return '市级'
} else if (key === 'district') {
return '区县级'
} else if (key === 'street') {
return '乡(镇、街道)级'
} else if (key === 'community') {
return '社区级'
} else if (key === '') {
return '————'
} else {
return key
}
},
showGender (key) {
if (key === '1') {
return '女'
} else if (key === '0') {
return '男'
} else {
return key
}
}
}
}
</script>
<style scoped>
.item_width_1 {
width: 300px;
}
.btn_save {
margin: 0 50px;
}
</style>

1
epmet-oper-web/src/views/modules/customer/manage/CustomerList.vue

@ -99,6 +99,7 @@ export default {
},
mounted () {
// eslint-disable-next-line
console.log(this)
this.loadData()
},
computed: {

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

@ -19,7 +19,8 @@
</el-form-item>
<el-form-item label="来源"
prop="fromApp">
<el-select class="item_width_1"
<el-select :disabled="isApply===1"
class="item_width_1"
v-model="dataForm.fromApp"
placeholder="请选择"
clearable>
@ -84,7 +85,8 @@
</el-upload>
</el-form-item>
<el-form-item class="block"
<el-form-item prop="domainName"
class="block"
label="业务域名">
<div v-for="(item, index) in domainNameList"
:key="index">
@ -184,6 +186,9 @@ export default {
functionName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
// domainName: [
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
// ],
iconLargeImg: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],

2
epmet-oper-web/src/views/modules/sys/user.vue

@ -56,7 +56,7 @@
header-align="center"
align="center">
<template slot-scope="scope">
{{ $getDictLabel("gender", scope.row.gender) }}
{{ scope.row.gender==='0'?'男':'女'}}
</template>
</el-table-column>
<el-table-column prop="status"

Loading…
Cancel
Save