mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-18 02:56:30 +08:00
85 lines
3.0 KiB
JavaScript
85 lines
3.0 KiB
JavaScript
import * as staticDict from '@/staticDict'
|
|
|
|
export default class DictionaryController {
|
|
static dictSysUserStatus () {
|
|
return new Promise((resolve) => {
|
|
resolve(staticDict.SysUserStatus);
|
|
});
|
|
}
|
|
static dictSysUserType () {
|
|
return new Promise((resolve) => {
|
|
resolve(staticDict.SysUserType);
|
|
});
|
|
}
|
|
static dictSysDept (sender, params, axiosOption, httpOption) {
|
|
return new Promise((resolve, reject) => {
|
|
sender.doUrl('/admin/upms/sysDept/listDict', 'get', params, axiosOption, httpOption).then(res => {
|
|
let dictData = new staticDict.DictionaryBase('部门字典');
|
|
dictData.setList(res.data);
|
|
resolve(dictData);
|
|
}).catch(err => {
|
|
reject(err);
|
|
});
|
|
});
|
|
}
|
|
static dictSysDeptByParentId (sender, params, axiosOption, httpOption) {
|
|
return new Promise((resolve, reject) => {
|
|
sender.doUrl('/admin/upms/sysDept/listDictByParentId', 'get', params, axiosOption, httpOption).then(res => {
|
|
let dictData = new staticDict.DictionaryBase('部门字典');
|
|
dictData.setList(res.data);
|
|
resolve(dictData);
|
|
}).catch(err => {
|
|
reject(err);
|
|
});
|
|
});
|
|
}
|
|
static dictAreaCode (sender, params, axiosOption, httpOption) {
|
|
return new Promise((resolve, reject) => {
|
|
sender.doUrl('/admin/app/areaCode/listDict', 'get', params, axiosOption, httpOption).then(res => {
|
|
let dictData = new staticDict.DictionaryBase('行政区划');
|
|
dictData.setList(res.data);
|
|
resolve(dictData);
|
|
}).catch(err => {
|
|
reject(err);
|
|
});
|
|
});
|
|
}
|
|
static dictAreaCodeByParentId (sender, params, axiosOption, httpOption) {
|
|
return new Promise((resolve, reject) => {
|
|
sender.doUrl('/admin/app/areaCode/listDictByParentId', 'get', params, axiosOption, httpOption).then(res => {
|
|
let dictData = new staticDict.DictionaryBase('行政区划');
|
|
dictData.setList(res.data);
|
|
resolve(dictData);
|
|
}).catch(err => {
|
|
reject(err);
|
|
});
|
|
});
|
|
}
|
|
static dictAddAreaCode (sender, params, axiosOption, httpOption) {
|
|
return sender.doUrl('', 'post', params, axiosOption, httpOption);
|
|
}
|
|
static dictDeleteAreaCode (sender, params, axiosOption, httpOption) {
|
|
return sender.doUrl('', 'post', params, axiosOption, httpOption);
|
|
}
|
|
static dictUpdateAreaCode (sender, params, axiosOption, httpOption) {
|
|
return sender.doUrl('', 'post', params, axiosOption, httpOption);
|
|
}
|
|
static dictReloadAreaCodeCachedData (sender, params, axiosOption, httpOption) {
|
|
return sender.doUrl('', 'get', params, axiosOption, httpOption);
|
|
}
|
|
static dictSysDataPermType () {
|
|
return new Promise((resolve) => {
|
|
resolve(staticDict.SysDataPermType);
|
|
});
|
|
}
|
|
static dictDeptPost (sender, params, axiosOption, httpOption) {
|
|
return new Promise((resolve, reject) => {
|
|
sender.doUrl('admin/upms/sysDept/listSysDeptPostWithRelation', 'get', params, axiosOption, httpOption).then(res => {
|
|
resolve(res.data);
|
|
}).catch(err => {
|
|
reject(err);
|
|
});
|
|
});
|
|
}
|
|
}
|