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
f38ab0df
Commit
f38ab0df
authored
Jul 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
95400b17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
299 deletions
+52
-299
documentApproval.vue
src/pages/administration/documentApproval.vue
+21
-291
noticeSysSet.vue
src/pages/system/noticeSysSet.vue
+31
-8
No files found.
src/pages/administration/documentApproval.vue
View file @
f38ab0df
...
@@ -33,10 +33,6 @@
...
@@ -33,10 +33,6 @@
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<
template
v-slot:top=
"props"
>
<!--
<div
class=
"page-option"
style=
"width:100%;"
>
<q-btn
color=
"accent"
style=
"float:right;margin-right:0;"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"发布公文"
@
click=
"addDoc(null)"
/>
</div>
-->
</
template
>
</
template
>
<
template
v-slot:body-cell-NoticeStateName=
"props"
>
<
template
v-slot:body-cell-NoticeStateName=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
...
@@ -60,7 +56,7 @@
...
@@ -60,7 +56,7 @@
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-xiangqing-"
style=
"font-weight:400;color: #3FC4FF"
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-xiangqing-"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"详情"
@
click=
"EditConfig(props.row.Id)"
/>
class=
"q-mr-xs"
label=
"详情"
@
click=
"EditConfig(props.row.Id)"
/>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-xiangqing-"
style=
"font-weight:400;color: #3FC4FF"
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-xiangqing-"
style=
"font-weight:400;color: #3FC4FF"
class=
"q-mr-xs"
label=
"审批"
@
click=
"showApproval(props.row.Id)"
/>
class=
"q-mr-xs"
label=
"审批"
@
click=
"showApproval(props.row.Id)"
v-if=
"shenpiId==loginId"
/>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
...
@@ -185,26 +181,16 @@
...
@@ -185,26 +181,16 @@
</template>
</template>
<
script
>
<
script
>
import
{
getConten
}
from
'../../api/system/notiveSysSet'
import
{
import
{
getNoticePageList
,
getNoticePageList
,
getNoticeStateEnumList
,
getNoticeRuleEnumList
,
//获取编号规则 枚举列表
setNoticeBaseInfo
,
//新增修改 公告配置
setNoticeOperation
,
//公告操作
setNoticeInfo
,
//发布公告
GetNoticeInfo
,
//公告详情
GetNoticeInfo
,
//公告详情
setReviewNotice
,
//公告审批
setReviewNotice
,
//公告审批
getMyApproval
,
//我审批的公告
getMyApproval
,
//我审批的公告
}
from
'../../api/administration/document'
;
}
from
'../../api/administration/document'
;
import
{
getDeptTree
}
from
'../../api/system/dept.js'
import
{
import
{
queryEmployee
queryEmployee
}
from
'../../api/users/user'
}
from
'../../api/users/user'
import
{
UploadSelfFile
,
}
from
'../../api/common/common'
import
extEditor
from
'../../components/common/ext-editor'
import
extEditor
from
'../../components/common/ext-editor'
import
selectTree
from
'../../components/common/select-tree'
import
selectTree
from
'../../components/common/select-tree'
...
@@ -331,7 +317,7 @@
...
@@ -331,7 +317,7 @@
},
},
{
{
name
:
'LogContent'
,
name
:
'LogContent'
,
label
:
'备注'
,
label
:
'
审批
备注'
,
align
:
'left'
,
align
:
'left'
,
field
:
'LogContent'
field
:
'LogContent'
},
},
...
@@ -346,35 +332,6 @@
...
@@ -346,35 +332,6 @@
NoticeList
:
[],
NoticeList
:
[],
PersionList
:
[],
//员工列表
PersionList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工
AllemployeeList
:
[],
//所有员工
NoticeBaseInfo
:
{
//基础配置
Id
:
0
,
Image
:
''
,
From
:
''
,
NumberRule
:
''
,
NumberRuleName
:
''
,
CopyPeople
:
''
,
},
tempManager
:
[],
//默认抄送
tempManager2
:
[],
//发布公告 默认抄送
RuleEnumList
:
[],
//编号规则列表
saveLoading
:
false
,
persistent
:
false
,
addMsg
:
{
//添加和修改公告
Id
:
0
,
From
:
''
,
To
:
'-1'
,
//抄送部门
CopyPeople
:
'-1'
,
//抄送人
Title
:
''
,
Content
:
''
,
NoticeState
:
1
,
//状态 1发布 2草稿
Is_Top
:
2
,
//是否置顶 1是 2否
FileList
:
[],
//附件列表
SendType
:
1
,
//1-全公司,2-指定部门
},
fileList
:
[],
//上传列表
DeptList
:
[],
// 部门下拉
returnString
:
[],
//默认岗位
drawer
:
false
,
//显示右侧抽屉
NInfo
:
{},
//详情内容
NInfo
:
{},
//详情内容
persistent2
:
false
,
persistent2
:
false
,
persistent3
:
false
,
persistent3
:
false
,
...
@@ -384,21 +341,21 @@
...
@@ -384,21 +341,21 @@
LogContent
:
""
LogContent
:
""
},
},
mydata
:[],
mydata
:[],
mypageCount
:
0
mypageCount
:
0
,
shenpiId
:
0
,
//审批人Id
loginId
:
0
,
//登录人Id
}
}
},
},
created
(){
let
data
=
JSON
.
parse
(
localStorage
.
getItem
(
'loginUserInfo'
))
this
.
loginId
=
data
.
data
.
Id
},
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
this
.
getNoticeList
()
this
.
getEmployee
();
this
.
getEmployee
()
this
.
getshenpiren
();
this
.
getDepartList
();
this
.
getNoticeRule
()
//获取编号规则 枚举列表
},
},
methods
:
{
methods
:
{
//获取编辑器值
getEditValue
(
obj
)
{
this
.
addMsg
.
Content
=
obj
;
},
tabChange
()
{
tabChange
()
{
if
(
this
.
tabCheck
==
'first'
)
{
if
(
this
.
tabCheck
==
'first'
)
{
this
.
getList
();
this
.
getList
();
...
@@ -406,38 +363,6 @@
...
@@ -406,38 +363,6 @@
this
.
getMyList
()
this
.
getMyList
()
}
}
},
},
onRejected
(
rejectedEntries
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`文件验证失败,请重新上传`
})
},
uploadFile
(
files
)
{
UploadSelfFile
(
'studentIcon'
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
NoticeBaseInfo
.
Image
=
res
.
FileUrl
;
}
})
},
uploadFile2
(
files
)
{
UploadSelfFile
(
'studentIcon'
,
files
.
file
,
res
=>
{
if
(
res
.
Code
==
1
)
{
let
obj
=
{
name
:
res
.
FileName
,
url
:
res
.
FileUrl
,
}
this
.
fileList
.
push
(
obj
)
}
})
},
beforeRemove
(
file
,
fileList
)
{
//删除的操作
this
.
fileList
.
forEach
((
x
,
j
)
=>
{
if
(
x
.
uid
==
file
.
uid
)
{
this
.
fileList
.
splice
(
j
,
1
)
}
})
},
getList
()
{
getList
()
{
this
.
loading
=
false
;
this
.
loading
=
false
;
getNoticePageList
(
this
.
msg
).
then
(
res
=>
{
getNoticePageList
(
this
.
msg
).
then
(
res
=>
{
...
@@ -448,22 +373,6 @@
...
@@ -448,22 +373,6 @@
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
getNoticeList
()
{
this
.
loading
=
false
;
getNoticeStateEnumList
({
Name
:
''
,
Id
:
''
}).
then
(
res
=>
{
this
.
NoticeList
=
res
.
Data
let
obj
=
{
Name
:
'不限'
,
Id
:
0
}
this
.
NoticeList
.
unshift
(
obj
)
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
//筛选员工
//筛选员工
filterFn
(
val
,
update
)
{
filterFn
(
val
,
update
)
{
update
(()
=>
{
update
(()
=>
{
...
@@ -495,212 +404,25 @@
...
@@ -495,212 +404,25 @@
}
}
})
})
},
},
//获取部门下拉数据
getDepartList
(
id
)
{
let
msg
=
{
School_Id
:
0
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
},
//分页改变
//分页改变
changePage
(
val
)
{
changePage
(
val
)
{
this
.
msg
.
PageIndex
=
val
;
this
.
msg
.
PageIndex
=
val
;
this
.
getList
()
this
.
getList
()
},
},
getChild
(
deptArray
)
{
// 获取详情
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
;
}
if
(
tempStr
)
{
this
.
addMsg
.
To
=
tempStr
;
}
else
{
this
.
addMsg
.
To
=
''
;
}
},
getNoticeRule
()
{
getNoticeRuleEnumList
({
Name
:
''
,
Id
:
''
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
RuleEnumList
=
res
.
Data
}
})
},
save
()
{
this
.
saveLoading
=
true
;
var
tempStr
=
""
;
if
(
this
.
tempManager
&&
this
.
tempManager
.
length
>
0
)
{
this
.
tempManager
.
forEach
(
item
=>
{
tempStr
+=
","
+
item
;
});
}
if
(
tempStr
&&
tempStr
!=
''
)
{
//去掉第一个字符
tempStr
=
tempStr
.
substr
(
1
);
}
this
.
NoticeBaseInfo
.
CopyPeople
=
tempStr
;
setNoticeBaseInfo
(
this
.
NoticeBaseInfo
).
then
(
res
=>
{
this
.
saveLoading
=
false
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
}
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
},
getNInfo
(
id
)
{
getNInfo
(
id
)
{
GetNoticeInfo
({
GetNoticeInfo
({
NoticeId
:
id
NoticeId
:
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
NInfo
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
this
.
NInfo
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
this
.
addMsg
.
Id
=
res
.
Data
.
Id
;
this
.
addMsg
.
From
=
res
.
Data
.
From
;
//数组处理
this
.
addMsg
.
To
=
res
.
Data
.
To
;
this
.
returnString
=
[]
this
.
returnString
=
res
.
Data
.
To
.
split
(
','
).
map
(
Number
)
//数组处理
this
.
addMsg
.
CopyPeople
=
res
.
Data
.
CopyPeople
;
this
.
tempManager2
=
res
.
Data
.
CopyPeople
.
split
(
','
).
map
(
Number
)
//字符串转为数组map 是转为数字
this
.
addMsg
.
Title
=
res
.
Data
.
Title
;
this
.
addMsg
.
Content
=
res
.
Data
.
Content
;
this
.
addMsg
.
NoticeState
=
res
.
Data
.
NoticeState
;
this
.
addMsg
.
Is_Top
=
res
.
Data
.
Is_Top
;
if
(
res
.
Data
.
To
==
"0"
||
res
.
Data
.
To
==
"-1"
)
{
this
.
addMsg
.
SendType
=
1
;
}
else
{
this
.
addMsg
.
SendType
=
2
;
}
this
.
fileList
=
[];
res
.
Data
.
FileList
.
forEach
((
x
)
=>
{
let
obj
=
{
name
:
x
.
FileName
,
url
:
x
.
FileUrl
}
this
.
fileList
.
push
(
obj
)
})
}
}
}).
catch
(()
=>
{})
}).
catch
(()
=>
{})
},
},
addDoc
(
id
)
{
if
(
id
)
{
this
.
getNInfo
(
id
)
}
else
{
this
.
tempManager2
=
this
.
tempManager
?
this
.
tempManager
:
[]
this
.
addMsg
.
From
=
this
.
NoticeBaseInfo
.
From
;
this
.
addMsg
.
Title
=
this
.
NoticeBaseInfo
.
Title
;
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Content
=
this
.
NoticeBaseInfo
.
Content
;
this
.
addMsg
.
NoticeState
=
1
;
this
.
addMsg
.
Is_Top
=
2
;
this
.
addMsg
.
FileList
=
[];
this
.
fileList
=
[]
}
this
.
persistent
=
true
;
},
closeSaveForm
()
{
this
.
persistent
=
false
},
save_t
(
val
)
{
this
.
$refs
.
From
.
validate
()
this
.
$refs
.
Title
.
validate
()
if
(
!
this
.
$refs
.
From
.
hasError
&&
!
this
.
$refs
.
Title
.
hasError
)
{
this
.
addMsg
.
NoticeState
=
val
//发布状态
this
.
saveLoading
=
true
;
var
tempStr
=
""
;
if
(
this
.
tempManager2
&&
this
.
tempManager2
.
length
>
0
)
{
this
.
tempManager2
.
forEach
(
item
=>
{
tempStr
+=
","
+
item
;
});
}
if
(
tempStr
&&
tempStr
!=
''
)
{
//去掉第一个字符
tempStr
=
tempStr
.
substr
(
1
);
}
this
.
addMsg
.
CopyPeople
=
tempStr
;
this
.
addMsg
.
FileList
=
[]
this
.
fileList
.
forEach
((
x
)
=>
{
let
obj
=
{
FileName
:
x
.
name
,
FileUrl
:
x
.
url
}
this
.
addMsg
.
FileList
.
push
(
obj
)
})
let
data
=
this
.
addMsg
if
(
data
.
CopyPeople
==
''
)
{
data
.
CopyPeople
=
-
1
}
if
(
data
.
To
==
''
)
{
data
.
To
=
-
1
}
if
(
data
.
SendType
==
1
)
{
data
.
To
=
-
1
;
}
setNoticeInfo
(
data
).
then
(
res
=>
{
this
.
saveLoading
=
false
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
persistent
=
false
this
.
getList
();
}
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
},
EditConfig
(
id
)
{
EditConfig
(
id
)
{
this
.
persistent2
=
true
;
this
.
persistent2
=
true
;
this
.
getNInfo
(
id
);
this
.
getNInfo
(
id
);
},
},
setNoticeOtion
(
id
,
type
)
{
setNoticeOperation
({
NoticeId
:
id
,
Type
:
type
}).
then
(
res
=>
{
this
.
saveLoading
=
false
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
persistent
=
false
this
.
msg
.
PageIndex
=
1
;
this
.
getList
();
}
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
},
wopen
(
file
)
{
window
.
open
(
file
.
FileUrl
);
},
//显示审批弹窗
//显示审批弹窗
showApproval
(
id
)
{
showApproval
(
id
)
{
this
.
persistent3
=
true
this
.
persistent3
=
true
...
@@ -739,6 +461,14 @@
...
@@ -739,6 +461,14 @@
this
.
mymsg
.
PageIndex
=
val
;
this
.
mymsg
.
PageIndex
=
val
;
this
.
getMyList
()
this
.
getMyList
()
},
},
//获取审批人
getshenpiren
()
{
getConten
({}).
then
(
res
=>
{
if
(
res
.
Code
===
1
)
{
this
.
shenpiId
=
parseInt
(
res
.
Data
.
Content
)
}
})
},
}
}
}
}
...
...
src/pages/system/noticeSysSet.vue
View file @
f38ab0df
...
@@ -13,8 +13,17 @@
...
@@ -13,8 +13,17 @@
公告审批人:
公告审批人:
</div>
</div>
<div
class=
"col-3"
>
<div
class=
"col-3"
>
<q-select
v-model=
"msg.Content"
:options=
"EmployeeListOption"
color=
"primary"
filled
clearable
<q-select
option-value=
"Id"
option-label=
"EmployeeName"
color=
"primary"
filled
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"Admin"
emit-value
map-options
:rules=
"[val => !!val|| '请选择公告审批人']"
/>
:rules=
"[val => !!val|| '请选择公告审批人']"
v-model=
"msg.Content"
use-input
clearable
@
filter=
"filterFn"
:options=
"EmployeeListOption"
emit-value
map-options
ref=
"Admin"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<div
class=
"col-3"
style=
"padding:18px 0 0 10px;color:gray"
>
<div
class=
"col-3"
style=
"padding:18px 0 0 10px;color:gray"
>
</div>
</div>
...
@@ -50,6 +59,7 @@
...
@@ -50,6 +59,7 @@
Content
:
0
Content
:
0
},
},
EmployeeListOption
:
[],
EmployeeListOption
:
[],
allEmployeeListOption
:
[],
}
}
},
},
created
()
{},
created
()
{},
...
@@ -67,9 +77,22 @@
...
@@ -67,9 +77,22 @@
queryEmployee
(
qMsg
).
then
(
res
=>
{
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
EmployeeListOption
=
res
.
Data
;
this
.
EmployeeListOption
=
res
.
Data
;
this
.
allEmployeeListOption
=
res
.
Data
;
}
}
}).
catch
(()
=>
{})
}).
catch
(()
=>
{})
},
},
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
EmployeeListOption
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allEmployeeListOption
))
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
EmployeeListOption
=
this
.
allEmployeeListOption
.
filter
(
v
=>
v
.
EmployeeName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
})
},
getData
()
{
getData
()
{
getConten
({}).
then
(
res
=>
{
getConten
({}).
then
(
res
=>
{
if
(
res
.
Code
===
1
)
{
if
(
res
.
Code
===
1
)
{
...
@@ -81,12 +104,12 @@
...
@@ -81,12 +104,12 @@
this
.
$refs
.
Admin
.
validate
();
this
.
$refs
.
Admin
.
validate
();
if
(
!
this
.
$refs
.
Admin
.
hasError
)
{
if
(
!
this
.
$refs
.
Admin
.
hasError
)
{
setConten
(
this
.
msg
).
then
(
res
=>
{
setConten
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
===
1
)
{
if
(
res
.
Code
===
1
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
this
.
getConten
();
this
.
getConten
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
Message
)
this
.
$message
.
error
(
res
.
Message
)
}
}
})
})
}
}
}
}
...
...
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