<template>
  <!-- 冰排追溯管理 -->
  <div>
    <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
      @searchProtocol="searchProtocol" @handleScroll="handleScroll"></actionBar>
    <div class="card_content">
      <!-- 表单 -->
      <tables :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
      <!-- 分页 -->
      <div v-if="Total">
        <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
          @changeCurrent="changeCurrent">
        </pagination>
      </div>
    </div>
    <!-- 历史记录 -->
    <div class="card_history">
      <el-dialog fullscreen title="历史记录" :visible.sync="historyVisible" :close-on-click-modal="false"
        @close="closeHistory">
        <tables :historyFlag="true" :tableList="historyList" :tableData="historyData" @buttonData="historyButton">
        </tables>
        <!-- 分页 -->
        <div v-if="historyTotal">
          <pagination :total="historyTotal" :currentPage="historyPagination.PageIndex" @changeSize="historySize"
            @changeCurrent="historyCurrent">
          </pagination>
        </div>
        <el-dialog width="500px" title="编辑" :visible.sync="innerVisible" append-to-body :close-on-click-modal="false"
          @close="closeNested">
          <forms ref="editRules" :formNewList="editRuleList" :ruleForm="editRuleForm" :iceBank="true" labelWidth="100px"
            @handleScroll="handleScroll" @remoteMethod="remoteMethod" :key="Math.random()"></forms>
          <div slot="footer" class="dialog-footer">
            <el-button @click="innerVisible = false">取消</el-button>
            <el-button type="primary" @click="submit">提交</el-button>
          </div>
        </el-dialog>
      </el-dialog>
    </div>
    <!-- 出入库 -->
    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
      @close="closeDialog">
      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" :iceTracing="true" :iceBank="true"
        labelWidth="120px" @handleScroll="handleScroll" @remoteMethod="remoteMethod">
      </forms>
      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 冰排使用记录 -->
    <div class="card_iceTracing">
      <el-dialog fullscreen title="冰排使用记录追溯" :visible.sync="iceTracingVisible" @close="iceTracingDialog">
        <div style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border-radius: 8px;">
          <div class="space_between_in" style="margin: 0px 10px 10px 10px;padding-top: 10px;">
            <div>
              <el-form ref="userRecordRuleForm" :inline="true" :model="formInline" class="demo-form-inline">
                <el-form-item label="编号" prop="code">
                  <el-input v-model="formInline.code" placeholder="请输入冰排编号" @input="codeInput"></el-input>
                </el-form-item>
                <el-form-item label="保温箱" prop="coolerBoxId">
                  <el-select v-model="formInline.coolerBoxId" placeholder="选择保温箱" @change="changeSelect"
                    v-loadmore="(params) => handleScroll('coolerBoxId')">
                    <el-option v-for="(element, i) in incubatorData" :label="element.label" :value="`${element.value}`"
                      :key="i" />
                  </el-select>
                </el-form-item>
                <el-form-item label="使用日期" prop="dateService">
                  <el-date-picker v-model="formInline.dateService" type="datetimerange" range-separator="至"
                    start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd hh:mm:ss"
                    @change="timeChange">
                  </el-date-picker>
                </el-form-item>
                <el-form-item>
                  <el-button size="medium" icon="el-icon-search" type="primary" @click="searchProtocol">搜索</el-button>
                </el-form-item>
                <el-form-item>
                  <el-button size="medium" icon="el-icon-refresh" @click="searchReset">重置</el-button>
                </el-form-item>
                <el-form-item>
                  <el-button type="success" :loading="exportFlag" @click="download">导出Excel</el-button>
                </el-form-item>
              </el-form>
            </div>
          </div>
          <tables :historyFlag="true" :tableList="usageLogList" :tableData="usageLogData">
          </tables>
          <!-- 分页 -->
          <div v-if="usageLogTotal">
            <pagination :total="usageLogTotal" :currentPage="usageLogPagination.PageIndex" @changeSize="usageLogSize"
              @changeCurrent="usageLogCurrent">
            </pagination>
          </div>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
  import {
    getIceRaftNewest,
    iceraftIn,
    iceraftOut,
    getIceRaftRecord,
    putIceRaftRecord,
    delIceRaftRecord,
    getRecording,
    getExportExecl,
    raftIsoutstorage
  } from '@/api/iceRaft'
  import {
    getIcelocker,
  } from '@/api/refrigerator'
  import {
    getCoolerBox
  } from '@/api/incubator.js'
  import actionBar from '@/components/actionBar'
  import tables from '@/components/tables'
  import pagination from '@/components/pagination'
  import forms from '@/components/forms'
  import {
    employee,
    historyRecord,
    iceRaftRules,
    freezerRules,
    editRules,
    usageEmployee
  } from "./iceRaft.js";
  export default {
    name: 'IceManagement',
    components: {
      actionBar,
      tables,
      pagination,
      forms
    },
    data() {
      return {
        operateList: [{
          type: 'come',
          title: '入库',
        }, {
          type: 'goOut',
          title: '出库',
        }, {
          type: 'export',
          colour: 'success',
          title: '冰排使用记录',
        }],
        formList: [{
          type: 'input',
          label: '编号',
          field: 'code',
          placeholder: '请输入编号',
        }, {
          type: 'select',
          label: '状态',
          field: 'status',
          placeholder: '请选择状态',
          options: [{
            bgcolor: '#606266',
            label: '未入库',
            value: '0',
          }, {
            bgcolor: '#409EFF',
            label: '冷冻中',
            value: '1',
          }, {
            bgcolor: '#67C23A',
            label: '待使用',
            value: '2',
          }, {
            bgcolor: '#E6A23C',
            label: '使用中',
            value: '3',
          }, {
            bgcolor: '#909399',
            label: '已结束',
            value: '4',
          }]
        }, {
          type: 'select',
          label: '冷冻柜',
          field: 'iceLockerId',
          placeholder: '请选择冷冻柜',
          options: []
        }, {
          type: 'select',
          label: '保温箱',
          field: 'coolerBoxId',
          placeholder: '请选择保温箱',
          options: []
        }],
        searchRuleForm: {
          code: '',
          status: '',
          iceLockerId: null,
          coolerBoxId: null,
        },
        searchValue: {},
        tableList: [],
        tableData: [],
        Total: 0,
        Pagination: {
          PageIndex: 1,
          PageSize: 10,
        },
        // 历史记录
        historyList: [],
        historyData: [],
        historyTotal: 0,
        historyPagination: {
          PageIndex: 1,
          PageSize: 10,
        },
        operationType: '',
        staffTitle: '添加',
        staffDialogVisible: false,
        formRuleList: {},
        ruleForm: {
          iceLockerId: '',
          freezeClaim: '',
          coolerBoxId: '',
          code: [],
        },
        confirmLoading: false,
        historyVisible: false,

        page: 1,
        staffName: '',
        limitNo: true,
        limitNoil: true,
        eventSource: null,
        timer: null, //定时器名称
        iceRaftId: null,

        innerVisible: false,
        editRuleList: {},
        editRuleForm: {
          code: '',
          status: '',
          inStorageTime: '',
          outStorageTime: '',
          freezeClaim: '',
          iceLockerId: '',
          coolerBoxId: '',
        },
        iceRaftCode: '',
        coldCupboard: {
          field: 'iceLockerId',
          label: '冷冻柜',
          placeholder: '请选择冷冻柜',
          type: 'searchSelect',
          colWidth: 24,
          multiple: false,
          rules: [{
            required: true,
            message: '请选择冷冻柜',
            trigger: 'blur'
          }],
          options: [],
        },
        thermostat: {
          field: 'coolerBoxId',
          label: '保温箱',
          placeholder: '请选择保温箱',
          type: 'searchSelect',
          colWidth: 24,
          rules: [{
            required: true,
            message: '请选择保温箱',
            trigger: 'blur'
          }],
          options: [],
        },
        // 冰排使用记录
        exportFlag: false,
        iceTracingVisible: false,
        value1: '',
        usageLogList: [],
        usageLogData: [],
        usageLogTotal: 0,
        usageLogPagination: {
          PageIndex: 1,
          PageSize: 10,
        },
        incubatorData: [],
        formInline: {
          code: '',
          coolerBoxId: null,
          dateService: []
        },
        // 是否释冷
        iceColdFlag: false,
        userList: {},
      }
    },
    beforeDestroy() {
      clearInterval(this.timer); // 清除定时器
      this.timer = null;
    },
    mounted() {
      const arr = localStorage.getItem('userList')
      this.userList = JSON.parse(arr)
      if (this.userList.dept) {
        this.iceColdFlag = this.userList.dept.isIceReleaseCold
      }
      if (!this.iceColdFlag) {
        var tableList = employee()
        this.tableList = deleteElementById(tableList, 'multistage')
        var usageList = usageEmployee()
        var usageArr = deleteElementById(usageList, 'multistage')
        this.usageLogList = deleteElementById(usageArr, 'action')
      } else {
        var tableList = employee()
        this.tableList = tableList
        var usageList = usageEmployee()
        var usageArr1 = deleteElementById(usageList, 'iceRaftRecord.status')
        this.usageLogList = usageArr1
      }
      if (!this.iceColdFlag) {
        var historyList = historyRecord()
        this.historyList = deleteElementById(historyList, 'multistage')
      } else {
        this.historyList = historyRecord()
      }

      function deleteElementById(arr, id) {
        return arr.filter((item) => item.field !== id);
      }
      this.getList()
      this.getFreezer()
      this.getIncubator()
    },
    methods: {
      // 搜索
      searchProtocol(value) {
        this.Pagination.PageIndex = 1
        this.searchValue = value
        this.getList()
      },
      // 获取冰排列表
      getList() {
        var params = {
          page: this.Pagination.PageIndex,
          pageSize: this.Pagination.PageSize,
          ...this.searchValue
        }
        getIceRaftNewest(params).then(res => {
          if (res.code == 200) {
            this.tableData = res.data.list
            this.Total = res.data.count
            this.timer = setTimeout(() => {
              this.getList();
              clearInterval(this.timer); // 清除定时器
              this.timer = null;
            }, 60000)
          }
        })
      },
      // 弹窗表单添加
      handleAdd() {
        let flag = this.$refs['childRules'].validateForm();
        if (flag) {
          const params = {
            ...this.ruleForm,
          }
          if (this.operationType == 'come') {
            delete params.coolerBoxId
            params.iceLockerId = Number(params.iceLockerId)
            params.freezeClaim = Number(params.freezeClaim)
            iceraftIn(params).then(res => {
              if (res.code == 200) {
                this.$message({
                  message: res.msg,
                  type: 'success'
                });
                this.staffDialogVisible = false
                this.getList()
              }
            })
          } else if (this.operationType == 'goOut') {
            raftIsoutstorage({
              code: params.code,
            }).then(res => {
              if (res.code == 200) {
                if (this.userList.dept) {
                  if (!this.userList.dept.isOutStorage) {
                    this.getOutStorage(params, res.msg)
                  } else {
                    this.$message.error(res.msg);
                  }
                } else {
                  this.$message.error('当前账户无公司信息');
                }
              } else if (res.code == 1201) {
                this.getOutStorage(params, res.msg)
              }
            })
          }
        } else {
          this.$message.error('表单信息不完整，请继续填写完整');
        }
      },
      // 冰排出库/装箱
      getOutStorage(event, msg) {
        const params = event
        this.$confirm(msg, '是否继续出库', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          delete params.iceLockerId
          delete params.freezeClaim
          params.coolerBoxId = Number(params.coolerBoxId)
          iceraftOut(params).then(res => {
            if (res.code == 200) {
              this.$message({
                message: res.msg,
                type: 'success'
              });
              this.staffDialogVisible = false
              this.getList()
            }
          })
        }).catch(() => {
          console.log('取消出库')
        });
      },
      openModel(type) {
        this.operationType = type
        this.page = 1
        if (type == 'come') {
          this.staffDialogVisible = true
          this.staffTitle = '入库'
          this.formRuleList = iceRaftRules()
          this.coldCupboard.options = []
          this.formRuleList.unshift(this.coldCupboard)
          this.limitNo = true
          this.getFreezer()
        } else if (type == 'goOut') {
          this.staffDialogVisible = true
          this.staffTitle = '出库'
          this.formRuleList = freezerRules()
          this.thermostat.options = []
          this.formRuleList.unshift(this.thermostat)
          this.limitNoil = true
          this.getIncubator()
        } else if (type == 'export') {
          this.iceTracingVisible = true
          this.incubatorData = []
          this.limitNoil = true
          this.getIncubator()
          this.getraftRecording()
        }
        this.$forceUpdate()
      },
      // 选择保温箱
      changeSelect(value) {
        this.getraftRecording()
      },
      // 时间选择搜索
      timeChange(event) {
        this.getraftRecording()
      },
      // 重置
      searchReset() {
        this.$refs.userRecordRuleForm.resetFields();
      },
      // 输入冰排编号搜索
      codeInput(value) {
        this.getraftRecording()
      },
      // 冰排使用记录
      getraftRecording() {
        var params = {
          page: this.usageLogPagination.PageIndex,
          pageSize: this.usageLogPagination.PageSize,
          code: this.formInline.code,
          coolerBoxId: Number(this.formInline.coolerBoxId),
          startTime: this.formInline.dateService[0],
          endTime: this.formInline.dateService[1],
        }
        getRecording(params).then(res => {
          if (res.code == 200) {
            this.usageLogTotal = res.data.count
            this.usageLogData = res.data.list
          }
        })
      },
      // 导出冰排使用记录
      download() {
        this.exportFlag = true
        getExportExecl({
          code: this.formInline.code,
          coolerBoxId: Number(this.formInline.coolerBoxId),
          startTime: this.formInline.dateService[0],
          endTime: this.formInline.dateService[1],
        }).then(response => {
          if (response.fileName) {
            let fileName = decodeURI(response.fileName);
            if (window.navigator.msSaveOrOpenBlob) {
              navigator.msSaveBlob(new Blob([response.data]), fileName);
            } else {
              let url = window.URL.createObjectURL(new Blob([response.data]));
              let link = document.createElement('a');
              link.style.display = 'none';
              link.href = url;
              link.setAttribute('download', fileName);
              document.body.appendChild(link);
              link.click();
            }
          } else {
            this.$message.error('未获取到文件名,导出失败');
          }
          this.exportFlag = false
        }).catch(() => {
          this.exportFlag = false
        })
      },
      // 重置冷冻柜、保温箱
      resetSelect() {
        this.page = 1
        this.limitNo = true
        this.limitNoil = true
        this.staffName = ''
      },
      // 触底事件
      handleScroll(type) {
        if (this.operationType == 'come') {
          if (this.limitNo) {
            this.getFreezer()
          }
        } else if (this.operationType == 'goOut') {
          if (this.limitNoil) {
            this.getIncubator()
          }
        } else if (this.operationType == 'edit') {
          if (this.deposit) {
            if (this.limitNo) {
              this.getFreezer()
            }
          } else {
            if (this.limitNoil) {
              this.getIncubator()
            }
          }
        } else {
          if (type == 'iceLockerId' && this.limitNo) {
            this.getFreezer()
          } else if (type == 'coolerBoxId' && this.limitNoil) {
            this.getIncubator()
          }
        }
      },
      // 搜索
      remoteMethod(value) {
        this.resetSelect()
        this.staffName = value
        if (this.operationType == 'edit') {
          this.editRuleList.forEach(item => {
            if (item.type == 'searchSelect') {
              item.options = []
            }
          })
          if (this.deposit) {
            this.getFreezer()
          } else {
            this.getIncubator()
          }
        } else {
          if (this.operationType == 'come') {
            this.formRuleList.forEach(item => {
              if (item.type == 'searchSelect') {
                item.options = []
              }
            })
            this.getFreezer()
          } else if (this.operationType == 'goOut') {
            this.getIncubator()
          }
        }
      },
      // 获取冷冻柜列表
      getFreezer() {
        let arrList = []
        let params = {
          page: this.page,
          pageSize: 10,
          status: '2',
          name: this.staffName,
        }
        getIcelocker(params).then(res => {
          if (res.code == 200) {
            let arr = res.data.list
            let arrList = []
            arr.forEach(item1 => {
              var arrData = {
                label: null,
                value: null,
              }
              arrData.label = item1.name
              arrData.value = item1.id
              arrList.push(arrData)
            })
            if (this.limitNo == true) {
              if (this.operationType != '') {
                if (this.operationType == 'come' || this.operationType == 'goOut') {
                  this.formRuleList.forEach(item => {
                    if (item.type == 'searchSelect') {
                      item.options = item.options.concat(arrList)
                    }
                  })
                } else if (this.operationType == 'edit') {
                  this.editRuleList.forEach(item => {
                    if (item.type == 'searchSelect') {
                      item.options = item.options.concat(arrList)
                    }
                  })
                }
              } else {
                this.formList.forEach(item => {
                  if (item.field == 'iceLockerId') {
                    item.options = item.options.concat(arrList)
                  }
                })
              }
            }
            if (arrList.length >= 10) {
              this.page = ++this.page;
            } else {
              // 已经没数据了 不需要增加数据
              this.limitNo = false;
            }
          }
        })
      },
      // 获取保温箱列表
      getIncubator() {
        let params = {
          page: this.page,
          pageSize: 10,
          status: '2',
          name: this.staffName,
        }
        getCoolerBox(params).then(res => {
          if (res.code == 200) {
            let arr = res.data.list
            let arrList = []
            arr.forEach(item1 => {
              var arrData = {
                label: null,
                value: null,
              }
              arrData.label = item1.name
              arrData.value = item1.id
              arrList.push(arrData)
            })
            if (this.limitNoil == true) {
              if (this.operationType != '') {
                if (this.operationType == 'come' || this.operationType == 'goOut') {
                  this.formRuleList.forEach(item => {
                    if (item.type == 'searchSelect') {
                      item.options = item.options.concat(arrList)
                    }
                  })
                } else if (this.operationType == 'edit') {
                  this.editRuleList.forEach(item => {
                    if (item.type == 'searchSelect') {
                      item.options = item.options.concat(arrList)
                    }
                  })
                } else if (this.operationType == 'export') {
                  this.incubatorData = this.incubatorData.concat(arrList)
                }
              } else {
                this.formList.forEach(item => {
                  if (item.field == 'coolerBoxId') {
                    item.options = item.options.concat(arrList)
                  }
                })
                this.incubatorData = this.incubatorData.concat(arrList)
              }
              // this.thermostat.options = this.thermostat.options.concat(arrList)
            }
            if (arrList.length >= 10) {
              this.page = ++this.page;
            } else {
              // 已经没数据了 不需要增加数据
              this.limitNoil = false;
            }
          }
        })
      },
      // 冰排列表
      buttonData(row, type) {
        this.operationType = type
        this.iceRaftId = row.id
        this.iceRaftCode = row.code
        if (type == 'logs') {
          this.historyVisible = true
          this.getHistory()
        }
      },
      // 获取历史记录列表
      getHistory(iceRaftId) {
        var params = {
          page: this.historyPagination.PageIndex,
          pageSize: this.historyPagination.PageSize,
          iceRaftId: this.iceRaftId,
          // ...this.searchValue
        }
        getIceRaftRecord(params).then(res => {
          if (res.code == 200) {
            this.historyData = res.data.list
            this.historyTotal = res.data.count
          }
        })
      },
      // 历史记录操作
      historyButton(row, type) {
        this.operationType = type
        this.limitNo = true
        if (type == 'edit') {
          this.innerVisible = true
          this.page = 1
          this.editRuleList = editRules()
          if (row.outStorageTime == '') {
            this.deposit = true
            this.getFreezer()
            this.editRuleList.push(this.coldCupboard)
            // 冷冻柜
            this.editRuleForm.iceLockerId = String(row.iceLockerId)
          } else {
            this.deposit = false
            this.getIncubator()
            this.editRuleList.push(this.thermostat)
            // 保温箱
            this.editRuleForm.coolerBoxId = String(row.coolerBoxId)
          }
          this.editRuleForm.id = row.id
          this.editRuleForm.code = this.iceRaftCode
          this.editRuleForm.status = row.status
          this.editRuleForm.inStorageTime = row.inStorageTime
          this.editRuleForm.outStorageTime = row.outStorageTime
          this.editRuleForm.freezeClaim = row.freezeClaim
          if (row.status == '3') {
            this.editRuleList.forEach(item => {
              if (item.field == 'freezeClaim') {
                item.disabled = true
              }
            })
          }
        } else if (type == 'del') {
          this.delHistory(row.id)
        }
      },
      // 编辑历史记录提交
      submit() {
        let flag = this.$refs['editRules'].validateForm();
        if (flag) {
          this.$confirm('确定修改该冰排信息吗, 是否继续?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            let param = {
              id: '',
              iceLockerId: '',
              coolerBoxId: '',
              freezeClaim: '',
            }
            param.id = this.editRuleForm.id
            param.iceLockerId = Number(this.editRuleForm.iceLockerId)
            param.coolerBoxId = Number(this.editRuleForm.coolerBoxId)
            param.freezeClaim = Number(this.editRuleForm.freezeClaim)
            if (this.editRuleForm.outStorageTime == '') {
              delete param.coolerBoxId
            } else {
              delete param.iceLockerId
            }
            putIceRaftRecord(param).then(res => {
              if (res.code == 200) {
                this.innerVisible = false
                this.$message({
                  type: 'success',
                  message: res.msg
                });
                this.getHistory()
              }
            })
          }).catch(() => {
            // console.log('取消修改')
          });
        } else {
          this.$message.error('表单信息不完整，请继续填写完整');
        }
      },
      // 删除历史记录
      delHistory(id) {
        this.$confirm('确定删除该冰排信息吗, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          delIceRaftRecord({
            id: id
          }).then(res => {
            if (res.code == 200) {
              this.$message({
                message: '删除成功，请重新入库该冰排！',
                type: 'warning'
              });
              const precisePage = Math.ceil((this.historyTotal - 1) / this.historyPagination.PageSize)
              this.historyPagination.PageIndex = this.historyPagination.PageIndex > precisePage ? precisePage :
                this
                .historyPagination.PageIndex
              this.historyPagination.PageIndex = this.historyPagination.PageIndex < 1 ? 1 : this
                .historyPagination.PageIndex
              this.getHistory()
              this.getList()
            }
          })
        }).catch(() => {
          // console.log('已取消删除')
        });
      },
      changeSize(val) {
        this.Pagination.PageSize = val
        this.getList()
      },
      changeCurrent(val) {
        this.Pagination.PageIndex = val
        this.getList()
      },
      // 历史记录分页
      historySize(val) {
        this.historyPagination.PageSize = val
        this.getHistory()
      },
      historyCurrent(val) {
        this.historyPagination.PageIndex = val
        this.getHistory()
      },
      // 冰排使用记录分页
      usageLogSize(val) {
        this.usageLogPagination.PageSize = val
        this.getraftRecording()
      },
      usageLogCurrent(val) {
        this.usageLogPagination.PageIndex = val
        this.getraftRecording()
      },
      // 关闭历史记录
      closeHistory() {
        this.historyPagination.PageIndex = 1
        this.historyVisible = false
        this.getList()
      },
      // 嵌套弹窗
      closeNested() {
        this.staffName = ''
        this.editRuleList.forEach(item => {
          if (item.type == 'searchSelect') {
            item.options = []
          }
        })
      },
      // 清空表单
      closeDialog() {
        this.resetSelect()
        this.ruleForm.code = []
        this.$refs.childRules.resetCheck();
        this.coldCupboard.options = []
        this.thermostat.options = []
      },
      iceTracingDialog() {
        this.page = 2
        this.limitNoil = true
        this.operationType = ''
      }
    }
  }
</script>

<style lang="scss" scoped>
  .card_history ::v-deep .el-dialog__body {
    padding: 0px 20px !important;
  }

  .card_iceTracing ::v-deep .el-dialog__body {
    padding: 0px 10px !important;
  }
</style>
