<template>
  <div ref="DAP" class="summary-archive-content">
    <div class="summary-archive-content-card" :style="{ height: chartHeight }">
      <div class="DAP-from">
        <a-form layout="vertical">
          <a-row :gutter="24">
            <a-col :xl="8" :lg="8" :md="12" :sm="24" :xs="24">
              <a-form-item :label="$t('measure-track.dap-table.structure')">
                <!-- 勾选模式选择 -->
                <span class="radio-group-class" >
                  <a-radio-group @change="radioChange" :default-value="1" size="small">
                    <a-radio :value="2" class="level-radio">
                      <a-tooltip>
                        <template slot="title">
                          {{ $t('summary-archive.fmea-table.same-level-check') }}
                        </template>
                        {{ $t('summary-archive.fmea-table.same-level-check') }}
                      </a-tooltip>
                    </a-radio>
                    <a-radio :value="3" class="level-radio">
                      <a-tooltip>
                        <template slot="title">
                          {{ $t('summary-archive.fmea-table.check-with-same-superior') }}
                        </template>
                        {{ $t('summary-archive.fmea-table.check-with-same-superior') }}
                      </a-tooltip>
                    </a-radio>
                    <a-radio :value="1" class="level-radio">
                      <a-tooltip>
                        <template slot="title">
                          {{ $t('summary-archive.fmea-table.unlimited') }}
                        </template>
                        {{ $t('summary-archive.fmea-table.unlimited') }}
                      </a-tooltip>
                    </a-radio>
                  </a-radio-group>
                </span>
                <a-tree-select ref="leftTree" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                  :placeholder="$t('measure-track.dap-table.please-select-a-structure')" allow-clear show-search
                  tree-default-expand-all v-model="searchParams.struId" treeCheckable treeCheckStrictly
                  :showArrow="true" @select="selectBtn" :replaceFields="replaceFields" :tree-data="treeData"
                  :filterTreeNode="filterTreeNode" @change="treeSelectChange">
                  <template #title="{ value: val, title }">
                    <template>{{ title }}</template>
                  </template>
                </a-tree-select>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="8" :md="12" :sm="24" :xs="24">
              <a-form-item :label="$t('measure-track.dap-table.whether-to-output-detection-measures')">
                <a-checkbox @change="outFlagChange" />
              </a-form-item>
            </a-col>
          </a-row>
        </a-form>
        <div class="pt10 pb10">
          <span>
            <a-button @click="excelExport" type="primary">
              {{ $t('global-btn.export') }}
            </a-button>
          </span>
          <span class="fr">
            <a-button @click="search" type="primary">
              {{ $t('global-btn.search') }}
            </a-button>
          </span>
        </div>
      </div>
      <div>
        <a-table ref="tableRef" :data-source="tableData" :columns="tableColumns"
          :rowKey="(row, index) => { return index; }" bordered size="small" :loading="tableLoading"
          :scroll="{ x: tableWidth, y: tableHeightValue }" @change="tableChange" :pagination="pagination"
          :components='components'>
          <template slot="index" slot-scope="text, record, index">
            <span>{{ (pagination.current - 1) * pagination.pageSize + index + 1 }}</span>
          </template>
          <template slot="notes" slot-scope="text, record">
            <a-input :id="'notes' + record.actionId" :disabled="disabled" v-model="record.notes" :maxLength='500'
              @blur="updateText(record)" type='text' />
          </template>
          <template slot="needValidationTesting" slot-scope="text, record">
            <a-input :id="'needValidationTesting' + record.actionId" :disabled="disabled"
              v-model="record.needValidationTesting" @blur="updateText(record)" type='text' :maxLength='500' />
          </template>
          <template slot="newIdentified" slot-scope="text, record">
            <a-input :id="'newIdentified' + record.actionId" :disabled="disabled" v-model="record.newIdentified"
              @blur="updateText(record)" type='text' :maxLength='500' />
          </template>
        </a-table>
      </div>
    </div>
    <!--  导入模态框 Start -->
    <ExportModal :showEditModal="showExportModal" @closeExportModal="closeExportModal" @excelExport=excelExport
      @pdfExport=pdfExport @excelOrPdfExport=excelOrPdfExport ref="exportModal" />
    <!--  导入模态框 End -->
  </div>
</template>

<script>

import { arrayToTree } from "@/utils/tree";
import ExportModal from "@/views/measureTrack/components/exportModal";
import { getUrlParam } from "@/common/common"
import VueDraggableResizable from "vue-draggable-resizable";

export default {
  name: "DAP",
  components: {
    ExportModal,
    VueDraggableResizable
  },
  data() {
    //表格拖拽
    this.components = {
      header: {
        cell: (h, props, children) => {
          const { key, ...restProps } = props;
          // 此处的this.columns 是定义的table的表头属性变量
          const col = this.tableColumns.find((col) => {
            const k = col.dataIndex || col.key;
            return k === key;
          });
          if (!col || !col.width) {
            return h('th', { ...restProps }, [...children]);
          }
          const dragProps = {
            key: col.dataIndex || col.key,
            class: 'table-draggable-handle',
            attrs: {
              w: 10,
              x: col.width,
              z: 1,
              axis: 'x',
              draggable: true,
              resizable: false
            },
            on: {
              dragging: (x, y) => {
                col.width = Math.max(x, 35);
              }
            }
          };
          const drag = h('vue-draggable-resizable', { ...dragProps });
          return h('th', { ...restProps, class: 'resize-table-th' }, [...children, drag]);
        }
      }
    };
    return {
      deepCurrent: '', // 当前选中的层级
      checkIdShow: false, // 同级勾选是否启动
      sameSuperCheckFlag: false, // 同父级勾选是否启动
      checkedEvet: false, // 判断是勾选还是删除
      currentChecked: [], // 完全受控数据
      struNodeList: [], // 节点下拉选原始数据
      // 表格总宽度
      tableWidth: 0,
      //表格各列宽度总和
      columnsWidth: 0,
      /** 状态字典Dict */
      stateDict: [
        { name: this.$t('global-dict.un-processed'), value: "01" },
        { name: this.$t('global-dict.to-be-decided'), value: "02" },
        { name: this.$t('global-dict.to-be-implemented'), value: "03" },
        { name: this.$t('global-dict.in-working'), value: "10" },
        { name: this.$t('global-dict.complete'), value: "20" },
        { name: this.$t('global-dict.abandon'), value: "04" },
        { name: this.$t('global-dict.finish'), value: "05" },
      ],
      /** 表格数据 */
      tableData: [],
      /** 表格列头 */
      tableColumns: [
        {
          title: () => this.$t('measure-track.dap-table.part-number'),
          width: 150,
          align: "center",
          dataIndex: "partNumber",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.structure'),
          width: 150,
          align: "center",
          dataIndex: "structure",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.measures-name'),
          width: 150,
          align: "center",
          dataIndex: "preventiveMeasure",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.objective'),
          width: 150,
          align: "center",
          dataIndex: "objective",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.function/procduct'),
          width: 150,
          align: "center",
          dataIndex: "function",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.relevant-specifications'),
          width: 150,
          align: "center",
          dataIndex: "relevantSpecifications",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.source'),
          width: 150,
          align: "center",
          dataIndex: "source",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.analysis-request-number'),
          width: 150,
          align: "center",
          dataIndex: "requestNumber",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.analysis-description'),
          width: 150,
          align: "center",
          dataIndex: "analysisDescription",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.confidence-of-analytical-models'),
          width: 150,
          align: "center",
          dataIndex: "confidence",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.acceptance-criteria'),
          width: 150,
          align: "center",
          dataIndex: "acceptanceCriteria",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.person-responsible'),
          width: 100,
          align: "center",
          dataIndex: "person",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.scheduled-start-time'),
          width: 150,
          align: "center",
          dataIndex: "planStartTime",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.actual-start-time'),
          width: 150,
          align: "center !important",
          dataIndex: "actualStartTime",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.actual-finish'),
          width: 150,
          align: "center !important",
          dataIndex: "actualFinish",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.status'),
          width: 100,
          align: "center !important",
          dataIndex: "state",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.need-validation-testing'),
          width: 150,
          align: "center",
          dataIndex: "needValidationTesting",
          scopedSlots: {
            customRender: 'needValidationTesting',
          },
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.have-new-risks-been-identified'),
          width: 150,
          align: "center",
          dataIndex: "newIdentified",
          scopedSlots: {
            customRender: 'newIdentified',
          },
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.results'),
          width: 200,
          align: "center",
          dataIndex: "result",
          ellipsis: true
        },
        {
          title: () => this.$t('measure-track.dap-table.remarks'),
          width: 150,
          align: "center",
          dataIndex: "notes",
          scopedSlots: {
            customRender: 'notes',
          },
          ellipsis: true
        },
      ],
      /** 表格分页 */
      pagination: {
        current: 1, // 当前页数
        pageSize: 10, // 每页条数
        showTotal: total => this.$t('global-constant.table.show-total', [total]), //用于显示数据总量和当前数据顺序
        showSizeChanger: true, // 是否可以改变 pageSize
        pageSizeOptions: ['10', '20', '50', '100', '200'], // 指定每页可以显示多少条
        onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize), // pageSize 变化的回调
        total: 0 // 总条数
      },
      /** 表格Loading */
      tableLoading: false,
      /** 树数据 */
      treeData: [],
      /** 替换 treeNode 中 title,key,children,value 字段为 treeData 中对应的字段 */
      replaceFields: { children: 'children', label: 'name', key: 'id', value: 'id' },
      /** 检索条件 */
      searchParams: {
        /** FMEA标识 */
        fmeaId: this.$store.getters.rfmeaId,
        /** 结构字符串 */
        struId: [],
        /** 是否初始预防措施 */
        outFlag: undefined,
        /** 分页 */
        pageCurrent: 1,
        pageSize: 10,
      },
      /** 导入:模态框 */
      showExportModal: false,
      /** 是否可编辑 */
      disabled: false,
      /** 表格高度 */
      tableHeightValue: window.innerHeight - 420,
      chartHeight: window.innerHeight - 125 + 'px'
    };
  },
  watch: {
    tableColumns: {
      handler() {
        this.$nextTick(() => {
          // 获取表格的总宽度
          this.handleResize();
          // 计算 width 属性的总和
          this.getColumnWidthTotal();
          // 动态修改fixe属性
          this.changeFixed();
        });
      },
      deep: true,
      immediate: true
    },
    tableWidth: {
      handler() {
        this.$nextTick(() => {
          // 获取表格的总宽度
          this.handleResize();
          // 计算 width 属性的总和
          this.getColumnWidthTotal();
          // 动态修改fixe属性
          this.changeFixed();
        });

      },
      deep: true,
      immediate: true
    }
  },
  mounted() {
    window.addEventListener("resize", this.watchDAPResize);
    this.$once('hook:beforeDestroy', () => {
      window.removeEventListener("resize", this.watchDAPResize);
    });
    this.getTreeSelect();
    this.list();
    // 进入编制状态若为查看，禁止修改数据
    if (getUrlParam("enterState")) this.disabled = true;
    // 监听页面窗体大小变化
    window.addEventListener('resize', this.handleResize);
    window.onresize = () => {
      this.chartHeight = window.innerHeight - 125 + 'px';
      this.tableHeightValue = window.innerHeight - 420;
    };
  },
  methods: {

    // 获取表格的总宽度
    handleResize() {
      this.tableWidth = this.$refs.tableRef.$el.offsetWidth;
    },
    // 计算表格各列宽度总和
    getColumnWidthTotal() {
      this.columnsWidth = this.tableColumns.reduce((sum, column) => sum + column.width, 0);
    },
    // 动态修改fixe的属性以便表格样式不出现空白列,并平和各列与表格的总宽度
    changeFixed() {
      if (this.columnsWidth <= this.tableWidth) {
        // 遍历 Columns 数组，将有 fixed 属性的元素的 fixed 值设置为 false（当有固定列时，列宽总和小于表格总宽度时会串行）
        this.tableColumns.forEach((column) => {
          if (column.fixed) {
            column.fixed = false;
          }
        });
        // 获取除最后一列以外其他列的宽度总和
        let otherColumnsWidth = this.tableColumns.slice(0, -1).reduce((total, column) => {
          return total + column.width;
        }, 0);
        // 将最后一列的宽度设置为剩余宽度，避免页面表头与内容显示串行
        this.tableColumns[this.tableColumns.length - 1].width = this.tableWidth - otherColumnsWidth;
      } else {
        // 恢复固定列原始定位属性
        this.tableColumns[0].fixed = 'left';
        // this.tableColumns[1].fixed='left';
        // this.tableColumns[this.tableColumns.length - 1].fixed='right';
        // 恢复最后一列原始宽度
        this.tableColumns[this.tableColumns.length - 1].width = 150;
      }
    },
    updateText(record) {
      this.$api.updateDAPText({
        fmeaId: this.$store.getters.rfmeaId,
        actionId: record.actionId,
        needValidationTesting: record.needValidationTesting,
        newIdentified: record.newIdentified,
        notes: record.notes,
      }).then((res) => {
        if (res.flag) {
        } else {
          this.$message.error(res.message, 1);
        }
      }).catch((error) => {
        this.$message.error(error.response.data.message, 1);
      })
    },
    /**
     * 监听窗口大小调整
     */
    watchDAPResize() {
    },
    /**
     * 输入项筛选
     * @param inputValue
     * @param treeNode
     */
    filterTreeNode(inputValue, treeNode) {
      return treeNode.data.props.name.includes(inputValue)
    },
    /**
     * 搜索
     */
    search() {
      this.pagination.current = 1;
      this.list();
    },
    /**
     * 获取Tree下拉
     */
    getTreeSelect() {
      let _that = this;
      _that.$api.getLeftTree({
        fmeaId: _that.$store.getters.rfmeaId
      }).then(res => {
        if (res.flag) {
          _that.struNodeList = res.data.rdfmStruTreeModels;
          let targetNode = res.data.rdfmStruTreeModels.filter((item) => {
            return item.pid === '00000000000000000000000000000000';
          })[0];
          // 数组转Tree
          _that.treeData = arrayToTree(targetNode, res.data.rdfmStruTreeModels);
        } else {
          _that.$message.error(res.message, 1);
        }
      }).catch((error) => {
        _that.$message.error(error.response.data.message, 1);
      });
    },
    /**
     * 关闭导入模态框
     */
    closeExportModal() {
      this.exportModal = false;
    },
    /**
     * Excel导出
     */
    excelOrPdfExport() {
      this.$refs.exportModal.showModal = true;
    },
    /**
     * Excel导出
     */
    excelExport() {
      let struIds = [];
      if (this.searchParams.struId && this.searchParams.struId.length > 0) {
        this.searchParams.struId.forEach(item => {
          struIds.push(item.value);
        })
      }
      let exportFrom = this.$com.getCookie("from");
      let rfmeaId = this.$store.getters.rfmeaId;
      let struId = this.searchParams.struId || '';
      let outFlag = this.searchParams.outFlag || '';
      let url = this.$api.baseUrl + "/DFMEA/rdfmDAPRTable/export?fmeaId=" + rfmeaId
        + "&struId=" + struIds
        + "&outFlag=" + outFlag
        + "&exportFrom=" + exportFrom;
      window.open(url);
    },
    /**
     * pdf导出
     */
    pdfExport() {
      let struIds = [];
      if (this.searchParams.struId && this.searchParams.struId.length > 0) {
        this.searchParams.struId.forEach(item => {
          struIds.push(item.value);
        })
      }
      let rfmeaId = this.$store.getters.rfmeaId;
      let struId = this.searchParams.struId || '';
      let outFlag = this.searchParams.outFlag || '';
      let url = this.$api.baseUrl + "/DFMEA/rdfmDAPRTable/pdfExport?fmeaId=" + rfmeaId
        + "&struId=" + struIds
        + "&outFlag=" + outFlag;
      window.open(url);
    },
    /**
     * 列表
     */
    list() {
      let _that = this;
      _that.tableLoading = true;
      let struIds = [];
      if (_that.searchParams.struId && _that.searchParams.struId.length > 0) {
        _that.searchParams.struId.forEach(item => {
          struIds.push(item.value);
        })
      }
      let data = {
        fmeaId: _that.$store.getters.rfmeaId,
        struId: struIds || undefined,
        outFlag: _that.searchParams.outFlag,
        pageCurrent: _that.pagination.current,
        pageSize: _that.pagination.pageSize
      }
      _that.$api.getDAP(data).then((res) => {
        if (res.flag) {
          _that.tableData = res.data.rdfmDAPTableModels || [];
          _that.pagination.current = res.data.pagination.pageCurrent;
          _that.pagination.pageSize = res.data.pagination.pageSize;
          _that.pagination.total = res.data.pagination.rowTotal;
        } else {
          _that.$message.error(res.message, 1);
        }
      }).catch((error) => {
        _that.$message.error(error.response.data.message, 1);
      }).finally(() => {
        _that.tableLoading = false;
      });
    },
    /**
     * 单选框改变事件
     */
    radioChange(e) {
      let redioFlag = e.target.value;
      if (redioFlag === 1) {
        this.checkIdShow = false;
        this.sameSuperCheckFlag = false;
      } else if (redioFlag === 2) {
        this.checkIdShow = true;
        this.sameSuperCheckFlag = false;
      } else if (redioFlag === 3) {
        this.checkIdShow = false;
        this.sameSuperCheckFlag = true;
      }
    },
    /**
     * tree 完全受控  选中
     * @param even
     * @param evenT
     * @param evenTR
     */
    selectBtn(even, evenT, evenTR) {
      this.checkedEvet = true; //判断是勾选添加还是删除
      this.currentChecked = evenTR.checkedNodes;
      let i = evenTR.checkedNodes.length - 1;
      this.deepCurrent = evenTR.checkedNodes[i].data.props.deep; // 设置当前选择节点的深度
      this.currentPid = evenTR.checkedNodes[i].data.props.pid; // 设置当前选择节点的父级ID
    },
    /**
     * Tree下拉选择事件时
     * @param value
     * @param option
     */
    treeSelectChange(value, option) {
      this.searchParams.struId = value;
      let checkList = [];
      let checkIds = [];
      if (this.sameSuperCheckFlag == true) {
        //当同级勾选按钮打开，并且是勾选添加时
        if (this.checkedEvet == true) {
          this.struNodeList.forEach(item => {
            if (item.deep == this.deepCurrent && item.pid == this.currentPid) checkList.push(item);
          });
          checkList.forEach(item => {
            let ids = {
              lable: item.name,
              value: item.id,
            }
            checkIds.push(ids);
          });
          let result = checkIds.concat(this.searchParams.struId);
          let arrayResult = result.filter((currentValue, currentIndex, selfArr) => {
            return selfArr.findIndex(item => item.value === currentValue.value) === currentIndex;
          });
          this.searchParams.struId = arrayResult;
          // 暂存选中数据，取消勾选时使用
          this.currentChecked = arrayResult;
        } else {
          //当同级勾选按钮打开，并且是勾选取消时
          // 对比数组，找到当前勾选的层级
          let arr1 = this.currentChecked.filter(item => {
            return !this.searchParams.struId.find(prop => {
              return prop.value == item.value
            })
          });
          let currentUnCheckedNode = this.struNodeList.filter(item => {
            return item.id === arr1[0].value;
          })
          this.deepCurrent = currentUnCheckedNode[0] ? currentUnCheckedNode[0].deep : undefined;
          this.currentPid = currentUnCheckedNode[0].pid ? currentUnCheckedNode[0].pid : undefined;
          //根据当前勾选的层级，找到所有相同的层级
          this.struNodeList.forEach(item => {
            if (item.deep == this.deepCurrent && item.pid == this.currentPid) checkList.push(item);
          });
          checkList.forEach(item => {
            let ids = {
              lable: item.name,
              value: item.id,
            }
            checkIds.push(ids);
          });
          //把找到相同数据的层级从勾选的数据中删除
          const result = this.searchParams.struId.filter((itemA) => {
            return !checkIds.some((itemB) => itemA.value == itemB.value);
          })
          this.searchParams.struId = result;
          this.currentChecked = result;
        }
      } else if (this.checkIdShow == true) {
        //当同级勾选按钮打开，并且是勾选添加时
        if (this.checkedEvet == true) {
          this.struNodeList.forEach(item => {
            if (item.deep == this.deepCurrent) checkList.push(item);
          });
          checkList.forEach(item => {
            let ids = {
              lable: item.name,
              value: item.id,
            }
            checkIds.push(ids);
          });
          let result = checkIds.concat(this.searchParams.struId);
          let arrayResult = result.filter((currentValue, currentIndex, selfArr) => {
            return selfArr.findIndex(item => item.value === currentValue.value) === currentIndex;
          });
          this.searchParams.struId = arrayResult;
          // 暂存选中数据，取消勾选时使用
          this.currentChecked = arrayResult;
        } else {
          //当同级勾选按钮打开，并且是勾选取消时
          // 对比数组，找到当前勾选的层级
          let arr1 = this.currentChecked.filter(item => {
            return !this.searchParams.struId.find(prop => {
              return prop.value == item.value
            })
          });
          let currentUnCheckedNode = this.struNodeList.filter(item => {
            return item.id === arr1[0].value;
          })
          this.deepCurrent = currentUnCheckedNode[0].deep;
          //根据当前勾选的层级，找到所有相同的层级
          this.struNodeList.forEach(item => {
            if (item.deep == this.deepCurrent) checkList.push(item);
          });
          checkList.forEach(item => {
            let ids = {
              lable: item.name,
              value: item.id,
            }
            checkIds.push(ids);
          });
          //把找到相同数据的层级从勾选的数据中删除
          const result = this.searchParams.struId.filter((itemA) => {
            return !checkIds.some((itemB) => itemA.value == itemB.value);
          })
          this.searchParams.struId = result;
          this.currentChecked = result;
        }
      } else {
        this.searchParams.struId = value;
      }
      this.checkedEvet = false;
    },
    /**
     * 是否输出预防措施，复选框选中事件时
     * @param value
     */
    outFlagChange(value) {
      this.searchParams.outFlag = value.target.checked ? 1 : undefined;
    },
    /**
     * 表格点击分页中数字触发的方法
     * @param pagination
     */
    tableChange(pagination) {
      this.pagination.current = pagination.current;
      this.pagination.pageSize = pagination.pageSize;
      this.searchParams.pageCurrent = pagination.current;
      this.searchParams.pageSize = pagination.pageSize;
      this.list();
    },
  },
  //剔除页面窗体大小变化得监听事件
  beforeDestroy() {
    window.removeEventListener('resize', this.handleResize);
  }
};
</script>

<style lang="less" scoped>
/deep/.ant-table-fixed-header .ant-table-scroll .ant-table-header {
	overflow: hidden !important;
	margin-bottom: 0 !important;
	padding-right: 3px;
	background: rgb(250, 250, 250);
}
/deep/ .ant-table-tbody {

  .ant-table-row-cell-ellipsis:nth-of-type(3) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(4) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(5) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(6) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(14) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(15) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(16) {
    text-align: left !important;
  }

  .ant-table-row-cell-ellipsis:nth-of-type(17) {
    text-align: left !important;
  }
}

.page {
  overflow: auto;
  height: calc(80vh);
  background-color: white;
}

/deep/ .radio-class {
  white-space: nowrap;
  overflow: hidden;
  //text-overflow: ellipsis;
  font-weight: normal;
  //max-width: 100px; /* 根据实际需求调整宽度 */
}

/deep/ .radio-group-class {
  float:right;
  margin-top:-27px;
}

/*/deep/ .ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body {
  overflow-y: auto !important;
}*/
</style>
