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
ebfc240f
Commit
ebfc240f
authored
Aug 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整字典
parent
980d4286
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
238 additions
and
11 deletions
+238
-11
.gitignore
.gitignore
+1
-0
quasar.conf.js
quasar.conf.js
+1
-1
notiveSysSet.js
src/api/system/notiveSysSet.js
+23
-0
advertfont.css
src/assets/css/advert/advertfont.css
+2
-2
dict-select-emp.vue
src/components/system/dict-select-emp.vue
+123
-0
noticeSysSet.vue
src/pages/system/noticeSysSet.vue
+88
-8
No files found.
.gitignore
View file @
ebfc240f
...
...
@@ -36,3 +36,4 @@ package-lock.json
/webfont/*
src/assets/webfont/
.vscode
font.css
quasar.conf.js
View file @
ebfc240f
...
...
@@ -47,7 +47,7 @@ module.exports = function (ctx) {
vueRouterMode
:
'hash'
,
// available values: 'hash', 'history'
env
:
ctx
.
dev
?
{
API
:
'http://192.168.20.
24:8300
/api'
,
API
:
'http://192.168.20.
51:8088
/api'
,
API_ZC
:
'http://192.168.20.9:8087/api'
,
API_SK
:
'ws:192.168.20.214:'
}
:
{
...
...
src/api/system/notiveSysSet.js
View file @
ebfc240f
...
...
@@ -11,6 +11,29 @@ export function setConten(data) {
});
}
/**
* 公告系统设置
*/
export
function
getDictList
(
data
)
{
return
request
({
url
:
'/UserCenter/GetDictValueList'
,
method
:
'post'
,
data
});
}
/**
* 公告系统设置
*/
export
function
saveDict
(
data
)
{
return
request
({
url
:
'/UserCenter/SaveDict'
,
method
:
'post'
,
data
});
}
/**
* 获取公告系统设置
*/
...
...
src/assets/css/advert/advertfont.css
View file @
ebfc240f
@font-face
{
/*
@font-face{
font-family:'katongjian';
src:url('../../webfont/katongjian.ttf') format('truetype')
}
...
...
@@ -68,7 +68,7 @@
@font-face{
font-family:'pingfang';
src:url('../../webfont/pingfang.ttf') format('truetype')
}
}
*/
.adv-box
{
box-sizing
:
border-box
;
position
:
absolute
;
...
...
src/components/system/dict-select-emp.vue
0 → 100644
View file @
ebfc240f
<
template
>
<div>
<q-select
@
input=
"updateModel"
:label=
"msg.Name"
v-if=
"!multiple"
option-value=
"Id"
option-label=
"EmployeeName"
color=
"primary"
filled
:rules=
"[val => !!val|| '请选择人员信息']"
emit-value
v-model=
"msg.Content"
use-input
clearable
@
filter=
"filterFn"
:options=
"EmployeeListOption"
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>
<q-select
@
blur=
"updateMultipleModel"
multiple
:label=
"msg.Name"
v-if=
"multiple"
option-value=
"Id"
option-label=
"EmployeeName"
color=
"primary"
filled
:rules=
"[val => !!val|| '请选择人员信息']"
emit-value
v-model=
"msg.Content"
use-input
clearable
@
filter=
"filterFn"
:options=
"EmployeeListOption"
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>
</template>
<
script
>
import
{
queryEmployee
}
from
'../../api/users/user'
;
export
default
{
props
:
[
"dict"
,
"multiple"
],
data
()
{
return
{
EmployeeListOption
:
[],
allEmployeeListOption
:
[],
msg
:
{}
}
},
// watch: {
// dict: {
// handler(val) {
// this.msg = val
// console.log(this.msg)
// },
// deep: true
// }
// },
created
()
{
try
{
if
(
!
this
.
multiple
)
{
this
.
dict
.
Content
=
parseInt
(
this
.
dict
.
Content
);
}
else
{
if
(
this
.
dict
.
Content
&&
this
.
dict
.
Content
.
length
>
0
)
{
this
.
dict
.
Content
=
this
.
dict
.
Content
.
split
(
','
).
map
(
Number
)
}
else
{
this
.
dict
.
Content
=
[]
}
}
this
.
msg
=
this
.
dict
console
.
log
(
this
.
msg
)
}
catch
(
error
)
{
console
.
log
(
'错误'
,
error
)
}
},
mounted
()
{
this
.
getEmployee
()
},
methods
:
{
getEmployee
()
{
var
qMsg
=
{
Dept_Id
:
0
}
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
EmployeeListOption
=
res
.
Data
;
this
.
allEmployeeListOption
=
res
.
Data
;
}
}).
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
);
}
})
},
updateMultipleModel
()
{
if
(
this
.
msg
.
Content
&&
this
.
msg
.
Content
!=
""
)
{
this
.
msg
.
Mask
=
""
this
.
allEmployeeListOption
.
forEach
(
x
=>
{
if
(
this
.
msg
.
Content
.
indexOf
(
x
.
Id
)
!=-
1
){
this
.
msg
.
Mask
+=
x
.
EmployeeName
+
","
}
})
this
.
msg
.
Mask
=
this
.
msg
.
Mask
.
substring
(
0
,
this
.
msg
.
Mask
.
length
-
1
);
this
.
msg
.
Content
=
this
.
msg
.
Content
.
join
(
','
)
this
.
$emit
(
"blur"
,
this
.
msg
)
}
},
updateModel
(
val
)
{
if
(
this
.
msg
.
Content
&&
this
.
msg
.
Content
!=
""
)
{
this
.
msg
.
Mask
=
this
.
msg
.
Content
this
.
allEmployeeListOption
.
forEach
(
x
=>
{
if
(
x
.
Id
==
this
.
msg
.
Content
)
{
this
.
msg
.
Mask
=
x
.
EmployeeName
}
})
this
.
$emit
(
"blur"
,
this
.
msg
)
}
}
},
}
</
script
>
<
style
>
</
style
>
src/pages/system/noticeSysSet.vue
View file @
ebfc240f
...
...
@@ -8,7 +8,7 @@
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"col row wrap"
>
<
!--
<
div
class=
"col row wrap"
>
<div
class=
"col-2 baseSet_Title"
>
公告审批人:
</div>
...
...
@@ -28,6 +28,26 @@
<div
class=
"col-3"
style=
"padding:18px 0 0 10px;color:gray"
>
</div>
</div>
<div
class=
"col row wrap"
>
<div
class=
"col-2 baseSet_Title"
>
学员缺勤推送:
</div>
<div
class=
"col-3"
>
<q-select
option-value=
"Id"
option-label=
"EmployeeName"
color=
"primary"
filled
: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
class=
"col-3"
style=
"padding:18px 0 0 10px;color:gray"
>
</div>
</div>
<div
class=
"col row wrap"
>
<div
class=
"col-2 baseSet_Title"
>
</div>
...
...
@@ -35,24 +55,46 @@
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important;margin-top:20px;width:100%;"
@
click=
"saveInfo"
/>
</div>
</div>
-->
<div
class=
"text-h5 text-weight-medium q-mb-lg"
>
系统字典维护
</div>
<div
class=
"row q-col-gutter-xs q-px-lg"
>
<div
class=
"col-6 relative-position "
:class=
"{'dict-item':!x.EditorStatus}"
v-for=
"(x,i) in dictList"
:key=
"i"
>
<div
class=
"edit-box"
>
<q-avatar
rounded
size=
"24px"
color=
"orange"
@
click=
"changeStatus(x)"
>
<q-icon
size=
"18"
color=
"white"
name=
"iconfont icon-edit"
></q-icon>
</q-avatar>
</div>
<div
style=
"max-width:300px"
>
<q-field
v-if=
"!x.EditorStatus"
borderless
:label=
"x.Name"
v-model=
"x.Mask"
readonly
>
<span
class=
"text-dark text-weight-medium"
>
{{x.Mask}}
</span>
</q-field>
<dictSelectEmp
@
blur=
"changeFinishModel"
v-if=
"x.DictKey=='Notice_BaseKey' && x.EditorStatus"
:dict=
"x"
:multiple=
"false"
></dictSelectEmp>
<dictSelectEmp
@
blur=
"changeFinishModel"
v-if=
"(x.DictKey=='Push_Absence'||x.DictKey=='Push_Arrears'||x.DictKey=='Push_EndClass') && x.EditorStatus"
:dict=
"x"
:multiple=
"true"
></dictSelectEmp>
<q-input
@
blur=
"changeModel(x)"
:rules=
"[val => !!val|| '请填写字典值']"
filled
v-else-if=
"x.EditorStatus"
borderless
:label=
"x.Name"
v-model=
"x.Content"
></q-input>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
dictSelectEmp
from
'../../components/system/dict-select-emp'
import
{
queryEmployee
}
from
'../../api/users/user'
;
//获取业务员
import
{
setConten
,
getConten
getConten
,
getDictList
,
saveDict
}
from
"../../api/system/notiveSysSet"
export
default
{
meta
:
{
title
:
"公告系统设置"
},
props
:
{},
components
:
{},
components
:
{
dictSelectEmp
},
data
()
{
return
{
msg
:
{
...
...
@@ -60,14 +102,43 @@
},
EmployeeListOption
:
[],
allEmployeeListOption
:
[],
dictList
:[]
}
},
created
()
{},
mounted
()
{
this
.
getEmployee
(
0
);
this
.
getData
();
this
.
init
();
},
methods
:
{
changeModel
(
x
){
if
(
x
.
Content
!=
''
){
x
.
Mask
=
x
.
Content
this
.
changeStatus
(
x
)
saveDict
(
x
).
then
(
r
=>
{});
}
},
changeFinishModel
(
x
){
this
.
changeStatus
(
x
)
saveDict
(
x
).
then
(
r
=>
{});
},
changeStatus
(
x
){
x
.
EditorStatus
=!
x
.
EditorStatus
console
.
log
(
x
)
this
.
$forceUpdate
()
},
init
(){
getDictList
({}).
then
(
r
=>
{
r
.
Data
.
forEach
(
x
=>
{
if
(
!
x
.
Mask
||
x
.
Mask
==
''
){
x
.
Mask
=
x
.
Content
==
""
?
"未设定"
:
x
.
Content
}
x
.
EditorStatus
=
false
})
this
.
dictList
=
r
.
Data
})
},
//获取业务员
getEmployee
(
id
)
{
var
qMsg
=
{
...
...
@@ -117,7 +188,16 @@
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
<
style
>
.dict-item
:hover
.edit-box
{
display
:
block
;
}
.edit-box
{
position
:
absolute
;
left
:
256px
;
top
:
20px
;
display
:
none
;
cursor
:
pointer
;
z-index
:
9
;
}
</
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