| | |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { filterObj } from '@/utils/util'; |
| | | import { filterObj } from '@/utils/util' |
| | | import { putAction, getAction } from '@/api/manage' |
| | | import DeviceCalendarModel from './DeviceCalendarModel' |
| | | import DeviceCalendarAdd from './DeviceCalendarAdd' |
| | |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | |
| | | title: '日期', |
| | | align: 'center', |
| | | dataIndex: 'effectiveDate', |
| | | width:100, |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | align: 'center', |
| | | width: 100, |
| | | scopedSlots: { customRender: 'action' }, |
| | | fixed:'right' |
| | |
| | | }, |
| | | props: { node: {}, Type:'' }, |
| | | created() { |
| | | const { equipmentId } = this.$route.params |
| | | if (equipmentId) this.queryParam.equipmentId = equipmentId |
| | | |
| | | this.dates = [moment().subtract('days', 0), moment().subtract('days', 0)] |
| | | this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD') |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1" |
| | | this.queryParam.typeTree = '1' |
| | | this.loadData() |
| | | }, |
| | | mounted(){ |
| | |
| | | }, |
| | | watch: { |
| | | Type(valmath){ |
| | | this.dataList = []; |
| | | this.dataList = [] |
| | | this.queryParam.typeTree = valmath |
| | | // console.log(this.queryParams.typeTree) |
| | | }, |
| | |
| | | if (JSON.stringify(val) != '{}') { |
| | | if (val.equipmentId != null) { |
| | | this.queryParam.equipmentId = val.equipmentId |
| | | this.queryParam.parentId = " " |
| | | this.queryParam.parentId = ' ' |
| | | this.ipagination.current = 1 |
| | | this.loadData() |
| | | } else { |
| | |
| | | this.loadData() |
| | | }, |
| | | loadData(arg) { |
| | | this.dataSource = []; |
| | | this.dataSource = [] |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list属性!") |
| | | this.$message.error('请设置url.list属性!') |
| | | return |
| | | } |
| | | //加载数据 若传入参数1则加载第一页的内容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | var params = this.getQueryParams();//查询条件 |
| | | var params = this.getQueryParams()//查询条件 |
| | | |
| | | if(!params){ |
| | | return false; |
| | | return false |
| | | } |
| | | params.startTime = this.queryParam.startTime; |
| | | params.endTime = this.queryParam.endTime; |
| | | params.parentId = this.queryParam.parentId; |
| | | params.equipmentId = this.queryParam.equipmentId; |
| | | params.orderByName = "ascend"; |
| | | this.loading = true; |
| | | params.startTime = this.queryParam.startTime |
| | | params.endTime = this.queryParam.endTime |
| | | params.parentId = this.queryParam.parentId |
| | | params.equipmentId = this.queryParam.equipmentId |
| | | params.orderByName = 'ascend' |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | |
| | | this.dataSource = res.result.records||res.result; |
| | | if(res.result.total) |
| | | { |
| | | this.ipagination.total = res.result.total; |
| | | this.dataSource = res.result.records || res.result |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | }else{ |
| | | this.ipagination.total = 0; |
| | | this.ipagination.total = 0 |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | |
| | | height: 812px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | .deviceCalendar_list{ |
| | | height: 812px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | .deviceCalendar_list{ |
| | | height: 664px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | .deviceCalendar_list{ |
| | | height: 565px!important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px){ |
| | | .deviceCalendar_list{ |
| | | height: 565px!important; |