Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
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
viitto
pptist
Commits
f9f2e874
Commit
f9f2e874
authored
Feb 19, 2024
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增分享弹窗
parent
c94f9446
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
310 additions
and
9 deletions
+310
-9
.env.development
.env.development
+1
-1
components.d.ts
components.d.ts
+1
-0
common.css
src/assets/styles/common.css
+18
-7
ConfigService.ts
src/services/ConfigService.ts
+5
-1
OrgService.ts
src/services/OrgService.ts
+21
-0
ShareForm.vue
src/views/SellTemplate/components/ShareForm.vue
+264
-0
No files found.
.env.development
View file @
f9f2e874
VUE_APP_API_URL = 'http://
reborn.oytour.com
/api/common/post'
VUE_APP_API_URL = 'http://
192.168.10.214
/api/common/post'
VUE_APP_UPLOADURLAPI_URL = 'http://192.168.10.214:8120'
VUE_APP_SHARE_URL = 'http://127.0.0.1:8080'
\ No newline at end of file
components.d.ts
View file @
f9f2e874
...
...
@@ -49,6 +49,7 @@ declare module 'vue' {
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTreeSelect
:
typeof
import
(
'element-plus/es'
)[
'ElTreeSelect'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
FileInput
:
typeof
import
(
'./src/components/FileInput.vue'
)[
'default'
]
FormulaContent
:
typeof
import
(
'./src/components/LaTeXEditor/FormulaContent.vue'
)[
'default'
]
...
...
src/assets/styles/common.css
View file @
f9f2e874
...
...
@@ -7,12 +7,13 @@ page {
sans-serif
;
}
/* .0123456789+-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz导入设计文件基础数据绑定模板预览选择、上传图片地创作 */
/* .0123456789+-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz导入设计文件基础数据绑定模板预览选择、上传图片地创作分享置 */
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
@font-face
{
font-family
:
"alifont"
;
src
:
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/
af1x9gjmJyCb
.woff2")
format
(
"woff2"
),
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/
9KYFlUm2wrb2
.woff")
format
(
"woff"
);
font-family
:
"alifont"
;
src
:
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/
OXJDKjyyUbMp
.woff2")
format
(
"woff2"
),
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/
iy1cOOTdKN6P
.woff")
format
(
"woff"
);
font-display
:
swap
;
}
}
@font-face
{
font-family
:
"pingfangr"
;
...
...
@@ -46,6 +47,12 @@ page {
.overflow-hide
{
overflow
:
hidden
;
}
.text-subtitle2
{
font-size
:
0.875rem
;
font-weight
:
500
;
line-height
:
1.375rem
;
letter-spacing
:
0.00714em
;
}
/* ::-webkit-scrollbar {
display: none;
width: 0 !important;
...
...
@@ -82,10 +89,10 @@ page {
color
:
#29d3b2
;
}
.bg-secony
{
background-color
:
#29d3b2
;
background-color
:
#29d3b2
!important
;
}
.bg-waring
{
background-color
:
#f89c53
;
background-color
:
#f89c53
!important
;
}
.text-waring
{
color
:
#f89c53
;
...
...
@@ -178,6 +185,10 @@ page {
.q-mb-sm
{
margin-bottom
:
5px
;
}
.q-mx-sm
{
margin-left
:
5px
;
margin-right
:
5px
;
}
.q-py-sm
{
padding-top
:
5px
;
padding-bottom
:
5px
;
...
...
@@ -267,7 +278,7 @@ page {
padding-bottom
:
10px
;
}
.bg-primary
{
background-color
:
#0b40fe
;
background-color
:
#0b40fe
!important
;
}
.q-px-lg
{
padding-left
:
20px
;
...
...
src/services/ConfigService.ts
View file @
f9f2e874
...
...
@@ -122,8 +122,12 @@ class ConfigService{
/**
* 新增颜色
*/
static
async
SetTemplateConfigData
(
params
:
any
):
Promise
<
HttpResponse
>
{
static
async
SetTemplateConfigData
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_SetTemplateConfigData"
,
params
)
}
static
async
SetShareAsync
(
params
:{
ShareFileId
:
number
,
ShareList
:{
ShareType
:
number
,
ShareTargetIds
:
string
,
EditType
:
string
}[]}):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_SetTripShare"
,
params
)
}
}
export
default
ConfigService
;
\ No newline at end of file
src/services/OrgService.ts
0 → 100644
View file @
f9f2e874
import
Api
,{
HttpResponse
,
Result
}
from
'./../utils/request'
;
class
OrgService
{
static
async
GetTreeDepartmentsAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{}
return
Api
.
Post
(
"app_get_GetCompanyDepartmentListTree"
,
msg
)
}
static
async
GetAllBranchsAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{
Status
:
0
,
is_show
:
0
,
RB_Group_Id
:
2
}
return
Api
.
Post
(
"admin_get_BranchGetList"
,
msg
)
}
static
async
GetAllEmployerAsync
():
Promise
<
HttpResponse
>
{
let
msg
=
{
RB_Group_id
:
"0"
,
RB_Branch_id
:
"-1"
,
departmentId
:
"0"
,
IsLeave
:
"0"
}
return
Api
.
Post
(
"app_get_employeeInfo_v2"
,
msg
)
}
}
export
default
OrgService
;
\ No newline at end of file
src/views/SellTemplate/components/ShareForm.vue
0 → 100644
View file @
f9f2e874
<
template
>
<el-dialog
v-model=
"show"
v-loading=
"loading"
:show-close=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
style=
"max-width:550px;"
>
<template
#
header
>
<div
class=
"text-title"
>
分享设置
</div>
</
template
>
<div>
<div
class=
"row items-center"
>
<el-select
v-model=
"currentType"
placeholder=
"分享类型"
style=
"width: 100px;"
>
<el-option
:label=
"x.label"
:value=
"x.value"
v-for=
"x in shareTypeItems"
/>
</el-select>
<div
class=
"col q-mx-md"
>
<el-select
v-model=
"selectedCompnays"
collapse-tags
multiple
placeholder=
"请选择公司"
class=
"full-width"
v-if=
"currentType==1"
>
<el-option
:label=
"x.BName"
:value=
"x.Id"
v-for=
"x in allBranchs"
/>
</el-select>
<el-select
v-model=
"selectedPeoples"
filterable
collapse-tags
multiple
placeholder=
"请选择员工"
class=
"full-width"
v-if=
"currentType==3"
>
<el-option
:label=
"x.name"
:value=
"x.empId"
v-for=
"x in allPeoples"
/>
</el-select>
<el-tree-select
placeholder=
"请选择部门"
v-model=
"selectedDepartment"
:data=
"allOrgs"
:render-after-expand=
"false"
show-checkbox
multiple
:props=
"defaultProps"
node-key=
"DepartmentId"
check-strictly
class=
"full-width"
collapse-tags
v-if=
"currentType==2"
/>
</div>
<el-select
v-model=
"selectedPermission"
style=
"width: 150px;"
collapse-tags
multiple
placeholder=
"请选择权限"
>
<el-option
:label=
"x.label"
:value=
"x.value"
v-for=
"x in permissions"
/>
</el-select>
<el-button
class=
"q-ml-md"
v-loading=
"saveLoading"
@
click=
"saveShareHandler"
>
添加
</el-button>
</div>
<el-scrollbar
height=
"300px"
class=
"q-mt-lg"
>
<div
class=
"row items-center q-mb-md"
>
<el-avatar
icon=
"OfficeBuilding"
size=
"36"
shape=
"square"
class=
"bg-primary"
></el-avatar>
<div
class=
"q-mx-md col"
>
<div
class=
"text-subtitle2"
>
所有人
</div>
<div
class=
"text-small text-info"
>
所有在职员工均适用于此规则
</div>
</div>
<div
class=
"cusor-pointer"
style=
"margin-top: 8px;"
>
<el-tooltip
effect=
"dark"
content=
"可以查看"
>
<el-icon
size=
"16"
><View
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以修改"
>
<el-icon
size=
"16"
color=
"#f89c53"
class=
"q-mx-md"
><EditPen
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以下载"
>
<el-icon
size=
"16"
color=
"#0b40fe"
><Download
/></el-icon>
</el-tooltip>
</div>
<el-divider
direction=
"vertical"
class=
"q-mx-md"
/>
<el-tooltip
effect=
"dark"
content=
"删除规则"
>
<el-button
link
><el-icon
size=
"16"
color=
"#FF4B86"
><Delete
/></el-icon></el-button>
</el-tooltip>
</div>
<div
class=
"row items-center q-mb-md"
>
<el-avatar
icon=
"HomeFilled"
size=
"36"
shape=
"square"
class=
"bg-secony"
></el-avatar>
<div
class=
"q-mx-md col"
>
<div
class=
"text-subtitle2 cusor-pointer"
>
成都印象等12家公司
</div>
<div
class=
"text-small text-info"
>
分公司权限
</div>
</div>
<div
class=
"cusor-pointer"
style=
"margin-top: 8px;"
>
<el-tooltip
effect=
"dark"
content=
"可以查看"
>
<el-icon
size=
"16"
><View
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以修改"
>
<el-icon
size=
"16"
color=
"#f89c53"
class=
"q-mx-md"
><EditPen
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以下载"
>
<el-icon
size=
"16"
color=
"#0b40fe"
><Download
/></el-icon>
</el-tooltip>
</div>
<el-divider
direction=
"vertical"
class=
"q-mx-md"
/>
<el-tooltip
effect=
"dark"
content=
"删除规则"
>
<el-button
link
><el-icon
size=
"16"
color=
"#FF4B86"
><Delete
/></el-icon></el-button>
</el-tooltip>
</div>
<div
class=
"row items-center q-mb-md"
>
<el-avatar
icon=
"Menu"
size=
"36"
shape=
"square"
class=
"bg-waring"
></el-avatar>
<div
class=
"q-mx-md col"
>
<div
class=
"text-subtitle2 cusor-pointer"
>
成都印象等12家公司
</div>
<div
class=
"text-small text-info"
>
部门权限
</div>
</div>
<div
class=
"cusor-pointer"
style=
"margin-top: 8px;"
>
<el-tooltip
effect=
"dark"
content=
"可以查看"
>
<el-icon
size=
"16"
><View
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以修改"
>
<el-icon
size=
"16"
color=
"#f89c53"
class=
"q-mx-md"
><EditPen
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以下载"
>
<el-icon
size=
"16"
color=
"#0b40fe"
><Download
/></el-icon>
</el-tooltip>
</div>
<el-divider
direction=
"vertical"
class=
"q-mx-md"
/>
<el-tooltip
effect=
"dark"
content=
"删除规则"
>
<el-button
link
><el-icon
size=
"16"
color=
"#FF4B86"
><Delete
/></el-icon></el-button>
</el-tooltip>
</div>
<div
class=
"row items-center q-mb-md"
>
<el-avatar
icon=
"UserFilled"
size=
"36"
shape=
"square"
></el-avatar>
<div
class=
"q-mx-md col"
>
<div
class=
"text-subtitle2 cusor-pointer"
>
成都印象等12家公司
</div>
<div
class=
"text-small text-info"
>
部门权限
</div>
</div>
<div
class=
"cusor-pointer"
style=
"margin-top: 8px;"
>
<el-tooltip
effect=
"dark"
content=
"可以查看"
>
<el-icon
size=
"16"
><View
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以修改"
>
<el-icon
size=
"16"
color=
"#f89c53"
class=
"q-mx-md"
><EditPen
/></el-icon>
</el-tooltip>
<el-tooltip
effect=
"dark"
content=
"可以下载"
>
<el-icon
size=
"16"
color=
"#0b40fe"
><Download
/></el-icon>
</el-tooltip>
</div>
<el-divider
direction=
"vertical"
class=
"q-mx-md"
/>
<el-tooltip
effect=
"dark"
content=
"删除规则"
>
<el-button
link
><el-icon
size=
"16"
color=
"#FF4B86"
><Delete
/></el-icon></el-button>
</el-tooltip>
</div>
</el-scrollbar>
</div>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"()=>closedhandler()"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"()=>closedhandler()"
>
保存分享配置
</el-button>
</span>
</
template
>
</el-dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
ApiResult
}
from
'@/configs/axios'
;
import
OrgService
from
'@/services/OrgService'
;
import
{
ref
}
from
'vue'
;
import
{
View
,
Download
,
EditPen
,
Delete
}
from
'@element-plus/icons-vue'
;
import
{
ElMessage
}
from
'element-plus'
;
import
ConfigService
from
'@/services/ConfigService'
;
const
props
=
defineProps
({
id
:{
type
:
Number
,
required
:
true
}
})
const
emit
=
defineEmits
<
{
(
event
:
'close'
):
void
}
>
()
const
defaultProps
=
{
children
:
'ChildList'
,
label
:
'DepartmentName'
}
const
show
=
ref
(
true
)
const
shareTypeItems
=
ref
<
{
label
:
string
,
value
:
number
}[]
>
([])
const
permissions
=
ref
<
{
label
:
string
,
value
:
number
}[]
>
([])
const
loading
=
ref
(
true
)
const
saveLoading
=
ref
(
false
)
const
selectedDepartment
=
ref
<
any
[]
>
([])
const
selectedCompnays
=
ref
<
number
[]
>
([])
const
selectedPeoples
=
ref
<
number
[]
>
([])
const
selectedPermission
=
ref
<
number
[]
>
([])
const
allBranchs
=
ref
<
any
[]
>
([])
const
allOrgs
=
ref
<
any
[]
>
([])
const
allPeoples
=
ref
<
any
[]
>
([])
shareTypeItems
.
value
.
push
({
label
:
'所有人'
,
value
:
0
})
shareTypeItems
.
value
.
push
({
label
:
'公司'
,
value
:
1
})
shareTypeItems
.
value
.
push
({
label
:
'部门'
,
value
:
2
})
shareTypeItems
.
value
.
push
({
label
:
'员工'
,
value
:
3
})
permissions
.
value
.
push
({
label
:
'查看'
,
value
:
1
})
permissions
.
value
.
push
({
label
:
'编辑'
,
value
:
2
})
permissions
.
value
.
push
({
label
:
'导出'
,
value
:
3
})
const
currentType
=
ref
<
number
>
(
0
)
const
closedhandler
=
()
=>
{
emit
(
'close'
)
}
const
getDepartments
=
async
()
=>
{
OrgService
.
GetTreeDepartmentsAsync
().
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
==
ApiResult
.
SUCCESS
&&
res
.
data
.
data
.
length
>
0
){
allOrgs
.
value
=
res
.
data
.
data
allOrgs
.
value
.
forEach
(
x
=>
{
x
.
disabled
=
true
})
}
loading
.
value
=
false
}).
catch
(()
=>
{
loading
.
value
=
false
})
}
const
getAllBranch
=
async
()
=>
{
OrgService
.
GetAllBranchsAsync
().
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
==
ApiResult
.
SUCCESS
&&
res
.
data
.
data
.
length
>
0
){
allBranchs
.
value
=
res
.
data
.
data
}
loading
.
value
=
false
}).
catch
(()
=>
{
loading
.
value
=
false
})
}
const
getAllPeople
=
async
()
=>
{
OrgService
.
GetAllEmployerAsync
().
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
==
ApiResult
.
SUCCESS
&&
res
.
data
.
data
.
length
>
0
){
allPeoples
.
value
=
res
.
data
.
data
}
loading
.
value
=
false
}).
catch
(()
=>
{
loading
.
value
=
false
})
}
const
saveShareHandler
=
async
()
=>
{
if
(
saveLoading
.
value
)
return
saveLoading
.
value
=
true
let
errmsg
=
''
if
(
currentType
.
value
==
1
&&
selectedCompnays
.
value
.
length
==
0
)
errmsg
=
'请选择公司'
else
if
(
currentType
.
value
==
2
&&
selectedDepartment
.
value
.
length
==
0
)
errmsg
=
'请选择部门'
else
if
(
currentType
.
value
==
3
&&
selectedPeoples
.
value
.
length
==
0
)
errmsg
=
'请选择人员'
else
if
(
selectedPermission
.
value
.
length
==
0
)
errmsg
=
'请进行权限设定'
if
(
errmsg
==
''
){
let
ids
:
string
=
'0'
if
(
currentType
.
value
==
1
)
ids
=
selectedCompnays
.
value
.
join
(
','
)
else
if
(
currentType
.
value
==
2
)
ids
=
selectedDepartment
.
value
.
join
(
','
)
else
if
(
currentType
.
value
==
3
)
ids
=
selectedPeoples
.
value
.
join
(
','
)
try
{
let
response
=
await
ConfigService
.
SetShareAsync
({
ShareFileId
:
props
.
id
,
ShareList
:
[{
ShareType
:
currentType
.
value
,
ShareTargetIds
:
ids
,
EditType
:
selectedPermission
.
value
.
join
(
','
)
}]
})
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
){
ElMessage
.
success
({
message
:
'分享成功'
})
}
else
errmsg
=
'保存分享配置失败,请重试'
}
catch
(
error
)
{
errmsg
=
'保存分享配置失败,请重试'
}
}
if
(
errmsg
!=
''
)
{
ElMessage
.
error
({
message
:
errmsg
})
}
saveLoading
.
value
=
false
}
getDepartments
()
getAllBranch
()
getAllPeople
()
</
script
>
<
style
>
.share-item
{}
</
style
>
\ No newline at end of file
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