修改未符合项的传参

This commit is contained in:
qq787203167
2022-05-12 16:22:25 +08:00
parent 0b9bcce9e3
commit 348f49b1d1
6 changed files with 107 additions and 61 deletions
+2
View File
@@ -811,4 +811,6 @@ module.exports = {
reasonsForRejection:'Reasons for rejection', reasonsForRejection:'Reasons for rejection',
inconformity:'Non-Compliance', inconformity:'Non-Compliance',
toTrack:'To be tracked', toTrack:'To be tracked',
Launch:'Launch',
maintainProgress:'Maintain'
} }
+3 -1
View File
@@ -815,5 +815,7 @@ module.exports = {
maintainVirtualList:'维护虚拟清单', maintainVirtualList:'维护虚拟清单',
reasonsForRejection:'驳回原因', reasonsForRejection:'驳回原因',
inconformity:'不符合', inconformity:'不符合',
toTrack:'待追踪' toTrack:'待追踪',
Launch:'发起',
maintainProgress:'维护进度'
} }
@@ -34,10 +34,12 @@
dataSource: [], dataSource: [],
loading: false, loading: false,
reviewResult: { reviewResult: {
'conformity': this.$t('accord'), 'launch':this.$t('Launch'),
'inconformity': this.$t('nonConformity'), 'Compliance': this.$t('accord'),
'to track': this.$t('Tracked'), 'Non-Compliance': this.$t('nonConformity'),
'uninvolved': this.$t('notInvolved') 'To be tracked': this.$t('Tracked'),
'NA': this.$t('notInvolved'),
'No rating': this.$t('toBeConfirmed')
}, },
columns: [ columns: [
{ {
@@ -67,7 +67,9 @@
<div class="content" v-if="result.designTaskStatus" @click="verifyTaskClick(result,1,false)"> <div class="content" v-if="result.designTaskStatus" @click="verifyTaskClick(result,1,false)">
<span class="box-content">{{$t('Deadline')}}: {{result.designDueDate}}</span><br/> <span class="box-content">{{$t('Deadline')}}: {{result.designDueDate}}</span><br/>
<span class="box-content">{{$t('ProcessStatus')}}: {{result.designStatus}}</span><br/> <span class="box-content">{{$t('ProcessStatus')}}: {{result.designStatus}}</span><br/>
<span class="box-content-color" :class="color[result.designFlowTaskStatus]"> <span class="box-content-color"
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
:class="color[result.designFlowTaskStatus]">
{{statusText[result.designFlowTaskStatus]}} {{statusText[result.designFlowTaskStatus]}}
</span> </span>
</div> </div>
@@ -79,7 +81,9 @@
<div class="content" v-if="result.prehomoTaskStatus" @click="verifyTaskClick(result,2,false)"> <div class="content" v-if="result.prehomoTaskStatus" @click="verifyTaskClick(result,2,false)">
<span class="box-content">{{$t('Deadline')}}: {{result.prehomoDueDate}}</span><br/> <span class="box-content">{{$t('Deadline')}}: {{result.prehomoDueDate}}</span><br/>
<span class="box-content">{{$t('ProcessStatus')}}: {{result.prehomoStatus}}</span><br/> <span class="box-content">{{$t('ProcessStatus')}}: {{result.prehomoStatus}}</span><br/>
<span class="box-content-color" :class="color[result.prehomoFlowTaskStatus]"> <span class="box-content-color"
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
:class="color[result.prehomoFlowTaskStatus]">
{{statusText[result.prehomoFlowTaskStatus]}} {{statusText[result.prehomoFlowTaskStatus]}}
</span> </span>
</div> </div>
@@ -91,7 +95,9 @@
<div class="content" v-if="result.verifyTaskStatus" @click="verifyTaskClick(result,3,false)"> <div class="content" v-if="result.verifyTaskStatus" @click="verifyTaskClick(result,3,false)">
<span class="box-content">{{$t('Deadline')}}: {{result.verifyDueDate}}</span><br/> <span class="box-content">{{$t('Deadline')}}: {{result.verifyDueDate}}</span><br/>
<span class="box-content">{{$t('ProcessStatus')}}: {{result.verifyStatus}}</span><br/> <span class="box-content">{{$t('ProcessStatus')}}: {{result.verifyStatus}}</span><br/>
<span class="box-content-color" :class="color[result.verifyFlowTaskStatus]"> <span class="box-content-color"
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
:class="color[result.verifyFlowTaskStatus]">
{{statusText[result.verifyFlowTaskStatus]}} {{statusText[result.verifyFlowTaskStatus]}}
</span> </span>
</div> </div>
@@ -100,8 +106,12 @@
</div> </div>
</div> </div>
<div slot="CertificationProgress" slot-scope="text,result"> <div slot="CertificationProgress" slot-scope="text,result">
<span class="box-content-Progress box-content-cou" @click="CertificationProgressClick(result)"> <span class="box-content-Progress box-content-cou"
实验通过 :style="{'width':long=='zh-cn'?'88px' : '108px'}"
:class="CertificationColor[result.certificationProgress]"
@click="CertificationProgressClick(result)"
>
{{result.certificationProgress_dictText ? result.certificationProgress_dictText : $t('maintainProgress')}}
</span> </span>
</div> </div>
<div slot="CurrentProjectStatusEvaluation" slot-scope="text,result"> <div slot="CurrentProjectStatusEvaluation" slot-scope="text,result">
@@ -112,7 +122,7 @@
</a-table> </a-table>
</div> </div>
<certificationDirectory :url="url" ref="certificationDirectoryRef"/> <certificationDirectory :url="url" ref="certificationDirectoryRef"/>
<TaskListModel ref="TaskListModelRef"/> <TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
</a-card> </a-card>
</template> </template>
@@ -209,17 +219,26 @@
'NA': this.$t('notInvolved'), 'NA': this.$t('notInvolved'),
'No rating': this.$t('toBeConfirmed') 'No rating': this.$t('toBeConfirmed')
}, },
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
'In progress': 'TrackedColor',
'NA': 'notInvolvedColor',
'Not start': 'submittedColor'
},
queryParam: {}, queryParam: {},
url: { url: {
list: '/project/projectTaskInventoryEO/list' list: '/project/projectTaskInventoryEO/list'
}, },
loading: false, loading: false,
dataSource: [] dataSource: [],
long: ''
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.long = localStorage.getItem('language') || 'zh-cn'
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
@@ -333,6 +352,9 @@
CurrentProjectClick(val) { CurrentProjectClick(val) {
let item = JSON.parse(JSON.stringify(val)) let item = JSON.parse(JSON.stringify(val))
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentProjectStatusEvaluation')) this.$refs.TaskListModelRef.getData(item, this.$t('CurrentProjectStatusEvaluation'))
},
TaskListModelList() {
this.getList()
} }
} }
} }
@@ -459,6 +481,17 @@
line-height: 32px; line-height: 32px;
} }
.box-content-Progress {
width: 88px;
height: 32px;
display: inline-block;
text-align: center;
line-height: 32px;
border-radius: 4px;
background: #dbf6e2;
color: #26BD4B;
}
.accordColor { .accordColor {
background: #dbf6e2; background: #dbf6e2;
color: #26BD4B; color: #26BD4B;
@@ -506,16 +539,6 @@
cursor: pointer; cursor: pointer;
} }
.box-content-Progress {
width: 88px;
height: 32px;
display: inline-block;
text-align: center;
line-height: 32px;
border-radius: 4px;
background: #dbf6e2;
color: #26BD4B;
}
</style> </style>
<style> <style>
.box-input .ant-select-selection { .box-input .ant-select-selection {
@@ -13,54 +13,31 @@
<a-col :span="24" v-if="title == $t('CertificationProgress')"> <a-col :span="24" v-if="title == $t('CertificationProgress')">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span> :title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="certificationProgress"> <a-form-model-item class="itemModel" :prop="!disabled?'certificationProgress':''">
<a-select v-model="formInline.certificationProgress" <j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"> :disabled="disabled"
<a-select-option :key="1" :value="1"> @input="handleInput('certificationProgress')"
<span style="display: inline-block;width: 100%"> :placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
{{ $t('experimentPassed') }} :type="'select'"
</span> :triggerChange="false" :dictCode="'certification_progress'"/>
</a-select-option>
<a-select-option :key="2" :value="2">
<span style="display: inline-block;width: 100%">
{{ $t('experimentFailed') }}
</span>
</a-select-option>
<a-select-option :key="3" :value="3">
<span style="display: inline-block;width: 100%">
{{ $t('toBeStarted') }}
</span>
</a-select-option>
<a-select-option :key="4" :value="4">
<span style="display: inline-block;width: 100%">
{{ $t('inProgress') }}
</span>
</a-select-option>
<a-select-option :key="5" :value="5">
<span style="display: inline-block;width: 100%">
{{ $t('notInvolved') }}
</span>
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24" v-if="title == $t('CertificationProgress')"> <a-col :span="24" v-if="title == $t('CertificationProgress')">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span> :title="$t('remarks')">{{$t('remarks')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="certificationProgressRemark"> <a-form-model-item class="itemModel" :prop="!disabled?'certificationProgressRemark':''">
<a-textarea <a-textarea
:placeholder="$t('PleaseEnter')+$t('remarks')" :placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="false" :disabled="disabled"
v-model="formInline.certificationProgressRemark" :rows="4"/> v-model="formInline.certificationProgressRemark" :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -121,6 +98,8 @@
</template> </template>
<script> <script>
import { getAction, putAction } from '@/api/manage'
export default { export default {
name: 'TaskListModel', name: 'TaskListModel',
data() { data() {
@@ -129,7 +108,11 @@
rules: {}, rules: {},
title: this.$t('CertificationProgress'), title: this.$t('CertificationProgress'),
visible: false, visible: false,
confirmLoading: false confirmLoading: false,
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit'
}
} }
}, },
mounted() { mounted() {
@@ -137,15 +120,50 @@
}, },
methods: { methods: {
getData(val, title) { getData(val, title) {
this.formInline = {}
this.visible = true this.visible = true
this.title = title this.title = title
this.formInline = val
if (val.roleCode == '2' || val.roleCode == '4') {
this.disabled = false
} else {
this.disabled = true
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
}) })
}, },
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() { handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
id: this.formInline.id,
certificationProgress: this.formInline.certificationProgress,
certificationProgressRemark: this.formInline.certificationProgressRemark
}
this.confirmLoading = true
putAction(this.url.edit, query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('TaskListModelList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
} }
} }
} }
@@ -318,7 +318,6 @@
}) })
}, },
handleExport() { handleExport() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = { let query = {
...this.queryParam, ...this.queryParam,
ncrTrackVOList: this.content ncrTrackVOList: this.content