<template>
  <div class="mod-config">
    <div>
        <span @click="favoriteFunction()">
         <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
        </span>
    </div>
    <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
      <el-form-item :label="'工单编码'">
        <el-input v-model="searchData.orderNo" clearable style="width: 120px"></el-input>
      </el-form-item>
      <el-form-item :label="'计划编码'">
        <el-input v-model="searchData.planID" clearable style="width: 120px"></el-input>
      </el-form-item>
      <el-form-item :label="'计划描述'">
        <el-input v-model="searchData.planDesc" clearable style="width: 120px"></el-input>
      </el-form-item>
      <el-form-item :label="'设备编码'">
        <el-input v-model="searchData.objectID" clearable style="width: 120px"></el-input>
      </el-form-item>
      <el-form-item :label="'计划执行人员'">
        <el-input v-model="searchData.planOperatorName" clearable style="width: 120px"></el-input>
      </el-form-item>
      <el-form-item :label="'计划执行日期'">
        <el-date-picker
          style="width: 120px"
          v-model="searchData.startDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item style="margin-top: 23px;">
        <laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
      </el-form-item>
      <el-form-item  :label="' '">
        <el-date-picker
          style="width: 120px"
          v-model="searchData.endDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label=" ">
      <el-button @click="searchClick()">查询</el-button>
      <download-excel
        :fields="fields()"
        :data="exportData"
        type="xls"
        :name="exportName"
        :header="exportHeader"
        :footer="exportFooter"
        :fetch="createExportData"
        :before-generate="startDownload"
        :before-finish="finishDownload"
        worksheet="导出信息"
        class="el-button el-button--primary el-button--medium">
        {{ "导出" }}
      </download-excel>
      </el-form-item>
    </el-form>
    <el-table
      :height="height"
      :data="dataList"
      border
      v-loading="dataListLoading"
      style="width: 100%;">
      <el-table-column
        v-for="(item,index) in columnList" :key="index"
        :sortable="item.columnSortable"
        :prop="item.columnProp"
        :header-align="item.headerAlign"
        :show-overflow-tooltip="item.showOverflowTooltip"
        :align="item.align"
        :fixed="item.fixed==''?false:item.fixed"
        :min-width="item.columnWidth"
        :label="item.columnLabel">
        <template slot-scope="scope">
          <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
          <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
        </template>
      </el-table-column>
      <el-table-column
        prop=""
        header-align="center"
        align="center"
        min-width="100"
        fixed="right"
        label="操作">
        <template slot-scope="scope">
          <a type="text" size="small" v-if="scope.row.status=='未开工'" @click="reach(scope.row)">到达</a>
          <a type="text" size="small" v-if="scope.row.status=='已到达'" @click="reportModal(scope.row)">执行</a>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      @size-change="sizeChangeHandle"
      @current-change="currentChangeHandle"
      :current-page="pageIndex"
      :page-sizes="[20, 50, 100, 200, 500]"
      :page-size="pageSize"
      :total="totalPage"
      layout="total, sizes, prev, pager, next, jumper">
    </el-pagination>

    <el-dialog title="执行维保工单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1274px">
      <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<!--        <el-form-item :label="'工厂编码'">-->
<!--          <el-input v-model="saveData.site" disabled style="width: 120px"></el-input>-->
<!--        </el-form-item>-->
        <el-form-item :label="'工单号'">
          <el-input v-model="saveData.orderNo" disabled style="width: 120px"></el-input>
        </el-form-item>
        <el-form-item :label="'计划执行人员'">
          <el-input v-model="saveData.planOperatorName" disabled style="width: 221px"></el-input>
        </el-form-item>
        <el-form-item >
          <span slot="label" style="" @click="getOperatorList()"><a>协同人员</a></span>
          <el-input v-model="saveData.operatorName" style="width: 221px"></el-input>
        </el-form-item>
        <el-form-item :label="'到达时间:'">
          <el-date-picker style="width: 165px" disabled v-model="saveData.reachDate" type="datetime" :editable="false" @focus='elDatePickerOnFocus'
                          value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="到达时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item :label="'维保结论'">
          <el-select v-model="saveData.checkResult" style="width: 100px" placeholder="请选择">
            <el-option label="合格" value="合格"></el-option>
            <el-option label="异常" value="异常"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-if="this.saveData.checkResult === '异常'" :label="'异常原因'">
          <el-select v-model="saveData.disposalMeasures" style="width: 120px">
            <el-option label="缺少备件" value="缺少备件"></el-option>
            <el-option label="等待售后" value="等待售后"></el-option>
            <el-option label="远程协助" value="远程协助"></el-option>
            <el-option label="换班换人" value="换班换人"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="' '">
          <el-button type="primary" @click="refreshItem()">刷新项目</el-button>
        </el-form-item>
      </el-form>
      <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
        <el-form-item :label="'执行结果备注'">
          <el-input type="textarea" v-model="saveData.remark" :rows="3" resize='none' show-word-limit style="width: 1251px;height: 20px"></el-input>
        </el-form-item>
      </el-form>
      <el-tabs v-model="activeTable" style="margin-top: 50px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
        <el-tab-pane label="维保单" name="inspection_form">
          <div class="rq ">
            <el-table
              :height="400"
              :data="detailList"
              border
              v-loading="dataListLoading"
              @selection-change="selectionChangeHandle"
              style="width: 100%;">
              <el-table-column
                prop=""
                header-align="center"
                align="center"
                min-width="40"
                label="操作">
                <template slot-scope="scope">
                  <el-button class="el-icon-upload" type="primary" @click="addUploadFileModal(scope.row)"></el-button>
                </template>
              </el-table-column>
              <el-table-column
                v-for="(item,index) in columnDetailList" :key="index"
                :sortable="item.columnSortable"
                :prop="item.columnProp"
                :header-align="item.headerAlign"
                :show-overflow-tooltip="item.showOverflowTooltip"
                :align="item.align"
                :fixed="item.fixed==''?false:item.fixed"
                :min-width="item.columnWidth"
                :label="item.columnLabel">
                <template slot-scope="scope">
                  <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
                  <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
                </template>
              </el-table-column>
              <el-table-column
                prop="imageFlag"
                header-align="center"
                align="center"
                min-width="70"
                label="图片必填">
                <template slot-scope="scope">
                  <div :style="{color: scope.row.uploadFlag === 'Y' ? '#3ac252' : ''}">
                    {{ scope.row.imageFlag }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop=""
                header-align="center"
                align="right"
                min-width="80"
                label="实测值">
                <template slot-scope="scope">
                  <el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
                  <el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
                  <el-select v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
                    <el-option
                      v-for="item in scope.row.availableList"
                      :key="index"
                      :label="item.availableValue"
                      :value="item.availableValue">
                    </el-option>
                  </el-select>
                  <el-select v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
                    <el-option
                      v-for="item in scope.row.availableList"
                      :key="index"
                      :label="item.availableValue"
                      :value="item.availableValue">
                    </el-option>
                  </el-select>
                </template>
              </el-table-column>
              <el-table-column
                prop=""
                header-align="center"
                align="right"
                min-width="80"
                label="检验结论">
                <template slot-scope="scope">
                  <el-select v-model="scope.row.itemResult" style="height: 11px;padding: 0px" placeholder="请选择">
                    <el-option label="合格" value="合格" style="color: green"></el-option>
                    <el-option label="不合格" value="不合格" style="color: red"></el-option>
                  </el-select>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </el-tab-pane>

        <el-tab-pane label="维保记录" name="history_record">
          <el-table
            :height="400"
            :data="HistoryRecordList"
            border
            v-loading="dataListLoading"
            style="width: 100%;">
            <el-table-column
              v-for="(item,index) in columnHistoryList" :key="index"
              :sortable="item.columnSortable"
              :prop="item.columnProp"
              :header-align="item.headerAlign"
              :show-overflow-tooltip="item.showOverflowTooltip"
              :align="item.align"
              :fixed="item.fixed===''?false:item.fixed"
              :min-width="item.columnWidth"
              :label="item.columnLabel">
              <template slot-scope="scope">
                <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
                <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
              </template>
            </el-table-column>
            <el-table-column
              fixed="right"
              header-align="center"
              align="center"
              width="100"
              label="操作">
              <template slot-scope="scope">
                <a type="text" size="small" @click="detailModal(scope.row)">详情</a>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
      <el-footer style="height:40px;margin-top: 20px;text-align:center">
        <el-button type="primary" @click="saveCheckReport()">保存</el-button>
        <el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
      </el-footer>
    </el-dialog>

    <el-dialog title="详情" :close-on-click-modal="false" v-drag :visible.sync="historyDetailModelFlag" width="1212px" top="180px">
      <div class="rq ">
        <el-table
          :height="300"
          :data="historyDetailList"
          border
          v-loading="dataListLoading"
          style="width: 100%;">
          <el-table-column
            v-for="(item,index) in columnHistoryDetailList" :key="index"
            :sortable="item.columnSortable"
            :prop="item.columnProp"
            :header-align="item.headerAlign"
            :show-overflow-tooltip="item.showOverflowTooltip"
            :align="item.align"
            :fixed="item.fixed==''?false:item.fixed"
            :min-width="item.columnWidth"
            :label="item.columnLabel">
            <template slot-scope="scope">
              <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
              <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
            </template>
          </el-table-column>
          <el-table-column
            prop=""
            header-align="center"
            align="center"
            min-width="80"
            label="是否完成">
            <template slot-scope="scope">
              {{scope.row.finishFlag=='Y'?"是":"否"}}
            </template>
          </el-table-column>
          <el-table-column
            prop=""
            header-align="center"
            align="right"
            min-width="80"
            label="实测值">
            <template slot-scope="scope">
              <el-input v-if="scope.row.valueTypeDb === 'T'" disabled v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
              <el-input v-if="scope.row.valueTypeDb === 'N'" disabled v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
            </template>
          </el-table-column>
          <el-table-column
            prop=""
            header-align="center"
            align="right"
            min-width="80"
            label="检验结论">
            <template slot-scope="scope">
              <el-select v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
                <el-option label="合格" value="合格"></el-option>
                <el-option label="不合格" value="不合格"></el-option>
              </el-select>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <el-footer style="height:40px;margin-top: 20px;text-align:center">
        <el-button type="primary" @click="historyDetailModelFlag = false">关闭</el-button>
      </el-footer>
    </el-dialog>

    <!-- 机修人员清单 -->
    <el-dialog title="机修人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
      <div class="rq">
        <el-form :inline="true"  label-position="top" :model="operatorData">
          <el-form-item :label="'人员编码'">
            <el-input v-model="operatorData.adminID"  style="width: 120px"></el-input>
          </el-form-item>
          <el-form-item :label="'人员姓名'">
            <el-input v-model="operatorData.adminName"  style="width: 120px"></el-input>
          </el-form-item>
          <el-form-item :label="' '">
            <el-button type="primary" @click="getOperatorList()">查询</el-button>
          </el-form-item>
        </el-form>
        <el-table
          :height="300"
          :data="operatorList"
          ref="operatorTable"
          @row-click="operatorClickRow"
          @selection-change="selectionChangeHandle2"
          border
          v-loading="dataListLoading"
          style="width: 100%;">
          <el-table-column
            type="selection"
            header-align="center"
            align="center"
            :selectable="selectFlag"
            width="50">
          </el-table-column>
          <el-table-column
            v-for="(item,index) in operatorDetailList" :key="index"
            :sortable="item.columnSortable"
            :prop="item.columnProp"
            :header-align="item.headerAlign"
            :show-overflow-tooltip="item.showOverflowTooltip"
            :align="item.align"
            :fixed="item.fixed==''?false:item.fixed"
            :min-width="item.columnWidth"
            :label="item.columnLabel">
            <template slot-scope="scope">
              <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
              <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <el-footer style="height:40px;margin-top: 20px;text-align:center">
        <el-button type="primary" @click="confirmOperator()">确认</el-button>
        <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
      </el-footer>
    </el-dialog>

    <Chooselist ref="baseList"  @getBaseData="getBaseData"></Chooselist>
    <!-- 上传文件的modal -->
    <comEamItemImageUploadFile ref="comEamItemImageUploadFile" @refreshPageTables="getInspectionFormData()" v-drag></comEamItemImageUploadFile>
  </div>
</template>

<script>
  import {
    eamWorkOrderSearch,
    eamWorkOrderItemSearch,
    saveCheckOrderReport,
    queryHistoryRecord, // 查询设备的点检历史记录
    eamWorkOrderReportSearch, //历史记录详情
    getOperatorList,
    refreshItem,
    reach
  } from "@/api/eam/eam.js"
  import {
    getTableDefaultListLanguage,
    getTableUserListLanguage,
  } from "@/api/table.js"
  import Chooselist from '@/views/modules/common/Chooselist_eam'
  import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  import comEamItemImageUploadFile from './com_eam_itemImage_upload_file.vue'
  export default {
    components: {
      Chooselist,
      comEamItemImageUploadFile
    },
    watch: {
      saveData: {
        deep: true,
        handler: function (newV, oldV) {
          this.saveData.workTime = Math.ceil(Math.floor(this.dayjs(this.saveData.endDate).diff(this.saveData.startDate, 'seconds') / 30) / 2)
        }
      },
      searchData: {
        deep: true,
        handler: function (newV, oldV) {
          this.searchData.groupID = this.searchData.groupID.toUpperCase()
        }
      },
      modalData: {
        deep: true,
        handler: function (newV, oldV) {
          this.modalData.groupID = this.modalData.groupID.toUpperCase()
        }
      }
    },
    data () {
      return {
        // 是否收藏
        favorite: false,
        tagNo:'',
        // 导出 start
        exportData: [],
        exportName: "维保执行" + this.dayjs().format('YYYYMMDDHHmmss'),
        exportHeader: ["维保执行"],
        exportFooter: [],
        exportList:[],
        // 导出 end
        searchData: {
          site: this.$store.state.user.site,
          username: this.$store.state.user.name,
          orderNo: '',
          planID: '',
          planDesc: '',
          objectID: '',
          planOperator: '',
          functionType: 'B',
          status: '',
          startDate:'',
          planDate: new Date(),
          endDate:'',
          page: 1,
          limit: 10,
          searchType: 'reportMaintenance'
        },
        height: 200,
        pageIndex: 1,
        pageSize: 50,
        totalPage: 0,
        dataList: [],
        dataListLoading: false,
        dataListSelections: [],
        modalFlag:false,
        modalDisableFlag:false,
        modalData:{
          flag:'',
          site: this.$store.state.user.site,
          groupID:'',
          groupDesc:'',
          active:'',
        },
        departmentList:[],
        // 展示列集
        columnList: [
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1OrderNo',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'orderNo',
            headerAlign: "center",
            align: "center",
            columnLabel: '工单编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 79,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1PlanID',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'planID',
            headerAlign: "center",
            align: "center",
            columnLabel: '计划编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1PlanID',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'planDesc',
            headerAlign: "center",
            align: "center",
            columnLabel: '计划描述',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1ActualPlanDate',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'planDate',
            headerAlign: "center",
            align: "center",
            columnLabel: '计划执行日期',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1PropertiesCode',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'propertiesCode',
            headerAlign: "center",
            align: "center",
            columnLabel: '模板编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1ObjectID',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'objectID',
            headerAlign: "center",
            align: "center",
            columnLabel: '设备编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1Status',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'status',
            headerAlign: "center",
            align: "center",
            columnLabel: '状态',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1PlanOperatorName',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'planOperatorName',
            headerAlign: "center",
            align: "center",
            columnLabel: '计划执行人员',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1ActualOperatorName',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'checkerName',
            headerAlign: "center",
            align: "center",
            columnLabel: '审核人员',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table1ActualRemark',
            tableId: "101003005Table1",
            tableName: "维保执行表",
            columnProp: 'remark',
            headerAlign: "center",
            align: "center",
            columnLabel: '备注',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 80,
          },
        ],
        detailModelFlag:false,
        detailList:[],
        saveData:{
          site:'',
          orderNo:'',
          planOperatorName:'',
          startDate: '',
          endDate: '',
          workTime:'',
          remark:'',
          mesUser:'',
          planID:'',
          planDesc:'',
          propertiesCode:'',
          objectID: '',
          itemList:[],
          checkResult: '',
          operator: '',
          operatorName: '',
          disposalMeasures: '',
          functionType: 'B',
          createBy: this.$store.state.user.name,
          reachDate: ''
        },
        columnDetailList: [
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2ItemNo',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'itemNo',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保项目编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 82,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2ItemDesc',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'itemDesc',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保项目名称',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 109,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2ItemRemark',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'itemRemark',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保方法说明',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 478,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2ValueType',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'valueType',
            headerAlign: "center",
            align: "center",
            columnLabel: '检测值类型',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 70,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2DefaultValue',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'defaultValue',
            headerAlign: "center",
            align: "center",
            columnLabel: '参照值',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 65,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2MaxValue',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'maxValue',
            headerAlign: "center",
            align: "center",
            columnLabel: '最大值',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 65,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table2MinValue',
            tableId: "101003005Table2",
            tableName: "维保项目表",
            columnProp: 'minValue',
            headerAlign: "center",
            align: "center",
            columnLabel: '最小值',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 65,
          }
        ],
        activeTable: 'inspection_form',
        HistoryRecordList: [],
        HistoryModelFlag: false,
        columnHistoryList: [
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3OrderNo',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'orderNo',
            headerAlign: "center",
            align: "center",
            columnLabel: '工单编号',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3PlanDesc',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'planDesc',
            headerAlign: "center",
            align: "center",
            columnLabel: '计划描述',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3ActualDate',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'actualDate',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保日期',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3CheckResult',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'checkResult',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保结论',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3ActualOperatorName',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'actualOperatorName',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保人员',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3ObjectID',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'objectID',
            headerAlign: "center",
            align: "center",
            columnLabel: '设备编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3ObjectDesc',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'objectDesc',
            headerAlign: "center",
            align: "center",
            columnLabel: '设备名称',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table3Remark',
            tableId: "101003005Table3",
            tableName: "维保记录表",
            columnProp: 'remark',
            headerAlign: "center",
            align: "center",
            columnLabel: '备注',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 78,
          },
        ],
        historyDetailList: [],
        historyDetailModelFlag: false,
        columnHistoryDetailList: [
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4ItemNo',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'itemNo',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保项目编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 82,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4ItemDesc',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'itemDesc',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保项目名称',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 109,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4ItemRemark',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'itemRemark',
            headerAlign: "center",
            align: "center",
            columnLabel: '维保方法说明',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 478,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4ValueType',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'valueType',
            headerAlign: "center",
            align: "center",
            columnLabel: '检测值类型',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 70,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4DefaultValue',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'defaultValue',
            headerAlign: "center",
            align: "center",
            columnLabel: '参照值',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 65,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4MaxValue',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'maxValue',
            headerAlign: "center",
            align: "center",
            columnLabel: '最大值',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 65,
          },
          {
            userId: this.$store.state.user.name,
            functionId: 101003005,
            serialNumber: '101003005Table4MinValue',
            tableId: "101003005Table4",
            tableName: "维保记录维保项目表",
            columnProp: 'minValue',
            headerAlign: "center",
            align: "center",
            columnLabel: '最小值',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
            columnWidth: 65,
          },
        ],
        operatorList: [],
        operatorData: {
          site: this.$store.state.user.site,
          adminID: '',
          adminName: ''
        },
        operatorModelFlag: false,
        dataListSelections2: [],
        operatorDetailList: [
          {
            columnProp: 'adminID',
            headerAlign: "center",
            align: "center",
            columnLabel: '编码',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'adminName',
            headerAlign: "center",
            align: "center",
            columnLabel: '名称',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'phone',
            headerAlign: "center",
            align: "center",
            columnLabel: '手机号',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'department',
            headerAlign: "center",
            align: "center",
            columnLabel: '部门',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'email',
            headerAlign: "center",
            align: "center",
            columnLabel: '邮箱',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'tel',
            headerAlign: "center",
            align: "center",
            columnLabel: '座机号',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'adminLevelDesc',
            headerAlign: "center",
            align: "center",
            columnLabel: '等级',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
          {
            columnProp: 'mesUser',
            headerAlign: "center",
            align: "center",
            columnLabel: 'MES账号',
            columnHidden: false,
            columnImage: false,
            columnSortable: false,
            sortLv: 0,
            status: true,
            fixed: '',
          },
        ],
      }
    },
    mounted () {
      this.$nextTick(() => {
        this.height = window.innerHeight - 210
      })
    },
    created () {
      this.favoriteIsOk()
      this.getDataList()
      // 动态列
      this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
      this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
      this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
      this.getTableUserColumn(this.$route.meta.menuId+'table4',4)
    },
    methods: {
      // 回车选中下一行
      focusNextInput(index, type) {
        let aaa = ''
        if (this.detailList.length - 1 === index) {
          aaa = `${type}0`
        } else {
          aaa = `${type}${index + 1}`
        }
        this.$nextTick(() => {
          this.$refs[aaa].focus()
        })
      },

      /**
       * 刷新项目
       */
      refreshItem () {
        let tempData = {
          site: this.saveData.site,
          planID: this.saveData.planID,
          itemType: this.saveData.functionType,
          objectID: this.saveData.objectID,
          userId: this.$store.state.user.name,
          propertiesCode: this.saveData.propertiesCode
        }
        this.$confirm(`是否更新该计划的项目?`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          refreshItem(tempData).then(({data}) => {
            if (data && data.code === 0) {
              this.getInspectionFormData();
              this.$message({
                message: '操作成功',
                type: 'success',
                duration: 1500,
                onClose: () => {
                }
              })
            } else {
              this.$alert(data.msg, '错误', {
                confirmButtonText: '确定'
              })
            }
          })
        }).catch(() => {
        })
      },
      // 获取机修人员列表
      getOperatorList(){
        getOperatorList(this.operatorData).then(({data}) => {
          if (data && data.code === 0) {
            this.operatorList = data.rows
            this.saveData.operatorName = ''
            this.saveData.operator = ''
            this.operatorModelFlag = true;
          } else {
            this.$alert(data.msg, '错误', {
              confirmButtonText: '确定'
            })
          }
        })
      },
      // 点击行选中复选框
      operatorClickRow(row){
        this.$refs.operatorTable.toggleRowSelection(row);
      },
      // 多选
      selectionChangeHandle2 (val) {
        this.dataListSelections2 = val
      },
      selectFlag(){
        return true;
      },
      // 确认多选协同人员
      confirmOperator(){
        if(this.dataListSelections2.length === 0){
          this.$message.warning('请勾选人员！')
          return
        }
        for (let i = 0; i < this.dataListSelections2.length; i++) {
          this.saveData.operatorName = this.saveData.operatorName + ";" + this.dataListSelections2[i].adminName
          this.saveData.operator = this.saveData.operator + ";" + this.dataListSelections2[i].adminID
        }
        this.saveData.operator = this.saveData.operator.substring(1)
        this.saveData.operatorName = this.saveData.operatorName.substring(1)
        this.operatorModelFlag = false
      },

      // 列表表格选择替换
      tabClick (tab, event) {
        // 刷新列表数据
        this.refreshCurrentTabTable()
      },
      // 刷新页签的table数据
      refreshCurrentTabTable () {
        // 区分不同的页签刷新不同的列表数据
        if (this.activeTable === 'inspection_form') {
          this.getInspectionFormData();
        } else if (this.activeTable === 'history_record') {
          this.queryHistoryRecord();
        }
      },

      // 检验单
      getInspectionFormData(){
        let tempData = {
          site: this.saveData.site,
          planID: this.saveData.planID,
          orderNo: this.saveData.orderNo,
          itemType: 'B',
          objectID: this.saveData.objectID
        }
        eamWorkOrderItemSearch(tempData).then(({data}) => {
          if (data && data.code === 0) {
            this.detailList = data.rows
            for (let i = 0; i < this.detailList.length; i++) {
              this.detailList[i].itemResult = '合格'
            }
          }else {
            this.detailList = [];
          }
        })
      },

      // 点检记录
      queryHistoryRecord(){
        let tempData = {
          site: this.saveData.site,
          objectID: this.saveData.objectID,
          functionType: 'B'
        }
        queryHistoryRecord(tempData).then(({data}) => {
          if (data && data.code === 0) {
            this.HistoryRecordList = data.rows
          }else {
            this.HistoryRecordList = [];
          }
        })
      },

      // 详情
      detailModal(row){
        let tempData = {
          site: this.saveData.site,
          orderNo: row.orderNo,
        }
        eamWorkOrderReportSearch(tempData).then(({data}) => {
          this.historyDetailList = data.rows
        })
        this.historyDetailModelFlag = true;
      },

      // 校验用户是否收藏
      favoriteIsOk() {
        let userFavorite = {
          userId: this.$store.state.user.id,
          languageCode: this.$i18n.locale
        }
        console.log(this.$route.meta.menuId)
        userFavoriteList(userFavorite).then(({data}) => {
          for (let i = 0; i < data.list.length; i++) {
            // let flag=false;
            if(this.$route.meta.menuId==data.list[i].menuId){
              this.favorite = true
              // flag=true;
            }
          }
        })
      },
      // 收藏 OR 取消收藏
      favoriteFunction() {
        let userFavorite = {
          userId: this.$store.state.user.id,
          functionId: this.$route.meta.menuId,
        }
        if (this.favorite) {
          removeUserFavorite(userFavorite).then(({data}) => {
            this.$message.success(data.msg)
            this.favorite = false
          })
        } else {
          // 收藏
          saveUserFavorite(userFavorite).then(({data}) => {
            this.$message.success(data.msg)
            this.favorite = true
          })
        }
      },
      // 获取基础数据列表S
      getBaseList (val,type) {
        this.tagNo = val
        this.$nextTick(() => {
          let strVal = ''
          if (val === 201) {
            strVal = this.searchData.planOperator
            this.$refs.baseList.init(val, strVal)
          }
        })
      },
      /* 列表方法的回调 */
      getBaseData (val) {
        if (this.tagNo === 201) {
          this.searchData.planOperator = val.AdminID
        }
      },
      // 重置查询时间
      searchClick(){
        this.searchData.planDate = ''
        this.getDataList()
      },
      // 获取数据列表
      getDataList () {
        this.searchData.limit = this.pageSize
        this.searchData.page = this.pageIndex
        eamWorkOrderSearch(this.searchData).then(({data}) => {
          if (data.code == 0) {
            this.dataList = data.page.list
            this.pageIndex = data.page.currPage
            this.pageSize = data.page.pageSize
            this.totalPage = data.page.totalCount
          }
          this.dataListLoading = false
        })
      },
      //导出excel
      async createExportData() {
        this.searchData.limit = -1
        this.searchData.page = 1
        await eamWorkOrderSearch(this.searchData).then(({data}) => {
          this.exportList= data.page.list;
        })
        return this.exportList;
      },
      startDownload() {},
      finishDownload() {},
      fields() {
        let json = "{"
        this.columnList.forEach((item, index) => {
          if (index == this.columnList.length - 1) {
            json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
          } else {
            json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
          }
        })
        json += "}"
        let s = eval("(" + json + ")")
        return s
      },
      // 导出 end
      // 每页数
      sizeChangeHandle (val) {
        this.pageSize = val
        this.pageIndex = 1
        this.getDataList()
      },
      // 当前页
      currentChangeHandle (val) {
        this.pageIndex = val
        this.getDataList()
      },
      // 多选
      selectionChangeHandle (val) {
        this.dataListSelections = val
      },

      // 到达
      reach (row){
        let tempData = {
          site: row.site,
          functionType: 'B',
          orderNo: row.orderNo,
          status: '已到达'
        }
        this.$confirm(`是否确认到达?`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          reach(tempData).then(({data}) => {
            if (data && data.code === 0) {
              this.getDataList();
              this.$message({
                message: '操作成功',
                type: 'success',
                duration: 1500,
                onClose: () => {
                }
              })
            } else {
              this.$alert(data.msg, '错误', {
                confirmButtonText: '确定'
              })
            }
          })
        }).catch(() => {
        })
      },
      reportModal(row){
        this.saveData = {
          site: row.site,
          orderNo: row.orderNo,
          planID: row.planID,
          objectID: row.objectID,
          planOperatorName: row.planOperatorName,
          workTime: '',
          remark: '',
          mesUser: this.$store.state.user.name,
          itemList: [],
          checkResult: '',
          operator: row.operator,
          operatorName: row.operatorName,
          functionType: 'B',
          planDesc: row.planDesc,
          propertiesCode: row.propertiesCode,
          reachDate: row.reachDate
        }
        this.getInspectionFormData()
        this.queryHistoryRecord()
        this.detailModelFlag = true
      },

      async saveCheckReport(){
        let tempFlag = 'N'
        if(this.saveData.checkResult === ''||this.saveData.checkResult == null){
          this.$message.warning('请选择维保结论！')
          return
        }
        if(this.saveData.checkResult === '异常' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures === '')){
          this.$message.warning('请选择异常原因！')
          return
        }
        for (let i = 0; i < this.detailList.length; i++) {
          if(this.detailList[i].valueTypeDb === 'N' && (this.detailList[i].numberValue === '' || this.detailList[i].numberValue == null)){
            this.$message.warning(this.detailList[i].itemDesc+'实测值未填写！')
            return
          }
          if(this.detailList[i].valueTypeDb === 'N' && this.detailList[i].numberValue != '' && this.detailList[i].numberValue != null){
            if((this.detailList[i].minValue != "" && this.detailList[i].minValue != null && this.detailList[i].minValue > this.detailList[i].numberValue) || (this.detailList[i].minValue != ""&& this.detailList[i].minValue != null && this.detailList[i].maxValue < this.detailList[i].numberValue)){
              this.detailList[i].itemResult = '不合格'
            }
          }
        }
        if (this.saveData.checkResult == '不合格') {
          this.detailList.forEach(val => {
            if (val.itemResult == '不合格') {
              tempFlag = 'Y'
            }
          })
          if (tempFlag != 'Y') {
            this.$message.warning('请选择不合格项目！')
            return
          }
        }
        this.saveData.itemList = JSON.parse(JSON.stringify(this.detailList))
        await saveCheckOrderReport(this.saveData).then(({data}) => {
          if (data && data.code === 0) {
            this.getDataList()
            this.detailModelFlag = false
            this.$message({
              message: '操作成功',
              type: 'success',
              duration: 1500,
              onClose: () => {}
            })
          } else {
            this.$alert(data.msg, '错误', {
              confirmButtonText: '确定'
            })
          }
        })
      },
      /**
       * 上传图片
       */
      addUploadFileModal(row){
        let currentData = {
          site: this.$store.state.user.site,
          createBy: this.$store.state.user.name,
          orderNo: this.saveData.orderNo,
          functionType: 'B',
          itemNo: row.itemNo,
          folder: 'WBItemImageFile'
        };
        //打开组件 去做新增业务
        this.$nextTick(() => {
          this.$refs.comEamItemImageUploadFile.init(currentData);
        })
      },

      //去掉input框获得的焦点
      elDatePickerOnFocus(){
        document.activeElement.blur();
      },
      // 动态列开始 获取 用户保存的 格式列
      async getTableUserColumn(tableId, columnId) {
        let queryTableUser = {
          userId: this.$store.state.user.name,
          functionId: this.$route.meta.menuId,
          tableId: tableId,
          status: true,
          languageCode: this.$i18n.locale
        }
        await getTableUserListLanguage(queryTableUser).then(({data}) => {
          if (data.rows.length > 0) {
            //this.columnList1 = []
            switch (columnId) {
              case 1:
                this.columnList = data.rows
                break;
              case 2:
                this.columnDetailList = data.rows
                break;
              case 3:
                this.columnHistoryList = data.rows
                break;
              case 4:
                this.columnHistoryDetailList = data.rows
                break;
            }

          } else {
            this.getColumnList(tableId, columnId)
          }
        })

      },

      // 获取 tableDefault 列
      async getColumnList(tableId, columnId) {
        this.queryTable.tableId = tableId
        let   queryTable= {
          functionId: this.$route.meta.menuId,
          tableId: tableId,
          languageCode: this.$i18n.locale
        }
        await getTableDefaultListLanguage(queryTable).then(({data}) => {
          if (!data.rows.length == 0) {
            switch (columnId) {
              case 1:
                this.columnList = data.rows
                break;
              case 2:
                this.columnDetailList = data.rows
                break;
              case 3:
                this.columnHistoryList = data.rows
                break;
              case 4:
                this.columnHistoryDetailList = data.rows
                break;
            }
          } else {
            // this.showDefault = true.
          }
        })

      },
      //动态列结束
    }
  }
</script>

<style >

</style>
