update 流程完善
This commit is contained in:
+19
-5
@@ -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
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user