-
- 小时
- 分钟
-
+
+
+
+ 小时
+ 分钟
+
+
+
+
+
+
+
+
+
@@ -559,7 +568,7 @@
this.processCompObj.caseTypeTime = ''
},
/**
- * 案卷等级和立案标准发生改变时,更新hours和minutes
+ * 案卷等级和立案标准发生改变时,更新hours和minutes,dispatchDeptId
*/
updateHoursAndMins() {
console.log('updateHoursAndMins', this.processCompObj.caseTypeTime)
@@ -570,9 +579,11 @@
if (!this.processCompObj.caseTypeTime) {
this.processCompObj.hours = ''
this.processCompObj.minutes = ''
+ this.processCompObj.dispatchDeptId = ''
return
}
const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime])
+ console.log(caseTypeTimeObj)
const day = parseInt(caseTypeTimeObj.day)
let hours = parseInt(caseTypeTimeObj.hours)
const minutes = parseInt(caseTypeTimeObj.minutes)
@@ -590,6 +601,8 @@
}
this.processCompObj.hours = hours
this.processCompObj.minutes = minutes
+
+ this.processCompObj.dispatchDeptId = caseTypeTimeObj.deptId
},
/**
* 设置默认人员id
@@ -653,6 +666,9 @@
this.$set(this.processCompObj, 'eorcList', eorcListRes.data)
this.$set(this.processCompObj, 'eorc', this.caseDetail.eorc)
+ const deptRes = await getDeptList()// 处置部门列表
+ this.$set(this.processCompObj, 'deptList', deptRes.data)
+
// 初始化大类、小类、立案标准、完成时限
this.$set(this.processCompObj, 'caseTypeList', [])
this.$set(this.processCompObj, 'caseTypeDetailList', [])
@@ -662,6 +678,7 @@
this.$set(this.processCompObj, 'caseTypeTime', '')
this.$set(this.processCompObj, 'hours', '')
this.$set(this.processCompObj, 'minutes', '')
+ this.$set(this.processCompObj, 'dispatchDeptId', '')
// 大类列表
if (this.caseDetail.eorc) {
@@ -692,6 +709,10 @@
if (this.caseDetail.casetypesTimeId) {
this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId
}
+ if (this.processCompObj.caseTypeTime) {
+ const deafultDispatchDept = _.find(this.processCompObj.caseTypeTimeList, ['caseTypeTime', this.processCompObj.caseTypeTime])
+ this.processCompObj.dispatchDeptId = deafultDispatchDept.deptId
+ }
this.registerLoading = false
break
@@ -761,32 +782,12 @@
// 其他参数
const radioConfig = radioMap[this.operationKey]
- // 1. taskUserId
- if (!this.processCompObj.taskUserId && (radioConfig.passBack === 'verifyPersonId' || radioConfig.passBack === 'processPersonId')) {
- this.setDefaultUserId(radioConfig)
- }
- if ((radioConfig.showComp && radioConfig.showComp.indexOf('selectUser') > -1) || radioConfig.passBack === 'verifyPersonId' || radioConfig.passBack === 'processPersonId') {
- if (!this.processCompObj.taskUserId) {
- this.$message.error('请选择人员')
- return false
- }
- this.processForm.taskUserId = this.processCompObj.taskUserId
- }
- // 2. dispatchDeptId
- if (radioConfig.showComp === 'selectDept') {
- if (!this.processCompObj.dispatchDeptId) {
- this.$message.error('请选择部门')
- return false
- }
- this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
- } else if (radioConfig.passBack === 'onedeptid') {
- this.processForm.dispatchDeptId = this.caseDetail.onedeptid
- }
- // 3. isNeedRevisit
+
+ // 1. isNeedRevisit
if (radioConfig.passBack === 'isNeedRevisit') {
this.processForm.isNeedRevisit = this.caseDetail.isNeedRevisit
}
- // caseLevel,caseTypeTimes,caseType,caseTypeDetail(立案)
+ // 2. caseLevel,caseTypeTimes,caseType,caseTypeDetail(立案)
if (radioConfig.showComp === 'selectCaseTime') {
// caseLevel
if (!this.processCompObj.caseLevel) {
@@ -821,7 +822,28 @@
}
this.processForm.casetypesTimeId = this.processCompObj.caseTypeTime
}
- // 4. hours,minutes
+ // 3. taskUserId
+ if (!this.processCompObj.taskUserId && (radioConfig.passBack === 'verifyPersonId' || radioConfig.passBack === 'processPersonId')) {
+ this.setDefaultUserId(radioConfig)
+ }
+ if ((radioConfig.showComp && radioConfig.showComp.indexOf('selectUser') > -1) || radioConfig.passBack === 'verifyPersonId' || radioConfig.passBack === 'processPersonId') {
+ if (!this.processCompObj.taskUserId) {
+ this.$message.error('请选择人员')
+ return false
+ }
+ this.processForm.taskUserId = this.processCompObj.taskUserId
+ }
+ // 4. dispatchDeptId
+ if (radioConfig.showComp === 'selectDept' || radioConfig.showComp === 'selectCaseTime') {
+ if (!this.processCompObj.dispatchDeptId) {
+ this.$message.error('请选择部门')
+ return false
+ }
+ this.processForm.dispatchDeptId = this.processCompObj.dispatchDeptId
+ } else if (radioConfig.passBack === 'onedeptid') {
+ this.processForm.dispatchDeptId = this.caseDetail.onedeptid
+ }
+ // 5. hours,minutes
if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') {
if (!this.checkHour(this.processCompObj.hours)) {
this.$message.error('小时数必须为大于等于0的整数')
@@ -834,7 +856,7 @@
this.processForm.hours = this.processCompObj.hours
this.processForm.minutes = this.processCompObj.minutes
}
- // 5. filingType
+ // 6. filingType
if (radioConfig.showComp === 'selectFilingType') {
if (!this.processCompObj.filingType) {
this.$message.error('请选择归档类型')
diff --git a/src/views/callCase/callCase.vue b/src/views/callCase/callCase.vue
index 7a8cd6b..3cdceb7 100644
--- a/src/views/callCase/callCase.vue
+++ b/src/views/callCase/callCase.vue
@@ -156,7 +156,7 @@
-
+
@@ -280,8 +280,8 @@
description: '', // 案件描述
fieldintro: '', // 位置描述
verifyPersonId: '', // 核实人员id
- fileIdVerify: '', // 图片存储的地址
- deptId: ''
+ dispatchDeptId: '', // 处置部门id
+ fileIdVerify: '' // 图片存储的地址
}, // 表单
rules: {
reporterName: [{ required: true, message: '举报人姓名不能为空', trigger: ['blur'] }],
@@ -348,6 +348,7 @@
},
caseTypeDetailTime(timeVal) {
this.calculateTime(timeVal)
+ this.setDefaultDispatchDept(timeVal)
}
},
mounted: function() {
@@ -381,10 +382,10 @@
this.caseForm.fieldintro = ''
this.caseForm.verifyPersonId = ''
this.caseForm.fileIdVerify = ''
+ this.caseForm.dispatchDeptId = ''
this.caseForm.eorc = ''
this.caseForm.casetypeCode = ''
this.caseForm.casetypeDetailCode = ''
- this.caseForm.deptId = ''
this.$refs.upload.clearFiles()
},
@@ -439,6 +440,7 @@
this.caseForm.casetypesTimeId = ''
this.caseForm.bzhours = 0
this.caseForm.bzminis = 0
+ this.caseForm.dispatchDeptId = ''
// 若事部件选择的值不为空,则查询相应的案卷大类
if (eorc !== null && eorc.length > 0) {
@@ -462,6 +464,7 @@
this.caseForm.casetypesTimeId = ''
this.caseForm.bzhours = 0
this.caseForm.bzminis = 0
+ this.caseForm.dispatchDeptId = ''
// 根据code获取ID,进行级联查询
let typeId = 0
@@ -490,6 +493,7 @@
this.caseForm.casetypesTimeId = ''
this.caseForm.bzhours = 0
this.caseForm.bzminis = 0
+ this.caseForm.dispatchDeptId = ''
// 根据code获取ID,进行级联查询
let typeDetailId = 0
@@ -520,6 +524,13 @@
this.caseForm.bzhours = hoursPerDay * parseInt(day) + parseInt(hours)
},
+ setDefaultDispatchDept(timeVal) {
+ this.caseTypeTimeOpts.forEach(item => {
+ if (item.id === timeVal) {
+ this.caseForm.dispatchDeptId = item.deptId
+ }
+ })
+ },
// 打开地图查询对话框显示地图
openMapQueryDialog: function() {
this.mapDialogVisible = true
@@ -582,6 +593,9 @@
this.$refs['dataForm'].validate((valid) => {
if (valid) {
+ if (!this.checkCaseTime()) {
+ return
+ }
addCase(this.caseForm).then(function(response) {
if (response.code === 200) {
that.$message({
@@ -603,6 +617,19 @@
}
})
},
+ checkCaseTime() {
+ if (this.caseForm.isNeedVerify === '0') {
+ if (!this.caseForm.casetypesTimeId) {
+ this.$message.error('请选择立案标准')
+ return false
+ }
+ if (!this.caseForm.dispatchDeptId) {
+ this.$message.error('请选择处置部门')
+ return false
+ }
+ }
+ return true
+ },
// 图片上传
uploadFile(file) {
console.log('uploadFile:' + file.file.name)