接口新增参数、弹框在页面复用

Lvtianfang
吕天方 4 months ago
parent c5753c4763
commit 552c448d5c

@ -60,11 +60,19 @@ export function similarEventsPage(id){
})
}
//
// 相似事件提交重训练
export function noAccordWith(data){
return request({
url: '/earlyWarningAudit/similar/noAccordWith',
method: 'post',
data
})
}
// 取最新一条事件(预警钟)
export function limitOneMsg(){
return request({
url: '/earlyWarningAudit/massEvents/limitOneMsg',
method: 'get',
})
}

@ -610,7 +610,8 @@
color: #F59A23;
}
.zhongdian{
background: rgba(162,75,243,0.1);
color: #a24bf3;
}
.yiren{
color: #F954A5;

@ -2,18 +2,33 @@
<div class="event-box">
<div class="event-background"></div>
<div class="event-right">
<div class="msgType">群体事件</div>
<div class="msgContent">四季花园业主反映道路噪声问题</div>
<div class="msgType">{{ eventInfo.msgTypeName }}</div>
<div class="msgContent">{{ eventInfo.title }}</div>
</div>
</div>
</template>
<script>
import { limitOneMsg } from "@/api/eventPage/index"
export default {
data() {
return {
eventInfo:{},
}
},
mounted(){
this.getLimitOneMsg();
//
setInterval(()=>{
this.getLimitOneMsg();
},60000)
},
methods:{
//
getLimitOneMsg(){
limitOneMsg().then(res=>{
this.eventInfo = res.data
})
},
},
}
</script>

@ -1,11 +1,3 @@
/*
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2024-01-25 11:41:56
* @LastEditors: JC9527
* @LastEditTime: 2024-09-02 11:09:54
*/
import router from './router'
import store from './store'
import { Message } from 'element-ui'

@ -65,10 +65,10 @@
<el-button @click="toDetail(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
查看详情
</el-button>
<el-button @click="sign(scope.row)" type="text" style="color: #D9001B;" v-if="auditStatus == 1 && !scope.row.isReport">
<el-button @click="sign(scope.row)" type="text" style="color: #D9001B;" v-if="auditStatus == 1 && !scope.row.showTags">
不符合
</el-button>
<el-button @click="unmark(scope.row)" type="text" style="color: #D9001B;" v-if="auditStatus == 1 && scope.row.isReport">
<el-button @click="sign(scope.row)" type="text" style="color: #D9001B;" v-if="auditStatus == 1 && scope.row.showTags">
已标记不符合
</el-button>
</div>
@ -129,20 +129,20 @@ export default {
similarEventsPage(id).then(res=>{
console.log(res);
this.tableData = [...res.data];
// if(this.multipleSelection.length > 0) {
// this.tableData.map(item=>{
// this.multipleSelection.map(itemTwo=>{
// if(item.targetId = itemTwo) {
// this.$set(item, 'showTags', true);
// }
// })
// })
// } else {
// this.tableData.map(item=>{
// // item.showTags = true;
// this.$set(item, 'showTags', false);
// })
// }
if(this.multipleSelection.length > 0) {
this.tableData.map(item=>{
this.multipleSelection.map(itemTwo=>{
if(item.targetId = itemTwo) {
this.$set(item, 'showTags', true);
}
})
})
} else {
this.tableData.map(item=>{
// item.showTags = true;
this.$set(item, 'showTags', false);
})
}
this.loading = false;
}).catch(err=>{
this.loading = false;
@ -153,14 +153,14 @@ export default {
//
sign(row){
this.tableData.map(item=>{
if(item.targetId == row.targetId) {
item.isReport = !item.isReport;
if(item.resultId == row.resultId) {
item.showTags = !item.showTags;
// console.log(item.showTags,"item.showTags");
if(item.isReport) {
this.multipleSelection.push(row.targetId)
if(item.showTags) {
this.multipleSelection.push(row.resultId)
} else {
this.multipleSelection = this.multipleSelection.filter(itemTwo => itemTwo !== row.targetId);
this.multipleSelection = this.multipleSelection.filter(itemTwo => itemTwo !== row.resultId);
}
}
})

@ -39,6 +39,13 @@
</div>
<el-button size="mini" @click="innerVisible = true"><img src="@/assets/images/changeTitle.png" alt=""> 查看标题</el-button>
</div>
<div class="work-order-items">
<div class="work-order-label">
<div class="work-order-labelBox">审核时间</div>
<span></span>
</div>
<div class="work-order-value">{{ eventInfo.auditTime }}</div>
</div>
<div class="work-order-items">
<div class="work-order-label">
<div class="work-order-labelBox">预警因素</div>
@ -221,37 +228,32 @@ export default {
this.map.getPane("mapLayer1").style.zIndex = 501;
this.map.getPane("mapLayer1").style.pointerEvents = "none";
// this.map.createPane("mapLayer2");
// this.map.getPane("mapLayer2").style.zIndex = 501;
// this.map.getPane("mapLayer2").style.pointerEvents = "none";
// this.map.createPane("mapLayer3");
// this.map.getPane("mapLayer3").style.zIndex = 501;
// this.map.getPane("mapLayer3").style.pointerEvents = "none";
// this.map.createPane("mapLayer4");
// this.map.getPane("mapLayer4").style.zIndex = 501;
// this.map.getPane("mapLayer4").style.pointerEvents = "none";
// this.map.createPane("mapLayer5");
// this.map.getPane("mapLayer5").style.zIndex = 501;
// this.map.getPane("mapLayer5").style.pointerEvents = "none";
this.mapLayers.mapLayer1 = L.featureGroup().addTo(this.map);
// this.mapLayers.mapLayer2 = L.featureGroup().addTo(this.map);
// this.mapLayers.mapLayer3 = L.featureGroup().addTo(this.map);
// this.mapLayers.mapLayer4 = L.featureGroup().addTo(this.map);
// this.mapLayers.mapLayer5 = L.featureGroup().addTo(this.map);
// this.getPosition();
},
getList(id){
this.loading = true;
auditList(id).then(res=>{
this.audioInfo = {...res.data.records[0]};
if(this.audioInfo.caseLnglat) {
let iconUrl2 = require("@/assets/images/icon2.png");
//
var myIcon2 = L.icon({
iconUrl: iconUrl2,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
let lat = this.audioInfo.caseLnglat.split(",")[1];
let lon = this.audioInfo.caseLnglat.split(",")[0];
let marker = L.marker(
L.latLng(lat, lon),
{ icon: myIcon2 }
)
// .addTo(this.mapLayers.mapLayer1)
this.mapLayers.mapLayer1.addLayer(marker);
const bounds = this.mapLayers.mapLayer1.getBounds();
let center = bounds.getCenter();
this.map.setView(center, 12);
}
this.loading = false;
}).catch(err=>{

@ -20,7 +20,7 @@
<div class="content">
<div class="content-top">
<img src="@/assets/images/address.png" alt="">
<span>{{ item.title }}</span>
<span>{{ item.warnFactor }}</span>
</div>
<div class="content-bottom">
<img src="@/assets/images/time.png" alt="">
@ -28,11 +28,11 @@
</div>
</div>
<div class="foot">
<el-button v-if="index == 1" type="primary" size="mini" @click="audit"></el-button>
<el-button v-if="!item.isReport" type="primary" size="mini" @click="audit(item)"></el-button>
<div v-else class="eventInfo">
<div class="audit" @click="auditPass"></div>
<span></span>
<div class="info" @click="detailInfo"></div>
<div class="info" @click="detailInfo(item)"></div>
</div>
</div>
</div>
@ -60,6 +60,8 @@
</div>
</div>
<div id="newmap" v-loading="mapLoading"></div>
<event-audit title="事件审核" ref="eventAudit" :auditStatus="1" @closeDialog="getList"></event-audit>
<urgency-audit title="工单审核" ref="urgencyAudit" :auditStatus="auditStatus" @closeDialog="getList"></urgency-audit>
</div>
</template>
<script>
@ -71,7 +73,13 @@ import "proj4leaflet";
import "@/utils/lib/leaflet.ChineseTmsProviders.js";
import "@/utils/lib/leaflet.mapCorrection.min.js";
import { new100Page, colonyPage } from "@/api/eventPage"
import urgencyAudit from '@/views/components/urgencyAudit.vue'
import EventAudit from '@/views/components/eventAudit.vue'
export default {
components:{
EventAudit,
urgencyAudit
},
data() {
return {
input:"",
@ -120,6 +128,7 @@ export default {
mapLayer4: null,
mapLayer5: null,
},
auditStatus: 1,
}
},
mounted() {
@ -331,11 +340,18 @@ export default {
});
//
document.querySelector(`#markerAudit` + index).addEventListener("click", function () {
if(item.msgType == '3') {
that.auditStatus = 1;
that.$refs.urgencyAudit.open(item);
} else {
// console.log(item);
that.$refs.eventAudit.open(item);
}
});
//
document.querySelector(`#markerInfo` + index).addEventListener("click", function () {
that.auditStatus = 2;
that.$refs.urgencyAudit.open(item);
});
})
},
@ -346,16 +362,22 @@ export default {
this.getList();
},
//
audit(){
audit(item){
if(item.msgType == '3') {
this.auditStatus = 1;
this.$refs.urgencyAudit.open(item);
} else {
this.$refs.eventAudit.open(item);
}
},
//
auditPass(){
},
//
detailInfo(){
detailInfo(item){
this.auditStatus = 2;
this.$refs.urgencyAudit.open(item);
},
},
}

@ -121,6 +121,7 @@ export default {
}
},
mounted(){
this.pagination.toBeReviewed = 0;
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
@ -132,14 +133,27 @@ export default {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.pagination.toBeReviewed = 0;
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
}
@ -174,8 +188,8 @@ export default {
}
this.getList();
},
//
handleQuery(){
console.log(this.formInline);
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]

@ -121,6 +121,7 @@ export default {
}
},
mounted(){
this.pagination.toBeReviewed = 0;
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
@ -133,14 +134,27 @@ export default {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null;
this.pagination.toBeReviewed = 0;
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1;
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2;
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
}
@ -175,8 +189,8 @@ export default {
}
this.getList();
},
//
handleQuery(){
console.log(this.formInline);
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]

@ -121,6 +121,7 @@ export default {
}
},
mounted(){
this.pagination.toBeReviewed = 0;
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
@ -132,14 +133,27 @@ export default {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.pagination.toBeReviewed = 0;
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
}
@ -174,8 +188,8 @@ export default {
}
this.getList();
},
//
handleQuery(){
console.log(this.formInline);
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]

@ -121,6 +121,7 @@ export default {
}
},
mounted(){
this.pagination.toBeReviewed = 0;
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
@ -132,14 +133,27 @@ export default {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.pagination.toBeReviewed = 0;
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
}
@ -174,8 +188,8 @@ export default {
}
this.getList();
},
//
handleQuery(){
console.log(this.formInline);
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]

@ -121,6 +121,7 @@ export default {
}
},
mounted(){
this.pagination.toBeReviewed = 0;
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
@ -132,14 +133,29 @@ export default {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.pagination.toBeReviewed = 0;
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.toBeReviewed = null;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
this.formInline.title = "";
this.formInline.time = [];
this.auditStatus = 2;
this.auditStatus = 2;
this.getList();
}
@ -174,8 +190,8 @@ export default {
}
this.getList();
},
//
handleQuery(){
console.log(this.formInline);
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]

Loading…
Cancel
Save