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
759a1f0d
Commit
759a1f0d
authored
Nov 17, 2020
by
Mac
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
3d7d42d3
739bf549
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
13 deletions
+56
-13
common.js
src/api/common/common.js
+4
-4
manager.vue
src/pages/school/manager.vue
+52
-9
No files found.
src/api/common/common.js
View file @
759a1f0d
...
@@ -31,15 +31,15 @@ var uploadMsg = {
...
@@ -31,15 +31,15 @@ var uploadMsg = {
/**
/**
* 自定义上传文件
* 自定义上传文件
*/
*/
export
function
UploadSelfFile
(
path
,
file
,
isTrans
,
callback
)
{
export
function
UploadSelfFile
(
path
,
file
,
callback
)
{
Loading
.
show
({
Loading
.
show
({
message
:
'正在上传文件,请稍后...'
message
:
'正在上传文件,请稍后...'
})
})
var
newPath
=
'/Upload/'
+
path
+
"/"
;
var
newPath
=
'/Upload/'
+
path
+
"/"
;
let
url
=
uploadMsg
.
uploadUrl
+
"/Upload?filePath="
+
newPath
;
let
url
=
uploadMsg
.
uploadUrl
+
"/Upload?filePath="
+
newPath
;
if
(
isTrans
&&
isTrans
==
1
)
{
//
if (isTrans && isTrans == 1) {
url
+=
"&isTrans=1"
//
url += "&isTrans=1"
}
//
}
let
formData
=
new
FormData
()
let
formData
=
new
FormData
()
formData
.
append
(
'myfile'
,
file
)
formData
.
append
(
'myfile'
,
file
)
let
xhr
=
new
XMLHttpRequest
()
let
xhr
=
new
XMLHttpRequest
()
...
...
src/pages/school/manager.vue
View file @
759a1f0d
...
@@ -71,8 +71,17 @@
...
@@ -71,8 +71,17 @@
class=
"col-6 q-pr-lg q-pb-lg"
label=
"校区名称"
:rules=
"[val => !!val || '请填写校区名称']"
/>
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.SAddress"
ref=
"SAddress"
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SAddress"
ref=
"SAddress"
class=
"col-6 q-pb-lg"
label=
"校区地址"
:rules=
"[val => !!val || '请填写校区地址']"
/>
class=
"col-6 q-pb-lg"
label=
"校区地址"
:rules=
"[val => !!val || '请填写校区地址']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SLinkMan"
ref=
"SLinkMan"
<q-select
class=
"col-6 q-pb-lg q-pr-lg"
clearable
filled
stack-label
use-input
option-value=
"Id"
class=
"col-6 q-pr-lg q-pb-lg "
label=
"校区联系人"
:rules=
"[val => !!val || '请填写校区联系人']"
/>
option-label=
"EmployeeName"
v-model=
"objOption.ManagerId"
ref=
"ManagerId"
:options=
"EmployeeList"
label=
"校区联系人"
:dense=
"false"
emit-value
map-options
@
filter=
"filterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SLinkTel"
ref=
"SLinkTel"
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SLinkTel"
ref=
"SLinkTel"
class=
"col-6 q-pb-lg"
label=
"校区联系电话"
:rules=
"[val => !!val || '请填写校区联系电话']"
/>
class=
"col-6 q-pb-lg"
label=
"校区联系电话"
:rules=
"[val => !!val || '请填写校区联系电话']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Remark"
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Remark"
...
@@ -108,6 +117,10 @@
...
@@ -108,6 +117,10 @@
import
{
import
{
getDeptTree
getDeptTree
}
from
'../../api/system/dept'
}
from
'../../api/system/dept'
//员工
import
{
queryEmployee
}
from
'../../api/users/user'
import
selectTree
from
'../../components/common/select-tree'
import
selectTree
from
'../../components/common/select-tree'
export
default
{
export
default
{
meta
:
{
meta
:
{
...
@@ -143,9 +156,9 @@
...
@@ -143,9 +156,9 @@
sortable
:
true
sortable
:
true
},
},
{
{
name
:
'
SLinkMan
'
,
name
:
'
ManagerName
'
,
label
:
'负责人'
,
label
:
'负责人'
,
field
:
'
SLinkMan
'
,
field
:
'
ManagerName
'
,
align
:
'left'
,
align
:
'left'
,
sortable
:
true
sortable
:
true
},
},
...
@@ -207,28 +220,32 @@
...
@@ -207,28 +220,32 @@
SName
:
""
,
SName
:
""
,
Status
:
'-1'
Status
:
'-1'
},
},
StatusTemp
:
{}
,
StatusTemp
:
""
,
pageCount
:
0
,
pageCount
:
0
,
persistent
:
false
,
persistent
:
false
,
objOption
:
{
objOption
:
{
SId
:
0
,
SId
:
0
,
SName
:
""
,
SName
:
""
,
SAddress
:
""
,
SAddress
:
""
,
SLinkMan
:
""
,
SLinkTel
:
""
,
SLinkTel
:
""
,
SDomain
:
""
,
SDomain
:
""
,
SLogo
:
""
,
SLogo
:
""
,
Remark
:
""
,
Remark
:
""
,
Status
:
'0'
,
Status
:
'0'
,
Dept_Id
:
0
,
//管理部门
Dept_Id
:
0
,
//管理部门
ManagerId
:
0
,
//负责人编号
},
},
tempManager
:
""
,
saveLoading
:
false
,
saveLoading
:
false
,
DeptList
:
[],
//部门列表
DeptList
:
[],
//部门列表
returnString
:
[],
//默认值
returnString
:
[],
//默认值
EmployeeList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工
}
}
},
},
created
()
{
created
()
{
this
.
queryDeptTree
();
this
.
queryDeptTree
();
this
.
getEmployee
();
this
.
StatusTemp
=
this
.
StatusOpts
[
0
]
this
.
StatusTemp
=
this
.
StatusOpts
[
0
]
},
},
mounted
()
{
mounted
()
{
...
@@ -236,6 +253,31 @@
...
@@ -236,6 +253,31 @@
this
.
getSchool
()
this
.
getSchool
()
},
},
methods
:
{
methods
:
{
filterFn
(
val
,
update
)
{
if
(
val
&&
val
!=
''
)
{
update
(()
=>
{
const
needle
=
val
.
toLowerCase
()
this
.
EmployeeList
=
this
.
AllemployeeList
.
filter
(
v
=>
v
.
EmployeeName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
})
}
else
{
this
.
EmployeeList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllemployeeList
));
}
},
//获取员工列表
getEmployee
()
{
var
qMsg
=
{
EmployeeName
:
""
}
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
if
(
jsonData
&&
jsonData
>
0
)
{
this
.
AllemployeeList
=
JOSN
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
EmployeeList
=
JOSN
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
})
},
getChild
(
deptArray
)
{
getChild
(
deptArray
)
{
var
tempStr
=
""
;
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
if
(
deptArray
&&
deptArray
!=
''
)
{
...
@@ -269,13 +311,13 @@
...
@@ -269,13 +311,13 @@
this
.
objOption
.
SId
=
0
;
this
.
objOption
.
SId
=
0
;
this
.
objOption
.
SName
=
""
;
this
.
objOption
.
SName
=
""
;
this
.
objOption
.
SAddress
=
""
;
this
.
objOption
.
SAddress
=
""
;
this
.
objOption
.
SLinkMan
=
""
;
this
.
objOption
.
SLinkTel
=
""
;
this
.
objOption
.
SLinkTel
=
""
;
this
.
objOption
.
SDomain
=
""
;
this
.
objOption
.
SDomain
=
""
;
this
.
objOption
.
SLogo
=
""
;
this
.
objOption
.
SLogo
=
""
;
this
.
objOption
.
Remark
=
""
;
this
.
objOption
.
Remark
=
""
;
this
.
objOption
.
Status
=
"0"
;
this
.
objOption
.
Status
=
"0"
;
this
.
objOption
.
Dept_Id
=
0
;
this
.
objOption
.
Dept_Id
=
0
;
this
.
objOption
.
ManagerId
=
0
;
}
}
this
.
persistent
=
true
;
this
.
persistent
=
true
;
},
},
...
@@ -311,14 +353,15 @@
...
@@ -311,14 +353,15 @@
this
.
saveLoading
=
true
this
.
saveLoading
=
true
this
.
$refs
.
SName
.
validate
()
this
.
$refs
.
SName
.
validate
()
this
.
$refs
.
SAddress
.
validate
()
this
.
$refs
.
SAddress
.
validate
()
this
.
$refs
.
SLinkMan
.
validate
()
this
.
$refs
.
SLinkTel
.
validate
()
this
.
$refs
.
SLinkTel
.
validate
()
if
(
if
(
!
this
.
$refs
.
SName
.
hasError
&&
!
this
.
$refs
.
SName
.
hasError
&&
!
this
.
$refs
.
SAddress
.
hasError
&&
!
this
.
$refs
.
SAddress
.
hasError
&&
!
this
.
$refs
.
SLinkMan
.
hasError
&&
!
this
.
$refs
.
SLinkTel
.
hasError
!
this
.
$refs
.
SLinkTel
.
hasError
)
{
)
{
if
(
this
.
tempManager
&&
this
.
tempManager
.
Id
)
{
this
.
objOption
.
ManagerId
=
this
.
tempManager
.
Id
;
}
saveSchool
(
this
.
objOption
).
then
(
res
=>
{
saveSchool
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
saveLoading
=
false
this
.
$q
.
notify
({
this
.
$q
.
notify
({
...
...
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