<template>
  <div style=" background-color: #fff; padding:15px;">
    <div style="margin-top:2px; margin-bottom:15px;" class="inline-block-btn-list">
      <el-select
        class="gap-right-8 first-element-btn"
        clearable
        filterable
        placeholder="选择奖扣对象进行筛选"
        v-model="filter.target_id"
        @change="onFilterChanged"
      >
        <el-option v-for="item in employeeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
      </el-select>
      <el-date-picker
        class="gap-right-8"
        v-model="filter.time_range"
        type="daterange"
        value-format="timestamp"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        :picker-options="instantPickerOptions"
        @change="onFilterChanged"
      ></el-date-picker>
      <div class="gap-right-8" style="display:inline-block; width:220px;">
        <el-input
          placeholder="输入关键词查找"
          ref="search-bar"
          v-model="filter.keyword"
          class="input-with-select"
          @keyup.enter.native="onFilterChanged"
        >
          <el-button slot="append" icon="el-icon-search" @click="onFilterChanged"></el-button>
        </el-input>
      </div>
    </div>
    <el-table
      v-loading="loading"
      ref="multipleTable"
      :data="tableData"
      :border="false"
      tooltip-effect="dark"
      style="width: 100%"
    >
      <!-- <el-table-column prop="mode_type" label="类型" :formatter="modeTypeFormatter"> -->
      <el-table-column label="类型" prop="mode_type_mark">
          <template slot-scope="scope">
            <!-- 可以为0 -->
            <span v-if="scope.row.source == 20">
              积分任务
            </span>
            <!-- 不能为0 -->
            <span v-else>
              积分申请
            </span>
          </template>
      </el-table-column>
      <el-table-column prop="target_name" label="姓名"></el-table-column>

      <el-table-column prop="category_name" label="积分分类"></el-table-column>
      <el-table-column label="附件" v-if="false">
        <template slot-scope="scope">
          <div>
            <a
              style="display: block; color:#409EFF; text-decoration: underline;"
              v-for="item in scope.row.file_list"
              @click="fileProview(item.url, scope.row.file_list, scope.row.id)"
            >{{item.name}}</a>
          </div>

          <div style="display:none;">
            <img
              v-for="(item,index) in scope.row.file_list"
              v-if="(['jpg', 'png', 'bmp', 'jpeg','JPG','PNG']).indexOf(item.url.split('.')[1]) >= 0"
              :src="item.url"
              :preview="scope.row.id"
              :preview-text="item.name"
            >
          </div>
        </template>
      </el-table-column>



      <el-table-column prop="remark" label="备注" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column label="多人审批" v-if="false">
        <template slot-scope="scope">
            <span v-for="review_item of scope.row.review_list" :key="review_item.reviewer_id" v-if="review_item.status === 0" style="color: #aaa">
              <el-tooltip :content="review_item.name+'待审核'" placement="top">
                <span>
                  {{review_item.name+' '}}
                </span>
              </el-tooltip>
            </span>
          <span v-for="review_item of scope.row.review_list" :key="review_item.reviewer_id" v-if="review_item.status === 1" style="color: green">
                 <!-- <el-tooltip :content="review_item.name+'审核通过'+review_item.comment?'原因:'+ review_item.comment:123" placement="top"> -->
                 <el-tooltip :content="review_item.name+'审核通过，得分'+review_item.point+'分'" placement="top">
                   <span>
                    {{review_item.name+' '}}
                     <!-- {{review_item}} -->
                   </span>
                 </el-tooltip>
            </span>
          <span v-for="review_item of scope.row.review_list" :key="review_item.reviewer_id" v-if="review_item.status === -1" style="color: red">
                <el-tooltip :content="review_item.name+'驳回,原因:'+review_item.comment" placement="top">
                <span>
                  {{review_item.name+' '}}
                </span>
               </el-tooltip>
            </span>
          <!-- <span
            v-bind:class="scope.row.point < 0 ? 'point-negative' : 'point-positive'"
          >{{ scope.row.point }}</span> -->
        </template>
      </el-table-column>
      <el-table-column prop="point_type" label="积分">


        <template slot-scope="scope">
          <div v-html="pointTypeFormatter(scope.row)"></div>
        </template>


      </el-table-column>
      <el-table-column label="事件日期" prop="event_time">

      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">


          <!-- :loading="reviewPassLoaing[scope.row.id]" -->
          <el-button type="text" v-if="list_review_status == 'waiting'" @click="reviewPass(scope.row)" >通过</el-button>
          <el-button type="text"  v-if="list_review_status == 'waiting'" @click="promptReject(scope.row)">驳回</el-button>
          <el-button type="text" @click="reviewTask(scope.row)" >详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      background
      @size-change="handleSizeChange"

      layout="total,sizes, prev, pager, next"
      :page-size="pageLimit"
      :page-sizes="[10, 20, 50, 100]"
      :total="totalCount"
      :current-page.sync="currentPage"
      @current-change="changePage"
    ></el-pagination>
    <!-- 积分申请、积分录入弹窗 -->

    <!-- 任务审核弹窗 -->
    <el-dialog
      :title="title"
      :visible.sync="dialogReviewTaskVisible"
      :close-on-click-modal="false"
      width="500px"
      @close="resetTaskForm"
    >
        <el-form ref="taskForm" :model="taskForm" :rules="taskRules" @submit.native.prevent style="padding:0 ;">

          <div style="padding:0 27px;" v-if="isExactly && source == 20">
              <div class="text_item" style="clear: both;overflow: hidden;" >

                 <div style="float: left;">任务名称：</div>
                 <div style="width: 280px;float: left;margin-left: 33px;
    word-break: break-all;
    word-wrap: break-word;">{{taskForm.name}}</div>
            </div>
            <!-- <div class="text_item"><span>任务名称：</span><span style="width: 280px;display: inline-block;overflow: hidden;">{{taskForm.name}}</span></div> -->
             <div class="text_item" v-if="current_review_status == 1&& review_status_mark == '已通过' && taskForm.point_type!= 10 "><span style="text-align: right;"> 积分：</span>
               <span v-if="taskForm.point_level!=''">
                   <span v-if="taskForm.point_level == 10 ">超预期{{newpoint}}</span>
                   <span v-if="taskForm.point_level == 20 ">满意{{newpoint}}</span>
                   <span v-if="taskForm.point_level == 30 ">合格{{newpoint}}</span>
                   <span v-if="taskForm.point_level == 40 ">不合格{{newpoint}}</span>
                </span>


             </div>

             <div  class="text_item"  style="clear: both;overflow: hidden;"   v-if="current_review_status == 1&& review_status_mark == '已通过' && taskForm.point_type == 10 "  >
                <!-- <span >积分：<span>{{newpoint}}</span></span> -->

                 <div style="float: left;    text-align: right;width: 70px;">积分：</div>
                 <div style="width: 280px;float: left;margin-left: 33px;
    word-break: break-all;
    word-wrap: break-word;">{{newpoint}}</div>
             </div>
            <div class="text_item"><span>任务类型：</span>
              <span v-if="taskForm.fixed_cycle == 0">普通任务</span>
              <span v-if="taskForm.fixed_cycle == 1">每天</span>
              <span v-if="taskForm.fixed_cycle == 2">每周</span>
              <span v-if="taskForm.fixed_cycle == 3">每月</span>
            </div>
            <div class="text_item" style="clear: both;overflow: hidden;"  v-if="taskForm.remark != ''">

                 <div style="float: left;">任务说明：</div>
                 <div style="width: 280px;float: left;margin-left: 33px;
    word-break: break-all;
    word-wrap: break-word;">{{taskForm.remark}}</div>
            </div>

             <div class="text_item" style="clear: both;overflow: hidden;"  v-if="taskForm.complete_remark != ''">

                 <div style="float: left;">完成说明：</div>
                 <div style="width: 280px;float: left;margin-left: 33px;
    word-break: break-all;
    word-wrap: break-word;"> {{taskForm.complete_remark}}</div>
            </div>


            <div class="text_item" style="clear: both;overflow: hidden;"  v-if="taskForm.complete_file_list && taskForm.complete_file_list.length > 0 &&　source　== 20">
                 <div style="float: left;">完成凭证：</div>

                  <div style="width: 280px;margin-left: 33px;float: left;word-break: break-all; cursor: pointer;color: #409EFF; word-wrap: break-word;" >
                <div  v-for="item in taskForm.complete_file_list"
                @click="openUrl(item.url)">

             {{item.name}}</div>
                </div>

          </div>




            <div class="text_item" style="clear: both;overflow: hidden;"  v-if="source == 20">
                 <div style="float: left;">完成时间：</div>
                <div
                style="width: 280px;float: left;margin-left: 33px;word-break: break-all;  word-wrap: break-word;">

            {{dateTime(taskForm.complete_time)}}</div>

          </div>

           <div class="text_item" style="clear: both;overflow: hidden;"  v-if="source == 20" >
                 <div style="float: left;">发布时间：</div>
                <div
                style="width: 280px;float: left;margin-left: 33px;word-break: break-all; word-wrap: break-word;">
              {{dateTime(taskForm.createtime)}}
          </div>

          </div>


          </div>

          <div v-if="isExactly&& source != 20" style="padding-left: 47px;">
               <div class="text_item" style="clear: both;overflow: hidden;" >
                 <div style="float: left;">类型:</div>
                 <div style="width: 280px;float: left;margin-left: 33px;word-break: break-all;  word-wrap: break-word;">{{mode_type_mark}}</div>
               </div>

                <div class="text_item" style="clear: both;overflow: hidden;" >
                 <div style="float: left;">内容:</div>
                 <div style="width: 280px;float: left;margin-left: 33px;word-break: break-all;  word-wrap: break-word;">{{mode_mark}}</div>
               </div>

                 <div class="text_item" style="clear: both;overflow: hidden;" >
                 <div style="float: left;">积分:</div>
                 <div style="width: 280px;float: left;margin-left: 33px;word-break: break-all;  word-wrap: break-word;">{{mode_point}}</div>
               </div>
              <div class="text_item" style="clear: both;overflow: hidden;"  v-if="jifenfile_list && jifenfile_list.length >0">
                 <div style="float: left;">
                  附件:</div>
                <div style="width: 280px;margin-left: 33px;float: left;word-break: break-all; cursor: pointer;color: #409EFF; word-wrap: break-word;" >
                <div  v-for="item in jifenfile_list"
                @click="openUrl(item.url)">

               {{item.name}}</div>
                </div>

              </div>
                <div class="text_item" style="clear: both;overflow: hidden;" >
                 <div style="float: left;">提交时间:</div>
                 <div style="width: 280px;float: left;margin-left: 33px;word-break: break-all;  word-wrap: break-word;">{{create_time}}</div>
               </div>


                <div class="text_item" style="clear: both;overflow: hidden;" >
                 <div style="float: left;">事件时间:</div>
                 <div style="width: 280px;float: left;margin-left: 33px;word-break: break-all;  word-wrap: break-word;">{{create_time}}</div>
               </div>


          </div>

            <div  v-if="!isExactly" >
            <div v-if="list_review_status == 'waiting'">

             <el-form-item label="评分标准" :label-width="formLabelWidth" v-if="taskForm.point_type == 20" >
              <div style="float: left; width: 63px;height: 58px;margin-right: 20px;"  v-for="item in taskForm.point_level_log">
                <div @click="ChoseCorde(item.key, item.value, 1)" :class="{ 'isActive': isActive==1,'itemCorde':true}" v-if="item.key == 10">
                  <div>{{item.value}}</div>
                  <div>超预期</div>
                </div>

                 <div @click="ChoseCorde(item.key, item.value,2)" :class="{ 'isActive': isActive==2,'itemCorde':true}"  v-if="item.key == 20">
                  <div>{{item.value}}</div>
                  <div>满意</div>
                </div>

                 <div @click="ChoseCorde(item.key, item.value,3)" :class="{ 'isActive': isActive==3,'itemCorde':true}" v-if="item.key == 30">
                  <div >{{item.value}}</div>
                  <div>合格</div>
                </div>

                 <div  @click="ChoseCorde(item.key, item.value,4)":class="{ 'isActive': isActive==4,'itemCorde':true}"  v-if="item.key == 40">
                  <div>{{item.value}}</div>
                  <div>不及格</div>
                </div>

              </div>
            </el-form-item>

            <!-- 任务审核 -->
            <el-form-item label="积分" prop="point" :label-width="formLabelWidth" v-if="source == 20">

            <!-- <div v-if="taskForm.point_type == 20" style="width:175px;height:36px;line-height: 36px;border: 1px solid #D8DCE6;padding-left: 20px;">{{newpoint}}</!-->
            <!--  :disabled="((edit_flag.category==true&&edit_flag.item==true)&&(edit_flag.point_range == 0))   && protocol_point!= 0 || edit_flag.point != 0" -->
             <!-- :min="currentItem.is_negative == 1? -currentItem.value_2:currentItem.value_1"
                             :max="currentItem.is_negative == 1? -currentItem.value_1:currentItem.value_2" -->
            <el-input-number
              :disabled="twAgree"
               v-model="returnTask.point"

            ></el-input-number>
          </el-form-item>

          <!-- 积分申请录入 -->
           <el-form-item label="积分" prop="point" :label-width="formLabelWidth" v-if="source == 10">
            <!-- <div v-if="taskForm.point_type == 20" style="width:175px;height:36px;line-height: 36px;border: 1px solid #D8DCE6;padding-left: 20px;">{{newpoint}}</!-->
            <!--  :disabled="((edit_flag.category==true&&edit_flag.item==true)&&(edit_flag.point_range == 0))   && protocol_point!= 0 || edit_flag.point != 0" -->
             <!-- :min="currentItem.is_negative == 1? -currentItem.value_2:currentItem.value_1"
                             :max="currentItem.is_negative == 1? -currentItem.value_1:currentItem.value_2" -->
            <el-input-number
              :disabled="isFirst"
               v-model="returnTask.point"

            ></el-input-number>
          </el-form-item>

        <!--  -->
          <el-form-item label="分类"  class="classify" prop="category_id" :label-width="formLabelWidth" v-if="list_review_status == 'waiting'">


            <el-cascader
              clearable
              :options="categoryTree"
              change-on-select
              :required="true"
              v-model="taskForm.category_id"
              style="width: 150px;"
              :disabled="(edit_flag.category==true&&edit_flag.item==true || twAgree && source == 20 || isFirst && source ==10 )"
              @change="loadAvailableRuleItems(taskForm)"
              placeholder="选择积分分类"
            ></el-cascader>
            <div v-if="source!=20" style="display: inline-block;" >
             <el-select

                       :disabled="(edit_flag.category==true&&edit_flag.item==true || twAgree && source == 20 || isFirst&&source ==10 )"
                       v-model="taskForm.rule_item_id"
                       @change="updatePointInfo" style="margin-left:15px;"

             >

            <!-- <el-option v-if="false"
                :key="0"
                label="自定义（没有找到匹配的规则）"
                :value="0"
                style="width: 105px;"
              ></el-option>
               :label="group.name"
               :label="item.content"  -->
              <el-option-group
                v-for="group in availableRuleItems"
                :key="group.id"
                :label="group.name"
              >
                <el-option
                  v-for="item in group.options"
                  :key="item.id"
                  :label="item.content"
                  :value="item.id"
                ></el-option>
              </el-option-group>
            </el-select>
             </div>
          </el-form-item>



          <el-form-item label="递交" prop="reviewer_other_ids" :label-width="formLabelWidth" v-if="list_review_status == 'waiting'">
            <el-select
              v-model="reviewer_other_ids"
              filterable

              clearable
              placeholder="选填"
              class="gap-right-8"
              style="width:250px;"
            >
              <el-option
                v-for="reviewItem of employerList"
                :key="reviewItem.id"
                :label="reviewItem.name"
                :value="reviewItem.id"
                :disabled="reviewerDisableIds.indexOf(reviewItem.id) >= 0"
              ></el-option>
            </el-select>
          </el-form-item>





          <el-form-item label="意见" prop="commentA" :label-width="formLabelWidth" v-if="list_review_status == 'waiting'">
            <el-input type="textarea"v-model="commentA" placeholder="（最多100字）"></el-input>
          </el-form-item>
          </div>
          </div>
           </el-form>

      <div slot="footer" class="dialog-footer" v-if="list_review_status == 'waiting'">
        <el-button :loading="loadingsend" @click="Surerebut()">驳 回</el-button>
        <el-button :loading="loadingsend" type="primary"   v-if="!isExactly" @click="submitEventForm('pass')">通 过</el-button>
         <el-button :loading="loadingsend"  v-if="isExactly" type="primary"   @click="returnBzck()">通过</el-button>
      </div>
    </el-dialog>







      <el-dialog
      title="审批驳回"
      :visible.sync="retrunAgree"
      :close-on-click-modal="false"
      width="500px"
      height="468px;"
      :before-close="handleClose"
      @close="resetTaskForm"
    >
        <el-form ref="taskForm" :model="returnForm" @submit.native.prevent style="padding:0 ;">
          <el-form-item label="意见" prop="comment" :label-width="formLabelWidth" v-if="list_review_status == 'waiting'">
            <el-input type="textarea" style="width: 287px;height: 63px;"v-model="returnForm.comment" placeholder="请输入驳回意见"></el-input>
          </el-form-item>

        </el-form>

      <div slot="footer" class="dialog-footer" v-if="list_review_status == 'waiting'" style="padding-top: 175px;">
          <el-button @click="CloseComment()">取消</el-button>
          <el-button type="primary"  :loading="loadingsend"  @click="rebut()">确定</el-button>
      </div>
    </el-dialog>






  </div>
</template>
<script>
  import Vue from 'vue'
  import preview from 'vue-photo-preview'
  import 'vue-photo-preview/dist/skin.css'
  Vue.use(preview, {
    tapToClose: false
  })
  export default {

    data() {
      const validateCategory = (rule, value, callback) => {
        console.log( this.Array.length);

        if(this.Array.length > 0) {
          this.taskForm.category_id  = this.Array
           callback()
        }else {
           if (!this.taskForm.category_id  || this.taskForm.category_id.length == 0) {
           return callback(new Error('请选择积分分类'))
        } else {
          callback()
        }
        }

      }
      return {
        loadingreturn:false,
        isHave: false,
        isFirst: false,
        jifenfile_list:[],
        mode_type_mark:'',
        mode_mark: '',
        mode_point:'',
        create_time:'',
        event_time:'',
        twoCorde: 0,
        threeCorde: 0,
        fourCorde: 0,
        oneCorde: 0,
        iShow: false,
        commentA:'',
        one: 0,
        two: 0,
        three: 0,
        four: 0,
        isSwitch: false,
        iSplay: true,
        returnTask: {
          point: 0,
        },
        title: '审批详情',
        current_review_status: 0, // 当前审核状态
        agreeId: 0,
        retrunAgree: false, // 审批驳回弹窗
        scopId: {},
        loadingsend: false,
        dialogReviewTaskVisible: false,   // 审核是否显示弹窗
        taskForm: {
          comment: '',
          category_id:[],
          category_id_1: 0,
          category_id_2: 1,
        },
        isExactly: true,
        remark:'',
        task_remark:'',
        list_review_status:'waiting',
        task_id: 0,
        radio: '满意',
        addScore: '',
        first_awaited: false,
        reduceScore: '',
        comment: '',
        taskScore: '',
        review_list:[],
        returnForm: {
          comment:''
        },
        taskRules: {
          category_id: [{ validator: validateCategory, trigger: 'change' }]
          /*comment: [{ required: true, message: '请填写不满意原因', trigger: 'blur' }]*/
        },
        review_info:{

        },
        edit_flag:{
          category: -1,
          item: -1,
          point: null,
          point_range: -1
        },
        category_id_1: 0,  //审核人id
        category_id_2: 0,
        rule_item_content:'',
        reviewPassLoaing:[],
        reviewer_other_ids: [],
        profile: this.$store.getters.user_info,
        totalCount: 0,
        currentPage: 1,
        loading: false,
        pageLimit: 10,
        tableData: null,
        employeeList: [],
        employerList: [],
        filter: {
          keyword: '',
          target_id: '',
          time_range: []
        },
        pointTypes: [],
        dialogReviewDetailVisible: false,
        reviewerDisableIds: [],
        eventForm: {},
        formLabelWidth: '100px',
        categoryTree: [],
        availableRuleItems: [],
        currentItem: [],
        isCreator: this.$store.getters.is_creator,
        isActive: 3,
        point_level: 30, // 评分等级
        point: 10, //  最终积分
        protocol_point: 0, // 原始积分
        twAgree: false,
        reviewId:0,
        newpoint:0,
        source: 0,
        Array:[],
        review_status_mark:'',
        instantPickerOptions: {
          shortcuts: [
            {
              text: '本周',
              onClick(picker) {
                const now = new Date(new Date().toLocaleDateString())
                const start =
                  now.getTime() - (now.getDay() - 1) * 24 * 60 * 60 * 1000
                const end = start + 7 * 24 * 60 * 60 * 1000 - 1000
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '上周',
              onClick(picker) {
                const now = new Date(new Date().toLocaleDateString())
                const start =
                  now.getTime() - (now.getDay() + 6) * 24 * 60 * 60 * 1000
                const end = start + 7 * 24 * 60 * 60 * 1000 - 1000
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '本月',
              onClick(picker) {
                const now = new Date()
                const startDate = new Date(now.getFullYear(), now.getMonth(), 1)
                const endDate = new Date(now.getFullYear(), now.getMonth() + 1, 0)
                picker.$emit('pick', [startDate.getTime(), endDate.getTime()])
              }
            },
            {
              text: '上月',
              onClick(picker) {
                const now = new Date()
                const startDate = new Date(
                  now.getFullYear() - (now.getMonth() > 0 ? 0 : 1),
                  (now.getMonth() + 11) % 12,
                  1
                )
                const endDate = new Date(now.getFullYear(), now.getMonth(), 0)
                picker.$emit('pick', [startDate.getTime(), endDate.getTime()])
              }
            }
          ]
        }
      }
    },
    methods: {

      returnBzck() {
        this.isExactly = false;
        let review = this.scopId;
        console.log(review)
        this.reviewPass(review);
      },

      Surerebut() {
        this.dialogReviewTaskVisible = false;
        this.retrunAgree = true;
      },
      // getPoint(key) {
      //  if(key == 10) {
      //     this.newpoint = this.oneCorde;
      //     this.point = this.oneCorde;
      //   }else if(key == 20) {
      //    this.newpoint = this.twoCorde;
      //      this.point = this.twoCorde;
      //   }else if(key == 30) {
      //     this.newpoint= this.threeCorde;
      //       this.point =this.threeCorde;
      //   }else {
      //    this.newpoint = this.fourCorde;
      //     this.point = this.fourCorde;
      //   }
      // },
      ChoseCorde(key, value, val) {
        if(this.twAgree) {
          return;
        }else {
           console.log(key)
         console.log(value)
        this.point_level = key;
        this.returnTask.point = value;
        this.isActive = val;
        }


      },
      reviewDetailStatus(reviewer) {
        if (this.task_id) { // 任务审批
          if (reviewer.status == 0) {
            return `待审批`
          } else {
            if (reviewer.task_is_pass == 0) {
              return `不满意,原因:${reviewer.comment}`
            } else {
              return `满意,最终得分:${reviewer.point}分`
            }
          }
        } else { // 积分录入或积分申请审批
          switch (reviewer.status) {
            case -1:
              return `审批驳回,原因:${reviewer.comment}`
            case 0:
              return '待审批'
            case 1:
              return `审批通过,最终得分:${reviewer.point}分`
          }
        }
      },
      set_status(status){
        this.list_review_status = status
      },
      reviewTask(scope) {
        this.title="审批详情";
        this.isExactly = true;
        let id = scope.id;
        this.scopId = scope;
        this.reviewId = scope.id;
        console.log(this.scopId)
        const self = this
        self.eventForm = {}
        this.currentItem = []
        this.$http('get','/integral.php/employee_approve/approve_info',{id: id}).then(response => {
          if (response.data.code == 1000) {
            let jsonData = response.data.data;
            self.current_review_status = jsonData.current_review_status; // 审核状态
            self.source = jsonData.source;
            self.create_time = jsonData.create_time;
            if(self.source != 20) {
                self.mode_type_mark = jsonData.mode_type_mark;
                self.mode_mark = jsonData.remark;
                self.mode_point = jsonData.point;
                self.jifenfile_list = jsonData.file_list;
                self.event_time = jsonData.event_time;
            }
            self.review_status_mark = jsonData.review_status_mark; // 审核

             if(self.current_review_status == 1 &&　　jsonData.review_status_mark　=="已通过") {
               console.log("jinlial")
               self.newpoint = jsonData.point;
               //self.taskForm.point = jsonData.point
              // self.$set(self.taskForm, 'point',  jsonData.point)
              //  console.log(jsonData.point);
              //  console.log(self.taskForm.point )
             }
             //  console.log(self.taskForm.point )
            if(jsonData.task == '' || jsonData.task == []) {
               self.taskForm = response.data.data;
            }else {
               self.taskForm = jsonData.task;

            }


            console.log(self.taskForm );


            let _taskForm = JSON.parse(JSON.stringify(self.taskForm))

            if(self.edit_flag.point == null){
              self.edit_flag.point = _taskForm.point
            }
            if(self.edit_flag.category == -1){
              self.edit_flag.category = _taskForm.category_id_2 > 0 || _taskForm.category_id_1 > 0
            }


            self.taskForm.category_id = []

            self.taskForm.category_id_1 = self.taskForm.category_id_1 * 1
            self.taskForm.category_id_2 = self.taskForm.category_id_2 * 1
            if(self.taskForm.category_id_1 > 0){
              self.taskForm.category_id.push(self.taskForm.category_id_1 * 1)
            }
            if(self.taskForm.category_id_2 > 0){
              self.taskForm.category_id.push(self.taskForm.category_id_2 * 1)
            }
            if(self.taskForm.rule_item_id == 0){
              self.taskForm.rule_item_id = ''
            }
            console.log(self.taskForm)

            const review_list = []
            // self.formdata.id = jsonData
            for (const i in jsonData.review_list) {
              review_list.push({
                content: jsonData.review_list[i].employee_name + '(' + (jsonData.review_list[i].status_mark) + ')',
                timestamp: jsonData.review_list[i].time,
                size: 'large',
                type: 'primary',
                comment: jsonData.review_list[i].point+jsonData.point_type_mark
              })
            }
            self.review_list = review_list
            self.loadAvailableRuleItems(self.taskForm)
          }
        })
          .catch(error => {
            console.log(error)
          })





        this.dialogReviewTaskVisible = true
      },
      submitTaskForm() {
        const form = this.$refs['taskForm']
        var self = this
        form.validate(valid => {
          if (valid) {
            if (form) {
              self.sendReviewPassRequest()
            }
          } else {
            // console.log('验证未通过')
            return false
          }
        })
      },
      resetTaskForm() {
        this.taskForm = {}
        this.edit_flag={
          category: -1,
            item: -1,
            point: null,
            point_range: -1
        }
        this.task_id = 0 // 模态窗关闭task_id重置为0
      },

      handleSizeChange(val) {
        this.pageLimit = val
        this.onFilterChanged()
      },
      fileProview(url, list, key) {
        const $ext_list = ['doc', 'docx', 'pptx', 'xls', 'xlsx', 'ppt', 'txt']
        const $ext_name = url.split('.')[1]
        if ($ext_list.indexOf($ext_name) >= 0) {
          console.log(url)
          return;
          window.open(
            'https://view.officeapps.live.com/op/view.aspx?src=' +
            url,
            '_blank'
          )
        }
        const $ext_list1 =  ['jpg', 'png', 'bmp', 'jpeg','JPG','PNG']
        const $ext_name1 = url.split('.')[1]
        if ($ext_list1.indexOf($ext_name1) >= 0) {
          // console.log(this.serverdomain + url)

          let ii = 0
          for (const i in list) {
            if (
               ['jpg', 'png', 'bmp', 'jpeg','JPG','PNG'].indexOf(list[i].url.split('.')[1]) >=
              0
            ) {
              if (list[i].url == url) {
                console.log(ii)
                this.openPhotoSwipe(
                  ii,
                  document.querySelectorAll('img[preview="' + key + '"]')
                )

                return
              }
              ii++
            }
          }
        }
      },
      onFilterChanged: function() {
        this.currentPage = 1
        this.loadReviewList()
      },
      modeTypeFormatter: function(row, column, cellValue, task_id) {
        switch (cellValue) {
          case 1:
            return '积分录入'
          case 2:
            if (task_id) { return '任务审核' }
            return '积分申请'
          default:
            return ''
        }
      },
      pointTypeFormatter: function(row) {
        for (let index = 0; index < this.pointTypes.length; index++) {
          const pointType = this.pointTypes[index]
          if (row.point_type == pointType.value) {
            if(row.point > 0){
              return '<span style="color:#f00;">+' +row.point +pointType.label+ '</span>'
            }else if(row.point < 0){
              return '<span style="color:#1a8dff;">' +row.point +pointType.label+ '</span>'
            }else{
              return row.point +pointType.label+''
            }
          }
        }
        return ''
      },

      task_status: function(time){
        if(time >= 0 && time <= 60){
          return '按时完成';
        }else if(time > 60){
          return '提前'+(time/3600).toFixed(2)+'小时';
        }else if(time < 0 && time > -60){
          return '按时完成'
        }else if(time < -60){
          return '延期'+(Math.abs(time)/3600).toFixed(2)+'小时'
        }
      },

      dateFormatter: function(row, column, cellValue) {
        let ret = this.$moment(cellValue * 1000).format('MM月DD日')

        if(row.task_id > 0){
          ret = ret + '<br/>('+this.task_status(row.task_expiretime)+')'
        }
        return ret
      },
      dateTime(cellValue) {
         return this.$moment(cellValue* 1000).format('YYYY年MM月DD日 HH时mm分ss秒')
      },
      dateDetailFormatter(cellValue) {
        if (cellValue.status == 0) {
          return ''
        } else {
          return this.$moment(cellValue.update_time * 1000).format('YYYY年MM月DD日 HH时mm分')
        }
      },
      changePage(current) {
        if (isNaN(current) || current < 1) {
          return false
        }
        this.loadReviewList()
      },
      loadReviewList: function() {
        const params = {
          reviewer_id: this.profile.id,
          status: this.list_review_status,
          page: this.currentPage,
          page_size: this.pageLimit
        }
        for (const item in this.filter) {
          const value = this.filter[item]
          if (item == 'time_range') {
            if (!value || value.length < 2) {
              continue
            }
            const timeRangeArr = value.map(x => parseInt(x / 1000))
            timeRangeArr[1] += 60 * 60 * 24 - 1
            params[item] = timeRangeArr.join(',')
          } else {
            params[item] = value
          }
        }
        var self = this
        self.loading = true
        this.$http('get','/integral.php/employee_approve/approve_list',params)
          .then(function(response) {
            if (response.status == 200) {
              self.loading = false
              var jsonData = response.data
              try {



                self.totalCount = jsonData.data.total_count
                self.tableData = jsonData.data.list

                for(let i in self.tableData){
                  self.reviewPassLoaing[self.tableData[i].id] = false
                }
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      },
      loadPointType: function() {
        var self = this
        this.$http('get','/integral.php/ajax_request_common/get_point_types')
          .then(function(response) {
            if (response.status == 200) {
              const jsonData = response.data
              try {
                self.pointTypes = jsonData
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 获取员工列表
      loadEmployeeList: function() {
        var self = this
        this.$http('get','/integral.php/ajax_request_common/prepare_integral_options',{
              id: this.profile.id,
              employee_list: 1
            })
          .then(function(response) {
            if (response.status == 200) {
              var jsonData = response.data
              try {
                self.employeeList = jsonData.employee_list
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 获取管理者列表
      loadEmployerList: function() {
        var self = this
        this.$http('get','/integral.php/ajax_request_common/prepare_integral_options',{
              id: this.profile.id,
              superior_list: 1
            })
          .then(function(response) {
            if (response.status == 200) {
              var jsonData = response.data
              try {
                self.employerList = jsonData.reviewer_list
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 获取积分分类
      loadCategoryList: function() {
        var self = this
        this.$http('get','/integral.php/ajax_request_common/prepare_integral_options',{
              id: this.profile.id,
              category_tree: 1
            })
          .then(function(response) {
            if (response.status == 200) {
              var jsonData = response.data
              try {
                self.categoryTree = jsonData.category_tree
                console.log(self.categoryTree);
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      },
        openUrl(url) {
          window.open(url)
      },
      // 通过
      reviewPass: function(reviewInfo) {
        this.title="审批通过";
        this.reviewId = reviewInfo.id;
        this.isExactly = false;
        console.log(this.isExactly)
        this.scopId = reviewInfo;
        const self = this
        console.log(reviewInfo.id)
      //  self.reviewPassLoaing[reviewInfo.id] = true

        self.eventForm = {}
        this.currentItem = []
        this.$http('get','/integral.php/employee_approve/approve_info',{
              id: reviewInfo.id
            }).then(response => {
          if (response.status == 200) {
            let jsonData = response.data.data.task;

            self.source = response.data.data.source;
            console.log(self.source);
            console.log("renwzhuangtia")
             self.category_id_1 =  response.data.data.category_id_1;

              self.category_id_2 =  response.data.data.category_id_2;

             self.taskForm = jsonData;
             console.log(jsonData.point_level );
             if( self.category_id_1 !=0  &&  self.source== 20 || self.category_id_2  != 0  &&  self.source== 20 ) {
               this.twAgree = true;
               self.point_level = jsonData.point_level;
               if(self.point_level == 10) {
                 self.isActive = 1;
               }else if(self.point_level == 20) {
                 self.isActive = 2;
               }else if(self.point_level == 30) {
                 self.isActive = 3
               }else {
                 self.isActive = 4;
               }
            //  self.taskForm.category_id =  self.category_id_1;

              //self.$set(self.taskForm, 'category_id' , response.data.data.category_id_1);
              //  console.log(self.taskForm.category_id)
               self.commentA = response.data.data.comment;

             }else {
                this.twAgree = false;
             }

             if( self.source != 20 ) {

              //  if(jsonData.rule_item_id > 0 ||jsonData.rule_item_id 　!= '' ||  jsonData.rule_item_id 　!= undefine) {
              //    self.taskForm.rule_item_id = jsonData.rule_item_id;
              //    console.log("akjbkiaubncvoa")
              //  }
                 if( self.category_id_1 !=0  &&  self.source != 20 || self.category_id_2  != 0  &&   self.source != 20 ) {

                 this.twAgree = true;
                }else {
                  this.twAgree = false;
               }
             }
           // 判断积分申请

           if(self.source == 10) {
             if( response.data.data.mode_type_mark == '积分申请'　) {
               if(self.category_id_1 !=0 &&　response.data.data.point == 0　|| response.data.data.point == 0 ) {
                  self.isFirst = false;
               }else {
                  self.isFirst = true;
               }

             }else if(response.data.data.mode_type_mark == '积分录入') {
               self.isFirst = true;
             }
           }



           if(self.source == 10) {
             if( self.category_id_1 !=0 &&　response.data.data.point == 0　) {
               self.isFirst = false;
             }else if(self.category_id_1 !=0 &&　response.data.data.point!= 0) {
               self.isFirst = true;
             }
           }
             self.taskForm.category_id = [];
            self.taskForm.category_id_1  =  response.data.data.category_id_1;
            self.taskForm.category_id_2  =  response.data.data.category_id_2;
            let releid = response.data.data.rule_item_id;
            console.log(releid);
            console.log(self.taskForm.category_id_1);
            console.log("jfjfj")
           // if(self.taskForm.category_id_1 > 0){

            //  self.taskForm.category_id.push(self.taskForm.category_id_1 * 1)
            //   console.log( self.taskForm.category_id)


            // }

            // if(self.taskForm.category_id_2 > 0){

            //  self.taskForm.category_id.push(self.taskForm.category_id_2 * 1)
            //   console.log( self.taskForm.category_id)


            // }

          //  self.Array = self.taskForm.category_id;
          //  self.$set(self.taskForm,'category_id',self.Array)

           let category_path = [];
           let newArray = [];

            if(self.category_id_1!=0 && self.category_id_2!=0) {
                category_path =  response.data.data.category_path.split(',');

            }else {
              category_path.push(self.category_id_1);
            }

           console.log(category_path)
           for(let i = 0; i < category_path.length; i++) {
             let a = Number(category_path[i]);
             console.log(a);
             newArray.push(a)
           }
           console.log(newArray)
           self.Array = newArray;
           self.taskForm.category_id = newArray;
            self.$set(self.taskForm,'category_id', newArray)
            if( releid > 0) {
              console.log("jinlail")
                let form = {
                  rule_item_id: releid,
                  category_id: newArray
                }

              // this.updatePointInfo(releid)
               self.$set(self.taskForm,'rule_item_id', releid )
               this.loadAvailableRuleItems(form);
            }
            this.agreeId = response.data.data.id;
            self.returnTask.point = response.data.data.point;

          //  }else {

           //s  self.newpoint = jsonData.point;
              if(self.source == 20) {
                self.protocol_point = jsonData.point;
              }else {
                  self.protocol_point = response.data.data.point; // 原始积分
              }

              let point_level_log = [];
              console.log(jsonData.point_level_log )
              if( jsonData.point_level_log != null && self.source == 20 || jsonData.point_level_log != undefined  && self.source == 20  ) {
                console.log("进来了")
                   point_level_log = jsonData.point_level_log;
                    point_level_log.forEach(item => {
                if(item.key == 10) {
                  self.oneCorde = item.value
                } else if(item.key == 20) {
                  self.twoCorde = item.value;
                }else if(item.key == 30) {
                  this.threeCorde = item.value;
                }else {
                  this.fourCorde = item.value;
                }
              });
              }


          //  }
            console.log(this.agreeId)

            //self.taskForm.category_id = []




            const review_list = []
            // self.formdata.id = jsonData
            for (const i in jsonData.review_list) {
              review_list.push({
                content: jsonData.review_list[i].employee_name + '(' + (jsonData.review_list[i].status_mark) + ')',
                timestamp: jsonData.review_list[i].time,
                size: 'large',
                type: 'primary',
                comment: jsonData.review_list[i].point+jsonData.point_type_mark
              })
            }
            this.dialogReviewTaskVisible = true;
            self.review_list = review_list
            //if(self.taskForm.category_id.length > 0 && self.taskForm.point != 0){

             // self.sendReviewPassRequest(reviewInfo.id,'pass')
            // }else{
               console.log("tonggio");

               // self.reviewPassLoaing[reviewInfo.id] = false
              //self.reviewTask(reviewInfo)
          //  }

          }
        })
          .catch(error => {
            console.log(error)
          })




      },

      // 选择积分分类时更新积分规则
      loadAvailableRuleItems: function(form) {
         let categoryPath = [];
        let rule_item_id = form.rule_item_id
        this.taskForm.rule_item_id = ''
        var self = this;

        if(form.category_id_1 == 0 && form.category_id_2 == 0) {
          categoryPath = this.taskForm.category_id
          self.Array = categoryPath;
        }else {
          categoryPath = form.category_id;
        }

        if (!categoryPath || categoryPath.length == 0) {
          this.taskForm.rule_item_id = ''

          return
        }
        console.log(categoryPath)
        for(let i=0; i <categoryPath.length; i ++ ) {
        this.$http('get','/integral.php/ajax_request_common/get_grouped_rule_items',{
              category_id: categoryPath[i]
            })
          .then(function(response) {
            if (response.status == 200) {
              const jsonData = response.data
              try {
                self.availableRuleItems = jsonData
                form.rule_item_id = ''
                self.first_awaited = jsonData.point == 0 ? true : false
                form.pointIndicatorText = ''
                self.rule_item_content = ''
                self.$set(self.taskForm, 'rule_item_id ', rule_item_id)
                self.taskForm.rule_item_id = rule_item_id
                if(self.taskForm.rule_item_id == 0){
                  self.taskForm.rule_item_id = ''
                }
               self.updatePointInfo(rule_item_id)
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })

        }

      },
      updatePointInfo: function(val) {
        console.log("dhjdjsojo")
        console.log(val, 'itemlist')
        for (let i = 0; i < this.availableRuleItems.length; i++) {
          for (let j = 0; j < this.availableRuleItems[i].options.length; j++) {
            const item = this.availableRuleItems[i].options[j]
            if (val == item.id) {
              console.log("进来了")

              return this.generatePointIndicator(item)
            }else {

            }
          }
        }
        console.log(this.isHave )
        console.log("kjkkk")
        if(val == 0){
          this.eventForm.pointIndicatorText = '自定义';
          return;
        }
      },
      generatePointIndicator: function(item) {

        let self = this
        this.currentItem = item
        this.rule_item_content = item.content
        this.$set(self.taskForm, self.taskForm.rule_item_id, item.id)
        //  || item.value_1
        if (this.taskForm.point == 0) {
          //this.taskForm.point = item.value_1
        }else{
          if(item.is_range == 1 && this.taskForm.point > 0 && item.value_1 < this.taskForm.point){
            //this.taskForm.point = item.value_1
          }
          if(item.is_range == 1 && this.taskForm.point < 0 && item.value_1 > this.taskForm.point){
            //this.taskForm.point = item.value_1
          }
          if(item.is_range == 0){
            //this.taskForm.point = item.value_1
          }


        }
        const propertyText = item.is_negative == 1 ? '扣除' : '奖励'
        const valueText =
          item.is_range == 1 ? item.value_1 + '～' + item.value_2 : item.value_1
        let typeText = ''
        for (let index = 0; index < this.pointTypes.length; index++) {
          const pointType = this.pointTypes[index]
          if (item.point_type == pointType.value) {
            typeText = pointType.label
            break
          }
        }

        let _item = JSON.parse(JSON.stringify(item))
        if(self.edit_flag.point_range == -1){
          self.edit_flag.point_range = _item.is_range
        }
        if(self.edit_flag.item == -1){
          self.edit_flag.item = true
        }

        const indicatorText = propertyText + '  ' + valueText + '  ' + typeText
        return (this.eventForm.pointIndicatorText = indicatorText)
      },
      // 加载积分规则
      loadRuleItem: function(id) {

        const itemId = id || null
        if (!itemId) {
          return
        }
        var self = this
        this.$http('get','/integral.php/ajax_request_common/get_rule_item',{
              id: itemId
            })
          .then(function(response) {
            if (response.status == 200) {
              const jsonData = response.data
              try {
                self.generatePointIndicator(jsonData)
              } catch (err) {
                console.log(err)
              }
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      },
      resetEventForm: function() {
        this.eventForm = {}
        this.currentItem = []
      },

      // 审核通过
      submitEventForm: function(action) {
        var form = this.$refs['taskForm']
        var self = this
        form.validate(valid => {
          if (valid) {
            if (form) {
              self.sendReviewPassRequest(action)
            }
          } else {
            // console.log('验证未通过')
            return false
          }
        })
      },
      sendReviewPassRequest(action) {
        // if (!reviewId) {
        //   return

      console.log(this.taskForm.category_id)
       const self = this;
      if(self.category_id_1 !=0 ||　self.category_id_2 != 0) {
         self.taskForm.category_id = self.Array;
      }


       let protocol_point = self.protocol_point;  // 原始积分
        const params = {
          id: self.agreeId ,
          action: action,
          //point: this.taskForm.point,  // 最终评分

        //  rule_item_id: self.taskForm.rule_item_id,
          category_id: self.taskForm.category_id[self.taskForm.category_id.length - 1]
        }
       
        // params.reviewer_other_ids = this.eventForm.reviewer_other_ids;
        //if(self.taskForm.point_type != 20) {
           params.point = self.returnTask.point;  // 最终积分
        //}else {
         //  params.point = self.point;
        //}
        if(self.reviewer_other_ids !='' ||　self.reviewer_other_ids != undefined) {
           params.reviewer_id = self.reviewer_other_ids
        }

        if(self.taskForm.point_type ==20) {
             params.protocol_point = protocol_point;
             params.point_level = self.point_level;
        }
        if(self.commentA != '' ||self.commentA != undefined) {
            params.comment = self.commentA;
        }
        if(self.taskForm.rule_item_id == '' ||　self.taskForm.rule_item_id　== undefined) {

        }else {
          params.rule_item_id = self.taskForm.rule_item_id
        }
        // 积分录入
        if(self.taskForm.point_type !=20) {
          if(params.point == 0) {
              self.$message({
              message: '积分不能为0',
              type: 'error'
            })
            return false;
          }
        }
        self.loadingsend = true
        this.$http('post','/integral.php/employee_approve/submit',params,'','',
          {transformRequest: [
            data => {
              const paramArray = new Array()
              for (const it in data) {
                paramArray.push(
                  encodeURIComponent(it) + '=' + encodeURIComponent(data[it])
                )
              }
              return paramArray.join('&')
            }
          ]},
          // headers: {
          //   'Content-Type': 'application/x-www-form-urlencoded'
          // }
        )
          .then(function(response) {
             
            self.loadingsend = false
            console.log(response.data);
            console.log(response.data.msg);
            if (response.data.code == 1000) {
           
           //  self.reviewPassLoaing[reviewId] = false
             if (response.data.code == 1000) {
              self.currentPage = 1
              self.dialogReviewDetailVisible = false
              self.dialogReviewTaskVisible = false
              self.loadReviewList()
              self.$emit('update-count-indicator');
               let  message = response.data.msg ;

             self.$message({
              message: message,
              type: 'success'
            })
            }else {
              self.loadReviewList();
              self.dialogReviewDetailVisible = false
              self.dialogReviewTaskVisible = false
            }
          }else {

            let  message = response.data.msg ;

            self.$message({
              message: message,
              type: 'error'
            })
          }
          }).catch(function(error) {
            console.log(error)
          })

      },
      promptReject(reviewId) {
        var self = this
            this.retrunAgree = true;
           this.reviewId = reviewId.id;

           //  self.rebut(params)


      },
      CloseComment() {
        this.retrunAgree = false;
         this.returnForm.comment = '';
      },
      handleClose() {
         this.returnForm.comment = '';
           this.retrunAgree = false;
      },
          // 审核驳回
      rebut() {
        console.log(this.reviewId)
          const params = {
               id: this.reviewId
             }
         if(this.returnForm.comment&&this.returnForm.comment != '' ) {
           params.comment= this.returnForm.comment;
         }else {
           this.$message({
             type: 'error',
             message: '驳回意见不能为空'
           })
           return false;
         }

          this.sendReviewRejectRequest(params);
          // let poId = this.scopId;
          // this.dialogReviewTaskVisible = false;
          // this.(poId);

      },
      sendReviewRejectRequest: function(params) {
        console.log("fdjsogi");
        var self = this
        self.loadingsend = true;
        console.log(params)
        params['action'] = 'refuse'
        this.$http('post','/integral.php/employee_approve/submit',params,'','',
          {transformRequest: [
            data => {
              const paramArray = new Array()
              for (const it in data) {
                paramArray.push(
                  encodeURIComponent(it) + '=' + encodeURIComponent(data[it])
                )
              }
              return paramArray.join('&')
            }
          ]},
          // headers: {
          //   'Content-Type': 'application/x-www-form-urlencoded'
          // }
        )
          .then(function(response) {
            let message = ''
            if (response.data.code == 1000) {

              self.loadingsend = false;
              message = response.data.msg;
              self.currentPage = 1
              self.retrunAgree = false
              self.loadReviewList();
              self.returnForm.comment = '';
              self.$message({
              message: "驳回成功",
              type: 'success'
            })
              self.$emit('update-count-indicator')
            }else {
               message = response.data.msg;
               self.currentPage = 1
               self.loadingsend = false;
               self.dialogReviewDetailVisible = true
               self.loadReviewList()
                self.$message({
                message:message,
                type: 'error'
                })
            }
          })
          .catch(function(error) {
            console.log(error)
          })
      }
    },
    created() {
      this.loadCategoryList()
      this.loadPointType()
      this.loadEmployeeList()
      this.loadEmployerList()
      this.loadReviewList()
    },
    filters: {
      // pointTypeFormatter:function(cellValue){
      //   console.log('22222222222')
      //   console.log(cellValue)
      //   for(let index = 0; index < this.pointTypes.length; index++){
      //     let pointType = this.pointTypes[index];
      //     if (cellValue == pointType.value) {
      //       return pointType.label;
      //     }
      //   }
      // }
      // pointTypeFormatter: function(val){
      //   console.log('this.pointTypes------------?//')
      //   console.log(this)
      //   console.log(this.pointTypes)
      // for (let index = 0; index < this.pointTypes.length; index++) {
      //     let pointType = this.pointTypes[index];
      //     if (cellValue == pointType.value) {
      //       return pointType.label;
      //     }
      //   }
      //   return "";
      // }
    }
  }
</script>
<style scoped>
  .el-pagination {
    text-align: center;
    margin-top: 15px;
  }
  .el-form-item__label {
    padding: 0 25px 0 0;
  }
  .text_item {
    margin-bottom: 24px;
  }
  .text_item span {
    width: 100px;
    display: inline-block;
    padding-right: 25px;
  }
  .itemCorde {
    border: 1px solid #D8DCE6;
    width: 63px;height: 68px;display:flex;flex-direction: column;justify-content: center;align-items: center;
    margin-right: 12px;
    cursor: pointer;
  }
  .itemCorde div {
    height: 24px;
    line-height: 24px;
    font-size: 14px;
    color: #909399;
    cursor: pointer;
  }
  .isActive {

    border: 1px solid #26A2FF;
  }
  .isActive div {
    color: #26A2FF;
  }
  .classify /deep/ .el-select .el-input  {
    width: 150px;
  }
  .el-input__inner {
    padding: 0 0 0 15px;
  }
/* input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
        -webkit-appearance: none!important;
}

  input[type="number"] {
    -moz-appearance: textfield;
     -webkit-appearance: none;
     appearance: none;
} */
.corde /deep/ .el-input__inner::-webkit-outer-spin-button,
.corde /deep/ .el-input__inner::-webkit-inner-spin-button {
   -webkit-appearance: none!important;
   appearance: none!important;
}
</style>
