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: '', content: '',
state: '', state: '',
images: [], images: [],
files: [] files: [],
isConReview: false
}, },
isAble: false, isAble: false,
hideUpload: false, hideUpload: false,
@ -99,6 +100,7 @@ export default {
isAutoRemoveFile: true, isAutoRemoveFile: true,
fileloading: false, fileloading: false,
pageloading: true, pageloading: true,
isFirst: true,
isGoToInfo: '0' // 01 isGoToInfo: '0' // 01
} }
}, },
@ -142,6 +144,7 @@ export default {
methods: { methods: {
init () { init () {
this.dataForm.id = this.$route.query.id this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -278,7 +281,25 @@ export default {
} }
this.isAble = true this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentcase/', this.dataForm).then(({ data: res }) => { 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 this.isAble = false
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

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

@ -99,7 +99,8 @@ export default {
state: '', state: '',
allDeptIds: '', allDeptIds: '',
images: [], images: [],
files: [] files: [],
isConReview: false
}, },
isAble: false, isAble: false,
hideUpload: false, hideUpload: false,
@ -113,6 +114,7 @@ export default {
fileloading: false, fileloading: false,
pageloading: true, pageloading: true,
options: [], options: [],
isFirst: true,
isGoToInfo: '0' // 01 isGoToInfo: '0' // 01
} }
}, },
@ -173,6 +175,7 @@ export default {
}, },
init () { init () {
this.dataForm.id = this.$route.query.id this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -309,7 +312,25 @@ export default {
} }
this.isAble = true this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentgrid/', this.dataForm).then(({ data: res }) => { 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 this.isAble = false
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

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

@ -93,7 +93,8 @@ export default {
content: '', content: '',
state: '', state: '',
images: [], images: [],
files: [] files: [],
isConReview: false
}, },
partyFlagArr: [ partyFlagArr: [
{ dictValue: '0', dictName: '居民' }, { dictValue: '0', dictName: '居民' },
@ -110,6 +111,7 @@ export default {
isAutoRemoveFile: true, isAutoRemoveFile: true,
fileloading: false, fileloading: false,
pageloading: true, pageloading: true,
isFirst: true,
isGoToInfo: '0' // 01 isGoToInfo: '0' // 01
} }
}, },
@ -163,6 +165,7 @@ export default {
methods: { methods: {
init () { init () {
this.dataForm.id = this.$route.query.id this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -299,7 +302,25 @@ export default {
} }
this.isAble = true this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentperson/', this.dataForm).then(({ data: res }) => { 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 this.isAble = false
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

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

@ -94,7 +94,8 @@ export default {
content: '', content: '',
state: '', state: '',
images: [], images: [],
files: [] files: [],
isConReview: false
}, },
isAble: false, isAble: false,
hideUpload: false, hideUpload: false,
@ -114,7 +115,8 @@ export default {
caseId: '', caseId: '',
gridId: '', gridId: '',
personId: '', personId: '',
queryDisabled: '' queryDisabled: '',
isFirst: true
} }
}, },
computed: { computed: {
@ -189,6 +191,7 @@ export default {
}, },
init () { init () {
this.dataForm.id = this.$route.query.id this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -324,7 +327,25 @@ export default {
} }
this.isAble = true this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthrecordinfo/', this.dataForm).then(({ data: res }) => { 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 this.isAble = false
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

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

@ -95,7 +95,8 @@ export default {
state: '', state: '',
images: [], images: [],
files: [], files: [],
totalConfigList: [] totalConfigList: [],
isConReview: false
}, },
isShowArr: [ isShowArr: [
{ dictValue: '0', dictName: '否' }, { dictValue: '0', dictName: '否' },
@ -113,7 +114,8 @@ export default {
dialogVisible: false, dialogVisible: false,
pageloading: true, pageloading: true,
isAutoRemoveFile: true, isAutoRemoveFile: true,
colspan: 6 colspan: 6,
isFirst: true
} }
}, },
computed: { computed: {
@ -170,6 +172,7 @@ export default {
methods: { methods: {
init () { init () {
this.dataForm.id = this.$route.query.id this.dataForm.id = this.$route.query.id
this.dataForm.isConReview = false
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -330,7 +333,25 @@ export default {
} }
// //
this.$refs['dataForm'].validate((valid) => { 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 return false
} }
this.isAble = true this.isAble = true

Loading…
Cancel
Save