fix 80735

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