develop_cloud #1
@ -38,9 +38,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
init(today=false){
|
||||
const now = new Date(),formatNow = formatDate(now);
|
||||
const weekAgo = formatDate(new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000))
|
||||
const weekAgo = formatDate(today ? new Date(now.getTime()) : new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000))
|
||||
this.dateRange = [weekAgo, formatNow];
|
||||
this.defaultDateRange=[weekAgo, formatNow];
|
||||
this.$emit('updateDate',this.dateRange)
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
<div class="zd-select-container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="站点选择">
|
||||
<el-select v-model="id" placeholder="请选择换电站名称" :loading="loading" loading-text="正在加载数据">
|
||||
<el-select v-model="id" placeholder="请选择换电站名称" :loading="loading" loading-text="正在加载数据" @change="onSubmit">
|
||||
<el-option :label="item.siteName" :value="item.siteId" v-for="(item,index) in siteList" :key="index+'zdxeSelect'"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" :loading="searchLoading" @click="onSubmit">搜索</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-button type="primary" :loading="searchLoading" @click="onSubmit">搜索</el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
this.siteId = siteId
|
||||
this.timeRange=[]
|
||||
this.deviceId=''
|
||||
this.$refs.dateRangeSelect.init()
|
||||
this.$refs.dateRangeSelect.init(true)
|
||||
this.showLoading()
|
||||
getPcsNameList(siteId).then(response=>{
|
||||
const data=response?.data || [];
|
||||
|
||||
@ -107,11 +107,11 @@ export default {
|
||||
series: [
|
||||
{
|
||||
yAxisIndex:0,
|
||||
type: 'line',
|
||||
type: 'bar',
|
||||
},
|
||||
{
|
||||
yAxisIndex:0,
|
||||
type: 'line',
|
||||
type: 'bar',
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
class="common-card-container common-card-container-body-no-padding"
|
||||
>
|
||||
<div slot="header">
|
||||
<span class="card-title">静态信息</span>
|
||||
<span class="card-title">站点信息</span>
|
||||
</div>
|
||||
<div
|
||||
style="box-sizing: border-box; height: 250px; padding: 20px 15px"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div v-for="(baseInfo,index) in baseInfoList" :key="index+'bmsdccContainer'" style="margin-bottom:25px;">
|
||||
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding common-card-container-no-title-bg">
|
||||
<div slot="header">
|
||||
<span class="large-title">{{index+1}}#{{baseInfo.deviceName}}</span>
|
||||
<span class="large-title">{{index+1}}#{{baseInfo.parentDeviceName?`${baseInfo.parentDeviceName} -> ` : ''}}{{baseInfo.deviceName}}</span>
|
||||
</div>
|
||||
<div class="descriptions-main">
|
||||
<el-descriptions direction="vertical" :column="3" :colon="false">
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
<span class="card-title"></span>
|
||||
<date-time-select :data-unit="this.form.dataUnit" @initDate="((e)=>form.dataRange=e||[])" @updateDate="updateDate"/>
|
||||
</div>
|
||||
<div style="height: 310px" id="searchChart"></div>
|
||||
<div style="height: 350px" id="searchChart"></div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@ -193,8 +193,8 @@ export default {
|
||||
console.log('图表数据',dataset)
|
||||
this.chart.setOption({
|
||||
legend: {
|
||||
left: 'center',
|
||||
top: '10',
|
||||
// left: 'center',
|
||||
// top: '10',
|
||||
},
|
||||
grid: {
|
||||
containLabel: true
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
<div class="ems-dashboard-editor-container" style="background-color: #ffffff" v-loading="loading">
|
||||
<el-form :inline="true" class="select-container">
|
||||
<el-form-item label="站点选择">
|
||||
<el-select v-model="siteId" placeholder="请选择换电站名称" :loading="loading" loading-text="正在加载数据">
|
||||
<el-select v-model="siteId" placeholder="请选择换电站名称" :loading="loading" loading-text="正在加载数据" @change="onSearch">
|
||||
<el-option :label="item.siteName" :value="item.siteId" v-for="(item,index) in siteList" :key="index+'zdxeSelect'"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSearch" native-type="button">搜索</el-button>
|
||||
<!-- <el-button type="primary" @click="onSearch" native-type="button">搜索</el-button>-->
|
||||
<el-button @click="onReset" native-type="button">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
Reference in New Issue
Block a user