fix 80735
This commit is contained in:
+5
-1
@@ -43,7 +43,8 @@
|
|||||||
<a-button :loading="confirmLoading" @click="handleCancel">
|
<a-button :loading="confirmLoading" @click="handleCancel">
|
||||||
{{ $t('cancel') }}
|
{{ $t('cancel') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="primary" :loading="confirmLoading" @click="handleSubmitAddAdd">
|
<!-- 编辑的时候不显示提交并新增按钮 -->
|
||||||
|
<a-button v-if="type === 'add'" type="primary" :loading="confirmLoading" @click="handleSubmitAddAdd">
|
||||||
{{ $t('submitAddAdd') }}
|
{{ $t('submitAddAdd') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">
|
<a-button type="primary" :loading="confirmLoading" @click="handleOk">
|
||||||
@@ -100,12 +101,14 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
type: '', // 新增还是编辑
|
||||||
index: -1, // 编辑的表格的下标
|
index: -1, // 编辑的表格的下标
|
||||||
iframeSrc: '' // 左侧预览的路径
|
iframeSrc: '' // 左侧预览的路径
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (data) {
|
add (data) {
|
||||||
|
this.type = 'add'
|
||||||
this.data = Object.assign({}, data)
|
this.data = Object.assign({}, data)
|
||||||
// 后端获取预览文件
|
// 后端获取预览文件
|
||||||
getFileByInspectId({ inspectId: data.inspectId }).then(res => {
|
getFileByInspectId({ inspectId: data.inspectId }).then(res => {
|
||||||
@@ -119,6 +122,7 @@ export default {
|
|||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
},
|
},
|
||||||
edit (data, record, index) {
|
edit (data, record, index) {
|
||||||
|
this.type = 'edit'
|
||||||
// 后端获取预览文件
|
// 后端获取预览文件
|
||||||
getFileByInspectId({ inspectId: data.inspectId }).then(res => {
|
getFileByInspectId({ inspectId: data.inspectId }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user