loulijun2021
2023-04-18 be347b964540ca82641d9d74c280718da469f351
1.递交
已修改1个文件
356 ■■■■ 文件已修改
src/views/reportManager/installationLampList.vue 356 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportManager/installationLampList.vue
@@ -215,8 +215,14 @@
      >
        <el-tab-pane label="安灯明细">
          <div class="elTableDiv">
            <TableColumnSettings
              v-if="false"
              :list1="tableColumnSettingsArray"
              @tableColumnUpdate="tableColumnUpdate"
            />
            <el-table
              ref="tableDataRef"
              :key="tableTimeStampKey"
              class="tableFixed"
              :data="tableData"
              border
@@ -228,79 +234,32 @@
              :cell-style="this.$cellStyle"
              @sort-change="sortChange"
            >
              <el-table-column
                prop="RowNum"
                width="50"
                fixed
                label="序号"
              />
              <el-table-column
                prop="wkshp_code"
                label="车间编码"
                sortable="custom"
              />
              <el-table-column
                prop="wkshp_name"
                label="车间名称"
                sortable="custom"
              />
              <el-table-column
                prop="eqp_code"
                label="设备编码"
                sortable="custom"
              />
              <el-table-column
                prop="eqp_name"
                label="设备名称"
                sortable="custom"
              />
              <el-table-column
                prop="typename"
                label="呼叫类型"
                sortable="custom"
              />
              <el-table-column
                prop="start_user"
                label="呼叫人"
                sortable="custom"
              />
              <el-table-column
                prop="start_date"
                label="呼叫时间"
                width="160"
                sortable="custom"
              />
              <el-table-column
                prop="resp_user"
                label="响应人"
                sortable="custom"
              />
              <el-table-column
                prop="resp_date"
                label="响应时间"
                width="160"
                sortable="custom"
              />
              <el-table-column
                prop="respondcont"
                label="响应时长"
                width="160"
                sortable="custom"
              />
              <el-table-column
                prop="status"
                label="状态"
                sortable="custom"
                v-for="item in tableColumnSettingsArray"
                v-if="item.show"
                :key="item.id"
                :sortable="item.sortable"
                :prop="item.prop"
                :min-width="item.minWidth"
                :label="item.label"
                :width="item.width"
                show-tooltip-when-overflow
                :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false"
              >
                <template slot-scope="{row}">
                  <div v-if="row.status==='已响应'" style="display: flex;align-items: center">
                    <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
                    已响应
                  <div v-if="!row[item.prop]">/</div>
                  <div v-else-if="item.prop==='status'">
                    <div v-if="row.status==='已响应'" style="display: flex;align-items: center">
                      <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
                      已响应
                    </div>
                    <div v-if="row.status==='待响应'" style="display: flex;align-items: center">
                      <i class="el-icon-info" style="margin-right: 2px" />
                      待响应
                    </div>
                  </div>
                  <div v-if="row.status==='待响应'" style="display: flex;align-items: center">
                    <i class="el-icon-info" style="margin-right: 2px" />
                    待响应
                  </div>
                  <div v-else>{{ row[item.prop] }}</div>
                </template>
              </el-table-column>
@@ -319,8 +278,14 @@
        </el-tab-pane>
        <el-tab-pane label="安灯汇总">
          <div class="elTableDiv">
            <TableColumnSettings
              v-if="false"
              :list1="tableColumnSettingsArray2"
              @tableColumnUpdate="tableColumnUpdate2"
            />
            <el-table
              ref="tableDataRef2"
              :key="tableTimeStampKey2"
              class="tableFixed"
              :data="tableDataSum"
              border
@@ -332,42 +297,27 @@
              :cell-style="this.$cellStyle"
              @sort-change="sortChange"
            >
              <el-table-column
                prop="RowNum"
                width="50"
                fixed
                label="序号"
              />
              <el-table-column
                prop="wkshp_name"
                label="生产车间"
                sortable="custom"
              />
              <el-table-column
                prop="eqp_name"
                label="设备名称"
                sortable="custom"
              />
              <el-table-column
                prop="calltypename"
                label="呼叫类型"
                sortable="custom"
              />
              <el-table-column
                prop="callcount"
                label="呼叫总次数"
                sortable="custom"
              />
              <el-table-column
                prop="repondcount"
                label="响应总次数"
                sortable="custom"
              />
              <el-table-column
                prop="repondtime"
                label="总响应时长(分钟)"
                sortable="custom"
              />
                v-for="item in tableColumnSettingsArray2"
                v-if="item.show"
                :key="item.id"
                :sortable="item.sortable"
                :prop="item.prop"
                :min-width="item.minWidth"
                :label="item.label"
                :width="item.width"
                show-tooltip-when-overflow
                :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false"
              >
                <template slot-scope="{row}">
                  <div v-if="!row[item.prop]">/</div>
                  <div v-else-if="item.prop==='repondtime'">
                    {{ row.repondtime }} 分钟
                  </div>
                  <div v-else>{{ row[item.prop] }}</div>
                </template>
              </el-table-column>
            </el-table>
          </div>
@@ -400,11 +350,12 @@
} from '@/api/reportManager'
import { ShopSearch } from '@/api/kanbanManager'
import waves from '@/directive/waves'
import TableColumnSettings from '@/components/TableColumnSettings'
export default {
  name: 'Zzjg',
  components: {
    Pagination
    Pagination, TableColumnSettings
  },
  directives: { waves },
  data() {
@@ -431,6 +382,115 @@
      wkshopSelectArr: [], // 生产车间下拉数组
      calltypeSelectArr: [], // 呼叫类型下拉数组
      tableData: [],
      tableColumnSettingsArray: [
        // { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // 隐藏列  show: false隐藏,true显示
        { minWidth: 25, width: 50, prop: 'RowNum', label: '序号', id: 2, show: true, fixed: 'left', sortable: false }, // custom
        {
          minWidth: 110,
          width: false,
          prop: 'wkshp_code',
          label: '车间编码',
          id: 3,
          show: true,
          fixed: false,
          sortable: true
        },
        {
          minWidth: 110,
          width: false,
          prop: 'wkshp_name',
          label: '车间名称',
          id: 4,
          show: true,
          fixed: false,
          sortable: true
        },
        {
          minWidth: 110,
          width: false,
          prop: 'eqp_code',
          label: '设备编码',
          id: 5,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'eqp_name',
          label: '设备名称',
          id: 6,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'typename',
          label: '呼叫类型',
          id: 7,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'start_user',
          label: '呼叫人',
          id: 8,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 160,
          width: false,
          prop: 'start_date',
          label: '呼叫时间',
          id: 9,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'resp_user',
          label: '响应人',
          id: 10,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 160,
          width: false,
          prop: 'resp_date',
          label: '响应时间',
          id: 11,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 130,
          width: false,
          prop: 'respondcont',
          label: '响应时长',
          id: 12,
          show: true,
          fixed: false,
          sortable: true
        },
        {
          minWidth: 110,
          width: false,
          prop: 'status',
          label: '状态',
          id: 13,
          show: true,
          fixed: 'right',
          sortable: true
        }
      ],
      tableTimeStampKey: new Date().getTime(), // 表格key
      currentTabPositionName: '安灯明细', // Tab标签位于的位置 默认第‘0’个
      formSum: {
        wkshopcode: '', // 车间编码
@@ -445,6 +505,78 @@
      },
      tableDataSum: [],
      totalSum: 0,
      tableColumnSettingsArray2: [
        // { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // 隐藏列  show: false隐藏,true显示
        { minWidth: 25, width: 50, prop: 'RowNum', label: '序号', id: 2, show: true, fixed: 'left', sortable: false }, // custom
        {
          minWidth: 110,
          width: false,
          prop: 'wkshp_name',
          label: '生产车间',
          id: 3,
          show: true,
          fixed: false,
          sortable: true
        },
        {
          minWidth: 110,
          width: false,
          prop: 'eqp_code',
          label: '设备编码',
          id: 4,
          show: true,
          fixed: false,
          sortable: true
        },
        {
          minWidth: 110,
          width: false,
          prop: 'eqp_name',
          label: '设备名称',
          id: 5,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'calltypename',
          label: '呼叫类型',
          id: 6,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'callcount',
          label: '呼叫总次数',
          id: 7,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'repondcount',
          label: '响应总次数',
          id: 8,
          show: true,
          fixed: false,
          sortable: true
        }, {
          minWidth: 110,
          width: false,
          prop: 'repondtime',
          label: '总响应时长',
          id: 9,
          show: true,
          fixed: false,
          sortable: true
        }
      ],
      tableTimeStampKey2: new Date().getTime(), // 表格key
      devicetypeArr: []// 生产设备下拉数组
    }
  },
@@ -457,6 +589,20 @@
    this.getHeight()
  },
  methods: {
    tableColumnUpdate(val, isCopyTrue) {
      if (isCopyTrue) {
        this.tableColumnSettingsArray = val
      }
      this.tableTimeStampKey = new Date().getTime()
      this.$refs.tableDataRef.doLayout()
    },
    tableColumnUpdate2(val, isCopyTrue) {
      if (isCopyTrue) {
        this.tableColumnSettingsArray2 = val
      }
      this.tableTimeStampKey2 = new Date().getTime()
      this.$refs.tableDataRef2.doLayout()
    },
    handleRequest() {
      this.getAnDonReportDefinitSearch().then(res => {
        if (res.code === '200') {