<template>
  <div class="screenCom">
    <div class="container">
      <div class="top">
        <span>筛选</span>
        <img :src="imgUrl" alt @click="$store.state.selcettWindowState = false" />
      </div>
      <!-- 行列转换 -->
      <div class="rowCol">
        <input type="radio" value="hang" v-model="selectAudio" />行
        <input type="radio" value="lie" v-model="selectAudio" />列
      </div>
      <!-- 主要筛选框 -->
      <div class="mainKuang">
        <div class="left">
          <div
            v-for="(item,index) in dataList"
            :key="index"
            :class="{active:item.state}"
            @click="changeBgcolor(index)"
          >{{item.text}}</div>
        </div>
        <div class="center1">
          <div>
            <div>
              <input type="radio" value="大于(>)" v-model="selectChange" />
              {{datarts.list1}}
            </div>
            <div>
              <input type="radio" value="小于(<)" v-model="selectChange" />
              {{datarts.list2}}
            </div>
            <div>
              <input type="radio" value="大于等于(>=)" v-model="selectChange" />
              {{datarts.list3}}
            </div>
            <div>
              <input type="radio" value="小于等于(<=)" v-model="selectChange" />
              {{datarts.list4}}
            </div>
          </div>
          <div>
            数量：
            <input type="text" v-model="nums" placeholder="请输入数量" />
          </div>
        </div>
        <div class="center2">
          <!-- 添加 -->
          <div @click="insertData()">{{datarts.list5}}</div>
          <!-- 删除 -->
          <div @click="deleteData()">{{datarts.list6}}</div>
        </div>
        <div class="right">
          <!-- <textarea v-model="textareas"></textarea> -->
          <div
            v-for="(item,index) in selectDatas"
            :key="index"
            :class="{active:item.state}"
            @click="changeBghuio(index)"
          >{{item.text}}</div>
        </div>
      </div>
      <!-- 确定取消 -->
      <div class="bottom">
        <div @click="changeLeftData()">确定</div>
        <div @click="$store.state.selcettWindowState = false">取消</div>
      </div>
    </div>
  </div>
</template>
<script>

export default {
  name: 'screenCom',
  data () {
    return {
      imgUrl: require('../../../static/nav/deleteImg.png'),
      selectAudio: 'hang',
      dataList: [
        {
          text: 'h就开始1',
          state: false,
          id: 1
        },
        {
          text: 'h就开始2',
          state: false,
          id: 2
        },
        {
          text: 'h就开始3',
          state: false,
          id: 3
        },
        {
          text: 'h就开始4',
          state: false,
          id: 4
        },
        {
          text: 'h就开始5',
          state: false,
          id: 5
        },
        {
          text: 'h就开始6',
          state: false,
          id: 6
        },
        {
          text: 'h就开始7',
          state: false,
          id: 7
        },
        {
          text: 'h就开始',
          state: false,
          id: 8
        },
        {
          text: 'h就开始8',
          state: false,
          id: 9
        },
        {
          text: 'h就开始9',
          state: false,
          id: 10
        },
        {
          text: 'h就开始10',
          state: false,
          id: 11
        },
        {
          text: 'h就开始11',
          state: false,
          id: 12
        },
        {
          text: 'h就开始12',
          state: false,
          id: 13
        },
        {
          text: 'h就开始13',
          state: false,
          id: 14
        },
        {
          text: 'h就开始14',
          state: false,
          id: 15
        },
        {
          text: 'h就开始15',
          state: false,
          id: 16
        },
        {
          text: 'h就开始16',
          state: false,
          id: 17
        },
        {
          text: 'h就开始17',
          state: false,
          id: 18
        }
      ],
      datarts: {
        list1: '大于(>)',
        list2: '小于(<)',
        list3: '大于等于(>=)',
        list4: '小于等于(<=)',
        list5: '>',
        list6: '<'
      },
      selectChange: '大于(>)',
      textareas: '',
      nums: '',
      // 选中的筛选条件
      selectDatas: []
    }
  },
  watch: {
    selectAudio (newValue, oldValue) {
      this.textareas = ''
      this.nums = ''
      // 选中的筛选条件
      this.selectDatas = []
      if (newValue === 'hang') {
        // 行列新增渲染
        if (this.$store.state.SelecttDimension.col === 'dq') {
          this.dataList = this.$store.state.noChangeData.areaName.map((item, index) => {
            return {
              text: item,
              state: false,
              id: index
            }
          })
        } else if (this.$store.state.SelecttDimension.col === 'sj') {
          this.dataList = this.$store.state.noChangeData.timeArr.map((item, index) => {
            return {
              text: item,
              state: false,
              id: index
            }
          })
        } else if (this.$store.state.SelecttDimension.col === 'zb') {
          this.dataList = this.$store.state.noChangeData.termsName.map((item, index) => {
            return {
              text: item,
              state: false,
              id: index
            }
          })
        }
      } else if (newValue === 'lie') {
        // 行列新增渲染
        if (this.$store.state.SelecttDimension.row === 'dq') {
          this.dataList = this.$store.state.noChangeData.areaName.map((item, index) => {
            return {
              text: item,
              state: false,
              id: index
            }
          })
        } else if (this.$store.state.SelecttDimension.row === 'sj') {
          this.dataList = this.$store.state.noChangeData.timeArr.map((item, index) => {
            return {
              text: item,
              state: false,
              id: index
            }
          })
        } else if (this.$store.state.SelecttDimension.row === 'zb') {
          this.dataList = this.$store.state.noChangeData.termsName.map((item, index) => {
            return {
              text: item,
              state: false,
              id: index
            }
          })
        }
      }
    }
  },
  methods: {
    changeBgcolor (ind) {
      this.dataList.forEach((item, index) => {
        index === ind ? item.state = true : item.state = false
      })
    },
    changeBghuio (ind) {
      this.selectDatas.forEach((item, index) => {
        index === ind ? item.state = true : item.state = false
      })
    },
    // 添加筛选条件
    insertData () {
      console.log(this.dataList.find(item => item.state === true))
      if (this.dataList.find(item => item.state === true) !== undefined && this.nums !== '' && /^[0-9]+$/.test(this.nums)) {
        let fuh = ''
        switch (this.selectChange) {
          case '大于(>)':
            fuh = '>'
            break
          case '小于(<)':
            fuh = '<'
            break
          case '大于等于(>=)':
            fuh = '>='
            break
          case '小于等于(<=)':
            fuh = '<='
            break
        }
        this.selectDatas.push({
          text: '#' + this.dataList.find(item => item.state === true).text + '#' + fuh + this.nums,
          id: this.dataList.find(item => item.state === true).id,
          state: false
        })
      } else {
        this.$alert('无法添加筛选条件！筛选条件不正确！', '温馨提示', {
          confirmButtonText: '确定'
        })
      }
    },
    // 删除筛选条件
    deleteData () {
      if (this.selectDatas.find(item => item.state === true) !== undefined) {
        this.selectDatas = this.selectDatas.filter((item, index) => {
          console.log(item.state)
          return item.state === false
        })
      } else {
        this.$alert('请选择您需要删除的筛选条件！', '温馨提示', {
          confirmButtonText: '确定'
        })
      }
    },
    // 筛选左侧数据
    changeLeftData () {
      // 初始化表格数据
      this.$parent.changeScreenCom()
      if (this.selectDatas.length > 0) {
        if (this.selectAudio === 'hang') {
          if (this.$route.query.type !== 'area') {
            // 筛选条件
            // 行列新增渲染
            if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeTermsData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.termsName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeTermsData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.timeArr.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            }
          } else {
            // 筛选条件
            if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.termsName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeAreaData = waiBrr
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.timeArr.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeAreaData = waiBrr
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'sj') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.areaName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeAreaData = waiBrr
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.areaName = this.$store.state.noChangeData.areaName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'dq') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.timeArr.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeAreaData = waiBrr
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.areaName = this.$store.state.noChangeData.areaName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'dq') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.termsName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeAreaData = waiBrr
              this.$store.state.transBefore.areaName = this.$store.state.noChangeData.areaName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'zb') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.areaName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeAreaData = waiBrr
              this.$store.state.transBefore.areaName = this.$store.state.noChangeData.areaName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            }
          }
        } else if (this.selectAudio === 'lie') {
          if (this.$route.query.type !== 'area') {
            if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeTermsData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.timeArr.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeTermsData))
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.termsName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              // console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    console.log((eval((list.value === '' ? '0' : list.value) + brreWay[index].way)))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            }
          } else {//地区列数据
            if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.timeArr.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.termsName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'sj') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.timeArr.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'dq') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.areaName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'dq') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.termsName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            } else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'zb') {
              // 筛选条件
              let newDataBefore = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeAreaData))
              // 转置
              newDataBefore = newDataBefore[0].map(function (col, index) {
                return newDataBefore.map((row, key) => {
                  return row[index]
                })
              })
              console.log(newDataBefore, '转置')
              // 返回下标
              let brre = this.selectDatas.map((list, key) => {
                return this.$store.state.noChangeData.areaName.indexOf(list.text.split('#')[1])
              })
              console.log(brre, 'brre')
              // 返回表达式
              let brreWay = this.selectDatas.map((list, key) => {
                return {
                  text: list.text.split('#')[1],
                  way: list.text.split('#')[2]
                }
              })
              // 第一次过滤出来的数据
              let firstData = newDataBefore.filter((item, index) => {
                return brre.indexOf(index) !== -1
              }).map((item, index) => {
                return item.map((list, key) => {
                  return {
                    index: key,
                    value: list
                  }
                })
              })
              console.log(firstData, 'newDataBefore')
              // console.log(brreWay, 'brreWay')
              // 第二次过滤
              let DataTwo = []
              firstData.forEach((item, index) => {
                DataTwo.push(
                  item.filter((list, key) => {
                    /* eslint-disable */
                    // console.log(eval(list.value + brreWay[index].way))
                    return eval((list.value === '' ? '0' : list.value) + brreWay[index].way) === true
                  })
                )
              })
              // console.log(DataTwo, '第二次过滤')
              // 第三次过滤
              // 定义一个数组用来存储全集的下标
              let AllLabelIndex = []
              let threeData = DataTwo.forEach((item, index) => {
                let itemDAta = item.map((list, key) => {
                  return Object.values(list)[0]
                })
                // console.log(itemDAta)
                AllLabelIndex = this.concat(AllLabelIndex, itemDAta)
              })
              console.log(AllLabelIndex, '连接数组')
              // 第三次过滤并且复制
              let waiBrr = firstData.map((item, index) => {
                return item.map((list, key) => {
                  // console.log(list)
                  return list.value
                })
              }).map((item, index) => {
                return item.filter((list, key) => {
                  return AllLabelIndex.indexOf(key) !== -1
                })
              })
              // 转置回来
              waiBrr = waiBrr[0].map(function (col, index) {
                return waiBrr.map((row, key) => {
                  return row[index]
                })
              })
              console.log(waiBrr, '处理后的数据')
              this.$store.state.transBefore.transBeforeTermsData = waiBrr
              // console.log(AllLabelIndex,'AllLabelIndex')
              this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
                return AllLabelIndex.indexOf(index) !== -1
              })
              this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
                return brre.indexOf(index) !== -1
              })
              console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
              // 关闭窗口
              this.$store.state.selcettWindowState = false
              this.$emit('emitState', true)
            }
          }
        }
      } else {
        // alert('筛选条件不能为空')
        this.$alert('筛选条件不能为空', '温馨提示', {
          confirmButtonText: '确定',
        })
      }
    },
    // 数组合并去重排序
    concat(arr1, arr2) {
      if (arguments.length <= 1) {
        return false;
      }
      var concat_ = function (arr1, arr2) {
        var arr = arr1.concat();
        for (var i = 0; i < arr2.length; i++) {
          arr.indexOf(arr2[i]) === -1 ? arr.push(arr2[i]) : 0;
        }
        return arr;
      }
      var result = concat_(arr1, arr2);
      for (var i = 2; i < arguments.length; i++) {
        result = concat_(result, arguments[i]);
      }
      //排序
      function sortNumber(a, b) {
        return a - b;
      }
      return result.sort(sortNumber);
    }
  },
  mounted() {
    this.textareas = ''
    this.nums = ''
    // 选中的筛选条件
    this.selectDatas = []
    // 行列新增渲染
    if (this.$store.state.SelecttDimension.col === 'dq') {
      this.dataList = this.$store.state.noChangeData.areaName.map((item, index) => {
        return {
          text: item,
          state: false,
          id: index
        }
      })
    } else if (this.$store.state.SelecttDimension.col === 'sj') {
      this.dataList = this.$store.state.noChangeData.timeArr.map((item, index) => {
        return {
          text: item,
          state: false,
          id: index
        }
      })
    } else if (this.$store.state.SelecttDimension.col === 'zb') {
      this.dataList = this.$store.state.noChangeData.termsName.map((item, index) => {
        return {
          text: item,
          state: false,
          id: index
        }
      })
    }
  }
}
</script>
<style scoped lang="scss">
.screenCom {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  & > .container {
    width: 69.125rem;
    height: 44.75rem;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    & > .top {
      margin-top: 1.375rem;
      width: 64.125rem;
      height: 3.875rem;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      border-bottom: 0.125rem solid #bdbdbd;
      & > span {
        font-size: 1.375rem;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 0rem;
        color: #333333;
      }
      & > img {
        width: 1.3125rem;
        height: 1.3125rem;
      }
    }
    & > .rowCol {
      width: 64.125rem;
      height: 4.125rem;
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      & > input {
        margin: 0 0.75rem;
      }
    }
    & > .mainKuang {
      width: 64.125rem;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: flex-start;

      & > .left {
        width: 18.0625rem;
        height: 22.875rem;
        border: 0.0625rem solid #bdbdbd;
        overflow: auto;
        & > div {
          width: 100%;
          height: 2.4rem;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: flex-start;
        }
        & > div:hover {
          cursor: pointer;
        }
        & > .active {
          background-color: deepskyblue;
          color: #fff;
        }
      }
      & > .center1 {
        width: 17.25rem;
        height: 22.875rem;
        & > div:nth-child(1) {
          width: 17.25rem;
          height: 19.875rem;
          display: flex;
          flex-direction: column;
          justify-content: flex-start;
          align-items: flex-start;
          border: 0.0625rem solid #bdbdbd;
          & > div {
            margin: 0.5rem 0;
          }
        }
        & > div:nth-child(2) {
          width: 100%;
          height: 3rem;
          display: flex;
          flex-direction: row;
          justify-content: center;
          align-items: center;
        }
      }
      & > .center2 {
        width: 3rem;
        height: 22.875rem;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        & > div {
          width: 2.5rem;
          height: 2.125rem;
          background-color: #52b6e3;
          border-radius: 0.3125rem;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          color: #fff;
          font-size: 1.2rem;
        }
        & > div:hover {
          cursor: pointer;
        }
      }
      & > .right {
        width: 20.625rem;
        height: 22.875rem;
        border: 1px solid #bdbdbd;
        overflow: auto;
        & > div {
          width: 100%;
          height: 1.8rem;
          display: flex;
          flex-direction: row;
          justify-content: flex-start;
          align-items: center;
        }
        & > .active {
          background-color: deepskyblue;
          color: #fff;
        }
        & > div:hover {
          cursor: pointer;
        }
      }
    }
    & > .bottom {
      width: 64.125rem;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: flex-start;
      & > div:nth-child(1) {
        width: 15.625rem;
        height: 3.1875rem;
        background-color: #52b6e3;
        border-radius: 0.3125rem;
        font-size: 1.25rem;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 0rem;
        color: #ffffff;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
      }
      & > div:nth-child(2) {
        width: 15.625rem;
        height: 3.1875rem;
        border: solid 0.125rem #dbdbdb;
        border-radius: 0.3125rem;
        font-size: 1.25rem;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 0rem;
        color: #666666;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
      }
      & > div {
        margin: 3rem 1.2rem;
      }
      & > div:hover {
        cursor: pointer;
      }
    }
  }
}
</style>
