修改
This commit is contained in:
@ -594,6 +594,15 @@ export const privateRoutes = [{
|
|||||||
icon: "article-ranking"
|
icon: "article-ranking"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/taskPage/clockRecord",
|
||||||
|
component: () => import("@/views/backOfficeSystem/service/taskPage/clockRecord/index"),
|
||||||
|
name: "clockRecord",
|
||||||
|
meta: {
|
||||||
|
title: '打卡情况',
|
||||||
|
icon: "article-ranking"
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,186 @@
|
|||||||
|
<script setup>
|
||||||
|
import { computed, getCurrentInstance, onMounted, reactive, ref } from "vue";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||||
|
import Search from "@/components/aboutTable/Search.vue";
|
||||||
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||||
|
import Pages from "@/components/aboutTable/Pages.vue";
|
||||||
|
import { qcckPost, qcckGet } from "@/api/qcckApi.js";
|
||||||
|
|
||||||
|
const searchConfiger = reactive([
|
||||||
|
{
|
||||||
|
showType: "input",
|
||||||
|
prop: "dkrXm",
|
||||||
|
placeholder: "请输入打卡人姓名",
|
||||||
|
label: "打卡人姓名"
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
const searchBox = ref(); //搜索框
|
||||||
|
const pageData = reactive({
|
||||||
|
visible: true,
|
||||||
|
tableData: [], //表格数据
|
||||||
|
keyCount: 0,
|
||||||
|
tableConfiger: {
|
||||||
|
rowHieght: 61,
|
||||||
|
loading: false
|
||||||
|
},
|
||||||
|
haveControls:false,
|
||||||
|
total: 0,
|
||||||
|
pageConfiger: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageCurrent: 1
|
||||||
|
}, //分页
|
||||||
|
controlsWidth: 210, //操作栏宽度
|
||||||
|
tableColumn: [
|
||||||
|
{
|
||||||
|
label: "打卡人姓名",
|
||||||
|
prop: "dkrXm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "必到点位置",
|
||||||
|
prop: "bddMc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "开始时间",
|
||||||
|
prop: "dkKsSj"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "打卡开始附件",
|
||||||
|
prop: "dkKsSj",
|
||||||
|
showSolt: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "结束时间",
|
||||||
|
prop: "dkJsSj"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "打卡结束附件",
|
||||||
|
prop: "dkKsSj",
|
||||||
|
showSolt: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
const onSearch = (val) => {
|
||||||
|
const { cz, ...ret } = val;
|
||||||
|
pageData.pageConfiger.pageCurrent = 1;
|
||||||
|
getListData(ret);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 表格高度计算
|
||||||
|
const tabHeightFn = () => {
|
||||||
|
pageData.tableHeight =
|
||||||
|
window.innerHeight - searchBox.value.offsetHeight - 244;
|
||||||
|
window.onresize = function () {
|
||||||
|
tabHeightFn();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const getListData = async (params = {}) => {
|
||||||
|
pageData.tableConfiger.loading = true;
|
||||||
|
qcckGet({...pageData.pageConfiger,...params}, "/mosty-yjzl/tbZdxlFgdwBddxlrwJl/getPageList")
|
||||||
|
.then((res) => {
|
||||||
|
pageData.tableData = res.records || [];
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
pageData.total = res.total;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeNo = (val) => {
|
||||||
|
pageData.pageConfiger.pageCurrent = val;
|
||||||
|
getListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeSize = (val) => {
|
||||||
|
pageData.pageConfiger.pageSize = val;
|
||||||
|
getListData();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
proxy.mittBus.on("mittFn", (data) => {
|
||||||
|
pageData.keyCount = data;
|
||||||
|
});
|
||||||
|
tabHeightFn();
|
||||||
|
getListData();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="titleBox">
|
||||||
|
<PageTitle title="打卡记录">
|
||||||
|
</PageTitle>
|
||||||
|
</div>
|
||||||
|
<div ref="searchBox">
|
||||||
|
<Search :searchArr="searchConfiger" @submit="onSearch" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabBox">
|
||||||
|
<MyTable
|
||||||
|
:tableData="pageData.tableData"
|
||||||
|
:tableColumn="pageData.tableColumn"
|
||||||
|
:tableHeight="pageData.tableHeight"
|
||||||
|
:key="pageData.keyCount"
|
||||||
|
:tableConfiger="pageData.tableConfiger"
|
||||||
|
:controlsWidth="pageData.controlsWidth"
|
||||||
|
>
|
||||||
|
<template #dkKsFj="{ row }">
|
||||||
|
<el-image
|
||||||
|
:append-to-body="true"
|
||||||
|
:preview-src-list="[
|
||||||
|
`/mosty-api/mosty-base/minio/image/download/${row.dkKsFj}`
|
||||||
|
]"
|
||||||
|
style="width: 75px; height: 75px"
|
||||||
|
:src="`/mosty-api/mosty-base/minio/image/download/${row.dkKsFj}`"
|
||||||
|
fit="cover"
|
||||||
|
lazy
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #dkJsFj="{ row }">
|
||||||
|
<el-image
|
||||||
|
:append-to-body="true"
|
||||||
|
:preview-src-list="[
|
||||||
|
`/mosty-api/mosty-base/minio/image/download/${row.dkJsFj}`
|
||||||
|
]"
|
||||||
|
style="width: 75px; height: 75px"
|
||||||
|
:src="`/mosty-api/mosty-base/minio/image/download/${row.dkJsFj}`"
|
||||||
|
fit="cover"
|
||||||
|
lazy
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<!-- 操作 -->
|
||||||
|
<template #controls="{ row }">
|
||||||
|
</template>
|
||||||
|
</MyTable>
|
||||||
|
|
||||||
|
<Pages
|
||||||
|
@changeNo="changeNo"
|
||||||
|
@changeSize="changeSize"
|
||||||
|
:tableHeight="pageData.tableHeight"
|
||||||
|
:pageConfiger="{
|
||||||
|
...pageData.pageConfiger,
|
||||||
|
total: pageData.total
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
::v-deep {
|
||||||
|
.check,
|
||||||
|
.el-upload-text {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-descriptions__body {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -4,71 +4,33 @@
|
|||||||
<div class="head_box">
|
<div class="head_box">
|
||||||
<span class="title">{{ title }}</span>
|
<span class="title">{{ title }}</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button v-if="!infoActive" type="primary" size="small" @click="submit" :loading="btnLoading">保存</el-button>
|
||||||
v-if="!infoActive"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="submit"
|
|
||||||
:loading="btnLoading"
|
|
||||||
>保存</el-button
|
|
||||||
>
|
|
||||||
<el-button size="small" @click="close">关闭</el-button>
|
<el-button size="small" @click="close">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dialogWrapper">
|
<div class="dialogWrapper">
|
||||||
<el-form
|
<el-form ref="formRef" :model="form" :rules="rules" :inline="true" :disabled="infoActive">
|
||||||
ref="formRef"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
:inline="true"
|
|
||||||
:disabled="infoActive"
|
|
||||||
>
|
|
||||||
<el-form-item prop="bddMc" label="必到点名称:">
|
<el-form-item prop="bddMc" label="必到点名称:">
|
||||||
<el-input
|
<el-input style="width: 80%" min="0" placeholder="请填写必到点名称" v-model="form.bddMc"></el-input>
|
||||||
style="width: 80%;"
|
|
||||||
min="0"
|
|
||||||
placeholder="请填写必到点名称"
|
|
||||||
v-model="form.bddMc"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="fgdwId" label="所属方格:">
|
<el-form-item prop="fgdwId" label="所属方格:">
|
||||||
<el-select
|
<el-select :disabled="typeStatus === 'del'" placeholder="请选择所属方格" filterable clearable v-model="form.fgdwId"
|
||||||
:disabled="typeStatus === 'del'"
|
@change="handleChange">
|
||||||
placeholder="请选择所属方格"
|
<el-option v-for="item in fgList" :key="item?.id" :label="item?.mc" :value="item?.id" />
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
v-model="form.fgdwId"
|
|
||||||
@change="handleChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in fgList"
|
|
||||||
:key="item?.id"
|
|
||||||
:label="item?.mc"
|
|
||||||
:value="item?.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="bddDz" label="必到点地址:">
|
<el-form-item prop="bddDz" label="必到点地址:">
|
||||||
<el-input
|
<el-input placeholder="请填必到点地址" clearable v-model="form.bddDz"></el-input>
|
||||||
placeholder="请填必到点地址"
|
</el-form-item>
|
||||||
clearable
|
<el-form-item prop="dkjgsj" label="必到点间隔时间/分钟为单位:">
|
||||||
v-model="form.bddDz"
|
<el-input placeholder="请填写必到点间隔时间/分钟为单位" v-model="form.dkjgsj"></el-input>
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="jd" label="经度:">
|
<el-form-item prop="jd" label="经度:">
|
||||||
<el-input
|
<el-input disabled placeholder="请填写经度" v-model="form.jd"></el-input>
|
||||||
disabled
|
|
||||||
placeholder="请填写经度"
|
|
||||||
v-model="form.jd"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="wd" label="纬度:">
|
<el-form-item prop="wd" label="纬度:">
|
||||||
<el-input
|
<el-input disabled placeholder="请填写纬度" v-model="form.jd"></el-input>
|
||||||
disabled
|
|
||||||
placeholder="请填写纬度"
|
|
||||||
v-model="form.jd"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -77,23 +39,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, getCurrentInstance, computed, onMounted } from "vue";
|
import { ref, reactive, getCurrentInstance, computed, onMounted } from "vue";
|
||||||
import { fetchTbZdxlFgdwSelectList, fetchTbZdxlFgdwBddSave, fetchTbZdxlFgdwBddUpdate, fetchTbZdxlFgdwId } from "@/api/service/taskProgress";
|
import {
|
||||||
|
fetchTbZdxlFgdwSelectList,
|
||||||
|
fetchTbZdxlFgdwBddSave,
|
||||||
|
fetchTbZdxlFgdwBddUpdate,
|
||||||
|
fetchTbZdxlFgdwId
|
||||||
|
} from "@/api/service/taskProgress";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
import GdMap from "@/components/Map/GdMap/index.vue"
|
import GdMap from "@/components/Map/GdMap/index.vue";
|
||||||
import emitter from "@/utils/eventBus";
|
import emitter from "@/utils/eventBus";
|
||||||
const btnLoading = ref(false); //按钮截流
|
const btnLoading = ref(false); //按钮截流
|
||||||
const title = ref("新增必到点采集");
|
const title = ref("新增必到点采集");
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const infoActive = ref(true);
|
const infoActive = ref(true);
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const fgList = ref([])
|
const fgList = ref([]);
|
||||||
const typeStatus = ref("")
|
const typeStatus = ref("");
|
||||||
|
|
||||||
//级联选择器配置
|
//级联选择器配置
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -103,41 +69,41 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
const emits = defineEmits(["update:modelValue", "ok"]);
|
||||||
|
|
||||||
const dialogFormVisible = computed({
|
const dialogFormVisible = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.modelValue;
|
return props.modelValue;
|
||||||
},
|
},
|
||||||
set(val) {
|
set(val) {
|
||||||
if (!infoActive.value && typeStatus?.value !== 'del') {
|
if (!infoActive.value && typeStatus?.value !== "del") {
|
||||||
// 获取经纬度
|
// 获取经纬度
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
emitter.emit("getMapClickCoordinates");
|
emitter.emit("getMapClickCoordinates");
|
||||||
|
|
||||||
// 更新地图标注位置
|
// 更新地图标注位置
|
||||||
emitter.on("mapClickCoordinates", async (res) => {
|
emitter.on("mapClickCoordinates", async (res) => {
|
||||||
emitter.emit("deletePointArea")
|
emitter.emit("deletePointArea");
|
||||||
|
|
||||||
form.value.jd = res.lng
|
form.value.jd = res.lng;
|
||||||
form.value.wd = res.lat
|
form.value.wd = res.lat;
|
||||||
|
|
||||||
emitter.emit("addPointArea", {
|
emitter.emit("addPointArea", {
|
||||||
coords: [{ jd: res.lng, wd: res.lat }],
|
coords: [{ jd: res.lng, wd: res.lat }],
|
||||||
coordinates: res?.coordinates,
|
coordinates: res?.coordinates,
|
||||||
icon: require("@/assets/lz/dw.png"),
|
icon: require("@/assets/lz/dw.png"),
|
||||||
sizeX: 30,
|
sizeX: 30,
|
||||||
sizeY: 35
|
sizeY: 35
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})
|
}, 500);
|
||||||
}, 500);
|
|
||||||
} else {
|
} else {
|
||||||
emitter.off('getMapClickCoordinates')
|
emitter.off("getMapClickCoordinates");
|
||||||
}
|
}
|
||||||
|
|
||||||
emits("update:modelValue", val);
|
emits("update:modelValue", val);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
//表单数据
|
//表单数据
|
||||||
const form = ref({
|
const form = ref({
|
||||||
@ -180,41 +146,40 @@ const rules = reactive({
|
|||||||
message: "请填写纬度",
|
message: "请填写纬度",
|
||||||
trigger: "change"
|
trigger: "change"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取方格
|
// 获取方格
|
||||||
const getFgList = async () => {
|
const getFgList = async () => {
|
||||||
const res = await fetchTbZdxlFgdwSelectList()
|
const res = await fetchTbZdxlFgdwSelectList();
|
||||||
if (res && res?.length > 0) {
|
if (res && res?.length > 0) {
|
||||||
fgList.value = res
|
fgList.value = res;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取方格详情
|
// 获取方格详情
|
||||||
const getFgDetails = async (id, type) => {
|
const getFgDetails = async (id, type) => {
|
||||||
const res = await fetchTbZdxlFgdwId(id)
|
const res = await fetchTbZdxlFgdwId(id);
|
||||||
if (res) {
|
if (res) {
|
||||||
setMap(res, type)
|
setMap(res, type);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
function open(row = {}, type) {
|
function open(row = {}, type) {
|
||||||
typeStatus.value = type
|
typeStatus.value = type;
|
||||||
infoActive.value = type === 'view';
|
infoActive.value = type === "view";
|
||||||
form.value = { ...row, xfbbName: row?.xfxz };
|
form.value = { ...row, xfbbName: row?.xfxz };
|
||||||
if (type === 'view') {
|
if (type === "view") {
|
||||||
title.value = "查看信息"
|
title.value = "查看信息";
|
||||||
} else if (type === 'del') {
|
} else if (type === "del") {
|
||||||
title.value = "编辑必到点采集"
|
title.value = "编辑必到点采集";
|
||||||
} else {
|
} else {
|
||||||
title.value = "新增必到点采集"
|
title.value = "新增必到点采集";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'view' || type === 'del') {
|
if (type === "view" || type === "del") {
|
||||||
getFgDetails(form?.value?.fgdwId , !(type === 'view' || type === 'del'))
|
getFgDetails(form?.value?.fgdwId, !(type === "view" || type === "del"));
|
||||||
}
|
}
|
||||||
dialogFormVisible.value = true;
|
dialogFormVisible.value = true;
|
||||||
}
|
}
|
||||||
@ -225,27 +190,44 @@ function close() {
|
|||||||
dialogFormVisible.value = false;
|
dialogFormVisible.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleChange = (val) => {
|
const handleChange = (val) => {
|
||||||
const data = fgList?.value?.find(i => i?.id === val)
|
const data = fgList?.value?.find((i) => i?.id === val);
|
||||||
setMap(data)
|
setMap(data);
|
||||||
}
|
};
|
||||||
|
|
||||||
const setMap = (data, type = true) => {
|
const setMap = (data, type = true) => {
|
||||||
emitter.emit("deletePointArea", "addfg")
|
emitter.emit("deletePointArea", "addfg");
|
||||||
const { x1 = "", y1 = "", x2 = "", y2 = "", id = "", zxX = "", zxY = "", mc = "" } = data
|
const {
|
||||||
const centerPoint = [zxX, zxY]
|
x1 = "",
|
||||||
const position = [[Number(x1),Number(y1)],[Number(x2),Number(y2)]]
|
y1 = "",
|
||||||
const text = mc
|
x2 = "",
|
||||||
const obj = [{ position: position, text, id, userData: data}]
|
y2 = "",
|
||||||
|
id = "",
|
||||||
|
zxX = "",
|
||||||
|
zxY = "",
|
||||||
|
mc = ""
|
||||||
|
} = data;
|
||||||
|
const centerPoint = [zxX, zxY];
|
||||||
|
const position = [
|
||||||
|
[Number(x1), Number(y1)],
|
||||||
|
[Number(x2), Number(y2)]
|
||||||
|
];
|
||||||
|
const text = mc;
|
||||||
|
const obj = [{ position: position, text, id, userData: data }];
|
||||||
|
|
||||||
emitter.emit("echoPlane", { fontColor:'#12fdb8',coords: obj, type:'rectangle', flag:'addfg', color:'rgba(2,20,51,0.5)', linecolor:'#1C97FF'})
|
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("setMapCenter", { location: centerPoint, zoomLevel: 14 });
|
||||||
|
|
||||||
|
|
||||||
// 更新地图标注位置
|
// 更新地图标注位置
|
||||||
if (type) return
|
if (type) return;
|
||||||
emitter.emit("deletePointArea")
|
emitter.emit("deletePointArea");
|
||||||
|
|
||||||
emitter.emit("addPointArea", {
|
emitter.emit("addPointArea", {
|
||||||
coords: [{ jd: form.value?.jd, wd: form.value?.wd }],
|
coords: [{ jd: form.value?.jd, wd: form.value?.wd }],
|
||||||
@ -254,36 +236,33 @@ const setMap = (data, type = true) => {
|
|||||||
sizeX: 30,
|
sizeX: 30,
|
||||||
sizeY: 35
|
sizeY: 35
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//提交
|
//提交
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validate()
|
await formRef.value.validate();
|
||||||
|
|
||||||
if (!form.value?.id) {
|
if (!form.value?.id) {
|
||||||
await fetchTbZdxlFgdwBddSave(form.value)
|
await fetchTbZdxlFgdwBddSave(form.value);
|
||||||
} else {
|
} else {
|
||||||
await fetchTbZdxlFgdwBddUpdate(form.value)
|
await fetchTbZdxlFgdwBddUpdate(form.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy.$message({
|
proxy.$message({
|
||||||
type: "success",
|
type: "success",
|
||||||
message: "修改成功"
|
message: "修改成功"
|
||||||
});
|
});
|
||||||
dialogFormVisible.value = false;
|
dialogFormVisible.value = false;
|
||||||
emits("ok")
|
emits("ok");
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFgList()
|
getFgList();
|
||||||
})
|
});
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
146
src/views/largeScreen/home/components/dialog/dkqkList.vue
Normal file
146
src/views/largeScreen/home/components/dialog/dkqkList.vue
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dialogBox" v-loading="loading">
|
||||||
|
<div class="title">
|
||||||
|
<span class="mc">{{ title }}</span>
|
||||||
|
<span class="close" @click="close">×</span>
|
||||||
|
</div>
|
||||||
|
<ul class="warningList" ref="gjyjList">
|
||||||
|
<li v-for="item in warningList" :key="item.id">
|
||||||
|
<div>打卡人:{{ item.dkrXm }}</div>
|
||||||
|
<div>必到点位置:{{ item.bddMc }}</div>
|
||||||
|
<div>打卡开始时间:{{ item.dkKsSj }}</div>
|
||||||
|
<div class="fj_box">
|
||||||
|
<div>打卡开始附件:</div>
|
||||||
|
<el-image
|
||||||
|
:append-to-body="true"
|
||||||
|
:preview-src-list="[
|
||||||
|
`/mosty-api/mosty-base/minio/image/download/${item.dkKsFj}`
|
||||||
|
]"
|
||||||
|
style="width: 75px; height: 75px"
|
||||||
|
:src="`/mosty-api/mosty-base/minio/image/download/${item.dkKsFj}`"
|
||||||
|
fit="cover"
|
||||||
|
lazy
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>打卡结束时间:{{ item.dkJsSj }}</div>
|
||||||
|
<div class="fj_box">
|
||||||
|
<div>打卡结束附件:</div>
|
||||||
|
<el-image
|
||||||
|
:append-to-body="true"
|
||||||
|
:preview-src-list="[
|
||||||
|
`/mosty-api/mosty-base/minio/image/download/${item.dkJsFj}`
|
||||||
|
]"
|
||||||
|
style="width: 75px; height: 75px"
|
||||||
|
:src="`/mosty-api/mosty-base/minio/image/download/${item.dkJsFj}`"
|
||||||
|
fit="cover"
|
||||||
|
lazy
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<el-empty
|
||||||
|
description="没有数据"
|
||||||
|
:image-size="0.1"
|
||||||
|
v-if="!loading && warningList.length <= 0"
|
||||||
|
/>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import YjItem from "@/views/largeScreen/home/components/yjItem.vue";
|
||||||
|
import { qcckPost, qcckGet, qcckPut, qcckDelete } from "@/api/qcckApi.js";
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
onMounted,
|
||||||
|
getCurrentInstance,
|
||||||
|
defineEmits,
|
||||||
|
defineProps,
|
||||||
|
watch
|
||||||
|
} from "vue";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { D_BZ_YJLX } = proxy.$dict("D_BZ_YJLX");
|
||||||
|
const warningList = ref([]); //预警列表数据
|
||||||
|
const pageCurrent = ref(1);
|
||||||
|
const pageTotal = ref(0);
|
||||||
|
const yjInfo = ref(null); //预警信息
|
||||||
|
const gjyjList = ref(null); //预警列表数据
|
||||||
|
const loading = ref(false);
|
||||||
|
//参数传递
|
||||||
|
const props = defineProps({
|
||||||
|
//某条预警详情
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
//标题数据
|
||||||
|
title: String
|
||||||
|
});
|
||||||
|
const emit = defineEmits(["close"]);
|
||||||
|
onMounted(() => {
|
||||||
|
yjInfo.value = props.info;
|
||||||
|
// _getSelectTrack(props.info.id);
|
||||||
|
});
|
||||||
|
// 监听视频地址变化
|
||||||
|
watch(
|
||||||
|
() => props.info,
|
||||||
|
(val) => {
|
||||||
|
pageCurrent.value = 1;
|
||||||
|
yjInfo.value = val;
|
||||||
|
_getSelectTrack(val.id);
|
||||||
|
},
|
||||||
|
{ immediate: true, deep: true }
|
||||||
|
);
|
||||||
|
//关闭
|
||||||
|
function close() {
|
||||||
|
emit("close", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取轨迹预警列表
|
||||||
|
function _getSelectTrack(id) {
|
||||||
|
loading.value = true;
|
||||||
|
qcckGet({ xfbbId: id }, "/mosty-yjzl/tbZdxlFgdwBddxlrwJl/getRwjlByXfbbId")
|
||||||
|
.then((res) => {
|
||||||
|
loading.value = false;
|
||||||
|
warningList.value = res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "@/assets/css/homeScreen.scss";
|
||||||
|
.dialogBox {
|
||||||
|
ul.warningList {
|
||||||
|
height: calc(100vh - 198px);
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 7px 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
li {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border: 1px solid #14347b;
|
||||||
|
background: #0f2f59;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.photo {
|
||||||
|
width: 60px;
|
||||||
|
height: 80px;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//加载时 取消背景
|
||||||
|
::v-deep .el-loading-mask {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.fj_box {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="rightDilog noScollLine" :style="{ right: props.isPosition ? '0px' : '388px' }" style="transition: all 0.5s" >
|
<div
|
||||||
|
class="rightDilog noScollLine"
|
||||||
|
:style="{ right: props.isPosition ? '0px' : '388px' }"
|
||||||
|
style="transition: all 0.5s"
|
||||||
|
>
|
||||||
<!-- 周边视频更多视频三个视频列表的时候 -->
|
<!-- 周边视频更多视频三个视频列表的时候 -->
|
||||||
<MoreVideo
|
<MoreVideo
|
||||||
@close="onVideoClose('zb')"
|
@close="onVideoClose('zb')"
|
||||||
@ -14,7 +18,7 @@
|
|||||||
:title="'视频随动'"
|
:title="'视频随动'"
|
||||||
v-if="showVideoSpsdWindow"
|
v-if="showVideoSpsdWindow"
|
||||||
/>
|
/>
|
||||||
<!-- 轨迹预警 -->
|
<!-- 轨迹预警 -->
|
||||||
<DialogWarningList
|
<DialogWarningList
|
||||||
@close="onClose('gj')"
|
@close="onClose('gj')"
|
||||||
:info="yjDetail"
|
:info="yjDetail"
|
||||||
@ -28,6 +32,13 @@
|
|||||||
:title="'周边预警'"
|
:title="'周边预警'"
|
||||||
v-if="showZbyjWindow"
|
v-if="showZbyjWindow"
|
||||||
/>
|
/>
|
||||||
|
<!-- 打卡情况 -->
|
||||||
|
<DkqkList
|
||||||
|
@close="onClose('dk')"
|
||||||
|
:info="dkqkDetail"
|
||||||
|
:title="'打卡情况'"
|
||||||
|
v-if="showDkqkWindow"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -35,11 +46,14 @@
|
|||||||
import emitter from "@/utils/eventBus.js";
|
import emitter from "@/utils/eventBus.js";
|
||||||
import MoreVideo from "./dialog/moreVideo.vue";
|
import MoreVideo from "./dialog/moreVideo.vue";
|
||||||
import DialogWarningList from "./dialog/warningList.vue";
|
import DialogWarningList from "./dialog/warningList.vue";
|
||||||
|
import DkqkList from "./dialog/dkqkList.vue";
|
||||||
import { ref, defineProps, onMounted, onUnmounted } from "vue";
|
import { ref, defineProps, onMounted, onUnmounted } from "vue";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isPosition: Boolean
|
isPosition: Boolean
|
||||||
});
|
});
|
||||||
const zbyjDetail = ref(null); //周边预警详情
|
const zbyjDetail = ref(null); //周边预警详情
|
||||||
|
const dkqkDetail = ref(null); //打卡情况详情
|
||||||
|
const showDkqkWindow = ref(false); //是否显示周边预警
|
||||||
const yjDetail = ref(null); //某条预警详情
|
const yjDetail = ref(null); //某条预警详情
|
||||||
const showZbyjWindow = ref(false); //是否显示周边预警
|
const showZbyjWindow = ref(false); //是否显示周边预警
|
||||||
const jqDetail = ref(null); // 某条警情详情
|
const jqDetail = ref(null); // 某条警情详情
|
||||||
@ -47,8 +61,8 @@ const showVideoWindow = ref(false); //是否显示周边视频
|
|||||||
const xzDetail = ref(null); //巡组详情
|
const xzDetail = ref(null); //巡组详情
|
||||||
const showVideoSpsdWindow = ref(false); //吃否显示视频随动
|
const showVideoSpsdWindow = ref(false); //吃否显示视频随动
|
||||||
const showYjWindow = ref(false); //是否显示预警轨迹弹窗
|
const showYjWindow = ref(false); //是否显示预警轨迹弹窗
|
||||||
onMounted(()=>{
|
onMounted(() => {
|
||||||
emitter.on("videoClick", (res) => {
|
emitter.on("videoClick", (res) => {
|
||||||
jqDetail.value = res;
|
jqDetail.value = res;
|
||||||
showVideoWindow.value = true;
|
showVideoWindow.value = true;
|
||||||
});
|
});
|
||||||
@ -56,11 +70,15 @@ onMounted(()=>{
|
|||||||
showVideoWindow.value = false;
|
showVideoWindow.value = false;
|
||||||
showVideoSpsdWindow.value = false;
|
showVideoSpsdWindow.value = false;
|
||||||
});
|
});
|
||||||
emitter.on("clickZbyj", (res) => {
|
emitter.on("clickZbyj", (res) => {
|
||||||
zbyjDetail.value = res;
|
zbyjDetail.value = res;
|
||||||
showZbyjWindow.value = true;
|
showZbyjWindow.value = true;
|
||||||
});
|
});
|
||||||
emitter.on("showCcyj", (res) => {
|
emitter.on("clickDkqk", (res) => {
|
||||||
|
dkqkDetail.value = res;
|
||||||
|
showDkqkWindow.value = true;
|
||||||
|
});
|
||||||
|
emitter.on("showCcyj", (res) => {
|
||||||
yjDetail.value = res;
|
yjDetail.value = res;
|
||||||
showYjWindow.value = true;
|
showYjWindow.value = true;
|
||||||
});
|
});
|
||||||
@ -69,7 +87,7 @@ onMounted(()=>{
|
|||||||
xzDetail.value = res;
|
xzDetail.value = res;
|
||||||
showVideoSpsdWindow.value = true;
|
showVideoSpsdWindow.value = true;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
//关闭周边视频 || 视频随动
|
//关闭周边视频 || 视频随动
|
||||||
function onVideoClose(type) {
|
function onVideoClose(type) {
|
||||||
if (type == "zb") {
|
if (type == "zb") {
|
||||||
@ -82,10 +100,15 @@ function onVideoClose(type) {
|
|||||||
function onClose(type) {
|
function onClose(type) {
|
||||||
if (type == "gj") {
|
if (type == "gj") {
|
||||||
showYjWindow.value = false;
|
showYjWindow.value = false;
|
||||||
} else {
|
} else if (type == "zb") {
|
||||||
showZbyjWindow.value = false;
|
showZbyjWindow.value = false;
|
||||||
|
} else {
|
||||||
|
showDkqkWindow.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onUnmounted(() => {
|
||||||
|
emitter.off("clickDkqk");
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -94,8 +117,8 @@ function onClose(type) {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 91px;
|
top: 91px;
|
||||||
width: 360px;
|
width: 360px;
|
||||||
right: 380px ;
|
right: 380px;
|
||||||
z-index:9;
|
z-index: 9;
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
@ -111,6 +111,7 @@
|
|||||||
<el-button @click.stop="onClickGjhf">回放</el-button>
|
<el-button @click.stop="onClickGjhf">回放</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
<button class="dp-default small" @click="getDkqkData">打卡情况</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -340,6 +341,10 @@ function onClickZbyj() {
|
|||||||
let { jd, wd } = props.data;
|
let { jd, wd } = props.data;
|
||||||
emitter.emit("clickZbyj", { jd, wd });
|
emitter.emit("clickZbyj", { jd, wd });
|
||||||
}
|
}
|
||||||
|
const getDkqkData=()=>{
|
||||||
|
emitter.emit("closeVideo");
|
||||||
|
emitter.emit("clickDkqk", props.data);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -189,21 +189,21 @@ const handleLogin = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
console.log(loginForm.value,'loginForm.value')
|
console.log(loginForm.value,'loginForm.value')
|
||||||
store.dispatch("user/login", loginForm.value).then((res) => {
|
store.dispatch("user/login", loginForm.value).then((res) => {
|
||||||
loading.value = false;
|
// loading.value = false;
|
||||||
// 登录后操作
|
// // 登录后操作
|
||||||
// return false //调试好后删除
|
// // return false //调试好后删除
|
||||||
if (res.deptList.length === 1) {
|
// if (res.deptList.length === 1) {
|
||||||
window.location.href = '/'
|
// window.location.href = '/'
|
||||||
} else {
|
// } else {
|
||||||
deptList.value = [...res.deptList];
|
// deptList.value = [...res.deptList];
|
||||||
loginDialog.value = true;
|
// loginDialog.value = true;
|
||||||
authorization.value = res.jwtToken;
|
// authorization.value = res.jwtToken;
|
||||||
ElNotification({
|
// ElNotification({
|
||||||
title: "提示",
|
// title: "提示",
|
||||||
message: "请选择部门",
|
// message: "请选择部门",
|
||||||
duration: 3000
|
// duration: 3000
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ function resolve(dir) {
|
|||||||
return path.join(__dirname, dir);
|
return path.join(__dirname, dir);
|
||||||
}
|
}
|
||||||
const serverHost = "http://118.122.165.45:35623";
|
const serverHost = "http://118.122.165.45:35623";
|
||||||
// const serverHost = "http://192.168.1.8:8006";
|
// const serverHost = "http://192.168.3.105:8006";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
|
|||||||
Reference in New Issue
Block a user