Compare commits

..

No commits in common. "a2672c1742158ca21e5883d72a4824b33b6efc0c" and "2267444b4a31854e3b7048324a02533fbf93f9ac" have entirely different histories.

7 changed files with 39 additions and 39 deletions

View File

@ -63,7 +63,7 @@ const tableProps = [
} }
] ]
export default { export default {
name: "EnergyQuantityRealtime", name: "EnergyPlc",
data() { data() {
return { return {
formConfig: [ formConfig: [
@ -125,34 +125,10 @@ export default {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260)
}) })
if (location.href.indexOf('?') > 0) {
let arr = location.href.split('?')[1].split('&')
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
} else {
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
}
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
this.getList(); this.getList();
this.getTypeList() this.getTypeList()
}, },
watch: {
$route: 'initData'
},
methods: { methods: {
initData(to) {
if (to.name === 'EnergyQuantityRealtime') {
if (location.href.indexOf('?') > 0) {
let arr = location.href.split('?')[1].split('&')
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
} else {
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
}
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
this.getList()
}
},
buttonClick(val) { buttonClick(val) {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
this.queryParams.energyTypeId = val.energyTypeId this.queryParams.energyTypeId = val.energyTypeId

View File

@ -80,7 +80,8 @@ export default {
param: 'timeVal', param: 'timeVal',
defaultSelect: [], defaultSelect: [],
width: 350, width: 350,
clearable: false clearable: false,
required:true
}, },
{ {
type: 'button', type: 'button',
@ -121,11 +122,35 @@ export default {
this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260)
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180) this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
}) })
if (location.href.indexOf('?') > 0) {
let arr = location.href.split('?')[1].split('&')
this.formConfig[2].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
} else {
this.formConfig[2].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
}
this.queryParams.startTime = this.formConfig[2].defaultSelect[0]
this.queryParams.endTime = this.formConfig[2].defaultSelect[1]
this.getList() this.getList()
this.getTypeList() this.getTypeList()
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180) this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
}, },
watch: {
$route: 'initData'
},
methods: { methods: {
initData(to) {
if (to.name === 'EnergyReportSearch') {
if (location.href.indexOf('?') > 0) {
let arr = location.href.split('?')[1].split('&')
this.formConfig[2].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
} else {
this.formConfig[2].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
}
this.queryParams.startTime = this.formConfig[2].defaultSelect[0]
this.queryParams.endTime = this.formConfig[2].defaultSelect[1]
this.getList()
}
},
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.formConfig[1].selectOptions = res.data || [] this.formConfig[1].selectOptions = res.data || []

View File

@ -290,8 +290,7 @@ export default {
break; break;
case '2': // case '2': //
this.$router.push({ this.$router.push({
// path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
path: '/energy/base/energy-quantity-realtime?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
}) })
break; break;
default: default:

View File

@ -11,7 +11,7 @@
<base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list"> <base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list">
</base-table> </base-table>
<div v-for="(item,index) in downProps" :key="index"> <div v-for="(item,index) in downProps" :key="index">
<div class="blue-title">工单名称:{{ list[index].workOrderName }}</div> <div class="blue-title">工单:{{ list[index].workOrderName }}</div>
<base-table class="base-table__margin" :table-props="item" :page="1" :limit="10" <base-table class="base-table__margin" :table-props="item" :page="1" :limit="10"
:table-data="downList[index]"> :table-data="downList[index]">
</base-table> </base-table>
@ -214,7 +214,7 @@ export default {
{ {
// width: 160, // width: 160,
prop: 'workOrderName', prop: 'workOrderName',
label: '工单名', label: '工单名',
}, },
...this.dynamicProps, ...this.dynamicProps,
{ {

View File

@ -9,8 +9,8 @@
<el-form ref="form" :model="innerDataForm" label-width="100px" v-loading="formLoading"> <el-form ref="form" :model="innerDataForm" label-width="100px" v-loading="formLoading">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工单名称" prop="workOrderId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]"> <el-form-item label="工单" prop="workOrderId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="innerDataForm.workOrderId" placeholder="请选择工单名称" filterable clearable> <el-select v-model="innerDataForm.workOrderId" placeholder="请选择工单" filterable clearable>
<el-option v-for="opt in workOrderList" :key="opt.value" :label="opt.label" :value="opt.value" /> <el-option v-for="opt in workOrderList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -141,8 +141,8 @@ export default {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'select', type: 'select',
label: '工单名称', label: '工单号',
placeholder: '请选择工单名称', placeholder: '请选择工单',
param: 'workOrderId', param: 'workOrderId',
selectOptions: [], selectOptions: [],
filterable:true filterable:true
@ -215,7 +215,7 @@ export default {
{ {
// width: 128, // width: 128,
prop: 'workOrderName', prop: 'workOrderName',
label: '工单名称', label: '工单Id',
}, },
{ {
// width: 128, // width: 128,

View File

@ -67,8 +67,8 @@ export default {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'select', type: 'select',
label: '工单名称', label: '工单',
placeholder: '请选择工单名称', placeholder: '请选择工单',
param: 'workOrderIdList', param: 'workOrderIdList',
selectOptions: [], selectOptions: [],
multiple: true, multiple: true,
@ -205,8 +205,8 @@ export default {
return [ return [
{ {
// width: 128, // width: 128,
prop: 'workOrderName', prop: 'workOrderId',
label: '工单名称', label: '工单',
}, },
{ {
// width: 128, // width: 128,