Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopFront
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
newshop
newShopFront
Commits
d01f1100
Commit
d01f1100
authored
Nov 08, 2019
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面新增
parent
fc40ee63
Pipeline
#53
failed with stages
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17968 additions
and
1 deletion
+17968
-1
package-lock.json
package-lock.json
+16757
-0
router.config.js
src/config/router.config.js
+28
-1
Departmentim.vue
src/views/userstaff/Departmentim.vue
+251
-0
Eminforman.vue
src/views/userstaff/Eminforman.vue
+366
-0
Userlist.vue
src/views/userstaff/Userlist.vue
+204
-0
employeeim.vue
src/views/userstaff/employeeim.vue
+362
-0
No files found.
package-lock.json
0 → 100644
View file @
d01f1100
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/config/router.config.js
View file @
d01f1100
...
@@ -11,6 +11,33 @@ export const asyncRouterMap = [
...
@@ -11,6 +11,33 @@ export const asyncRouterMap = [
meta
:
{
title
:
'首页'
},
meta
:
{
title
:
'首页'
},
redirect
:
'/dashboard/workplace'
,
redirect
:
'/dashboard/workplace'
,
children
:
[
children
:
[
{
path
:
'/userstaff'
,
redirect
:
'/userstaff/employeeim'
,
component
:
PageView
,
meta
:
{
title
:
'用户&员工'
,
icon
:
'table'
,
permission
:
[
'table'
]
},
children
:
[
{
path
:
'/userstaff/eminforman'
,
name
:
'Eminforman'
,
component
:
()
=>
import
(
'@/views/userstaff/Eminforman'
),
meta
:
{
title
:
'员工信息管理'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/userstaff/departmentim'
,
name
:
'Departmentim'
,
component
:
()
=>
import
(
'@/views/userstaff/Departmentim'
),
meta
:
{
title
:
'部门信息管理'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/userstaff/userlist'
,
name
:
'Userlist'
,
component
:
()
=>
import
(
'@/views/userstaff/Userlist'
),
meta
:
{
title
:
'用户留言列表'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
}
]
},
// dashboard
// dashboard
{
{
path
:
'/dashboard'
,
path
:
'/dashboard'
,
...
...
src/views/userstaff/Departmentim.vue
0 → 100644
View file @
d01f1100
<
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>
<a-col
:md=
"!advanced && 8 || 24"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
:style=
"advanced &&
{ float: 'right', overflow: 'hidden' } || {} ">
<a-button
type=
"primary"
@
click=
"$refs.table.refresh(true)"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"() => queryParam =
{}">重置
</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=
"$refs.createModal.add()"
>
新建
</a-button>
-->
<a-button
type=
"dashed"
@
click=
"tableOption"
>
{{
optionAlertShow
&&
'关闭'
||
'开启'
}}
alert
</a-button>
<a-dropdown
v-action:edit
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"
rowKey=
"key"
:columns=
"columns"
:data=
"loadData"
:alert=
"options.alert"
:rowSelection=
"options.rowSelection"
showPagination=
"auto"
>
<span
slot=
"serial"
slot-scope=
"text, record, index"
>
{{
index
+
1
}}
</span>
<span
slot=
"status"
slot-scope=
"text"
>
<a-badge
:status=
"text | statusTypeFilter"
:text=
"text | statusFilter"
/>
</span>
<span
slot=
"description"
slot-scope=
"text"
>
<ellipsis
:length=
"4"
tooltip
>
{{
text
}}
</ellipsis>
</span>
<span
slot=
"action"
slot-scope=
"text, record"
>
<template>
<a
@
click=
"handleEdit(record)"
>
配置
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"handleSub(record)"
>
订阅报警
</a>
</
template
>
</span>
</s-table>
<!-- <create-form ref="createModal" @ok="handleOk" />
<step-by-step-modal ref="modal" @ok="handleOk"/> -->
</a-card>
</template>
<
script
>
import
moment
from
'moment'
import
{
STable
,
Ellipsis
}
from
'@/components'
// import StepByStepModal from './modules/StepByStepModal'
// import CreateForm from './modules/CreateForm'
import
{
getRoleList
,
getServiceList
}
from
'@/api/manage'
const
statusMap
=
{
0
:
{
status
:
'default'
,
text
:
'关闭'
},
1
:
{
status
:
'processing'
,
text
:
'运行中'
},
2
:
{
status
:
'success'
,
text
:
'已上线'
},
3
:
{
status
:
'error'
,
text
:
'异常'
}
}
export
default
{
name
:
'TableList'
,
components
:
{
STable
,
Ellipsis
,
// CreateForm,
// StepByStepModal
},
data
()
{
return
{
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'#'
,
scopedSlots
:
{
customRender
:
'serial'
}
},
{
title
:
'部门编号'
,
dataIndex
:
'no'
},
{
title
:
'部门名称'
,
dataIndex
:
'description'
,
scopedSlots
:
{
customRender
:
'description'
}
},
{
title
:
'所属公司'
,
dataIndex
:
'callNo'
,
sorter
:
true
,
needTotal
:
true
,
customRender
:
(
text
)
=>
text
+
' 次'
},
{
title
:
'所属分公司'
,
dataIndex
:
'status'
,
scopedSlots
:
{
customRender
:
'status'
}
},
{
title
:
'更新时间'
,
dataIndex
:
'updatedAt'
,
sorter
:
true
},
// {
// title: '操作',
// dataIndex: 'action',
// width: '150px',
// scopedSlots: { customRender: 'action' }
// }
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
console
.
log
(
'loadData.parameter'
,
parameter
)
return
getServiceList
(
Object
.
assign
(
parameter
,
this
.
queryParam
))
.
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[],
// custom table alert & rowSelection
options
:
{
alert
:
{
show
:
true
,
clear
:
()
=>
{
this
.
selectedRowKeys
=
[]
}
},
rowSelection
:
{
selectedRowKeys
:
this
.
selectedRowKeys
,
onChange
:
this
.
onSelectChange
}
},
optionAlertShow
:
false
}
},
filters
:
{
statusFilter
(
type
)
{
return
statusMap
[
type
].
text
},
statusTypeFilter
(
type
)
{
return
statusMap
[
type
].
status
}
},
created
()
{
this
.
tableOption
()
getRoleList
({
t
:
new
Date
()
})
},
methods
:
{
tableOption
()
{
if
(
!
this
.
optionAlertShow
)
{
this
.
options
=
{
alert
:
{
show
:
true
,
clear
:
()
=>
{
this
.
selectedRowKeys
=
[]
}
},
rowSelection
:
{
selectedRowKeys
:
this
.
selectedRowKeys
,
onChange
:
this
.
onSelectChange
,
getCheckboxProps
:
record
=>
({
props
:
{
disabled
:
record
.
no
===
'No 2'
,
// Column configuration not to be checked
name
:
record
.
no
}
})
}
}
this
.
optionAlertShow
=
true
}
else
{
this
.
options
=
{
alert
:
false
,
rowSelection
:
null
}
this
.
optionAlertShow
=
false
}
},
handleEdit
(
record
)
{
console
.
log
(
record
)
this
.
$refs
.
modal
.
edit
(
record
)
},
handleSub
(
record
)
{
if
(
record
.
status
!==
0
)
{
this
.
$message
.
info
(
`
${
record
.
no
}
订阅成功`
)
}
else
{
this
.
$message
.
error
(
`
${
record
.
no
}
订阅失败,规则已关闭`
)
}
},
// handleOk () {
// console.log(123)
// this.$refs.table.refresh()
// },
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
},
// toggleAdvanced () {
// this.advanced = !this.advanced
// },
resetSearchForm
()
{
this
.
queryParam
=
{
date
:
moment
(
new
Date
())
}
}
}
}
</
script
>
src/views/userstaff/Eminforman.vue
0 → 100644
View file @
d01f1100
<
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.no"
placeholder
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"员工编号"
>
<a-input
v-model=
"queryParam.description"
placeholder
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"电话号码"
>
<a-input
v-model=
"queryParam.callNo"
placeholder
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"所属门店"
>
<a-input
v-model=
"queryParam.status"
placeholder
/>
</a-form-item>
</a-col>
<a-col
:md=
"!advanced && 8 || 24"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
:style=
"advanced &&
{ float: 'right', overflow: 'hidden' } || {} "
>
<a-button
type=
"primary"
@
click=
"getData"
>
查询
</a-button>
<!--
<a-button
type=
"primary"
@
click=
"$refs.table.refresh(true)"
>
查询
</a-button>
-->
<a-button
style=
"margin-left: 8px"
@
click=
"() => queryParam =
{}">重置
</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div
class=
"table-operator"
>
<!--
<a-button
type=
"primary"
icon=
"plus"
@
click=
"$refs.createModal.add()"
>
新建
</a-button>
-->
<a-button
type=
"dashed"
@
click=
"tableOption"
>
{{
optionAlertShow
&&
'关闭'
||
'开启'
}}
alert
</a-button>
<!--
<a-dropdown
v-action:edit
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"
rowKey=
"key"
:columns=
"columns"
:data=
"loadData"
:alert=
"options.alert"
:rowSelection=
"options.rowSelection"
showPagination=
"auto"
>
<span
slot=
"serial"
slot-scope=
"text, record, index"
>
{{
index
+
1
}}
</span>
<span
slot=
"status"
slot-scope=
"text"
>
<a-badge
:status=
"text | statusTypeFilter"
:text=
"text | statusFilter"
/>
</span>
<span
slot=
"description"
slot-scope=
"text"
>
<ellipsis
:length=
"4"
tooltip
>
{{
text
}}
</ellipsis>
</span>
<span
slot=
"action"
slot-scope=
"text, record"
>
<template>
<a
@
click=
"handleEdit(record)"
>
详情
</a>
<!--
<a-divider
type=
"vertical"
/>
-->
<!--
<router-link
to=
"/userstaff/departmentim"
>
<a
type=
"primary"
>
订阅报警
</a>
</router-link>
-->
</
template
>
</span>
</s-table>
<a-modal
title=
"操作"
:width=
"800"
v-model=
"visible"
@
ok=
"handleOk"
>
<a-form
:Form=
"(form)=>{this.form = form}"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"员工姓名"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"员工姓名"
v-model=
"queryParam.no"
id=
"no"
disabled=
"disabled"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"员工编号"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"员工编号"
v-model=
"queryParam.description"
id=
"permission_name"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"电话号码"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"电话号码"
v-model=
"queryParam.callNo"
id=
"permission_name"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"所属部门"
hasFeedback
validateStatus=
"success"
>
<a-input
placeholder=
"所属部门"
v-model=
"queryParam.status"
id=
"permission_name"
/>
</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>
<!-- <create-form ref="createModal" @ok="handleOk" />
<step-by-step-modal ref="modal" @ok="handleOk"/>-->
</a-card>
</template>
<
script
>
// import { getRoleList, addRole, updateRole, deleteRole, editRolePermssion, editRoleDept } from '@/api/role'
import
moment
from
'moment'
import
{
STable
,
Ellipsis
}
from
'@/components'
// import StepByStepModal from './modules/StepByStepModal'
// import CreateForm from './modules/CreateForm'
import
{
getRoleList
,
getServiceList
}
from
'@/api/manage'
const
statusMap
=
{
0
:
{
status
:
'default'
,
text
:
'关闭'
},
1
:
{
status
:
'processing'
,
text
:
'运行中'
},
2
:
{
status
:
'success'
,
text
:
'已上线'
},
3
:
{
status
:
'error'
,
text
:
'异常'
}
}
export
default
{
name
:
'TableList'
,
components
:
{
STable
,
Ellipsis
// CreateForm,
// StepByStepModal
},
data
()
{
return
{
visible
:
false
,
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
}
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
}
},
form
:
null
,
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'#'
,
scopedSlots
:
{
customRender
:
'serial'
}
},
{
title
:
'员工姓名'
,
dataIndex
:
'no'
},
{
title
:
'员工编号'
,
dataIndex
:
'description'
,
scopedSlots
:
{
customRender
:
'description'
}
},
{
title
:
'电话号码'
,
dataIndex
:
'callNo'
,
sorter
:
true
,
needTotal
:
true
,
customRender
:
text
=>
text
+
' 次'
},
{
title
:
'所属门店'
,
dataIndex
:
'status'
,
scopedSlots
:
{
customRender
:
'status'
}
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
'150px'
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
console
.
log
(
'loadData.parameter'
,
parameter
)
return
getRoleList
(
Object
.
assign
(
parameter
,
this
.
queryParam
)).
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[],
// custom table alert & rowSelection
options
:
{
alert
:
{
show
:
true
,
clear
:
()
=>
{
this
.
selectedRowKeys
=
[]
}
},
rowSelection
:
{
selectedRowKeys
:
this
.
selectedRowKeys
,
onChange
:
this
.
onSelectChange
}
},
optionAlertShow
:
false
}
},
filters
:
{
statusFilter
(
type
)
{
return
statusMap
[
type
].
text
},
statusTypeFilter
(
type
)
{
return
statusMap
[
type
].
status
}
},
created
()
{
this
.
tableOption
()
getRoleList
({
t
:
new
Date
()
})
},
methods
:
{
tableOption
()
{
if
(
!
this
.
optionAlertShow
)
{
this
.
options
=
{
alert
:
{
show
:
true
,
clear
:
()
=>
{
this
.
selectedRowKeys
=
[]
}
},
rowSelection
:
{
selectedRowKeys
:
this
.
selectedRowKeys
,
onChange
:
this
.
onSelectChange
,
getCheckboxProps
:
record
=>
({
props
:
{
disabled
:
record
.
no
===
'No 2'
,
// Column configuration not to be checked
name
:
record
.
no
}
})
}
}
this
.
optionAlertShow
=
true
}
else
{
this
.
options
=
{
alert
:
false
,
rowSelection
:
null
}
this
.
optionAlertShow
=
false
}
},
// handleSearch(e) {
// alert(1)
// e.preventDefault()
// this.form.validateFields((err, fieldsValue) => {
// if (err) return
// const values = {
// ...fieldsValue,
// updatedAt: fieldsValue.updatedAt && fieldsValue.updatedAt.valueOf()
// }
// this.formValues = values
// this.$store.dispatch('tableList/getList', { params: values })
// })
// },
getData
()
{
this
.
loading
=
true
getRoleList
(
this
.
params
).
then
(
res
=>
{
this
.
loading
=
false
;
console
.
log
(
res
);
this
.
data
=
res
.
result
.
data
.
map
(
item
=>
{
item
.
checked
=
item
.
state
===
0
// 正常状态state==0转换为开关状态1
return
item
})
})
},
// handleEdit(record) {
// console.log(record)
// this.$refs.modal.edit(record)
// },
handleEdit
(
record
)
{
this
.
queryParam
=
Object
.
assign
({},
record
)
console
.
log
(
this
.
queryParam
)
this
.
visible
=
true
},
handleSub
(
record
)
{
if
(
record
.
status
!==
0
)
{
this
.
$message
.
info
(
`
${
record
.
no
}
订阅成功`
)
}
else
{
this
.
$message
.
error
(
`
${
record
.
no
}
订阅失败,规则已关闭`
)
}
},
handleOk
()
{
this
.
$refs
.
table
.
refresh
()
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
},
// toggleAdvanced() {
// this.advanced = !this.advanced
// },
resetSearchForm
()
{
this
.
queryParam
=
{
date
:
moment
(
new
Date
())
}
}
}
}
</
script
>
src/views/userstaff/Userlist.vue
0 → 100644
View file @
d01f1100
<
template
>
<a-card
:bordered=
"false"
>
<s-table
ref=
"table"
size=
"default"
rowKey=
"key"
:columns=
"columns"
:data=
"loadData"
:rowSelection=
"options.rowSelection"
showPagination=
"auto"
>
<span
slot=
"serial"
slot-scope=
"text, record, index"
>
{{
index
+
1
}}
</span>
<span
slot=
"status"
slot-scope=
"text"
>
<a-badge
:status=
"text | statusTypeFilter"
:text=
"text | statusFilter"
/>
</span>
<span
slot=
"description"
slot-scope=
"text"
>
<ellipsis
:length=
"4"
tooltip
>
{{
text
}}
</ellipsis>
</span>
<!--
<span
slot=
"action"
slot-scope=
"text, record"
>
<template>
<a
@
click=
"handleEdit(record)"
>
配置
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"handleSub(record)"
>
订阅报警
</a>
</
template
>
</span>
-->
</s-table>
<!-- <create-form ref="createModal" @ok="handleOk" />
<step-by-step-modal ref="modal" @ok="handleOk"/> -->
</a-card>
</template>
<
script
>
import
moment
from
'moment'
import
{
STable
,
Ellipsis
}
from
'@/components'
// import StepByStepModal from './modules/StepByStepModal'
// import CreateForm from './modules/CreateForm'
import
{
getRoleList
,
getServiceList
}
from
'@/api/manage'
const
statusMap
=
{
0
:
{
status
:
'default'
,
text
:
'关闭'
},
1
:
{
status
:
'processing'
,
text
:
'运行中'
},
2
:
{
status
:
'success'
,
text
:
'已上线'
},
3
:
{
status
:
'error'
,
text
:
'异常'
}
}
export
default
{
name
:
'TableList'
,
components
:
{
STable
,
Ellipsis
,
// CreateForm,
// StepByStepModal
},
data
()
{
return
{
mdl
:
{},
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'#'
,
scopedSlots
:
{
customRender
:
'serial'
}
},
{
title
:
'用户名'
,
dataIndex
:
'no'
},
{
title
:
'用户电话或工号'
,
dataIndex
:
'description'
,
scopedSlots
:
{
customRender
:
'description'
}
},
{
title
:
'手机号'
,
dataIndex
:
'callNo'
,
sorter
:
true
,
needTotal
:
true
,
customRender
:
(
text
)
=>
text
+
' 次'
},
{
title
:
'留言时间'
,
dataIndex
:
'status'
,
scopedSlots
:
{
customRender
:
'status'
}
},
{
title
:
'留言类型'
,
dataIndex
:
'updatedAt'
,
sorter
:
true
},
{
title
:
'留言内容'
,
dataIndex
:
'action'
,
width
:
'150px'
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
console
.
log
(
'loadData.parameter'
,
parameter
)
return
getServiceList
(
Object
.
assign
(
parameter
,
this
.
queryParam
))
.
then
(
res
=>
{
return
res
.
result
})
},
selectedRowKeys
:
[],
selectedRows
:
[],
// custom table alert & rowSelection
options
:
{
alert
:
{
show
:
true
,
clear
:
()
=>
{
this
.
selectedRowKeys
=
[]
}
},
rowSelection
:
{
selectedRowKeys
:
this
.
selectedRowKeys
,
onChange
:
this
.
onSelectChange
}
},
optionAlertShow
:
false
}
},
filters
:
{
statusFilter
(
type
)
{
return
statusMap
[
type
].
text
},
statusTypeFilter
(
type
)
{
return
statusMap
[
type
].
status
}
},
created
()
{
this
.
tableOption
()
getRoleList
({
t
:
new
Date
()
})
},
methods
:
{
tableOption
()
{
if
(
!
this
.
optionAlertShow
)
{
this
.
options
=
{
alert
:
{
show
:
true
,
clear
:
()
=>
{
this
.
selectedRowKeys
=
[]
}
},
rowSelection
:
{
selectedRowKeys
:
this
.
selectedRowKeys
,
onChange
:
this
.
onSelectChange
,
getCheckboxProps
:
record
=>
({
props
:
{
disabled
:
record
.
no
===
'No 2'
,
// Column configuration not to be checked
name
:
record
.
no
}
})
}
}
this
.
optionAlertShow
=
true
}
else
{
this
.
options
=
{
alert
:
false
,
rowSelection
:
null
}
this
.
optionAlertShow
=
false
}
},
// handleEdit (record) {
// console.log(record)
// this.$refs.modal.edit(record)
// },
handleSub
(
record
)
{
if
(
record
.
status
!==
0
)
{
this
.
$message
.
info
(
`
${
record
.
no
}
订阅成功`
)
}
else
{
this
.
$message
.
error
(
`
${
record
.
no
}
订阅失败,规则已关闭`
)
}
},
handleOk
()
{
this
.
$refs
.
table
.
refresh
()
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
},
resetSearchForm
()
{
this
.
queryParam
=
{
date
:
moment
(
new
Date
())
}
}
}
}
</
script
>
src/views/userstaff/employeeim.vue
0 → 100644
View file @
d01f1100
<
template
>
<page-view
:avatar=
"avatar"
:title=
"false"
>
<div
slot=
"headerContent"
>
<div
class=
"title"
>
{{
timeFix
}}
,
{{
user
.
name
}}
<span
class=
"welcome-text"
>
,
{{
welcome
}}
</span></div>
<div>
前端工程师 | 蚂蚁金服 - 某某某事业群 - VUE平台
</div>
</div>
<div
slot=
"extra"
>
<a-row
class=
"more-info"
>
<a-col
:span=
"8"
>
<head-info
title=
"项目"
content=
"56"
:center=
"false"
:bordered=
"false"
/>
</a-col>
<a-col
:span=
"8"
>
<head-info
title=
"团队排名"
content=
"8/24"
:center=
"false"
:bordered=
"false"
/>
</a-col>
<a-col
:span=
"8"
>
<head-info
title=
"项目数"
content=
"2,223"
:center=
"false"
/>
</a-col>
</a-row>
</div>
<div>
<a-row
:gutter=
"24"
>
<a-col
:xl=
"16"
:lg=
"24"
:md=
"24"
:sm=
"24"
:xs=
"24"
>
<a-card
class=
"project-list"
:loading=
"loading"
style=
"margin-bottom: 24px;"
:bordered=
"false"
title=
"进行中的项目"
:body-style=
"
{ padding: 0 }">
<a
slot=
"extra"
>
全部项目
</a>
<div>
<a-card-grid
class=
"project-card-grid"
:key=
"i"
v-for=
"(item, i) in projects"
>
<a-card
:bordered=
"false"
:body-style=
"
{ padding: 0 }">
<a-card-meta>
<div
slot=
"title"
class=
"card-title"
>
<a-avatar
size=
"small"
:src=
"item.cover"
/>
<a>
{{
item
.
title
}}
</a>
</div>
<div
slot=
"description"
class=
"card-description"
>
{{
item
.
description
}}
</div>
</a-card-meta>
<div
class=
"project-item"
>
<a
href=
"/#/"
>
科学搬砖组
</a>
<span
class=
"datetime"
>
9小时前
</span>
</div>
</a-card>
</a-card-grid>
</div>
</a-card>
<a-card
:loading=
"loading"
title=
"动态"
:bordered=
"false"
>
<a-list>
<a-list-item
:key=
"index"
v-for=
"(item, index) in activities"
>
<a-list-item-meta>
<a-avatar
slot=
"avatar"
:src=
"item.user.avatar"
/>
<div
slot=
"title"
>
<span>
{{
item
.
user
.
nickname
}}
</span>
在
<a
href=
"#"
>
{{
item
.
project
.
name
}}
</a>
<span>
{{
item
.
project
.
action
}}
</span>
<a
href=
"#"
>
{{
item
.
project
.
event
}}
</a>
</div>
<div
slot=
"description"
>
{{
item
.
time
}}
</div>
</a-list-item-meta>
</a-list-item>
</a-list>
</a-card>
</a-col>
<a-col
style=
"padding: 0 12px"
:xl=
"8"
:lg=
"24"
:md=
"24"
:sm=
"24"
:xs=
"24"
>
<a-card
title=
"快速开始 / 便捷导航"
style=
"margin-bottom: 24px"
:bordered=
"false"
:body-style=
"
{padding: 0}">
<div
class=
"item-group"
>
<a>
操作一
</a>
<a>
操作二
</a>
<a>
操作三
</a>
<a>
操作四
</a>
<a>
操作五
</a>
<a>
操作六
</a>
<a-button
size=
"small"
type=
"primary"
ghost
icon=
"plus"
>
添加
</a-button>
</div>
</a-card>
<a-card
title=
"XX 指数"
style=
"margin-bottom: 24px"
:loading=
"radarLoading"
:bordered=
"false"
:body-style=
"
{ padding: 0 }">
<div
style=
"min-height: 400px;"
>
<!-- :scale="scale" :axis1Opts="axis1Opts" :axis2Opts="axis2Opts" -->
<radar
:data=
"radarData"
/>
</div>
</a-card>
<a-card
:loading=
"loading"
title=
"团队"
:bordered=
"false"
>
<div
class=
"members"
>
<a-row>
<a-col
:span=
"12"
v-for=
"(item, index) in teams"
:key=
"index"
>
<a>
<a-avatar
size=
"small"
:src=
"item.avatar"
/>
<span
class=
"member"
>
{{
item
.
name
}}
</span>
</a>
</a-col>
</a-row>
</div>
</a-card>
</a-col>
</a-row>
</div>
</page-view>
</
template
>
<
script
>
import
{
timeFix
}
from
'@/utils/util'
import
{
mapState
}
from
'vuex'
import
{
PageView
}
from
'@/layouts'
import
HeadInfo
from
'@/components/tools/HeadInfo'
import
{
Radar
}
from
'@/components'
import
{
getRoleList
,
getServiceList
}
from
'@/api/manage'
const
DataSet
=
require
(
'@antv/data-set'
)
export
default
{
name
:
'Workplace'
,
components
:
{
PageView
,
HeadInfo
,
Radar
},
data
()
{
return
{
timeFix
:
timeFix
(),
avatar
:
''
,
user
:
{},
projects
:
[],
loading
:
true
,
radarLoading
:
true
,
activities
:
[],
teams
:
[],
// data
axis1Opts
:
{
dataKey
:
'item'
,
line
:
null
,
tickLine
:
null
,
grid
:
{
lineStyle
:
{
lineDash
:
null
},
hideFirstLine
:
false
}
},
axis2Opts
:
{
dataKey
:
'score'
,
line
:
null
,
tickLine
:
null
,
grid
:
{
type
:
'polygon'
,
lineStyle
:
{
lineDash
:
null
}
}
},
scale
:
[{
dataKey
:
'score'
,
min
:
0
,
max
:
80
}],
axisData
:
[
{
item
:
'引用'
,
a
:
70
,
b
:
30
,
c
:
40
},
{
item
:
'口碑'
,
a
:
60
,
b
:
70
,
c
:
40
},
{
item
:
'产量'
,
a
:
50
,
b
:
60
,
c
:
40
},
{
item
:
'贡献'
,
a
:
40
,
b
:
50
,
c
:
40
},
{
item
:
'热度'
,
a
:
60
,
b
:
70
,
c
:
40
},
{
item
:
'引用'
,
a
:
70
,
b
:
50
,
c
:
40
}
],
radarData
:
[]
}
},
computed
:
{
...
mapState
({
nickname
:
(
state
)
=>
state
.
user
.
nickname
,
welcome
:
(
state
)
=>
state
.
user
.
welcome
}),
userInfo
()
{
return
this
.
$store
.
getters
.
userInfo
}
},
created
()
{
this
.
user
=
this
.
userInfo
this
.
avatar
=
this
.
userInfo
.
avatar
getRoleList
().
then
(
res
=>
{
// console.log('workplace -> call getRoleList()', res)
})
getServiceList
().
then
(
res
=>
{
// console.log('workplace -> call getServiceList()', res)
})
},
mounted
()
{
this
.
getProjects
()
this
.
getActivity
()
this
.
getTeams
()
this
.
initRadar
()
},
methods
:
{
getProjects
()
{
this
.
$http
.
get
(
'/list/search/projects'
)
.
then
(
res
=>
{
this
.
projects
=
res
.
result
&&
res
.
result
.
data
this
.
loading
=
false
})
},
getActivity
()
{
this
.
$http
.
get
(
'/workplace/activity'
)
.
then
(
res
=>
{
this
.
activities
=
res
.
result
})
},
getTeams
()
{
this
.
$http
.
get
(
'/workplace/teams'
)
.
then
(
res
=>
{
this
.
teams
=
res
.
result
})
},
initRadar
()
{
this
.
radarLoading
=
true
this
.
$http
.
get
(
'/workplace/radar'
)
.
then
(
res
=>
{
const
dv
=
new
DataSet
.
View
().
source
(
res
.
result
)
dv
.
transform
({
type
:
'fold'
,
fields
:
[
'个人'
,
'团队'
,
'部门'
],
key
:
'user'
,
value
:
'score'
})
this
.
radarData
=
dv
.
rows
this
.
radarLoading
=
false
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.project-list {
.card-title {
font-size: 0;
a {
color: rgba(0, 0, 0, 0.85);
margin-left: 12px;
line-height: 24px;
height: 24px;
display: inline-block;
vertical-align: top;
font-size: 14px;
&:hover {
color: #1890ff;
}
}
}
.card-description {
color: rgba(0, 0, 0, 0.45);
height: 44px;
line-height: 22px;
overflow: hidden;
}
.project-item {
display: flex;
margin-top: 8px;
overflow: hidden;
font-size: 12px;
height: 20px;
line-height: 20px;
a {
color: rgba(0, 0, 0, 0.45);
display: inline-block;
flex: 1 1 0;
&:hover {
color: #1890ff;
}
}
.datetime {
color: rgba(0, 0, 0, 0.25);
flex: 0 0 auto;
float: right;
}
}
.ant-card-meta-description {
color: rgba(0, 0, 0, 0.45);
height: 44px;
line-height: 22px;
overflow: hidden;
}
}
.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%;
}
}
.members {
a {
display: block;
margin: 12px 0;
line-height: 24px;
height: 24px;
.member {
font-size: 14px;
color: rgba(0, 0, 0, .65);
line-height: 24px;
max-width: 100px;
vertical-align: top;
margin-left: 12px;
transition: all 0.3s;
display: inline-block;
}
&:hover {
span {
color: #1890ff;
}
}
}
}
.mobile {
.project-list {
.project-card-grid {
width: 100%;
}
}
.more-info {
border: 0;
padding-top: 16px;
margin: 16px 0 16px;
}
.headerContent .title .welcome-text {
display: none;
}
}
</
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