|  | @@ -1,5 +1,5 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -	<div>
 | 
	
		
			
				|  |  | +	<div  class="all-box">
 | 
	
		
			
				|  |  |  		<el-alert v-if="tips_show" class="diy-tip" title="温馨提示:" type="warning" @close="tips_close" description show-icon>
 | 
	
		
			
				|  |  |  			<p>功道云积分系统共有5种角色,不同角色拥有不同的权限</p>
 | 
	
		
			
				|  |  |  		</el-alert>
 | 
	
	
		
			
				|  | @@ -7,7 +7,14 @@
 | 
	
		
			
				|  |  |  			<div class="flex-box">
 | 
	
		
			
				|  |  |  				<div class="terr-left">
 | 
	
		
			
				|  |  |  					<el-menu default-active="0" class="el-menu-vertical-demo" style="border: none" v-loading="role_loading">
 | 
	
		
			
				|  |  | -						<el-menu-item :index="index.toString()" v-for="(item, index) in role_list" :key="index" @click="open_right(item)" v-show="item.code !== 'employee'">
 | 
	
		
			
				|  |  | +						<el-menu-item
 | 
	
		
			
				|  |  | +							style="height: 47px;line-height: 47px;"
 | 
	
		
			
				|  |  | +							:index="index.toString()"
 | 
	
		
			
				|  |  | +							v-for="(item, index) in role_list"
 | 
	
		
			
				|  |  | +							:key="index"
 | 
	
		
			
				|  |  | +							@click="open_right(item)"
 | 
	
		
			
				|  |  | +							v-show="item.code !== 'employee'"
 | 
	
		
			
				|  |  | +						>
 | 
	
		
			
				|  |  |  							<i class="el-icon-s-custom"></i>
 | 
	
		
			
				|  |  |  							<span slot="title">{{ item.name }}</span>
 | 
	
		
			
				|  |  |  						</el-menu-item>
 | 
	
	
		
			
				|  | @@ -15,45 +22,52 @@
 | 
	
		
			
				|  |  |  				</div>
 | 
	
		
			
				|  |  |  				<div class="terr-right border-right flex-1">
 | 
	
		
			
				|  |  |  					<div class="margin-bottom">
 | 
	
		
			
				|  |  | -						<div class="name">部门管理者</div>
 | 
	
		
			
				|  |  | -						<div class="user_text fontColorF">部门管理员一般为部门/团队经理、主管、组长,可管理一部分人员</div>
 | 
	
		
			
				|  |  | +						<div class="name">{{ item_info.name }}</div>
 | 
	
		
			
				|  |  | +						<div class="user_text fontColorF" v-if="item_info.code == 'creator'">创始人为默认角色,拥有所有功能权限,该角色不可改</div>
 | 
	
		
			
				|  |  | +						<div class="user_text fontColorF" v-if="item_info.code == 'admin'">公司管理员一般为合伙人、股东等高级管理人员,可管理多个部门和人员</div>
 | 
	
		
			
				|  |  | +						<div class="user_text fontColorF" v-if="item_info.code == 'point_manager'">积分专员一般为人事、行政等管理督办人员,可管理多个部门和人员</div>
 | 
	
		
			
				|  |  | +						<div class="user_text fontColorF" v-if="item_info.code == 'dept_manager'">部门管理员一般为部门/团队经理、主管、组长,可管理一部分人员</div>
 | 
	
		
			
				|  |  | +						<div class="user_text fontColorF" v-if="item_info.code == 'employee'">员工为默认角色,每个人都拥有员工角色的功能权限,该角色不可修改</div>
 | 
	
		
			
				|  |  |  					</div>
 | 
	
		
			
				|  |  | -					<div class="flex-box btns flex-v-ce">
 | 
	
		
			
				|  |  | -						<el-button size="medium" @click="del_item" type="danger">删除</el-button>
 | 
	
		
			
				|  |  | -						<el-button size="medium" @click="add_item" type="primary">添加</el-button>
 | 
	
		
			
				|  |  | +					<div class="flex-box btns flex-v-ce margin-bottom">
 | 
	
		
			
				|  |  | +						<el-button size="small" v-show="item_info.code != 'creator' && table_list.length > 0" @click="del_item" type="danger">删除</el-button>
 | 
	
		
			
				|  |  | +						<el-button size="small" v-show="item_info.code != 'creator'" @click="add_item" type="primary">添加</el-button>
 | 
	
		
			
				|  |  |  					</div>
 | 
	
		
			
				|  |  | -					<el-table :data="table_list" v-show="item_info.code == 'creator'">
 | 
	
		
			
				|  |  | -						<el-table-column prop="name" label="姓名" fixed>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +					<el-table :data="table_list" v-if="item_info.code == 'creator'||item_info.code == 'employee'" v-loading="table_loading">
 | 
	
		
			
				|  |  | +						<el-table-column prop="name" label="姓名">
 | 
	
		
			
				|  |  |  							<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;">{{ scope.row.name }}</span>
 | 
	
		
			
				|  |  | +								<div class="flex-box flex-v-ce">
 | 
	
		
			
				|  |  | +									<userImage class="fl" width="50px" height="50px" :img_url="scope.row.img_url" :user_name="scope.row.name"></userImage>
 | 
	
		
			
				|  |  | +									<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.name }}</span>
 | 
	
		
			
				|  |  | +								</div>
 | 
	
		
			
				|  |  |  							</template>
 | 
	
		
			
				|  |  |  						</el-table-column>
 | 
	
		
			
				|  |  |  						<el-table-column prop="dept" label="部门" v-if="item_info.code != 'creator'"></el-table-column>
 | 
	
		
			
				|  |  | +						<template slot="empty">
 | 
	
		
			
				|  |  | +							<noData :isSolt="true">
 | 
	
		
			
				|  |  | +								<template v-slot:default>
 | 
	
		
			
				|  |  | +									<div style="position: inherit;">
 | 
	
		
			
				|  |  | +										还没有{{ item_info.name }},
 | 
	
		
			
				|  |  | +										<span style="color:#26A2FF;cursor:pointer;" @click="add_item">去添加>></span>
 | 
	
		
			
				|  |  | +									</div>
 | 
	
		
			
				|  |  | +								</template>
 | 
	
		
			
				|  |  | +							</noData>
 | 
	
		
			
				|  |  | +						</template>
 | 
	
		
			
				|  |  |  					</el-table>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					<el-row :gutter="30" justify="center">
 | 
	
		
			
				|  |  | -						<el-col :span="24" style="text-align: center;">
 | 
	
		
			
				|  |  | -							<p><img src="/static/images/nodata_default.png" width="200px" alt="" /></p>
 | 
	
		
			
				|  |  | -							还没有{{ item_info.name }},
 | 
	
		
			
				|  |  | -							<span style="color:#26A2FF;" @click="add_employee_show = true">去添加>></span>
 | 
	
		
			
				|  |  | -						</el-col>
 | 
	
		
			
				|  |  | -					</el-row>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -					<el-table
 | 
	
		
			
				|  |  | -						:data="table_list" 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>
 | 
	
		
			
				|  |  | +					<el-table :data="table_list" fit v-else  @selection-change="handleSelectionChange" v-loading="table_loading">
 | 
	
		
			
				|  |  | +						<el-table-column width="40" fixed>
 | 
	
		
			
				|  |  |  							<template slot-scope="scope">
 | 
	
		
			
				|  |  | -								<el-radio v-model="radio" :label="scope.row.id"></el-radio>
 | 
	
		
			
				|  |  | +								<el-radio v-model="radioVal" :label="scope.row.id"></el-radio>
 | 
	
		
			
				|  |  |  							</template>
 | 
	
		
			
				|  |  |  						</el-table-column>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -						<el-table-column prop="name" label="姓名" width="170" fixed>
 | 
	
		
			
				|  |  | +						<el-table-column prop="name" label="姓名" width="150" fixed>
 | 
	
		
			
				|  |  |  							<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;">{{ scope.row.name }}</span>
 | 
	
		
			
				|  |  | +								<div class="flex-box flex-v-ce">
 | 
	
		
			
				|  |  | +									<userImage class="fl" width="50px" height="50px" :img_url="scope.row.img_url" :user_name="scope.row.name"></userImage>
 | 
	
		
			
				|  |  | +									<span style="margin-left: 10px; line-height: 50px;">{{ scope.row.name }}</span>
 | 
	
		
			
				|  |  | +								</div>
 | 
	
		
			
				|  |  |  							</template>
 | 
	
		
			
				|  |  |  						</el-table-column>
 | 
	
		
			
				|  |  |  						<el-table-column prop="dept" label="部门"></el-table-column>
 | 
	
	
		
			
				|  | @@ -76,7 +90,6 @@
 | 
	
		
			
				|  |  |  								</div>
 | 
	
		
			
				|  |  |  							</template>
 | 
	
		
			
				|  |  |  						</el-table-column>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  						<el-table-column>
 | 
	
		
			
				|  |  |  							<template slot="header" slot-scope="scope">
 | 
	
		
			
				|  |  |  								<span>积分权限</span>
 | 
	
	
		
			
				|  | @@ -91,31 +104,21 @@
 | 
	
		
			
				|  |  |  							</template>
 | 
	
		
			
				|  |  |  							<el-table-column label="A分权限">
 | 
	
		
			
				|  |  |  								<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">
 | 
	
		
			
				|  |  | -										{{ scope.row.point_limit_obj.AF }}
 | 
	
		
			
				|  |  | +									<div @click="open_integral_limit(scope.row)" class="cursor_pointer">
 | 
	
		
			
				|  |  | +										<div v-for="(item, index) in scope.row.point_limit" :key="index" v-show="item.name == 'A分'" class="cursor_pointer">
 | 
	
		
			
				|  |  | +											<span v-if="item.point != 0">{{item.point}}</span>
 | 
	
		
			
				|  |  | +											<span v-else style="text-decoration:underline">未设置</span>
 | 
	
		
			
				|  |  | +										</div>
 | 
	
		
			
				|  |  |  									</div>
 | 
	
		
			
				|  |  |  								</template>
 | 
	
		
			
				|  |  |  							</el-table-column>
 | 
	
		
			
				|  |  |  							<el-table-column label="B分权限">
 | 
	
		
			
				|  |  |  								<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">
 | 
	
		
			
				|  |  | -										{{ scope.row.point_limit_obj.BF }}
 | 
	
		
			
				|  |  | +									<div @click="open_integral_limit(scope.row)" class="cursor_pointer">
 | 
	
		
			
				|  |  | +										<div v-for="(item, index) in scope.row.point_limit" :key="index" v-show="item.name == 'B分'" class="cursor_pointer">
 | 
	
		
			
				|  |  | +											<span v-if="item.point != 0">{{ item.point}}</span>
 | 
	
		
			
				|  |  | +											<span v-else style="text-decoration:underline">未设置</span>
 | 
	
		
			
				|  |  | +										</div>
 | 
	
		
			
				|  |  |  									</div>
 | 
	
		
			
				|  |  |  								</template>
 | 
	
		
			
				|  |  |  							</el-table-column>
 | 
	
	
		
			
				|  | @@ -129,7 +132,6 @@
 | 
	
		
			
				|  |  |  								</template>
 | 
	
		
			
				|  |  |  							</el-table-column>
 | 
	
		
			
				|  |  |  						</el-table-column>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  						<el-table-column>
 | 
	
		
			
				|  |  |  							<template slot="header" slot-scope="scope">
 | 
	
		
			
				|  |  |  								<span>奖扣目标</span>
 | 
	
	
		
			
				|  | @@ -226,59 +228,403 @@
 | 
	
		
			
				|  |  |  								</template>
 | 
	
		
			
				|  |  |  							</el-table-column>
 | 
	
		
			
				|  |  |  						</el-table-column>
 | 
	
		
			
				|  |  | +						<template slot="empty">
 | 
	
		
			
				|  |  | +							<noData :isSolt="true">
 | 
	
		
			
				|  |  | +								<template v-slot:default>
 | 
	
		
			
				|  |  | +									<div>还没有{{ item_info.name }},<span style="color:#26A2FF;cursor:pointer;" @click="add_item">去添加>></span></div>
 | 
	
		
			
				|  |  | +								</template>
 | 
	
		
			
				|  |  | +							</noData>
 | 
	
		
			
				|  |  | +						</template>
 | 
	
		
			
				|  |  |  					</el-table>
 | 
	
		
			
				|  |  |  				</div>
 | 
	
		
			
				|  |  |  			</div>
 | 
	
		
			
				|  |  |  		</div>
 | 
	
		
			
				|  |  | +		<el-dialog title="添加人员" :visible.sync="add_employee_show" :before-close="publicClose" width="700px" top="5vh">
 | 
	
		
			
				|  |  | +			<EmployeeSelector
 | 
	
		
			
				|  |  | +				v-if="add_employee_form"
 | 
	
		
			
				|  |  | +				ref="Employee"
 | 
	
		
			
				|  |  | +				:user_no_select="true"
 | 
	
		
			
				|  |  | +				:can_select_dept="false"
 | 
	
		
			
				|  |  | +				:multi="false"
 | 
	
		
			
				|  |  | +				:visible.sync="add_employee_show"
 | 
	
		
			
				|  |  | +				@confirm="add_employee_confirm"
 | 
	
		
			
				|  |  | +			></EmployeeSelector>
 | 
	
		
			
				|  |  | +			<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="integral_limit_show"
 | 
	
		
			
				|  |  | +		  :close-on-click-modal="false"
 | 
	
		
			
				|  |  | +		  width="700px">
 | 
	
		
			
				|  |  | +		  <el-form label-width="100px" :model="integral_limit_form" ref="integral_limit_form" v-loading="integral_limit_loading">
 | 
	
		
			
				|  |  | +		    <span v-for="(item,index) in integral_limit_form.point_limit" :key="index" v-show="item.pt_id !== 1">
 | 
	
		
			
				|  |  | +		      <el-form-item :label="item.name+'权限'" :rules="[{required: true, message: '请输入', trigger: 'blur'}]">
 | 
	
		
			
				|  |  | +		        <el-input v-model="item.point" type="Number"></el-input>
 | 
	
		
			
				|  |  | +		      </el-form-item>
 | 
	
		
			
				|  |  | +		    </span>
 | 
	
		
			
				|  |  | +		    <el-form-item label="奖分上限" :rules="[{required: true, message: '请输入', trigger: 'blur'}]">
 | 
	
		
			
				|  |  | +		      <el-input v-model="integral_limit_form.entry_limit" type="Number"></el-input>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		    <el-form-item style="text-align: right; margin-bottom: 0">
 | 
	
		
			
				|  |  | +		      <el-button @click="integral_limit_show = false">取消</el-button>
 | 
	
		
			
				|  |  | +		      <el-button type="primary" @click="sub_employee_limit">确定</el-button>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		  </el-form>
 | 
	
		
			
				|  |  | +		</el-dialog>
 | 
	
		
			
				|  |  | +		<el-dialog
 | 
	
		
			
				|  |  | +		  title="设置管理范围"
 | 
	
		
			
				|  |  | +		  :visible.sync="management_scope_show"
 | 
	
		
			
				|  |  | +		  :before-close="publicClose"
 | 
	
		
			
				|  |  | +		  top="5vh"
 | 
	
		
			
				|  |  | +		  width="700px">
 | 
	
		
			
				|  |  | +		  <EmployeeSelector 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"  @confirm="management_scope_confirm"></EmployeeSelector>
 | 
	
		
			
				|  |  | +		  <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="B分奖扣任务"
 | 
	
		
			
				|  |  | +		  :visible.sync="bonus_deducted_show"
 | 
	
		
			
				|  |  | +		  width="600px">
 | 
	
		
			
				|  |  | +		  <el-form :model="integral_limit_form" ref="integral_limit_form" :rules="integral_limit_rules" label-width="130px" v-loading="bonus_deducted_loading">
 | 
	
		
			
				|  |  | +		    <span v-for="(item,index) in integral_limit_form.reward_task_monthly" :key="index" v-show="item.name == 'B分'">
 | 
	
		
			
				|  |  | +		      <el-form-item>
 | 
	
		
			
				|  |  | +		        <template slot="label">
 | 
	
		
			
				|  |  | +		          <span>月奖分任务</span>
 | 
	
		
			
				|  |  | +		          <el-tooltip placement="top">
 | 
	
		
			
				|  |  | +		            <div slot="content" style="width: 300px;">对奖分分值作任务要求。未达分值任务的按差额扣分<br />举例说明:奖分任务1000,实际奖分980(差额20分),则该执行人员将被扣20分。反之,如实际奖分达到或超出1000分,不对执行人员实行扣分</div>
 | 
	
		
			
				|  |  | +		            <span class="tips">?</span>
 | 
	
		
			
				|  |  | +		          </el-tooltip>
 | 
	
		
			
				|  |  | +		        </template>
 | 
	
		
			
				|  |  | +		        <el-input v-model="item.point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		      </el-form-item>
 | 
	
		
			
				|  |  | +		    </span>
 | 
	
		
			
				|  |  | +		    <span v-for="(item,index) in integral_limit_form.deduct_task_monthly" :key="item.name" v-show="item.name == 'B分'">
 | 
	
		
			
				|  |  | +		      <el-form-item style="margin-bottom: 0;">
 | 
	
		
			
				|  |  | +		        <template slot="label">
 | 
	
		
			
				|  |  | +		          <span>月扣分任务</span>
 | 
	
		
			
				|  |  | +		          <el-tooltip placement="top">
 | 
	
		
			
				|  |  | +		            <div slot="content" style="width: 300px;">对扣分分值作任务要求。未达分值任务的按差额扣分<br />举例说明:扣分任务100,实际扣分80(差额20分),则该执行人员将被扣20分。反之,如实际扣分达到或超出100分,不对执行人员实行扣分</div>
 | 
	
		
			
				|  |  | +		            <span class="tips">?</span>
 | 
	
		
			
				|  |  | +		          </el-tooltip>
 | 
	
		
			
				|  |  | +		        </template>
 | 
	
		
			
				|  |  | +		        <el-input v-model="item.point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		      </el-form-item>
 | 
	
		
			
				|  |  | +		    </span>
 | 
	
		
			
				|  |  | +		    <el-form-item>
 | 
	
		
			
				|  |  | +		      <div style="font-size: 12px; color: #909399; line-height: 20px;">
 | 
	
		
			
				|  |  | +		        设置后,奖分与扣分目标其中有一项未达标,系统将自动扣除差额分值;<br />例如,A设置了月奖分目标100和月扣分目标100,到了月底,奖了80和扣了30,那该管理者将被扣90B分。
 | 
	
		
			
				|  |  | +		      </div>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		    <el-form-item prop="exec_count">
 | 
	
		
			
				|  |  | +		      <template slot="label">
 | 
	
		
			
				|  |  | +		        <span>月奖扣次数</span>
 | 
	
		
			
				|  |  | +		        <el-tooltip placement="top">
 | 
	
		
			
				|  |  | +		          <div slot="content" style="width: 300px;">对奖分和扣分的执行次数作任务要求<br />举例说明:奖扣次数任务100,实际执行次数95(差5次),假如每少一次扣5分,则该执行人员将被扣5*5=25分。反之,如果任务达标,不对执行人员实行扣分</div>
 | 
	
		
			
				|  |  | +		          <span class="tips">?</span>
 | 
	
		
			
				|  |  | +		        </el-tooltip>
 | 
	
		
			
				|  |  | +		      </template>
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		      <el-input v-model="integral_limit_form.exec_count" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		    <el-form-item prop="exec_count_point">
 | 
	
		
			
				|  |  | +		      <template slot="label">
 | 
	
		
			
				|  |  | +		        <span>每少一次奖扣</span>
 | 
	
		
			
				|  |  | +		        <el-tooltip placement="top">
 | 
	
		
			
				|  |  | +		          <div slot="content" style="width: 300px;">扣x分(x为输入框)<br />奖扣次数未达任务要求的,每少一次扣对应分值</div>
 | 
	
		
			
				|  |  | +		          <span class="tips">?</span>
 | 
	
		
			
				|  |  | +		        </el-tooltip>
 | 
	
		
			
				|  |  | +		      </template>
 | 
	
		
			
				|  |  | +		      <el-input v-model="integral_limit_form.exec_count_point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		    <el-form-item prop="reward_ratio">
 | 
	
		
			
				|  |  | +		      <template slot="label">
 | 
	
		
			
				|  |  | +		        <span>月奖扣比例</span>
 | 
	
		
			
				|  |  | +		        <el-tooltip placement="top">
 | 
	
		
			
				|  |  | +		          <div slot="content" style="width: 300px;">对奖分和扣分的比例作任务要求<br />举例说明:奖扣比例任务10:1,实际执行奖扣比例11:1(管理者当老好人,不敢执行扣分,导致扣分占比过低),则视为未完成,该执行人员将被扣对应分值。反之比例大于10:1,任务为达标,不对执行人员实行扣分</div>
 | 
	
		
			
				|  |  | +		          <span class="tips">?</span>
 | 
	
		
			
				|  |  | +		        </el-tooltip>
 | 
	
		
			
				|  |  | +		      </template>
 | 
	
		
			
				|  |  | +		      <el-input style="width: 100px;" type="Number" disabled placeholder="1" ></el-input>:<el-input v-model="integral_limit_form.reward_ratio" style="width: 100px;" type="Number" placeholder="请输入数值" ></el-input>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		    <el-form-item prop="reward_ratio_point">
 | 
	
		
			
				|  |  | +		      <template slot="label">
 | 
	
		
			
				|  |  | +		        <span>比例未达标</span>
 | 
	
		
			
				|  |  | +		        <el-tooltip placement="top">
 | 
	
		
			
				|  |  | +		          <div slot="content" style="width: 300px;">扣x分(x为输入框)<br />完成奖扣比例任务的,按对应分值扣分</div>
 | 
	
		
			
				|  |  | +		          <span class="tips">?</span>
 | 
	
		
			
				|  |  | +		        </el-tooltip>
 | 
	
		
			
				|  |  | +		      </template>
 | 
	
		
			
				|  |  | +		      <el-input v-model="integral_limit_form.reward_ratio_point" type="Number" placeholder="请输入数值"></el-input>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		    <el-form-item style=" text-align: right; margin-bottom: 0;">
 | 
	
		
			
				|  |  | +		      <el-button @click="bonus_deducted_colse('integral_limit_form')">取消</el-button>
 | 
	
		
			
				|  |  | +		      <el-button type="primary" @click="sub_bonus_deducted('integral_limit_form')">确定</el-button>
 | 
	
		
			
				|  |  | +		    </el-form-item>
 | 
	
		
			
				|  |  | +		  </el-form>
 | 
	
		
			
				|  |  | +		</el-dialog>
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  |  	</div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | +import EmployeeSelector from '../components/EmployeeSelector.vue';
 | 
	
		
			
				|  |  | +import noData from '@/components/noData';
 | 
	
		
			
				|  |  | +  const minimum = (rule, value,callback)=>{
 | 
	
		
			
				|  |  | +    if (value < 0){
 | 
	
		
			
				|  |  | +      callback(new Error('请输入正确的数值'))
 | 
	
		
			
				|  |  | +    }else {
 | 
	
		
			
				|  |  | +      callback()
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |  	data() {
 | 
	
		
			
				|  |  |  		return {
 | 
	
		
			
				|  |  | -			role_list: [{ name: '阿萨德' }, { name: '阿萨德' }, { name: '阿萨德' }, { name: '阿萨德' }],
 | 
	
		
			
				|  |  | +			role_list:[],
 | 
	
		
			
				|  |  |  			table_list: [],
 | 
	
		
			
				|  |  | -			tips_show:false,
 | 
	
		
			
				|  |  | -			role_loading:false,
 | 
	
		
			
				|  |  | -			item_info:{}
 | 
	
		
			
				|  |  | +			tips_show: false,
 | 
	
		
			
				|  |  | +			role_loading: false,
 | 
	
		
			
				|  |  | +			table_loading: false,
 | 
	
		
			
				|  |  | +			item_info: {},
 | 
	
		
			
				|  |  | +			rules_employee_arr: { employee: [], dept: [] },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			//添加人员相关
 | 
	
		
			
				|  |  | +			add_employee_show: false,
 | 
	
		
			
				|  |  | +			add_employee_form: { employee_ids: [] },
 | 
	
		
			
				|  |  | +			employee_arr:[],
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			radioVal: '',
 | 
	
		
			
				|  |  | +			// 设置积分相关
 | 
	
		
			
				|  |  | +			integral_limit_show:false,
 | 
	
		
			
				|  |  | +			management_scope_show:false,
 | 
	
		
			
				|  |  | +			integral_limit_loading:false,
 | 
	
		
			
				|  |  | +			integral_limit_form:{},
 | 
	
		
			
				|  |  | +			employee_not_select:[],
 | 
	
		
			
				|  |  | +			add_employee_max: 0,
 | 
	
		
			
				|  |  | +			management_scope_arr: {employee: [], dept: []},
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  | +			// 设置奖扣任务相关
 | 
	
		
			
				|  |  | +			bonus_deducted_show:false,
 | 
	
		
			
				|  |  | +			bonus_deducted_loading:false,
 | 
	
		
			
				|  |  | +			integral_limit_rules:{
 | 
	
		
			
				|  |  | +			  exec_count:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			  exec_count_point:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			  reward_ratio:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			  reward_ratio_point:[
 | 
	
		
			
				|  |  | +			    { required: true, validator: minimum, trigger: 'blur' },
 | 
	
		
			
				|  |  | +			  ],
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  |  		};
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  | -	created() {},
 | 
	
		
			
				|  |  | +	components: { EmployeeSelector, noData },
 | 
	
		
			
				|  |  | +	created() {
 | 
	
		
			
				|  |  | +		this.get_role_list();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  |  	mounted() {
 | 
	
		
			
				|  |  |  		if (localStorage.getItem('framework')) {
 | 
	
		
			
				|  |  | -		  this.tips_show = false
 | 
	
		
			
				|  |  | -		}else{
 | 
	
		
			
				|  |  | -		  this.tips_show = true
 | 
	
		
			
				|  |  | +			this.tips_show = false;
 | 
	
		
			
				|  |  | +		} else {
 | 
	
		
			
				|  |  | +			this.tips_show = true;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  |  	methods: {
 | 
	
		
			
				|  |  | -		del_item(){
 | 
	
		
			
				|  |  | -			
 | 
	
		
			
				|  |  | +		open_bonus_deducted(item){
 | 
	
		
			
				|  |  | +		  this.bonus_deducted_show = true
 | 
	
		
			
				|  |  | +		  this.set_mployee_limit_id = item.id
 | 
	
		
			
				|  |  | +		  this.get_employee_limit(item.id)
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  | -		add_item(){
 | 
	
		
			
				|  |  | -			
 | 
	
		
			
				|  |  | +		sub_bonus_deducted(fromName){
 | 
	
		
			
				|  |  | +		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
 | 
	
		
			
				|  |  | +		  this.$refs[fromName].validate((valid) => {
 | 
	
		
			
				|  |  | +		    if (valid) {
 | 
	
		
			
				|  |  | +		      this.$axios({
 | 
	
		
			
				|  |  | +		        url: '/api/integral/employee/limit',
 | 
	
		
			
				|  |  | +		        method: 'post',
 | 
	
		
			
				|  |  | +		        data: this.integral_limit_form
 | 
	
		
			
				|  |  | +		      }).then((res) => {
 | 
	
		
			
				|  |  | +		        if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +		          this.$message.success(res.data.msg)
 | 
	
		
			
				|  |  | +		          setTimeout(() => {
 | 
	
		
			
				|  |  | +		            this.get_table_list()
 | 
	
		
			
				|  |  | +		          }, 1000);
 | 
	
		
			
				|  |  | +		          this.bonus_deducted_show = false
 | 
	
		
			
				|  |  | +		        }else{
 | 
	
		
			
				|  |  | +		          this.$message.error(res.data.msg)
 | 
	
		
			
				|  |  | +		        }
 | 
	
		
			
				|  |  | +		      })
 | 
	
		
			
				|  |  | +		    }
 | 
	
		
			
				|  |  | +		  });
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  | -		// 关闭提示语
 | 
	
		
			
				|  |  | -		tips_close() {
 | 
	
		
			
				|  |  | -		  localStorage.setItem('framework','true')
 | 
	
		
			
				|  |  | -		  this.tips_show = false
 | 
	
		
			
				|  |  | +		bonus_deducted_colse(fromName){
 | 
	
		
			
				|  |  | +		  this.bonus_deducted_show = false
 | 
	
		
			
				|  |  | +		  this.$refs[fromName].resetFields()
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		//设置管理范围
 | 
	
		
			
				|  |  | +		sub_management_scope(){
 | 
	
		
			
				|  |  | +		  this.$refs.Employee.confirm();//调用组件的confirm();
 | 
	
		
			
				|  |  | +		  this.$axios({
 | 
	
		
			
				|  |  | +		    url: '/api/employee/scope',
 | 
	
		
			
				|  |  | +		    method: 'POST',
 | 
	
		
			
				|  |  | +		    data: {employee_id: this.list_info.id,id: this.management_arr},
 | 
	
		
			
				|  |  | +		  }).then((res) => {
 | 
	
		
			
				|  |  | +		    if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +		      this.$message.success("设置成功!")
 | 
	
		
			
				|  |  | +		      this.table_list.forEach(element => {
 | 
	
		
			
				|  |  | +		        if (element.id == this.list_info.id) {
 | 
	
		
			
				|  |  | +		          element.manage_scope_count = this.management_arr.length
 | 
	
		
			
				|  |  | +		        }
 | 
	
		
			
				|  |  | +		      });
 | 
	
		
			
				|  |  | +		      this.management_scope_show = false
 | 
	
		
			
				|  |  | +		    } else{
 | 
	
		
			
				|  |  | +		      this.$message.error(res.data.msg)
 | 
	
		
			
				|  |  | +		    }
 | 
	
		
			
				|  |  | +		  }).catch((e) => {this.$message.error(e.data.msg)})
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		//添加编辑管理范围
 | 
	
		
			
				|  |  | +		management_scope_confirm(val){
 | 
	
		
			
				|  |  | +		  this.management_arr = []
 | 
	
		
			
				|  |  | +		  val.employee.forEach(element => {
 | 
	
		
			
				|  |  | +		    this.management_arr.push(element.id)
 | 
	
		
			
				|  |  | +		  });
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		add_management_scope(item){
 | 
	
		
			
				|  |  | +		  this.list_info = item;
 | 
	
		
			
				|  |  | +		  this.employee_not_select = [item.id]
 | 
	
		
			
				|  |  | +		  this.management_scope_arr.employee=[];
 | 
	
		
			
				|  |  | +		  this.$axios.get('/api/employee/info',{params: {id: this.list_info.id}}).then((res) => {
 | 
	
		
			
				|  |  | +		    if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +		      this.management_scope_arr.employee = res.data.data.employee_detail.manage_scope||[];//获取当前数据的管理范围
 | 
	
		
			
				|  |  | +		      this.management_scope_show = true
 | 
	
		
			
				|  |  | +		    } else {
 | 
	
		
			
				|  |  | +		      this.$message.error(res.data.msg)
 | 
	
		
			
				|  |  | +		    }
 | 
	
		
			
				|  |  | +		  }).finally(() => {
 | 
	
		
			
				|  |  | +		    this.role_loading = false
 | 
	
		
			
				|  |  | +		  })
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		sub_employee_limit(){
 | 
	
		
			
				|  |  | +		  this.integral_limit_form.employee_id = this.set_mployee_limit_id
 | 
	
		
			
				|  |  | +		  this.$axios.post('/api/integral/employee/limit',this.integral_limit_form).then((res) => {
 | 
	
		
			
				|  |  | +		    if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +		      this.$message.success(res.data.msg)
 | 
	
		
			
				|  |  | +		      this.get_table_list()
 | 
	
		
			
				|  |  | +		      this.integral_limit_show = false
 | 
	
		
			
				|  |  | +		    }else{
 | 
	
		
			
				|  |  | +		      this.$message.error(res.data.msg)
 | 
	
		
			
				|  |  | +		    }
 | 
	
		
			
				|  |  | +		  }).catch((e) => {this.$message.error(e.data.msg)})
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		open_integral_limit(item){
 | 
	
		
			
				|  |  | +		  this.integral_limit_show = true
 | 
	
		
			
				|  |  | +		  this.set_mployee_limit_id = item.id
 | 
	
		
			
				|  |  | +		  this.get_employee_limit(item.id);
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		get_employee_limit(id){
 | 
	
		
			
				|  |  | +		  this.integral_limit_loading = true
 | 
	
		
			
				|  |  | +		  this.$axios.get('/api/integral/employee/limit',{params: {employee_id: id}}).then((res) => {
 | 
	
		
			
				|  |  | +		    if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +		       var item = res.data.data;
 | 
	
		
			
				|  |  | +				if (item.point_limit == null || item.point_limit == undefined||item.point_limit.length==0) {
 | 
	
		
			
				|  |  | +					item.point_limit = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				if (item.deduct_task_monthly == null || item.deduct_task_monthly == undefined||item.deduct_task_monthly.length==0) {
 | 
	
		
			
				|  |  | +					item.deduct_task_monthly = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				if (item.reward_task_monthly == null || item.reward_task_monthly == undefined||item.reward_task_monthly.length==0) {
 | 
	
		
			
				|  |  | +					item.reward_task_monthly = [{ name: 'A分', point: '0', pt_id: this.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: this.$getTyps('BF').id }];
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				this.integral_limit_form=item
 | 
	
		
			
				|  |  | +		    } else {
 | 
	
		
			
				|  |  | +		      this.$message.error(res.data.msg)
 | 
	
		
			
				|  |  | +		    }
 | 
	
		
			
				|  |  | +		  }).finally(() => {
 | 
	
		
			
				|  |  | +		    this.integral_limit_loading = false
 | 
	
		
			
				|  |  | +		  })
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		sub_add_employee(form) {
 | 
	
		
			
				|  |  | +			  var that=this;
 | 
	
		
			
				|  |  | +			   this.$refs.Employee.confirm();//调用组件的confirm();
 | 
	
		
			
				|  |  | +			   			console.log(this.employee_arr)
 | 
	
		
			
				|  |  | +			   this.employee_arr.forEach(element => {
 | 
	
		
			
				|  |  | +					 this.$axios.put('/api/role/user',{role_id: this.item_info.id,employee_id: element}).then((res) => {
 | 
	
		
			
				|  |  | +					   if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +						 this.$message.success(res.data.msg)
 | 
	
		
			
				|  |  | +						 this.add_employee_show= false
 | 
	
		
			
				|  |  | +						 setTimeout(() => {
 | 
	
		
			
				|  |  | +						   that.get_table_list()
 | 
	
		
			
				|  |  | +						 }, 1000);
 | 
	
		
			
				|  |  | +					   } else{
 | 
	
		
			
				|  |  | +						 this.$message.error(res.data.msg)
 | 
	
		
			
				|  |  | +					   }
 | 
	
		
			
				|  |  | +					 }).catch((e) => {this.$message.error(e.data.msg)})
 | 
	
		
			
				|  |  | +			  });
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		add_employee_confirm(val) {
 | 
	
		
			
				|  |  | +			this.employee_arr = []
 | 
	
		
			
				|  |  | +			val.employee.forEach(element => {
 | 
	
		
			
				|  |  | +			   this.employee_arr.push(element.id)
 | 
	
		
			
				|  |  | +			});
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +		//关闭弹窗
 | 
	
		
			
				|  |  | +		publicClose() {
 | 
	
		
			
				|  |  | +			this.add_employee_show = false;
 | 
	
		
			
				|  |  | +			this.management_scope_show = false;
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		handleSelectionChange() {},
 | 
	
		
			
				|  |  | +		del_item() {
 | 
	
		
			
				|  |  | +			if (!this.radioVal) {
 | 
	
		
			
				|  |  | +				this.$message.error('请选择要删除的人员');
 | 
	
		
			
				|  |  | +				return false;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			this.$confirm('确定要删除该人员?', '提示', {
 | 
	
		
			
				|  |  | +				confirmButtonText: '确定',
 | 
	
		
			
				|  |  | +				cancelButtonText: '取消',
 | 
	
		
			
				|  |  | +				type: 'warning'
 | 
	
		
			
				|  |  | +			}).then(() => {
 | 
	
		
			
				|  |  | +				this.$axios({
 | 
	
		
			
				|  |  | +				url: '/api/role/user',
 | 
	
		
			
				|  |  | +				method: 'DELETE',
 | 
	
		
			
				|  |  | +				data: {role_id: this.item_info.id,employee_id: this.radioVal}
 | 
	
		
			
				|  |  | +				}).then(res => {
 | 
	
		
			
				|  |  | +					if (res.data.code == 1) {
 | 
	
		
			
				|  |  | +						this.$message.success(res.data.msg);
 | 
	
		
			
				|  |  | +						this.get_table_list();
 | 
	
		
			
				|  |  | +					} else {
 | 
	
		
			
				|  |  | +						this.$message.error(res.data.msg);
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +				});
 | 
	
		
			
				|  |  | +			});
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		add_item() {
 | 
	
		
			
				|  |  | +			this.add_employee_show = true;
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		get_role_list() {
 | 
	
		
			
				|  |  | -			let self = this;
 | 
	
		
			
				|  |  | -			self.role_loading = true;
 | 
	
		
			
				|  |  | -			self.$axios
 | 
	
		
			
				|  |  | +			this.role_loading = true;
 | 
	
		
			
				|  |  | +			this.$axios
 | 
	
		
			
				|  |  |  				.get('/api/role/list')
 | 
	
		
			
				|  |  |  				.then(res => {
 | 
	
		
			
				|  |  |  					if (res.data.code == 1) {
 | 
	
		
			
				|  |  |  						this.role_list = res.data.data.list;
 | 
	
		
			
				|  |  |  						this.open_right(this.role_list[0]);
 | 
	
		
			
				|  |  |  					} else {
 | 
	
		
			
				|  |  | -						self.$message.error(res.data.msg);
 | 
	
		
			
				|  |  | +						this.$message.error(res.data.msg);
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  				})
 | 
	
		
			
				|  |  |  				.finally(() => {
 | 
	
		
			
				|  |  | -					self.role_loading = false;
 | 
	
		
			
				|  |  | +					this.role_loading = false;
 | 
	
		
			
				|  |  |  				});
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		open_right(data) {
 | 
	
	
		
			
				|  | @@ -286,52 +632,58 @@ export default {
 | 
	
		
			
				|  |  |  			this.get_table_list();
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		get_table_list() {
 | 
	
		
			
				|  |  | -			let self = this;
 | 
	
		
			
				|  |  | -			self.table_loading = true;
 | 
	
		
			
				|  |  | -			self.$http
 | 
	
		
			
				|  |  | -				.get('/api/role/user', { params: { role_id: self.item_info.id } })
 | 
	
		
			
				|  |  | +			this.table_loading = true;
 | 
	
		
			
				|  |  | +			var that = this;
 | 
	
		
			
				|  |  | +			this.table_list=[];
 | 
	
		
			
				|  |  | +			this.$axios.get('/api/role/user', { params: { role_id: this.item_info.id } })
 | 
	
		
			
				|  |  |  				.then(res => {
 | 
	
		
			
				|  |  |  					if (res.data.code == 1) {
 | 
	
		
			
				|  |  | -						let point_types = self.$store.getters.point_types;
 | 
	
		
			
				|  |  | -						let point_type_map = {};
 | 
	
		
			
				|  |  | -						for (let i in point_types) {
 | 
	
		
			
				|  |  | -							point_type_map[point_types[i].id] = point_types[i];
 | 
	
		
			
				|  |  | -						}
 | 
	
		
			
				|  |  | -						let data = res.data.data.list;
 | 
	
		
			
				|  |  | -						// 处理添加人员的组件选中问题
 | 
	
		
			
				|  |  | -						this.rules_employee_arr.employee = [];
 | 
	
		
			
				|  |  | -						for (let i in data) {
 | 
	
		
			
				|  |  | -							this.rules_employee_arr.employee.push({ id: data[i].id, img_url: data[i].img_url, name: data[i].name });
 | 
	
		
			
				|  |  | -							if (data[i].point_limit !== null && data[i].point_limit.length == 0) {
 | 
	
		
			
				|  |  | -								data[i].point_limit = [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }];
 | 
	
		
			
				|  |  | -							}
 | 
	
		
			
				|  |  | -							if (data[i].deduct_task_monthly !== null && data[i].deduct_task_monthly.length == 0) {
 | 
	
		
			
				|  |  | -								data[i].deduct_task_monthly = [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }];
 | 
	
		
			
				|  |  | -							}
 | 
	
		
			
				|  |  | -							if (data[i].reward_task_monthly !== null && data[i].reward_task_monthly.length == 0) {
 | 
	
		
			
				|  |  | -								data[i].reward_task_monthly = [{ name: 'A分', point: 0, pt_id: 2 }, { name: 'B分', point: 0, pt_id: 3 }];
 | 
	
		
			
				|  |  | +						var list = res.data.data.list;
 | 
	
		
			
				|  |  | +						list.forEach(item => {
 | 
	
		
			
				|  |  | +							if (item.point_limit == null || item.point_limit == undefined||item.point_limit.length==0) {
 | 
	
		
			
				|  |  | +								item.point_limit = [{ name: 'A分', point: '0', pt_id: that.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: that.$getTyps('BF').id }];
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  | -							if (!data[i]['point_limit_obj']) {
 | 
	
		
			
				|  |  | -								data[i]['point_limit_obj'] = {};
 | 
	
		
			
				|  |  | +							if (item.deduct_task_monthly == null || item.deduct_task_monthly == undefined||item.deduct_task_monthly.length==0) {
 | 
	
		
			
				|  |  | +								item.deduct_task_monthly = [{ name: 'A分', point: '0', pt_id: that.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: that.$getTyps('BF').id }];
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  | -							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 (item.reward_task_monthly == null || item.reward_task_monthly == undefined||item.reward_task_monthly.length==0) {
 | 
	
		
			
				|  |  | +								item.reward_task_monthly = [{ name: 'A分', point: '0', pt_id: that.$getTyps('AF').id }, { name: 'B分', point: '0', pt_id: that.$getTyps('BF').id }];
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  | -						}
 | 
	
		
			
				|  |  | -						this.table_list = data;
 | 
	
		
			
				|  |  | +						});
 | 
	
		
			
				|  |  | +						this.table_list = list||[];
 | 
	
		
			
				|  |  | +						console.log(this.table_list)
 | 
	
		
			
				|  |  |  					} else {
 | 
	
		
			
				|  |  | -						self.$message.error(res.data.msg);
 | 
	
		
			
				|  |  | +						this.$message.error(res.data.msg);
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  				})
 | 
	
		
			
				|  |  |  				.finally(() => {
 | 
	
		
			
				|  |  | -					self.table_loading = false;
 | 
	
		
			
				|  |  | +					this.table_loading = false;
 | 
	
		
			
				|  |  |  				});
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		// 关闭提示语
 | 
	
		
			
				|  |  | +		tips_close() {
 | 
	
		
			
				|  |  | +			localStorage.setItem('framework', 'true');
 | 
	
		
			
				|  |  | +			this.tips_show = false;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <style scoped="scoped">
 | 
	
		
			
				|  |  | +::v-deep .el-radio .el-radio__label {
 | 
	
		
			
				|  |  | +	display: none;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +.tips {
 | 
	
		
			
				|  |  | +	background: #dcdfe6;
 | 
	
		
			
				|  |  | +	border-radius: 50%;
 | 
	
		
			
				|  |  | +	width: 14px;
 | 
	
		
			
				|  |  | +	height: 14px;
 | 
	
		
			
				|  |  | +	color: #fff;
 | 
	
		
			
				|  |  | +	display: inline-block;
 | 
	
		
			
				|  |  | +	font-size: 12px;
 | 
	
		
			
				|  |  | +	line-height: 14px;
 | 
	
		
			
				|  |  | +	text-align: center;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  .name {
 | 
	
		
			
				|  |  |  	font-size: 18px;
 | 
	
		
			
				|  |  |  	margin-bottom: 5px;
 | 
	
	
		
			
				|  | @@ -339,4 +691,7 @@ export default {
 | 
	
		
			
				|  |  |  .user_text {
 | 
	
		
			
				|  |  |  	font-size: 12px;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +.cursor_pointer {
 | 
	
		
			
				|  |  | +	cursor: pointer;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 |