| | |
| | | <el-menu-item index="0" @click="changeUnit(null, '全部')"> |
| | | 全部单位({{ totalWorkOrders }}) |
| | | </el-menu-item> |
| | | <el-menu-item :index="index + 1" v-for="(item, index) in unitList" :key="index" @click="changeUnit(item.id, item.value)"> |
| | | <el-menu-item :index="index + 1 +''" v-for="(item, index) in unitList" :key="index" @click="changeUnit(item.id, item.value)"> |
| | | {{ item.unitName }}({{ item.workOrderCount }}) |
| | | </el-menu-item> |
| | | </el-menu> |
| | |
| | | v-hasPermi="['work:order:delete']" |
| | | >删除 |
| | | </el-button> |
| | | <el-button size="mini" plain type="info" @click="selectedDistribute" class="op">批量上报</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <el-row style="display: flex;"> |
| | | <el-checkbox v-if="$store.state.user.roles.includes('admin')" |
| | | v-model="isItemSelected[item.workOrderNo]" |
| | | @change="toggleSelection(item.workOrderNo)" |
| | | @change="toggleSelection(item)" |
| | | style="margin-right: 10px; "></el-checkbox> |
| | | <el-tooltip |
| | | effect="dark" |
| | |
| | | |
| | | <el-dialog title="运维情况记录" :visible.sync="ywConditionOpen" width="500px" append-to-body> |
| | | <el-form ref="ywConditionForm" :model="form" :rules="ywConditionRules" label-width="80px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-form-item label="工单号" prop="workOrderNo" v-if="!isConditionList"> |
| | | <el-input v-model="ywConditionForm.workOrderNo" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitName"> |
| | | <el-form-item label="运维单位" prop="unitName" v-if="!isConditionList"> |
| | | <el-input v-model="ywConditionForm.unitName" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="现场情况" prop="ywCondition"> |
| | |
| | | </style> |
| | | <script> |
| | | import { |
| | | ywConditionList, |
| | | listWorkOrder, |
| | | getWorkOrder, |
| | | delWorkOrder, |
| | |
| | | components: {WorkOrderAuditing}, |
| | | data() { |
| | | return { |
| | | isConditionList:false, |
| | | isSelectAll: false, // 全选按钮 |
| | | activeIndex: '0', |
| | | drawer: false, |
| | |
| | | ywData: { |
| | | content: '', |
| | | fileList: 'process.env.VUE_APP_BASE_API' |
| | | } |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | selectedDistribute(){ |
| | | this.form = {} |
| | | if (this.workOrderNumbers.length < 1) { |
| | | this.$message.warning("请先选择要下发的工单") |
| | | return |
| | | } |
| | | this.form.workOrderNumbers = this.workOrderNumbers; |
| | | this.ywConditionOpen = true |
| | | this.isConditionList = true |
| | | }, |
| | | |
| | | //全选按钮 |
| | | toggleSelectAll() { |
| | | this.isSelectAll = !this.isSelectAll; |
| | |
| | | this.form = {} |
| | | this.ywConditionForm = row |
| | | this.ywConditionOpen = true |
| | | this.isConditionList = false |
| | | this.form.id = row.id |
| | | }, |
| | | // 运维结果按钮 |
| | |
| | | submitYwCondition() { |
| | | this.$refs['ywConditionForm'].validate(valid => { |
| | | if (valid) { |
| | | ywCondition(this.form).then(res => { |
| | | this.ywConditionOpen = false |
| | | this.$modal.msgSuccess('操作成功') |
| | | this.getList() |
| | | }) |
| | | if(this.isConditionList){ |
| | | ywConditionList(this.form).then(res => { |
| | | this.ywConditionOpen = false |
| | | this.$modal.msgSuccess('操作成功') |
| | | this.getList() |
| | | }) |
| | | }else { |
| | | ywCondition(this.form).then(res => { |
| | | this.ywConditionOpen = false |
| | | this.$modal.msgSuccess('操作成功') |
| | | this.getList() |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | cancelYwCondition() { |
| | | this.ywConditionForm = {} |
| | | this.ywConditionOpen = false |
| | | this.isConditionList = false |
| | | }, |
| | | // 提交运维结果 |
| | | submitYwResult() { |
| | |
| | | this.multiple = !selection.length |
| | | }, |
| | | // 多选框选中数据 |
| | | toggleSelection(workOrderNo) { |
| | | const index = this.workOrderNumbers.indexOf(workOrderNo); |
| | | toggleSelection(item) { |
| | | console.log(item.workOrderNo) |
| | | console.log(this.workOrderNumbers) |
| | | const index = this.workOrderNumbers.indexOf(item.workOrderNo); |
| | | if (index > -1) { |
| | | this.workOrderNumbers.splice(index, 1); // 移除选中项 |
| | | } else { |
| | | this.workOrderNumbers.push(workOrderNo); // 添加选中项 |
| | | this.workOrderNumbers.push(item.workOrderNo); // 添加选中项 |
| | | } |
| | | }, |
| | | /** 新增按钮操作 */ |