Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
9db04671
Commit
9db04671
authored
Dec 31, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
a23fbae5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1168 additions
and
811 deletions
+1168
-811
quasar.conf.js
quasar.conf.js
+2
-2
courseprice-form.vue
src/components/course/courseprice-form.vue
+11
-11
manager-form.vue
src/components/school/manager/manager-form.vue
+670
-404
MainLayout.vue
src/layouts/MainLayout.vue
+485
-394
tenccc.ts
src/utils/tenccc.ts
+0
-0
No files found.
quasar.conf.js
View file @
9db04671
...
...
@@ -47,9 +47,9 @@ module.exports = function (ctx) {
vueRouterMode
:
'hash'
,
// available values: 'hash', 'history'
env
:
ctx
.
dev
?
{
// API: 'https
://localhost:5001/api',
API
:
'http
://localhost:5001/api'
,
// API: 'http://192.168.20.24:8300/api',
API
:
'http://192.168.10.46:8300/api'
,
//
API: 'http://192.168.10.46:8300/api',
// API: 'http://192.168.20.17:8017/api',
...
...
src/components/course/courseprice-form.vue
View file @
9db04671
...
...
@@ -331,34 +331,34 @@
B2CRatio
:
0
,
//直客首次报名优惠比例
B2CReNewRatio
:
0
,
//直客续费优惠比例
B2BRebateRatio
:
0
,
//一般同行首次报名返佣比例
B2BRebateRatioType
:
1
,
B2BRebateRatioType
:
3
,
B2BRebateRatioValue
:
''
,
B2BReNewRatio
:
0
,
//一般同行续费返佣比例
B2BReNewRatioType
:
1
,
B2BReNewRatioType
:
3
,
B2BReNewRatioValue
:
''
,
SchoolRebateRatio
:
0
,
//校代同行首次返佣比例
SchoolRebateRatioType
:
1
,
SchoolRebateRatioType
:
3
,
SchoolRebateRatioValue
:
''
,
SchoolReNewRatio
:
0
,
//校代同行续费返佣比例
SchoolReNewRatioType
:
1
,
SchoolReNewRatioType
:
3
,
SchoolReNewRatioValue
:
''
,
TransIntroductceRatio
:
0
,
//转介首次报名返佣比例
TransIntroductceRatioType
:
1
,
TransIntroductceRatioType
:
3
,
TransIntroductceRatioValue
:
''
,
TransIntroductceReNewRatio
:
0
,
//转介续费返佣比例
TransIntroductceReNewRatioType
:
1
,
TransIntroductceReNewRatioType
:
3
,
TransIntroductceReNewRatioValue
:
''
,
InnerRecommendRatio
:
0
,
//內推首次报名返佣比例
InnerRecommendRatioType
:
1
,
InnerRecommendRatioType
:
3
,
InnerRecommendRatioValue
:
''
,
InnerRecommendReNewRatio
:
0
,
//內推续费返佣比例
InnerRecommendReNewRatioType
:
1
,
InnerRecommendReNewRatioType
:
3
,
InnerRecommendReNewRatioValue
:
''
,
B2CRbRatio
:
0
,
//直客首次报名返佣比例
B2CRbRatioType
:
1
,
//直客首次报名返佣类型
B2CRbRatioType
:
3
,
//直客首次报名返佣类型
B2CRbRatioValue
:
""
,
// 直客首次报名返佣类型值
B2CRNRatio
:
0
,
//直客续费返佣比例
B2CRNRatioType
:
1
,
//直客续费返佣类型
B2CRNRatioType
:
3
,
//直客续费返佣类型
B2CRNRatioValue
:
""
,
//直客续费返佣类型值
},
priceList
:
[]
//价格列表
...
...
@@ -379,7 +379,7 @@
getFanyong
(){
GetCourseRebateSetList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
){
this
.
CourseRebateList
=
res
.
Data
;
this
.
CourseRebateList
=
res
.
Data
.
filter
(
x
=>
x
.
Id
==
3
)
;
}
});
},
...
...
src/components/school/manager/manager-form.vue
View file @
9db04671
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
AccountId
==
0
?
'新增员工信息'
:
'修改员工信息'
}}
</div>
<div
class=
"text-h6"
>
{{
objOption
.
AccountId
==
0
?
"新增员工信息"
:
"修改员工信息"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-md q-px-xs text-grey-6"
>
基本资料
</div>
<div
class=
"row wrap"
>
<q-select
filled
v-if=
"isEditShow"
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
@
input=
"schoolChagne"
/>
<selectTree
:treeData=
'DeptList'
v-if=
"isEditShow"
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
classStr=
"col-6 q-pr-lg q-pb-lg"
></selectTree>
<q-select
filled
stack-label
v-if=
"isEditShow"
option-value=
"PostId"
option-label=
"PostName"
v-model=
"objOption.Post_Id"
ref=
"Post_Id"
:options=
"PostList"
label=
"岗位"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.EmployeeName"
ref=
"EmployeeName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"员工姓名"
:rules=
"[val => !!val || '请填写员工姓名']"
/>
<q-select
filled
v-if=
"isEditShow"
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
@
input=
"schoolChagne"
/>
<selectTree
:treeData=
"DeptList"
v-if=
"isEditShow"
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
classStr=
"col-6 q-pr-lg q-pb-lg"
></selectTree>
<q-select
filled
stack-label
v-if=
"isEditShow"
option-value=
"PostId"
option-label=
"PostName"
v-model=
"objOption.Post_Id"
ref=
"Post_Id"
:options=
"PostList"
label=
"岗位"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.EmployeeName"
ref=
"EmployeeName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"员工姓名"
:rules=
"[val => !!val || '请填写员工姓名']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.IDCard"
ref=
"IDCard"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"身份证号码"
:rules=
"[val => !!val || '请填写身份证号码']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.IDCard"
ref=
"IDCard"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"身份证号码"
:rules=
"[val => !!val || '请填写身份证号码']"
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
ref=
"ID"
v-model=
"objOption.Sex"
:options=
"SexList"
label=
"性别"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
ref=
"ID"
v-model=
"objOption.Sex"
:options=
"SexList"
label=
"性别"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.Education"
ref=
"Education"
:options=
"EducationList"
label=
"学历"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
type=
"tel"
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.EmployeeTel"
ref=
"EmployeeTel"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
/>
<q-input
filled
v-model=
"objOption.EntryTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"入职时间"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.Education"
ref=
"Education"
:options=
"EducationList"
label=
"学历"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
type=
"tel"
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.EmployeeTel"
ref=
"EmployeeTel"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
/>
<q-input
filled
v-model=
"objOption.EntryTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"入职时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.EntryTime"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.EntryTime"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-input
filled
v-model=
"objOption.BirthDate"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"生日"
>
<q-input
filled
v-model=
"objOption.BirthDate"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"生日"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy3"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.BirthDate"
@
input=
"() => $refs.qDateProxy3.hide()"
/>
<q-popup-proxy
ref=
"qDateProxy3"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.BirthDate"
@
input=
"() => $refs.qDateProxy3.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.Address"
ref=
"Address"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"地址"
/>
<q-input
filled
stack-label
maxlength=
"60"
:dense=
"false"
v-model=
"objOption.Email"
ref=
"Email"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"邮箱"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Account"
ref=
"Account"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"账号"
:rules=
"[val => !!val || '账号']"
/>
<q-input
v-if=
"objOption.AccountId==0"
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Password"
ref=
"Password"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"密码"
:rules=
"[val => !!val || '密码']"
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.LeaveStatus"
@
input=
'getLeave'
ref=
"Education"
:options=
"LeaveStatusList"
label=
"在职状态"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
v-show=
"objOption.AccountId>0 && objOption.LeaveStatus==4"
filled
v-model=
"objOption.LeaveTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"离职时间"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.Address"
ref=
"Address"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"地址"
/>
<q-input
filled
stack-label
maxlength=
"60"
:dense=
"false"
v-model=
"objOption.Email"
ref=
"Email"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"邮箱"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Account"
ref=
"Account"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"账号"
:rules=
"[val => !!val || '账号']"
/>
<q-input
v-if=
"objOption.AccountId == 0"
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Password"
ref=
"Password"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"密码"
:rules=
"[val => !!val || '密码']"
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.LeaveStatus"
@
input=
"getLeave"
ref=
"Education"
:options=
"LeaveStatusList"
label=
"在职状态"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
v-show=
"objOption.AccountId > 0 && objOption.LeaveStatus == 4"
filled
v-model=
"objOption.LeaveTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"离职时间"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy2"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.LeaveTime"
@
input=
"() => $refs.qDateProxy2.hide()"
/>
<q-popup-proxy
ref=
"qDateProxy2"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.LeaveTime"
@
input=
"() => $refs.qDateProxy2.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-select
filled
stack-label
:disable=
"objOption.AccountId==0?false:true"
option-value=
"Id"
option-label=
"Value"
ref=
"ID"
v-model=
"objOption.AccountType"
:options=
"AccountTypeList"
label=
"用户类型"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
ref=
"ID"
v-model=
"objOption.DirectSupervisor"
:options=
"EmployeeList"
label=
"直属上级"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
ref=
"UserRole"
clearable
v-model=
"objOption.UserRole"
:options=
"roleList"
label=
"用户角色"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
:disable=
"objOption.AccountId == 0 ? false : true"
option-value=
"Id"
option-label=
"Value"
ref=
"ID"
v-model=
"objOption.AccountType"
:options=
"AccountTypeList"
label=
"用户类型"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"EmployeeName"
ref=
"ID"
v-model=
"objOption.DirectSupervisor"
:options=
"EmployeeList"
label=
"直属上级"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
ref=
"UserRole"
clearable
v-model=
"objOption.UserRole"
:options=
"roleList"
label=
"用户角色"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<div
class=
"col-6 q-pb-lg"
>
<q-toggle
label=
"人工客服"
v-model=
"objOption.IsTenCccUser"
:true-value=
"1"
:false-value=
"0"
></q-toggle>
</div>
<div
class=
"col-6 q-pb-lg"
style=
"margin-top:20px;"
>
<q-uploader
style=
"display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat"
:style=
"{'background-image':'url(' + objOption.UserIcon + ')'}"
max-files=
"1"
hide-upload-btn
@
rejected=
"onRejected"
label=
"头像"
accept=
".jpg, image/*"
auto-upload
:factory=
"uploadFile"
no-thumbnails
>
<q-uploader
style=
"display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat"
:style=
"{ 'background-image': 'url(' + objOption.UserIcon + ')' }"
max-files=
"1"
hide-upload-btn
@
rejected=
"onRejected"
label=
"头像"
accept=
".jpg, image/*"
auto-upload
:factory=
"uploadFile"
no-thumbnails
>
</q-uploader>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent"
class=
"q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"setStudent"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent"
class=
"q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"setStudent"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
import
{
getSchoolDropdown
,
saveManager
,
queryEmployeeInfo
,
getEducation
,
GetLeaveStatus
,
getUserLeaveOrderCommission
}
from
'../../../api/school/index'
//部门
import
{
getDeptTree
}
from
'../../../api/system/dept'
//岗位
import
{
queryDeptPostList
}
from
'../../../api/system/post'
import
{
UploadSelfFile
,
}
from
'../../../api/common/common'
import
selectTree
from
'../../common/select-tree'
import
{
}
from
"../../../api/school/index"
;
//部门
import
{
getDeptTree
}
from
"../../../api/system/dept"
;
//岗位
import
{
queryDeptPostList
}
from
"../../../api/system/post"
;
import
{
UploadSelfFile
}
from
"../../../api/common/common"
;
import
selectTree
from
"../../common/select-tree"
;
import
{
queryEmployee
,
//员工列表
GetUserRoleList
}
from
'../../../api/users/user'
export
default
{
}
from
"../../../api/users/user"
;
export
default
{
components
:
{},
props
:
{
saveObj
:
{
...
...
@@ -139,25 +373,26 @@
Id
:
0
,
//管理者编号
School_Id
:
0
,
//学校编号
EmployeeName
:
""
,
//管理者姓名
EmployeeTel
:
''
,
//管理者电话
UserIcon
:
''
,
//头像
EmployeeTel
:
""
,
//管理者电话
UserIcon
:
""
,
//头像
Dept_Id
:
0
,
//部门编号
Post_Id
:
0
,
//岗位编号
IDCard
:
''
,
//身份证
IDCard
:
""
,
//身份证
Sex
:
0
,
//性别(0-男,1-女)
Education
:
0
,
//学历
EntryTime
:
''
,
//入职时间
LeaveTime
:
''
,
//离职时间
BirthDate
:
''
,
//生日、
Address
:
''
,
//地址
EntryTime
:
""
,
//入职时间
LeaveTime
:
""
,
//离职时间
BirthDate
:
""
,
//生日、
Address
:
""
,
//地址
LeaveStatus
:
0
,
//在职状态
Account
:
''
,
//账号
Password
:
''
,
//密码
Account
:
""
,
//账号
Password
:
""
,
//密码
AccountType
:
1
,
// 是否是老师
AccountId
:
0
,
//账号对应的表主键编号
Email
:
""
,
//邮箱
DirectSupervisor
:
0
,
//直属上级
UserRole
:
''
//用户角色(1-市场人员,2-课程顾问)
UserRole
:
""
,
//用户角色(1-市场人员,2-课程顾问)
IsTenCccUser
:
0
//电话客服
},
optionTitle
:
""
,
schoolList
:
[],
...
...
@@ -165,19 +400,24 @@
DeptList
:
[],
//部门列表
PostList
:
[],
//岗位列表
returnString
:
[],
//默认岗位
SexList
:
[{
//性别
SexList
:
[
{
//性别
Id
:
0
,
Name
:
'男'
},
{
Name
:
"男"
},
{
Id
:
1
,
Name
:
'女'
}],
roleList
:[],
Name
:
"女"
}
],
roleList
:
[],
EducationList
:
[],
//学历数组
LeaveStatusList
:
[],
//在职状态
isEditShow
:
false
,
//是否显示修改应该隐藏
//账号类型
AccountTypeList
:
[{
AccountTypeList
:
[
{
Id
:
1
,
Value
:
"后台用户"
},
...
...
@@ -188,11 +428,11 @@
{
Id
:
3
,
Value
:
"助教"
},
}
],
EmployeeList
:
[],
//员工列表
errdata
:
''
,
//提示语言
}
errdata
:
""
//提示语言
};
},
created
()
{
this
.
queryDeptTree
(
0
);
...
...
@@ -207,29 +447,29 @@
this
.
initObj
();
},
methods
:
{
getRoleList
()
{
getRoleList
()
{
GetUserRoleList
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
roleList
=
res
.
Data
;
}
})
});
},
Employee
()
{
var
qMsg
=
{
EmployeeName
:
''
}
queryEmployee
(
qMsg
).
then
(
res
=>
{
EmployeeName
:
""
};
queryEmployee
(
qMsg
)
.
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
EmployeeList
=
res
.
Data
;
var
obj
=
{
EmployeeName
:
'请选择'
,
EmployeeName
:
"请选择"
,
Id
:
0
}
}
;
this
.
EmployeeList
.
unshift
(
obj
);
}
}).
catch
(()
=>
{
})
.
catch
(()
=>
{});
},
//学校改变
schoolChagne
()
{
...
...
@@ -247,7 +487,7 @@
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
if
(
deptArray
&&
deptArray
!=
""
)
{
tempStr
=
deptArray
;
}
this
.
objOption
.
Dept_Id
=
tempStr
;
...
...
@@ -266,19 +506,19 @@
var
msg
=
{
School_Id
:
0
};
if
(
this
.
objOption
.
School_Id
&&
this
.
objOption
.
School_Id
!=
''
)
{
if
(
this
.
objOption
.
School_Id
&&
this
.
objOption
.
School_Id
!=
""
)
{
msg
.
School_Id
=
this
.
objOption
.
School_Id
;
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
});
},
//获取岗位列表
queryPostList
()
{
var
postMsg
=
{
QDeptIds
:
""
,
QDeptIds
:
""
};
if
(
this
.
objOption
.
Dept_Id
)
{
postMsg
.
QDeptIds
=
this
.
objOption
.
Dept_Id
;
...
...
@@ -288,27 +528,30 @@
this
.
PostList
=
res
.
Data
;
this
.
$forceUpdate
();
}
})
});
},
GetUserLeave
(
UserId
){
getUserLeaveOrderCommission
({
UserId
:
UserId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
this
.
errdata
=
''
GetUserLeave
(
UserId
)
{
getUserLeaveOrderCommission
({
UserId
:
UserId
})
.
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
errdata
=
""
;
}
}).
catch
(
err
=>
{
if
(
err
.
Code
==
0
){
///返回来是0 的时候保存提示语言
})
.
catch
(
err
=>
{
if
(
err
.
Code
==
0
)
{
///返回来是0 的时候保存提示语言
this
.
errdata
=
err
.
Message
;
}
})
})
;
},
getLeave
(
val
)
{
if
(
val
==
4
)
{
this
.
GetUserLeave
(
this
.
saveObj
.
EmAccountId
)
getLeave
(
val
)
{
if
(
val
==
4
)
{
this
.
GetUserLeave
(
this
.
saveObj
.
EmAccountId
);
}
},
initObj
()
{
if
(
this
.
saveObj
)
{
this
.
optionTitle
=
"修改员工信息"
this
.
optionTitle
=
"修改员工信息"
;
this
.
isEditShow
=
false
;
//是否显示修改隐藏项
queryEmployeeInfo
({
Id
:
this
.
saveObj
.
Id
,
...
...
@@ -336,6 +579,7 @@
this
.
objOption
.
Email
=
res
.
Data
.
Email
;
this
.
objOption
.
DirectSupervisor
=
res
.
Data
.
DirectSupervisor
;
this
.
objOption
.
UserRole
=
res
.
Data
.
UserRole
;
this
.
objOption
.
IsTenCccUser
=
res
.
Data
.
IsTenCccUser
;
if
(
this
.
objOption
.
School_Id
)
{
this
.
queryDeptTree
();
}
...
...
@@ -344,7 +588,7 @@
this
.
returnString
.
push
(
this
.
objOption
.
Dept_Id
.
toString
());
}
this
.
$forceUpdate
();
})
});
}
else
{
this
.
optionTitle
=
"新增员工"
;
this
.
isEditShow
=
true
;
...
...
@@ -354,107 +598,133 @@
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SName
:
"全部"
,
SId
:
0
}
};
this
.
schoolList
.
unshift
(
obj
);
this
.
$forceUpdate
();
})
});
},
onRejected
(
rejectedEntries
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`文件验证失败,请重新上传`
})
});
},
uploadFile
(
files
)
{
UploadSelfFile
(
'studentIcon'
,
files
[
0
],
res
=>
{
UploadSelfFile
(
"studentIcon"
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
objOption
.
UserIcon
=
res
.
FileUrl
;
}
})
});
},
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
this
.
$emit
(
"close"
);
this
.
persistent
=
false
;
},
setStudent
()
{
if
(
this
.
objOption
.
AccountId
==
0
)
{
if
(
this
.
objOption
.
Dept_Id
==
''
)
{
if
(
this
.
objOption
.
Dept_Id
==
""
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择部门`
})
});
return
;
}
if
(
this
.
objOption
.
Post_Id
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`请选择岗位`
})
});
return
;
}
if
(
this
.
objOption
.
Password
==
''
)
{
if
(
this
.
objOption
.
Password
==
""
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`请填写密码`
})
});
return
;
}
}
if
(
this
.
objOption
.
EmployeeName
==
''
)
{
if
(
this
.
objOption
.
EmployeeName
==
""
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`请填写员工姓名`
})
});
return
;
}
if
(
this
.
objOption
.
Account
==
''
)
{
if
(
this
.
objOption
.
Account
==
""
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`请填写账号`
})
});
return
;
}
if
(
this
.
objOption
.
IsTenCccUser
==
1
)
{
if
(
this
.
objOption
.
Email
==
""
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`电话客服必须填入正确的邮箱,否则无法保存`
});
return
;
}
if
(
this
.
objOption
.
EmployeeTel
==
""
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
position
:
"top"
,
message
:
`电话客服必须填入正确的使用电话,否则会造成无法正常使用`
});
return
;
}
if
(
this
.
saveObj
&&
this
.
saveObj
.
PropertyNumber
&&
this
.
saveObj
.
PropertyNumber
>
0
&&
this
.
objOption
.
LeaveStatus
===
4
)
{
}
if
(
this
.
saveObj
&&
this
.
saveObj
.
PropertyNumber
&&
this
.
saveObj
.
PropertyNumber
>
0
&&
this
.
objOption
.
LeaveStatus
===
4
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
`有正在使用的资产,不能设置离职`
})
});
return
;
}
if
(
this
.
objOption
.
LeaveStatus
==
4
&&
this
.
errdata
!=
''
){
//选择离职的时候看接口返回是否可以离职
if
(
this
.
objOption
.
LeaveStatus
==
4
&&
this
.
errdata
!=
""
)
{
//选择离职的时候看接口返回是否可以离职
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
"negative"
,
position
:
"top"
,
message
:
this
.
errdata
,
})
return
message
:
this
.
errdata
});
return
;
}
this
.
saveLoading
=
true
;
saveManager
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
saveManager
(
this
.
objOption
)
.
then
(
res
=>
{
this
.
saveLoading
=
false
;
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
message
:
"数据保存成功!"
,
position
:
"top"
});
this
.
$emit
(
"success"
);
this
.
closeSaveForm
();
})
.
catch
(()
=>
{
this
.
saveLoading
=
false
;
});
},
//获取学历数据
getEducationList
()
{
...
...
@@ -462,7 +732,7 @@
if
(
res
.
Code
==
1
)
{
this
.
EducationList
=
res
.
Data
;
}
})
});
},
//获取在职状态
getLeaveState
()
{
...
...
@@ -470,23 +740,19 @@
if
(
res
.
Code
==
1
)
{
this
.
LeaveStatusList
=
res
.
Data
;
}
})
});
}
},
watch
:
{
}
}
watch
:
{}
};
</
script
>
<
style
>
.upload-assiatant-box
.q-uploader__list
{
.upload-assiatant-box
.q-uploader__list
{
display
:
none
;
}
}
.upload-assiatant-box
.q-uploader
{
.upload-assiatant-box
.q-uploader
{
width
:
auto
;
}
}
</
style
>
src/layouts/MainLayout.vue
View file @
9db04671
...
...
@@ -3,31 +3,69 @@
<q-header
bordered
reveal
height-hint=
"98"
class=
"head-bg text-dark"
>
<q-toolbar
style=
"height:60px;"
class=
"q-pr-lg q-pl-lg"
>
<q-avatar
style=
"width:38px"
square
>
<img
:src=
"logo"
>
<img
:src=
"logo"
/
>
</q-avatar>
<q-toolbar-title
style=
"font-family:perfectFont;margin-right:50px"
>
{{
name
}}
{{
name
}}
</q-toolbar-title>
<q-tabs
v-model=
"tab"
@
input=
"changeNavs"
inline-label
style=
"margin:0 auto;height:60px;flex:1;justify-content: left;font-weight:bold;"
shrink
stretch
v-if=
"userInfo"
active-color=
"primary"
>
<q-tab
v-for=
"(x, i) in userInfo.MenuList"
class=
"q-mr-md"
:key=
"i"
@
click=
"setNavs(i)"
:name=
"`navs_$
{i}`"
:label="x.MenuName" :icon="x.MenuIcon" />
<q-tabs
v-model=
"tab"
@
input=
"changeNavs"
inline-label
style=
"margin:0 auto;height:60px;flex:1;justify-content: left;font-weight:bold;"
shrink
stretch
v-if=
"userInfo"
active-color=
"primary"
>
<q-tab
v-for=
"(x, i) in userInfo.MenuList"
class=
"q-mr-md"
:key=
"i"
@
click=
"setNavs(i)"
:name=
"`navs_$
{i}`"
:label="x.MenuName"
:icon="x.MenuIcon"
/>
</q-tabs>
<div
class=
"q-pl-lg flex items-center"
>
<div
class=
"wave_wrapper"
@
click=
"showNotify"
>
<!--
<span
class=
"dona wave_scale"
>
</span>
-->
<span
:class=
"
{'dona':socektArr.length>0,'wave_scale':socektArr.length>0}">
<span
:class=
"
{
dona: socektArr.length > 0,
wave_scale: socektArr.length > 0
}"
>
</span>
<inline-svg
class=
"svg-icon svg-icon-primary"
src=
"icons/svg/Code/Compiling.svg"
></inline-svg>
<inline-svg
class=
"svg-icon svg-icon-primary"
src=
"icons/svg/Code/Compiling.svg"
></inline-svg>
</div>
<q-btn
flat
color=
"text-black"
style=
"height:50px"
@
click=
"showInfo"
>
<span
class=
"text-grey q-mr-xs"
>
Hi
</span>
<span
class=
"text-dark q-mr-md"
>
{{
(
userInfo
&&
userInfo
.
AccountName
?
userInfo
.
AccountName
:
""
)
}}
</span>
<q-avatar
size=
"35px"
rounded
style=
"background:#C9F7F5"
text-color=
"white"
>
<img
:src=
"userInfo.UserIcon"
v-if=
"userInfo&&userInfo.UserIcon"
>
<span
v-else
>
{{
(
userInfo
&&
userInfo
.
AccountName
?
userInfo
.
AccountName
.
substring
(
0
,
1
):
""
)
}}
</span>
<span
class=
"text-dark q-mr-md"
>
{{
userInfo
&&
userInfo
.
AccountName
?
userInfo
.
AccountName
:
""
}}
</span>
<q-avatar
size=
"35px"
rounded
style=
"background:#C9F7F5"
text-color=
"white"
>
<img
:src=
"userInfo.UserIcon"
v-if=
"userInfo && userInfo.UserIcon"
/>
<span
v-else
>
{{
userInfo
&&
userInfo
.
AccountName
?
userInfo
.
AccountName
.
substring
(
0
,
1
)
:
""
}}
</span>
</q-avatar>
</q-btn>
</div>
...
...
@@ -35,32 +73,58 @@
</q-header>
<q-page-container
class=
"window-height"
>
<div
class=
"row items-stretch full-height"
>
<div
style=
"box-shadow: 2px 0 10px 0 rgba(237,238,240,0.50);background-color:#f5f6f7"
class=
"text-subtitle2 second-menu-bg"
:style=
"
{'width':IsShowLeft?'0':'180px'}"
v-if="secondNavs
&&
secondNavs.length>0">
<div
style=
"box-shadow: 2px 0 10px 0 rgba(237,238,240,0.50);background-color:#f5f6f7"
class=
"text-subtitle2 second-menu-bg"
:style=
"
{ width: IsShowLeft ? '0' : '180px' }"
v-if="secondNavs
&&
secondNavs.length > 0"
>
<div
class=
"full-width left-menu-box q-pt-md"
>
<div
class=
"is-show-menu-2"
@
click=
"changeLeft"
>
<!--
<a
v-if=
"!IsShowLeft"
title=
"收起"
><<</a>
-->
<i
v-if=
"!IsShowLeft"
class=
"iconfont icon-shouqi"
title=
"收起"
></i>
<i
v-else
class=
"iconfont icon-zhankai is_Show_menu_3"
title=
"展开"
></i>
<i
v-if=
"!IsShowLeft"
class=
"iconfont icon-shouqi"
title=
"收起"
></i>
<i
v-else
class=
"iconfont icon-zhankai is_Show_menu_3"
title=
"展开"
></i>
<!--
<a
v-else
class=
"is_Show_menu_3"
title=
"展开"
>
>>
</a>
-->
</div>
<q-list
style=
"width:180px;overflow:hidden"
>
<template
v-for=
"(x,i) in secondNavs"
>
<q-item
:to=
"x.MenuUrl"
clickable
v-ripple
:active=
"currentPath==x.MenuUrl"
v-if=
"x.SubList&&x.SubList.length==0"
:key=
"i"
>
<template
v-for=
"(x, i) in secondNavs"
>
<q-item
:to=
"x.MenuUrl"
clickable
v-ripple
:active=
"currentPath == x.MenuUrl"
v-if=
"x.SubList && x.SubList.length == 0"
:key=
"i"
>
<q-item-section
avatar
style=
"min-width:30px;"
>
<q-icon
:name=
"x.MenuIcon"
size=
"20px"
/>
</q-item-section>
<q-item-section>
{{
x
.
MenuName
}}
</q-item-section>
<q-item-section>
{{
x
.
MenuName
}}
</q-item-section>
</q-item>
<q-expansion-item
v-else
:label=
"x.MenuName"
>
<q-item
:to=
"y.MenuUrl"
clickable
v-ripple
:active=
"currentPath==y.MenuUrl"
v-for=
"(y, yi) in x.SubList"
:key=
"yi"
>
<q-item-section
avatar
style=
"padding-right:0;min-width:30px;"
>
<q-item
:to=
"y.MenuUrl"
clickable
v-ripple
:active=
"currentPath == y.MenuUrl"
v-for=
"(y, yi) in x.SubList"
:key=
"yi"
>
<q-item-section
avatar
style=
"padding-right:0;min-width:30px;"
>
<q-icon
:name=
"y.MenuIcon"
size=
"20px"
/>
</q-item-section>
<q-item-section>
{{
y
.
MenuName
}}
</q-item-section>
<q-item-section>
{{
y
.
MenuName
}}
</q-item-section>
</q-item>
</q-expansion-item>
</
template
>
...
...
@@ -68,51 +132,58 @@
</div>
</div>
<div
class=
"col"
style=
"background: #f2f4f7;"
>
<q-scroll-area
:thumb-style=
"thumbStyle"
:bar-style=
"barStyle"
visible
class=
"fit content-scroll full-width full-height"
>
<q-scroll-area
:thumb-style=
"thumbStyle"
:bar-style=
"barStyle"
visible
class=
"fit content-scroll full-width full-height"
>
<router-view
/>
</q-scroll-area>
</div>
</div>
</q-page-container>
<user-info-box
v-if=
"persistent"
:show-obj=
"userInfo"
@
close=
"closeSaveForm"
></user-info-box>
<notify
v-if=
"persistentNotify"
:show-obj=
"userInfo"
:socekt-obj=
"socektArr"
@
close=
"closeSaveForm"
></notify>
<user-info-box
v-if=
"persistent"
:show-obj=
"userInfo"
@
close=
"closeSaveForm"
></user-info-box>
<notify
v-if=
"persistentNotify"
:show-obj=
"userInfo"
:socekt-obj=
"socektArr"
@
close=
"closeSaveForm"
></notify>
</q-layout>
</template>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
userInfoBox
from
'../components/global/user-right-box'
import
notify
from
'../components/global/notify'
import
{
mapGetters
}
from
"vuex"
;
import
userInfoBox
from
"../components/global/user-right-box"
;
import
notify
from
"../components/global/notify"
;
import
{
GetMsgLogList
}
from
'../api/course/index'
import
{
GetMsgLogList
}
from
"../api/course/index"
;
import
{
sendSock
}
from
'../api/common/socket'
export
default
{
name
:
'MainLayout'
,
import
{
sendSock
}
from
"../api/common/socket"
;
export
default
{
name
:
"MainLayout"
,
data
()
{
return
{
tab
:
"navs_0"
,
currentPath
:
""
,
secondNavs
:
[],
thumbStyle
:
{
right
:
'0px'
,
borderRadius
:
'0px'
,
backgroundColor
:
'#1d1d1d'
,
width
:
'6px'
,
right
:
"0px"
,
borderRadius
:
"0px"
,
backgroundColor
:
"#1d1d1d"
,
width
:
"6px"
,
opacity
:
1
},
barStyle
:
{
right
:
'0px'
,
borderRadius
:
'0px'
,
backgroundColor
:
'#999'
,
width
:
'6px'
,
right
:
"0px"
,
borderRadius
:
"0px"
,
backgroundColor
:
"#999"
,
width
:
"6px"
,
opacity
:
0.5
},
persistent
:
false
,
...
...
@@ -120,8 +191,8 @@
isExpend
:
false
,
IsShowLeft
:
true
,
userCenterMenuList
:
[],
//用户中心菜单
socektArr
:
[],
//消息数组
}
socektArr
:
[]
//消息数组
};
},
components
:
{
userInfoBox
,
...
...
@@ -129,7 +200,7 @@
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
handler
:
function
(
route
)
{
var
newPath
=
route
.
path
.
split
(
"?"
)[
0
].
toLowerCase
();
this
.
IsShowLeft
=
false
;
switch
(
newPath
)
{
...
...
@@ -146,16 +217,20 @@
this
.
IsShowLeft
=
true
;
break
;
}
this
.
currentPath
=
route
.
path
this
.
currentPath
=
route
.
path
;
},
immediate
:
true
},
userInfo
:
{
handler
:
function
(
newVal
)
{
let
i
=
this
.
tab
.
split
(
'_'
)[
1
];
handler
:
function
(
newVal
)
{
let
i
=
this
.
tab
.
split
(
"_"
)[
1
];
if
(
newVal
&&
newVal
.
MenuList
)
{
this
.
secondNavs
=
newVal
.
MenuList
.
length
>
0
?
(
newVal
.
MenuList
[
i
]
&&
newVal
.
MenuList
[
i
].
SubList
?
newVal
.
MenuList
[
i
].
SubList
:
[])
:
[];
this
.
secondNavs
=
newVal
.
MenuList
.
length
>
0
?
newVal
.
MenuList
[
i
]
&&
newVal
.
MenuList
[
i
].
SubList
?
newVal
.
MenuList
[
i
].
SubList
:
[]
:
[];
}
if
(
newVal
&&
newVal
.
UserCenterList
)
{
this
.
userCenterMenuList
=
newVal
.
UserCenterList
;
...
...
@@ -165,54 +240,72 @@
}
},
computed
:
{
...
mapGetters
([
'userInfo'
,
'logo'
,
'name'
]),
...
mapGetters
([
"userInfo"
,
"logo"
,
"name"
])
},
mounted
()
{
let
i
=
0
let
i
=
0
;
if
(
sessionStorage
.
getItem
(
"current_navs"
))
{
i
=
sessionStorage
.
getItem
(
"current_navs"
)
i
=
sessionStorage
.
getItem
(
"current_navs"
);
}
this
.
tab
=
`navs_
${
i
}
`
this
.
tab
=
`navs_
${
i
}
`
;
if
(
this
.
userInfo
&&
this
.
userInfo
.
MenuList
)
{
this
.
secondNavs
=
this
.
userInfo
.
MenuList
.
length
>
0
?
(
this
.
userInfo
.
MenuList
[
i
]
&&
this
.
userInfo
.
MenuList
[
i
]
.
SubList
?
this
.
userInfo
.
MenuList
[
i
].
SubList
:
[])
:
[]
}
this
.
$root
.
$on
(
"goworkobj"
,
(
data
)
=>
{
this
.
secondNavs
=
[]
this
.
secondNavs
=
this
.
userInfo
.
MenuList
.
length
>
0
?
this
.
userInfo
.
MenuList
[
i
]
&&
this
.
userInfo
.
MenuList
[
i
].
SubList
?
this
.
userInfo
.
MenuList
[
i
].
SubList
:
[]
:
[];
}
this
.
$root
.
$on
(
"goworkobj"
,
data
=>
{
this
.
secondNavs
=
[];
});
this
.
getLogList
();
this
.
getMsg
();
if
(
this
.
userInfo
.
IsTenCccUser
==
1
)
{
this
.
injectTCCC
(
this
.
userInfo
.
TenCccToken
.
Token
,
1400617921
,
this
.
userInfo
.
Email
,
this
.
userInfo
.
TenCccToken
.
SdkURL
);
}
},
methods
:
{
injectTCCC
(
token
,
sdkAppId
,
userId
,
sdkUrl
)
{
const
scriptDom
=
document
.
createElement
(
"script"
);
scriptDom
.
dataset
.
token
=
token
;
scriptDom
.
dataset
.
sdkAppId
=
sdkAppId
;
scriptDom
.
dataset
.
userid
=
userId
;
//定制是否需要在登录后展示 坐席工作台。默认为true,这里可以通过设为false关闭
scriptDom
.
dataset
.
showWorkBenchAtFirstLogin
=
false
;
scriptDom
.
src
=
sdkUrl
;
document
.
body
.
appendChild
(
scriptDom
);
},
changeLeft
()
{
this
.
IsShowLeft
=
!
this
.
IsShowLeft
;
},
showInfo
()
{
this
.
persistent
=
true
this
.
persistent
=
true
;
},
showNotify
()
{
this
.
persistentNotify
=
true
this
.
persistentNotify
=
true
;
},
changeNavs
(
val
)
{
let
i
=
val
.
split
(
'_'
)[
1
]
this
.
secondNavs
=
this
.
userInfo
.
MenuList
[
i
].
SubList
let
i
=
val
.
split
(
"_"
)[
1
];
this
.
secondNavs
=
this
.
userInfo
.
MenuList
[
i
].
SubList
;
},
closeSaveForm
()
{
this
.
persistent
=
false
this
.
persistentNotify
=
false
this
.
persistent
=
false
;
this
.
persistentNotify
=
false
;
},
setNavs
(
val
)
{
//防止页面数据丢失
sessionStorage
.
setItem
(
"current_navs"
,
val
)
this
.
tab
=
`navs_
${
val
}
`
this
.
secondNavs
=
this
.
userInfo
.
MenuList
[
val
].
SubList
sessionStorage
.
setItem
(
"current_navs"
,
val
);
this
.
tab
=
`navs_
${
val
}
`
;
this
.
secondNavs
=
this
.
userInfo
.
MenuList
[
val
].
SubList
;
this
.
$router
.
push
({
path
:
this
.
userInfo
.
MenuList
[
val
].
MenuUrl
})
});
},
//获取日志列表
getLogList
()
{
...
...
@@ -220,26 +313,30 @@
if
(
res
.
Code
==
1
)
{
this
.
socektArr
=
res
.
Data
;
}
})
});
},
getMsg
()
{
let
userinfo
=
this
.
getLocalStorage
();
var
SendData
=
{
AppId
:
"JiaHeJiaoYu"
,
ClientId
:
userinfo
.
Id
,
ClientId
:
userinfo
.
Id
};
sendSock
(
SendData
,
this
.
getDataFunc
)
sendSock
(
SendData
,
this
.
getDataFunc
);
},
getDataFunc
(
e
)
{
if
(
e
.
data
)
{
var
newData
=
JSON
.
parse
(
e
.
data
)
var
newData
=
JSON
.
parse
(
e
.
data
);
if
(
newData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
newData
.
length
;
i
++
)
{
this
.
socektArr
.
unshift
(
newData
[
i
])
this
.
socektArr
.
unshift
(
newData
[
i
]);
}
}
// this.socektArr = this.socektArr.concat(newData)
this
.
showNotification
(
newData
[
0
].
Title
,
newData
[
0
].
Content
,
newData
.
CoverImg
)
this
.
showNotification
(
newData
[
0
].
Title
,
newData
[
0
].
Content
,
newData
.
CoverImg
);
}
},
/**
...
...
@@ -249,154 +346,149 @@
* @param imgUrl
*/
showNotification
(
title
,
msg
,
imgUrl
)
{
var
Notification
=
window
.
Notification
||
window
.
mozNotification
||
window
.
webkitNotification
;
var
Notification
=
window
.
Notification
||
window
.
mozNotification
||
window
.
webkitNotification
;
// 判断浏览器是否支持桌面通知
if
(
Notification
)
{
Notification
.
requestPermission
(
function
(
result
)
{
Notification
.
requestPermission
(
function
(
result
)
{
//result 默认值'default'等同于拒绝 'denied' -用户选择了拒绝 'granted' -用户同意启用通知
if
(
"granted"
!=
result
)
{
console
.
log
(
'请授权浏览器能够进行通知!'
);
console
.
log
(
"请授权浏览器能够进行通知!"
);
return
false
;
}
else
{
var
tag
=
"sds"
+
Math
.
random
();
var
notify
=
new
Notification
(
title
,
{
dir
:
'auto'
,
lang
:
'zh-CN'
,
var
notify
=
new
Notification
(
title
,
{
dir
:
"auto"
,
lang
:
"zh-CN"
,
tag
:
tag
,
//实例化的notification的id
icon
:
imgUrl
,
//通知的缩略图,icon 支持ico、png、jpg、jpeg格式
title
:
title
,
//通知的标题
body
:
msg
//通知的具体内容
}
);
});
// 定义通知窗口点击函数
notify
.
onclick
=
function
()
{
notify
.
onclick
=
function
()
{
//如果通知消息被点击,通知窗口将被激活
window
.
focus
();
};
// 定义通知错误事件
notify
.
onerror
=
function
()
{
};
notify
.
onerror
=
function
()
{};
// 定义通知显示事件 可以设置多少秒之后关闭 也可以不设置关闭
notify
.
onshow
=
function
()
{
notify
.
onshow
=
function
()
{
// 窗口显示3S后关闭
setTimeout
(
function
()
{
setTimeout
(
function
()
{
notify
.
close
();
},
3000
);
};
// 定义通知关闭事件
notify
.
onclose
=
function
()
{
};
notify
.
onclose
=
function
()
{};
}
});
}
else
{
// 提示不支持系统通知
console
.
log
(
'您的浏览器不支持系统通知,建议使用Chrome浏览'
);
console
.
log
(
"您的浏览器不支持系统通知,建议使用Chrome浏览"
);
}
},
},
}
}
};
</
script
>
<
style
>
@import
url('~assets/css/common.css'
)
;
@import
url("~assets/css/common.css"
)
;
.content-scroll
>
.scroll
>
.full-width
{
.content-scroll
>
.scroll
>
.full-width
{
height
:
100%
;
}
}
.is-show-menu-2
{
.is-show-menu-2
{
position
:
absolute
;
color
:
#a1a4a9
;
cursor
:
pointer
;
right
:
75px
;
bottom
:
7px
;
z-index
:
999
;
}
}
.is-show-menu-2
i
{
.is-show-menu-2
i
{
font-size
:
30px
;
}
}
.is_Show_menu_3
{
.is_Show_menu_3
{
position
:
absolute
;
left
:
75px
;
bottom
:
7px
;
cursor
:
pointer
;
z-index
:
10
;
}
}
.head-bg
{
.head-bg
{
/*background-image: url('~assets/images/page/top.png');
background-position: right;
background-repeat: no-repeat;
background-size: auto 100%;*/
background-color
:
#FFF
;
}
background-color
:
#fff
;
}
.head-bg
.q-tab__label
{
.head-bg
.q-tab__label
{
font-weight
:
bold
!important
;
font-size
:
15px
;
}
}
.second-menu-bg
{
background-image
:
url('~assets/images/page/left.png'
)
;
.second-menu-bg
{
background-image
:
url("~assets/images/page/left.png"
)
;
background-position
:
bottom
;
background-repeat
:
no-repeat
;
background-size
:
100%
auto
;
height
:
100%
;
position
:
relative
;
}
}
.hide-scrollbar
{
.hide-scrollbar
{
scrollbar-width
:
5px
!important
;
-ms-overflow-style
:
marquee
,
panner
!important
;
}
}
.suojin
{
.suojin
{
height
:
40px
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
rgba
(
255
,
255
,
255
,
.5
);
background
:
rgba
(
255
,
255
,
255
,
0.5
);
}
}
.suojin
i
{
.suojin
i
{
font-size
:
24px
;
color
:
#636363
;
}
}
.left-menu-box
{
.left-menu-box
{
overflow-x
:
hidden
;
overflow-y
:
auto
;
max-height
:
calc
(
100%
-
50px
);
height
:
calc
(
100%
-
50px
);
background-color
:
rgba
(
255
,
255
,
255
,
0.3
);
}
}
.left-menu-box
::-webkit-scrollbar
{
.left-menu-box
::-webkit-scrollbar
{
width
:
4px
;
height
:
4px
;
}
}
.left-menu-box
::-webkit-scrollbar-thumb
{
.left-menu-box
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
5px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#bbb
;
}
}
/* .left-menu-box::-webkit-scrollbar-track {
/* .left-menu-box::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background: #EDEDED;
} */
@keyframes
shouqidonghua
{
@keyframes
shouqidonghua
{
from
{
width
:
180px
;
}
...
...
@@ -404,15 +496,15 @@
to
{
width
:
60px
;
}
}
}
.changeShowqidonghua
{
.changeShowqidonghua
{
animation
:
shouqidonghua
0.5s
linear
;
width
:
60px
!important
;
overflow-x
:
hidden
;
}
}
@keyframes
shouqidonghua
{
@keyframes
shouqidonghua
{
from
{
width
:
180px
;
}
...
...
@@ -420,15 +512,15 @@
to
{
width
:
60px
;
}
}
}
.changeShowqidonghua
{
.changeShowqidonghua
{
animation
:
shouqidonghua
0.5s
linear
;
width
:
60px
!important
;
overflow-x
:
hidden
;
}
}
.wave_wrapper
{
.wave_wrapper
{
margin
:
0px
20px
0px
0
;
width
:
50px
;
height
:
50px
;
...
...
@@ -438,13 +530,13 @@
justify-content
:
center
;
border-radius
:
5px
;
cursor
:
pointer
;
}
}
.wave_wrapper
:hover
{
.wave_wrapper
:hover
{
background-color
:
#f3f6f9
;
}
}
.wave_wrapper
.dona
{
.wave_wrapper
.dona
{
position
:
absolute
;
width
:
50%
;
height
:
50%
;
...
...
@@ -453,13 +545,13 @@
border
:
1px
solid
var
(
--q-color-primary
)
!important
;
border-radius
:
50%
;
z-index
:
2
;
}
}
.wave_wrapper
span
.wave_scale
{
.wave_wrapper
span
.wave_scale
{
animation
:
wave_scale
2s
both
infinite
;
}
}
@keyframes
wave_scale
{
@keyframes
wave_scale
{
0
%
{
transform
:
translate3d
(
-41px
,
-41px
,
0px
)
scale
(
1
,
1
);
-webkit-transform
:
scale
(
1
,
1
);
...
...
@@ -477,6 +569,5 @@
-webkit-transform
:
scale
(
1
,
1
);
opacity
:
0
;
}
}
}
</
style
>
src/utils/tenccc.ts
0 → 100644
View file @
9db04671
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