|
@@ -11,10 +11,11 @@
|
|
|
end-placeholder="结束日期"
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
popper-class="cpp-popper"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="场站名称">
|
|
|
- <el-select v-model="stationCode" placeholder="请选择" style="width: 150px" popper-class="cpp-popper" clearable>
|
|
|
+ <el-select v-model="stationCode" placeholder="请选择" style="width: 150px" popper-class="cpp-popper" @change="changeStationCode">
|
|
|
<el-option
|
|
|
v-for="item in stationList"
|
|
|
:key="item.value"
|
|
@@ -150,7 +151,12 @@ export default {
|
|
|
electricFieldTypeEnum: '',
|
|
|
windFileTypeList: [],
|
|
|
photovoltaicFileTypeList: [],
|
|
|
- allFileTypeList: []
|
|
|
+ allFileTypeList: [],
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ return time.getTime() > new Date(new Date().toLocaleDateString()).getTime()+24 * 60 * 60 * 1000 -1
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -197,7 +203,7 @@ export default {
|
|
|
getStationCode() {
|
|
|
this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {
|
|
|
this.stationList = response.data
|
|
|
- this.stationList.push({value: '未知', label: '未知'})
|
|
|
+ // this.stationList.push({value: '未知', label: '未知'})
|
|
|
if (this.stationList.length > 0) {
|
|
|
this.stationCode = this.stationList[0].value
|
|
|
this.queryByStationCode()
|
|
@@ -209,6 +215,9 @@ export default {
|
|
|
this.allFileTypeList = response.data
|
|
|
})
|
|
|
},
|
|
|
+ changeStationCode(){
|
|
|
+ this.queryByStationCode()
|
|
|
+ },
|
|
|
queryByStationCode() {
|
|
|
this.loading = true
|
|
|
let startTime = Math.round(this.dateTime[0])
|
|
@@ -245,9 +254,13 @@ export default {
|
|
|
},
|
|
|
codeChangeName(row) {
|
|
|
var codeList = this.stationList
|
|
|
- for (let i = 0; i < codeList.length; i++) {
|
|
|
- if (row.cellValue == codeList[i].value) {
|
|
|
- return codeList[i].label
|
|
|
+ if (row.cellValue == null){
|
|
|
+ return '未知'
|
|
|
+ }else {
|
|
|
+ for (let i = 0; i < codeList.length; i++) {
|
|
|
+ if (row.cellValue == codeList[i].value) {
|
|
|
+ return codeList[i].label
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|