¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="list5" |
| | | height="259" |
| | | border |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="å·¥åç¼å·" align="center" prop="workOrderNo" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»æåºåå·" align="center" prop="sfcCode" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="产åç¼å·" align="center" prop="productCode" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="产线ç¼å·" align="center" prop="productionLine" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" align="center" prop="locationCode" width="100"> |
| | | </el-table-column> |
| | | <el-table-column label="å
¥ç«æ¶é´" align="center" prop="inboundTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åºç«æ¶é´" align="center" prop="outboundTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æ¯å¦åæ ¼" align="center" prop="outRsSign"> |
| | | </el-table-column> |
| | | <el-table-column label="NGåå " align="center" prop="outMsgSign"> |
| | | </el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="èææ¶é´" align="center" prop="beatTime"> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- type="index"--> |
| | | <!-- width="50">--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- align="center"--> |
| | | <!-- width="55">--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- label="ç®±ä½ç¼ç "--> |
| | | <!-- align="center"--> |
| | | <!-- width="160">--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.sfcCode }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="name"--> |
| | | <!-- align="center"--> |
| | | <!-- label="å·¥ä½"--> |
| | | <!-- width="120">--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.locationCode }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- align="center"--> |
| | | <!-- label="åæ°å"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.paramName }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- label="ééç»æ"--> |
| | | <!-- align="center"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.paramValue }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- label="åä½"--> |
| | | <!-- align="center"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.unit }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="address"--> |
| | | <!-- label="æ¶é´"--> |
| | | <!-- align="center"--> |
| | | <!-- show-overflow-tooltip>--> |
| | | <!-- <template slot-scope="scope">{{ scope.row.createTime }}</template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "report5", |
| | | props:['list5'], |
| | | data() { |
| | | return { |
| | | total: '', |
| | | queryParams: { |
| | | pageNum: 5, |
| | | pageSize: 5 |
| | | }, |
| | | tableData: [{ |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-08', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-06', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-07', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }], |
| | | multipleSelection: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | getList(){ |
| | | |
| | | }, |
| | | // æ¥ææ ¼å¼å |
| | | parseTime(time, pattern) { |
| | | if (arguments.length === 0 || !time) { |
| | | return null |
| | | } |
| | | const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' |
| | | let date |
| | | if (typeof time === 'object') { |
| | | date = time |
| | | } else { |
| | | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { |
| | | time = parseInt(time) |
| | | } else if (typeof time === 'string') { |
| | | time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), ''); |
| | | } |
| | | if ((typeof time === 'number') && (time.toString().length === 10)) { |
| | | time = time * 1000 |
| | | } |
| | | date = new Date(time) |
| | | } |
| | | const formatObj = { |
| | | y: date.getFullYear(), |
| | | m: date.getMonth() + 1, |
| | | d: date.getDate(), |
| | | h: date.getHours(), |
| | | i: date.getMinutes(), |
| | | s: date.getSeconds(), |
| | | a: date.getDay() |
| | | } |
| | | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { |
| | | let value = formatObj[key] |
| | | // Note: getDay() returns 0 on Sunday |
| | | if (key === 'a') { return ['æ¥', 'ä¸', 'äº', 'ä¸', 'å', 'äº', 'å
'][value] } |
| | | if (result.length > 0 && value < 10) { |
| | | value = '0' + value |
| | | } |
| | | return value || 0 |
| | | }) |
| | | return time_str |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |