From 4fba1be16ab3c6c005b499f3820a3aa2a1e7ec1e Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期五, 01 三月 2024 10:09:04 +0800 Subject: [PATCH] 1、车间看板页面缩放和拖拽时增加辅助线 2、驱动参数管理页面调整英文名称字段验证输入字数长度由2-18位调整为为仅验证非空 3、设备日志页面采样周期字段默认值由1000调整为100 4、设备日志页面设备日志列表中若时段状态为关机则不弹出工作曲线 5、设备综合效率分析页面增加表格数据加载动画 6、jQuery.table2excel组件导出表格数据功能增加日期格式的转换 7、设备日志页面工作曲线Y轴增加颜色区分,与对应数据颜色保持一致 8、设备管理页面表单填写界面设备功率增加计量单位kw --- src/views/mdc/base/modules/deviceLog/LogList.vue | 101 +++++++++++++++++++++++++++----------------------- 1 files changed, 54 insertions(+), 47 deletions(-) diff --git a/src/views/mdc/base/modules/deviceLog/LogList.vue b/src/views/mdc/base/modules/deviceLog/LogList.vue index 440c9af..4888611 100644 --- a/src/views/mdc/base/modules/deviceLog/LogList.vue +++ b/src/views/mdc/base/modules/deviceLog/LogList.vue @@ -3,7 +3,8 @@ <!-- table鍖哄煙-begin --> <div class="table_logList"> <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" - :dataSource="dataList" :pagination="ipagination" :loading="loadingequip" @change="handleTableChange" :customRow="rowClick"> + :dataSource="dataList" :pagination="ipagination" :loading="loadingequip" @change="handleTableChange" + :customRow="rowClick"> <template slot="status" slot-scope="status"> <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">杩愯</div> <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">寰呮満</div> @@ -29,6 +30,7 @@ JeecgListMixin } from '@/mixins/JeecgListMixin' import moment from 'moment' + export default { name: 'LogList', mixins: [JeecgListMixin], @@ -44,26 +46,24 @@ required: true, default: [] }, - loadingequip:{ - type:Boolean, + loadingequip: { + type: Boolean, default: false } }, - watch:{ - - }, + watch: {}, data() { return { statusName: '', disabled: true, disableMixinCreated: true, loading: false, - ipagination:{ + ipagination: { current: 1, pageSize: 100, pageSizeOptions: ['100', '500', '1000'], showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' }, showQuickJumper: true, showSizeChanger: true, @@ -79,14 +79,14 @@ { title: '寮�濮嬫椂闂�', align: 'center', - dataIndex: 'startTime', + dataIndex: 'startTime' // defaultSortOrder:'descend', // sorter: (a, b) => {return a.startTime>b.startTime?1:-1} }, { title: '缁撴潫鏃堕棿', align: 'center', - dataIndex: 'endTime', + dataIndex: 'endTime' // defaultSortOrder:'descend', // sorter: (a, b) => {return a.endTime>b.endTime?1:-1} }, @@ -94,25 +94,25 @@ title: '鎸佺画鏃堕棿', align: 'center', dataIndex: 'duration', - customRender:(t,r,index) =>{ + customRender: (t, r, index) => { // console.log(t) var ss = parseInt(t) - if(ss>=3600){ + if (ss >= 3600) { // 鏍规嵁绉掓暟杞崲鎴愬搴旂殑鏃跺垎绉� const hour = parseInt(ss / 3600) < 10 ? '0' + parseInt(ss / 3600) : parseInt(ss / 3600) const min = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) const sec = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) - if(min == '00') { - if(sec == '00'){ + if (min == '00') { + if (sec == '00') { return hour + '灏忔椂' - }else{ - return hour + '灏忔椂'+ sec + '绉�' + } else { + return hour + '灏忔椂' + sec + '绉�' } - }else{ - if(sec == '00') { + } else { + if (sec == '00') { return hour + '灏忔椂' + min + '鍒�' - }else{ + } else { return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' } } @@ -124,11 +124,11 @@ // } // return hour + '灏忔椂' + min + '鍒�' + sec + '绉�' - }else if(60<ss && ss<3600){ + } else if (60 < ss && ss < 3600) { const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) - return min1 + '鍒�' + sec1 + "绉�" - }else{ + return min1 + '鍒�' + sec1 + '绉�' + } else { const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60) return sec2 + '绉�' } @@ -149,10 +149,10 @@ //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂 //TODO 绛涢�� if (Object.keys(sorter).length > 0) { - this.isorter.column = sorter.field; - this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" + this.isorter.column = sorter.field + this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc' } - this.ipagination = pagination; + this.ipagination = pagination // this.loadData(); }, /** @@ -160,15 +160,17 @@ * @param record 鐐瑰嚮鐨勫綋鍓嶈鏁版嵁 * @returns {{on: {click: on.click}}} 娣诲姞浜嬩欢瀵硅薄 */ - rowClick(record){ + rowClick(record) { return { - on:{ - click:()=>{ - const timeObj={ - start:moment(record.startTime), - end:moment(record.endTime) + on: { + click: () => { + // 鍏虫満鐘舵�佽澶囨棩蹇椾笉寮瑰嚭宸ヤ綔鏇茬嚎 + if (record.status === 0) return + const timeObj = { + start: moment(record.startTime), + end: moment(record.endTime) } - this.$bus.$emit('tableRowRecord',timeObj) + this.$bus.$emit('tableRowRecord', timeObj) } } } @@ -182,33 +184,38 @@ <style lang="less" scoped> @import '~@assets/less/common.less'; - @media screen and (min-width: 1920px){ - .table_logList{ - height: 417px!important; + + @media screen and (min-width: 1920px) { + .table_logList { + height: 417px !important; overflow: scroll; } } - @media screen and (min-width: 1680px) and (max-width: 1920px){ - .table_logList{ - height: 417px!important; + + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .table_logList { + height: 417px !important; overflow: scroll; } } - @media screen and (min-width: 1400px) and (max-width: 1680px){ - .table_logList{ - height: 266px!important; + + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .table_logList { + height: 266px !important; overflow: scroll; } } - @media screen and (min-width: 1280px) and (max-width: 1400px){ - .table_logList{ - height: 360px!important; + + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .table_logList { + height: 360px !important; overflow: scroll; } } - @media screen and (max-width: 1280px){ - .table_logList{ - height: 170px!important; + + @media screen and (max-width: 1280px) { + .table_logList { + height: 170px !important; overflow: scroll; } } -- Gitblit v1.9.3