|
@@ -4,8 +4,8 @@ import request from '@/utils/request';
|
|
|
* 查询字典列表
|
|
* 查询字典列表
|
|
|
* @param params 查询条件
|
|
* @param params 查询条件
|
|
|
*/
|
|
*/
|
|
|
-export async function listDictionaries () {
|
|
|
|
|
- const res = await request.get('/system/dict/getPage', {});
|
|
|
|
|
|
|
+export async function listDictionaries(params) {
|
|
|
|
|
+ const res = await request.get('/system/dict/getPage', { params });
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
|
}
|
|
}
|
|
@@ -16,7 +16,7 @@ export async function listDictionaries () {
|
|
|
* 添加字典
|
|
* 添加字典
|
|
|
* @param data 字典信息
|
|
* @param data 字典信息
|
|
|
*/
|
|
*/
|
|
|
-export async function addDictionary (data) {
|
|
|
|
|
|
|
+export async function addDictionary(data) {
|
|
|
const res = await request.post('/system/dict/submit', data);
|
|
const res = await request.post('/system/dict/submit', data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.message;
|
|
return res.data.message;
|
|
@@ -28,7 +28,7 @@ export async function addDictionary (data) {
|
|
|
* 修改字典
|
|
* 修改字典
|
|
|
* @param data 字典信息
|
|
* @param data 字典信息
|
|
|
*/
|
|
*/
|
|
|
-export async function updateDictionary (data) {
|
|
|
|
|
|
|
+export async function updateDictionary(data) {
|
|
|
const res = await request.post('/system/dict/update', data);
|
|
const res = await request.post('/system/dict/update', data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.message;
|
|
return res.data.message;
|
|
@@ -40,7 +40,7 @@ export async function updateDictionary (data) {
|
|
|
* 删除字典
|
|
* 删除字典
|
|
|
* @param id 字典id
|
|
* @param id 字典id
|
|
|
*/
|
|
*/
|
|
|
-export async function removeDictionary (id, f) {
|
|
|
|
|
|
|
+export async function removeDictionary(id, f) {
|
|
|
let res;
|
|
let res;
|
|
|
if (f) {
|
|
if (f) {
|
|
|
res = await request.post('/system/dict/removeDictInfoById', id);
|
|
res = await request.post('/system/dict/removeDictInfoById', id);
|