|
@@ -96,12 +96,12 @@
|
|
|
<el-table-column :style="{ width: '21.4%' }" label="角色" width="21.4%">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.role == '企业管理员'" class="company_user">
|
|
|
- {{ scope.row.role }}<i v-if="scope.row.niche_dis">、</i>{{ scope.row.niche_dis ? '企业商机分配' : '' }}
|
|
|
+ {{ scope.row.role }}<i>、</i>{{ setAllocition(scope.row.niche_dis) }}
|
|
|
</span>
|
|
|
<span v-if="scope.row.role == '部门管理员'" class="depart_user">
|
|
|
- {{ scope.row.role }}<i v-if="scope.row.niche_dis">、</i>{{ scope.row.niche_dis ? '部门商机分配' : '' }}
|
|
|
+ {{ scope.row.role }}<i>、</i>{{ setAllocition(scope.row.niche_dis) }}
|
|
|
</span>
|
|
|
- <span v-if="scope.row.role == ''">员工<i v-if="scope.row.niche_dis">、</i><span v-if="scope.row.niche_dis">{{ scope.row.niche_dis === 1 ? '企业商机分配' : '部门商机分配' }}</span></span>
|
|
|
+ <span v-if="scope.row.role == ''">员工<i>、</i><span>{{ setAllocition(scope.row.niche_dis) }}</span></span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -200,6 +200,17 @@
|
|
|
@focus="chooseDepartFc"
|
|
|
></el-input>
|
|
|
</label>
|
|
|
+ <label class="">
|
|
|
+ <span>角色:</span>
|
|
|
+ <el-select v-model="ruleForm.allocation" placeholder="请选择角色">
|
|
|
+ <el-option
|
|
|
+ v-for="item in alloList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </label>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot="deleteBtn">
|
|
@@ -337,6 +348,7 @@ export default {
|
|
|
email: '',
|
|
|
personId: '',
|
|
|
account: '',
|
|
|
+ allocation: '',
|
|
|
nameStatus: false,
|
|
|
phoneStatus: false,
|
|
|
emailStatus: false,
|
|
@@ -374,7 +386,17 @@ export default {
|
|
|
rules: {
|
|
|
pass: [{ validator: validatePass, trigger: 'blur' }],
|
|
|
checkPass: [{ validator: validatePass2, trigger: 'blur' }]
|
|
|
- }
|
|
|
+ },
|
|
|
+ alloList: [{
|
|
|
+ value: '1',
|
|
|
+ label: '销售'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '资讯分配'
|
|
|
+ }, {
|
|
|
+ value: '3',
|
|
|
+ label: '资讯分配+销售'
|
|
|
+ }],
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -418,6 +440,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setAllocition (data) {
|
|
|
+ let str = ''
|
|
|
+ switch (data) {
|
|
|
+ case 0:
|
|
|
+ str = '销售'
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ str = '企业资讯分配'
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ str = '部门资讯分配'
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ str = '企业资讯分配+销售'
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ str = '部门资讯分配+销售'
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return str
|
|
|
+ },
|
|
|
// 打开重置密码弹框 传入姓名、手机号
|
|
|
resetPwdFn (data) {
|
|
|
this.pwdForm.name = data.name
|
|
@@ -692,7 +735,8 @@ export default {
|
|
|
phone: this.ruleForm.phone,
|
|
|
mail: this.ruleForm.email,
|
|
|
user_name: this.ruleForm.account,
|
|
|
- id: deparId
|
|
|
+ id: deparId,
|
|
|
+ nicheDis: this.ruleForm.allocation
|
|
|
}).then((res) => {
|
|
|
this.pending = false
|
|
|
if (res.data.status == 1) {
|
|
@@ -718,6 +762,7 @@ export default {
|
|
|
mail: this.ruleForm.email,
|
|
|
did: deparId,
|
|
|
user_name: this.ruleForm.account,
|
|
|
+ nicheDis: this.ruleForm.allocation,
|
|
|
id: this.ruleForm.personId
|
|
|
}).then((res) => {
|
|
|
this.pending = false
|