update 自定义比对

This commit is contained in:
赵霄
2023-10-30 16:44:10 +08:00
parent 51bef13b1b
commit 93496eef14
7 changed files with 189 additions and 140 deletions
@@ -14,8 +14,9 @@
<a-form :form="form">
<!--文本-->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('docTool.split.text')">
<a-input v-decorator="[`text`]"
<a-input v-decorator="[`content`]"
:maxLength="50"
:disabled="!isEdit"
:placeholder="$t('pleaseEnter') + $t('docTool.split.text')"
@change="e => {e.target.value = (e.target.value + '').trim()}" />
</a-form-item>
@@ -23,13 +24,13 @@
<a-form-item :labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('docTool.customComparison.relatedAccessory')">
<j-upload return-id v-decorator="[`fileId`]" />
<j-upload return-id v-decorator="[`fileId`]" :disabled="!isEdit"/>
</a-form-item>
</a-form>
</a-spin>
</div>
<div class="custom-drawer-style-bottom-btn">
<div class="custom-drawer-style-bottom-btn" v-if="isEdit">
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;" :loading="confirmLoading">
{{ $t('preservation') }}
</a-button>
@@ -58,12 +59,17 @@ export default {
xs: { span: 24 },
sm: { span: 18 }
},
model: {}
model: {},
isEdit: true
}
},
methods: {
open (record) {
open (record, isEdit) {
this.visible = true
this.isEdit = isEdit
if (!this.isEdit) {
this.title = this.$t('details')
}
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(this.model)