Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mt-education-web
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
王旭
mt-education-web
Commits
788a1924
Commit
788a1924
authored
Dec 04, 2019
by
fanlin@91isoft.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
d0f3f405
95652b5e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
19 deletions
+138
-19
mt.js
src/api/mt.js
+11
-2
index2.vue
src/components/mt-organization/index2.vue
+60
-4
router.config.js
src/config/router.config.js
+6
-0
user.js
src/store/modules/user.js
+2
-0
newTraining.vue
src/views/courseTrain/offlineTraining/newTraining.vue
+0
-2
userPointManage.vue
src/views/courseTrain/pointsManageMain/userPointManage.vue
+30
-8
sortManage.vue
src/views/courseTrain/sortManage.vue
+16
-1
UserManage.vue
src/views/systemManagement/userManage/UserManage.vue
+13
-2
No files found.
src/api/mt.js
View file @
788a1924
...
@@ -7,13 +7,14 @@ const api = {
...
@@ -7,13 +7,14 @@ const api = {
queryMenuById
:
'user/queryMenuById'
,
queryMenuById
:
'user/queryMenuById'
,
getDeptUser
:
'/api/contact/v1/dept/sub_dept_user_pagelist'
,
// 根据部门获取部门的子部门和用户分页查询
getDeptUser
:
'/api/contact/v1/dept/sub_dept_user_pagelist'
,
// 根据部门获取部门的子部门和用户分页查询
getUserCascade
:
'/api/contact/v1/user/pagelist_by_dept_cascade'
,
// 通过部门级联查询企业用户列表且包含子部门用户(支持分页)
getUserCascade
:
'/api/contact/v1/user/pagelist_by_dept_cascade'
,
// 通过部门级联查询企业用户列表且包含子部门用户(支持分页)
SearchPeople
:
'/api/contact/v1/user/list_user_info_by_name'
SearchPeople
:
'/api/contact/v1/user/list_user_info_by_name'
,
SearchDept
:
'/api/contact/v1/user/list_dept_info_by_name'
};
};
export
function
getToken
(
params
)
{
export
function
getToken
(
params
)
{
return
axios
({
return
axios
({
baseURL
:
''
,
baseURL
:
''
,
url
:
api
.
getToken
,
url
:
process
.
env
.
VUE_APP_BASE_API2
+
api
.
getToken
,
method
:
'get'
,
method
:
'get'
,
params
:
params
params
:
params
});
});
...
@@ -57,3 +58,11 @@ export function SearchPeople(params) {
...
@@ -57,3 +58,11 @@ export function SearchPeople(params) {
params
:
params
params
:
params
});
});
}
}
export
function
SearchDept
(
params
)
{
return
axios
({
baseURL
:
''
,
url
:
process
.
env
.
VUE_APP_BASE_API2
+
api
.
SearchDept
,
method
:
'get'
,
params
:
params
});
}
src/components/mt-organization/index2.vue
View file @
788a1924
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
// import..
// import..
// import peopleApi from "./people";
// import peopleApi from "./people";
// import organizationAPI from "./organization";
// import organizationAPI from "./organization";
import
{
getDeptUser
,
getUserCascade
,
SearchPeople
}
from
'@/api/mt.js'
;
import
{
getDeptUser
,
getUserCascade
,
SearchPeople
,
SearchDept
}
from
'@/api/mt.js'
;
import
util
from
'./utils'
;
import
util
from
'./utils'
;
// import
{
getSearchDeptAndUser
,
getSearchRole
}
from
'@/api/share/shareData'
;
// import
{
getSearchDeptAndUser
,
getSearchRole
}
from
'@/api/share/shareData'
;
...
@@ -320,6 +320,9 @@
...
@@ -320,6 +320,9 @@
searchPeopleByName
(
postData
)
{
searchPeopleByName
(
postData
)
{
return
SearchPeople
(
postData
);
return
SearchPeople
(
postData
);
}
,
}
,
searchDeptByName
(
postData
)
{
return
SearchDept
(
postData
);
}
,
// 初始化数据
// 初始化数据
init
()
{
init
()
{
...
@@ -509,9 +512,62 @@
...
@@ -509,9 +512,62 @@
}
);
}
);
}
);
}
);
}
else
{
}
else
{
this
.
searchPeopleByName
({
corpId
:
this
.
company
.
id
,
name
:
this
.
searchName
||
''
}
).
then
(
res
=>
{
this
.
searchDeptByName
({
corpId
:
this
.
company
.
id
,
name
:
this
.
searchName
||
''
}
).
then
(
res
=>
{
// this.crumbs.
console
.
log
(
'searchDeptByName'
,
res
);
this
.
users
=
[];
this
.
depts
=
[];
if
(
res
.
data
.
length
>
0
)
{
this
.
users
=
[...
res
.
data
];
this
.
users
.
forEach
(
user
=>
{
this
.
hasSelectUser
.
forEach
(
item
=>
{
if
(
user
.
id
===
item
)
{
user
.
isCheck
=
true
;
}
}
);
}
);
}
else
{
this
.
$message
.
warning
(
'无此部门'
);
}
}
);
// this.searchPeopleByName(
{
corpId
:
this
.
company
.
id
,
name
:
this
.
searchName
||
''
}
).
then
(
res
=>
{
// // this.crumbs.
// console.log('searchPeopleByName', res);
// this.users = [];
// this.depts = [];
// if (res.data.length > 0)
{
// this.users = [...res.data];
// this.users.forEach(user =>
{
// this.hasSelectUser.forEach(item =>
{
// if (user.id === item)
{
// user.isCheck = true;
//
}
//
}
);
//
}
);
//
}
else
{
// this.$message.warning('无此人员');
//
}
//
}
);
}
}
,
// 搜索部门
searchDept
()
{
if
(
this
.
isSpecial
)
{
this
.
users
=
[];
this
.
depts
=
[];
console
.
log
(
this
.
searchName
);
this
.
users
=
this
.
specialMemberNoRepeat
.
filter
(
people
=>
people
.
name
.
includes
(
this
.
searchName
));
this
.
users
.
forEach
(
user
=>
{
this
.
hasSelectUser
.
forEach
(
item
=>
{
if
(
user
.
id
===
item
)
{
user
.
isCheck
=
true
;
}
}
);
}
);
}
else
{
this
.
searchDeptByName
({
corpId
:
this
.
company
.
id
,
name
:
this
.
searchName
||
''
}
).
then
(
res
=>
{
// this.crumbs.
// this.crumbs.
console
.
log
(
'search
People
ByName'
,
res
);
console
.
log
(
'search
Dept
ByName'
,
res
);
this
.
users
=
[];
this
.
users
=
[];
this
.
depts
=
[];
this
.
depts
=
[];
if
(
res
.
data
.
length
>
0
)
{
if
(
res
.
data
.
length
>
0
)
{
...
@@ -524,7 +580,7 @@
...
@@ -524,7 +580,7 @@
}
);
}
);
}
);
}
);
}
else
{
}
else
{
this
.
$message
.
warning
(
'无此
人员
'
);
this
.
$message
.
warning
(
'无此
部门
'
);
}
}
}
);
}
);
}
}
...
...
src/config/router.config.js
View file @
788a1924
...
@@ -331,6 +331,12 @@ export const asyncRouterMap = [
...
@@ -331,6 +331,12 @@ export const asyncRouterMap = [
* @type { *[] }
* @type { *[] }
*/
*/
export
const
constantRouterMap
=
[
export
const
constantRouterMap
=
[
{
path
:
'/noPower'
,
name
:
'noPower'
,
meta
:
{
title
:
''
,
keepAlive
:
true
,
permission
:
[
'noPower'
]
},
component
:
resolve
=>
require
([
'@/views/home/noPower'
],
resolve
)
},
{
{
path
:
'/'
,
path
:
'/'
,
name
:
'index'
,
name
:
'index'
,
...
...
src/store/modules/user.js
View file @
788a1924
...
@@ -81,6 +81,8 @@ const user = {
...
@@ -81,6 +81,8 @@ const user = {
// 禁用页面
// 禁用页面
localStorage
.
setItem
(
'USER_STATUS'
,
'用户无权限'
);
localStorage
.
setItem
(
'USER_STATUS'
,
'用户无权限'
);
}
}
// debugger
// this.$router.push({ path: 'noPower' });
const
menu
=
[];
const
menu
=
[];
const
tempMenu
=
{
'menuId'
:
'1'
,
'menuName'
:
'禁用'
,
'href'
:
'noPower'
}
const
tempMenu
=
{
'menuId'
:
'1'
,
'menuName'
:
'禁用'
,
'href'
:
'noPower'
}
menu
.
push
(
tempMenu
)
menu
.
push
(
tempMenu
)
...
...
src/views/courseTrain/offlineTraining/newTraining.vue
View file @
788a1924
...
@@ -696,8 +696,6 @@
...
@@ -696,8 +696,6 @@
};
};
},
},
checkApplyDate
(
rule
,
value
,
callback
)
{
checkApplyDate
(
rule
,
value
,
callback
)
{
console
.
log
(
value
);
console
.
log
(
'))))))))))))))))))))))))))))))))))))))))'
);
if
(
value
&&
value
.
length
>
0
)
{
if
(
value
&&
value
.
length
>
0
)
{
const
resData
=
this
.
form
.
getFieldsValue
();
const
resData
=
this
.
form
.
getFieldsValue
();
console
.
log
(
resData
);
console
.
log
(
resData
);
...
...
src/views/courseTrain/pointsManageMain/userPointManage.vue
View file @
788a1924
...
@@ -224,12 +224,13 @@
...
@@ -224,12 +224,13 @@
>
>
<a-input
<a-input
:maxLength=
"10"
:maxLength=
"10"
type=
"number"
placeholder=
""
placeholder=
""
v-decorator=
"[
v-decorator=
"[
'givenValue',
'givenValue',
{ validateTrigger: ['change', 'blur'],
{
rules: [{ required: true,whitespace: true, message: '请输入积分(数值)' }]}
validateTrigger: ['change', 'blur'],
rules: [{ required: true,whitespace: true, message: '请输入积分(数值)' }, { validator: this.checkPointType }]
}
]"
]"
/>
/>
</a-form-item>
</a-form-item>
...
@@ -305,15 +306,26 @@
...
@@ -305,15 +306,26 @@
<!-- @change="e => serachOnChange(e.target.value, 'deductValue')"-->
<!-- @change="e => serachOnChange(e.target.value, 'deductValue')"-->
<a-input
<a-input
:maxLength=
"10"
:maxLength=
"10"
@
blur=
"blurPoint"
placeholder=
""
placeholder=
""
type=
"number"
v-decorator=
"[
v-decorator=
"[
'deductValue',
'deductValue',
{ validateTrigger: ['change', 'blur'],
{
rules: [{ required: true,whitespace: true, message: '请输入积分(数值)' }]}
validateTrigger: ['change', 'blur'],
rules: [{ required: true,whitespace: true, message: '请输入积分(数值)' }, { validator: this.checkPointType}]
}
]"
]"
/>
/>
<!-- <a-input-->
<!-- :maxLength="1"-->
<!-- @blur="blurPoint"-->
<!-- placeholder=""-->
<!-- type="number"-->
<!-- v-decorator="[-->
<!-- 'deductValue',-->
<!-- { validateTrigger: ['change', 'blur'],-->
<!-- rules: [{ required: true,whitespace: true, message: '请输入积分(数值)' }, { validator: this.checkPointType}]}-->
<!-- ]"-->
<!-- />-->
</a-form-item>
</a-form-item>
<a-form-item
<a-form-item
:colon =
"false"
:colon =
"false"
...
@@ -629,6 +641,16 @@
...
@@ -629,6 +641,16 @@
e
.
target
.
value
=
''
;
e
.
target
.
value
=
''
;
}
}
},
},
checkPointType
(
rule
,
value
,
callback
)
{
if
(
value
&&
value
.
length
>
0
)
{
const
number
=
new
RegExp
(
'^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$'
).
test
(
value
)
if
(
!
number
)
{
callback
(
new
Error
(
'只能输入数字'
));
}
}
else
{
callback
();
};
},
// 分頁
// 分頁
changePageSize
(
pageSize
,
current
)
{
changePageSize
(
pageSize
,
current
)
{
...
...
src/views/courseTrain/sortManage.vue
View file @
788a1924
...
@@ -330,7 +330,7 @@
...
@@ -330,7 +330,7 @@
const
dropPos
=
info
.
node
.
pos
.
split
(
'-'
);
const
dropPos
=
info
.
node
.
pos
.
split
(
'-'
);
const
dropPosition
=
info
.
dropPosition
-
Number
(
dropPos
[
dropPos
.
length
-
1
]);
const
dropPosition
=
info
.
dropPosition
-
Number
(
dropPos
[
dropPos
.
length
-
1
]);
const
loop
=
(
data
,
key
,
callback
)
=>
{
const
loop
=
(
data
,
key
,
callback
)
=>
{
// console.log('data
', data);
console
.
log
(
'data1234567890
'
,
data
);
data
.
forEach
((
item
,
index
,
arr
)
=>
{
data
.
forEach
((
item
,
index
,
arr
)
=>
{
if
(
item
.
key
===
key
)
{
if
(
item
.
key
===
key
)
{
return
callback
(
item
,
index
,
arr
);
return
callback
(
item
,
index
,
arr
);
...
@@ -343,6 +343,7 @@
...
@@ -343,6 +343,7 @@
const
data
=
[...
this
.
treeData
];
const
data
=
[...
this
.
treeData
];
// Find dragObject
// Find dragObject
// let twoHaveChild; // 二级分类下是否有三级分类
let
dragObj
;
let
dragObj
;
loop
(
data
,
dragKey
,
(
item
,
index
,
arr
)
=>
{
// index 是拖动的列表index 从 0开始
loop
(
data
,
dragKey
,
(
item
,
index
,
arr
)
=>
{
// index 是拖动的列表index 从 0开始
arr
.
splice
(
index
,
1
);
arr
.
splice
(
index
,
1
);
...
@@ -358,6 +359,20 @@
...
@@ -358,6 +359,20 @@
this
.
$refs
.
alertM
.
showFailAlert
(
'三级分类不允许添加子分类!'
);
this
.
$refs
.
alertM
.
showFailAlert
(
'三级分类不允许添加子分类!'
);
return
;
return
;
};
};
console
.
log
(
'dragObj3'
,
dragObj
);
if
(
dragObj
.
courseLevel
===
'2'
&&
dragObj
.
children
.
length
>
0
&&
item
.
courseLevel
===
'2'
)
{
this
.
$refs
.
alertM
.
showFailAlert
(
'有子级的二级分类不允许添加到二级分类下!'
);
return
;
};
if
(
dragObj
.
courseLevel
===
'1'
&&
dragObj
.
children
.
length
>
0
&&
item
.
courseLevel
===
'2'
)
{
const
dragObjTwo
=
dragObj
.
children
;
dragObjTwo
.
map
(
item
=>
{
if
(
item
.
children
.
length
>
0
)
{
this
.
$refs
.
alertM
.
showFailAlert
(
'有三级分类的一级分类不允许添加到二级分类下!'
);
return
;
};
});
};
item
.
children
=
item
.
children
||
[];
item
.
children
=
item
.
children
||
[];
// where to insert 示例添加到尾部,可以是随意位置
// where to insert 示例添加到尾部,可以是随意位置
item
.
children
.
push
(
dragObj
);
item
.
children
.
push
(
dragObj
);
...
...
src/views/systemManagement/userManage/UserManage.vue
View file @
788a1924
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<!--
<a-col
:md=
"4"
:sm=
"24"
style=
"padding-left: 0; margin-right: -50px;"
>
-->
<!--
<a-col
:md=
"4"
:sm=
"24"
style=
"padding-left: 0; margin-right: -50px;"
>
-->
<a-form-item
:colon=
"false"
label=
"部门"
>
<a-form-item
:colon=
"false"
label=
"部门"
>
<a-tree-select
<a-tree-select
style=
"width: 172px"
:dropdownStyle=
"
{ maxHeight: '400px', overflow: 'auto' }"
:dropdownStyle=
"
{ maxHeight: '400px', overflow: 'auto' }"
:treeData="departTreeList"
:treeData="departTreeList"
placeholder="请选择"
placeholder="请选择"
...
@@ -40,9 +41,19 @@
...
@@ -40,9 +41,19 @@
</a-col>
</a-col>
<a-col
:md=
"4"
:sm=
"24"
>
<a-col
:md=
"4"
:sm=
"24"
>
<a-form-item
label=
"角色"
:colon=
"false"
>
<a-form-item
label=
"角色"
:colon=
"false"
>
<a-select
@
change=
"selectRoleChange"
placeholder=
"请选择"
v-model
.
trim=
"queryParam.roleName"
>
<a-select
@
change=
"selectRoleChange"
placeholder=
"请选择"
style=
"width: 172px"
v-model
.
trim=
"queryParam.roleName"
>
<a-icon
type=
"caret-down"
slot=
"suffixIcon"
/>
<a-icon
type=
"caret-down"
slot=
"suffixIcon"
/>
<a-select-option
v-for=
"roleitem in allRoleList"
:value=
"roleitem.roleName"
>
{{
roleitem
.
roleName
}}
</a-select-option>
<a-select-option
:value=
"roleitem.roleName"
v-for=
"roleitem in allRoleList"
>
{{
roleitem
.
roleName
}}
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
...
...
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