Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wlOfficialAccount-vue
Project
Project
Details
Activity
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
mengmeng
wlOfficialAccount-vue
Commits
67a1f09c
Commit
67a1f09c
authored
Jan 05, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fwl' into 'master'
差不多结尾 See merge request
!4
parents
bb8b9c12
eca9161e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1288 additions
and
396 deletions
+1288
-396
.gitignore
.gitignore
+1
-1
index.html
public/index.html
+1
-1
index.js
src/api/index.js
+5
-3
index.js
src/router/index.js
+1
-1
main.vue
src/views/main.vue
+78
-62
area-add-or-update.vue
src/views/modules/area/area-add-or-update.vue
+7
-0
auditInformationManage.vue
...modules/auditInformationManage/auditInformationManage.vue
+1
-1
memberManageExamine.vue
...ws/modules/auditInformationManage/memberManageExamine.vue
+145
-40
committee-add-or-update.vue
src/views/modules/committee/committee-add-or-update.vue
+6
-4
committee.vue
src/views/modules/committee/committee.vue
+1
-0
committee-table.vue
src/views/modules/meeting/committee-table.vue
+189
-29
location-table.vue
src/views/modules/meeting/location-table.vue
+261
-32
meeting.vue
src/views/modules/meeting/meeting.vue
+2
-4
meetingsAdd.vue
src/views/modules/meeting/meetingsAdd.vue
+105
-39
meetingsDetail.vue
src/views/modules/meeting/meetingsDetail.vue
+86
-32
user-add-or-update.vue
src/views/modules/sys/user-add-or-update.vue
+285
-133
user.vue
src/views/modules/sys/user.vue
+47
-5
user.vue
src/views/modules/user/user.vue
+67
-9
No files found.
.gitignore
View file @
67a1f09c
...
...
@@ -23,4 +23,4 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
node_modules
node_modules
\ No newline at end of file
public/index.html
View file @
67a1f09c
...
...
@@ -10,7 +10,7 @@
window
.
SITE_CONFIG
=
{};
window
.
SITE_CONFIG
[
'version'
]
=
'v1.0.0'
;
window
.
SITE_CONFIG
[
'nodeEnv'
]
=
'<%= process.env.VUE_APP_NODE_ENV %>'
;
window
.
SITE_CONFIG
[
'apiURL'
]
=
'http://192.168.10.16
9
:8080/hmit-admin'
;
// api请求地址
window
.
SITE_CONFIG
[
'apiURL'
]
=
'http://192.168.10.16
4
:8080/hmit-admin'
;
// api请求地址
window
.
SITE_CONFIG
[
'storeState'
]
=
{};
// vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态)
window
.
SITE_CONFIG
[
'contentTabDefault'
]
=
{
// 内容标签页默认属性对象
'name'
:
''
,
// 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径)
...
...
src/api/index.js
View file @
67a1f09c
...
...
@@ -10,11 +10,13 @@ import {
}
from
"../utils/request"
;
//会议详情
export
function
get
woFaultTypeList
(
)
{
return
getData
(
"/workorder/wofaulttype/woFaultTypeList"
);
export
function
get
MeetingDetail
(
id
)
{
return
getData
(
`/meeting/meeting/
${
id
}
`
);
}
//会议保存
export
function
getMeeting
(
dto
)
{
return
postData
(
"/meeting/meeting"
,
dto
);
}
\ No newline at end of file
}
//会议修改/meeting/meeting
\ No newline at end of file
src/router/index.js
View file @
67a1f09c
...
...
@@ -37,7 +37,7 @@ export const moduleRoutes = {
{
path
:
'/memberManageDetail'
,
component
:
()
=>
import
(
'@/views/modules/memberManage/memberManageDetail'
),
name
:
'会员信息详情'
,
meta
:
{
title
:
'会员信息详情'
,
isTab
:
false
}
},
{
path
:
'/meetingsAdd'
,
component
:
()
=>
import
(
'@/views/modules/meeting/meetingsAdd'
),
name
:
'会议新增'
,
meta
:
{
title
:
'会议新增'
,
isTab
:
false
}
},
{
path
:
'/meetingsDetail'
,
component
:
()
=>
import
(
'@/views/modules/meeting/meetingsDetail'
),
name
:
'会议详情'
,
meta
:
{
title
:
'会议详情'
,
isTab
:
tru
e
}
},
{
path
:
'/meetingsDetail'
,
component
:
()
=>
import
(
'@/views/modules/meeting/meetingsDetail'
),
name
:
'会议详情'
,
meta
:
{
title
:
'会议详情'
,
isTab
:
fals
e
}
},
{
path
:
'/member'
,
component
:
()
=>
import
(
'@/views/modules/user/user'
),
name
:
'会员信息管理'
,
meta
:
{
title
:
'会员信息管理'
,
isTab
:
true
}
},
{
path
:
'/shenhe'
,
component
:
()
=>
import
(
'@/views/modules/auditInformationManage/auditInformationManage'
),
name
:
'审核信息管理'
,
meta
:
{
title
:
'审核信息管理'
,
isTab
:
true
}
},
]
...
...
src/views/main.vue
View file @
67a1f09c
<
template
>
<div
v-loading
.
fullscreen
.
lock=
"loading"
:element-loading-text=
"$t('loading')"
:class=
"['aui-wrapper',
{ 'aui-sidebar--fold': $store.state.sidebarFold }]">
<div
v-loading
.
fullscreen
.
lock=
"loading"
:element-loading-text=
"$t('loading')"
:class=
"['aui-wrapper',
{ 'aui-sidebar--fold': $store.state.sidebarFold }]"
>
<template
v-if=
"!loading"
>
<main-navbar
/>
<main-sidebar
/>
...
...
@@ -12,94 +16,106 @@
</template>
<
script
>
import
MainNavbar
from
'./main-navbar'
import
MainSidebar
from
'./main-sidebar'
import
MainContent
from
'./main-content'
import
MainThemeTools
from
'./main-theme-tools'
import
debounce
from
'lodash/debounce'
import
MainNavbar
from
"./main-navbar"
;
import
MainSidebar
from
"./main-sidebar"
;
import
MainContent
from
"./main-content"
;
import
MainThemeTools
from
"./main-theme-tools"
;
import
debounce
from
"lodash/debounce"
;
export
default
{
provide
()
{
provide
()
{
return
{
// 刷新
refresh
()
{
this
.
$store
.
state
.
contentIsNeedRefresh
=
true
refresh
()
{
this
.
$store
.
state
.
contentIsNeedRefresh
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$store
.
state
.
contentIsNeedRefresh
=
false
})
}
}
this
.
$store
.
state
.
contentIsNeedRefresh
=
false
;
})
;
}
,
}
;
},
data
()
{
data
()
{
return
{
loading
:
true
}
loading
:
true
,
}
;
},
components
:
{
MainNavbar
,
MainSidebar
,
MainContent
,
MainThemeTools
MainThemeTools
,
},
watch
:
{
$route
:
'routeHandle'
$route
:
"routeHandle"
,
},
created
()
{
this
.
windowResizeHandle
()
this
.
routeHandle
(
this
.
$route
)
Promise
.
all
([
this
.
getUserInfo
(),
this
.
getPermissions
()
]).
then
(()
=>
{
this
.
loading
=
false
})
created
()
{
this
.
windowResizeHandle
();
this
.
routeHandle
(
this
.
$route
);
Promise
.
all
([
this
.
getUserInfo
(),
this
.
getPermissions
()]).
then
(()
=>
{
this
.
loading
=
false
;
});
},
methods
:
{
// 窗口改变大小
windowResizeHandle
()
{
this
.
$store
.
state
.
sidebarFold
=
document
.
documentElement
[
'clientWidth'
]
<=
992
||
false
window
.
addEventListener
(
'resize'
,
debounce
(()
=>
{
this
.
$store
.
state
.
sidebarFold
=
document
.
documentElement
[
'clientWidth'
]
<=
992
||
false
},
150
))
windowResizeHandle
()
{
this
.
$store
.
state
.
sidebarFold
=
document
.
documentElement
[
"clientWidth"
]
<=
992
||
false
;
window
.
addEventListener
(
"resize"
,
debounce
(()
=>
{
this
.
$store
.
state
.
sidebarFold
=
document
.
documentElement
[
"clientWidth"
]
<=
992
||
false
;
},
150
)
);
},
// 路由, 监听
routeHandle
(
route
)
{
routeHandle
(
route
)
{
if
(
!
route
.
meta
.
isTab
)
{
return
false
return
false
;
}
var
tab
=
this
.
$store
.
state
.
contentTabs
.
filter
(
item
=>
item
.
name
===
route
.
name
)[
0
]
var
tab
=
this
.
$store
.
state
.
contentTabs
.
filter
(
(
item
)
=>
item
.
name
===
route
.
name
)[
0
];
if
(
!
tab
)
{
tab
=
{
...
window
.
SITE_CONFIG
[
'contentTabDefault'
],
...
window
.
SITE_CONFIG
[
"contentTabDefault"
],
...
route
.
meta
,
'name'
:
route
.
name
,
'params'
:
{
...
route
.
params
},
'query'
:
{
...
route
.
query
}
}
this
.
$store
.
state
.
contentTabs
=
this
.
$store
.
state
.
contentTabs
.
concat
(
tab
)
name
:
route
.
name
,
params
:
{
...
route
.
params
},
query
:
{
...
route
.
query
},
};
this
.
$store
.
state
.
contentTabs
=
this
.
$store
.
state
.
contentTabs
.
concat
(
tab
);
}
this
.
$store
.
state
.
sidebarMenuActiveName
=
tab
.
menuId
this
.
$store
.
state
.
contentTabsActiveName
=
tab
.
name
this
.
$store
.
state
.
sidebarMenuActiveName
=
tab
.
menuId
;
this
.
$store
.
state
.
contentTabsActiveName
=
tab
.
name
;
},
// 获取当前管理员信息
getUserInfo
()
{
return
this
.
$http
.
get
(
'/sys/user/info'
).
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
)
}
this
.
$store
.
state
.
user
.
id
=
res
.
data
.
id
this
.
$store
.
state
.
user
.
name
=
res
.
data
.
username
this
.
$store
.
state
.
user
.
superAdmin
=
res
.
data
.
superAdmin
}).
catch
(()
=>
{})
getUserInfo
()
{
return
this
.
$http
.
get
(
"/sys/user/info"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
$store
.
state
.
user
.
id
=
res
.
data
.
id
;
this
.
$store
.
state
.
user
.
name
=
res
.
data
.
username
;
this
.
$store
.
state
.
user
.
superAdmin
=
res
.
data
.
superAdmin
;
})
.
catch
(()
=>
{});
},
// 获取权限
getPermissions
()
{
return
this
.
$http
.
get
(
'/sys/menu/permissions'
).
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
)
}
window
.
SITE_CONFIG
[
'permissions'
]
=
res
.
data
}).
catch
(()
=>
{})
}
}
}
getPermissions
()
{
return
this
.
$http
.
get
(
"/sys/menu/permissions"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
window
.
SITE_CONFIG
[
"permissions"
]
=
res
.
data
;
})
.
catch
(()
=>
{});
},
},
};
</
script
>
src/views/modules/area/area-add-or-update.vue
View file @
67a1f09c
...
...
@@ -95,6 +95,7 @@ export default {
pid
:
""
,
parentName
:
""
,
sort
:
0
,
type
:
0
,
},
};
},
...
...
@@ -170,6 +171,12 @@ export default {
},
// 上级部门树, 选中
deptListTreeCurrentChangeHandle
(
data
)
{
// console.log(data);
/* if (data.children.length <0) {
this.dataForm.type = 0;
} else {
this.dataForm.type = 1;
} */
this
.
dataForm
.
pid
=
data
.
id
;
this
.
dataForm
.
parentName
=
data
.
name
;
this
.
deptListVisible
=
false
;
...
...
src/views/modules/auditInformationManage/auditInformationManage.vue
View file @
67a1f09c
...
...
@@ -143,7 +143,7 @@ export default {
data
()
{
return
{
mixinViewModuleOptions
:
{
getDataListURL
:
"/user/user/page"
,
getDataListURL
:
"/user/user/page
?check=0
"
,
getDataListIsPage
:
true
,
exportURL
:
"/user/user/export"
,
deleteURL
:
"/user/user"
,
...
...
src/views/modules/auditInformationManage/memberManageExamine.vue
View file @
67a1f09c
...
...
@@ -33,10 +33,16 @@
<el-form-item
label=
"职位"
>
<el-input
v-model=
"dataForm.position"
></el-input>
</el-form-item>
<el-form-item
label=
"联系电话"
>
<el-form-item
label=
"联系电话"
prop=
"mobile"
>
<el-input
v-model=
"dataForm.mobile"
></el-input>
</el-form-item>
<el-form-item
label=
"邮箱"
>
<el-form-item
label=
"邮箱"
prop=
"email"
>
<el-input
v-model=
"dataForm.email"
></el-input>
</el-form-item>
...
...
@@ -66,7 +72,7 @@
v-if=
"dataForm.ifCheck==1"
label=
"所属市区级"
>
<el-select
<
!--
<
el-select
style=
"width:100%"
v-model=
"dataForm.areaName"
placeholder=
"请选择所属市区级"
...
...
@@ -78,34 +84,37 @@
:value=
"item.value"
>
</el-option>
</el-select>
<
!--
<
el-cascader
</el-select>
-->
<el-cascader
style=
"width:100%"
v-model=
"dataForm.area
Name
"
v-model=
"dataForm.area
Id
"
placeholder=
"请选择所属市区级"
:options=
"optionsOfLocation"
:props=
"
{ checkStrictly: true }"
:props=
"props"
ref=
"myCascader"
@
change=
"changearea"
clearable
>
</el-cascader>
-->
></el-cascader>
</el-form-item>
<el-form-item
required
prop=
"committee
Name
"
prop=
"committee
Id
"
v-if=
"dataForm.ifCheck==1"
label=
"所属委员会"
>
<el-select
style=
"width:100%"
v-model=
"dataForm.committeeName"
@
change=
"changename"
v-model=
"dataForm.committeeId"
placeholder=
"请选择所属委员会"
clearable
>
<el-option
v-for=
"item in optionsOfCommittee"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
>
</el-option>
</el-select>
...
...
@@ -140,7 +149,12 @@ export default {
data
()
{
return
{
type
:
this
.
$route
.
query
.
type
,
props
:
{
checkStrictly
:
true
,
value
:
"id"
,
label
:
"name"
,
children
:
"children"
,
},
dataForm
:
{
id
:
""
,
name
:
""
,
...
...
@@ -155,7 +169,7 @@ export default {
uploadDate: "", //上传日期 */
},
optionsOfLocation
:
[
{
/*
{
value: "宁波市",
label: "宁波市",
},
...
...
@@ -174,8 +188,8 @@ export default {
{
value: "镇海区",
label: "镇海区",
},
/*
{
},
*/
/* {
value: "ningbo",
label: "宁波市",
children: [
...
...
@@ -198,28 +212,7 @@ export default {
],
}, */
],
optionsOfCommittee
:
[
{
value
:
"网络安全协会"
,
label
:
"网络安全协会"
,
},
{
value
:
"网络安全协会1"
,
label
:
"网络安全协会1"
,
},
{
value
:
"网络安全协会2"
,
label
:
"网络安全协会2"
,
},
{
value
:
"网络安全协会3"
,
label
:
"网络安全协会3"
,
},
{
value
:
"网络安全协会4"
,
label
:
"网络安全协会4"
,
},
],
optionsOfCommittee
:
[],
};
},
computed
:
{
...
...
@@ -232,6 +225,20 @@ export default {
trigger: "blur",
},
], */
email
:
[
{
required
:
true
,
trigger
:
"blur"
,
validator
:
this
.
checkEmail
,
},
],
mobile
:
[
{
required
:
true
,
trigger
:
"blur"
,
validator
:
this
.
checkPhone
,
},
],
ifCheck
:
[
{
required
:
true
,
...
...
@@ -246,7 +253,7 @@ export default {
trigger
:
"blur"
,
},
],
committee
Name
:
[
committee
Id
:
[
{
required
:
true
,
message
:
this
.
$t
(
"validate.required"
),
...
...
@@ -263,6 +270,38 @@ export default {
this
.
init
();
},
methods
:
{
checkPhone
(
rule
,
value
,
callback
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"请输入正确的手机号"
));
}
else
if
(
value
==
null
)
{
return
callback
(
new
Error
(
"手机号不能为空"
));
}
else
{
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
35789
]\d{9}))
$/
;
console
.
log
(
reg
.
test
(
value
));
if
(
reg
.
test
(
value
))
{
callback
();
}
else
{
return
callback
(
new
Error
(
"请输入正确的手机号或座机号"
));
}
}
},
checkEmail
(
rule
,
value
,
callback
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"请输入正确的邮箱号"
));
}
else
if
(
value
==
null
)
{
return
callback
(
new
Error
(
"邮箱号不能为空"
));
}
else
{
const
reg
=
/^
[
a-zA-Z0-9
]
+
([
-_.
][
a-zA-Z0-9
]
+
)
*@
[
a-zA-Z0-9
]
+
([
-_.
][
a-zA-Z0-9
]
+
)
*
\.[
a-z
]{2,}
$/
;
console
.
log
(
reg
.
test
(
value
));
if
(
reg
.
test
(
value
))
{
callback
();
}
else
{
return
callback
(
new
Error
(
"请输入正确的邮箱号"
));
}
}
},
init
()
{
this
.
dataForm
.
id
=
this
.
$route
.
query
.
id
;
this
.
$nextTick
(()
=>
{
...
...
@@ -272,7 +311,10 @@ export default {
}
});
},
// 获取信息
///committee/committee/list
getInfo
()
{
this
.
$http
.
get
(
`/user/user/
${
this
.
dataForm
.
id
}
`
)
...
...
@@ -294,7 +336,44 @@ export default {
console
.
log
(
this
.
dataForm
);
})
.
catch
(()
=>
{});
this
.
$http
.
get
(
"/committee/committee/list"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
optionsOfCommittee
=
res
.
data
;
})
.
catch
(()
=>
{});
this
.
$http
.
get
(
"/area/area/list"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
optionsOfLocation
=
this
.
getTreeData
(
res
.
data
);
console
.
log
(
res
.
data
);
})
.
catch
(()
=>
{});
},
getTreeData
(
data
)
{
// 循环遍历json数据
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
children
.
length
<
1
)
{
// children若为空数组,则将children设为undefined
data
[
i
].
children
=
undefined
;
}
else
{
// children若不为空数组,则继续 递归调用 本方法
this
.
getTreeData
(
data
[
i
].
children
);
}
}
return
data
;
},
// 表单提交
dataFormSubmitHandle
:
function
()
{
this
.
$refs
[
"dataForm"
].
validate
((
valid
)
=>
{
...
...
@@ -304,6 +383,13 @@ export default {
this
.
$confirm
(
"确定提交吗?"
)
.
then
((
_
)
=>
{
if
(
this
.
dataForm
.
ifCheck
==
1
)
{
this
.
dataForm
.
member
=
1
;
}
else
if
(
this
.
dataForm
.
ifCheck
==
2
)
{
this
.
dataForm
.
member
=
2
;
}
console
.
log
(
"data"
,
this
.
dataForm
);
this
.
$http
[
!
this
.
dataForm
.
id
?
"post"
:
"put"
](
"/user/user/"
,
this
.
dataForm
...
...
@@ -348,9 +434,28 @@ export default {
})
.catch((_) => {});
}, */
changeAuditStatus
(
value
)
{
this
.
dataForm
.
ifCheck
=
value
;
},
changename
(
value
)
{
this
.
optionsOfCommittee
.
forEach
((
ele
)
=>
{
if
(
value
==
ele
.
id
)
{
this
.
dataForm
.
committeeName
=
ele
.
name
;
}
});
},
changearea
(
value
)
{
console
.
log
(
value
);
if
(
value
.
length
>
0
)
{
this
.
dataForm
.
areaId
=
value
[
value
.
length
-
1
];
let
areaNames
=
this
.
$refs
.
myCascader
.
getCheckedNodes
()[
0
].
pathLabels
;
this
.
dataForm
.
areaName
=
areaNames
[
areaNames
.
length
-
1
];
}
// console.log(this.$refs.myCascader.getCheckedNodes()[0].pathLabels);
},
//返回按钮事件
goback
()
{
this
.
$router
.
go
(
-
1
);
...
...
src/views/modules/committee/committee-add-or-update.vue
View file @
67a1f09c
...
...
@@ -22,13 +22,15 @@
></el-input>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
label=
"排序"
>
<el-input
<el-input
-number
v-model=
"dataForm.sort"
placeholder=
"排序"
></el-input>
controls-position=
"right"
:min=
"0"
label=
"排序"
></el-input-number>
</el-form-item>
</el-form>
<template
slot=
"footer"
>
...
...
src/views/modules/committee/committee.vue
View file @
67a1f09c
...
...
@@ -48,6 +48,7 @@
label=
"排序"
header-align=
"center"
align=
"center"
width=
"150"
></el-table-column>
<el-table-column
...
...
src/views/modules/meeting/committee-table.vue
View file @
67a1f09c
...
...
@@ -3,14 +3,23 @@
<el-form
:inline=
"true"
:model=
"dataForm"
@
keyup
.
enter
.
native=
"get
DataL
ist()"
@
keyup
.
enter
.
native=
"get
datal
ist()"
>
<el-form-item>
<el-input
<el-select
style=
"width:100%"
v-model=
"dataForm.committee"
placeholder=
"
委员会名称
"
placeholder=
"
请选择所属委员会
"
clearable
></el-input>
>
<el-option
v-for=
"item in optionsOfCommittee"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -23,7 +32,7 @@
<el-form-item>
<el-button
@
click=
"get
DataL
ist()"
@
click=
"get
datal
ist()"
type=
"primary"
>
{{
$t
(
'query'
)
}}
</el-button>
</el-form-item>
...
...
@@ -59,11 +68,12 @@
row-key=
"id"
border
:indent=
"16"
:default-expand-all=
"true"
:select-on-indeterminate=
"false"
@
select=
"select"
@
select-all=
"selectAll"
@
selection-change=
"selectionChange"
:tree-props=
"
{children: '
child
List'}"
:tree-props=
"
{children: '
userInfo
List'}"
>
<el-table-column
type=
"selection"
...
...
@@ -78,7 +88,7 @@
</el-table-column>
</el-table>
{{
selectArr
.
map
(
el
=>
el
.
id
)
}}
<!--
{{
selectArr
.
map
(
el
=>
el
.
id
)
}}
-->
</div>
</
template
>
...
...
@@ -87,42 +97,46 @@ import mixinViewModule from "@/mixins/view-module";
export
default
{
name
:
"committee-table"
,
mixins
:
[
mixinViewModule
],
props
:
[
"invitedUserNames"
],
data
()
{
return
{
mixinViewModuleOptions
:
{
getDataListURL
:
"/
sys/dept/l
ist"
,
deleteURL
:
"/sys/dept"
,
getDataListURL
:
"/
user/user/committeeL
ist"
,
//
deleteURL: "/sys/dept",
},
tableData
:
[
{
id
:
1
,
/*
{
id:
"10"
,
name: "会长及副会长",
childList: [
{
id
:
31
,
name
:
"
王小虎
"
,
id:
"1"
,
name: "
小明
",
},
{
id
:
32
,
name
:
"
王小虎
"
,
id:
"2"
,
name: "
小明
",
},
],
},
{
id
:
2
,
id:
"3"
,
name: "协会监事",
childList: [
{
id
:
3
,
name
:
"
张亮亮
"
,
id:
"4"
,
name: "
小明同学
",
},
{
id
:
4
,
name
:
"
王小虎
"
,
id:
"5"
,
name: "
小明的同学小红
",
},
],
},
},
*/
],
tempaalist
:
[],
tempbblist
:
[],
optionsOfCommittee
:
[],
selectArr
:
[],
dataForm
:
{
committee
:
""
,
...
...
@@ -130,21 +144,130 @@ export default {
},
};
},
mounted
()
{
this
.
getdatalist
();
this
.
getInfo
();
},
methods
:
{
getInfo
()
{
this
.
$http
.
get
(
"/committee/committee/list"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
optionsOfCommittee
=
res
.
data
;
})
.
catch
(()
=>
{});
},
getdatalist
()
{
this
.
$http
.
get
(
"/user/user/committeeList?committee="
+
this
.
dataForm
.
committee
+
"&name="
+
this
.
dataForm
.
name
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
tableData
=
res
.
data
;
// console.log("this.tableData", this.tableData);
})
.
then
(()
=>
{
this
.
toggleSelections
(
this
.
tableData
);
})
.
catch
(()
=>
{});
},
getInclude1
(
arr1
,
arr2
)
{
let
temp
=
[];
for
(
const
item
of
arr2
)
{
arr1
.
find
((
i
)
=>
i
.
id
===
item
.
id
)
?
temp
.
push
(
item
)
:
""
;
}
return
temp
;
},
toggleSelections
(
rows
)
{
// console.log("Wodoap", this.tableData);
if
(
rows
)
{
rows
.
forEach
((
row
)
=>
{
if
(
row
.
userInfoList
)
{
row
.
userInfoList
.
map
((
j
)
=>
{
// console.log("Wodoapjjj", j);
this
.
invitedUserNames
.
map
((
i
)
=>
{
if
(
i
.
id
==
j
.
id
)
{
this
.
toggleSelection
(
j
,
true
);
}
});
});
let
templist
=
this
.
getInclude1
(
this
.
invitedUserNames
,
row
.
userInfoList
);
if
(
templist
.
length
==
row
.
userInfoList
.
length
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
);
}
// console.log("log", templist);
}
// console.log(row);
});
}
else
{
this
.
$refs
.
table
.
clearSelection
();
}
},
getTreeData
(
data
)
{
// 循环遍历json数据
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
userInfoList
.
length
<
1
)
{
// children若为空数组,则将children设为undefined
data
[
i
].
userInfoList
=
undefined
;
}
else
{
// children若不为空数组,则继续 递归调用 本方法
this
.
getTreeData
(
data
[
i
].
userInfoList
);
}
}
return
data
;
},
select
(
selection
,
row
)
{
// console.log("selection", selection);
//this.$refs.table.toggleRowSelection(1, false);
let
aatemplist
=
[];
let
bbtemplist
=
[];
selection
.
some
((
el
)
=>
{
if
(
el
.
userInfoList
)
{
aatemplist
.
push
(
el
);
}
else
{
bbtemplist
.
push
(
el
);
}
});
aatemplist
.
some
((
ele
,
index
)
=>
{
ele
.
userInfoList
.
forEach
((
el
)
=>
{
// console.log("el", el.id);
if
(
el
.
id
==
row
.
id
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
this
.
tableData
[
index
],
false
);
}
});
});
// console.log("temp", templist);
if
(
selection
.
some
((
el
)
=>
{
return
row
.
id
===
el
.
id
;
})
)
{
if
(
row
.
child
List
)
{
row
.
child
List
.
map
((
j
)
=>
{
if
(
row
.
userInfo
List
)
{
row
.
userInfo
List
.
map
((
j
)
=>
{
this
.
toggleSelection
(
j
,
true
);
});
}
}
else
{
if
(
row
.
child
List
)
{
row
.
child
List
.
map
((
j
)
=>
{
if
(
row
.
userInfo
List
)
{
row
.
userInfo
List
.
map
((
j
)
=>
{
this
.
toggleSelection
(
j
,
false
);
});
}
...
...
@@ -163,8 +286,8 @@ export default {
});
if
(
isSelect
)
{
selection
.
map
((
el
)
=>
{
if
(
el
.
child
List
)
{
el
.
child
List
.
map
((
j
)
=>
{
if
(
el
.
userInfo
List
)
{
el
.
userInfo
List
.
map
((
j
)
=>
{
this
.
toggleSelection
(
j
,
true
);
});
}
...
...
@@ -172,8 +295,8 @@ export default {
}
if
(
isCancel
)
{
this
.
tableData
.
map
((
el
)
=>
{
if
(
el
.
child
List
)
{
el
.
child
List
.
map
((
j
)
=>
{
if
(
el
.
userInfo
List
)
{
el
.
userInfo
List
.
map
((
j
)
=>
{
this
.
toggleSelection
(
j
,
false
);
});
}
...
...
@@ -182,6 +305,43 @@ export default {
},
selectionChange
(
selection
)
{
this
.
selectArr
=
selection
;
let
childByValueContent
=
[];
selection
.
forEach
((
ele
)
=>
{
if
(
ele
.
userInfoList
==
undefined
)
{
childByValueContent
.
push
(
ele
);
}
});
let
aatemplist
=
[];
let
bbtemplist
=
[];
selection
.
some
((
el
)
=>
{
if
(
el
.
userInfoList
)
{
aatemplist
.
push
(
el
);
}
else
{
bbtemplist
.
push
(
el
);
}
});
/* let templist2 = [];
templist2 = this.getInclude1(this.tableData, aa);
console.log("aaa", this.tableData.length);
console.log("bbb", templist2.length); */
this
.
tableData
.
forEach
((
ele
,
index
)
=>
{
let
templist
=
[];
templist
=
this
.
getInclude1
(
ele
.
userInfoList
,
bbtemplist
);
/* console.log("aaa", ele.userInfoList.length);
console.log("bbb", templist.length); */
if
(
ele
.
userInfoList
.
length
==
templist
.
length
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
this
.
tableData
[
index
],
true
);
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
this
.
tableData
[
index
],
false
);
}
});
this
.
$emit
(
"childByValue"
,
childByValueContent
);
},
toggleSelection
(
row
,
select
)
{
if
(
row
)
{
...
...
src/views/modules/meeting/location-table.vue
View file @
67a1f09c
This diff is collapsed.
Click to expand it.
src/views/modules/meeting/meeting.vue
View file @
67a1f09c
...
...
@@ -39,9 +39,7 @@
@
click=
"deleteHandle()"
>
{{
$t
(
'deleteBatch'
)
}}
</el-button>
</el-form-item>
<el-form-item>
<el-button
@
click=
"detail()"
>
详情测试
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"dataListLoading"
...
...
@@ -57,7 +55,7 @@
width=
"50"
></el-table-column>
<el-table-column
prop=
"
nam
e"
prop=
"
titl
e"
label=
"会议名称"
header-align=
"center"
align=
"center"
...
...
src/views/modules/meeting/meetingsAdd.vue
View file @
67a1f09c
...
...
@@ -15,9 +15,9 @@
class=
"meeting"
style=
"width:100%;border:2px solid #ccc;border-radius:5px;margin-bottom:20px"
>
<el-form-item
prop=
"
nam
e"
>
<el-form-item
prop=
"
titl
e"
>
<el-input
v-model=
"dataForm.
nam
e"
v-model=
"dataForm.
titl
e"
style=
"font-size:22px;border:0"
placeholder=
"请在这里输入会议标题"
></el-input>
...
...
@@ -39,34 +39,34 @@
</div>
<el-form-item
label=
"选择发送人员:"
prop=
"
allPeople
"
prop=
"
invitedUserIDs
"
>
<el-tooltip
:content=
"
dataForm.
allPeople"
<
!--
<
el-tooltip
:content=
"allPeople"
placement=
"left"
:disabled=
"
people
.length>0?false:true"
>
<div
class=
"peoplehide"
>
<span
v-for=
"(item,index) in people
.slice(0,200)"
:key=
"index"
>
{{
item
}}
<span
v-if=
"index
<199
&&
index
<people
.
length-1
"
>
、
</span>
</span>
<span
v-if=
"people
.length>200"
>
...
</span>
<el-button
@
click=
"isShow=true"
class=
"sendbtn"
circle
icon=
"el-icon-plus"
></el-button>
</div>
<
/el-tooltip
>
:disabled=
"
dataForm.invitedUserNames
.length>0?false:true"
>
-->
<div
class=
"peoplehide"
>
<span
v-for=
"(item,index) in dataForm.invitedUserNames
.slice(0,200)"
:key=
"index"
>
{{
item
.
name
}}
<span
v-if=
"index
<199
&&
index
<dataForm
.
invitedUserNames
.
length-1
"
>
、
</span>
</span>
<span
v-if=
"dataForm.invitedUserNames
.length>200"
>
...
</span>
<el-button
@
click=
"isShow=true"
class=
"sendbtn"
circle
icon=
"el-icon-plus"
></el-button>
</div>
<
!--
</el-tooltip>
--
>
</el-form-item>
...
...
@@ -86,13 +86,19 @@
label=
"委员会选择"
name=
"first"
>
<committeeTable
/>
<committeeTable
v-on:childByValue=
"childByValue"
:invitedUserNames=
"dataForm.invitedUserNames"
/>
</el-tab-pane>
<el-tab-pane
label=
"市区级选择"
name=
"second"
>
<locationTable
/>
<locationTable
v-on:childByValue=
"childByValue"
:invitedUserNames=
"dataForm.invitedUserNames"
/>
</el-tab-pane>
</el-tabs>
...
...
@@ -139,19 +145,28 @@ export default {
isShow
:
false
,
activeName
:
"first"
,
people
:
[
"111"
,
"222"
],
allPeople
:
""
,
peoplelist
:
[],
dataForm
:
{
id
:
""
,
nam
e
:
""
,
titl
e
:
""
,
content
:
""
,
allPeople
:
""
,
/* allPeople: "", */
invitedUserIDs
:
[],
invitedUserNames
:
[],
},
};
},
/* watch: {
invitedUserNames: function (newval, oldval) {
console.log("11", newval);
},
}, */
computed
:
{
dataRule
()
{
return
{
nam
e
:
[
titl
e
:
[
{
required
:
true
,
message
:
this
.
$t
(
"validate.required"
),
...
...
@@ -165,41 +180,83 @@ export default {
trigger
:
"blur"
,
},
],
allPeople
:
[
/*
allPeople: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
],
*/
};
},
},
created
()
{
this
.
init
();
this
.
dataForm
.
allPeople
=
this
.
people
.
join
(
","
);
},
methods
:
{
init
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"dataForm"
].
resetFields
();
if
(
this
.
$route
.
query
.
id
)
{
// console.log("uuuuuuu", this.$route.query.id);
if
(
this
.
$route
.
query
.
id
!=
undefined
)
{
this
.
dataForm
.
id
=
this
.
$route
.
query
.
id
;
// console.log(this.dataForm.id);
if
(
this
.
dataForm
.
id
)
{
this
.
getInfo
();
}
}
});
},
unique
(
arr
)
{
return
Array
.
from
(
new
Set
(
arr
));
},
unique2
(
arr
)
{
const
res
=
new
Map
();
return
arr
.
filter
((
arr
)
=>
!
res
.
has
(
arr
.
id
)
&&
res
.
set
(
arr
.
id
,
1
));
},
//确定选择人员
sub
()
{
this
.
$confirm
(
"确定提交吗?"
)
.
then
((
_
)
=>
{
this
.
isShow
=
false
;
this
.
dataForm
.
invitedUserNames
=
this
.
peoplelist
;
// console.log("pppp", this.peoplelist);
this
.
dataForm
.
invitedUserNames
=
this
.
unique2
(
this
.
dataForm
.
invitedUserNames
);
/* console.log(
"this.dataForm.invitedUserNames",
this.dataForm.invitedUserNames
); */
})
.
catch
((
_
)
=>
{});
},
childByValue
:
function
(
childValue
)
{
// childValue就是子组件传过来的值
if
(
childValue
)
{
//console.log("childValue", childValue);
/* childValue.forEach((ele) => {
this.peoplelist.push(ele);
this.dataForm.invitedUserIDs.push(ele.id);
// this.dataForm.invitedUserNames.push(ele.name);
}); */
this
.
peoplelist
=
childValue
;
this
.
dataForm
.
invitedUserIDs
=
childValue
.
map
((
el
)
=>
el
.
id
);
// this.dataForm.invitedUserIDs = childValue;
this
.
peoplelist
=
this
.
unique2
(
this
.
peoplelist
);
this
.
dataForm
.
invitedUserIDs
=
this
.
unique
(
this
.
dataForm
.
invitedUserIDs
);
}
/* this.dataForm.invitedUserNames = this.unique(
this.dataForm.invitedUserNames
); */
// this.allPeople = this.dataForm.invitedUserNames.join(",");
},
// 获取信息
getInfo
()
{
this
.
$http
...
...
@@ -208,11 +265,17 @@ export default {
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
dataForm
=
{
...
this
.
dataForm
,
...
res
.
data
,
};
console
.
log
(
this
.
dataForm
);
// console.log(this.dataForm);
// this.peoplelist=this.dataForm.
//this.allPeople = this.dataForm.invitedUserNames.join(",");
/* if (this.dataForm.invitedUserIDs == null) {
this.dataForm.invitedUserIDs = [];
} */
})
.
catch
(()
=>
{});
},
...
...
@@ -238,6 +301,9 @@ export default {
type
:
"success"
,
});
})
.
then
(()
=>
{
this
.
$router
.
go
(
-
1
);
})
.
catch
(()
=>
{});
})
.
catch
((
_
)
=>
{});
...
...
@@ -276,7 +342,7 @@ export default {
.
catch
((
_
)
=>
{});
},
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
);
//
console.log(tab, event);
},
//返回按钮事件
...
...
src/views/modules/meeting/meetingsDetail.vue
View file @
67a1f09c
...
...
@@ -7,7 +7,36 @@
<div
class=
"title"
><span
class=
"substyle"
>
会议内容
</span>
</div>
<div
class=
"meetingsContent"
>
<el-form>
<el-form-item
label=
""
>
<div
class=
"meeting"
style=
"width:100%;border:2px solid #ccc;border-radius:5px;margin-bottom:20px"
>
<el-form-item
prop=
"title"
>
<el-input
v-model=
"dataform1.title"
style=
"font-size:22px;border:0"
disabled
placeholder=
"暂无标题"
></el-input>
</el-form-item>
<el-form-item
prop=
"content"
label=
""
>
<el-input
type=
"textarea"
:rows=
"14"
resize=
"none"
v-model=
"dataform1.content"
disabled
:autosize=
"
{ minRows: 6, maxRows: 14 }"
placeholder="暂无内容"
>
</el-input>
</el-form-item>
</div>
<!--
<el-form-item
label=
""
>
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 6, maxRows: 14 }"
...
...
@@ -16,15 +45,13 @@
placeholder="暂无"
disabled
>
</el-input>
</el-form-item>
<el-form-item
required
label=
"发送人员:"
>
</el-form-item>
-->
<el-form-item
label=
"已发送人员:"
>
<el-input
disabled
type=
"textarea"
:rows=
"4"
resize=
"none"
class=
"sendpeople"
placeholder=
"暂无"
v-model=
"dataform1.people"
...
...
@@ -83,43 +110,44 @@
width=
"50"
></el-table-column>
<el-table-column
prop=
"company"
prop=
"
userInfo.
company"
label=
"单位"
header-align=
"center"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
prop=
"
userInfo.
name"
label=
"姓名"
header-align=
"center"
align=
"center"
></el-table-column>
<el-table-column
prop=
"email"
prop=
"
userInfo.
email"
label=
"邮箱"
header-align=
"center"
align=
"center"
></el-table-column>
<el-table-column
prop=
"mobile"
prop=
"
userInfo.
mobile"
label=
"手机号"
sortable=
"custom"
header-align=
"center"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
gender
"
prop=
"
userInfo.sex
"
label=
"性别"
sortable=
"custom"
header-align=
"center"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
$getDictLabel
(
"gender"
,
scope
.
row
.
gender
)
}}
<span
v-if=
"scope.row.userInfo.sex==1"
>
男
</span>
<span
v-if=
"scope.row.userInfo.sex==2"
>
女
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"position"
prop=
"
userInfo.
position"
label=
"职位"
header-align=
"center"
align=
"center"
...
...
@@ -144,6 +172,16 @@
>
</el-pagination>
</div>
<div
class=
"footer"
>
<el-button
style=
"border:1px solid #17B3A3;color:#17B3A3;width:100px;float:right;margin-top:20px"
@
click=
"goback"
>
返回
</el-button>
</div>
</div>
</el-card>
...
...
@@ -157,16 +195,17 @@ export default {
data
()
{
return
{
mixinViewModuleOptions
:
{
getDataListURL
:
"/sys/user/page"
,
getDataListURL
:
"/meeting/wlmeetingstaff/page?registrationState=1&meetingId="
+
this
.
$route
.
query
.
id
,
getDataListIsPage
:
true
,
deleteURL
:
"/sys/user"
,
deleteIsBatch
:
true
,
exportURL
:
"/
sys/user
/export"
,
exportURL
:
"/
meeting/wlmeetingstaff
/export"
,
},
dataform1
:
{
meetingContent
:
"1111"
,
people
:
"张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧,张网吧"
,
people
:
""
,
},
dataForm
:
{
company
:
""
,
...
...
@@ -174,35 +213,38 @@ export default {
},
};
},
created
()
{
this
.
init
();
},
methods
:
{
//返回按钮事件
goback
()
{
this
.
$router
.
go
(
-
1
);
},
init
()
{
console
.
log
(
this
.
$route
.
query
.
id
);
this
.
data
Form
.
id
=
this
.
$route
.
query
.
id
;
this
.
data
form1
.
id
=
this
.
$route
.
query
.
id
;
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"dataForm"
].
resetFields
();
if
(
this
.
data
Form
.
id
)
{
//
this.$refs["dataForm"].resetFields();
if
(
this
.
data
form1
.
id
)
{
this
.
getInfo
();
}
});
console
.
log
(
"ppp"
,
this
.
dataForm
.
sex
);
console
.
log
(
"pppo"
,
typeof
this
.
dataForm
.
sex
);
},
// 获取信息
getInfo
()
{
this
.
$http
.
get
(
`/meeting/meeting/
${
this
.
data
Form
.
id
}
`
)
.
get
(
`/meeting/meeting/
${
this
.
data
form1
.
id
}
`
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
data
Form
=
{
...
this
.
data
Form
,
this
.
data
form1
=
{
...
this
.
data
form1
,
...
res
.
data
,
};
console
.
log
(
"ppppppp"
,
this
.
dataForm
);
console
.
log
(
"ppp"
,
this
.
dataForm
.
sex
);
this
.
dataForm
.
sex
=
this
.
dataForm
.
sex
+
""
;
console
.
log
(
"ppppppp"
,
this
.
dataform1
);
this
.
dataform1
.
people
=
this
.
dataform1
.
invitedUserNames
.
join
(
","
);
})
.
catch
(()
=>
{});
},
...
...
@@ -211,9 +253,18 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
/deep/.el-textarea__inner {
font-size: 22px;
.meeting {
/deep/.el-input__inner {
font-size: 22px !important;
border: 0;
}
/deep/.el-textarea__inner {
font-size: 16px;
border: 0;
padding: 0 0 0 30px;
}
}
/deep/.el-input.is-disabled .el-input__inner {
color: #000;
background: #fff;
...
...
@@ -245,6 +296,9 @@ export default {
padding-left: 10px;
}
}
.footer {
width: 100%;
}
.other {
//background: #eee;
...
...
src/views/modules/sys/user-add-or-update.vue
View file @
67a1f09c
This diff is collapsed.
Click to expand it.
src/views/modules/sys/user.vue
View file @
67a1f09c
...
...
@@ -26,10 +26,11 @@
<el-form-item>
<el-form-item>
<el-cascader
v-model=
"dataForm.
location
"
v-model=
"dataForm.
area
"
placeholder=
"请选择所属市区级"
:options=
"optionsOfLocation"
:props=
"
{ checkStrictly: true }"
@
change=
"changearea"
:props=
"props"
clearable
></el-cascader>
</el-form-item>
...
...
@@ -195,8 +196,14 @@ export default {
deleteIsBatch
:
true
,
exportURL
:
"/sys/user/export"
,
},
props
:
{
checkStrictly
:
true
,
value
:
"id"
,
label
:
"name"
,
children
:
"children"
,
},
optionsOfLocation
:
[
{
/*
{
value: "ningbo",
label: "宁波",
children: [
...
...
@@ -217,15 +224,50 @@ export default {
label: "镇海区",
},
],
},
},
*/
],
dataForm
:
{
username
:
""
,
deptId
:
""
,
area
:
""
,
gender
:
""
,
},
};
},
methods
:
{
getInfo
()
{
this
.
$http
.
get
(
"/area/area/list"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
optionsOfLocation
=
this
.
getTreeData
(
res
.
data
);
console
.
log
(
res
.
data
);
})
.
catch
(()
=>
{});
},
changearea
(
value
)
{
console
.
log
(
value
);
this
.
dataForm
.
area
=
value
[
value
.
length
-
1
];
},
getTreeData
(
data
)
{
// 循环遍历json数据
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
children
.
length
<
1
)
{
// children若为空数组,则将children设为undefined
data
[
i
].
children
=
undefined
;
}
else
{
// children若不为空数组,则继续 递归调用 本方法
this
.
getTreeData
(
data
[
i
].
children
);
}
}
return
data
;
},
},
created
()
{
this
.
getInfo
();
},
components
:
{
AddOrUpdate
,
},
...
...
src/views/modules/user/user.vue
View file @
67a1f09c
...
...
@@ -29,21 +29,23 @@
v-model=
"dataForm.area"
placeholder=
"请选择所属市区级"
:options=
"optionsOfLocation"
:props=
"
{ checkStrictly: true }"
@
change=
"changearea"
:props=
"props"
clearable
></el-cascader>
</el-form-item>
<el-form-item>
<el-select
@
change=
"changename"
v-model=
"dataForm.committee"
placeholder=
"请选择所属委员会"
clearable
>
<el-option
v-for=
"item in optionsOfCommittee"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
>
</el-option>
</el-select>
...
...
@@ -191,12 +193,18 @@ export default {
data
()
{
return
{
mixinViewModuleOptions
:
{
getDataListURL
:
"/user/user/page"
,
getDataListURL
:
"/user/user/page
?check=1
"
,
getDataListIsPage
:
true
,
exportURL
:
"/user/user/export"
,
deleteURL
:
"/user/user"
,
deleteIsBatch
:
true
,
},
props
:
{
checkStrictly
:
true
,
value
:
"id"
,
label
:
"name"
,
children
:
"children"
,
},
dataForm
:
{
company
:
""
,
name
:
""
,
...
...
@@ -204,7 +212,7 @@ export default {
committee
:
""
,
},
optionsOfLocation
:
[
{
/*
{
value: "ningbo",
label: "宁波",
children: [
...
...
@@ -225,10 +233,10 @@ export default {
label: "镇海区",
},
],
},
},
*/
],
optionsOfCommittee
:
[
{
/*
{
value: "网络安全协会",
label: "网络安全协会",
},
...
...
@@ -247,11 +255,61 @@ export default {
{
value: "网络安全协会4",
label: "网络安全协会4",
},
},
*/
],
};
},
created
()
{
this
.
getInfo
();
},
methods
:
{
getInfo
()
{
this
.
$http
.
get
(
"/committee/committee/list"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
optionsOfCommittee
=
res
.
data
;
})
.
catch
(()
=>
{});
this
.
$http
.
get
(
"/area/area/list"
)
.
then
(({
data
:
res
})
=>
{
if
(
res
.
code
!==
0
)
{
return
this
.
$message
.
error
(
res
.
msg
);
}
this
.
optionsOfLocation
=
this
.
getTreeData
(
res
.
data
);
})
.
catch
(()
=>
{});
},
getTreeData
(
data
)
{
// 循环遍历json数据
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
children
.
length
<
1
)
{
// children若为空数组,则将children设为undefined
data
[
i
].
children
=
undefined
;
}
else
{
// children若不为空数组,则继续 递归调用 本方法
this
.
getTreeData
(
data
[
i
].
children
);
}
}
return
data
;
},
changename
(
value
)
{
/* this.optionsOfCommittee.forEach((ele) => {
if (value == ele.id) {
this.dataForm.committeeName = ele.name;
}
}); */
this
.
dataForm
.
committee
=
value
;
},
changearea
(
value
)
{
console
.
log
(
value
);
this
.
dataForm
.
area
=
value
[
value
.
length
-
1
];
},
taozhuan
(
id
)
{
this
.
$router
.
push
({
path
:
"/memberManageExamine"
,
...
...
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