| | |
| | | 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: { |
| | | // 离线 |
| | |
| | | queryParams: { |
| | | unitId: null, |
| | | pageNum: 1, |
| | | pageSize: 20, |
| | | pageSize: 10, |
| | | }, |
| | | // 总条数 |
| | | total: 0, |
| | |
| | | }, |
| | | }, |
| | | 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) { |
| | |
| | | this.loading = true; |
| | | this.selectUnit(); |
| | | distributeWorkOrder(this.queryParams).then(res => { |
| | | this.workOrderList = res.data; |
| | | this.workOrderList = res.data.records; |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | }) |
| | |
| | | }, |
| | | // 全部下发 |
| | | 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(); |
| | | }) |
| | | }, |