| | |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="设备名称:" prop="deviceName"> |
| | | <el-input v-model.trim="state.form.deviceName" :disabled="state.title =='查看'"></el-input> |
| | | <!-- <el-input v-model.trim="state.form.deviceName" :disabled="state.title =='查看'"></el-input>--> |
| | | <el-select clearable v-model="state.form.deviceName" :readonly="state.title =='查看'" filterable placeholder="设备名称" style="width: 100%" @change="getDeviceInfo()"> |
| | | <el-option |
| | | v-for="item in state.deviceList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | |
| | | } from "@/api/innerReview/meetingReview"; |
| | | import {getDepart} from "@/api/orgStructure/depart"; |
| | | import {listUser} from "@/api/system/user"; |
| | | import {getMaintenanceServiceDetail, updateMaintenanceService} from "@/api/infrastructureMng/ledger"; |
| | | import { |
| | | getMaintenanceServiceDetail, |
| | | getStandingBookList, |
| | | updateMaintenanceService |
| | | } from "@/api/infrastructureMng/ledger"; |
| | | |
| | | const emit = defineEmits(["getList"]); |
| | | const dialogVisible = ref(false) |
| | |
| | | }, |
| | | isAdmin: false, |
| | | companyList: [], |
| | | userList: [] |
| | | userList: [], |
| | | deviceList: [] |
| | | }) |
| | | onMounted(() => { |
| | | |
| | |
| | | state.companyList = companyList |
| | | } |
| | | await getUserList(companyId) |
| | | await getDeviceList(companyId) |
| | | state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' |
| | | state.form.companyId = companyId |
| | | if(state.title == '编辑'||state.title == '查看'){ |
| | | await getInfo(value.id) |
| | | } |
| | | dialogVisible.value = true |
| | | } |
| | | |
| | | const getDeviceList = async (companyId) => { |
| | | const res = await getStandingBookList({pageNum: 1, pageSize: 999, companyId: companyId}) |
| | | if(res.code == 200){ |
| | | state.deviceList = res.data.list || [] |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const getDeviceInfo = ()=>{ |
| | | const foundNode = state.deviceList.find(i=>i.id == state.form.deviceName) |
| | | state.form = { |
| | | ...state.form, |
| | | deviceName: foundNode.name, |
| | | deviceNumber: foundNode.number |
| | | } |
| | | } |
| | | |
| | | const objectSpanMethod = ({row, column, rowIndex, columnIndex,}) => { |
| | |
| | | state.form.checkersOne = [] |
| | | state.form.operatorsTwo = [] |
| | | state.form.checkersTwo = [] |
| | | state.form.deviceName = '' |
| | | state.form.deviceNumber = '' |
| | | await getUserList(state.form.companyId) |
| | | await getDeviceList(state.form.companyId) |
| | | } |
| | | |
| | | |