zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { qryDropDownOptionBatch, qryInputUserInfo } 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 qryDropDownOptionBatch(selectArg);
  if (selectRes && selectRes.code === "00") {
    commit("setOptionsMap", {
      ...state.OPTIONSMAP,
      ...selectRes.result
    });
  }
};
 
/**
 * @param {*获取用户信息}
 */
export const getUserInfo = async ({ commit }) => {
  const userRes = await qryInputUserInfo();
  if (userRes && userRes.code === "00") {
    commit("setUserInfo", userRes.result);
  }
};