import { queryCodeValueBatchList } from "@/http/api";
|
import utils from "utils-lan";
|
|
/**
|
*
|
* @param {*} param0
|
* @param {*获取下拉选项对应的code} selectArg
|
*/
|
export const getOptionsData = async ({ commit, state }, selectArg) => {
|
if (!selectArg || !utils.arrJudge(selectArg) || selectArg.length < 1) {
|
return false;
|
}
|
const selectRes = await queryCodeValueBatchList(selectArg);
|
if (selectRes && selectRes.code === "00") {
|
commit("setOptionsMap", {
|
...state.OPTIONSMAP,
|
...selectRes.result
|
});
|
}
|
};
|
|
export const getOhersOptions = ({ commit, state }, options) => {
|
commit("setOptionsMap", {
|
...state.OPTIONSMAP,
|
...options
|
});
|
};
|
// /**
|
// * @param {*获取用户信息}
|
// */
|
// export const getUserInfo = async ({ commit }) => {
|
// const userRes = await qryInputUserInfo();
|
// if (userRes && userRes.code === "00") {
|
// commit("setUserInfo", userRes.result);
|
// }
|
// };
|