|
@@ -4,39 +4,39 @@
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<div class="iotmenu-search-container">
|
|
<div class="iotmenu-search-container">
|
|
<div class="item-search">
|
|
<div class="item-search">
|
|
- <a-input placeholder="请输入联锁名称" v-model="queryParam.interlockname" allow-clear @change="searchQuery">
|
|
|
|
|
|
+ <a-input placeholder="联锁名称" v-model="queryParam.interlockname" allow-clear @change="searchQuery">
|
|
<a-icon slot="prefix" type="search" />
|
|
<a-icon slot="prefix" type="search" />
|
|
</a-input>
|
|
</a-input>
|
|
</div>
|
|
</div>
|
|
<div class="item-search">
|
|
<div class="item-search">
|
|
- <a-input placeholder="请输入联锁条件" v-model="queryParam.interlockConditionTag" allow-clear @change="searchQuery">
|
|
|
|
|
|
+ <a-input placeholder="联锁条件" v-model="queryParam.interlockConditionTag" allow-clear @change="searchQuery">
|
|
<a-icon slot="prefix" type="search" />
|
|
<a-icon slot="prefix" type="search" />
|
|
</a-input>
|
|
</a-input>
|
|
</div>
|
|
</div>
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
- <a-select placeholder="请选择仪表状态" v-model="queryParam.instrumentStatus" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
|
|
|
+ <a-select placeholder="仪表状态" v-model="queryParam.instrumentStatus" allowClear :options="instrumentOptions" @change="searchQuery"></a-select>
|
|
</div>
|
|
</div>
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
- <a-select placeholder="请选择控制系统状态" v-model="queryParam.controlSystemStatus" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
|
|
|
+ <a-select placeholder="控制系统状态" v-model="queryParam.controlSystemStatus" allowClear :options="controlSystemOptions" @change="searchQuery"></a-select>
|
|
</div>
|
|
</div>
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
- <a-select placeholder="请选择旁路状态" v-model="queryParam.bypass" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
|
|
|
+ <a-select placeholder="旁路状态" v-model="queryParam.bypass" allowClear :options="bypassOptions" @change="searchQuery"></a-select>
|
|
</div>
|
|
</div>
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
- <j-dict-select-tag v-model="queryParam.interlockStatus" placeholder="请选择联锁状态" dictCode="interlock_status" style="width: 100%;"/>
|
|
|
|
|
|
+ <a-select placeholder="联锁状态" v-model="queryParam.interlockStatus" allowClear :options="interlockOptions" @change="searchQuery"></a-select>
|
|
</div>
|
|
</div>
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
- <a-select placeholder="请选择回路健康级别" v-model="queryParam.loopHealthLevel" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
|
|
|
+ <a-select placeholder="回路健康级别" v-model="queryParam.loopHealthLevel" allowClear :options="healthLevelOption" @change="searchQuery"></a-select>
|
|
</div>
|
|
</div>
|
|
<div class="item-search">
|
|
<div class="item-search">
|
|
- <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.beginTime"></j-date>
|
|
|
|
|
|
+ <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="开始时间" class="query-group-cust" v-model="queryParam.beginTime" @change="searchQuery"></j-date>
|
|
<!-- <span class="query-group-split-cust"></span> -->
|
|
<!-- <span class="query-group-split-cust"></span> -->
|
|
</div>
|
|
</div>
|
|
<div class="item-search">
|
|
<div class="item-search">
|
|
- <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.endTime"></j-date>
|
|
|
|
|
|
+ <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="结束时间" class="query-group-cust" v-model="queryParam.endTime" @change="searchQuery"></j-date>
|
|
</div>
|
|
</div>
|
|
<div class="item-search-btn">
|
|
<div class="item-search-btn">
|
|
- <a-button type="primary" icon="download" v-has="'export:history'" @click="handleExportXls('历史数据')">导出</a-button>
|
|
|
|
|
|
+ <a-button type="primary" :icon="exportBtnLoading ? 'loading' : 'download'" v-has="'export:history'" @click="handleExportXls('历史数据')" :disabled="exportBtnLoading">导出</a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -291,7 +291,12 @@
|
|
],
|
|
],
|
|
dictOptions:{},
|
|
dictOptions:{},
|
|
superFieldList:[],
|
|
superFieldList:[],
|
|
- mouseSummaryid: '',
|
|
|
|
|
|
+ // mouseSummaryid: '', // 用于合并单元格悬浮样式设置
|
|
|
|
+ // 当前系统默认值
|
|
|
|
+ instrumentOptions: [], // 仪表状态
|
|
|
|
+ controlSystemOptions: [], // 控制系统状态
|
|
|
|
+ bypassOptions: [], // 旁路状态
|
|
|
|
+ interlockOptions: [], // 联锁状态
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -326,6 +331,57 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 获得当前系统设置的默认参数
|
|
|
|
+ getSystemDefaulOptions(){
|
|
|
|
+ getAction('/base/interlockBase/queryById', {id: this.selectData.id}).then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ var result = res.result
|
|
|
|
+ if(result.bypassYes === '0'){
|
|
|
|
+ this.bypassOptions = [
|
|
|
|
+ { value: '0', title: result.bypassYesName },
|
|
|
|
+ { value: '1', title: result.bypassNoName },
|
|
|
|
+ ]
|
|
|
|
+ } else {
|
|
|
|
+ this.bypassOptions = [
|
|
|
|
+ { value: '0', title: result.bypassNoName },
|
|
|
|
+ { value: '1', title: result.bypassYesName },
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ if(result.controlSystemStatusNormal === '0'){
|
|
|
|
+ this.controlSystemOptions = [
|
|
|
|
+ { value: '0', title: result.controlSystemStatusNormalName },
|
|
|
|
+ { value: '1', title: result.controlSystemStatusAbnormalName },
|
|
|
|
+ ]
|
|
|
|
+ } else {
|
|
|
|
+ this.controlSystemOptions = [
|
|
|
|
+ { value: '0', title: result.controlSystemStatusAbnormalName },
|
|
|
|
+ { value: '1', title: result.controlSystemStatusNormalName },
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ if(result.instrumentStatusNormal === '0'){
|
|
|
|
+ this.instrumentOptions = [
|
|
|
|
+ { value: '0', title: result.instrumentStatusNormalName },
|
|
|
|
+ { value: '1', title: result.instrumentStatusAbnormalName },
|
|
|
|
+ ]
|
|
|
|
+ } else {
|
|
|
|
+ this.instrumentOptions = [
|
|
|
|
+ { value: '0', title: result.instrumentStatusAbnormalName },
|
|
|
|
+ { value: '1', title: result.instrumentStatusNormalName },
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ if(result.interlockStatusTy === '0'){
|
|
|
|
+ this.interlockOptions = [
|
|
|
|
+ { value: '0', title: result.interlockStatusTyName },
|
|
|
|
+ { value: '1', title: result.interlockStatusWtyName },
|
|
|
|
+ ]
|
|
|
|
+ } else {
|
|
|
|
+ this.interlockOptions = [
|
|
|
|
+ { value: '0', title: result.interlockStatusWtyName },
|
|
|
|
+ { value: '1', title: result.interlockStatusTyName },
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
loadData(arg) {
|
|
loadData(arg) {
|
|
let that = this
|
|
let that = this
|
|
if(!this.url.list){
|
|
if(!this.url.list){
|
|
@@ -340,6 +396,7 @@
|
|
this.loading = true;
|
|
this.loading = true;
|
|
// 左右两边重置分别控制各自的,所以转换数据换到这里
|
|
// 左右两边重置分别控制各自的,所以转换数据换到这里
|
|
if (this.selectData.interlockType == 1) {
|
|
if (this.selectData.interlockType == 1) {
|
|
|
|
+ this.getSystemDefaulOptions()
|
|
params.interlockApparatusId = ''
|
|
params.interlockApparatusId = ''
|
|
params.interlockSystemId = this.selectData.id
|
|
params.interlockSystemId = this.selectData.id
|
|
} else {
|
|
} else {
|
|
@@ -537,35 +594,37 @@
|
|
fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
|
|
fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
|
|
this.superFieldList = fieldList
|
|
this.superFieldList = fieldList
|
|
},
|
|
},
|
|
- handleExportXls(fileName){
|
|
|
|
- if(!fileName || typeof fileName != "string"){
|
|
|
|
- fileName = "导出文件"
|
|
|
|
- }
|
|
|
|
- let param = this.getQueryParams();
|
|
|
|
- if(this.selectedRowKeys && this.selectedRowKeys.length>0){
|
|
|
|
- param['selections'] = this.selectedRowKeys.join(",")
|
|
|
|
- }
|
|
|
|
- console.log("导出参数",param)
|
|
|
|
- downFile(this.url.exportXlsUrl,param).then((data)=>{
|
|
|
|
- if (!data) {
|
|
|
|
- this.$message.warning("文件下载失败")
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
|
- window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
|
|
|
|
- }else{
|
|
|
|
- let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
|
|
|
- let link = document.createElement('a')
|
|
|
|
- link.style.display = 'none'
|
|
|
|
- link.href = url
|
|
|
|
- link.setAttribute('download', fileName+'.xls')
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
- link.click()
|
|
|
|
- document.body.removeChild(link); //下载完成移除元素
|
|
|
|
- window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // handleExportXls(fileName){
|
|
|
|
+ // this.exportBtnLoading = true
|
|
|
|
+ // if(!fileName || typeof fileName != "string"){
|
|
|
|
+ // fileName = "导出文件"
|
|
|
|
+ // }
|
|
|
|
+ // let param = this.getQueryParams();
|
|
|
|
+ // if(this.selectedRowKeys && this.selectedRowKeys.length>0){
|
|
|
|
+ // param['selections'] = this.selectedRowKeys.join(",")
|
|
|
|
+ // }
|
|
|
|
+ // console.log("导出参数",param)
|
|
|
|
+ // downFile(this.url.exportXlsUrl,param).then((data)=>{
|
|
|
|
+ // this.exportBtnLoading = false
|
|
|
|
+ // if (!data) {
|
|
|
|
+ // this.$message.warning("文件下载失败")
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
|
+ // window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
|
|
|
|
+ // }else{
|
|
|
|
+ // let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
|
|
|
+ // let link = document.createElement('a')
|
|
|
|
+ // link.style.display = 'none'
|
|
|
|
+ // link.href = url
|
|
|
|
+ // link.setAttribute('download', fileName+'.xls')
|
|
|
|
+ // document.body.appendChild(link)
|
|
|
|
+ // link.click()
|
|
|
|
+ // document.body.removeChild(link); //下载完成移除元素
|
|
|
|
+ // window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|