修改已知问题

This commit is contained in:
qq787203167
2022-07-12 14:19:22 +08:00
parent 3acf90d33e
commit 060be76901
5 changed files with 138 additions and 73 deletions
@@ -177,11 +177,13 @@
//导出 //导出
handleExport() { handleExport() {
let query = { let query = {
lawsOpinionGatherId: this.lawsOpinionGatherId, pageSize:this.pageSize,
actiProcInstId: this.actiProcInstId pageNo:this.pageNo
// lawsOpinionGatherId: this.lawsOpinionGatherId,
// actiProcInstId: this.actiProcInstId
} }
downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls', downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls',
this.$t('evaluationResults') + '.xls', query) this.$t('evaluationResults') + '.zip', query)
}, },
getData(row) { getData(row) {
this.visible = true this.visible = true
@@ -206,7 +208,9 @@
getList() { getList() {
let query = { let query = {
lawsOpinionGatherId: this.lawsOpinionGatherId, lawsOpinionGatherId: this.lawsOpinionGatherId,
actiProcInstId: this.actiProcInstId actiProcInstId: this.actiProcInstId,
pageSize:this.pageSize,
pageNo:this.pageNo
} }
this.loading = true this.loading = true
getAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/page', query).then((res) => { getAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/page', query).then((res) => {
@@ -27,16 +27,16 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<div v-for="(item,index) in dataList" :key="index"> <div v-for="(item,index) in formInline.dataList" :key="index">
<div class="feedbackPoint"> <div class="feedbackPoint">
{{$t('feedbackPoint')+(index+1)}} {{$t('feedbackPoint')+(index+1)}}
<a-icon class="icon-size" <a-icon class="icon-size"
@click="addData" @click="addData"
v-if="(dataList.length-1) == index" v-if="(formInline.dataList.length-1) == index"
type="plus-circle"/> type="plus-circle"/>
<a-icon class="icon-size" <a-icon class="icon-size"
@click="deleteData" @click="deleteData"
v-if="dataList.length > 1 && (dataList.length - 1) == index" v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index"
type="minus-circle"/> type="minus-circle"/>
</div> </div>
<a-row :gutter="24"> <a-row :gutter="24">
@@ -46,7 +46,11 @@
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span> <span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="relatedSection"> <a-form-model-item class="itemModel"
:prop="'dataList.'+index+'.relatedSection'"
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
}]">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.relatedSection" v-model="item.relatedSection"
@@ -61,7 +65,10 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('problemDescription')">{{$t('problemDescription')}}</span> :title="$t('problemDescription')">{{$t('problemDescription')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="issueOrSuggest"> <a-form-model-item class="itemModel" :prop="'dataList.'+index+'.issueOrSuggest'"
:rules="[{ required: true, message: $t('problemDescription') + $t('cannotEmpty'), trigger: 'blur'},
{max: 300,message: $t('problemDescription') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
}]">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.issueOrSuggest" v-model="item.issueOrSuggest"
@@ -97,6 +104,7 @@
<script> <script>
import { getAction, postAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
export default { export default {
name: 'evaluatorFeedback', name: 'evaluatorFeedback',
components: { components: {
@@ -107,44 +115,78 @@
type: String, type: String,
default: '' default: ''
}, },
feedbackDataList:{ feedbackDataList: {
type: Array, type: Array,
default: (()=>{ default: (() => {
return [] return []
}) })
}, }
}, },
data() { data() {
return { return {
formInline: {}, formInline: {},
disabled:false, disabled: false,
rules: {}, rules: {
uploadIndex:'', flag:[
{
required: true,
message: this.$t('complianceResults') + this.$t('cannotEmpty'),
trigger: 'change'
},
],
relatedSection: [
{
required: true,
message: this.$t('relevantSections') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('relevantSections') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
issueOrSuggest: [
{
required: true,
message: this.$t('problemDescription') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('problemDescription') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
},
uploadIndex: '',
dataList: [] dataList: []
} }
}, },
mounted() { mounted() {
if (this.feedbackDataList && this.feedbackDataList.length > 0){ this.$nextTick(() => {
this.dataList = this.feedbackDataList if (this.feedbackDataList && this.feedbackDataList.length > 0) {
this.dataList = [...this.dataList] this.formInline.dataList = this.feedbackDataList
}else{ } else {
this.dataList = [ this.formInline.dataList = [
{ {
relatedSection: '', relatedSection: '',
issueOrSuggest: '', issueOrSuggest: '',
reason: '', reason: '',
accessoryFile: '' accessoryFile: ''
} }
] ]
} }
this.formInline = { ...this.formInline }
})
}, },
methods: { methods: {
clickButtonToUpload(item,index) { clickButtonToUpload(item, index) {
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
this.uploadName = item this.uploadName = item
this.uploadIndex = index this.uploadIndex = index
getAction('sys/common/getFileInfos', { id: this.dataList[this.uploadIndex][this.uploadName] }).then((res) => { getAction('sys/common/getFileInfos', { id: this.formInline.dataList[this.uploadIndex][this.uploadName] }).then((res) => {
if (res.success) { if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result) this.$refs.uploadFile.perentHandleFunc(res.result)
} else { } else {
@@ -161,22 +203,29 @@
}) })
} }
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',') this.formInline.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',')
this.dataList = [...this.dataList] this.formInline = [...this.formInline]
}, },
addData() { addData() {
this.dataList.push({ this.formInline.dataList.push({
relatedSection: '', relatedSection: '',
issueOrSuggest: '', issueOrSuggest: '',
reason: '', reason: '',
accessoryFile: '' accessoryFile: ''
}) })
this.dataList = [...this.dataList] this.formInline = [...this.formInline]
}, },
deleteData() { deleteData() {
this.dataList.pop() this.formInline.dataList.pop()
this.dataList = [...this.dataList] this.formInline = [...this.formInline]
} },
submitData(callBack){
this.$refs.ruleForm.validate(valid => {
if (valid) {
callBack && callBack(this.formInline)
}
})
},
} }
} }
</script> </script>
@@ -7,16 +7,16 @@
</div> </div>
<div class="content-text"> <div class="content-text">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<div v-for="(item,index) in dataList" :key="index"> <div v-for="(item,index) in formInline.dataList" :key="index">
<div class="feedbackPoint"> <div class="feedbackPoint">
{{$t('feedbackPoint')+(index+1)}} {{$t('feedbackPoint')+(index+1)}}
<a-icon class="icon-size" <a-icon class="icon-size"
@click="addData" @click="addData"
v-if="(dataList.length-1) == index" v-if="(formInline.dataList.length-1) == index"
type="plus-circle"/> type="plus-circle"/>
<a-icon class="icon-size" <a-icon class="icon-size"
@click="deleteData" @click="deleteData"
v-if="dataList.length > 1 && (dataList.length - 1) == index" v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index"
type="minus-circle"/> type="minus-circle"/>
</div> </div>
<a-row :gutter="24"> <a-row :gutter="24">
@@ -26,7 +26,11 @@
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span> <span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="relatedSection"> <a-form-model-item class="itemModel"
:prop="'dataList.'+index+'.relatedSection'"
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
}]">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.relatedSection" v-model="item.relatedSection"
@@ -41,7 +45,10 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('questionsSuggestions')">{{$t('questionsSuggestions')}}</span> :title="$t('questionsSuggestions')">{{$t('questionsSuggestions')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="issueOrSuggest"> <a-form-model-item class="itemModel" :prop="'dataList.'+index+'.issueOrSuggest'"
:rules="[{ required: true, message: $t('questionsSuggestions') + $t('cannotEmpty'), trigger: 'blur'},
{max: 300,message: $t('questionsSuggestions') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
}]">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.issueOrSuggest" v-model="item.issueOrSuggest"
@@ -101,44 +108,48 @@
type: String, type: String,
default: '' default: ''
}, },
feedbackDataList:{ feedbackDataList: {
type: Array, type: Array,
default: (()=>{ default: (() => {
return [] return []
}) })
}, }
}, },
data() { data() {
return { return {
formInline: {}, formInline: {},
disabled:false, disabled: false,
rules: {}, rules: {},
uploadIndex:'', uploadIndex: '',
dataList: [] dataList: []
} }
}, },
mounted() { mounted() {
if (this.feedbackDataList && this.feedbackDataList.length > 0){ this.$nextTick(() => {
this.dataList = this.feedbackDataList if (this.feedbackDataList && this.feedbackDataList.length > 0) {
this.dataList = [...this.dataList] this.formInline.dataList = this.feedbackDataList
}else{ this.formInline = { ...this.formInline }
this.dataList = [ } else {
{ this.formInline.dataList = [
relatedSection: '', {
issueOrSuggest: '', relatedSection: '',
reason: '', issueOrSuggest: '',
accessoryFile: '' reason: '',
} accessoryFile: ''
] }
} ]
}
this.formInline = { ...this.formInline }
})
}, },
methods: { methods: {
clickButtonToUpload(item,index) { clickButtonToUpload(item, index) {
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
this.uploadName = item this.uploadName = item
this.uploadIndex = index this.uploadIndex = index
getAction('sys/common/getFileInfos', { id: this.dataList[this.uploadIndex][this.uploadName] }).then((res) => { getAction('sys/common/getFileInfos', { id: this.formInline.dataList[this.uploadIndex][this.uploadName] }).then((res) => {
if (res.success) { if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result) this.$refs.uploadFile.perentHandleFunc(res.result)
} else { } else {
@@ -155,21 +166,21 @@
}) })
} }
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',') this.formInline.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',')
this.dataList = [...this.dataList] this.formInline = { ...this.formInline }
}, },
addData() { addData() {
this.dataList.push({ this.formInline.dataList.push({
relatedSection: '', relatedSection: '',
issueOrSuggest: '', issueOrSuggest: '',
reason: '', reason: '',
accessoryFile: '' accessoryFile: ''
}) })
this.dataList = [...this.dataList] this.formInline = { ...this.formInline }
}, },
deleteData() { deleteData() {
this.dataList.pop() this.formInline.dataList.pop()
this.dataList = [...this.dataList] this.formInline = { ...this.formInline }
} }
} }
} }
@@ -170,8 +170,9 @@
}) })
}, },
submit() { submit() {
let dataList = this.$refs.feedbackInformationRef.dataList this.$refs.evaluatorFeedbackRef.submitData()
this.insertBatch(dataList, 2) // let dataList = this.$refs.feedbackInformationRef.dataList
// this.insertBatch(dataList, 2)
}, },
completeTask() { completeTask() {
let query = { let query = {
@@ -134,7 +134,7 @@
}, },
preservation() { preservation() {
this.loading = true this.loading = true
let dataList = this.$refs.feedbackInformationRef.dataList let dataList = this.$refs.feedbackInformationRef.formInline.dataList
this.insertBatch(dataList, 1) this.insertBatch(dataList, 1)
}, },
insertBatch(list, num) { insertBatch(list, num) {
@@ -162,7 +162,7 @@
}) })
}, },
submit() { submit() {
let dataList = this.$refs.feedbackInformationRef.dataList let dataList = this.$refs.feedbackInformationRef.formInline.dataList
this.insertBatch(dataList, 2) this.insertBatch(dataList, 2)
}, },
completeTask() { completeTask() {