diff --git a/src/views/ea/electronicAssets/index.vue b/src/views/ea/electronicAssets/index.vue index b21d93f8..83cec844 100644 --- a/src/views/ea/electronicAssets/index.vue +++ b/src/views/ea/electronicAssets/index.vue @@ -178,12 +178,12 @@ + :on-success="handleSuccess" name="multipartFile" :multiple="false" :accept="imgType" v-show="uploadDisabled">
将文件拖到此处,或点击上传
- + @@ -196,7 +196,7 @@ + placeholder="请选择归属部门" :normalizer="normalizer" :disabled="treeDisabled" /> @@ -345,6 +345,8 @@ export default { Authorization: "Bearer " + getAccessToken(), "tenant-id": getTenantId(), }, // 设置上传的请求头 + uploadDisabled: undefined, + treeDisabled: undefined, fileList: [], // 文件列表 // 部门树选项 deptOptions: undefined, @@ -402,7 +404,14 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + company: [ + { required: true, message: "业务实体不能为空", trigger: "change" }, + ], + assetCode: [ + { required: true, message: "资产编号不能为空", trigger: "change" }, + ], + }, organizationList: [], siteOptions: [], //归档位置数据 siteArray: [], //归档位置选中值 @@ -573,11 +582,15 @@ export default { this.fileList = []; this.open = true; this.optType = "add"; + this.treeDisabled = false; + this.uploadDisabled = true; this.title = "添加资产档案"; }, /** 查看按钮操作 */ handleView(row) { this.reset(); + this.treeDisabled = true; + this.uploadDisabled = false; this.optType = "view"; const id = row.id; getElectronicAssets(id).then((response) => { @@ -590,6 +603,8 @@ export default { handleUpdate(row) { this.reset(); const id = row.id; + this.treeDisabled = false; + this.uploadDisabled = true; this.optType = "edit"; getElectronicAssets(id).then((response) => { this.form = response.data;