Browse Source

【PC端】添加违规校验逻辑-王公峰-2020-08-05

master
wanggongfeng 5 years ago
parent
commit
52c8f9ff5d
  1. 25
      src/views/modules/workRecord/monthexcellentcaseDetail.vue
  2. 25
      src/views/modules/workRecord/monthexcellentgridDetail.vue
  3. 25
      src/views/modules/workRecord/monthexcellentpersonDetail.vue
  4. 27
      src/views/modules/workRecord/monthrecordinfoDetail.vue
  5. 27
      src/views/modules/workRecord/weekrecordinfoDetail.vue

25
src/views/modules/workRecord/monthexcellentcaseDetail.vue

@ -86,7 +86,8 @@ export default {
content: '',
state: '',
images: [],
files: []
files: [],
isConReview: false
},
isAble: false,
hideUpload: false,
@ -99,6 +100,7 @@ export default {
isAutoRemoveFile: true,
fileloading: false,
pageloading: true,
isFirst: true,
isGoToInfo: '0' // 01
}
},
@ -142,6 +144,7 @@ export default {
methods: {
init () {
this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@ -278,7 +281,25 @@ export default {
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentcase/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
if (!this.isFirst && res.code === 533) {
//
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.dataForm.isConReview = true
//
this.dataFormSubmitHandle()
}).catch(() => {
this.isAble = false
})
return false
} else if (res.code === 533) {
this.isFirst = false
this.isAble = false
return this.$message.error(res.msg)
} else if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}

25
src/views/modules/workRecord/monthexcellentgridDetail.vue

@ -99,7 +99,8 @@ export default {
state: '',
allDeptIds: '',
images: [],
files: []
files: [],
isConReview: false
},
isAble: false,
hideUpload: false,
@ -113,6 +114,7 @@ export default {
fileloading: false,
pageloading: true,
options: [],
isFirst: true,
isGoToInfo: '0' // 01
}
},
@ -173,6 +175,7 @@ export default {
},
init () {
this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@ -309,7 +312,25 @@ export default {
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentgrid/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
if (!this.isFirst && res.code === 533) {
//
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.dataForm.isConReview = true
//
this.dataFormSubmitHandle()
}).catch(() => {
this.isAble = false
})
return false
} else if (res.code === 533) {
this.isFirst = false
this.isAble = false
return this.$message.error(res.msg)
} else if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}

25
src/views/modules/workRecord/monthexcellentpersonDetail.vue

@ -93,7 +93,8 @@ export default {
content: '',
state: '',
images: [],
files: []
files: [],
isConReview: false
},
partyFlagArr: [
{ dictValue: '0', dictName: '居民' },
@ -110,6 +111,7 @@ export default {
isAutoRemoveFile: true,
fileloading: false,
pageloading: true,
isFirst: true,
isGoToInfo: '0' // 01
}
},
@ -163,6 +165,7 @@ export default {
methods: {
init () {
this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@ -299,7 +302,25 @@ export default {
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentperson/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
if (!this.isFirst && res.code === 533) {
//
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.dataForm.isConReview = true
//
this.dataFormSubmitHandle()
}).catch(() => {
this.isAble = false
})
return false
} else if (res.code === 533) {
this.isFirst = false
this.isAble = false
return this.$message.error(res.msg)
} else if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}

27
src/views/modules/workRecord/monthrecordinfoDetail.vue

@ -94,7 +94,8 @@ export default {
content: '',
state: '',
images: [],
files: []
files: [],
isConReview: false
},
isAble: false,
hideUpload: false,
@ -114,7 +115,8 @@ export default {
caseId: '',
gridId: '',
personId: '',
queryDisabled: ''
queryDisabled: '',
isFirst: true
}
},
computed: {
@ -189,6 +191,7 @@ export default {
},
init () {
this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@ -324,7 +327,25 @@ export default {
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthrecordinfo/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
if (!this.isFirst && res.code === 533) {
//
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.dataForm.isConReview = true
//
this.dataFormSubmitHandle()
}).catch(() => {
this.isAble = false
})
return false
} else if (res.code === 533) {
this.isFirst = false
this.isAble = false
return this.$message.error(res.msg)
} else if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}

27
src/views/modules/workRecord/weekrecordinfoDetail.vue

@ -95,7 +95,8 @@ export default {
state: '',
images: [],
files: [],
totalConfigList: []
totalConfigList: [],
isConReview: false
},
isShowArr: [
{ dictValue: '0', dictName: '否' },
@ -113,7 +114,8 @@ export default {
dialogVisible: false,
pageloading: true,
isAutoRemoveFile: true,
colspan: 6
colspan: 6,
isFirst: true
}
},
computed: {
@ -170,6 +172,7 @@ export default {
methods: {
init () {
this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@ -330,7 +333,25 @@ export default {
}
//
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
if (!this.isFirst && res.code === 533) {
//
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.dataForm.isConReview = true
//
this.dataFormSubmitHandle()
}).catch(() => {
this.isAble = false
})
return false
} else if (res.code === 533) {
this.isFirst = false
this.isAble = false
return this.$message.error(res.msg)
} else if (!valid) {
return false
}
this.isAble = true

Loading…
Cancel
Save