<template>
  <at-table
    @load="loadData"
    :data="data"
    :page-result="pageResult"
    :dialogTitle="'详情'"
    :dialogVisible="dialogVisible"
    :stripe="false"
    :default-expand-all="defaultExpandAll"
    :isShowPagination="false"
    :expand-row-keys="expandRowKeys"
    @handleDialogCancel="handleDialogCancel"
    @handleDialogClose="handleDialogClose"
    @expand-change="handleExpandChange"
    ref="AtTable"
  >
    <template v-slot:searchInput>
      <el-form
        ref="searchForm"
        :model="searchForm"
        label-width="80px"
        class="search-top"
        @submit.native.prevent
      >
        <el-select
          v-model="searchForm.createTime"
          clearable
          placeholder="请选择年份"
          @change="findinfo"
        >
          <el-option
            v-for="item in optionYears"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>

        <el-select
          v-model="searchForm.id"
          clearable
          placeholder="请选择项目类型"
        >
          <el-option
            v-for="item in selectData"
            :key="item.name"
            :label="item.name"
            :value="item.id"
          >
          </el-option>
        </el-select>
        <project-info-selector
          ref="projectInfo"
          v-model="searchForm.projectId"
          style="width: 100%"
          @keyup.enter.native="findinfo"
        ></project-info-selector>
        <!-- <dict-select
          dictCode="xmgl-xmzt"
          :hasDefaultOption="true"
          clearable
          placeholder="请选择项目状态"
          v-model="searchForm.projectStatus"
          style="width: 100%"
        /> -->
        <el-select clearable v-model="searchForm.projectStatus" placeholder="请选择项目状态">
          <el-option v-for="item in statusList" :key="item.value" :label="item.name" :value="item.value"></el-option>
        </el-select>
        <!-- <el-input
          v-model="searchForm.projectManager"
          placeholder="请输入项目负责人"
          clearable
        ></el-input> -->
        <!-- <dict-select
          dictCode="xmlx-jcyj-jcwjlx"
          :hasDefaultOption="true"
          clearable
          placeholder="请选择决策依据"
          v-model="searchForm.decisionBasisType"
          style="width: 100%"
        />
        <dict-select
          dictCode="zbfs"
          :hasDefaultOption="true"
          clearable
          placeholder="请选择发包方式"
          v-model="searchForm.biddingChargeType"
          style="width: 100%"
        /> -->
        <!-- <el-date-picker
          v-model="searchForm.commencementTime"
          type="date"
          placeholder="选择开工时间"
          value-format="yyyy-MM-dd"
          format="yyyy-MM-dd"
          style="width: 100%"
        >
        </el-date-picker>
        <el-date-picker
          v-model="searchForm.completionTime"
          type="date"
          placeholder="选择完工时间"
          value-format="yyyy-MM-dd"
          format="yyyy-MM-dd"
          style="width: 100%"
        >
        </el-date-picker> -->
        <!--  -->
        <el-button
          size="small"
          type="primary"
          :loading="findling"
          class="el-icon-search search-btn"
          @click="findinfo"
          >查询</el-button
        >
        <el-button
          size="small"
          type="primary"
          plain
          class="el-icon-refresh search-btn"
          @click="handleReset"
          >重置</el-button
        >
        <el-button
          size="small"
          type="primary"
          @click="handleExport"
          :loading="loading2"
          icon="el-icon-download search-btn"
          plain
          style="margin-left: 10px"
          >导出
        </el-button>
        <el-button
          size="small"
          type="primary"
          :icon="
            defaultExpandAll
              ? 'el-icon-remove-outline'
              : 'el-icon-circle-plus-outline'
          "
          plain
          style="margin-left: 10px"
          class="search-btn"
          @click="handleExpandAll"
          >{{ defaultExpandAll ? '全部收缩' : '全部展开' }}</el-button
        >
      </el-form>
    </template>
    <!-- <template v-slot:operationBtn>
    </template> -->
    <template>
      <el-table-column type="expand">
        <!-- slot-scope="scope"  必须加上这个展开时数据才可以刷新 -->
        <template slot-scope="scope">
          <el-table
            :data="scope.row.expandTableData"
            style="width: 100%"
            v-loading="expandLoading"
            @row-dblclick="handleRowDBClick"
          >
            <el-table-column
              label="项目名称"
              align="center"
              prop="projectName"
              :show-overflow-tooltip="true"
            >
            </el-table-column>
            <el-table-column
              label="项目负责人"
              align="center"
              prop="projectManager"
              :show-overflow-tooltip="true"
              width="110"
            >
            </el-table-column>
            <el-table-column
              label="项目类型"
              align="center"
              prop="projectType"
              :show-overflow-tooltip="true"
              width="120"
            >
              <template v-slot="{row}">
                <div>{{ getDictName('xmgl-xmlx', row.projectType) }}</div>
              </template>
            </el-table-column>
            <el-table-column
              label="总投资(万元)"
              align="center"
              prop="projectMoney"
              :show-overflow-tooltip="true"
            >
            </el-table-column>
            <ht-table-column
              prop="projectStatus"
              label="项目状态"
              align="center"
              :show-overflow-tooltip="true"
            >
              <!-- <template v-slot="{row}">
                {{ getDictName('xmgl-xmzt', row.projectStatus) }}
              </template> -->
            </ht-table-column>
            <!-- accumulatedProjectPayment -->
            <el-table-column
              prop="contractAmount"
              label="累计已完成投资(万元)"
              :show-overflow-tooltip="true"
              align="center"
              width="210"
            >
            </el-table-column>
            <el-table-column
              prop="decisionBasisType"
              label="本月进度"
              :show-overflow-tooltip="true"
              align="center"
              width="150"
            >
            </el-table-column>
            <!-- <el-table-column
              label="决策依据"
              align="center"
              prop="decisionBasisType"
              :show-overflow-tooltip="true"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="责任单位"
              align="center"
              prop="responsibleUnit"
              :show-overflow-tooltip="true"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="地勘单位"
              align="center"
              prop="geologicalProspectingUnit"
              :show-overflow-tooltip="true"
              width="130"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="设计单位"
              align="center"
              prop="designUnit"
              :show-overflow-tooltip="true"
            >
            </el-table-column>
            <el-table-column
              label="监理单位"
              align="center"
              prop="supervisorUnit"
              :show-overflow-tooltip="true"
            >
            </el-table-column>
            <el-table-column
              label="施工单位"
              align="center"
              prop="constructUnit"
              :show-overflow-tooltip="true"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="初设概算总投资(万元)"
              align="center"
              prop="preliminaryEstimate"
              :show-overflow-tooltip="true"
              width="140"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="可研估算总投资(万元)"
              align="center"
              prop="feasibilityStudyEstimate"
              :show-overflow-tooltip="true"
              width="140"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="合同金额(万元)"
              align="center"
              prop="contractAmount"
              :show-overflow-tooltip="true"
              width="130"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="发包方式"
              align="center"
              prop="biddingChargeType"
              :show-overflow-tooltip="true"
              width="120"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="建设地址"
              align="center"
              prop="projectAddress"
              :show-overflow-tooltip="true"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="项目规模及内容"
              align="center"
              prop="projectContent"
              :show-overflow-tooltip="true"
              width="120"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="开工时间"
              align="center"
              prop="commencementTime"
              :show-overflow-tooltip="true"
              width="120"
            >
            </el-table-column> -->
            <!-- <el-table-column
              label="完工时间"
              align="center"
              prop="completionTime"
              :show-overflow-tooltip="true"
              width="120"
            >
            </el-table-column> -->
          </el-table>
          <el-pagination
            small
            class="expandPagination"
            :disabled="loading"
            @size-change="(val) => handleSizeChange(val, scope.row.id)"
            @current-change="(val) => handleCurrentChange(val, scope.row.id)"
            :current-page.sync="scope.row.pagination.page"
            :page-sizes="pageSizes"
            :page-size="scope.row.pagination.pageSize"
            :pager-count="pagerCount"
            layout="total, sizes, prev, pager, next, jumper"
            :total="scope.row.pagination.total"
          ></el-pagination>
        </template>
      </el-table-column>
      <el-table-column label="项目类型" prop="name"> </el-table-column>
      <el-table-column label="总计(万元)" prop="total"> </el-table-column>
    </template>
    <template v-slot:dialogContent>
      <el-descriptions title="项目明细" border :column="2" size="medium">
        <el-descriptions-item label="项目名称">{{
          detailData.projectName
        }}</el-descriptions-item>
        <el-descriptions-item label="项目状态">{{
          detailData.prijectStatus
        }}</el-descriptions-item>
        <el-descriptions-item label="项目负责人">{{
          detailData.projectManager
        }}</el-descriptions-item>
        <el-descriptions-item label="决策依据">{{
          detailData.decisionBasisType
        }}</el-descriptions-item>
        <el-descriptions-item label="责任单位">{{
          detailData.responsibleUnit
        }}</el-descriptions-item>
        <el-descriptions-item label="地勘单位">{{
          detailData.geologicalProspectingUnit
        }}</el-descriptions-item>
        <el-descriptions-item label="设计单位">{{
          detailData.designUnit
        }}</el-descriptions-item>
        <el-descriptions-item label="监理单位">{{
          detailData.supervisorUnit
        }}</el-descriptions-item>
        <el-descriptions-item label="施工单位">{{
          detailData.constructUnit
        }}</el-descriptions-item>
        <el-descriptions-item label="初设概算总投资(万元)">{{
          detailData.preliminaryEstimate
        }}</el-descriptions-item>
        <el-descriptions-item label="可研估算总投资(万元)">{{
          detailData.feasibilityStudyEstimate
        }}</el-descriptions-item>
        <el-descriptions-item label="合同金额(万元)">{{
          detailData.contractAmount
        }}</el-descriptions-item>
        <el-descriptions-item label="发包方式">{{
          detailData.biddingChargeType
        }}</el-descriptions-item>
        <el-descriptions-item label="建设地址">{{
          detailData.projectAddress
        }}</el-descriptions-item>
        <el-descriptions-item label="开工时间">{{
          detailData.commencementTime
        }}</el-descriptions-item>
        <el-descriptions-item label="完工时间">{{
          detailData.completionTime
        }}</el-descriptions-item>
        <el-descriptions-item label="项目规模及内容" :span="3">{{
          detailData.projectContent
        }}</el-descriptions-item>
        <el-descriptions-item label="总投资">{{
          detailData.projectMoney
        }}</el-descriptions-item>
      </el-descriptions>
    </template>
  </at-table>
</template>
<script>
import req from '@/request.js'
import dictUtils from '@/components/dict/DictSelectUtils.js'
export default {
  name: 'ProjectAccount',
  data() {
    return {
      // url:'',
      data: [],
      selectData: [],
      expandTableData: [],
      searchForm: {
        id: '',
        projectId: '',
        createTime: new Date().getFullYear(),
      },
      importData: {},
      loading2: false,
      loading: false,
      findling: false, //查询加载
      pageSizes: [10, 20, 50, 100, 200, 300, 500],
      pagerCount: 11,
      pagination: {page: 1, pageSize: 10, total: 0},
      pageResult: {
        page: 1,
        pageSize: 20,
        total: 0,
      },
      queryFilter: {
        querys:[]
      },
      size: '',
      projectStatusList:[],
      statusList:[],  //项目状态列表
      dialogVisible: false,
      detailData: [],
      defaultExpandAll: false,
      expandRowKeys: [],
      projectType: {},
      expandLoading: false,
      optionYears: [], //顶部搜索年份选择数组
    }
  },
  created() {
    this.getYear()
    this.projectStatusList = dictUtils.getDictItemsFromCache('xmgl-xmzt')
    this.projectStatusList.forEach(item=>{
      if(item.value<12){
        this.statusList.push({
          value:'1',name:'在建'
        })
      }else{
        this.statusList.push({
          value:'2',name:'新建'
        })
      }
    })
    this.statusList = this.statusList.filter(function(item,index,self){
            return self.findIndex(el=>el.value==item.value)===index
        })
  },
  methods: {
    //获取顶部搜索的年份区间
    getYear() {
      const myDate = new Date()
      const startYear = 2006 //起始年份
      const endYear = myDate.getFullYear() //结束年份
      for (let i = endYear; i >= startYear; i--) {
        this.optionYears.push({
          label: i + '年',
          value: i,
        })
      }
    },
    handleExport() {
      this.loading2 = true
      let query = [
        {
          group: 'defaultQueryGroup',
          operation: 'EQUAL',
          relation: 'AND',
          property: 'parent_id_',
          value: 'root',
        },
      ]
      let search = {
        id_: this.searchForm.projectId,
        PROJECT_TYPE_: this.searchForm.id,
        CREATE_TIME_: this.searchForm.createTime,
        // project_status_: this.searchForm.prijectStatus,
        // decision_basis_type_: this.searchForm.decisionBasisType,
        // bidding_charge_type_: this.searchForm.biddingChargeType
      }
      for (let i in search) {
        if (search[i] && i !== 'CREATE_TIME_') {
          query.push({
            group: 'advance',
            operation: 'EQUAL',
            property: i,
            relation: 'AND',
            value: search[i],
          })
        } else if (search[i] && i == 'CREATE_TIME_') {
          query.push({
            group: 'createTimeGroup',
            operation: 'BETWEEN',
            relation: 'AND',
            property: 'COMMENCEMENT_TIME_',
            value: [
              `${this.searchForm.createTime}-01-01 00:00:00`,
              `${this.searchForm.createTime}-12-31 23:59:59`,
            ],
          })
          // {
          //   group: 'createTimeGroup',
          //   operation: 'BETWEEN',
          //   parentGroup: '',
          //   property: 'COMMENCEMENT_TIME_',
          //   relation: 'OR',
          //   value: [
          //     `${search[i]}-01-01 00:00:00`,
          //     `${search[i]}-12-31 23:59:59`,
          //   ],
          // },
          // {
          //   group: 'createTimeSubGroup',
          //   operation: 'LESS',
          //   parentGroup: 'createTimeGroup',
          //   property: 'PROJECT_STATUS_',
          //   relation: 'AND',
          //   value: '12',
          // }
        }
      }
      let param = {
        pageBean: {
          page: 1,
          pageSize: -1,
          showTotal: true,
        },

        querys: query,
      }
      req
        .downloadPostCopy(
          '${cqxy}/biz/ledger/projectLedger/v1/exportDataToExcel',
          param
        )
        .then((res) => {
          if (res.status == 200) {
            this.loading2 = false
            this.$message.success('导出成功')
          } else {
            this.loading2 = false
            this.$message.error('导出失败')
          }
        })
    },
    handleExpandAll() {
      this.defaultExpandAll = !this.defaultExpandAll
      if (!this.defaultExpandAll) {
        this.expandRowKeys = []
      } else {
        this.expandRowKeys = this.data.map((item) => {
          if (item.name !== '总计') {
            return item.id
          }
        })
      }
    },
    /* 导入回调事件 */
    load() {},
    handleDialogCancel() {
      this.dialogVisible = false
    },
    handleDialogClose() {
      this.dialogVisible = false
    },
    handleRowDBClick(data, id) {
      this.detailData = data
      this.dialogVisible = true
    },
    /* 内部表格分页方法 */
    handleSizeChange(pageSize, id) {
      let pagination = {...this.data[id].pagination, pageSize}
      this.$set(this.data[id].pagination, 'page', pagination.page)
      this.$set(this.data[id].pagination, 'pageSize', pagination.pageSize)
      this.$set(this.data[id].pagination, 'total', pagination.total)
      this.handleExpandChange(this.projectType)
    },
    handleCurrentChange(page, id) {
      let pagination = {...this.data[id].pagination, page}
      this.$set(this.data[id].pagination, 'page', pagination.page)
      this.$set(this.data[id].pagination, 'pageSize', pagination.pageSize)
      this.$set(this.data[id].pagination, 'total', pagination.total)
      this.handleExpandChange(this.projectType, true)
    },
    handleExpandChange(row, doNotResetPage) {
      // console.log(row, 'row')
      this.expandLoading = true
      this.projectType = {
        value: row.value,
        id: row.id,
      }
      // 默认重置页码为第一页
      if (!doNotResetPage) {
        if (row.id) {
          this.data[row.id].pagination.page = 1
        }
      }
      let param = {}
      if (row.id) {
        param = {
          pageBean: {
            ...this.data[row.id].pagination,
            showTotal: true,
          },
          querys: [
            {
              operation: 'EQUAL',
              property: 'PROJECT_TYPE_',
              relation: 'AND',
              value: this.projectType.value,
            },
          ],
        }
      } else {
        param = {
          pageBean: {
            ...this.pagination,
            showTotal: true,
          },
          querys: [
            {
              operation: 'EQUAL',
              property: 'PROJECT_TYPE_',
              relation: 'AND',
              value: this.projectType.value,
            },
          ],
        }
      }
      param.querys.push({
        group: 'defaultQueryGroup',
        operation: 'EQUAL',
        relation: 'AND',
        property: 'parent_id_',
        value: 'root',
      })
      if (this.searchForm.createTime) {
        param.querys.push(
          {
            group: 'createTimeGroup',
            operation: 'BETWEEN',
            parentGroup: '',
            property: 'commencement_time_',
            relation: 'AND',
            value: [
              `${this.searchForm.createTime}-01-01 00:00:00`,
              `${this.searchForm.createTime}-12-31 23:59:59`,
            ],
          },
        )
      }
      delete param.pageBean.total
      this.$http
        .post('${cqxy}/biz/ledger/projectLedger/v1/page', param)
        .then((resp) => {
          console.log(resp, 'respssss')
          this.expandLoading = false
          let response = resp.data.value
          if (row.id) {
            this.$set(this.data[row.id], 'expandTableData', response.data)
            this.$set(this.data[row.id].pagination, 'page', response.page)
            this.$set(
              this.data[row.id].pagination,
              'pageSize',
              response.pageSize
            )
            this.$set(this.data[row.id].pagination, 'total', response.total)
          }
          console.log(this.data, 'this.data')
          // this.pagination = {
          //   page: response.page,
          //   pageSize: response.pageSize,
          //   total: response.total
          // }
        })
    },
    loadData(param, cb) {
      this.queryFilter.querys = [
        {
          group: 'defaultQueryGroup',
          operation: 'EQUAL',
          relation: 'AND',
          property: 'parent_id_',
          value: 'root',
        },
      ]
      let search = {
        id_: this.searchForm.projectId,
        PROJECT_TYPE_: this.searchForm.id,
        CREATE_TIME_: this.searchForm.createTime,
      }
      for (let i in search) {
        if (search[i] && i !== 'CREATE_TIME_') {
          this.queryFilter.querys.push({
            group: 'advance',
            operation: 'EQUAL',
            property: i,
            relation: 'AND',
            value: search[i],
          })
        } else if (search[i] && i == 'CREATE_TIME_') {
          this.queryFilter.querys.push({
            group: 'createTimeGroup',
            operation: 'BETWEEN',
            relation: 'AND',
            property: 'COMMENCEMENT_TIME_',
            value: [
              `${this.searchForm.createTime}-01-01 00:00:00`,
              `${this.searchForm.createTime}-12-31 23:59:59`,
            ],
          })
        }
      }
      this.selectData = []
      this.$http
        .post('${yhxt}/biz/ledger/projectLedger/v1/typeData', this.queryFilter)
        .then((res) => {
          if (res.data.state) {
            console.log(res,'res');
            res.data.value.forEach((item, index) => {
              item.id = index
              if (item.name == '总计' || Number(item.total) == 0) {
                item.hasChildren = 'false'
              } else {
                item.hasChildren = true
                this.selectData.push({
                  name: item.name,
                  id: item.value,
                })
              }
            })
            this.data = res.data.value
            this.data.forEach((item, index) => {
              this.projectType = {
                name: item.name,
                id: item.id,
                value: item.value,
              }
              item.expandTableData = []
              item.pagination = {page: 1, pageSize: 10, total: 0}
            })
          } else {
            this.$message.error(res.data.message)
          }
        })
      if (cb) {
        cb()
      }
    },
    findinfo() {
      this.loadData()
      this.findling = true
      this.$refs.projectInfo.getProjectData(this.searchForm.createTime)
      if (this.searchForm.id) {
        this.defaultExpandAll = !this.defaultExpandAll
        this.expandRowKeys = this.data.map((item) => {
          if (item.name !== '总计' && item.id === this.searchForm.id) {
            return item.id
          }
        })
      }
      if (this.searchForm.projectId || this.searchForm.createTime) {
        this.defaultExpandAll = true
        this.expandRowKeys = this.data.map((item) => {
          if (item.name !== '总计') {
            return item.id
          }
        })
      }
      let query = [
        {
          group: 'defaultQueryGroup',
          operation: 'EQUAL',
          relation: 'AND',
          property: 'parent_id_',
          value: 'root',
        },
      ]
      let search = {
        id_: this.searchForm.projectId,
        PROJECT_TYPE_: this.searchForm.id,
        CREATE_TIME_: this.searchForm.createTime,
        // project_status_: this.searchForm.projectStatus,
        // decision_basis_type_: this.searchForm.decisionBasisType,
        // bidding_charge_type_: this.searchForm.biddingChargeType
      }
      let projectStatus = ''
      if(this.searchForm.projectStatus==1){
        projectStatus = '12'
      }
      if(this.searchForm.projectStatus==2){
        projectStatus = ''
      }
      for (let i in search) {
        if (search[i] && i !== 'CREATE_TIME_') {
          query.push({
            group: 'advance',
            operation: 'EQUAL',
            property: i,
            relation: 'AND',
            value: search[i],
          },
          // {
          //     group: 'createTimeSubGroup',
          //     operation: 'LESS_EQUAL',
          //     parentGroup: 'createTimeGroup',
          //     property: 'commencement_time_',
          //     relation: 'OR',
          //     value: `${this.searchForm.createTime}-12-31 23:59:59`,
          //   },
          //   {
          //     group: 'createTimeSubGroup',
          //     operation: 'LESS',
          //     parentGroup: 'createTimeGroup',
          //     property: 'PROJECT_STATUS_',
          //     relation: 'AND',
          //     value: '12',
          //   }
            )
        } else if (search[i] && i == 'CREATE_TIME_') {
          query.push({
            group: 'createTimeGroup',
            operation: 'BETWEEN',
            parentGroup: '',
            property: 'commencement_time_',
            relation: 'AND',
            value: [
              `${search[i]}-01-01 00:00:00`,
              `${search[i]}-12-31 23:59:59`,
            ],
          },{
              group: 'createTimeSubGroup',
              operation: 'LESS_EQUAL',
              parentGroup: 'createTimeGroup',
              property: 'commencement_time_',
              relation: 'OR',
              value: `${this.searchForm.createTime}-12-31 23:59:59`,
            },
            {
              group: 'createTimeSubGroup',
              operation: 'LESS',
              parentGroup: 'createTimeGroup',
              property: 'PROJECT_STATUS_',
              relation: 'AND',
              value: projectStatus,
            })
        }
      }
      if(projectStatus==''){
        query.splice(query.length-2)
      }
      let data = {
        pageBean: {
          page: -1,
          pageSize: -1,
          showTotal: true,
        },
        querys: query,
      }
      this.$http
        .post('${cqxy}/biz/ledger/projectLedger/v1/page', data)
        .then((resp) => {
          console.log(resp, 'expandTableData')
          this.expandTableData = resp.data.value.data
          this.selectData.forEach((item) => {
            this.expandTableData.forEach((val) => {
              if (item.projectType == item.id) {
                item.expandTableData.push(val)
              }
            })
          })
          this.data.forEach((item) => {
            this.expandTableData.forEach((val) => {
              if (item.value == val.projectType) {
                item.expandTableData.push(val)
              }
            })
          })
          this.handleExpandChange(this.projectType, false)
          this.findling = false
          this.pageResult = {
            page: resp.data.value.page,
            pageSize: resp.data.value.pageSize,
            total: resp.data.value.total,
          }
        })
    },
    /* 重置清除查询字段 */
    handleReset() {
      this.searchForm = {
        id: '',
        projectId: '',
        projectStatus: '',
        decisionBasisType: '',
        biddingChargeType: '',
      }
      this.selectData = []
      this.expandRowKeys = []
      this.defaultExpandAll = false
      this.$refs.AtTable.load()
    },
  },
}
</script>
<style lang="scss" scoped>
@import '@/assets/css/common.scss';
/* 分页 */
.expandPagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* 表格头部样式 */
/deep/ .has-gutter th {
  color: #000;
  background-color: rgba($color: rgb(239, 239, 239), $alpha: 0.8);
}
/deep/ .el-dialog__header {
  border-bottom: 1px solid #eee;
}
/deep/ .el-table__column-filter-trigger i {
  color: #000 !important;
}

/* 是否显示展开符号 */
/deep/ .expand .el-table__expand-column .cell {
  display: none;
}

/deep/ .el-descriptions-row {
  th {
    width: 15%;
  }
  td {
    width: 35%;
  }
}
</style>
