diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/views/seo/components/searchMore.vue b/src/views/seo/components/searchMore.vue index 8d4cd00..b1abe5a 100644 --- a/src/views/seo/components/searchMore.vue +++ b/src/views/seo/components/searchMore.vue @@ -47,8 +47,8 @@ - - + + @@ -254,7 +254,7 @@ watch: { 'listQuery.eorc'(val) { // 监控案卷类别变化 if (val !== '') { - this.listQuery.casetypeCode='' + this.listQuery.casetypeCode = '' this.getCaseBigType() } }, diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/views/seo/components/searchMore.vue b/src/views/seo/components/searchMore.vue index 8d4cd00..b1abe5a 100644 --- a/src/views/seo/components/searchMore.vue +++ b/src/views/seo/components/searchMore.vue @@ -47,8 +47,8 @@ - - + + @@ -254,7 +254,7 @@ watch: { 'listQuery.eorc'(val) { // 监控案卷类别变化 if (val !== '') { - this.listQuery.casetypeCode='' + this.listQuery.casetypeCode = '' this.getCaseBigType() } }, diff --git a/src/views/seo/seo.vue b/src/views/seo/seo.vue index 9470099..75ae3eb 100644 --- a/src/views/seo/seo.vue +++ b/src/views/seo/seo.vue @@ -57,7 +57,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/views/seo/components/searchMore.vue b/src/views/seo/components/searchMore.vue index 8d4cd00..b1abe5a 100644 --- a/src/views/seo/components/searchMore.vue +++ b/src/views/seo/components/searchMore.vue @@ -47,8 +47,8 @@ - - + + @@ -254,7 +254,7 @@ watch: { 'listQuery.eorc'(val) { // 监控案卷类别变化 if (val !== '') { - this.listQuery.casetypeCode='' + this.listQuery.casetypeCode = '' this.getCaseBigType() } }, diff --git a/src/views/seo/seo.vue b/src/views/seo/seo.vue index 9470099..75ae3eb 100644 --- a/src/views/seo/seo.vue +++ b/src/views/seo/seo.vue @@ -57,7 +57,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/allCase.vue b/src/views/supervise/allCase.vue index 33c1433..fab98d7 100644 --- a/src/views/supervise/allCase.vue +++ b/src/views/supervise/allCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/views/seo/components/searchMore.vue b/src/views/seo/components/searchMore.vue index 8d4cd00..b1abe5a 100644 --- a/src/views/seo/components/searchMore.vue +++ b/src/views/seo/components/searchMore.vue @@ -47,8 +47,8 @@ - - + + @@ -254,7 +254,7 @@ watch: { 'listQuery.eorc'(val) { // 监控案卷类别变化 if (val !== '') { - this.listQuery.casetypeCode='' + this.listQuery.casetypeCode = '' this.getCaseBigType() } }, diff --git a/src/views/seo/seo.vue b/src/views/seo/seo.vue index 9470099..75ae3eb 100644 --- a/src/views/seo/seo.vue +++ b/src/views/seo/seo.vue @@ -57,7 +57,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/allCase.vue b/src/views/supervise/allCase.vue index 33c1433..fab98d7 100644 --- a/src/views/supervise/allCase.vue +++ b/src/views/supervise/allCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/components/searchMore.vue b/src/views/supervise/components/searchMore.vue index a98737c..de78d56 100644 --- a/src/views/supervise/components/searchMore.vue +++ b/src/views/supervise/components/searchMore.vue @@ -35,8 +35,8 @@ - - + + diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/views/seo/components/searchMore.vue b/src/views/seo/components/searchMore.vue index 8d4cd00..b1abe5a 100644 --- a/src/views/seo/components/searchMore.vue +++ b/src/views/seo/components/searchMore.vue @@ -47,8 +47,8 @@ - - + + @@ -254,7 +254,7 @@ watch: { 'listQuery.eorc'(val) { // 监控案卷类别变化 if (val !== '') { - this.listQuery.casetypeCode='' + this.listQuery.casetypeCode = '' this.getCaseBigType() } }, diff --git a/src/views/seo/seo.vue b/src/views/seo/seo.vue index 9470099..75ae3eb 100644 --- a/src/views/seo/seo.vue +++ b/src/views/seo/seo.vue @@ -57,7 +57,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/allCase.vue b/src/views/supervise/allCase.vue index 33c1433..fab98d7 100644 --- a/src/views/supervise/allCase.vue +++ b/src/views/supervise/allCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/components/searchMore.vue b/src/views/supervise/components/searchMore.vue index a98737c..de78d56 100644 --- a/src/views/supervise/components/searchMore.vue +++ b/src/views/supervise/components/searchMore.vue @@ -35,8 +35,8 @@ - - + + diff --git a/src/views/supervise/criticalCase.vue b/src/views/supervise/criticalCase.vue index f920992..fcc2aa4 100644 --- a/src/views/supervise/criticalCase.vue +++ b/src/views/supervise/criticalCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/components/CaseCommon/caseDetail.vue b/src/components/CaseCommon/caseDetail.vue index f2ae4e9..dc1eb3f 100644 --- a/src/components/CaseCommon/caseDetail.vue +++ b/src/components/CaseCommon/caseDetail.vue @@ -166,91 +166,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + 小时 + 分钟 + + +
@@ -261,17 +265,8 @@ - - - - - - - - - - - + 小时 + 分钟 @@ -295,7 +290,7 @@ -
数据流转:
+
数据流转记录:
@@ -331,6 +326,13 @@ name: 'CaseDetail', components: { ArcGisMapRead }, data() { + var validateEmptyString = (rule, value, callback) => { + if (!value.trim()) { + callback(new Error('处置意见不能为空')) + } else { + callback() + } + } return { id: '', showProcess: true, @@ -360,9 +362,11 @@ caseTypeLoading: false, caseTypeDetailLoading: false, caseTypeTimeLoading: false, + registerLoading: false, rules: { operationKey: [{ required: true, message: '操作类型不能为空', trigger: ['blur', 'change'] }], - remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + // remarks: [{ required: true, message: '处置意见不能为空', trigger: ['blur', 'change'] }] + remarks: [{ required: true, validator: validateEmptyString, trigger: ['blur', 'change'] }] } } }, @@ -385,6 +389,36 @@ return this.processForm.operationKey } }, + watch: { + 'processCompObj.eorc': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectEorc(newValue) + } + } + }, + 'processCompObj.caseType': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseType(newValue) + } + } + }, + 'processCompObj.caseTypeDetail': { + handler(newValue, oldValue) { + if (oldValue) { + this.selectCaseTypeDetail(newValue) + } + } + }, + 'processCompObj.caseTypeTime': { + handler(newValue, oldValue) { + if (oldValue) { + this.updateHoursAndMins() + } + } + } + }, activated() { console.log('activated') this.id = this.$route.query.id @@ -515,7 +549,6 @@ return } const caseTypeTimeObj = _.find(this.processCompObj.caseTypeTimeList, ['id', this.processCompObj.caseTypeTime]) - // console.log(this.processCompObj.caseTypeTime, caseTypeTimeObj) const day = parseInt(caseTypeTimeObj.day) let hours = parseInt(caseTypeTimeObj.hours) const minutes = parseInt(caseTypeTimeObj.minutes) @@ -552,10 +585,13 @@ }, // 选择案卷处理操作 async selectNextOperation() { - console.log(this.operationKey, radioMap[this.operationKey]) + console.log(this.operationKey, radioMap[this.operationKey], this.processCompObj) const radioConfig = radioMap[this.operationKey] + + // 清除相关数据 + this.processCompShow = '' + this.processCompObj = {} if (!radioConfig.showComp) { - this.processCompShow = '' return } switch (radioConfig.showComp.split('_')[0]) { @@ -577,6 +613,7 @@ } case 'selectCaseTime': { // 立案:案卷等级、类别、大类、小类、立案标准、完成时限 this.processCompShow = 'selectCaseTime' + this.registerLoading = true const caseLevelRes = await getCaseLevelList() // 案卷等级 this.$set(this.processCompObj, 'caseLevelList', caseLevelRes.data) @@ -626,19 +663,7 @@ this.processCompObj.caseTypeTime = this.caseDetail.casetypesTimeId } - // 添加watch监控 - this.$watch('processCompObj.eorc', (newValue, oldValue) => { - this.selectEorc(newValue) - }) - this.$watch('processCompObj.caseType', (newValue, oldValue) => { - this.selectCaseType(newValue) - }) - this.$watch('processCompObj.caseTypeDetail', (newValue, oldValue) => { - this.selectCaseTypeDetail(newValue) - }) - this.$watch('processCompObj.caseTypeTime', (newValue, oldValue) => { - this.updateHoursAndMins(newValue) - }) + this.registerLoading = false break } case 'selectFilingType': { // 选择归档类型 @@ -662,22 +687,24 @@ // 构建提交表单 buildForm() { console.log('buildForm', this.operationKey) - // 通用参数 - // processId,remarks已有 - this.processForm.bizId = this.id - this.processForm.currState = this.caseDetail.caseState + // 通用参数,processId已有 + this.processForm.bizId = this.id // bizId + this.processForm.currState = this.caseDetail.caseState // currState if (!this.operationKey) { this.$message.error('请选择案卷处理操作类型') return false } const radioObj = _.find(this.processRadioList, ['operationKey', this.operationKey]) - this.processForm.changeState = radioObj.nextState - this.processForm.approvalResult = radioObj.approvalResult + this.processForm.changeState = radioObj.nextState // changeState + this.processForm.approvalResult = radioObj.approvalResult // approvalResult - // remarks不能为空 - if (!this.processForm.remarks) { + // remarks 不能为空 + if (!this.processForm.remarks.trim()) { this.$message.error('处置意见不能为空') return false + } else { + // 去除remarks空格 + this.processForm.remarks = this.processForm.remarks.trim() } // 其他参数 @@ -744,8 +771,12 @@ } // 4. hours,minutes if (radioConfig.showComp === 'selectCaseTime' || radioConfig.showComp === 'inputDelayTime') { - if (!this.numberIsNull(this.processCompObj.hours) || !this.numberIsNull(this.processCompObj.minutes)) { - this.$message.error('请输入正确的时间') + if (!this.checkHour(this.processCompObj.hours)) { + this.$message.error('小时数必须为大于等于0的整数') + return false + } + if (!this.checkMin(this.processCompObj.minutes)) { + this.$message.error('分钟数必须为大于等于0,小于60的整数') return false } this.processForm.hours = this.processCompObj.hours @@ -762,8 +793,15 @@ console.log(this.processForm) return true }, - numberIsNull(value) { // 判断数值是否为空, 且非负 - if (value && Number(value) >= 0) { + checkHour(hour) { + if (parseInt(hour) >= 0) { + return true + } else { + return false + } + }, + checkMin(min) { + if (parseInt(min) >= 0 && parseInt(min) < 60) { return true } else { return false diff --git a/src/components/CaseCommon/caseList.vue b/src/components/CaseCommon/caseList.vue index e55f590..7700c37 100644 --- a/src/components/CaseCommon/caseList.vue +++ b/src/components/CaseCommon/caseList.vue @@ -75,7 +75,7 @@ value: 'remainingTime' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/components/CaseCommon/searchForm.vue b/src/components/CaseCommon/searchForm.vue index 012ef67..4347d3a 100644 --- a/src/components/CaseCommon/searchForm.vue +++ b/src/components/CaseCommon/searchForm.vue @@ -4,7 +4,7 @@ - + @@ -21,7 +21,7 @@ - + - + diff --git a/src/views/caseCommon/assessCaseList.vue b/src/views/caseCommon/assessCaseList.vue index 8418ad6..3bb00b7 100644 --- a/src/views/caseCommon/assessCaseList.vue +++ b/src/views/caseCommon/assessCaseList.vue @@ -43,7 +43,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/coorBusiness/completed/index.vue b/src/views/coorBusiness/completed/index.vue index 53f737b..a6dfb43 100644 --- a/src/views/coorBusiness/completed/index.vue +++ b/src/views/coorBusiness/completed/index.vue @@ -52,7 +52,7 @@ value: 'eorcName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' } ] diff --git a/src/views/deptAccess/assessDeptCaseList.vue b/src/views/deptAccess/assessDeptCaseList.vue index ba125df..308b369 100644 --- a/src/views/deptAccess/assessDeptCaseList.vue +++ b/src/views/deptAccess/assessDeptCaseList.vue @@ -36,7 +36,7 @@ value: 'nodeName' }, { - text: '问题描述', + text: '案卷描述', value: 'caseDesc' }, { diff --git a/src/views/seo/components/searchMore.vue b/src/views/seo/components/searchMore.vue index 8d4cd00..b1abe5a 100644 --- a/src/views/seo/components/searchMore.vue +++ b/src/views/seo/components/searchMore.vue @@ -47,8 +47,8 @@ - - + + @@ -254,7 +254,7 @@ watch: { 'listQuery.eorc'(val) { // 监控案卷类别变化 if (val !== '') { - this.listQuery.casetypeCode='' + this.listQuery.casetypeCode = '' this.getCaseBigType() } }, diff --git a/src/views/seo/seo.vue b/src/views/seo/seo.vue index 9470099..75ae3eb 100644 --- a/src/views/seo/seo.vue +++ b/src/views/seo/seo.vue @@ -57,7 +57,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/allCase.vue b/src/views/supervise/allCase.vue index 33c1433..fab98d7 100644 --- a/src/views/supervise/allCase.vue +++ b/src/views/supervise/allCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/components/searchMore.vue b/src/views/supervise/components/searchMore.vue index a98737c..de78d56 100644 --- a/src/views/supervise/components/searchMore.vue +++ b/src/views/supervise/components/searchMore.vue @@ -35,8 +35,8 @@ - - + + diff --git a/src/views/supervise/criticalCase.vue b/src/views/supervise/criticalCase.vue index f920992..fcc2aa4 100644 --- a/src/views/supervise/criticalCase.vue +++ b/src/views/supervise/criticalCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, { diff --git a/src/views/supervise/overtimeCase.vue b/src/views/supervise/overtimeCase.vue index 3080eee..08576ff 100644 --- a/src/views/supervise/overtimeCase.vue +++ b/src/views/supervise/overtimeCase.vue @@ -42,7 +42,7 @@ value: 'caseStateName' }, { - text: '问题描述', + text: '案卷描述', value: 'description' }, {