| | |
| | | } |
| | | |
| | | // 下发选择工单 |
| | | export function selectedIdsDistribute(data, unitId) { |
| | | export function selectedIdsDistribute(data) { |
| | | return request({ |
| | | url: '/work-order/distribute/ids' + '?unitId=' + unitId, |
| | | url: '/work-order/distribute/ids', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | reserve-keyword |
| | | placeholder="请选择来源" |
| | | :remote-method="remoteGetPoints" |
| | | @change="setPointId" |
| | | :loading="selectLoading"> |
| | | <el-option |
| | | v-for="item in pointList" |
| | |
| | | name: 'index', |
| | | data() { |
| | | return { |
| | | selectedIdsDistributeForm: { |
| | | ids: [], |
| | | unitId: null |
| | | }, |
| | | unitList: [], |
| | | settingForm: { |
| | | // 离线 |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | setPointId(selectedValue) { |
| | | const selectedItem = this.pointList.find(item => item.value === selectedValue); |
| | | this.form.pointId = selectedItem.id |
| | | }, |
| | | submitSetting() { |
| | | this.$refs['settingForm'].validate((valid) => { |
| | | if (valid) { |
| | |
| | | }, |
| | | // 全部下发 |
| | | allDistribute() { |
| | | selectedIdsDistribute([], this.unitId).then(res => { |
| | | this.selectedIdsDistributeForm.unitId = this.unitId |
| | | selectedIdsDistribute(this.selectedIdsDistributeForm).then(res => { |
| | | this.$message.success("工单下发成功") |
| | | this.page(); |
| | | }) |
| | |
| | | this.$message.warning("请先选择要下发的工单") |
| | | return |
| | | } |
| | | selectedIdsDistribute(this.multipleSelection, this.unitId).then(res => { |
| | | this.selectedIdsDistributeForm.unitId = this.unitId; |
| | | this.selectedIdsDistributeForm.ids = this.multipleSelection; |
| | | selectedIdsDistribute(this.selectedIdsDistributeForm).then(res => { |
| | | this.$message.success("工单下发成功") |
| | | this.selectedIdsDistributeForm.ids = []; |
| | | this.page(); |
| | | }) |
| | | }, |
| | |
| | | <!-- 事后报备 --> |
| | | <el-dialog title="事后报备" :visible.sync="reportOpen" width="600px" append-to-body> |
| | | <el-form ref="reportForm" :model="reportForm" :rules="reportFormRules" label-width="80px"> |
| | | <el-form-item label="点位" prop="pointId"> |
| | | <el-input v-model="reportForm.pointId" disabled /> |
| | | <el-form-item label="点位" prop="source"> |
| | | <el-input v-model="reportForm.source" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="报备类型"> |
| | | <el-input v-model="reportForm.reportType" disabled /> |
| | |
| | | if (valid) { |
| | | addReport(this.reportForm).then(response => { |
| | | this.$modal.msgSuccess("成功提交报备"); |
| | | this.open = false; |
| | | this.reportOpen = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | |
| | | }, |
| | | // 事后报备按钮 |
| | | handleReport(row) { |
| | | this.reportForm.pointId = row.source; |
| | | this.reportForm.pointId = row.pointId; |
| | | this.reportForm.source = row.source; |
| | | this.reportOpen = true; |
| | | }, |
| | | // 审核按钮 |