Commit ac2be39b authored by mzx's avatar mzx

feat(确认试验方案): 接口对接

parent 95d32c21
...@@ -212,6 +212,7 @@ ...@@ -212,6 +212,7 @@
返回 返回
</footer-button> </footer-button>
<footer-button <footer-button
v-if="this.isLeader !== false"
type="primary" type="primary"
icon="hard-disk-one" icon="hard-disk-one"
@click="goToProcessedReview" @click="goToProcessedReview"
...@@ -247,7 +248,8 @@ export default { ...@@ -247,7 +248,8 @@ export default {
inspectionLeader: '', inspectionLeader: '',
result: [] result: []
}, },
loading: false loading: false,
isLeader: ''
} }
}, },
mounted() { mounted() {
...@@ -264,15 +266,16 @@ export default { ...@@ -264,15 +266,16 @@ export default {
// this.ruleForm.enterpriseLeader, // this.ruleForm.enterpriseLeader,
// this.ruleForm.inspectionLeader // this.ruleForm.inspectionLeader
// ], // ],
imagesUrl: ['1', '2'], imagesUrl: [{}],
taskId: '1771093631118106626' taskId: this.$route.query.id
} }
console.log('formData', formData)
taskImageSubmit(formData).then(res => { taskImageSubmit(formData).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('确认提交成功') this.$modal.msgSuccess('确认提交成功')
// this.$router.push({ this.$router.push({
// path: '/processing/unprocessed-review' path: '/processing/unprocessed-review'
// }) })
} else { } else {
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
} }
...@@ -283,6 +286,9 @@ export default { ...@@ -283,6 +286,9 @@ export default {
getBySubtaskId({ id: this.$route.query.id }).then(res => { getBySubtaskId({ id: this.$route.query.id }).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.task = res.data this.task = res.data
const auditors = res.data.auditors
this.isLeader = auditors.some(item => item.isLeader === 1)
console.log('found', this.isLeader) // 输出: true 如果找到,否则输出: false
} }
}) })
}, },
......
...@@ -600,7 +600,7 @@ export default { ...@@ -600,7 +600,7 @@ export default {
// 确认测试结果 // 确认测试结果
case 'SIGNED': case 'SIGNED':
this.$router.push({ this.$router.push({
ath: `/processing/carTest/confirmation-test??id=${id}` path: `/processing/carTest/confirmation-test??id=${id}`
}) })
break break
case 'FINISH': case 'FINISH':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment