Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
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
黄营
datax-cloud
Commits
65709685
Commit
65709685
authored
Aug 27, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目初始化
parent
c73b5391
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
929 additions
and
1 deletions
+929
-1
DictVo.java
...in/java/cn/datax/service/data/standard/api/vo/DictVo.java
+2
-0
datadict.js
datax-ui/src/api/standard/datadict.js
+77
-0
ChangeRecordEdit.vue
...x-ui/src/views/metadata/changerecord/ChangeRecordEdit.vue
+1
-1
DataDictAdd.vue
datax-ui/src/views/standard/datadict/DataDictAdd.vue
+134
-0
DataDictDetail.vue
datax-ui/src/views/standard/datadict/DataDictDetail.vue
+105
-0
DataDictEdit.vue
datax-ui/src/views/standard/datadict/DataDictEdit.vue
+145
-0
DataDictList.vue
datax-ui/src/views/standard/datadict/DataDictList.vue
+402
-0
index.vue
datax-ui/src/views/standard/datadict/index.vue
+48
-0
index.vue
datax-ui/src/views/standard/index.vue
+15
-0
No files found.
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/vo/DictVo.java
View file @
65709685
...
@@ -24,6 +24,8 @@ public class DictVo implements Serializable {
...
@@ -24,6 +24,8 @@ public class DictVo implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
private
String
typeId
;
private
String
typeId
;
private
String
gbTypeCode
;
private
String
gbTypeName
;
private
String
gbCode
;
private
String
gbCode
;
private
String
gbName
;
private
String
gbName
;
}
}
datax-ui/src/api/standard/datadict.js
0 → 100644
View file @
65709685
import
request
from
'@/utils/request'
export
function
listDataDictType
(
data
)
{
return
request
({
url
:
'/data/standard/types/list'
,
method
:
'get'
,
params
:
data
})
}
export
function
addDataDictType
(
data
)
{
return
request
({
url
:
'/data/standard/types'
,
method
:
'post'
,
data
:
data
})
}
export
function
updateDataDictType
(
data
)
{
return
request
({
url
:
'/data/standard/types/'
+
data
.
id
,
method
:
'put'
,
data
:
data
})
}
export
function
delDataDictType
(
id
)
{
return
request
({
url
:
'/data/standard/types/'
+
id
,
method
:
'delete'
})
}
export
function
pageDataDict
(
data
)
{
return
request
({
url
:
'/data/standard/dicts/page'
,
method
:
'get'
,
params
:
data
})
}
export
function
getDataDict
(
id
)
{
return
request
({
url
:
'/data/standard/dicts/'
+
id
,
method
:
'get'
})
}
export
function
delDataDict
(
id
)
{
return
request
({
url
:
'/data/standard/dicts/'
+
id
,
method
:
'delete'
})
}
export
function
delDataDicts
(
ids
)
{
return
request
({
url
:
'/data/standard/dicts/batch/'
+
ids
,
method
:
'delete'
})
}
export
function
addDataDict
(
data
)
{
return
request
({
url
:
'/data/standard/dicts'
,
method
:
'post'
,
data
:
data
})
}
export
function
updateDataDict
(
data
)
{
return
request
({
url
:
'/data/standard/dicts/'
+
data
.
id
,
method
:
'put'
,
data
:
data
})
}
datax-ui/src/views/metadata/changerecord/ChangeRecordEdit.vue
View file @
65709685
...
@@ -139,7 +139,7 @@ export default {
...
@@ -139,7 +139,7 @@ export default {
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
:
function
()
{
submitForm
:
function
()
{
this
.
$refs
[
'form
2
'
].
validate
(
valid
=>
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
loadingText
=
'保存中...'
...
...
datax-ui/src/views/standard/datadict/DataDictAdd.vue
0 → 100644
View file @
65709685
<
template
>
<div>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
@
click=
"submitForm"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
:style=
"classCardbody"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"标准编码"
prop=
"gbCode"
>
<el-input
v-model=
"form.gbCode"
placeholder=
"请输入标准编码"
/>
</el-form-item>
<el-form-item
label=
"标准名称"
prop=
"gbName"
>
<el-input
v-model=
"form.gbName"
placeholder=
"请输入标准名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</div>
</
template
>
<
script
>
import
{
addDataDict
}
from
'@/api/standard/datadict'
export
default
{
name
:
'DataDictAdd'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
classCardbody
:
{
overflow
:
'auto'
,
height
:
document
.
body
.
offsetHeight
-
240
+
'px'
},
title
:
'标准字典新增'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
typeId
:
undefined
,
gbCode
:
undefined
,
gbName
:
undefined
,
status
:
'1'
},
// 表单校验
rules
:
{
gbCode
:
[
{
required
:
true
,
message
:
'标准编码不能为空'
,
trigger
:
'blur'
}
],
gbName
:
[
{
required
:
true
,
message
:
'标准名称不能为空'
,
trigger
:
'blur'
}
]
},
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
console
.
log
(
'data:'
+
this
.
data
)
this
.
form
.
typeId
=
this
.
data
.
typeId
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addDataDict
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
setTimeout
(()
=>
{
// 2秒后跳转列表页
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/datadict/DataDictDetail.vue
0 → 100644
View file @
65709685
<
template
>
<div>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
:style=
"classCardbody"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
disabled
>
<el-form-item
label=
"标准类别编码"
>
<el-input
v-model=
"form.gbTypeCode"
placeholder=
"请输入标准类别编码"
/>
</el-form-item>
<el-form-item
label=
"标准类别名称"
>
<el-input
v-model=
"form.gbTypeName"
placeholder=
"请输入标准类别名称"
/>
</el-form-item>
<el-form-item
label=
"标准编码"
>
<el-input
v-model=
"form.gbCode"
placeholder=
"请输入标准编码"
/>
</el-form-item>
<el-form-item
label=
"标准名称"
>
<el-input
v-model=
"form.gbName"
placeholder=
"请输入标准名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</div>
</
template
>
<
script
>
import
{
getDataDict
}
from
'@/api/standard/datadict'
export
default
{
name
:
'DataDictDetail'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
classCardbody
:
{
overflow
:
'auto'
,
height
:
document
.
body
.
offsetHeight
-
240
+
'px'
},
title
:
'标准字典详情'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 表单参数
form
:
{},
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
},
mounted
()
{
this
.
getDataDict
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 获取详情 */
getDataDict
:
function
(
id
)
{
getDataDict
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/datadict/DataDictEdit.vue
0 → 100644
View file @
65709685
<
template
>
<div>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
@
click=
"submitForm"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
:style=
"classCardbody"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"标准类别编码"
>
<el-input
v-model=
"form.gbTypeCode"
placeholder=
"请输入标准类别编码"
:disabled=
"true"
/>
</el-form-item>
<el-form-item
label=
"标准类别名称"
>
<el-input
v-model=
"form.gbTypeName"
placeholder=
"请输入标准类别名称"
:disabled=
"true"
/>
</el-form-item>
<el-form-item
label=
"标准编码"
prop=
"gbCode"
>
<el-input
v-model=
"form.gbCode"
placeholder=
"请输入标准编码"
/>
</el-form-item>
<el-form-item
label=
"标准名称"
prop=
"gbName"
>
<el-input
v-model=
"form.gbName"
placeholder=
"请输入标准名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</div>
</
template
>
<
script
>
import
{
getDataDict
,
updateDataDict
}
from
'@/api/standard/datadict'
export
default
{
name
:
'DataDictEdit'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
classCardbody
:
{
overflow
:
'auto'
,
height
:
document
.
body
.
offsetHeight
-
240
+
'px'
},
title
:
'标准字典编辑'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
gbCode
:
[
{
required
:
true
,
message
:
'标准编码不能为空'
,
trigger
:
'blur'
}
],
gbName
:
[
{
required
:
true
,
message
:
'标准名称不能为空'
,
trigger
:
'blur'
}
]
},
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
},
mounted
()
{
this
.
getDataDict
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 获取详情 */
getDataDict
:
function
(
id
)
{
getDataDict
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
}
})
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateDataDict
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
setTimeout
(()
=>
{
// 2秒后跳转列表页
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/datadict/DataDictList.vue
0 → 100644
View file @
65709685
<
template
>
<div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-card
class=
"box-card tree-wrapper"
shadow=
"always"
>
<el-tree
ref=
"type"
:data=
"typeOptions"
node-key=
"id"
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
default-expand-all
:expand-on-click-node=
"false"
@
node-click=
"handleNodeClick"
/>
</el-card>
</el-col>
<el-col
:span=
"20"
>
<el-card
class=
"box-card"
shadow=
"always"
>
<el-form
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"标准编码"
prop=
"gbCode"
>
<el-input
v-model=
"queryParams.gbCode"
placeholder=
"请输入标准编码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"标准名称"
prop=
"gbName"
>
<el-input
v-model=
"queryParams.gbName"
placeholder=
"请输入标准名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"12"
>
<el-button-group>
<el-button
type=
"success"
icon=
"el-icon-edit-outline"
size=
"mini"
:disabled=
"single"
@
click=
"handleEdit"
>
修改
</el-button>
<el-button
type=
"info"
icon=
"el-icon-view"
size=
"mini"
:disabled=
"single"
@
click=
"handleDetail"
>
详情
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleBatchDelete"
>
删除
</el-button>
</el-button-group>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"right-toolbar"
>
<el-tooltip
content=
"密度"
effect=
"dark"
placement=
"top"
>
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"colum-height"
/>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"medium"
>
正常
</el-dropdown-item>
<el-dropdown-item
command=
"small"
>
中等
</el-dropdown-item>
<el-dropdown-item
command=
"mini"
>
紧凑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-tooltip>
<el-tooltip
content=
"刷新"
effect=
"dark"
placement=
"top"
>
<el-button
circle
size=
"mini"
@
click=
"handleRefresh"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shuaxin"
/>
</el-button>
</el-tooltip>
<el-tooltip
content=
"列设置"
effect=
"dark"
placement=
"top"
>
<el-popover
placement=
"bottom"
width=
"100"
trigger=
"click"
>
<el-checkbox-group
v-model=
"checkedTableColumns"
@
change=
"handleCheckedColsChange"
>
<el-checkbox
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.prop"
>
{{
item
.
label
}}
</el-checkbox>
</el-checkbox-group>
<span
slot=
"reference"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shezhi"
/>
</el-button>
</span>
</el-popover>
</el-tooltip>
</div>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tableDataList"
border
tooltip-effect=
"dark"
:size=
"tableSize"
:height=
"tableHeight"
style=
"width: 100%;margin: 15px 0;"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<
template
v-for=
"(item, index) in tableColumns"
>
<el-table-column
v-if=
"item.show"
:key=
"index"
:prop=
"item.prop"
:label=
"item.label"
:formatter=
"item.formatter"
align=
"center"
show-overflow-tooltip
/>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, sizes, prev, pager, next, jumper"
:current-page
.
sync=
"queryParams.pageNum"
:page-size
.
sync=
"queryParams.pageSize"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<
script
>
import
{
listDataDictType
,
addDataDictType
,
updateDataDictType
,
pageDataDict
,
delDataDict
}
from
'@/api/standard/datadict'
export
default
{
name
:
'DataDictList'
,
data
()
{
return
{
tableHeight
:
document
.
body
.
offsetHeight
-
340
+
'px'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 表格头
tableColumns
:
[
{
prop
:
'gbTypeCode'
,
label
:
'标准类别编码'
,
show
:
true
},
{
prop
:
'gbTypeName'
,
label
:
'标准类别名称'
,
show
:
true
},
{
prop
:
'gbCode'
,
label
:
'标准编码'
,
show
:
true
},
{
prop
:
'gbName'
,
label
:
'标准名称'
,
show
:
true
},
{
prop
:
'status'
,
label
:
'状态'
,
show
:
true
,
formatter
:
this
.
statusFormatter
},
{
prop
:
'createTime'
,
label
:
'创建时间'
,
show
:
true
}
],
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 表格数据
tableDataList
:
[],
// 总数据条数
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
20
,
typeId
:
''
,
gbCode
:
''
,
gbName
:
''
},
// 左侧树
typeOptions
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'gbTypeName'
}
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getTree
()
},
mounted
()
{
this
.
initCols
()
},
methods
:
{
getTree
()
{
listDataDictType
().
then
(
response
=>
{
if
(
response
.
success
)
{
const
{
data
}
=
response
const
tree
=
{}
tree
.
gbTypeName
=
'数据标准类别'
tree
.
children
=
data
this
.
typeOptions
.
push
(
tree
)
}
})
},
/** 节点单击事件 */
handleNodeClick
(
data
)
{
this
.
queryParams
.
typeId
=
data
.
id
this
.
getList
()
},
/** 查询数据源列表 */
getList
()
{
this
.
loading
=
true
pageDataDict
(
this
.
queryParams
).
then
(
response
=>
{
this
.
loading
=
false
if
(
response
.
success
)
{
const
{
data
}
=
response
this
.
tableDataList
=
data
.
data
this
.
total
=
data
.
total
}
})
},
initCols
()
{
this
.
checkedTableColumns
=
this
.
tableColumns
.
map
(
col
=>
col
.
prop
)
},
handleCheckedColsChange
(
val
)
{
this
.
tableColumns
.
forEach
(
col
=>
{
if
(
!
this
.
checkedTableColumns
.
includes
(
col
.
prop
))
{
col
.
show
=
false
}
else
{
col
.
show
=
true
}
})
},
handleCommand
(
command
)
{
this
.
tableSize
=
command
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
$refs
[
'queryForm'
].
resetFields
()
this
.
handleQuery
()
},
/** 刷新列表 */
handleRefresh
()
{
this
.
getList
()
},
/** 多选框选中数据 */
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
showOptions
.
data
=
{}
if
(
!
this
.
queryParams
.
typeId
)
{
this
.
$message
.
warning
(
'请先选择数据标准类别'
)
}
this
.
showOptions
.
data
.
typeId
=
this
.
queryParams
.
typeId
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
true
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 修改按钮操作 */
handleEdit
(
row
)
{
this
.
showOptions
.
data
.
id
=
row
.
id
||
this
.
ids
[
0
]
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
true
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 详情按钮操作 */
handleDetail
(
row
)
{
this
.
showOptions
.
data
.
id
=
row
.
id
||
this
.
ids
[
0
]
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
true
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$confirm
(
'选中数据将被永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delDataDict
(
row
.
id
)
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
/** 批量删除按钮操作 */
handleBatchDelete
()
{
if
(
!
this
.
ids
.
length
)
{
this
.
$message
({
message
:
'请先选择需要操作的数据'
,
type
:
'warning'
})
}
this
.
$message
.
warning
(
'不支持批量删除'
)
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
)
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
)
this
.
queryParams
.
pageNum
=
val
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
'success'
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
'warning'
>
{
dictLabel
}
<
/el-tag
>
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.right-toolbar
{
float
:
right
;
}
</
style
>
datax-ui/src/views/standard/datadict/index.vue
0 → 100644
View file @
65709685
<
template
>
<div
class=
"app-container"
>
<transition
name=
"el-zoom-in-center"
>
<data-dict-list
v-if=
"options.showList"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-top"
>
<data-dict-add
v-if=
"options.showAdd"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-top"
>
<data-dict-edit
v-if=
"options.showEdit"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-bottom"
>
<data-dict-detail
v-if=
"options.showDetail"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
</div>
</
template
>
<
script
>
import
DataDictList
from
'./DataDictList'
import
DataDictAdd
from
'./DataDictAdd'
import
DataDictEdit
from
'./DataDictEdit'
import
DataDictDetail
from
'./DataDictDetail'
export
default
{
name
:
'ChangeRecord'
,
components
:
{
DataDictList
,
DataDictAdd
,
DataDictEdit
,
DataDictDetail
},
data
()
{
return
{
options
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
methods
:
{
showCard
(
data
)
{
Object
.
assign
(
this
.
options
,
data
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/index.vue
0 → 100644
View file @
65709685
<
template
>
<div
class=
"app-container"
>
Standard
</div>
</
template
>
<
script
>
export
default
{
name
:
'Standard'
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
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