|  | @@ -56,7 +56,7 @@
 | 
	
		
			
				|  |  |  							<div class="flex-1">
 | 
	
		
			
				|  |  |  								<el-button size="small" @click="del_item" type="danger" plain>批量移除</el-button>
 | 
	
		
			
				|  |  |  								<el-button size="small" type="primary" @click="add_employee_show=true">添加人员</el-button>
 | 
	
		
			
				|  |  | -								<el-button size="small" type="primary" plain @click="import_rules_show = true">导入自动积分</el-button>
 | 
	
		
			
				|  |  | +								<el-button size="small" type="primary" plain @click="toleadShw = true">导入自动积分</el-button>
 | 
	
		
			
				|  |  |  							</div>
 | 
	
		
			
				|  |  |  							<div>
 | 
	
		
			
				|  |  |  								<el-select size="small" v-model="employee_id" filterable clearable placeholder="请输入或选择人员">
 | 
	
	
		
			
				|  | @@ -183,7 +183,7 @@
 | 
	
		
			
				|  |  |  			</el-dialog>
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  |  			<!-- 导入规则 -->
 | 
	
		
			
				|  |  | -			<el-dialog title="导入自动积分" :visible.sync="import_rules_show" width="500px" @before-close="close_import">
 | 
	
		
			
				|  |  | +			<!-- <el-dialog title="导入自动积分" :visible.sync="import_rules_show" width="500px" @before-close="close_import">
 | 
	
		
			
				|  |  |  			  <el-row>
 | 
	
		
			
				|  |  |  			    <el-col :span="12">
 | 
	
		
			
				|  |  |  			      <div style="text-align: center;line-height: 34px;">
 | 
	
	
		
			
				|  | @@ -214,11 +214,50 @@
 | 
	
		
			
				|  |  |  			        >
 | 
	
		
			
				|  |  |  			          <el-button slot="trigger" type="primary">选取文件</el-button>
 | 
	
		
			
				|  |  |  			        </el-upload>
 | 
	
		
			
				|  |  | -			        <!-- <p><el-button type="primary" @click="submitUpload" :loading="save_loading" v-show="import_btn_show" block>导入</el-button></p> -->
 | 
	
		
			
				|  |  |  			      </div>
 | 
	
		
			
				|  |  |  			    </el-col>
 | 
	
		
			
				|  |  |  			  </el-row>
 | 
	
		
			
				|  |  | -			</el-dialog>
 | 
	
		
			
				|  |  | +			</el-dialog> -->
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			<toLead :visible.sync="toleadShw" :nowIndex.sync="nowIndex" :tolead="toleadResult" @confirm="tealConfirm" :export_type="'auto_point'" :dstyle="'padding: 40px 80px;'">
 | 
	
		
			
				|  |  | +				<template slot="1">
 | 
	
		
			
				|  |  | +					<el-row v-if="nowIndex == 1">
 | 
	
		
			
				|  |  | +						<el-col :span="12">
 | 
	
		
			
				|  |  | +						<div style="text-align: center;line-height: 34px;">
 | 
	
		
			
				|  |  | +							<p>1、导出模板,填写好规则</p>
 | 
	
		
			
				|  |  | +							<p><img src="../../assets/image/rules_mould.png" alt="" /></p>
 | 
	
		
			
				|  |  | +							<p>规则表</p>
 | 
	
		
			
				|  |  | +							<p>
 | 
	
		
			
				|  |  | +							<a target="_blank" :href="publicBASE_API + '/api/download/point_auto'"><el-button type="primary" >下载模板</el-button></a>
 | 
	
		
			
				|  |  | +							</p>
 | 
	
		
			
				|  |  | +						</div>
 | 
	
		
			
				|  |  | +						</el-col>
 | 
	
		
			
				|  |  | +						<el-col :span="12">
 | 
	
		
			
				|  |  | +						<div style="text-align: center;line-height: 34px;">
 | 
	
		
			
				|  |  | +							<p>2、上传填好的规则表</p>
 | 
	
		
			
				|  |  | +							<p><img src="../../assets/image/rules_mould1.png" alt="" /></p>
 | 
	
		
			
				|  |  | +							<p>仅支持xls、xlsx格式文件</p>
 | 
	
		
			
				|  |  | +							<el-upload
 | 
	
		
			
				|  |  | +							class="upload-demo"
 | 
	
		
			
				|  |  | +							:headers="ATOKEN"
 | 
	
		
			
				|  |  | +							:data="{ type: 'auto_integral' }"
 | 
	
		
			
				|  |  | +							ref="upload"
 | 
	
		
			
				|  |  | +							:limit="1"
 | 
	
		
			
				|  |  | +							:action="action"
 | 
	
		
			
				|  |  | +							:on-remove="handleRemove"
 | 
	
		
			
				|  |  | +							:on-success="handleSuccess"
 | 
	
		
			
				|  |  | +							:before-upload="beforeFilesUpload"
 | 
	
		
			
				|  |  | +							:file-list="fileList"
 | 
	
		
			
				|  |  | +							:on-progress="handleOnthecross"
 | 
	
		
			
				|  |  | +							>
 | 
	
		
			
				|  |  | +							<el-button slot="trigger" type="primary">选取文件</el-button>
 | 
	
		
			
				|  |  | +							</el-upload>
 | 
	
		
			
				|  |  | +							<!-- <p><el-button type="primary" @click="submitUpload" :loading="save_loading" v-show="import_btn_show" block>导入</el-button></p> -->
 | 
	
		
			
				|  |  | +						</div>
 | 
	
		
			
				|  |  | +						</el-col>
 | 
	
		
			
				|  |  | +					</el-row>
 | 
	
		
			
				|  |  | +				</template>
 | 
	
		
			
				|  |  | +			</toLead>
 | 
	
		
			
				|  |  |  		</div>
 | 
	
		
			
				|  |  |  	</div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
	
		
			
				|  | @@ -226,6 +265,7 @@
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import EmployeeSelector from '@/components/EmployeeSelector';
 | 
	
		
			
				|  |  |  import noData from '@/components/noData';
 | 
	
		
			
				|  |  | +import toLead from '@/components/toLead';
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |  	data() {
 | 
	
		
			
				|  |  |  		return {
 | 
	
	
		
			
				|  | @@ -348,16 +388,24 @@ export default {
 | 
	
		
			
				|  |  |  			employee_map:[],
 | 
	
		
			
				|  |  |  			employee_id:'',
 | 
	
		
			
				|  |  |  			selectData:{},
 | 
	
		
			
				|  |  | +			//导入相关
 | 
	
		
			
				|  |  | +			toleadShw: false,
 | 
	
		
			
				|  |  | +			nowIndex: 1,
 | 
	
		
			
				|  |  | +			toleadResult: {}
 | 
	
		
			
				|  |  |  		};
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  |  	components: {
 | 
	
		
			
				|  |  |  		EmployeeSelector,
 | 
	
		
			
				|  |  | -		noData
 | 
	
		
			
				|  |  | +		noData,
 | 
	
		
			
				|  |  | +		toLead
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  |  	created() {
 | 
	
		
			
				|  |  |  		this.getEmployee();
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  |  	watch:{
 | 
	
		
			
				|  |  | +		toleadShw(val){
 | 
	
		
			
				|  |  | +			if(val) this.nowIndex = 1
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  |  		employee_id(val){
 | 
	
		
			
				|  |  |  			this.page=1;
 | 
	
		
			
				|  |  |  			this.open_right(this.selectData);
 | 
	
	
		
			
				|  | @@ -420,13 +468,31 @@ export default {
 | 
	
		
			
				|  |  |  		  let len = file.name.split('.').length - 1;
 | 
	
		
			
				|  |  |  		  const $ext_name = file.name.split('.')[len];
 | 
	
		
			
				|  |  |  		  if ($ext_list.indexOf($ext_name) != -1) {
 | 
	
		
			
				|  |  | -		    this.import_btn_show = true;
 | 
	
		
			
				|  |  |  		  } else {
 | 
	
		
			
				|  |  | -		    this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
 | 
	
		
			
				|  |  | +			this.toleadResult.id = 0
 | 
	
		
			
				|  |  | +			this.toleadResult.name = '文件格式上传错误,仅支持上传xlsx,xls)'
 | 
	
		
			
				|  |  | +			this.nowIndex = 3
 | 
	
		
			
				|  |  | +		    // this.$message.warning('文件格式上传错误,仅支持上传xlsx,xls)');
 | 
	
		
			
				|  |  |  		    return false;
 | 
	
		
			
				|  |  |  		  }
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  | +		tealConfirm(){
 | 
	
		
			
				|  |  | +			this.page=1;
 | 
	
		
			
				|  |  | +			this.open_right(this.selectData);
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		handleOnthecross(event, file, fileList){
 | 
	
		
			
				|  |  | +			this.nowIndex = 2
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  |  		handleSuccess(response) {
 | 
	
		
			
				|  |  | +			if(response.code == 1){
 | 
	
		
			
				|  |  | +				response.data.id = 1
 | 
	
		
			
				|  |  | +			}else{
 | 
	
		
			
				|  |  | +				response.data.id = 0
 | 
	
		
			
				|  |  | +				response.data.name = response.msg
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			this.toleadResult = response.data
 | 
	
		
			
				|  |  | +			this.nowIndex = 3
 | 
	
		
			
				|  |  | +			return
 | 
	
		
			
				|  |  |  		  if (response.code == 1) {
 | 
	
		
			
				|  |  |  		  	if (response.data.length > 0) {
 | 
	
		
			
				|  |  |  		  		var htmls = response.data;
 | 
	
	
		
			
				|  | @@ -471,7 +537,6 @@ export default {
 | 
	
		
			
				|  |  |  			this.open_right();
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		open_rights(data){
 | 
	
		
			
				|  |  | -			console.log(data)
 | 
	
		
			
				|  |  |  			this.page=1;
 | 
	
		
			
				|  |  |  			this.selectData=data;
 | 
	
		
			
				|  |  |  			this.open_right(data);
 |