You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.9 KiB
TypeScript

import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.equipment.Repair',
})
export class Repair extends VuexModule {
rowdata: any = [];
orderNoItemList: any = [];
3 years ago
getTaskRecordList: any = [];
@MutationAction
async getMaintenancePendRecords(params: any) {
const result: any = await http.get(url.lanjuequipment.product.Repair.getMaintenancePendRecords, { params: params });
const orderNoItemList = result.data;
return { orderNoItemList };
}
@MutationAction
async getTaskRecord(params: any) {
const result: any = await http.get(url.lanjuequipment.product.Repair.getTaskRecord, { params: params });
3 years ago
const getTaskRecordList = result.data;
return { getTaskRecordList };
}
3 years ago
//巡检列表巡检记录
OrderInfList: any = [];
@MutationAction
async getInspectionOrderInfo(workId: any) {
const result: any = await http.get(url.lanjuequipment.product.Repair.selectPdaRepairWorkOrderDetails + '/' + workId);
3 years ago
const OrderInfList: [] = result.data;
return { OrderInfList };
}
3 years ago
SubmitCode: any = '';
//巡检提交
@MutationAction
async updateDowntime(params: any) {
3 years ago
const result: any = await http.put(url.lanjuequipment.product.Repair.updateDowntime, params);
const SubmitCode: [] = result;
return { SubmitCode };
}
@MutationAction
async updateMaintenanceRecords(params: any) {
const result: any = await http.put(url.lanjuequipment.product.Repair.updateMaintenanceRecords, params);
const SubmitCode: [] = result;
3 years ago
return { SubmitCode };
}
3 years ago
Checklist: any = [];
@MutationAction
3 years ago
async queryhandChecklist(params: any) {
const result: any = await http.get(url.lanjuequipment.product.Repair.list, { params: params });
3 years ago
const Checklist: any = result.rows;
console.log('this.tableData', Checklist);
// debugger
return { Checklist };
}
//维修维修措施
locList: any = [];
@MutationAction
async getFaultMeasuresList() {
const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultMeasuresList);
const DictListoild: [] = result.data;
const locList = DictListoild.map((item: any) => ({
label: item.faultSubclass,
value: item.faultSubclass,
}));
return { locList };
}
//原因分析
locList2: any = [];
@MutationAction
async getFaultReasonList() {
const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultReasonList);
const DictListoild: [] = result.data;
const locList2 = DictListoild.map((item: any) => ({
label: item.faultSubclass,
value: item.faultSubclass,
}));
return { locList2 };
}
3 years ago
@MutationAction
async rowdatanull() {
const rowdata: [] = [];
return { rowdata };
}
}
export default getModule(Repair);