|
|
|
@ -21,37 +21,20 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div style="height: 504px; max-height: 504px; overflow: auto"> |
|
|
|
|
<el-tree |
|
|
|
|
:data="orgList" |
|
|
|
|
default-expand-all |
|
|
|
|
ref="orgTree" |
|
|
|
|
node-key="id" |
|
|
|
|
highlight-current |
|
|
|
|
:expand-on-click-node="false" |
|
|
|
|
@node-click="handleNodeClick" |
|
|
|
|
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}" |
|
|
|
|
> |
|
|
|
|
<el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current |
|
|
|
|
:expand-on-click-node="false" @node-click="handleNodeClick" |
|
|
|
|
:props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }"> |
|
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
|
<span class="org-name">{{ node.label }}</span> |
|
|
|
|
<span> |
|
|
|
|
<!-- isTeam 0: 分类,1: 团队 --> |
|
|
|
|
<el-button |
|
|
|
|
v-auth="'/parner:账号管理:添加分类'" |
|
|
|
|
v-if="!data.isTeam" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-circle-plus-outline" |
|
|
|
|
@click="() => addOrg(node, data)"> |
|
|
|
|
<el-button v-auth="'/parner:账号管理:添加分类'" v-if="!data.isTeam" type="text" |
|
|
|
|
icon="el-icon-circle-plus-outline" @click="() => addOrg(node, data)"> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-auth="'/parner:账号管理:编辑分类'" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-edit-outline" |
|
|
|
|
<el-button v-auth="'/parner:账号管理:编辑分类'" type="text" icon="el-icon-edit-outline" |
|
|
|
|
@click="() => editOrg(node, data)"> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-auth="'/parner:账号管理:删除分类'" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
<el-button v-auth="'/parner:账号管理:删除分类'" type="text" icon="el-icon-delete" |
|
|
|
|
@click="() => delOrg(node, data)"> |
|
|
|
|
</el-button> |
|
|
|
|
</span> |
|
|
|
@ -60,27 +43,16 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
:title="typeForm.id ? '编辑' : '新增' + '分类'" |
|
|
|
|
:visible.sync="orgVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
width="50%" |
|
|
|
|
@close="closeType" |
|
|
|
|
> |
|
|
|
|
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false" |
|
|
|
|
width="50%" @close="closeType"> |
|
|
|
|
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px"> |
|
|
|
|
<el-form-item label="分类名称" prop="partnerClassificationName"> |
|
|
|
|
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="上级部门"> |
|
|
|
|
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span> |
|
|
|
|
<el-cascader |
|
|
|
|
v-else |
|
|
|
|
:options="orgListDia" |
|
|
|
|
v-model="cascaderValue" |
|
|
|
|
:props="cascaderProps" |
|
|
|
|
clearable |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable |
|
|
|
|
style="width: 100%"> |
|
|
|
|
</el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
@ -96,7 +68,8 @@ |
|
|
|
|
<div class="tool"> |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li> |
|
|
|
|
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input> |
|
|
|
|
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" |
|
|
|
|
clearable></el-input> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div> |
|
|
|
@ -104,22 +77,25 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" |
|
|
|
|
@selection-change="handleSelectionChange" row-key="id"> |
|
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column> |
|
|
|
|
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column> |
|
|
|
|
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column> |
|
|
|
|
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
|
|
|
|
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" |
|
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
|
<template v-if="!type"> |
|
|
|
|
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column> |
|
|
|
|
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column> |
|
|
|
|
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" |
|
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
|
<el-table-column prop="phone" label="费率" align="center" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee}}w</p> |
|
|
|
|
<p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee}}%</p> |
|
|
|
|
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee }}w</p> |
|
|
|
|
<p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee }}%</p> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
@ -130,16 +106,20 @@ |
|
|
|
|
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button> |
|
|
|
|
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button> |
|
|
|
|
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button> |
|
|
|
|
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button> |
|
|
|
|
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button> |
|
|
|
|
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" |
|
|
|
|
@click="transfer(scope.row)">转让超管</el-button> |
|
|
|
|
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" |
|
|
|
|
@click="remove(scope.row)">移除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> |
|
|
|
|
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" |
|
|
|
|
:total="total"></el-pagination> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" :close-on-click-modal="false" @close="closeAdd"> |
|
|
|
|
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" |
|
|
|
|
:close-on-click-modal="false" @close="closeAdd"> |
|
|
|
|
<p class="tips">链接/二维码失效时间:{{ expireTime }}</p> |
|
|
|
|
<p class="title">城市合伙人 <em>邀请链接</em></p> |
|
|
|
|
<p class="des">加盟商、合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p> |
|
|
|
@ -152,21 +132,24 @@ |
|
|
|
|
<img width="250" :src="qrcode" alt=""> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" :close-on-click-modal="false"> |
|
|
|
|
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" |
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<el-button type="primary" @click="showChoose">转给团队成员</el-button> |
|
|
|
|
<el-button @click="add(1)">邀请外部人员</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" :close-on-click-modal="false"> |
|
|
|
|
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" |
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
<ul class="member-list"> |
|
|
|
|
<li v-for="(item, i) in members" :key="i"> |
|
|
|
|
<div class="info"> |
|
|
|
|
<img src="@/assets/img/avatar.png" alt=""> |
|
|
|
|
<span class="name">{{ item.userName }}</span> |
|
|
|
|
</div> |
|
|
|
|
<el-radio v-model="choosePartnerId" :label="item.partnerId" :disabled="curRow.accountId === item.accountId"></el-radio> |
|
|
|
|
<el-radio v-model="choosePartnerId" :label="item.partnerId" |
|
|
|
|
:disabled="curRow.accountId === item.accountId"></el-radio> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
@ -184,22 +167,22 @@ |
|
|
|
|
<el-select class="w-100" v-model="form.roleList" multiple> |
|
|
|
|
<template v-for="item in roleList"> |
|
|
|
|
<!-- 不显示超管 --> |
|
|
|
|
<el-option |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.roleName" |
|
|
|
|
:value="item.id"> |
|
|
|
|
<el-option :key="item.id" :label="item.roleName" :value="item.id"> |
|
|
|
|
</el-option> |
|
|
|
|
</template> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="provinceId" label="省份"> |
|
|
|
|
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity"> |
|
|
|
|
<el-option v-for="(item,index) in provinces" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
|
<el-option v-for="(item, index) in provinces" :key="index" :label="item.provinceName" |
|
|
|
|
:value="item.provinceId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="cityId" label="城市"> |
|
|
|
|
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="form.provinceId ? false : true"> |
|
|
|
|
<el-option v-for="(item,index) in cities" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
|
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" |
|
|
|
|
:disabled="form.provinceId ? false : true"> |
|
|
|
|
<el-option v-for="(item, index) in cities" :key="index" :label="item.cityName" |
|
|
|
|
:value="item.cityId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
@ -220,7 +203,7 @@ import clipboard from '@/libs/clipboard' |
|
|
|
|
import axios from 'axios' |
|
|
|
|
export default { |
|
|
|
|
components: { OrgTree }, |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
accountId: this.$store.state.accountId, |
|
|
|
|
userName: this.$store.state.userName, |
|
|
|
@ -299,19 +282,19 @@ export default { |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
keyWord: function(val) { |
|
|
|
|
keyWord: function (val) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(this.initData, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
mounted () { |
|
|
|
|
this.getOrg() |
|
|
|
|
this.getProvince() |
|
|
|
|
this.getRole() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取组织 |
|
|
|
|
async getOrg() { |
|
|
|
|
async getOrg () { |
|
|
|
|
const res = await this.$post(this.api.listParner) |
|
|
|
|
const list = res.treeList |
|
|
|
|
// 没有子级,删除children属性 |
|
|
|
@ -338,13 +321,13 @@ export default { |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
// 类型回调 |
|
|
|
|
typeChange() { |
|
|
|
|
typeChange () { |
|
|
|
|
this.$refs.orgTree.setCurrentKey(null) |
|
|
|
|
this.curTeamId = '' |
|
|
|
|
this.initData() |
|
|
|
|
}, |
|
|
|
|
// 添加部门 |
|
|
|
|
addOrg(node, data) { |
|
|
|
|
addOrg (node, data) { |
|
|
|
|
const list = JSON.parse(JSON.stringify(this.orgList)) |
|
|
|
|
this.handleOrg(list) |
|
|
|
|
this.orgListDia = list |
|
|
|
@ -359,7 +342,7 @@ export default { |
|
|
|
|
this.orgVisible = true |
|
|
|
|
}, |
|
|
|
|
// 编辑部门 |
|
|
|
|
editOrg(node, data) { |
|
|
|
|
editOrg (node, data) { |
|
|
|
|
const list = JSON.parse(JSON.stringify(this.orgList)) |
|
|
|
|
this.handleOrg(list) |
|
|
|
|
this.orgListDia = list |
|
|
|
@ -374,14 +357,14 @@ export default { |
|
|
|
|
this.cascaderValue = ids |
|
|
|
|
}, |
|
|
|
|
// 关闭分类弹框 |
|
|
|
|
closeType() { |
|
|
|
|
closeType () { |
|
|
|
|
this.typeForm = { |
|
|
|
|
id: '', |
|
|
|
|
partnerClassificationName: '' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 处理更换部门的禁选 |
|
|
|
|
handleOrg(list) { |
|
|
|
|
handleOrg (list) { |
|
|
|
|
for (const i in list) { |
|
|
|
|
const e = list[i] |
|
|
|
|
// 如果是团队,则禁选 |
|
|
|
@ -393,18 +376,18 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 删除部门 |
|
|
|
|
delOrg(node, data) { |
|
|
|
|
delOrg (node, data) { |
|
|
|
|
this.$confirm(data.isTeam ? '确定删除该城市合伙人?删除后,该团队同步解散,且不可恢复!' : '确定要删除吗?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(`${this.api.deleteParner}?id=${data.id}`).then(res => { |
|
|
|
|
util.successMsg("删除成功") |
|
|
|
|
this.getOrg() |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
|
}, |
|
|
|
|
// 提交组织架构新增/编辑 |
|
|
|
|
orgSubmit() { |
|
|
|
|
orgSubmit () { |
|
|
|
|
this.$refs.typeForm.validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
const form = this.typeForm |
|
|
|
@ -419,20 +402,20 @@ export default { |
|
|
|
|
this.$post(this.api.saveParner, form).then(res => { |
|
|
|
|
util.successMsg("新增成功!") |
|
|
|
|
this.closeOrg() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
} else { |
|
|
|
|
// 编辑 |
|
|
|
|
this.$post(this.api.updateParner, form).then(res => { |
|
|
|
|
util.successMsg("编辑成功!") |
|
|
|
|
this.setKey = form.id |
|
|
|
|
this.closeOrg() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 获得点击层级里的第一个城市合伙人id |
|
|
|
|
getTeamId(list) { |
|
|
|
|
getTeamId (list) { |
|
|
|
|
for (const i in list) { |
|
|
|
|
const e = list[i] |
|
|
|
|
if (e.isTeam && !this.curTeamId) { |
|
|
|
@ -444,7 +427,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 点击树节点查询列表数据 |
|
|
|
|
handleNodeClick(data) { |
|
|
|
|
handleNodeClick (data) { |
|
|
|
|
this.type = '' |
|
|
|
|
this.curTeamId = '' |
|
|
|
|
if (data.isTeam) { |
|
|
|
@ -457,18 +440,18 @@ export default { |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
}, |
|
|
|
|
// 关闭组织新增编辑弹框 |
|
|
|
|
closeOrg() { |
|
|
|
|
closeOrg () { |
|
|
|
|
this.orgVisible = false |
|
|
|
|
this.cascaderValue = [] |
|
|
|
|
this.getOrg() |
|
|
|
|
}, |
|
|
|
|
// 查询全部 |
|
|
|
|
getAll() { |
|
|
|
|
getAll () { |
|
|
|
|
this.curTeamId = '' |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
// 员工列表 |
|
|
|
|
getList() { |
|
|
|
|
getList () { |
|
|
|
|
this.$post(this.api[this.type ? 'partnerAccountMergeList' : 'partnerAccountList'], { |
|
|
|
|
type: this.type || 1, |
|
|
|
|
partnerClassificationId: this.curTeamId, |
|
|
|
@ -483,49 +466,49 @@ export default { |
|
|
|
|
console.log("🚀 ~ file: staff.vue:479 ~ getList ~ this.listData:", this.listData) |
|
|
|
|
|
|
|
|
|
this.total = pageList.total |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}, |
|
|
|
|
// 切换页码 |
|
|
|
|
currentChange(val) { |
|
|
|
|
currentChange (val) { |
|
|
|
|
this.page = val |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
handleSelectionChange(val) { // 多选 |
|
|
|
|
handleSelectionChange (val) { // 多选 |
|
|
|
|
this.multipleSelection = val |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
initData () { |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
this.page = 1 |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
// 获取省份 |
|
|
|
|
getProvince(){ |
|
|
|
|
getProvince () { |
|
|
|
|
this.$get(this.api.queryProvince).then(res => { |
|
|
|
|
this.provinces = res.list |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
// 获取城市 |
|
|
|
|
getCity(val){ |
|
|
|
|
this.$get(this.api.queryCity,{ |
|
|
|
|
getCity (val) { |
|
|
|
|
this.$get(this.api.queryCity, { |
|
|
|
|
provinceId: this.form.provinceId |
|
|
|
|
}).then(res => { |
|
|
|
|
this.cities = res.list |
|
|
|
|
if (val) this.form.cityId = '' |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
// 删除 |
|
|
|
|
del(row) { |
|
|
|
|
del (row) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(`${this.api.delPartnerAccount}?accountId=${row.accountId}`).then(res => { |
|
|
|
|
util.successMsg("删除成功") |
|
|
|
|
this.getList() |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
|
}, |
|
|
|
|
// 移除 |
|
|
|
|
remove(row) { |
|
|
|
|
remove (row) { |
|
|
|
|
this.$confirm("确定要移除吗?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
@ -535,22 +518,22 @@ export default { |
|
|
|
|
}).then(res => { |
|
|
|
|
util.successMsg("移除成功") |
|
|
|
|
this.getList() |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
|
}, |
|
|
|
|
// 转让超管 |
|
|
|
|
transfer(row) { |
|
|
|
|
transfer (row) { |
|
|
|
|
this.curRow = row |
|
|
|
|
this.transferVisible = true |
|
|
|
|
}, |
|
|
|
|
getRole() { |
|
|
|
|
getRole () { |
|
|
|
|
// platformId 合伙人为4,具体看setting.js;port: pc端为0、小程序端为1 |
|
|
|
|
this.$get(`${this.api.roleList}?page=1&size=10000&platformId=4&port=1&name=`).then(res => { |
|
|
|
|
this.roleList = res.rolePage.records; |
|
|
|
|
}).catch(res => {}); |
|
|
|
|
}).catch(res => { }); |
|
|
|
|
}, |
|
|
|
|
// 编辑 |
|
|
|
|
edit(row) { |
|
|
|
|
edit (row) { |
|
|
|
|
if (!row.provinceId) row.provinceId = '' |
|
|
|
|
if (!row.cityId) row.cityId = '' |
|
|
|
|
row.roleList = row.roleId.split(',').map(e => +e) |
|
|
|
@ -559,7 +542,7 @@ export default { |
|
|
|
|
row.cityId && this.getCity() |
|
|
|
|
}, |
|
|
|
|
// 编辑提交 |
|
|
|
|
submitEdit() { |
|
|
|
|
submitEdit () { |
|
|
|
|
this.$refs.form.validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
@ -582,16 +565,16 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 重置密码 |
|
|
|
|
resetPassword(row) { |
|
|
|
|
resetPassword (row) { |
|
|
|
|
const newPwd = Setting.initialPassword |
|
|
|
|
this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => { |
|
|
|
|
this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => { |
|
|
|
|
util.successMsg("重置成功") |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(() => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
|
}, |
|
|
|
|
// 显示选择成员 |
|
|
|
|
showChoose() { |
|
|
|
|
showChoose () { |
|
|
|
|
this.chooseVisible = true |
|
|
|
|
this.$post(this.api.partnerAccountList, { |
|
|
|
|
type: 1, |
|
|
|
@ -601,10 +584,10 @@ export default { |
|
|
|
|
pageSize: 10000 |
|
|
|
|
}).then(({ pageList }) => { |
|
|
|
|
this.members = pageList.records |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}, |
|
|
|
|
// 选择成员提交 |
|
|
|
|
chooseSubmit() { |
|
|
|
|
chooseSubmit () { |
|
|
|
|
const { curRow } = this |
|
|
|
|
const id = this.choosePartnerId |
|
|
|
|
const member = this.members.find(e => e.partnerId === id) // 获取选择的成员 |
|
|
|
@ -619,13 +602,13 @@ export default { |
|
|
|
|
this.chooseVisible = false |
|
|
|
|
this.transferVisible = false |
|
|
|
|
this.getOrg() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
} else { |
|
|
|
|
util.warningMsg('请选择成员!') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 添加 |
|
|
|
|
add(transfer) { |
|
|
|
|
add (transfer) { |
|
|
|
|
// 非转让超管,不能在团队下加团队 |
|
|
|
|
if (!transfer) { |
|
|
|
|
const curNode = this.$refs.orgTree.getCurrentNode() |
|
|
|
@ -647,14 +630,14 @@ export default { |
|
|
|
|
responseType: 'blob' |
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
this.qrcode = window.URL.createObjectURL(data) |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
closeAdd() { |
|
|
|
|
closeAdd () { |
|
|
|
|
this.initData() |
|
|
|
|
}, |
|
|
|
|
// 复制链接 |
|
|
|
|
copy(e) { |
|
|
|
|
copy (e) { |
|
|
|
|
clipboard(this.link, e, '链接已复制!') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -665,47 +648,58 @@ export default { |
|
|
|
|
.m-b-20 { |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.org-name { |
|
|
|
|
margin-right: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.w-100 { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.wrap { |
|
|
|
|
display: flex; |
|
|
|
|
padding: 0 24px; |
|
|
|
|
|
|
|
|
|
.side { |
|
|
|
|
width: 300px; |
|
|
|
|
padding: 24px 10px 24px 0; |
|
|
|
|
margin-right: 24px; |
|
|
|
|
border-right: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.right { |
|
|
|
|
width: calc(100% - 324px); |
|
|
|
|
padding: 24px 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.add-dia { |
|
|
|
|
.tips { |
|
|
|
|
font-size: 12px; |
|
|
|
|
color: #f00; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
margin: 10px 0; |
|
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
|
|
em { |
|
|
|
|
font-style: normal; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.des { |
|
|
|
|
font-size: 13px; |
|
|
|
|
color: #7a7a7a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.link-wrap { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin: 10px 0 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.link { |
|
|
|
|
padding: 10px; |
|
|
|
|
margin-right: 15px; |
|
|
|
@ -713,6 +707,7 @@ export default { |
|
|
|
|
border-radius: 4px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/.choose-dia { |
|
|
|
|
.member-list { |
|
|
|
|
li { |
|
|
|
@ -721,17 +716,21 @@ export default { |
|
|
|
|
align-items: center; |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.info { |
|
|
|
|
display: inline-flex; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
img { |
|
|
|
|
width: 40px; |
|
|
|
|
height: 40px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.name { |
|
|
|
|
margin-left: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-radio__label { |
|
|
|
|
display: none; |
|
|
|
|
} |
|
|
|
|