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 = (
warnType,
startDate,
endDate,
current,
size,
area,
classCode
) => {
export const getAlarmList = (query) => {
return request({
url: "/api/blade-desk/equipment/warn-his/page",
method: "get",
params: {
warnType,
startDate,
endDate,
current,
size,
area,
classCode,
},
params: query
});
};

@ -45,26 +45,57 @@ router.beforeEach((to, from, next) => {
const meta = to.meta || router.$avueRouter.meta || {};
const i18n = to.query.i18n;
if (to.query.target) {
console.log('1111111111111111111111111')
window.open(value)
} else if (meta.isTab !== false && !validatenull(value) && !validatenull(label)) {
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 || []
});
console.log('4444444444444444444444444444',to,from)
if(from.path.indexOf('/garden/index') != -1){
if(to.path.indexOf('sourceAnaly/index') == -1){
console.log('2222222222222222222222222222222222')
const routerUrl = router.resolve({ path: to.path, query: to.query,params:to.params });
window.open(routerUrl.href,'_blank')
}else{
console.log('333333333333333333333333333333333')
next()
}
}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{
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 || []
// });
}
}
}
} else {
//判断是否需要认证,没有登录访问去登录页

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

@ -40,7 +40,7 @@
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel"
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
@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">
<el-select v-model="area">
<el-option label="业务区" value="1"></el-option>
@ -304,10 +304,17 @@
this.routeName = this.$route.name
},
methods: {
sortChange(val){
if(val.order == 'ascending'){
this.onLoad('ascs')
}else if(val.order == 'descending'){
this.onLoad('descs')
}
},
nodeClick(data){
this.classCode = data.key;
this.page.currentPage = 1;
this.onLoad(this.page)
this.onLoad()
},
initData() {
@ -392,7 +399,7 @@
this.$refs.crud.refreshTable();
this.$refs.crud.toggleSelection();
//
this.onLoad(this.page);
this.onLoad();
this.$message({
type: "success",
message: "操作成功!"
@ -404,7 +411,7 @@
this.query.area = '1';
this.startDate = '';
this.page.currentPage = 1
this.onLoad(this.page);
this.onLoad();
},
searchChange(params, done) {
this.query.warnType = params.warnType;
@ -446,17 +453,38 @@
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
this.onLoad();
},
onLoad() {
onLoad(type) {
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.page.total = res.data.data.total
this.page.total = res.data.data.total;
console.log(this.page)
this.loading = false;
});
// this.selectionClear();

@ -274,7 +274,32 @@
<p style="width: 16%">报警时间</p>
</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
:class-option="classOption"
:data="listData"
@ -303,7 +328,7 @@
</p>
</div>
</div>
</vue-seamless-scroll>
</vue-seamless-scroll> -->
</div>
</div>
<!-- 右侧 -->
@ -2014,7 +2039,8 @@ export default {
.warp {
height: 136px;
margin: 0 35px;
overflow: hidden;
// overflow: hidden;
overflow: auto;
.item {
height: 34px;

Loading…
Cancel
Save