|  | @@ -14,10 +14,22 @@
 | 
	
		
			
				|  |  |                 @size-change="sizeChange"
 | 
	
		
			
				|  |  |                 @refresh-change="refreshChange"
 | 
	
		
			
				|  |  |                 @on-load="onLoad">
 | 
	
		
			
				|  |  | +      <template slot="menuLeft">
 | 
	
		
			
				|  |  | +        <el-button
 | 
	
		
			
				|  |  | +          icon="el-icon-printer"
 | 
	
		
			
				|  |  | +          size="small"
 | 
	
		
			
				|  |  | +          type="primary"
 | 
	
		
			
				|  |  | +          :loading="exportLoading"
 | 
	
		
			
				|  |  | +          @click.stop="downFile"
 | 
	
		
			
				|  |  | +        >导 出
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  |        <template slot="flagSearch">
 | 
	
		
			
				|  |  |          <el-select
 | 
	
		
			
				|  |  |            v-model="search.flag"
 | 
	
		
			
				|  |  | -          placeholder="" >
 | 
	
		
			
				|  |  | +          placeholder=""
 | 
	
		
			
				|  |  | +          @change="cut"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  |            <el-option
 | 
	
		
			
				|  |  |              v-for="item in flagOptions"
 | 
	
		
			
				|  |  |              :key="item.value"
 | 
	
	
		
			
				|  | @@ -56,9 +68,8 @@
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |    import option from "./config/mainList.json";
 | 
	
		
			
				|  |  |    import clientOption from "./config/clientList.json";
 | 
	
		
			
				|  |  | -  import { performanceAnalysis } from "@/api/workManagement/mainProject";
 | 
	
		
			
				|  |  | +  import { performanceAnalysis ,importAnalysis} from "@/api/workManagement/mainProject";
 | 
	
		
			
				|  |  |    import { getUserList } from "@/api/workManagement/mainProject";
 | 
	
		
			
				|  |  | -  import _ from "lodash";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    export default {
 | 
	
		
			
				|  |  |      data() {
 | 
	
	
		
			
				|  | @@ -66,6 +77,7 @@
 | 
	
		
			
				|  |  |          form: {},
 | 
	
		
			
				|  |  |          search:{},
 | 
	
		
			
				|  |  |          option: option,
 | 
	
		
			
				|  |  | +        exportLoading:false,
 | 
	
		
			
				|  |  |          loading:false,
 | 
	
		
			
				|  |  |          dataList: [],
 | 
	
		
			
				|  |  |          userNameOptions:[],
 | 
	
	
		
			
				|  | @@ -96,6 +108,34 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      methods: {
 | 
	
		
			
				|  |  | +      downFile(){
 | 
	
		
			
				|  |  | +        this.exportLoading = true
 | 
	
		
			
				|  |  | +        let  searchParams = Object.assign({},this.search);
 | 
	
		
			
				|  |  | +        let param = this.paramsAdjustment(searchParams)
 | 
	
		
			
				|  |  | +        let option = this.deepClone(this.option.column)
 | 
	
		
			
				|  |  | +        importAnalysis(param).then(res=>{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          option.shift();
 | 
	
		
			
				|  |  | +          option.shift();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          this.$Export.excel({
 | 
	
		
			
				|  |  | +            title: "业绩分析",
 | 
	
		
			
				|  |  | +            columns: option,
 | 
	
		
			
				|  |  | +            data: res.data.data,
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        }).finally(()=>{
 | 
	
		
			
				|  |  | +          this.exportLoading = false
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      cut(val){
 | 
	
		
			
				|  |  | +        if(val == 1){
 | 
	
		
			
				|  |  | +          this.option = option
 | 
	
		
			
				|  |  | +          this.onLoad(this.page,this.search)
 | 
	
		
			
				|  |  | +        }else{
 | 
	
		
			
				|  |  | +          this.option = clientOption
 | 
	
		
			
				|  |  | +          this.onLoad(this.page,this.search)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |        userNameRemoteMethod(val){
 | 
	
		
			
				|  |  |          getUserList({realName : val}).then(res=>{
 | 
	
		
			
				|  |  |            this.userNameOptions = res.data.data
 | 
	
	
		
			
				|  | @@ -137,12 +177,6 @@
 | 
	
		
			
				|  |  |          if(!params.year){
 | 
	
		
			
				|  |  |            params.year = "2021"
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if(params.flag == 1){
 | 
	
		
			
				|  |  | -          this.option = option
 | 
	
		
			
				|  |  | -        }else{
 | 
	
		
			
				|  |  | -          this.option = clientOption
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          return params
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -150,20 +184,6 @@
 | 
	
		
			
				|  |  |          this.loading = true;
 | 
	
		
			
				|  |  |          params = this.paramsAdjustment(params)
 | 
	
		
			
				|  |  |          performanceAnalysis(page.currentPage, page.pageSize,params).then(res=>{
 | 
	
		
			
				|  |  | -          res.data.data.records.forEach((item)=>{
 | 
	
		
			
				|  |  | -            item.total =parseFloat(item.jan)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.feb)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.mar)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.apr)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.may)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.june)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.july)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.aug)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.sept)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.oct)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.nov)  +
 | 
	
		
			
				|  |  | -              parseFloat(item.dece)
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  |            this.dataList = res.data.data.records
 | 
	
		
			
				|  |  |            this.page.total = res.data.data.total
 | 
	
		
			
				|  |  |          }).finally(()=>{
 |