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.raw.Materialinspection',
})
export class Materialinspection extends VuexModule {
  locList2: any = [];
  materialtypeList: any = '';
  @MutationAction
  async getmaterialTypePDA() {
    const result: any = await http.get(url.lanjuquality.Materialinspection.getDictData, {
      //loginName: session.loginName,
      params: {
        dictType: 'material_type_oa',
      },
    });
    console.log(result);
    const materialtypeList: [] = result;
    const locList2 = materialtypeList.map((item: any) => ({
      label: item.ymdTypeName,
      value: item.ymdType,
    }));
    return { locList2 };
  }
}

export default getModule(Materialinspection);
