Browse Source

【项目管理议题管理】【添加操作人部门下拉选项】-王公峰-2020-05-15

master
wanggongfeng 5 years ago
parent
commit
11d1d1b2b8
  1. 34
      src/views/modules/events/issue-process-detail-view.vue
  2. 36
      src/views/modules/events/issue-review-detail-view.vue
  3. 54
      src/views/modules/events/item-deal-detail-view.vue

34
src/views/modules/events/issue-process-detail-view.vue

@ -96,6 +96,17 @@
style="width: 720px;"
:model="dataForm"
:rules="dataRule">
<el-form-item label="操作人部门" prop="handlerDeptIdRule">
<el-cascader
ref="name"
v-model="dataForm.handlerDeptIdRule"
:options="options"
:props="{ multiple: false, checkStrictly: true }"
@change="changeHandle"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item label="处理:"
prop="state">
<el-select v-model="dataForm.state"
@ -146,6 +157,7 @@ export default {
distributeTime: '',
advice: '',
state: '',
handlerDeptIdRule: '',
issueProgressResultDTOS: [],
images: []
},
@ -161,11 +173,13 @@ export default {
verifyFlag: '4',
verifyTitle: '转为项目'
}],
timeLineList: []
timeLineList: [],
options: []
}
},
mounted () {
this.dataForm.id = this.$route.query.id
this.getOptions()
this.init()
},
filters: {
@ -194,6 +208,9 @@ export default {
],
state: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
handlerDeptIdRule: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
@ -202,6 +219,21 @@ export default {
backToItemDeal () {
this.$parent.selectComponent = 'IssueProcessList'
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
this.dataForm.handlerDept = this.$refs['name'].getCheckedNodes()[0].label
this.dataForm.handlerDeptId = this.$refs['name'].getCheckedNodes()[0].value
},
initBmap (latitude, longitude) {
this.map = new BMap.Map('map')
const point = new BMap.Point(longitude, latitude)

36
src/views/modules/events/issue-review-detail-view.vue

@ -40,6 +40,17 @@
<div class="handle-operation">
<div class="handle-operation-tip">处理操作</div>
<el-form ref="dataForm" label-width="120px" label-position="right" style="width: 720px;" :model="dataForm" :rules="dataRule">
<el-form-item label="操作人部门" prop="handlerDeptIdRule">
<el-cascader
ref="name"
v-model="dataForm.handlerDeptIdRule"
:options="options"
:props="{ multiple: false, checkStrictly: true }"
@change="changeHandle"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item label="审核:" prop="eventState">
<el-radio v-model="dataForm.eventState" label="4">审核通过</el-radio>
<el-radio v-model="dataForm.eventState" label="2">驳回</el-radio>
@ -78,6 +89,7 @@ export default {
nickName: '',
categoryId: '',
advice: '',
handlerDeptIdRule: '',
eventState: '4'
},
isAble: false,
@ -85,11 +97,13 @@ export default {
previewImgList: [],
categoryVisible: true,
urls: [],
categoryOptions: []
categoryOptions: [],
options: []
}
},
mounted () {
this.dataForm.id = this.$route.query.id
this.getOptions()
this.init()
},
computed: {
@ -103,6 +117,9 @@ export default {
],
advice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
handlerDeptIdRule: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
@ -128,6 +145,21 @@ export default {
}
})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
this.dataForm.handlerDept = this.$refs['name'].getCheckedNodes()[0].label
this.dataForm.handlerDeptId = this.$refs['name'].getCheckedNodes()[0].value
},
getCategoryList () {
return this.$http.get('/events/category/list').then(({ data: res }) => {
if (res.code !== 0) {
@ -176,7 +208,7 @@ export default {
//
dataFormSubmitHandle: debounce(function () {
this.dataForm.categoryId = this.categoryIds[this.categoryIds.length - 1]
console.log(this.dataForm.categoryId)
console.log(this.dataForm)
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false

54
src/views/modules/events/item-deal-detail-view.vue

@ -108,10 +108,20 @@
style="width: 720px;"
:model="dataForm"
:rules="dataRule">
<el-form-item label="操作人部门" prop="handlerDeptIdRule">
<el-cascader
ref="name"
v-model="dataForm.handlerDeptIdRule"
:options="options"
:props="{ multiple: false, checkStrictly: true }"
@change="changeHandle"
>
</el-cascader>
</el-form-item>
<el-form-item label="处理:"
prop="handleCategory">
<el-select v-model="postDataForm.handleCategory"
placeholder="请选择">
placeholder="请选择" @visible-change="visibleChange">
<el-option v-for="handleResultDTO in dataForm.handleResultDTOS"
:key="handleResultDTO.processResult"
:label="handleResultDTO.processName"
@ -252,7 +262,8 @@ export default {
outHandleAdvice: '',
handleCategory: '',
issueLatitude: '',
issueLongitude: ''
issueLongitude: '',
handlerDeptIdRule: ''
},
isAble: false,
previewImgList: [],
@ -271,11 +282,13 @@ export default {
},
deptResultDTOSVisible: false,
evaluateDeptDTOSVisible: false,
timeLineList: []
timeLineList: [],
options: []
}
},
mounted () {
this.dataForm.id = this.$route.query.id
this.getOptions()
this.init()
},
filters: {
@ -342,6 +355,9 @@ export default {
],
evaluateDeptDTOS: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
handlerDeptIdRule: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
@ -379,6 +395,38 @@ export default {
backToItemDeal () {
this.$parent.selectComponent = 'ItemDeal'
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
visibleChange (val) {
if (this.dataForm.handleResultDTOS.length === 0 && this.dataForm.handlerDeptIdRule === '' && val === true) {
return this.$message.error('请先选择操作人部门!')
}
},
changeHandle (value, selectedData) {
this.postDataForm.handlerDept = this.$refs['name'].getCheckedNodes()[0].label
this.postDataForm.handlerDeptId = this.$refs['name'].getCheckedNodes()[0].value
this.getHandleResultDTOS()
},
//
getHandleResultDTOS () {
this.$http.post(`/events/item/getHandleResultDTOS`, { itemId: this.dataForm.id, deptId: this.postDataForm.handlerDeptId }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm.handleResultDTOS = res.data.handleResultDTOS
this.dataForm.deptResultDTOS = res.data.deptResultDTOS
this.dataForm.evaluateDeptDTOS = res.data.evaluateDeptDTOS
}).catch(() => { })
},
initBmap (latitude, longitude) {
this.map = new BMap.Map('map')
const point = new BMap.Point(longitude, latitude)

Loading…
Cancel
Save