import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
  namespaced: true,
  dynamic: true,
  store,
  name: 'page.equipment.quality',
})
export class quality extends VuexModule {
  orderNoItemList: any = [];
  getTaskRecordList: any = [];
  @MutationAction
  // 点检：spotInspection
  // 巡检：inspection
  // 保养：maintenance
  async getTopTaskInfo() {
    const result: any = await http.get(url.lanjuquality.getTopTaskInfo, {
      //loginName: session.loginName,
      params: {
        factoryCode: session.PoolName,
        checkManCode: session.userName,
      },
    });
    const orderNoItemList = result.data;
    return { orderNoItemList };
  }
}

export default getModule(quality);
