| | |
| | | </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"> |
| | |
| | | </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"> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="责任人" prop="employeeId"> |
| | | <el-input style="width: 240px" v-model="form.employeeId" placeholder="责任人" clearable></el-input> |
| | | <!-- <el-input style="width: 240px" v-model="form.employeeId" placeholder="责任人" 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"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | props: { |
| | | label: 'name', |
| | | }, |
| | | options: { |
| | | machineTypeId: [], |
| | | machineLifeStatus: [], |
| | |
| | | value: 0 |
| | | } |
| | | ], |
| | | machineUseStatus: [] |
| | | machineUseStatus: [], |
| | | employeeId: [], |
| | | groupId: [], |
| | | organizationId: [] |
| | | }, |
| | | mode: "add", |
| | | titleMap: { |
| | |
| | | })) |
| | | } |
| | | }) |
| | | 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) { |
| | |
| | | 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 = { |
| | |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | this.form = { |
| | | ...this.form, |
| | | ...params |
| | | } |
| | | } |
| | | |
| | | return this |