Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
93ed56a2
Commit
93ed56a2
authored
Apr 14, 2021
by
季圣华
Browse files
去除多余的文件
parent
35482c7b
Changes
34
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/account/settings/Notification.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-list
itemLayout=
"horizontal"
:dataSource=
"data"
>
</a-list>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
data
:
[]
}
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
jshERP-web/src/views/account/settings/Security.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-list
itemLayout=
"horizontal"
:dataSource=
"data"
>
<a-list-item
slot=
"renderItem"
slot-scope=
"item, index"
:key=
"index"
>
<a-list-item-meta>
<a
slot=
"title"
>
{{
item
.
title
}}
</a>
<span
slot=
"description"
>
<span
class=
"security-list-description"
>
{{
item
.
description
}}
</span>
<span
v-if=
"item.value"
>
:
</span>
<span
class=
"security-list-value"
>
{{
item
.
value
}}
</span>
</span>
</a-list-item-meta>
<template
v-if=
"item.actions"
>
<a
slot=
"actions"
@
click=
"item.actions.callback"
>
{{
item
.
actions
.
title
}}
</a>
</
template
>
</a-list-item>
</a-list>
</template>
<
script
>
export
default
{
data
()
{
return
{
data
:
[
{
title
:
'
账户密码
'
,
description
:
'
当前密码强度
'
,
value
:
'
强
'
,
actions
:
{
title
:
'
修改
'
,
callback
:
()
=>
{
this
.
$message
.
info
(
'
This is a normal message
'
);
}
}
},
{
title
:
'
密保手机
'
,
description
:
'
已绑定手机
'
,
value
:
'
138****8293
'
,
actions
:
{
title
:
'
修改
'
,
callback
:
()
=>
{
this
.
$message
.
success
(
'
This is a message of success
'
);
}
}
},
{
title
:
'
密保问题
'
,
description
:
'
未设置密保问题,密保问题可有效保护账户安全
'
,
value
:
''
,
actions
:
{
title
:
'
设置
'
,
callback
:
()
=>
{
this
.
$message
.
error
(
'
This is a message of error
'
);
}
}
},
{
title
:
'
备用邮箱
'
,
description
:
'
已绑定邮箱
'
,
value
:
'
ant***sign.com
'
,
actions
:
{
title
:
'
修改
'
,
callback
:
()
=>
{
this
.
$message
.
warning
(
'
This is message of warning
'
);
}
}
},
{
title
:
'
MFA 设备
'
,
description
:
'
未绑定 MFA 设备,绑定后,可以进行二次确认
'
,
value
:
''
,
actions
:
{
title
:
'
绑定
'
,
callback
:
()
=>
{
this
.
$message
.
info
(
'
This is a normal message
'
);
}
}
},
]
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
jshERP-web/src/views/dashboard/IndexBdc.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<div
class=
"page-header-index-wide"
>
<a-row
:gutter=
"24"
>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"
{ marginBottom: '24px' }">
<chart-card
:loading=
"loading"
title=
"受理量"
:total=
"cardCount.sll | NumberFormat"
>
<a-tooltip
title=
"指标说明"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
<div>
<mini-area
:datasource=
"chartData.sll"
/>
</div>
<template
slot=
"footer"
>
今日受理量:
<span>
{{
todaySll
}}
</span></
template
>
</chart-card>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"{ marginBottom: '24px' }"
>
<chart-card
:loading=
"loading"
title=
"办结量"
:total=
"cardCount.bjl | NumberFormat"
>
<a-tooltip
title=
"指标说明"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
<div>
<mini-area
:datasource=
"chartData.bjl"
/>
</div>
<
template
slot=
"footer"
>
今日办结量:
<span>
{{
todayBjl
}}
</span></
template
>
</chart-card>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"{ marginBottom: '24px' }"
>
<chart-card
:loading=
"loading"
title=
"用户受理量"
:total=
"cardCount.isll | NumberFormat"
>
<a-tooltip
title=
"指标说明"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
<div>
<mini-bar
:datasource=
"chartData.isll"
:height=
"50"
/>
</div>
<
template
slot=
"footer"
>
用户今日受理量:
<span>
{{
todayISll
}}
</span></
template
>
</chart-card>
</a-col>
<a-col
:sm=
"24"
:md=
"12"
:xl=
"6"
:style=
"{ marginBottom: '24px' }"
>
<chart-card
:loading=
"loading"
title=
"用户办结量"
:total=
"cardCount.ibjl | NumberFormat"
>
<a-tooltip
title=
"指标说明"
slot=
"action"
>
<a-icon
type=
"info-circle-o"
/>
</a-tooltip>
<div>
<mini-bar
:datasource=
"chartData.ibjl"
:height=
"50"
/>
</div>
<
template
slot=
"footer"
>
用户今日办结量:
<span>
{{
todayIBjl
}}
</span></
template
>
</chart-card>
</a-col>
</a-row>
<a-card
:loading=
"loading"
:bordered=
"false"
:body-style=
"{padding: '0'}"
>
<div
class=
"salesCard"
>
<a-tabs
default-active-key=
"1"
size=
"large"
:tab-bar-style=
"{marginBottom: '24px', paddingLeft: '16px'}"
>
<div
class=
"extra-wrapper"
slot=
"tabBarExtraContent"
>
<div
class=
"extra-item"
>
<a>
今日
</a>
<a>
本周
</a>
<a>
本月
</a>
<a>
本年
</a>
</div>
<a-range-picker
:style=
"{width: '256px'}"
/>
</div>
<a-tab-pane
loading=
"true"
tab=
"受理监管"
key=
"1"
>
<a-row>
<a-col
:xl=
"16"
:lg=
"12"
:md=
"12"
:sm=
"24"
:xs=
"24"
>
<index-bar
title=
"受理量统计"
/>
</a-col>
<a-col
:xl=
"8"
:lg=
"12"
:md=
"12"
:sm=
"24"
:xs=
"24"
>
<a-card
title=
"快速开始 / 便捷导航"
style=
"margin-bottom: 24px"
:bordered=
"false"
:body-style=
"{padding: 0}"
>
<div
class=
"item-group"
>
<a-row>
<a-col
:class=
"'more-btn'"
:span=
"12"
v-for=
"(item,index) in registerTypeList"
:key=
" 'registerType'+index "
>
<a-button
@
click=
"goPage(index)"
style=
"margin-bottom:10px"
size=
"small"
type=
"primary"
ghost
>
{{ item.text }}
</a-button>
</a-col>
</a-row>
</div>
</a-card>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane
tab=
"交互监管"
key=
"2"
>
<a-row>
<a-col
:xl=
"16"
:lg=
"12"
:md=
"12"
:sm=
"24"
:xs=
"24"
>
<bar-multid
:sourceData=
"jhjgData"
:fields=
"jhjgFields"
title=
"平台与部门交互量统计"
></bar-multid>
</a-col>
<a-col
:xl=
"8"
:lg=
"12"
:md=
"12"
:sm=
"24"
:xs=
"24"
>
<a-card
title=
"快速开始 / 便捷导航"
style=
"margin-bottom: 24px"
:bordered=
"false"
:body-style=
"{padding: 0}"
>
<div
class=
"item-group"
>
<a-row>
<a-col
:class=
"'more-btn'"
:span=
"12"
v-for=
"(item,index) in registerTypeList"
:key=
" 'registerType'+index "
>
<a-button
@
click=
"goPage(index)"
style=
"margin-bottom:10px"
size=
"small"
type=
"primary"
ghost
>
{{ item.text }}
</a-button>
</a-col>
</a-row>
</div>
</a-card>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane
tab=
"存储监管"
key=
"4"
>
<a-row>
<a-col
:xl=
"16"
:lg=
"12"
:md=
"12"
:sm=
"24"
:xs=
"24"
>
<a-row>
<
template
v-if=
"diskInfo && diskInfo.length>0"
>
<a-col
:span=
"12"
v-for=
"(item,index) in diskInfo"
:key=
" 'diskInfo'+index "
>
<dash-chart-demo
:title=
"item.name"
:datasource=
"item.restPPT"
></dash-chart-demo>
</a-col>
</
template
>
</a-row>
</a-col>
<a-col
:xl=
"8"
:lg=
"12"
:md=
"12"
:sm=
"24"
:xs=
"24"
>
<a-card
title=
"快速开始 / 便捷导航"
style=
"margin-bottom: 24px"
:bordered=
"false"
:body-style=
"{padding: 0}"
>
<div
class=
"item-group"
>
<a-row>
<a-col
:class=
"'more-btn'"
:span=
"10"
v-for=
"(item,index) in registerTypeList"
:key=
" 'registerType'+index "
>
<a-button
@
click=
"goPage(index)"
style=
"margin-bottom:10px"
size=
"small"
type=
"primary"
ghost
>
{{ item.text }}
</a-button>
</a-col>
</a-row>
</div>
</a-card>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</div>
</a-card>
<a-row
:gutter=
"12"
>
<a-card
:loading=
"loading"
:class=
"{ 'anty-list-cust':true }"
:bordered=
"false"
:style=
"{ marginTop: '24px' }"
>
<a-tabs
v-model=
"indexBottomTab"
size=
"large"
:tab-bar-style=
"{marginBottom: '24px', paddingLeft: '16px'}"
>
<div
class=
"extra-wrapper"
slot=
"tabBarExtraContent"
>
<a-radio-group
v-model=
"indexRegisterType"
@
change=
"changeRegisterType"
>
<a-radio-button
value=
"转移登记"
>
转移登记
</a-radio-button>
<a-radio-button
value=
"抵押登记"
>
抵押登记
</a-radio-button>
<a-radio-button
value=
""
>
所有
</a-radio-button>
</a-radio-group>
</div>
<a-tab-pane
loading=
"true"
tab=
"业务流程限时监管"
key=
"1"
>
<a-table
:dataSource=
"dataSource1"
size=
"default"
rowKey=
"id"
:columns=
"columns"
:pagination=
"ipagination1"
@
change=
"tableChange1"
>
<
template
slot=
"flowRate"
slot-scope=
"text, record, index"
>
<a-progress
:strokeColor=
"getPercentColor(record.flowRate)"
:format=
"getPercentFormat"
:percent=
"getFlowRateNumber(record.flowRate)"
style=
"width:80px"
/>
</
template
>
</a-table>
</a-tab-pane>
<a-tab-pane
loading=
"true"
tab=
"业务节点限时监管"
key=
"2"
>
<a-table
:dataSource=
"dataSource2"
size=
"default"
rowKey=
"id"
:columns=
"columns2"
:pagination=
"ipagination2"
@
change=
"tableChange2"
>
<
template
slot=
"flowRate"
slot-scope=
"text, record, index"
>
<span
style=
"color: red;"
>
{{
record
.
flowRate
}}
小时
</span>
</
template
>
</a-table>
</a-tab-pane>
</a-tabs>
</a-card>
</a-row>
</div>
</template>
<
script
>
import
ACol
from
"
ant-design-vue/es/grid/Col
"
import
ATooltip
from
"
ant-design-vue/es/tooltip/Tooltip
"
import
ChartCard
from
'
@/components/ChartCard
'
import
MiniBar
from
'
@/components/chart/MiniBar
'
import
MiniArea
from
'
@/components/chart/MiniArea
'
import
IndexBar
from
'
@/components/chart/IndexBar
'
import
BarMultid
from
'
@/components/chart/BarMultid
'
import
DashChartDemo
from
'
@/components/chart/DashChartDemo
'
const
jhjgData
=
[
{
type
:
'
房管
'
,
'
1月
'
:
900
,
'
2月
'
:
1120
,
'
3月
'
:
1380
,
'
4月
'
:
1480
,
'
5月
'
:
1450
,
'
6月
'
:
1100
,
'
7月
'
:
1300
,
'
8月
'
:
900
,
'
9月
'
:
1000
,
'
10月
'
:
1200
,
'
11月
'
:
600
,
'
12月
'
:
900
},
{
type
:
'
税务
'
,
'
1月
'
:
1200
,
'
2月
'
:
1500
,
'
3月
'
:
1980
,
'
4月
'
:
2000
,
'
5月
'
:
1000
,
'
6月
'
:
600
,
'
7月
'
:
900
,
'
8月
'
:
1100
,
'
9月
'
:
1300
,
'
10月
'
:
2000
,
'
11月
'
:
900
,
'
12月
'
:
1100
},
{
type
:
'
不动产
'
,
'
1月
'
:
2000
,
'
2月
'
:
1430
,
'
3月
'
:
1300
,
'
4月
'
:
1400
,
'
5月
'
:
900
,
'
6月
'
:
500
,
'
7月
'
:
600
,
'
8月
'
:
1000
,
'
9月
'
:
600
,
'
10月
'
:
1000
,
'
11月
'
:
1500
,
'
12月
'
:
1200
}
]
const
jhjgFields
=
[
'
1月
'
,
'
2月
'
,
'
3月
'
,
'
4月
'
,
'
5月
'
,
'
6月
'
,
'
7月
'
,
'
8月
'
,
'
9月
'
,
'
10月
'
,
'
11月
'
,
'
12月
'
]
const
xljgData
=
[
{
type
:
'
一月
'
,
"
房管
"
:
1.12
,
"
税务
"
:
1.55
,
"
不动产
"
:
1.2
},
{
type
:
'
二月
'
,
"
房管
"
:
1.65
,
"
税务
"
:
1.32
,
"
不动产
"
:
1.42
},
{
type
:
'
三月
'
,
"
房管
"
:
1.85
,
"
税务
"
:
1.1
,
"
不动产
"
:
1.5
},
{
type
:
'
四月
'
,
"
房管
"
:
1.33
,
"
税务
"
:
1.63
,
"
不动产
"
:
1.4
},
{
type
:
'
五月
'
,
"
房管
"
:
1.63
,
"
税务
"
:
1.8
,
"
不动产
"
:
1.7
},
{
type
:
'
六月
'
,
"
房管
"
:
1.85
,
"
税务
"
:
1.98
,
"
不动产
"
:
1.8
},
{
type
:
'
七月
'
,
"
房管
"
:
1.98
,
"
税务
"
:
1.5
,
"
不动产
"
:
1.76
},
{
type
:
'
八月
'
,
"
房管
"
:
1.48
,
"
税务
"
:
1.2
,
"
不动产
"
:
1.3
},
{
type
:
'
九月
'
,
"
房管
"
:
1.41
,
"
税务
"
:
1.9
,
"
不动产
"
:
1.6
},
{
type
:
'
十月
'
,
"
房管
"
:
1.1
,
"
税务
"
:
1.1
,
"
不动产
"
:
1.4
},
{
type
:
'
十一月
'
,
"
房管
"
:
1.85
,
"
税务
"
:
1.6
,
"
不动产
"
:
1.5
},
{
type
:
'
十二月
'
,
"
房管
"
:
1.5
,
"
税务
"
:
1.4
,
"
不动产
"
:
1.3
}
]
const
xljgFields
=
[
"
房管
"
,
"
税务
"
,
"
不动产
"
]
const
dataCol1
=
[{
title
:
'
业务号
'
,
align
:
"
center
"
,
dataIndex
:
'
reBizCode
'
},{
title
:
'
业务类型
'
,
align
:
"
center
"
,
dataIndex
:
'
type
'
},{
title
:
'
受理人
'
,
align
:
"
center
"
,
dataIndex
:
'
acceptBy
'
},{
title
:
'
受理时间
'
,
align
:
"
center
"
,
dataIndex
:
'
acceptDate
'
},{
title
:
'
当前节点
'
,
align
:
"
center
"
,
dataIndex
:
'
curNode
'
},{
title
:
'
办理时长
'
,
align
:
"
center
"
,
dataIndex
:
'
flowRate
'
,
scopedSlots
:
{
customRender
:
'
flowRate
'
}
}];
const
dataSource1
=
[
{
reBizCode
:
"
1
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
张三
'
,
acceptDate
:
"
2019-01-22
"
,
curNode
:
"
任务分派
"
,
flowRate
:
60
},
{
reBizCode
:
"
2
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
李四
'
,
acceptDate
:
"
2019-01-23
"
,
curNode
:
"
领导审核
"
,
flowRate
:
30
},
{
reBizCode
:
"
3
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
王武
'
,
acceptDate
:
"
2019-01-25
"
,
curNode
:
"
任务处理
"
,
flowRate
:
20
},
{
reBizCode
:
"
4
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
赵楼
'
,
acceptDate
:
"
2019-11-22
"
,
curNode
:
"
部门审核
"
,
flowRate
:
80
},
{
reBizCode
:
"
5
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
钱就
'
,
acceptDate
:
"
2019-12-12
"
,
curNode
:
"
任务分派
"
,
flowRate
:
90
},
{
reBizCode
:
"
6
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
孙吧
'
,
acceptDate
:
"
2019-03-06
"
,
curNode
:
"
任务处理
"
,
flowRate
:
10
},
{
reBizCode
:
"
7
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
周大
'
,
acceptDate
:
"
2019-04-13
"
,
curNode
:
"
任务分派
"
,
flowRate
:
100
},
{
reBizCode
:
"
8
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
吴二
'
,
acceptDate
:
"
2019-05-09
"
,
curNode
:
"
任务上报
"
,
flowRate
:
50
},
{
reBizCode
:
"
9
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
郑爽
'
,
acceptDate
:
"
2019-07-12
"
,
curNode
:
"
任务处理
"
,
flowRate
:
63
},
{
reBizCode
:
"
20
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
林有
'
,
acceptDate
:
"
2019-12-12
"
,
curNode
:
"
任务打回
"
,
flowRate
:
59
},
{
reBizCode
:
"
11
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
码云
'
,
acceptDate
:
"
2019-09-10
"
,
curNode
:
"
任务签收
"
,
flowRate
:
87
},
]
const
dataCol2
=
[{
title
:
'
业务号
'
,
align
:
"
center
"
,
dataIndex
:
'
reBizCode
'
},{
title
:
'
受理人
'
,
align
:
"
center
"
,
dataIndex
:
'
acceptBy
'
},{
title
:
'
发起时间
'
,
align
:
"
center
"
,
dataIndex
:
'
acceptDate
'
},{
title
:
'
当前节点
'
,
align
:
"
center
"
,
dataIndex
:
'
curNode
'
},{
title
:
'
超时时间
'
,
align
:
"
center
"
,
dataIndex
:
'
flowRate
'
,
scopedSlots
:
{
customRender
:
'
flowRate
'
}
}];
const
dataSource2
=
[
{
reBizCode
:
"
A001
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
张四
'
,
acceptDate
:
"
2019-01-22
"
,
curNode
:
"
任务分派
"
,
flowRate
:
12
},
{
reBizCode
:
"
A002
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
李吧
'
,
acceptDate
:
"
2019-01-23
"
,
curNode
:
"
任务签收
"
,
flowRate
:
3
},
{
reBizCode
:
"
A003
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
王三
'
,
acceptDate
:
"
2019-01-25
"
,
curNode
:
"
任务处理
"
,
flowRate
:
24
},
{
reBizCode
:
"
A004
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
赵二
'
,
acceptDate
:
"
2019-11-22
"
,
curNode
:
"
部门审核
"
,
flowRate
:
10
},
{
reBizCode
:
"
A005
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
钱大
'
,
acceptDate
:
"
2019-12-12
"
,
curNode
:
"
任务签收
"
,
flowRate
:
8
},
{
reBizCode
:
"
A006
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
孙就
'
,
acceptDate
:
"
2019-03-06
"
,
curNode
:
"
任务处理
"
,
flowRate
:
10
},
{
reBizCode
:
"
A007
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
周晕
'
,
acceptDate
:
"
2019-04-13
"
,
curNode
:
"
部门审核
"
,
flowRate
:
24
},
{
reBizCode
:
"
A008
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
吴有
'
,
acceptDate
:
"
2019-05-09
"
,
curNode
:
"
部门审核
"
,
flowRate
:
30
},
{
reBizCode
:
"
A009
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
郑武
'
,
acceptDate
:
"
2019-07-12
"
,
curNode
:
"
任务分派
"
,
flowRate
:
1
},
{
reBizCode
:
"
A0010
"
,
type
:
"
抵押登记
"
,
acceptBy
:
'
林爽
'
,
acceptDate
:
"
2019-12-12
"
,
curNode
:
"
部门审核
"
,
flowRate
:
16
},
{
reBizCode
:
"
A0011
"
,
type
:
"
转移登记
"
,
acceptBy
:
'
码楼
'
,
acceptDate
:
"
2019-09-10
"
,
curNode
:
"
部门审核
"
,
flowRate
:
7
},
]
export
default
{
name
:
"
IndexBdc
"
,
components
:
{
ATooltip
,
ACol
,
ChartCard
,
MiniArea
,
MiniBar
,
DashChartDemo
,
BarMultid
,
IndexBar
},
data
()
{
return
{
loading
:
true
,
cardCount
:{
sll
:
100
,
bjl
:
87
,
isll
:
15
,
ibjl
:
9
},
todaySll
:
60
,
todayBjl
:
54
,
todayISll
:
13
,
todayIBjl
:
7
,
chartData
:{
sll
:[],
bjl
:[],
isll
:[],
ibjl
:[]
},
jhjgFields
,
jhjgData
,
xljgData
,
xljgFields
,
diskInfo
:[
{
name
:
"
C盘
"
,
restPPT
:
7
},
{
name
:
"
D盘
"
,
restPPT
:
5
}
],
registerTypeList
:[{
text
:
"
业务受理
"
},{
text
:
"
业务管理
"
},{
text
:
"
文件管理
"
},{
text
:
"
信息查询
"
}],
dataSource1
:[],
dataSource2
:[],
columns
:
dataCol1
,
columns2
:
dataCol2
,
ipagination1
:{
current
:
1
,
pageSize
:
5
,
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
],
showTotal
:
(
total
,
range
)
=>
{
return
range
[
0
]
+
"
-
"
+
range
[
1
]
+
"
共
"
+
total
+
"
条
"
},
showQuickJumper
:
true
,
showSizeChanger
:
true
,
total
:
0
,
},
ipagination2
:{
current
:
1
,
pageSize
:
5
,
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
],
showTotal
:
(
total
,
range
)
=>
{
return
range
[
0
]
+
"
-
"
+
range
[
1
]
+
"
共
"
+
total
+
"
条
"
},
showQuickJumper
:
true
,
showSizeChanger
:
true
,
total
:
0
,
},
indexRegisterType
:
"
转移登记
"
,
indexBottomTab
:
"
1
"
}
},
methods
:{
goPage
(){
this
.
$message
.
success
(
"
根据业务自行处理跳转页面!
"
)
},
changeRegisterType
(
e
){
this
.
indexRegisterType
=
e
.
target
.
value
if
(
this
.
indexBottomTab
==
"
1
"
){
this
.
loadDataSource1
()
}
else
{
this
.
loadDataSource2
()
}
},
tableChange1
(
pagination
){
this
.
ipagination1
.
current
=
pagination
.
current
this
.
ipagination1
.
pageSize
=
pagination
.
pageSize
this
.
queryTimeoutInfo
()
},
tableChange2
(
pagination
){
this
.
ipagination2
.
current
=
pagination
.
current
this
.
ipagination2
.
pageSize
=
pagination
.
pageSize
this
.
queryNodeTimeoutInfo
()
},
getFlowRateNumber
(
value
){
return
Number
(
value
)
},
getPercentFormat
(
value
){
if
(
value
==
100
){
return
"
超时
"
}
else
{
return
value
+
"
%
"
}
},
getPercentColor
(
value
){
let
p
=
Number
(
value
)
if
(
p
>=
90
&&
p
<
100
){
return
'
rgb(244, 240, 89)
'
}
else
if
(
p
>=
100
){
return
'
red
'
}
else
{
return
'
rgb(16, 142, 233)
'
}
},
loadDataSource1
(){
this
.
dataSource1
=
dataSource1
.
filter
(
item
=>
{
if
(
!
this
.
indexRegisterType
){
return
true
}
return
item
.
type
==
this
.
indexRegisterType
})
},
loadDataSource2
(){
this
.
dataSource2
=
dataSource2
.
filter
(
item
=>
{
if
(
!
this
.
indexRegisterType
){
return
true
}
return
item
.
type
==
this
.
indexRegisterType
})
}
},
created
()
{
this
.
loadDataSource1
()
this
.
loadDataSource2
()
setTimeout
(()
=>
{
this
.
loading
=
!
this
.
loading
},
1000
)
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.extra-wrapper {
line-height: 55px;
padding-right: 24px;
.extra-item {
display: inline-block;
margin-right: 24px;
a {
margin-left: 24px;
}
}
}
.item-group {
padding: 20px 0 8px 24px;
font-size: 0;
a {
color: rgba(0, 0, 0, 0.65);
display: inline-block;
font-size: 14px;
margin-bottom: 13px;
width: 25%;
}
}
.item-group {
.more-btn {
margin-bottom: 13px;
text-align: center;
}
}
.list-content-item {
color: rgba(0, 0, 0, .45);
display: inline-block;
vertical-align: middle;
font-size: 14px;
margin-left: 40px;
}
@media only screen and (min-width: 1600px) {
.list-content-item{
margin-left:60px;
}
}
@media only screen and (max-width: 1300px) {
.list-content-item{
margin-left:20px;
}
.width-hidden4{
display:none
}
}
.list-content-item{
span{line-height: 20px;}
}
.list-content-item{
p{margin-top: 4px;margin-bottom:0;line-height:22px;}
}
.anty-list-cust {
.ant-list-item-meta{flex: 0.3 !important;}
}
.anty-list-cust {
.ant-list-item-content{flex:1 !important; justify-content:flex-start !important;margin-left: 20px;}
}
</
style
>
\ No newline at end of file
jshERP-web/src/views/dashboard/IndexTask.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<div
class=
"index-container-ty"
>
<a-spin
:spinning=
"loading"
>
<a-row
type=
"flex"
justify=
"start"
:gutter=
"3"
>
<a-col
:sm=
"24"
:lg=
"12"
>
<a-card>
<div
slot=
"title"
class=
"index-md-title"
>
<img
src=
"../../assets/daiban.png"
/>
我的待办【
{{
dataSource1
.
length
}}
】
</div>
<div
slot=
"extra"
>
<a
v-if=
"dataSource1 && dataSource1.length>0"
slot=
"footer"
@
click=
"goPage"
>
更多
<a-icon
type=
"double-right"
/></a>
</div>
<a-table
:class=
"'my-index-table tytable1'"
ref=
"table1"
size=
"small"
rowKey=
"id"
:columns=
"columns"
:dataSource=
"dataSource1"
:pagination=
"false"
>
<template
slot=
"ellipsisText"
slot-scope=
"text"
>
<j-ellipsis
:value=
"text"
:length=
"textMaxLength"
></j-ellipsis>
</
template
>
<
template
slot=
"dayWarnning"
slot-scope=
"text,record"
>
<a-icon
type=
"bulb"
theme=
"twoTone"
style=
"font-size:22px"
:twoToneColor=
"getTipColor(record)"
/>
</
template
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleData"
>
办理
</a>
</span>
</a-table>
</a-card>
</a-col>
<a-col
:sm=
"24"
:lg=
"12"
>
<a-card>
<div
slot=
"title"
class=
"index-md-title"
>
<img
src=
"../../assets/zaiban.png"
/>
我的在办【{{ dataSource2.length }}】
</div>
<div
slot=
"extra"
>
<a
v-if=
"dataSource2 && dataSource2.length>0"
slot=
"footer"
@
click=
"goPage"
>
更多
<a-icon
type=
"double-right"
/></a>
</div>
<a-table
:class=
"'my-index-table tytable2'"
ref=
"table2"
size=
"small"
rowKey=
"id"
:columns=
"columns"
:dataSource=
"dataSource2"
:pagination=
"false"
>
<
template
slot=
"ellipsisText"
slot-scope=
"text"
>
<j-ellipsis
:value=
"text"
:length=
"textMaxLength"
></j-ellipsis>
</
template
>
<
template
slot=
"dayWarnning"
slot-scope=
"text,record"
>
<a-icon
type=
"bulb"
theme=
"twoTone"
style=
"font-size:22px"
:twoToneColor=
"getTipColor(record)"
/>
</
template
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleData"
>
办理
</a>
</span>
</a-table>
</a-card>
</a-col>
<a-col
:span=
"24"
>
<div
style=
"height: 5px;"
></div>
</a-col>
<a-col
:sm=
"24"
:lg=
"12"
>
<a-card>
<div
slot=
"title"
class=
"index-md-title"
>
<img
src=
"../../assets/guaz.png"
/>
我的挂账【{{ dataSource4.length }}】
</div>
<a-table
:class=
"'my-index-table tytable4'"
ref=
"table4"
size=
"small"
rowKey=
"id"
:columns=
"columns"
:dataSource=
"dataSource4"
:pagination=
"false"
>
<
template
slot=
"ellipsisText"
slot-scope=
"text"
>
<j-ellipsis
:value=
"text"
:length=
"textMaxLength"
></j-ellipsis>
</
template
>
<
template
slot=
"dayWarnning"
slot-scope=
"text,record"
>
<a-icon
type=
"bulb"
theme=
"twoTone"
style=
"font-size:22px"
:twoToneColor=
"getTipColor(record)"
/>
</
template
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleData"
>
办理
</a>
</span>
</a-table>
</a-card>
</a-col>
<a-col
:sm=
"24"
:lg=
"12"
>
<a-card>
<div
slot=
"title"
class=
"index-md-title"
>
<img
src=
"../../assets/duban.png"
/>
我的督办【{{ dataSource3.length }}】
</div>
<a-table
:class=
"'my-index-table tytable3'"
ref=
"table3"
size=
"small"
rowKey=
"id"
:columns=
"columns"
:dataSource=
"dataSource3"
:pagination=
"false"
>
<
template
slot=
"ellipsisText"
slot-scope=
"text"
>
<j-ellipsis
:value=
"text"
:length=
"textMaxLength"
></j-ellipsis>
</
template
>
<
template
slot=
"dayWarnning"
slot-scope=
"text,record"
>
<a-icon
type=
"bulb"
theme=
"twoTone"
style=
"font-size:22px"
:twoToneColor=
"getTipColor(record)"
/>
</
template
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleData"
>
办理
</a>
</span>
</a-table>
</a-card>
</a-col>
</a-row>
</a-spin>
</div>
</template>
<
script
>
import
noDataPng
from
'
@/assets/nodata.png
'
import
JEllipsis
from
'
@/components/jeecg/JEllipsis
'
const
tempSs1
=
[{
id
:
"
001
"
,
orderNo
:
"
电[1]1267102
"
,
orderTitle
:
"
药品出问题了
"
,
restDay
:
1
},{
id
:
"
002
"
,
orderNo
:
"
电[4]5967102
"
,
orderTitle
:
"
吃了xxx医院的药,病情越来越严重
"
,
restDay
:
0
},{
id
:
"
003
"
,
orderNo
:
"
电[3]5988987
"
,
orderTitle
:
"
今天去超市买鸡蛋,鸡蛋都是坏的
"
,
restDay
:
7
},{
id
:
"
004
"
,
orderNo
:
"
电[2]5213491
"
,
orderTitle
:
"
xx宝实体店高价售卖xx
"
,
restDay
:
5
},{
id
:
"
005
"
,
orderNo
:
"
电[1]1603491
"
,
orderTitle
:
"
以红利相诱,答应退保后扣一年费用
"
,
restDay
:
0
}]
const
tempSs2
=
[{
id
:
"
001
"
,
orderTitle
:
"
我要投诉这个大超市
"
,
orderNo
:
"
电[1]10299456
"
,
restDay
:
6
},{
id
:
"
002
"
,
orderTitle
:
"
xxx医院乱开药方,售卖假药
"
,
orderNo
:
"
电[2]20235691
"
,
restDay
:
0
},{
id
:
"
003
"
,
orderTitle
:
"
我想问问这家店是干啥的
"
,
orderNo
:
"
电[3]495867322
"
,
restDay
:
7
},{
id
:
"
004
"
,
orderTitle
:
"
我要举报朝阳区奥森公园酒店
"
,
orderNo
:
"
电[2]1193849
"
,
restDay
:
3
},{
id
:
"
005
"
,
orderTitle
:
"
我今天吃饭吃到一个石头子
"
,
orderNo
:
"
电[4]56782344
"
,
restDay
:
9
}]
//4-7天
const
tip_green
=
"
rgba(0, 255, 0, 1)
"
//1-3天
const
tip_yellow
=
"
rgba(255, 255, 0, 1)
"
//超期
const
tip_red
=
"
rgba(255, 0, 0, 1)
"
export
default
{
name
:
"
IndexTask
"
,
components
:{
JEllipsis
},
data
()
{
return
{
loading
:
false
,
textMaxLength
:
8
,
dataSource1
:[],
dataSource2
:[],
dataSource3
:[],
dataSource4
:[],
columns
:
[
{
title
:
''
,
dataIndex
:
''
,
key
:
'
rowIndex
'
,
width
:
50
,
fixed
:
'
left
'
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
"
dayWarnning
"
}
},
{
title
:
'
剩余天数
'
,
align
:
"
center
"
,
dataIndex
:
'
restDay
'
,
width
:
80
},
{
title
:
'
工单标题
'
,
align
:
"
center
"
,
dataIndex
:
'
orderTitle
'
,
scopedSlots
:
{
customRender
:
"
ellipsisText
"
}
},
{
title
:
'
工单编号
'
,
align
:
"
center
"
,
dataIndex
:
'
orderNo
'
,
},
{
title
:
'
操作
'
,
dataIndex
:
'
action
'
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
action
'
}
}
]
}
},
created
()
{
this
.
mock
();
},
mounted
(){
},
methods
:
{
getTipColor
(
rd
){
let
num
=
rd
.
restDay
if
(
num
<=
0
){
return
tip_red
}
else
if
(
num
>=
1
&&
num
<
4
){
return
tip_yellow
}
else
if
(
num
>=
4
){
return
tip_green
}
},
goPage
(){
this
.
$message
.
success
(
"
请根据具体业务跳转页面
"
)
//this.$router.push({ path: '/comp/mytask' })
},
mock
(){
this
.
dataSource1
=
tempSs1
this
.
dataSource2
=
tempSs2
this
.
dataSource3
=
tempSs1
this
.
dataSource4
=
[]
this
.
ifNullDataSource
(
this
.
dataSource4
,
'
.tytable4
'
)
},
ifNullDataSource
(
ds
,
tb
){
this
.
$nextTick
(()
=>
{
if
(
!
ds
||
ds
.
length
==
0
){
var
tmp
=
document
.
createElement
(
'
img
'
);
tmp
.
src
=
noDataPng
tmp
.
width
=
300
let
tbclass
=
`
${
tb
}
.ant-table-placeholder`
document
.
querySelector
(
tbclass
).
innerHTML
=
""
document
.
querySelector
(
tbclass
).
appendChild
(
tmp
)
}
})
},
handleData
(){
this
.
$message
.
success
(
"
办理完成
"
)
}
}
}
</
script
>
<
style
>
.my-index-table
{
height
:
270px
}
.my-index-table
table
{
font-size
:
14px
!important
;}
.index-container-ty
.ant-card-head-title
{
padding-top
:
6px
;
padding-bottom
:
6px
;}
.index-container-ty
.ant-card-extra
{
padding
:
0
}
.index-container-ty
.ant-card-extra
a
{
color
:
#fff
}
.index-container-ty
.ant-card-extra
a
:hover
{
color
:
#152ede
}
.index-container-ty
.ant-card-head-wrapper
,
.index-container-ty
.ant-card-head
{
line-height
:
24px
;
min-height
:
24px
;
/*background: #90aeff;*/
background
:
#7196fb
;
}
.index-container-ty
.ant-card-body
{
padding
:
10px
12px
0px
12px
}
/* .index-container-ty .ant-card-actions{background: #fff}
.index-container-ty .ant-card-actions li {margin:2px 0;}
.index-container-ty .ant-card-actions > li > span{width: 100%}*/
.index-container-ty
.ant-table-footer
{
text-align
:
right
;
padding
:
6px
12px
6px
6px
;
background
:
#fff
;
border-top
:
2px
solid
#f7f1f1
;}
.index-md-title
{
postion
:
relative
;
padding-left
:
24px
;
width
:
100%
;
color
:
#fff
;
font-size
:
21px
;
font-family
:
cursive
;
}
.index-md-title
img
{
position
:
absolute
;
height
:
32px
;
top
:
2px
;
left
:
14px
;
}
.index-container-ty
.ant-card-body
{
/*border-left:1px solid #90aeff;
/*border-right:1px solid #90aeff;
border-bottom:1px solid #90aeff;*/
}
.index-container-ty
.ant-table-thead
>
tr
>
th
,
.index-container-ty
.ant-table-tbody
>
tr
>
td
{
border-bottom
:
1px
solid
#90aeff
;
}
.index-container-ty
.ant-table-small
>
.ant-table-content
>
.ant-table-fixed-left
>
.ant-table-body-outer
>
.ant-table-body-inner
>
table
>
.ant-table-thead
>
tr
>
th
,
.index-container-ty
.ant-table-small
>
.ant-table-content
>
.ant-table-fixed-right
>
.ant-table-body-outer
>
.ant-table-body-inner
>
table
>
.ant-table-thead
>
tr
>
th
{
border-bottom
:
1px
solid
#90aeff
;
}
.index-container-ty
.ant-table-small
>
.ant-table-content
>
.ant-table-scroll
>
.ant-table-body
>
table
>
.ant-table-thead
>
tr
>
th
{
border-bottom
:
1px
solid
#90aeff
;
}
.index-container-ty
.ant-table-small
{
border
:
1px
solid
#90aeff
;
}
.index-container-ty
.ant-table-placeholder
{
padding
:
0
}
</
style
>
\ No newline at end of file
jshERP-web/src/views/form/BasicForm.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-card
:body-style=
"
{padding: '24px 32px'}" :bordered="false">
<a-form
@
submit=
"handleSubmit"
:form=
"form"
>
<a-form-item
label=
"标题"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
<a-input
v-decorator=
"[
'name',
{rules: [{ required: true, message: '请输入标题' }]}
]"
name="name"
placeholder="给目标起个名字" />
</a-form-item>
<a-form-item
label=
"起止日期"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
<a-range-picker
name=
"buildTime"
style=
"width: 100%"
v-decorator=
"[
'buildTime',
{rules: [{ required: true, message: '请选择起止日期' }]}
]" />
</a-form-item>
<a-form-item
label=
"目标描述"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
<a-textarea
rows=
"4"
placeholder=
"请输入你阶段性工作目标"
v-decorator=
"[
'description',
{rules: [{ required: true, message: '请输入目标描述' }]}
]" />
</a-form-item>
<a-form-item
label=
"衡量标准"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
<a-textarea
rows=
"4"
placeholder=
"请输入衡量标准"
v-decorator=
"[
'type',
{rules: [{ required: true, message: '请输入衡量标准' }]}
]" />
</a-form-item>
<a-form-item
label=
"客户"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }">
<a-input
placeholder=
"请描述你服务的客户,内部客户直接 @姓名/工号"
v-decorator=
"[
'customer',
{rules: [{ required: true, message: '请描述你服务的客户' }]}
]" />
</a-form-item>
<a-form-item
label=
"邀评人"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
:required="false"
>
<a-input
placeholder=
"请直接 @姓名/工号,最多可邀请 5 人"
/>
</a-form-item>
<a-form-item
label=
"权重"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
:required="false"
>
<a-input-number
:min=
"0"
:max=
"100"
/>
<span>
%
</span>
</a-form-item>
<a-form-item
label=
"目标公开"
:labelCol=
"
{lg: {span: 7}, sm: {span: 7}}"
:wrapperCol="{lg: {span: 10}, sm: {span: 17} }"
:required="false"
help="客户、邀评人默认被分享"
>
<a-radio-group
v-model=
"value"
>
<a-radio
:value=
"1"
>
公开
</a-radio>
<a-radio
:value=
"2"
>
部分公开
</a-radio>
<a-radio
:value=
"3"
>
不公开
</a-radio>
</a-radio-group>
<a-form-item>
<a-select
mode=
"multiple"
v-if=
"value === 2"
>
<a-select-option
value=
"4"
>
同事一
</a-select-option>
<a-select-option
value=
"5"
>
同事二
</a-select-option>
<a-select-option
value=
"6"
>
同事三
</a-select-option>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
:wrapperCol=
"
{ span: 24 }"
style="text-align: center"
>
<a-button
htmlType=
"submit"
type=
"primary"
>
提交
</a-button>
<a-button
style=
"margin-left: 8px"
>
保存
</a-button>
</a-form-item>
</a-form>
</a-card>
</
template
>
<
script
>
export
default
{
name
:
'
BaseForm
'
,
data
()
{
return
{
description
:
'
表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。
'
,
value
:
1
,
// form
form
:
this
.
$form
.
createForm
(
this
),
}
},
methods
:
{
// handler
handleSubmit
(
e
)
{
e
.
preventDefault
()
this
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
// eslint-disable-next-line no-console
console
.
log
(
'
Received values of form:
'
,
values
)
}
})
}
}
}
</
script
>
\ No newline at end of file
jshERP-web/src/views/list/CardList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<div
class=
"card-list"
ref=
"content"
>
<a-list
:grid=
"
{gutter: 24, lg: 3, md: 2, sm: 1, xs: 1}"
:dataSource="dataSource"
>
<a-list-item
slot=
"renderItem"
slot-scope=
"item, index"
>
<template
v-if=
"item === null"
>
<a-button
class=
"new-btn"
type=
"dashed"
>
<a-icon
type=
"plus"
/>
新增产品
</a-button>
</
template
>
<
template
v-else
>
<a-card
:hoverable=
"true"
>
<a-card-meta>
<div
style=
"margin-bottom: 3px"
slot=
"title"
>
{{
item
.
title
}}
</div>
<a-avatar
class=
"card-avatar"
slot=
"avatar"
:src=
"item.avatar"
size=
"large"
/>
<div
class=
"meta-content"
slot=
"description"
>
{{
item
.
content
}}
</div>
</a-card-meta>
<template
class=
"ant-card-actions"
slot=
"actions"
>
<a>
操作一
</a>
<a>
操作二
</a>
</
template
>
</a-card>
</template>
</a-list-item>
</a-list>
</div>
</template>
<
script
>
const
dataSource
=
[]
dataSource
.
push
(
null
)
for
(
let
i
=
0
;
i
<
11
;
i
++
)
{
dataSource
.
push
({
title
:
'
Alipay
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png
'
,
content
:
'
在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。
'
})
}
export
default
{
name
:
"
CardList
"
,
data
()
{
return
{
description
:
'
段落示意:蚂蚁金服务设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态, 提供跨越设计与开发的体验解决方案。
'
,
linkList
:
[
{
icon
:
'
rocket
'
,
href
:
'
#
'
,
title
:
'
快速开始
'
},
{
icon
:
'
info-circle-o
'
,
href
:
'
#
'
,
title
:
'
产品简介
'
},
{
icon
:
'
file-text
'
,
href
:
'
#
'
,
title
:
'
产品文档
'
}
],
extraImage
:
'
https://gw.alipayobjects.com/zos/rmsportal/RzwpdLnhmvDJToTdfDPe.png
'
,
dataSource
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.card-avatar {
width: 48px;
height: 48px;
border-radius: 48px;
}
.ant-card-actions {
background: #f7f9fa;
li {
float: left;
text-align: center;
margin: 12px 0;
color: rgba(0, 0, 0, 0.45);
width: 50%;
&:not(:last-child) {
border-right: 1px solid #e8e8e8;
}
a {
color: rgba(0, 0, 0, .45);
line-height: 22px;
display: inline-block;
width: 100%;
&:hover {
color: #1890ff;
}
}
}
}
.new-btn {
background-color: #fff;
border-radius: 2px;
width: 100%;
height: 188px;
}
.meta-content {
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
height: 64px;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</
style
>
\ No newline at end of file
jshERP-web/src/views/list/PermissionList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-card
:bordered=
"false"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
>
<a-row
:gutter=
"48"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"角色ID"
>
<a-input
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
>
重置
</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<s-table
:columns=
"columns"
:data=
"loadData"
>
<span
slot=
"actions"
slot-scope=
"text, record"
>
<a-tag
v-for=
"(action, index) in record.actionList"
:key=
"index"
>
{{
action
.
describe
}}
</a-tag>
</span>
<span
slot=
"status"
slot-scope=
"text"
>
{{
text
|
statusFilter
}}
</span>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleEdit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a-dropdown>
<a
class=
"ant-dropdown-link"
>
更多
<a-icon
type=
"down"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
详情
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
禁用
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
删除
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</s-table>
<a-modal
title=
"操作"
:width=
"800"
v-model=
"visible"
@
ok=
"handleOk"
>
<a-form
:autoFormCreate=
"(form)=>
{this.form = form}">
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"唯一识别码"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"唯一识别码"
v-model=
"mdl.id"
id=
"no"
disabled=
"disabled"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"权限名称"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"起一个名字"
v-model=
"mdl.name"
id=
"permission_name"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"状态"
hasFeedback
validateStatus=
"warning"
>
<a-select
v-model=
"mdl.status"
>
<a-select-option
value=
"1"
>
正常
</a-select-option>
<a-select-option
value=
"2"
>
禁用
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"描述"
hasFeedback
>
<a-textarea
:rows=
"5"
v-model=
"mdl.describe"
placeholder=
"..."
id=
"describe"
/>
</a-form-item>
<a-divider
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"赋予权限"
hasFeedback
>
<a-select
style=
"width: 100%"
mode=
"multiple"
v-model=
"mdl.actions"
:allowClear=
"true"
>
<a-select-option
v-for=
"(action, index) in permissionList"
:key=
"index"
:value=
"action.value"
>
{{
action
.
label
}}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</a-card>
</
template
>
<
script
>
import
STable
from
'
@/components/table/
'
export
default
{
name
:
"
TableList
"
,
components
:
{
STable
},
data
()
{
return
{
description
:
'
列表使用场景:后台管理中的权限管理以及角色管理,可用于基于 RBAC 设计的角色权限控制,颗粒度细到每一个操作类型。
'
,
visible
:
false
,
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
},
form
:
null
,
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'
唯一识别码
'
,
dataIndex
:
'
id
'
},
{
title
:
'
权限名称
'
,
dataIndex
:
'
name
'
,
},
{
title
:
'
可操作权限
'
,
dataIndex
:
'
actions
'
,
scopedSlots
:
{
customRender
:
'
actions
'
},
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
scopedSlots
:
{
customRender
:
'
status
'
},
},
{
title
:
'
操作
'
,
width
:
'
150px
'
,
dataIndex
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
}
],
// 向后端拉取可以用的操作列表
permissionList
:
null
,
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
this
.
$http
.
get
(
'
/api/permission
'
,
{
params
:
Object
.
assign
(
parameter
,
this
.
queryParam
)
}).
then
(
res
=>
{
let
result
=
res
.
result
result
.
data
.
map
(
permission
=>
{
permission
.
actionList
=
JSON
.
parse
(
permission
.
actionData
)
return
permission
})
return
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
filters
:
{
statusFilter
(
status
)
{
const
statusMap
=
{
1
:
'
正常
'
,
2
:
'
禁用
'
}
return
statusMap
[
status
]
}
},
created
()
{
this
.
loadPermissionList
()
},
methods
:
{
loadPermissionList
()
{
// permissionList
new
Promise
((
resolve
=>
{
const
data
=
[
{
label
:
'
新增
'
,
value
:
'
add
'
,
defaultChecked
:
false
},
{
label
:
'
查询
'
,
value
:
'
get
'
,
defaultChecked
:
false
},
{
label
:
'
修改
'
,
value
:
'
update
'
,
defaultChecked
:
false
},
{
label
:
'
列表
'
,
value
:
'
query
'
,
defaultChecked
:
false
},
{
label
:
'
删除
'
,
value
:
'
delete
'
,
defaultChecked
:
false
},
{
label
:
'
导入
'
,
value
:
'
import
'
,
defaultChecked
:
false
},
{
label
:
'
导出
'
,
value
:
'
export
'
,
defaultChecked
:
false
}
]
setTimeout
(
resolve
(
data
),
1500
)
})).
then
(
res
=>
{
this
.
permissionList
=
res
})
},
handleEdit
(
record
)
{
this
.
mdl
=
Object
.
assign
({},
record
)
console
.
log
(
this
.
mdl
)
this
.
visible
=
true
},
handleOk
()
{
},
onChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
},
},
watch
:
{
/*
'selectedRows': function (selectedRows) {
this.needTotalList = this.needTotalList.map(item => {
return {
...item,
total: selectedRows.reduce( (sum, val) => {
return sum + val[item.dataIndex]
}, 0)
}
})
}
*/
}
}
</
script
>
\ No newline at end of file
jshERP-web/src/views/list/RoleList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-card
:bordered=
"false"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
>
<a-row
:gutter=
"48"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"角色ID"
>
<a-input
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
正常
</a-select-option>
<a-select-option
value=
"2"
>
禁用
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
>
重置
</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<s-table
ref=
"table"
size=
"default"
:columns=
"columns"
:data=
"loadData"
>
<div
slot=
"expandedRowRender"
slot-scope=
"record"
style=
"margin: 0"
>
<a-row
:gutter=
"24"
:style=
"
{ marginBottom: '12px' }">
<a-col
:span=
"12"
v-for=
"(role, index) in record.permissions"
:key=
"index"
:style=
"
{ marginBottom: '12px' }">
<a-col
:span=
"4"
>
<span>
{{
role
.
permissionName
}}
:
</span>
</a-col>
<a-col
:span=
"20"
v-if=
"role.actionEntitySet.length > 0"
>
<a-tag
color=
"cyan"
v-for=
"(action, k) in role.actionEntitySet"
:key=
"k"
>
{{
action
.
describe
}}
</a-tag>
</a-col>
<a-col
:span=
"20"
v-else
>
-
</a-col>
</a-col>
</a-row>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"$refs.modal.edit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a-dropdown>
<a
class=
"ant-dropdown-link"
>
更多
<a-icon
type=
"down"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
详情
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
禁用
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
删除
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</s-table>
<role-modal
ref=
"modal"
@
ok=
"handleOk"
></role-modal>
</a-card>
</
template
>
<
script
>
import
STable
from
'
@/components/table/
'
import
RoleModal
from
'
./modules/RoleModal
'
export
default
{
name
:
"
TableList
"
,
components
:
{
STable
,
RoleModal
},
data
()
{
return
{
description
:
'
列表使用场景:后台管理中的权限管理以及角色管理,可用于基于 RBAC 设计的角色权限控制,颗粒度细到每一个操作类型。
'
,
visible
:
false
,
form
:
null
,
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'
唯一识别码
'
,
dataIndex
:
'
id
'
},
{
title
:
'
角色名称
'
,
dataIndex
:
'
name
'
,
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
},
{
title
:
'
创建时间
'
,
dataIndex
:
'
createTime
'
,
sorter
:
true
},
{
title
:
'
操作
'
,
width
:
'
150px
'
,
dataIndex
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
this
.
$http
.
get
(
'
/api/role
'
,
{
params
:
Object
.
assign
(
parameter
,
this
.
queryParam
)
}).
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
methods
:
{
handleEdit
(
record
)
{
this
.
mdl
=
Object
.
assign
({},
record
)
this
.
mdl
.
permissions
.
forEach
(
permission
=>
{
permission
.
actionsOptions
=
permission
.
actionEntitySet
.
map
(
action
=>
{
return
{
label
:
action
.
describe
,
value
:
action
.
action
,
defaultCheck
:
action
.
defaultCheck
}
})
})
console
.
log
(
this
.
mdl
)
this
.
visible
=
true
},
handleOk
()
{
// 新增/修改 成功时,重载列表
this
.
$refs
.
table
.
refresh
()
},
onChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
},
},
watch
:
{
/*
'selectedRows': function (selectedRows) {
this.needTotalList = this.needTotalList.map(item => {
return {
...item,
total: selectedRows.reduce( (sum, val) => {
return sum + val[item.dataIndex]
}, 0)
}
})
}
*/
}
}
</
script
>
\ No newline at end of file
jshERP-web/src/views/list/StandardList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<div>
<a-card
:bordered=
"false"
>
<a-row>
<a-col
:sm=
"8"
:xs=
"24"
>
<head-info
title=
"我的待办"
content=
"8个任务"
:bordered=
"true"
/>
</a-col>
<a-col
:sm=
"8"
:xs=
"24"
>
<head-info
title=
"本周任务平均处理时间"
content=
"32分钟"
:bordered=
"true"
/>
</a-col>
<a-col
:sm=
"8"
:xs=
"24"
>
<head-info
title=
"本周完成任务数"
content=
"24个"
/>
</a-col>
</a-row>
</a-card>
<a-card
style=
"margin-top: 24px"
:bordered=
"false"
title=
"标准列表"
>
<div
slot=
"extra"
>
<a-radio-group>
<a-radio-button>
全部
</a-radio-button>
<a-radio-button>
进行中
</a-radio-button>
<a-radio-button>
等待中
</a-radio-button>
</a-radio-group>
<a-input-search
style=
"margin-left: 16px; width: 272px;"
/>
</div>
<div
class=
"operate"
>
<a-button
type=
"dashed"
style=
"width: 100%"
icon=
"plus"
>
添加
</a-button>
</div>
<a-list
size=
"large"
:pagination=
"
{showSizeChanger: true, showQuickJumper: true, pageSize: 5, total: 50}">
<a-list-item
:key=
"index"
v-for=
"(item, index) in data"
>
<a-list-item-meta
:description=
"item.description"
>
<a-avatar
slot=
"avatar"
size=
"large"
shape=
"square"
:src=
"item.avatar"
/>
<a
slot=
"title"
>
{{
item
.
title
}}
</a>
</a-list-item-meta>
<div
slot=
"actions"
>
<a>
编辑
</a>
</div>
<div
slot=
"actions"
>
<a-dropdown>
<a-menu
slot=
"overlay"
>
<a-menu-item><a>
编辑
</a></a-menu-item>
<a-menu-item><a>
删除
</a></a-menu-item>
</a-menu>
<a>
更多
<a-icon
type=
"down"
/></a>
</a-dropdown>
</div>
<div
class=
"list-content"
>
<div
class=
"list-content-item"
>
<span>
Owner
</span>
<p>
{{
item
.
owner
}}
</p>
</div>
<div
class=
"list-content-item"
>
<span>
开始时间
</span>
<p>
{{
item
.
startAt
}}
</p>
</div>
<div
class=
"list-content-item"
>
<a-progress
:percent=
"item.progress.value"
:status=
"!item.progress.status ? null : item.progress.status"
style=
"width: 180px"
/>
</div>
</div>
</a-list-item>
</a-list>
</a-card>
</div>
</
template
>
<
script
>
import
HeadInfo
from
'
@/components/tools/HeadInfo
'
const
data
=
[]
data
.
push
({
title
:
'
Alipay
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png
'
,
description
:
'
那是一种内在的东西, 他们到达不了,也无法触及的
'
,
owner
:
'
付晓晓
'
,
startAt
:
'
2018-07-26 22:44
'
,
progress
:
{
value
:
90
}
})
data
.
push
({
title
:
'
Angular
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png
'
,
description
:
'
希望是一个好东西,也许是最好的,好东西是不会消亡的
'
,
owner
:
'
曲丽丽
'
,
startAt
:
'
2018-07-26 22:44
'
,
progress
:
{
value
:
54
}
})
data
.
push
({
title
:
'
Ant Design
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png
'
,
description
:
'
生命就像一盒巧克力,结果往往出人意料
'
,
owner
:
'
林东东
'
,
startAt
:
'
2018-07-26 22:44
'
,
progress
:
{
value
:
66
}
})
data
.
push
({
title
:
'
Ant Design Pro
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png
'
,
description
:
'
城镇中有那么多的酒馆,她却偏偏走进了我的酒馆
'
,
owner
:
'
周星星
'
,
startAt
:
'
2018-07-26 22:44
'
,
progress
:
{
value
:
30
}
})
data
.
push
({
title
:
'
Bootstrap
'
,
avatar
:
'
https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png
'
,
description
:
'
那时候我只会想自己想要什么,从不想自己拥有什么
'
,
owner
:
'
吴加好
'
,
startAt
:
'
2018-07-26 22:44
'
,
progress
:
{
status
:
'
exception
'
,
value
:
100
}
})
export
default
{
name
:
"
StandardList
"
,
components
:
{
HeadInfo
},
data
()
{
return
{
data
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.ant-avatar-lg {
width: 48px;
height: 48px;
line-height: 48px;
}
.list-content-item {
color: rgba(0, 0, 0, .45);
display: inline-block;
vertical-align: middle;
font-size: 14px;
margin-left: 40px;
span {
line-height: 20px;
}
p {
margin-top: 4px;
margin-bottom: 0;
line-height: 22px;
}
}
</
style
>
\ No newline at end of file
jshERP-web/src/views/list/TableInnerEditList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-card
:bordered=
"false"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
>
<a-row
:gutter=
"48"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"规则编号"
>
<a-input
placeholder=
""
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"使用状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<template
v-if=
"advanced"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"调用次数"
>
<a-input-number
style=
"width: 100%"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"更新日期"
>
<a-date-picker
style=
"width: 100%"
placeholder=
"请输入更新日期"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"使用状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"使用状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</
template
>
<a-col
:md=
"!advanced && 8 || 24"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
:style=
"advanced && { float: 'right', overflow: 'hidden' } || {} "
>
<a-button
type=
"primary"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
>
重置
</a-button>
<a
@
click=
"toggleAdvanced"
style=
"margin-left: 8px"
>
{{ advanced ? '收起' : '展开' }}
<a-icon
:type=
"advanced ? 'up' : 'down'"
/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div
class=
"table-operator"
>
<a-button
type=
"primary"
icon=
"plus"
@
click=
"() => $router.push({name: 'anime-add'})"
>
新建
</a-button>
<a-dropdown
v-if=
"selectedRowKeys.length > 0"
>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
<!-- lock | unlock -->
<a-menu-item
key=
"2"
><a-icon
type=
"lock"
/>
锁定
</a-menu-item>
</a-menu>
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-icon
type=
"down"
/>
</a-button>
</a-dropdown>
</div>
<s-table
ref=
"table"
size=
"default"
:columns=
"columns"
:data=
"loadData"
:showAlertInfo=
"true"
@
onSelect=
"onChange"
>
<
template
v-for=
"(col, index) in columns"
v-if=
"col.scopedSlots"
:slot=
"col.dataIndex"
slot-scope=
"text, record, index"
>
<div
:key=
"index"
>
<a-input
v-if=
"record.editable"
style=
"margin: -5px 0"
:value=
"text"
@
change=
"e => handleChange(e.target.value, record.key, col)"
/>
<template
v-else
>
{{
text
}}
</
template
>
</div>
</template>
<
template
slot=
"action"
slot-scope=
"text, record, index"
>
<div
class=
"editable-row-operations"
>
<span
v-if=
"record.editable"
>
<a
@
click=
"() => save(record)"
>
保存
</a>
<a-divider
type=
"vertical"
/>
<a-popconfirm
title=
"真的放弃编辑吗?"
@
confirm=
"() => cancel(record)"
>
<a>
取消
</a>
</a-popconfirm>
</span>
<span
v-else
>
<a
class=
"edit"
@
click=
"() => edit(record)"
>
修改
</a>
<a-divider
type=
"vertical"
/>
<a
class=
"delete"
@
click=
"() => del(record)"
>
删除
</a>
</span>
</div>
</
template
>
</s-table>
</a-card>
</template>
<
script
>
import
STable
from
'
@/components/table/
'
export
default
{
name
:
"
TableList
"
,
components
:
{
STable
},
data
()
{
return
{
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'
规则编号
'
,
dataIndex
:
'
no
'
,
width
:
90
},
{
title
:
'
描述
'
,
dataIndex
:
'
description
'
,
scopedSlots
:
{
customRender
:
'
description
'
},
},
{
title
:
'
服务调用次数
'
,
dataIndex
:
'
callNo
'
,
width
:
'
150px
'
,
sorter
:
true
,
needTotal
:
true
,
scopedSlots
:
{
customRender
:
'
callNo
'
},
// customRender: (text) => text + ' 次'
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
'
100px
'
,
needTotal
:
true
,
scopedSlots
:
{
customRender
:
'
status
'
},
},
{
title
:
'
更新时间
'
,
dataIndex
:
'
updatedAt
'
,
width
:
'
150px
'
,
sorter
:
true
,
scopedSlots
:
{
customRender
:
'
updatedAt
'
},
},
{
table
:
'
操作
'
,
dataIndex
:
'
action
'
,
width
:
'
120px
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
this
.
$http
.
get
(
'
/api/service
'
,
{
params
:
Object
.
assign
(
parameter
,
this
.
queryParam
)
}).
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
methods
:
{
handleChange
(
value
,
key
,
column
)
{
console
.
log
(
value
,
key
,
column
)
},
edit
(
row
)
{
row
.
editable
=
true
// row = Object.assign({}, row)
this
.
$refs
.
table
.
updateEdit
()
},
// eslint-disable-next-line
del
(
row
)
{
this
.
$confirm
({
title
:
'
警告
'
,
content
:
'
真的要删除吗?
'
,
okText
:
'
删除
'
,
okType
:
'
danger
'
,
cancelText
:
'
取消
'
,
onOk
()
{
console
.
log
(
'
OK
'
);
// 在这里调用删除接口
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(
Math
.
random
()
>
0.5
?
resolve
:
reject
,
1000
);
}).
catch
(()
=>
console
.
log
(
'
Oops errors!
'
));
},
onCancel
()
{
console
.
log
(
'
Cancel
'
);
},
});
},
save
(
row
)
{
delete
row
.
editable
this
.
$refs
.
table
.
updateEdit
()
},
cancel
(
row
)
{
delete
row
.
editable
this
.
$refs
.
table
.
updateEdit
()
},
onChange
(
row
)
{
this
.
selectedRowKeys
=
row
.
selectedRowKeys
this
.
selectedRows
=
row
.
selectedRows
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
},
},
watch
:
{
/*
'selectedRows': function (selectedRows) {
this.needTotalList = this.needTotalList.map(item => {
return {
...item,
total: selectedRows.reduce( (sum, val) => {
return sum + val[item.dataIndex]
}, 0)
}
})
}
*/
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.search {
margin-bottom: 54px;
}
.fold {
width: calc(100% - 216px);
display: inline-block
}
.operator {
margin-bottom: 18px;
}
@media screen and (max-width: 900px) {
.fold {
width: 100%;
}
}
</
style
>
\ No newline at end of file
jshERP-web/src/views/list/TableList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-card
:bordered=
"false"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
>
<a-row
:gutter=
"48"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"规则编号"
>
<a-input
v-model=
"queryParam.id"
placeholder=
""
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"使用状态"
>
<a-select
v-model=
"queryParam.status"
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<template
v-if=
"advanced"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"调用次数"
>
<a-input-number
v-model=
"queryParam.callNo"
style=
"width: 100%"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"更新日期"
>
<a-date-picker
v-model=
"queryParam.date"
style=
"width: 100%"
placeholder=
"请输入更新日期"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"使用状态"
>
<a-select
v-model=
"queryParam.useStatus"
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"使用状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</
template
>
<a-col
:md=
"!advanced && 8 || 24"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
:style=
"advanced && { float: 'right', overflow: 'hidden' } || {} "
>
<a-button
type=
"primary"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"resetSearchForm"
>
重置
</a-button>
<a
@
click=
"toggleAdvanced"
style=
"margin-left: 8px"
>
{{ advanced ? '收起' : '展开' }}
<a-icon
:type=
"advanced ? 'up' : 'down'"
/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div
class=
"table-operator"
>
<a-button
type=
"primary"
icon=
"plus"
@
click=
"() => this.handleModalVisible(true)"
>
新建
</a-button>
<a-dropdown
v-if=
"selectedRowKeys.length > 0"
>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
<!-- lock | unlock -->
<a-menu-item
key=
"2"
><a-icon
type=
"lock"
/>
锁定
</a-menu-item>
</a-menu>
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-icon
type=
"down"
/>
</a-button>
</a-dropdown>
</div>
<s-table
ref=
"table"
size=
"default"
:columns=
"columns"
:data=
"loadData"
:showAlertInfo=
"true"
@
onSelect=
"onChange"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleEdit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a-dropdown>
<a
class=
"ant-dropdown-link"
>
更多
<a-icon
type=
"down"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
详情
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
禁用
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
删除
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</s-table>
<a-modal
title=
"操作"
:width=
"800"
v-model=
"visible"
@
ok=
"handleOk"
>
<a-form
:autoFormCreate=
"(form)=>{this.form = form}"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"规则编号"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"规则编号"
v-model=
"mdl.no"
id=
"no"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"服务调用次数"
hasFeedback
validateStatus=
"success"
>
<a-input-number
:min=
"1"
id=
"callNo"
v-model=
"mdl.callNo"
style=
"width: 100%"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"状态"
hasFeedback
validateStatus=
"warning"
>
<a-select
defaultValue=
"1"
v-model=
"mdl.status"
>
<a-select-option
value=
"1"
>
Option 1
</a-select-option>
<a-select-option
value=
"2"
>
Option 2
</a-select-option>
<a-select-option
value=
"3"
>
Option 3
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"描述"
hasFeedback
help=
"请填写一段描述"
>
<a-textarea
:rows=
"5"
v-model=
"mdl.description"
placeholder=
"..."
id=
"description"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"更新时间"
hasFeedback
validateStatus=
"error"
>
<a-date-picker
style=
"width: 100%"
showTime
format=
"YYYY-MM-DD HH:mm:ss"
placeholder=
"Select Time"
/>
</a-form-item>
</a-form>
</a-modal>
<a-modal
title=
"新建规则"
destroyOnClose
:visible=
"visibleCreateModal"
@
ok=
"handleCreateModalOk"
@
cancel=
"handleCreateModalCancel"
>
<!---->
<a-form
style=
"margin-top: 8px"
:autoFormCreate=
"(form)=>{this.createForm = form}"
>
<a-form-item
:labelCol=
"{ span: 5 }"
:wrapperCol=
"{ span: 15 }"
label=
"描述"
fieldDecoratorId=
"description"
:fieldDecoratorOptions=
"{rules: [{ required: true, message: '请输入至少五个字符的规则描述!', min: 5 }]}"
>
<a-input
placeholder=
"请输入"
/>
</a-form-item>
</a-form>
</a-modal>
</a-card>
</template>
<
script
>
import
STable
from
'
@/components/table/
'
import
ATextarea
from
"
ant-design-vue/es/input/TextArea
"
import
AInput
from
"
ant-design-vue/es/input/Input
"
import
moment
from
"
moment
"
import
axios
from
'
axios
'
;
import
{
getRoleList
,
getServiceList
}
from
'
@/api/manage
'
export
default
{
name
:
"
TableList
"
,
components
:
{
AInput
,
ATextarea
,
STable
},
data
()
{
return
{
visibleCreateModal
:
false
,
visible
:
false
,
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
12
},
},
form
:
null
,
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
true
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'
规则编号
'
,
dataIndex
:
'
no
'
},
{
title
:
'
描述
'
,
dataIndex
:
'
description
'
},
{
title
:
'
服务调用次数
'
,
dataIndex
:
'
callNo
'
,
sorter
:
true
,
needTotal
:
true
,
customRender
:
(
text
)
=>
text
+
'
次
'
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
needTotal
:
true
},
{
title
:
'
更新时间
'
,
dataIndex
:
'
updatedAt
'
,
sorter
:
true
},
{
table
:
'
操作
'
,
dataIndex
:
'
action
'
,
width
:
'
150px
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
getServiceList
(
Object
.
assign
(
parameter
,
this
.
queryParam
))
.
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
created
()
{
getRoleList
({
t
:
new
Date
()})
},
methods
:
{
handleEdit
(
record
)
{
this
.
mdl
=
Object
.
assign
({},
record
)
console
.
log
(
this
.
mdl
)
this
.
visible
=
true
},
handleOk
()
{
},
//添加逻辑
handleModalVisible
(
isVisible
)
{
this
.
visibleCreateModal
=
isVisible
;
},
handleCreateModalOk
()
{
this
.
createForm
.
validateFields
((
err
,
fieldsValue
)
=>
{
if
(
err
)
{
return
;
}
const
description
=
this
.
createForm
.
getFieldValue
(
'
description
'
);
axios
.
post
(
'
/saveRule
'
,
{
desc
:
description
,
}).
then
((
res
)
=>
{
this
.
createForm
.
resetFields
();
this
.
visibleCreateModal
=
false
;
this
.
loadRuleData
();
});
});
},
handleCreateModalCancel
()
{
this
.
visibleCreateModal
=
false
;
},
onChange
(
row
)
{
this
.
selectedRowKeys
=
row
.
selectedRowKeys
this
.
selectedRows
=
row
.
selectedRows
console
.
log
(
this
.
$refs
.
table
)
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
},
resetSearchForm
()
{
this
.
queryParam
=
{
date
:
moment
(
new
Date
())
}
}
},
watch
:
{
/*
'selectedRows': function (selectedRows) {
this.needTotalList = this.needTotalList.map(item => {
return {
...item,
total: selectedRows.reduce( (sum, val) => {
return sum + val[item.dataIndex]
}, 0)
}
})
}
*/
}
}
</
script
>
\ No newline at end of file
jshERP-web/src/views/list/UserList.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-card
:bordered=
"false"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
>
<a-row
:gutter=
"48"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"角色ID"
>
<a-input
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"状态"
>
<a-select
placeholder=
"请选择"
default-value=
"0"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
>
重置
</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<s-table
size=
"default"
:columns=
"columns"
:data=
"loadData"
>
<div
slot=
"expandedRowRender"
slot-scope=
"record"
style=
"margin: 0"
>
<a-row
:gutter=
"24"
:style=
"
{ marginBottom: '12px' }">
<a-col
:span=
"12"
v-for=
"(role, index) in record.permissions"
:key=
"index"
:style=
"
{ marginBottom: '12px' }">
<a-col
:lg=
"4"
:md=
"24"
>
<span>
{{
role
.
permissionName
}}
:
</span>
</a-col>
<a-col
:lg=
"20"
:md=
"24"
v-if=
"role.actionEntitySet.length > 0"
>
<a-tag
color=
"cyan"
v-for=
"(action, k) in role.actionEntitySet"
:key=
"k"
>
{{
action
.
describe
}}
</a-tag>
</a-col>
<a-col
:span=
"20"
v-else
>
-
</a-col>
</a-col>
</a-row>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"handleEdit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a-dropdown>
<a
class=
"ant-dropdown-link"
>
更多
<a-icon
type=
"down"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
详情
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
禁用
</a>
</a-menu-item>
<a-menu-item>
<a
href=
"javascript:;"
>
删除
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</s-table>
<a-modal
title=
"操作"
style=
"top: 20px;"
:width=
"800"
v-model=
"visible"
@
ok=
"handleOk"
>
<a-form
:autoFormCreate=
"(form)=>
{this.form = form}">
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"唯一识别码"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"唯一识别码"
v-model=
"mdl.id"
id=
"no"
disabled=
"disabled"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"角色名称"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"起一个名字"
v-model=
"mdl.name"
id=
"role_name"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"状态"
hasFeedback
validateStatus=
"warning"
>
<a-select
v-model=
"mdl.status"
>
<a-select-option
value=
"1"
>
正常
</a-select-option>
<a-select-option
value=
"2"
>
禁用
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"描述"
hasFeedback
>
<a-textarea
:rows=
"5"
v-model=
"mdl.describe"
placeholder=
"..."
id=
"describe"
/>
</a-form-item>
<a-divider
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"拥有权限"
hasFeedback
>
<a-row
:gutter=
"16"
v-for=
"(permission, index) in mdl.permissions"
:key=
"index"
>
<a-col
:span=
"4"
>
{{
permission
.
permissionName
}}
:
</a-col>
<a-col
:span=
"20"
>
<a-checkbox-group
:options=
"permission.actionsOptions"
/>
</a-col>
</a-row>
</a-form-item>
</a-form>
</a-modal>
</a-card>
</
template
>
<
script
>
import
STable
from
'
@/components/table/
'
import
{
getRoleList
,
getServiceList
}
from
'
@/api/manage
'
export
default
{
name
:
"
TableList
"
,
components
:
{
STable
},
data
()
{
return
{
description
:
'
列表使用场景:后台管理中的权限管理以及角色管理,可用于基于 RBAC 设计的角色权限控制,颗粒度细到每一个操作类型。
'
,
visible
:
false
,
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
},
form
:
null
,
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'
唯一识别码
'
,
dataIndex
:
'
id
'
},
{
title
:
'
角色名称
'
,
dataIndex
:
'
name
'
,
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
},
{
title
:
'
创建时间
'
,
dataIndex
:
'
createTime
'
,
sorter
:
true
},
{
title
:
'
操作
'
,
width
:
'
150px
'
,
dataIndex
:
'
action
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
getRoleList
(
parameter
)
.
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
created
()
{
getServiceList
().
then
(
res
=>
{
console
.
log
(
'
getServiceList.call()
'
,
res
)
})
getRoleList
().
then
(
res
=>
{
console
.
log
(
'
getRoleList.call()
'
,
res
)
})
},
methods
:
{
handleEdit
(
record
)
{
this
.
mdl
=
Object
.
assign
({},
record
)
this
.
mdl
.
permissions
.
forEach
(
permission
=>
{
permission
.
actionsOptions
=
permission
.
actionEntitySet
.
map
(
action
=>
{
return
{
label
:
action
.
describe
,
value
:
action
.
action
,
defaultCheck
:
action
.
defaultCheck
}
})
})
this
.
visible
=
true
},
handleOk
()
{
},
onChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
},
},
watch
:
{
/*
'selectedRows': function (selectedRows) {
this.needTotalList = this.needTotalList.map(item => {
return {
...item,
total: selectedRows.reduce( (sum, val) => {
return sum + val[item.dataIndex]
}, 0)
}
})
}
*/
}
}
</
script
>
\ No newline at end of file
jshERP-web/src/views/list/modules/RoleModal.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<a-modal
title=
"操作"
:width=
"800"
:visible=
"visible"
:confirmLoading=
"confirmLoading"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"唯一识别码"
hasFeedback
>
<a-input
placeholder=
"唯一识别码"
disabled=
"disabled"
v-decorator=
"[ 'id',
{rules: []} ]" />
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"角色名称"
hasFeedback
>
<a-input
placeholder=
"起一个名字"
v-decorator=
"[ 'name',
{rules: [{ required: true, message: '不起一个名字吗?' }] }]" />
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"状态"
hasFeedback
>
<a-select
v-decorator=
"[ 'status',
{rules: []} ]">
<a-select-option
:value=
"1"
>
正常
</a-select-option>
<a-select-option
:value=
"2"
>
禁用
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"描述"
hasFeedback
>
<a-textarea
:rows=
"5"
placeholder=
"..."
v-decorator=
"[ 'describe',
{ rules: [] } ]" />
</a-form-item>
<a-divider/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"拥有权限"
hasFeedback
>
<a-row
:gutter=
"16"
v-for=
"(permission, index) in permissions"
:key=
"index"
>
<a-col
:span=
"4"
>
{{
permission
.
name
}}
:
</a-col>
<a-col
:span=
"20"
>
<a-checkbox
v-if=
"permission.actionsOptions.length > 0"
:indeterminate=
"permission.indeterminate"
:checked=
"permission.checkedAll"
@
change=
"onChangeCheckAll($event, permission)"
>
全选
</a-checkbox>
<a-checkbox-group
:options=
"permission.actionsOptions"
v-model=
"permission.selected"
@
change=
"onChangeCheck(permission)"
/>
</a-col>
</a-row>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</
template
>
<
script
>
import
{
getPermissions
}
from
'
@/api/manage
'
import
{
actionToObject
}
from
'
@/utils/permissions
'
import
pick
from
'
lodash.pick
'
export
default
{
name
:
"
RoleModal
"
,
data
()
{
return
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
},
visible
:
false
,
confirmLoading
:
false
,
mdl
:
{},
form
:
this
.
$form
.
createForm
(
this
),
permissions
:
[]
}
},
created
()
{
this
.
loadPermissions
()
},
methods
:
{
add
()
{
this
.
edit
({
id
:
0
})
},
edit
(
record
)
{
this
.
mdl
=
Object
.
assign
({},
record
)
this
.
visible
=
true
// 有权限表,处理勾选
if
(
this
.
mdl
.
permissions
&&
this
.
permissions
)
{
// 先处理要勾选的权限结构
const
permissionsAction
=
{}
this
.
mdl
.
permissions
.
forEach
(
permission
=>
{
permissionsAction
[
permission
.
permissionId
]
=
permission
.
actionEntitySet
.
map
(
entity
=>
entity
.
action
)
})
// 把权限表遍历一遍,设定要勾选的权限 action
this
.
permissions
.
forEach
(
permission
=>
{
permission
.
selected
=
permissionsAction
[
permission
.
id
]
})
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
mdl
,
'
id
'
,
'
name
'
,
'
status
'
,
'
describe
'
))
})
console
.
log
(
'
this.mdl
'
,
this
.
mdl
)
},
close
()
{
this
.
$emit
(
'
close
'
)
this
.
visible
=
false
},
handleOk
()
{
const
_this
=
this
// 触发表单验证
this
.
form
.
validateFields
((
err
,
values
)
=>
{
// 验证表单没错误
if
(
!
err
)
{
console
.
log
(
'
form values
'
,
values
)
_this
.
confirmLoading
=
true
// 模拟后端请求 2000 毫秒延迟
new
Promise
((
resolve
)
=>
{
setTimeout
(()
=>
resolve
(),
2000
)
}).
then
(()
=>
{
// Do something
_this
.
$message
.
success
(
'
保存成功
'
)
_this
.
$emit
(
'
ok
'
)
}).
catch
(()
=>
{
// Do something
}).
finally
(()
=>
{
_this
.
confirmLoading
=
false
_this
.
close
()
})
}
})
},
handleCancel
()
{
this
.
close
()
},
onChangeCheck
(
permission
)
{
permission
.
indeterminate
=
!!
permission
.
selected
.
length
&&
(
permission
.
selected
.
length
<
permission
.
actionsOptions
.
length
)
permission
.
checkedAll
=
permission
.
selected
.
length
===
permission
.
actionsOptions
.
length
},
onChangeCheckAll
(
e
,
permission
)
{
Object
.
assign
(
permission
,
{
selected
:
e
.
target
.
checked
?
permission
.
actionsOptions
.
map
(
obj
=>
obj
.
value
)
:
[],
indeterminate
:
false
,
checkedAll
:
e
.
target
.
checked
})
},
loadPermissions
()
{
getPermissions
().
then
(
res
=>
{
let
result
=
res
.
result
this
.
permissions
=
result
.
map
(
permission
=>
{
const
options
=
actionToObject
(
permission
.
actionData
)
permission
.
checkedAll
=
false
permission
.
selected
=
[]
permission
.
indeterminate
=
false
permission
.
actionsOptions
=
options
.
map
(
option
=>
{
return
{
label
:
option
.
describe
,
value
:
option
.
action
}
})
return
permission
})
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
jshERP-web/src/views/list/search/SearchLayout.vue
deleted
100644 → 0
View file @
35482c7b
<
template
>
<div
class=
"search-content"
>
<router-view
/>
</div>
</
template
>
<
script
>
export
default
{
name
:
"
SearchLayout
"
,
data
()
{
return
{
tabs
:
{
items
:
[
{
key
:
'
1
'
,
title
:
'
文章
'
},
{
key
:
'
2
'
,
title
:
'
项目
'
},
{
key
:
'
3
'
,
title
:
'
应用
'
},
],
active
:
()
=>
{
switch
(
this
.
$route
.
path
)
{
case
'
/list/search/article
'
:
return
'
1
'
case
'
/list/search/project
'
:
return
'
2
'
case
'
/list/search/application
'
:
return
'
3
'
default
:
return
'
1
'
}
},
callback
:
(
key
)
=>
{
switch
(
key
)
{
case
'
1
'
:
this
.
$router
.
push
(
'
/list/search/article
'
)
break
case
'
2
'
:
this
.
$router
.
push
(
'
/list/search/project
'
)
break
case
'
3
'
:
this
.
$router
.
push
(
'
/list/search/application
'
)
break
default
:
this
.
$router
.
push
(
'
/workplace
'
)
}
}
},
search
:
true
}
},
computed
:
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.search-head{
background-color: #fff;
margin: -25px -24px -24px;
.search-input{
text-align: center;
margin-bottom: 16px;
}
}
.search-content{
margin-top: 48px;
}
</
style
>
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Supports
Markdown
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