| | |
| | | </el-dialog> |
| | | <!-- 下发 --> |
| | | <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose"> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm"> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="150px" ref="ruleForm"> |
| | | <el-form-item label="约定时间:"> |
| | | <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData.downTime" |
| | | <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData2.appointed2" |
| | | type="date" size="small" placeholder="选择时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | </el-form-item> |
| | | <el-form-item label="指派人员:"> |
| | | <el-select v-model="formData.equipmentManager" placeholder="请选择" size="small" style="width:100%"> |
| | | <el-select v-model="formData2.getUserMenu" placeholder="请选择" size="small" style="width:100%"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleClose">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad">确 定</el-button> |
| | | <el-button @click="handleClose2">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose"> |
| | | <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose2"> |
| | | <div style="height: 70vh;overflow-y: auto;"> |
| | | <ValueTable ref="ValueTableDataLook" :url="$api.deviceScope.selectDeviceParameter" |
| | | :componentData="componentDataDataLook" :key="upIndex" /> |
| | |
| | | verifyDialogVisible: false, |
| | | quashDialogVisible: false, |
| | | issuedDialogVisible: false, |
| | | issuedDialogVisible2: false, |
| | | dataDialogVisible: false, |
| | | formData: {}, |
| | | formData0:{}, |
| | | formData1:{}, |
| | | formData2:{}, |
| | | // 人员列表 |
| | | personList: [], |
| | | labelPosition: 'right', |
| | |
| | | method: 'handleIssued' |
| | | }], |
| | | tagField: { |
| | | deviceStatus: { |
| | | type: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'success', |
| | | label: '正常' |
| | | label: '普通' |
| | | }, { |
| | | value: 1, |
| | | type: 'warning', |
| | | label: '报废' |
| | | label: '优先' |
| | | }, { |
| | | value: 2, |
| | | type: 'danger', |
| | | label: '保修' |
| | | label: '紧急' |
| | | }] |
| | | } |
| | | }, |
| | | }, |
| | | linkEvent:{ |
| | | deviceName:{ |
| | |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | methods: { |
| | | getAuthorizedPerson(){ |
| | | this.$axios.get(this.$api.deviceScope.selectDevicePrincipal).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a=>{ |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | |
| | | this.dataDialogVisible = false; |
| | | this.upLoad = false; |
| | | }, |
| | | handleClose2() { |
| | | this.verifyDialogVisible = false; |
| | | this.quashDialogVisible = false; |
| | | this.issuedDialogVisible = false; |
| | | this.dataDialogVisible = false; |
| | | this.upLoad = false; |
| | | }, |
| | | // 详情 |
| | | selectAllByOne(row) { |
| | | //打开弹框 |
| | |
| | | // 下发 |
| | | handleIssued(row) { |
| | | this.issuedDialogVisible = true; |
| | | this.issuedDialogVisible2 = true; |
| | | }, |
| | | submitForm2(){ |
| | | this.upLoad = true; |
| | | this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData2, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.refreshTable() |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('修改失败') |
| | | this.dialogVisible = false |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | submitForm() { |
| | | this.upLoad = true; |
| | |
| | | delete this.formData.createUser |
| | | delete this.formData.updateUser |
| | | this.formData.authorizedPerson = authorizedPerson |
| | | this.$axios.post(this.$api.deviceScope.upDeviceParameter, this.formData, { |
| | | this.$axios.post(this.$api.insOrder.getDeviceManager, this.formData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |