Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
bbc6c194
Commit
bbc6c194
authored
Feb 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d8d4654f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
410 additions
and
498 deletions
+410
-498
scmAccountManagement.vue
src/components/platformModule/scmAccountManagement.vue
+410
-498
No files found.
src/components/platformModule/scmAccountManagement.vue
View file @
bbc6c194
<
style
>
.groupManagement
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
100px
;
height
:
100px
;
border-radius
:
50%
}
.groupManagement
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;}
.groupManagement
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
white
;
width
:
100px
;
height
:
100px
;
line-height
:
80px
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);}
/* 上传样式 */
.groupManagement
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
100px
;
height
:
100px
;
border-radius
:
50%
}
.groupManagement
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;}
.groupManagement
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
white
;
width
:
100px
;
height
:
100px
;
line-height
:
80px
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);}
.groupManagement
.avatar
{
width
:
100px
;
height
:
100px
;
display
:
block
;
position
:
absolute
;
left
:
0
;
top
:
0
}
.scmAccountManagement
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
100px
;
height
:
100px
;
border-radius
:
50%
}
.scmAccountManagement
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.scmAccountManagement
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
white
;
width
:
100px
;
height
:
100px
;
line-height
:
80px
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
}
/* 上传样式 */
.scmAccountManagement
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
width
:
100px
;
height
:
100px
;
border-radius
:
50%
}
.scmAccountManagement
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
.scmAccountManagement
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
white
;
width
:
100px
;
height
:
100px
;
line-height
:
80px
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
top
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.scmAccountManagement
.avatar
{
width
:
100px
;
height
:
100px
;
display
:
block
;
position
:
absolute
;
left
:
0
;
top
:
0
}
</
style
>
<
template
>
<div
class=
"flexOne groupManagement"
>
<div
class=
"combottomDiv"
style=
"height: 150px; left: 50px!important;"
v-show=
"systemShow"
>
<div
class=
"combottomTitle"
>
{{
msgTitle
}}
<span
class=
"fr"
>
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"取消"
@
click=
"systemShow=false"
/>
<input
type=
"button"
class=
"normalBtn"
value=
"保存"
@
click=
"submitForm1('addMsg1')"
/>
</span>
</div>
<el-form
:model=
"addMsg1"
:rules=
"rules1"
ref=
"addMsg1"
label-width=
"100px"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"账号:"
prop=
"AdminAccount"
>
<el-input
type=
"text"
v-model=
"addMsg1.AdminAccount"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"密码:"
prop=
"AdminPassword"
>
<el-input
type=
"text"
v-model=
"addMsg1.AdminPassword"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"姓名:"
prop=
"AdminName"
>
<el-input
type=
"text"
v-model=
"addMsg1.AdminName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"职务:"
prop=
"PostName"
>
<el-input
type=
"text"
v-model=
"addMsg1.PostName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"角色:"
prop=
"RoleName"
>
<el-input
type=
"text"
v-model=
"addMsg1.RoleName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"手机号码:"
prop=
"EmLoginMobile"
>
<el-input
type=
"text"
v-model=
"addMsg1.EmLoginMobile"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div
class=
"query-box"
>
<ul>
<li>
<span><em>
{{
$t
(
'admin.admin_group'
)
}}
</em><el-input
class=
'w210'
v-model=
"msg.GroupName"
:placeholder=
"$t('pub.pleaseImport')"
@
keyup
.
enter
.
native=
"getList"
></el-input></span>
</li>
<li>
<span><em>
{{
$t
(
'admin.admin_domain'
)
}}
</em><el-input
class=
'w210'
v-model=
"msg.Domain"
:placeholder=
"$t('pub.pleaseImport')"
@
keyup
.
enter
.
native=
"getList"
></el-input></span>
</li>
<li>
<span><em>
{{
$t
(
'admin.admin_status'
)
}}
</em><el-select
class=
'w210'
clearable
v-model=
"msg.Status"
:placeholder=
"$t('pub.unlimitedSel')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
value=
''
></el-option>
<el-option
:label=
"$t('pub.openSel')"
value=
'0'
></el-option>
<el-option
:label=
"$t('pub.closeSel')"
value=
'1'
></el-option>
</el-select>
</span>
</li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"resetPageIndex(),getList()"
/>
<input
type=
"button"
@
click=
"outerVisible = true,dialogTitle='新增集团信息'"
class=
"normalBtn"
:value=
"$t('pub.addBtn')"
/>
</li>
</ul>
</div>
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th
width=
"400"
>
{{
$t
(
'admin.admin_group'
)
}}
</th>
<th
width=
"300"
>
{{
$t
(
'admin.admin_domain'
)
}}
</th>
<th
width=
"200"
>
{{
$t
(
'admin.admin_versions'
)
}}
</th>
<th
width=
"300"
>
{{
$t
(
'admin.admin_linkman'
)
}}
</th>
<th>
{{
$t
(
'admin.admin_status'
)
}}
</th>
<th>
管理员账号
</th>
<th
width=
"200"
>
{{
$t
(
'admin.admin_operate'
)
}}
</th>
</tr>
<tr
v-for=
"(item,index) in DataList"
v-loading=
'loading'
>
<td>
{{
item
.
GroupName
}}
</td>
<td>
{{
item
.
Domain
}}
</td>
<td>
{{
item
.
VersionsName
}}
</td>
<td>
{{
item
.
ContactPersion
}}
:
{{
item
.
MobilePhone
}}
</td>
<td>
{{
item
.
Status
==
0
?
'开启'
:
'关闭'
}}
</td>
<td>
{{
item
.
EmAccount
}}
</td>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改"
placement=
"top-start"
>
<el-button
@
click=
"outerVisible = true,dialogTitle='修改集团信息',updateData(item.Id)"
type=
"primary"
icon=
"el-icon-edit"
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"公司"
placement=
"top-start"
>
<el-button
@
click=
"goUrl('companyManagement',item.Id)"
type=
"primary"
icon=
"iconfont icon-gongsi1"
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"管理员"
placement=
"top-start"
>
<el-button
@
click=
"getSystem(item)"
type=
"primary"
icon=
"iconfont icon-guanliyuan"
circle
></el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
msg.pageSize
:total=
total
>
</el-pagination>
<div
class=
"flexOne scmAccountManagement"
>
<div
class=
"query-box"
>
<ul>
<li>
<span><em>
{{
$t
(
'admin.admin_group'
)
}}
</em>
<el-input
class=
'w210'
v-model=
"msg.Name"
:placeholder=
"$t('pub.pleaseImport')"
@
keyup
.
enter
.
native=
"getList"
></el-input>
</span>
</li>
<li>
<span><em>
{{
$t
(
'admin.admin_domain'
)
}}
</em>
<el-input
class=
'w210'
v-model=
"msg.Account"
:placeholder=
"$t('pub.pleaseImport')"
@
keyup
.
enter
.
native=
"getList"
></el-input>
</span>
</li>
<li>
<span><em>
{{
$t
(
'admin.admin_status'
)
}}
</em>
<el-select
class=
'w210'
clearable
v-model=
"msg.Status"
:placeholder=
"$t('pub.unlimitedSel')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'-1'
></el-option>
<el-option
label=
"正常"
:value=
'0'
></el-option>
<el-option
label=
"禁用"
:value=
'1'
></el-option>
<el-option
label=
"删除"
:value=
'2'
></el-option>
</el-select>
</span>
</li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"resetPageIndex(),getList()"
/>
<input
type=
"button"
@
click=
"outerVisible = true,dialogTitle='新增集团信息'"
class=
"normalBtn"
:value=
"$t('pub.addBtn')"
/>
</li>
</ul>
</div>
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th
width=
"80"
>
编号
</th>
<th
width=
"100"
>
姓名
</th>
<th
width=
"100"
>
账号
</th>
<th
width=
"100"
>
状态
</th>
<th
width=
"100"
>
操作人
</th>
<th
width=
"100"
>
操作时间
</th>
<th
width=
"100"
>
操作
</th>
</tr>
<tr
v-for=
"(item,index) in DataList"
v-loading=
'loading'
:key=
"index"
>
<td>
{{
item
.
GroupName
}}
</td>
<td>
{{
item
.
Domain
}}
</td>
<td>
{{
item
.
VersionsName
}}
</td>
<td>
{{
item
.
ContactPersion
}}
:
{{
item
.
MobilePhone
}}
</td>
<td>
{{
item
.
Status
==
0
?
'开启'
:
'关闭'
}}
</td>
<td>
{{
item
.
EmAccount
}}
</td>
<td>
<el-dialog
custom-class=
'w500'
:title=
"dialogTitle"
:visible
.
sync=
"outerVisible"
center
:before-close=
"closeChangeMachie"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"120px"
>
<el-form-item
class=
'w400'
:label=
"$t('admin.admin_group')"
prop=
"GroupName"
>
<el-input
type=
"text"
v-model=
"addMsg.GroupName"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
:label=
"$t('admin.admin_domain')"
prop=
"Domain"
>
<el-input
type=
"text"
v-model=
"addMsg.Domain"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
"B2B域名"
prop=
"B2BDomain"
>
<el-input
type=
"text"
v-model=
"addMsg.B2BDomain "
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
:label=
"$t('admin.admin_address')"
prop=
"Address"
>
<el-input
type=
"text"
v-model=
"addMsg.Address"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
:label=
"$t('pub.telphone')"
prop=
"Tel"
>
<el-input
type=
"text"
v-model=
"addMsg.Tel"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改"
placement=
"top-start"
>
<el-button
@
click=
"outerVisible = true,dialogTitle='修改集团信息',updateData(item.Id)"
type=
"primary"
icon=
"el-icon-edit"
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"公司"
placement=
"top-start"
>
<el-button
@
click=
"goUrl('companyManagement',item.Id)"
type=
"primary"
icon=
"iconfont icon-gongsi1"
circle
>
</el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"管理员"
placement=
"top-start"
>
<el-button
@
click=
"getSystem(item)"
type=
"primary"
icon=
"iconfont icon-guanliyuan"
circle
></el-button>
</el-tooltip>
<el-form-item
class=
'w400'
label=
'联系人姓名'
prop=
"ContactPersion"
>
<el-input
type=
"text"
v-model=
"addMsg.ContactPersion"
:placeholder=
"$t('pub.pleaseImport')"
></el-input
>
</el-form-item
>
<el-form-item
class=
'w400'
label=
'联系人手机'
prop=
"MobilePhone"
>
<el-input
type=
"text"
v-model=
"addMsg.MobilePhone"
:placeholder=
"$t('pub.pleaseImport')"
></el-input
>
</el-form-item
>
</td
>
</tr
>
</table
>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
msg.pageSize
:total=
total
>
</el-pagination
>
<!--
<el-form-item
class=
'w400'
label=
'接机人姓名'
prop=
"AirportServicePerson"
>
<el-input
type=
"text"
v-model=
"addMsg.AirportServicePerson"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'接机人手机'
prop=
"AirportServicePhone"
>
<el-input
type=
"text"
v-model=
"addMsg.AirportServicePhone"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-dialog
custom-class=
'w500'
:title=
"dialogTitle"
:visible
.
sync=
"outerVisible"
center
:before-close=
"closeChangeMachie"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"120px"
>
<el-form-item
class=
'w400'
:label=
"$t('admin.admin_group')"
prop=
"GroupName"
>
<el-input
type=
"text"
v-model=
"addMsg.GroupName"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
:label=
"$t('admin.admin_domain')"
prop=
"Domain"
>
<el-input
type=
"text"
v-model=
"addMsg.Domain"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
"B2B域名"
prop=
"B2BDomain"
>
<el-input
type=
"text"
v-model=
"addMsg.B2BDomain "
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
:label=
"$t('admin.admin_address')"
prop=
"Address"
>
<el-input
type=
"text"
v-model=
"addMsg.Address"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
:label=
"$t('pub.telphone')"
prop=
"Tel"
>
<el-input
type=
"text"
v-model=
"addMsg.Tel"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'出团通知名'
prop=
"NoticesName"
>
<el-input
type=
"text"
v-model=
"addMsg.NoticesName"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'别名'
prop=
"Aliases"
>
<el-input
type=
"text"
v-model=
"addMsg.Aliases"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
-->
<el-form-item
class=
'w400'
label=
'系统版本'
prop=
"Versions_Id"
>
<el-select
v-model=
"addMsg.Versions_Id"
placeholder=
"请选项"
@
change=
'sendVal(addMsg.Versions_Id)'
>
<el-option
v-for=
'item in versions'
:label=
'item.VersionsName'
:key=
'item.Id'
:value=
'item.Id'
></el-option>
</el-select>
</el-form-item>
<el-form-item
class=
'w400'
label=
'账户数量'
prop=
"EmployeeNum"
>
<el-input
type=
"text"
v-model=
"addMsg.EmployeeNum"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'部门最大层级'
prop=
"MaxDepartmentTier"
>
<el-input
type=
"text"
v-model=
"addMsg.MaxDepartmentTier"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
label=
'Logo'
>
<el-upload
class=
"avatar-uploader"
:http-request=
"UploadImage"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<i
class=
"el-icon-upload2 avatar-uploader-icon"
></i>
<span
v-if=
"imageUrl"
class=
"repUp"
>
{{
$t
(
'system.up_againUp'
)
}}
</span>
<span
v-else
class=
"repUp"
>
{{
$t
(
'system.up_upImg'
)
}}
</span>
</el-upload>
</el-form-item>
<el-form-item
class=
'w400'
label=
'状态'
prop=
"Status"
>
<el-switch
v-model=
"addMsg.Status"
active-value=
"0"
inactive-value=
"1"
></el-switch>
</el-form-item>
<el-form-item
class=
'w400'
label=
'备注'
prop=
"Remarks"
>
<el-input
type=
"textarea"
v-model=
"addMsg.Remarks"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false,resetForm('addMsg')"
>
取 消
</button>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
保存
</button>
</div>
</el-dialog>
<el-form-item
class=
'w400'
label=
'联系人姓名'
prop=
"ContactPersion"
>
<el-input
type=
"text"
v-model=
"addMsg.ContactPersion"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'联系人手机'
prop=
"MobilePhone"
>
<el-input
type=
"text"
v-model=
"addMsg.MobilePhone"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'系统版本'
prop=
"Versions_Id"
>
<el-select
v-model=
"addMsg.Versions_Id"
placeholder=
"请选项"
@
change=
'sendVal(addMsg.Versions_Id)'
>
<el-option
v-for=
'item in versions'
:label=
'item.VersionsName'
:key=
'item.Id'
:value=
'item.Id'
></el-option>
</el-select>
</el-form-item>
<el-form-item
class=
'w400'
label=
'账户数量'
prop=
"EmployeeNum"
>
<el-input
type=
"text"
v-model=
"addMsg.EmployeeNum"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
class=
'w400'
label=
'部门最大层级'
prop=
"MaxDepartmentTier"
>
<el-input
type=
"text"
v-model=
"addMsg.MaxDepartmentTier"
:placeholder=
"$t('pub.pleaseImport')"
></el-input>
</el-form-item>
<el-form-item
label=
'Logo'
>
<el-upload
class=
"avatar-uploader"
:http-request=
"UploadImage"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<i
class=
"el-icon-upload2 avatar-uploader-icon"
></i>
<span
v-if=
"imageUrl"
class=
"repUp"
>
{{
$t
(
'system.up_againUp'
)
}}
</span>
<span
v-else
class=
"repUp"
>
{{
$t
(
'system.up_upImg'
)
}}
</span>
</el-upload>
</el-form-item>
<el-form-item
class=
'w400'
label=
'状态'
prop=
"Status"
>
<el-switch
v-model=
"addMsg.Status"
active-value=
"0"
inactive-value=
"1"
></el-switch>
</el-form-item>
<el-form-item
class=
'w400'
label=
'备注'
prop=
"Remarks"
>
<el-input
type=
"textarea"
v-model=
"addMsg.Remarks"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false,resetForm('addMsg')"
>
取 消
</button>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
保存
</button>
</div>
</el-dialog>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msgTitle
:
'添加管理员'
,
loading
:
true
,
value
:
''
,
DataList
:
''
,
versions
:
[],
chosenIndex
:
-
1
,
res
:
{},
total
:
0
,
pageSize
:
''
,
currentPage
:
1
,
outerVisible
:
false
,
innerVisible
:
false
,
isRight
:
true
,
dialogTitle
:
''
,
imageUrl
:
''
,
rules
:
{
//表单验证
GroupName
:
[{
required
:
true
,
message
:
'请输入集团名'
,
trigger
:
'blur'
}],
Domain
:
[{
required
:
true
,
message
:
'请输入域名'
,
trigger
:
'blur'
}],
B2BDomain
:
[{
required
:
true
,
message
:
'请输入B2B域名'
,
trigger
:
'blur'
}],
Address
:
[{
required
:
true
,
message
:
'请输入地址'
,
trigger
:
'blur'
}],
Tel
:
[{
required
:
true
,
message
:
'请输入座机'
,
trigger
:
'blur'
}],
ContactPersion
:
[{
required
:
true
,
message
:
'请输入联系人姓名'
,
trigger
:
'blur'
}],
MobilePhone
:
[{
required
:
true
,
message
:
'请输入联系人电话'
,
trigger
:
'blur'
}],
Versions_Id
:
[{
required
:
true
,
message
:
'请选择系统版本名'
,
trigger
:
'change'
}],
Remarks
:
[{
required
:
false
,
}],
EmployeeNum
:[{
required
:
true
,
message
:
'请输入账户人数'
,
trigger
:
'blur'
}],
MaxDepartmentTier
:
[
{
required
:
true
,
pattern
:
/^
([
1-9
][
0-9
]{0,1}
|100
)
$/
,
message
:
'部门最大层级为1~100'
}
],
},
rules1
:{
EmLoginMobile
:
[
{
required
:
true
,
message
:
'请输入手机号码'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
0|86|17951
)?(
13
[
0-9
]
|15
[
012356789
]
|17
[
012356789
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
57
])[
0-9
]{8}
$/
,
message
:
'请输入正确的手机'
}
],
AdminAccount
:
[{
required
:
true
,
message
:
'请输入账号'
,
trigger
:
'blur'
}],
AdminPassWord
:
[{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
}],
AdminName
:
[{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
}],
PostName
:
[{
required
:
true
,
message
:
'请输入职务'
,
trigger
:
'blur'
}],
RoleName
:
[{
required
:
true
,
message
:
'请输入角色'
,
trigger
:
'blur'
}],
},
msg
:
{
//请求数据
"pageIndex"
:
1
,
'pageSize'
:
15
,
'Status'
:
''
,
'GroupName'
:
''
,
'Domain'
:
''
},
addMsg1
:{
GroupId
:
''
,
RoleName
:
''
,
AdminAccount
:
''
,
AdminPassword
:
''
,
AdminName
:
''
,
PostName
:
''
,
EmLoginMobile
:
''
},
addMsg
:
{
'GroupName'
:
''
,
'Domain'
:
''
,
'B2BDomain'
:
''
,
'EmployeeNum'
:
'0'
,
'ContactPersion'
:
''
,
'MobilePhone'
:
''
,
'Tel'
:
''
,
'Address'
:
''
,
'Remarks'
:
''
,
'Status'
:
'0'
,
'NoticesName'
:
''
,
'AirportServicePerson'
:
''
,
'AirportServicePhone'
:
''
,
'Aliases'
:
''
,
'Versions_Id'
:
''
,
"MaxDepartmentTier"
:
''
,
"Logo"
:
''
},
verSionMsg
:
{
Status
:
0
},
canSave
:
true
,
systemShow
:
false
,
newUserList
:[]
}
},
mounted
()
{
this
.
getList
();
this
.
getVersion
();
},
methods
:
{
//上传图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
this
.
imageUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
this
.
addMsg
.
Logo
=
x
.
data
.
FilePath
;
});
export
default
{
data
()
{
return
{
msgTitle
:
'添加管理员'
,
loading
:
true
,
value
:
''
,
DataList
:
''
,
versions
:
[],
chosenIndex
:
-
1
,
res
:
{},
total
:
0
,
pageSize
:
''
,
currentPage
:
1
,
outerVisible
:
false
,
innerVisible
:
false
,
isRight
:
true
,
dialogTitle
:
''
,
imageUrl
:
''
,
msg
:
{
//请求数据
pageIndex
:
1
,
pageSize
:
15
,
Status
:
-
1
,
Name
:
''
,
Account
:
''
},
addMsg1
:
{
GroupId
:
''
,
RoleName
:
''
,
AdminAccount
:
''
,
AdminPassword
:
''
,
AdminName
:
''
,
PostName
:
''
,
EmLoginMobile
:
''
},
addMsg
:
{
Id
:
0
,
//编号
Name
:
""
,
//姓名
Account
:
""
,
//账号
Pwd
:
""
,
//密码
SupplierId
:
0
,
//供应商编号
HeadImg
:
""
,
//头像
},
verSionMsg
:
{
Status
:
0
},
canSave
:
true
,
systemShow
:
false
,
newUserList
:
[]
}
},
mounted
()
{
this
.
getList
();
this
.
getVersion
();
},
sendVal
(
id
){
let
obj
=
this
.
versions
.
find
(
item
=>
item
.
Id
===
id
)
if
(
obj
)
{
this
.
addMsg
.
EmployeeNum
=
obj
.
EmployeeNum
}
},
saveSystem
(){
this
.
apipost
(
'admin_post_SetAdminAccount'
,
this
.
addMsg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
systemShow
=
false
;
this
.
getList
()
this
.
resetForm1
(
'addMsg1'
);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
getSystem
(
obj
){
this
.
addMsg1
.
GroupId
=
obj
.
Id
this
.
systemShow
=
true
if
(
obj
.
EmAccount
==
''
||
obj
.
EmAccount
==
null
)
{
this
.
canSave
=
true
this
.
msgTitle
=
'添加管理员'
}
else
{
this
.
canSave
=
false
this
.
msgTitle
=
'修改管理员'
}
this
.
apipost
(
'admin_get_GetAdminAccountForRoleList'
,{
GroupId
:
obj
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
newUserList
=
res
.
data
.
data
this
.
getSystemInfo
(
obj
.
Id
)
}
},
err
=>
{})
},
getSystemInfo
(
id
){
this
.
apipost
(
'admin_get_GetAdminAccount'
,{
GroupId
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
addMsg1
.
PostName
=
res
.
data
.
data
.
PostName
this
.
addMsg1
.
AdminName
=
res
.
data
.
data
.
AdminName
this
.
addMsg1
.
AdminAccount
=
res
.
data
.
data
.
AdminAccount
this
.
addMsg1
.
AdminPassWord
=
res
.
data
.
data
.
AdminPassWord
this
.
addMsg1
.
RoleName
=
res
.
data
.
data
.
RoleName
this
.
addMsg1
.
EmLoginMobile
=
res
.
data
.
data
.
EmLoginMobile
}
},
err
=>
{})
},
handleAvatarSuccess
(
res
,
file
)
{
//上传
if
(
res
.
resultCode
==
1
){
var
img_path
=
res
.
data
.
FullFilePath
this
.
addMsg
.
Logo
=
res
.
data
.
FilePath
this
.
imageUrl
=
img_path
}
},
beforeAvatarUpload
(
file
)
{
//上传-
// const isJPG = file.type === 'image/jpeg';
// const isLt2M = file.size / 1024 / 1024
<
2
;
// if (!isJPG) {
// this.$message.error('上传头像图片只能是 JPG 格式!');
// }
// if (!isLt2M) {
// this.$message.error('上传头像图片大小不能超过 2MB!');
// }
// return isJPG && isLt2M;
},
getList
()
{
//获取数据
this
.
loading
=
true
this
.
apipost
(
'admin_get_GroupGetPageList'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
this
.
DataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{}
},
err
=>
{})
},
getVersion
()
{
//获取版本信息
this
.
apipost
(
'admin_get_SysVersionsGetList'
,
this
.
verSionMsg
,
res
=>
{
this
.
versions
=
res
.
data
.
data
;
},
err
=>
{
methods
:
{
//上传图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/Temporary/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
this
.
imageUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
this
.
addMsg
.
Logo
=
x
.
data
.
FilePath
;
});
},
sendVal
(
id
)
{
let
obj
=
this
.
versions
.
find
(
item
=>
item
.
Id
===
id
)
if
(
obj
)
{
this
.
addMsg
.
EmployeeNum
=
obj
.
EmployeeNum
}
},
saveSystem
()
{
this
.
apipost
(
'admin_post_SetAdminAccount'
,
this
.
addMsg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
systemShow
=
false
;
this
.
getList
()
this
.
resetForm1
(
'addMsg1'
);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
getSystem
(
obj
)
{
this
.
addMsg1
.
GroupId
=
obj
.
Id
this
.
systemShow
=
true
if
(
obj
.
EmAccount
==
''
||
obj
.
EmAccount
==
null
)
{
this
.
canSave
=
true
this
.
msgTitle
=
'添加管理员'
}
else
{
this
.
canSave
=
false
this
.
msgTitle
=
'修改管理员'
}
this
.
apipost
(
'admin_get_GetAdminAccountForRoleList'
,
{
GroupId
:
obj
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
newUserList
=
res
.
data
.
data
this
.
getSystemInfo
(
obj
.
Id
)
}
},
err
=>
{})
},
getSystemInfo
(
id
)
{
this
.
apipost
(
'admin_get_GetAdminAccount'
,
{
GroupId
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg1
.
PostName
=
res
.
data
.
data
.
PostName
this
.
addMsg1
.
AdminName
=
res
.
data
.
data
.
AdminName
this
.
addMsg1
.
AdminAccount
=
res
.
data
.
data
.
AdminAccount
this
.
addMsg1
.
AdminPassWord
=
res
.
data
.
data
.
AdminPassWord
this
.
addMsg1
.
RoleName
=
res
.
data
.
data
.
RoleName
this
.
addMsg1
.
EmLoginMobile
=
res
.
data
.
data
.
EmLoginMobile
}
},
err
=>
{})
},
handleAvatarSuccess
(
res
,
file
)
{
//上传
if
(
res
.
resultCode
==
1
)
{
var
img_path
=
res
.
data
.
FullFilePath
this
.
addMsg
.
Logo
=
res
.
data
.
FilePath
this
.
imageUrl
=
img_path
}
},
beforeAvatarUpload
(
file
)
{
//上传-
},
getList
()
{
//获取数据
this
.
loading
=
true
this
.
apipost
(
'admin_get_GroupGetPageList'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
loading
=
false
this
.
DataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{}
},
err
=>
{})
},
getVersion
()
{
//获取版本信息
this
.
apipost
(
'admin_get_SysVersionsGetList'
,
this
.
verSionMsg
,
res
=>
{
this
.
versions
=
res
.
data
.
data
;
},
err
=>
{
})
},
addData
()
{
//新增数据
this
.
apipost
(
'admin_post_GroupSet'
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
outerVisible
=
false
;
this
.
getList
()
this
.
resetForm
(
'addMsg'
);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
updateData
(
id
)
{
this
.
apipost
(
'admin_get_GroupGet'
,
{
GroupId
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
this
.
addMsg
.
Status
=
res
.
data
.
data
.
Status
.
toString
()
this
.
imageUrl
=
this
.
addMsg
.
Logo
;
}
else
{}
},
err
=>
{})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
resetPageIndex
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
})
},
addData
()
{
//新增数据
this
.
apipost
(
'admin_post_GroupSet'
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
outerVisible
=
false
;
this
.
getList
()
this
.
resetForm
(
'addMsg'
);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
updateData
(
id
)
{
this
.
apipost
(
'admin_get_GroupGet'
,
{
GroupId
:
id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
this
.
addMsg
.
Status
=
res
.
data
.
data
.
Status
.
toString
()
this
.
imageUrl
=
this
.
addMsg
.
Logo
;
}
else
{}
},
err
=>
{})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
resetPageIndex
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
},
menuShow
(
index
)
{
this
.
chosenIndex
=
this
.
chosenIndex
==
index
?
-
1
:
index
;
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
tab
:
'公司管理'
}
})
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addData
()
}
else
{
return
false
;
}
});
},
submitForm1
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
saveSystem
()
}
else
{
return
false
;
}
});
},
closeChangeMachie
(
done
)
{
//弹出框关闭初始化弹框内表单
done
();
this
.
resetForm
(
'addMsg'
);
},
resetForm
(
formName
)
{
//弹出框取消 初始化谈框内表单
this
.
$refs
[
formName
].
resetFields
();
this
.
addMsg
.
Id
=
'-1'
this
.
addMsg
.
Logo
=
''
;
this
.
imageUrl
=
''
;
}
}
}
},
menuShow
(
index
)
{
this
.
chosenIndex
=
this
.
chosenIndex
==
index
?
-
1
:
index
;
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
tab
:
'公司管理'
}
})
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addData
()
}
else
{
return
false
;
}
});
},
submitForm1
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
saveSystem
()
}
else
{
return
false
;
}
});
},
closeChangeMachie
(
done
)
{
//弹出框关闭初始化弹框内表单
done
();
this
.
resetForm
(
'addMsg'
);
},
resetForm
(
formName
)
{
//弹出框取消 初始化谈框内表单
this
.
$refs
[
formName
].
resetFields
();
this
.
addMsg
.
Id
=
'-1'
this
.
addMsg
.
Logo
=
''
;
this
.
imageUrl
=
''
;
}
}
}
</
script
>
\ No newline at end of file
</
script
>
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