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.8 KiB
TypeScript
90 lines
2.8 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.Upkeep',
|
|
})
|
|
export class Upkeep extends VuexModule {
|
|
rowdata: any = [];
|
|
orderNoItemList: any = [];
|
|
getTaskRecordList: any = [];
|
|
// @MutationAction
|
|
// async getTodayTask(params: any) {
|
|
// const result: any = await http.get(url.lanjuequipment.product.Repair.getTodayTask, { 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 });
|
|
// const getTaskRecordList = result.data;
|
|
// return { getTaskRecordList };
|
|
// }
|
|
@MutationAction
|
|
async getTodayTask(userId: any) {
|
|
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
|
|
//loginName: session.loginName,
|
|
params: {
|
|
userId: userId,
|
|
planType: 'maintenance',
|
|
},
|
|
});
|
|
const orderNoItemList = result.data;
|
|
return { orderNoItemList };
|
|
}
|
|
@MutationAction
|
|
async getTaskRecord(userId: any) {
|
|
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
|
|
//loginName: session.loginName,
|
|
params: {
|
|
userId: userId,
|
|
planType: 'maintenance',
|
|
},
|
|
});
|
|
const getTaskRecordList = result.data;
|
|
return { getTaskRecordList };
|
|
}
|
|
//巡检列表巡检记录
|
|
OrderInfList: any = [];
|
|
@MutationAction
|
|
async getInspectionOrderInfo(params: any) {
|
|
const result: any = await http.post(url.lanjuequipment.product.Inspection.getInspectionOrderInfo, params);
|
|
const OrderInfList: [] = result.data;
|
|
return { OrderInfList };
|
|
}
|
|
SubmitCode: any = '';
|
|
//是否开机保养
|
|
@MutationAction
|
|
async startMaintenanceTask(params: any) {
|
|
const result: any = await http.get(url.lanjuequipment.product.Upkeep.startMaintenanceTask, { params });
|
|
const SubmitCode: [] = result;
|
|
return { SubmitCode };
|
|
}
|
|
@MutationAction
|
|
async updateInspectionRecord(params: any) {
|
|
const result: any = await http.post(url.lanjuequipment.product.Inspection.updateInspectionRecord, params);
|
|
const SubmitCode: [] = result;
|
|
return { SubmitCode };
|
|
}
|
|
Checklist: any = [];
|
|
@MutationAction
|
|
async queryhandChecklist(params: any) {
|
|
const result: any = await http.get(url.lanjuequipment.product.Repair.list, { params: params });
|
|
const Checklist: any = result.rows;
|
|
console.log('this.tableData', Checklist);
|
|
// debugger
|
|
return { Checklist };
|
|
}
|
|
@MutationAction
|
|
async rowdatanull() {
|
|
const rowdata: [] = [];
|
|
return { rowdata };
|
|
}
|
|
}
|
|
|
|
export default getModule(Upkeep);
|