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.
61 lines
1.7 KiB
TypeScript
61 lines
1.7 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.MaintenanceAudit',
|
|
})
|
|
export class MaintenanceAudit extends VuexModule {
|
|
rowdata: any = [];
|
|
orderNoItemList: any = [];
|
|
getTaskRecordList: any = {};
|
|
@MutationAction
|
|
async getTodayTask(params: any) {
|
|
const result: any = await http.get(url.lanjuequipment.product.MaintenanceAudit.getBXList, {
|
|
params: {
|
|
resultInspect: params,
|
|
},
|
|
});
|
|
const orderNoItemList = result.data;
|
|
return { orderNoItemList };
|
|
}
|
|
@MutationAction
|
|
async getTaskRecord(params: any) {
|
|
const result: any = await http.get(url.lanjuequipment.product.MaintenanceAudit.getBXDetail + '/' + params);
|
|
const getTaskRecordList = result.data;
|
|
return { getTaskRecordList };
|
|
}
|
|
teamList: any = [];
|
|
//是否开机保养
|
|
@MutationAction
|
|
async getTeamList() {
|
|
const result: any = await http.get(url.lanjuequipment.product.MaintenanceAudit.getMaintenanceTeamList);
|
|
const oldteamList: [] = result.rows;
|
|
const teamList = oldteamList.map((item: any) => {
|
|
return {
|
|
value: item.teamCode,
|
|
label: item.teamName,
|
|
...item,
|
|
};
|
|
});
|
|
return { teamList };
|
|
}
|
|
Checkcode: any = '';
|
|
@MutationAction
|
|
async updateTaskRecord(params: any) {
|
|
const result: any = await http.post(url.lanjuequipment.product.MaintenanceAudit.check, params);
|
|
const Checkcode = result.code;
|
|
return { Checkcode };
|
|
}
|
|
@MutationAction
|
|
async rowdatanull() {
|
|
const rowdata: [] = [];
|
|
return { rowdata };
|
|
}
|
|
}
|
|
|
|
export default getModule(MaintenanceAudit);
|