From 47305dd209a3ce3889b088a2f2e2f05c923178c5 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 25 十一月 2024 18:38:01 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei
---
admin/src/views/operation/components/deviceEdit.vue | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/admin/src/views/operation/components/deviceEdit.vue b/admin/src/views/operation/components/deviceEdit.vue
index 185fbdc..1f81c25 100644
--- a/admin/src/views/operation/components/deviceEdit.vue
+++ b/admin/src/views/operation/components/deviceEdit.vue
@@ -1,6 +1,6 @@
<template>
- <GlobalWindow :title="param.id ? '缂栬緫璁惧' : '鏂板缓璁惧'" :confirmWorking="subLoading" :visible.sync="isShowModal" width="600px" @close="close"
- @confirm="handleSub">
+ <GlobalWindow :title="param.id ? '缂栬緫璁惧' : '鏂板缓璁惧'" :confirmWorking="subLoading" :visible.sync="isShowModal"
+ width="600px" @close="close" @confirm="handleSub">
<el-form :model="param" ref="paramRef" :rules="rules">
<el-form-item label="璁惧缂栫爜" prop="code">
<el-input v-model="param.code" placeholder="璇疯緭鍏�" v-trim />
@@ -12,17 +12,16 @@
<el-input v-model="param.modelNo" placeholder="璇疯緭鍏�" v-trim />
</el-form-item>
<el-form-item label="璁惧鍒嗙被" prop="">
- <el-cascader v-model="param.areaIds" @change="changeSel" placeholder="璇烽�夋嫨宸℃鍖哄煙" clearable :options="cateList"
+ <el-cascader v-model="param.areaIds" @change="changeSel" placeholder="璇烽�夋嫨璁惧鍒嗙被" clearable :options="cateList"
:props="{
label: 'name',
value: 'id',
- children: 'childCategoryList',
- checkStrictly: true
+ children: 'childCategoryList'
}"></el-cascader>
</el-form-item>
<el-form-item label="璁惧绠$悊鍛�" prop="">
- <el-select v-model="param.realName" filterable clearable>
- <el-option value="0" label="xxx"></el-option>
+ <el-select v-model="param.userId" clearable filterable class="w400">
+ <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="鎵�鍦ㄤ綅缃�" prop="">
@@ -60,6 +59,7 @@
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { fetchList } from '@/api/business/category'
import { create, updateById } from '@/api/Inspection/device'
+import { getUserList } from '@/api/system/user'
import { Message } from 'element-ui'
export default {
components: { GlobalWindow, UploadAvatarImage },
@@ -73,6 +73,7 @@
name: [{ required: true, message: '璇疯緭鍏�' }],
code: [{ required: true, message: '璇疯緭鍏�' }]
},
+ staffList: []
}
},
@@ -99,6 +100,11 @@
}
})
},
+ getStaff() {
+ getUserList({}).then(res => {
+ this.staffList = res
+ })
+ },
initData() {
fetchList({
model: { type: 5 },
@@ -107,20 +113,14 @@
}).then(res => {
this.cateList = res.records || []
})
-
+ this.getStaff()
},
changeSel(e) {
- if (e && e.length == 1) {
- this.$set(this.param, 'catePId', e[0])
- this.$set(this.param, 'cateId', '')
- } else if (e && e.length == 2) {
- this.$set(this.param, 'catePId', e[0])
- this.$set(this.param, 'cateId', e[1])
+ if (e && e.length == 2) {
+ this.$set(this.param, 'areaId', e[1])
} else {
- this.$set(this.param, 'catePId', '')
- this.$set(this.param, 'cateId', '')
+ this.$set(this.param, 'areaId', '')
}
- this.search()
},
uploadAvatarSuccess(file) {
this.$set(this.param, 'imgurl', file.imgurl)
@@ -132,6 +132,4 @@
}
}
}
-</script>
-
-<style lang="scss" scoped></style>
\ No newline at end of file
+</script>
\ No newline at end of file
--
Gitblit v1.9.3