合并 智慧就业第一版
This commit is contained in:
@@ -98,7 +98,7 @@ const useDictStore = defineStore("dict", () => {
|
||||
}
|
||||
|
||||
function dictLabel(dictType, value) {
|
||||
if (state[dictType]) {
|
||||
if (state[dictType] && Array.isArray(state[dictType])) {
|
||||
for (let i = 0; i < state[dictType].length; i++) {
|
||||
let element = state[dictType][i];
|
||||
if (element.value === value) {
|
||||
@@ -135,6 +135,7 @@ const useDictStore = defineStore("dict", () => {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
async function getDictSelectOption(dictType, isDigital) {
|
||||
const resp = await createRequest(`/app/common/dict/${dictType}`);
|
||||
if (resp.code === 200 && resp.data) {
|
||||
@@ -175,6 +176,7 @@ const useDictStore = defineStore("dict", () => {
|
||||
|
||||
// 导入
|
||||
return {
|
||||
state,
|
||||
getDictData,
|
||||
dictLabel,
|
||||
oneDictData,
|
||||
|
||||
Reference in New Issue
Block a user