Browse Source

绑定网格员功能修改

feature/lc_issueAdjustment
liuchuang 4 years ago
parent
commit
2e1ec1a9a5
  1. 1
      package.json
  2. 6
      public/index.html
  3. 58
      src/views/modules/sys/user-add-or-update.vue

1
package.json

@ -16,6 +16,7 @@
"dependencies": {
"@tinymce/tinymce-vue": "^3.2.4",
"axios": "^0.18.1",
"babel-eslint": "^7.2.3",
"babel-plugin-component": "^1.1.1",
"echarts": "^4.8.0",
"element-theme": "^2.0.1",

6
public/index.html

@ -37,9 +37,9 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
// window.SITE_CONFIG['apiURL'] = 'https://epdc-jinshui.elinkservice.cn/epdc-api'
// window.SITE_CONFIG['apiURL'] = 'http://localhost:9094/epdc-api'
window.SITE_CONFIG['apiURL'] = 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api'
// window.SITE_CONFIG['workLogURL'] = 'https://epmet-ext1.pingyin.gov.cn/plugin-wrf' //工作日志引用外链地址
window.SITE_CONFIG['apiURL'] = 'http://localhost:9094/epdc-api'
// window.SITE_CONFIG['apiURL'] = 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api'
window.SITE_CONFIG['workLogURL'] = 'https://epmet-ext9.pingyin.gov.cn/plugin-wrf' //工作日志引用外链地址
</script>
<% } %>
<!-- 集成测试环境 -->

58
src/views/modules/sys/user-add-or-update.vue

@ -127,6 +127,15 @@
<el-input v-model="dataForm.mobile"
:placeholder="$t('user.mobile')"></el-input>
</el-form-item>
<el-form-item prop="staffName"
label="关联网格员">
<div>
<el-input style="width: 70%" v-model="dataForm.wgyInfo.staffName" readonly
placeholder="绑定网格员"></el-input>
<el-button type="text" @click="relationEpmetStaffUser(dataForm.mobile)">点击绑定</el-button>
<el-button type="text" @click="unbindEpmetUser()">清空</el-button>
</div>
</el-form-item>
<el-form-item prop="roleIdList"
:label="$t('user.roleIdList')"
class="role-list">
@ -188,7 +197,17 @@ export default {
mobile: '',
roleIdList: [],
status: 1,
userTagKey: ''
userTagKey: '',
wgyInfo: {
id: '',
sysUserId: '',
staffId: '',
staffName: '',
mobile: '',
agencyId: '',
agencyAllName: '',
customerId: ''
}
},
userTagDictList: []
}
@ -269,6 +288,39 @@ export default {
})
this.getUserTagDicList()
},
//
relationEpmetStaffUser (mobile) {
if (mobile === '') {
return this.$message.warning('请先填写手机号')
}
this.$http.get(`/sys/sysepmetuserrelation/getstaffuser/${mobile}`).then(({ data: res }) => {
this.dataForm.wgyInfo.staffId = '888'
this.dataForm.wgyInfo.staffName = '888'
this.dataForm.wgyInfo.mobile = '18800112088'
this.dataForm.wgyInfo.agencyId = '888'
this.dataForm.wgyInfo.agencyAllName = '888'
this.dataForm.wgyInfo.customerId = '888'
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm.wgyInfo = {
...this.dataForm.wgyInfo,
...res.data
}
if (res.data.staffId === '') {
return this.$message.warning('未匹配到当前手机号绑定网格员')
}
}).catch(() => { })
},
//
unbindEpmetUser () {
this.dataForm.wgyInfo.staffId = ''
this.dataForm.wgyInfo.staffName = ''
this.dataForm.wgyInfo.mobile = ''
this.dataForm.wgyInfo.agencyId = ''
this.dataForm.wgyInfo.agencyAllName = ''
this.dataForm.wgyInfo.customerId = ''
},
//
getDeptList () {
return this.$http.get('/sys/dept/list').then(({ data: res }) => {
@ -351,6 +403,10 @@ export default {
if (this.dataForm.relationLeaderDeptName === '') {
this.dataForm.relationLeaderDeptId = ''
}
//
if (this.dataForm.wgyInfo.mobile !== '' && this.dataForm.mobile !== this.dataForm.wgyInfo.mobile) {
return this.$message.error('当前手机号与网格员信息不匹配,请重新绑定')
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', {
...this.dataForm,
roleIdList: [

Loading…
Cancel
Save