diff --git a/admin/src/api/sysdicttype.js b/admin/src/api/sysdicttype.js
index f004849..5bd4239 100644
--- a/admin/src/api/sysdicttype.js
+++ b/admin/src/api/sysdicttype.js
@@ -68,10 +68,8 @@ export function sysdicttypeListApi(params) {
*/
export function sysdicttypeTypesApi(types) {
return request({
- url: `autogencode/sysdicttype/types`,
- method: 'GET',
- params: {
- types,
- }
+ url: `autogencode/sysdictdata/types`,
+ method: 'POST',
+ data: types
})
}
\ No newline at end of file
diff --git a/admin/src/components/DictData/index.js b/admin/src/components/DictData/index.js
index 592a10c..131f093 100644
--- a/admin/src/components/DictData/index.js
+++ b/admin/src/components/DictData/index.js
@@ -49,7 +49,14 @@ function install() {
isRequesting = true;
// 批量获取字典
sysdicttypeTypesApi(requesting.map(item => item.type)).then(res => {
- const datas = res.data || {};
+ const datas = {};
+ (res || []).forEach(item => {
+ if (datas[item.dictType]) {
+ datas[item.dictType].push(item);
+ } else {
+ datas[item.dictType] = [item];
+ }
+ });
requesting.forEach(item => {
store.dispatch('dict/setDict', { key: item.type, value: datas[item.type] || [] });
item.resolve(datas[item.type] || []);
diff --git a/admin/src/views/dict/data.vue b/admin/src/views/dict/data.vue
index 31524a6..22e6a57 100644
--- a/admin/src/views/dict/data.vue
+++ b/admin/src/views/dict/data.vue
@@ -87,7 +87,6 @@
@click="handleClose"
>关闭
-->
-
@@ -289,8 +288,8 @@ export default {
/** 查询字典类型详细 */
getType(dictId) {
getType(dictId).then(response => {
- this.queryParams.dictType = response.data.dictType;
- this.defaultDictType = response.data.dictType;
+ this.queryParams.dictType = response.dictType;
+ this.defaultDictType = response.dictType;
this.getList();
});
},
diff --git a/admin/src/views/dict/index.vue b/admin/src/views/dict/index.vue
index dc8fdb1..fa1917f 100644
--- a/admin/src/views/dict/index.vue
+++ b/admin/src/views/dict/index.vue
@@ -104,7 +104,6 @@
v-hasPermi="['system:dict:remove']"
>刷新缓存
-
@@ -113,7 +112,7 @@
-
+
{{ scope.row.dictType }}