Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_web_vue3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
91isoft_web_vue3
Commits
8a0adeb8
Commit
8a0adeb8
authored
Feb 19, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典
parent
cd0c2a66
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
410 additions
and
168 deletions
+410
-168
index.ts
src/api/dict/index.ts
+85
-2
types.ts
src/api/dict/types.ts
+62
-2
index.ts
src/router/index.ts
+0
-3
data.vue
src/views/system/dict/data.vue
+263
-160
index.vue
src/views/system/user/index.vue
+0
-1
No files found.
src/api/dict/index.ts
View file @
8a0adeb8
...
...
@@ -39,6 +39,23 @@ export function listType(query: any) {
params
:
query
,
});
}
/** 查询字典类型详细*/
export
function
getType
(
dictId
)
{
return
request
({
url
:
"/system/dict/type/detail/"
+
dictId
,
method
:
"get"
,
});
}
// 修改字典数据
export
function
updateData
(
data
)
{
const
businessId
=
data
.
businessId
;
return
request
({
url
:
"/system/dict/data/update/"
+
businessId
,
method
:
"put"
,
data
:
data
,
headers
:
{},
});
}
/** 获取字典选择框列表*/
export
function
selectDictType
(
dictType
:
any
)
{
return
request
({
...
...
@@ -55,7 +72,50 @@ export function exportType(queryParams: DictTypeQuery) {
responseType
:
"arraybuffer"
,
});
}
// 下载字典数据导入模板
export
function
importTemplate
(
query
)
{
return
request
({
url
:
"/system/dict/data/importTemplate"
,
method
:
"get"
,
responseType
:
"arraybuffer"
,
params
:
query
,
});
}
//导入字典数据信息
export
function
importExcel
(
data
)
{
return
request
({
url
:
"/system/dict/data/importDictData"
,
method
:
"post"
,
headers
:
{
"Content-Type"
:
"multipart/form-data"
,
},
transformRequest
:
[
(
data
)
=>
{
return
data
;
},
],
data
,
});
}
// 下载错误文件
export
function
uploadFalseFile
(
params
)
{
params
=
Qs
.
stringify
(
params
);
return
request
({
url
:
"/system/user/downFalseFile"
,
method
:
"post"
,
data
:
params
,
responseType
:
"blob"
,
});
}
// 导出字典数据
export
function
exportData
(
query
)
{
return
request
({
url
:
"/system/dict/data/export"
,
method
:
"get"
,
params
:
query
,
responseType
:
"arraybuffer"
,
});
}
/** 修改字典类型*/
export
function
updateType
(
data
:
any
)
{
const
businessId
=
data
.
businessId
;
...
...
@@ -66,6 +126,15 @@ export function updateType(data: any) {
headers
:
{},
});
}
// 新增字典数据
export
function
addData
(
data
)
{
return
request
({
url
:
"/system/dict/data/add"
,
method
:
"post"
,
data
:
data
,
headers
:
{},
});
}
/** 新增字典类型*/
export
function
addType
(
data
:
any
)
{
return
request
({
...
...
@@ -87,7 +156,13 @@ export function getDictTypeForm(dictId: number): AxiosPromise<DictTypeForm> {
method
:
"get"
,
});
}
// 4.查询字典数据详细
export
function
getData
(
dictCode
)
{
return
request
({
url
:
"/system/dict/data/detail/"
+
dictCode
,
method
:
"get"
,
});
}
/**
* 新增字典类型
*
...
...
@@ -124,6 +199,14 @@ export function deleteDictTypes(dictId: string) {
method
:
"delete"
,
});
}
/** 删除字典数据*/
export
function
delData
(
dictCode
)
{
return
request
({
url
:
"/system/dict/data/deleteLogical/"
+
dictCode
,
method
:
"delete"
,
headers
:
{},
});
}
/**
* 获取字典类型的数据项
...
...
src/api/dict/types.ts
View file @
8a0adeb8
...
...
@@ -71,7 +71,39 @@ export interface DictTypePageVO {
*/
createDate
:
Date
;
}
/**
* 字典类型数据分页对象
*/
export
interface
DictTypeDataPageVO
{
/**
* 字典编码
*/
businessId
:
number
;
/**
* 字典标签
*/
dictLabel
:
string
;
/**
* 字典键值
*/
dictValue
:
string
;
/**
* 字典排序
*/
dictSort
:
string
|
number
;
/**
* 状态
*/
flag
:
string
|
number
;
/**
* 备注
*/
remarks
:
string
|
number
;
/**
* 创建时间
*/
createDate
:
any
;
}
/**
* 字典分页项类型声明
*/
...
...
@@ -110,7 +142,35 @@ export interface DictTypeForm {
flag
?:
string
|
number
;
}
/**
* 字典表单类型数据声明
*/
export
interface
DictTypeDataForm
{
/**
* 字典类型ID
*/
businessId
?:
number
|
undefined
;
/**
* 字典类型
*/
dictType
?:
number
|
string
;
/**
* 参数标签
*/
dictLabel
?:
number
|
string
;
/**
* 参数键值
*/
dictValue
?:
number
|
string
;
/**
* 参数排序
*/
dictSort
?:
number
|
string
;
/**
* 备注
*/
remarks
?:
string
;
}
/**
* 字典查询参数
*/
...
...
src/router/index.ts
View file @
8a0adeb8
...
...
@@ -48,9 +48,6 @@ export const constantRoutes: RouteRecordRaw[] = [
meta
:
{
title
:
"字典数据"
,
icon
:
""
,
affix
:
true
,
keepAlive
:
true
,
alwaysShow
:
false
,
hidden
:
true
,
},
},
...
...
src/views/system/dict/data.vue
View file @
8a0adeb8
This diff is collapsed.
Click to expand it.
src/views/system/user/index.vue
View file @
8a0adeb8
...
...
@@ -749,7 +749,6 @@ onMounted(() => {
:disabled=
"importData.isUploading"
:auto-upload=
"false"
ref=
"uploadRef"
action=
""
drag
:limit=
"1"
:file-list=
"importData.fileList"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment