From a2441175073f8b09a7eff29effd7e3e617de2f7d Mon Sep 17 00:00:00 2001 From: lzhe <lzhe@example.com> Date: 星期四, 06 六月 2024 18:23:01 +0800 Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web --- src/views/tpm/machine/Dialog.vue | 42 ++++++++++++++++++++++++++++++++++++------ 1 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/views/tpm/machine/Dialog.vue b/src/views/tpm/machine/Dialog.vue index c81c2c8..ff909eb 100644 --- a/src/views/tpm/machine/Dialog.vue +++ b/src/views/tpm/machine/Dialog.vue @@ -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"> @@ -219,8 +221,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"> @@ -247,7 +249,9 @@ </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 +298,9 @@ }, data() { return { + props: { + label: 'name', + }, options: { machineTypeId: [], machineLifeStatus: [], @@ -317,7 +324,10 @@ value: 0 } ], - machineUseStatus: [] + machineUseStatus: [], + employeeId: [], + groupId: [], + organizationId: [] }, mode: "add", titleMap: { @@ -476,6 +486,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 +511,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 +520,11 @@ } } }) + } else { + this.form = { + ...this.form, + ...params + } } return this -- Gitblit v1.9.3