update(靳娜修改)

main
ytl 12 months ago
parent c885ab3527
commit b6ae5ac579
  1. 20
      src/api/equipment/index.js
  2. 61
      src/permission.js
  3. 12
      src/util/bfHelper.js
  4. 44
      src/views/equipment/warnHistory.vue
  5. 32
      src/views/garden/generalizePattern.vue

@ -157,27 +157,11 @@ export const getInitialEquipmentDeleteList = () => {
}; };
// 获取报警记录数据 // 获取报警记录数据
export const getAlarmList = ( export const getAlarmList = (query) => {
warnType,
startDate,
endDate,
current,
size,
area,
classCode
) => {
return request({ return request({
url: "/api/blade-desk/equipment/warn-his/page", url: "/api/blade-desk/equipment/warn-his/page",
method: "get", method: "get",
params: { params: query
warnType,
startDate,
endDate,
current,
size,
area,
classCode,
},
}); });
}; };

@ -45,25 +45,56 @@ router.beforeEach((to, from, next) => {
const meta = to.meta || router.$avueRouter.meta || {}; const meta = to.meta || router.$avueRouter.meta || {};
const i18n = to.query.i18n; const i18n = to.query.i18n;
if (to.query.target) { if (to.query.target) {
console.log('1111111111111111111111111')
window.open(value) window.open(value)
} else if (meta.isTab !== false && !validatenull(value) && !validatenull(label)) { } else if (meta.isTab !== false && !validatenull(value) && !validatenull(label)) {
store.commit('ADD_TAG', { console.log('4444444444444444444444444444',to,from)
label: label, if(from.path.indexOf('/garden/index') != -1){
value: value, if(to.path.indexOf('sourceAnaly/index') == -1){
params: to.params, console.log('2222222222222222222222222222222222')
query: to.query, const routerUrl = router.resolve({ path: to.path, query: to.query,params:to.params });
meta: (() => { window.open(routerUrl.href,'_blank')
if (!i18n) { }else{
return meta console.log('333333333333333333333333333333333')
}
return { next()
i18n: i18n }
}else if(from.path.indexOf('sourceAnaly/index') != -1){
if(to.path.indexOf('/garden/index') == -1){
const routerUrl = router.resolve({ path: to.path, query: to.query,params:to.params });
window.open(routerUrl.href,'_blank')
}else{
next()
}
}else{
if(from.path != '/'){
if(to.path.indexOf('/garden/index') != -1 || to.path.indexOf('sourceAnaly/index') != -1){
const routerUrl = router.resolve({ path: to.path, query: to.query,params:to.params });
window.open(routerUrl.href,'_blank')
}else{
next()
} }
})(), }else{
group: router.$avueRouter.group || [] next()
}); }
console.log('5555555555555555555555555555555555',to,from)
}
// store.commit('ADD_TAG', {
// label: label,
// value: value,
// params: to.params,
// query: to.query,
// meta: (() => {
// if (!i18n) {
// return meta
// }
// return {
// i18n: i18n
// }
// })(),
// group: router.$avueRouter.group || []
// });
} }
next()
} }
} }
} else { } else {

@ -2863,12 +2863,12 @@ const loadModel = (i) => {
// BimfaceLoaderConfig.APIHost = "http://10.90.100.203:8080"; // BimfaceLoaderConfig.APIHost = "http://10.90.100.203:8080";
BimfaceLoaderConfig.dataEnvType = BimfaceEnvOption.Local; BimfaceLoaderConfig.dataEnvType = BimfaceEnvOption.Local;
BimfaceLoaderConfig.sdkPath = "static/jssdk@3.6.293/jssdk"; BimfaceLoaderConfig.sdkPath = "static/jssdk@3.6.293/jssdk";
// BimfaceLoaderConfig.path = i == 1 ? '/bimfaceApi/ywq/viewToken.json' : BimfaceLoaderConfig.path = i == 1 ? '/bimfaceApi/ywq/viewToken.json' :
// '/bimfaceApi/tt/viewToken.json'; '/bimfaceApi/tt/viewToken.json';
BimfaceLoaderConfig.path = // BimfaceLoaderConfig.path =
i == 1 // i == 1
? "http://10.90.100.203:8080/ywq/viewToken.json" // ? "http://10.90.100.203:8080/ywq/viewToken.json"
: "http://10.90.100.203:8080/tt/viewToken.json"; // : "http://10.90.100.203:8080/tt/viewToken.json";
BimfaceSDKLoader.load(BimfaceLoaderConfig, onSDKLoadSucceeded, (err) => { BimfaceSDKLoader.load(BimfaceLoaderConfig, onSDKLoadSucceeded, (err) => {
console.log('err', err) console.log('err', err)

@ -40,7 +40,7 @@
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel" :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel"
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" :page.sync="page"> @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" :page.sync="page" @sort-change="sortChange">
<template slot-scope="scope" slot="areaSearch"> <template slot-scope="scope" slot="areaSearch">
<el-select v-model="area"> <el-select v-model="area">
<el-option label="业务区" value="1"></el-option> <el-option label="业务区" value="1"></el-option>
@ -304,10 +304,17 @@
this.routeName = this.$route.name this.routeName = this.$route.name
}, },
methods: { methods: {
sortChange(val){
if(val.order == 'ascending'){
this.onLoad('ascs')
}else if(val.order == 'descending'){
this.onLoad('descs')
}
},
nodeClick(data){ nodeClick(data){
this.classCode = data.key; this.classCode = data.key;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page) this.onLoad()
}, },
initData() { initData() {
@ -392,7 +399,7 @@
this.$refs.crud.refreshTable(); this.$refs.crud.refreshTable();
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
// //
this.onLoad(this.page); this.onLoad();
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
@ -404,7 +411,7 @@
this.query.area = '1'; this.query.area = '1';
this.startDate = ''; this.startDate = '';
this.page.currentPage = 1 this.page.currentPage = 1
this.onLoad(this.page); this.onLoad();
}, },
searchChange(params, done) { searchChange(params, done) {
this.query.warnType = params.warnType; this.query.warnType = params.warnType;
@ -446,17 +453,38 @@
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad();
}, },
onLoad() { onLoad(type) {
this.loading = true; this.loading = true;
getAlarmList(this.query.warnType,this.startDate,this.endDate,this.page.currentPage,this.page.pageSize,this.area,this.classCode).then(res => { let query = {
warnType:this.query.warnType,
startDate:this.startDate,
endDate:this.endDate,
current:this.page.currentPage,
size:this.page.pageSize,
area:this.area,
classCode:this.classCode,
descs:'warn_date'
}
if(type == 'descs'){
query = {
...query,
descs:'warn_date'
}
}else if(type == 'ascs'){
query = {
...query,
ascs:'warn_date'
}
}
console.log('query======================>',query)
getAlarmList(query).then(res => {
this.data = res.data.data.records; this.data = res.data.data.records;
// this.page.total = res.data.data.total // this.page.total = res.data.data.total
this.page.total = res.data.data.total; this.page.total = res.data.data.total;
console.log(this.page) console.log(this.page)
this.loading = false; this.loading = false;
}); });
// this.selectionClear(); // this.selectionClear();

@ -274,7 +274,32 @@
<p style="width: 16%">报警时间</p> <p style="width: 16%">报警时间</p>
</div> </div>
<div v-if="listData.length == 0" class="noBjxx">暂无报警信息</div> <div v-if="listData.length == 0" class="noBjxx">暂无报警信息</div>
<vue-seamless-scroll <div class="warp" v-else>
<div
@click="goMonitoringFunByCode(item.classCode)"
class="item flex-center"
v-for="(item, index) in listData"
:key="'warnlist_' + index"
>
<div class="left">
{{ item.warnType == 1 ? "事件告警" : "设备告警" }}
</div>
<span class="data">{{ getNameByClassCode(item.classCode) }}</span>
<span class="data">{{ item.equipName }}</span>
<span class="data" style="width:19%">{{ item.location }}</span>
<span
class="data"
v-text="item.warnContent"
:title="item.warnContent"
></span>
<div class="data">
<p class="text-overflow" :title="item.warnDate">
{{ item.warnDate }}
</p>
</div>
</div>
</div>
<!-- <vue-seamless-scroll
v-else v-else
:class-option="classOption" :class-option="classOption"
:data="listData" :data="listData"
@ -303,7 +328,7 @@
</p> </p>
</div> </div>
</div> </div>
</vue-seamless-scroll> </vue-seamless-scroll> -->
</div> </div>
</div> </div>
<!-- 右侧 --> <!-- 右侧 -->
@ -2014,7 +2039,8 @@ export default {
.warp { .warp {
height: 136px; height: 136px;
margin: 0 35px; margin: 0 35px;
overflow: hidden; // overflow: hidden;
overflow: auto;
.item { .item {
height: 34px; height: 34px;

Loading…
Cancel
Save