This commit is contained in:
给我
2026-04-10 17:10:36 +08:00
parent 368ed7897b
commit ef83eeb5fe
767 changed files with 167713 additions and 0 deletions

View File

@ -0,0 +1,86 @@
<template>
<div style="padding-top: 14vw">
<TopNav navTitle="警情详情" :showRight="false" :showLeft="true" />
<div class="ry_info">
<List :item="jqDetail" v-if="jqDetail" />
</div>
<Steps :data="stepsData">
<template v-slot:default="{ scope }">
<div class="content">
<div class="cont_l">
<div class="text title">{{ scope.content }}</div>
<div class="text">执行人:{{ scope.cjPoliceName }}</div>
<div class="text">执行部门:{{ scope.cjOrgName }}</div>
<div class="text">状态:{{ scope.statusName }}</div>
</div>
</div>
</template>
</Steps>
<van-empty
description="没有警情信息"
image="default"
v-if="stepsData.length <= 0 && showEmpty"
/>
</div>
</template>
<script setup>
import axios from "axios";
import List from "../../../components/xzjqList.vue";
import TopNav from "../../../components/topNav.vue";
import Steps from "../../../components/Steps.vue";
import { getJqInfo } from "../../../api/jqxx";
import { onMounted, ref } from "vue";
import { baseUrl2 } from "../../../utils/request";
const route = useRoute();
const jqDetail = ref();
const stepsData = ref([]);
const showEmpty = ref(false);
onMounted(() => {
jqDetail.value = JSON.parse(route.query.item);
_getCjList(jqDetail.value.incidentCode);
});
//获取处警记录
function _getCjList(incidentCode) {
axios
.get(`${baseUrl2}/xz1Api/api/alarm/cj/${incidentCode}`, {})
.then((res) => {
if (res.data && res.data.data.length > 0) {
for (let i = 0; i < res.data.data.length; i++) {
let item = res.data.data[i];
item.time = item.cjTime.substring(0, item.cjTime.length - 3);
}
res.data.data.sort(
(a, b) => new Date(b.time).getTime() - new Date(a.time).getTime()
);
stepsData.value = res.data.data;
} else {
showEmpty.value = true;
}
})
.catch((err) => {
showEmpty.value = true;
});
}
</script>
<style lang="scss" scoped>
@import "../../../assets/styles/mixin.scss";
.ry_info {
margin: 2vw 3vw;
border-radius: 2vw;
@include jrtz_fill_color($jrtz-fill-color-theme);
}
.content {
display: flex;
padding-bottom: 20px;
.cont_l {
margin-right: 16px;
.text {
line-height: 5.5vw;
}
.title {
@include font_size($font_medium);
font-weight: 550;
}
}
}
</style>

View File

@ -0,0 +1,178 @@
<template>
<div>
<TopNav navTitle="警情列表" :showRight="false" :showLeft="true" />
<van-sticky>
<div class="sticky_box">
<Tabs :status="status" @TabsItem="onSelect" :key="tabsIndex"></Tabs>
<Search
placeholder="请输入关键字"
v-model="kwd"
:isSx="true"
@update:sx="showPopup = !showPopup"
@update:modelValue="onSearch"
></Search>
</div>
</van-sticky>
<SxPopup
:showPopup="showPopup"
:list="yjxx.sxList"
:p_top="145"
@update:close="showPopup = false"
@update:onConfirm="onConfirm"
/>
<van-pull-refresh v-model="loadingPull" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text=" "
@load="onLoad"
offset="3"
:immediate-check="false"
>
<List
v-for="(item, index) in yjxx.list"
:key="index"
:item="item"
path="/newTwoHome/jq/xzjqDetail"
/>
<van-empty
description="没有警情信息"
image="default"
v-if="yjxx.list.length <= 0 && showEmpty"
/>
</van-list>
</van-pull-refresh>
</div>
</template>
<script>
export default {
name: "newTwoHome/jq/xzjqlist",
};
</script>
<script setup>
import axios from "axios";
import { baseUrl2 } from "../../../utils/request";
import TopNav from "../../../components/topNav.vue";
import Search from "../../../components/search.vue";
import Tabs from "../../../components/tabs/tabs.vue";
import SxPopup from "../../../components/SxPopup.vue";
import List from "../../../components/xzjqList.vue";
import { setTimeQuantum, dateFormat } from "../../../utils/tools.js";
import { getDictList, setDict } from "../../../utils/dict";
import { ref, reactive, onMounted, watch, onActivated } from "vue";
import { getJqList, getStatistics } from "../../../api/jqxx";
import { useRoute, onBeforeRouteLeave } from "vue-router";
import router from "../../../router";
const status = ref(1);
const showEmpty = ref(false);
const loading = ref(false);
const total = ref(0);
const tabsIndex = ref(1);
const params = ref({
pageNum: 1,
pageSize: 20,
bjnr: "",
endTime: dateFormat(),
startTime: dateFormat("z"),
});
const yjxx = reactive({
sxList: [setTimeQuantum()], //筛选条件数据
list: [], //预警列表数据,
});
const kwd = ref("");
const finished = ref(false);
const loadingPull = ref(false);
const showPopup = ref(false); //筛选弹窗
onMounted(() => {
if (useRoute().query.status) {
status.value = useRoute().query.status;
onSelect();
}
});
//下拉刷新
function onRefresh() {
yjxx.list = [];
tabsIndex.value++;
params.value.pageNum = 1;
params.value.bjnr = "";
params.value.endTime = dateFormat();
params.value.startTime = dateFormat("z");
onSelect();
}
//触底加载
function onLoad() {
if (params.value.pageNum >= total.value) {
finished.value = true;
} else {
params.value.pageNum++;
onSelect();
}
}
/**
* tab选择
* @param {Object} val
*/
function onSelect(val) {
if (val || val == 0) {
status.value = val + 1;
yjxx.list = [];
params.value.pageNum = 1;
params.value.bjnr = "";
finished.value = false;
}
loading.value = true;
let data = {
orgId: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0]
.deptCode,
startTime: `${params.value.startTime} 16:00:00`,
endTime: `${params.value.endTime} 16:00:00`,
type: status.value,
keyword: params.value.bjnr,
currPage: params.value.pageNum,
pageSize: params.value.pageSize,
};
axios
.post(`${baseUrl2}/xz1Api/api/alarm/list `, data)
.then((res) => {
loading.value = false;
loadingPull.value = false;
if (res.data && res.data.data.list.length > 0) {
yjxx.list = [...res.data.data.list, ...yjxx.list];
total.value = res.data.data.totalPage;
} else {
showEmpty.value = true;
}
})
.catch((err) => {
loading.value = false;
showEmpty.value = true;
});
}
/**
* 关键字搜索
* @param {Object} val
*/
function onSearch(val) {
yjxx.list = [];
params.value.endTime = dateFormat();
params.value.startTime = dateFormat("z");
params.value.pageNum = 1;
params.value.bjnr = val;
finished.value = false;
onSelect();
}
function onConfirm(val) {
yjxx.list = [];
params.value.startTime = `${val.startTime}`;
params.value.endTime = `${val.endTime}`;
showPopup.value = false;
params.value.pageNum = 1;
params.value.bjnr = "";
finished.value = false;
onSelect();
}
</script>
<style>
</style>

View File

@ -0,0 +1,222 @@
<template>
<div>
<TopNav navTitle="警情列表" :showRight="false" :showLeft="true" />
<van-sticky>
<div class="sticky_box">
<Tabs
:list="tabs"
@onYjjb="onSelect"
:type="'car'"
:key="tabsIndex"
></Tabs>
<Search
placeholder="请输入关键字"
v-model="kwd"
:isSx="true"
@update:sx="showPopup = !showPopup"
@update:modelValue="onSearch"
></Search>
</div>
</van-sticky>
<SxPopup
:showPopup="showPopup"
:list="yjxx.sxList"
:p_top="145"
@update:close="showPopup = false"
@update:onConfirm="onConfirm"
/>
<van-pull-refresh v-model="loadingPull" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text=" "
@load="onLoad"
offset="3"
:immediate-check="false"
>
<List
v-for="(item, index) in yjxx.list"
:key="index"
:item="item"
path="/yyzx/jqxx/jqDetail"
/>
<van-empty
description="没有警情信息"
image="default"
v-if="yjxx.list.length <= 0 && showEmpty"
/>
</van-list>
</van-pull-refresh>
</div>
</template>
<script setup>
import TopNav from "../../../components/topNav.vue";
import Search from "../../../components/search.vue";
import Tabs from "../../../components/tabs.vue";
import SxPopup from "../../../components/SxPopup.vue";
import List from "../../../components/JqList.vue";
import { setTimeQuantum, dateFormat } from "../../../utils/tools.js";
import { getDictList, setDict } from "../../../utils/dict";
import { ref, reactive, onMounted, watch } from "vue";
import { getJqList, getStatistics } from "../../../api/jqxx";
const tabs = ref([
{
name: "全部警情",
value: null,
count: 0,
},
{
name: "刑事警情",
value: 1,
count: 0,
},
{
name: "行政警情",
value: 2,
count: 0,
},
{
name: "交通警情",
value: 3,
count: 0,
},
{
name: "其他",
value: 4,
count: 0,
},
]);
const yjxx = reactive({
sxList: [setTimeQuantum()], //筛选条件数据
list: [], //预警列表数据,
total: 0,
});
const params = ref({
pageNum: 1,
pageSize: 20,
bjnr: "",
bjlb: "",
endTime: dateFormat(),
startTime: dateFormat(),
});
const tabsIndex = ref(1);
const kwd = ref("");
const finished = ref(false);
const loading = ref(false);
const loadingPull = ref(false);
const showEmpty = ref(false);
const showPopup = ref(false); //筛选弹窗
//下拉刷新
function onRefresh() {
tabsIndex.value++;
yjxx.list = [];
params.value.pageNum = 1;
params.value.bjnr = "";
params.value.bjlb = "";
params.value.endTime = "";
params.value.startTime = "";
getList();
getJqtj();
}
//获取警情列表
function getList() {
loading.value = true;
getJqList(params.value)
.then((res) => {
loading.value = false;
loadingPull.value = false;
if (res.records && res.records.length > 0) {
yjxx.list = res.records;
} else {
showEmpty.value = true;
}
yjxx.total = res.total;
})
.catch((err) => {
loading.value = false;
showEmpty.value = true;
});
}
function onLoad() {
if (yjxx.list.length >= yjxx.total) {
finished.value = true;
} else {
params.value.pageNum++;
loading.value = true;
getJqList(params.value)
.then((res) => {
loading.value = false;
loadingPull.value = false;
yjxx.list.push(...res.records);
yjxx.total = res.total;
})
.catch((err) => {
loading.value = false;
});
}
}
//获取警情统计数据
function getJqtj() {
const data = {
endTime: params.value.endTime,
startTime: params.value.startTime,
bjnr: params.value.bjnr,
};
getStatistics(data).then((res) => {
tabs.value[0].count = res.jtCount + res.qtCount + res.xsCount + res.xzCount;
tabs.value[1].count = res.xsCount;
tabs.value[2].count = res.xzCount;
tabs.value[3].count = res.jtCount;
tabs.value[4].count = res.qtCount;
});
}
onMounted(() => {
getList();
getJqtj();
});
/**
* tab选择
* @param {Object} val
*/
function onSelect(val) {
yjxx.list = [];
params.value.bjnr = "";
params.value = {
pageNum: 1,
pageSize: 20,
endTime: params.value.endTime,
startTime: params.value.startTime,
bjlb: !val ? null : val,
};
getList();
}
/**
* 关键字搜索
* @param {Object} val
*/
function onSearch(val) {
yjxx.list = [];
params.value.bjnr = val;
params.value = {
pageNum: 1,
pageSize: 20,
endTime: "",
startTime: "",
bjlb: !val ? null : val,
};
getList();
getJqtj();
}
function onConfirm(val) {
yjxx.list = [];
params.value.startTime = val.startTime;
params.value.endTime = val.endTime;
getList();
getJqtj();
showPopup.value = false;
}
</script>
<style>
</style>