From d17f57f3676bd309d524146a218daa7cea316085 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期三, 23 十月 2024 20:01:32 +0800
Subject: [PATCH] update img
---
src/views/tpm/machine/Dialog.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/src/views/tpm/machine/Dialog.vue b/src/views/tpm/machine/Dialog.vue
index c81c2c8..a518815 100644
--- a/src/views/tpm/machine/Dialog.vue
+++ b/src/views/tpm/machine/Dialog.vue
@@ -51,7 +51,7 @@
<el-form-item label="鐢熷懡鐘舵��" prop="machineLifeStatus">
<el-select v-model="form.machineLifeStatus" placeholder="" style="width: 240px">
<el-option v-for="item in options.machineLifeStatus" :key="item.value" :label="item.label"
- :value="item.value" />
+ :value="item.value - 0" />
</el-select>
</el-form-item>
</el-col>
@@ -107,7 +107,9 @@
</el-col>
<el-col :span="8">
<el-form-item label="鎵�灞炴満鍣ㄧ粍" prop="groupId">
- <el-input style="width: 240px" v-model="form.groupId" placeholder="鎵�灞炴満鍣ㄧ粍" clearable></el-input>
+ <!-- <el-input style="width: 240px" v-model="form.groupId" placeholder="鎵�灞炴満鍣ㄧ粍" clearable></el-input> -->
+ <el-tree-select v-model="form.groupId" node-key="id" :props="props" :data="options.groupId"
+ filterable style="width: 240px" />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -117,14 +119,15 @@
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="宸ヤ綅缂栧彿" prop="workstationId">
- <el-input style="width: 240px" v-model="form.workstationId" placeholder="鏈粦瀹�"
+ <el-form-item label="宸ヤ綅缂栧彿" prop="workstationCode">
+ <el-input style="width: 240px" v-model="form.workstationCode" placeholder="鏈粦瀹�"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="宸ヤ綅鍚嶇О" prop="code">
- <el-input style="width: 240px" v-model="form.code" placeholder="鏈粦瀹�" disabled></el-input>
+ <el-form-item label="宸ヤ綅鍚嶇О" prop="workstationName">
+ <el-input style="width: 240px" v-model="form.workstationName" placeholder="鏈粦瀹�"
+ disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@@ -219,8 +222,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="浣跨敤閮ㄩ棬" prop="organizationId">
- <el-input style="width: 240px" v-model="form.organizationId" placeholder="浣跨敤閮ㄩ棬"
- clearable></el-input>
+ <el-tree-select v-model="form.organizationId" node-key="id" :props="props"
+ :data="options.organizationId" filterable style="width: 240px" />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -241,13 +244,15 @@
<el-form-item label="浣跨敤鐘舵��" prop="machineUseStatus">
<el-select v-model="form.machineUseStatus" placeholder="" style="width: 240px">
<el-option v-for="item in options.machineUseStatus" :key="item.value" :label="item.label"
- :value="item.value" />
+ :value="item.value - 0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="璐d换浜�" prop="employeeId">
- <el-input style="width: 240px" v-model="form.employeeId" placeholder="璐d换浜�" clearable></el-input>
+ <!-- <el-input style="width: 240px" v-model="form.employeeId" placeholder="璐d换浜�" clearable></el-input> -->
+ <el-tree-select v-model="form.employeeId" node-key="id" :props="props"
+ :data="options.employeeId" filterable style="width: 240px" />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -294,6 +299,9 @@
},
data() {
return {
+ props: {
+ label: 'name',
+ },
options: {
machineTypeId: [],
machineLifeStatus: [],
@@ -317,7 +325,10 @@
value: 0
}
],
- machineUseStatus: []
+ machineUseStatus: [],
+ employeeId: [],
+ groupId: [],
+ organizationId: []
},
mode: "add",
titleMap: {
@@ -348,8 +359,9 @@
softwareVersion: '',
groupId: '',
linkWay: '',
- machineCode: '',
workstationId: '',
+ workstationCode: '',
+ workstationName: '',
code: '',
status: '',
invoiceValue: '',
@@ -476,6 +488,21 @@
}))
}
})
+ this.$HTTP.get('/api/blade-cps/employee/tree').then(res => {
+ if (res.code === 200) {
+ this.options.employeeId = res.data
+ }
+ })
+ this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => {
+ if (res.code === 200) {
+ this.options.groupId = res.data
+ }
+ })
+ this.$HTTP.get('/api/blade-cps/organization/tree?groupType=group_organization&groupCategory=1').then(res => {
+ if (res.code === 200) {
+ this.options.organizationId = res.data
+ }
+ })
},
//鏄剧ず
open(mode = 'add', params) {
@@ -486,7 +513,7 @@
Object.keys(this.form).forEach(item => {
this.form[item] = ''
})
- if (params) {
+ if (params.id) {
this.$HTTP.get(`/api/blade-cps/machine/detail/${params.id}`).then(res => {
if (res.code === 200) {
this.form = {
@@ -495,6 +522,11 @@
}
}
})
+ } else {
+ this.form = {
+ ...this.form,
+ ...params
+ }
}
return this
@@ -528,7 +560,7 @@
this.visible = false;
this.$message.success("鎿嶄綔鎴愬姛")
} else {
- this.$alert(res.message, "鎻愮ず", { type: 'error' })
+ this.$alert(res.msg, "鎻愮ず", { type: 'error' })
}
} else {
return false;
--
Gitblit v1.9.3