From 262e0fcf2e39e5cbef506f059dc61b5d9919bd25 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期三, 09 七月 2025 18:09:05 +0800
Subject: [PATCH] 修改地址
---
src/views/eam/equipment/modules/EamEquipmentModal.vue | 77 ++++++++++++++++++++++----------------
1 files changed, 44 insertions(+), 33 deletions(-)
diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index 0d8a601..a06b114 100644
--- a/src/views/eam/equipment/modules/EamEquipmentModal.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -24,7 +24,7 @@
</a-col>
<a-col :span="customSpan">
<a-form-model-item prop="equipmentCode" label="缁熶竴缂栫爜">
- <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜" v-model="model.equipmentCode"/>
+ <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜" v-model="model.equipmentCode" :disabled="!editable"/>
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
@@ -35,7 +35,7 @@
<a-col :span="customSpan">
<a-form-model-item prop="factoryOrgCode" label="浣跨敤閮ㄩ棬">
<a-tree-select v-model="model.factoryOrgCode" style="width: 100%" show-search
- :tree-data="productionTreeData"
+ :tree-data="productionTreeData" :disabled="!editable"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" allow-clear treeNodeFilterProp="title"
:replaceFields="{key:'orgCode',value:'orgCode'}"
@@ -47,7 +47,7 @@
<a-row>
<a-col :span="customSpan">
<a-form-model-item prop="equipmentCategory" label="鎵�灞炲垎绫�">
- <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨鎵�灞炲垎绫�"
+ <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨鎵�灞炲垎绫�" :disabled="!editable"
v-model="model.equipmentCategory"/>
</a-form-model-item>
</a-col>
@@ -58,7 +58,11 @@
</a-col>
<a-col :span="customSpan">
<a-form-model-item prop="repairDepartOrgCode" label="缁翠慨鐝粍">
- <a-input placeholder="璇烽�夋嫨缁翠慨鐝粍" v-model="model.repairDepartOrgCode"/>
+ <a-tree-select v-model="model.repairDepartOrgCode" style="width: 100%"
+ show-search :tree-data="repairDepartTreeData" treeNodeFilterProp="title"
+ :replaceFields="{key:'orgCode',value:'orgCode'}" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储"
+ :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨缁翠慨鐝粍"
+ allow-clear tree-default-expand-all/>
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
@@ -95,7 +99,7 @@
<a-row>
<a-col :span="customSpan">
<a-form-model-item label="绯荤粺">
- <a-input placeholder="璇疯緭鍏ョ郴缁�" :disabled="Boolean(+model.operationSystem)" v-model="model.system"/>
+ <a-input placeholder="璇疯緭鍏ョ郴缁�" :disabled="!Boolean(+model.operationSystem)" v-model="model.system"/>
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
@@ -212,7 +216,8 @@
<a-row>
<a-col :span="customSpan">
<a-form-model-item label="鏈涓変繚鏃ユ湡">
- <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD" style="width:100%"/>
+ <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD"
+ :disabled="!editable" style="width:100%"/>
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
@@ -221,14 +226,15 @@
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
- <a-form-model-item label="涓変繚鍛ㄦ湡">
- <a-input-number placeholder="璇疯緭鍏ヤ笁淇濆懆鏈�" v-model="model.thirdMaintenancePeriod" :min="0"
+ <a-form-model-item label="涓変繚鍛ㄦ湡锛堝勾锛�">
+ <a-input-number placeholder="璇疯緭鍏ヤ笁淇濆懆鏈燂紙骞达級" v-model="model.thirdMaintenancePeriod" :min="1"
style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
<a-form-model-item label="鏈鎶�鏈壌瀹氭棩鏈�">
- <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD" style="width:100%"/>
+ <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD"
+ :disabled="!editable" style="width:100%"/>
</a-form-model-item>
</a-col>
</a-row>
@@ -240,8 +246,8 @@
</a-form-model-item>
</a-col>
<a-col :span="customSpan">
- <a-form-model-item label="鎶�鏈壌瀹氬懆鏈�">
- <a-input-number placeholder="璇疯緭鍏ユ妧鏈壌瀹氬懆鏈�" v-model="model.technologyCheckPeriod" :min="0"
+ <a-form-model-item label="鎶�鏈壌瀹氬懆鏈燂紙骞达級">
+ <a-input-number placeholder="璇疯緭鍏ユ妧鏈壌瀹氬懆鏈燂紙骞达級" v-model="model.technologyCheckPeriod" :min="1"
style="width: 100%"/>
</a-form-model-item>
</a-col>
@@ -289,6 +295,9 @@
name: 'EamEquipmentModal',
props: {
productionTreeData: {
+ type: Array
+ },
+ repairDepartTreeData: {
type: Array
}
},
@@ -348,7 +357,7 @@
},
methods: {
add() {
- this.editable = false
+ this.editable = true
//鍒濆鍖栭粯璁ゅ��
this.model = {
operationSystem: 1,
@@ -358,7 +367,7 @@
},
edit(record) {
- this.editable = true
+ this.editable = false
this.model = Object.assign({}, record)
this.visible = true
},
@@ -369,32 +378,34 @@
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true
- let httpurl = ''
+ let httpUrl = ''
let method = ''
if (!this.model.id) {
- httpurl += this.url.add
+ httpUrl += this.url.add
method = 'post'
} else {
- httpurl += this.url.edit
+ httpUrl += this.url.edit
method = 'put'
}
- httpAction(httpurl, this.model, method).then((res) => {
- if (res.success) {
- that.$notification.success({
- message: '娑堟伅',
- description: res.message
- })
- that.$emit('ok')
- that.close()
- } else {
- that.$notification.warning({
- message: '娑堟伅',
- description: res.message
- })
- }
- }).finally(() => {
- that.confirmLoading = false
- })
+ httpAction(httpUrl, this.model, method)
+ .then((res) => {
+ if (res.success) {
+ that.$notification.success({
+ message: '娑堟伅',
+ description: res.message
+ })
+ that.$emit('ok')
+ that.close()
+ } else {
+ that.$notification.warning({
+ message: '娑堟伅',
+ description: res.message
+ })
+ }
+ })
+ .finally(() => {
+ that.confirmLoading = false
+ })
} else {
return false
}
--
Gitblit v1.9.3