update 流程完善

This commit is contained in:
danshihao
2023-12-11 16:30:33 +08:00
parent a496845545
commit 6e17e428d6
6 changed files with 47 additions and 11 deletions
@@ -57,7 +57,7 @@ import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { addInspectionContentTable, editInspectionContentTable } from '@api/workCenter'
import { addInspectionContentTable, editInspectionContentTable, getFileIdByInspectId } from '@api/workCenter'
const Base64 = require('js-base64').Base64
@@ -104,15 +104,29 @@ export default {
methods: {
add (data) {
this.data = Object.assign({}, data)
this.getFileInfo(data.file).then(res => {
this.handlePreview(res)
// 后端获取预览文件id接口
getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
return res.success ? res.result.id : ''
}).then(fileId => {
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
})
}).catch(err => {
console.log(err)
})
this.visible = true
this.form.resetFields()
},
edit (data, record, index) {
this.getFileInfo(data.file).then(res => {
this.handlePreview(res)
// 后端获取预览文件id接口
getFileIdByInspectId({ inspectId: data.inspectId }).then(res => {
return res.success ? res.result.id : ''
}).then(fileId => {
this.getFileInfo(fileId).then(res => {
this.handlePreview(res)
})
}).catch(err => {
console.log(err)
})
this.visible = true
this.index = index
@@ -61,7 +61,7 @@
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="evaluateScore">
<a-input-number v-model="form.evaluateScore" :min="1" :max="200" disabled
<a-input-number v-model="form.evaluateScore" :min="0" :max="100" disabled
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
@@ -61,7 +61,7 @@
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="evaluateScore">
<a-input-number v-model="form.evaluateScore" :min="1" :max="200"
<a-input-number v-model="form.evaluateScore" :min="0" :max="100"
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>