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

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

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

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

@ -2,18 +2,33 @@
<div class="event-box"> <div class="event-box">
<div class="event-background"></div> <div class="event-background"></div>
<div class="event-right"> <div class="event-right">
<div class="msgType">群体事件</div> <div class="msgType">{{ eventInfo.msgTypeName }}</div>
<div class="msgContent">四季花园业主反映道路噪声问题</div> <div class="msgContent">{{ eventInfo.title }}</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { limitOneMsg } from "@/api/eventPage/index"
export default { export default {
data() { data() {
return { return {
eventInfo:{},
} }
}, },
mounted(){
this.getLimitOneMsg();
//
setInterval(()=>{
this.getLimitOneMsg();
},60000)
},
methods:{ methods:{
//
getLimitOneMsg(){
limitOneMsg().then(res=>{
this.eventInfo = res.data
})
},
}, },
} }
</script> </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 router from './router'
import store from './store' import store from './store'
import { Message } from 'element-ui' 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 @click="toDetail(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
查看详情 查看详情
</el-button> </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>
<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> </el-button>
</div> </div>
@ -129,20 +129,20 @@ export default {
similarEventsPage(id).then(res=>{ similarEventsPage(id).then(res=>{
console.log(res); console.log(res);
this.tableData = [...res.data]; this.tableData = [...res.data];
// if(this.multipleSelection.length > 0) { if(this.multipleSelection.length > 0) {
// this.tableData.map(item=>{ this.tableData.map(item=>{
// this.multipleSelection.map(itemTwo=>{ this.multipleSelection.map(itemTwo=>{
// if(item.targetId = itemTwo) { if(item.targetId = itemTwo) {
// this.$set(item, 'showTags', true); this.$set(item, 'showTags', true);
// } }
// }) })
// }) })
// } else { } else {
// this.tableData.map(item=>{ this.tableData.map(item=>{
// // item.showTags = true; // item.showTags = true;
// this.$set(item, 'showTags', false); this.$set(item, 'showTags', false);
// }) })
// } }
this.loading = false; this.loading = false;
}).catch(err=>{ }).catch(err=>{
this.loading = false; this.loading = false;
@ -153,14 +153,14 @@ export default {
// //
sign(row){ sign(row){
this.tableData.map(item=>{ this.tableData.map(item=>{
if(item.targetId == row.targetId) { if(item.resultId == row.resultId) {
item.isReport = !item.isReport; item.showTags = !item.showTags;
// console.log(item.showTags,"item.showTags"); // console.log(item.showTags,"item.showTags");
if(item.isReport) { if(item.showTags) {
this.multipleSelection.push(row.targetId) this.multipleSelection.push(row.resultId)
} else { } else {
this.multipleSelection = this.multipleSelection.filter(itemTwo => itemTwo !== row.targetId); this.multipleSelection = this.multipleSelection.filter(itemTwo => itemTwo !== row.resultId);
} }
} }
}) })

@ -39,6 +39,13 @@
</div> </div>
<el-button size="mini" @click="innerVisible = true"><img src="@/assets/images/changeTitle.png" alt=""> 查看标题</el-button> <el-button size="mini" @click="innerVisible = true"><img src="@/assets/images/changeTitle.png" alt=""> 查看标题</el-button>
</div> </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-items">
<div class="work-order-label"> <div class="work-order-label">
<div class="work-order-labelBox">预警因素</div> <div class="work-order-labelBox">预警因素</div>
@ -221,37 +228,32 @@ export default {
this.map.getPane("mapLayer1").style.zIndex = 501; this.map.getPane("mapLayer1").style.zIndex = 501;
this.map.getPane("mapLayer1").style.pointerEvents = "none"; 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.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){ getList(id){
this.loading = true; this.loading = true;
auditList(id).then(res=>{ auditList(id).then(res=>{
this.audioInfo = {...res.data.records[0]}; this.audioInfo = {...res.data.records[0]};
if(this.audioInfo.caseLnglat) { 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; this.loading = false;
}).catch(err=>{ }).catch(err=>{

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

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

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

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

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

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

Loading…
Cancel
Save