| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="驱动类型"> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="请选择驱动类型" |
| | | :filter-option="filterOption" |
| | | allowClear |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="7" :sm="7" :xs="7"> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="设备级别"> |
| | | <j-dict-select-tag placeholder="请选择设备级别" dictCode="device_level" v-model="queryParam.deviceLevel" |
| | | allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4" :xs="4"> |
| | | <a-form-item label="设备种类"> |
| | | <j-dict-select-tag placeholder="请选择设备种类" dictCode="device_category" v-model="queryParam.deviceCategory" |
| | | allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="5" :sm="5" :xs="5"> |
| | | <a-form-item label="时间"> |
| | | <a-range-picker |
| | | :placeholder="['开始时间', '结束时间']" |
| | |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">重置</a-button> |
| | | <a-button type="primary" @click="exportExcel" icon="download">导出</a-button> |
| | | <a-button type="primary" icon="printer" v-print="'#EfficiencyShift'" v-has="'deviceProcess:print'">打印</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </div> |
| | | |
| | | <div class="container" id="EfficiencyShift" style="flex:1;overflow: hidden"> |
| | | <a-table :columns="columns" rowKey="equipmentId" :dataSource="dataSource.records" :scroll="{x:'max-content',y:scrollY}" :pagination="false" bordered> |
| | | <a-table :columns="columns" rowKey="equipmentId" :dataSource="dataSource" :scroll="{x:'max-content',y:scrollY}" :pagination="false" bordered> |
| | | <span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span> |
| | | </a-table> |
| | | </div> |
| | | <div class="pagination"> |
| | | <a-pagination |
| | | :total=dataSource.total |
| | | :show-total="(total, range) => `${range[0]}-${range[1]} 共 ${total} 条`" |
| | | :page-size="+queryParam.pageSize" |
| | | :default-current="1" |
| | | :current=+queryParam.pageNo |
| | | show-size-changer |
| | | :pageSizeOptions="['20','30','40','50']" |
| | | @change="handlePageNoChange" |
| | | @showSizeChange="handlePageSizeChange" |
| | | /> |
| | | </div> |
| | | <!--<div class="pagination">--> |
| | | <!--<a-pagination--> |
| | | <!--:total=dataSource.total--> |
| | | <!--:show-total="(total, range) => `${range[0]}-${range[1]} 共 ${total} 条`"--> |
| | | <!--:page-size="+queryParam.pageSize"--> |
| | | <!--:default-current="1"--> |
| | | <!--:current=+queryParam.pageNo--> |
| | | <!--show-size-changer--> |
| | | <!--:pageSizeOptions="['20','30','40','50']"--> |
| | | <!--@change="handlePageNoChange"--> |
| | | <!--@showSizeChange="handlePageSizeChange"--> |
| | | <!--/>--> |
| | | <!--</div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | title: '序号', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 70, |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | |
| | | title: '设备统一编号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 120 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | width: 150, |
| | | width: 200, |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '驱动类型', |
| | | align: 'center', |
| | | width: 110, |
| | | width: 100, |
| | | dataIndex: 'driveType' |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: '加工件数', |
| | | align: 'center', |
| | | width: 80, |
| | | width: 100, |
| | | dataIndex: 'processCount' |
| | | }, |
| | | { |
| | |
| | | dataIndex: 'duration', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'duration' }, |
| | | width: 110 |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '日期', |
| | | dataIndex: 'theDate', |
| | | align: 'center', |
| | | width: 110 |
| | | } |
| | | // { |
| | | // title: '日期', |
| | | // dataIndex: 'theDate', |
| | | // align: 'center', |
| | | // width: 110 |
| | | // } |
| | | ], |
| | | dataSource: [], |
| | | driveTypeList: [], |
| | |
| | | methods: { |
| | | dateParamChange(value) { |
| | | this.dates = value |
| | | console.log('value', value) |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | if(!value.length) { |
| | | delete this.queryParam.startTime |
| | | delete this.queryParam.endTime |
| | | }else{ |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | } |
| | | }, |
| | | |
| | | exportExcel() { |
| | |
| | | }, |
| | | |
| | | searchQuery() { |
| | | if (this.dates != '') { |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | this.queryParam.pageNo = 1 |
| | | this.loadData() |
| | | if (this.queryParam.typeTree == '1') { |
| | | this.queryParam.parentId = this.queryParamEquip.parentId |
| | | this.queryParam.equipmentId = this.queryParamEquip.equipmentId |
| | | } else { |
| | | // this.$message.warning("请选择时间") |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择时间' |
| | | }) |
| | | this.queryParam.parentId = this.queryParamPeople.parentId |
| | | this.queryParam.equipmentId = '' |
| | | } |
| | | // this.onClearSelected() |
| | | this.queryParam.pageNo = 1 |
| | | this.loadData() |
| | | }, |
| | | |
| | | searchReset() { |