|
@@ -1,10 +1,8 @@
|
|
|
<template>
|
|
|
<div class="set_role_box">
|
|
|
- <!-- <el-alert v-show="tips_show" title="功道云积分系统共有5种角色,不同角色拥有不同的权限" @close="tips_close " type="warning"></el-alert> -->
|
|
|
<el-alert v-show="tips_show" class="diy-tip" title="温馨提示:" type="warning" @close="tips_close" description show-icon>
|
|
|
<p>功道云积分系统共有5种角色,不同角色拥有不同的权限</p>
|
|
|
</el-alert>
|
|
|
-
|
|
|
<el-row :gutter="0" class="set_role_div">
|
|
|
<el-tabs v-model="activeName" type="card" style="width:100%;padding:10px 0 0 10px">
|
|
|
<el-tab-pane label="角色" name="first">
|
|
@@ -27,19 +25,29 @@
|
|
|
<el-button type="text" style=" padding: 0; line-height: initial;" v-show="item_info.code !== 'creator'" @click="dataAccessPopup">数据查看权限></el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="60" style="margin-bottom: 20px;">
|
|
|
+ <el-row :gutter="60" style="margin-bottom: 20px;">
|
|
|
<el-col v-if="item_info.code == 'creator'" :span="24"><span class="roleTipClass" >创始人为默认角色,拥有所有功能权限,该角色不可改</span></el-col>
|
|
|
<el-col v-if="item_info.code == 'admin'" :span="24"><span class="roleTipClass" >公司管理员一般为合伙人、股东等高级管理人员,可管理多个部门和人员</span></el-col>
|
|
|
<el-col v-if="item_info.code == 'point_manager'" :span="24"><span class="roleTipClass" >积分专员一般为人事、行政等管理督办人员,可管理多个部门和人员</span></el-col>
|
|
|
<el-col v-if="item_info.code == 'dept_manager'" :span="24"><span class="roleTipClass" >部门管理员一般为部门/团队经理、主管、组长,可管理一部分人员</span></el-col>
|
|
|
<el-col v-if="item_info.code == 'employee'" :span="24"><span class="roleTipClass" >员工为默认角色,每个人都拥有员工角色的功能权限,该角色不可修改</span></el-col>
|
|
|
</el-row>
|
|
|
- <el-row :gutter="60" style="margin-bottom: 22px;" v-show="item_info.code !== 'creator' && item_info.code !== 'employee'">
|
|
|
- <el-col :span="16" style="width:100%">
|
|
|
- <el-button type="danger" @click="del_btn" v-show="table_list != null && table_list.length != 0">删除</el-button>
|
|
|
- <el-button type="primary" @click="add_employee_show = true">添加</el-button>
|
|
|
- <!-- <el-button type="primary" v-if="item_info.code == 'dept_manager'" @click="syncScope"><i class="el-icon-refresh"></i>同步管理范围</el-button> -->
|
|
|
- <!-- <el-button v-if="item_info.code == 'dept_manager'" @click="exportEmploye = true">导出/修改管理列表</el-button> -->
|
|
|
+ <el-row :gutter="60" style="margin-bottom: 22px;" v-show="item_info.code !== 'employee'">
|
|
|
+
|
|
|
+
|
|
|
+ <el-col :span="24">
|
|
|
+ <template v-if="isStart && item_info.code == 'creator'">
|
|
|
+ <el-button type="danger" @click="del_creator" v-show="table_list.length >0">删除</el-button>
|
|
|
+ <el-button type="primary" @click="dialogFormVisible = true">添加</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-if="item_info.code != 'creator'&&item_info.code != 'dept_manager'">
|
|
|
+ <el-button type="danger" @click="del_btn" v-show="table_list.length != 0">删除</el-button>
|
|
|
+ <el-button type="primary" @click="add_employee_show = true">添加</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+<!-- <el-button type="danger" @click="del_btn" v-show="table_list != null && table_list.length != 0">删除</el-button>
|
|
|
+ <el-button type="primary" @click="add_employee_show = true">添加</el-button> -->
|
|
|
+
|
|
|
<div class="gap-right-8 fr" style="display:inline-block; width:180px;" v-if="item_info.code == 'dept_manager'">
|
|
|
<el-input
|
|
|
placeholder="搜索员工姓名"
|
|
@@ -52,33 +60,35 @@
|
|
|
</el-input>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
+
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-table :data="table_list" v-show="item_info.code == 'creator'">
|
|
|
- <el-table-column prop="name" label="姓名" fixed>
|
|
|
+ <el-table :data="table_list" v-show="item_info.code == 'creator'">
|
|
|
+ <el-table-column width="55" fixed v-if="table_list.length > 0 && isStart">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-radio class="el-radios" v-model="radio" :label="scope.row.id"></el-radio>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="姓名" min-width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<userImage class="fl" width="50px" height="50px" :id="scope.row.id" :user_name="scope.row.name"></userImage>
|
|
|
<span style="margin-left: 10px; line-height: 50px;"><WWOpenData type="userName" :openid="scope.row.name"></WWOpenData></span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="dept" label="部门" v-if="item_info.code != 'creator'">
|
|
|
- </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <el-row :gutter="30" justify="center" v-show="table_list !== null && table_list.length == 0 && item_info.code !== 'creator' && item_info.code !== 'employee'">
|
|
|
+ <el-row :gutter="30" justify="center" v-show="table_list.length == 0 && item_info.code !== 'creator' && item_info.code !== 'employee'">
|
|
|
<el-col :span="24" style="text-align: center;">
|
|
|
- <p><img src="static/images/nodata_default.png" width="200px" alt=""></p>
|
|
|
+ <p><img src="static/images/nodata_default.png" width="200px"></p>
|
|
|
还没有{{item_info.name}},<span style="color:#26A2FF;" @click="add_employee_show = true">去添加>></span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table :data="table_list" class="tableListClass" fit v-show="item_info.code !== 'creator' && item_info.code !== 'employee' && table_list !== null && table_list.length !== 0" @selection-change="handleSelectionChange">
|
|
|
-
|
|
|
+ <el-table :data="table_list" class="tableListClass" fit v-show="item_info.code !== 'creator' && item_info.code !== 'employee' && table_list !== null && table_list.length !== 0" @selection-change="handleSelectionChange">
|
|
|
<el-table-column width="55" fixed>
|
|
|
<template slot-scope="scope"><el-radio v-model="radio" :label="scope.row.id"></el-radio></template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column prop="name" label="姓名" width="170" fixed>
|
|
|
<template slot-scope="scope">
|
|
|
<userImage class="fl" width="50px" height="50px" :id="scope.row.id" :user_name="scope.row.name"></userImage>
|
|
@@ -104,7 +114,6 @@
|
|
|
<div @click="add_management_scope(scope.row)" v-show="scope.row.manage_scope_count != 0" class="cursor_pointer">{{scope.row.manage_scope_count}}人</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column>
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
<span>积分权限</span>
|
|
@@ -119,7 +128,6 @@
|
|
|
<i class="el-icon-edit" @click="setPower('aAll')"></i>
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <div @click="open_integral_limit(scope.row)" v-show="scope.row.point_limit_obj.AF == 0" class="cursor_pointer" style="text-decoration:underline">未设置</div> -->
|
|
|
<div @click="open_integral_limit(scope.row)" v-show="scope.row.point_limit_obj.AF == 0" class="cursor_pointer">0</div>
|
|
|
<div @click="open_integral_limit(scope.row)" v-show="scope.row.point_limit_obj.AF != 0" class="cursor_pointer">{{scope.row.point_limit_obj.AF}}</div>
|
|
|
</template>
|
|
@@ -130,7 +138,6 @@
|
|
|
<i class="el-icon-edit" @click="setPower('bAll')"></i>
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <div @click="open_integral_limit(scope.row)" v-show="scope.row.point_limit_obj.BF == 0" class="cursor_pointer" style="text-decoration:underline">未设置</div> -->
|
|
|
<div @click="open_integral_limit(scope.row)" v-show="scope.row.point_limit_obj.BF == 0" class="cursor_pointer">0</div>
|
|
|
<div @click="open_integral_limit(scope.row)" v-show="scope.row.point_limit_obj.BF != 0" class="cursor_pointer">{{scope.row.point_limit_obj.BF}}</div>
|
|
|
</template>
|
|
@@ -141,13 +148,11 @@
|
|
|
<i class="el-icon-edit" @click="setPower('bonuAll')"></i>
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <div @click="open_integral_limit(scope.row)" v-show="scope.row.entry_limit === 0" class="cursor_pointer" style="text-decoration:underline">未设置</div> -->
|
|
|
<div @click="open_integral_limit(scope.row)" v-show="scope.row.entry_limit > 0" class="cursor_pointer">{{scope.row.entry_limit}}</div>
|
|
|
<div @click="open_integral_limit(scope.row)" v-show="scope.row.entry_limit === '' || scope.row.entry_limit === 0">不限制</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column>
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
<span>奖扣目标</span>
|
|
@@ -224,32 +229,23 @@
|
|
|
</el-table>
|
|
|
|
|
|
<center v-show="item_info.code == 'employee'" style="padding: 100px 0px;">未设置管理角色的人员,都是普通员工</center>
|
|
|
-
|
|
|
- <!--
|
|
|
- <el-row v-show="item_info.code !== 'creator' && item_info.code !== 'employee'" v-loading="permissions_loading">
|
|
|
- <div>
|
|
|
- <div style="display:block;font-size:20px;color:#303133;margin:43px auto 10px;">功能权限</div>
|
|
|
- <div style="font-size:12px;color:#909399;margin-bottom:20px;">请根据角色的具体使用情况来分配系统可操作的功能权限</div>
|
|
|
- </div>
|
|
|
- <el-col v-for="(item,index) in permissions_list" :key="index" :span="4">
|
|
|
- <div style="padding: 10px 0;">
|
|
|
- <el-checkbox v-model="item.selected" @change="edit_permissions">{{item.name}}</el-checkbox>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- -->
|
|
|
-
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-tab-pane>
|
|
|
- <!-- <el-tab-pane label="设置直属上级" name="second">
|
|
|
- <ApproverSet></ApproverSet>
|
|
|
- </el-tab-pane> -->
|
|
|
</el-tabs>
|
|
|
</el-row>
|
|
|
+ <!-- 添加人员 -->
|
|
|
+ <EmployeeSelector
|
|
|
+ title="添加创始人"
|
|
|
+ :isChecKedAll="false"
|
|
|
+ :multi="false"
|
|
|
+ :include_self="false"
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
+ @confirm="add_creator"
|
|
|
+ />
|
|
|
|
|
|
<!-- 添加人员 -->
|
|
|
<EmployeeSelector
|
|
@@ -258,18 +254,6 @@
|
|
|
:visible.sync="add_employee_show"
|
|
|
@confirm="add_employee_confirm"
|
|
|
/>
|
|
|
- <!-- <el-dialog
|
|
|
- title="添加人员"
|
|
|
- :visible.sync="add_employee_show"
|
|
|
- :before-close="publicClose"
|
|
|
- width="700px">
|
|
|
- <EmployeeSelector1 v-if="add_employee_form" :isChecKedAll="false" ref="Employee" :employee_not_select="add_employee_not_select" :user_no_select="true" :can_select_dept="false" :visible.sync="add_employee_show" :Out_of_the_current ="true" @confirm="add_employee_confirm"></EmployeeSelector1>
|
|
|
- <span slot="footer">
|
|
|
- <el-button @click="publicClose()">取消</el-button>
|
|
|
- <el-button type="primary" @click="sub_add_employee">完成</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog> -->
|
|
|
-
|
|
|
<el-dialog
|
|
|
title="数据查看权限"
|
|
|
:visible.sync="dataAccessShow"
|
|
@@ -301,17 +285,6 @@
|
|
|
:employee_not_select ="control_limit"
|
|
|
@confirm="management_scope_confirm"
|
|
|
/>
|
|
|
- <!-- <el-dialog
|
|
|
- title="设置管理范围"
|
|
|
- :visible.sync="management_scope_show"
|
|
|
- :before-close="publicClose"
|
|
|
- width="700px">
|
|
|
- <EmployeeSelector1 v-if="management_scope_show" ref="Employee" :employee_not_select="employee_not_select" :max='add_employee_max' :selected="management_scope_arr" :can_select_dept="false" :Out_of_the_current ="true" :two_of_the_current ="true" :two_of_the_current_two ="control_limit" @confirm="management_scope_confirm"></EmployeeSelector1>
|
|
|
- <span slot="footer">
|
|
|
- <el-button @click="publicClose()">取消</el-button>
|
|
|
- <el-button type="primary" @click="sub_management_scope">完成</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog> -->
|
|
|
|
|
|
<el-dialog
|
|
|
title="设置积分权限"
|
|
@@ -534,7 +507,6 @@
|
|
|
<p>2.修改部门管理员信息</p>
|
|
|
<p>导出部门管理员信息表进行修改</p>
|
|
|
<p>上传修改好的部门管理员信息表</p>
|
|
|
-
|
|
|
<el-upload
|
|
|
:limit = '1'
|
|
|
:headers="ATOKEN"
|
|
@@ -547,24 +519,16 @@
|
|
|
<p>
|
|
|
<el-button type="primary" plain>选择文件</el-button>
|
|
|
</p>
|
|
|
-
|
|
|
</el-upload>
|
|
|
<p>先选择文件后再完成上传</p>
|
|
|
<el-button type="primary" @click="uploadFile('prize_buckle')" :loading="update_btn" plain>上传</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="align-center" style="margin-bottom:20px; float:left; margin-left:10px;">
|
|
|
</div>
|
|
|
<div class="align-center" style="margin-bottom:20px; float:left; margin-left:10px;">
|
|
|
- <!-- <el-button type="primary" @click="downloadSheet">Excel导出</el-button> -->
|
|
|
</div>
|
|
|
<div style="clear:both;"></div>
|
|
|
-
|
|
|
- <!-- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogExcelVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" plain>上传</el-button>
|
|
|
- </div> -->
|
|
|
</el-dialog>
|
|
|
|
|
|
</div>
|
|
@@ -585,6 +549,12 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 创始人相关操作
|
|
|
+ isStart: false, //是否是创始人
|
|
|
+ dialogFormVisible:false,
|
|
|
+ bossObj: '',
|
|
|
+ radio: '',
|
|
|
+
|
|
|
checked:true,
|
|
|
integralUpload:process.env.BASE_API + '/api/upload/excel',
|
|
|
publicBASE_API:process.env.BASE_API,
|
|
@@ -602,10 +572,9 @@
|
|
|
table_loading:false,
|
|
|
permissions_loading:false,
|
|
|
role_list: [],
|
|
|
- item_info: {},
|
|
|
+ item_info: {code:''},
|
|
|
keyword:'',//搜索的关键词
|
|
|
- table_list: null,
|
|
|
- // permissions_list: [],
|
|
|
+ table_list: [],
|
|
|
del_arr: [],
|
|
|
employee_show: false,
|
|
|
add_employee_max: 0,
|
|
@@ -772,6 +741,51 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //删除创始人
|
|
|
+ del_creator() {
|
|
|
+ var userData = this.$store.getters.user_info;
|
|
|
+ if (!this.radio) {
|
|
|
+ this.$message.error('请选择要删除的创始人');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.radio == userData.id) {
|
|
|
+ this.$message.error('不能删除自己');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.$confirm('确定要删除该创始人?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$http('post', '/api/role/creator/delete', { employee_id: this.radio })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 1) {
|
|
|
+ this.$message.success(res.data.msg);
|
|
|
+ this.page=1;
|
|
|
+ this.get_table_list();
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.radio = '';
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //添加老板
|
|
|
+ add_creator(val) {
|
|
|
+ if (val.employee.length > 0) {
|
|
|
+ this.bossObj = val.employee[0].id;
|
|
|
+ }
|
|
|
+ if (this.bossObj) {
|
|
|
+ this.$http('post', '/api/role/creator/add', { employee_id: this.bossObj }).then(res => {
|
|
|
+ self.$message.success('已经添加成功,请稍后刷新查看')
|
|
|
+ this.open_right(this.role_list[0]);
|
|
|
+ }).finally(() => {
|
|
|
+ this.bossObj="";
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择人员');
|
|
|
+ }
|
|
|
+ },
|
|
|
// 关闭导出
|
|
|
close_export(){
|
|
|
this.exportEmploye = false
|
|
@@ -780,25 +794,16 @@
|
|
|
// 导入 新增
|
|
|
uploadFile: function(type) {
|
|
|
let params = {};
|
|
|
- // params.type = type;
|
|
|
params.file = this.file;
|
|
|
this.update_btn = true
|
|
|
this.$http('post','/api/employee/prize_import', params).then(res => {
|
|
|
if(res.data.code == 1) {
|
|
|
this.close_export()
|
|
|
- // this.dialogExcelVisible = false;
|
|
|
this.$message.success({
|
|
|
type:'上传成功',
|
|
|
message:res.data.msg
|
|
|
})
|
|
|
this.get_table_list()
|
|
|
- // if(res.data.data.length != 0 && res.data.data.length != undefined){
|
|
|
- // this.error_list_show = true
|
|
|
- // this.error_list = res.data.data
|
|
|
- // }else{
|
|
|
- // this.loadBaseData();
|
|
|
- // this.loadEmployeeList()
|
|
|
- // }
|
|
|
}
|
|
|
}).catch(()=>{
|
|
|
if(res.data.msg == ''){
|
|
@@ -820,17 +825,11 @@
|
|
|
for(let i in this.role_list){
|
|
|
if(this.role_list[i].code == "dept_manager"){
|
|
|
role_id = this.role_list[i].id
|
|
|
- // window.open('/api/employee/prize_export?role_id='+this.role_list[i].id)
|
|
|
}
|
|
|
}
|
|
|
let params = {
|
|
|
role_id : role_id
|
|
|
}
|
|
|
- // if(this.filter.dept_id!='') {
|
|
|
- // params.dept_id = this.filter.dept_id
|
|
|
- // }else if(this.filter.keywords!='') {
|
|
|
- // params.keywords = this.filter.keywords
|
|
|
- // }
|
|
|
this.$http('get','/api/employee/prize_export',params)
|
|
|
.then(res => {
|
|
|
if(res.data.code == 1) {
|
|
@@ -873,7 +872,6 @@
|
|
|
}).catch(()=>{
|
|
|
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
// 数据查看权限弹窗
|
|
|
dataAccessPopup(){
|
|
@@ -891,13 +889,11 @@
|
|
|
self.dataAccessList.forEach(element => {
|
|
|
element.name == 'event_range'?element.code = resData.event_range:''
|
|
|
element.name == 'prize_range'?element.code = resData.prize_range:''
|
|
|
- // element.name == 'performance_range'?element.code = resData.performance_range:''
|
|
|
element.name == 'statistics_range'?element.code = resData.statistics_range:''
|
|
|
});
|
|
|
}else{
|
|
|
self.dataAccessListEmployee.forEach(element => {
|
|
|
element.name == 'event_range'?element.code = resData.event_range:''
|
|
|
- // element.name == 'performance_range'?element.code = resData.performance_range:''
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
@@ -1069,15 +1065,6 @@
|
|
|
self.integral_limit_form.deduct_task_monthly = this.completionABArr(resultData.deduct_task_monthly)
|
|
|
this.checked = resultData.task_enable == 0 ?false:true
|
|
|
self.integral_limit_form.reward_task_monthly = this.completionABArr(resultData.reward_task_monthly)
|
|
|
- // if(self.integral_limit_form.point_limit !== null && self.integral_limit_form.point_limit.length == 0){
|
|
|
- // self.integral_limit_form.point_limit = [{name: "A分", point: 0, pt_id: 2},{name: "B分", point: 0, pt_id: 3}]
|
|
|
- // }
|
|
|
- // if(self.integral_limit_form.deduct_task_monthly !== null && self.integral_limit_form.deduct_task_monthly.length == 0){
|
|
|
- // self.integral_limit_form.deduct_task_monthly = [{name: "A分", point: 0, pt_id: 2},{name: "B分", point: 0, pt_id: 3}]
|
|
|
- // }
|
|
|
- // if(self.integral_limit_form.reward_task_monthly !== null && self.integral_limit_form.reward_task_monthly.length == 0){
|
|
|
- // self.integral_limit_form.reward_task_monthly = [{name: "A分", point: 0, pt_id: 2},{name: "B分", point: 0, pt_id: 3}]
|
|
|
- // }
|
|
|
if(self.integral_limit_form.entry_limit === -1){
|
|
|
self.integral_limit_form.entry_limit = ''
|
|
|
}
|
|
@@ -1159,7 +1146,6 @@
|
|
|
self.role_loading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
//添加编辑管理范围
|
|
|
management_scope_confirm(val){
|
|
|
let self = this
|
|
@@ -1184,28 +1170,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //设置管理范围
|
|
|
- // sub_management_scope(){
|
|
|
- // let self = this;
|
|
|
- // this.$refs.Employee.confirm();//调用组件的confirm();
|
|
|
- // self.$http('POST','/api/employee/scope',{employee_id: self.list_info.id,id: self.management_arr},).then((res) => {
|
|
|
- // if (res.data.code == 1) {
|
|
|
- // self.$message.success("设置成功!")
|
|
|
- // self.table_list.forEach(element => {
|
|
|
- // if (element.id == self.list_info.id) {
|
|
|
- // element.manage_scope_count = self.management_arr.length
|
|
|
- // }
|
|
|
- // });
|
|
|
- // self.management_scope_show = false
|
|
|
- // window.plus?plus.storage.removeItem('SET_EMPLOYEE_MAP'):localStorage.removeItem('SET_EMPLOYEE_MAP')
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$store.dispatch('get_employee_map').then((res) => {})
|
|
|
- // })
|
|
|
- // } else{
|
|
|
- // self.$message.error(res.data.msg)
|
|
|
- // }
|
|
|
- // }).catch((e) => {self.$message.error(e.data.msg)})
|
|
|
- // },
|
|
|
edit_permissions(){
|
|
|
let self = this
|
|
|
let data = {role_id: self.item_info.id,permissions: []}
|
|
@@ -1237,14 +1201,12 @@
|
|
|
})
|
|
|
},
|
|
|
open_right(data){
|
|
|
- // console.log(data);
|
|
|
// 根据选择人员权限来显示不同的权限数据范围
|
|
|
this.jurisdiction=data.code=='employee'? this.dataAccessListEmployee:this.dataAccessList;
|
|
|
this.item_info = data
|
|
|
if(data.code!='employee'){
|
|
|
this.get_table_list()
|
|
|
}
|
|
|
- // this.get_permissions_list()
|
|
|
},
|
|
|
get_table_list(){
|
|
|
let self = this
|
|
@@ -1258,6 +1220,7 @@
|
|
|
}
|
|
|
this.syncScopeId = syncScopeIds
|
|
|
}
|
|
|
+
|
|
|
let point_types = self.$store.getters.point_types
|
|
|
let point_type_map = {}
|
|
|
for(let i in point_types){
|
|
@@ -1284,13 +1247,15 @@
|
|
|
if(!data[i]['point_limit_obj']){
|
|
|
data[i]['point_limit_obj'] = {}
|
|
|
}
|
|
|
- for(let k in data[i].point_limit){
|
|
|
- data[i]['point_limit_obj'][point_type_map[data[i].point_limit[k].pt_id].code] = data[i].point_limit[k].point
|
|
|
+ if(self.item_info.code!='creator'){
|
|
|
+ for(let k in data[i].point_limit){
|
|
|
+ data[i]['point_limit_obj'][point_type_map[data[i].point_limit[k].pt_id].code] = data[i].point_limit[k].point
|
|
|
+ }
|
|
|
}
|
|
|
this.add_employee_not_select.push(data[i].id)
|
|
|
}
|
|
|
- this.removeAdmin()
|
|
|
this.table_list = data
|
|
|
+ this.removeAdmin()
|
|
|
} else {
|
|
|
self.$message.error(res.data.msg)
|
|
|
}
|
|
@@ -1318,7 +1283,6 @@
|
|
|
bool = true
|
|
|
}, 5000)
|
|
|
} else {
|
|
|
- // console.log('不执行')
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
@@ -1327,7 +1291,7 @@
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- if(self.radio == self.$store.getters.user_info.id){
|
|
|
+ if(self.radio == self.$store.getters.user_info.id){
|
|
|
this.$message({message: '不可删除自己',type: 'warning'});
|
|
|
return
|
|
|
}
|
|
@@ -1342,9 +1306,6 @@
|
|
|
this.get_table_list()
|
|
|
})
|
|
|
})
|
|
|
- // setTimeout(() => {
|
|
|
- // this.get_table_list()
|
|
|
- // }, 1000);
|
|
|
},
|
|
|
add_employee(){
|
|
|
|
|
@@ -1357,18 +1318,8 @@
|
|
|
});
|
|
|
this.postData()
|
|
|
},
|
|
|
- //添加编辑管理范围
|
|
|
- // management_scope_confirm(val){
|
|
|
- // let self = this
|
|
|
- // self.management_arr = []
|
|
|
- // val.employee.forEach(element => {
|
|
|
- // self.management_arr.push(element.id)
|
|
|
- // });
|
|
|
- // },
|
|
|
//公共弹窗关闭
|
|
|
publicClose(){
|
|
|
-
|
|
|
- // this.$refs.Employee.clear_data();
|
|
|
this.add_employee_show=false;
|
|
|
this.management_scope_show=false;
|
|
|
},
|
|
@@ -1436,6 +1387,7 @@
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.isStart=this.$authoritys('creator');
|
|
|
this.$store.dispatch('GetUserInfo')
|
|
|
this.get_role_list()
|
|
|
if (localStorage.getItem('role_tips')) {
|
|
@@ -1443,12 +1395,6 @@
|
|
|
}else{
|
|
|
this.tips_show = true
|
|
|
}
|
|
|
- // exec_count 月奖扣次数
|
|
|
- // exec_count_point 每少一次奖扣
|
|
|
- // reward_ratio 月奖扣比例
|
|
|
- // reward_ratio_point 比例未达标
|
|
|
- // reward_task_monthly[1].point 月奖分任务
|
|
|
- // deduct_task_monthly[1].point 月扣分任务
|
|
|
},
|
|
|
beforeDestroy(){
|
|
|
this.$store.dispatch('GetUserInfo')
|
|
@@ -1456,6 +1402,12 @@
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
+ .el-radios /deep/ .el-radio__label {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ /deep/ .radioBox .el-radio__label {
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
/deep/ .el-menu-item{
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|