删除多余文件
This commit is contained in:
@ -1,124 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box" @click="onGoDetail">
|
||||
<div class="time_box">
|
||||
<span class="title bule" :style="{ color: item.bjlb == '01000000' ? 'red' : '' }">{{
|
||||
item.bjlbmc +
|
||||
" — " +
|
||||
item.bjlxmc +
|
||||
(item.bjxlmc ? " — " + item.bjxlmc : "")
|
||||
}}</span>
|
||||
<span>{{ item.bjsj }}</span>
|
||||
</div>
|
||||
<span> </span>
|
||||
<!-- <span v-if="item.jqjb">
|
||||
<van-tag
|
||||
type="warning"
|
||||
style="padding: 0.3vw 5vw; border-radius: 3vw"
|
||||
v-if="item.jqjb == 1"
|
||||
>一级警情</van-tag
|
||||
>
|
||||
<van-tag
|
||||
type="warning"
|
||||
style="padding: 0.3vw 5vw; border-radius: 3vw"
|
||||
v-else-if="item.jqjb == 2"
|
||||
>二级警情
|
||||
</van-tag>
|
||||
<van-tag
|
||||
type="primary"
|
||||
style="padding: 0.3vw 5vw; border-radius: 3vw"
|
||||
v-else-if="item.jqjb == 3"
|
||||
>三级警情
|
||||
</van-tag>
|
||||
<van-tag
|
||||
type="success"
|
||||
style="padding: 0.3vw 5vw; border-radius: 3vw"
|
||||
v-else-if="item.jqjb == 4"
|
||||
>四级警情
|
||||
</van-tag>
|
||||
</span> -->
|
||||
<div class="title">{{ item.jqnr }}</div>
|
||||
<div class="item">
|
||||
<span class="address_box">位置</span>
|
||||
<span> {{ item.sfdz }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span>
|
||||
报警人:{{ item.bjrXm }}(<span style="color: #3e6ee8">{{
|
||||
item.bjdh
|
||||
}}</span>)
|
||||
</span>
|
||||
<span class="jjy_box">接警员:{{ item.jjyxm }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
报警内容:<span class="bjnr">{{ item.bjnr }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { defineProps, ref } from "vue";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: { type: String, default: false }, //跳转详情的路由
|
||||
});
|
||||
//跳转
|
||||
function onGoDetail() {
|
||||
if (!props.path) {
|
||||
return false;
|
||||
}
|
||||
router.push({ path: props.path, query: { id: props.item.id } });
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
// margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 3vw;
|
||||
margin-bottom: 1.5vw;
|
||||
background: #f6f8fd;
|
||||
|
||||
// @include item_bottom_color($bottom-border-top-clore-theme);
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
|
||||
.list_box:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.jjy_box {
|
||||
display: inline-block;
|
||||
margin-left: 5vw;
|
||||
}
|
||||
|
||||
.bjnr {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.address_box {
|
||||
background: #3bc2b5;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
padding: 0 8px;
|
||||
border-radius: 10px;
|
||||
height: 17px;
|
||||
line-height: 18.5px;
|
||||
}
|
||||
</style>
|
||||
@ -1,136 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box">
|
||||
<div class="time_box">
|
||||
<span>
|
||||
<van-icon name="clock-o" />
|
||||
 {{ item.pcsj }}
|
||||
</span>
|
||||
<span v-if="item.pcclJg">
|
||||
<van-tag type="danger" style="padding: 0.3vw 5vw; border-radius: 3vw" v-if="item.pcclJg == '9'">盘查</van-tag>
|
||||
<van-tag type="warning" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else-if="item.pcclJg == '2'">移交
|
||||
</van-tag>
|
||||
<van-tag color="#ffcc40" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else-if="item.pcclJg == '1'">放行
|
||||
</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<div class="detail_box">
|
||||
<van-image width="80px" :src="baseUrl" @click="onClickImg(baseUrl)" style="flex: 1" v-if="baseUrl && item.sfzh">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="detail_item">
|
||||
<div class="item user_info">
|
||||
<span v-if="item.yjClcph">{{ item.yjClcph }}</span>
|
||||
<span>{{ item.xm }}</span>
|
||||
<span v-if="item.mz">{{ item.mz }}</span>
|
||||
<span>{{ item.sfzh }}</span>
|
||||
</div>
|
||||
<div class="item" v-if="item.bqmc || item.bqxxsj">
|
||||
<van-tag type="primary" style="padding: 0 2vw; margin-right: 2vw" plain>
|
||||
{{ item.bqmc == "" ? "无标签人员" : item.bqxxsj }}
|
||||
</van-tag>
|
||||
</div>
|
||||
<div class="item">{{ item.pcmjXm }}</div>
|
||||
<div class="item">管辖派出所:{{ item.ssbm }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { getBase64 } from "../utils/tools.js";
|
||||
import { defineProps, ref, watch } from "vue";
|
||||
import { getDictList, setDict } from "../utils/dict";
|
||||
import { ImagePreview } from "vant";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
dict: {
|
||||
type: Object,
|
||||
default: {
|
||||
D_BZ_YJLX: [],
|
||||
D_BZ_TYJB: [],
|
||||
D_BZ_PCCLJG: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
const baseUrl = ref("");
|
||||
watch(
|
||||
() => props.item,
|
||||
(newValue) => {
|
||||
if (Object.keys(newValue).length > 0) _getBase64(newValue);
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
//预览图片
|
||||
function onClickImg(url) {
|
||||
ImagePreview([url]);
|
||||
}
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
baseUrl.value = res;
|
||||
}, `http://10.64.201.128:2366/xlpcAdminNew/requestservice/czrk/ryxp.jpg?sfzh=${item.sfzh}`);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 1vw;
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.count_size {
|
||||
font-size: 5vw;
|
||||
display: inline-block;
|
||||
margin: 0 1vw;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list_box:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
margin-top: 1vw;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.detail_item {
|
||||
flex: 3.5;
|
||||
margin-left: 2vw;
|
||||
|
||||
.user_info {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
color: #507ce9;
|
||||
|
||||
&>span {
|
||||
display: inline-block;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-image__img {
|
||||
height: auto;
|
||||
max-height: 101px;
|
||||
}
|
||||
</style>
|
||||
@ -1,537 +0,0 @@
|
||||
<template>
|
||||
<van-popup v-model:show="props.show" style="width: 90%">
|
||||
<div class="popupTitle">{{ popupTitle }}</div>
|
||||
<van-tabs v-model:active="active" color="#3e6ee8" @change="onActive">
|
||||
<van-tab title="全部" name="2"> </van-tab>
|
||||
<van-tab title="本部门" name="1"> </van-tab>
|
||||
</van-tabs>
|
||||
<van-search v-model="kwd" :placeholder="placeholder" @search="onUpdate" @clear="onClear" />
|
||||
<!-- 智能装备筛选条件 -->
|
||||
<div v-if="popupTitle === '选择智能装备'" class="zn_tag_select">
|
||||
<van-tag type="primary" :plain="tagCode == '' ? false : true" style="margin-right: 3vw"
|
||||
@click="onClickTag('')">全部</van-tag>
|
||||
<van-tag type="primary" :plain="tagCode == '86' ? false : true" style="margin-right: 3vw"
|
||||
@click="onClickTag('86')">对讲机</van-tag>
|
||||
<van-tag type="primary" :plain="tagCode == '80' ? false : true" @click="onClickTag('80')">执法记录仪</van-tag>
|
||||
</div>
|
||||
|
||||
<div v-if="popupTitle === '选择警用器械'" class="zn_tag_select">
|
||||
全选 <span class="squre" @click="onClickTagJyqx" :class="isAllQx ? 'isActiveAll' : ''"> <van-icon v-if="isAllQx"
|
||||
color="#fff" name='success' /> </span>
|
||||
</div>
|
||||
|
||||
<div class="check-data-box" ref="listBox" :loading="loading">
|
||||
<!-- 单选 -->
|
||||
<van-radio-group v-model="radioChecked" v-if="isRadio">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="item in list.mulChooseList" clickable :key="item" :title="`${item.value}`" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio :name="item.key" @click="onRadionChange(item.key)" />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
<!-- 多选 -->
|
||||
<van-checkbox-group v-model="checkedLists" v-else @change="onCheckboxnChange">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="item in list.mulChooseList" clickable :key="item" :title="`${item.value}`">
|
||||
<template #right-icon>
|
||||
<van-checkbox shape="square" :name="item.key" />
|
||||
</template>
|
||||
<template #label v-if="title === '选择警用器械'">
|
||||
数量:
|
||||
<van-stepper v-model="item.sl" integer />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<van-empty description="没有数据" image="default" v-if="list.mulChooseList.length <= 0 && showEmpty" />
|
||||
<van-loading type="spinner" v-show="loadingShow" style="text-align: center;" />
|
||||
</div>
|
||||
<div class="popbtn-box">
|
||||
<van-button style="flex: 1" type="default" @click="onCancel">取消
|
||||
</van-button>
|
||||
<van-button style="flex: 1" type="primary" @click="onConfirm">确定</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getBBData } from "../api/xfbbAndZbbb.js";
|
||||
import { defineProps, ref, defineEmits, watch, reactive, onMounted, nextTick } from "vue";
|
||||
import { dateFormat, hintToast } from "../utils/tools";
|
||||
const props = defineProps({
|
||||
selectType: String, //查询的类型 详情见watch 监听
|
||||
bclx: String, //勤务班次类型
|
||||
dwlx: String, // 快反点/检查站 类型 01快反点 02检查站
|
||||
show: Boolean, //是否显示
|
||||
checkedList: Array, //默认选中 多选
|
||||
checked: String, //单选
|
||||
xfqSx:String,//巡防区属性 01.基本巡区 02.叠加巡区 03.护校巡区")
|
||||
});
|
||||
const emits = defineEmits([
|
||||
"update:cancel",
|
||||
"update:confirm",
|
||||
"update:kwd",
|
||||
"update:tabs",
|
||||
"update:tag",
|
||||
]);
|
||||
const loadingShow=ref(false)
|
||||
const hasChoosZb = ref([])
|
||||
const isAllQx = ref(false)
|
||||
const listBox = ref(null)
|
||||
const page = ref(1);
|
||||
const size = ref(10);
|
||||
const total = ref(0);
|
||||
const radioChecked = ref("");
|
||||
const checkedLists = ref([]);
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const selectedPageLast = ref([]) //上一次当前页面选中
|
||||
const selectObj = ref([]); //选中的数据
|
||||
const active = ref(0); //默认的TBS 选择
|
||||
const tagCode = ref(""); //智能设备选中状态
|
||||
const placeholder = ref(""); //占位字符
|
||||
const showEmpty = ref(false);
|
||||
const isUserDept = ref(2); //是否是用户本部门
|
||||
const kwd = ref(""); //选择器关键字
|
||||
const selectIndex = ref(1); //选择器组件KEY
|
||||
const selectType = ref(""); //选择的类型
|
||||
const znzbCode = ref(""); //智能装备类型筛选
|
||||
const popupTitle = ref(""); //标题
|
||||
const isRadio = ref(false); //是否是单选
|
||||
const list = reactive({
|
||||
jzList: [],
|
||||
fzrList: [],
|
||||
fjList: [],
|
||||
zbList: [],
|
||||
jyqxList: [],
|
||||
clList: [],
|
||||
mulChooseList: [],
|
||||
xfqList: [],
|
||||
kfdList: [],
|
||||
bcList: [],
|
||||
});
|
||||
const isFirst = ref(true)
|
||||
const listData = ref([]) //缓存列表数据
|
||||
watch(
|
||||
() => props.selectType,
|
||||
(newValue) => {
|
||||
checkedLists.value = props.checkedList;
|
||||
selectedPageLast.value = props.checkedList
|
||||
radioChecked.value = props.checked;
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
onMounted(() => {
|
||||
scroll()
|
||||
})
|
||||
|
||||
//触底加载
|
||||
function scroll() {
|
||||
let scrollTargetBox = listBox.value;
|
||||
if (!scrollTargetBox) return false;
|
||||
scrollTargetBox.onscroll = (e) => {
|
||||
var scrollHeight = scrollTargetBox.scrollHeight; //251
|
||||
var scrollTop = scrollTargetBox.scrollTop; //0-18
|
||||
var clientHeight = scrollTargetBox.clientHeight; //233
|
||||
if (scrollHeight - clientHeight == Math.ceil(scrollTop)) {
|
||||
//滚动条滚到最底部
|
||||
if (list.mulChooseList.length < total.value) {
|
||||
loadingShow.value=true;
|
||||
page.value++;
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//tabs筛选
|
||||
function onActive(val) {
|
||||
isUserDept.value = val;
|
||||
list.mulChooseList = [];
|
||||
page.value = 1;
|
||||
total.value = 0;
|
||||
selectedPageLast.value = []
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
//获取数据
|
||||
function _getSelectData(val) {
|
||||
let obj = {}; //亲求路径及参数
|
||||
switch (val) {
|
||||
case "xz":
|
||||
popupTitle.value = "选择巡组";
|
||||
placeholder.value = "请输入巡组名称";
|
||||
obj["url"] = "/mosty-qwzx/tbQwXfbb/selectJmxz";
|
||||
obj["xz"] = "xz";
|
||||
isRadio.value = false;
|
||||
break;
|
||||
case "kfd":
|
||||
popupTitle.value = "选择快反点";
|
||||
placeholder.value = "请输入快反点名称或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tpJcglKfd/getKfdList";
|
||||
isRadio.value = true;
|
||||
break;
|
||||
case "jcz":
|
||||
popupTitle.value = "选择警务站";
|
||||
placeholder.value = "请输入警务站名称或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tpJcglKfd/getKfdList";
|
||||
isRadio.value = true;
|
||||
break;
|
||||
case "xfq":
|
||||
popupTitle.value = "选择巡防区";
|
||||
placeholder.value = "请输入巡防区名称或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfqy/getXfqList";
|
||||
isRadio.value = false;
|
||||
break;
|
||||
case "qwbc":
|
||||
popupTitle.value = "选择班次";
|
||||
placeholder.value = "请输入班次名称或部门名称";
|
||||
obj["url"] = "/mosty-qwzx/tbQwQwbc/getBcList";
|
||||
isRadio.value = true;
|
||||
break;
|
||||
case "fzr":
|
||||
case "mj":
|
||||
case "zbld":
|
||||
case "zhz":
|
||||
case "zzzhz":
|
||||
case "fz":
|
||||
popupTitle.value = "选择民警";
|
||||
placeholder.value = "请输入姓名或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfll/getXfllList";
|
||||
obj["jllx"] = "01";
|
||||
isRadio.value = false;
|
||||
if (val == "fzr" || val == "zbld" || val == "zhz" || val == "zzzhz" || val == "fz") {
|
||||
isRadio.value = true;
|
||||
}
|
||||
break;
|
||||
case "fj":
|
||||
popupTitle.value = "选择辅警";
|
||||
placeholder.value = "请输入姓名或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfll/getXfllList";
|
||||
obj["jllx"] = "02";
|
||||
isRadio.value = false;
|
||||
break;
|
||||
case "zn":
|
||||
popupTitle.value = "选择智能装备";
|
||||
placeholder.value = "请输入设备名称或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tpjcglZnzb/getZnzbList";
|
||||
obj["scode"] = tagCode.value;
|
||||
isRadio.value = false;
|
||||
break;
|
||||
case "jy":
|
||||
popupTitle.value = "选择警用器械";
|
||||
placeholder.value = "请输入器械名称";
|
||||
obj["url"] = "/mosty-jcgl/tpJcglJyqx/getJyqxList";
|
||||
isRadio.value = false;
|
||||
break;
|
||||
case "cl":
|
||||
popupTitle.value = "选择巡防车辆";
|
||||
placeholder.value = "请输入车牌号或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tpJcglXfcl/selectXfclList";
|
||||
break;
|
||||
case "jz":
|
||||
popupTitle.value = "选择警组";
|
||||
placeholder.value = "请输入警组名称或部门名称";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglJz/selectJzList";
|
||||
isRadio.value = true;
|
||||
}
|
||||
if (Object.keys(obj).length > 0) _getBBData(obj, val);
|
||||
}
|
||||
//获取数据
|
||||
function _getBBData(obj, type) {
|
||||
//url 请求地址,jllx 警力类型 有需要就传,scode 智能装备筛选条件 有需要就传
|
||||
let { url, jllx, scode, xz } = obj;
|
||||
loading.value = true;
|
||||
let data = {
|
||||
type: isUserDept.value,
|
||||
keyword: kwd.value,
|
||||
bclx: props.bclx,
|
||||
dwlx: props.dwlx,
|
||||
xfqSx: props.xfqSx,
|
||||
jllx,
|
||||
scode,
|
||||
pageCurrent: page.value,
|
||||
pageSize: size.value,
|
||||
};
|
||||
getBBData(url, data).then((res) => {
|
||||
loadingShow.value=false;
|
||||
loading.value = false;
|
||||
total.value = res.total;
|
||||
if (jllx || xz) {
|
||||
if (res && res.records && res.records.length > 0) {
|
||||
_setData(res.records, type);
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
} else {
|
||||
if (res && res.length > 0) {
|
||||
_setData(res, type);
|
||||
} else if (res && res.records) {
|
||||
_setData(res.records, type);
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
}
|
||||
let dataLen = list.mulChooseList.length
|
||||
if (props.checkedList.length == dataLen && dataLen != 0 && popupTitle.value == '选择警用器械') {
|
||||
isAllQx.value = true
|
||||
} else {
|
||||
isAllQx.value = false
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
//智能装备选择
|
||||
function onClickTag(code) {
|
||||
list.mulChooseList = [];
|
||||
page.value = 1;
|
||||
total.value = 0;
|
||||
if (tagCode.value && tagCode.value == code) {
|
||||
tagCode.value = "";
|
||||
} else {
|
||||
tagCode.value = code;
|
||||
}
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
//搜索关键词
|
||||
function onUpdate(val) {
|
||||
page.value = 1;
|
||||
list.mulChooseList = [];
|
||||
selectedPageLast.value = []
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
//清空关键字
|
||||
function onClear() {
|
||||
list.mulChooseList = [];
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
//关闭弹窗
|
||||
function onCancel() {
|
||||
emits("update:cancel", false);
|
||||
}
|
||||
//点击单选
|
||||
function onRadionChange(val) {
|
||||
_backData(val);
|
||||
}
|
||||
//点击多选
|
||||
function onCheckboxnChange(val) {
|
||||
_backData(val);
|
||||
let dataLen = list.mulChooseList.length
|
||||
if (checkedLists.value.length == dataLen && dataLen != 0 && popupTitle.value == '选择警用器械') {
|
||||
isAllQx.value = true
|
||||
} else {
|
||||
isAllQx.value = false
|
||||
}
|
||||
|
||||
if (popupTitle.value === '选择智能装备') {
|
||||
let arr = []
|
||||
list.mulChooseList.forEach(item => {
|
||||
val.forEach(itChid => {
|
||||
if (item.id == itChid) arr.push(item)
|
||||
})
|
||||
})
|
||||
hasChoosZb.value = [...hasChoosZb.value, ...arr]
|
||||
}
|
||||
}
|
||||
function onClickTagJyqx() {
|
||||
isAllQx.value = !isAllQx.value
|
||||
if (isAllQx.value) {
|
||||
checkedLists.value = list.mulChooseList.map(item => { return item.id })
|
||||
} else {
|
||||
checkedLists.value = []
|
||||
}
|
||||
_backData(checkedLists.value);
|
||||
}
|
||||
//确认选择
|
||||
function onConfirm() {
|
||||
if (popupTitle.value === '选择智能装备') {
|
||||
// 去重
|
||||
let list = []
|
||||
for (let j = 0; j < checkedLists.value.length; j++) {
|
||||
let item = checkedLists.value[j]
|
||||
for (let i = 0; i < hasChoosZb.value.length; i++) {
|
||||
let itemchid = hasChoosZb.value[i]
|
||||
if (item == itemchid.id) {
|
||||
list.push(itemchid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
emits("update:confirm", list);
|
||||
} else {
|
||||
emits("update:confirm", selectObj.value);
|
||||
}
|
||||
emits("update:cancel", false);
|
||||
}
|
||||
|
||||
//处理返回父组件数据
|
||||
function _backData(val) {
|
||||
if (typeof val == "string") {
|
||||
//单选数据
|
||||
let obj = list.mulChooseList.find((item) => { return item.key == val; });
|
||||
selectObj.value = [obj];
|
||||
} else {
|
||||
//多选数据
|
||||
let arr = [];
|
||||
let lastChoose = selectedPageLast.value //上一次选中
|
||||
if (lastChoose.length > 0) {
|
||||
lastChoose.forEach(it => { //上一次
|
||||
if (!val.includes(it)) {
|
||||
selectObj.value = selectObj.value.filter(item => { return item.key != it }) // 在上一次情况下删除
|
||||
}
|
||||
val.forEach(id => { //现在选中的
|
||||
if (!lastChoose.includes(id)) arr.push(findItem(id)) //在上一次的情况下新增
|
||||
})
|
||||
})
|
||||
} else {
|
||||
val.forEach(id => { arr.push(findItem(id)) })
|
||||
}
|
||||
selectObj.value = selectObj.value.concat(arr)
|
||||
selectedPageLast.value = JSON.parse(JSON.stringify(val)); //缓存当前页面数据
|
||||
let listVrr = []
|
||||
selectObj.value.forEach(item => { if (!listVrr.includes(item) && item) listVrr.push(item) }) //去重
|
||||
selectObj.value = listVrr;
|
||||
}
|
||||
}
|
||||
|
||||
const findItem = (id) => {
|
||||
let obj = listData.value.find(v => { return v.key == id })
|
||||
return obj
|
||||
}
|
||||
|
||||
//设置数据
|
||||
function _setData(res, type) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
switch (type) {
|
||||
case "qwbc":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].bcmc}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "xfq":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].xfqMc}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "kfd":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].kfdMc}`;
|
||||
res[i].key = res[i].kfdId;
|
||||
break;
|
||||
case "jcz":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].kfdMc}`;
|
||||
res[i].key = res[i].kfdId;
|
||||
break;
|
||||
case "jz":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].jzMc}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "fzr":
|
||||
case "mj":
|
||||
case "zbld":
|
||||
case "zhz":
|
||||
case "zzzhz":
|
||||
case "fz":
|
||||
// res[i].value = `${res[i].ssbm}-${res[i].xm}`;
|
||||
res[i].value = `${res[i].xm}`;
|
||||
res[i].key = res[i].ryid;
|
||||
break;
|
||||
case "fj":
|
||||
// res[i].value = `${res[i].ssbm}-${res[i].xm}`;
|
||||
res[i].value = `${res[i].xm}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "cl":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].cph}`;
|
||||
res[i].key = res[i].cid;
|
||||
break;
|
||||
case "zn":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].sbmc}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "jy":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].qxMc}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "xz":
|
||||
res[i].value = `${res[i].jzMc || res[i].fzrXm + "组"}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
listData.value = listData.value.concat(res)
|
||||
if ((page.value == 1)) {
|
||||
list.mulChooseList = res;
|
||||
} else {
|
||||
list.mulChooseList = list.mulChooseList.concat(res);
|
||||
}
|
||||
if (isFirst.value) {
|
||||
let arr = []
|
||||
selectedPageLast.value.forEach(id => {
|
||||
arr.push(findItem(id))
|
||||
})
|
||||
selectObj.value = arr;
|
||||
isFirst.value = false
|
||||
}
|
||||
|
||||
loading.value = false;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.popupTitle {
|
||||
text-align: center;
|
||||
background-color: rgb(11, 137, 247);
|
||||
height: 6vh;
|
||||
line-height: 6vh;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.popbtn-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding-top: 2vw;
|
||||
}
|
||||
|
||||
.check-data-box {
|
||||
height: 100vw;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep .van-stepper__input {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.zn_tag_select {
|
||||
padding: 2vw 3.5vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.squre {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 4px;
|
||||
margin-left: 10px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.isActiveAll {
|
||||
background: #1989fa;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-cell {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
::v-deep .van-cell__title,
|
||||
.van-cell__value {
|
||||
margin-right: 1vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,94 +0,0 @@
|
||||
<template>
|
||||
<div class="cell_group_box">
|
||||
<van-cell v-for="(item, index) in arrayList" :key="index+props.showSfzh">
|
||||
<template #title>
|
||||
<span>{{ item[title] }} <span v-if="showSfzh == 'sfzh'">({{item[showSfzh]}})</span></span>
|
||||
</template>
|
||||
<template #value>
|
||||
<div class="ch-box">
|
||||
<van-checkbox
|
||||
@click="choose(item)"
|
||||
v-model="item.checked"
|
||||
></van-checkbox>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps, defineEmits, ref, watch, onMounted } from "vue";
|
||||
const props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "name",
|
||||
},
|
||||
showSfzh: {
|
||||
type: String,
|
||||
default: "sfzh",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:choose"]);
|
||||
const checked = ref(false);
|
||||
const arrayList = ref([]);
|
||||
onMounted(() => {
|
||||
arrayList.value = props.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
checked: false,
|
||||
};
|
||||
});
|
||||
});
|
||||
watch(
|
||||
() => props.list,
|
||||
(val) => {
|
||||
arrayList.value = props.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
checked: false,
|
||||
};
|
||||
});
|
||||
array.value.forEach((item) => {
|
||||
arrayList.value.forEach((el) => {
|
||||
if (item.id == el.id) {
|
||||
el.checked = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
const array = ref([]);
|
||||
function choose(item) {
|
||||
if (item.checked == true) {
|
||||
array.value.push(item);
|
||||
} else {
|
||||
array.value.forEach((ele, index) => {
|
||||
if (ele.id == item.id) {
|
||||
array.value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
emits("update:choose", {
|
||||
list: array.value,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cell_group_box {
|
||||
height: 35vh;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.ch-box {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
@ -1,42 +0,0 @@
|
||||
<template>
|
||||
<van-dialog v-model:show="show" :show-confirm-button="false">
|
||||
<van-datetime-picker
|
||||
v-model="presentTime"
|
||||
type="date"
|
||||
:title="title"
|
||||
@cancel="onCancel"
|
||||
@confirm="onTimeConfirm"
|
||||
></van-datetime-picker>
|
||||
</van-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, defineProps, onMounted, defineEmits, watch, computed} from "vue";
|
||||
import { dateFormat } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
timeType: String,
|
||||
});
|
||||
const emits = defineEmits(["update:time"]);
|
||||
const show = ref(true);
|
||||
const presentTime = ref(new Date()); //选择器默认时间
|
||||
|
||||
const title = computed(() => {
|
||||
if (props.timeType == 'start') {
|
||||
return '选择开始日期'
|
||||
} else if (props.timeType == 'end') {
|
||||
return '选择结束日期'
|
||||
} else {
|
||||
return props.timeType
|
||||
}
|
||||
})
|
||||
function onTimeConfirm(val) {
|
||||
emits("update:time", dateFormat("", val));
|
||||
}
|
||||
|
||||
function onCancel() {
|
||||
emits("update:cancelTime", "");
|
||||
}
|
||||
//确定选中的时间
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
</style>
|
||||
@ -1,70 +0,0 @@
|
||||
<template>
|
||||
<div class="time_box">
|
||||
<van-field
|
||||
v-model="startTimeval"
|
||||
label-width="60px"
|
||||
placeholder="开始日期"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
readonly
|
||||
@click.stop="onClickTime('start')"
|
||||
></van-field>
|
||||
<div class="relevance">至</div>
|
||||
<van-field
|
||||
v-model="endTimeVal"
|
||||
label-width="60px"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
placeholder="结束日期"
|
||||
@click.stop="onClickTime('end')"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted, watch, defineProps, defineEmits } from "vue";
|
||||
import { dateFormat } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
startTime: String,
|
||||
endTime: String,
|
||||
});
|
||||
watch(
|
||||
() => props.endTime,
|
||||
(newValue) => {
|
||||
endTimeVal.value = newValue;
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.startTime,
|
||||
(newValue) => {
|
||||
startTimeval.value = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
const emits = defineEmits(["update:startTime", "update:endTime"]);
|
||||
const startTimeval = ref(""); //开始时间
|
||||
const endTimeVal = ref(""); //结束时间
|
||||
const timeType = ref("start");
|
||||
function onClickTime(val) {
|
||||
timeType.value = val;
|
||||
if (val == "start") {
|
||||
emits("update:startTime", val);
|
||||
} else {
|
||||
emits("update:endTime", val);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.time_box {
|
||||
display: flex;
|
||||
padding: 0 3vw;
|
||||
margin-bottom: 4vw;
|
||||
|
||||
.relevance {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
line-height: 33.5px;
|
||||
margin: 0 2.5vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,63 +0,0 @@
|
||||
<template>
|
||||
<!-- 步骤条组件 -->
|
||||
<div class="main">
|
||||
<div
|
||||
class="item"
|
||||
v-for="(item, index) in props.data"
|
||||
:key="index + item[props.time]"
|
||||
>
|
||||
<div
|
||||
class="item_l"
|
||||
:class="{ deftaultColor: true, selectColor: index == 0 }"
|
||||
>
|
||||
{{ item[props.time].split(" ")[0] }}<br />{{
|
||||
item[props.time].split(" ")[1]
|
||||
}}
|
||||
<van-icon class="icon" name="checked" color="#1f6cec"></van-icon>
|
||||
</div>
|
||||
<div class="item_r">
|
||||
<slot :scope="item"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps } from "vue";
|
||||
const props = defineProps({
|
||||
time: { type: String, default: "time" },
|
||||
data: { type: Array, default: [] },
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.main {
|
||||
padding: 5vw;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
display: flex;
|
||||
@include font_size($font_medium_s);
|
||||
.item_l {
|
||||
text-align: right;
|
||||
border-right: 1px dotted #808080;
|
||||
padding-right: 12px;
|
||||
margin-right: 16px;
|
||||
position: relative;
|
||||
.icon {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: -6px;
|
||||
}
|
||||
}
|
||||
.item_r {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.deftaultColor {
|
||||
color: #808080;
|
||||
}
|
||||
.selectColor {
|
||||
color: #1f6cec;
|
||||
}
|
||||
</style>
|
||||
@ -1,284 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="popup_box" :style="{ marginTop: p_top + 'px' }" v-if="showPopup" @click="onHide" @touchmove.prevent>
|
||||
<div class="detail_box">
|
||||
<div v-for="(item, index) in list" :key="index" class="other_type_box">
|
||||
<div class="other_type_title">{{ item.title }}</div>
|
||||
<span>
|
||||
<span v-for="(it, ind) in item.array" :key="ind">
|
||||
<van-tag plain class="tag_item" :type="it.isCheck ? 'primary' : 'default'" @click.stop="onClickTag(item, it)">{{ it.name }}
|
||||
</van-tag>
|
||||
<br v-if="['超时签收','巡逻中','手动确认到达现场(实际未到达)','超时到达现场','处置完成'].includes(it.name)" />
|
||||
</span>
|
||||
</span>
|
||||
<!-- showSolt 是否自定义插槽 SoltName:名字-->
|
||||
<template v-if="item.showSolt">
|
||||
<slot :name="item.SoltName"></slot>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<slot>
|
||||
<div v-show="showTime" class="other_type_title" style="margin-left: 3vw">自定义时间</div>
|
||||
<div v-show="showTime" class="time_box">
|
||||
<van-field
|
||||
v-model="startTime"
|
||||
label-width="60px"
|
||||
placeholder="开始日期"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
readonly
|
||||
@click.stop="onClickTime('start')"
|
||||
></van-field>
|
||||
<div class="relevance">至</div>
|
||||
<van-field
|
||||
v-model="endTime"
|
||||
label-width="60px"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
placeholder="结束日期"
|
||||
@click.stop="onClickTime('end')"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
</slot>
|
||||
<div class="but_box">
|
||||
<van-button round block type="primary" size="small" @click.stop="onConfirm" style="margin: 0 3vw 0 0vw">确定</van-button>
|
||||
<van-button round block type="warning" size="small" @click.stop="onReset" style="margin: 0 0 0 3vw">重置 </van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<SelectTime :timeType="timeType" v-if="timeShow" @update:time="onSelectTime" @update:cancelTime="timeShow = false"/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineProps, onMounted, defineEmits, watch } from "vue";
|
||||
import { dateFormat } from "../utils/tools.js";
|
||||
import SelectTime from "./SelectTime.vue";
|
||||
import store from "../store/index.js";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
showPopup: Boolean, //是否显示
|
||||
list: Array, //其余赛选条件
|
||||
p_top: Number, //距离顶部的内填充距离
|
||||
kssj: String, //开始时间
|
||||
jssj: String, // 结束时间,
|
||||
showTime:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
} ,//是否展示时间筛选
|
||||
});
|
||||
const tagIndex = ref(1); //如果是单选,选中的下标
|
||||
const emits = defineEmits(["update:close", 'reset', "update:onConfirm"]);
|
||||
const startTime = ref(props.kssj); //开始时间
|
||||
const endTime = ref(props.jssj); //结束时间
|
||||
const timeShow = ref(false); //是否显示时间选择器
|
||||
const timeType = ref("start"); //选择时间的类型
|
||||
const keyIndex = ref(1);
|
||||
//点击选择时间
|
||||
function onClickTime(val) {
|
||||
timeType.value = val;
|
||||
timeShow.value = true;
|
||||
}
|
||||
/**
|
||||
* 点击赛选项
|
||||
* @param {Object} item 父级选项
|
||||
* @param {Object} it 子集选项
|
||||
*/
|
||||
function onClickTag(item, it) {
|
||||
//多选
|
||||
if (item.isCheckBox) {
|
||||
item.array.forEach((_item) => {
|
||||
_item.isCheck = false
|
||||
if (_item.key == it.key) {
|
||||
_item.isCheck = !_item.isCheck;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//单选
|
||||
item.array.forEach((_item) => {
|
||||
_item.isCheck = false;
|
||||
if (_item.key == it.key) {
|
||||
_item.isCheck = !_item.isCheck;
|
||||
//如果是时间段选项
|
||||
if (item.title == "按时间") {
|
||||
setTimeSjd(it.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//如果选中的是时间段条件
|
||||
function setTimeSjd(valName) {
|
||||
switch (valName) {
|
||||
case "今日":
|
||||
startTime.value = dateFormat();
|
||||
break;
|
||||
case "近三日":
|
||||
startTime.value = dateFormat("3");
|
||||
break;
|
||||
case "近一周":
|
||||
startTime.value = dateFormat("week");
|
||||
break;
|
||||
case "近一月":
|
||||
startTime.value = dateFormat("month");
|
||||
break;
|
||||
case "近三月":
|
||||
startTime.value = dateFormat("3month");
|
||||
break;
|
||||
case "近半年":
|
||||
startTime.value = dateFormat("6month");
|
||||
break;
|
||||
}
|
||||
endTime.value = dateFormat();
|
||||
keyIndex.value++;
|
||||
}
|
||||
//选中的时间
|
||||
function onSelectTime(val) {
|
||||
props.list.forEach((item) => {
|
||||
if (item.title == "按时间") {
|
||||
item.array.forEach((_item) => {
|
||||
_item.isCheck = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
if (timeType.value == "start") {
|
||||
startTime.value = val;
|
||||
} else {
|
||||
endTime.value = val;
|
||||
}
|
||||
|
||||
if (new Date(startTime.value).getTime() > new Date(endTime.value).getTime()) {
|
||||
hintToast("起始时间错误!!");
|
||||
return;
|
||||
}
|
||||
|
||||
timeShow.value = false;
|
||||
}
|
||||
//打开开始时间
|
||||
function onSlectStartTime(val) {
|
||||
timeType.value = "start";
|
||||
timeShow.value = true;
|
||||
}
|
||||
//打开结束时间
|
||||
function onSlectEndTime(val) {
|
||||
timeType.value = "end";
|
||||
timeShow.value = true;
|
||||
}
|
||||
//关闭
|
||||
function onHide() {
|
||||
// props.list.forEach((item) => {
|
||||
// item.array.forEach((_item) => {
|
||||
// _item.isCheck = false;
|
||||
// });
|
||||
// });
|
||||
// startTime.value = "";
|
||||
// endTime.value = "";
|
||||
emits("update:close", false);
|
||||
}
|
||||
//确认选中数据
|
||||
function onConfirm() {
|
||||
const list = props?.list ? JSON.parse(JSON.stringify(props?.list)) : [];
|
||||
let array = [];
|
||||
//筛选出按时间的筛选条件
|
||||
for (let i = 0; i < list?.length; i++) {
|
||||
if (list[i].title != "按时间") {
|
||||
array.push(list[i]);
|
||||
}
|
||||
}
|
||||
store.commit("setStartTime", startTime.value);
|
||||
store.commit("setEndTime", endTime.value);
|
||||
emits("update:onConfirm", {
|
||||
list: array,
|
||||
startTime: startTime.value,
|
||||
endTime: endTime.value,
|
||||
});
|
||||
emits("update:close", false);
|
||||
//清空当前时间
|
||||
// startTime.value = "";
|
||||
// endTime.value = "";
|
||||
}
|
||||
//重置选项
|
||||
function onReset() {
|
||||
props.list?.forEach((item) => {
|
||||
item.array?.forEach((_item) => {
|
||||
_item.isCheck = false;
|
||||
});
|
||||
});
|
||||
startTime.value = "";
|
||||
endTime.value = "";
|
||||
emits('reset')
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.popup_box {
|
||||
@include font_size($font_medium_s);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
background: #fff;
|
||||
padding: 4vw 0;
|
||||
}
|
||||
|
||||
.other_type_box,
|
||||
.time_box,
|
||||
.but_box {
|
||||
padding: 0 3vw;
|
||||
}
|
||||
|
||||
.but_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
margin-bottom: 4vw;
|
||||
|
||||
.relevance {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
line-height: 33.5px;
|
||||
margin: 0 2.5vw;
|
||||
}
|
||||
}
|
||||
|
||||
.other_type_box {
|
||||
margin-bottom: 2vw;
|
||||
|
||||
.tag_item {
|
||||
padding: 1vw 3vw;
|
||||
margin: 0 3vw 3vw 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.other_type_title {
|
||||
margin-bottom: 2vw;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
::v-deep .van-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::v-deep .van-field__body {
|
||||
border: 1px solid #507ce9;
|
||||
border-radius: 5px;
|
||||
padding: 1vw;
|
||||
// margin: 0 2vw;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
border: 1px solid #507ce9;
|
||||
}
|
||||
</style>
|
||||
@ -1,281 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="popup_box" :style="{ marginTop: p_top + 'px' }" v-if="showPopup" @click.stop="onHide" @touchmove.prevent>
|
||||
<div class="detail_box">
|
||||
<div v-for="(item, index) in list" :key="index" class="other_type_box">
|
||||
<div class="other_type_title">{{ item.title }}</div>
|
||||
<span v-if="item.type == 'checkBox'">
|
||||
<span v-for="(it, ind) in item.array" :key="ind">
|
||||
<van-tag plain class="tag_item" :type="it.isCheck ? 'primary' : 'default'" @click.stop="onClickTag(item, it)">{{ it.name || it.text }}
|
||||
</van-tag>
|
||||
<br v-if="['超时签收','巡逻中','手动确认到达现场(实际未到达)','超时到达现场','处置完成'].includes(it.name)" />
|
||||
</span>
|
||||
</span>
|
||||
<span v-if="item.type == 'input'" @click.stop>
|
||||
<van-field v-model="formDate[item.lebel]" :placeholder="item.placeholder"/>
|
||||
</span>
|
||||
|
||||
<!-- showSolt 是否自定义插槽 SoltName:名字-->
|
||||
<template v-if="item.showSolt">
|
||||
<slot :name="item.SoltName"></slot>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div v-show="showTime" class="other_type_title" style="margin-left: 3vw">自定义时间</div>
|
||||
<div v-show="showTime" class="time_box">
|
||||
<van-field
|
||||
v-model="startTime"
|
||||
label-width="60px"
|
||||
placeholder="开始日期"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
readonly
|
||||
@click.stop="onClickTime('start')"
|
||||
></van-field>
|
||||
<div class="relevance">至</div>
|
||||
<van-field
|
||||
v-model="endTime"
|
||||
label-width="60px"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
placeholder="结束日期"
|
||||
@click.stop="onClickTime('end')"
|
||||
readonly
|
||||
></van-field>
|
||||
</div>
|
||||
<div class="but_box">
|
||||
<van-button round block type="primary" size="small" @click.stop="onConfirm" style="margin: 0 3vw 0 0vw">确定</van-button>
|
||||
<van-button round block type="warning" size="small" @click.stop="onReset" style="margin: 0 0 0 3vw">重置 </van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<SelectTime :timeType="timeType" v-if="timeShow" @update:time="onSelectTime" @update:cancelTime="timeShow = false"/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineProps, onMounted, defineEmits, watch } from "vue";
|
||||
import { dateFormat } from "../utils/tools.js";
|
||||
import SelectTime from "./SelectTime.vue";
|
||||
import store from "../store/index.js";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
showPopup: Boolean, //是否显示
|
||||
list: Array, //其余赛选条件
|
||||
p_top: Number, //距离顶部的内填充距离
|
||||
kssj: String, //开始时间
|
||||
jssj: String, // 结束时间,
|
||||
showTime:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
} ,//是否展示时间筛选
|
||||
});
|
||||
const formDate = ref({})
|
||||
const tagIndex = ref(1); //如果是单选,选中的下标
|
||||
const emits = defineEmits(["update:close", 'reset', "update:onConfirm"]);
|
||||
const startTime = ref(props.kssj); //开始时间
|
||||
const endTime = ref(props.jssj); //结束时间
|
||||
const timeShow = ref(false); //是否显示时间选择器
|
||||
const timeType = ref("start"); //选择时间的类型
|
||||
const keyIndex = ref(1);
|
||||
//点击选择时间
|
||||
function onClickTime(val) {
|
||||
timeType.value = val;
|
||||
timeShow.value = true;
|
||||
}
|
||||
/**
|
||||
* 点击赛选项
|
||||
* @param {Object} item 父级选项
|
||||
* @param {Object} it 子集选项
|
||||
*/
|
||||
function onClickTag(item, it) {
|
||||
//多选
|
||||
if (item.isCheckBox) {
|
||||
item.array.forEach((_item) => {
|
||||
// _item.isCheck = false
|
||||
if (_item.key == it.key) {
|
||||
_item.isCheck = !_item.isCheck;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//单选
|
||||
item.array.forEach((_item) => {
|
||||
_item.isCheck = false;
|
||||
if (_item.key == it.key) {
|
||||
_item.isCheck = !_item.isCheck;
|
||||
//如果是时间段选项
|
||||
if (item.title == "按时间") {
|
||||
setTimeSjd(it.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//如果选中的是时间段条件
|
||||
function setTimeSjd(valName) {
|
||||
switch (valName) {
|
||||
case "今日":
|
||||
startTime.value = dateFormat();
|
||||
break;
|
||||
case "近三日":
|
||||
startTime.value = dateFormat("3");
|
||||
break;
|
||||
case "近一周":
|
||||
startTime.value = dateFormat("week");
|
||||
break;
|
||||
case "近一月":
|
||||
startTime.value = dateFormat("month");
|
||||
break;
|
||||
case "近三月":
|
||||
startTime.value = dateFormat("3month");
|
||||
break;
|
||||
case "近半年":
|
||||
startTime.value = dateFormat("6month");
|
||||
break;
|
||||
}
|
||||
endTime.value = dateFormat();
|
||||
keyIndex.value++;
|
||||
}
|
||||
//选中的时间
|
||||
function onSelectTime(val) {
|
||||
props.list.forEach((item) => {
|
||||
if (item.title == "按时间") {
|
||||
item.array.forEach((_item) => {
|
||||
_item.isCheck = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
if (timeType.value == "start") {
|
||||
startTime.value = val;
|
||||
} else {
|
||||
endTime.value = val;
|
||||
}
|
||||
|
||||
if (new Date(startTime.value).getTime() > new Date(endTime.value).getTime()) {
|
||||
hintToast("起始时间错误!!");
|
||||
return;
|
||||
}
|
||||
|
||||
timeShow.value = false;
|
||||
}
|
||||
//打开开始时间
|
||||
function onSlectStartTime(val) {
|
||||
timeType.value = "start";
|
||||
timeShow.value = true;
|
||||
}
|
||||
//打开结束时间
|
||||
function onSlectEndTime(val) {
|
||||
timeType.value = "end";
|
||||
timeShow.value = true;
|
||||
}
|
||||
//关闭
|
||||
function onHide() {
|
||||
emits("update:close", false);
|
||||
}
|
||||
//确认选中数据
|
||||
function onConfirm() {
|
||||
const list = JSON.parse(JSON.stringify(props.list));
|
||||
let array = [];
|
||||
//筛选出按时间的筛选条件
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].title != "按时间") array.push(list[i]);
|
||||
}
|
||||
store.commit("setStartTime", startTime.value);
|
||||
store.commit("setEndTime", endTime.value);
|
||||
emits("update:onConfirm", {
|
||||
list: array,
|
||||
startTime: startTime.value,
|
||||
endTime: endTime.value,
|
||||
data:formDate.value
|
||||
});
|
||||
emits("update:close", false);
|
||||
formDate.value = {}
|
||||
}
|
||||
//重置选项
|
||||
function onReset() {
|
||||
props.list.forEach((item) => {
|
||||
if(item.array && item.array.length>0){
|
||||
item.array.forEach((_item) => {
|
||||
_item.isCheck = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
formDate.value = {}
|
||||
startTime.value = "";
|
||||
endTime.value = "";
|
||||
emits("update:close", false);
|
||||
emits('reset')
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.popup_box {
|
||||
@include font_size($font_medium_s);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
background: #fff;
|
||||
padding: 4vw 0;
|
||||
}
|
||||
|
||||
.other_type_box,
|
||||
.time_box,
|
||||
.but_box {
|
||||
padding: 0 3vw;
|
||||
}
|
||||
|
||||
.but_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
margin-bottom: 4vw;
|
||||
|
||||
.relevance {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
line-height: 33.5px;
|
||||
margin: 0 2.5vw;
|
||||
}
|
||||
}
|
||||
|
||||
.other_type_box {
|
||||
margin-bottom: 2vw;
|
||||
|
||||
.tag_item {
|
||||
padding: 1vw 3vw;
|
||||
margin: 0 3vw 3vw 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.other_type_title {
|
||||
margin-bottom: 2vw;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
::v-deep .van-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::v-deep .van-field__body {
|
||||
border: 1px solid #507ce9;
|
||||
border-radius: 5px;
|
||||
padding: 1vw;
|
||||
// margin: 0 2vw;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
border: 1px solid #507ce9;
|
||||
}
|
||||
</style>
|
||||
@ -1,135 +0,0 @@
|
||||
<template>
|
||||
<div class="popup_box" :style="{ marginTop: p_top + 'px' }" v-if="showPopup" @click="onHide" @touchmove.prevent>
|
||||
<div class="detail_box">
|
||||
<div v-for="(item, index) in list" :key="index" class="other_type_box">
|
||||
<div class="other_type_title">{{ item.label }}</div>
|
||||
<van-field v-if="item.type == 'input'" v-model="queryForm[item.key]" label="" :placeholder="item.placeholder" input-align="left"/>
|
||||
<!-- showSolt 是否自定义插槽 SoltName:名字-->
|
||||
<template v-if="item.showSolt">
|
||||
<slot :name="item.SoltName"></slot>
|
||||
</template>
|
||||
</div>
|
||||
<div class="but_box">
|
||||
<van-button round block type="primary" size="small" @click.stop="onConfirm" style="margin: 0 3vw 0 0vw">确定</van-button>
|
||||
<van-button round block type="warning" size="small" @click.stop="onReset" style="margin: 0 0 0 3vw">重置 </van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineProps, onMounted, defineEmits, watch } from "vue";
|
||||
import { dateFormat } from "../utils/tools.js";
|
||||
import store from "../store/index.js";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
showPopup: Boolean, //是否显示
|
||||
list: Array, //其余赛选条件
|
||||
p_top: Number, //距离顶部的内填充距离
|
||||
});
|
||||
const queryForm = ref({})
|
||||
const emits = defineEmits(["update:close", 'reset', "update:onConfirm"]);
|
||||
|
||||
//关闭
|
||||
function onHide() {
|
||||
emits("update:close", false);
|
||||
}
|
||||
//确认选中数据
|
||||
function onConfirm() {
|
||||
const list = JSON.parse(JSON.stringify(props.list));
|
||||
let array = [];
|
||||
//筛选出按时间的筛选条件
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].title != "按时间") {
|
||||
array.push(list[i]);
|
||||
}
|
||||
}
|
||||
emits("update:onConfirm", queryForm.value);
|
||||
emits("update:close", false);
|
||||
}
|
||||
//重置选项
|
||||
function onReset() {
|
||||
queryForm.value = {}
|
||||
emits('reset')
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.popup_box {
|
||||
@include font_size($font_medium_s);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
background: #fff;
|
||||
padding: 4vw 0;
|
||||
}
|
||||
|
||||
.other_type_box,
|
||||
.time_box,
|
||||
.but_box {
|
||||
padding: 0 3vw;
|
||||
}
|
||||
|
||||
.but_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
margin-top: 4vw;
|
||||
}
|
||||
|
||||
.van-cell{
|
||||
background-color: #e8eeff;
|
||||
margin: 1vw 0;
|
||||
border-radius: 2vw;
|
||||
padding: 6px 16px;
|
||||
}
|
||||
|
||||
// .time_box {
|
||||
// display: flex;
|
||||
// margin-bottom: 4vw;
|
||||
|
||||
// .relevance {
|
||||
// position: relative;
|
||||
// bottom: 0;
|
||||
// line-height: 33.5px;
|
||||
// margin: 0 2.5vw;
|
||||
// }
|
||||
// }
|
||||
|
||||
// .other_type_box {
|
||||
// margin-bottom: 2vw;
|
||||
|
||||
// .tag_item {
|
||||
// padding: 1vw 3vw;
|
||||
// margin: 0 3vw 3vw 0;
|
||||
// border-radius: 5px;
|
||||
// }
|
||||
// }
|
||||
|
||||
// .other_type_title {
|
||||
// margin-bottom: 2vw;
|
||||
// @include font_size($font_medium);
|
||||
// }
|
||||
|
||||
// ::v-deep .van-cell {
|
||||
// padding: 0;
|
||||
// }
|
||||
|
||||
// ::v-deep .van-field__body {
|
||||
// border: 1px solid #507ce9;
|
||||
// border-radius: 5px;
|
||||
// padding: 1vw;
|
||||
// // margin: 0 2vw;
|
||||
// }
|
||||
|
||||
// .isChecked {
|
||||
// border: 1px solid #507ce9;
|
||||
// }
|
||||
</style>
|
||||
@ -1,142 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box" @click="onGoDetail()">
|
||||
<div class="time_box">
|
||||
<span>
|
||||
<van-icon name="clock-o" />
|
||||
 {{ item.yjFssj }}
|
||||
</span>
|
||||
<span v-if="item.yjJrcs">
|
||||
今日预警<span class="count_size">{{ item.yjJrcs }}</span>次
|
||||
</span>
|
||||
<span v-if="item.yjJb">
|
||||
<van-tag type="danger" style="padding: 0.3vw 5vw; border-radius: 3vw" v-if="item.yjJb == '10'">红色</van-tag>
|
||||
<van-tag type="warning" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else-if="item.yjJb == '20'">橙色
|
||||
</van-tag>
|
||||
<van-tag color="#ffcc40" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else-if="item.yjJb == '30'">黄色
|
||||
</van-tag>
|
||||
<van-tag type="primary" style="padding: 0.3vw 5vw; border-radius: 3vw"
|
||||
v-else-if="item.yjJb == '40'">蓝色</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<div class="detail_box">
|
||||
<van-image width="80px" height="85px" :src="baseUrl" style="flex: 1" @click.stop="ImagePreview([baseUrl])"
|
||||
v-if="baseUrl">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="detail_item">
|
||||
<div class="item user_info">
|
||||
<span v-if="item.yjClcph">{{ item.yjClcph }}</span>
|
||||
<span>{{ item.yjRyxm }}</span>
|
||||
<span v-if="item.mz">{{ item.mz }}</span>
|
||||
<span>{{ item.yjRysfzh }}</span>
|
||||
<span v-if="item.yjLx == '5'">{{ item.yjBt }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<van-tag type="primary" style="padding: 0 2vw; margin-right: 2vw" plain>{{
|
||||
item.yjbqmc ? item.yjbqmc : setDict(item.yjLx, dict.D_BZ_YJLX)
|
||||
}}</van-tag>
|
||||
</div>
|
||||
<div class="item">地址:{{ item.yjDz || item.yjGzymc }}</div>
|
||||
<div class="item">管辖派出所:{{ item.ssbm }}</div>
|
||||
</div>
|
||||
<img src="../assets/images/zwzl.png" class="zwzl_box" v-if="item.sfFszl > 0" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { getBase64 } from "../utils/tools.js";
|
||||
import { defineProps, ref, onMounted, watch } from "vue";
|
||||
import { getDictList, setDict } from "../utils/dict";
|
||||
import { ImagePreview } from "vant";
|
||||
// const { D_BZ_YJLX, D_BZ_TYJB } = getDictList("D_BZ_YJLX", "D_BZ_TYJB"); //字典信息
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
dict: {
|
||||
type: Object,
|
||||
default: {
|
||||
D_BZ_YJLX: [],
|
||||
D_BZ_TYJB: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => props.item,
|
||||
(newValue) => {
|
||||
if (Object.keys(newValue).length > 0) _getBase64(newValue);
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const baseUrl = ref("");
|
||||
//跳转
|
||||
|
||||
function onGoDetail() {
|
||||
try {
|
||||
router.push(props.path);
|
||||
} catch (error) { }
|
||||
}
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
baseUrl.value = res;
|
||||
}, item.yjTp);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 1vw;
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.count_size {
|
||||
font-size: 5vw;
|
||||
display: inline-block;
|
||||
margin: 0 1vw;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list_box:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
margin-top: 1vw;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.detail_item {
|
||||
flex: 3.5;
|
||||
margin-left: 2vw;
|
||||
|
||||
.user_info {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
color: #507ce9;
|
||||
|
||||
&>span {
|
||||
display: inline-block;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,128 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box" @click="changeRouter(item)">
|
||||
<div class="time_box">
|
||||
<span>
|
||||
<van-icon name="clock-o" />
|
||||
 {{ item.xtCjsj }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="detail_box">
|
||||
<div class="detail_item">
|
||||
<div class="item user_info">
|
||||
<span>警情类型:<van-tag type="primary" style="padding: 0 2vw; margin-right: 2vw" plain>{{ setDict(item.cjsbLx,
|
||||
dict.D_QW_CJSBLX)
|
||||
}}</van-tag></span>
|
||||
</div>
|
||||
<div class="item">上报情况:{{ item.cjsbQk }}</div>
|
||||
<div class="item">上报人员:{{ item.cjsbRyXm }}</div>
|
||||
<div class="item">管辖派出所:{{ item.ssbm }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { getBase64 } from "../utils/tools.js";
|
||||
import { defineProps, ref, watch } from "vue";
|
||||
import { getDictList, setDict } from "../utils/dict.js";
|
||||
import { ImagePreview } from "vant";
|
||||
import { qcckGet } from "@/api/qcckApi.js";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
dict: {
|
||||
type: Object,
|
||||
default: {
|
||||
D_QW_CJSBLX: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
const baseUrl = ref("");
|
||||
const getImageUrl = (item) => {
|
||||
qcckGet({}, `/mosty-base/minio/file/download/${item.tpid}`).then(res => {
|
||||
_getBase64(res.url)
|
||||
})
|
||||
}
|
||||
watch(
|
||||
() => props.item,
|
||||
(newValue) => {
|
||||
if (Object.keys(newValue).length > 0) getImageUrl(newValue);
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const changeRouter=(item)=>{
|
||||
router.push({path:'/cjbsPage',query:{item:JSON.stringify(item)}})
|
||||
}
|
||||
//预览图片
|
||||
function onClickImg(url) {
|
||||
ImagePreview([url]);
|
||||
}
|
||||
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
baseUrl.value = res;
|
||||
}, item);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 1vw;
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.count_size {
|
||||
font-size: 5vw;
|
||||
display: inline-block;
|
||||
margin: 0 1vw;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list_box:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
margin-top: 1vw;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.detail_item {
|
||||
flex: 3.5;
|
||||
margin-left: 2vw;
|
||||
|
||||
.user_info {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
color: #507ce9;
|
||||
|
||||
&>span {
|
||||
display: inline-block;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-image__img {
|
||||
height: auto;
|
||||
max-height: 101px;
|
||||
}
|
||||
</style>
|
||||
@ -1,120 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box">
|
||||
<div class="time_box">
|
||||
<span>
|
||||
<van-icon name="clock-o" />
|
||||
 {{ item.xtCjsj }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="detail_box">
|
||||
<van-image width="80px" :src="baseUrl" @click="onClickImg(baseUrl)" style="flex: 1" v-if="baseUrl">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="detail_item">
|
||||
<div class="item user_info">
|
||||
<span>{{ item.dkrxm }}</span>
|
||||
<!-- <span>{{ item.dkrsfzh }}</span> -->
|
||||
</div>
|
||||
<div class="item">管辖派出所:{{ item.ssbm }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { getBase64 } from "../utils/tools.js";
|
||||
import { defineProps, ref, watch } from "vue";
|
||||
import { getDictList, setDict } from "../utils/dict";
|
||||
import { ImagePreview } from "vant";
|
||||
import { qcckGet } from "@/api/qcckApi.js";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
});
|
||||
const baseUrl = ref("");
|
||||
const getImageUrl = (item) => {
|
||||
qcckGet({}, `/mosty-base/minio/file/download/${item.tpid}`).then(res => {
|
||||
_getBase64(res.url)
|
||||
})
|
||||
}
|
||||
watch(
|
||||
() => props.item,
|
||||
(newValue) => {
|
||||
if (Object.keys(newValue).length > 0) getImageUrl(newValue);
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
//预览图片
|
||||
function onClickImg(url) {
|
||||
ImagePreview([url]);
|
||||
}
|
||||
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
baseUrl.value = res;
|
||||
}, item);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 1vw;
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.count_size {
|
||||
font-size: 5vw;
|
||||
display: inline-block;
|
||||
margin: 0 1vw;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list_box:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
margin-top: 1vw;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.detail_item {
|
||||
flex: 3.5;
|
||||
margin-left: 2vw;
|
||||
|
||||
.user_info {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
color: #507ce9;
|
||||
|
||||
&>span {
|
||||
display: inline-block;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-image__img {
|
||||
height: auto;
|
||||
max-height: 101px;
|
||||
}
|
||||
</style>
|
||||
@ -1,100 +0,0 @@
|
||||
<template>
|
||||
<div :id="echid" class="gfChart"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
props: ["datas"],
|
||||
watch: {
|
||||
datas: {
|
||||
handler(val) {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
echid: '',
|
||||
themeType: getStorage('themeSetting')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.echid = 'ech_' + new Date().getTime();
|
||||
},
|
||||
mounted() {
|
||||
// this.titles = this.titles
|
||||
// this.datas = this.datas
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
methods: {
|
||||
hamdlegfChart() {
|
||||
if (document.getElementById(this.echid)) {
|
||||
let myechart = echarts.init(document.getElementById(this.echid))
|
||||
myechart.setOption({
|
||||
grid: {
|
||||
left: '0',
|
||||
right: '0',
|
||||
bottom: '0',
|
||||
top: '10',
|
||||
containLabel: true
|
||||
},
|
||||
series: [{
|
||||
type: 'pie',
|
||||
radius: ['45%', '60%'],
|
||||
labelLine: {
|
||||
length: 30
|
||||
},
|
||||
label: {
|
||||
formatter: '{b|{b}}\n{per|{d}%}',
|
||||
minMargin: 5,
|
||||
edgeDistance: 10,
|
||||
lineHeight: 18,
|
||||
color: this.themeType == 'light' ? '#333':'#fff',
|
||||
rich: {
|
||||
b: {
|
||||
fontSize: 13,
|
||||
},
|
||||
per: {
|
||||
padding: [3, 4],
|
||||
borderRadius: 4
|
||||
}
|
||||
}
|
||||
},
|
||||
data: [{
|
||||
value: Math.floor(Math.random()*1000),
|
||||
name: '类型一'
|
||||
},
|
||||
{
|
||||
value: Math.floor(Math.random()*1000),
|
||||
name: '类型二'
|
||||
},
|
||||
{
|
||||
value: Math.floor(Math.random()*1000),
|
||||
name: '类型三'
|
||||
},
|
||||
{
|
||||
value: Math.floor(Math.random()*1000),
|
||||
name: '类型四'
|
||||
}
|
||||
]
|
||||
}]
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.gfChart {
|
||||
margin-top: 1vw;
|
||||
height: 55vw;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -1,78 +0,0 @@
|
||||
<template>
|
||||
<div :id="echid" class="gfChart"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
props: ["datas"],
|
||||
watch: {
|
||||
datas: {
|
||||
handler(val) {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
echid: '',
|
||||
themeType: getStorage('themeSetting')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.echid = 'ech_' + new Date().getTime();
|
||||
},
|
||||
mounted() {
|
||||
// this.titles = this.titles
|
||||
// this.datas = this.datas
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
methods: {
|
||||
hamdlegfChart() {
|
||||
if (document.getElementById(this.echid)) {
|
||||
let myechart = echarts.init(document.getElementById(this.echid))
|
||||
myechart.setOption({
|
||||
grid: {
|
||||
left: '10',
|
||||
right: '10',
|
||||
bottom: '0',
|
||||
top: '25',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data:this.datas.titles
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine:{show: false}
|
||||
},
|
||||
series: [{
|
||||
data: this.datas.xsList,
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: this.themeType == 'light' ? '#333':'#fff'
|
||||
},
|
||||
}]
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.gfChart {
|
||||
margin-top: 1vw;
|
||||
height: 55vw;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -1,112 +0,0 @@
|
||||
<template>
|
||||
<div :id="echid" class="gfChart"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
props: ["datas"],
|
||||
watch: {
|
||||
datas: {
|
||||
handler(val) {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
echid: '',
|
||||
themeType: getStorage('themeSetting')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.echid = 'ech_' + new Date().getTime();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// this.titles = this.titles
|
||||
// this.datas = this.datas
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
methods: {
|
||||
hamdlegfChart() {
|
||||
if (document.getElementById(this.echid)) {
|
||||
let myechart = echarts.init(document.getElementById(this.echid))
|
||||
myechart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '10',
|
||||
right: '10',
|
||||
bottom: '0',
|
||||
top: '25',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
data: this.datas.titles,
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
}],
|
||||
series: [{
|
||||
type: 'bar',
|
||||
barWidth: 11,
|
||||
stack: 'Total',
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: this.themeType == 'light' ? '#333':'#fff'
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [5, 5, 5, 5]
|
||||
}
|
||||
},
|
||||
data: this.datas.xsList,
|
||||
color: [{
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: '#00c0fa'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#015eea'
|
||||
}
|
||||
]
|
||||
}]
|
||||
}]
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.gfChart {
|
||||
margin-top: 1vw;
|
||||
height: 55vw;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -1,79 +0,0 @@
|
||||
<template>
|
||||
<div :id="echid" class="gfChart"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
props: ["datas"],
|
||||
watch: {
|
||||
datas: {
|
||||
handler(val) {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
echid: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.echid = 'echa_' + new Date().getTime();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
methods: {
|
||||
hamdlegfChart() {
|
||||
if (document.getElementById(this.echid)) {
|
||||
let myechart = echarts.init(document.getElementById(this.echid))
|
||||
myechart.setOption({
|
||||
tooltip: {},
|
||||
series: [{
|
||||
name: '',
|
||||
type: 'pie',
|
||||
radius: '80%',
|
||||
center: ['50%', '50%'],
|
||||
label: {
|
||||
position: 'inside',
|
||||
textStyle: {
|
||||
fontSize: 14,
|
||||
color: '#fff'
|
||||
},
|
||||
formatter: "{num|{c}} \n {name|{b}} ",
|
||||
rich: {
|
||||
num: {
|
||||
fontSize: 34,
|
||||
}
|
||||
}
|
||||
},
|
||||
data: this.datas,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0,0,0,.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.gfChart {
|
||||
margin-top: 1vw;
|
||||
height: 75vw;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -1,77 +0,0 @@
|
||||
<template>
|
||||
<div :id="echid" class="gfChart"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
props: ["datas",'id'],
|
||||
watch: {
|
||||
datas: {
|
||||
handler(val) {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
echid: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.echid = 'echa_'+this.id + new Date().getTime();
|
||||
},
|
||||
mounted() {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
methods: {
|
||||
hamdlegfChart() {
|
||||
if (document.getElementById(this.echid)) {
|
||||
let myechart = echarts.init(document.getElementById(this.echid))
|
||||
myechart.setOption({
|
||||
tooltip: {},
|
||||
series: [{
|
||||
name: '',
|
||||
type: 'pie',
|
||||
radius: '76%',
|
||||
center: ['50%', '50%'],
|
||||
label: {
|
||||
position: 'inside',
|
||||
textStyle: {
|
||||
fontSize: 14,
|
||||
color: '#fff'
|
||||
},
|
||||
formatter: "{num|{c}} \n {name|{b}} ",
|
||||
rich: {
|
||||
num: {
|
||||
fontSize: 18,
|
||||
}
|
||||
}
|
||||
},
|
||||
data: this.datas,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0,0,0,.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.gfChart {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -1,180 +0,0 @@
|
||||
<template>
|
||||
<div :id="echid" class="gfChart"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
props: ["datas"],
|
||||
watch: {
|
||||
datas: {
|
||||
handler(val) {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
echid: '',
|
||||
themeType: getStorage('themeSetting')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.echid = 'echc_' + new Date().getTime();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.hamdlegfChart()
|
||||
},
|
||||
methods: {
|
||||
hamdlegfChart() {
|
||||
if (document.getElementById(this.echid)) {
|
||||
let myechart = echarts.init(document.getElementById(this.echid))
|
||||
myechart.setOption({
|
||||
legend: {
|
||||
textStyle:{
|
||||
color:this.themeType == 'light' ? '#333':'#fff'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '10',
|
||||
right: '10',
|
||||
bottom: '0',
|
||||
top: '35',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
// data: ['xxx派出所','xxx派出所','xxx派出所','xxx派出所','xxx派出所'],
|
||||
data: this.datas.Xlist,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 40,
|
||||
textStyle: {
|
||||
color: this.themeType == 'light' ? '#333':'#fff'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
series: [{
|
||||
name: '系统问题',
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
label: {
|
||||
show: true,
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
// data: [30,50,20.50,60,50],
|
||||
data: this.datas.xtwtList,
|
||||
barGap: '20',
|
||||
barWidth: '20',
|
||||
// barGap: '50%',
|
||||
// barWidth:'50%',
|
||||
color: [{
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: '#39B079'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#39B079'
|
||||
}
|
||||
]
|
||||
|
||||
}]
|
||||
}, {
|
||||
name: '功能改进',
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
barGap: '50%',
|
||||
barWidth: '50%',
|
||||
label: {
|
||||
show: true,
|
||||
color: '#fff'
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
data: this.datas.gngjList,
|
||||
color: [{
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: '#D17D1C'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ff887c'
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: '新需求',
|
||||
type: 'bar',
|
||||
barGap: '50%',
|
||||
barWidth: '50%',
|
||||
stack: 'total',
|
||||
label: {
|
||||
show: true,
|
||||
color: '#fff'
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
data: this.datas.xxqList,
|
||||
color: [{
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: '#EB0E0E'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#D31F1F'
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
]
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.gfChart {
|
||||
margin-top: 2vw;
|
||||
height: 75vw;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -1,145 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘人 -->
|
||||
<van-popup
|
||||
v-model:show="peoplePopupShow"
|
||||
round
|
||||
:style="{ width: '90%' }"
|
||||
close-icon="close"
|
||||
:overlay="true"
|
||||
@close="handlePClose"
|
||||
>
|
||||
<div class="checkPeoplePopup">
|
||||
<div class="select-box">
|
||||
<div
|
||||
class="item-boxs"
|
||||
v-for="(item, index) in checkPList"
|
||||
:key="index"
|
||||
@click="getPItem(item, index)"
|
||||
>
|
||||
<span :class="pCheckFlag === item.value ? 'checkText' : ''">{{
|
||||
item.label
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<van-field
|
||||
v-model="form.sfzh"
|
||||
placeholder="请输入身份证号"
|
||||
v-if="pCheckFlag === 'sfzh'"
|
||||
:rules="[{ required: true, message: '请输入身份证号码' }]"
|
||||
>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="form.lxdh"
|
||||
placeholder="请输入手机号"
|
||||
v-if="pCheckFlag === 'phoneNum'"
|
||||
:rules="[{ required: true, message: '请输入手机号码' }]"
|
||||
>
|
||||
</van-field>
|
||||
</div>
|
||||
<div class="checkPeopleSubmit" @click="checkP()">
|
||||
<div class="sub-btn">
|
||||
<img
|
||||
:src="require('../assets/images/new/faceR.png')"
|
||||
alt=""
|
||||
width="17"
|
||||
height="17"
|
||||
/> 查询人员
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert_info">
|
||||
请根据工作需求使用此功能,您的每次查询将记录日志!
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
watch,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
toRefs,
|
||||
toRef,
|
||||
defineExpose,
|
||||
} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
const router = useRouter();
|
||||
const peoplePopupShow = ref(false);
|
||||
const form = ref({
|
||||
sfzh: "",
|
||||
lxdh: "",
|
||||
});
|
||||
// 盘人弹框按钮List
|
||||
const checkPList = [
|
||||
{ label: "身份证", value: "sfzh" },
|
||||
{ label: "手机号", value: "phoneNum" },
|
||||
];
|
||||
const pCheckFlag = ref("sfzh");
|
||||
|
||||
// 关闭弹窗
|
||||
function handlePClose() {
|
||||
peoplePopupShow.value = false;
|
||||
}
|
||||
|
||||
// 盘人
|
||||
function checkP(e) {
|
||||
if (pCheckFlag.value == "sfzh") {
|
||||
if (form.value.sfzh) {
|
||||
router.push({
|
||||
path: "/yyzx/dhcr",
|
||||
query: { sfzh: form.value.sfzh, pclx: "sjh" },
|
||||
});
|
||||
} else {
|
||||
hintToast("请输入身份证!!!");
|
||||
}
|
||||
}
|
||||
if (pCheckFlag.value == "phoneNum") {
|
||||
if (form.value.lxdh) {
|
||||
router.push({ path: "/yyzx/dhcr", query: { dhhm: form.value.lxdh , pclx: "sjh",} });
|
||||
} else {
|
||||
hintToast("请输入电话号码!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 按钮切换
|
||||
function getPItem(item, index) {
|
||||
pCheckFlag.value = item.value;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
peoplePopupShow,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.item-boxs {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
.sub-btn {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
.alert_info {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
color: red;
|
||||
}
|
||||
.checkPeoplePopup {
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
.select-box {
|
||||
padding: 1vw;
|
||||
}
|
||||
}
|
||||
.van-cell {
|
||||
background: #f7f7f7;
|
||||
border-radius: 2vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,95 +0,0 @@
|
||||
<template>
|
||||
<div class="cnt_box">
|
||||
<div class="list_box">
|
||||
<div class="head">
|
||||
<span class="time">
|
||||
<van-icon name="clock-o" /> 
|
||||
{{item.pcsj}}</span>
|
||||
<span class="bq red" v-if="item.pcclJg == 2">{{item.pcclJgmc}}</span>
|
||||
<span class="bq blue" v-if="item.pcclJg == 1">{{item.pcclJgmc}}</span>
|
||||
<span class="bq orange" v-if="item.pcclJg == 9">{{item.pcclJgmc}}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="item">
|
||||
车辆信息:<span class="text">{{item.hphm}}</span> <span>{{setDict(item.hpzl,dict.D_BZ_HPZL)}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
人员信息:<span class="text">{{item.jdcsyr}}</span> <span>{{item.jdcsyrsfzh}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
盘查人:<span class="text">{{item.ssbm}}</span> <span>{{item.pcmjXm}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive,onMounted,defineProps } from "vue";
|
||||
import {getDictList,setDict} from '../utils/dict'
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
dict: {
|
||||
type: Object,
|
||||
default: {
|
||||
D_BZ_HPZL: []
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.cnt_box{
|
||||
margin-top: 2vw;
|
||||
padding: 0 4vw;
|
||||
box-sizing: border-box;
|
||||
.list_box{
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
border-radius: 2vw;
|
||||
background: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
.head{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 10vw;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
.time{
|
||||
color: #4081e9;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
.bq{
|
||||
padding: 1vw 4vw;
|
||||
color: #fff;
|
||||
border-radius: 4vw;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
.red{
|
||||
background: red;
|
||||
}
|
||||
.orange {
|
||||
background-color: #FF802E;
|
||||
}
|
||||
.yellow {
|
||||
background-color: #FFB114;
|
||||
}
|
||||
.blue{
|
||||
background: #3ACDFF;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
margin-top: 2vw;
|
||||
.item{
|
||||
@include font_size($font_medium_s);
|
||||
line-height: 6vw;
|
||||
.text{
|
||||
margin: 0 4vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>>
|
||||
@ -1,89 +0,0 @@
|
||||
<template>
|
||||
<van-config-provider :theme-vars="themeVars">
|
||||
<div class="search_box">
|
||||
<van-search
|
||||
v-model="values"
|
||||
:placeholder="placeholder"
|
||||
shape="round"
|
||||
@clear="onClear"
|
||||
@search="onSearch"
|
||||
:style="{ width: isSx ? '90%' : '100%' }"
|
||||
>
|
||||
</van-search>
|
||||
<!-- 是否有筛选条件 -->
|
||||
<div class="sx_box" v-if="isSx" @click="onClickSx">
|
||||
<van-icon name="bars" size="8vw"></van-icon>
|
||||
</div>
|
||||
</div>
|
||||
</van-config-provider>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "search",
|
||||
props: ["placeholder", "modelValue", "isSx"],
|
||||
data() {
|
||||
return {
|
||||
isChecked: 0,
|
||||
themeType: getStorage("themeSetting"),
|
||||
themeVars: {},
|
||||
values: "",
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
modelValue: {
|
||||
handler(val) {
|
||||
this.$nextTick(() => {
|
||||
this.values = val;
|
||||
});
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.themeVars = {
|
||||
fieldInputTextColor: this.themeType == "light" ? "#333" : "#333",
|
||||
// fieldInputTextColor: this.themeType == "light" ? "#333" : "#fff",
|
||||
SearchContentBackgroundColor:
|
||||
this.themeType == "light" ? "#f7f8fa" : "#f7f8fa",
|
||||
// SearchContentBackgroundColor: this.themeType == "light" ? "#f7f8fa" : "#092556",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//确认筛选
|
||||
onSearch(e) {
|
||||
this.$emit("update:modelValue", this.values);
|
||||
},
|
||||
//清除
|
||||
onClear() {
|
||||
this.$emit("update:modelValue", "");
|
||||
},
|
||||
//打开筛选条件
|
||||
onClickSx() {
|
||||
this.$emit("update:sx", true);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.search_box {
|
||||
@include font_size($font_medium_s);
|
||||
display: flex;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.sx_box {
|
||||
width: 10%;
|
||||
@include font_color($font-color-theme);
|
||||
text-align: center;
|
||||
padding: 3.1vw 2vw 2vw 0;
|
||||
}
|
||||
::v-deep .van-search {
|
||||
background: none;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
@ -1,208 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="status_box">
|
||||
<div class="title">{{ item.rwmc }}</div>
|
||||
<span
|
||||
style="whiteSpace: nowrap"
|
||||
:class="{
|
||||
bule: item.grrwzt == 0,
|
||||
cyan: item.grrwzt == 1,
|
||||
green: item.grrwzt == 2,
|
||||
yellow: item.grrwzt == 3,
|
||||
red: item.grrwzt == 4,
|
||||
}"
|
||||
>{{ setDict(item.grrwzt, dict.D_BZ_GRRWZT) }}</span
|
||||
>
|
||||
<div>
|
||||
<van-tag color="#fcc31f" v-if="item.rwzt == 1">关闭</van-tag>
|
||||
<van-tag type="primary" v-else-if="item.rwzt == 2">暂停 </van-tag>
|
||||
<van-tag type="success" v-else-if="item.rwzt == 0">正常</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nr">开始时间:{{ item.rwfqsj }}</div>
|
||||
<div class="nr">{{ item.rwnr }}</div>
|
||||
<div class="nr">
|
||||
发起人:<span v-if="item.ssbm">{{ item.ssbm }}-</span>
|
||||
<span>{{ item.cjrxm }}</span>
|
||||
</div>
|
||||
<template #right>
|
||||
<div class="rw_but_box">
|
||||
<!-- <van-button
|
||||
type="primary"
|
||||
style="margin: 0.5vw"
|
||||
@click.stop="
|
||||
onLookRw(
|
||||
item.ywid,
|
||||
item.id,
|
||||
item.rwxl,
|
||||
item.rwlx,
|
||||
item.rwzt,
|
||||
item.grrwzt,
|
||||
item.rwid
|
||||
)
|
||||
"
|
||||
>查看</van-button
|
||||
> -->
|
||||
<van-button
|
||||
type="warning"
|
||||
style="margin: 0.5vw"
|
||||
v-if="
|
||||
(item.rwzflx == 1 &&
|
||||
item.rwxl == '05' &&
|
||||
item.rwzt == 0 &&
|
||||
item.grrwzt != '2' &&
|
||||
item.grrwzt != '3' &&
|
||||
item.grrwzt != '34') ||
|
||||
item.rwzt == 1
|
||||
"
|
||||
@click.stop="onTransmit(item.id, item.rwzt)"
|
||||
>转发</van-button
|
||||
>
|
||||
<van-button
|
||||
type="danger"
|
||||
style="margin: 0.5vw"
|
||||
v-if="
|
||||
item.rwzflx == 2 &&
|
||||
item.rwxl == '05' &&
|
||||
['0', '1'].includes(item.grrwzt)
|
||||
"
|
||||
@click.stop="onDown(item.id, item.rwzt)"
|
||||
>驳回</van-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineProps, ref, defineEmits } from "vue";
|
||||
import { getDictList, setDict } from "../utils/dict";
|
||||
import router from "../router/index.js";
|
||||
import { upGrzt, isMyTask } from "../api/rwzx.js";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
//是否只查看本人数据
|
||||
isMy: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
item: Object,
|
||||
dict: {
|
||||
type: Object,
|
||||
default: { D_BZ_GRRWZT: [] },
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["click:Transmit", "click:onDown"]);
|
||||
//点击转发按钮
|
||||
function onTransmit(id, rezt) {
|
||||
emits("click:Transmit", { id, rezt });
|
||||
}
|
||||
//驳回按钮
|
||||
function onDown(id, rezt) {
|
||||
emits("click:onDown", { id, rezt });
|
||||
}
|
||||
//查看任务详情
|
||||
function onLookRw(ywid, id, rwxl, rwlx, rwzt, grrwzt, rwid) {
|
||||
if (props.isMy) {
|
||||
isMyTask(id).then((res) => {
|
||||
if (res) {
|
||||
//判断任务是暂停和关闭
|
||||
if (rwzt == 1) {
|
||||
hintToast("任务已关闭!!!");
|
||||
return;
|
||||
}
|
||||
if (rwzt == 2) {
|
||||
hintToast("任务已暂停!!!");
|
||||
return;
|
||||
}
|
||||
if (grrwzt === "0") {
|
||||
upGrzt({ rwid: rwid, rwzt: "1" });
|
||||
}
|
||||
//通知任务
|
||||
if (rwlx == 1) {
|
||||
router.push(`/rw/views/rwDetail?id=${id}`);
|
||||
return;
|
||||
}
|
||||
//值班任务
|
||||
if (rwxl == "04") {
|
||||
router.push("/yyzx/views/addZbbb");
|
||||
return;
|
||||
}
|
||||
//巡防任务
|
||||
if (rwxl == "03") {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
return;
|
||||
}
|
||||
//指令任务
|
||||
if (rwxl == "05") {
|
||||
router.push(`/yyzx/zlzx/zlDetail?id=${ywid}`);
|
||||
return;
|
||||
}
|
||||
//实有人口任务
|
||||
if (rwxl == "01") {
|
||||
router.push(`/rw/views/syrkRwDetail?id=${rwid}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//判断任务是暂停和关闭
|
||||
if (rwzt == 1) {
|
||||
hintToast("任务已关闭!!!");
|
||||
return;
|
||||
}
|
||||
if (rwzt == 2) {
|
||||
hintToast("任务已暂停!!!");
|
||||
return;
|
||||
}
|
||||
if (grrwzt === "0") {
|
||||
upGrzt({ rwid: rwid, rwzt: "1" });
|
||||
}
|
||||
//通知任务
|
||||
if (rwlx == 1) {
|
||||
router.push(`/rw/views/rwDetail?id=${rwid}`);
|
||||
return;
|
||||
}
|
||||
//值班任务
|
||||
if (rwxl == "04") {
|
||||
router.push("/yyzx/views/addZbbb");
|
||||
return;
|
||||
}
|
||||
//巡防任务
|
||||
if (rwxl == "03") {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
return;
|
||||
}
|
||||
//指令任务
|
||||
if (rwxl == "05") {
|
||||
router.push(`/yyzx/zlzx/zlDetail?id=${ywid}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.status_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
}
|
||||
.nr {
|
||||
line-height: 5.5vw;
|
||||
}
|
||||
.title {
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
// padding: 1vw 0;
|
||||
}
|
||||
.rw_but_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding-left: 2vw;
|
||||
}
|
||||
::v-deep .van-tag {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@ -1,124 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="status_box">
|
||||
<div class="nr title">
|
||||
<span>{{ item.rwmc }}</span>
|
||||
<van-tag color="#fcc31f" v-if="item.rwzt == 1">关闭</van-tag>
|
||||
<van-tag type="primary" v-else-if="item.rwzt == 2">暂停 </van-tag>
|
||||
<van-tag type="success" v-else-if="item.rwzt == 0">正常</van-tag>
|
||||
</div>
|
||||
<div class="time">
|
||||
<span>开始时间:{{ item.rwfqsj }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nr">{{ item.rwnr }}</div>
|
||||
<div class="nr">
|
||||
发起人:<span v-if="item.ssbm">{{ item.ssbm }}-</span>
|
||||
<span>{{ item.cjrxm }}</span>
|
||||
</div>
|
||||
<div class="nr">接收人:{{ item.jsrxm || "暂无" }}</div>
|
||||
<template #right>
|
||||
<div class="rw_but_box">
|
||||
<van-button
|
||||
type="primary"
|
||||
style="margin: 0.5vw"
|
||||
@click.stop="
|
||||
onLookRw(item.ywid, item.id, item.rwxl, item.rwlx, item.rwzt)
|
||||
"
|
||||
>查看</van-button
|
||||
>
|
||||
<van-button
|
||||
type="warning"
|
||||
style="margin: 0.5vw"
|
||||
v-if="(item.rwxl == '05' && item.rwzt == 0) || item.rwzt == 1"
|
||||
@click.stop="onTransmit(item.id, item.rwzt)"
|
||||
>转发</van-button
|
||||
>
|
||||
<van-button
|
||||
type="danger"
|
||||
style="margin: 0.5vw"
|
||||
v-if="item.rwxl == '05' && item.rwzt"
|
||||
@click.stop="onDown(item.id, item.rwzt)"
|
||||
>驳回</van-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineProps, ref, defineEmits } from "vue";
|
||||
import { getDictList, setDict } from "../utils/dict";
|
||||
import router from "../router/index.js";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
item: Object,
|
||||
dict: {
|
||||
type: Object,
|
||||
default: { D_BZ_GRRWZT: [] },
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["click:Transmit", "click:onDown"]);
|
||||
//点击转发按钮
|
||||
function onTransmit(id, rezt) {
|
||||
emits("click:Transmit", { id, rezt });
|
||||
}
|
||||
//驳回按钮
|
||||
function onDown(id, rezt) {
|
||||
emits("click:onDown", { id, rezt });
|
||||
}
|
||||
//查看任务详情
|
||||
function onLookRw(ywid, id, rwxl, rwlx, rwzt) {
|
||||
//判断任务是暂停和关闭
|
||||
if (rwzt == 1) {
|
||||
hintToast("任务已关闭!!!");
|
||||
return;
|
||||
}
|
||||
if (rwzt == 2) {
|
||||
hintToast("任务已暂停!!!");
|
||||
return;
|
||||
}
|
||||
//通知任务
|
||||
if (rwlx == 1) {
|
||||
router.push(`/rw/views/rwDetail?id=${id}`);
|
||||
return;
|
||||
}
|
||||
//值班任务
|
||||
if (rwxl == "04") {
|
||||
router.push("/yyzx/views/addZbbb");
|
||||
return;
|
||||
}
|
||||
//巡防任务
|
||||
if (rwxl == "03") {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
return;
|
||||
}
|
||||
//指令任务
|
||||
if (rwxl == "05") {
|
||||
router.push(`/yyzx/zlzx/zlDetail?id=${ywid}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.status_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
}
|
||||
.nr {
|
||||
line-height: 5vw;
|
||||
}
|
||||
.title {
|
||||
@include font_size($font_medium);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-weight: bold;
|
||||
padding: 1vw 0;
|
||||
}
|
||||
.rw_but_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding-left: 2vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,162 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box" @click="onGoDetail">
|
||||
<div class="detail_box">
|
||||
<van-image width="80px" height="85px" :class="_getBase64(item)" :src="item.baseUrl" style="flex: 1"
|
||||
v-if="props.type === '01'">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
|
||||
<template v-if="props.type === '01'">
|
||||
<div class="detail_item">
|
||||
<div class="item user_info">
|
||||
<span>{{ item.xm }}</span>
|
||||
<span>{{ setDict(item.mzdm, props.dict) }}</span>
|
||||
<span>{{ item.zjhm }}</span>
|
||||
</div>
|
||||
<span class="red status_box" v-if="item.gldjdm == 1">A类</span>
|
||||
<span class="yellow status_box" v-else-if="item.rylb == 2">B类</span>
|
||||
<span class="orange status_box" v-else>C类</span>
|
||||
<div class="item">居住地址:{{ item.jzdDzxz }}</div>
|
||||
<div class="item">
|
||||
联系电话:{{ item.lxdh }}  
|
||||
<!-- 同住人员:{{item.tzry + "人" }} -->
|
||||
</div>
|
||||
<!-- <div class="item">责任区:{{ item.jzdZrqdm }}</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="detail_item">
|
||||
<div class="item user_info">
|
||||
<span>{{ item.dwmc }}</span>
|
||||
</div>
|
||||
<span class="red status_box" v-if="item.gldj == '1'">A类</span>
|
||||
<span class="yellow status_box" v-else-if="item.gldj == '2'">B类</span>
|
||||
<span class="orange status_box" v-else>C类</span>
|
||||
<div class="item">地址:{{ item.zcdz }}</div>
|
||||
<div class="item">
|
||||
联系电话:{{ item.dwlxdh }}  从业人员:{{
|
||||
item.cyrs + "人"
|
||||
}}
|
||||
</div>
|
||||
<div class="item">责任区:{{ item.sszrqmc }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { setDict } from "../utils/dict";
|
||||
import { defineProps, ref } from "vue";
|
||||
import { getBase64 } from "../utils/tools.js";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
dict: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
type: String, //内容类型 01 实有人口 02实有单位
|
||||
});
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
item.baseUrl = res;
|
||||
}, `http://10.64.201.128:2366/xlpcAdminNew/requestservice/czrk/ryxp.jpg?sfzh=${item.zjhm}`);
|
||||
}
|
||||
//跳转
|
||||
function onGoDetail() {
|
||||
router.push({
|
||||
path: props.path,
|
||||
query: props.item,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 1vw;
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.count_size {
|
||||
font-size: 5vw;
|
||||
display: inline-block;
|
||||
margin: 0 1vw;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .list_box:nth-child(1) {
|
||||
// border: none!important;
|
||||
// }
|
||||
|
||||
.detail_box {
|
||||
margin-top: 1vw;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.detail_item {
|
||||
flex: 3.5;
|
||||
margin-left: 2vw;
|
||||
|
||||
.user_info {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
color: #507ce9;
|
||||
padding-right: 60px;
|
||||
|
||||
&>span {
|
||||
display: inline-block;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
|
||||
.status_box {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
border-radius: 20px;
|
||||
padding: 0px 15px;
|
||||
position: absolute;
|
||||
top: 1vw;
|
||||
right: 2vw;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background-color: #ffcc40;
|
||||
}
|
||||
|
||||
.orange {
|
||||
background-color: orange;
|
||||
}
|
||||
}
|
||||
|
||||
.zwzl_box {
|
||||
position: absolute;
|
||||
right: -1vw;
|
||||
width: 18vw;
|
||||
top: 6vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,80 +0,0 @@
|
||||
<template>
|
||||
<div class="tabs_box">
|
||||
<van-tabs
|
||||
v-model:active="active"
|
||||
title-active-color="#3e6ee8"
|
||||
color="#3e6ee8"
|
||||
@click="onChange"
|
||||
:background="themeType == 'light' ? '#fff' : '#041634'"
|
||||
:title-inactive-color="themeType == 'light' ? '#333' : '#fff'"
|
||||
>
|
||||
<van-tab
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:name="index"
|
||||
:title="item.name"
|
||||
:badge="item.count"
|
||||
></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "tabs",
|
||||
props: ["list", "type", "checked"],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
themeType: getStorage("themeSetting"),
|
||||
//tabs 徽标颜色
|
||||
badgeTextCoior: {
|
||||
type: String,
|
||||
default: "#fff",
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
checked: {
|
||||
handler(val) {
|
||||
this.$nextTick(() => {
|
||||
this.active = val;
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.badgeTextCoior.default = this.themeType == "light" ? "#333" : "#fff";
|
||||
},
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.$emit("onYjjb", this.active);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.tabs_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include bg_color($background-color-theme);
|
||||
margin-top: 8.5vw;
|
||||
}
|
||||
::v-deep .van-tabs__wrap {
|
||||
height: 70px;
|
||||
}
|
||||
::v-deep .van-badge--fixed {
|
||||
color: var(--badgeTextCoior);
|
||||
background: none;
|
||||
top: 30px;
|
||||
right: 50%;
|
||||
font-size: 13px;
|
||||
}
|
||||
::v-deep .van-badge {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
@ -1,115 +0,0 @@
|
||||
<template>
|
||||
<div class="tabsBox">
|
||||
<van-tabs v-model:active="active" title-active-color="#3e6ee8" color="#3e6ee8" @click="onChange"
|
||||
:background="themeType == 'light' ? '#fff' : '#041634'"
|
||||
:title-inactive-color="themeType == 'light' ? '#333' : '#fff'">
|
||||
<van-tab v-for="(item, index) in Tabslist" :key="index" :name="index" :title="item.name"
|
||||
:badge="item.count"></van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import axios from "axios";
|
||||
import { baseUrl2 } from "../../utils/request";
|
||||
import { dateFormat } from "../../utils/tools.js";
|
||||
import { ref, defineProps, reactive, defineEmits, onMounted, watch } from "vue";
|
||||
const active = ref(0);
|
||||
const emits = defineEmits(["TabsItem"]);
|
||||
const themeType = ref("light");
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
});
|
||||
watch(
|
||||
() => props.status, (val) => {
|
||||
active.value = val - 1
|
||||
}, {
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
const Tabslist = ref([
|
||||
{ name: "总警情", count: 0 },//0
|
||||
{ name: "重大警情", count: 0 },//1
|
||||
{ name: "违法犯罪", count: 0 },//2
|
||||
{ name: "行政", count: 0 },//3
|
||||
{ name: "刑事", count: 0 },//4
|
||||
{ name: "盗窃三车", count: 0 },//5
|
||||
{ name: "扒窃", count: 0 },//6
|
||||
{ name: "车财", count: 0 },//7
|
||||
{ name: "两抢", count: 0 },//8
|
||||
{ name: "汽车", count: 0 },//9
|
||||
{ name: "入盗", count: 0 },//10
|
||||
{ name: "电诈", count: 0 },//11
|
||||
{ name: "纠纷", count: 0 },//12
|
||||
{ name: "求助", count: 0 },//13
|
||||
{ name: "其他", count: 0 },//14
|
||||
]);
|
||||
|
||||
onMounted(() => {
|
||||
getCount()
|
||||
})
|
||||
// 点击tabs
|
||||
function onChange(e) {
|
||||
emits('TabsItem', active.value)
|
||||
}
|
||||
|
||||
function getCount(type) {
|
||||
let data = {
|
||||
orgId: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptCode,
|
||||
startTime: `${dateFormat("z")} 16:00:00`,
|
||||
endTime: `${dateFormat()} 16:00:00`,
|
||||
type: 1,
|
||||
keyword: "",
|
||||
};
|
||||
axios.post(`${baseUrl2}/xz1Api/api/alarm/count`, data).then((res) => {
|
||||
if (res.data) {
|
||||
Tabslist.value[0].count = res.data.data.total //总警情
|
||||
Tabslist.value[1].count = res.data.data.zdCount //重大警情
|
||||
Tabslist.value[2].count = res.data.data.wffzCount //违法犯罪
|
||||
Tabslist.value[3].count = res.data.data.xzCount //行政
|
||||
Tabslist.value[4].count = res.data.data.xsCount //刑事
|
||||
Tabslist.value[5].count = res.data.data.dqscCount //盗窃三车
|
||||
Tabslist.value[6].count = res.data.data.pqCount //扒窃
|
||||
Tabslist.value[7].count = res.data.data.ccCount //车财
|
||||
Tabslist.value[8].count = res.data.data.lqCount //两抢
|
||||
Tabslist.value[9].count = res.data.data.qcCount //汽车
|
||||
Tabslist.value[10].count = res.data.data.rdCount //入盗
|
||||
Tabslist.value[11].count = res.data.data.dzCount //电诈
|
||||
Tabslist.value[12].count = res.data.data.jfCount //纠纷
|
||||
Tabslist.value[13].count = res.data.data.qzCount //求助
|
||||
Tabslist.value[14].count = res.data.data.qtCount //其他
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.tabsBox {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include bg_color($background-color-theme);
|
||||
margin-top: 8.5vw;
|
||||
}
|
||||
|
||||
::v-deep .van-tabs__wrap {
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
::v-deep .van-badge--fixed {
|
||||
color: var(--badgeTextCoior);
|
||||
background: none;
|
||||
top: 30px;
|
||||
right: 50%;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
::v-deep .van-badge {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<van-tabs
|
||||
v-model:active="timeActive"
|
||||
@click-tab="onChange"
|
||||
type="card"
|
||||
title-active-color="#fff"
|
||||
:color="thColor"
|
||||
:title-inactive-color="inactive"
|
||||
>
|
||||
<van-tab v-for="item in list" :title="item" :key="item"> </van-tab>
|
||||
</van-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "tabs",
|
||||
props: {
|
||||
//主题色
|
||||
thColor: {
|
||||
type: String,
|
||||
default: "#3e6ee8",
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: ["今日", "近7日", "近30日", "近90日"],
|
||||
},
|
||||
inactive: {
|
||||
type: String,
|
||||
default: " #333",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timeActive: 0,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.$emit("chenge:time", this.timeActive);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
</style>
|
||||
@ -1,193 +0,0 @@
|
||||
<template>
|
||||
<div class="topIconBox">
|
||||
<template v-for="item in props.list" : :key="item.id">
|
||||
<div v-if="item.bkmc == '报备'" @click="clickNav()">
|
||||
<img src="../assets/images/leader/top_bb.png" /><br />{{isBb ? "已报备" : "报备打卡" }}
|
||||
</div>
|
||||
<div v-if="item.bkmc == '特殊报备'" @click="clickTsbb()">
|
||||
<img src="../assets/images/leader/top_bb.png" /><br />特殊报备
|
||||
</div>
|
||||
<div v-if="item.bkmc == '指令'" @click="onClickZl()">
|
||||
<img src="../assets/images/leader/top_zl.png" /><br />指令
|
||||
</div>
|
||||
<div v-if="item.bkmc == '盘人'" @click="clickPc('pr')">
|
||||
<img src="../assets/images/menu-yyhc.png" /><br />盘人
|
||||
</div>
|
||||
<div v-if="item.bkmc == '盘车'" @click="clickPc('pc')">
|
||||
<img src="../assets/images/menu-clhc.png" /><br />盘车
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import emitter from "../utils/eventBus.js";
|
||||
import { getXfqListById,getKfdListById } from "../api/xfbbAndZbbb.js";
|
||||
import { getMybbTodayNew } from "../api/common";
|
||||
import { ContactList } from "vant";
|
||||
import { ref, reactive, onMounted, defineEmits,onUnmounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getItem } from "../utils/storage";
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
list: Array, //展示数据
|
||||
pcType: Object, //盘查类型,
|
||||
kkid: String,
|
||||
kkmc: String,
|
||||
xzList: Array, //巡组数据,如果有巡组数据 显示已报备
|
||||
});
|
||||
const emit = defineEmits(["onPcTypeShow"]);
|
||||
const userInfo = ref({});
|
||||
const userInfoAs = getItem("userInfo");
|
||||
const isBb = ref(false); //报备数据
|
||||
const bbxx = ref({}); //报备数据
|
||||
onMounted(() => {
|
||||
_getBbInfo();
|
||||
try {
|
||||
userInfo.value = JSON.parse(bridge.getLocation());
|
||||
} catch (error) {}
|
||||
});
|
||||
|
||||
//获取用户的报备信息
|
||||
function _getBbInfo() {
|
||||
emitter.emit("deletePointArea", "kfd");
|
||||
emitter.emit("deletePointArea", "kfdArea");
|
||||
getMybbTodayNew().then((res) => {
|
||||
bbxx.value = res;
|
||||
if (res) {
|
||||
userInfoAs.bbId = res.id;
|
||||
userInfoAs.jzId = res.jzId;
|
||||
userInfoAs.jzMc = res.jzMc;
|
||||
if (res.xffwlx == 1) {
|
||||
let ids = res.xffwid.split(',')
|
||||
ids.forEach(item => {
|
||||
_getXfqList(item,'xfq') //巡防区
|
||||
});
|
||||
|
||||
} else if (res.xffwlx == 2) {
|
||||
_getKfdList(res.xffwid,'kfd')
|
||||
} else if (res.xffwlx == 3) {
|
||||
_getKfdList(res.xffwid,'jcz')
|
||||
}
|
||||
localStorage.setItem('GET_BBINFO',JSON.stringify(res))
|
||||
setStorage("userInfo", JSON.stringify(userInfoAs));
|
||||
}else{
|
||||
window.localStorage.removeItem('GET_BBINFO')
|
||||
}
|
||||
isBb.value = res ? true : false;
|
||||
});
|
||||
}
|
||||
|
||||
// 巡防区
|
||||
function _getXfqList(id) {
|
||||
getXfqListById(id).then((res) => {
|
||||
let list = res.pgis ? res.pgis : []
|
||||
let arrString = list.join(',')
|
||||
emitter.emit("polygonFigure", { coords: [arrString], flag:'kfdArea', color: '#ff0000'});
|
||||
});
|
||||
}
|
||||
//获取快反点数据
|
||||
function _getKfdList(id,type) {
|
||||
getKfdListById(id).then((res) => {
|
||||
if(type == 'kfd'){
|
||||
let yfz = res.yfzfw ? res.yfzfw : []
|
||||
emitter.emit("polygonFigure", { coords: [yfz.join(',')], flag:'kfdArea', color: '#ff0000',opacity:0.5});
|
||||
let sfz = res.yfzfw ? res.sfzfw : []
|
||||
emitter.emit("polygonFigure", { coords: [sfz.join(',')], flag:'kfdArea', color: '#fdae2e',opacity:0.3});
|
||||
let wfz = res.yfzfw ? res.wfzfw : []
|
||||
emitter.emit("polygonFigure", { coords: [wfz.join(',')], flag:'kfdArea', color: '#0066ff',opacity:0.1});
|
||||
}else{
|
||||
let icon = require("@/assets/pointIcon/kfd.png")
|
||||
emitter.emit("addPointArea", { coords: [res], flag:'kfd', icon: icon});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//代办任务
|
||||
function onClickDbrw() {
|
||||
router.replace("/rw");
|
||||
}
|
||||
//今日勤务
|
||||
function onClickJrqw() {
|
||||
router.push("/qwCenter");
|
||||
}
|
||||
//今日预警
|
||||
function onClickJryj() {
|
||||
router.push("/jqfx");
|
||||
}
|
||||
function onClickTz() {
|
||||
let user = JSON.parse(window.localStorage.getItem("userInfo"));
|
||||
try {
|
||||
bridge.to3RdPage(
|
||||
`sjzh/index.html?idCard=${user.idEntityCard}&page=orderList`
|
||||
);
|
||||
} catch (error) {}
|
||||
}
|
||||
function onClickZl() {
|
||||
if (props.kkid) {
|
||||
router.push({ path: "/lmjHome/zlJcz", query: { kkid: props.kkid } });
|
||||
} else {
|
||||
router.push("/yyzx/zlzx/zlzxIndex");
|
||||
// try {
|
||||
// bridge.to3RdPage(
|
||||
// `sjzh/index.html?idCard=${userInfo.value.app_sfzh}&page=orderList`
|
||||
// );
|
||||
// } catch (error) {}
|
||||
}
|
||||
}
|
||||
//点击盘车人员与车辆
|
||||
function clickPc(type) {
|
||||
emit("onPcTypeShow", type);
|
||||
}
|
||||
//跳转页面
|
||||
function clickNav() {
|
||||
if (bbxx.value && bbxx.value.bblx == "02") {
|
||||
router.push("/yyzx/xfbb/addtsXfbb");
|
||||
} else {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
}
|
||||
}
|
||||
// 特殊报备
|
||||
function clickTsbb(){
|
||||
router.push("/yyzx/xfbb/addtsXfbb");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.topIconBox {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 2vw 4vw;
|
||||
position: relative;
|
||||
@include font_color($font-color-theme);
|
||||
margin: 3vw 3.5vw 0vw 3.5vw;
|
||||
border-radius: 2.5vw;
|
||||
@include bg_color($background-color-theme);
|
||||
@include border_outer_color($border-outer-color-theme);
|
||||
}
|
||||
|
||||
.topIconBox > div {
|
||||
text-align: center;
|
||||
font-size: 3.06667vw;
|
||||
line-height: 5vw;
|
||||
width: 15vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.topIconBox > div .numb {
|
||||
position: absolute;
|
||||
height: 4.54vw;
|
||||
line-height: 4.54vw;
|
||||
padding: 0 1.5vw;
|
||||
font-size: 3.2vw;
|
||||
display: block;
|
||||
background: #f85452;
|
||||
border-radius: 2.27vw;
|
||||
left: 10vw;
|
||||
top: -1vw;
|
||||
}
|
||||
|
||||
.topIconBox > div img {
|
||||
width: 11.46667vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<ul class="statics-rwzx">
|
||||
<li class="item item_box" v-for="item in list" :key="item">
|
||||
<div class="title">{{ item.title }}</div>
|
||||
<div class="number numb">{{ item.count }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, onMounted, defineProps } from "vue";
|
||||
const props = defineProps({
|
||||
list: Array,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.statics-rwzx {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 2vw 3vw 1vw 3vw;
|
||||
.item {
|
||||
width: 31.3%;
|
||||
border-radius: 2vw;
|
||||
overflow: hidden;
|
||||
margin-bottom: 4vw;
|
||||
.title {
|
||||
height: 7vw;
|
||||
text-align: center;
|
||||
line-height: 7vw;
|
||||
@include font_size($font_medium_s);
|
||||
background: #3e6ee8;
|
||||
color: #fff;
|
||||
}
|
||||
.number {
|
||||
height: 10vw;
|
||||
text-align: center;
|
||||
line-height: 10vw;
|
||||
}
|
||||
}
|
||||
li:nth-child(3n + 2) {
|
||||
margin-left: 3%;
|
||||
margin-right: 3%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,86 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box" @click="onGoDetail">
|
||||
<div class="time_box">
|
||||
<span>
|
||||
<span class="title bule">{{ item.caseTypeName }}</span>
|
||||
<van-tag type="success">{{ item.statusName }}</van-tag>
|
||||
</span>
|
||||
<span> {{ item.alarmTime }}</span>
|
||||
</div>
|
||||
<span> </span>
|
||||
<div class="title">{{ item.jqnr }}</div>
|
||||
<div class="item">
|
||||
<span class="address_box">位置</span>
|
||||
<span> {{ item.alarmAddress }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span>派出所:{{ item.orgName + "_" + item.gridName }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
报警内容:<span class="bjnr">{{ item.alarmContent }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from "../router/index.js";
|
||||
import { defineProps, ref } from "vue";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: { type: String, default: false }, //跳转详情的路由
|
||||
});
|
||||
//跳转
|
||||
function onGoDetail() {
|
||||
if (!props.path) {
|
||||
return false;
|
||||
}
|
||||
router.push({
|
||||
path: props.path,
|
||||
query: { item: JSON.stringify(props.item) },
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
// margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw 3vw;
|
||||
margin-bottom: 1.5vw;
|
||||
background: #f6f8fd;
|
||||
// @include item_bottom_color($bottom-border-top-clore-theme);
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 600;
|
||||
}
|
||||
.item {
|
||||
line-height: 6vw;
|
||||
}
|
||||
.list_box:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
.jjy_box {
|
||||
display: inline-block;
|
||||
margin-left: 5vw;
|
||||
}
|
||||
.bjnr {
|
||||
font-weight: 600;
|
||||
}
|
||||
.address_box {
|
||||
background: #3bc2b5;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
padding: 0 8px;
|
||||
border-radius: 10px;
|
||||
height: 17px;
|
||||
line-height: 18.5px;
|
||||
}
|
||||
</style>
|
||||
@ -1,510 +0,0 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<!-- <div class="mapMs" @click="onClick7Day">近7日轨迹</div> -->
|
||||
<!-- 人员 -->
|
||||
<div class="trailList" v-if="listData.length > 0 && sfzh">
|
||||
<div class="total_sl_box">
|
||||
累计预警 <span class="total_sl">{{ total }}</span
|
||||
>次
|
||||
</div>
|
||||
<div
|
||||
class="item ry_item"
|
||||
v-for="(item, index) in listData"
|
||||
:key="index"
|
||||
:class="{
|
||||
red: item.yj_jb == 10,
|
||||
orange: item.yj_jb == 20,
|
||||
yellow: item.yj_jb == 30,
|
||||
blue: item.yj_jb == 40,
|
||||
}"
|
||||
>
|
||||
<div class="warning_time">
|
||||
<img class="timeicon" src="../assets/images/time@2x.png" />
|
||||
<span>{{ item.yj_sj }}</span>
|
||||
</div>
|
||||
<div class="detail_info">
|
||||
<div class="ryImg_box">
|
||||
<!-- 预警图片 -->
|
||||
<van-image
|
||||
width="100px"
|
||||
height="90px"
|
||||
:class="_getBase64(item)"
|
||||
@click.stop="ImagePreview([item.yj_xtp])"
|
||||
:src="item.yj_xtp"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<!-- 预警库图片 -->
|
||||
<van-image
|
||||
width="100px"
|
||||
height="90px"
|
||||
:class="_getBase64(item)"
|
||||
@click.stop="ImagePreview([item.cover_image])"
|
||||
:src="item.cover_image"
|
||||
style="margin-left: 3vw"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div class="waring_detail">
|
||||
<div>
|
||||
<span style="font-size: 4vw">{{ item.yj_ryxm }}</span>
|
||||
<span style="margin-left: 2vw">{{ item.yj_rysfzh }}</span>
|
||||
<span style="color: #ffa500; margin-left: 10px"
|
||||
>相似{{ item.yj_xsd * 100 }}%</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="yjlx_type"
|
||||
:class="{
|
||||
bqred: item.yj_jb == 10,
|
||||
bqorange: item.yj_jb == 20,
|
||||
bqyellow: item.yj_jb == 30,
|
||||
bqblue: item.yj_jb == 40,
|
||||
}"
|
||||
>
|
||||
{{ item.yjly_bqmc }}
|
||||
</div>
|
||||
<!-- <div class="">{{ item.yj_gzymc }}</div> -->
|
||||
<div class="">{{ item.yj_nr }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 车辆 -->
|
||||
<div class="trailList" v-if="listData.length > 0 && hphm">
|
||||
<div class="total_sl_box">
|
||||
累计预警 <span class="total_sl">{{ total }}</span
|
||||
>次
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
v-for="(item, index) in listData"
|
||||
:key="index"
|
||||
:class="{ blue: true }"
|
||||
>
|
||||
<div class="warning_time">
|
||||
<img class="timeicon" src="../assets/images/time@2x.png" />
|
||||
<span>{{ item.yj_sj }}</span>
|
||||
</div>
|
||||
<div class="detail_info detail_car">
|
||||
<van-image
|
||||
width="220px"
|
||||
height="80px"
|
||||
fit="contain"
|
||||
:class="_getBase64(item)"
|
||||
@click.stop="ImagePreview([item.yj_xtp])"
|
||||
:src="item.yj_xtp"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="waring_detail">
|
||||
<div class="bp_box">
|
||||
<span style="font-size: 4vw">{{ item.yj_clcph }}</span>
|
||||
<span class="clbq bqblue">{{ item.yjly_bqmc }}</span>
|
||||
</div>
|
||||
|
||||
<div class="">{{ item.yj_gzymc }}</div>
|
||||
<div class="">{{ item.yj_nr }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
dateFormat,
|
||||
timeValidate,
|
||||
getRecentDay,
|
||||
getnRencebtMonth,
|
||||
getBase64,
|
||||
} from "../utils/tools.js";
|
||||
import { notUrlGetData } from "../api/notUrlRequest.js";
|
||||
import { hintToast } from "../utils/tools.js";
|
||||
import emitter from "../utils/eventBus.js";
|
||||
import { ImagePreview } from "vant";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
loading: true,
|
||||
ryhdDay: "", //人员时间类型
|
||||
showEmpty: false,
|
||||
sfzh: "", //身份证
|
||||
hphm: "", //车牌号
|
||||
clTime: "", //车辆时间类型
|
||||
options: null,
|
||||
total: 0, //统计预警
|
||||
ssbmdm: "", //所属部门代码
|
||||
scry: "", //三车人员
|
||||
baseUrl: this.baseUrl2,
|
||||
urls1: [], //图片放大
|
||||
params: "",
|
||||
showMap: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
let item = JSON.parse(this.$route.query.item);
|
||||
this.options = item;
|
||||
this.ryhdDay = item.time;
|
||||
this.sfzh = item.yj_rysfzh;
|
||||
this.hphm = item.yj_clcph;
|
||||
this.clTime = item.clTime;
|
||||
this.ssbmdm = item.ssbmdm;
|
||||
this.scry = item.type;
|
||||
this.showMap = true;
|
||||
if (this.scry == "scry") {
|
||||
this._getScryyjData();
|
||||
} else if (this.sfzh) {
|
||||
this._getRyyjData();
|
||||
} else {
|
||||
this._getCltjData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//跳转七日轨迹
|
||||
// onClick7Day() {
|
||||
// if (this.options.sfzh) {
|
||||
// let { sfzh } = this.options;
|
||||
// uni.navigateTo({
|
||||
// url: `../ryyjTop5AndMap/ryyjTop5AndMap?sfzh=${sfzh}&is7Day=近7日预警轨迹&time=近7日${
|
||||
// this.ssbmdm ? "&ssbmdm=" + this.ssbmdm : ""
|
||||
// }`,
|
||||
// });
|
||||
// } else {
|
||||
// let { hphm } = this.options;
|
||||
// uni.navigateTo({
|
||||
// url: `../ryyjTop5AndMap/ryyjTop5AndMap?hphm=${hphm}&is7Day=近7日预警轨迹&clTime=近7日${
|
||||
// this.ssbmdm ? "&ssbmdm=" + this.ssbmdm : ""
|
||||
// }`,
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
//获取base64地址
|
||||
_getBase64(item) {
|
||||
getBase64((res) => {
|
||||
item.baseUrl = res;
|
||||
}, item.cover_image || item.yj_xtp);
|
||||
},
|
||||
//车辆预警
|
||||
_getCltjData() {
|
||||
this.loading = true;
|
||||
this.listData = [];
|
||||
let points = [];
|
||||
if (this.hphm == "未知") {
|
||||
hintToast("车牌号异常!!!");
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
hphm: this.hphm,
|
||||
};
|
||||
let url = "";
|
||||
switch (this.clTime) {
|
||||
case "今日":
|
||||
data.kssj = timeValidate(new Date(), "ymd") + " 00:00:00";
|
||||
data.jssj = timeValidate(new Date(), "ymd") + " 23:59:59";
|
||||
url = "/yjxx/yjcl/queryBycCphmlb";
|
||||
break;
|
||||
case "近7日":
|
||||
data.kssj = getRecentDay(-7);
|
||||
data.jssj = timeValidate(new Date());
|
||||
url = "/yjxx/yjcl/queryBycCphmlb";
|
||||
break;
|
||||
case "近7周":
|
||||
data.kssj = getRecentDay(-49);
|
||||
data.jssj = timeValidate(new Date());
|
||||
url = "/yjxx/yjcl/zqueryBycCphmlb";
|
||||
break;
|
||||
default:
|
||||
data.ksny = getnRencebtMonth(6);
|
||||
data.jsny = getnRencebtMonth(0);
|
||||
url = "/yjxx/yjcl/yqueryBycCphmlb";
|
||||
break;
|
||||
}
|
||||
notUrlGetData(`/mosty-yjzl${url}`, data).then((res) => {
|
||||
this.loading = false;
|
||||
if (res) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].jd && res[i].wd) {
|
||||
points.push({
|
||||
jd: res[i].jd,
|
||||
wd: res[i].wd,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.listData = [res[0]];
|
||||
emitter.emit("addPointArea", {
|
||||
coords: points,
|
||||
icon: require("../assets/pointIcon/icon-jq.png"),
|
||||
flag: "cl_yj",
|
||||
});
|
||||
this.total = points.length;
|
||||
}
|
||||
});
|
||||
},
|
||||
//查询人员预警总数
|
||||
_getRyyjData() {
|
||||
this.loading = true;
|
||||
this.ryyjList = [];
|
||||
let points = [];
|
||||
let data = {
|
||||
sfzh: this.sfzh,
|
||||
ssbmdm: this.ssbmdm,
|
||||
};
|
||||
let url = "";
|
||||
switch (this.ryhdDay) {
|
||||
case "今日":
|
||||
data.kssj = timeValidate(new Date(), "ymd") + " 00:00:00";
|
||||
data.jssj = timeValidate(new Date(), "ymd") + " 23:59:59";
|
||||
url = "/yjxx/yjry/queryBySfzhlb";
|
||||
break;
|
||||
case "近7日":
|
||||
data.kssj = getRecentDay(-7);
|
||||
data.jssj = timeValidate(new Date());
|
||||
url = "/yjxx/yjry/queryBySfzhlb";
|
||||
break;
|
||||
case "近7周":
|
||||
data.kssj = getRecentDay(-49);
|
||||
data.jssj = timeValidate(new Date());
|
||||
url = "/yjxx/yjry/zqueryBySfzhlb";
|
||||
break;
|
||||
default:
|
||||
data.ksny = getnRencebtMonth(6);
|
||||
data.jsny = getnRencebtMonth(0);
|
||||
url = "/yjxx/yjry/yqueryBySfzhlb";
|
||||
break;
|
||||
}
|
||||
notUrlGetData(`/mosty-yjzl${url}`, data).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].jd && res[i].wd) {
|
||||
points.push({
|
||||
jd: res[i].jd,
|
||||
wd: res[i].wd,
|
||||
});
|
||||
}
|
||||
}
|
||||
this.listData = [res[0]];
|
||||
emitter.emit("addPointArea", {
|
||||
coords: points,
|
||||
icon: require("../assets/pointIcon/icon-jq.png"),
|
||||
flag: "ry_yj",
|
||||
});
|
||||
this.total = points.length;
|
||||
}
|
||||
});
|
||||
},
|
||||
//查询三车人员预警总数
|
||||
_getScryyjData() {
|
||||
this.loading = true;
|
||||
this.ryyjList = [];
|
||||
let points = [];
|
||||
let data = {
|
||||
sfzh: this.sfzh,
|
||||
ssbmdm: this.ssbmdm ? this.ssbmdm : "",
|
||||
};
|
||||
let url = "";
|
||||
switch (this.ryhdDay) {
|
||||
case "今日":
|
||||
data.kssj = timeValidate(new Date(), "ymd") + " 00:00:00";
|
||||
data.jssj = timeValidate(new Date(), "ymd") + " 23:59:59";
|
||||
url = "/yjxx/yjry/queryBySfzhlbsc";
|
||||
break;
|
||||
case "近7日":
|
||||
data.kssj = getRecentDay(-7);
|
||||
data.jssj = timeValidate(new Date());
|
||||
url = "/yjxx/yjry/queryBySfzhlbsc";
|
||||
break;
|
||||
case "近7周":
|
||||
data.kssj = getRecentDay(-49);
|
||||
data.jssj = timeValidate(new Date());
|
||||
url = "/yjxx/yjry/zqueryBySfzhlbsc";
|
||||
break;
|
||||
default:
|
||||
data.ksny = getnRencebtMonth(6);
|
||||
data.jsny = getnRencebtMonth(0);
|
||||
url = "/yjxx/yjry/yqueryBySfzhlbsc";
|
||||
break;
|
||||
}
|
||||
notUrlGetData(`/mosty-yjzl${url}`, data).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.data) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].imgUrl = res.data[i].cover_image;
|
||||
res.data[i].imgUrlLeng = JSON.parse(res.data[i].yj_xtp).url;
|
||||
if (res.data[i].jd && res.data[i].wd) {
|
||||
points.push({
|
||||
jd: res.data[i].jd,
|
||||
wd: res.data[i].wd,
|
||||
});
|
||||
}
|
||||
}
|
||||
points.splice(145);
|
||||
this.total = points.length;
|
||||
res.data[0].imgUrl = res.data[0].imgUrl.replace(
|
||||
"http://80.35.1.70:30080",
|
||||
this.baseUrl
|
||||
);
|
||||
res.data[0].imgUrlLeng = res.data[0].imgUrlLeng.replace(
|
||||
"http://80.35.1.147:10222",
|
||||
this.baseUrl
|
||||
);
|
||||
this.listData = [res.data[0]];
|
||||
this.params = `?data=${encodeURIComponent(JSON.stringify(points))}`;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "../assets/styles/mixin.scss";
|
||||
::v-deep .u-popup__content {
|
||||
background: #09224d;
|
||||
}
|
||||
|
||||
.total_sl_box {
|
||||
font-size: 3vw;
|
||||
position: absolute;
|
||||
right: 5vw;
|
||||
top: 3vw;
|
||||
}
|
||||
|
||||
.total_sl {
|
||||
display: inline-block;
|
||||
margin: 0 2vw;
|
||||
color: #fc011a;
|
||||
font-size: 5vw;
|
||||
}
|
||||
|
||||
.trailList {
|
||||
position: relative;
|
||||
@include font_color($font-color-theme);
|
||||
@include bg_color($background-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
border-top-left-radius: 1vw;
|
||||
border-top-right-radius: 1vw;
|
||||
.item {
|
||||
padding: 3vw;
|
||||
|
||||
.warning_time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img.timeicon {
|
||||
width: 2.93334vw;
|
||||
height: 2.93334vw;
|
||||
margin-right: 1vw;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
span {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// display: flex;
|
||||
// justify-content: space-between;
|
||||
// align-items: center;
|
||||
|
||||
.warning_type {
|
||||
background-color: #4cbaff;
|
||||
padding: 0.5vw 2vw;
|
||||
font-size: 12px;
|
||||
border-radius: 0.8vw;
|
||||
}
|
||||
}
|
||||
|
||||
.detail_info {
|
||||
// display: flex;
|
||||
margin-top: 2vw;
|
||||
|
||||
.ryImg_box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.carImg {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.waring_detail {
|
||||
margin-left: 2vw;
|
||||
|
||||
.bp_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.clbq {
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
padding: 1px 5px;
|
||||
background: rgba(19, 125, 255, 0.4);
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
margin: 1.2vw 0;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 4.26667vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.red {
|
||||
box-shadow: inset 0px 0px 2.66667vw 0px #ed0000 !important;
|
||||
}
|
||||
|
||||
.orange {
|
||||
box-shadow: inset 0px 0px 2.66667vw 0px #ffa500 !important;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
box-shadow: inset 0px 0px 2.66667vw 0px #ffcc40 !important;
|
||||
}
|
||||
|
||||
.blue {
|
||||
box-shadow: inset 0px 0px 2.66667vw 0px #63acff !important;
|
||||
}
|
||||
|
||||
.green {
|
||||
box-shadow: inset 0px 0px 15px 0px #1cd66c !important;
|
||||
}
|
||||
.detail_car {
|
||||
display: flex;
|
||||
}
|
||||
.yjlx_type {
|
||||
display: inline;
|
||||
font-size: 10px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
}
|
||||
.bqred {
|
||||
background: #ed0000;
|
||||
}
|
||||
.bqorange {
|
||||
background: #ffa500;
|
||||
}
|
||||
.bqyellow {
|
||||
background: #ffcc40;
|
||||
}
|
||||
.bqblue {
|
||||
background: #63acff;
|
||||
}
|
||||
</style>
|
||||
@ -1,101 +0,0 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2023-02-01 14:25:29
|
||||
* @LastEditTime: 2023-02-02 14:32:40
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \app-template(泸州)\src\components\yjzlItem.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="yjzlItem-box">
|
||||
<div class="time"><van-icon name="clock-o" />{{props.data.warnningTime}}</div>
|
||||
<div class="info">
|
||||
<div class="item-tip">
|
||||
<span class="status"
|
||||
:class="props.data.alarmStatus.desc == '待处理'?'colorRed':''"
|
||||
>{{props.data.alarmStatus.desc}}</span>
|
||||
<span class="bq"><span class="sircle"></span> {{props.data.label}}</span>
|
||||
</div>
|
||||
<div class="itemitem">
|
||||
<span><van-icon name="coupon-o" />{{props.data.plateNumber}}</span>
|
||||
<span class="name"><van-icon name="user-o" />{{props.data.userName}}</span>
|
||||
</div>
|
||||
<div class="itemitem">
|
||||
<span><van-icon name="coupon-o" />{{props.data.checkName}}</span>
|
||||
</div>
|
||||
<div class="itemitem">
|
||||
<span
|
||||
><van-icon
|
||||
name="location-o"
|
||||
/>{{props.data.activityAddress}}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, defineProps } from "vue";
|
||||
const props = defineProps({
|
||||
data: Object,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.yjzlItem-box {
|
||||
padding: 3vw 4vw;
|
||||
box-sizing: border-box;
|
||||
.time {
|
||||
font-size: 16px;
|
||||
.van-icon-clock-o {
|
||||
margin-right: 2vw;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.info {
|
||||
background-color: rgba(241, 241, 241, 0.5);
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
.item-tip {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
.status {
|
||||
color: #3373fa;
|
||||
}
|
||||
.colorRed{
|
||||
color: red;
|
||||
}
|
||||
.bq {
|
||||
padding: 0 0.3125rem;
|
||||
border-radius: 100px 0 0 100px;
|
||||
background-color: #ffb139;
|
||||
color: #fff;
|
||||
font-size: 0.875rem;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
.sircle {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
margin-right: 1vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.itemitem {
|
||||
font-size: 0.875rem;
|
||||
color: #999;
|
||||
line-height: 6vw;
|
||||
.van-icon {
|
||||
margin-right: 1vw;
|
||||
}
|
||||
.name {
|
||||
margin-left: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,128 +0,0 @@
|
||||
<template>
|
||||
<div class="yyzx_item_box">
|
||||
<div class="top_title">
|
||||
<div class="strip_box">
|
||||
<span class="strip"></span>
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<div class="zd_icon_box" @click.stop="onClickZd">
|
||||
<van-icon name="arrow-down" :class="isZd ? 'is_zd' : 'no_zd'" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="function_item_box" v-show="isZd">
|
||||
<div
|
||||
class="function_item"
|
||||
v-for="item in list"
|
||||
:key="item"
|
||||
@click="onClickSkip(item.path)"
|
||||
>
|
||||
<img :src="item.imgUrl" alt="" style="width: 55px; height: 55px" />
|
||||
<div class="item_name">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import emitter from "../utils/eventBus.js";
|
||||
import { onBeforeRouteLeave } from "vue-router";
|
||||
const props = defineProps({
|
||||
title: String, //左侧标题
|
||||
list: Array, //展示数据
|
||||
});
|
||||
const activeNames = ref(["1"]);
|
||||
const isZd = ref(true); //是否折叠 true 不折叠
|
||||
const router = useRouter();
|
||||
//点击折叠
|
||||
function onClickZd() {
|
||||
isZd.value = !isZd.value;
|
||||
}
|
||||
//跳转页面
|
||||
function onClickSkip(url) {
|
||||
switch (url) {
|
||||
case "pr":
|
||||
emitter.emit("onClickPc", url);
|
||||
break;
|
||||
case "pc":
|
||||
emitter.emit("onClickPc", url);
|
||||
break;
|
||||
case "/dhcr":
|
||||
emitter.emit("onClickPc", url);
|
||||
break;
|
||||
case "rhjs":
|
||||
try {
|
||||
bridge.toFusionComputing();
|
||||
} catch (error) {}
|
||||
break;
|
||||
case "rw":
|
||||
router.replace("/rw");
|
||||
break;
|
||||
default:
|
||||
router.push(url);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.yyzx_item_box {
|
||||
@include font_color($font-color-theme);
|
||||
|
||||
padding: 3vw;
|
||||
|
||||
.top_title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.strip_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.strip {
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 14px;
|
||||
background-color: #1989fa;
|
||||
margin-right: 2vw;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
.zd_icon_box {
|
||||
width: 30px;
|
||||
height: 20px;
|
||||
text-align: right;
|
||||
// transition: 1.5s;
|
||||
}
|
||||
|
||||
.is_zd {
|
||||
transform: rotate(-180deg);
|
||||
transition: 1s;
|
||||
}
|
||||
|
||||
.no_zd {
|
||||
transition: 1s;
|
||||
}
|
||||
}
|
||||
|
||||
.function_item_box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.function_item {
|
||||
// border: 1px solid red;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
margin-top: 4vw;
|
||||
|
||||
.item_name {
|
||||
margin-top: 1.5vw;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,163 +0,0 @@
|
||||
<template>
|
||||
<div class="list_box" @click="onGoDetail">
|
||||
<van-image width="80px" height="85px" :src="baseUrl" style="flex: 1" @click.stop="onClickImg(baseUrl)"
|
||||
v-if="baseUrl">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="detail_box">
|
||||
<div class="time_box" :style="{ marginLeft: item.zltp || item.tpId ? '2vw' : '0' }">
|
||||
<span>
|
||||
<van-icon name="clock-o" />
|
||||
 {{ item.zlfqsj || item.zlfssj }}
|
||||
</span>
|
||||
<span v-if="item.zldj">
|
||||
<van-tag type="danger" style="padding: 0.3vw 5vw; border-radius: 3vw" v-if="item.zldj == 10">红色</van-tag>
|
||||
<van-tag type="warning" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else-if="item.zldj == 20">橙色
|
||||
</van-tag>
|
||||
<van-tag color="#ffcc40" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else-if="item.zldj == 30">黄色
|
||||
</van-tag>
|
||||
<van-tag type="primary" style="padding: 0.3vw 5vw; border-radius: 3vw" v-else>蓝色</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="detail_item" :style="{ marginLeft: item.zltp || item.tpId ? '2vw' : '0' }">
|
||||
<div class="title text_title">{{ item.zlbt || item.zlBt }}</div>
|
||||
<!-- <div>
|
||||
{{ item.zlnr }}
|
||||
</div> -->
|
||||
<div class="ststus" v-if="item.dqzt" :class="{
|
||||
djc: true,
|
||||
yfk: item.dqzt == '01',
|
||||
ddc: item.dqzt == '94',
|
||||
ywj: item.dqzt == '92' || item.dqzt == '93',
|
||||
}">
|
||||
{{ setDict(item.dqzt, dict.D_BZ_ZXZTAI) }}
|
||||
</div>
|
||||
<div>发送人:{{ item.ssbm }}-{{ item.zlfqr }}</div>
|
||||
<div v-if="item.dqzt == '92'">
|
||||
指令完成时间:{{ GetDateDiff(item.zlfqsj, item.dqztSj, "m") }}分钟
|
||||
</div>
|
||||
<div v-if="item.zlfsdd">
|
||||
<van-icon name="location" size="15px" color="#3e6ee8"></van-icon>
|
||||
<span> {{ item.zlfsdd }}</span>
|
||||
</div>
|
||||
<img src="../assets/images/czwc.png" class="zwzl_box" v-if="item.dqzt == '92' || item.dqzt == '93'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDictList, setDict } from "../utils/dict";
|
||||
import { getBase64, GetDateDiff } from "../utils/tools.js";
|
||||
import router from "../router/index.js";
|
||||
import { defineProps, ref, watch } from "vue";
|
||||
import { ImagePreview } from "vant";
|
||||
const props = defineProps({
|
||||
item: Object, //列表内容
|
||||
path: String, //跳转详情的路由
|
||||
dict: {
|
||||
type: Object,
|
||||
default: {
|
||||
D_BZ_ZXZTAI: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
const baseUrl = ref("");
|
||||
watch(
|
||||
() => props.item,
|
||||
(newValue) => {
|
||||
if ((Object.keys(newValue).length > 0 && newValue.zltp) || newValue.tpId)
|
||||
_getBase64(newValue);
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
//预览图片
|
||||
function onClickImg(url) {
|
||||
ImagePreview([url]);
|
||||
}
|
||||
//跳转
|
||||
function onGoDetail() {
|
||||
router.push(`${props.path}`);
|
||||
}
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
baseUrl.value = res;
|
||||
}, item.zltp || item.tpId);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/styles/mixin.scss";
|
||||
|
||||
.list_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
margin: 0vw 2vw 2vw 2vw;
|
||||
padding: 2vw;
|
||||
display: flex;
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail_box {
|
||||
flex: 3.5;
|
||||
|
||||
.detail_item {
|
||||
position: relative;
|
||||
margin-top: 1vw;
|
||||
|
||||
>div {
|
||||
line-height: 5.5vw;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
@include font_size($font_medium);
|
||||
width: 100%;
|
||||
font-weight: 550;
|
||||
color: #507ce9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ststus {
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
border-radius: 1vw;
|
||||
display: inline;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
.dfk {
|
||||
color: rgb(242, 199, 6);
|
||||
border: 1px solid rgb(242, 199, 6);
|
||||
}
|
||||
|
||||
.yfk {
|
||||
color: #3e6ee8;
|
||||
border: 1px solid #3e6ee8;
|
||||
}
|
||||
|
||||
.ywj {
|
||||
color: #4fbe0d;
|
||||
border: 1px solid #4fbe0d;
|
||||
}
|
||||
|
||||
.ddc {
|
||||
color: orangered;
|
||||
border: 1px solid orangered;
|
||||
}
|
||||
|
||||
.djc {
|
||||
color: orange;
|
||||
border: 1px solid orange;
|
||||
}
|
||||
</style>
|
||||
@ -1,217 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="指令详情" :showRight="false" :showLeft="true" />
|
||||
<div class="detailBox">
|
||||
<div class="detailInfo">
|
||||
<div class="detailInfo-left">
|
||||
<!-- <div class="photo"><img :src="detailInfo.carImg" alt=""></div> -->
|
||||
<div class="photo"><img :src="detailInfo.photo" alt=""></div>
|
||||
<div class="title">预警</div>
|
||||
</div>
|
||||
<div class="detailInfo-right">
|
||||
<div class="info-item"><van-icon name="coupon-o" />{{detailInfo.plateNumber}}</div>
|
||||
<div class="info-item"><van-icon name="manager-o" />{{detailInfo.userName}}</div>
|
||||
<div class="info-item"><van-icon name="coupon-o" />{{detailInfo.checkName}}</div>
|
||||
<div class="info-item">
|
||||
<van-icon name="location-o" />{{detailInfo.activityAddress}}
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<van-icon name="clock-o" />{{detailInfo.time}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="liucheng">
|
||||
<Steps :data="stepsData">
|
||||
<template v-slot:default="{ scope }">
|
||||
<div class="content">
|
||||
<div class="cont_l" v-if="scope.isQsStatus == '01'">
|
||||
<span class="triangleleft"></span>
|
||||
<div class="status">待签收</div>
|
||||
<div class="btns">
|
||||
<span @click="handelEvents('reback')">拒绝</span>
|
||||
<span @click="handelEvents('receive')">签收</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_l" v-if="scope.isQsStatus == '02'">
|
||||
<span class="triangleleft"></span>
|
||||
<div class="text">已签收</div>
|
||||
<div class="text">
|
||||
<van-icon name="manager-o" />周瓜皮 特警大队
|
||||
</div>
|
||||
<div class="text">
|
||||
<van-icon
|
||||
name="location-o"
|
||||
/>成都市武侯区高新成都市武侯区高新公安局公安局
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_l" v-if="scope.isQsStatus == '03'">
|
||||
<span class="triangleleft"></span>
|
||||
<div class="text">
|
||||
<van-icon name="manager-o" />周瓜皮 特警大队
|
||||
</div>
|
||||
<div class="text">
|
||||
<van-icon
|
||||
name="location-o"
|
||||
/>成都市武侯区高新成都市武侯区高新公安局公安局
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Steps>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import Steps from "../../../components/Steps.vue";
|
||||
import { updateDetail,getyjzlInfoDetail } from "../../../api/checkponit.js";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { Form } from "vant";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const detailInfo = ref({})
|
||||
const stepsData = ref([
|
||||
{ time: route.query.time, isQsStatus: "01" },
|
||||
]);
|
||||
onMounted(() => {
|
||||
detailInfo.value = route.query
|
||||
getInfoDetail('01')
|
||||
});
|
||||
|
||||
// 签收
|
||||
function handelEvents(val){
|
||||
switch(val){
|
||||
case 'receive':
|
||||
getInfoDetail('02')
|
||||
break
|
||||
case 'reback':
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 指令详情
|
||||
function getDetail(zlId){
|
||||
getyjzlInfoDetail(zlId).then(res=>{
|
||||
})
|
||||
}
|
||||
|
||||
function getInfoDetail(zlztdm){
|
||||
let params = {
|
||||
zlztsj:route.query.time,
|
||||
zlztddxz:route.query.activityAddress,
|
||||
zlztddjd:route.query.jd,
|
||||
zlztddwd:route.query.wd,
|
||||
zlid:route.query.id,
|
||||
zlztbmdm:JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptCode,
|
||||
zlztbmmc:JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptName,
|
||||
zlztrysfzh:route.query.sfzh,
|
||||
zlztryxm:route.query.userName,
|
||||
ssfxjmc:'',
|
||||
ssfxjdm:'',
|
||||
ssdszmc:'',
|
||||
ssdszdm:'',
|
||||
zlztdm:zlztdm,
|
||||
}
|
||||
updateDetail(params).then(res=>{
|
||||
getDetail(route.query.id)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detailBox {
|
||||
background: #e9e9e9;
|
||||
height: calc(100vh - 13vw);
|
||||
padding: 2vw 4vw;
|
||||
box-sizing: border-box;
|
||||
.detailInfo {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
font-size: 14px;
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
.detailInfo-left {
|
||||
margin-right: 4vw;
|
||||
.photo {
|
||||
width: 90px;
|
||||
height: 110px;
|
||||
border: 1px solid #e9e9e9;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
line-height: 8vw;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.detailInfo-right {
|
||||
flex: 1;
|
||||
.info-item {
|
||||
line-height: 7vw;
|
||||
.van-icon {
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.liucheng {
|
||||
.content {
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
.cont_l {
|
||||
position: relative;
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
.status {
|
||||
line-height: 10vw;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.btns {
|
||||
display: flex;
|
||||
span {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin-top: 4vw;
|
||||
color: #3373fa;
|
||||
}
|
||||
span:nth-child(1) {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.triangleleft {
|
||||
position: absolute;
|
||||
left: -16px;
|
||||
top: 46%;
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 8px solid transparent;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
.text {
|
||||
line-height: 7vw;
|
||||
.van-icon {
|
||||
margin-right: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .main .item .item_l .icon {
|
||||
top: 50%;
|
||||
}
|
||||
::v-deep .main .item .item_l {
|
||||
padding-top: 13%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@ -1,365 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="指令列表" :showRight="false" :showLeft="true" />
|
||||
<div class="search">
|
||||
<div class="sort">
|
||||
<van-icon name="arrow-up" />
|
||||
<van-icon name="arrow-down" />
|
||||
时间排序
|
||||
</div>
|
||||
<span class="search-filter" @click="showRight = true">过滤筛选 <van-icon name="filter-o" /></span>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<ul class="listBox">
|
||||
<van-pull-refresh v-model="loadingPull" @refresh="onRefresh">
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="" @load="onLoad" offset="1"
|
||||
:immediate-check="false">
|
||||
<li class="listBox-item" v-for="(item, index) in yjList" :key="index" @click="handelDetail(item)">
|
||||
<YjzlItem :data="item" />
|
||||
</li>
|
||||
<van-empty description="暂无信息" image="default" v-if="yjList.length <= 0 && !loading" />
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</ul>
|
||||
|
||||
<!-- 弹出层 -->
|
||||
<van-popup v-model:show="showRight" position="right" :style="{ width: '60%', height: '100%' }">
|
||||
<div class="popup-content">
|
||||
<div class="popup-title">过滤筛选</div>
|
||||
<ul class="popup-box">
|
||||
<li class="popup-item yjlx-info">
|
||||
<van-field v-model="form.warnType" label-width="60px" label="预警类型:" readonly placeholder="请选择预警类型"
|
||||
@click.stop="chooseYjlx()"></van-field>
|
||||
|
||||
<ul class="select-box" v-if="showLx">
|
||||
<span class="triangleup"></span>
|
||||
<li class="select-box-li" :class="isActive == 0 ? 'active' : ''" @click="cilickLx(0)">
|
||||
车辆
|
||||
</li>
|
||||
<li class="select-box-li" :class="isActive == 1 ? 'active' : ''" @click="cilickLx(1)">
|
||||
人员
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="popup-item">
|
||||
<van-field v-model="form.beginDate" label-width="60px" label="开始时间:" input-align="left"
|
||||
placeholder="请选择开始时间" readonly @click.stop="onClickTime('start')"></van-field>
|
||||
</li>
|
||||
<li class="popup-item">
|
||||
<van-field v-model="form.endDate" label-width="60px" input-align="left" label="结束时间:"
|
||||
@click.stop="onClickTime('end')" placeholder="请选择结束时间" readonly></van-field>
|
||||
</li>
|
||||
</ul>
|
||||
<div style="padding: 4vw 2vw">
|
||||
<van-button block plain @click="(form = {}), (form.beginDate = dateFormat())"
|
||||
style="margin-bottom: 2vw">重置</van-button>
|
||||
<van-button block type="primary" @click="onSubmit" loading-type="spinner"
|
||||
loading-text="登录中...">查询</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
<!-- 时间选择器 -->
|
||||
<SelectTime :timeType="timeType" v-if="timeShow" @update:time="onSelectTime"
|
||||
@update:cancelTime="timeShow = false" />
|
||||
|
||||
<!-- 时间提示框 -->
|
||||
<van-popup v-model:show="alertInfo" round :style="{ width: '80%' }">
|
||||
<div class="alertInfoBox">
|
||||
<div class="alert">结束时间必须大于开始时间</div>
|
||||
<div class="alertBtn" @click="alertInfo = false">确定</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import YjzlItem from "../../../components//yjzlItem.vue";
|
||||
import SelectTime from "../../../components//SelectTime.vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { getyjzlList } from "../../../api/checkponit.js";
|
||||
import { dateFormat } from "../../../utils/tools.js";
|
||||
import { Loading } from "vant";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const showRight = ref(false);
|
||||
const form = ref({ beginDate: dateFormat() });
|
||||
const isActive = ref(-1);
|
||||
const showLx = ref(false); //显示类型
|
||||
const timeType = ref("start");
|
||||
const timeShow = ref(false); //是否显示时间选择器
|
||||
const page = ref(1); //分页
|
||||
const pageSize = ref(10); //分页数
|
||||
const total = ref(0); //总数
|
||||
const yjList = ref([]);
|
||||
const loadingPull = ref(false); //下拉刷新
|
||||
const loading = ref(true); //数据加载中
|
||||
const finished = ref(false); //数据加载完成
|
||||
const alertInfo = ref(false) //消息提示
|
||||
onMounted(() => {
|
||||
getYjList();
|
||||
});
|
||||
|
||||
// 触底加载数据
|
||||
function onLoad() {
|
||||
if (yjList.value.length < total.value) {
|
||||
page.value++;
|
||||
getYjList();
|
||||
} else {
|
||||
loading.value = false;
|
||||
finished.value = true;
|
||||
}
|
||||
}
|
||||
//下拉刷新
|
||||
function onRefresh() {
|
||||
loading.value = false;
|
||||
loadingPull.value = false;
|
||||
finished.value = false;
|
||||
page.value = 1;
|
||||
getYjList();
|
||||
}
|
||||
|
||||
// 查询
|
||||
function onSubmit() {
|
||||
let date1 = new Date(form.value.beginDate); //开始
|
||||
let date2 = new Date(form.value.endDate); //结束
|
||||
if (date1 > date2) {
|
||||
alertInfo.value = true
|
||||
} else {
|
||||
yjList.value = [];
|
||||
showRight.value = false;
|
||||
page.value = 1;
|
||||
loading.value = true
|
||||
getYjList();
|
||||
}
|
||||
}
|
||||
|
||||
// 获取预警指令列表
|
||||
function getYjList() {
|
||||
let warnType =
|
||||
form.value.warnType == "车辆"
|
||||
? "1"
|
||||
: form.value.warnType == "人员"
|
||||
? "2"
|
||||
: "";
|
||||
let params = {
|
||||
currentPage: page.value,
|
||||
pageSize: pageSize.value,
|
||||
beginDate: '2022-01-01',
|
||||
// beginDate: form.value.beginDate,
|
||||
checkpointCode: route.query.kkid,
|
||||
warnType: warnType,
|
||||
endDate: form.value.endDate,
|
||||
};
|
||||
getyjzlList(params)
|
||||
.then((res) => {
|
||||
if (page.value == 1) {
|
||||
yjList.value = res.records;
|
||||
} else {
|
||||
yjList.value = yjList.value.concat(res.records);
|
||||
}
|
||||
page.value = res.current;
|
||||
pageSize.value = res.size;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
//查看详情
|
||||
function handelDetail(item) {
|
||||
let data = {
|
||||
time: item.warnningTime,
|
||||
label: item.label,
|
||||
plateNumber: item.plateNumber,
|
||||
checkName: item.checkName,
|
||||
activityAddress: item.activityAddress,
|
||||
id: item.id,
|
||||
carImg: item.carImg,
|
||||
userName: item.userName,
|
||||
photo: item.idcardPhoto,
|
||||
jd: item.jd,
|
||||
wd: item.wd,
|
||||
sfzh: item.idcard
|
||||
}
|
||||
router.push({ path: '/lmjHome/zlJczDetail', query: data })
|
||||
}
|
||||
|
||||
// 时间点击
|
||||
function onClickTime(val) {
|
||||
timeType.value = val;
|
||||
timeShow.value = true;
|
||||
}
|
||||
|
||||
// 时间选中
|
||||
function onSelectTime(val) {
|
||||
if (timeType.value == "start") {
|
||||
form.value.beginDate = val;
|
||||
} else {
|
||||
form.value.endDate = val;
|
||||
}
|
||||
timeShow.value = false;
|
||||
}
|
||||
|
||||
// 选则类型
|
||||
function chooseYjlx() {
|
||||
showLx.value = !showLx.value;
|
||||
}
|
||||
// 选中类型
|
||||
function cilickLx(val) {
|
||||
isActive.value = val;
|
||||
switch (val) {
|
||||
case 0:
|
||||
form.value.warnType = "车辆";
|
||||
break;
|
||||
case 1:
|
||||
form.value.warnType = "人员";
|
||||
break;
|
||||
}
|
||||
showLx.value = !showLx.value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search {
|
||||
padding: 2vw 2vw 0;
|
||||
box-sizing: border-box;
|
||||
height: 11vw;
|
||||
line-height: 5vw;
|
||||
font-size: 12px;
|
||||
background: #f1f1f1;
|
||||
|
||||
.sort {
|
||||
float: left;
|
||||
padding: 1vw 3vw 1vw 6vw;
|
||||
border: 1px solid #e9e9e9;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
|
||||
.van-icon-arrow-up {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.van-icon-arrow-down {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.search-filter {
|
||||
float: right;
|
||||
color: #3373fa;
|
||||
line-height: 8vw;
|
||||
|
||||
.van-icon {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listBox {
|
||||
height: calc(100vh - 24vw);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
// .van-pull-refresh{
|
||||
// height: 100%;
|
||||
// overflow-y: auto;
|
||||
|
||||
// }
|
||||
.listBox-item {}
|
||||
}
|
||||
|
||||
// 弹窗
|
||||
.popup-content {
|
||||
.popup-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.popup-box {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
font-size: 12px;
|
||||
line-height: 11vw;
|
||||
color: #000;
|
||||
|
||||
.popup-item {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.popup-name {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
text-align-last: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.yjlx-info {
|
||||
position: relative;
|
||||
|
||||
.select-box {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
width: 50%;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
top: 50px;
|
||||
right: 20px;
|
||||
|
||||
.select-box-li {
|
||||
padding-left: 2vw;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.active {
|
||||
background: rgb(22, 220, 255);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select-box-li:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.triangleup {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
top: -13px;
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px solid transparent;
|
||||
border-bottom-color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.alertInfoBox {
|
||||
padding: 2vw;
|
||||
|
||||
.alert {
|
||||
line-height: 10vw;
|
||||
text-align: center;
|
||||
color: #8f8f94;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.alertBtn {
|
||||
text-align: center;
|
||||
height: 12vw;
|
||||
line-height: 12vw;
|
||||
margin: 4vw 0;
|
||||
background: #eee;
|
||||
color: #8f8f94
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,165 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="选择执勤卡点" :showRight="false" :showLeft="true" />
|
||||
<div class="heckpointBox">
|
||||
<!-- 查询 -->
|
||||
<Search
|
||||
v-model="jczValue"
|
||||
placeholder="请输入搜索关键词"
|
||||
@update:modelValue="onSearch"
|
||||
></Search>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ul class="list">
|
||||
<li class="item" v-for="(item, index) in List" :key="index">
|
||||
<div class="title">{{ item.areaName }}</div>
|
||||
<div class="item-li">
|
||||
<van-radio-group v-model="cheaked" @change="chooseJcz(item.areaName)">
|
||||
<van-radio
|
||||
v-for="itemChid in item.checkList"
|
||||
:name="itemChid.checkCode"
|
||||
:key="itemChid.checkCode"
|
||||
>{{ itemChid.pointName }}</van-radio
|
||||
>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
</li>
|
||||
<van-empty v-if="List.length<=0" description="暂无数据"/>
|
||||
</ul>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<van-popup
|
||||
v-model:show="peoplePopupShow"
|
||||
round
|
||||
:style="{ width: '80%' }"
|
||||
close-icon="close"
|
||||
:overlay="true"
|
||||
>
|
||||
<div class="info">
|
||||
<div class="info_title">是否选择{{selectTitle}}?</div>
|
||||
<div class="info-btns">
|
||||
<span @click="handlePClose">否</span>
|
||||
<span @click="handlePass">是</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import Search from "../../components/search.vue";
|
||||
import router from "../../router/index.js";
|
||||
import { getJczList } from "../../api/checkponit.js";
|
||||
import { ref, reactive, onMounted, onUnmounted, onActivated } from "vue";
|
||||
const jczValue = ref(""); //搜索关键字
|
||||
const List = ref([]); //检查站列表
|
||||
const cheaked = ref(null); //选择的检查站
|
||||
const peoplePopupShow = ref(false); //弹窗
|
||||
const selectTitle = ref(''); //弹窗标题
|
||||
|
||||
onMounted(() => {
|
||||
getList(); //获取列表
|
||||
});
|
||||
// 搜索
|
||||
function onSearch() {
|
||||
}
|
||||
|
||||
// 获取列表
|
||||
function getList() {
|
||||
let user = JSON.parse(window.localStorage.getItem("userInfo"));
|
||||
getJczList({ username: user.idEntityCard }).then((res) => {
|
||||
List.value = handellArray(res);
|
||||
});
|
||||
}
|
||||
|
||||
// 处理数据
|
||||
function handellArray(array) {
|
||||
let arrWrap = [],resuleArr = [];
|
||||
array.forEach((item) => {
|
||||
if (!arrWrap.includes(item.areaCode)) {
|
||||
let obj = {
|
||||
areaName: item.areaName,
|
||||
checkList: [],
|
||||
};
|
||||
obj.checkList.push(item);
|
||||
resuleArr.push(obj);
|
||||
arrWrap.push(item.areaCode);
|
||||
} else {
|
||||
resuleArr[arrWrap.indexOf(item.areaCode)].checkList.push(item);
|
||||
}
|
||||
});
|
||||
return resuleArr;
|
||||
}
|
||||
|
||||
// 选择检查站
|
||||
function chooseJcz(val) {
|
||||
peoplePopupShow.value = true
|
||||
List.value.forEach(item=>{
|
||||
if(item.areaName == val){
|
||||
item.checkList.forEach(child=>{
|
||||
if(child.checkCode == cheaked.value) selectTitle.value = child.pointName
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 确定弹窗
|
||||
function handlePass(){
|
||||
peoplePopupShow.value = false
|
||||
router.push({path:'/',query:{kkid:cheaked.value,kkmc:selectTitle.value}});
|
||||
}
|
||||
// 关闭弹窗
|
||||
function handlePClose() {
|
||||
peoplePopupShow.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.heckpointBox {
|
||||
.list {
|
||||
.title {
|
||||
height: 50px;
|
||||
font-size: 20px;
|
||||
line-height: 50px;
|
||||
background: #ddd;
|
||||
padding: 0 6vw;
|
||||
box-sizing: border-box;
|
||||
color: #999;
|
||||
}
|
||||
.item-li {
|
||||
padding: 0 6vw;
|
||||
box-sizing: border-box;
|
||||
.van-radio {
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提示数据
|
||||
.info{
|
||||
.info_title{
|
||||
text-align: center;
|
||||
line-height: 15vw;
|
||||
border: 1px solid #e9e9e9;
|
||||
padding:'10px';
|
||||
box-sizing: border-box;
|
||||
font-size: 17px;
|
||||
}
|
||||
.info-btns{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 11vw;
|
||||
span{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
color: #007aff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,218 +0,0 @@
|
||||
<script setup>
|
||||
import emitter from "@/utils/eventBus";
|
||||
import TopNav from "@/components/topNav.vue";
|
||||
import {onMounted, ref} from "vue";
|
||||
import CustomPopup from "@/pages/collectPage/copmonents/customPopup.vue";
|
||||
import GdMap from "@/components/GdMap/index.vue"
|
||||
import {addSaveData, fetchTbZdxlFgdwId} from "@/api/collectPage";
|
||||
import {hintToast} from "@/utils/tools";
|
||||
import router from "@/router";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const navTitle = ref("必到点采集新增")
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const visible = ref(false)
|
||||
const formData = ref({})
|
||||
const route = useRoute()
|
||||
|
||||
const onSubmit = async (data) => {
|
||||
try {
|
||||
loading.value = true;
|
||||
const res = await addSaveData(formData.value)
|
||||
if (res) {
|
||||
hintToast(res?.msg || '新增成功')
|
||||
|
||||
setTimeout( () => {
|
||||
router.back()
|
||||
}, 500)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
hintToast(error?.msg || "新增失败")
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取方格
|
||||
const handleChange = (val) => {
|
||||
formData.value.mc = val?.mc
|
||||
formData.value.fgdwId = val?.id
|
||||
}
|
||||
|
||||
const handleVisible = () => {
|
||||
if (disabled.value) return
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
// 查看获取详情
|
||||
const getFetchTbZdxlFgdwId = async (id) => {
|
||||
const res = await fetchTbZdxlFgdwId(id)
|
||||
if (res) {
|
||||
emitter.emit("deletePointArea", "addfg")
|
||||
const { x1 = "", y1 = "", x2 = "", y2 = "", id = "", zxX = "", zxY = "", mc = "" } = res
|
||||
const centerPoint = [zxX, zxY]
|
||||
const position = [[Number(x1),Number(y1)],[Number(x2),Number(y2)]]
|
||||
const text = mc
|
||||
const obj = [{ position: position, text, id, userData: res }]
|
||||
emitter.emit("echoPlane", { fontColor:'#12fdb8',coords: obj, type:'rectangle', flag:'addfg', color:'rgba(2,20,51,0.5)', linecolor:'#1C97FF'})
|
||||
emitter.emit("setMapCenter", { location: centerPoint, zoomLevel: 14 });
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: formData.value?.jd, wd: formData.value?.wd }],
|
||||
coordinates: [formData.value?.jd, formData.value?.wd],
|
||||
icon: require("@/assets/lz/dw.png"),
|
||||
sizeX: 30,
|
||||
sizeY: 35
|
||||
});
|
||||
|
||||
// 禁用地图
|
||||
emitter.emit("setMapInteractions", !disabled.value)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (route.query?.item) {
|
||||
// 查看详情禁用处理
|
||||
formData.value = JSON.parse(route.query.item)
|
||||
console.log(formData.value)
|
||||
disabled.value = true
|
||||
|
||||
navTitle.value = '必到点采集详情'
|
||||
|
||||
getFetchTbZdxlFgdwId(formData.value?.fgdwId)
|
||||
} else {
|
||||
disabled.value = false
|
||||
|
||||
// 获取经纬度
|
||||
emitter.emit("getMapClickCoordinates");
|
||||
|
||||
// 更新地图标注位置
|
||||
emitter.on("mapClickCoordinates", async (res) => {
|
||||
emitter.emit("deletePointArea")
|
||||
|
||||
formData.value.jd = res.lng
|
||||
formData.value.wd = res.lat
|
||||
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: res.lng, wd: res.lat }],
|
||||
coordinates: res?.coordinates,
|
||||
icon: require("../../assets/lz/dw.png"),
|
||||
sizeX: 30,
|
||||
sizeY: 35
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<TopNav :navTitle="navTitle" :showLeft="true" />
|
||||
|
||||
<div class="formWrapper">
|
||||
<van-form @submit="onSubmit" class="form" :readonly="disabled">
|
||||
<!-- <van-field-->
|
||||
<!-- v-model="formData.cjsbQk"-->
|
||||
<!-- readonly-->
|
||||
<!-- label="所属部门"-->
|
||||
<!-- placeholder="请输入必到点名称"-->
|
||||
<!-- />-->
|
||||
<van-field
|
||||
v-model="formData.bddMc"
|
||||
name="bddMc"
|
||||
:required="!disabled"
|
||||
label="必到点名称"
|
||||
placeholder="请输入必到点名称"
|
||||
:rules="[{ required: true, message: '请输入必到点名称' }]"
|
||||
/>
|
||||
<van-field
|
||||
v-model="formData.mc"
|
||||
name="mc"
|
||||
:required="!disabled"
|
||||
is-link
|
||||
readonly
|
||||
label="所属方格"
|
||||
placeholder="请输入必到点名称"
|
||||
:rules="[{ required: true, message: '请输入必到点名称' }]"
|
||||
@click="handleVisible"
|
||||
/>
|
||||
<van-field
|
||||
v-model="formData.bddDz"
|
||||
name="bddDz"
|
||||
:required="!disabled"
|
||||
label="地址"
|
||||
placeholder="请输入必到点名称"
|
||||
:rules="[{ required: true, message: '请输入必到点名称' }]"
|
||||
/>
|
||||
<van-field
|
||||
v-model="formData.jd"
|
||||
name="jd"
|
||||
:required="!disabled"
|
||||
label="经度"
|
||||
placeholder="请输入经度"
|
||||
:rules="[{ required: true, message: '请输入经度' }]"
|
||||
/>
|
||||
<van-field
|
||||
v-model="formData.wd"
|
||||
name="wd"
|
||||
:required="!disabled"
|
||||
label="纬度"
|
||||
placeholder="请输入纬度"
|
||||
:rules="[{ required: true, message: '请输入纬度' }]"
|
||||
/>
|
||||
<div class="mapWrapper">
|
||||
<div class="label">地图选点</div>
|
||||
<div style="height: 40vh; margin-top: 2vw">
|
||||
<gd-map />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn" v-if="!disabled">
|
||||
<van-button
|
||||
round
|
||||
block
|
||||
type="primary"
|
||||
native-type="submit"
|
||||
:loading="loading"
|
||||
loading-type="spinner"
|
||||
loading-text="保存中..."
|
||||
>保存</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<custom-popup v-model="visible" @change="handleChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.formWrapper {
|
||||
margin-top: 13vw;
|
||||
|
||||
.mapWrapper {
|
||||
padding: var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);
|
||||
font-size: var(--van-cell-font-size);
|
||||
color: var(--van-field-label-color);
|
||||
|
||||
.label {
|
||||
margin-right: var(--van-field-label-margin-right);
|
||||
width: var(--van-field-label-width);
|
||||
}
|
||||
|
||||
.context {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
padding: 2vw;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: calc(100% - 4vw);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,97 +0,0 @@
|
||||
<script setup>
|
||||
import {computed, onMounted, ref} from "vue";
|
||||
import Search from "@/components/search.vue";
|
||||
import {getSelectList} from "@/api/collectPage";
|
||||
import emitter from "@/utils/eventBus";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
position: {
|
||||
type: String,
|
||||
default: 'bottom'
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(["update:modelValue", "change"]);
|
||||
const visible = computed({
|
||||
get: function () {
|
||||
return props.modelValue;
|
||||
},
|
||||
set: function (val) {
|
||||
emits("update:modelValue", val)
|
||||
}
|
||||
})
|
||||
|
||||
const visibleEmpty = ref(false)
|
||||
const searchValue = ref("")
|
||||
const radioChecked = ref("")
|
||||
const list = ref([])
|
||||
|
||||
const onSearch = (value) => {
|
||||
list.value = []
|
||||
getSelectListData(value)
|
||||
}
|
||||
|
||||
const onRadionChange = (value) => {
|
||||
emitter.emit("deletePointArea", "zdxl_fzyc")
|
||||
emits('change', value)
|
||||
|
||||
const { x1, y1, x2, y2, id, zxX, zxY, mc } = value
|
||||
const centerPoint = [zxX, zxY]
|
||||
const position = [[Number(x1),Number(y1)],[Number(x2),Number(y2)]]
|
||||
const text = mc
|
||||
const obj = [{ position: position, text, id, userData: value}]
|
||||
|
||||
emitter.emit("echoPlane", { fontColor:'#12fdb8',coords: obj, type:'rectangle', flag:'zdxl_fzyc', color:'rgba(2,20,51,0.5)', linecolor:'#1C97FF'})
|
||||
emitter.emit("setMapCenter", { location: centerPoint, zoomLevel: 14 });
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
const getSelectListData = async (mc) => {
|
||||
try {
|
||||
const res = await getSelectList({ mc });
|
||||
if (res?.length > 0) {
|
||||
list.value = res || []
|
||||
visibleEmpty.value = false
|
||||
} else {
|
||||
visibleEmpty.value = true
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
visibleEmpty.value = true
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getSelectListData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<van-popup v-model:show="visible" :position="position">
|
||||
<search placeholder="请输入方格名称" v-model="searchValue" @update:modelValue="onSearch" />
|
||||
|
||||
<div class="selectWrapper">
|
||||
<van-radio-group v-model="radioChecked">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="item in list" clickable :key="item" :title="item?.mc" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio :name="item?.id" @click="onRadionChange(item)" />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
<van-empty description="没有数据" image="default" v-if="list.length <= 0 && visibleEmpty" />
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.selectWrapper {
|
||||
height: 80vw;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@ -1,57 +0,0 @@
|
||||
<script setup>
|
||||
import router from "@/router";
|
||||
|
||||
const props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const handleTo = (item) => {
|
||||
const { bddMc, bddDz, wd, jd, fgdwMc, fgdwId } = item
|
||||
router.push({ path: "/collectAndAdd", query: { item: JSON.stringify({ bddMc, bddDz, wd, jd, fgdwId, mc: fgdwMc }) } });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="item-wrapper">
|
||||
<template v-for="(item, index) in list" :key="index">
|
||||
<div class="item" @click="handleTo(item)">
|
||||
<div class="title">{{ item.bddMc }}</div>
|
||||
<div class="infoWrapper">
|
||||
<!-- <div class="mt">所属部门:{{ item.sssgaj }}</div>-->
|
||||
<div class="mt">所属方格:{{ item?.fgdwMc }}</div>
|
||||
<div class="mt">地址:{{ item.bddDz }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item-wrapper {
|
||||
margin: 2vw;
|
||||
|
||||
.item {
|
||||
padding: 2vw;
|
||||
border-top: 0.13333vw solid #f4f5f1;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mt {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
|
||||
.infoWrapper {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,139 +0,0 @@
|
||||
<script setup>
|
||||
import TopNav from "@/components/topNav.vue";
|
||||
import Search from "@/components/search.vue";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import ListItemWrapper from "@/pages/collectPage/copmonents/listItemWrapper.vue";
|
||||
import router from "@/router";
|
||||
import { getSelectPage } from "@/api/collectPage";
|
||||
|
||||
const finished = ref(false);
|
||||
const loading = ref(false);
|
||||
const loadingRefresh = ref(false);
|
||||
const searchValue = ref("");
|
||||
const pageData = reactive({
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
list: [],
|
||||
});
|
||||
|
||||
const onSearch = (value) => {
|
||||
loading.value = true;
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = [];
|
||||
getData();
|
||||
};
|
||||
|
||||
const onRefresh = () => {
|
||||
loading.value = false;
|
||||
loadingRefresh.value = true;
|
||||
finished.value = false;
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = [];
|
||||
getData();
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const { total, ...ret } = pageData;
|
||||
const res = await getSelectPage({ ...ret, bddMc: searchValue.value });
|
||||
if (res?.records.length > 0) {
|
||||
data.list = data.list.concat(res?.records) || [];
|
||||
pageData.total = res?.total;
|
||||
loading.value = false;
|
||||
} else {
|
||||
finished.value = true;
|
||||
}
|
||||
loadingRefresh.value = false;
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
loadingRefresh.value = false;
|
||||
}
|
||||
};
|
||||
const onLoad = () => {
|
||||
if (data.list.length >= pageData?.total) {
|
||||
finished.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
pageData.pageCurrent++;
|
||||
getData();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
data.list = [];
|
||||
getData();
|
||||
});
|
||||
|
||||
const handleTo = () => {
|
||||
router.push("/collectAndAdd");
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<TopNav navTitle="必到点采集列表" :showLeft="true" />
|
||||
|
||||
<van-sticky>
|
||||
<div class="header">
|
||||
<search
|
||||
placeholder="请输入部门、所属方格或必到点名称进行查询"
|
||||
v-model="searchValue"
|
||||
@update:modelValue="onSearch"
|
||||
/>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<div class="content">
|
||||
<van-pull-refresh v-model="loadingRefresh" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model:loading="loading"
|
||||
:finished="finished"
|
||||
finished-text=""
|
||||
@load="onLoad"
|
||||
offset="1"
|
||||
:immediate-check="false"
|
||||
>
|
||||
<list-item-wrapper :list="data.list" />
|
||||
|
||||
<van-empty
|
||||
description="暂无采集数据"
|
||||
image="default"
|
||||
v-if="data.list.length <= 0 && loadingRefresh === false"
|
||||
/>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
|
||||
<div class="footer" @click="handleTo">
|
||||
<van-button round native-type="submit" block type="primary">
|
||||
新增必到点采集
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/assets/styles/mixin.scss";
|
||||
|
||||
.header {
|
||||
margin-top: 13vw;
|
||||
@include bg_color($background-color-theme);
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-bottom: 16vw;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
padding: 2vw;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: calc(100% - 4vw);
|
||||
}
|
||||
</style>
|
||||
@ -1,249 +0,0 @@
|
||||
<template>
|
||||
<div style="height:100vh;padding-top: 13vw;">
|
||||
<TopNav navTitle="当前位置" :showRight="false" :showLeft="true" />
|
||||
<GdMap />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Axios from "axios";
|
||||
import { getyjzlCount } from "../../api/checkponit.js";
|
||||
import { qcckGet } from "@/api/qcckApi.js";
|
||||
import {
|
||||
dateFormat,
|
||||
setUserHome,
|
||||
hintToast,
|
||||
timeValidate,
|
||||
} from "../../utils/tools.js";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import GdMap from "../../components/GdMap/index.vue";
|
||||
import { setUserDefaultModleData, getUserLzLocation } from "../../api/user.js";
|
||||
import emitter from "../../utils/eventBus.js";
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
} from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { Dialog } from "vant";
|
||||
const route = useRoute();
|
||||
const Loadtion = ref({
|
||||
address: "暂无地址信息",
|
||||
lng: "暂无",
|
||||
lat: "暂无",
|
||||
ly: "暂无",
|
||||
});
|
||||
let timer;
|
||||
onMounted(() => {
|
||||
localStorage.removeItem('NFC')
|
||||
localStorage.removeItem('OCR')
|
||||
_getUserLocation(true); //获取当前位置
|
||||
setInterval(() => {
|
||||
_getUserLocation(false); //获取当前位置
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
|
||||
|
||||
//获取当前位置信息
|
||||
function _getUserLocation(sfdw) {
|
||||
let { lng, lat, zbly } = getLocation();
|
||||
if (lng && lat) {
|
||||
Loadtion.value.lng = lng;
|
||||
Loadtion.value.lat = lat;
|
||||
Loadtion.value.ly = zbly == 1 ? "GPS" : "融合";
|
||||
emitter.emit("deletePointArea", "dw");
|
||||
//地图撒点然后移动
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: lng, wd: lat }],
|
||||
icon: require("../../assets/lz/dw.png"),
|
||||
flag: "dw",
|
||||
sfdw: sfdw,
|
||||
sizeX: 30,
|
||||
sizeY: 35
|
||||
});
|
||||
} else {
|
||||
hintToast("暂无坐标信息");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
::v-deep .van-radio-group {
|
||||
padding: 5vw;
|
||||
}
|
||||
|
||||
::v-deep .van-radio {
|
||||
padding: 2vw 0;
|
||||
}
|
||||
|
||||
.homeTotal_box {
|
||||
position: absolute;
|
||||
bottom: 13.5vw;
|
||||
z-index: 20;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
border-top-left-radius: 2vw;
|
||||
border-top-right-radius: 2vw;
|
||||
}
|
||||
|
||||
.home_box {
|
||||
padding: 1vw 3vw 3vw 3vw;
|
||||
}
|
||||
|
||||
.point-pop-alert {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
top: 80px;
|
||||
right: 10px;
|
||||
|
||||
>img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
margin: 2vw 0;
|
||||
}
|
||||
}
|
||||
|
||||
.count-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
line-height: 3.5vh;
|
||||
justify-content: space-around;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.count-item {
|
||||
margin-top: 1vh;
|
||||
width: 47%;
|
||||
display: flex;
|
||||
margin-top: 3%;
|
||||
align-items: center;
|
||||
background-color: rgba(140, 175, 206, 0.1);
|
||||
border-radius: 1.5vw;
|
||||
|
||||
.bottom-box {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
border-right: 1px dashed rgb(172, 171, 171);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
line-height: 2.5vh;
|
||||
|
||||
.inner-box {
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.text-box {
|
||||
color: rgb(179, 179, 179);
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
// margin-right: 4vw;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
// margin-left: 4vw;
|
||||
}
|
||||
|
||||
.num1 {
|
||||
color: rgb(16, 16, 16);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.num2 {
|
||||
color: rgb(5, 167, 24);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.num3 {
|
||||
color: rgb(241, 8, 8);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查站
|
||||
.count-item-jcz {
|
||||
width: calc(50% - 1px);
|
||||
text-align: center;
|
||||
color: #999;
|
||||
border-top: 1px solid #e9e9e9;
|
||||
|
||||
.count-time-jcz {
|
||||
font-size: 1rem;
|
||||
color: #222;
|
||||
line-height: 12vw;
|
||||
}
|
||||
|
||||
.count-item-jcz-num {
|
||||
display: flex;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.count-item-jcz-num-left {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
padding: 0 3vw;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.count-item-jcz-num-right {
|
||||
width: 50%;
|
||||
text-align: left;
|
||||
padding: 0 3vw;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.count-item-jcz-num-left::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
bottom: 10px;
|
||||
width: 1px;
|
||||
background: #e9e9e9;
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
.num-red {
|
||||
color: #f00;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.num {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.count-item-jcz:nth-child(2n + 1) {
|
||||
border-right: 1px solid #e9e9e9;
|
||||
}
|
||||
}
|
||||
|
||||
.count-box-jcz {
|
||||
padding-top: 1vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.hsf {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 18px;
|
||||
}
|
||||
</style>
|
||||
@ -101,7 +101,7 @@ function handleSearch() {
|
||||
// 跳转到详情页
|
||||
function goToDetail(vehicle) {
|
||||
router.push({
|
||||
path: "/key-vehicle-detail",
|
||||
path: "/keyVehicle/detail",
|
||||
query: { id: vehicle.id },
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,103 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw;">
|
||||
<TopNav navTitle="工作日志" :rightTitle="'地图模式'"/>
|
||||
<div class="rz_item_box" v-for="(item,index) in gzrzList.list" :key="index" >
|
||||
<div class="rz_item_img_box">
|
||||
<van-image width="45px" height="45px" fit="contain" :src="item.imgUrl">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="rz_item_text">
|
||||
<div class="time">{{item.time}}</div>
|
||||
<div>
|
||||
<soan>{{item.name}}</soan>
|
||||
<soan class="address">{{item.address}}</soan>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<soan class="rz_zt" :class="item.status == 0 ? 'proceed' : 'accomplish'">{{item.status == 0 ? '进行中' : '已完成'}}</soan>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from '../../../components/topNav.vue';
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
const themeType = ref(getStorage('themeSetting'));
|
||||
const gzrzList = reactive({
|
||||
list: [{
|
||||
name: '人员核查',
|
||||
time: '2022-03-11 14:32:55',
|
||||
address: '高新区创业路5号3单元',
|
||||
imgUrl: require('../../../assets/images/menu-yyhc.png'),
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
name: '车辆核查',
|
||||
time: '2022-03-11 14:32:55',
|
||||
address: '高新区创业路5号3单元',
|
||||
imgUrl: require('../../../assets/images/menu-clhc.png'),
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
name: '人员报备',
|
||||
time: '2022-03-11 14:32:55',
|
||||
address: '高新区创业路5号3单元',
|
||||
imgUrl: require('../../../assets/images/menu-rwzx.png'),
|
||||
status: 1
|
||||
}
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.rz_item_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding:4vw 3vw;
|
||||
// border-bottom: 1px solid #F1F3F4;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
.rz_item_img_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.rz_item_text {
|
||||
margin-left: 3vw;
|
||||
|
||||
.time {
|
||||
@include font_size($font_medium);
|
||||
margin-bottom: 1.5vw;
|
||||
}
|
||||
|
||||
.address {
|
||||
margin-left: 5vw;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.rz_zt {
|
||||
height: 5vw;
|
||||
@include font_size($font_little_s);
|
||||
padding: 2px 8px;
|
||||
border-radius: 15px;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
.accomplish{
|
||||
background-color: #23D96E;
|
||||
}
|
||||
.proceed{
|
||||
background-color: #3e6ee8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,106 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw;">
|
||||
<TopNav navTitle="收藏应用" />
|
||||
<div class="function_item_box">
|
||||
<div @click="routerPush(item.path)" class="function_item" v-for="item in zhxfList.list" :key="item">
|
||||
<van-image width="55px" height="55px" fit="contain" :src="item.imgUrl">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="item_name">{{item.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from '../../../components/topNav.vue';
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import router from '../../../router';
|
||||
//智慧巡防
|
||||
const zhxfList = reactive({
|
||||
list: [{
|
||||
name: '巡防报告',
|
||||
imgUrl: require('../../../assets/images/menu-rwzx.png'),
|
||||
path: ''
|
||||
},
|
||||
{
|
||||
name: '盘查物品',
|
||||
imgUrl: require('../../../assets/images/home/FXYJ@3x.png'),
|
||||
path: ''
|
||||
}, {
|
||||
name: '指令信息',
|
||||
imgUrl: require('../../../assets/images/menu-zlzx.png'),
|
||||
path: ''
|
||||
},
|
||||
{
|
||||
name: '报备信息',
|
||||
imgUrl: require('../../../assets/images/menu-qwzx.png'),
|
||||
path: ''
|
||||
},
|
||||
{
|
||||
name: '指令设置',
|
||||
imgUrl: require('../../../assets/images/menu-qwzx.png'),
|
||||
path: ''
|
||||
},
|
||||
{
|
||||
name: '巡防区',
|
||||
imgUrl: require('../../../assets/images/11.png'),
|
||||
path: '/scyy/xfq'
|
||||
},
|
||||
{
|
||||
name: '警务站',
|
||||
imgUrl: require('../../../assets/images/2.png'),
|
||||
path: '/scyy/jwz'
|
||||
},
|
||||
{
|
||||
name: '快反点',
|
||||
imgUrl: require('../../../assets/images/3.png'),
|
||||
path: '/scyy/kfd'
|
||||
},
|
||||
{
|
||||
name: '巡防力量',
|
||||
imgUrl: require('../../../assets/images/4.png'),
|
||||
path: '/scyy/xfll'
|
||||
},
|
||||
{
|
||||
name: '车辆',
|
||||
imgUrl: require('../../../assets/images/5.png'),
|
||||
path: '/scyy/cl'
|
||||
},
|
||||
{
|
||||
name: '装备',
|
||||
imgUrl: require('../../../assets/images/6.png'),
|
||||
path: '/scyy/zb'
|
||||
}
|
||||
]
|
||||
})
|
||||
function routerPush(url){
|
||||
router.push(url)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
.function_item_box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@include font_color($font-color-theme);
|
||||
.function_item {
|
||||
// border: 1px solid red;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
margin-top: 4vw;
|
||||
|
||||
.item_name {
|
||||
margin-top: 1.5vw;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@ -1,54 +0,0 @@
|
||||
<template>
|
||||
<van-config-provider :theme-vars="themeVars">
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="通讯录" />
|
||||
<!-- <van-index-bar> -->
|
||||
<!-- <van-index-anchor index="A" /> -->
|
||||
<Search
|
||||
v-model="kwd"
|
||||
placeholder="请输入搜索关键词"
|
||||
@update:modelValue="onSearch"
|
||||
></Search>
|
||||
<template v-for="item in 10" :key="item">
|
||||
<van-cell title="张三(高新网安大队)" label="13612345678">
|
||||
<template #right-icon>
|
||||
<van-icon name="phone-circle" color="#3e6ee8" class="search-icon" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="李四(高新网安大队)" label="13612345678">
|
||||
<template #right-icon>
|
||||
<van-icon name="phone-circle" color="#3e6ee8" class="search-icon" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="王五(高新网安大队)" label="13612345678">
|
||||
<template #right-icon>
|
||||
<van-icon name="phone-circle" color="#3e6ee8" class="search-icon" />
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
<!-- </van-index-bar> -->
|
||||
</div>
|
||||
</van-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import Search from "../../../components/search.vue";
|
||||
import { ref, reactive } from "vue";
|
||||
const listIndex = ref(["A"]);
|
||||
const themeType = ref(getStorage("themeSetting"));
|
||||
const kwd = ref("");
|
||||
const themeVars = ref({
|
||||
cellBackgroundColor: themeType.value == "light" ? "#fff" : "#041634",
|
||||
cellBorderColor: themeType.value == "light" ? "#dbdbdb" : "#001e6b",
|
||||
cellTextColor: themeType.value == "light" ? "#333" : "#fff",
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.search-icon {
|
||||
font-size: 30px;
|
||||
}
|
||||
</style>
|
||||
@ -1,182 +0,0 @@
|
||||
<template>
|
||||
<van-config-provider :theme-vars="themeVars">
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="个人信息" />
|
||||
<div class="user_function_box">
|
||||
<div
|
||||
class="user_function_item"
|
||||
v-for="(item, index) in functionList.list"
|
||||
:key="index"
|
||||
>
|
||||
<span class="function_title">{{ item.name }}</span>
|
||||
<van-image
|
||||
width="45px"
|
||||
height="45px"
|
||||
fit="contain"
|
||||
:src="item.message"
|
||||
v-if="item.isImg"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
<!-- <template v-slot:error>图片加载失败</template> -->
|
||||
</van-image>
|
||||
<van-field
|
||||
v-model="item.message"
|
||||
input-align="right"
|
||||
:readonly="item.readonly"
|
||||
v-else
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 10vw 3vw" @click="onClickSave">
|
||||
<van-button type="primary" round block>保存</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { hintToast } from "../../../utils/tools.js";
|
||||
const themeType = ref(getStorage("themeSetting"));
|
||||
const themeVars = ref({
|
||||
cellBackgroundColor: themeType.value == "light" ? "#fff" : "#092556",
|
||||
fieldInputTextColor: themeType.value == "light" ? "#333" : "#fff",
|
||||
});
|
||||
//功能模块
|
||||
const functionList = reactive({
|
||||
list: [
|
||||
{
|
||||
name: "姓名",
|
||||
message: "警官",
|
||||
readonly: true,
|
||||
},
|
||||
{
|
||||
name: "照片",
|
||||
message: require("../../../assets/images/tx.png"),
|
||||
isImg: true,
|
||||
},
|
||||
{
|
||||
name: "性别",
|
||||
message: "男",
|
||||
readonly: true,
|
||||
},
|
||||
{
|
||||
name: "座机电话",
|
||||
message: "02812345678",
|
||||
readonly: false,
|
||||
},
|
||||
{
|
||||
name: "手机",
|
||||
message: "13612345678",
|
||||
readonly: false,
|
||||
},
|
||||
{
|
||||
name: "组织机构",
|
||||
message: "测试部门",
|
||||
readonly: true,
|
||||
},
|
||||
{
|
||||
name: "警号",
|
||||
message: "121380",
|
||||
readonly: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
onMounted(() => {
|
||||
let user = JSON.parse(getStorage("userInfo"));
|
||||
functionList.list.forEach((item) => {
|
||||
switch (item.name) {
|
||||
case "姓名":
|
||||
item.message = user.userName;
|
||||
break;
|
||||
case "性别":
|
||||
if (user.sex == 1) {
|
||||
item.message = "男";
|
||||
} else if (user.sex == 2) {
|
||||
item.message = "女";
|
||||
} else {
|
||||
item.message = "未知";
|
||||
}
|
||||
break;
|
||||
case "座机电话":
|
||||
item.message = user.telePhone;
|
||||
break;
|
||||
case "手机":
|
||||
item.message = user.mobile;
|
||||
break;
|
||||
case "组织机构":
|
||||
item.message = user.deptName;
|
||||
break;
|
||||
case "警号":
|
||||
item.message = user.inDustRialId;
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//保存
|
||||
function onClickSave() {
|
||||
hintToast("保存成功")
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.user_function_box,
|
||||
.user_box {
|
||||
@include font_color($font-color-theme);
|
||||
}
|
||||
|
||||
.user_box {
|
||||
// background: url('../../../assets/images/my-info-bg@2x.png') no-repeat;
|
||||
// background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4vw 3vw;
|
||||
margin: 3vw;
|
||||
border-radius: 5px;
|
||||
@include user_function_item_color($user-function-item-theme);
|
||||
.user {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 3vw;
|
||||
.user_name {
|
||||
@include font_size($font_large_s);
|
||||
}
|
||||
.user_dep {
|
||||
@include font_size($font_medium_s);
|
||||
margin-top: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user_function_box {
|
||||
margin-bottom: 10vw;
|
||||
@include user_function_item_color($user-function-item-theme);
|
||||
@include font_size($font_medium_s);
|
||||
padding: 2vw 3vw;
|
||||
margin: 3vw;
|
||||
border-radius: 5px;
|
||||
.user_function_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
padding: 2vw 0;
|
||||
.function_title {
|
||||
width: 22vw;
|
||||
}
|
||||
}
|
||||
.user_function_item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
::v-deep .van-field__control--right {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
</style>
|
||||
@ -1,163 +0,0 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2022-09-15 14:10:42
|
||||
* @LastEditTime: 2022-09-27 16:12:16
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \new_gxga_app\src\pages\my\views\wdgj.vue
|
||||
-->
|
||||
<template>
|
||||
<van-config-provider :theme-vars="themeVars">
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav
|
||||
navTitle="我的轨迹"
|
||||
rightIcon="location"
|
||||
:showRight="true"
|
||||
@clickRight="onClickRight"
|
||||
/>
|
||||
<van-cell title="选择时间" @click="calShow = true">
|
||||
<template #value>
|
||||
<span>{{ chooseTime }}</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-calendar
|
||||
v-model:show="calShow"
|
||||
@confirm="onConfirm"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
color="#3e6ee8"
|
||||
></van-calendar>
|
||||
<van-list
|
||||
v-model:loading="loading"
|
||||
:finished="finished"
|
||||
finished-text=" "
|
||||
@load="onLoad"
|
||||
offset="30"
|
||||
:immediate-check="false"
|
||||
>
|
||||
<van-steps
|
||||
direction="vertical"
|
||||
:active="0"
|
||||
active-color="#3e6ee8"
|
||||
:inactive-color="themeType == 'light' ? '#333' : '#fff'"
|
||||
>
|
||||
<van-step v-for="item in gjList" :key="item">
|
||||
<div class="steps_box">{{ item.dwsj }}</div>
|
||||
<div class="steps_box">地址:{{ item.dzxz }}</div>
|
||||
<div class="steps_box">
|
||||
停留时长:{{ (item.xfsc / 60 / 60).toFixed(2) }}小时
|
||||
</div>
|
||||
</van-step>
|
||||
</van-steps>
|
||||
<van-empty
|
||||
description="暂无轨迹信息"
|
||||
image="default"
|
||||
v-if="gjList.length <= 0 && showEmpty"
|
||||
/>
|
||||
</van-list>
|
||||
</div>
|
||||
</van-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { getWdgj } from "../../../api/common.js";
|
||||
import { getUserLzLocation } from "../../../api/user.js";
|
||||
import { dateFormat } from "../../../utils/tools.js";
|
||||
import router from "../../../router/index.js";
|
||||
const themeType = ref(getStorage("themeSetting"));
|
||||
const themeVars = ref({
|
||||
stepsBackgroundColor: themeType.value == "light" ? "#fff" : "#041634",
|
||||
});
|
||||
const minDate = new Date(2000, 0, 1);
|
||||
const maxDate = new Date();
|
||||
const chooseTime = ref(dateFormat());
|
||||
const calShow = ref(false); //是否显示日历
|
||||
const gjList = ref([]); //轨迹数据
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const pageSize = ref(10);
|
||||
const pageCurrent = ref(1);
|
||||
const total = ref(0);
|
||||
const showEmpty = ref(false);
|
||||
const kssj = ref(dateFormat());
|
||||
const jssj = ref(dateFormat());
|
||||
onMounted(() => {
|
||||
_getWdgj();
|
||||
});
|
||||
//触底加载
|
||||
function onLoad() {
|
||||
if (total.value <= pageCurrent.value) {
|
||||
finished.value = true;
|
||||
return;
|
||||
}
|
||||
pageCurrent.value++;
|
||||
_getWdgj();
|
||||
}
|
||||
|
||||
//确认日期选择
|
||||
function onConfirm(val) {
|
||||
calShow.value = false;
|
||||
pageCurrent.value = 1;
|
||||
gjList.value = [];
|
||||
chooseTime.value = dateFormat("", val);
|
||||
_getWdgj();
|
||||
}
|
||||
//点击地图模式
|
||||
function onClickRight() {
|
||||
router.push(`/my/views/wdgjMapPoint?time=${chooseTime.value}`);
|
||||
}
|
||||
//获取轨迹数据
|
||||
function _getWdgj() {
|
||||
loading.value = true;
|
||||
let data = {
|
||||
pageSize: pageSize.value,
|
||||
pageCurrent: pageCurrent.value,
|
||||
dwrq: chooseTime.value,
|
||||
sfzh: JSON.parse(window.localStorage.getItem("userInfo")).idEntityCard,
|
||||
};
|
||||
getWdgj(data)
|
||||
.then((res) => {
|
||||
loading.value = false;
|
||||
if (res && res.records.length > 0) {
|
||||
total.value = res.pages;
|
||||
for (let i = 0; i < res.records.length; i++) {
|
||||
res.records[i].address = "";
|
||||
// _getUserLocation(res.records[i].jd, res.records[i].wd, (_res) => {
|
||||
// res.records[i].address = _res;
|
||||
// gjList.value.push(res.records[i]);
|
||||
// });
|
||||
|
||||
gjList.value.push(res.records[i]);
|
||||
}
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
//获取当前位置信息
|
||||
function _getUserLocation(jd, wd, fun) {
|
||||
getUserLzLocation({ jd, wd }).then((res) => {
|
||||
if (res) {
|
||||
fun(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
::v-deep .van-step__line {
|
||||
background: #ebedf0 !important;
|
||||
}
|
||||
.steps_box {
|
||||
// @include font_color($font-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
line-height: 6vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,78 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<TopNav navTitle="地图模式" :showRight="false" :showLeft="true" />
|
||||
<GdMap />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import GdMap from "../../../components/GdMap/index.vue";
|
||||
import { getMApWdgj } from "../../../api/common.js";
|
||||
import { hintToast } from "../../../utils/tools.js";
|
||||
import emitter from "../../../utils/eventBus.js";
|
||||
const item = ref(null); // 警情数据
|
||||
const isRlt = ref(false);
|
||||
const points = ref([]);
|
||||
onMounted(() => {
|
||||
window.closeMapTitle = closeMapTitle;
|
||||
_getMApWdgj();
|
||||
});
|
||||
//获取坐标数据
|
||||
function _getMApWdgj() {
|
||||
let data = {
|
||||
dwrq: useRoute().query.time,
|
||||
sfzh: JSON.parse(window.localStorage.getItem("userInfo")).idEntityCard,
|
||||
};
|
||||
getMApWdgj(data).then((res) => {
|
||||
if (res && res.zbList.length > 0) {
|
||||
for (let i = 0; i < res.zbList.length; i++) {
|
||||
points.value = [...points.value, ...res.zbList[i]];
|
||||
}
|
||||
points.value = points.value.join(",");
|
||||
emitter.emit("drawLine", points.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
//关闭弹窗dom
|
||||
function closeMapTitle(val) {
|
||||
let doms = document.getElementById(val);
|
||||
doms.remove();
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.map_but_box {
|
||||
position: absolute;
|
||||
bottom: 10vw;
|
||||
width: 50%;
|
||||
left: 50%;
|
||||
z-index: 99;
|
||||
margin-left: -25%;
|
||||
}
|
||||
|
||||
.top_btn {
|
||||
position: fixed;
|
||||
top: 16vw;
|
||||
left: 0;
|
||||
right: 12px;
|
||||
height: 24px;
|
||||
color: #fff;
|
||||
z-index: 9;
|
||||
text-align: right;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
border: 1px solid #fff;
|
||||
line-height: 22px;
|
||||
padding: 0 12px;
|
||||
border-radius: 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
span.active {
|
||||
background: #517cea;
|
||||
border-color: #517cea;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,274 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<TopNav :navTitle="'下发指令'" />
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field v-model="normalForm.zlbt" label="指令标题" placeholder="请输入指令标题" input-align="right" required
|
||||
:rules="[{ required: true, message: '请输入指令标题' }]" />
|
||||
<van-cell-group>
|
||||
<van-cell clickable title="等级" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="zldj" direction="horizontal">
|
||||
<van-radio :name="item.dm" v-for="item in D_BZ_TYJB" :key="item">{{ item.zdmc }}</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell clickable title="接收对象" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="jsdx" direction="horizontal">
|
||||
<van-radio :name="item.dm" v-for="item in D_BZ_ZLJSDX" :key="item">{{ item.zdmc }}</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell class="mulSelect" title="人员" color="#1989fa" v-if="jsdx == '01'">
|
||||
<template #right-icon>
|
||||
<van-icon @click.stop="onSelectData('mj')" name="add-o" color="#1989fa" size="22" />
|
||||
</template>
|
||||
<template #default>
|
||||
<div class="selected-box">
|
||||
<div class="check-item-tag" v-for="(item, index) in list.mj" :key="index">
|
||||
<van-tag color="#7232dd" closeable @close="deleteCheckTag(item, index, 'mj')" plain>{{ item.zxrXm
|
||||
}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-field v-model="normalForm.bmName" label="部门" placeholder="请选择部门" input-align="right" readonly is-link
|
||||
required :rules="[{ required: true, message: '请选择部门' }]"
|
||||
@click="(bmShow = true), (selectType = 'bm'), (showSelect = false)" v-if="jsdx == '02'" />
|
||||
<van-cell class="mulSelect" title="巡组" color="#1989fa" v-if="jsdx == '03'">
|
||||
<template #right-icon>
|
||||
<van-icon @click.stop="onSelectData('xz')" name="add-o" color="#1989fa" size="22" />
|
||||
</template>
|
||||
<template #default>
|
||||
<div class="selected-box">
|
||||
<div class="check-item-tag" v-for="(item, index) in list.xz" :key="index">
|
||||
<van-tag color="#7232dd" closeable @close="deleteCheckTag(item, index, 'xz')" plain>{{ item.zxrXzmc
|
||||
}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-field rows="3" label="内容" type="textarea" label-width="35px" v-model="normalForm.zlnr"
|
||||
placeholder="请输入指令内容" />
|
||||
<div style="margin: 20vw 0; padding: 0 5vw">
|
||||
<van-button :loading="loading" round native-type="submit" block type="primary">
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
<Select bclx="02" :dwlx="dwlx" :checked="r_checked" :selectType="selectType" :show="showSelect"
|
||||
:checkedList="list.checkedList" @update:cancel="showSelect = false" @update:confirm="onComfirm"
|
||||
:key="selectIndex" />
|
||||
<van-dialog :show="bmShow" title="选择部门" show-cancel-button @confirm="bmShow = false" @cancel="bmShow = false"
|
||||
confirmButtonColor="#3e6ee8">
|
||||
<van-cascader v-model="normalForm.deptName" :closeable="false" @change="onChangeBm" :show-header="false"
|
||||
active-color="#3e6ee8" title="请选择部门" :options="list.options" :field-names="customFieldName"
|
||||
@click-tab="onClickTabCascader">
|
||||
</van-cascader>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { selectNextPage } from "../../api/yjxx.js";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { addZlData } from "../../api/zlzx.js";
|
||||
import Select from "../../components/Select.vue";
|
||||
import { hintToast } from "../../utils/tools.js";
|
||||
import router from "@/router/index.js";
|
||||
const { D_BZ_TYJB, D_BZ_ZLJSDX } = getDictList("D_BZ_TYJB", "D_BZ_ZLJSDX"); //字典信息
|
||||
const zldj = ref("40"); //指令等级 默认蓝色
|
||||
const jsdx = ref("01"); //接收对象 默认人员
|
||||
const dwlx = ref("01");
|
||||
const r_checked = ref(""); //单选框默认选中
|
||||
const kwd = ref(""); //选择器关键字
|
||||
const selectIndex = ref(1); //选择器组件KEY
|
||||
const selectType = ref(""); //选择的类型
|
||||
const showSelect = ref(false);
|
||||
const bmShow = ref(false); //部门选择器
|
||||
const list = reactive({
|
||||
checkedList: [],
|
||||
mj: [],
|
||||
xz: [],
|
||||
bm: [],
|
||||
options: [],
|
||||
tabCascader: [], //选中部门的临时数据
|
||||
});
|
||||
//选择器字段
|
||||
const customFieldName = {
|
||||
text: "orgName",
|
||||
value: "id",
|
||||
children: "childDeptList",
|
||||
};
|
||||
//表单数据
|
||||
const normalForm = ref({
|
||||
zlbt: "",
|
||||
zlnr: "",
|
||||
deptName: "",
|
||||
bmName: "",
|
||||
});
|
||||
const zxrDtoList = ref([]);
|
||||
onMounted(() => {
|
||||
_selectNextPage();
|
||||
});
|
||||
//选中的部门数据
|
||||
function onChangeBm(val) {
|
||||
list.tabCascader = val.selectedOptions;
|
||||
let info = val.selectedOptions.find((item) => {
|
||||
return item.id == val.value;
|
||||
});
|
||||
if (info) {
|
||||
let { orgName, id } = info;
|
||||
normalForm.value.bmName = orgName;
|
||||
list.bm = [{ ssbmid: id, ssbmmc: orgName }];
|
||||
}
|
||||
}
|
||||
//部门选择tabs
|
||||
function onClickTabCascader(val) {
|
||||
let info = list.tabCascader[val];
|
||||
if (info) {
|
||||
let { orgName, id } = info;
|
||||
normalForm.value.bmName = orgName;
|
||||
list.bm = [{ ssbmid: id, ssbmmc: orgName }];
|
||||
}
|
||||
}
|
||||
//查询部门数据
|
||||
function _selectNextPage() {
|
||||
selectNextPage({
|
||||
size: 100,
|
||||
current: 1,
|
||||
}).then((res) => {
|
||||
list.options = [res.records[0]];
|
||||
});
|
||||
}
|
||||
//提交指令
|
||||
function onSubmit() {
|
||||
switch (selectType.value) {
|
||||
case "mj":
|
||||
zxrDtoList.value = list.mj;
|
||||
break;
|
||||
case "bm":
|
||||
zxrDtoList.value = list.bm;
|
||||
break;
|
||||
case "xz":
|
||||
zxrDtoList.value = list.xz;
|
||||
break;
|
||||
}
|
||||
let data = {
|
||||
zlbt: normalForm.value.zlbt,
|
||||
zldj: zldj.value,
|
||||
zljsdx: jsdx.value,
|
||||
zllx: "08",
|
||||
zlnr: normalForm.value.zlnr,
|
||||
zxrDtoList: zxrDtoList.value,
|
||||
};
|
||||
addZlData(data).then((res) => {
|
||||
hintToast("下发成功!");
|
||||
router.replace("/newTwoHome/myZl");
|
||||
});
|
||||
}
|
||||
//打开弹窗
|
||||
function onSelectData(val) {
|
||||
selectType.value = val;
|
||||
showSelect.value = true;
|
||||
list.bm = [];
|
||||
list.mj = [];
|
||||
list.xz = [];
|
||||
selectIndex.value++;
|
||||
}
|
||||
//确认选择
|
||||
function onComfirm(val) {
|
||||
if (val.length <= 0) return;
|
||||
switch (selectType.value) {
|
||||
case "mj":
|
||||
list.checkedList = [];
|
||||
val.forEach((item) => {
|
||||
list.checkedList.push(item.key);
|
||||
toggle(item);
|
||||
});
|
||||
break;
|
||||
case "xz":
|
||||
list.checkedList = [];
|
||||
val.forEach((item) => {
|
||||
list.checkedList.push(item.key);
|
||||
toggle(item);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
//设置选中值
|
||||
const toggle = (item) => {
|
||||
switch (selectType.value) {
|
||||
case "mj":
|
||||
list.mj.push({
|
||||
zxrJllx: item.fl,
|
||||
zxrLx: "01",
|
||||
zxrSfz: item.sfzh,
|
||||
jlxm: item.xm,
|
||||
sfzh: item.sfzh,
|
||||
zxrXm: item.xm,
|
||||
zxrId: item.ryid,
|
||||
});
|
||||
break;
|
||||
case "xz":
|
||||
list.xz.push({
|
||||
zxrXzmc: item.jzMc || item.fzrXm + "组",
|
||||
zxrXzid: item.id,
|
||||
});
|
||||
break;
|
||||
}
|
||||
};
|
||||
//删除选中数据
|
||||
function deleteCheckTag(item, index, val) {
|
||||
switch (val) {
|
||||
case "mj":
|
||||
list.mj.splice(index, 1);
|
||||
break;
|
||||
case "xz":
|
||||
list.xz.splice(index, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.container {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
|
||||
::v-deep .mulSelect .van-cell__title,
|
||||
.van-cell__value {
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
::v-deep .mulSelect .van-cell__value {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.van-cell:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
@include table_item_color($table-item-theme);
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
padding: 6px;
|
||||
margin: 8px 4%;
|
||||
width: 92%;
|
||||
overflow: hidden;
|
||||
color: var(--van-cell-text-color);
|
||||
font-size: var(--van-cell-font-size);
|
||||
line-height: var(--van-cell-line-height);
|
||||
}
|
||||
|
||||
.check-item-tag {
|
||||
display: inline-block;
|
||||
margin: 0 6px;
|
||||
}
|
||||
</style>
|
||||
@ -1,490 +0,0 @@
|
||||
<template>
|
||||
<div class="" @click="showThemeSetting = false">
|
||||
<div class="new_leaderTop">
|
||||
<div class="new_welcome">
|
||||
<div class="userName_box">
|
||||
<div class="wd">
|
||||
{{ weatherInfo.typeName }} {{ weatherInfo.minTemp }}℃-{{
|
||||
weatherInfo.maxTemp
|
||||
}}℃ {{ weatherInfo.wind }}风 {{ weatherInfo.power }} 级
|
||||
</div>
|
||||
<img class="face" src="../../assets/images/leader/face@2x.png" />
|
||||
<span class="tq_box">欢迎您 {{ userInfo.userName }}</span>
|
||||
</div>
|
||||
<van-popover v-model:show="showThemeSetting" :actions="actions" :theme="defaultThemeQp" :offset="[16, -25]"
|
||||
placement="bottom-end" @select="onSelectSeting" :teleport="isbody">
|
||||
<template #reference>
|
||||
<van-icon name="weapp-nav" color="#fff" size="22px" @click.stop="showThemeSetting = true" />
|
||||
</template>
|
||||
</van-popover>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center_function_box">
|
||||
<div class="f_item" v-for="item in home.functionList" :key="item" @click="onRouter(item.path)">
|
||||
<img :src="item.imgUrl" alt="" />
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 3vw; background: #eff0f5"></div>
|
||||
<div style="padding: 3vw" @click="onClickLdjsc">
|
||||
<div class="ldjsc_box">
|
||||
<div class="ldjsc_detail">
|
||||
<span class="ldjsc_title">领导驾驶舱</span>
|
||||
<span class="ldjsc_hint">点击进入领导驾驶舱看板</span>
|
||||
</div>
|
||||
<div class="ckgd">查看更多</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 3vw; background: #eff0f5"></div>
|
||||
<div class="zszh_box_box">
|
||||
<div class="zszh">掌上指挥</div>
|
||||
<!-- <div class="zszh_box">
|
||||
<div
|
||||
class="zszh_box_item"
|
||||
style="
|
||||
background: linear-gradient(90deg, #fff9f1 0%, #f9f1e4 100%);
|
||||
color: #783000;
|
||||
"
|
||||
@click="onCLickFqzl"
|
||||
>
|
||||
<van-icon
|
||||
:name="require('../../assets/images/new/cswdzl.png')"
|
||||
size="11vw"
|
||||
badge="+"
|
||||
></van-icon>
|
||||
<div class="zszh_title">新增指令</div>
|
||||
</div>
|
||||
<div
|
||||
class="zszh_box_item"
|
||||
style="
|
||||
background: linear-gradient(90deg, #fff9f1 0%, #f9f1e4 100%);
|
||||
color: #783000;
|
||||
"
|
||||
@click="onCLickZlLb"
|
||||
>
|
||||
<van-icon
|
||||
:name="require('../../assets/images/new/cswdzl.png')"
|
||||
size="11vw"
|
||||
:badge="myzlCount"
|
||||
></van-icon>
|
||||
<div class="zszh_title">我发起的指令</div>
|
||||
</div>
|
||||
<div
|
||||
class="zszh_box_item"
|
||||
style="
|
||||
background: linear-gradient(90deg, #f6fafd 0%, #e8f0fc 100%);
|
||||
color: #163678;
|
||||
"
|
||||
@click="onCLickYwcldzl"
|
||||
>
|
||||
<van-icon
|
||||
:name="require('../../assets/images/new/wcldzl.png')"
|
||||
size="11vw"
|
||||
:badge="ywclzlCount"
|
||||
></van-icon>
|
||||
<div class="zszh_title">由我处理指令</div>
|
||||
</div>
|
||||
<div
|
||||
class="zszh_box_item"
|
||||
style="
|
||||
background: linear-gradient(90deg, #f6fafd 0%, #e8fcfa 100%);
|
||||
color: #397361;
|
||||
"
|
||||
>
|
||||
<van-icon
|
||||
:name="require('../../assets/images/new/wfsdzl.png')"
|
||||
size="11vw"
|
||||
:badge="cswdzlCount"
|
||||
></van-icon>
|
||||
<div class="zszh_title">抄送我的指令</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="zszh_box">
|
||||
<div class="zszh_box_item" v-for="item in home.totalLit" :key="item"
|
||||
:style="{ background: item.bg, color: item.colors }" @click="onCLickSelect(item.url)">
|
||||
<van-icon :name="item.icons" size="11vw" :badge="item.badges"></van-icon>
|
||||
<div class="zszh_title">{{ item.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-dialog :show="showUserChangePicker" title="选择角色" show-cancel-button @confirm="onConfirm"
|
||||
@cancel="showUserChangePicker = false" confirmButtonColor="#3e6ee8">
|
||||
<van-radio-group v-model="isActive">
|
||||
<van-radio v-for="item in radioList" :key="item.id" :name="item.id">{{
|
||||
item.homename
|
||||
}}</van-radio>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
<!-- 盘人 -->
|
||||
<checkedPeople ref="peo" :key="zdgzKey + 'pr'" />
|
||||
<!-- 盘车 -->
|
||||
<checkedCar ref="car" :key="zdgzKey + 'pc'" />
|
||||
|
||||
<PcModel ref="dhcr" :key="zdgzKey + 'dhcr'"></PcModel>
|
||||
<!-- 底部tas -->
|
||||
<div style="height: 11.8666vw"></div>
|
||||
<BottomTabs type="sy" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import BottomTabs from "../../components/bottomTabs.vue";
|
||||
import { getUserSelectPage } from "../../api/gxHomeApi.js";
|
||||
import { dateFormat, setUserHome, getWeatherData } from "../../utils/tools.js";
|
||||
import checkedCar from "../../pages/spsHome/components/checkCar.vue";
|
||||
import checkedPeople from "../../pages/spsHome/components/checkPeople.vue";
|
||||
import PcModel from "../../components/pcModel.vue";
|
||||
import { getHomejqtj } from "../../api/jqxx.js";
|
||||
import { getZdRyCount } from "../../api/zdry.js";
|
||||
import { ref, onMounted, onUnmounted, onActivated, reactive } from "vue";
|
||||
import { getMyTaskList, getMyTaskTotal, upGrzt } from "../../api/rwzx.js";
|
||||
import { getMyZlList } from "../../api/zlzx.js";
|
||||
import router from "../../router";
|
||||
import { onBeforeRouteLeave } from "vue-router";
|
||||
const isActive = ref(6); //用户选中的身份
|
||||
const radioList = ref([]); //用户身份数据
|
||||
const showUserChangePicker = ref(false); //用户换身份弹窗
|
||||
const showThemeSetting = ref(false); //是否显示设置主题模板
|
||||
const defaultThemeQp = ref("light"); //默认的右侧气泡框主题
|
||||
const isbody = ref("body");
|
||||
const weatherInfo = ref({
|
||||
maxTemperature: 24,
|
||||
minTemperature: 14,
|
||||
type: "多云",
|
||||
}); //天气数据
|
||||
const actions = [
|
||||
{
|
||||
text: "切换身份",
|
||||
icon: "exchange",
|
||||
},
|
||||
];
|
||||
const dhcr = ref(); //电话查人组件对象
|
||||
const peo = ref(); //盘查人员组件对象
|
||||
const car = ref(); //盘查车辆组件对象
|
||||
const ywclzlCount = ref(0); //由我处理的指令统计
|
||||
const myzlCount = ref(0);
|
||||
const cswdzlCount = ref(0); //抄送我的指令统计
|
||||
const zdgzKey = ref(1);
|
||||
const userInfo = JSON.parse(window.localStorage.getItem("userInfo")); //用户信息
|
||||
const home = reactive({
|
||||
functionList: [
|
||||
{
|
||||
name: "人员盘查",
|
||||
imgUrl: require("../../assets/images/menu-yyhc.png"),
|
||||
path: "pr",
|
||||
},
|
||||
{
|
||||
name: "勤务统计",
|
||||
imgUrl: require("../../assets/images/qwtj.png"),
|
||||
path: "/hisQwCenter",
|
||||
},
|
||||
{
|
||||
name: "车辆盘查",
|
||||
imgUrl: require("../../assets/images/menu-clhc.png"),
|
||||
path: "pc",
|
||||
},
|
||||
{
|
||||
name: "巡防报备",
|
||||
imgUrl: require("../../assets/images/menu-rwzx.png"),
|
||||
path: "/yyzx/xfbb/addXfbb",
|
||||
},
|
||||
{
|
||||
name: "预警统计",
|
||||
imgUrl: require("../../assets/images/jq_home.png"),
|
||||
path: "/yyzx/yjxx/yjTotal",
|
||||
},
|
||||
{
|
||||
name: "值班报备",
|
||||
imgUrl: require("../../assets/images/menu-qwzx.png"),
|
||||
path: "/yyzx/views/addZbbb",
|
||||
},
|
||||
{
|
||||
name: "查看更多",
|
||||
imgUrl: require("../../assets/images/new_gd.png"),
|
||||
path: "/yyzx",
|
||||
},
|
||||
], //中间功能区
|
||||
rwList: [],
|
||||
totalLit: [
|
||||
{
|
||||
url: "/newTwoHome/addZl",
|
||||
icons: require("../../assets/images/new/cswdzl.png"),
|
||||
text: "新增指令",
|
||||
bg: "linear-gradient(90deg, #fff9f1 0%, #f9f1e4 100%)",
|
||||
colors: "#783000",
|
||||
badges: "+",
|
||||
},
|
||||
{
|
||||
url: "/newTwoHome/myZl",
|
||||
icons: require("../../assets/images/new/cswdzl.png"),
|
||||
text: "我发起的指令",
|
||||
bg: "linear-gradient(90deg, #fff9f1 0%, #f9f1e4 100%)",
|
||||
colors: "#783000",
|
||||
badges: 0,
|
||||
},
|
||||
{
|
||||
url: "/yyzx/zlzx/zlzxIndex",
|
||||
icons: require("../../assets/images/new/wcldzl.png"),
|
||||
text: "由我处理的指令",
|
||||
bg: "linear-gradient(90deg, #f6fafd 0%, #e8f0fc 100%)",
|
||||
colors: "#163678",
|
||||
badges: 0,
|
||||
},
|
||||
{
|
||||
url: "/newTwoHome/myZl?type=cs",
|
||||
icons: require("../../assets/images/new/wfsdzl.png"),
|
||||
text: "抄送我的指令",
|
||||
bg: "linear-gradient(90deg, #f6fafd 0%, #e8fcfa 100%)",
|
||||
colors: "#397361",
|
||||
badges: 0,
|
||||
},
|
||||
],
|
||||
});
|
||||
const timeObj = reactive({
|
||||
kssj: "",
|
||||
jssj: "",
|
||||
});
|
||||
onMounted(() => {
|
||||
zdgzKey.value++;
|
||||
_getUserSelectPage();
|
||||
_getMyTaskTotal();
|
||||
});
|
||||
//跳转
|
||||
function onCLickSelect(url) {
|
||||
router.push(url);
|
||||
}
|
||||
//发起指令
|
||||
function onCLickFqzl() {
|
||||
router.push("/newTwoHome/addZl");
|
||||
}
|
||||
// 我发起的指令列表
|
||||
function onCLickZlLb() {
|
||||
router.push("/newTwoHome/myZl");
|
||||
}
|
||||
//点击由我处理的指令
|
||||
function onCLickYwcldzl() {
|
||||
router.push("/yyzx/zlzx/zlzxIndex");
|
||||
}
|
||||
//跳转领导驾驶舱
|
||||
function onClickLdjsc() {
|
||||
router.push("/newTwoHome/ldjsc");
|
||||
}
|
||||
//获取任务统计
|
||||
function _getMyTaskTotal() {
|
||||
getMyTaskTotal({ sfzh: userInfo.idEntityCard }).then((res) => {
|
||||
if (res) {
|
||||
res.forEach((item) => {
|
||||
if (item.rwxl == "05") {
|
||||
ywclzlCount.value = item.count;
|
||||
}
|
||||
if (item.rwxl == "06") {
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
getMyZlList({
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
}).then((res) => {
|
||||
myzlCount.value = res.total;
|
||||
});
|
||||
}
|
||||
//获取用户首页模板
|
||||
function _getUserSelectPage() {
|
||||
getUserSelectPage({
|
||||
size: 20,
|
||||
current: 1,
|
||||
}).then((res) => {
|
||||
res.records.forEach((item) => {
|
||||
radioList.value.push(item);
|
||||
});
|
||||
});
|
||||
}
|
||||
//选中的设置信息
|
||||
function onSelectSeting(e) {
|
||||
switch (e.text) {
|
||||
case "切换身份":
|
||||
showUserChangePicker.value = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//用户选中身份
|
||||
function onConfirm() {
|
||||
showUserChangePicker.value = false;
|
||||
setUserHome(isActive.value);
|
||||
}
|
||||
//跳转页面
|
||||
function onRouter(path) {
|
||||
switch (path) {
|
||||
case "/rw":
|
||||
case "/yyzx":
|
||||
router.replace(path);
|
||||
break;
|
||||
case "pr":
|
||||
checkPeople();
|
||||
break;
|
||||
case "pc":
|
||||
checkCar();
|
||||
break;
|
||||
case "/dhcr":
|
||||
checkDhcr();
|
||||
break;
|
||||
case "rhjs":
|
||||
try {
|
||||
bridge.toFusionComputing();
|
||||
} catch (error) { }
|
||||
break;
|
||||
default:
|
||||
router.push(path);
|
||||
}
|
||||
}
|
||||
//点击盘人
|
||||
function checkPeople() {
|
||||
peo.value.handleOpen();
|
||||
}
|
||||
//点击盘车
|
||||
function checkCar() {
|
||||
car.value.handleOpen();
|
||||
}
|
||||
// 点击电弧查人
|
||||
function checkDhcr() {
|
||||
dhcr.value.peoplePopupShow = true;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.zszh_box_box {
|
||||
padding: 3vw;
|
||||
|
||||
.zszh {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.zszh_box {
|
||||
@include font_size($font_medium_s);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 4vw;
|
||||
|
||||
.zszh_box_item {
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
padding: 4vw 0;
|
||||
border-radius: 3vw;
|
||||
margin-bottom: 5vw;
|
||||
|
||||
.zszh_title {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.new_leaderTop {
|
||||
height: 26.33334vw;
|
||||
background: url("../../assets/images/new/banner.png") no-repeat;
|
||||
background-size: 100%;
|
||||
top: 0;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.new_welcome {
|
||||
padding: 5.5vw 5vw 3vw 5vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 13px;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.userName_box {
|
||||
color: #fff;
|
||||
|
||||
.wd {
|
||||
margin-bottom: 3vw;
|
||||
}
|
||||
|
||||
.tq_box {
|
||||
@include font_size($font_medium);
|
||||
position: relative;
|
||||
top: -0.5vw;
|
||||
}
|
||||
|
||||
.face {
|
||||
width: 5vw;
|
||||
height: 4vw;
|
||||
margin-right: 2.5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.center_function_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
background: #fff;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
padding: 4vw 1vw 0 1vw;
|
||||
|
||||
.f_item {
|
||||
text-align: center;
|
||||
width: 20%;
|
||||
margin: 0 0 4.5vw 0;
|
||||
|
||||
&>img {
|
||||
width: 13vw;
|
||||
height: 13vw;
|
||||
margin-bottom: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-radio-group {
|
||||
padding: 5vw;
|
||||
}
|
||||
|
||||
::v-deep .van-radio {
|
||||
padding: 2vw 0;
|
||||
}
|
||||
|
||||
.ldkb_img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ldjsc_box {
|
||||
background: url("../../assets/images/new/ldjsc_url.png");
|
||||
background-size: 100% 100%;
|
||||
height: 26vw;
|
||||
@include font_size($font_medium_s);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 6vw;
|
||||
}
|
||||
|
||||
.ldjsc_detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.ldjsc_title {
|
||||
font-size: 5vw;
|
||||
font-weight: 700;
|
||||
color: #104ca5;
|
||||
}
|
||||
|
||||
.ldjsc_hint {
|
||||
margin-top: 3vw;
|
||||
}
|
||||
}
|
||||
|
||||
.ckgd {
|
||||
height: 7vw;
|
||||
line-height: 7vw;
|
||||
width: 20vw;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 4vw;
|
||||
background: linear-gradient(90deg, #2972fa 0%, #0aa7f8 100%);
|
||||
}
|
||||
</style>
|
||||
@ -1,86 +0,0 @@
|
||||
<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>
|
||||
@ -1,178 +0,0 @@
|
||||
<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>
|
||||
@ -1,222 +0,0 @@
|
||||
<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>
|
||||
@ -1,987 +0,0 @@
|
||||
<template>
|
||||
<div class="" style="padding-top: 13vw">
|
||||
<TopNav navTitle="领导驾驶舱" :showRight="false" :showLeft="true" />
|
||||
<div class="wddb_box">
|
||||
<div class="wdrw_title">我的待办任务</div>
|
||||
<div class="dbrw_total">
|
||||
<div @click="routerPush('/rw')" class="wddb_item">
|
||||
<span class="num">{{ myDb.dcl }}</span><br />
|
||||
待处理任务
|
||||
</div>
|
||||
<div @click="routerPush('/newTwoHome/yclList')" class="wddb_item">
|
||||
<span class="num">{{ myDb.ycl }}</span><br />
|
||||
已处理任务
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 3vw; background: #eff0f5"></div>
|
||||
<div class="jq_box topM">
|
||||
<span class="jmsfjq_total_title">警情态势</span>
|
||||
</div>
|
||||
<div class="jq_box">
|
||||
<div class="jq_item left_item" style="padding: 0">
|
||||
<div class="jrjqzs_total jq_total_item" @click="onClickJqTotal(1)">
|
||||
<span class="jmsfjq_total_title">今日总警情</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ jqTotal.total }} </span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">环比<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.totalHb > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.totalHb > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.totalHb }}%</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zdjqzs_total jq_total_item" @click="onClickJqTotal(2)">
|
||||
<span class="jmsfjq_total_title">今日重大警情</span>
|
||||
<div style="margin: 1vw 0 0 0">
|
||||
<span class="red jq_num">{{ jqTotal.zdCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
占比<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.zdHb > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.zdHb > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.zdHb }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wffzzs_total jq_total_item" @click="onClickJqTotal(3)">
|
||||
<span class="jmsfjq_total_title">今日违法犯罪警情</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ jqTotal.wffzCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
环比<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.wffzHb > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.wffzHb > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.wffzHb }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="xz_xs_total">
|
||||
<span>刑事 {{ jqTotal.xsCount }} </span>
|
||||
<span class="sx"></span>
|
||||
<span>行政 {{ jqTotal.xzCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jq_total_item dxzp_item" @click="onClickJqTotal(12)">
|
||||
<span class="jmsfjq_total_title">今日一般警情</span>
|
||||
<div style="margin: 1vw 0 0 0">
|
||||
<span class="jq_num">{{ jqTotal.dzCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
占比<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.dzHb > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.dzHb > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.dzHb }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jq_item jmsfjq_box">
|
||||
<div class="jmsfjq_total_title">街面实发警情</div>
|
||||
<div style="margin-top: 2vw">
|
||||
<span style="font-size: 6vw; font-weight: 700">{{
|
||||
jqTotal.jmsfTotal
|
||||
}}</span>
|
||||
<span> 件 </span>
|
||||
<span>较昨日  <span :class="zrjqTotal > 0 ? 'red' : 'green'">{{
|
||||
zrjqTotal > 0 ? "+" + zrjqTotal : zrjqTotal
|
||||
}}</span></span>
|
||||
</div>
|
||||
<div class="mk_jq_total_box" @click="onClickJqTotal(9)">
|
||||
<div class="jq_total">
|
||||
<div>
|
||||
<span class="red"># </span>
|
||||
<span>两抢</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 4.5vw">{{ jqTotal.lqCount }}</span>
|
||||
<span class="jq_total_unit"> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="jqhb"> 较昨日 <span :class="jqTotal.lqCount > 0 ? 'red' : 'green'">{{ jqTotal.lqUp > 0 ?
|
||||
"+" + jqTotal.lqUp : jqTotal.lqUp }}</span></span>
|
||||
</div>
|
||||
<div class="mk_jq_total_box" @click="onClickJqTotal(10)">
|
||||
<div class="jq_total">
|
||||
<div>
|
||||
<span class="red"># </span>
|
||||
<span>盗窃汽车</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 4.5vw">
|
||||
{{ jqTotal.qcCount }}
|
||||
</span>
|
||||
<span class="jq_total_unit"> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="jqhb"> 较昨日 <span :class="jqTotal.qcUp > 0 ? 'red' : 'green'">{{ jqTotal.qcUp > 0 ? "+"
|
||||
+ jqTotal.qcUp : jqTotal.qcUp }}</span></span>
|
||||
</div>
|
||||
<div class="mk_jq_total_box" @click="onClickJqTotal(8)">
|
||||
<div class="jq_total">
|
||||
<div>
|
||||
<span class="red"># </span>
|
||||
<span>盗窃车内财物</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 4.5vw">{{ jqTotal.ccCount }}</span>
|
||||
<span class="jq_total_unit"> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="jqhb"> 较昨日 <span :class="jqTotal.ccUp > 0 ? 'red' : 'green'">{{ jqTotal.ccUp > 0 ? "+"
|
||||
+ jqTotal.ccUp : jqTotal.ccUp }}</span></span>
|
||||
</div>
|
||||
<div class="mk_jq_total_box" @click="onClickJqTotal(7)">
|
||||
<div class="jq_total">
|
||||
<div>
|
||||
<span class="red"># </span>
|
||||
<span>扒窃</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 4.5vw">{{ jqTotal.pqCount }}</span>
|
||||
<span class="jq_total_unit"> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="jqhb"> 较昨日 <span :class="jqTotal.pqUp > 0 ? 'red' : 'green'">{{ jqTotal.pqUp > 0 ? "+"
|
||||
+ jqTotal.pqUp : jqTotal.pqUp }}</span></span>
|
||||
</div>
|
||||
|
||||
<div class="mk_jq_total_box" @click="onClickJqTotal(6)">
|
||||
<div class="jq_total">
|
||||
<div>
|
||||
<span class="red"># </span>
|
||||
<span>盗窃三车</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 4.5vw">{{ jqTotal.dqscCount }}</span>
|
||||
<span class="jq_total_unit"> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="jqhb"> 较昨日 <span :class="jqTotal.dqscUp > 0 ? 'red' : 'green'">{{
|
||||
jqTotal.dqscUp > 0 ? "+" + jqTotal.dqscUp : jqTotal.dqscUp
|
||||
}}</span></span>
|
||||
</div>
|
||||
<!-- <div class="mk_jq_total_box">
|
||||
<div class="jq_total">
|
||||
<div>
|
||||
<span class="red"># </span>
|
||||
<span>入室盗窃</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 4.5vw">{{ jqTotal.rdCount }}</span>
|
||||
<span class="jq_total_unit"> 件</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="jqhb"
|
||||
> 较昨日 <span
|
||||
:class="jqTotal.rdUp > 0 ? 'red' : 'green'"
|
||||
>{{ jqTotal.rdUp > 0 ? "+" + jqTotal.rdUp : jqTotal.rdUp }}</span
|
||||
></span
|
||||
>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div style="height: 3vw; background: #eff0f5"></div> -->
|
||||
<!-- <div class="wqts_box">
|
||||
<div class="jq_box topM">
|
||||
<span class="jmsfjq_total_title">稳情态势</span>
|
||||
</div>
|
||||
|
||||
<div class="order_total">
|
||||
<div class="total_item" style="background: #dd2024">
|
||||
<span>2</span><br />
|
||||
<span>失控数量</span>
|
||||
</div>
|
||||
<div class="total_item" style="background: #fb8734">
|
||||
<span>10</span><br />
|
||||
<span>在控数量</span>
|
||||
</div>
|
||||
<div class="total_item" style="background: #ecc617">
|
||||
<span>10</span><br />
|
||||
<span>待反馈数</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wk_echart">
|
||||
<WqtsChart style="flex: 1" />
|
||||
<div style="flex: 1">
|
||||
<div class="wk_item" v-for="(item, index) in wkList" :key="index">
|
||||
<span class="wk_dot" :style="{ background: item.color }"></span
|
||||
>{{ item.text }} {{ item.hb }}% {{ item.num }} 人
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div style="height: 3vw; background: #eff0f5"></div> -->
|
||||
<div style="height: 3vw; background: #eff0f5"></div>
|
||||
<div class="qwqk_box">
|
||||
<div class="jmsfjq_total_title title_box" @click="routerPush(`/qwCenter`, { status: '街面警力' })">
|
||||
<span>勤务情况</span>
|
||||
<span class="look_more">查看更多 </span>
|
||||
</div>
|
||||
<div class="qu_total">
|
||||
<div class="qu_item_total">
|
||||
<span>{{ qwData.zbld.zbldxm }}</span><br /><span>值班领导</span>
|
||||
</div>
|
||||
<div class="qu_item_total">
|
||||
<span>{{ qwData.zgjl }}</span><br /><span>在岗警力</span>
|
||||
</div>
|
||||
<div class="qu_item_total">
|
||||
<span>{{ qwData.jmjl }}</span><br /><span>街面警力</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zdqw_box" v-if="qwData.xfList.length > 0">
|
||||
<div class="zdqw_item_box" v-for="item in qwData.xfList" :key="item" @click="onClickXfInfo(item.id)">
|
||||
<div class="zdqw_title_box">
|
||||
<span class="zdqw_msg" style="font-size: 15px; font-weight: 700"><span style="
|
||||
background: #4d1717;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
padding: 0 1vw;
|
||||
margin-right: 1.5vw;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
">类型</span>{{ setDict(item.qwlx, D_BZ_QWLX) }}</span>
|
||||
<span class="">负责人:<span style="
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 0 1.5vw;
|
||||
">{{ item.fzrXm }}</span></span>
|
||||
</div>
|
||||
<div class="zdqw_mj_fj_num">
|
||||
<span class="van-ellipsis">备注:{{ item.bz }}</span>
|
||||
<div class="" style="font-weight: 700; line-height: 5vw">
|
||||
<span class="zdqw_msg">民警:{{ item.pbmj.length }}人</span>
|
||||
<span class="zdqw_msg" style="padding-left: 5vw; border-left: 1px solid #4d1717">辅警:{{ item.pbfj.length
|
||||
}}人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wzdqw_box" v-else>无重大勤务</div>
|
||||
<div class="zbld_box">
|
||||
<div class="zbld_item_box" v-for="item in qwData.zbList" :key="item" @click="onClickZbInfo(item.id)">
|
||||
<img src="../../assets/images/new/jc.png" />
|
||||
<div class="abld_detail">
|
||||
<span>{{ item.zbldXm }}</span><br />
|
||||
<span style="display: inline-block; width: 28vw; margin-top: 1vw" class="van-ellipsis">{{ item.ssbm
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 3vw; background: #eff0f5"></div>
|
||||
<div class="sjkb_box">
|
||||
<div class="jmsfjq_total_title">数据详览</div>
|
||||
<div class="sjkb_item_box">
|
||||
<div @click="routerPush('/yyzx/fmjq/index')" class="sjkb_item">
|
||||
方面性警情分析
|
||||
</div>
|
||||
<div @click="routerPush('/jqfx', { jqlx: 'zjq' })" class="sjkb_item">
|
||||
总警情分析
|
||||
</div>
|
||||
<div @click="routerPush('/jqfx', { jqlx: 'wffzjq' })" class="sjkb_item">
|
||||
违法犯罪警情分析
|
||||
</div>
|
||||
<div @click="routerPush('/jqfx', { jqlx: 'jmjq' })" class="sjkb_item">
|
||||
街面警情分析
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 3vw; background: #eff0f5"></div>
|
||||
<!-- <div class="jq_box topM">
|
||||
<span class="jmsfjq_total_title" style="paddingtop: 2vw">部门动态</span>
|
||||
</div>
|
||||
<div class="bmdt_box">
|
||||
<div
|
||||
v-for="(item, index) in bmList"
|
||||
:key="index"
|
||||
style="text-align: center; margin-right: 1.5vw"
|
||||
@click="bmClick(item)"
|
||||
>
|
||||
<img :src="item.img" alt="" class="bmdt_img" />
|
||||
<div class="bm_item">
|
||||
{{ item.text }}
|
||||
<span
|
||||
v-if="index != 0"
|
||||
style="font-weight: 100; color: #333; margin-top: 2vw"
|
||||
>(开发中)</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import WqtsChart from "./wqtsChart.vue";
|
||||
import { getMyTaskTotal } from "../../api/rwzx.js";
|
||||
import { getZdRyCount } from "../../api/zdry.js";
|
||||
import {
|
||||
getYclTask,
|
||||
getZbld,
|
||||
getJmjlCount,
|
||||
getZgjlCount,
|
||||
getTbQwZbbb,
|
||||
getTbQwXfbb,
|
||||
} from "../../api/ldjsc.js";
|
||||
import { baseUrl2 } from "../../utils/request";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { ref, onMounted, onUnmounted, onActivated, reactive } from "vue";
|
||||
import router from "../../router";
|
||||
import axios from "axios";
|
||||
import { dateFormat } from "../../utils/tools.js";
|
||||
import { getYqList } from "../../api/common.js";
|
||||
import store from "../../store";
|
||||
import { onBeforeRouteLeave } from "vue-router";
|
||||
const { D_BZ_QWLX } = getDictList("D_BZ_QWLX");
|
||||
const userInfo = JSON.parse(window.localStorage.getItem("userInfo"));
|
||||
const myDb = reactive({
|
||||
dcl: 0,
|
||||
ycl: 0,
|
||||
});
|
||||
const zdgz = reactive({
|
||||
hszdry: 0,
|
||||
});
|
||||
const qwData = reactive({
|
||||
zgjl: 0, //在岗警力
|
||||
jmjl: 0, //街面警力
|
||||
zbld: {}, //值班领导
|
||||
zbList: [], //勤务值班列表
|
||||
xfList: [], //巡防列表
|
||||
});
|
||||
const wkList = ref([
|
||||
{
|
||||
text: "红色预警",
|
||||
color: "#dd2024",
|
||||
num: 2,
|
||||
hb: ((2 / 22) * 100).toFixed(0),
|
||||
},
|
||||
{
|
||||
text: "橙色预警",
|
||||
color: "#fb8734",
|
||||
num: 4,
|
||||
hb: ((4 / 22) * 100).toFixed(0),
|
||||
},
|
||||
{
|
||||
text: "黄色预警",
|
||||
color: "#ecc617",
|
||||
num: 6,
|
||||
hb: ((6 / 22) * 100).toFixed(0),
|
||||
},
|
||||
{
|
||||
text: "蓝色预警",
|
||||
color: "#4399fc",
|
||||
num: 10,
|
||||
hb: ((10 / 22) * 100).toFixed(0),
|
||||
},
|
||||
]);
|
||||
const bmList = ref([
|
||||
{
|
||||
text: "巡大",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/xd.png"),
|
||||
},
|
||||
{
|
||||
text: "出入境管理",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/crjgl.png"),
|
||||
},
|
||||
{
|
||||
text: "侦察署",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/zcs.png"),
|
||||
},
|
||||
{
|
||||
text: "办公室",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/bgs.png"),
|
||||
},
|
||||
{
|
||||
text: "指挥室",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/zhs.png"),
|
||||
},
|
||||
{
|
||||
text: "政治处",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/zzc.png"),
|
||||
},
|
||||
{
|
||||
text: "政经文保署",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/zjwbs.png"),
|
||||
},
|
||||
{
|
||||
text: "治安署",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/zas.png"),
|
||||
},
|
||||
{
|
||||
text: "法制大队",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/fzdd.png"),
|
||||
},
|
||||
{
|
||||
text: "纪检组",
|
||||
num: 0,
|
||||
img: require("../../assets/images/new/jjz.png"),
|
||||
},
|
||||
]);
|
||||
function bmClick(item) {
|
||||
switch (item.text) {
|
||||
case "巡大":
|
||||
router.push("/newTwoHome/xd");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
const jqTotal = ref({}); //今日警情统计
|
||||
const zrjqTotal = ref(0); //昨日警情数据
|
||||
const QWLX = ref([]); //勤务类型
|
||||
//点击警情统计查看列表
|
||||
function onClickJqTotal(status) {
|
||||
if (status === 1) {
|
||||
router.push(`/newTwoHome/zjq`);
|
||||
} else {
|
||||
router.push(`/newTwoHome/jq/xzjqlist?status=${status}`);
|
||||
}
|
||||
}
|
||||
//获取警情统计 type 是否是昨日
|
||||
function _getJqTotal(type) {
|
||||
return new Promise((ok) => {
|
||||
let data = {
|
||||
orgId: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0]
|
||||
.deptCode,
|
||||
startTime: `${dateFormat("z")} 16:00:00`,
|
||||
endTime: `${dateFormat()} 16:00:00`,
|
||||
type: 1,
|
||||
keyword: "",
|
||||
};
|
||||
if (type) {
|
||||
data.startTime = `${dateFormat("z2")} 16:00:00`;
|
||||
data.endTime = `${dateFormat("z")} 16:00:00`;
|
||||
}
|
||||
axios.post(`${baseUrl2}/xz1Api/api/alarm/count`, data).then((res) => {
|
||||
if (res.data) {
|
||||
if (type) {
|
||||
let num =
|
||||
res.data.data.lqCount +
|
||||
res.data.data.qcCount +
|
||||
res.data.data.ccCount +
|
||||
res.data.data.pqCount +
|
||||
res.data.data.dqscCount;
|
||||
zrjqTotal.value = jqTotal.value.jmsfTotal - num;
|
||||
} else {
|
||||
jqTotal.value = res.data.data;
|
||||
jqTotal.value.jmsfTotal =
|
||||
res.data.data.lqCount +
|
||||
res.data.data.qcCount +
|
||||
res.data.data.ccCount +
|
||||
res.data.data.pqCount +
|
||||
res.data.data.dqscCount;
|
||||
}
|
||||
ok();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
//查看巡防详情
|
||||
function onClickXfInfo(id) {
|
||||
router.push({
|
||||
path: "/yyzx/xfbb/addtsXfbb",
|
||||
query: {
|
||||
bbid: id,
|
||||
},
|
||||
});
|
||||
}
|
||||
//查看值班详情
|
||||
function onClickZbInfo(id) {
|
||||
router.push({
|
||||
path: "/yyzx/views/addZbbbInfo",
|
||||
query: {
|
||||
zt: "",
|
||||
id: id,
|
||||
text: "",
|
||||
color: "",
|
||||
flag: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
//获取巡防列表
|
||||
function _getTbQwXfbb() {
|
||||
let data = {
|
||||
pageSize: 1000,
|
||||
pageCurrent: 1,
|
||||
qwlxs: "01,02,03,04,05",
|
||||
ssbmid: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0]
|
||||
.deptId,
|
||||
bbzt: 0,
|
||||
};
|
||||
getTbQwXfbb(data).then((res) => {
|
||||
if (res && res.records.length > 0) {
|
||||
res.records.forEach((item) => {
|
||||
if (item.pbfj) {
|
||||
item.pbfj = JSON.parse(item.pbfj);
|
||||
} else {
|
||||
item.pbfj = [];
|
||||
}
|
||||
if (item.pbmj) {
|
||||
item.pbmj = JSON.parse(item.pbmj);
|
||||
} else {
|
||||
item.pbmj = [];
|
||||
}
|
||||
qwData.xfList.push(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取值班列表
|
||||
function _getTbQwZbbb() {
|
||||
let data = {
|
||||
pageSize: 50,
|
||||
pageCurrent: 1,
|
||||
startTime: `${dateFormat("z")} 16:00:00`,
|
||||
endTime: `${dateFormat()} 16:00:00`,
|
||||
ssbmdm: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0]
|
||||
.deptCode,
|
||||
};
|
||||
getTbQwZbbb(data).then((res) => {
|
||||
if (res && res.records.length > 0) {
|
||||
qwData.zbList = res.records;
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取勤务数据
|
||||
function _getQwData() {
|
||||
getZbld().then((res) => {
|
||||
if (res) qwData.zbld = res;
|
||||
});
|
||||
getJmjlCount().then((res) => {
|
||||
if (res) qwData.jmjl = res.jmjl;
|
||||
});
|
||||
getZgjlCount().then((res) => {
|
||||
if (res) qwData.zgjl = res.zgjl;
|
||||
});
|
||||
}
|
||||
function getZdgz() {
|
||||
zdgz.hszdry = 0;
|
||||
getZdRyCount({}).then((res) => {
|
||||
res.forEach((v) => {
|
||||
zdgz.hszdry += v.COUNT;
|
||||
});
|
||||
});
|
||||
}
|
||||
//待办任务数据
|
||||
function getMyDb() {
|
||||
myDb.dcl = 0;
|
||||
getMyTaskTotal({ sfzh: userInfo.idEntityCard }).then((res) => {
|
||||
if (res) {
|
||||
res.forEach((e) => {
|
||||
myDb.dcl += e.count;
|
||||
});
|
||||
}
|
||||
});
|
||||
getYclTask().then((res) => {
|
||||
myDb.ycl = res;
|
||||
});
|
||||
}
|
||||
|
||||
function routerPush(url, data = {}) {
|
||||
router.push({
|
||||
path: url,
|
||||
query: data,
|
||||
});
|
||||
}
|
||||
onMounted(async () => {
|
||||
getMyDb();
|
||||
getZdgz();
|
||||
await _getJqTotal();
|
||||
await _getJqTotal(true);
|
||||
_getQwData();
|
||||
_getTbQwZbbb();
|
||||
_getTbQwXfbb();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.sjkb_box {
|
||||
@include font_size($font_medium_s);
|
||||
font-weight: 700;
|
||||
padding: 3vw;
|
||||
|
||||
.sjkb_item_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 3vw;
|
||||
|
||||
.sjkb_item {
|
||||
width: 44%;
|
||||
margin-bottom: 3vw;
|
||||
padding: 2vw 2vw;
|
||||
background: #ebf2fa;
|
||||
text-align: center;
|
||||
border-radius: 1vw;
|
||||
color: #00347e;
|
||||
border: 1px solid #0d4595;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wddb_box {
|
||||
@include font_size($font_medium_s);
|
||||
background: url("../../assets/images/new/ldjsc_total.png");
|
||||
background-size: 100% 100%;
|
||||
margin: 3vw;
|
||||
color: #ffffff;
|
||||
padding: 4vw 0;
|
||||
|
||||
.wdrw_title {
|
||||
text-align: center;
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.dbrw_total {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// padding: 2vw 3.5vw 5vw 3.5vw;
|
||||
}
|
||||
|
||||
.wddb_item {
|
||||
width: 41%;
|
||||
border-radius: 2vw;
|
||||
text-align: center;
|
||||
|
||||
.num {
|
||||
font-size: 5vw;
|
||||
margin-right: 1.5vw;
|
||||
display: inline-block;
|
||||
margin-bottom: 1vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.jq_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@include font_size($font_medium_s);
|
||||
margin: 0 3vw 3vw 3vw;
|
||||
|
||||
.jmsfjq_box {
|
||||
background: linear-gradient(0deg, #f4f8fb 35%, #e1eeff 100%);
|
||||
}
|
||||
|
||||
.left_item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.jq_item {
|
||||
width: 46.85%;
|
||||
border-radius: 2vw;
|
||||
padding: 1.5vw;
|
||||
|
||||
.mk_jq_total_box {
|
||||
margin: 5vw 0;
|
||||
|
||||
.jq_total {
|
||||
@include font_size($font_medium);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.jq_total_unit {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
}
|
||||
|
||||
.jqhb {
|
||||
display: inline-block;
|
||||
margin-top: 1vw;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.jq_total_item {
|
||||
padding: 2.5vw;
|
||||
border-radius: 2vw;
|
||||
}
|
||||
|
||||
.dxzp_item {
|
||||
background: rgba(81, 193, 242, 0.1);
|
||||
}
|
||||
|
||||
.zdjqzs_total {
|
||||
background: url("../../assets/images/new/zdjqzs.png");
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.jrjqzs_total {
|
||||
background: rgba(125, 148, 248, 0.3);
|
||||
}
|
||||
|
||||
.wffzzs_total {
|
||||
background: #fae9e1;
|
||||
|
||||
.xz_xs_total {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #7c4e19;
|
||||
|
||||
.sx {
|
||||
width: 1px;
|
||||
background: #7c4e19;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order_total {
|
||||
margin: 3vw;
|
||||
@include font_size($font_medium_s);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 3vw;
|
||||
color: #fff;
|
||||
|
||||
.total_item {
|
||||
border-radius: 5px;
|
||||
width: 31%;
|
||||
padding: 2.5vw 0;
|
||||
text-align: center;
|
||||
|
||||
&>span:nth-child(1) {
|
||||
display: inline-block;
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
margin-bottom: 1.5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wk_echart {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@include font_size($font_medium_s);
|
||||
height: 40vw;
|
||||
overflow: hidden;
|
||||
|
||||
.wk_dot {
|
||||
display: inline-block;
|
||||
width: 2vw;
|
||||
height: 2vw;
|
||||
border-radius: 50%;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
|
||||
.wk_item {
|
||||
margin: 4vw;
|
||||
}
|
||||
}
|
||||
|
||||
.topM {
|
||||
padding-top: 2vw;
|
||||
}
|
||||
|
||||
.yuqts_box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 40vw;
|
||||
overflow: auto;
|
||||
// background: #f1f6f4;
|
||||
// margin: 0 3vw 3vw 3vw;
|
||||
// padding: 2.5vw;
|
||||
padding-bottom: 5vw;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.bmdt_box {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
margin: 0 2.5vw 3vw 2.5vw;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.bm_item {
|
||||
// white-space: nowrap;
|
||||
border-radius: 10px;
|
||||
flex-shrink: 0;
|
||||
height: 12vw;
|
||||
margin: 0 1vw;
|
||||
padding: 0 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.qwqk_box {
|
||||
margin: 3vw;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.title_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.qu_total {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 3vw;
|
||||
|
||||
.qu_item_total {
|
||||
width: 31.5%;
|
||||
text-align: center;
|
||||
background: #f5f5f5;
|
||||
padding: 3vw 0;
|
||||
border-radius: 1.5vw;
|
||||
|
||||
&>span:nth-child(1) {
|
||||
display: inline-block;
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
margin-bottom: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zbld_box {
|
||||
margin-top: 3vw;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
|
||||
.zbld_item_box {
|
||||
border: 1px solid #eee;
|
||||
padding: 2.5vw 3vw;
|
||||
flex-shrink: 0;
|
||||
width: 39vw;
|
||||
margin-right: 2.5vw;
|
||||
display: table;
|
||||
border-radius: 1.5vw;
|
||||
|
||||
&>img {
|
||||
position: relative;
|
||||
top: -1vw;
|
||||
}
|
||||
|
||||
.abld_detail {
|
||||
display: inline-block;
|
||||
margin-left: 1.7vw;
|
||||
|
||||
&>span:nth-child(1) {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zdqw_box {
|
||||
margin-top: 3vw;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
|
||||
.zdqw_item_box {
|
||||
background: #fef4f4;
|
||||
line-height: 6vw;
|
||||
margin-right: 3vw;
|
||||
// padding: 2vw;
|
||||
flex-shrink: 0;
|
||||
display: table;
|
||||
border-radius: 1.5vw;
|
||||
width: 60vw;
|
||||
overflow: hidden;
|
||||
color: #4d1717;
|
||||
|
||||
.zdqw_msg {
|
||||
display: inline-block;
|
||||
margin-right: 5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wzdqw_box {
|
||||
padding: 2.5vw;
|
||||
text-align: center;
|
||||
background: rgba(106, 188, 131, 0.2);
|
||||
margin-top: 3vw;
|
||||
border-radius: 1.5vw;
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.jmsfjq_total_title {
|
||||
@include font_size($font_medium);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.bl_img {
|
||||
width: 2vw;
|
||||
height: 2.5vw;
|
||||
margin-right: 1vw;
|
||||
}
|
||||
|
||||
.jq_num {
|
||||
font-size: 6vw;
|
||||
font-weight: 700;
|
||||
margin: 2vw 0;
|
||||
}
|
||||
|
||||
.wqts_box {
|
||||
background: url("../../assets/images/new/wqts.png");
|
||||
background-size: 100%;
|
||||
padding: 2vw 0;
|
||||
}
|
||||
|
||||
.yqts_box {
|
||||
background: url("../../assets/images/new/yqts.png");
|
||||
background-size: 100% 100%;
|
||||
padding: 2vw 0;
|
||||
}
|
||||
|
||||
.look_more {
|
||||
font-weight: normal;
|
||||
color: #777;
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.zdqw_title_box {
|
||||
background: #f5e9e9;
|
||||
padding: 1.5vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.zdqw_mj_fj_num {
|
||||
padding: 2vw;
|
||||
}
|
||||
|
||||
.bmdt_img {
|
||||
width: 11vw;
|
||||
height: 11vw;
|
||||
padding: 4vw 5.5vw;
|
||||
background: #f5f7fd;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
@ -1,322 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav :navTitle="title" :showRight="false" :showLeft="true" />
|
||||
<van-sticky>
|
||||
<div class="myzls">
|
||||
<Search placeholder="请输入关键字" v-model="kwd" :isSx="true" @update:sx="showPopup = !showPopup"
|
||||
@update:modelValue="onSearch"></Search>
|
||||
</div>
|
||||
</van-sticky>
|
||||
<van-pull-refresh v-model="loadingPull" @refresh="onRefresh">
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text=" " @load="onLoad" offset="1"
|
||||
:immediate-check="false">
|
||||
<ZlList v-for="(item, index) in zlList.list" :key="index" :item="item"
|
||||
:dict="{ D_BZ_ZXZTAI, D_BZ_RGZLLX, D_BZ_ZLLY, D_BZ_ZLLX }" :path="`/yyzx/zlzx/zlDetail?id=${item.zlId}`"
|
||||
:isMyFqdzl="true">
|
||||
</ZlList>
|
||||
<van-empty description="暂无指令信息" image="default" v-if="showEmpty" />
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
<SxPopup :showPopup="showPopup" :list="zlList.sxTypeList" :p_top="105" @update:close="showPopup = false"
|
||||
@update:onConfirm="onConfirm" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getTrsToken } from "@/api/common";
|
||||
import Tabs from "../../components/tabs.vue";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import Search from "../../components/search.vue";
|
||||
import ZlList from "../../components/zlList.vue";
|
||||
import SxPopup from "../../components/SxPopup.vue";
|
||||
import {
|
||||
dateFormat,
|
||||
setTimeQuantum,
|
||||
setEchartTime,
|
||||
} from "../../utils/tools.js";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { Toast } from "vant";
|
||||
import { getMyZlList, getMyCsList } from "../../api/zlzx.js";
|
||||
import { useRoute } from "vue-router";
|
||||
const { D_BZ_ZXZTAI, D_BZ_RGZLLX, D_BZ_ZLLY, D_BZ_ZLLX } = getDictList(
|
||||
"D_BZ_ZXZTAI",
|
||||
"D_BZ_RGZLLX",
|
||||
"D_BZ_ZLLY",
|
||||
"D_BZ_ZLLX"
|
||||
); //字典信息
|
||||
const userInfo = JSON.parse(window.localStorage.getItem("userInfo"));
|
||||
const kwd = ref(""); //搜索关键字
|
||||
const showPopup = ref(false); //赛选条件窗口
|
||||
const zlztIndex = ref(-1); //选中的指令状态下标
|
||||
const timeShow = ref(false); //时间选择器
|
||||
const presentTime = ref(new Date()); //当前时间
|
||||
const timeType = ref(""); //选择的时间类型
|
||||
const startTime = ref(""); //开始时间
|
||||
const endTime = ref(""); //结束时间
|
||||
const loading = ref(false);
|
||||
const loadingPull = ref(false);
|
||||
const finished = ref(false);
|
||||
const showEmpty = ref(false);
|
||||
const pageSize = ref(10);
|
||||
const pageCurrent = ref(1);
|
||||
const zllx = ref(""); // 指令类型
|
||||
const zlTypeIndex = ref(""); //选中的查询类型下标
|
||||
const total = ref(0); //
|
||||
const tabsIndex = ref(1);
|
||||
const zlList = reactive({
|
||||
list: [], //指令列表数据
|
||||
sxTypeList: [], //筛选项数据
|
||||
});
|
||||
const title = ref("我发起的指令");
|
||||
const type = ref("");
|
||||
watch(D_BZ_ZXZTAI, (newValue) => {
|
||||
//设置筛选值
|
||||
let array = [];
|
||||
for (let i = 0; i < newValue.length; i++) {
|
||||
array.push({
|
||||
name: newValue[i].text,
|
||||
key: newValue[i].dm,
|
||||
isCheck: false,
|
||||
});
|
||||
}
|
||||
zlList.sxTypeList = [
|
||||
{
|
||||
title: "指令进行状态",
|
||||
isCheckBox: false,
|
||||
array: array,
|
||||
},
|
||||
];
|
||||
zlList.sxTypeList[1] = setTimeQuantum();
|
||||
});
|
||||
onMounted(() => {
|
||||
type.value = useRoute().query.type;
|
||||
if (type.value == "cs") {
|
||||
title.value = "抄送我的指令";
|
||||
}
|
||||
_getZlList();
|
||||
});
|
||||
//下拉刷新
|
||||
function onRefresh() {
|
||||
zlList.list = [];
|
||||
zlList.Sclist = [];
|
||||
pageCurrent.value = 1;
|
||||
zlTypeIndex.value = "";
|
||||
kwd.value = "";
|
||||
startTime.value = "";
|
||||
endTime.value = "";
|
||||
loading.value = false;
|
||||
loadingPull.value = false;
|
||||
finished.value = false;
|
||||
tabsIndex.value++;
|
||||
_getZlList();
|
||||
}
|
||||
//关键字查询
|
||||
function onSearch(e) {
|
||||
kwd.value = e;
|
||||
zlList.list = [];
|
||||
zlList.Sclist = [];
|
||||
pageCurrent.value = 1;
|
||||
showEmpty.value = false;
|
||||
_getZlList();
|
||||
}
|
||||
// //类型查询
|
||||
function onSelect(val) {
|
||||
zlList.list = [];
|
||||
zlList.Sclist = [];
|
||||
pageCurrent.value = 1;
|
||||
zllx.value = tabs.value[val].zllx;
|
||||
loading.value = false;
|
||||
loadingPull.value = false;
|
||||
finished.value = false;
|
||||
_getZlList();
|
||||
}
|
||||
//获取指令数据列表
|
||||
function _getZlList() {
|
||||
loading.value = true;
|
||||
showEmpty.value = false;
|
||||
let data = {
|
||||
pageSize: pageSize.value,
|
||||
pageCurrent: pageCurrent.value,
|
||||
zlzxzt: zlTypeIndex.value,
|
||||
zlnr: kwd.value,
|
||||
kssj: startTime.value,
|
||||
jssj: endTime.value,
|
||||
zllx: zllx.value,
|
||||
sfcs: type.value ? 1 : 0,
|
||||
};
|
||||
if (type.value) {
|
||||
getMyCsList(data).then((res) => {
|
||||
loading.value = false;
|
||||
loadingPull.value = false;
|
||||
total.value = res.pages;
|
||||
if (res.records.length > 0) {
|
||||
res.records.forEach((item) => {
|
||||
zlList.list.push(item);
|
||||
});
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getMyZlList(data).then((res) => {
|
||||
loading.value = false;
|
||||
loadingPull.value = false;
|
||||
total.value = res.pages;
|
||||
if (res.records.length > 0) {
|
||||
res.records.forEach((item) => {
|
||||
zlList.list.push(item);
|
||||
});
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//选中时间
|
||||
function onTimeConfirm(val) {
|
||||
if (timeType.value == "start") {
|
||||
startTime.value = dateFormat("", val);
|
||||
} else {
|
||||
endTime.value = dateFormat("", val);
|
||||
}
|
||||
timeShow.value = false;
|
||||
}
|
||||
|
||||
//选中指令状态
|
||||
function onClickZlzt(index, dm) {
|
||||
zlTypeIndex.value = dm;
|
||||
zlztIndex.value = index;
|
||||
}
|
||||
//确认筛选条件
|
||||
function onConfirm(val) {
|
||||
zlList.list = [];
|
||||
zlList.Sclist = [];
|
||||
pageCurrent.value = 1;
|
||||
startTime.value = val.startTime;
|
||||
endTime.value = val.endTime;
|
||||
showEmpty.value = false;
|
||||
zlTypeIndex.value = "";
|
||||
for (let i = 0; i < val.list.length; i++) {
|
||||
for (let j = 0; j < val.list[i].array.length; j++) {
|
||||
if (val.list[i].array[j].isCheck) {
|
||||
zlTypeIndex.value = val.list[i].array[j].key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
_getZlList();
|
||||
showPopup.value = false;
|
||||
}
|
||||
//重置筛选条件
|
||||
function onReset() {
|
||||
startTime.value = "";
|
||||
endTime.value = "";
|
||||
zlztIndex.value = -1;
|
||||
}
|
||||
//触底加载
|
||||
function onLoad() {
|
||||
if (pageCurrent.value >= total.value) {
|
||||
finished.value = true;
|
||||
return;
|
||||
}
|
||||
pageCurrent.value += 1;
|
||||
_getZlList();
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.sticky_box {
|
||||
@include bg_color($background-color-theme);
|
||||
|
||||
.tabs_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
display: flex;
|
||||
|
||||
.tabs_item {
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
|
||||
.tabs_count {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zl_sx_box {
|
||||
@include font_size($font_medium_s);
|
||||
padding: 4vw 0;
|
||||
|
||||
.item_title {
|
||||
padding: 0 3.5vw;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.zlzt_box {
|
||||
padding: 4vw;
|
||||
|
||||
.tag_item {
|
||||
margin: 0 3vw 3vw 0;
|
||||
padding: 1vw 3vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.but_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 5vw;
|
||||
}
|
||||
|
||||
.item_box {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
margin: 0 3.5vw 4vw 3.5vw;
|
||||
padding: 2vw;
|
||||
|
||||
.time_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.ststus {
|
||||
font-size: 10px;
|
||||
padding: 0 10px;
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.dfk {
|
||||
background-color: rgb(242, 199, 6);
|
||||
}
|
||||
|
||||
.yfk {
|
||||
background-color: #3e6ee8;
|
||||
}
|
||||
|
||||
.ywj {
|
||||
background-color: #4fbe0d;
|
||||
}
|
||||
|
||||
.ddc {
|
||||
background-color: orangered;
|
||||
}
|
||||
|
||||
.djc {
|
||||
background-color: orange;
|
||||
}
|
||||
}
|
||||
|
||||
>div {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,84 +0,0 @@
|
||||
<template>
|
||||
<div id="wqts" style="width: 60vw; height: 50vw"></div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, reactive, nextTick } from "vue";
|
||||
import * as echarts from "echarts";
|
||||
|
||||
onMounted(() => {
|
||||
hamdlegfChart();
|
||||
});
|
||||
function hamdlegfChart() {
|
||||
var m2R2Data = [
|
||||
{
|
||||
value: 2,
|
||||
itemStyle: { color: "#dd2024" },
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
itemStyle: { color: "#fb8734" },
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
itemStyle: { color: "#ecc617" },
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
itemStyle: { color: "#4399fc" },
|
||||
},
|
||||
];
|
||||
|
||||
if (document.getElementById("wqts")) {
|
||||
let myechart = echarts.init(document.getElementById("wqts"));
|
||||
myechart.setOption({
|
||||
title: [
|
||||
{
|
||||
text: 22 + "",
|
||||
subtext: "预警总数",
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: "#4e5486",
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 10,
|
||||
color: "black",
|
||||
},
|
||||
textAlign: "center",
|
||||
x: "37.5%",
|
||||
y: "26%",
|
||||
},
|
||||
],
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: "pie",
|
||||
center: ["40%", "38%"],
|
||||
radius: ["40%", "65%"],
|
||||
itemStyle: {
|
||||
borderWidth: 3,
|
||||
borderColor: "#fff",
|
||||
},
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
labelLine: {
|
||||
show: false,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
data: m2R2Data,
|
||||
},
|
||||
],
|
||||
});
|
||||
window.addEventListener("resize", () => {
|
||||
myechart.resize();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,269 +0,0 @@
|
||||
<template>
|
||||
<div class="" style="padding-top: 13vw">
|
||||
<TopNav navTitle="巡大" :showRight="false" :showLeft="true" />
|
||||
<div class="jq_box topM">
|
||||
<span class="jmsfjq_total_title">街面六类</span>
|
||||
</div>
|
||||
<div class="jq_box">
|
||||
<div class="jq_item left_item" style="padding: 0">
|
||||
<div class="jrjqzs_total jq_total_item" @click="onClickJqTotal(1)">
|
||||
<span class="jmsfjq_total_title">抢夺</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ jqTotal.lqCount }} </span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">较昨日<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.lqUp > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.lqCount > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.lqUp > 0 ? "+" + jqTotal.lqUp : jqTotal.lqUp }}%</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jrjqzs_total jq_total_item" @click="onClickJqTotal(2)">
|
||||
<span class="jmsfjq_total_title">抢劫</span>
|
||||
<div style="margin: 1vw 0 0 0">
|
||||
<span class="red jq_num">{{ jqTotal.lqCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
较昨日<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.lqUp > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.lqCount > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.lqUp > 0 ? "+" + jqTotal.lqUp : jqTotal.lqUp }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- zdjqzs_total jq_total_item wffzzs_total jq_total_item-->
|
||||
<div class="zdjqzs_total jq_total_item" @click="onClickJqTotal(3)">
|
||||
<span class="jmsfjq_total_title">盗窃汽车</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ jqTotal.qcCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
较昨日<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.qcUp > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.qcUp > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.qcUp > 0 ? "+" + jqTotal.qcUp : jqTotal.qcUp }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div class="xz_xs_total">
|
||||
<span>刑事 {{ jqTotal.xsCount }} </span>
|
||||
<span class="sx"></span>
|
||||
<span>行政 {{ jqTotal.xzCount }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="zdjqzs_total jq_total_item" @click="onClickJqTotal(1)">
|
||||
<span class="jmsfjq_total_title">盗窃车内财物</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ jqTotal.ccCount }} </span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">较昨日<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.ccUp > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.ccUp > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.ccUp > 0 ? "+" + jqTotal.ccUp : jqTotal.ccUp }}%</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wffzzs_total jq_total_item" @click="onClickJqTotal(2)">
|
||||
<span class="jmsfjq_total_title">扒窃</span>
|
||||
<div style="margin: 1vw 0 0 0">
|
||||
<span class="red jq_num">{{ jqTotal.pqCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
较昨日<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.pqUp > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.pqUp > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.pqUp > 0 ? "+" + jqTotal.pqUp : jqTotal.pqUp }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wffzzs_total jq_total_item" @click="onClickJqTotal(3)">
|
||||
<span class="jmsfjq_total_title">盗窃三车</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ jqTotal.dqscCount }}</span>
|
||||
件
|
||||
<span style="display: inline-block; margin-left: 6vw">
|
||||
较昨日<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="jqTotal.dqscUp > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="jqTotal.dqscUp > 0 ? 'red' : 'green'">
|
||||
{{ jqTotal.dqscUp > 0 ? "+" + jqTotal.dqscUp : jqTotal.dqscUp }}%</span></span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div class="xz_xs_total">
|
||||
<span>刑事 {{ jqTotal.xsCount }} </span>
|
||||
<span class="sx"></span>
|
||||
<span>行政 {{ jqTotal.xzCount }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { ref, onMounted, onUnmounted, onActivated, reactive } from "vue";
|
||||
import { dateFormat } from "../../utils/tools.js";
|
||||
import { baseUrl2 } from "../../utils/request";
|
||||
import router from "../../router";
|
||||
import axios from "axios";
|
||||
const jqTotal = ref({}); //今日警情统计
|
||||
const zrjqTotal = ref(0); //昨日警情数据
|
||||
const QWLX = ref([]); //勤务类型
|
||||
onMounted(() => {
|
||||
_getJqTotal();
|
||||
_getJqTotal(true);
|
||||
});
|
||||
//点击警情统计查看列表
|
||||
function onClickJqTotal(status) {
|
||||
router.push(`/newTwoHome/jq/xzjqlist?status=${status}`);
|
||||
}
|
||||
//获取警情统计 type 是否是昨日
|
||||
function _getJqTotal(type) {
|
||||
let data = {
|
||||
orgId: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0]
|
||||
.deptCode,
|
||||
startTime: `${dateFormat("z")} 16:00:00`,
|
||||
endTime: `${dateFormat()} 16:00:00`,
|
||||
type: 1,
|
||||
keyword: "",
|
||||
};
|
||||
if (type) {
|
||||
data.startTime = `${dateFormat("z2")} 16:00:00`;
|
||||
data.endTime = `${dateFormat("z")} 16:00:00`;
|
||||
}
|
||||
axios.post(`${baseUrl2}/xz1Api/api/alarm/count`, data).then((res) => {
|
||||
if (res.data) {
|
||||
if (type) {
|
||||
let num =
|
||||
res.data.data.lqCount +
|
||||
res.data.data.qcCount +
|
||||
res.data.data.ccCount +
|
||||
res.data.data.pqCount +
|
||||
res.data.data.dqscCount;
|
||||
zrjqTotal.value = jqTotal.value.jmsfTotal - num;
|
||||
} else {
|
||||
jqTotal.value = res.data.data;
|
||||
jqTotal.value.jmsfTotal =
|
||||
res.data.data.lqCount +
|
||||
res.data.data.qcCount +
|
||||
res.data.data.ccCount +
|
||||
res.data.data.pqCount +
|
||||
res.data.data.dqscCount;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.jq_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@include font_size($font_medium_s);
|
||||
margin: 0 3vw 3vw 3vw;
|
||||
|
||||
.jmsfjq_box {
|
||||
background: linear-gradient(0deg, #f4f8fb 35%, #e1eeff 100%);
|
||||
}
|
||||
|
||||
.left_item {
|
||||
display: flex;
|
||||
// flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.jq_item {
|
||||
// flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
border-radius: 2vw;
|
||||
padding: 1.5vw;
|
||||
|
||||
.mk_jq_total_box {
|
||||
margin: 5vw 0;
|
||||
|
||||
.jq_total {
|
||||
@include font_size($font_medium);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.jq_total_unit {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
}
|
||||
|
||||
.jqhb {
|
||||
display: inline-block;
|
||||
margin-top: 1vw;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.jq_total_item {
|
||||
width: 37vw;
|
||||
padding: 2.5vw;
|
||||
border-radius: 2vw;
|
||||
margin: 2vw;
|
||||
}
|
||||
|
||||
.dxzp_item {
|
||||
background: rgba(81, 193, 242, 0.1);
|
||||
}
|
||||
|
||||
.zdjqzs_total {
|
||||
background: url("../../assets/images/new/zdjqzs.png");
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.jrjqzs_total {
|
||||
background: #7d9ef8;
|
||||
}
|
||||
|
||||
.wffzzs_total {
|
||||
background: #fae9e1;
|
||||
|
||||
.xz_xs_total {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #7c4e19;
|
||||
|
||||
.sx {
|
||||
width: 1px;
|
||||
background: #7c4e19;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.topM {
|
||||
padding-top: 2vw;
|
||||
}
|
||||
|
||||
.bl_img {
|
||||
width: 2vw;
|
||||
height: 2.5vw;
|
||||
margin-right: 1vw;
|
||||
}
|
||||
|
||||
.jq_num {
|
||||
font-size: 6vw;
|
||||
font-weight: 700;
|
||||
margin: 2vw 0;
|
||||
}
|
||||
</style>
|
||||
@ -1,51 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 14vw">
|
||||
<TopNav navTitle="已处理任务" :showRight="false" :showLeft="true" />
|
||||
<div class="rw_list_box" v-for="item in list" :key="item.id">
|
||||
<SwiperCell :item="item" :dict="{ D_BZ_GRRWZT }"></SwiperCell>
|
||||
</div>
|
||||
<van-empty description="暂无信息" image="default" v-if="showEmpty" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import SwiperCell from "../../components/swiperCell.vue";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getYclTaskList } from "../../api/ldjsc.js";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { getDictList } from "../../utils/dict";
|
||||
const { D_BZ_GRRWZT } = getDictList("D_BZ_GRRWZT");
|
||||
const list = ref([]);
|
||||
const showEmpty = ref(false);
|
||||
const queryLsit = ref({
|
||||
pageCurrent: 1,
|
||||
pageSize: 20,
|
||||
});
|
||||
function getList() {
|
||||
getYclTaskList(queryLsit.value)
|
||||
.then((res) => {
|
||||
if (res && res.records.length > 0) {
|
||||
list.value = res.records;
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
.rw_list_box {
|
||||
padding: 3vw 0;
|
||||
margin: 0 3vw;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
}
|
||||
</style>
|
||||
@ -1,60 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 14vw">
|
||||
<TopNav navTitle="值班情况" :showRight="false" :showLeft="true" />
|
||||
<div class="list_item" v-for="(item,index) in list" :key="index+'zbqk'">
|
||||
<span>{{item.ssbmmc}}</span>
|
||||
<span>{{setDict(item.type,dict)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getBbListByDept } from "../../api/ldjsc.js";
|
||||
import { setDict } from "../../utils/dict";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { Toast } from "vant";
|
||||
const dict = [
|
||||
{text:'未排班',value:'wpb'},
|
||||
{text:'已报备',value:'ybb'},
|
||||
{text:'未报备',value:'wbb'}
|
||||
]
|
||||
const list = ref([]);
|
||||
function getList() {
|
||||
Toast.loading({
|
||||
message: "加载...",
|
||||
forbidClick: true,
|
||||
loadingType: "spinner",
|
||||
duration: 0,
|
||||
});
|
||||
getBbListByDept().then((res) => {
|
||||
list.value = res;
|
||||
Toast.clear();
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
.list_item{
|
||||
width: 95vw;
|
||||
margin: 2vw auto;
|
||||
background: rgb(240, 242, 246);
|
||||
@include font_size($font_medium_s);
|
||||
padding: 6px 10px;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
color: #333;
|
||||
justify-content: space-between;
|
||||
>span:nth-child(1){
|
||||
flex: 1;
|
||||
}
|
||||
>span:nth-child(2){
|
||||
width: 15vw;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,220 +0,0 @@
|
||||
<template>
|
||||
<div class="" style="padding-top: 13vw">
|
||||
<TopNav navTitle="总警情分类" :showRight="false" :showLeft="true" />
|
||||
<div class="jq_box">
|
||||
<div class="jq_item left_item" style="padding: 0">
|
||||
<div class="jq_total_item" v-for="(item, index) in Tabslist" :class="index == 0 || index == 1 ? 'jrjqzs_total' :
|
||||
index == 2 || index == 3 ? 'zdjqzs_total' : 'wffzzs_total'" :key="index"
|
||||
@click="onClickJqTotal(item.type)">
|
||||
<span class="jmsfjq_total_title">{{ item.name }}</span>
|
||||
<div style="margin: 1vw 0">
|
||||
<span class="jq_num">{{ item.count }} </span>件
|
||||
<span style="display: inline-block; margin-left: 6vw">环比<br />
|
||||
<span style="display: inline-block; margin-top: 1vw">
|
||||
<img src="../../assets/images/leader/arrow-up@2x.png" class="bl_img" v-if="item.hb > 0" />
|
||||
<img src="../../assets/images/leader/arrow-down@2x.png" class="bl_img" v-else />
|
||||
<span :class="item.hb > 0 ? 'red' : 'green1'">{{ item.hb }}%</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { ref, onMounted, onUnmounted, onActivated, reactive } from "vue";
|
||||
import { dateFormat } from "../../utils/tools.js";
|
||||
import { baseUrl2 } from "../../utils/request";
|
||||
import router from "../../router";
|
||||
import axios from "axios";
|
||||
import { onBeforeRouteLeave } from "vue-router";
|
||||
const jqTotal = ref({}); //今日警情统计
|
||||
const zrjqTotal = ref(0); //昨日警情数据
|
||||
const QWLX = ref([]); //勤务类型
|
||||
const Tabslist = ref([
|
||||
{ name: "刑事", count: 0, hb: 0, type: 5 },//4
|
||||
{ name: "行政", count: 0, hb: 0, type: 4 },//3
|
||||
{ name: "纠纷", count: 0, hb: 0, type: 13 },//12
|
||||
{ name: "求助", count: 0, hb: 0, type: 14 },//13
|
||||
{ name: "其他", count: 0, hb: 0, type: 15 },//14
|
||||
])
|
||||
onMounted(() => {
|
||||
getCount()//// 获取统计
|
||||
_getJqTotal();
|
||||
_getJqTotal(true);
|
||||
});
|
||||
|
||||
// 获取统计
|
||||
function getCount() {
|
||||
let data = {
|
||||
orgId: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptCode,
|
||||
startTime: `${dateFormat("z")} 16:00:00`,
|
||||
endTime: `${dateFormat()} 16:00:00`,
|
||||
type: 1,
|
||||
keyword: "",
|
||||
};
|
||||
axios.post(`${baseUrl2}/xz1Api/api/alarm/count`, data).then((res) => {
|
||||
if (res.data) {
|
||||
Tabslist.value[0].count = res.data.data.xsCount //刑事
|
||||
Tabslist.value[0].hb = res.data.data.xsHb //刑事环比
|
||||
Tabslist.value[1].count = res.data.data.xzCount //行政
|
||||
Tabslist.value[1].hb = res.data.data.xzHb //行政环比
|
||||
Tabslist.value[2].count = res.data.data.jfCount //纠纷
|
||||
Tabslist.value[2].hb = res.data.data.jfHb //纠纷环比
|
||||
Tabslist.value[3].count = res.data.data.qzCount //求助
|
||||
Tabslist.value[3].hb = res.data.data.qcHb //求助环比
|
||||
Tabslist.value[4].count = res.data.data.qtCount //其他
|
||||
Tabslist.value[4].hb = res.data.data.qtHb //其他环比
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//点击警情统计查看列表
|
||||
function onClickJqTotal(status) {
|
||||
router.push(`/newTwoHome/jq/xzjqlist?status=${status}`);
|
||||
}
|
||||
//获取警情统计 type 是否是昨日
|
||||
function _getJqTotal(type) {
|
||||
let data = {
|
||||
orgId: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0]
|
||||
.deptCode,
|
||||
startTime: `${dateFormat("z")} 16:00:00`,
|
||||
endTime: `${dateFormat()} 16:00:00`,
|
||||
type: 1,
|
||||
keyword: "",
|
||||
};
|
||||
if (type) {
|
||||
data.startTime = `${dateFormat("z2")} 16:00:00`;
|
||||
data.endTime = `${dateFormat("z")} 16:00:00`;
|
||||
}
|
||||
axios.post(`${baseUrl2}/xz1Api/api/alarm/count`, data).then((res) => {
|
||||
if (res.data) {
|
||||
if (type) {
|
||||
let num =
|
||||
res.data.data.lqCount +
|
||||
res.data.data.qcCount +
|
||||
res.data.data.ccCount +
|
||||
res.data.data.pqCount +
|
||||
res.data.data.dqscCount;
|
||||
zrjqTotal.value = jqTotal.value.jmsfTotal - num;
|
||||
} else {
|
||||
jqTotal.value = res.data.data;
|
||||
jqTotal.value.jmsfTotal =
|
||||
res.data.data.lqCount +
|
||||
res.data.data.qcCount +
|
||||
res.data.data.ccCount +
|
||||
res.data.data.pqCount +
|
||||
res.data.data.dqscCount;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.jq_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@include font_size($font_medium_s);
|
||||
margin: 0 3vw 3vw 3vw;
|
||||
|
||||
.jmsfjq_box {
|
||||
background: linear-gradient(0deg, #f4f8fb 35%, #e1eeff 100%);
|
||||
}
|
||||
|
||||
.left_item {
|
||||
display: flex;
|
||||
// flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.jq_item {
|
||||
// flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
border-radius: 2vw;
|
||||
padding: 1.5vw;
|
||||
|
||||
.mk_jq_total_box {
|
||||
margin: 5vw 0;
|
||||
|
||||
.jq_total {
|
||||
@include font_size($font_medium);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.jq_total_unit {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
}
|
||||
|
||||
.jqhb {
|
||||
display: inline-block;
|
||||
margin-top: 1vw;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.jq_total_item {
|
||||
width: 37vw;
|
||||
padding: 2.5vw;
|
||||
border-radius: 2vw;
|
||||
margin: 2vw;
|
||||
}
|
||||
|
||||
.dxzp_item {
|
||||
background: rgba(81, 193, 242, 0.1);
|
||||
}
|
||||
|
||||
.zdjqzs_total {
|
||||
background: url("../../assets/images/new/zdjqzs.png");
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.jrjqzs_total {
|
||||
background: #7d9ef8;
|
||||
}
|
||||
|
||||
.wffzzs_total {
|
||||
background: #fae9e1;
|
||||
|
||||
.xz_xs_total {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #7c4e19;
|
||||
|
||||
.sx {
|
||||
width: 1px;
|
||||
background: #7c4e19;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.topM {
|
||||
padding-top: 2vw;
|
||||
}
|
||||
|
||||
.bl_img {
|
||||
width: 2vw;
|
||||
height: 2.5vw;
|
||||
margin-right: 1vw;
|
||||
}
|
||||
|
||||
.jq_num {
|
||||
font-size: 6vw;
|
||||
font-weight: 700;
|
||||
margin: 2vw 0;
|
||||
}
|
||||
|
||||
.green1 {
|
||||
color: #57fc48;
|
||||
}
|
||||
</style>
|
||||
@ -1,74 +0,0 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(["click"]);
|
||||
|
||||
const handleClockInPage = (item) => {
|
||||
emits("click", item);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="item-wrapper">
|
||||
<template v-for="(item, index) in list" :key="index">
|
||||
<div class="item" @click="handleClockInPage(item)">
|
||||
<div class="rowWrapper">
|
||||
<div class="title">{{ item?.fgMc }}</div>
|
||||
<div class="progress">{{ item?.bddAllProgress || 0 }}%</div>
|
||||
</div>
|
||||
|
||||
<div class="rowWrapper mt co99 fz12">
|
||||
<div>预警等级:{{ item?.fgYjdjLabel }}</div>
|
||||
<div>任务日期:{{ item?.rwRq }}</div>
|
||||
</div>
|
||||
<div class="rowWrapper mt co99 fz12">
|
||||
<div>高发类型:{{ item?.fgJqtjLx }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item-wrapper {
|
||||
margin: 2vw;
|
||||
|
||||
.item {
|
||||
padding: 2vw;
|
||||
border-top: 0.13333vw solid #f4f5f1;
|
||||
|
||||
.rowWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.progress {
|
||||
font-weight: 400;
|
||||
font-size: 3.73vw;
|
||||
color: #3E6EE8;
|
||||
}
|
||||
}
|
||||
|
||||
.fz12 {
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.co99 {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.mt {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,229 +0,0 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import TopNav from "@/components/topNav.vue";
|
||||
import Tabs from "@/components/tabs.vue";
|
||||
import Search from "@/components/search.vue";
|
||||
import PatrolWrapper from "@/pages/patrolList/copmonents/patrolWrapper.vue";
|
||||
import {fetchPatrolList} from "@/api/patrolList";
|
||||
import {getDictListByCode} from "@/api/common";
|
||||
import router from "@/router";
|
||||
import SxPopup from "@/components/SxPopup.vue";
|
||||
import SelectTime from "@/components/SelectTime.vue";
|
||||
const tabsIndex = ref(1);
|
||||
const showPopup = ref(false);
|
||||
const timeShow = ref(false);
|
||||
const finished = ref(false);
|
||||
const loading = ref(false);
|
||||
const rwlx=ref('1')
|
||||
const loadingRefresh = ref(false);
|
||||
const searchValue = ref("")
|
||||
const tabs = ref([
|
||||
{
|
||||
name: "警情任务",
|
||||
value: "1",
|
||||
},
|
||||
{
|
||||
name: "自定义任务",
|
||||
value: "2",
|
||||
},
|
||||
]);
|
||||
const pageData = reactive({
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
})
|
||||
|
||||
const data = reactive({
|
||||
list: [],
|
||||
dictList: [],
|
||||
startTime: ''
|
||||
})
|
||||
|
||||
const onSearch = () => {
|
||||
loading.value = true;
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = []
|
||||
getData()
|
||||
}
|
||||
|
||||
const onRefresh = () => {
|
||||
tabsIndex.value++;
|
||||
loading.value = false;
|
||||
loadingRefresh.value = true;
|
||||
finished.value = false;
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = []
|
||||
getData()
|
||||
}
|
||||
|
||||
const onLoad = () => {
|
||||
if (data.list.length >= pageData?.total) {
|
||||
finished.value = true;
|
||||
return
|
||||
}
|
||||
|
||||
pageData.pageCurrent++
|
||||
getData()
|
||||
}
|
||||
|
||||
const handleClockInPage = (item) => {
|
||||
router.push({ path: '/clockInPage', query: { id: item.id, current: pageData.pageCurrent } });
|
||||
}
|
||||
|
||||
const parseAndJoinLx = (jsonString, type = 'lx') => {
|
||||
if (!jsonString) return '';
|
||||
|
||||
try {
|
||||
let data = jsonString;
|
||||
// 如果是字符串,尝试解析为JSON
|
||||
if (typeof jsonString === 'string') {
|
||||
data = JSON.parse(jsonString);
|
||||
}
|
||||
|
||||
// 处理数组情况
|
||||
if (Array.isArray(data)) {
|
||||
return data.map(item => item?.[type]).filter(Boolean).join(",");
|
||||
}
|
||||
// 处理对象情况
|
||||
if (typeof data === 'object' && data !== null) {
|
||||
return data?.[type] || '';
|
||||
}
|
||||
return '';
|
||||
|
||||
} catch (error) {
|
||||
console.warn('数据处理失败:', error);
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
const { total, ...ret } = pageData
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await fetchPatrolList({ ...ret, fgMc: searchValue.value, rwRq: data.startTime,rwlx:rwlx.value })
|
||||
if (res?.records.length > 0) {
|
||||
data.list = data.list.concat(res?.records)?.map((item) => ({
|
||||
...item,
|
||||
fgJqtjLx: parseAndJoinLx(item?.fgJqtjLx, 'lx'),
|
||||
fgYjdjLabel: data.dictList?.find(i => i.dm === item.fgYjdj)?.zdmc || item.fgYjdj
|
||||
})) || []
|
||||
|
||||
pageData.total = res?.total
|
||||
loading.value = false;
|
||||
|
||||
}
|
||||
loadingRefresh.value = false;
|
||||
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
loadingRefresh.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
const getDictList = async () => {
|
||||
const res = await getDictListByCode({ dictCode: 'D_ZDXL_FGXLRW_YJDJ' })
|
||||
if (res && res?.itemList?.length > 0) {
|
||||
data.dictList = res?.itemList
|
||||
}
|
||||
}
|
||||
//按类型查询
|
||||
function onSelect(val) {
|
||||
data.list = [];
|
||||
pageData.pageCurrent = 1;
|
||||
switch (val) {
|
||||
case 0:
|
||||
rwlx.value="1"
|
||||
break;
|
||||
default:
|
||||
rwlx.value="2"
|
||||
break;
|
||||
}
|
||||
getData();
|
||||
finished.value = false;
|
||||
}
|
||||
const onSelectTime = (val) => {
|
||||
data.startTime = val;
|
||||
timeShow.value = false
|
||||
}
|
||||
|
||||
const onClickTime = () => {
|
||||
timeShow.value = true;
|
||||
}
|
||||
|
||||
const onConfirm = () => {
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = []
|
||||
getData()
|
||||
showPopup.value = false;
|
||||
}
|
||||
|
||||
const handleReset = () => {
|
||||
data.startTime = ""
|
||||
onConfirm()
|
||||
}
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await getDictList()
|
||||
await getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<TopNav nav-title="巡逻列表" show-left />
|
||||
<van-sticky>
|
||||
<div class="sticky_box">
|
||||
<Tabs :list="tabs" @onYjjb="onSelect" :type="'car'" :key="tabsIndex"></Tabs>
|
||||
<search
|
||||
:isSx="true"
|
||||
placeholder="请输入方格名称进行查询"
|
||||
v-model="searchValue"
|
||||
@update:sx="showPopup = !showPopup"
|
||||
@update:modelValue="onSearch"
|
||||
/>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<sx-popup :showPopup="showPopup" :p_top="110" @update:close="showPopup = false"
|
||||
@update:onConfirm="onConfirm" @reset="handleReset">
|
||||
<div class="time_box">
|
||||
<van-field
|
||||
v-model="data.startTime"
|
||||
label-width="60px"
|
||||
placeholder="请选择时间"
|
||||
input-align="left"
|
||||
right-icon="arrow-down"
|
||||
readonly
|
||||
@click.stop="onClickTime"
|
||||
/>
|
||||
</div>
|
||||
</sx-popup>
|
||||
|
||||
<select-time v-if="timeShow" time-type="选择任务日期" @update:time="onSelectTime" @update:cancelTime="timeShow = false" />
|
||||
|
||||
<div class="content">
|
||||
<van-pull-refresh v-model="loadingRefresh" @refresh="onRefresh">
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="" @load="onLoad" offset="1" :immediate-check="false">
|
||||
<patrol-wrapper :list="data?.list" @click="handleClockInPage" />
|
||||
|
||||
<van-empty description="暂无采集数据" image="default" v-if="data.list.length <= 0 && loadingRefresh === false" />
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.time_box {
|
||||
padding: 0 3vw 3vw;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-top: 13vw;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-bottom: 16vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,360 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<TopNav navTitle="待办" :showRight="false" :showLeft="false" />
|
||||
<van-sticky>
|
||||
<div class="sticky_box">
|
||||
<Tabs :list="tabs" @onYjjb="onSelect" :type="'car'" :checked="tabsKey" :key="tabsIndex"></Tabs>
|
||||
<Search v-model="kwd" :isSx="true" @update:sx="showPopup = !showPopup" placeholder="请输入关键字"
|
||||
@update:modelValue="onClickSearch"></Search>
|
||||
</div>
|
||||
</van-sticky>
|
||||
<SxPopup :showPopup="showPopup" :list="queryData.sxList" :p_top="145" @update:close="showPopup = false"
|
||||
@update:onConfirm="onConfirm" />
|
||||
<van-pull-refresh v-model="loadingPull" @refresh="onRefresh">
|
||||
<van-list :finished="finished" finished-text=" " @load="onLoad" offset="1" :immediate-check="false">
|
||||
<div class="rw_list_box" v-for="item in rwObj.rwList" :key="item.id" @click="
|
||||
onLookRw(
|
||||
item.id,
|
||||
item.rwxl,
|
||||
item.rwlx,
|
||||
item.ywid,
|
||||
item.rwzt,
|
||||
item.grrwzt,
|
||||
item.rwid
|
||||
)
|
||||
">
|
||||
<SwiperCell :item="item" @click:Transmit="onClickTransmit" @click:onDown="onClickDown"
|
||||
:dict="{ D_BZ_GRRWZT }"></SwiperCell>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-loading style="text-align: center" v-if="listLoading">加载中...</van-loading>
|
||||
<van-empty description="暂无任务信息" v-if="showEmpty" />
|
||||
</van-pull-refresh>
|
||||
<!-- 底部tas -->
|
||||
<BottomTabs type="rw" />
|
||||
<div style="height: 15.8666vw"></div>
|
||||
<!-- 转发人数据 -->
|
||||
<van-popup v-model:show="showfzrPicker" position="bottom">
|
||||
<van-search v-model="list.phone" placeholder="请输入电话号码" @update:model-value="getLdList()" />
|
||||
<van-picker :columns="list.fzrList" @confirm="onfzrConfirm" @cancel="showfzrPicker = false"
|
||||
:columns-field-names="customfzrFieldNamed" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "rw",
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import SxPopup from "../../components/SxPopup.vue";
|
||||
import SwiperCell from "../../components/swiperCell.vue";
|
||||
import Tabs from "../../components/tabs.vue";
|
||||
import BottomTabs from "../../components/bottomTabs.vue";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getMyTaskList, getMyTaskTotal, upGrzt } from "../../api/rwzx.js";
|
||||
import router from "../../router/index.js";
|
||||
import { sysUser } from "../../api/patrolBasicInfo.js";
|
||||
import { Dialog } from "vant";
|
||||
import { setTimeQuantum } from "../../utils/tools";
|
||||
import Search from "../../components/search.vue";
|
||||
import { transmitTask } from "../../api/yyzxApi.js";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { useRoute, onBeforeRouteLeave } from "vue-router";
|
||||
|
||||
const { D_BZ_GRRWZT, D_BZ_RWXL } = getDictList("D_BZ_GRRWZT", "D_BZ_RWXL"); //字典信息
|
||||
const showfzrPicker = ref(false); //是否显示转发人弹窗
|
||||
const showPopup = ref(false);
|
||||
//搜索配置
|
||||
const queryData = reactive({
|
||||
sxList: [setTimeQuantum()],
|
||||
});
|
||||
const list = reactive({
|
||||
phone: "", //转发人手机号
|
||||
fzrList: [], //转发人数据
|
||||
});
|
||||
const tabsIndex = ref(1);
|
||||
//指定picker选择器字段
|
||||
const customfzrFieldNamed = {
|
||||
text: "userName",
|
||||
};
|
||||
const tabs = ref([
|
||||
{
|
||||
name: "全部",
|
||||
count: 0,
|
||||
value: "all",
|
||||
},
|
||||
]);
|
||||
watch(
|
||||
() => D_BZ_RWXL.value,
|
||||
() => {
|
||||
tabs.value.push(
|
||||
...D_BZ_RWXL.value.map((item) => {
|
||||
return {
|
||||
name: item.text,
|
||||
count: 0,
|
||||
value: item.value,
|
||||
};
|
||||
})
|
||||
);
|
||||
_getMyTaskTotal();
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
const themeType = ref(getStorage("themeSetting"));
|
||||
const active = ref(1);
|
||||
const kwd = ref(""); //搜索关键字
|
||||
const pageSize = ref(10);
|
||||
const pageCurrent = ref(1);
|
||||
const tabsKey = ref(0);
|
||||
const userInfo = JSON.parse(window.localStorage.getItem("userInfo"));
|
||||
const rwObj = reactive({
|
||||
rwList: [], //任务数据
|
||||
rwTotal: {}, //任务统计
|
||||
});
|
||||
const rwjxzt = ref(""); //查询类型
|
||||
const listLoading = ref(false);
|
||||
const loadingPull = ref(false);
|
||||
const finished = ref(false);
|
||||
const total = ref(0);
|
||||
const rwId = ref(""); //操作的任务ID
|
||||
const showEmpty = ref(false);
|
||||
|
||||
//搜索框背景颜色
|
||||
const searchBack = ref({});
|
||||
onMounted(() => {
|
||||
if (useRoute().query.tabsType) {
|
||||
tabsKey.value = useRoute().query.tabsType;
|
||||
|
||||
rwjxzt.value = "05";
|
||||
}
|
||||
// rwjxzt.value
|
||||
_getMyTaskList();
|
||||
// _getMyTaskTotal();
|
||||
getLdList();
|
||||
});
|
||||
//下拉刷新
|
||||
function onRefresh() {
|
||||
tabs.value[0].count = 0;
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
kwd.value = "";
|
||||
tabsIndex.value++;
|
||||
finished.value = false;
|
||||
_getMyTaskList();
|
||||
_getMyTaskTotal();
|
||||
}
|
||||
//判断任务是暂停和关闭
|
||||
function _setRwNotify(rwzt) {
|
||||
if (rwzt == 1) {
|
||||
hintToast("任务已关闭!!!");
|
||||
return false;
|
||||
}
|
||||
if (rwzt == 2) {
|
||||
hintToast("任务已暂停!!!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//点击转发按钮打开人员选择器
|
||||
function onClickTransmit(val) {
|
||||
if (!_setRwNotify(val.rwzt)) {
|
||||
return;
|
||||
}
|
||||
rwId.value = val.id;
|
||||
showfzrPicker.value = true;
|
||||
}
|
||||
//驳回任务
|
||||
function onClickDown(val) {
|
||||
if (!_setRwNotify(val.rwzt)) {
|
||||
return;
|
||||
}
|
||||
Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认驳回该条任务信息!",
|
||||
confirmButtonColor: "#3e6ee8",
|
||||
}).then((res) => {
|
||||
_setTransmitTask(rwId.value, 4);
|
||||
});
|
||||
}
|
||||
//确认转发任务
|
||||
function onfzrConfirm(val) {
|
||||
Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认转发任务!",
|
||||
confirmButtonColor: "#3e6ee8",
|
||||
}).then((res) => {
|
||||
_setTransmitTask(rwId.value, 3, val.id);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 设置任务状态
|
||||
* @export
|
||||
* @param {*} rwid
|
||||
* @param {*} rwzt 1 进行中 2 已完成 3 已转发 4 已驳回
|
||||
* @param {*} zfjsrid 转发人ID
|
||||
*/
|
||||
function _setTransmitTask(rwid, rwzt, zfjsrid) {
|
||||
let data = { rwid, rwzt, zfjsrid };
|
||||
try {
|
||||
let location = JSON.parse(bridge.getLocation());
|
||||
data.jd = location.app_x;
|
||||
data.wd = location.app_y;
|
||||
} catch (error) { }
|
||||
transmitTask(data).then((res) => {
|
||||
showfzrPicker.value = false;
|
||||
if (rwzt != 1) {
|
||||
hintToast("成功");
|
||||
}
|
||||
_getMyTaskList();
|
||||
});
|
||||
}
|
||||
// 查询转发人数据
|
||||
function getLdList() {
|
||||
sysUser({
|
||||
current: 1,
|
||||
size: 50,
|
||||
phone: list.phone,
|
||||
}).then((res) => {
|
||||
list.fzrList = res.records;
|
||||
});
|
||||
}
|
||||
//查看任务详情
|
||||
function onLookRw(id, rwxl, rwlx, ywid, rwzt, grrwzt, rwid) {
|
||||
if (!_setRwNotify(rwzt)) {
|
||||
return;
|
||||
}
|
||||
if (grrwzt === "0") {
|
||||
upGrzt({ rwid: rwid, rwzt: "1" });
|
||||
}
|
||||
//通知任务
|
||||
if (rwlx == 1) {
|
||||
router.push(`/rw/views/rwDetail?id=${rwid}`);
|
||||
return;
|
||||
}
|
||||
//值班任务
|
||||
if (rwxl == "04") {
|
||||
router.push("/yyzx/views/addZbbb");
|
||||
return;
|
||||
}
|
||||
//巡防任务
|
||||
if (rwxl == "03") {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
return;
|
||||
}
|
||||
//指令任务
|
||||
if (rwxl == "05") {
|
||||
router.push(`/yyzx/zlzx/zlDetail?id=${ywid}`);
|
||||
return;
|
||||
}
|
||||
//实有人口任务
|
||||
if (rwxl == "01") {
|
||||
router.push(`/rw/views/syrkRwDetail?id=${rwid}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
function onConfirm(val) {
|
||||
rwObj.rwList = [];
|
||||
timeObj.kssj = val.startTime;
|
||||
timeObj.jssj = val.endTime;
|
||||
_getMyTaskList();
|
||||
showPopup.value = false;
|
||||
}
|
||||
//关键字搜索
|
||||
function onClickSearch(e) {
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
_getMyTaskList();
|
||||
}
|
||||
//按类型查询
|
||||
function onSelect(val) {
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
switch (val) {
|
||||
case 0:
|
||||
rwjxzt.value = "";
|
||||
break;
|
||||
default:
|
||||
rwjxzt.value = tabs.value[val].value;
|
||||
break;
|
||||
}
|
||||
_getMyTaskList();
|
||||
}
|
||||
//获取任务统计
|
||||
function _getMyTaskTotal() {
|
||||
getMyTaskTotal({ sfzh: userInfo.idEntityCard }).then((res) => {
|
||||
if (res) {
|
||||
res.forEach((e) => {
|
||||
tabs.value[0].count += e.count;
|
||||
});
|
||||
tabs.value.forEach((v) => {
|
||||
const tjarr = res.filter((item) => item.rwxl === v.value);
|
||||
if (tjarr.length > 0) {
|
||||
v.count = tjarr[0].count;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//触底加载
|
||||
function onLoad() {
|
||||
if (pageCurrent.value >= total.value) {
|
||||
finished.value = true;
|
||||
return;
|
||||
}
|
||||
pageCurrent.value += 1;
|
||||
_getMyTaskList();
|
||||
}
|
||||
const timeObj = reactive({
|
||||
kssj: "",
|
||||
jssj: "",
|
||||
});
|
||||
//获取任务列表
|
||||
function _getMyTaskList() {
|
||||
listLoading.value = true;
|
||||
showEmpty.value = false;
|
||||
let data = {
|
||||
pageSize: pageSize.value,
|
||||
pageCurrent: pageCurrent.value,
|
||||
jsrsfzh: userInfo.idEntityCard,
|
||||
rwnr: kwd.value,
|
||||
// grrwzt: rwjxzt.value,
|
||||
rwxl: rwjxzt.value,
|
||||
kssj: timeObj.kssj,
|
||||
jssj: timeObj.jssj,
|
||||
};
|
||||
getMyTaskList(data)
|
||||
.then((res) => {
|
||||
total.value = res.pages;
|
||||
listLoading.value = false;
|
||||
loadingPull.value = false;
|
||||
if (res.records.length > 0) {
|
||||
res.records.forEach((item) => {
|
||||
rwObj.rwList.push(item);
|
||||
});
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
listLoading.value = false;
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.rw_list_box {
|
||||
padding: 3vw 0;
|
||||
margin: 0 3vw;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
}
|
||||
</style>
|
||||
@ -1,401 +0,0 @@
|
||||
<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 v-model="kwd" :isSx="true" @update:sx="showPopup = !showPopup" placeholder="请输入关键字"
|
||||
@update:modelValue="onClickSearch"></Search>
|
||||
</div>
|
||||
</van-sticky>
|
||||
<SxPopup :showPopup="showPopup" :list="queryData.sxList" :p_top="145" @update:close="showPopup = false"
|
||||
@update:onConfirm="onConfirm" />
|
||||
<van-pull-refresh v-model="loadingPull" @refresh="onRefresh">
|
||||
<van-list v-show="!showPopup" :finished="finished" finished-text=" " @load="onLoad" offset="1"
|
||||
:immediate-check="false">
|
||||
<div class="rw_list_box" v-for="item in rwObj.rwList" :key="item.id"
|
||||
@click="onLookRw(item.id, item.rwxl, item.rwlx, item.ywid, item.rwzt)">
|
||||
<SwiperCell :isMy="true" :item="item" @click:Transmit="onClickTransmit" @click:onDown="onClickDown"
|
||||
:dict="{ D_BZ_GRRWZT }"></SwiperCell>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-loading style="text-align: center" v-if="listLoading">加载中...</van-loading>
|
||||
<van-empty description="暂无任务信息" v-if="showEmpty" />
|
||||
</van-pull-refresh>
|
||||
<div style="height: 15.8666vw"></div>
|
||||
<!-- 转发人数据 -->
|
||||
<van-popup v-model:show="showfzrPicker" position="bottom">
|
||||
<van-search v-model="list.phone" placeholder="请输入电话号码" @update:model-value="getLdList()" />
|
||||
<van-picker :columns="list.fzrList" @confirm="onfzrConfirm" @cancel="showfzrPicker = false"
|
||||
:columns-field-names="customfzrFieldNamed" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "rwlist",
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import SxPopup from "../../components/SxPopup.vue";
|
||||
import SwiperCell from "../../components/swiperCell.vue";
|
||||
import Tabs from "../../components/tabs.vue";
|
||||
import BottomTabs from "../../components/bottomTabs.vue";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getRwList, getTjRw, isMyTask } from "../../api/rwzx.js";
|
||||
import router from "../../router/index.js";
|
||||
import { sysUser } from "../../api/patrolBasicInfo.js";
|
||||
import { Dialog } from "vant";
|
||||
import { setTimeQuantum, hintToast } from "../../utils/tools";
|
||||
import Search from "../../components/search.vue";
|
||||
import { transmitTask } from "../../api/yyzxApi.js";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { useRoute, onBeforeRouteLeave } from "vue-router";
|
||||
import store from "../../store";
|
||||
|
||||
const { D_BZ_GRRWZT, D_BZ_RWJXZT, D_BZ_RWJSDX, D_BZ_RWXL } = getDictList(
|
||||
"D_BZ_GRRWZT",
|
||||
"D_BZ_RWJXZT",
|
||||
"D_BZ_RWJSDX",
|
||||
"D_BZ_RWXL"
|
||||
); //字典信息
|
||||
const showfzrPicker = ref(false); //是否显示转发人弹窗
|
||||
const showPopup = ref(false);
|
||||
const tabsIndex = ref(1);
|
||||
//搜索配置
|
||||
const queryData = reactive({
|
||||
sxList: [
|
||||
{
|
||||
title: "任务接收对象",
|
||||
isCheckBox: true,
|
||||
array: [],
|
||||
},
|
||||
{
|
||||
title: "任务细类",
|
||||
isCheckBox: true,
|
||||
array: [],
|
||||
},
|
||||
setTimeQuantum(),
|
||||
],
|
||||
});
|
||||
watch(
|
||||
() => D_BZ_RWJSDX.value,
|
||||
() => {
|
||||
queryData.sxList[0].array = D_BZ_RWJSDX.value.map((item) => {
|
||||
return {
|
||||
name: item.text,
|
||||
key: item.value,
|
||||
isCheck: false,
|
||||
};
|
||||
});
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => D_BZ_RWXL.value,
|
||||
() => {
|
||||
queryData.sxList[1].array = D_BZ_RWXL.value.map((item) => {
|
||||
return {
|
||||
name: item.text,
|
||||
key: item.value,
|
||||
isCheck: false,
|
||||
};
|
||||
});
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
const list = reactive({
|
||||
phone: "", //转发人手机号
|
||||
fzrList: [], //转发人数据
|
||||
});
|
||||
//指定picker选择器字段
|
||||
const customfzrFieldNamed = {
|
||||
text: "userName",
|
||||
};
|
||||
const themeType = ref(getStorage("themeSetting"));
|
||||
const tabs = ref([
|
||||
{
|
||||
name: "全部",
|
||||
count: 0,
|
||||
value: "all",
|
||||
},
|
||||
]);
|
||||
// watch()
|
||||
watch(
|
||||
() => D_BZ_RWJXZT.value,
|
||||
() => {
|
||||
tabs.value.push(
|
||||
...D_BZ_RWJXZT.value.map((item) => {
|
||||
return {
|
||||
name: item.text,
|
||||
count: 0,
|
||||
value: item.value,
|
||||
};
|
||||
})
|
||||
);
|
||||
_getMyTaskTotal();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
const active = ref(1);
|
||||
const kwd = ref(""); //搜索关键字
|
||||
const pageSize = ref(10);
|
||||
const pageCurrent = ref(1);
|
||||
const userInfo = JSON.parse(window.localStorage.getItem("userInfo"));
|
||||
const rwObj = reactive({
|
||||
rwList: [], //任务数据
|
||||
rwTotal: {}, //任务统计
|
||||
});
|
||||
const rwjxzt = ref(""); //查询类型
|
||||
const listLoading = ref(false);
|
||||
const loadingPull = ref(false);
|
||||
const finished = ref(false);
|
||||
const total = ref(0);
|
||||
const rwId = ref(""); //操作的任务ID
|
||||
const showEmpty = ref(false);
|
||||
//搜索框背景颜色
|
||||
const searchBack = ref({});
|
||||
onMounted(() => {
|
||||
_getMyTaskList();
|
||||
_getMyTaskTotal();
|
||||
getLdList();
|
||||
});
|
||||
//下拉刷新
|
||||
function onRefresh() {
|
||||
tabsIndex.value++;
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
kwd.value = "";
|
||||
// rwjxzt.value = "";
|
||||
finished.value = false;
|
||||
_getMyTaskList();
|
||||
_getMyTaskTotal();
|
||||
}
|
||||
//判断任务是暂停和关闭
|
||||
function _setRwNotify(rwzt) {
|
||||
if (rwzt == 1) {
|
||||
hintToast("任务已关闭!!!");
|
||||
return false;
|
||||
}
|
||||
if (rwzt == 2) {
|
||||
hintToast("任务已暂停!!!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//点击转发按钮打开人员选择器
|
||||
function onClickTransmit(val) {
|
||||
if (!_setRwNotify(val.rwzt)) {
|
||||
return;
|
||||
}
|
||||
rwId.value = val.id;
|
||||
showfzrPicker.value = true;
|
||||
}
|
||||
//驳回任务
|
||||
function onClickDown(val) {
|
||||
if (!_setRwNotify(val.rwzt)) {
|
||||
return;
|
||||
}
|
||||
Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认驳回该条任务信息!",
|
||||
confirmButtonColor: "#3e6ee8",
|
||||
}).then((res) => {
|
||||
_setTransmitTask(rwId.value, 4);
|
||||
});
|
||||
}
|
||||
//确认转发任务
|
||||
function onfzrConfirm(val) {
|
||||
Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认转发任务!",
|
||||
confirmButtonColor: "#3e6ee8",
|
||||
}).then((res) => {
|
||||
_setTransmitTask(rwId.value, 3, val.id);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 设置任务状态
|
||||
* @export
|
||||
* @param {*} rwid
|
||||
* @param {*} rwzt 1 进行中 2 已完成 3 已转发 4 已驳回
|
||||
* @param {*} zfjsrid 转发人ID
|
||||
*/
|
||||
function _setTransmitTask(rwid, rwzt, zfjsrid) {
|
||||
let data = { rwid, rwzt, zfjsrid };
|
||||
try {
|
||||
let location = JSON.parse(bridge.getLocation());
|
||||
data.jd = location.app_x;
|
||||
data.wd = location.app_y;
|
||||
} catch (error) { }
|
||||
transmitTask(data).then((res) => {
|
||||
showfzrPicker.value = false;
|
||||
if (rwzt != 1) {
|
||||
hintToast("成功");
|
||||
}
|
||||
_getMyTaskList();
|
||||
});
|
||||
}
|
||||
// 查询转发人数据
|
||||
function getLdList() {
|
||||
sysUser({
|
||||
current: 1,
|
||||
size: 50,
|
||||
phone: list.phone,
|
||||
}).then((res) => {
|
||||
list.fzrList = res.records;
|
||||
});
|
||||
}
|
||||
//查看任务详情
|
||||
function onLookRw(id, rwxl, rwlx, ywid, rwzt) {
|
||||
isMyTask(id).then((res) => {
|
||||
if (res) {
|
||||
if (!_setRwNotify(rwzt)) {
|
||||
return;
|
||||
}
|
||||
//通知任务
|
||||
if (rwlx == 1) {
|
||||
router.push(`/rw/views/rwDetail?id=${id}`);
|
||||
return;
|
||||
}
|
||||
//值班任务
|
||||
if (rwxl == "04") {
|
||||
router.push("/yyzx/views/addZbbb");
|
||||
return;
|
||||
}
|
||||
//巡防任务
|
||||
if (rwxl == "03") {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
return;
|
||||
}
|
||||
//指令任务
|
||||
if (rwxl == "05") {
|
||||
router.push(`/yyzx/zlzx/zlDetail?id=${ywid}`);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
hintToast("只能查看本人任务");
|
||||
}
|
||||
});
|
||||
}
|
||||
function onConfirm(val) {
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
queryRw.kssj = val.startTime;
|
||||
queryRw.jssj = val.endTime;
|
||||
queryRw.rwxl = val.list[1].array
|
||||
.filter((item) => item.isCheck)
|
||||
.map((item) => item.key)
|
||||
.join(",");
|
||||
queryRw.rwjsdx = val.list[0].array
|
||||
.filter((item) => item.isCheck)
|
||||
.map((item) => item.key)
|
||||
.join(",");
|
||||
_getMyTaskList();
|
||||
_getMyTaskTotal();
|
||||
showPopup.value = false;
|
||||
}
|
||||
//关键字搜索
|
||||
function onClickSearch(e) {
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
_getMyTaskList();
|
||||
}
|
||||
//按类型查询
|
||||
function onSelect(val) {
|
||||
rwObj.rwList = [];
|
||||
pageCurrent.value = 1;
|
||||
switch (val) {
|
||||
case 0:
|
||||
rwjxzt.value = "";
|
||||
break;
|
||||
default:
|
||||
rwjxzt.value = tabs.value[val].value;
|
||||
break;
|
||||
}
|
||||
finished.value = false;
|
||||
_getMyTaskList();
|
||||
}
|
||||
//获取任务统计
|
||||
function _getMyTaskTotal() {
|
||||
// const queryRw
|
||||
getTjRw(queryRw).then((res) => {
|
||||
tabs.value[0].count = 0;
|
||||
if (res) {
|
||||
tabs.value.forEach((v) => {
|
||||
const tjarr = res.filter((item) => item.rwjxzt === v.value);
|
||||
if (tjarr.length > 0) {
|
||||
v.count = tjarr[0].count;
|
||||
} else {
|
||||
v.count = 0;
|
||||
}
|
||||
});
|
||||
res.forEach((e) => {
|
||||
tabs.value[0].count += e.count;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//触底加载
|
||||
function onLoad() {
|
||||
if (pageCurrent.value >= total.value) {
|
||||
finished.value = true;
|
||||
return;
|
||||
}
|
||||
pageCurrent.value += 1;
|
||||
_getMyTaskList();
|
||||
}
|
||||
const queryRw = reactive({
|
||||
rwjsdx: "",
|
||||
rwxl: "",
|
||||
kssj: "",
|
||||
jssj: "",
|
||||
});
|
||||
//获取任务列表
|
||||
function _getMyTaskList() {
|
||||
listLoading.value = true;
|
||||
showEmpty.value = false;
|
||||
let data = {
|
||||
pageSize: pageSize.value,
|
||||
pageCurrent: pageCurrent.value,
|
||||
jsrsfzh: userInfo.idEntityCard,
|
||||
rwnr: kwd.value,
|
||||
rwjxzt: rwjxzt.value,
|
||||
rwjsdx: queryRw.rwjsdx,
|
||||
rwxl: queryRw.rwxl,
|
||||
kssj: queryRw.kssj,
|
||||
jssj: queryRw.jssj,
|
||||
};
|
||||
getRwList(data)
|
||||
.then((res) => {
|
||||
total.value = res.pages;
|
||||
listLoading.value = false;
|
||||
loadingPull.value = false;
|
||||
if (res.records.length > 0) {
|
||||
res.records.forEach((item) => {
|
||||
rwObj.rwList.push(item);
|
||||
});
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
listLoading.value = false;
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.rw_list_box {
|
||||
padding: 3vw 0;
|
||||
margin: 0 3vw;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
}
|
||||
</style>
|
||||
@ -1,304 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="任务详情" :showRight="false" :showLeft="true" />
|
||||
<div class="detail_box" v-if="reDetail">
|
||||
<div class="item">
|
||||
<span class="label">名称</span>
|
||||
<span class="text">{{ reDetail.rwmc }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">内容</span>
|
||||
<span class="text">{{ reDetail.rwnr }}</span>
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<span class="label">链接</span>
|
||||
<span class="text">{{ reDetail.rwlj }}</span>
|
||||
</div> -->
|
||||
<div class="item">
|
||||
<span class="label">状态</span>
|
||||
<span class="text" :class="{
|
||||
green: reDetail.rwzt == 0,
|
||||
yellow: reDetail.rwzt == 1 || reDetail.rwzt == 2,
|
||||
}">{{ setDict(reDetail.rwzt, D_BZ_RWZT) }}</span>
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<span class="label">执行人员数</span>
|
||||
<span class="text">{{ reDetail.rwzxrysl }}</span>
|
||||
</div> -->
|
||||
|
||||
<div class="item">
|
||||
<span class="label">发起人</span>
|
||||
<span class="text">{{ reDetail.cjrxm }}{{ reDetail.cjrlxdh }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">紧急程度</span>
|
||||
<span class="text">{{ setDict(reDetail.rwjjcd, D_BZ_RWJJCD) }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">任务细类</span>
|
||||
<span class="text">{{ setDict(reDetail.rwxl, D_BZ_RWXL) }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">进行状态</span>
|
||||
<span class="text" :class="{
|
||||
bule: reDetail.rwjxzt == 1,
|
||||
yellow: reDetail.rwjxzt == 4,
|
||||
green: reDetail.rwjxzt == 3,
|
||||
red: reDetail.rwjxzt == 2,
|
||||
}">{{ setDict(reDetail.rwjxzt, D_BZ_RWJXZT) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span class="label">发起时间</span>
|
||||
<span class="text">{{ reDetail.rwfqsj }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">要求完成时间</span>
|
||||
<span class="text">{{ reDetail.rwyqwcsj }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">个人执行状态</span>
|
||||
<span class="text">{{ setDict(userRwzt, D_BZ_GRRWZT) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item" v-if="reDetail.rwwcsj">
|
||||
<span class="label">完成时间</span>
|
||||
<span class="text">{{ reDetail.rwwcsj }}</span>
|
||||
</div>
|
||||
<div class="item" style="border: none" v-if="reDetail.fjid">
|
||||
<span class="label">附件</span>
|
||||
<div>
|
||||
<div class="fj_item" v-for="(item, index) in fjList" :key="index + 'file'">
|
||||
<van-image width="120px" height="120px" fit="cover" :src="baseUrl + reDetail.fjid.split(',')[index]"
|
||||
@click="onClickImg(baseUrl + reDetail.fjid.split(',')[index])" v-if="item && item.fileFormat == 'png'">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<a :href="baseUrl + reDetail.fjid.split(',')[index]" style="text-decoration: underline" v-else>{{ item.name
|
||||
}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 通知任务 -->
|
||||
<div v-if="
|
||||
reDetail.rwlx == 1 &&
|
||||
reDetail.rwjxzt !== '3' &&
|
||||
reDetail.rwjxzt !== '4'
|
||||
" class="btn_box">
|
||||
<van-button :loading="loading" round block type="success" style="margin: 0 2vw" @click="onConfirm">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<van-loading type="spinner" style="padding-top: 50vw; text-align: center" v-if="loading" />
|
||||
<van-empty v-if="showEmpty" description="错误" image="error" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import axios from "axios";
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { getMyTaskDetail, getFjInfo } from "../../../api/rwzx.js";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { baseUrl2 } from "../../../utils/request.js";
|
||||
import { Dialog, ImagePreview } from "vant";
|
||||
import { transmitTask } from "../../../api/yyzxApi.js";
|
||||
import router from "../../../router/index.js";
|
||||
import { IS_PNG, hintToast } from "../../../utils/tools.js";
|
||||
const {
|
||||
D_BZ_RWXL,
|
||||
D_BZ_RWJJCD,
|
||||
D_BZ_RWJXZT,
|
||||
D_BZ_RWZT,
|
||||
D_BZ_GRRWZT,
|
||||
} = getDictList(
|
||||
"D_BZ_RWXL",
|
||||
"D_BZ_RWJJCD",
|
||||
"D_BZ_RWJXZT",
|
||||
"D_BZ_RWZT",
|
||||
"D_BZ_GRRWZT"
|
||||
); //字典信息
|
||||
import { useRoute } from "vue-router";
|
||||
import { format } from "echarts";
|
||||
const id = ref("");
|
||||
const reDetail = ref(null); //任务详情数据
|
||||
const loading = ref(true);
|
||||
const showEmpty = ref(false);
|
||||
const showImage = ref(false); //是否预览图片
|
||||
const userRwzflx = ref(""); //用户任务类型
|
||||
const userRwzt = ref(""); //个人任务状态
|
||||
const baseUrl = `${baseUrl2}/mosty-api/mosty-base/minio/image/download/`;
|
||||
|
||||
const list = reactive({
|
||||
phone: "", //转发人手机号
|
||||
fzrList: [], //转发人数据
|
||||
});
|
||||
const rwId = ref("");
|
||||
|
||||
onMounted(() => {
|
||||
rwId.value = useRoute().query.id;
|
||||
_getMyTaskDetail();
|
||||
});
|
||||
//预览图片
|
||||
function onClickImg(url) {
|
||||
ImagePreview([url]);
|
||||
}
|
||||
//处置任务下一步
|
||||
function onNext() {
|
||||
if (reDetail.value.rwxl == "04") {
|
||||
router.push("/yyzx/views/addZbbb");
|
||||
} else if (reDetail.value.rwxl == "03") {
|
||||
router.push("/yyzx/xfbb/addXfbb");
|
||||
}
|
||||
}
|
||||
|
||||
//确认任务
|
||||
function onConfirm() {
|
||||
Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否知晓任务信息!",
|
||||
confirmButtonColor: "#3e6ee8",
|
||||
}).then((res) => {
|
||||
_setTransmitTask(reDetail.value.id, 2);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置任务状态
|
||||
* @export
|
||||
* @param {*} rwid
|
||||
* @param {*} rwzt 1 进行中 2 已完成 3 已转发 4 已驳回
|
||||
* @param {*} zfjsrid 转发人ID
|
||||
*/
|
||||
function _setTransmitTask(rwid, rwzt, zfjsrid) {
|
||||
let data = {
|
||||
rwid,
|
||||
rwzt,
|
||||
zfjsrid,
|
||||
};
|
||||
try {
|
||||
let location = JSON.parse(bridge.getLocation());
|
||||
data.jd = location.app_x;
|
||||
data.wd = location.app_y;
|
||||
} catch (error) { }
|
||||
transmitTask(data).then((res) => {
|
||||
if (rwzt != 1) {
|
||||
hintToast("成功")
|
||||
}
|
||||
// _getMyTaskDetail();
|
||||
router.go(-1);
|
||||
});
|
||||
}
|
||||
|
||||
//获取任务详情
|
||||
function _getMyTaskDetail() {
|
||||
getMyTaskDetail(rwId.value)
|
||||
.then((res) => {
|
||||
loading.value = false;
|
||||
reDetail.value = res;
|
||||
if (res.fjid) {
|
||||
_getFile(res.fjid);
|
||||
_getUserRwzflx();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {Object} fjid
|
||||
*/
|
||||
const fjList = ref([]);
|
||||
function _getFile(fjid) {
|
||||
const requestArr = fjid.split(",").map((item) => {
|
||||
return getFjInfo(item);
|
||||
});
|
||||
Promise.all(requestArr).then((resArr) => {
|
||||
resArr.forEach((res) => {
|
||||
if (IS_PNG(res.suffix.substring(1, res.suffix.length))) {
|
||||
res.fileFormat = "png";
|
||||
} else {
|
||||
res.fileFormat = "file";
|
||||
}
|
||||
fjList.value.push(res);
|
||||
});
|
||||
});
|
||||
}
|
||||
//获取用户任务转发类型
|
||||
function _getUserRwzflx() {
|
||||
if (reDetail.value && reDetail.value.userDtoList.length > 0) {
|
||||
let info = reDetail.value.userDtoList[0];
|
||||
userRwzflx.value = info.rwzflx;
|
||||
userRwzt.value = info.rwzt;
|
||||
//如果是待查看 改为进行中
|
||||
// if (userRwzt.value == 0) _setTransmitTask(reDetail.value.id, 1);
|
||||
}
|
||||
// let userInfo = JSON.parse(getStorage("userInfo"));
|
||||
// switch (reDetail.value.rwjsdx) {
|
||||
// case "01":
|
||||
// if (reDetail.value && reDetail.value.userDtoList.length > 0) {
|
||||
// let info = reDetail.value.userDtoList.find((item) => {
|
||||
// return userInfo.idEntityCard == item.jsrsfzh;
|
||||
// });
|
||||
// userRwzflx.value = info.rwzflx;
|
||||
// userRwzt.value = info.rwzt;
|
||||
// //如果是待查看 改为进行中
|
||||
// // if (userRwzt.value == 0) _setTransmitTask(reDetail.value.id, 1);
|
||||
// }
|
||||
// break;
|
||||
// case "02":
|
||||
// if (reDetail.value && reDetail.value.userDtoList.length > 0) {
|
||||
// let info = reDetail.value.userDtoList.find((item) => {
|
||||
// return userInfo.deptList[0].deptId == item.jsbmdm;
|
||||
// });
|
||||
// userRwzflx.value = info.rwzflx;
|
||||
// userRwzt.value = info.rwzt;
|
||||
// //如果是待查看 改为进行中
|
||||
// // if (userRwzt.value == 0) _setTransmitTask(reDetail.value.id, 1);
|
||||
// }
|
||||
// break;
|
||||
// case "03":
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.detail_box {
|
||||
padding: 3vw;
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 3vw 0;
|
||||
@include item_bottom_color($bottom-border-top-clore-theme);
|
||||
|
||||
.label {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 70%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fj_item {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.btn_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 5vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,441 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<TopNav :navTitle="'人口核实详情'" />
|
||||
<van-form @submit="onSubmit">
|
||||
<div class="title_tab">基本信息</div>
|
||||
<van-field
|
||||
v-model="normalForm.gmsfhm"
|
||||
label="身份证号"
|
||||
placeholder="请输入身份证号"
|
||||
input-align="right"
|
||||
/>
|
||||
<van-field
|
||||
v-model="normalForm.xm"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
input-align="right"
|
||||
/>
|
||||
|
||||
<div class="title_tab">核实信息</div>
|
||||
<van-field
|
||||
v-model="normalForm.reason"
|
||||
label="任务类型"
|
||||
placeholder="请输入任务类型"
|
||||
input-align="right"
|
||||
/>
|
||||
<van-field
|
||||
v-model="normalForm.createdAt"
|
||||
label="生成时间"
|
||||
placeholder="请输入生成时间"
|
||||
input-align="right"
|
||||
/>
|
||||
<van-cell-group>
|
||||
<van-cell clickable title="处理结果" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="cljgRadio" direction="horizontal">
|
||||
<van-radio name="1">属实</van-radio>
|
||||
<van-radio name="9">不属实</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-field
|
||||
v-model="normalForm.jzxqmc"
|
||||
label="所属小区"
|
||||
placeholder="请输入所属小区"
|
||||
input-align="right"
|
||||
v-if="cljgRadio == 1"
|
||||
/>
|
||||
<van-field
|
||||
v-model="normalForm.dzmc"
|
||||
@click="popupShow = true"
|
||||
label="小区地址"
|
||||
type="textarea"
|
||||
placeholder="请输入小区地址"
|
||||
input-align="right"
|
||||
v-if="cljgRadio == 1"
|
||||
/>
|
||||
<van-cell-group v-if="cljgRadio == 9">
|
||||
<van-cell clickable title="识别情况" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="rysfsbqkRadio" direction="horizontal">
|
||||
<van-radio name="1">准确</van-radio>
|
||||
<van-radio name="5">错误</van-radio>
|
||||
<van-radio name="9">不确定</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-field
|
||||
rows="3"
|
||||
type="textarea"
|
||||
v-model="normalForm.clbz"
|
||||
placeholder="处理说明"
|
||||
/>
|
||||
|
||||
<div class="title_tab">
|
||||
<s></s>
|
||||
<span>通行轨迹({{ txTotal }})</span>
|
||||
<span class="all" @click="routerPush(normalForm.gmsfhm)"
|
||||
>更多
|
||||
<van-icon name="arrow"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="txgj_box">
|
||||
<div
|
||||
class="item_img_box"
|
||||
v-for="(item, index) in txgjList"
|
||||
:key="item.id"
|
||||
>
|
||||
<van-image
|
||||
width="100%"
|
||||
height="30vw"
|
||||
:src="item.baseUrl"
|
||||
style="flex: 1"
|
||||
@click.stop="onClickImg(item.ryPhoto, index)"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="time">{{ item.djsj }}</div>
|
||||
<div
|
||||
class="jcFlag"
|
||||
:class="{
|
||||
bg_green: item.inOut === 'in',
|
||||
bg_orange: item === 'out',
|
||||
}"
|
||||
>
|
||||
{{ item.inOut === "out" ? "出" : "进" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 16px 0; padding: 0 5vw">
|
||||
<van-button
|
||||
:loading="loading"
|
||||
round
|
||||
native-type="submit"
|
||||
block
|
||||
type="primary"
|
||||
>
|
||||
提交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
<van-popup
|
||||
v-model:show="popupShow"
|
||||
round
|
||||
position="center"
|
||||
style="width: 90%"
|
||||
>
|
||||
<van-cascader
|
||||
active-color="#1989fa"
|
||||
v-model="list.check"
|
||||
title="选择具体地址"
|
||||
:options="list.ldList"
|
||||
@close="popupShow = false"
|
||||
@change="onCascaderChange"
|
||||
@finish="onFinish"
|
||||
></van-cascader>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getBase64 } from "../../../utils/tools.js";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { Dialog, Toast } from "vant";
|
||||
import {
|
||||
dateFormat,
|
||||
ymGetRequest,
|
||||
ymPostRequest,
|
||||
getYmToken,
|
||||
hintToast,
|
||||
} from "../../../utils/tools.js";
|
||||
import { computed, ref, reactive, onMounted, watch } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { ImagePreview } from "vant";
|
||||
import router from "../../../router";
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
item.baseUrl = res;
|
||||
}, item.ryPhoto);
|
||||
}
|
||||
const cljgRadio = ref("1");
|
||||
const rysfsbqkRadio = ref("5"); // 人员身份识别情况
|
||||
const popupShow = ref(false);
|
||||
const cascaderValue = ref(""); //级联默认值
|
||||
const copyToken = ref("");
|
||||
const list = reactive({
|
||||
ldList: [], //楼栋数据
|
||||
check: "",
|
||||
});
|
||||
//通行轨迹数据
|
||||
const txgjList = ref([]);
|
||||
//表单数据
|
||||
const normalForm = ref({
|
||||
gmsfhm: "",
|
||||
xm: "",
|
||||
jzxqmc: "",
|
||||
dzmc: "",
|
||||
zzzhz: "",
|
||||
createdAt: "",
|
||||
clbz: "",
|
||||
reason: "",
|
||||
cljg: "",
|
||||
});
|
||||
//不属实 置空
|
||||
watch(
|
||||
() => cljgRadio.value,
|
||||
(newValue) => {
|
||||
if (newValue == 9) normalForm.value.clbz = "";
|
||||
}
|
||||
);
|
||||
//选择数据
|
||||
onMounted(() => {
|
||||
let userCrd = JSON.parse(window.localStorage.getItem("userInfo"))
|
||||
.idEntityCard;
|
||||
let rwid = useRoute().query.id;
|
||||
getYmToken(
|
||||
{
|
||||
userid: userCrd,
|
||||
code: "GxGA510109",
|
||||
},
|
||||
(res) => {
|
||||
copyToken.value = res.data.token;
|
||||
_getData(res.data.token, "001d902c4aee42cd89f0dc3fa470abb7");
|
||||
}
|
||||
);
|
||||
});
|
||||
//获取任务数据数据
|
||||
function _getData(token, id) {
|
||||
ymGetRequest(`/person/taskDetail`, { id }, token, (res) => {
|
||||
normalForm.value = res.data;
|
||||
normalForm.value.clbz = "核实为实有人口";
|
||||
_getLdData(res.data.jzxqid, token);
|
||||
getRytxList(res.data.gmsfhm);
|
||||
});
|
||||
}
|
||||
//获取楼栋数据
|
||||
function _getLdData(placeId, token) {
|
||||
ymGetRequest(`/place/placeBuild`, { placeId }, token, (res) => {
|
||||
if (res.data.length > 0) {
|
||||
for (let i = 0; i < res.data.lengt; i++) {
|
||||
res.data[i].text = res.data[i].dzmc;
|
||||
res.data[i].value = res.data[i].parentid;
|
||||
res.data[i].children = [];
|
||||
}
|
||||
list.ldList = res.data.map((item) => {
|
||||
return {
|
||||
text: item.dzmc,
|
||||
value: item.id,
|
||||
children: [],
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//单元 楼栋 房号数据
|
||||
function onCascaderChange(value) {
|
||||
if (value.tabIndex === 0) {
|
||||
const index = list.ldList.map((item) => item.value).indexOf(value.value);
|
||||
ymGetRequest(
|
||||
`/place/placeBzdz`,
|
||||
{ parentId: value.value },
|
||||
copyToken.value,
|
||||
(res) => {
|
||||
list.ldList[index].children = res.data.map((item) => {
|
||||
return {
|
||||
text: item.dzjc,
|
||||
value: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
//人员通行列表
|
||||
const txTotal = ref(0);
|
||||
function getRytxList(gmsfhm) {
|
||||
ymPostRequest(
|
||||
"/person/record_list",
|
||||
{ gmsfhm, page: 1, psize: 3 },
|
||||
copyToken.value,
|
||||
(res) => {
|
||||
txgjList.value = res.data.content;
|
||||
txgjList.value.map((item) => {
|
||||
_getBase64(item);
|
||||
});
|
||||
txTotal.value = res.data.totalElements;
|
||||
}
|
||||
);
|
||||
}
|
||||
function onFinish({ selectedOptions }) {
|
||||
popupShow.value = false;
|
||||
normalForm.value.dzmc = selectedOptions.map((option) => option.text).join("");
|
||||
normalForm.value.dzid = selectedOptions[selectedOptions.length - 1].value;
|
||||
}
|
||||
function onClickImg(url, index) {
|
||||
ImagePreview({
|
||||
images: txgjList.value.map((item) => item.baseUrl),
|
||||
startPosition: index,
|
||||
});
|
||||
}
|
||||
function routerPush(sfzh) {
|
||||
router.push({
|
||||
path: "/rw/views/txgj",
|
||||
query: {
|
||||
sfzh: sfzh,
|
||||
token: copyToken.value,
|
||||
},
|
||||
});
|
||||
}
|
||||
function onSubmit() {
|
||||
const data = {
|
||||
addWhiteList: 0,
|
||||
clbz: normalForm.value.clbz,
|
||||
cljg: normalForm.value.cljg,
|
||||
cljgfk: 0,
|
||||
dzid: normalForm.value.dzid,
|
||||
id: normalForm.value.id,
|
||||
whiteRemark: "",
|
||||
whiteTime: "",
|
||||
};
|
||||
ymPostRequest("/person/taskHandle", { ...data }, copyToken.value, (res) => {
|
||||
if (res.status === 200) {
|
||||
hintToast("处理成功");
|
||||
router.go(-1);
|
||||
} else {
|
||||
hintToast(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
.container {
|
||||
margin-top: 2vw;
|
||||
}
|
||||
.nav_tab {
|
||||
padding: 2vw;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.tab {
|
||||
background: #a4aec8;
|
||||
color: #fff;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
width: 40vw;
|
||||
text-align: center;
|
||||
border-radius: 16px 16px 16px 0;
|
||||
}
|
||||
.tab.active {
|
||||
background: #517cea;
|
||||
}
|
||||
}
|
||||
|
||||
.popupTitle {
|
||||
text-align: center;
|
||||
background-color: rgb(11, 137, 247);
|
||||
height: 6vh;
|
||||
line-height: 6vh;
|
||||
}
|
||||
|
||||
.popbtn-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.check-item-tag {
|
||||
display: inline-block;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.check-data-box {
|
||||
height: 25vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.time-box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
::v-deep .mulSelect .van-cell__title,
|
||||
.van-cell__value {
|
||||
flex: unset;
|
||||
}
|
||||
|
||||
::v-deep .mulSelect .van-cell__value {
|
||||
flex: 1;
|
||||
}
|
||||
.title_tab {
|
||||
@include font_color($font-color-theme);
|
||||
padding: 0 3vw 0 7vw;
|
||||
position: relative;
|
||||
margin: 2vw 0;
|
||||
letter-spacing: 2px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.all {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
}
|
||||
.title_tab::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 5vw;
|
||||
bottom: 0;
|
||||
width: 4px;
|
||||
background: #3b6be7;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.van-cell:after {
|
||||
display: none;
|
||||
}
|
||||
.van-cell {
|
||||
@include table_item_color($table-item-theme);
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
padding: 6px;
|
||||
margin: 8px 4%;
|
||||
width: 92%;
|
||||
overflow: hidden;
|
||||
color: var(--van-cell-text-color);
|
||||
font-size: var(--van-cell-font-size);
|
||||
line-height: var(--van-cell-line-height);
|
||||
}
|
||||
.popupTitle {
|
||||
color: #fff;
|
||||
}
|
||||
.txgj_box {
|
||||
display: flex;
|
||||
padding: 0 4.5%;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item_img_box {
|
||||
// border: 1px solid red;
|
||||
position: relative;
|
||||
width: 31%;
|
||||
.time {
|
||||
font-size: 11px;
|
||||
// @include font_size($font_medium_s);
|
||||
}
|
||||
.jcFlag {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@include font_size($font_medium_s);
|
||||
padding: 1vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,129 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<TopNav :navTitle="'通行轨迹'" :showLeft="true" />
|
||||
<van-list
|
||||
:finished="finished"
|
||||
finished-text="没有更多数据了"
|
||||
@load="onLoad"
|
||||
offset="1"
|
||||
:immediate-check="false"
|
||||
>
|
||||
<div class="txgj_box">
|
||||
<div class="item_img_box" v-for="(item, index) in list" :key="item.id">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="30vw"
|
||||
:src="item.baseUrl"
|
||||
style="flex: 1"
|
||||
@click.stop="onClickImg(item.ryPhoto, index)"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="time">{{ item.djsj }}</div>
|
||||
<div
|
||||
class="jcFlag"
|
||||
:class="{
|
||||
bg_green: item.inOut === 'in',
|
||||
bg_orange: item === 'out',
|
||||
}"
|
||||
>
|
||||
{{ item.inOut === "out" ? "出" : "进" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import { getBase64 } from "../../../utils/tools.js";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { ImagePreview } from "vant";
|
||||
import { ymPostRequest } from "../../../utils/tools.js";
|
||||
import { useRoute } from "vue-router";
|
||||
const route = useRoute();
|
||||
const list = ref([]);
|
||||
const finished = ref(false);
|
||||
const queryList = ref({
|
||||
page: 1,
|
||||
psize: 10,
|
||||
gmsfhm: route.query.sfzh,
|
||||
});
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
item.baseUrl = res;
|
||||
}, item.ryPhoto);
|
||||
}
|
||||
const total = ref(0);
|
||||
const getList = () => {
|
||||
ymPostRequest(
|
||||
"/person/record_list",
|
||||
{ ...queryList.value },
|
||||
route.query.token,
|
||||
(res) => {
|
||||
if (queryList.value.page === 1) {
|
||||
list.value = res.data.content;
|
||||
list.value.map((item) => {
|
||||
_getBase64(item);
|
||||
});
|
||||
} else {
|
||||
res.data.content.map(item=>{
|
||||
_getBase64(item);
|
||||
list.value.push(item)
|
||||
})
|
||||
}
|
||||
total.value = res.data.totalElements;
|
||||
}
|
||||
);
|
||||
};
|
||||
function onLoad() {
|
||||
if (list.value.length === total.value) {
|
||||
finished.value = true;
|
||||
} else {
|
||||
queryList.value.page++;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
function onClickImg(url, index) {
|
||||
ImagePreview({
|
||||
images: list.value.map((item) => item.baseUrl),
|
||||
startPosition: index,
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
.txgj_box {
|
||||
display: flex;
|
||||
padding: 16px 4.5% 0;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item_img_box {
|
||||
// border: 1px solid red;
|
||||
position: relative;
|
||||
width: 48%;
|
||||
.time {
|
||||
font-size: 11px;
|
||||
// @include font_size($font_medium_s);
|
||||
}
|
||||
.jcFlag {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@include font_size($font_medium_s);
|
||||
padding: 1vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,108 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top:13vw">
|
||||
<TopNav navTitle="车辆" />
|
||||
<div class="search-boxSJY">
|
||||
<van-search v-model="clList.cph" placeholder="请输入车牌号" style="width: 100%" @update:model-value="getList(1)" />
|
||||
</div>
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
||||
<div class="item-box jwz-line" v-for="(item, index) in clList.list" :key="index">
|
||||
<div class="ps-title">{{ item.cph }}</div>
|
||||
<div class="lineSJY">所属部门: {{ item.ssbm }}</div>
|
||||
<div class="lineSJY">
|
||||
车辆状态: {{ item.zbzt == "1" ? "正常" : "非正常" }}
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">车牌号: {{ item.cph }}</div>
|
||||
<div class="first-one">车辆年款: {{ item.clnk }}</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div style="display: flex; width: 50%">
|
||||
号牌种类:{{ setDict(item.cllx, D_BZ_CLLX) }}
|
||||
</div>
|
||||
<div style="display: flex; width: 50%">
|
||||
车辆品牌:{{ item.clpp }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">购置日期: {{ item.gmrq }}</div>
|
||||
<div class="first-one">报废日期: {{ item.bfrq }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getClList } from "../../api/scyy.js";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
function onClickLeft() {
|
||||
router.push("/home");
|
||||
}
|
||||
const { D_BZ_CLLX } = getDictList("D_BZ_CLLX");
|
||||
const clList = reactive({
|
||||
list: [],
|
||||
cph: "",
|
||||
});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const page = ref(1);
|
||||
const total = ref(0);
|
||||
function getList(val) {
|
||||
loading.value = false;
|
||||
if (val === 1) {
|
||||
page.value = 1
|
||||
}
|
||||
getClList({
|
||||
pageCurrent: page.value,
|
||||
pageSize: 10,
|
||||
cph: clList.cph,
|
||||
})
|
||||
.then((res) => {
|
||||
if (val === 1) {
|
||||
clList.list = res.records;
|
||||
} else {
|
||||
res.records.forEach((ele) => {
|
||||
clList.list.push(ele);
|
||||
});
|
||||
}
|
||||
total.value = res.total;
|
||||
onLoad();
|
||||
finished.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad() {
|
||||
if (page.value * 10 < total.value) {
|
||||
page.value++;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.item-box {
|
||||
line-height: 1.8em;
|
||||
margin: 0 5vw;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
@include font_color($font-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.ps-title {
|
||||
color: #1F6CEC;
|
||||
font-weight: bold;
|
||||
@include font_size($font_medium);
|
||||
line-height: 6vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<TopNav navTitle="警务站" />
|
||||
<div class="search-box">
|
||||
<van-search v-model="jwzList.jwzMc" placeholder="请输入警务站名称" style="width: 100%" @update:model-value="getList(1)" />
|
||||
</div>
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
||||
<div class="listInfoBox">
|
||||
<List :labelData="jwzList.list">
|
||||
<template v-slot="{ item }">
|
||||
<div class="ps-title">{{ item.jwzMc }}</div>
|
||||
|
||||
<div class="line">
|
||||
警务站类型:{{ setDict(item.jwzLx, D_BZ_JWZLX) }}
|
||||
</div>
|
||||
<div class="line"><van-icon name="location-o" /> 详细地址: {{ item.jwzDz }}</div>
|
||||
<div class="line"><van-icon name="underway-o" /> 建立日期: {{ item.xjSj }}</div>
|
||||
<div class="line">
|
||||
<van-icon name="user-o" /> 负责人:
|
||||
{{ item.fzrXm }} {{ item.ssbm }}
|
||||
</div>
|
||||
<div class="lineGap"></div>
|
||||
</template>
|
||||
</List>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import List from "../../components/ListItem.vue";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getJwzList } from "../../api/scyy.js";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
const router = useRouter();
|
||||
function onClickLeft() {
|
||||
router.push("/home");
|
||||
}
|
||||
const { D_BZ_JWZLX } = getDictList("D_BZ_JWZLX");
|
||||
const jwzList = reactive({
|
||||
list: [],
|
||||
jwzMc: "",
|
||||
});
|
||||
function goCreatePoliceStation() {
|
||||
router.push("/createPoliceStation");
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
// 查询警务站列表
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const page = ref(1);
|
||||
const total = ref(0);
|
||||
function getList(val) {
|
||||
loading.value = false;
|
||||
getJwzList({
|
||||
pageNo: page.value,
|
||||
pageSize: 10,
|
||||
jwzMc: jwzList.jwzMc,
|
||||
})
|
||||
.then((res) => {
|
||||
if (val === 1) {
|
||||
jwzList.list = res.records;
|
||||
} else {
|
||||
res.records.forEach((ele) => {
|
||||
jwzList.list.push(ele);
|
||||
});
|
||||
}
|
||||
total.value = res.total;
|
||||
onLoad();
|
||||
finished.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad() {
|
||||
if (page.value * 10 < total.value) {
|
||||
page.value++;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.search-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// 列表
|
||||
.listInfoBox {
|
||||
@include font_size($font_medium_s);
|
||||
padding: 0 4vw;
|
||||
box-sizing: border-box;
|
||||
|
||||
.ps-title {
|
||||
color: #1f6cec;
|
||||
font-weight: bold;
|
||||
line-height: 6vw;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
.line {
|
||||
line-height: 5vw;
|
||||
}
|
||||
|
||||
.lineGap {
|
||||
height: 4px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@ -1,83 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<TopNav navTitle="快反点" />
|
||||
<van-search v-model="kfdList.kfdMc" placeholder="请输入快反点名称" @update:model-value="serachData" />
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
||||
<div class="item-box" v-for="(item, index) in kfdList.list" :key="index">
|
||||
<div class="titleSJY">{{ item.kfdMc }}</div>
|
||||
<!-- <div><van-icon name="underway-o" /> 建立日期: {{ item.xtCjsj }}</div> -->
|
||||
<div><van-icon name="user-o" /> 市所属部门: {{ item.ssbm }}</div>
|
||||
<div><van-icon name="location-o" /> 地址: {{ item.kfdDz }}</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getKfdList } from "../../api/scyy.js";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
const kfdList = reactive({
|
||||
list: [],
|
||||
kfdMc: "",
|
||||
});
|
||||
onMounted(() => {
|
||||
serachData();
|
||||
});
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const page = ref(1);
|
||||
const total = ref(0);
|
||||
function serachData() {
|
||||
page.value = 1
|
||||
getList()
|
||||
}
|
||||
function getList() {
|
||||
loading.value = false;
|
||||
let params = {
|
||||
pageNum: page.value,
|
||||
pageSize: 10,
|
||||
kfdMc: kfdList.kfdMc,
|
||||
};
|
||||
getKfdList(params)
|
||||
.then((res) => {
|
||||
if (page.value === 1) {
|
||||
kfdList.list = res.records;
|
||||
} else {
|
||||
kfdList.list = kfdList.list.concat(res.records);
|
||||
}
|
||||
total.value = res.total;
|
||||
onLoad();
|
||||
finished.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad() {
|
||||
if (page.value * 10 < total.value) {
|
||||
page.value++;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.item-box {
|
||||
line-height: 1.8em;
|
||||
margin: 0 5vw;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
@include font_color($font-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.titleSJY {
|
||||
color: #1f6cec;
|
||||
font-weight: bold;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
</style>
|
||||
@ -1,129 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<van-sticky :offset-top="0">
|
||||
<TopNav navTitle="巡防力量" />
|
||||
<div class="search-boxSJY">
|
||||
<van-search v-model="xlllList.xm" placeholder="请输入搜索关键词" style="width: 100%" @update:model-value="getList(1)" />
|
||||
</div>
|
||||
</van-sticky>
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad"
|
||||
:immediate-check="false">
|
||||
<div class="item-boxxfll" :class="item.fl === '01' ? 'bgColorm' : 'bgColorf'"
|
||||
v-for="(item, index) in xlllList.list" :key="index">
|
||||
<div class="image-box">
|
||||
<van-image fill="cover" :src="require('../../assets/images/tx.png')" />
|
||||
</div>
|
||||
<div class="xlll-info-box">
|
||||
<div :class="item.fl === '01' ? 'title-box1' : 'title-box2'">
|
||||
<div :class="item.fl === '01' ? 'line-y1' : 'line-y2'"></div>
|
||||
<span>{{ item.xm }}</span>
|
||||
<span>
|
||||
<dict-tag :options="D_BZ_XB" :value="item.xbdm" :tag="false" /> </span>
|
||||
<span>{{ item.fl === "01" ? "民警" : "辅警" }}</span>
|
||||
</div>
|
||||
<div>{{ item.sfzh }}</div>
|
||||
<div>所在部门: {{ item.ssbm }}</div>
|
||||
<div>警员编号: {{ item.jh }}</div>
|
||||
<div>联系电话: {{ item.lxdh }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getXfllList } from "../../api/scyy.js";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
const { D_BZ_XB } = getDictList("D_BZ_XB");
|
||||
const router = useRouter();
|
||||
const xlllList = reactive({
|
||||
list: [],
|
||||
xm: "",
|
||||
total: 0,
|
||||
});
|
||||
onMounted(() => {
|
||||
getList(1);
|
||||
});
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const page = ref(1);
|
||||
const total = ref(0);
|
||||
function getList(val) {
|
||||
loading.value = true;
|
||||
getXfllList({
|
||||
pageCurrent: page.value,
|
||||
pageSize: 10,
|
||||
xm: xlllList.xm,
|
||||
})
|
||||
.then((res) => {
|
||||
total.value = res.total;
|
||||
if (val === 1) {
|
||||
xlllList.list = res.records;
|
||||
} else {
|
||||
res.records.forEach((ele) => {
|
||||
xlllList.list.push(ele);
|
||||
});
|
||||
}
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad() {
|
||||
if (page.value * 10 < total.value) {
|
||||
page.value++;
|
||||
getList();
|
||||
} else {
|
||||
finished.value = true;
|
||||
}
|
||||
}
|
||||
// 添加民警
|
||||
function goCreatePeoplePolice() {
|
||||
router.push("/createMJ");
|
||||
}
|
||||
// 添加辅警
|
||||
function goCreateAssistantPolice() {
|
||||
router.push("/createFJ");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.item-boxxfll {
|
||||
line-height: 1.8em;
|
||||
margin: 2vw;
|
||||
padding: 2vw;
|
||||
box-sizing: border-box;
|
||||
@include font_color($font-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
display: flex;
|
||||
|
||||
.image-box {
|
||||
flex: 1;
|
||||
margin: 2vw;
|
||||
}
|
||||
|
||||
.xlll-info-box {
|
||||
flex: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.bgColorm {
|
||||
background-color: #f0f6ff;
|
||||
}
|
||||
|
||||
.bgColorf {
|
||||
background-color: #f9eeff;
|
||||
}
|
||||
|
||||
.titleSJY {
|
||||
color: #1f6cec;
|
||||
font-weight: bold;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
</style>
|
||||
@ -1,85 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top:13vw">
|
||||
<TopNav navTitle="巡防区" />
|
||||
<van-search v-model="xfqList.xfqMc" placeholder="请输入巡防区名称" @update:model-value="getList(1)" />
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
||||
<div class="item-box" v-for="(item, index) in xfqList.list" :key="index">
|
||||
<div class="titleSJY">{{ item.xfqMc }}</div>
|
||||
<div>建立时间: {{ item.xtCjsj }}</div>
|
||||
<div><van-icon name="user-o" /> 负责人: {{ item.xfqFzr }}</div>
|
||||
<div>负责人身份证号:{{ item.xfqFzrSfz }}</div>
|
||||
<div>所属部门:{{ item.ssbm }}</div>
|
||||
<div class="line">巡防区等级:{{ setDict(item.xfqDj, D_BZ_XFQDJ) }}</div>
|
||||
<div class="line">巡防区类型:{{ setDict(item.xfqLx, D_BZ_XQLX) }}</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { getXfqList } from "../../api/scyy.js";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
const { D_BZ_XFQDJ, D_BZ_XQLX } = getDictList("D_BZ_XFQDJ", "D_BZ_XQLX");
|
||||
const xfqList = reactive({
|
||||
list: [],
|
||||
xfqMc: "",
|
||||
});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const page = ref(1);
|
||||
const total = ref(0);
|
||||
function getList(val) {
|
||||
loading.value = false;
|
||||
getXfqList({
|
||||
pageCurrent: page.value,
|
||||
pageSize: 10,
|
||||
xfqMc: xfqList.xfqMc,
|
||||
})
|
||||
.then((res) => {
|
||||
if (val === 1) {
|
||||
xfqList.list = res.records;
|
||||
} else {
|
||||
res.records.forEach((ele) => {
|
||||
xfqList.list.push(ele);
|
||||
});
|
||||
}
|
||||
total.value = res.total;
|
||||
onLoad();
|
||||
finished.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad() {
|
||||
if (page.value * 10 < total.value) {
|
||||
page.value++;
|
||||
getXfqList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.item-box {
|
||||
line-height: 1.8em;
|
||||
margin: 0 5vw;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
@include font_color($font-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.titleSJY {
|
||||
color: #1F6CEC;
|
||||
font-weight: bold;
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
</style>
|
||||
@ -1,187 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top:13vw">
|
||||
<TopNav navTitle="装备" />
|
||||
<van-tabs v-model:active="active" background="#fff" color="#1989fa">
|
||||
<van-tab title="智能装备管理">
|
||||
<div class="search-boxSJY">
|
||||
<van-search v-model="zbList.sbmc" placeholder="请输入智能装备名称" style="width: 100%"
|
||||
@update:model-value="getList(1)" />
|
||||
</div>
|
||||
<van-list v-model:loading="loading1" :finished="finished1" finished-text="没有更多了" @load="onLoad1">
|
||||
<div class="item-box" v-for="(item, index) in zbList.list" :key="index">
|
||||
<div class="titleSJY">{{ item.sbmc }}</div>
|
||||
<div class="lineSJY">所属部门: {{ item.ssbm }}</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">装备型号: {{ item.xh }}</div>
|
||||
<div style="display: flex">
|
||||
装备类型: <dict-tag :options="D_BZ_ZNZBFL" :value="item.scode" :tag="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div>生产厂商: {{ item.sccs }}</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">采购日期: {{ item.cgrq }}</div>
|
||||
<div>到期时间: {{ item.dqsj }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</van-tab>
|
||||
<van-tab title="警用器械管理">
|
||||
<div class="search-boxSJY">
|
||||
<van-search v-model="zbList.qxMc" placeholder="请输入警用器械名称" style="width: 100%"
|
||||
@update:model-value="getJyqxList(1)" />
|
||||
</div>
|
||||
<van-list v-model:loading="loading2" :finished="finished2" finished-text="没有更多了" @load="onLoad2">
|
||||
<div class="item-box" v-for="(item, index) in zbList.jyqxList" :key="index">
|
||||
<div class="titleSJY">
|
||||
<div class="line-y"></div>
|
||||
{{ item.qxMc }}
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">器械编码: {{ item.qxbh }}</div>
|
||||
<div>器械名称: {{ item.qxMc }}</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">
|
||||
器械类型: <dict-tag :options="D_BZ_JYQXFL" :value="item.scode" :tag="false" />
|
||||
</div>
|
||||
<div>生产厂商: {{ item.sccs }}</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">采购日期: {{ item.cgrq }}</div>
|
||||
<div>到期时间: {{ item.dqsj }}</div>
|
||||
</div>
|
||||
<div class="lineSJY">
|
||||
<div class="first-one">所属部门: {{ item.ssbm }}</div>
|
||||
<div>录入批次: {{ item.qxPch }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getZnzb, selectJyqx } from "../../api/scyy.js";
|
||||
import TopNav from "../../components/topNav.vue";
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import { getDictList, setDict } from "../../utils/dict";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { D_BZ_ZNZBFL, D_BZ_JYQXFL } = getDictList("D_BZ_ZNZBFL", "D_BZ_JYQXFL");
|
||||
function goCreateEquipment(val) {
|
||||
router.push({ name: "CreateEquipment", params: { sign: val } });
|
||||
}
|
||||
const active = ref(0);
|
||||
watch(active, (newVal, oldVal) => {
|
||||
if (newVal === 0) {
|
||||
zbList.list = [];
|
||||
getList();
|
||||
} else {
|
||||
zbList.jyqxList = [];
|
||||
getJyqxList();
|
||||
}
|
||||
});
|
||||
watch(route.params.flag, (val) => {
|
||||
active.value = val;
|
||||
});
|
||||
const zbList = reactive({
|
||||
list: [],
|
||||
sbmc: "",
|
||||
jyqxList: [],
|
||||
qxMc: "",
|
||||
});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
// 获取智能装备
|
||||
const loading1 = ref(false);
|
||||
const finished1 = ref(false);
|
||||
const page1 = ref(1);
|
||||
const total1 = ref(0);
|
||||
function getList(val) {
|
||||
loading1.value = false;
|
||||
getZnzb({
|
||||
pageNo: page1.value,
|
||||
pageSize: 10,
|
||||
sbmc: zbList.sbmc,
|
||||
})
|
||||
.then((res) => {
|
||||
if (val === 1) {
|
||||
zbList.list = res.records;
|
||||
} else {
|
||||
res.records.forEach((ele) => {
|
||||
zbList.list.push(ele);
|
||||
});
|
||||
}
|
||||
total1.value = res.total;
|
||||
onLoad();
|
||||
finished1.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished1.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad1() {
|
||||
if (page1.value * 10 < total1.value) {
|
||||
page1.value++;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
|
||||
// 查询警用器械
|
||||
const loading2 = ref(false);
|
||||
const finished2 = ref(false);
|
||||
const page2 = ref(1);
|
||||
const total2 = ref(0);
|
||||
function getJyqxList(val) {
|
||||
loading2.value = false;
|
||||
selectJyqx({
|
||||
pageNo: page2.value,
|
||||
pageSize: 10,
|
||||
qxMc: zbList.qxMc,
|
||||
})
|
||||
.then((res) => {
|
||||
if (val === 1) {
|
||||
zbList.jyqxList = res.records;
|
||||
} else {
|
||||
res.records.forEach((ele) => {
|
||||
zbList.jyqxList.push(ele);
|
||||
});
|
||||
}
|
||||
total2.value = res.total;
|
||||
finished2.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
finished2.value = true;
|
||||
});
|
||||
}
|
||||
function onLoad2() {
|
||||
if (page2.value * 10 < total2.value) {
|
||||
page2.value++;
|
||||
getJyqxList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/styles/mixin.scss";
|
||||
|
||||
.item-box {
|
||||
line-height: 1.8em;
|
||||
margin: 0 5vw;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
@include font_color($font-color-theme);
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.titleSJY {
|
||||
color: #1F6CEC;
|
||||
font-weight: bold;
|
||||
@include font_size($font_medium);
|
||||
line-height: 6vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,289 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘车 -->
|
||||
<van-popup v-model:show="peopleCarShow" round :style="{ width: '90%' }" close-icon="close" :overlay="true"
|
||||
@close="handleClose">
|
||||
<div class="checkPeoplePopup">
|
||||
<div class="select-box">
|
||||
<div class="item-boxs" v-for="(item, index) in checkCList" :key="index" @click="getCItem(item, index)">
|
||||
<span :class="cCheckFlag === item.value ? 'checkText' : ''">{{ item.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-boxs">
|
||||
<div v-if="cCheckFlag === 'plateNum'">
|
||||
<div class="plateNum">
|
||||
<van-field v-model="from.value" readonly is-link placeholder="请选择车辆类型"
|
||||
@click="isShowCommonPicker = true;">
|
||||
</van-field>
|
||||
<van-icon @click="ocrSb" style="padding: 0 12px" name="photograph" color="#969799" />
|
||||
</div>
|
||||
<div class="input-number flex">
|
||||
<div class="p_div" v-for="(item, index) in cpList.licensePlateNumber" :key="index"
|
||||
:class="{ current: cpList.currentValIndex === index }" @click="showKeyboardFn(index)">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div class="add-number" v-if="from.hplx == '02'"
|
||||
@click="cpList.licensePlateNumber.push(''), from.hplx = '52'">
|
||||
<van-icon name="plus" color="rgb(34,146,254)" />
|
||||
<span style="font-size: 12px">新能源</span>
|
||||
</div>
|
||||
|
||||
<div class="add-number" v-if="from.hplx == '52'"
|
||||
@click="cpList.licensePlateNumber.pop(0), from.hplx = '02'">
|
||||
<van-icon name="plus" color="rgb(34,146,254)" />
|
||||
<span style="font-size: 12px">汽车</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-field v-model="from.value" placeholder="请输入车辆识别码" v-if="cCheckFlag === 'plateCode'"
|
||||
:rules="[{ required: true, message: '请输入车辆识别码' }]" right-icon="photograph">
|
||||
</van-field>
|
||||
<svg-icon icon="chuzu" />
|
||||
</div>
|
||||
<div class="footBtn">
|
||||
<van-button native-type="submit" @click="checkC('sd')" type="primary" round block>查询</van-button>
|
||||
<div class="toolsTip">请根据工作需求使用功能,您的每次查询将记录日志!</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="D_BZ_HPZL" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
<!-- 车牌键盘 -->
|
||||
<VehicleKeyboard ref="vehicleKeyboards" @setValue="setValue" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Toast } from "vant";
|
||||
import VehicleKeyboard from "../../../components/VehicleKeyboard.vue";
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
watch,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
toRefs,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
const { D_BZ_HPZL } = getDictList("D_BZ_HPZL");
|
||||
const router = useRouter();
|
||||
const peopleCarShow = ref(false);
|
||||
const props = defineProps({
|
||||
zlId: String,
|
||||
});
|
||||
const baseInfo = ref({
|
||||
baseImage: '',//回显图片
|
||||
})
|
||||
function handleOpen() {
|
||||
peopleCarShow.value = true;
|
||||
window.addEventListener("message", receivePost);
|
||||
}
|
||||
function handleClose() {
|
||||
peopleCarShow.value = false;
|
||||
window.removeEventListener("message", receivePost);
|
||||
}
|
||||
defineExpose({
|
||||
handleOpen,
|
||||
});
|
||||
const from = reactive({
|
||||
value: "小型汽车号牌",
|
||||
hplx: "02",
|
||||
pcsrlx: "2",
|
||||
});
|
||||
const vehicleKeyboards = ref();
|
||||
const cpList = reactive({
|
||||
licensePlateNumber: ["", "", "", "", "", "", ""],
|
||||
currentValIndex: 0,
|
||||
});
|
||||
function showKeyboardFn(index) {
|
||||
cpList.currentValIndex = index;
|
||||
const showProvince = index === 0;
|
||||
const showNumber = index > 1;
|
||||
if (index === cpList.licensePlateNumber.length) {
|
||||
vehicleKeyboards.value.changeDialogShow(false, showProvince, showNumber);
|
||||
} else {
|
||||
vehicleKeyboards.value.changeDialogShow(true, showProvince, showNumber);
|
||||
}
|
||||
}
|
||||
function setValue(val) {
|
||||
if (val === "delete") {
|
||||
if (cpList.currentValIndex > 2) {
|
||||
cpList.licensePlateNumber[cpList.currentValIndex] = "";
|
||||
cpList.currentValIndex--;
|
||||
} else {
|
||||
cpList.licensePlateNumber[cpList.currentValIndex] = "";
|
||||
}
|
||||
} else {
|
||||
cpList.licensePlateNumber[cpList.currentValIndex] = val;
|
||||
cpList.currentValIndex += 1;
|
||||
showKeyboardFn(cpList.currentValIndex);
|
||||
}
|
||||
}
|
||||
function ocrSb() {
|
||||
try {
|
||||
bridge.pZ("pzsbcphm");
|
||||
} catch (error) {
|
||||
window.setcphm("川RRF435");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//接收postMessage消息
|
||||
function receivePost(mes) {
|
||||
var str = "";
|
||||
try {
|
||||
str = mes.data.type;
|
||||
} catch (error) { }
|
||||
switch (str) {
|
||||
case 'PHOTO':
|
||||
let str = mes.data.data;
|
||||
baseInfo.value.baseImage = str;
|
||||
break;
|
||||
case "cphm":
|
||||
try {
|
||||
getCphm(mes.data.data);
|
||||
} catch (error) { }
|
||||
break;
|
||||
case "color":
|
||||
try {
|
||||
console.log(mes.data);
|
||||
getColor(mes.data.data);
|
||||
} catch (error) { }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//通过ocr获取车牌
|
||||
function getCphm(data) {
|
||||
var cparr = ["", "", "", "", "", "", ""];
|
||||
try {
|
||||
if (data && data.length > 6) {
|
||||
cparr = data.split("");
|
||||
} else {
|
||||
Toast.fail("OCR识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
cpList.licensePlateNumber = cparr;
|
||||
}
|
||||
|
||||
//ocr获取车牌颜色
|
||||
function getColor(val) {
|
||||
D_BZ_HPZL.value.forEach(item => {
|
||||
if (item.dm == val) {
|
||||
from.hplx = item.dm;
|
||||
from.value = item.zdmc
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 盘车
|
||||
function checkC(val) {
|
||||
let hphm = cpList.licensePlateNumber.join("");
|
||||
let hplx = from.hplx;
|
||||
let pcsrlx = val ? '2' : '7' //有参数是手动盘查,没有是ocr识别
|
||||
peopleCarShow.value = false
|
||||
router.push({
|
||||
path: "/canVehicle",
|
||||
query: { hphm: hphm, hplx: hplx, pcsrlx: pcsrlx, zlId: props.zlId, }
|
||||
});
|
||||
}
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
from.value = val.text;
|
||||
from.hplx = val.value;
|
||||
}
|
||||
const checkCList = [
|
||||
{ label: "车牌", value: "plateNum" },
|
||||
{ label: "车辆识别码", value: "plateCode" },
|
||||
];
|
||||
const cCheckFlag = ref("plateNum");
|
||||
function getCItem(item, index) {
|
||||
cCheckFlag.value = item.value;
|
||||
console.log(D_BZ_HPZL.value);
|
||||
}
|
||||
// 弹出层数据
|
||||
const columns = ref(["测试1", "测试2", "测试3"]);
|
||||
const isShowCommonPicker = ref(false);
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.input-number {
|
||||
height: 7vh;
|
||||
// line-height: 6vh;
|
||||
overflow: hidden;
|
||||
margin: 10px 5vw 0;
|
||||
text-align: center;
|
||||
|
||||
// border-radius: 5px;
|
||||
// border: 1px rgb(81, 81, 81) solid;
|
||||
.p_div {
|
||||
background-color: #f5f5f5;
|
||||
height: 7vh;
|
||||
line-height: 7vh;
|
||||
width: 12%;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-left: 1px #e5e5e5 solid;
|
||||
border-top: 1px #e5e5e5 solid;
|
||||
border-bottom: 1px #e5e5e5 solid;
|
||||
background: #f5f5f5;
|
||||
// border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.p_div:nth-child(8) {
|
||||
border: 1px #e5e5e5 solid;
|
||||
}
|
||||
|
||||
.add-number {
|
||||
width: 52px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #1143ca;
|
||||
border: 1px solid #1143ca;
|
||||
}
|
||||
|
||||
.p_div.current {
|
||||
border: 1px solid #66aef6;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.plateNum {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
margin: 0 5vw;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.plateNum .van-cell {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.footBtn {
|
||||
margin: 10px 5vw;
|
||||
|
||||
.toolsTip {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
// transform: scale(.9);
|
||||
margin: 1vw 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,298 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘车 -->
|
||||
<!-- <van-popup v-model:show="peopleCarShow" round :style="{ width: '90%' }" close-icon="close" :overlay="true"
|
||||
@close="handleClose"> -->
|
||||
<div class="checkPeoplePopup">
|
||||
<!-- <div class="select-box">
|
||||
<div class="item-boxs" v-for="(item, index) in checkCList" :key="index" @click="getCItem(item, index)">
|
||||
<span :class="cCheckFlag === item.value ? 'checkText' : ''">{{ item.label }}</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content-boxs">
|
||||
<div v-if="cCheckFlag === 'plateNum'">
|
||||
<div class="plateNum">
|
||||
<van-field v-model="from.value" readonly is-link placeholder="请选择车辆类型"
|
||||
@click="isShowCommonPicker = true;">
|
||||
</van-field>
|
||||
<van-icon @click="ocrSb" style="padding: 0 12px" name="photograph" color="#969799" />
|
||||
</div>
|
||||
<div class="input-number flex">
|
||||
<div class="p_div" v-for="(item, index) in cpList.licensePlateNumber" :key="index"
|
||||
:class="{ current: cpList.currentValIndex === index }" @click="showKeyboardFn(index)">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div class="add-number" v-if="from.hplx == '02'"
|
||||
@click="cpList.licensePlateNumber.push(''), from.hplx = '52'">
|
||||
<van-icon name="plus" color="rgb(34,146,254)" />
|
||||
<span style="font-size: 12px">新能源</span>
|
||||
</div>
|
||||
|
||||
<div class="add-number" v-if="from.hplx == '52'"
|
||||
@click="cpList.licensePlateNumber.pop(0), from.hplx = '02'">
|
||||
<van-icon name="plus" color="rgb(34,146,254)" />
|
||||
<span style="font-size: 12px">汽车</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-field v-model="from.value" placeholder="请输入车辆识别码" v-if="cCheckFlag === 'plateCode'"
|
||||
:rules="[{ required: true, message: '请输入车辆识别码' }]" right-icon="photograph">
|
||||
</van-field>
|
||||
<svg-icon icon="chuzu" />
|
||||
</div>
|
||||
<div class="footBtn">
|
||||
<van-button native-type="submit" @click="checkC('sd')" type="primary" round block>查询</van-button>
|
||||
<div class="toolsTip">请根据工作需求使用功能,您的每次查询将记录日志!</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </van-popup> -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="D_BZ_HPZL" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
<!-- 车牌键盘 -->
|
||||
<VehicleKeyboard ref="vehicleKeyboards" @setValue="setValue" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Toast } from "vant";
|
||||
import VehicleKeyboard from "../../../components/VehicleKeyboard.vue";
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
watch,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
toRefs,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import emitter from "@/utils/eventBus";
|
||||
const { D_BZ_HPZL } = getDictList("D_BZ_HPZL");
|
||||
const router = useRouter();
|
||||
const peopleCarShow = ref(false);
|
||||
const props = defineProps({
|
||||
zlId: String,
|
||||
});
|
||||
const baseInfo = ref({
|
||||
baseImage: '',//回显图片
|
||||
})
|
||||
function handleOpen() {
|
||||
peopleCarShow.value = true;
|
||||
window.addEventListener("message", receivePost);
|
||||
}
|
||||
function handleClose() {
|
||||
peopleCarShow.value = false;
|
||||
window.removeEventListener("message", receivePost);
|
||||
}
|
||||
onMounted(()=>{
|
||||
emitter.on('closeCarJp',(res)=>{
|
||||
console.log(res,'res');
|
||||
vehicleKeyboards.value.changeDialogShow(false, 0, 0);
|
||||
})
|
||||
})
|
||||
defineExpose({
|
||||
handleOpen,
|
||||
});
|
||||
const from = reactive({
|
||||
value: "小型汽车号牌",
|
||||
hplx: "02",
|
||||
pcsrlx: "2",
|
||||
});
|
||||
const vehicleKeyboards = ref();
|
||||
const cpList = reactive({
|
||||
licensePlateNumber: ["", "", "", "", "", "", ""],
|
||||
currentValIndex: 0,
|
||||
});
|
||||
function showKeyboardFn(index) {
|
||||
cpList.currentValIndex = index;
|
||||
const showProvince = index === 0;
|
||||
const showNumber = index > 1;
|
||||
if (index === cpList.licensePlateNumber.length) {
|
||||
vehicleKeyboards.value.changeDialogShow(false, showProvince, showNumber);
|
||||
} else {
|
||||
vehicleKeyboards.value.changeDialogShow(true, showProvince, showNumber);
|
||||
}
|
||||
}
|
||||
function setValue(val) {
|
||||
if (val === "delete") {
|
||||
if (cpList.currentValIndex > 2) {
|
||||
cpList.licensePlateNumber[cpList.currentValIndex] = "";
|
||||
cpList.currentValIndex--;
|
||||
} else {
|
||||
cpList.licensePlateNumber[cpList.currentValIndex] = "";
|
||||
}
|
||||
} else {
|
||||
cpList.licensePlateNumber[cpList.currentValIndex] = val;
|
||||
cpList.currentValIndex += 1;
|
||||
showKeyboardFn(cpList.currentValIndex);
|
||||
}
|
||||
}
|
||||
function ocrSb() {
|
||||
try {
|
||||
bridge.pZ("pzsbcphm");
|
||||
} catch (error) {
|
||||
window.setcphm("川RRF435");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//接收postMessage消息
|
||||
function receivePost(mes) {
|
||||
var str = "";
|
||||
try {
|
||||
str = mes.data.type;
|
||||
} catch (error) { }
|
||||
switch (str) {
|
||||
case 'PHOTO':
|
||||
let str = mes.data.data;
|
||||
baseInfo.value.baseImage = str;
|
||||
break;
|
||||
case "cphm":
|
||||
try {
|
||||
getCphm(mes.data.data);
|
||||
} catch (error) { }
|
||||
break;
|
||||
case "color":
|
||||
try {
|
||||
console.log(mes.data);
|
||||
getColor(mes.data.data);
|
||||
} catch (error) { }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//通过ocr获取车牌
|
||||
function getCphm(data) {
|
||||
var cparr = ["", "", "", "", "", "", ""];
|
||||
try {
|
||||
if (data && data.length > 6) {
|
||||
cparr = data.split("");
|
||||
} else {
|
||||
Toast.fail("OCR识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
cpList.licensePlateNumber = cparr;
|
||||
}
|
||||
|
||||
//ocr获取车牌颜色
|
||||
function getColor(val) {
|
||||
D_BZ_HPZL.value.forEach(item => {
|
||||
if (item.dm == val) {
|
||||
from.hplx = item.dm;
|
||||
from.value = item.zdmc
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 盘车
|
||||
function checkC(val) {
|
||||
let hphm = cpList.licensePlateNumber.join("");
|
||||
let hplx = from.hplx;
|
||||
let pcsrlx = val ? '2' : '7' //有参数是手动盘查,没有是ocr识别
|
||||
peopleCarShow.value = false
|
||||
router.push({
|
||||
path: "/canVehicle",
|
||||
query: { hphm: hphm, hplx: hplx, pcsrlx: pcsrlx, zlId: props.zlId, }
|
||||
});
|
||||
}
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
from.value = val.text;
|
||||
from.hplx = val.value;
|
||||
}
|
||||
const checkCList = [
|
||||
{ label: "车牌", value: "plateNum" },
|
||||
// { label: "车辆识别码", value: "plateCode" },
|
||||
];
|
||||
const cCheckFlag = ref("plateNum");
|
||||
function getCItem(item, index) {
|
||||
cCheckFlag.value = item.value;
|
||||
console.log(D_BZ_HPZL.value);
|
||||
}
|
||||
// 弹出层数据
|
||||
const columns = ref(["测试1", "测试2", "测试3"]);
|
||||
const isShowCommonPicker = ref(false);
|
||||
onUnmounted(()=>{
|
||||
emitter.off('closeCarJp')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.input-number {
|
||||
height: 7vh;
|
||||
// line-height: 6vh;
|
||||
overflow: hidden;
|
||||
margin: 10px 5vw 0;
|
||||
text-align: center;
|
||||
|
||||
// border-radius: 5px;
|
||||
// border: 1px rgb(81, 81, 81) solid;
|
||||
.p_div {
|
||||
background-color: #f5f5f5;
|
||||
height: 7vh;
|
||||
line-height: 7vh;
|
||||
width: 12%;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-left: 1px #e5e5e5 solid;
|
||||
border-top: 1px #e5e5e5 solid;
|
||||
border-bottom: 1px #e5e5e5 solid;
|
||||
background: #f5f5f5;
|
||||
// border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.p_div:nth-child(8) {
|
||||
border: 1px #e5e5e5 solid;
|
||||
}
|
||||
|
||||
.add-number {
|
||||
width: 52px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #1143ca;
|
||||
border: 1px solid #1143ca;
|
||||
}
|
||||
|
||||
.p_div.current {
|
||||
border: 1px solid #66aef6;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.plateNum {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
margin: 0 5vw;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.plateNum .van-cell {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.footBtn {
|
||||
margin: 10px 5vw;
|
||||
|
||||
.toolsTip {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
// transform: scale(.9);
|
||||
margin: 1vw 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,210 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘人 -->
|
||||
<van-popup v-model:show="peoplePopupShow" round :style="{ width: '90%' }" close-icon="close" :overlay="true"
|
||||
@close="handleClose">
|
||||
<div class="checkPeoplePopup">
|
||||
<div class="select-box">
|
||||
<div class="item-boxs" v-for="(item, index) in checkPList" :key="index" @click="pCheckFlag = item.value">
|
||||
<span :class="pCheckFlag === item.value ? 'checkText' : ''">{{ item.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field class="border" v-model="form.sfzh" placeholder="请输入身份证号" v-if="pCheckFlag === 'sfzh'"
|
||||
right-icon="photograph" @click-right-icon="handleOCR" :rules="sfzhRuls">
|
||||
</van-field>
|
||||
<van-field class="border" v-model="form.value" placeholder="请输入手机号" right-icon="graphic"
|
||||
v-if="pCheckFlag === 'phoneNum'" :rules="dhhmRuls">
|
||||
</van-field>
|
||||
<div class="photo" v-if="pCheckFlag === 'photo'" @click="takePhoto">
|
||||
<img :src="require('../../../assets/images/new/photoin.png')" alt="" width="100" height="100" />
|
||||
<span>开始拍照</span>
|
||||
</div>
|
||||
<div class="footBtn" v-if="pCheckFlag != 'photo'">
|
||||
<van-button native-type="submit" type="primary" round block>查询</van-button>
|
||||
</div>
|
||||
<div class="toolsTip">请根据工作需求使用功能,您的每次查询将记录日志!</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</van-popup>
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="columns" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineExpose } from "vue";
|
||||
import { Toast } from "vant";
|
||||
import { useRouter } from "vue-router";
|
||||
import { IdCardValidator, phoneValidator } from "../../../utils/rules.js"
|
||||
import { login } from "@/api/user.js";
|
||||
const props = defineProps({ zlId: String });
|
||||
const router = useRouter();
|
||||
const peoplePopupShow = ref(false);
|
||||
const form = ref({
|
||||
sfzh: "",
|
||||
lxdh: "",
|
||||
});
|
||||
const pCheckFlag = ref("sfzh");
|
||||
// 弹出层数据
|
||||
const columns = ref(["测试1", "测试2", "测试3"]);
|
||||
const checkPList = [
|
||||
{ label: "身份证", value: "sfzh" },
|
||||
{ label: "手机号", value: "phoneNum" },
|
||||
{ label: "人像", value: "photo" },
|
||||
];// 盘人弹框按钮List
|
||||
const isShowCommonPicker = ref(false);
|
||||
const sfzhRuls = ref([
|
||||
{ required: true, message: '身份证号码不能为空', trigger: 'onChange/onBlur' },
|
||||
{ validator: (value) => { return IdCardValidator(value) }, trigger: 'onChange/onBlur' }
|
||||
])
|
||||
const dhhmRuls = ref([
|
||||
{ required: true, message: '电话号码不能为空', trigger: 'onChange/onBlur' },
|
||||
{ validator: (value) => { return phoneValidator(value) }, trigger: 'onChange/onBlur' }
|
||||
])
|
||||
|
||||
// 打开弹窗
|
||||
function handleOpen() {
|
||||
peoplePopupShow.value = true;
|
||||
window.addEventListener("message", receivePost);
|
||||
}
|
||||
function handleClose() {
|
||||
peoplePopupShow.value = false
|
||||
window.removeEventListener("message", receivePost);
|
||||
}
|
||||
|
||||
// 处理人OCR
|
||||
function handleOCR() {
|
||||
try {
|
||||
window.bridge.openOcrDiscern();
|
||||
} catch (error) { }
|
||||
}
|
||||
//接收postMessage消息
|
||||
function receivePost(mes) {
|
||||
var str = "";
|
||||
try {
|
||||
str = mes.data.type;
|
||||
} catch (error) { }
|
||||
|
||||
switch (str) {
|
||||
case 'PHOTO':
|
||||
try {
|
||||
if (mes.data.data) {
|
||||
let str = mes.data.data
|
||||
router.push({ path: "/peopleList", query: { info: str, pcsrlx: "5" } });
|
||||
} else {
|
||||
Toast.fail("人像识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
break;
|
||||
case "sfzh":
|
||||
try {
|
||||
if (mes.data.data) {
|
||||
let info = JSON.parse(mes.data.data)
|
||||
localStorage.setItem('OCR', mes.data.data)
|
||||
let data = { sfzh: info.num, pcsrlx: 7, zlId: props.zlId }
|
||||
router.push({ path: "/quarantinePersonnel", query: data });
|
||||
} else {
|
||||
Toast.fail("OCR识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
break;
|
||||
case "NFC":
|
||||
try {
|
||||
if (mes.data.data) {
|
||||
let obj = mes.data.data
|
||||
let data = { sfzh: obj.data.sfzh, pcsrlx: 1, zlId: props.zlId }
|
||||
window.localStorage.setItem("NFC", JSON.stringify(mes.data.data));
|
||||
router.push({ path: "/quarantinePersonnel", query: data });
|
||||
} else {
|
||||
Toast.fail("NFC识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 人像
|
||||
function takePhoto() {
|
||||
try {
|
||||
bridge.pZ('pz_system_rxsb_yk')
|
||||
} catch (error) { }
|
||||
}
|
||||
|
||||
// 盘人提交按钮
|
||||
function onSubmit(values) {
|
||||
switch (pCheckFlag.value) {
|
||||
case "sfzh":
|
||||
let data = { sfzh: form.value.sfzh, pcsrlx: "2", zlId: props.zlId }
|
||||
localStorage.setItem('NFC', JSON.stringify(data))
|
||||
router.push({ path: "/quarantinePersonnel", query: data });
|
||||
break;
|
||||
case "phoneNum":
|
||||
let prams = { dhhm: form.value.value, isPc: 1, pcsrlx: "6" }
|
||||
router.push({ path: "/yyzx/dhcr", query: prams });
|
||||
break;
|
||||
}
|
||||
peoplePopupShow.value = false;
|
||||
}
|
||||
|
||||
defineExpose({ handleOpen });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.item-boxs {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.sub-btn {
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 1px solid #ccc;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.photo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-bottom: 4vh;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
text-align: center;
|
||||
line-height: 2em;
|
||||
color: #ec6b2b;
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
font-family: PingFang SC;
|
||||
}
|
||||
}
|
||||
|
||||
.footBtn {
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-form {
|
||||
width: 83%;
|
||||
}
|
||||
|
||||
::v-deep .van-uploader__wrapper {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.toolsTip {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
margin: 2vw 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@ -1,210 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘人 -->
|
||||
<!-- <van-popup v-model:show="peoplePopupShow" round :style="{ width: '90%' }" close-icon="close" :overlay="true"
|
||||
@close="handleClose"> -->
|
||||
<div class="checkPeoplePopup">
|
||||
<!-- <div class="select-box">
|
||||
<div class="item-boxs" v-for="(item, index) in checkPList" :key="index" @click="pCheckFlag = item.value">
|
||||
<span :class="pCheckFlag === item.value ? 'checkText' : ''">{{ item.label }}</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content-box">
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field class="border" v-model="form.sfzh" placeholder="请输入身份证号" v-if="pCheckFlag === 'sfzh'"
|
||||
right-icon="photograph" @click-right-icon="handleOCR" :rules="sfzhRuls">
|
||||
</van-field>
|
||||
<van-field class="border" v-model="form.value" placeholder="请输入手机号" right-icon="graphic"
|
||||
v-if="pCheckFlag === 'phoneNum'" :rules="dhhmRuls">
|
||||
</van-field>
|
||||
<div class="photo" v-if="pCheckFlag === 'photo'" @click="takePhoto">
|
||||
<img :src="require('../../../assets/images/new/photoin.png')" alt="" width="100" height="100" />
|
||||
<span>开始拍照</span>
|
||||
</div>
|
||||
<div class="footBtn" v-if="pCheckFlag != 'photo'">
|
||||
<van-button native-type="submit" type="primary" round block>查询</van-button>
|
||||
</div>
|
||||
<div class="toolsTip">请根据工作需求使用功能,您的每次查询将记录日志!</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- </van-popup> -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="columns" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineExpose } from "vue";
|
||||
import { Toast } from "vant";
|
||||
import { useRouter } from "vue-router";
|
||||
import { IdCardValidator, phoneValidator } from "../../../utils/rules.js"
|
||||
import { login } from "@/api/user.js";
|
||||
const props = defineProps({ zlId: String });
|
||||
const router = useRouter();
|
||||
const peoplePopupShow = ref(false);
|
||||
const form = ref({
|
||||
sfzh: "",
|
||||
lxdh: "",
|
||||
});
|
||||
const pCheckFlag = ref("sfzh");
|
||||
// 弹出层数据
|
||||
const columns = ref(["测试1", "测试2", "测试3"]);
|
||||
const checkPList = [
|
||||
{ label: "身份证", value: "sfzh" },
|
||||
// { label: "手机号", value: "phoneNum" },
|
||||
// { label: "人像", value: "photo" },
|
||||
];// 盘人弹框按钮List
|
||||
const isShowCommonPicker = ref(false);
|
||||
const sfzhRuls = ref([
|
||||
{ required: true, message: '身份证号码不能为空', trigger: 'onChange/onBlur' },
|
||||
{ validator: (value) => { return IdCardValidator(value) }, trigger: 'onChange/onBlur' }
|
||||
])
|
||||
const dhhmRuls = ref([
|
||||
{ required: true, message: '电话号码不能为空', trigger: 'onChange/onBlur' },
|
||||
{ validator: (value) => { return phoneValidator(value) }, trigger: 'onChange/onBlur' }
|
||||
])
|
||||
|
||||
// 打开弹窗
|
||||
function handleOpen() {
|
||||
peoplePopupShow.value = true;
|
||||
window.addEventListener("message", receivePost);
|
||||
}
|
||||
function handleClose() {
|
||||
peoplePopupShow.value = false
|
||||
window.removeEventListener("message", receivePost);
|
||||
}
|
||||
|
||||
// 处理人OCR
|
||||
function handleOCR() {
|
||||
try {
|
||||
window.bridge.openOcrDiscern();
|
||||
} catch (error) { }
|
||||
}
|
||||
//接收postMessage消息
|
||||
function receivePost(mes) {
|
||||
var str = "";
|
||||
try {
|
||||
str = mes.data.type;
|
||||
} catch (error) { }
|
||||
|
||||
switch (str) {
|
||||
case 'PHOTO':
|
||||
try {
|
||||
if (mes.data.data) {
|
||||
let str = mes.data.data
|
||||
router.push({ path: "/peopleList", query: { info: str, pcsrlx: "5" } });
|
||||
} else {
|
||||
Toast.fail("人像识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
break;
|
||||
case "sfzh":
|
||||
try {
|
||||
if (mes.data.data) {
|
||||
let info = JSON.parse(mes.data.data)
|
||||
localStorage.setItem('OCR', mes.data.data)
|
||||
let data = { sfzh: info.num, pcsrlx: 7, zlId: props.zlId }
|
||||
router.push({ path: "/quarantinePersonnel", query: data });
|
||||
} else {
|
||||
Toast.fail("OCR识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
break;
|
||||
case "NFC":
|
||||
try {
|
||||
if (mes.data.data) {
|
||||
let obj = mes.data.data
|
||||
let data = { sfzh: obj.data.sfzh, pcsrlx: 1, zlId: props.zlId }
|
||||
window.localStorage.setItem("NFC", JSON.stringify(mes.data.data));
|
||||
router.push({ path: "/quarantinePersonnel", query: data });
|
||||
} else {
|
||||
Toast.fail("NFC识别失败");
|
||||
}
|
||||
} catch (error) { }
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 人像
|
||||
function takePhoto() {
|
||||
try {
|
||||
bridge.pZ('pz_system_rxsb_yk')
|
||||
} catch (error) { }
|
||||
}
|
||||
|
||||
// 盘人提交按钮
|
||||
function onSubmit(values) {
|
||||
switch (pCheckFlag.value) {
|
||||
case "sfzh":
|
||||
let data = { sfzh: form.value.sfzh, pcsrlx: "2", zlId: props.zlId }
|
||||
localStorage.setItem('NFC', JSON.stringify(data))
|
||||
router.push({ path: "/quarantinePersonnel", query: data });
|
||||
break;
|
||||
case "phoneNum":
|
||||
let prams = { dhhm: form.value.value, isPc: 1, pcsrlx: "6" }
|
||||
router.push({ path: "/yyzx/dhcr", query: prams });
|
||||
break;
|
||||
}
|
||||
peoplePopupShow.value = false;
|
||||
}
|
||||
|
||||
defineExpose({ handleOpen });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.item-boxs {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.sub-btn {
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 1px solid #ccc;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.photo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-bottom: 4vh;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
text-align: center;
|
||||
line-height: 2em;
|
||||
color: #ec6b2b;
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
font-family: PingFang SC;
|
||||
}
|
||||
}
|
||||
|
||||
.footBtn {
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-form {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
::v-deep .van-uploader__wrapper {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.toolsTip {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
margin: 2vw 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@ -1,125 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav navTitle="人员列表" :showRight="false" :showLeft="true" />
|
||||
<ul class="people-box">
|
||||
<li class="people-item boxItem" v-for="(item, index) in dataList" @click="lookDetail(item)" :key="index">
|
||||
<div class="text">相似度{{ item.xsd }}%</div>
|
||||
<div class="item-left">
|
||||
<van-image @click.stop="ImagePreview([item.baseUrl])" :src="item.baseUrl">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div class="item-right">
|
||||
<div class="info">姓名 :{{ item.xm }}</div>
|
||||
<div class="info">性别 :{{ item.xbdm == "1" ? "男" : "女" }}</div>
|
||||
<div class="info">出生日期 :{{ item.csrq }}</div>
|
||||
<div class="info">身份证号 :{{ item.sfzh }}</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "peopleList",
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { selectRx } from "../../../api/common.js";
|
||||
import { ImagePreview } from "vant";
|
||||
import { hintToast, getBase64 } from "../../../utils/tools.js";
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const dataList = ref([]);
|
||||
onMounted(() => {
|
||||
let str = route.query.info;
|
||||
let data = new FormData();
|
||||
data.append("base64Str", str);
|
||||
selectRx(data).then((res) => {
|
||||
if (res && res.length > 0) {
|
||||
dataList.value = res.slice(0, 10);
|
||||
dataList.value.forEach((item) => {
|
||||
getBase64((url) => {
|
||||
item.baseUrl = url;
|
||||
}, item.url);
|
||||
});
|
||||
} else {
|
||||
hintToast("未查到人员信息");
|
||||
}
|
||||
});
|
||||
});
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => {
|
||||
item.baseUrl = res;
|
||||
}, item.url);
|
||||
}
|
||||
// 查看详情
|
||||
function lookDetail(item) {
|
||||
router.push({
|
||||
path: "/quarantinePersonnel",
|
||||
query: { sfzh: item.sfzh, pcsrlx: "5" },
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.people-box {
|
||||
padding: 4vw;
|
||||
box-sizing: border-box;
|
||||
|
||||
.people-item {
|
||||
display: flex;
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 2vw;
|
||||
border-radius: 1vw;
|
||||
margin-bottom: 2vw;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.text {
|
||||
position: absolute;
|
||||
right: -21px;
|
||||
top: 17px;
|
||||
width: 106px;
|
||||
text-align: center;
|
||||
height: 22px;
|
||||
line-height: 24px;
|
||||
background: red;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
transform: rotate(42deg);
|
||||
}
|
||||
|
||||
.item-left {
|
||||
width: 22vw;
|
||||
margin-right: 2vw;
|
||||
text-align: center;
|
||||
|
||||
::v-deep .van-image {
|
||||
width: 22vw;
|
||||
max-height: 27vw;
|
||||
|
||||
img {
|
||||
width: 22vw;
|
||||
max-height: 27vw;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.item-right {
|
||||
flex: 1;
|
||||
|
||||
.info {
|
||||
line-height: 7vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,95 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘人 -->
|
||||
<van-popup v-model:show="peoplePopupShow" round :style="{ width: '90%' }" teleport="body" close-icon="close" :overlay="true"
|
||||
@close="handleClose">
|
||||
<van-tabs v-model:active="active" @change="tabChange">
|
||||
<van-tab title="盘人">
|
||||
<CheckPeople />
|
||||
</van-tab>
|
||||
<van-tab title="盘车">
|
||||
<CheckCar />
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, defineExpose } from "vue";
|
||||
import { Toast } from "vant";
|
||||
import { useRouter } from "vue-router";
|
||||
import CheckCar from "./checkCarNew.vue";
|
||||
import CheckPeople from "./checkPeopleNew.vue";
|
||||
import { login } from "@/api/user.js";
|
||||
import emitter from "@/utils/eventBus";
|
||||
const props = defineProps({ zlId: String });
|
||||
const router = useRouter();
|
||||
const peoplePopupShow = ref(false);
|
||||
const active=ref('0')
|
||||
// 打开弹窗
|
||||
function handleOpen() {
|
||||
peoplePopupShow.value = true;
|
||||
}
|
||||
function handleClose() {
|
||||
peoplePopupShow.value = false
|
||||
}
|
||||
const tabChange=()=>{
|
||||
emitter.emit('closeCarJp',false)
|
||||
}
|
||||
|
||||
defineExpose({ handleOpen });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.item-boxs {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.sub-btn {
|
||||
@include font_size($font_medium);
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 1px solid #ccc;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.photo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-bottom: 4vh;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
text-align: center;
|
||||
line-height: 2em;
|
||||
color: #ec6b2b;
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
font-family: PingFang SC;
|
||||
}
|
||||
}
|
||||
|
||||
.footBtn {
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-form {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
::v-deep .van-uploader__wrapper {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.toolsTip {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
margin: 2vw 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@ -1,94 +0,0 @@
|
||||
<script setup>
|
||||
import { qcckPost, qcckGet } from "@/api/qcckApi";
|
||||
const props = defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => []
|
||||
},
|
||||
showReceive: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(["click", "claim"]);
|
||||
|
||||
const handleClockInPage = (item) => {
|
||||
emits("click", item);
|
||||
}
|
||||
|
||||
const handleClaim = (item) => {
|
||||
qcckGet({ fgrwid: item.id }, "/mosty-yjzl/tbZdyrw/getLqrw").then(res => {
|
||||
if (res) {
|
||||
emits("claim", item);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="item-wrapper">
|
||||
<template v-for="(item, index) in list" :key="index">
|
||||
<div class="card" @click="handleClockInPage(item)">
|
||||
<div class="title">{{ item.fgRwmc }}</div>
|
||||
<div class="row">
|
||||
<div class="col">方格编号:{{ item.fgmc }}</div>
|
||||
<div class="col right">任务日期:{{ item?.xfrq }}</div>
|
||||
</div>
|
||||
<div class="btn" v-if="showReceive" @click.stop="handleClaim(item)">领取</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.item-wrapper {
|
||||
padding: 3vw;
|
||||
|
||||
.card {
|
||||
background: #fff;
|
||||
border-radius: 3.73vw;
|
||||
padding: 4vw;
|
||||
margin-bottom: 3vw;
|
||||
box-shadow: 0 1.6vw 4vw rgba(0, 0, 0, 0.04);
|
||||
|
||||
.title {
|
||||
font-size: 4vw;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 3vw;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 4vw;
|
||||
font-size: 3.4vw;
|
||||
color: #999;
|
||||
|
||||
.col {
|
||||
&.right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 11vw;
|
||||
line-height: 11vw;
|
||||
text-align: center;
|
||||
border-radius: 6vw;
|
||||
color: #ffffff;
|
||||
background: linear-gradient(90deg, #28A5FF 0%, #3E6EE8 100%);
|
||||
font-size: 4vw;
|
||||
box-shadow: 0 2vw 4vw rgba(62, 110, 232, 0.3);
|
||||
|
||||
&.disabled {
|
||||
background: #ccc;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,377 +0,0 @@
|
||||
<script setup>
|
||||
import TopNav from "@/components/topNav.vue";
|
||||
import { qcckPost, qcckGet } from "@/api/qcckApi";
|
||||
import { onMounted, ref, reactive, onUnmounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { selectByTaskInfo } from "@/api/patrolList";
|
||||
import { getBase64, hintToast } from "@/utils/tools";
|
||||
import { ImagePreview } from "vant";
|
||||
import MapWrapper from "@/pages/clockInPage/components/mapWrapper.vue";
|
||||
import emitter from "@/utils/eventBus";
|
||||
|
||||
const route = useRoute();
|
||||
const info = ref({});
|
||||
const pointsList = ref([]);
|
||||
const listQuery = ref({
|
||||
dktp: "",
|
||||
jd: "",
|
||||
wd: "",
|
||||
});
|
||||
const zxdksj = ref("");
|
||||
const dwIndex = ref();
|
||||
const imageMap = new Map();
|
||||
const getImageUrl = async (fileId) => {
|
||||
if (!fileId) return null;
|
||||
if (imageMap.has(fileId)) return imageMap.get(fileId);
|
||||
const res = await qcckGet({}, `/mosty-base/minio/file/download/${fileId}`);
|
||||
if (res?.url) {
|
||||
const base64 = await getBase64("", res.url);
|
||||
imageMap.set(fileId, base64);
|
||||
return base64;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const getImageUrlOld = (item) => {
|
||||
qcckGet({}, `/mosty-base/minio/file/download/${item}`).then((res) => {
|
||||
console.log(res.url, 'res.url');
|
||||
_getBase64(res.url);
|
||||
});
|
||||
};
|
||||
const preview = (url) => {
|
||||
if (url) ImagePreview([url]);
|
||||
};
|
||||
|
||||
const loadData = async () => {
|
||||
const id = route.query.id || "";
|
||||
const detail = await selectByTaskInfo({ fgrwid: id });
|
||||
if (detail) {
|
||||
getUserLocation();
|
||||
// 删除方格
|
||||
emitter.emit("deletePointArea", "zdxl_fzyc");
|
||||
// 生成方格
|
||||
const { x1, y1, x2, y2, fgId, zxX, zxY, fgMc } = detail.fgdwVO;
|
||||
const centerPoint = [zxX, zxY];
|
||||
const position = [
|
||||
[Number(x1), Number(y1)],
|
||||
[Number(x2), Number(y2)],
|
||||
];
|
||||
const text = fgMc;
|
||||
const obj = [{ position: position, text, id: fgId, userData: detail.bxds }];
|
||||
emitter.emit("echoPlane", {
|
||||
fontColor: "#12fdb8",
|
||||
coords: obj,
|
||||
type: "rectangle",
|
||||
flag: "zdxl_fzyc",
|
||||
color: "rgba(2,20,51,0.5)",
|
||||
linecolor: "#1C97FF",
|
||||
});
|
||||
emitter.emit("setMapCenter", { location: centerPoint, zoomLevel: 12 });
|
||||
// 获取所有唯一的图片ID
|
||||
const uniqueImageIds = new Set();
|
||||
detail.bxds?.forEach((item) => {
|
||||
if (item?.dktp) uniqueImageIds.add(item.dktp);
|
||||
});
|
||||
// 批量获取图片URL
|
||||
const imageEntries = await Promise.allSettled(
|
||||
Array.from(uniqueImageIds).map(async (id) => {
|
||||
try {
|
||||
const url = await getImageUrl(id);
|
||||
return { id, url };
|
||||
} catch (error) {
|
||||
return { id, url: null };
|
||||
}
|
||||
})
|
||||
);
|
||||
// 创建图片映射表
|
||||
const imageMap = new Map();
|
||||
imageEntries.forEach((entry) => {
|
||||
if (entry.status === "fulfilled") {
|
||||
imageMap.set(entry.value.id, entry.value.url);
|
||||
}
|
||||
});
|
||||
// 设置数据
|
||||
pointsList.value = detail.bxds.map((item, index) => ({
|
||||
...item,
|
||||
imgUrlDkFj: item?.dktp ? imageMap.get(item.dktp) : null,
|
||||
}));
|
||||
// 为每个必到点添加图片URL
|
||||
zxdksj.value = detail.zxdksj;
|
||||
info.value = detail.fgrw;
|
||||
listQuery.value.fgrwid = info.value.id;
|
||||
}
|
||||
};
|
||||
//获取当前位置信息
|
||||
function getUserLocation(sfdw) {
|
||||
let { lng, lat } = getLocation();
|
||||
if (lng && lat) {
|
||||
emitter.emit("deletePointArea", "dw");
|
||||
//地图撒点然后移动
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: lng, wd: lat }],
|
||||
icon: require("../../assets/lz/dw.png"),
|
||||
flag: "dw",
|
||||
sfdw: sfdw,
|
||||
sizeX: 30,
|
||||
sizeY: 35,
|
||||
});
|
||||
} else {
|
||||
hintToast("暂无坐标信息");
|
||||
}
|
||||
}
|
||||
function isInThirtyMinutes(targetTime, jgsj) {
|
||||
let flag = false
|
||||
// 获取当前时间
|
||||
const now = new Date();
|
||||
// 最新打卡时间
|
||||
const targetDate = new Date(targetTime);
|
||||
let nowMin = now.getTime();//当前时间
|
||||
let newMin = targetDate.getTime();//最新打卡时间
|
||||
let count = nowMin - newMin;
|
||||
if (count > jgsj * 60 * 1000) {
|
||||
flag = true
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
return flag
|
||||
}
|
||||
// 点击上传
|
||||
const photoFn = (val, index) => {
|
||||
dwIndex.value = index;
|
||||
listQuery.value.bxdid = val.bxdid;
|
||||
// 判断此任务最新打卡时间如果在打卡间隔时间之后才能继续打卡
|
||||
if (zxdksj.value) {
|
||||
if (!isInThirtyMinutes(zxdksj.value, info.value.dkjgsj)) {
|
||||
const nowtime = new Date();
|
||||
const time1 = new Date(zxdksj.value);//最新打卡时间
|
||||
let newMin = time1.getTime() + Number(info.value.dkjgsj) * 60 * 1000;//30分钟后的时间
|
||||
let max = Math.floor((newMin - nowtime.getTime()) / 1000 / 60);//最大可打卡时间
|
||||
hintToast(`请于${max}分钟后打卡`);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
bridge.pZ("photo");
|
||||
} catch (err) {
|
||||
console.log(err, "err");
|
||||
}
|
||||
// handleClick()
|
||||
} else {
|
||||
try {
|
||||
bridge.pZ("photo");
|
||||
} catch (err) {
|
||||
console.log(err, "err");
|
||||
}
|
||||
// handleClick()
|
||||
}
|
||||
};
|
||||
// 打卡
|
||||
const handleClick = () => {
|
||||
const { lng, lat } = getLocation();
|
||||
listQuery.value.jd = lng;
|
||||
listQuery.value.wd = lat;
|
||||
qcckPost(listQuery.value, "/mosty-yjzl/tbZdyrw/zdyRwdk")
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
hintToast(`打卡成功`);
|
||||
loadData()
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, "err");
|
||||
hintToast("打卡失败");
|
||||
loadData()
|
||||
});
|
||||
};
|
||||
function setimage_base64(pzid, base64) {
|
||||
pointsList.value[dwIndex.value].imgUrlDkFj = `data:image/jpeg;base64,${base64}`;
|
||||
qcckPost({ base64: base64 }, "/mosty-base/minio/image/upload/base64").then(
|
||||
(res) => {
|
||||
listQuery.value.dktp = res;
|
||||
handleClick();
|
||||
},
|
||||
);
|
||||
}
|
||||
onMounted(async () => {
|
||||
await loadData();
|
||||
window.setimagebase64 = setimage_base64;
|
||||
setInterval(() => {
|
||||
getUserLocation()
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
emitter.emit("deletePointArea", "historyPoints");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<TopNav nav-title="任务详情" show-left />
|
||||
<div class="content">
|
||||
<!-- Header Card -->
|
||||
<div class="card header-card">
|
||||
<div class="title">{{ info.fgRwmc }}</div>
|
||||
<div class="row info-row">
|
||||
<div class="sub">方格编号:{{ info.fgmc }}</div>
|
||||
<div class="sub">任务日期:{{ info.xfrq }}</div>
|
||||
</div>
|
||||
<div class="sub">
|
||||
打卡间隔时间:{{ info.dkjgsj ? info.dkjgsj : "100min" }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Point List -->
|
||||
<div class="list">
|
||||
<div v-for="(item, index) in pointsList" :key="index" class="card point-card">
|
||||
<div class="row header-row">
|
||||
<div class="name">{{ item.bxdMc }}</div>
|
||||
<div class="status-tag">{{ item.dkzt }}</div>
|
||||
</div>
|
||||
<!-- Checked In: Show Image -->
|
||||
<div v-if="item.imgUrlDkFj" class="img-container" @click="preview(item.imgUrlDkFj)">
|
||||
<img :src="item.imgUrlDkFj" alt="打卡图片" />
|
||||
<div class="time-overlay">{{ item.dksj }}</div>
|
||||
</div>
|
||||
<!-- Not Checked In: Show Button (Visual only) -->
|
||||
<div v-else class="btn-container">
|
||||
<div class="btn" @click="photoFn(item, index)">打卡拍照</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Map Section -->
|
||||
<div class="card map-card">
|
||||
<div class="map-title">当前位置</div>
|
||||
<div class="map-box">
|
||||
<MapWrapper />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page-container {
|
||||
min-height: 100vh;
|
||||
background: #f5f7fa;
|
||||
padding-bottom: 5vw;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16vw 3vw 5vw; // Top padding for fixed nav
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #fff;
|
||||
border-radius: 3.73vw;
|
||||
padding: 4vw;
|
||||
margin-bottom: 3vw;
|
||||
box-shadow: 0 1.6vw 4vw rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.header-card {
|
||||
.title {
|
||||
font-size: 4.2vw;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 3vw;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 1.5vw;
|
||||
}
|
||||
|
||||
.sub {
|
||||
font-size: 3.4vw;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.point-card {
|
||||
.header-row {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-bottom: 3vw;
|
||||
|
||||
.name {
|
||||
font-size: 4vw;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-right: 2vw;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
font-size: 3vw;
|
||||
color: #3e6ee8;
|
||||
border: 1px solid #3e6ee8;
|
||||
padding: 0.5vw 1.5vw;
|
||||
border-radius: 1vw;
|
||||
}
|
||||
}
|
||||
|
||||
.img-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 40vw;
|
||||
border-radius: 2vw;
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.time-overlay {
|
||||
position: absolute;
|
||||
top: 2vw;
|
||||
left: 2vw;
|
||||
color: #fff;
|
||||
font-size: 3.5vw;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-container {
|
||||
margin-top: 2vw;
|
||||
|
||||
.btn {
|
||||
height: 11vw;
|
||||
line-height: 11vw;
|
||||
text-align: center;
|
||||
border-radius: 6vw;
|
||||
color: #ffffff;
|
||||
background: linear-gradient(90deg, #28a5ff 0%, #3e6ee8 100%);
|
||||
font-size: 4vw;
|
||||
box-shadow: 0 2vw 4vw rgba(62, 110, 232, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.map-card {
|
||||
padding: 0; // Remove default padding for map card to let map fill or have custom padding
|
||||
overflow: hidden;
|
||||
|
||||
.map-title {
|
||||
padding: 4vw;
|
||||
font-size: 4vw;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.map-box {
|
||||
height: 50vw;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
// Adjust MapWrapper internal style via deep selector if needed,
|
||||
// but MapWrapper has fixed height in its scoped style usually.
|
||||
// We might need to override it.
|
||||
:deep(.mapWrapper) {
|
||||
margin-top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,708 +0,0 @@
|
||||
<script setup>
|
||||
import TopNav from "@/components/topNav.vue";
|
||||
import {
|
||||
onMounted,
|
||||
reactive,
|
||||
ref,
|
||||
computed,
|
||||
nextTick,
|
||||
onUnmounted,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import Timeline from "@/pages/clockInPage/components/Timeline.vue";
|
||||
import {
|
||||
selectByTaskInfo,
|
||||
fetchSelectByBddxlrwId,
|
||||
fetchSelectListByBddxlrwId,
|
||||
fetchTbZdxlFgdwBddxlrwJlClockIn,
|
||||
} from "@/api/patrolList";
|
||||
import { getBase64, hintToast } from "@/utils/tools";
|
||||
import { ImagePreview } from "vant";
|
||||
import { qcckPost, qcckGet } from "@/api/qcckApi";
|
||||
import MapWrapper from "@/pages/clockInPage/components/mapWrapper.vue";
|
||||
import emitter from "@/utils/eventBus";
|
||||
|
||||
const route = useRoute();
|
||||
const active = ref(0);
|
||||
const nextStep = ref(0);
|
||||
const baseUrl = ref("");
|
||||
const fileId = ref("");
|
||||
const startTime = ref("2025-09-18 18:15:00");
|
||||
const useCountdownFromTime = () => {
|
||||
const timeLeft = ref(0); // 剩余毫秒数
|
||||
const timer = ref(null);
|
||||
const isRunning = ref(false); // 是否运行中
|
||||
const isExpired = ref(false); // 是否过期
|
||||
const expirationTime = ref(null); // 过期时间
|
||||
// 计算过期时间
|
||||
const calculateExpirationTime = (time, minutes = 10) => {
|
||||
if (!time) return null;
|
||||
try {
|
||||
const startDate = new Date(time);
|
||||
if (isNaN(startDate.getTime())) return null;
|
||||
return new Date(startDate.getTime() + minutes * 60000);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
// 更新倒计时
|
||||
const update = () => {
|
||||
if (!expirationTime.value) {
|
||||
isExpired.value = true;
|
||||
isRunning.value = false;
|
||||
return;
|
||||
}
|
||||
const now = new Date();
|
||||
timeLeft.value = expirationTime.value - now;
|
||||
if (timeLeft.value <= 0) {
|
||||
timeLeft.value = 0;
|
||||
isExpired.value = true;
|
||||
isRunning.value = false;
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
if (timeLeft.value > 0) {
|
||||
timer.value = setTimeout(update, 1000);
|
||||
}
|
||||
};
|
||||
// 开始倒计时
|
||||
const start = (startTime, minutes) => {
|
||||
stop();
|
||||
expirationTime.value = calculateExpirationTime(startTime, minutes);
|
||||
|
||||
if (!expirationTime.value) {
|
||||
isExpired.value = true;
|
||||
return;
|
||||
}
|
||||
isRunning.value = true;
|
||||
isExpired.value = false;
|
||||
update();
|
||||
};
|
||||
// 停止倒计时
|
||||
const stop = () => {
|
||||
if (timer.value) {
|
||||
clearTimeout(timer.value);
|
||||
timer.value = null;
|
||||
}
|
||||
isRunning.value = false;
|
||||
};
|
||||
// 格式化时间显示
|
||||
const formattedTime = computed(() => {
|
||||
if (timeLeft.value <= 0) return '00:00';
|
||||
const totalSeconds = Math.floor(timeLeft.value / 1000);
|
||||
const mins = Math.floor(totalSeconds / 60);
|
||||
const secs = totalSeconds % 60;
|
||||
return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
||||
});
|
||||
|
||||
// 过期时间显示
|
||||
const expirationTimeFormatted = computed(() => {
|
||||
if (!expirationTime.value) return '';
|
||||
return expirationTime.value.toLocaleTimeString('zh-CN', {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false
|
||||
});
|
||||
});
|
||||
// 自动清理
|
||||
onUnmounted(stop);
|
||||
return {
|
||||
timeLeft,
|
||||
formattedTime,
|
||||
expirationTime: expirationTimeFormatted,
|
||||
isRunning,
|
||||
isExpired,
|
||||
start,
|
||||
stop
|
||||
};
|
||||
};
|
||||
|
||||
const data = reactive({
|
||||
patroObj: {},
|
||||
info: [],
|
||||
query: {},
|
||||
});
|
||||
|
||||
const infoData = computed(() => {
|
||||
return data.info?.[nextStep.value];
|
||||
});
|
||||
const activeInfoData = computed(() => data.patroObj?.bxds?.[active.value]);
|
||||
const { formattedTime, isExpired, expirationTime, start, stop } =
|
||||
useCountdownFromTime();
|
||||
// 删除打卡图片
|
||||
const clearImage = () => {
|
||||
baseUrl.value = "";
|
||||
fileId.value = "";
|
||||
};
|
||||
|
||||
// 浏览图片
|
||||
const onClickImg = (url) => {
|
||||
ImagePreview([url]);
|
||||
};
|
||||
|
||||
// 点击上传
|
||||
const photoFn = () => {
|
||||
try {
|
||||
bridge.pZ("photo");
|
||||
} catch (err) {
|
||||
console.log(err, "err");
|
||||
}
|
||||
};
|
||||
|
||||
// 支持更大数字的转换
|
||||
const getChineseNumber = (num) => {
|
||||
const numbers = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"];
|
||||
if (num <= 10) {
|
||||
return numbers[num - 1];
|
||||
} else if (num <= 19) {
|
||||
return `十${numbers[num - 11] || ""}`;
|
||||
} else if (num <= 99) {
|
||||
const tens = Math.floor(num / 10);
|
||||
const units = num % 10;
|
||||
return `${numbers[tens - 1]}十${units > 0 ? numbers[units - 1] : ""}`;
|
||||
} else {
|
||||
return num.toString(); // 超过99返回阿拉伯数字
|
||||
}
|
||||
};
|
||||
// 切换tab
|
||||
const onChange = (value) => {
|
||||
active.value = value;
|
||||
nextStep.value = 0;
|
||||
baseUrl.value = "";
|
||||
fileId.value = "";
|
||||
getData();
|
||||
};
|
||||
|
||||
const handleNext = (index) => {
|
||||
stop();
|
||||
nextStep.value = index;
|
||||
start(infoData?.value?.dkKsSj, activeInfoData.value.dkjgsj);
|
||||
};
|
||||
|
||||
function setimage_base64(pzid, base64) {
|
||||
baseUrl.value = `data:image/jpeg;base64,${base64}`;
|
||||
qcckPost({ base64: base64 }, "/mosty-base/minio/image/upload/base64").then(
|
||||
(res) => {
|
||||
fileId.value = res;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const imageCache = new Map();
|
||||
const getImageUrl = async (fileId) => {
|
||||
if (!fileId) return null;
|
||||
// 检查缓存
|
||||
if (imageCache.has(fileId)) {
|
||||
return imageCache.get(fileId);
|
||||
}
|
||||
try {
|
||||
const res = await qcckGet({}, `/mosty-base/minio/file/download/${fileId}`);
|
||||
if (res?.url) {
|
||||
const base64 = await getBase64("", res.url);
|
||||
// 存入缓存
|
||||
imageCache.set(fileId, base64);
|
||||
return base64;
|
||||
}
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.warn("获取图片失败:", error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
try {
|
||||
const res = await fetchSelectListByBddxlrwId({
|
||||
bddxlrwId: activeInfoData.value.id || "",
|
||||
});
|
||||
if (res && res?.length > 0) {
|
||||
// 获取所有唯一的图片ID
|
||||
const uniqueImageIds = new Set();
|
||||
res?.forEach((item) => {
|
||||
if (item?.dkJsFj) uniqueImageIds.add(item.dkJsFj);
|
||||
if (item?.dkKsFj) uniqueImageIds.add(item.dkKsFj);
|
||||
});
|
||||
// 批量获取图片URL
|
||||
const imageEntries = await Promise.allSettled(
|
||||
Array.from(uniqueImageIds).map(async (id) => {
|
||||
try {
|
||||
const url = await getImageUrl(id);
|
||||
return { id, url };
|
||||
} catch (error) {
|
||||
return { id, url: null };
|
||||
}
|
||||
})
|
||||
);
|
||||
// 创建图片映射表
|
||||
const imageMap = new Map();
|
||||
imageEntries.forEach((entry) => {
|
||||
if (entry.status === "fulfilled") {
|
||||
imageMap.set(entry.value.id, entry.value.url);
|
||||
}
|
||||
});
|
||||
|
||||
// 设置数据
|
||||
data.info = res.map((item, index) => ({
|
||||
...item,
|
||||
count: getChineseNumber(index + 1),
|
||||
imgUrlDkJsFj: item?.dkJsFj ? imageMap.get(item.dkJsFj) : null,
|
||||
imgUrlDkKsFj: item?.dkKsFj ? imageMap.get(item.dkKsFj) : null,
|
||||
}));
|
||||
// 打卡结束经纬度
|
||||
const dkJs = res?.map((i) => ({ jd: i?.dkJsJd, wd: i?.dkJsWd }));
|
||||
// 打卡开始经纬度
|
||||
const dkKs = res?.map((i) => ({ jd: i?.dkKsJd, wd: i?.dkKsWd }));
|
||||
// 删除标注
|
||||
emitter.emit("deletePointArea", "annotationDkKs");
|
||||
//地图撒点然后移动
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [...dkJs, ...dkKs],
|
||||
icon: require("../../assets/images/11.png"),
|
||||
flag: "annotationDkKs",
|
||||
});
|
||||
|
||||
await nextTick(() => {
|
||||
const firstItem = data.info[nextStep.value || 0];
|
||||
if (firstItem?.dkKsSj) {
|
||||
startTime.value = infoData?.value?.dkKsSj;
|
||||
start(startTime.value, activeInfoData.value.dkjgsj);
|
||||
} else {
|
||||
start("");
|
||||
}
|
||||
});
|
||||
}
|
||||
if (activeInfoData.value) {
|
||||
const result = await fetchSelectByBddxlrwId(
|
||||
activeInfoData?.value?.id || ""
|
||||
);
|
||||
if (result) {
|
||||
const { jd, wd } = result;
|
||||
// 删除标注
|
||||
emitter.emit("deletePointArea", "checkPoint");
|
||||
//地图撒点然后移动
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd, wd }],
|
||||
icon: require("../../assets/lz/peoplePolice.png"),
|
||||
flag: "checkPoint",
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
//获取当前位置信息
|
||||
function getUserLocation(sfdw) {
|
||||
let { lng, lat } = getLocation();
|
||||
if (lng && lat) {
|
||||
emitter.emit("deletePointArea", "dw");
|
||||
//地图撒点然后移动
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: lng, wd: lat }],
|
||||
icon: require("../../assets/lz/dw.png"),
|
||||
flag: "dw",
|
||||
sfdw: sfdw,
|
||||
sizeX: 30,
|
||||
sizeY: 35,
|
||||
});
|
||||
} else {
|
||||
hintToast("暂无坐标信息");
|
||||
}
|
||||
}
|
||||
|
||||
const getPatrolList = async ({ id }) => {
|
||||
const res = await selectByTaskInfo({ fgrwid: id });
|
||||
if (res) {
|
||||
getUserLocation();
|
||||
data.patroObj = res;
|
||||
// 删除方格
|
||||
emitter.emit("deletePointArea", "zdxl_fzyc");
|
||||
// 生成方格
|
||||
const { x1, y1, x2, y2, fgId, zxX, zxY, fgMc } = data.patroObj.fgdwVO;
|
||||
const centerPoint = [zxX, zxY];
|
||||
const position = [
|
||||
[Number(x1), Number(y1)],
|
||||
[Number(x2), Number(y2)],
|
||||
];
|
||||
const text = fgMc;
|
||||
const obj = [
|
||||
{ position: position, text, id: fgId, userData: activeInfoData?.value },
|
||||
];
|
||||
emitter.emit("echoPlane", {
|
||||
fontColor: "#12fdb8",
|
||||
coords: obj,
|
||||
type: "rectangle",
|
||||
flag: "zdxl_fzyc",
|
||||
color: "rgba(2,20,51,0.5)",
|
||||
linecolor: "#1C97FF",
|
||||
});
|
||||
emitter.emit("setMapCenter", { location: centerPoint, zoomLevel: 12 });
|
||||
await getData();
|
||||
}
|
||||
};
|
||||
|
||||
// 简单的时间加法函数
|
||||
const addTenMinutes = (timeString) => {
|
||||
if (!timeString) return "";
|
||||
const date = new Date(timeString);
|
||||
if (isNaN(date.getTime())) return "";
|
||||
date.setMinutes(date.getMinutes() + 10);
|
||||
return date
|
||||
.toLocaleString("zh-CN", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit",
|
||||
hour12: false,
|
||||
})
|
||||
.replace(/\//g, "-");
|
||||
};
|
||||
|
||||
// 判断是否超过10分钟
|
||||
const isTenMinutesPassed = (startTime) => {
|
||||
if (!startTime) return false;
|
||||
try {
|
||||
const startDate = new Date(startTime);
|
||||
if (isNaN(startDate.getTime())) return false;
|
||||
// 计算10分钟后的时间
|
||||
const tenMinutesLater = new Date(startDate.getTime() + 10 * 60 * 1000);
|
||||
const now = new Date();
|
||||
// 判断当前时间是否超过10分钟后
|
||||
return now > tenMinutesLater;
|
||||
} catch (error) {
|
||||
console.error("时间判断错误:", error);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// 打卡
|
||||
const handleClick = async () => {
|
||||
if (data.info.length == 0) {
|
||||
hintToast("此方格没有必打卡点位!");
|
||||
return;
|
||||
}
|
||||
const { id } = data.info?.[nextStep.value];
|
||||
if (!isTenMinutesPassed(infoData?.value.dkKsSj) && infoData?.value.dkKsSj) {
|
||||
const newTime = addTenMinutes(infoData?.value.dkKsSj);
|
||||
hintToast(`请于${newTime.split(" ")[1]}后打卡`);
|
||||
return;
|
||||
}
|
||||
if (fileId.value === "") {
|
||||
hintToast("请拍照再打卡");
|
||||
return;
|
||||
}
|
||||
const { lng, lat } = getLocation();
|
||||
try {
|
||||
const res = await fetchTbZdxlFgdwBddxlrwJlClockIn({
|
||||
id,
|
||||
dkWd: lat,
|
||||
dkJd: lng,
|
||||
dkFj: fileId.value,
|
||||
});
|
||||
|
||||
if (res) {
|
||||
hintToast(`打卡成功`);
|
||||
baseUrl.value = ""; //打卡成功需要把图片删除掉
|
||||
fileId.value = "";
|
||||
await getData();
|
||||
start();
|
||||
}
|
||||
} catch (error) {
|
||||
hintToast(`打卡异常`);
|
||||
stop();
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
if (route?.query) {
|
||||
data.query = route?.query;
|
||||
getPatrolList(route?.query);
|
||||
}
|
||||
window.setimagebase64 = setimage_base64;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<top-nav navTitle="打卡" :showLeft="true" />
|
||||
<div class="clockInWrapper">
|
||||
<van-tabs v-model:active="active" @click="onChange">
|
||||
<template v-for="(item, index) in data.patroObj?.bxds" :key="index">
|
||||
<van-tab :title="item.bxdMc" />
|
||||
</template>
|
||||
</van-tabs>
|
||||
<div class="clockInList">
|
||||
<template v-for="(item, index) in data.info" :key="index">
|
||||
<div :class="['clockInList_item', { active: nextStep === index }]" @click="handleNext(index)">
|
||||
<div class="label">{{ `第${item?.count}次打卡` }}</div>
|
||||
<div class="dec">
|
||||
<van-icon v-if="item?.dkKsSj" name="checked" color="#007DE9" />
|
||||
<div>开始</div>
|
||||
<div v-if="item?.dkKsSj" class="time">
|
||||
{{ item?.dkKsSj?.split(" ")[1] }}已打卡
|
||||
</div>
|
||||
</div>
|
||||
<div class="dec">
|
||||
<van-icon v-if="item?.dkJsSj" name="checked" color="#007DE9" />
|
||||
<div>离开</div>
|
||||
<div v-if="item?.dkJsSj" class="time">
|
||||
{{ item?.dkJsSj?.split(" ")[1] }}已打卡
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="upload_box">
|
||||
<div class="image_box" v-if="baseUrl">
|
||||
<van-icon name="close" class="close_icon" @click="clearImage" color="#000" size="24px" />
|
||||
<van-image :src="baseUrl" @click="onClickImg(baseUrl)" style="flex: 1">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div class="upload_icon_box" v-else>
|
||||
<van-icon @click="photoFn" color="#1DB1FF" name="plus" />
|
||||
<span>点击拍照</span>
|
||||
</div>
|
||||
<!-- <van-uploader v-model="clockList" :max-count="1" :after-read="afterRead" capture="camera"
|
||||
:before-read="beforeRead" accept="image/*" /> -->
|
||||
<div class="upload_tip">
|
||||
<span style="color: red">*</span>须拍摄实景图才可进行打卡
|
||||
</div>
|
||||
</div>
|
||||
<div class="clockWrapper">
|
||||
<div v-if="!infoData?.dkJsSj || !infoData?.dkKsSj" class="circleWrapper" :class="{
|
||||
disabled: (!isExpired && expirationTime) || infoData?.dkJsSj,
|
||||
}" @click="handleClick">
|
||||
<div v-if="!isExpired && expirationTime" class="time">
|
||||
{{ formattedTime }}后
|
||||
</div>
|
||||
<div class="title">{{ !infoData?.dkKsSj ? `开始` : `离开` }}</div>
|
||||
<div class="info">{{ `第${infoData?.count || ""}次打卡` }}</div>
|
||||
</div>
|
||||
<div v-else class="circleWrapper" :class="{ disabled: (!isExpired && expirationTime) || infoData?.dkJsSj, }">
|
||||
<div class="title">已结束</div>
|
||||
</div>
|
||||
<div class="circleWrapperTip">
|
||||
<van-icon name="success" color="#FFFFFF" />
|
||||
<div>已进入考勤范围:{{ activeInfoData?.bddMc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<timeline v-if="data.info.length > 0" :data="[data.info?.[nextStep]]" />
|
||||
<map-wrapper />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clockInWrapper {
|
||||
margin-top: 13vw;
|
||||
padding: 2vw;
|
||||
|
||||
.clockWrapper {
|
||||
margin-top: 23.47vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.circleWrapperTip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 7.2vw;
|
||||
font-family: PingFang HK, PingFang HK;
|
||||
font-weight: 400;
|
||||
font-size: 3.73vw;
|
||||
color: #707070;
|
||||
|
||||
::v-deep {
|
||||
.van-icon-success {
|
||||
margin-right: 1.33vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 3.73vw;
|
||||
height: 3.73vw;
|
||||
background: #11aa66;
|
||||
border-radius: 13.33vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.circleWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 42.67vw;
|
||||
height: 42.67vw;
|
||||
background: linear-gradient(180deg, #1db1ff 0%, #007de9 100%);
|
||||
border-radius: 26.67vw;
|
||||
color: #fff;
|
||||
font-family: PingFang HK, PingFang HK;
|
||||
|
||||
.time {
|
||||
font-weight: 400;
|
||||
font-size: 4.8vw;
|
||||
margin-bottom: 1.33vw;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 400;
|
||||
font-size: 4.8vw;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-weight: 400;
|
||||
font-size: 3.73vw;
|
||||
margin-top: 1.33vw;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled {
|
||||
background: #ededed !important;
|
||||
color: #75787f !important;
|
||||
}
|
||||
}
|
||||
|
||||
.upload_box {
|
||||
margin-top: 4vw;
|
||||
display: flex;
|
||||
padding-bottom: 4vw;
|
||||
border-bottom: 0.27vw solid #d9d9d9;
|
||||
|
||||
.upload_tip {
|
||||
color: #999999;
|
||||
font-size: 2.67vw;
|
||||
margin-left: 2.67vw;
|
||||
}
|
||||
|
||||
.image_box {
|
||||
position: relative;
|
||||
width: 40vw;
|
||||
height: 24vw;
|
||||
|
||||
.close_icon {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
::v-deep .van-image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.upload_icon_box {
|
||||
font-size: 3.2vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #1db1ff;
|
||||
border: 0.27vw dashed #1db1ff;
|
||||
text-align: center;
|
||||
width: 29.33vw;
|
||||
height: 16.53vw;
|
||||
border-radius: 2.67vw;
|
||||
}
|
||||
}
|
||||
|
||||
.clockInList {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 4vw;
|
||||
overflow-y: auto;
|
||||
|
||||
.clockInList_item {
|
||||
padding: 4vw 2vw;
|
||||
width: 43vw;
|
||||
height: 18vw;
|
||||
background: #ededed;
|
||||
border-radius: 2.67vw;
|
||||
flex-shrink: 0;
|
||||
margin-right: 2.67vw;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: 400;
|
||||
font-size: 4.27vw;
|
||||
}
|
||||
|
||||
.dec {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #75787f;
|
||||
font-size: 3.73vw;
|
||||
margin-top: 1.33vw;
|
||||
|
||||
.van-icon-checked {
|
||||
margin-right: 1.33vw;
|
||||
}
|
||||
|
||||
.time {
|
||||
margin-left: 1.33vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
background: rgba(62, 110, 232, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.van-tabs__nav {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.van-tabs__nav--line {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.van-tabs__line {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.van-tab {
|
||||
flex: initial;
|
||||
font-size: 4vw;
|
||||
width: auto !important;
|
||||
height: 9.33vw;
|
||||
padding: 0 2.67vw;
|
||||
border: 0.27vw solid #ededed;
|
||||
color: #75787f;
|
||||
flex-shrink: 0;
|
||||
border-radius: 2vw;
|
||||
margin-right: 2vw;
|
||||
margin-bottom: 4px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.van-tab--active {
|
||||
background: rgba(62, 110, 232, 0.2);
|
||||
border: 0.27vw solid #3e6ee8;
|
||||
color: #3e6ee8 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,215 +0,0 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import TopNav from "@/components/topNav.vue";
|
||||
import Search from "@/components/search.vue";
|
||||
import PatrolWrapper from "./copmonents/patrolWrapper.vue";
|
||||
import { fetchTaskList } from "@/api/patrolList";
|
||||
import { getDictListByCode } from "@/api/common";
|
||||
import router from "@/router";
|
||||
import SxPopup from "@/components/SxPopup.vue";
|
||||
import SelectTime from "@/components/SelectTime.vue";
|
||||
import { hintToast } from "@/utils/tools";
|
||||
const tabsIndex = ref(1);
|
||||
const showPopup = ref(false);
|
||||
const timeShow = ref(false);
|
||||
const finished = ref(false);
|
||||
const loading = ref(false);
|
||||
const loadingRefresh = ref(false);
|
||||
const searchValue = ref("")
|
||||
const pageData = reactive({
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
})
|
||||
|
||||
const data = reactive({
|
||||
list: [],
|
||||
dictList: [],
|
||||
startTime: '',
|
||||
appRwlx: '01',//app任务类型 01当日任务 02历史任务
|
||||
})
|
||||
|
||||
const onSearch = () => {
|
||||
loading.value = true;
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = []
|
||||
getData()
|
||||
}
|
||||
|
||||
const onRefresh = () => {
|
||||
tabsIndex.value++;
|
||||
loading.value = false;
|
||||
loadingRefresh.value = true;
|
||||
finished.value = false;
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = []
|
||||
getData()
|
||||
}
|
||||
|
||||
const onLoad = () => {
|
||||
if (data.list.length >= pageData?.total) {
|
||||
finished.value = true;
|
||||
return
|
||||
}
|
||||
pageData.pageCurrent++
|
||||
getData()
|
||||
}
|
||||
|
||||
const handleClaim = (item) => {
|
||||
hintToast("领取成功");
|
||||
setTab('history')
|
||||
}
|
||||
|
||||
const handleClockInPage = (item) => {
|
||||
if (activeTab.value === 'history') {
|
||||
router.push({ path: '/taskHistoryDetail', query: { id: item.id, current: pageData.pageCurrent } });
|
||||
}
|
||||
}
|
||||
|
||||
const getData = async () => {
|
||||
const { total, ...ret } = pageData
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await fetchTaskList({ ...ret, fgMc: searchValue.value, rwRq: data.startTime, appRwlx: data.appRwlx })
|
||||
if (res?.records.length > 0) {
|
||||
data.list = data.list.concat(res?.records) || []
|
||||
}
|
||||
pageData.total = res?.total
|
||||
loading.value = false;
|
||||
loadingRefresh.value = false;
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
loadingRefresh.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
const getDictList = async () => {
|
||||
const res = await getDictListByCode({ dictCode: 'D_ZDXL_FGXLRW_YJDJ' })
|
||||
if (res && res?.itemList?.length > 0) {
|
||||
data.dictList = res?.itemList
|
||||
}
|
||||
}
|
||||
const onSelectTime = (val) => {
|
||||
data.startTime = val;
|
||||
timeShow.value = false
|
||||
}
|
||||
|
||||
const onClickTime = () => {
|
||||
timeShow.value = true;
|
||||
}
|
||||
|
||||
const activeTab = ref('today');
|
||||
const setTab = (tab) => {
|
||||
activeTab.value = tab;
|
||||
if (tab === 'today') {
|
||||
data.appRwlx = '01'
|
||||
} else {
|
||||
data.appRwlx = '02'
|
||||
}
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = [];
|
||||
getData();
|
||||
};
|
||||
|
||||
const onConfirm = () => {
|
||||
pageData.pageCurrent = 1;
|
||||
data.list = []
|
||||
getData()
|
||||
showPopup.value = false;
|
||||
}
|
||||
|
||||
const handleReset = () => {
|
||||
data.startTime = ""
|
||||
onConfirm()
|
||||
}
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
await getDictList()
|
||||
await getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<TopNav nav-title="任务中心" show-left />
|
||||
<van-sticky>
|
||||
<div class="sticky_box">
|
||||
<div class="segment">
|
||||
<div class="segment-bg">
|
||||
<div class="segment-item" :class="{ active: activeTab === 'today' }" @click="setTab('today')">当日任务</div>
|
||||
<div class="segment-item" :class="{ active: activeTab === 'history' }" @click="setTab('history')">历史任务</div>
|
||||
</div>
|
||||
</div>
|
||||
<search :isSx="true" placeholder="请输入方格名称进行查询" v-model="searchValue" @update:sx="showPopup = !showPopup"
|
||||
@update:modelValue="onSearch" />
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<sx-popup :showPopup="showPopup" :p_top="150" @update:close="showPopup = false" @update:onConfirm="onConfirm"
|
||||
@reset="handleReset">
|
||||
<div class="time_box">
|
||||
<van-field v-model="data.startTime" label-width="60px" placeholder="请选择时间" input-align="left"
|
||||
right-icon="arrow-down" readonly @click.stop="onClickTime" />
|
||||
</div>
|
||||
</sx-popup>
|
||||
|
||||
<select-time v-if="timeShow" time-type="选择任务日期" @update:time="onSelectTime" @update:cancelTime="timeShow = false" />
|
||||
|
||||
<div class="content">
|
||||
<van-pull-refresh v-model="loadingRefresh" @refresh="onRefresh">
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="" @load="onLoad" offset="1"
|
||||
:immediate-check="false">
|
||||
<patrol-wrapper :list="data?.list" :show-receive="activeTab === 'today'" @click="handleClockInPage"
|
||||
@claim="handleClaim" />
|
||||
|
||||
<van-empty description="暂无采集数据" image="default" v-if="data.list.length <= 0 && loadingRefresh === false" />
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.time_box {
|
||||
padding: 0 3vw 3vw;
|
||||
}
|
||||
|
||||
.segment {
|
||||
padding: 0 4vw 3vw;
|
||||
box-sizing: border-box;
|
||||
margin-top: 13.5vw;
|
||||
|
||||
.segment-bg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #f2f3f5;
|
||||
border-radius: 6vw;
|
||||
padding: 1vw;
|
||||
}
|
||||
|
||||
.segment-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 2.5vw 0;
|
||||
border-radius: 5vw;
|
||||
font-size: 3.73vw;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.segment-item.active {
|
||||
color: #ffffff;
|
||||
background: linear-gradient(90deg, #28A5FF 0%, #3E6EE8 100%);
|
||||
box-shadow: 0 1vw 2vw rgba(62, 110, 232, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-top: 13vw;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-bottom: 16vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,155 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 盘人 -->
|
||||
<van-popup v-model:show="peoplePopupShow" round :style="{ width: '80%' }" close-icon="close" :overlay="true"
|
||||
@close="handlePClose">
|
||||
<div class="checkPeoplePopup">
|
||||
<div class="select-box">
|
||||
<div class="item-boxs" v-for="(item, index) in checkPList" :key="index" @click="getPItem(item, index)">
|
||||
<span :class="pCheckFlag === item.value ? 'checkText' : ''">{{
|
||||
item.label
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<van-field v-model="form.sfzh" placeholder="请输入身份证号" v-if="pCheckFlag === 'sfzh'" right-icon="photograph"
|
||||
:rules="[{ required: true, message: '请输入身份证号码' }]">
|
||||
</van-field>
|
||||
<van-field v-model="form.value" placeholder="请输入手机号" right-icon="graphic" v-if="pCheckFlag === 'phoneNum'"
|
||||
:rules="[{ required: true, message: '请输入手机号码' }]">
|
||||
</van-field>
|
||||
<div v-if="pCheckFlag === 'photo'">
|
||||
<img :src="require('../../../../assets/images/new/photoin.png')" alt="" width="100" height="100" />
|
||||
</div>
|
||||
<div v-if="pCheckFlag === 'scanf'">
|
||||
<!-- <van-icon name="scan" /> -->
|
||||
</div>
|
||||
<!-- 综合 -->
|
||||
<div v-if="pCheckFlag === 'comprehensive'" style="width: 100%">
|
||||
<van-field v-model="form.value" placeholder="请输入姓名" :rules="[{ required: true, message: '请输入姓名' }]"
|
||||
right-icon="user-o">
|
||||
</van-field>
|
||||
<!-- <van-field
|
||||
v-model="value"
|
||||
readonly
|
||||
name="calendar"
|
||||
placeholder="请输入出生日期"
|
||||
@click="showCalendar = true"
|
||||
>
|
||||
<template #right-icon>
|
||||
<i class="iconfontorange"></i>
|
||||
</template>
|
||||
</van-field> -->
|
||||
<van-field v-model="form.value" name="csrq" placeholder="请输入生日,格式为2020-01-01" right-icon="calendar-o"
|
||||
@touchstart.stop="showDateKeyboard = true" :rules="[
|
||||
{
|
||||
pattern: /\d{4}-\d{2}-\d{2}/,
|
||||
required: true,
|
||||
message: '请输入生日,格式为2020-01-01',
|
||||
},
|
||||
]">
|
||||
</van-field>
|
||||
<van-field v-model="form.result" name="picker" clickable placeholder="请选择性别" right-icon="award-o"
|
||||
@click="getCommonPop('sex')">
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkPeopleSubmit" @click="checkP(pCheckFlag)" v-if="pCheckFlag != 'photo'">
|
||||
<div class="sub-btn">
|
||||
<img :src="require('../../../../assets/images/new/faceR.png')" alt="" width="17"
|
||||
height="17" /> 盘查人员
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="columns" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
watch,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
toRefs,
|
||||
toRef,
|
||||
} from "vue";
|
||||
import { hintToast } from "../../../../utils/tools.js";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
const peoplePopupShow = ref(false);
|
||||
function handleOpen() {
|
||||
peoplePopupShow.value = true;
|
||||
}
|
||||
function handlePClose() {
|
||||
peoplePopupShow.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
handleOpen,
|
||||
});
|
||||
const form = ref({
|
||||
sfzh: "",
|
||||
lxdh: "",
|
||||
});
|
||||
// 盘人
|
||||
function checkP(e) {
|
||||
switch (e) {
|
||||
case "sfzh":
|
||||
if (form.value.sfzh) {
|
||||
router.push({
|
||||
path: "/quarantinePersonnel",
|
||||
query: {
|
||||
sfzh: form.value.sfzh,
|
||||
pcsrlx: "2",
|
||||
},
|
||||
});
|
||||
} else {
|
||||
hintToast("请输入身份证号码");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 盘人弹框按钮List
|
||||
const checkPList = [
|
||||
{ label: "身份证", value: "sfzh" },
|
||||
{ label: "手机号", value: "phoneNum" },
|
||||
// { label: "人像", value: "photo" },
|
||||
// { label: "扫码", value: "scanf" },
|
||||
// { label: "综合", value: "comprehensive" },
|
||||
];
|
||||
const pCheckFlag = ref("sfzh");
|
||||
function getPItem(item, index) {
|
||||
pCheckFlag.value = item.value;
|
||||
}
|
||||
// 弹出层数据
|
||||
const columns = ref(["测试1", "测试2", "测试3"]);
|
||||
const isShowCommonPicker = ref(false);
|
||||
function getCommonPop(val) {
|
||||
switch (val) {
|
||||
case "cllx":
|
||||
columns.value = ["1", "2", "3"];
|
||||
break;
|
||||
case "sex":
|
||||
columns.value = ["男", "女", "未知"];
|
||||
break;
|
||||
}
|
||||
isShowCommonPicker.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../../assets/styles/mixin.scss";
|
||||
|
||||
.item-boxs {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
|
||||
.sub-btn {
|
||||
@include font_size($font_medium_s);
|
||||
}
|
||||
</style>
|
||||
@ -1,776 +0,0 @@
|
||||
<template>
|
||||
<div class="container" style="padding-top: 13vw">
|
||||
<TopNav navTitle="车辆盘查" :showRight="false" :showLeft="true" />
|
||||
<div class="tip_text">
|
||||
盘查结果:{{ clxx.pcbqsm }}
|
||||
</div>
|
||||
<!-- <div class="head-nav-banner" v-if="clxx.jdcsyr"></div>
|
||||
<div class="top" v-if="clxx.jdcsyr">
|
||||
<div class="basic-info">
|
||||
<div class="img-box">
|
||||
<img :class="_getBase64(clxx)" :src="clxx.baseUrl" width="60" />
|
||||
</div>
|
||||
<div class="IDcard-info">
|
||||
<div class="text">{{ clxx.hphm }}</div>
|
||||
<div>所有人: {{ clxx.jdcsyr }}</div>
|
||||
<div>车主身份证:{{ clxx.jdcsyrsfzh }}</div>
|
||||
<div>识别代码: {{ clxx.clsbdh }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg_ban"></div>
|
||||
<div class="center" v-if="clxx.jdcsyr">
|
||||
<div class="associated-information">
|
||||
<div class="sign-title">关联信息</div>
|
||||
<div class="content1">
|
||||
<div class="item-box" @click="goCanTrack">
|
||||
<div class="ass-item-box">
|
||||
<div class="circlebox bg2"></div>
|
||||
<span>盘查轨迹</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pick-up-information">
|
||||
<div class="sign-title">采集信息</div>
|
||||
<div class="pick-box">
|
||||
<van-badge class="pick-item-box pbg3" :content="wpdjList.length" @click="isShowSignIn = true">
|
||||
<div>物品登记</div>
|
||||
<div class="tp"></div>
|
||||
</van-badge>
|
||||
<van-popup v-model:show="isShowSignIn" :style="{ width: '90vw' }">
|
||||
<van-form @submit="onSubmitWp">
|
||||
<van-cell-groub>
|
||||
<van-field name="uploader" label="物品图片">
|
||||
<template #input>
|
||||
<van-uploader v-model="wpTpIdList" multiple :max-count="3" :after-read="upLoadImg2" />
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-groub>
|
||||
<van-cell-groub>
|
||||
<van-field v-model="wpdjForm.wpms" label="物品描述" placeholder="物品描述" rows="2" maxlength="50"
|
||||
show-word-limit></van-field>
|
||||
</van-cell-groub>
|
||||
<van-cell-groub>
|
||||
<van-field :rules="[{ required: true, message: '请填写物品数量' }]" v-model="wpdjForm.wpsl" label="物品数量"
|
||||
placeholder="物品数量" type="number"></van-field>
|
||||
</van-cell-groub>
|
||||
<van-cell-groub>
|
||||
<van-field :rules="[{ required: true, message: '请选择物品类型' }]" readonly is-link v-model="wpdjForm.wplx"
|
||||
label="物品类型" placeholder="选择物品类型" @click="showPicker = true"></van-field>
|
||||
</van-cell-groub>
|
||||
<div style="margin: 16px">
|
||||
<van-button round block type="primary" native-type="submit" size="small">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehicular">
|
||||
<div class="sign-title">
|
||||
<span>同乘人员</span><span class="chooseP" @click="isWithStaff = true;">选择人员</span>
|
||||
</div>
|
||||
<div class="ry_item">
|
||||
<div v-if="rypcidList.length === 0" style="text-align: center">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="item_flex" v-for="(item, index) in rypcidList" :key="index + 'ryid'">
|
||||
<van-badge>
|
||||
<div class="item_tcry">
|
||||
<span style="width: 15vw">{{
|
||||
rypcOptions.filter((e) => e.value === item)[0].xm
|
||||
}}</span>
|
||||
 
|
||||
<span>{{
|
||||
rypcOptions.filter((e) => e.value === item)[0].sfzh
|
||||
}}</span>
|
||||
</div>
|
||||
<template #content>
|
||||
<van-icon name="cross" class="badge-icon" @click="deleterypc(index)" />
|
||||
</template>
|
||||
</van-badge>
|
||||
<van-button v-if="
|
||||
rypcOptions.filter((e) => e.value === item)[0].pcclJg == 1
|
||||
" round class="fxBtn" type="default" style="padding: 0 12px" size="mini">放行</van-button>
|
||||
<van-button v-else-if="
|
||||
rypcOptions.filter((e) => e.value === item)[0].pcclJg == 2
|
||||
" round class="yjBtn" style="padding: 0 12px" type="default" size="mini">移交</van-button>
|
||||
<van-button v-else round class="fxBtn" style="padding: 0 12px" type="default" size="mini">盘查</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-popup v-model:show="isWithStaff" :style="{ height: '55%', width: '70%', borderRadius: '8px' }">
|
||||
<div class="staff-title">选择同乘人员</div>
|
||||
<div class="staff-content">
|
||||
<div style="text-align: center; margin-top: 16px" v-if="rypcOptions.length === 0">
|
||||
暂无同乘人员~
|
||||
</div>
|
||||
<div v-else>
|
||||
<van-checkbox-group v-model="rypcidList">
|
||||
<van-cell-group inset>
|
||||
<van-cell v-for="(item, index) in rypcOptions" :key="index + 'rypcid'" :title="item.xm"
|
||||
@click="toggle(index)">
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="item.value" :ref="(el) => (checkboxRefs[index] = el)"
|
||||
@click.stop></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="staff-sure">
|
||||
<van-button size="small" class="yjBtn" type="default" block @click="prLoad">盘人</van-button>
|
||||
<van-button size="small" class="fxBtn" type="default" @click="onOkTcry" block>确认</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
<div class="veh-box">
|
||||
<div class="no-veh">暂无乘坐车辆~</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg_ban"></div>
|
||||
<div class="upload" v-if="clxx.jdcsyr">
|
||||
<div class="tsxx" v-show="fileList.length === 0">
|
||||
点击上传图片
|
||||
<br />
|
||||
最多可上传 3 张照片
|
||||
</div>
|
||||
<van-uploader v-model="fileList" multiple :max-count="3" :after-read="upLoadImg">
|
||||
<van-button class="up_btn" icon="plus"></van-button>
|
||||
</van-uploader>
|
||||
</div> -->
|
||||
<!-- <div class="bg_ban" style="height: 100px"></div> -->
|
||||
<div class="bottom-box">
|
||||
<div @click="save('1')">
|
||||
<img src="../../../assets/images/new/fangxing.png" />
|
||||
放行
|
||||
</div>
|
||||
<div @click="save('2')" class="yj">
|
||||
<img src="../../../assets/images/new/yijiao.png" />
|
||||
移交
|
||||
</div>
|
||||
</div>
|
||||
<van-popup v-model:show="showPicker" position="bottom">
|
||||
<van-picker :columns="D_BZ_BPCRCWP" @confirm="onConfirmWp" @cancel="showPicker = false" />
|
||||
</van-popup>
|
||||
<!-- 移交弹窗 -->
|
||||
<van-popup v-model:show="showYj" round :style="{ width: '90vw' }">
|
||||
<van-form @submit="onYj">
|
||||
<van-cell-groub>
|
||||
<van-field :rules="[{ required: true, message: '请填写移交单位' }]" v-model="yjForm.pcclYjdw" label="移交单位"
|
||||
placeholder="移交单位"></van-field>
|
||||
</van-cell-groub>
|
||||
<van-cell-groub>
|
||||
<van-field :rules="[{ required: true, message: '请选择移交原因' }]" readonly is-link v-model="yjForm.pcclYjyy"
|
||||
label="移交原因" placeholder="选择移交原因" @click="showYjyy = true"></van-field>
|
||||
</van-cell-groub>
|
||||
<div style="margin: 16px">
|
||||
<van-button round block type="primary" native-type="submit" size="small">移交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-popup>
|
||||
<!-- 移交原因 -->
|
||||
<van-popup round v-model:show="showYjyy" position="bottom">
|
||||
<van-picker :columns="D_BZ_BPCCLYJYY" @cancel="showYjyy = false" @confirm="onConfirmYjyy"></van-picker>
|
||||
</van-popup>
|
||||
<checkedPeople ref="peo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ImageCompressor from "image-compressor.js";
|
||||
import TopNav from "../../../components/topNav";
|
||||
import checkedPeople from "./components/checkPeople";
|
||||
import { ref, reactive, onMounted, onBeforeUpdate, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { selectCl, saveBpccl, upImage, getClry2h } from "../../../api/common";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { zlPrPc } from "../../../api/zlzx.js";
|
||||
import { getBase64, hintToast } from "../../../utils/tools.js";
|
||||
const router = useRouter();
|
||||
//移交表单
|
||||
const { D_BZ_BPCRCWP, D_BZ_BPCCLYJYY } = getDictList("D_BZ_BPCRCWP", "D_BZ_BPCCLYJYY");
|
||||
const yjForm = ref({});
|
||||
const zlId = ref("");
|
||||
const loading = ref(true);
|
||||
const showEmpty = ref(false);
|
||||
const copyCphm = ref("");
|
||||
const wpTpIdList = ref([]);
|
||||
const peo = ref(null);
|
||||
const fileList = ref([]);
|
||||
const isWithStaff = ref(false);
|
||||
const showYj = ref(false);
|
||||
const gps = ref({});
|
||||
const clxx = ref({});
|
||||
const showYjyy = ref(false);
|
||||
const rypcidList = ref([]);//人员盘查id集合
|
||||
const rypcOptions = ref([]);
|
||||
const checkboxRefs = ref([]);
|
||||
const wpdjList = ref([]);//物品登记数据
|
||||
const wpdjForm = ref({
|
||||
wpms: "",
|
||||
wpTpIdList: [],
|
||||
wpsl: 1,
|
||||
wplx: "",
|
||||
});
|
||||
const tpIdList = ref([]);
|
||||
const isShowSignIn = ref(false);// 物品登记
|
||||
const addfileList = ref([]);
|
||||
const result = ref("");
|
||||
const showPicker = ref(false);
|
||||
onBeforeUpdate(() => {
|
||||
checkboxRefs.value = [];
|
||||
});
|
||||
onMounted(() => {
|
||||
zlId.value = router.currentRoute.value.query.zlId;
|
||||
copyCphm.value = router.currentRoute.value.query.hphm;
|
||||
getTcry();
|
||||
try {
|
||||
gps = JSON.parse(bridge.getLocation());
|
||||
} catch (error) { }
|
||||
let hphm = router.currentRoute.value.query.hphm;
|
||||
if (hphm) {
|
||||
clxxQueryDetail(hphm);
|
||||
} else {
|
||||
hintToast("无车辆信息,请重试!");
|
||||
showEmpty.value = true;
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
function toggle(index) {
|
||||
checkboxRefs.value[index].toggle();
|
||||
}
|
||||
function onOkTcry() {
|
||||
isWithStaff.value = false;
|
||||
}
|
||||
//获取base64地址
|
||||
function _getBase64(item) {
|
||||
getBase64((res) => { item.baseUrl = res; }, `http://10.64.201.128:2366/xlpcAdminNew/requestservice/czrk/ryxp.jpg?sfzh=${item.jdcsyrsfzh}`);
|
||||
}
|
||||
// 盘查人员
|
||||
function prLoad() {
|
||||
peo.value.handleOpen();
|
||||
}
|
||||
// 移交原因
|
||||
function onConfirmYjyy(val) {
|
||||
showYjyy.value = false;
|
||||
yjForm.value.pcclYjyy = val.text;
|
||||
}
|
||||
|
||||
function deleterypc(e) {
|
||||
rypcidList.value.splice(e, 1);
|
||||
}
|
||||
function onSubmitWp() {
|
||||
isShowSignIn.value = false;
|
||||
wpdjList.value.push({
|
||||
wpms: wpdjForm.value.wpms,
|
||||
wpTpIdList: wpdjForm.value.wpTpIdList,
|
||||
wplx: wpdjForm.value.wplxdm,
|
||||
wpsl: wpdjForm.value.wpsl,
|
||||
});
|
||||
wpTpIdList.value = [];
|
||||
wpdjForm.value = {
|
||||
wpms: "",
|
||||
wpTpIdList: [],
|
||||
wpsl: 1,
|
||||
wplx: "",
|
||||
};
|
||||
}
|
||||
function onConfirmWp(val) {
|
||||
showPicker.value = false;
|
||||
wpdjForm.value.wplx = val.text;
|
||||
wpdjForm.value.wplxdm = val.dm;
|
||||
}
|
||||
function getTcry() {
|
||||
getClry2h().then((res) => {
|
||||
rypcOptions.value = res.map((item) => {
|
||||
return {
|
||||
xm: item.xm,
|
||||
value: item.id,
|
||||
sfzh: item.sfzh,
|
||||
pcclJg: item.pcclJg,
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function clxxQueryDetail(hphm) {
|
||||
let hplx = router.currentRoute.value.query.hplx
|
||||
selectCl({
|
||||
hphm: hphm,
|
||||
hpzl: hplx,
|
||||
jd: gps.app_x,
|
||||
wd: gps.app_y,
|
||||
sjly: "",
|
||||
zdxh: gps.zdxh,
|
||||
pcsrlx: router.currentRoute.value.query.pcsrlx,
|
||||
zdch: gps.zdch,
|
||||
zdsim: gps.zdsim,
|
||||
glxtdm: "",
|
||||
glxtid: "",
|
||||
jzid: "",
|
||||
bbid: "",
|
||||
pcfs: "",
|
||||
}).then((res) => {
|
||||
loading.value = false;
|
||||
if (res) {
|
||||
clxx.value = res;
|
||||
} else {
|
||||
hintToast("查无此车,请核对信息!");
|
||||
router.go(-1);
|
||||
}
|
||||
//如果是指令页面跳转过来 嗲用
|
||||
if (zlId.value) {
|
||||
zlPrPc({ pclxdm: 2, pcryclId: clxx.value.id, zlId: zlId.value }).then((res) => { });
|
||||
}
|
||||
});
|
||||
}
|
||||
// 关联信息
|
||||
function goCanTrack() {
|
||||
router.push({
|
||||
path: "/TrackInventory", query: { hphm: clxx.value.hphm },
|
||||
});
|
||||
}
|
||||
// 放行移交
|
||||
function save(val) {
|
||||
if (val === "1") {
|
||||
clxx.value.pcclJg = val;
|
||||
clxx.value.pcclJgmc = "放行";
|
||||
clxx.value.jd = gps.app_x;
|
||||
clxx.value.wd = gps.app_y;
|
||||
const formData = {
|
||||
id: clxx.value.id,
|
||||
pcclJg: "1",
|
||||
pcclJgmc: "放行",
|
||||
tpIdList: tpIdList.value,
|
||||
clWpList: wpdjList.value,
|
||||
rypcidList: rypcidList.value,
|
||||
};
|
||||
saveBpccl(formData).then((res) => {
|
||||
hintToast("放行成功!");
|
||||
router.go(-1);
|
||||
});
|
||||
} else {
|
||||
clxx.value.pcclJg = val;
|
||||
clxx.value.pcclJgmc = "移交";
|
||||
showYj.value = true;
|
||||
}
|
||||
}
|
||||
// 移交
|
||||
function onYj() {
|
||||
const formData = {
|
||||
id: clxx.value.id,
|
||||
pcclJg: "2",
|
||||
pcclJgmc: "移交",
|
||||
pcclYjdw: yjForm.value.pcclYjdw,
|
||||
pcclYjyy: yjForm.value.pcclYjyy,
|
||||
tpIdList: tpIdList.value,
|
||||
clWpList: wpdjList.value,
|
||||
rypcidList: rypcidList.value,
|
||||
};
|
||||
saveBpccl(formData).then((res) => {
|
||||
hintToast("移交成功!");
|
||||
router.go(-1);
|
||||
});
|
||||
}
|
||||
// 上传图片
|
||||
async function upLoadImg(file) {
|
||||
file.message = "上传中...";
|
||||
let fileBlob = await _compressImage(file.file);
|
||||
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||
const data = new FormData();
|
||||
data.append("file", fileData);
|
||||
upImage(data).then((res) => {
|
||||
file.status = "done";
|
||||
file.message = "上传成功";
|
||||
if (!tpIdList.value.includes(res)) tpIdList.value.push(res);
|
||||
});
|
||||
}
|
||||
// 上传图片
|
||||
async function upLoadImg2(file) {
|
||||
file.message = "上传中...";
|
||||
let fileBlob = await _compressImage(file.file);
|
||||
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||
const data = new FormData();
|
||||
data.append("file", fileData);
|
||||
upImage(data).then((res) => {
|
||||
file.status = "done";
|
||||
file.message = "上传成功";
|
||||
if (!wpdjForm.value.wpTpIdList.includes(res)) wpdjForm.value.wpTpIdList.push(res);
|
||||
});
|
||||
}
|
||||
//压缩图片
|
||||
const _compressImage = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
new ImageCompressor(file, {
|
||||
quality: 0.6, //压缩质量
|
||||
success(res) {
|
||||
resolve(res);
|
||||
},
|
||||
error(e) {
|
||||
reject(e);
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../assets/styles/mixin.scss";
|
||||
|
||||
.bg_ban {
|
||||
background: #eff0f5;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.container {
|
||||
// height: 100vh;
|
||||
margin-bottom: 8vh;
|
||||
}
|
||||
|
||||
.top {
|
||||
background-image: url("../../../assets/images/new/cl_bg.png");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
height: 22vw;
|
||||
padding: 3vh 5vw;
|
||||
margin: 0 4vw 12px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.basic-info {
|
||||
color: #4d4d4d;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.img-box {
|
||||
flex: 1;
|
||||
|
||||
>img {
|
||||
border-radius: 5px;
|
||||
border: 1px solid #1143ca;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.IDcard-info {
|
||||
flex: 3;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.text {
|
||||
// @include font_size($font_large);
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
color: #1f6cec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contact-way {
|
||||
margin-top: 3vh;
|
||||
line-height: 3vh;
|
||||
@include font_size($font_medium_s);
|
||||
|
||||
.one-line {
|
||||
display: flex;
|
||||
|
||||
.phoneNum {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fxBtn {
|
||||
background: linear-gradient(148deg, #5897ff, #1862de);
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.yjBtn {
|
||||
background: linear-gradient(148deg, #ffbb6b, #ff7a45);
|
||||
color: #f2f2f2;
|
||||
}
|
||||
|
||||
.center {
|
||||
padding: 0 3vw;
|
||||
|
||||
.sign-title {
|
||||
padding-left: 14px;
|
||||
position: relative;
|
||||
line-height: 3vh;
|
||||
@include font_size($font_medium);
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 1vh 0;
|
||||
|
||||
.chooseP {
|
||||
@include font_size($font_medium_s);
|
||||
color: rgb(0, 102, 255);
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sign-title::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 2px;
|
||||
bottom: 2px;
|
||||
width: 4px;
|
||||
background: linear-gradient(0deg, #7ec2ff 0%, #0e8aff 100%);
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
.associated-information {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
|
||||
.item-box {
|
||||
margin: 2vw 4vw;
|
||||
display: flex;
|
||||
|
||||
.ass-item-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.content1 {
|
||||
display: flex;
|
||||
|
||||
.circlebox {
|
||||
width: 15vw;
|
||||
height: 15vw;
|
||||
// border-radius: 15vw;
|
||||
text-align: center;
|
||||
line-height: 15vw;
|
||||
margin-bottom: 2vw;
|
||||
}
|
||||
|
||||
.bg1 {
|
||||
background: url("../../../assets/images/new/zhda.png");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.bg2 {
|
||||
background: url("../../../assets/images/new/pcgj.png");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.bg3 {
|
||||
background: url("../../../assets/images/new/tcry.png");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pick-up-information {
|
||||
@include font_size($font_medium_s);
|
||||
@include font_color($font-color-theme);
|
||||
|
||||
.pick-box {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin: 3vw 0;
|
||||
}
|
||||
|
||||
.pick-item-box {
|
||||
padding: 3vw 3vw 10vw;
|
||||
width: 30%;
|
||||
margin-right: 2vw;
|
||||
// border-radius: 3vw;
|
||||
position: relative;
|
||||
|
||||
.tp {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pbg1 {
|
||||
background: url("../../../assets/images/new/bg-blue.png") no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.pbg2 {
|
||||
background: url("../../../assets/images/new/bg-orgin.png") no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.pbg3 {
|
||||
color: #397361;
|
||||
background: url("../../../assets/images/new/wpdj.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.vehicular {
|
||||
@include font_color($font-color-theme);
|
||||
|
||||
.no-veh {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.veh-box {
|
||||
margin: 1vh 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.line1 {
|
||||
width: 100vw;
|
||||
background-color: #eee;
|
||||
height: 1vh;
|
||||
}
|
||||
|
||||
.upload {
|
||||
padding: 1vh 3vw;
|
||||
height: 80px;
|
||||
position: relative;
|
||||
|
||||
.tsxx {
|
||||
position: absolute;
|
||||
color: #a8a8a8;
|
||||
top: 0;
|
||||
left: 30%;
|
||||
bottom: 0;
|
||||
padding: 8% 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.up_btn {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
color: #a8a8a8;
|
||||
font-size: 24px;
|
||||
background: #f2f2f2 url("../../../assets/images/new/upimg_bg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-box {
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border-top: 1px solid #ddddde;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
height: 6vh;
|
||||
line-height: 6vh;
|
||||
display: flex;
|
||||
|
||||
>div {
|
||||
height: 6vh;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
>img {
|
||||
width: 20px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.yj {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-box {
|
||||
margin: 1vh 3vw;
|
||||
}
|
||||
|
||||
.ry_item {
|
||||
background: #f8f8f8;
|
||||
opacity: 0.7;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
.staff-title {
|
||||
height: 6vh;
|
||||
background-color: rgb(13, 106, 245);
|
||||
text-align: center;
|
||||
line-height: 6vh;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.staff-sure {
|
||||
position: fixed;
|
||||
bottom: 5vw;
|
||||
right: 5vw;
|
||||
left: 5vw;
|
||||
|
||||
.yjBtn {
|
||||
margin-bottom: 12px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.fxBtn {
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.head-nav-banner {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 35vw;
|
||||
z-index: 1;
|
||||
background: #1143ca;
|
||||
}
|
||||
|
||||
::v-deep .headBlue {
|
||||
background-color: #1143ca !important;
|
||||
}
|
||||
|
||||
.navTitle {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
// @include font_size($font_large);
|
||||
font-size: 5.5vw;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 3vw 0;
|
||||
}
|
||||
|
||||
.item_tcry {
|
||||
padding: 2px 24px;
|
||||
background: #d2e3ff;
|
||||
border-radius: 8px;
|
||||
|
||||
>span {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.badge-icon {
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.item_flex {
|
||||
padding: 6px 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tip_text{
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@ -1,240 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav :navTitle="title" />
|
||||
<van-form @submit="onSubmit" style="height: calc(100vh - 13vw);">
|
||||
<div class="infoBox">
|
||||
<ul class="cardInfo">
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.sbsj" required name="申报时间" readonly label="申报时间" input-align="right"
|
||||
:rules="[{ required: true, message: '请选择时间' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.sblxmc" required name="申报类型" is-link readonly label="申报类型" placeholder="点击设置"
|
||||
input-align="right" :rules="[{ required: true, message: '请选择申报类型' }]" @click="getCommonPop('sblx')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field required name="申报原因" readonly label="申报原因" />
|
||||
</li>
|
||||
<van-field placeholder="请输入相关内容" v-model="normalForm.sbyy" rows="4" autosize accept=".txt,.png,.zip,jpg,jpeg"
|
||||
maxlength="500" show-word-limit type="textarea"></van-field>
|
||||
<li class="item">
|
||||
<div><span class="mark"></span>添加附件</div>
|
||||
</li>
|
||||
<!-- 附件 -->
|
||||
<div class="fjBox">
|
||||
<van-uploader v-model="fileList" multiline :max-count="3" :after-read="afterRead"></van-uploader>
|
||||
</div>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<van-button round block type="primary" native-type="submit" :loading="isLoading" loading-type="spinner"
|
||||
loading-text="登录中...">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-form>
|
||||
<!-- 弹窗 -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker v-if="clickType == 'sblx'" :columns="columns" @cancel="isShowCommonPicker = false"
|
||||
@confirm="onConfirm" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { baseUrl2 } from "@/utils/request.js";
|
||||
import { upImage } from "@/api/common";
|
||||
import ImageCompressor from "image-compressor.js";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { getDictList, setDict } from "@/utils/dict";
|
||||
import { timeValidate ,hintToast} from "@/utils/tools.js";
|
||||
import { zgDetail, editDataZg, addDataZg } from "../../../api/xfgl.js";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { ref, onMounted, reactive, defineProps } from "vue";
|
||||
const urlImg = `${baseUrl2}/mosty-api/mosty-base/minio/image/download/`;
|
||||
const { D_SB_SBLX } = getDictList("D_SB_SBLX");
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const message = ref("");
|
||||
const normalForm = ref({
|
||||
sbsj:timeValidate(),
|
||||
ssbmdm:JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptCode
|
||||
});
|
||||
const isLoading = ref(false)
|
||||
const isShowCommonPicker = ref(false);
|
||||
const clickType = ref('');
|
||||
const columns = ref([]);
|
||||
const fileList = ref([])
|
||||
const wpTpIdList = ref([])
|
||||
const title = ref('')
|
||||
onMounted(()=>{
|
||||
title.value = route.query.id ? "编辑战果申报" : "新增战果申报";
|
||||
if (route.query.id) {
|
||||
_getDetailById(); //根据id获取详情
|
||||
}
|
||||
})
|
||||
//根据id获取详情
|
||||
function _getDetailById() {
|
||||
zgDetail(route.query.id).then((res) => {
|
||||
D_SB_SBLX.value.forEach((element) => {
|
||||
if (element.dm == res.sblx) res.sblxmc = element.text;
|
||||
});
|
||||
let ids = res.sbfjid.split(',')
|
||||
fileList.value = []
|
||||
ids.forEach(item => {
|
||||
let img = baseUrl2 + "/mosty-api/mosty-base/minio/image/download/" + item;
|
||||
let obj = {
|
||||
url: img,
|
||||
codeId: item,
|
||||
isImage: true,
|
||||
status: "done",
|
||||
message: "上传成功",
|
||||
};
|
||||
fileList.value.push(obj)
|
||||
});
|
||||
normalForm.value = res;
|
||||
});
|
||||
}
|
||||
// 选择
|
||||
function getCommonPop(val) {
|
||||
clickType.value = val;
|
||||
switch (val) {
|
||||
case "sblx":
|
||||
columns.value = D_SB_SBLX.value;
|
||||
break;
|
||||
}
|
||||
isShowCommonPicker.value = true;
|
||||
}
|
||||
|
||||
// 确定选择
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
switch (clickType.value) {
|
||||
case "sblx":
|
||||
normalForm.value.sblx = val.dm;
|
||||
normalForm.value.sblxmc = val.zdmc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
function onSubmit(){
|
||||
let params = { ...normalForm.value }
|
||||
delete params.sblxmc
|
||||
let ids1 = fileList.value.filter(item=>{return item.codeId}).map(v=>{return v.codeId})
|
||||
let ids2 = wpTpIdList.value.join(',')
|
||||
params.sbfjid = (ids1.concat(ids2)).join(',')
|
||||
|
||||
isLoading.value = true;
|
||||
if(title.value == '编辑战果申报'){
|
||||
editDataZg(params).then(res=>{
|
||||
hintToast('编辑成功')
|
||||
router.go(-1);
|
||||
})
|
||||
}else{
|
||||
addDataZg(params).then(res=>{
|
||||
hintToast('新增成功')
|
||||
router.go(-1);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 文件预览
|
||||
async function afterRead(file) {
|
||||
file.message = "上传中...";
|
||||
let fileBlob = await _compressImage(file.file);
|
||||
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||
const data = new FormData();
|
||||
data.append("file", fileData);
|
||||
file.status = "uploading";
|
||||
upImage(data).then((res) => {
|
||||
file.status = "done";
|
||||
file.message = "上传成功";
|
||||
if (!wpTpIdList.value.includes(res)) wpTpIdList.value.push(res);
|
||||
});
|
||||
}
|
||||
|
||||
//压缩图片
|
||||
const _compressImage = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
new ImageCompressor(file, {
|
||||
quality: 0.6, //压缩质量
|
||||
success(res) {
|
||||
resolve(res);
|
||||
},
|
||||
error(e) {
|
||||
reject(e);
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.infoBox {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.cardInfo {
|
||||
height: calc(100vh - 13vw);
|
||||
padding: 1vw 4vw;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 8vw;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.mark {
|
||||
margin: 0 10px;
|
||||
color: red;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
|
||||
.item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: #0066ff;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
|
||||
.btn {
|
||||
padding: 2vw 6vw;
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-field__control {
|
||||
background: #f8fafd;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.fjBox {
|
||||
padding: 4vw;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@ -1,529 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav :navTitle="title" />
|
||||
<van-form @submit="onSubmit" style="height: calc(100vh - 13vw);">
|
||||
<div class="infoBox">
|
||||
<ul class="cardInfo">
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfsj" required name="时间" is-link readonly label="时间" placeholder="点击设置"
|
||||
input-align="right" :rules="[{ required: true, message: '请选择时间' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfzzXm" required name="巡访主责人" is-link readonly label="巡访主责人"
|
||||
placeholder="点击设置" input-align="right" :rules="[{ required: true, message: '请选择巡访主责人' }]"
|
||||
@click="showDialogfn('xfzz')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfzzSfzh" required name="身份证号" readonly input-align="right" label="身份证号"
|
||||
:rules="[{ required: true, message: '请输入组长身份证号' }]" />
|
||||
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfmj" name="巡访同行人(民警)" is-link label-width="108px" readonly label="巡访同行人(民警)"
|
||||
placeholder="点击设置" input-align="right" @click="showDialogfn('xfmj')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xffj" name="巡访同行人(辅警)" is-link label-width="108px" readonly label="巡访同行人(辅警)"
|
||||
placeholder="点击设置" input-align="right" @click="showDialogfn('xffj')" />
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.sfdw" name="巡访单位" is-link readonly label="巡访单位" placeholder="点击设置"
|
||||
input-align="right" required :rules="[{ required: true, message: '请选择巡访单位' }]"
|
||||
@click="showDialogfn('xfdw')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.dz" required name="巡访地点" label="巡访地点" placeholder="输入地点" input-align="right"
|
||||
:rules="[{ required: true, message: '请选择巡访地点' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xflxmc" required name="巡访类型" is-link readonly label="巡访类型" placeholder="点击设置"
|
||||
input-align="right" :rules="[{ required: true, message: '请选择巡访类型' }]" @click="getCommonPop('xflx')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.rwztmc" name="任务状态" is-link readonly label="任务状态" placeholder="选择任务状态"
|
||||
input-align="right" @click="getCommonPop('rwzt')" />
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<van-field name="巡访内容" @click="showDialogfn('xfnr')" readonly label="巡访内容" />
|
||||
</li>
|
||||
<div class="textarea">
|
||||
<van-field placeholder="请输相关内容" v-model="normalForm.xfnr" rows="4" autosize maxlength="500" show-word-limit
|
||||
type="textarea"></van-field>
|
||||
</div>
|
||||
<li class="item">
|
||||
<div class="itemlabel"><span class="mark"></span>拍照打卡</div>
|
||||
</li>
|
||||
|
||||
<!-- 附件 -->
|
||||
<div class="fjBox">
|
||||
<van-uploader v-model="fileList" multiline :max-count="3" :after-read="afterRead"
|
||||
:before-delete="deleteFj"></van-uploader>
|
||||
</div>
|
||||
<li class="item">
|
||||
<van-field v-model="sbsj" required name="申报时间" readonly label="申报时间" input-align="right"
|
||||
:rules="[{ required: true, message: '请选择时间' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.sblxmc" required name="申报类型" is-link readonly label="申报类型" placeholder="点击设置"
|
||||
input-align="right" :rules="[{ required: true, message: '请选择申报类型' }]" @click="getCommonPop('sblx')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field required name="申报原因" readonly label="申报原因" />
|
||||
</li>
|
||||
<van-field placeholder="请输入相关内容" v-model="normalForm.sbyy" rows="4" autosize accept=".txt,.png,.zip,jpg,jpeg"
|
||||
maxlength="500" show-word-limit type="textarea"></van-field>
|
||||
<li class="item">
|
||||
<div class="itemlabel"><span class="mark"></span>添加附件</div>
|
||||
</li>
|
||||
<!-- 附件 -->
|
||||
<div class="fjBox">
|
||||
<van-uploader v-model="fjData" multiline :max-count="3" accept="" :after-read="afterReadFjsb"
|
||||
:before-delete="beforeDeletefJ">
|
||||
</van-uploader>
|
||||
</div>
|
||||
|
||||
<li class="item">
|
||||
<div class="itemlabel"><span class="mark"></span>附件列表</div>
|
||||
</li>
|
||||
<div class="fjBox">
|
||||
<div v-for="(it, idex) in fileBoxs" :key="idex" class="listitem">
|
||||
<span class="name">{{ it.name }}</span>
|
||||
<span> <van-icon name="close" color="#ff0000" @click="deletDate(it, idex)"></van-icon> </span>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<van-button round block type="primary" native-type="submit" :loading="isLoading" loading-type="spinner"
|
||||
loading-text="登录中...">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="columns" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<Select v-if="showSelect" :checked="r_checked" :selectType="selectType" :show="showSelect"
|
||||
:checkedList="hasCheckedList" @update:cancel="showSelect = false" @update:confirm="onComfirm"
|
||||
:key="selectIndex" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { baseUrl2 } from "@/utils/request.js";
|
||||
import ImageCompressor from "image-compressor.js";
|
||||
import { upImage } from "@/api/common";
|
||||
import Select from "./components/Select.vue";
|
||||
import { hintToast, timeValidate } from "../../../utils/tools";
|
||||
import { rwDetail, eidtRw, addRw } from "../../../api/xfgl.js";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { ref, onMounted, reactive, defineProps, nextTick } from "vue";
|
||||
const { D_BZ_XFLX, D_BZ_RWZT, D_SB_SBLX } = getDictList("D_BZ_XFLX", "D_BZ_RWZT", "D_SB_SBLX");
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const fileList = ref([]);
|
||||
const fjData = ref([]) //附件
|
||||
const normalForm = ref({
|
||||
xfsj: timeValidate(),
|
||||
sbsj: timeValidate(),
|
||||
rwztmc: '正常',
|
||||
rwzt: 0,
|
||||
ssbmdm: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptCode
|
||||
});
|
||||
const sbsj = timeValidate()
|
||||
const title = ref("新增巡防任务");
|
||||
const clickType = ref(""); //点击选择
|
||||
const columns = ref([]);
|
||||
const time = ref();
|
||||
const isShowCommonPicker = ref(false);
|
||||
const showSelect = ref(false);
|
||||
const selectType = ref(""); //选择的类型
|
||||
const r_checked = ref(""); //选择的类型
|
||||
const hasCheckedList = ref([]); //选择的类型
|
||||
const selectIndex = ref(1); //选择器组件KEY
|
||||
const wpTpIdList = ref([]);
|
||||
const sbTpIdList = ref([]);
|
||||
const isLoading = ref(false)
|
||||
const fileBoxs = ref([]) //附件其他类型
|
||||
const urlImg = `${baseUrl2}/mosty-api/mosty-base/minio/image/download/`;
|
||||
|
||||
const dataList = reactive({
|
||||
fzrList: [], //巡访组长
|
||||
nrList: [], //巡访内容
|
||||
mjList: [], //组员民警
|
||||
fjList: [], //组员辅警
|
||||
xfdwList: [],//巡访单位
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
title.value = route.query.id ? "编辑战果申报" : "新增战果申报";
|
||||
if (route.query.id) {
|
||||
nextTick(() => {
|
||||
_getDetailById(); //根据id获取详情
|
||||
});
|
||||
}
|
||||
});
|
||||
// 打开弹窗
|
||||
function showDialogfn(type) {
|
||||
selectType.value = type; //选取的类型
|
||||
showSelect.value = true; //打开弹窗
|
||||
hasCheckedList.value = [];
|
||||
r_checked.value = "";
|
||||
selectIndex.value++;
|
||||
hasChooseData();
|
||||
}
|
||||
// 已经选取的数据回显
|
||||
function hasChooseData() {
|
||||
switch (selectType.value) {
|
||||
case "xfzz":
|
||||
if (!dataList.fzrList.length) return false;
|
||||
r_checked.value = dataList.fzrList[0].key;
|
||||
break;
|
||||
case "xfnr":
|
||||
if (!dataList.nrList.length) return false;
|
||||
r_checked.value = dataList.nrList[0].key;
|
||||
break;
|
||||
case "xfmj":
|
||||
if (!dataList.mjList.length) return false;
|
||||
hasCheckedList.value = dataList.mjList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
case "xffj":
|
||||
if (!dataList.fjList.length) return false;
|
||||
hasCheckedList.value = dataList.fjList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
case "xfdw":
|
||||
if (!dataList.xfdwList.length) return false;
|
||||
hasCheckedList.value = dataList.xfdwList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//确认选择
|
||||
function onComfirm(val) {
|
||||
if (val.length <= 0) return false;
|
||||
switch (selectType.value) {
|
||||
case "xfzz":
|
||||
dataList.fzrList = val; //选取的负责人数据
|
||||
normalForm.value.xfzzXm = val[0].xm;
|
||||
normalForm.value.xfzzSfzh = val[0].sfzh;
|
||||
break;
|
||||
case "xfnr":
|
||||
dataList.nrList = val; //巡防内容
|
||||
normalForm.value.xfnr = val[0].nr;
|
||||
break;
|
||||
case "xfmj":
|
||||
dataList.mjList = val; //选取的组员民警
|
||||
normalForm.value.xfmj = val.map(v => { return v.xm }).join(',')
|
||||
break;
|
||||
case "xffj":
|
||||
dataList.fjList = val; //选取的组员辅警
|
||||
normalForm.value.xffj = val.map(v => { return v.xm }).join(',')
|
||||
break;
|
||||
case "xfdw":
|
||||
dataList.xfdwList = val; //选取的单位
|
||||
normalForm.value.sfdw = val.map(v => { return v.dwmc }).join(',')
|
||||
normalForm.value.dz = val[0].dz
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//根据id获取详情
|
||||
function _getDetailById() {
|
||||
rwDetail(route.query.id).then((res) => {
|
||||
let List = JSON.parse(res.xfzy);
|
||||
dataList.mjList = List.filter(v => { return v.fl == '01' })
|
||||
res.xfmj = dataList.mjList.map(it => { return it.xm }).join(',')
|
||||
dataList.fjList = List.filter(v => { return v.fl == '02' })
|
||||
res.xffj = dataList.fjList.map(it => { return it.xm }).join(',')
|
||||
dataList.xfdwList = JSON.parse(res.xfdw)
|
||||
res.sfdw = dataList.xfdwList.map(it => { return it.dwmc }).join(',')
|
||||
res.dz = dataList.xfdwList.length > 0 ? dataList.xfdwList[0].dz : '';
|
||||
let ids = res.xfzp ? res.xfzp.split(',') : []
|
||||
fileList.value = []
|
||||
wpTpIdList.value = []
|
||||
ids.forEach(item => {
|
||||
wpTpIdList.value.push(item)
|
||||
let img = baseUrl2 + "/mosty-api/mosty-base/minio/image/download/" + item;
|
||||
let obj = {
|
||||
url: img,
|
||||
codeId: item,
|
||||
isImage: true,
|
||||
status: "done",
|
||||
message: "上传成功",
|
||||
};
|
||||
fileList.value.push(obj)
|
||||
});
|
||||
|
||||
fjData.value = []
|
||||
fileBoxs.value = []
|
||||
sbTpIdList.value = []
|
||||
let fjarr = res.sbfj ? JSON.parse(res.sbfj) : [];
|
||||
let imgType = ['image/png', 'image/jpeg', 'image/jpg']
|
||||
fjarr.forEach(item => {
|
||||
sbTpIdList.value.push(item)
|
||||
if (imgType.includes(item.type)) {
|
||||
let img1 = baseUrl2 + "/mosty-api/mosty-base/minio/image/download/" + item.id;
|
||||
let obj1 = {
|
||||
url: img1,
|
||||
codeId: item.id,
|
||||
isImage: true,
|
||||
status: "done",
|
||||
message: "上传成功",
|
||||
};
|
||||
fjData.value.push(obj1)
|
||||
} else {
|
||||
fileBoxs.value.push(item)
|
||||
}
|
||||
})
|
||||
normalForm.value = res;
|
||||
setTimeout(() => {
|
||||
D_SB_SBLX.value.forEach((element) => {
|
||||
if (element.dm == res.sblx) normalForm.value.sblxmc = element.text;
|
||||
});
|
||||
D_BZ_XFLX.value.forEach((element) => {
|
||||
if (element.dm == res.xflx) normalForm.value.xflxmc = element.text;
|
||||
});
|
||||
D_BZ_RWZT.value.forEach((element) => {
|
||||
if (element.dm == res.rwzt) normalForm.value.rwztmc = element.text;
|
||||
});
|
||||
}, 500)
|
||||
});
|
||||
}
|
||||
|
||||
// 删除其他文件
|
||||
function deletDate(it, idex) {
|
||||
fileBoxs.value.splice(idex, 1)
|
||||
let index = sbTpIdList.value.findIndex(item => {
|
||||
return item.id == it.id
|
||||
})
|
||||
if (index != -1) sbTpIdList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
function getCommonPop(val) {
|
||||
clickType.value = val;
|
||||
switch (val) {
|
||||
case "xflx":
|
||||
columns.value = D_BZ_XFLX.value;
|
||||
break;
|
||||
case "rwzt":
|
||||
columns.value = D_BZ_RWZT.value;
|
||||
break;
|
||||
case "sblx":
|
||||
columns.value = D_SB_SBLX.value;
|
||||
break;
|
||||
}
|
||||
isShowCommonPicker.value = true;
|
||||
}
|
||||
|
||||
// 确定选择
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
switch (clickType.value) {
|
||||
case "xflx":
|
||||
normalForm.value.xflxmc = val.text;
|
||||
normalForm.value.xflx = val.dm;
|
||||
break;
|
||||
case "rwzt":
|
||||
normalForm.value.rwztmc = val.text;
|
||||
normalForm.value.rwzt = val.dm;
|
||||
break;
|
||||
case "sblx":
|
||||
normalForm.value.sblx = val.dm;
|
||||
normalForm.value.sblxmc = val.zdmc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 删除神宝宝附件
|
||||
const beforeDeletefJ = (url, val) => {
|
||||
fjData.value.splice(val.index, 1)
|
||||
let index = sbTpIdList.value.findIndex(item => {
|
||||
return item.id == url.codeId
|
||||
})
|
||||
if (index != -1) sbTpIdList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
// 申报附件
|
||||
async function afterReadFjsb(file) {
|
||||
file.message = "上传中...";
|
||||
let imgType = ['image/png', 'image/jpeg', 'image/jpg']
|
||||
let type = file.file.type;
|
||||
const data = new FormData();
|
||||
if (imgType.includes(type)) {
|
||||
let fileBlob = await _compressImage(file.file);
|
||||
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||
data.append("file", fileData);
|
||||
} else {
|
||||
data.append("file", file.file);
|
||||
}
|
||||
file.status = "uploading";
|
||||
upImage(data).then((res) => {
|
||||
file.status = "done";
|
||||
file.message = "上传成功";
|
||||
sbTpIdList.value.push({ id: res, type: type, name: file.file.name });
|
||||
});
|
||||
}
|
||||
|
||||
// 删除照片上传
|
||||
const deleteFj = (url, val) => {
|
||||
fileList.value.splice(val.index, 1)
|
||||
wpTpIdList.value.splice(val.index, 1)
|
||||
}
|
||||
|
||||
// 文件预览
|
||||
async function afterRead(file) {
|
||||
file.message = "上传中...";
|
||||
let fileBlob = await _compressImage(file.file);
|
||||
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||
const data = new FormData();
|
||||
data.append("file", fileData);
|
||||
file.status = "uploading";
|
||||
upImage(data).then((res) => {
|
||||
file.status = "done";
|
||||
file.message = "上传成功";
|
||||
if (!wpTpIdList.value.includes(res)) wpTpIdList.value.push(res);
|
||||
});
|
||||
}
|
||||
//压缩图片
|
||||
const _compressImage = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
new ImageCompressor(file, {
|
||||
quality: 0.6, //压缩质量
|
||||
success(res) {
|
||||
resolve(res);
|
||||
},
|
||||
error(e) {
|
||||
reject(e);
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 提交
|
||||
function onSubmit() {
|
||||
let arr = [...dataList.mjList, ...dataList.fjList]
|
||||
let params = {
|
||||
...normalForm.value,
|
||||
xfzy: JSON.stringify(arr),
|
||||
xfdw: JSON.stringify(dataList.xfdwList),
|
||||
}
|
||||
params.xfzp = wpTpIdList.value.join(',')
|
||||
params.sbfj = JSON.stringify(sbTpIdList.value)
|
||||
isLoading.value = true;
|
||||
if (title.value == '编辑战果申报') {
|
||||
eidtRw(params).then(res => {
|
||||
hintToast('编辑成功')
|
||||
router.go(-1);
|
||||
}).catch(() => {
|
||||
isLoading.value = false
|
||||
})
|
||||
} else {
|
||||
addRw(params).then(res => {
|
||||
hintToast('新增成功')
|
||||
router.go(-1);
|
||||
}).catch(() => {
|
||||
isLoading.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.infoBox {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.cardInfo {
|
||||
height: calc(100vh - 13vw);
|
||||
padding: 1vw 4vw;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.itemlabel {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
color: #646566;
|
||||
}
|
||||
|
||||
.mark {
|
||||
margin: 0 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
|
||||
.item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 0;
|
||||
top: 32%;
|
||||
background: #0066ff;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
|
||||
.btn {
|
||||
padding: 2vw 6vw;
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.textarea {
|
||||
::v-deep .van-field__control {
|
||||
background: #f8fafd;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.fjBox {
|
||||
padding: 4vw;
|
||||
box-sizing: border-box;
|
||||
|
||||
.listitem {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 4vw;
|
||||
font-size: 16px;
|
||||
|
||||
.name {
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,213 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav :navTitle="title" />
|
||||
<van-form @submit="onSubmit" style="height: calc(100vh - 13vw);">
|
||||
<div class="infoBox">
|
||||
<ul class="cardInfo">
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xm" required name="姓名" label="姓名" :disabled="disabled" placeholder="输入姓名"
|
||||
input-align="right" :rules="[{ required: true, message: '请输入姓名' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.sfzh" required :disabled="disabled" name="身份证号" label="身份证号"
|
||||
placeholder="输入身份证号" input-align="right" :rules="sfzhRuls" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xbmc" required :disabled="disabled" name="性别" label="性别" placeholder="请选择性别"
|
||||
input-align="right" readonly :rules="[{ required: true, message: '请选择性别' }]"
|
||||
@click="getCommonPop('sex')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.csrq" :disabled="disabled" required name="出生日期" label="出生日期"
|
||||
placeholder="点击设置" input-align="right" :rules="[{ required: true, message: '请选择出生日期' }]"
|
||||
@click="getCommonPop('time')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.lxdh" required name="联系电话" label="联系电话" placeholder="请输入联系电话"
|
||||
input-align="right" :rules="lxdhRuls" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xxdz" required name="现住址" label="现住址" placeholder="请输入住址名称"
|
||||
input-align="right" :rules="[{ required: true, message: '请输入住址名称' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field name="备注" readonly label="备注" />
|
||||
</li>
|
||||
<div class="textarea">
|
||||
<van-field placeholder="请输备注" v-model="normalForm.bz" rows="4" autosize maxlength="500" show-word-limit
|
||||
type="textarea"></van-field>
|
||||
</div>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<van-button round block type="primary" native-type="submit" :loading="isLoading" loading-type="spinner"
|
||||
loading-text="登录中...">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker v-if="clickType == 'sex'" :columns="columns" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
<van-datetime-picker @cancel="isShowCommonPicker = false" @confirm="onConfirm" v-if="clickType == 'time'" v-model="time" type="date" title="选择年月日">
|
||||
</van-datetime-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
<script setup>
|
||||
import { IdCardValidator, phoneValidator } from "../../../utils/rules.js"
|
||||
import { cyryDetail, editDetail, addDetail } from "../../../api/xfgl.js";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { hintToast, timeValidate } from "../../../utils/tools";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { ref, onMounted, reactive, defineProps } from "vue";
|
||||
const { D_BZ_XB } = getDictList("D_BZ_XB");
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const message = ref("");
|
||||
const normalForm = ref({});
|
||||
const columns = ref([]);
|
||||
const time = ref();
|
||||
const isLoading = ref(false);
|
||||
const disabled = ref(false)
|
||||
const isShowCommonPicker = ref(false);
|
||||
const clickType = ref(""); //点击选择
|
||||
const title = ref("新增人员");
|
||||
const sfzhRuls = ref([
|
||||
{ required: true, message: '身份证号码不能为空', trigger: 'onChange/onBlur' },
|
||||
{ validator: (value) => { return IdCardValidator(value) }, trigger: 'onChange/onBlur' }
|
||||
])
|
||||
const lxdhRuls = ref([
|
||||
{ required: true, message: '联系电话不能为空', trigger: 'onChange/onBlur' },
|
||||
{ validator: (value) => { return phoneValidator(value) }, trigger: 'onChange/onBlur' }
|
||||
])
|
||||
|
||||
onMounted(() => {
|
||||
title.value = route.query.id ? "编辑人员" : "新增人员";
|
||||
disabled.value = route.query.id ? true : false;
|
||||
if (route.query.id) _getDetailById(); //根据id获取详情
|
||||
});
|
||||
//根据id获取详情
|
||||
function _getDetailById() {
|
||||
cyryDetail(route.query.id).then((res) => {
|
||||
normalForm.value = res;
|
||||
D_BZ_XB.value.forEach((element) => {
|
||||
if (element.dm == res.xb) normalForm.value.xbmc = element.text;
|
||||
});
|
||||
});
|
||||
}
|
||||
// 选择性别
|
||||
function getCommonPop(val) {
|
||||
if (disabled.value) return false;
|
||||
clickType.value = val;
|
||||
switch (val) {
|
||||
case "sex":
|
||||
columns.value = D_BZ_XB.value;
|
||||
break;
|
||||
}
|
||||
isShowCommonPicker.value = true;
|
||||
}
|
||||
// 确定选择
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
switch (clickType.value) {
|
||||
case "sex":
|
||||
normalForm.value.xbmc = val.text;
|
||||
normalForm.value.xb = val.dm;
|
||||
break;
|
||||
case "time":
|
||||
normalForm.value.csrq = timeValidate(val, "ymd");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
function onSubmit() {
|
||||
isLoading.value = true;
|
||||
delete normalForm.value.xbmc
|
||||
if (title.value == '编辑人员') {
|
||||
editDetail(normalForm.value).then(res => {
|
||||
hintToast('编辑成功')
|
||||
router.go(-1);
|
||||
})
|
||||
} else {
|
||||
addDetail(normalForm.value).then(res => {
|
||||
hintToast('新增成功')
|
||||
router.go(-1);
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.infoBox {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.cardInfo {
|
||||
height: calc(100vh - 13vw);
|
||||
padding: 1vw 4vw;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// height: 8vw;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.mark {
|
||||
margin: 0 10px;
|
||||
color: red;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
|
||||
.item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 0;
|
||||
top: 20%;
|
||||
// transform: translateY(-50%);
|
||||
background: #0066ff;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
|
||||
.btn {
|
||||
padding: 2vw 6vw;
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.textarea {
|
||||
::v-deep .van-field__control {
|
||||
background: #f8fafd;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.fjBox {
|
||||
padding: 4vw;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@ -1,348 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav :navTitle="title" />
|
||||
<van-form @submit="onSubmit" style="height: calc(100vh - 13vw);">
|
||||
<div class="infoBox">
|
||||
<ul class="cardInfo">
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.dwlxmc" required name="单位类型" label="单位类型" :disabled="disabled"
|
||||
placeholder="请选择单位类型" input-align="right" readonly is-link
|
||||
:rules="[{ required: true, message: '请选择单位类型' }]" @click="getCommonPop('dwlx')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.dwmc" required name="单位名称" label="单位名称" :disabled="disabled"
|
||||
placeholder="请输入单位名称" input-align="right" :rules="[{ required: true, message: '请输入单位名称' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.dwflmc" required name="单位分类" label="单位分类" is-link :disabled="disabled"
|
||||
placeholder="请选择单位分类" input-align="right" readonly :rules="[{ required: true, message: '请选择单位分类' }]"
|
||||
@click="getCommonPop('dwfl')" />
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.lxdh" required :disabled="disabled" name="联系电话" label="联系电话"
|
||||
placeholder="请输入联系电话" input-align="right" :rules="[{ required: true, message: '请输入联系电话' }]" />
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.dws" required :disabled="disabled" name="单位数" label="单位数"
|
||||
placeholder="请输入单位数" input-align="right" type="digit" :rules="[{ required: true, message: '请输入单位数' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.addreess" required :disabled="disabled" name="地址" label="地址" readonly />
|
||||
<div @click="addDz"><van-icon name="location" color="#4788e1" size="6vw" /></div>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="item-li" v-for="(it, idx) in dzList" :key="idx">
|
||||
<span class="text">地址{{ idx + 1 }}:</span>
|
||||
<span class="info"><van-field v-model="it.dz" /></span>
|
||||
<span @click="deletItem('dz', idx)" class="iconClose"><van-icon name="close" color="red" size="6vw" /></span>
|
||||
</li>
|
||||
</ul>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.addreess" required :disabled="disabled" name="从业人员" label="从业人员" readonly />
|
||||
<div @click="showDialogfn('cyry')"><van-icon name="add-o" color="#4788e1" size="6vw" /></div>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="item-li" v-for="(it, idx) in dataList.ryList" :key="idx">
|
||||
<span class="text">人员:</span>
|
||||
<span class="info"><van-field readonly v-model="it.info" /></span>
|
||||
<span @click="deletItem('ry', idx)" class="iconClose"><van-icon name="close" color="red" size="6vw" /></span>
|
||||
</li>
|
||||
</ul>
|
||||
<li class="item">
|
||||
<van-field name="备注" readonly label="备注" />
|
||||
</li>
|
||||
<div class="textarea">
|
||||
<van-field placeholder="请输备注" v-model="normalForm.bz" :disabled="disabled" rows="4" autosize maxlength="500" show-word-limit type="textarea"></van-field>
|
||||
</div>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<van-button round block type="primary" native-type="submit" :loading="isLoading" loading-type="spinner" loading-text="登录中...">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker v-if="clickType == 'dwlx' || clickType == 'dwfl'" :columns="columns"
|
||||
@cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
<!-- 弹窗 -->
|
||||
<Select v-if="showSelect" :checked="r_checked" :selectType="selectType" :show="showSelect"
|
||||
:checkedList="hasCheckedList" @update:cancel="showSelect = false" @update:confirm="onComfirm" :key="selectIndex" />
|
||||
</template>
|
||||
<script setup>
|
||||
import Select from "./components/Select.vue";
|
||||
import { dwglDetail, editDwgl, addDwgl } from "../../../api/xfgl.js";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { hintToast, timeValidate } from "../../../utils/tools";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { ref, onMounted, reactive, defineProps } from "vue";
|
||||
const { D_BZ_DWLX, D_BZ_DWFL } = getDictList("D_BZ_DWLX", "D_BZ_DWFL");
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const message = ref("");
|
||||
const normalForm = ref({
|
||||
ssbmdm: JSON.parse(window.localStorage.getItem("userInfo")).deptList[0].deptCode
|
||||
});
|
||||
const columns = ref([]);
|
||||
const isLoading = ref(false);
|
||||
const disabled = ref(false)
|
||||
const isShowCommonPicker = ref(false);
|
||||
const clickType = ref(""); //点击选择
|
||||
const showSelect = ref(false);
|
||||
const r_checked = ref(""); //选择的类型
|
||||
const hasCheckedList = ref([]); //选择的类型
|
||||
const selectIndex = ref(1); //选择器组件KEY
|
||||
const title = ref("新增单位");
|
||||
const dzList = ref([])
|
||||
const selectType = ref('')
|
||||
const dataList = reactive({
|
||||
ryList: [], //人员
|
||||
});
|
||||
onMounted(() => {
|
||||
title.value = route.query.id ? "编辑单位" : "新增单位";
|
||||
// disabled.value = route.query.id ? true : false;
|
||||
if (route.query.id) _getDetailById(); //根据id获取详情
|
||||
});
|
||||
//根据id获取详情
|
||||
function _getDetailById() {
|
||||
dwglDetail(route.query.id).then((res) => {
|
||||
normalForm.value = res;
|
||||
D_BZ_DWLX.value.forEach((element) => {
|
||||
if (element.dm == res.dwlx) normalForm.value.dwlxmc = element.text;
|
||||
});
|
||||
D_BZ_DWFL.value.forEach((element) => {
|
||||
if (element.dm == res.dwfl) normalForm.value.dwflmc = element.text;
|
||||
});
|
||||
let list = res.cyry ? JSON.parse(res.cyry) : []
|
||||
dataList.ryList = list.map(item => {
|
||||
if (!item.info) item.xm + '(' + item.sfzh + ')'
|
||||
return item
|
||||
})
|
||||
hasCheckedList.value = dataList.ryList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
dzList.value = []
|
||||
for (let key in res) {
|
||||
if (key.search('dz') != -1) dzList.value.push({ dz: res[key] });
|
||||
}
|
||||
});
|
||||
}
|
||||
// 新增地址
|
||||
function addDz() {
|
||||
if (disabled.value) return false;
|
||||
dzList.value.push({ dz: '' })
|
||||
}
|
||||
// 打开弹窗
|
||||
function showDialogfn(type) {
|
||||
if (disabled.value) return false;
|
||||
selectType.value = type; //选取的类型
|
||||
showSelect.value = true; //打开弹窗
|
||||
hasCheckedList.value = [];
|
||||
r_checked.value = "";
|
||||
selectIndex.value++;
|
||||
hasChooseData();
|
||||
}
|
||||
// 已经选取的数据回显
|
||||
function hasChooseData() {
|
||||
switch (selectType.value) {
|
||||
case "cyry":
|
||||
if (!dataList.ryList.length) return false;
|
||||
hasCheckedList.value = dataList.ryList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//确认选择
|
||||
function onComfirm(val) {
|
||||
if (val.length <= 0) return false;
|
||||
switch (selectType.value) {
|
||||
case "cyry":
|
||||
dataList.ryList = val.map(v => {
|
||||
v.info = v.xm + '(' + v.sfzh + ')'
|
||||
return v
|
||||
}); //选取的组员
|
||||
normalForm.value.cyry = JSON.stringify(val)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 选择
|
||||
function getCommonPop(val) {
|
||||
if (disabled.value) return false;
|
||||
clickType.value = val;
|
||||
switch (val) {
|
||||
case "dwlx":
|
||||
columns.value = D_BZ_DWLX.value;
|
||||
break;
|
||||
case "dwfl":
|
||||
columns.value = D_BZ_DWFL.value;
|
||||
break;
|
||||
}
|
||||
isShowCommonPicker.value = true;
|
||||
}
|
||||
// 确定选择
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
switch (clickType.value) {
|
||||
case "dwlx":
|
||||
normalForm.value.dwlxmc = val.text;
|
||||
normalForm.value.dwlx = val.dm;
|
||||
break;
|
||||
case "dwfl":
|
||||
normalForm.value.dwflmc = val.text;
|
||||
normalForm.value.dwfl = val.dm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 删除选择的人员-地址
|
||||
function deletItem(type, index) {
|
||||
if (disabled.value) return false;
|
||||
switch (type) {
|
||||
case 'dz':
|
||||
dzList.value.splice(index, 1)
|
||||
break;
|
||||
case 'cyry':
|
||||
dataList.ryList.splice(index, 1);
|
||||
hasCheckedList.value = dataList.ryList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
normalForm.value.cyry = JSON.stringify(dataList.ryList)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
function onSubmit() {
|
||||
let pramas = {
|
||||
...normalForm.value
|
||||
}
|
||||
dzList.value.forEach((item, idex) => {
|
||||
if (idex > 0) {
|
||||
pramas['dz' + idex] = item.dz
|
||||
} else {
|
||||
pramas['dz'] = item.dz
|
||||
}
|
||||
})
|
||||
isLoading.value = true;
|
||||
if (title.value == '编辑单位') {
|
||||
editDwgl(pramas).then(res => {
|
||||
hintToast('编辑成功')
|
||||
router.push({ path: "/Declaration" });
|
||||
})
|
||||
} else {
|
||||
addDwgl(pramas).then(res => {
|
||||
hintToast('新增成功')
|
||||
router.push({ path: "/Declaration" });
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.infoBox {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.cardInfo {
|
||||
height: calc(100vh - 13vw);
|
||||
padding: 1vw 4vw;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// height: 8vw;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.mark {
|
||||
margin: 0 10px;
|
||||
color: red;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
|
||||
.item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: #0066ff;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
|
||||
.btn {
|
||||
padding: 2vw 6vw;
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 2vw 4vw;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info {
|
||||
margin: 0 10px;
|
||||
flex: 1;
|
||||
|
||||
::v-deep .van-cell__value {
|
||||
background: #e5eff5;
|
||||
padding-left: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
::v-deep .van-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #8b8b94;
|
||||
width: 16vw;
|
||||
}
|
||||
|
||||
.iconClose {
|
||||
display: inline-block;
|
||||
width: 6vw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.textarea {
|
||||
::v-deep .van-field__control {
|
||||
background: #f8fafd;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,386 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 13vw">
|
||||
<TopNav :navTitle="title" />
|
||||
<van-form @submit="onSubmit" style="height: calc(100vh - 13vw);">
|
||||
<div class="infoBox">
|
||||
<ul class="cardInfo">
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfsj" required name="时间" is-link readonly label="时间" placeholder="点击设置"
|
||||
input-align="right" :rules="[{ required: true, message: '请选择时间' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfzzXm" required name="巡访主责人" is-link readonly label="巡访主责人"
|
||||
placeholder="点击设置" input-align="right" :rules="[{ required: true, message: '请选择巡访主责人' }]"
|
||||
@click="showDialogfn('xfzz')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfzzSfzh" required name="身份证号" readonly input-align="right" label="身份证号"
|
||||
:rules="[{ required: true, message: '请输入组长身份证号' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xfmj" name="巡访同行人(民警)" is-link label-width="108px" readonly label="巡访同行人(民警)"
|
||||
placeholder="点击设置" input-align="right" @click="showDialogfn('xfmj')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xffj" name="巡访同行人(辅警)" is-link label-width="108px" readonly label="巡访同行人(辅警)"
|
||||
placeholder="点击设置" input-align="right" @click="showDialogfn('xffj')" />
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.sfdw" name="巡访单位" is-link readonly label="巡访单位" placeholder="点击设置"
|
||||
input-align="right" required :rules="[{ required: true, message: '请选择巡访单位' }]"
|
||||
@click="showDialogfn('xfdw')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.dz" required name="巡访地点" label="巡访地点" placeholder="输入地点" input-align="right"
|
||||
:rules="[{ required: true, message: '请选择巡访地点' }]" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.xflxmc" required name="巡访类型" is-link readonly label="巡访类型" placeholder="点击设置"
|
||||
input-align="right" :rules="[{ required: true, message: '请选择巡访类型' }]" @click="getCommonPop('xflx')" />
|
||||
</li>
|
||||
<li class="item">
|
||||
<van-field v-model="normalForm.rwztmc" name="任务状态" is-link readonly label="任务状态" placeholder="选择任务状态"
|
||||
input-align="right" @click="getCommonPop('rwzt')" />
|
||||
</li>
|
||||
|
||||
<li class="item">
|
||||
<van-field name="巡访内容" @click="showDialogfn('xfnr')" readonly label="巡访内容" />
|
||||
</li>
|
||||
<div class="textarea">
|
||||
<van-field placeholder="请输相关内容" v-model="normalForm.xfnr" rows="4" autosize maxlength="500" show-word-limit type="textarea"></van-field>
|
||||
</div>
|
||||
<li class="item">
|
||||
<div><span class="mark"></span>拍照打卡</div>
|
||||
</li>
|
||||
<!-- 附件 -->
|
||||
<div class="fjBox">
|
||||
<van-uploader v-model="fileList" multiline :max-count="3" :after-read="afterRead"></van-uploader>
|
||||
</div>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<van-button round block type="primary" native-type="submit" :loading="isLoading" loading-type="spinner" loading-text="登录中...">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-form>
|
||||
<!-- 弹窗 -->
|
||||
<van-popup v-model:show="isShowCommonPicker" round position="bottom">
|
||||
<van-picker :columns="columns" @cancel="isShowCommonPicker = false" @confirm="onConfirm" />
|
||||
</van-popup>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<Select v-if="showSelect" :checked="r_checked" :selectType="selectType" :show="showSelect"
|
||||
:checkedList="hasCheckedList" @update:cancel="showSelect = false" @update:confirm="onComfirm"
|
||||
:key="selectIndex" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { baseUrl2 } from "@/utils/request.js";
|
||||
import ImageCompressor from "image-compressor.js";
|
||||
import { upImage } from "@/api/common";
|
||||
import Select from "./components/Select.vue";
|
||||
import { hintToast, timeValidate } from "../../../utils/tools";
|
||||
import { rwDetail, eidtRw, addRw } from "../../../api/xfgl.js";
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { ref, onMounted, reactive, defineProps, nextTick } from "vue";
|
||||
const { D_BZ_XFLX, D_BZ_RWZT } = getDictList("D_BZ_XFLX", "D_BZ_RWZT");
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const fileList = ref([]);
|
||||
|
||||
const normalForm = ref({
|
||||
xfsj: timeValidate(),
|
||||
rwztmc: '正常',
|
||||
rwzt: 0
|
||||
});
|
||||
const title = ref("新增巡防任务");
|
||||
const clickType = ref(""); //点击选择
|
||||
const columns = ref([]);
|
||||
const time = ref();
|
||||
const isShowCommonPicker = ref(false);
|
||||
const showSelect = ref(false);
|
||||
const selectType = ref(""); //选择的类型
|
||||
const r_checked = ref(""); //选择的类型
|
||||
const hasCheckedList = ref([]); //选择的类型
|
||||
const selectIndex = ref(1); //选择器组件KEY
|
||||
const wpTpIdList = ref([]);
|
||||
const isLoading = ref(false)
|
||||
const urlImg = `${baseUrl2}/mosty-api/mosty-base/minio/image/download/`;
|
||||
|
||||
const dataList = reactive({
|
||||
fzrList: [], //巡访组长
|
||||
nrList: [], //巡访内容
|
||||
mjList: [], //组员民警
|
||||
fjList: [], //组员辅警
|
||||
xfdwList: [],//巡访单位
|
||||
});
|
||||
onMounted(() => {
|
||||
title.value = route.query.id ? "编辑巡防任务" : "新增巡防任务";
|
||||
if (route.query.id) {
|
||||
nextTick(() => {
|
||||
_getDetailById(); //根据id获取详情
|
||||
});
|
||||
}
|
||||
});
|
||||
// 打开弹窗
|
||||
function showDialogfn(type) {
|
||||
selectType.value = type; //选取的类型
|
||||
showSelect.value = true; //打开弹窗
|
||||
hasCheckedList.value = [];
|
||||
r_checked.value = "";
|
||||
selectIndex.value++;
|
||||
hasChooseData();
|
||||
}
|
||||
// 已经选取的数据回显
|
||||
function hasChooseData() {
|
||||
switch (selectType.value) {
|
||||
case "xfzz":
|
||||
if (!dataList.fzrList.length) return false;
|
||||
r_checked.value = dataList.fzrList[0].key;
|
||||
break;
|
||||
case "xfnr":
|
||||
if (!dataList.nrList.length) return false;
|
||||
r_checked.value = dataList.nrList[0].key;
|
||||
break;
|
||||
case "xfmj":
|
||||
if (!dataList.mjList.length) return false;
|
||||
hasCheckedList.value = dataList.mjList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
case "xffj":
|
||||
if (!dataList.fjList.length) return false;
|
||||
hasCheckedList.value = dataList.fjList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
case "xfdw":
|
||||
if (!dataList.xfdwList.length) return false;
|
||||
hasCheckedList.value = dataList.xfdwList.map((item) => {
|
||||
return item.key;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//确认选择
|
||||
function onComfirm(val) {
|
||||
if (val.length <= 0) return false;
|
||||
switch (selectType.value) {
|
||||
case "xfzz":
|
||||
dataList.fzrList = val; //选取的负责人数据
|
||||
normalForm.value.xfzzXm = val[0].xm;
|
||||
normalForm.value.xfzzSfzh = val[0].sfzh;
|
||||
break;
|
||||
case "xfnr":
|
||||
dataList.nrList = val; //巡防内容
|
||||
normalForm.value.xfnr = val[0].nr;
|
||||
break;
|
||||
case "xfmj":
|
||||
dataList.mjList = val; //选取的组员民警
|
||||
normalForm.value.xfmj = val.map(v => { return v.xm }).join(',')
|
||||
break;
|
||||
case "xffj":
|
||||
dataList.fjList = val; //选取的组员辅警
|
||||
normalForm.value.xffj = val.map(v => { return v.xm }).join(',')
|
||||
break;
|
||||
case "xfdw":
|
||||
dataList.xfdwList = val; //选取的单位
|
||||
normalForm.value.sfdw = val.map(v => { return v.dwmc }).join(',')
|
||||
normalForm.value.dz = val[0].dz
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//根据id获取详情
|
||||
function _getDetailById() {
|
||||
rwDetail(route.query.id).then((res) => {
|
||||
let List = JSON.parse(res.xfzy);
|
||||
dataList.mjList = List.filter(v => { return v.fl == '01' })
|
||||
res.xfmj = dataList.mjList.map(it => { return it.xm }).join(',')
|
||||
dataList.fjList = List.filter(v => { return v.fl == '02' })
|
||||
res.xffj = dataList.fjList.map(it => { return it.xm }).join(',')
|
||||
|
||||
D_BZ_XFLX.value.forEach((element) => {
|
||||
if (element.dm == res.xflx) res.xflxmc = element.text;
|
||||
});
|
||||
D_BZ_RWZT.value.forEach((element) => {
|
||||
if (element.dm == res.rwzt) res.rwztmc = element.text;
|
||||
});
|
||||
dataList.xfdwList = JSON.parse(res.xfdw)
|
||||
res.sfdw = dataList.xfdwList.map(it => { return it.dwmc }).join(',')
|
||||
res.dz = dataList.xfdwList.length > 0 ? dataList.xfdwList[0].dz : '';
|
||||
let ids = res.xfzp.split(',')
|
||||
fileList.value = []
|
||||
ids.forEach(item => {
|
||||
let img = baseUrl2 + "/mosty-api/mosty-base/minio/image/download/" + item;
|
||||
let obj = {
|
||||
url: img,
|
||||
codeId: item,
|
||||
isImage: true,
|
||||
status: "done",
|
||||
message: "上传成功",
|
||||
};
|
||||
fileList.value.push(obj)
|
||||
});
|
||||
normalForm.value = res;
|
||||
});
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
function getCommonPop(val) {
|
||||
clickType.value = val;
|
||||
switch (val) {
|
||||
case "xflx":
|
||||
columns.value = D_BZ_XFLX.value;
|
||||
break;
|
||||
case "rwzt":
|
||||
columns.value = D_BZ_RWZT.value;
|
||||
break;
|
||||
}
|
||||
isShowCommonPicker.value = true;
|
||||
}
|
||||
|
||||
// 确定选择
|
||||
function onConfirm(val) {
|
||||
isShowCommonPicker.value = false;
|
||||
switch (clickType.value) {
|
||||
case "xflx":
|
||||
normalForm.value.xflxmc = val.text;
|
||||
normalForm.value.xflx = val.dm;
|
||||
break;
|
||||
case "rwzt":
|
||||
normalForm.value.rwztmc = val.text;
|
||||
normalForm.value.rwzt = val.dm;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 文件预览
|
||||
async function afterRead(file) {
|
||||
file.message = "上传中...";
|
||||
let fileBlob = await _compressImage(file.file);
|
||||
let fileData = new File([fileBlob], fileBlob.name, { type: fileBlob.type });
|
||||
const data = new FormData();
|
||||
data.append("file", fileData);
|
||||
file.status = "uploading";
|
||||
upImage(data).then((res) => {
|
||||
file.status = "done";
|
||||
file.message = "上传成功";
|
||||
if (!wpTpIdList.value.includes(res)) wpTpIdList.value.push(res);
|
||||
});
|
||||
}
|
||||
//压缩图片
|
||||
const _compressImage = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
new ImageCompressor(file, {
|
||||
quality: 0.6, //压缩质量
|
||||
success(res) {
|
||||
resolve(res);
|
||||
},
|
||||
error(e) {
|
||||
reject(e);
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 提交
|
||||
function onSubmit() {
|
||||
let arr = [...dataList.mjList, ...dataList.fjList]
|
||||
let params = {
|
||||
...normalForm.value,
|
||||
xfzy: JSON.stringify(arr),
|
||||
xfdw: JSON.stringify(dataList.xfdwList),
|
||||
}
|
||||
let ids1 = fileList.value.filter(item => { return item.codeId }).map(v => { return v.codeId })
|
||||
let ids2 = wpTpIdList.value.join(',')
|
||||
params.xfzp = (ids1.concat(ids2)).join(',')
|
||||
isLoading.value = true;
|
||||
if (title.value == '编辑巡防任务') {
|
||||
eidtRw(params).then(res => {
|
||||
hintToast('编辑成功')
|
||||
router.go(-1);
|
||||
})
|
||||
} else {
|
||||
addRw(params).then(res => {
|
||||
hintToast('新增成功')
|
||||
router.go(-1);
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.infoBox {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.cardInfo {
|
||||
height: calc(100vh - 13vw);
|
||||
padding: 1vw 4vw;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.mark {
|
||||
margin: 0 10px;
|
||||
color: red;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
|
||||
.item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 0;
|
||||
top: 32%;
|
||||
background: #0066ff;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
|
||||
.btn {
|
||||
padding: 2vw 6vw;
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.textarea {
|
||||
::v-deep .van-field__control {
|
||||
background: #f8fafd;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.fjBox {
|
||||
padding: 4vw;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@ -1,327 +0,0 @@
|
||||
<template>
|
||||
<van-popup v-model:show="props.show" style="width: 90%">
|
||||
<div class="popupTitle">{{ popupTitle }}</div>
|
||||
<van-search v-model="kwd" :placeholder="placeholder" @search="onUpdate" @clear="onClear" />
|
||||
<div class="check-data-box" ref="listBox" :loading="loading">
|
||||
<!-- 单选 -->
|
||||
<van-radio-group v-model="radioChecked" v-if="isRadio">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="item in list.mulChooseList" clickable :key="item" :title="`${item.value}`" :border="false">
|
||||
<template #right-icon>
|
||||
<van-radio :name="item.key" @click="onRadionChange(item.key)" />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
<!-- 多选 -->
|
||||
<van-checkbox-group v-model="checkedLists" v-else @change="onCheckboxnChange">
|
||||
<van-cell-group>
|
||||
<van-cell v-for="item in list.mulChooseList" clickable :key="item" :title="`${item.value}`">
|
||||
<template #right-icon>
|
||||
<van-checkbox shape="square" :name="item.key" />
|
||||
</template>
|
||||
<template #label v-if="title === '选择警用器械'">
|
||||
数量:
|
||||
<van-stepper v-model="item.sl" integer />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<van-empty description="没有数据" image="default" v-if="list.mulChooseList.length <= 0 && showEmpty" />
|
||||
</div>
|
||||
<div class="popbtn-box">
|
||||
<van-button style="flex: 1" type="default" @click="onCancel">取消
|
||||
</van-button>
|
||||
<van-button style="flex: 1" type="primary" @click="onConfirm">确定</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getBBData } from "@/api/xfbbAndZbbb.js";
|
||||
import { defineProps, ref, defineEmits, watch, reactive, onMounted } from "vue";
|
||||
import { dateFormat, hintToast } from "@/utils/tools";
|
||||
const props = defineProps({
|
||||
selectType: String, //查询的类型 详情见watch 监听
|
||||
show: Boolean, //是否显示
|
||||
checkedList: Array, //默认选中 多选
|
||||
checked: String, //单选
|
||||
});
|
||||
const emits = defineEmits([
|
||||
"update:cancel",
|
||||
"update:confirm",
|
||||
"update:kwd",
|
||||
"update:tabs",
|
||||
"update:tag",
|
||||
]);
|
||||
const hasChoosZb = ref([]);
|
||||
const listBox = ref(null);
|
||||
const page = ref(1);
|
||||
const size = ref(10);
|
||||
const total = ref(0);
|
||||
const radioChecked = ref("");
|
||||
const checkedLists = ref([]);
|
||||
const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const selectObj = ref([]); //选中的数据
|
||||
const tagCode = ref(""); //智能设备选中状态
|
||||
const placeholder = ref(""); //占位字符
|
||||
const showEmpty = ref(false);
|
||||
const kwd = ref(""); //选择器关键字
|
||||
const selectType = ref(""); //选择的类型
|
||||
const znzbCode = ref(""); //智能装备类型筛选
|
||||
const popupTitle = ref(""); //标题
|
||||
const isRadio = ref(false); //是否是单选
|
||||
const list = reactive({
|
||||
mulChooseList: []
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.selectType,
|
||||
(newValue) => {
|
||||
checkedLists.value = props.checkedList;
|
||||
radioChecked.value = props.checked;
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
onMounted(() => {
|
||||
_getSelectData(props.selectType);
|
||||
scroll();
|
||||
});
|
||||
|
||||
//触底加载
|
||||
function scroll() {
|
||||
let scrollTargetBox = listBox.value;
|
||||
if (!scrollTargetBox) return false;
|
||||
scrollTargetBox.onscroll = (e) => {
|
||||
var scrollHeight = scrollTargetBox.scrollHeight; //251
|
||||
var scrollTop = scrollTargetBox.scrollTop; //0-18
|
||||
var clientHeight = scrollTargetBox.clientHeight; //233
|
||||
if (scrollHeight - clientHeight == scrollTop) {
|
||||
//滚动条滚到最底部
|
||||
if (list.mulChooseList.length < total.value) {
|
||||
page.value++;
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//获取数据
|
||||
function _getSelectData(val) {
|
||||
let obj = {}; //亲求路径及参数
|
||||
switch (val) {
|
||||
case "xfzz":
|
||||
case "xfmj":
|
||||
case "xffj":
|
||||
popupTitle.value = "选择民警";
|
||||
placeholder.value = "请输入姓名";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfll/getXfllList";
|
||||
obj["jllx"] = "01";
|
||||
if (val == 'xffj') {
|
||||
popupTitle.value = "选择辅警";
|
||||
obj["jllx"] = "02";
|
||||
}
|
||||
isRadio.value = false;
|
||||
if (val == "xfzz") isRadio.value = true;
|
||||
break;
|
||||
case "xfdw":
|
||||
popupTitle.value = "选择巡访单位";
|
||||
placeholder.value = "请输入单位名称";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfDwgl";
|
||||
isRadio.value = false;
|
||||
break;
|
||||
case "xfnr":
|
||||
popupTitle.value = "选择巡访内容";
|
||||
placeholder.value = "请输入巡访内容";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfNrmb";
|
||||
isRadio.value = true;
|
||||
break;
|
||||
case "cyry":
|
||||
popupTitle.value = "选择从业人员";
|
||||
placeholder.value = "选择从业人员";
|
||||
obj["url"] = "/mosty-jcgl/tbJcglXfCyry";
|
||||
isRadio.value = false;
|
||||
break;
|
||||
}
|
||||
if (Object.keys(obj).length > 0) _getBBData(obj, val);
|
||||
}
|
||||
//获取数据
|
||||
function _getBBData(obj, type) {
|
||||
//url 请求地址,jllx 警力类型 有需要就传,scode 智能装备筛选条件 有需要就传
|
||||
let { url, jllx, xz } = obj;
|
||||
loading.value = true;
|
||||
let data = { keyword: kwd.value, jllx, pageCurrent: page.value, pageSize: size.value };
|
||||
if (type == 'xfnr') {
|
||||
data = { nr: kwd.value, pageCurrent: page.value, pageSize: size.value }
|
||||
}
|
||||
getBBData(url, data)
|
||||
.then((res) => {
|
||||
loading.value = false;
|
||||
total.value = res.total;
|
||||
if (jllx) {
|
||||
if (res && res.records && res.records.length > 0) {
|
||||
_setData(res.records, type);
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
} else {
|
||||
if (res && res.length > 0 && !res.records) {
|
||||
_setData(res, type);
|
||||
} else if (res && res.records) {
|
||||
_setData(res.records, type);
|
||||
} else {
|
||||
showEmpty.value = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
showEmpty.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
//搜索关键词
|
||||
function onUpdate(val) {
|
||||
page.value = 1;
|
||||
list.mulChooseList = [];
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
//清空关键字
|
||||
function onClear() {
|
||||
list.mulChooseList = [];
|
||||
_getSelectData(props.selectType);
|
||||
}
|
||||
//关闭弹窗
|
||||
function onCancel() {
|
||||
emits("update:cancel", false);
|
||||
}
|
||||
//点击单选
|
||||
function onRadionChange(val) {
|
||||
_backData(val);
|
||||
}
|
||||
//点击多选
|
||||
function onCheckboxnChange(val) {
|
||||
_backData(val);
|
||||
}
|
||||
|
||||
//确认选择
|
||||
function onConfirm() {
|
||||
emits("update:confirm", selectObj.value);
|
||||
emits("update:cancel", false);
|
||||
}
|
||||
//处理返回父组件数据
|
||||
function _backData(val) {
|
||||
if (typeof val == "string") {
|
||||
//单选数据
|
||||
let obj = list.mulChooseList.find((item) => {
|
||||
return item.key == val;
|
||||
});
|
||||
selectObj.value = [obj];
|
||||
} else {
|
||||
//多选数据
|
||||
let arr = [];
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
for (let j = 0; j < list.mulChooseList.length; j++) {
|
||||
if (val[i] == list.mulChooseList[j].key) {
|
||||
arr.push(list.mulChooseList[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
selectObj.value = arr;
|
||||
}
|
||||
}
|
||||
|
||||
//设置数据
|
||||
function _setData(res, type) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
switch (type) {
|
||||
case "xfzz":
|
||||
case "xfzy":
|
||||
case "xfmj":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].xm}`;
|
||||
res[i].key = res[i].ryid;
|
||||
break;
|
||||
case "xffj":
|
||||
res[i].value = `${res[i].ssbm}-${res[i].xm}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "xfdw":
|
||||
res[i].value = `${res[i].dwmc}(电话:${res[i].lxdh})`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "xfnr":
|
||||
res[i].value = `${res[i].nr}`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
case "cyry":
|
||||
res[i].value = `${res[i].xm}(${res[i].sfzh})`;
|
||||
res[i].key = res[i].id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (page.value == 1) {
|
||||
list.mulChooseList = res;
|
||||
} else {
|
||||
list.mulChooseList = list.mulChooseList.concat(res);
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/assets/styles/mixin.scss";
|
||||
|
||||
.popupTitle {
|
||||
text-align: center;
|
||||
background-color: rgb(11, 137, 247);
|
||||
height: 6vh;
|
||||
line-height: 6vh;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.popbtn-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding-top: 2vw;
|
||||
}
|
||||
|
||||
.check-data-box {
|
||||
height: 100vw;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep .van-stepper__input {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.zn_tag_select {
|
||||
padding: 2vw 3.5vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.squre {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 4px;
|
||||
margin-left: 10px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.isActiveAll {
|
||||
background: #1989fa;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .van-cell {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
::v-deep .van-cell__title,
|
||||
.van-cell__value {
|
||||
margin-right: 1vw;
|
||||
}
|
||||
</style>
|
||||
@ -1,71 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="XFItem-box">
|
||||
<div class="name">
|
||||
{{props.data.xm}}
|
||||
<span v-for="v in props.dic.D_BZ_XB " :key="v">
|
||||
<span class="xb" v-if="v.dm == props.data.xb">{{v.text}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
身份证号:<span class="mess">{{props.data.sfzh}}</span>
|
||||
</div>
|
||||
<div class="text">籍贯:<span class="mess">{{props.data.jg}}</span></div>
|
||||
<div class="text">联系电话:<span class="mess">{{props.data.lxdh}}</span></div>
|
||||
</div>
|
||||
<template #right>
|
||||
<van-button style="height: 100%; width: 60px" type="primary" @click="gotoEdit">编辑</van-button>
|
||||
<van-button style="height: 100%; width: 60px" type="danger" @click="deleteItem" >删除</van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref, onMounted, reactive, defineEmits, defineProps } from "vue";
|
||||
const emits = defineEmits(["deletedata"]);
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
dic:{
|
||||
type: Object,
|
||||
default: {},
|
||||
}
|
||||
});
|
||||
|
||||
// 编辑
|
||||
function gotoEdit() {
|
||||
localStorage.setItem('XF_Active',0)
|
||||
router.push({ path: "/Declaration/addEditCyry", query: { id: props.data.id } });
|
||||
}
|
||||
// 删除
|
||||
function deleteItem() {
|
||||
emits("deletedata", props.data.id);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.XFItem-box {
|
||||
padding: 3vw 4vw;
|
||||
box-sizing: border-box;
|
||||
background-color: #f6fafd;
|
||||
position: relative;
|
||||
.name {
|
||||
color: #4788e1;
|
||||
line-height: 6vw;
|
||||
.xb {
|
||||
margin: 0 14px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
color: #9f9f9f;
|
||||
line-height: 6vw;
|
||||
.mess {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="XFItem-box">
|
||||
<div class="item-tip" :class="changeBq(props.data.dwlx)">{{ setDict(props.data.dwlx, props.dic.D_BZ_DWLX) }}</div>
|
||||
<div class="text">归属单位:<span class="mess">{{props.data.dwmc}}</span></div>
|
||||
<div class="text">单位名称:<span class="mess">{{props.data.ssbm}}</span></div>
|
||||
<div class="text">单位地址:<span class="mess">{{props.data.dz}}</span></div>
|
||||
<div class="text">单位分类:<span class="mess">{{ setDict(props.data.dwfl, props.dic.D_BZ_DWFL) }}</span></div>
|
||||
</div>
|
||||
<template #right>
|
||||
<van-button style="height:100%;width:60px;" type="primary" @click="gotoEdit">编辑</van-button>
|
||||
<van-button style="height:100%;width:60px;" type="danger" @click="deleteItem">删除</van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { setDict } from "../../../../utils/dict";
|
||||
import { ref, onMounted, reactive, defineEmits,defineProps } from "vue";
|
||||
const emits = defineEmits(['deletedata'])
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
data:{
|
||||
type:Object,
|
||||
default:{}
|
||||
},
|
||||
dic:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
});
|
||||
|
||||
// 编辑
|
||||
function gotoEdit(){
|
||||
localStorage.setItem('XF_Active',1)
|
||||
router.push({path: "/Declaration/addEditDw", query: {id:props.data.id}});
|
||||
}
|
||||
// 删除
|
||||
function deleteItem(){
|
||||
emits('deletedata',props.data.id)
|
||||
}
|
||||
// 标签
|
||||
function changeBq(val){
|
||||
switch(val){
|
||||
case '02':
|
||||
return 'green';
|
||||
break;
|
||||
case '01':
|
||||
return 'blue';
|
||||
break;
|
||||
default:
|
||||
return 'blue';
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.XFItem-box {
|
||||
padding: 3vw 4vw;
|
||||
box-sizing: border-box;
|
||||
background-color: #f6fafd;
|
||||
position: relative;
|
||||
.item-tip {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 60px;
|
||||
height: 26px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 26px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.red {
|
||||
background: url("../../../../assets/images/red.png") no-repeat;
|
||||
}
|
||||
.green {
|
||||
background: url("../../../../assets/images/green.png") no-repeat;
|
||||
}
|
||||
.blue {
|
||||
background: url("../../../../assets/images/blue.png") no-repeat;
|
||||
}
|
||||
.orange {
|
||||
background: url("../../../../assets/images/orange.png") no-repeat;
|
||||
}
|
||||
.text {
|
||||
color: #9f9f9f;
|
||||
line-height: 6vw;
|
||||
.mess {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,81 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="XFItem-box">
|
||||
<div class="time"><van-icon name="clock-o" />{{props.data.xfsj}}</div>
|
||||
<div class="text">巡防主责人:<span class="mess">{{props.data.xfzzXm}}</span></div>
|
||||
<div class="text">巡防商铺:
|
||||
<span class="mess">
|
||||
<span class="tag" v-for="it in props.data.xfdw" :key="it.id" style="margin:0 4px;">{{it.dwmc}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="text">巡防类型:
|
||||
<span class="mess">{{ setDict(props.data.xflx, props.dic.D_BZ_XFLX) }}</span></div>
|
||||
<div class="text text_detail">
|
||||
巡防内容:<span class="mess">{{props.data.xfnr}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<template #right>
|
||||
<van-button style="height:100%;width:60px;" type="primary" @click="gotoEdit">编辑</van-button>
|
||||
<van-button style="height:100%;width:60px;" type="danger" @click="deleteItem">删除</van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { setDict } from "../../../../utils/dict";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref, onMounted, reactive, defineEmits,defineProps } from "vue";
|
||||
const emits = defineEmits(['deletedata'])
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
data:{
|
||||
type:Object,
|
||||
default:{}
|
||||
},
|
||||
dic:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
});
|
||||
|
||||
// 编辑
|
||||
function gotoEdit(){
|
||||
localStorage.setItem('XF_Active',2)
|
||||
router.push({path: "/Declaration/addEditRw", query: {id:props.data.id}});
|
||||
}
|
||||
// 删除
|
||||
function deleteItem(){
|
||||
emits('deletedata',props.data.id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.XFItem-box {
|
||||
padding: 3vw 4vw;
|
||||
box-sizing: border-box;
|
||||
background-color: #f6fafd;
|
||||
position: relative;
|
||||
.time {
|
||||
font-size: 16px;
|
||||
line-height: 5vw;
|
||||
.van-icon-clock-o {
|
||||
margin-right: 2vw;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
color: #9f9f9f;
|
||||
line-height: 6vw;
|
||||
.mess {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tag{
|
||||
border: 1px solid #5e9fdd;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
color: #409eff;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
</style>
|
||||
@ -1,110 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="XFItem-box">
|
||||
<!-- <div class="item-tip" :class="changeBq(props.data.lx)">{{props.data.ztmc}}</div> -->
|
||||
<div class="time"><van-icon name="clock-o" />{{props.data.sbsj}}</div>
|
||||
<div class="text">申报类型:<span class="mess">{{ setDict(props.data.sblx, props.dic.D_SB_SBLX) }}</span></div>
|
||||
<div class="text text_detail">
|
||||
申报内容:<span class="mess">{{props.data.sbyy}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<template #right>
|
||||
<van-button style="height:100%;width:60px;" type="primary" @click="gotoEdit">编辑</van-button>
|
||||
<van-button style="height:100%;width:60px;" type="danger" @click="deleteItem">删除</van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { setDict } from "../../../../utils/dict";
|
||||
import { ref, onMounted, reactive, defineEmits,defineProps } from "vue";
|
||||
const emits = defineEmits(['deletedata'])
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
data:{
|
||||
type:Object,
|
||||
default:{lx:0}
|
||||
} ,
|
||||
dic:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
});
|
||||
// 标签
|
||||
function changeBq(val){
|
||||
switch(val){
|
||||
case 0:
|
||||
return 'orange';
|
||||
break;
|
||||
case 1:
|
||||
return 'green';
|
||||
break;
|
||||
case 2:
|
||||
return 'red';
|
||||
break;
|
||||
case 3:
|
||||
return 'blue';
|
||||
break;
|
||||
default:
|
||||
return 'blue';
|
||||
}
|
||||
|
||||
}
|
||||
// 编辑
|
||||
function gotoEdit(){
|
||||
localStorage.setItem('XF_Active',3)
|
||||
router.push({path: "/Declaration/addEdit", query: {id:props.data.id}});
|
||||
}
|
||||
// 删除
|
||||
function deleteItem(){
|
||||
emits('deletedata',props.data.id)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.XFItem-box {
|
||||
padding: 3vw 4vw;
|
||||
box-sizing: border-box;
|
||||
background-color: #f6fafd;
|
||||
position: relative;
|
||||
.time {
|
||||
font-size: 16px;
|
||||
line-height: 5vw;
|
||||
.van-icon-clock-o {
|
||||
margin-right: 2vw;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
color: #9f9f9f;
|
||||
line-height: 6vw;
|
||||
.mess {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.item-tip {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 60px;
|
||||
height: 26px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 26px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.red {
|
||||
background: url("../../../../assets/images/red.png") no-repeat;
|
||||
}
|
||||
.green {
|
||||
background: url("../../../../assets/images/green.png") no-repeat;
|
||||
}
|
||||
.blue {
|
||||
background: url("../../../../assets/images/blue.png") no-repeat;
|
||||
}
|
||||
.orange {
|
||||
background: url("../../../../assets/images/orange.png") no-repeat;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,100 +0,0 @@
|
||||
<template>
|
||||
<van-swipe-cell>
|
||||
<div class="XFItem-box" @click.stop="handleItem(props.data)">
|
||||
<div class="isCheck" v-show="props.data.isCheck" :class="props.data.isCheck ? 'isCheck-y':''"><van-icon name="success" color="#ffffff"></van-icon></div>
|
||||
<div class="time"><van-icon name="clock-o" />{{props.data.xfsj}}</div>
|
||||
<div class="text">巡防主责人:<span class="mess">{{props.data.xfzzXm}}</span></div>
|
||||
<div class="text">巡防商铺:
|
||||
<span class="mess">
|
||||
<span class="tag" v-for="it in props.data.xfdw" :key="it.id" style="margin:0 4px;">{{it.dwmc}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="text">巡防类型:
|
||||
<span class="mess">{{ setDict(props.data.xflx, props.dic.D_BZ_XFLX) }}</span></div>
|
||||
<div class="text text_detail">
|
||||
巡防内容:<span class="mess">{{props.data.xfnr}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<template #right>
|
||||
<van-button style="height:100%;width:60px;" type="primary" @click="gotoEdit">编辑</van-button>
|
||||
<van-button style="height:100%;width:60px;" type="danger" @click="deleteItem">删除</van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { setDict } from "../../../../utils/dict";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref, onMounted, reactive, defineEmits,defineProps } from "vue";
|
||||
const emits = defineEmits(['deletedata','chooseData'])
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
data:{
|
||||
type:Object,
|
||||
default:{}
|
||||
},
|
||||
dic:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
});
|
||||
|
||||
// 编辑
|
||||
function gotoEdit(){
|
||||
localStorage.setItem('XF_Active',3)
|
||||
router.push({path: "/Declaration/addEdit", query: {id:props.data.id}});
|
||||
}
|
||||
// 删除
|
||||
function deleteItem(){
|
||||
emits('deletedata',props.data.id)
|
||||
}
|
||||
// 点击
|
||||
function handleItem(item){
|
||||
emits('chooseData',item)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.XFItem-box {
|
||||
padding: 3vw 4vw;
|
||||
box-sizing: border-box;
|
||||
background-color: #f6fafd;
|
||||
position: relative;
|
||||
.isCheck{
|
||||
position: absolute;
|
||||
top: 0vw;
|
||||
right: 0vw;
|
||||
width: 6vw;
|
||||
height: 6vw;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #c8c9cc;
|
||||
text-align: center;
|
||||
line-height: 6vw;
|
||||
}
|
||||
.isCheck-y{
|
||||
background: #1989fa;
|
||||
}
|
||||
.time {
|
||||
font-size: 16px;
|
||||
line-height: 5vw;
|
||||
.van-icon-clock-o {
|
||||
margin-right: 2vw;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
color: #9f9f9f;
|
||||
line-height: 6vw;
|
||||
.mess {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tag{
|
||||
border: 1px solid #5e9fdd;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
color: #409eff;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
</style>
|
||||
@ -1,515 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<TopNav navTitle="巡访管理" :rightTitle="rightTitle" @clickRight="clickRight" />
|
||||
<div>
|
||||
<Tabs :checked="isActive" :list="zdModule" @onYjjb="changeTab" />
|
||||
<Search placeholder="请输入关键字" v-model="keyWord" :isSx="true" @update:sx="handleSx" @update:modelValue="onSearch">
|
||||
</Search>
|
||||
<SxPopup :showPopup="showPopup" :list="sxList" :p_top="145" :showTime="isShowTime" @update:close="showPopup = false" @update:onConfirm="onConfirm" @reset="reset">
|
||||
</SxPopup>
|
||||
|
||||
<!-- 列表数据 -->
|
||||
<ul class="listBox" :loading="isLoading" ref="dateScroll">
|
||||
<li style="margin-bottom: 2vw" v-for="(item, idex) in list" :key="idex">
|
||||
<CyryItem v-if="isActive == 0" @deletedata="deletedata" :dic="{ D_BZ_XB }" :data="item" />
|
||||
<DwglItem v-if="isActive == 1" @deletedata="deletedata" :dic="{ D_BZ_DWLX, D_BZ_DWFL }" :data="item" />
|
||||
<RwItem v-if="isActive == 2" @deletedata="deletedata" :data="item" :dic="{ D_BZ_XFLX }" />
|
||||
<ZgItem v-if="isActive == 3" @deletedata="deletedata" @chooseData="chooseData" :data="item"
|
||||
:dic="{ D_BZ_XFLX }" />
|
||||
<!-- <ZgItem v-if="isActive == 3" @deletedata="deletedata" :data="item" :dic="{D_SB_SBLX}" /> -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import Tabs from "../../../components/tabs.vue";
|
||||
import Search from "../../../components/search.vue";
|
||||
import SxPopup from "../../../components/SxPopupNew.vue";
|
||||
import ZgItem from "./components/zgItem.vue";
|
||||
import CyryItem from "./components/cyryItem.vue";
|
||||
import RwItem from "./components/rwItem.vue";
|
||||
import DwglItem from "./components/dwglItem.vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { Dialog, Notify } from "vant";
|
||||
import { getdataCyry, deletedataCyry, getdataDwgl, deletedataDw, deletedataZg, getdataRw, plsbData, deletedataRw, getdataZg } from "../../../api/xfgl.js";
|
||||
import { getDictList, setDict } from "../../../utils/dict";
|
||||
import { setTimeQuantum, dateFormat, hintToast } from "../../../utils/tools.js";
|
||||
import { ref, reactive, watch, onMounted, nextTick } from "vue";
|
||||
const { D_BZ_XB, D_BZ_DWFL, D_BZ_DWLX, D_BZ_XFLX, D_SB_SBLX } = getDictList("D_BZ_XB", "D_BZ_DWFL", "D_BZ_DWLX", "D_BZ_XFLX", "D_SB_SBLX");
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const dateScroll = ref(null)
|
||||
const isLoading = ref(false) //加载
|
||||
const zdModule = ref([
|
||||
{ name: "从业人员管理" },
|
||||
{ name: "单位管理" },
|
||||
{ name: "巡防任务" },
|
||||
{ name: "战果管理" },
|
||||
]);
|
||||
const keyWord = ref(""); //关键字搜索
|
||||
const showPopup = ref(false); //赛选条件窗口
|
||||
const dateForm = ref({
|
||||
sblxmc: "",
|
||||
sblxdm: "",
|
||||
});
|
||||
const isShowTime = ref(true);
|
||||
const selectList = ref([]); //选择类型
|
||||
const List1 = ref([
|
||||
{ label: "类型1", value: "01" },
|
||||
{ label: "类型2", value: "02" },
|
||||
{ label: "类型3", value: "03" },
|
||||
]);
|
||||
|
||||
const chooseType = ref(false); //选择类型
|
||||
|
||||
const rightTitle = ref('新增')
|
||||
const sxList = ref([]); //筛选条件数据
|
||||
const pageCurrent = ref(1); //分页
|
||||
const total = ref(0); //总数
|
||||
const showEmpty = ref(false); //数据状态
|
||||
const list = ref([]); //列表数据
|
||||
const searchDate = ref({}); //查询条件
|
||||
const isActive = ref(); //当前位置
|
||||
const haschooseList = ref([]) //已选中的数据
|
||||
onMounted(() => {
|
||||
let ac = localStorage.getItem('XF_Active')
|
||||
isActive.value = ac ? parseInt(ac) : 0;
|
||||
rightTitle.value = isActive.value == 3 ? '批量申报' : '新增'
|
||||
nextTick(() => { getOtherDate(); })
|
||||
scroll()
|
||||
});
|
||||
|
||||
//触底加载
|
||||
function scroll() {
|
||||
let scrollTargetBox = dateScroll.value;
|
||||
if (!scrollTargetBox) return false;
|
||||
scrollTargetBox.onscroll = (e) => {
|
||||
var scrollHeight = scrollTargetBox.scrollHeight; //251
|
||||
var scrollTop = scrollTargetBox.scrollTop; //0-18
|
||||
var clientHeight = scrollTargetBox.clientHeight; //233
|
||||
if (scrollHeight - clientHeight == scrollTop) {
|
||||
//滚动条滚到最底部
|
||||
if (list.value.length < total.value) {
|
||||
pageCurrent.value++;
|
||||
getOtherDate(); //根据不同类型掉接口
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// 处理筛选
|
||||
function handleSx() {
|
||||
isShowTime.value = true;
|
||||
switch (isActive.value) {
|
||||
case 0: //从业人员管理
|
||||
isShowTime.value = false;
|
||||
sxList.value = [
|
||||
{
|
||||
title: "身份证号",
|
||||
type: "input",
|
||||
lebel: "sfzh",
|
||||
placeholder: "请输入身份证号",
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
type: "input",
|
||||
lebel: "xm",
|
||||
placeholder: "请输入姓名",
|
||||
},
|
||||
];
|
||||
break;
|
||||
case 1: //单位管理
|
||||
D_BZ_DWFL.value.forEach((element) => {
|
||||
element.isCheck = false;
|
||||
element.key = element.dm;
|
||||
});
|
||||
D_BZ_DWLX.value.forEach((element) => {
|
||||
element.isCheck = false;
|
||||
element.key = element.dm;
|
||||
});
|
||||
isShowTime.value = false;
|
||||
sxList.value = [
|
||||
{
|
||||
title: "单位名称",
|
||||
type: "input",
|
||||
lebel: "dwmc",
|
||||
placeholder: "请输入单位名称",
|
||||
},
|
||||
{
|
||||
title: "单位分类",
|
||||
isCheckBox: false,
|
||||
type: "checkBox",
|
||||
lebel: "dwfl",
|
||||
array: D_BZ_DWFL.value,
|
||||
},
|
||||
{
|
||||
title: "单位类型",
|
||||
isCheckBox: false,
|
||||
type: "checkBox",
|
||||
lebel: "dwlx",
|
||||
array: D_BZ_DWLX.value,
|
||||
},
|
||||
];
|
||||
break;
|
||||
case 2: //寻巡访任务
|
||||
D_BZ_XFLX.value.forEach((element) => {
|
||||
element.isCheck = false;
|
||||
element.key = element.dm;
|
||||
});
|
||||
sxList.value = [
|
||||
{ type: "checkBox", ...setTimeQuantum() },
|
||||
{
|
||||
type: "checkBox",
|
||||
title: "巡防类型",
|
||||
array: D_BZ_XFLX.value,
|
||||
},
|
||||
];
|
||||
break;
|
||||
case 3: //战果申报
|
||||
sxList.value = [
|
||||
{ type: "checkBox", ...setTimeQuantum() },
|
||||
{
|
||||
title: "申报类型",
|
||||
type: "checkBox",
|
||||
lebel: "sblx",
|
||||
array: [
|
||||
{ isCheck: false, name: "类型1", value: "01", key: "fl1" },
|
||||
{ isCheck: false, name: "类型2", value: "02", key: "fl2" },
|
||||
],
|
||||
},
|
||||
];
|
||||
selectList.value = List1.value;
|
||||
break;
|
||||
}
|
||||
showPopup.value = !showPopup.value;
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function onConfirm(val) {
|
||||
|
||||
searchDate.value = val;
|
||||
getOtherDate();
|
||||
}
|
||||
// 选择类型
|
||||
function changeTab(val) {
|
||||
pageCurrent.value = 1
|
||||
isActive.value = val;
|
||||
showPopup.value = false;
|
||||
list.value = []
|
||||
rightTitle.value = val == 3 ? '批量申报' : '新增'
|
||||
getOtherDate() //获取列表数据
|
||||
}
|
||||
// 更具类型获取数据
|
||||
function getOtherDate() {
|
||||
switch (isActive.value) {
|
||||
case 0:
|
||||
_getList_Cyry(); //从业人员管理
|
||||
break;
|
||||
case 1:
|
||||
_getList_Dwgl()//单位管理
|
||||
break;
|
||||
case 2:
|
||||
_getList_Rw()//寻巡访任务
|
||||
break;
|
||||
case 3:
|
||||
_getList_Rw()//寻巡访任务
|
||||
// _getList_Zg()//战果申报
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取从业人员列表
|
||||
function _getList_Cyry() {
|
||||
let pramas = {
|
||||
pageSize: 10,
|
||||
pageCurrent: pageCurrent.value,
|
||||
...searchDate.value.data,
|
||||
};
|
||||
if (!searchDate.value.data) pramas.xm = keyWord.value;
|
||||
if (searchDate.value.data && !searchDate.value.data.xm) pramas.xm = keyWord.value;
|
||||
isLoading.value = true
|
||||
getdataCyry(pramas).then((res) => {
|
||||
let arr = res.records || [];
|
||||
isLoading.value = false;
|
||||
list.value = pageCurrent.value == 1 ? arr : list.value.concat(arr);
|
||||
total.value = res.total;
|
||||
}).catch(() => {
|
||||
isLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取单位管理
|
||||
function _getList_Dwgl() {
|
||||
let pramas = {
|
||||
pageSize: 10,
|
||||
pageCurrent: pageCurrent.value,
|
||||
...searchDate.value.data,
|
||||
};
|
||||
let brr = searchDate.value.list ? searchDate.value.list : []
|
||||
let arr = brr.filter(item => {
|
||||
return item.type == 'checkBox'
|
||||
})
|
||||
arr.forEach(v => {
|
||||
v.array.forEach(it => {
|
||||
if (it.isCheck) pramas[v.lebel] = it.value
|
||||
})
|
||||
})
|
||||
|
||||
if (!searchDate.value.data || (searchDate.value.data && !searchDate.value.data.dwmc)) {
|
||||
pramas.dwmc = keyWord.value;
|
||||
}
|
||||
isLoading.value = true;
|
||||
getdataDwgl(pramas).then((res) => {
|
||||
let arr = res.records || [];
|
||||
list.value = pageCurrent.value == 1 ? arr : list.value.concat(arr);
|
||||
total.value = res.total;
|
||||
isLoading.value = false;
|
||||
}).catch(() => {
|
||||
isLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取任务
|
||||
function _getList_Rw() {
|
||||
let pramas = {
|
||||
pageSize: 10,
|
||||
pageCurrent: pageCurrent.value,
|
||||
...searchDate.value,
|
||||
};
|
||||
if (!searchDate.value.data) pramas.xfdw = keyWord.value;
|
||||
if (searchDate.value.data && !searchDate.value.xfdw) pramas.xfdw = keyWord.value;
|
||||
if (isActive.value == 2) {
|
||||
pramas.xfnr = keyWord.value;
|
||||
delete pramas.xfdw;
|
||||
delete pramas.data;
|
||||
}
|
||||
if (pramas.list) {
|
||||
let arr = pramas.list[0].array
|
||||
let obj = arr.find(item => { return item.isCheck == true })
|
||||
pramas.rwzt = obj.dm
|
||||
}
|
||||
isLoading.value = true;
|
||||
getdataRw(pramas).then((res) => {
|
||||
let arr = res.records || [];
|
||||
isLoading.value = false;
|
||||
arr.forEach(item => {
|
||||
item.isCheck = false
|
||||
item.xfdw = JSON.parse(item.xfdw)
|
||||
item.xfzy = JSON.parse(item.xfzy)
|
||||
})
|
||||
list.value = pageCurrent.value == 1 ? arr : list.value.concat(arr);
|
||||
total.value = res.total;
|
||||
}).catch(() => {
|
||||
isLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 点击内容
|
||||
function chooseData(item) {
|
||||
if (isActive.value == 3) {
|
||||
list.value.forEach(it => {
|
||||
if (it.id == item.id) it.isCheck = !it.isCheck;
|
||||
})
|
||||
haschooseList.value = list.value.filter(v => { return v.isCheck == true })
|
||||
}
|
||||
}
|
||||
// 获取任务
|
||||
function _getList_Zg() {
|
||||
let pramas = {
|
||||
pageSize: 10,
|
||||
pageCurrent: pageCurrent.value,
|
||||
};
|
||||
if (searchDate.value) {
|
||||
let kssj = searchDate.value.startTime
|
||||
let jssj = searchDate.value.startTime
|
||||
pramas.kssj = kssj ? kssj + ' 00:00:00' : '';
|
||||
pramas.kssj = jssj ? jssj + ' 23:59:59' : '';
|
||||
let arr = searchDate.value.list
|
||||
if (arr) {
|
||||
let list = arr[0].array.filter(v => { return v.isCheck == true }).map(it => { return it.value })
|
||||
pramas.sblx = list.join(',');
|
||||
}
|
||||
}
|
||||
isLoading.value = true;
|
||||
getdataZg(pramas).then((res) => {
|
||||
let arr = res.records || [];
|
||||
isLoading.value = false;
|
||||
list.value = pageCurrent.value == 1 ? arr : list.value.concat(arr);
|
||||
total.value = res.total;
|
||||
}).catch(() => {
|
||||
isLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 点击新增
|
||||
function clickRight() {
|
||||
localStorage.setItem('XF_Active', isActive.value)
|
||||
switch (isActive.value) {
|
||||
case 0: //从业人员管理
|
||||
router.push({ path: "/Declaration/addEditCyry" });
|
||||
break;
|
||||
case 1: //单位管理
|
||||
router.push({ path: "/Declaration/addEditDw" });
|
||||
break;
|
||||
case 2: //寻巡访任务
|
||||
router.push({ path: "/Declaration/addEditRw" });
|
||||
break;
|
||||
case 3: //战果申报
|
||||
plsbDate()// 批量申报
|
||||
// router.push({ path: "/Declaration/addEdit"});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 批量申报
|
||||
function plsbDate() {
|
||||
if (haschooseList.value.length == 0) return Notify({ type: 'warning', message: '请选择申报的内容' });
|
||||
let isTrue = true; //判断内容是否填完
|
||||
haschooseList.value.forEach(item => {
|
||||
if (!item.sbyy) isTrue = false
|
||||
})
|
||||
if (!isTrue) Notify({ type: 'warning', message: '请核实申报数据核实原因是否填写!' });
|
||||
if (isTrue) {
|
||||
let ids = haschooseList.value.map(it => { return it.id })
|
||||
plsbData(ids).then(res => {
|
||||
hintToast('申报成功')
|
||||
_getList_Rw()
|
||||
})
|
||||
// 查询接口
|
||||
}
|
||||
}
|
||||
//关键字查询
|
||||
function onSearch(e) {
|
||||
keyWord.value = e;
|
||||
pageCurrent.value = 1;
|
||||
showEmpty.value = false;
|
||||
getOtherDate();//更具类型获取数据
|
||||
}
|
||||
// 选择类型
|
||||
function chooseItem(val) {
|
||||
dateForm.value.sblxmc = val.label;
|
||||
dateForm.value.sblxdm = val.value;
|
||||
chooseType.value = false;
|
||||
}
|
||||
// 重置
|
||||
function reset() {
|
||||
dateForm.value.sblxmc = "";
|
||||
dateForm.value.sblxdm = "";
|
||||
searchDate.value = {};
|
||||
keyWord.value = ''
|
||||
getOtherDate();
|
||||
}
|
||||
// 删除数据
|
||||
function deletedata(id) {
|
||||
Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认删除该数据!",
|
||||
confirmButtonColor: "#3e6ee8",
|
||||
}).then((res) => {
|
||||
switch (isActive.value) {
|
||||
case 0: //从业人员管理
|
||||
deletedataCyry([id]).then(res => {
|
||||
hintToast('删除成功')
|
||||
_getList_Cyry()
|
||||
})
|
||||
break;
|
||||
case 1: //单位管理
|
||||
deletedataDw([id]).then(res => {
|
||||
hintToast('删除成功')
|
||||
_getList_Dwgl()
|
||||
})
|
||||
break;
|
||||
case 2: //寻巡访任务
|
||||
case 3: //战果申报
|
||||
deletedataRw([id]).then(res => {
|
||||
hintToast('删除成功')
|
||||
_getList_Rw()
|
||||
})
|
||||
break;
|
||||
// case 3: //战果申报
|
||||
// deletedataZg([id]).then(res=>{
|
||||
// hintToast('删除成功')
|
||||
// _getList_Zg()
|
||||
// })
|
||||
// break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.chooseBox {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
padding: 2vw 1vw;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #507ce9;
|
||||
border-radius: 4px;
|
||||
color: #d3d0d0;
|
||||
font-size: 14px;
|
||||
|
||||
.outBox {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 38px;
|
||||
background: #fff;
|
||||
padding-top: 4vw;
|
||||
z-index: 999;
|
||||
border-radius: 4px;
|
||||
|
||||
.selectBox {
|
||||
width: 100%;
|
||||
padding: 4vw;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
|
||||
.selectItem {
|
||||
padding-left: 4vw;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
line-height: 30px;
|
||||
color: #4a4646;
|
||||
}
|
||||
}
|
||||
|
||||
.selectBox::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: -4px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 10px solid;
|
||||
border-color: transparent transparent #ccc transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.hoverClose {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.listBox {
|
||||
height: calc(100vh - 20vw);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
padding: 1vw 4vw;
|
||||
padding-bottom: 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.listItem {
|
||||
background-color: rgba(241, 241, 241, 0.5);
|
||||
padding: 2vw;
|
||||
border: 1px solid;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,40 +0,0 @@
|
||||
<template>
|
||||
<div class="container containerLicence" style="padding-top: 13vw; box-sizing: border-box">
|
||||
<TopNav navTitle="核查驾驶证" />
|
||||
<van-steps direction="vertical" active-color="#969799" :active="0">
|
||||
<van-step>
|
||||
<p>驾驶证号: 511525199910238410</p>
|
||||
<p>姓名:周正伟</p>
|
||||
<p>性别:男性</p>
|
||||
<p>出生日期:1999年10月23日</p>
|
||||
<p>国籍:</p>
|
||||
<p>准驾车型: C1</p>
|
||||
<p>发证机关:川Q</p>
|
||||
<p>初次领证日期:2018-08-02 00:00:00</p>
|
||||
<p>有效期限:2018-08-02 00:00:00-2024-08-02 00:00:00</p>
|
||||
<p>住址:</p>
|
||||
<p>现住址详址:四川省高县胜天镇马鞍村2组46号</p>
|
||||
</van-step>
|
||||
</van-steps>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TopNav from "../../../components/topNav.vue";
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.containerLicence .van-icon{
|
||||
color: #148aec!important;
|
||||
}
|
||||
.containerLicence .van-step__line{
|
||||
background-color: #148aec!important;
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user