forked from integrated_whb/integrated_whb_vue
Merge remote-tracking branch 'origin/dev' into dev
commit
5122d11abb
|
@ -41,7 +41,8 @@
|
|||
"vue-router": "^4.2.5",
|
||||
"vue3-pdfjs": "^0.1.6",
|
||||
"vue3-print-nb": "^0.1.4",
|
||||
"vue3-puzzle-vcode": "^1.1.5"
|
||||
"vue3-puzzle-vcode": "^1.1.5",
|
||||
"vue3-seamless-scroll": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@our-patches/postcss-px-to-viewport": "^1.2.0",
|
||||
|
@ -6018,6 +6019,14 @@
|
|||
"resolved": "https://registry.npmmirror.com/vue3-puzzle-vcode/-/vue3-puzzle-vcode-1.1.7.tgz",
|
||||
"integrity": "sha512-mW780dz7HKjrElnE60CeYSeHGidKBKHoMjTDYfqF21330rTkFOsfDK1FQKZ22MktgMtTEoS/imfpEDlM1cxY/g=="
|
||||
},
|
||||
"node_modules/vue3-seamless-scroll": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/vue3-seamless-scroll/-/vue3-seamless-scroll-2.0.1.tgz",
|
||||
"integrity": "sha512-mI3BaDU3pjcPUhVSw3/xNKdfPBDABTi/OdZaZqKysx4cSdNfGRbVvGNDzzptBbJ5S7imv5T55l6x/SqgnxKreg==",
|
||||
"dependencies": {
|
||||
"throttle-debounce": "5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/web-streams-polyfill": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz",
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
"vue-router": "^4.2.5",
|
||||
"vue3-pdfjs": "^0.1.6",
|
||||
"vue3-print-nb": "^0.1.4",
|
||||
"vue3-puzzle-vcode": "^1.1.5"
|
||||
"vue3-puzzle-vcode": "^1.1.5",
|
||||
"vue3-seamless-scroll": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@our-patches/postcss-px-to-viewport": "^1.2.0",
|
||||
|
|
|
@ -251,6 +251,14 @@
|
|||
color: var(--el-text-color-regular) !important;
|
||||
}
|
||||
|
||||
.el-date-table.is-week-mode .el-date-table__row {
|
||||
&.current, &:hover {
|
||||
.el-date-table-cell {
|
||||
--el-datepicker-inrange-bg-color: var(--el-fill-color-light) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-input.is-disabled .el-input__wrapper {
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
|
@ -33,9 +33,9 @@ export default function useAliYunUpload({
|
|||
Title: uploadInfo.file.name,
|
||||
FileName: uploadInfo.file.name,
|
||||
});
|
||||
uploadAddress = resData.body.uploadAddress;
|
||||
uploadAuth = resData.body.uploadAuth;
|
||||
videoId = resData.body.videoId;
|
||||
uploadAddress = resData.data.uploadAddress;
|
||||
uploadAuth = resData.data.uploadAuth;
|
||||
videoId = resData.data.videoId;
|
||||
} else {
|
||||
const resData = await setVideoRefresh({
|
||||
Title: uploadInfo.file.name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div style="flex: 1">
|
||||
<toolbar :editor="editorRef" :default-config="toolbarConfig" />
|
||||
<editor
|
||||
v-model="modelValue"
|
||||
|
|
|
@ -1,16 +1,29 @@
|
|||
<template>
|
||||
<div id="bi_container">
|
||||
<div id="map" class="map_bg"></div>
|
||||
<el-button v-show="type === 1" type="primary" @click="confrim"
|
||||
>完成绘制</el-button
|
||||
>
|
||||
<el-button v-show="type === 1" type="primary" @click="clear"
|
||||
>清除绘制</el-button
|
||||
>
|
||||
<el-button v-show="type === 1" type="primary" @click="reduction"
|
||||
>还原建筑</el-button
|
||||
>
|
||||
<span>当前选中楼层id:{{ model_id }}</span>
|
||||
<div class="options">
|
||||
<template v-if="type === 1">
|
||||
<div class="option" @click="confrim">
|
||||
<div>
|
||||
<img src="/src/assets/images/map_tools/icon1.png" alt="" />
|
||||
</div>
|
||||
<div class="label">完成绘制</div>
|
||||
</div>
|
||||
<div class="option" @click="clear">
|
||||
<div>
|
||||
<img src="/src/assets/images/map_tools/icon2.png" alt="" />
|
||||
</div>
|
||||
<div class="label">清除绘制</div>
|
||||
</div>
|
||||
<div class="option" @click="reduction">
|
||||
<div>
|
||||
<img src="/src/assets/images/map_tools/icon3.png" alt="" />
|
||||
</div>
|
||||
<div class="label">还原建筑</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="id">当前选中楼层id:{{ model_id }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -32,22 +45,18 @@ import { getEnterpriseInfo } from "@/request/enterprise_management.js";
|
|||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
required: true,
|
||||
default: 1,
|
||||
},
|
||||
positions: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
position: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
modUuid: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
|
@ -88,17 +97,48 @@ onBeforeUnmount(() => {
|
|||
window.$carmer = null;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
#bi_container {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
height: 600px;
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
|
||||
.map_bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 540px;
|
||||
}
|
||||
|
||||
.options {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
|
||||
.option {
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.label {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.id {
|
||||
background-color: #1b284a;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
height: 37px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
:width="800"
|
||||
:height="300"
|
||||
:is-crop="false"
|
||||
:is-clear-bg-color="false"
|
||||
:line-width="6"
|
||||
line-color="#000"
|
||||
bg-color="#FFFFFF"
|
||||
bg-color="#fff"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="fnReset">重签</el-button>
|
||||
|
|
|
@ -81,12 +81,6 @@ export function post(url, params) {
|
|||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (
|
||||
res.config.url === "/app/audioOrVideo/createUploadVideo" ||
|
||||
res.config.url === "/app/audioOrVideo/refreshUploadVideo"
|
||||
) {
|
||||
res.data.result = "success";
|
||||
}
|
||||
if (res.data.result === "success") {
|
||||
if (res.config.url.split("/")[1] === "positAlarm") {
|
||||
if (res.data.code === 200 || res.data.code === 0) resolve(res.data);
|
||||
|
|
|
@ -30,4 +30,6 @@ export const getPathPlanningList = (params) =>
|
|||
export const setPathPlanningDelete = (params) =>
|
||||
post("/positAlarm/coordinateLine/batchDelete", params); // 路径规划删除
|
||||
export const setPositioning = (params) =>
|
||||
post("/videomanager/setPositioning", params); // 摆放摄像头
|
||||
post("/videomanager/setPositioning", params); // 摆放摄像头
|
||||
export const setLayAdd = (params) => post("/positAlarm/save", params); // 新建图层
|
||||
export const setLayEdit = (params) => post("/positAlarm/edit", params); // 新建图层
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
import { post, upload } from "@/request/axios";
|
||||
|
||||
export const getNotificationAnnouncementList = (params) =>
|
||||
post("/noticecorp/list", params); // 企业公告列表
|
||||
export const setNotificationAnnouncementChangeStatus = (params) =>
|
||||
post("/noticecorp/changeStatus", params); // 企业公告修改启用状态
|
||||
export const setNotificationAnnouncementTopping = (params) =>
|
||||
post("/noticecorp/changeIsTop", params); // 企业公告置顶
|
||||
export const setNotificationAnnouncementDelete = (params) =>
|
||||
post("/noticecorp/delete", params); // 企业公告删除
|
||||
export const setNotificationAnnouncementBatchDeletion = (params) =>
|
||||
post("/noticecorp/deleteAll", params); // 企业公告删除多选
|
||||
export const getNotificationAnnouncementViewStatusList = (params) =>
|
||||
post("/noticecorp/listUserRead", params); // 企业公告查看状态列表
|
||||
export const getSelectNotifierList = (params) =>
|
||||
post("/user/listSelect", params); // 通知人列表
|
||||
export const setNotificationAnnouncementAdd = (params) =>
|
||||
upload("/noticecorp/add", params); // 企业公告添加
|
||||
export const getNotificationTemplateConfigurationList = (params) =>
|
||||
post("/notice_management/list", params); // 通知模板配置列表
|
||||
export const setNotificationTemplateConfigurationAdd = (params) =>
|
||||
post("/notice_management/add", params); // 通知模板配置改变状态
|
||||
export const setNotificationTemplateConfigurationConfigureList = (params) =>
|
||||
post("/notice_management/userlist", params); // 通知模板配置配置列表
|
||||
export const setNotificationTemplateConfigurationConfigure = (params) =>
|
||||
post("/notice_management/editUserName", params); // 通知模板配置配置
|
|
@ -25,23 +25,23 @@
|
|||
<layout-title title="告警时间趋势" />
|
||||
<div id="main2" class="option"></div>
|
||||
</div>
|
||||
<div class="block3">
|
||||
<layout-title title="告警来源" />
|
||||
<div class="option">
|
||||
<div class="table">
|
||||
<div class="tr">
|
||||
<div class="td">序号</div>
|
||||
<div class="td">告警数据类型</div>
|
||||
<div class="td">时间</div>
|
||||
</div>
|
||||
<div v-for="(item, index) in data.block4List" :key="index" class="tr">
|
||||
<div class="td">{{ item.serialNumber }}</div>
|
||||
<div class="td line-1">{{ item.type }}</div>
|
||||
<div class="td">{{ item.time }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="block3">-->
|
||||
<!-- <layout-title title="告警来源" />-->
|
||||
<!-- <div class="option">-->
|
||||
<!-- <div class="table">-->
|
||||
<!-- <div class="tr">-->
|
||||
<!-- <div class="td">序号</div>-->
|
||||
<!-- <div class="td">告警数据类型</div>-->
|
||||
<!-- <div class="td">时间</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-for="(item, index) in data.block4List" :key="index" class="tr">-->
|
||||
<!-- <div class="td">{{ item.serialNumber }}</div>-->
|
||||
<!-- <div class="td line-1">{{ item.type }}</div>-->
|
||||
<!-- <div class="td">{{ item.time }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
|
|
@ -107,21 +107,19 @@ function echarts1(id, legend, echartCount) {
|
|||
},
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgba(109, 131, 180, 1)",
|
||||
opacity: 0.6,
|
||||
},
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgba(66, 91, 147, 1)",
|
||||
opacity: 1,
|
||||
},
|
||||
]),
|
||||
barBorderRadius: [0, 0, 0, 0],
|
||||
},
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgba(109, 131, 180, 1)",
|
||||
opacity: 0.6,
|
||||
},
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgba(66, 91, 147, 1)",
|
||||
opacity: 1,
|
||||
},
|
||||
]),
|
||||
barBorderRadius: [0, 0, 0, 0],
|
||||
},
|
||||
data: echartCount,
|
||||
},
|
||||
|
@ -138,21 +136,19 @@ function echarts1(id, legend, echartCount) {
|
|||
},
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgba(109, 131, 180, 1)",
|
||||
opacity: 0.6,
|
||||
},
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgba(99, 126, 188, 1)",
|
||||
opacity: 1,
|
||||
},
|
||||
]),
|
||||
barBorderRadius: [0, 0, 0, 0],
|
||||
},
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgba(109, 131, 180, 1)",
|
||||
opacity: 0.6,
|
||||
},
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgba(99, 126, 188, 1)",
|
||||
opacity: 1,
|
||||
},
|
||||
]),
|
||||
barBorderRadius: [0, 0, 0, 0],
|
||||
},
|
||||
data: echartCount,
|
||||
barGap: 0,
|
||||
|
@ -165,9 +161,7 @@ function echarts1(id, legend, echartCount) {
|
|||
},
|
||||
type: "pictorialBar",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "rgba(183, 195, 226, 1)",
|
||||
},
|
||||
color: "rgba(183, 195, 226, 1)",
|
||||
},
|
||||
symbol: "diamond",
|
||||
symbolRotate: 0,
|
||||
|
|
|
@ -130,88 +130,63 @@ function echarts4(id) {
|
|||
fontSize: 12,
|
||||
},
|
||||
itemStyle: {
|
||||
// normal: {
|
||||
// color: {
|
||||
// type: 'linear',
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
// x2: 0,
|
||||
// y2: 1,
|
||||
// colorStops: [
|
||||
// {
|
||||
// offset: 0,
|
||||
// color: '#3b89f4',
|
||||
// },
|
||||
// {
|
||||
// offset: 1,
|
||||
// color: '#cce7fc',
|
||||
// },
|
||||
// ],
|
||||
// global: false, // 缺省为 false
|
||||
// },
|
||||
// },
|
||||
// emphasis: {
|
||||
// opacity: 1,
|
||||
// },
|
||||
normal: {
|
||||
color: (params) => {
|
||||
const colorList = [
|
||||
{
|
||||
type: "linear",
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#297ff2",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#cce7fc",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "linear",
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#3bfafe",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#aaf4fe",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "linear",
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#e08440",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#decabd",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
return colorList[params.dataIndex];
|
||||
},
|
||||
opacity: 0.7,
|
||||
color: (params) => {
|
||||
const colorList = [
|
||||
{
|
||||
type: "linear",
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#297ff2",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#cce7fc",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "linear",
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#3bfafe",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#aaf4fe",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "linear",
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#e08440",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#decabd",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
return colorList[params.dataIndex];
|
||||
},
|
||||
opacity: 0.7,
|
||||
// 鼠标移入柱子上 透明度变为 1
|
||||
emphasis: {
|
||||
opacity: 1,
|
||||
|
|
|
@ -248,11 +248,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.one,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "red",
|
||||
lineStyle: {
|
||||
color: "red",
|
||||
lineStyle: {
|
||||
color: "red",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -261,11 +259,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.two,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "orange",
|
||||
lineStyle: {
|
||||
color: "orange",
|
||||
lineStyle: {
|
||||
color: "orange",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -274,11 +270,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.three,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#ffeb3b",
|
||||
lineStyle: {
|
||||
color: "#ffeb3b",
|
||||
lineStyle: {
|
||||
color: "#ffeb3b",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -287,11 +281,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.zong,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#0385f4",
|
||||
lineStyle: {
|
||||
color: "#0385f4",
|
||||
lineStyle: {
|
||||
color: "#0385f4",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -111,7 +111,6 @@ import { nextTick, reactive } from "vue";
|
|||
const props = defineProps({
|
||||
isGatheringAlarm: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "0",
|
||||
},
|
||||
});
|
||||
|
|
|
@ -529,10 +529,10 @@ const rules = {
|
|||
{ required: true, message: "请选择入职日期", trigger: "change" },
|
||||
],
|
||||
CARDNO: [
|
||||
{ required: false, message: "请输入定位卡号(4位纯数字)", trigger: "blur" },
|
||||
{ required: false, message: "请输入定位卡号", trigger: "blur" },
|
||||
{
|
||||
pattern: /^-?[0-9]\d*$/,
|
||||
message: "请输入正确的定位卡号(4位纯数字)",
|
||||
message: "请输入正确的定位卡号",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
|
@ -785,6 +785,7 @@ const fnSubmit = debounce(
|
|||
form.letTypeOfWorkType = "value";
|
||||
form.letTypeOfWorkValue = form.TYPE_OF_WORK;
|
||||
}
|
||||
|
||||
if (data.form.faceFile?.[0]?.raw) {
|
||||
const resData = await image2Base64(data.form.faceFile[0].url);
|
||||
form.USERAVATARPREFIX = resData.substring(
|
||||
|
@ -792,6 +793,9 @@ const fnSubmit = debounce(
|
|||
resData.indexOf("base64,") + 7
|
||||
);
|
||||
form.USERAVATARURL = resData.substring(resData.indexOf("base64,") + 7);
|
||||
} else {
|
||||
form.USERAVATARPREFIX = "";
|
||||
form.USERAVATARURL = "";
|
||||
}
|
||||
if (!USER_ID) {
|
||||
if (data.allUser > data.USERS_NUM) {
|
||||
|
|
|
@ -1,28 +1,44 @@
|
|||
<template>
|
||||
<el-tabs v-model="active">
|
||||
<el-tab-pane label="平台公告" name="first">
|
||||
<ul>
|
||||
<li
|
||||
v-for="(item, index) in platformAnnouncementList.splice(0, 5)"
|
||||
<el-tab-pane label="平台公告" name="first" lazy>
|
||||
<seamless-scroll
|
||||
:list="platformAnnouncementList"
|
||||
hover
|
||||
class="scroll"
|
||||
:step="0.5"
|
||||
:single-wait-time="1000"
|
||||
:single-height="24"
|
||||
:model-value="!data.viewDialog.visible && active === 'first'"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in platformAnnouncementList"
|
||||
:key="index"
|
||||
class="line-1"
|
||||
class="line-1 item"
|
||||
@click="fnPlatformAnnouncementView(item.NOTICE_ID)"
|
||||
>
|
||||
{{ item.SYNOPSIS }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</seamless-scroll>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="企业公告" name="second">
|
||||
<ul>
|
||||
<li
|
||||
v-for="(item, index) in corporateAnnouncementList.splice(0, 5)"
|
||||
<el-tab-pane label="企业公告" name="second" lazy>
|
||||
<seamless-scroll
|
||||
:list="corporateAnnouncementList"
|
||||
hover
|
||||
class="scroll"
|
||||
:step="0.5"
|
||||
:single-wait-time="1000"
|
||||
:single-height="24"
|
||||
:model-value="!data.viewDialog.visible && active === 'second'"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in corporateAnnouncementList"
|
||||
:key="index"
|
||||
class="line-1"
|
||||
class="line-1 item"
|
||||
@click="fnCorporateAnnouncementView(item.NOTICECORP_ID)"
|
||||
>
|
||||
{{ item.SYNOPSIS }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</seamless-scroll>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<announcement-view
|
||||
|
@ -41,6 +57,7 @@ import {
|
|||
} from "@/request/index.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import AnnouncementView from "./announcement_view.vue";
|
||||
import { Vue3SeamlessScroll as SeamlessScroll } from "vue3-seamless-scroll";
|
||||
|
||||
const active = ref("first");
|
||||
const { list: platformAnnouncementList } = useListData(
|
||||
|
@ -70,11 +87,11 @@ const fnCorporateAnnouncementView = async (NOTICECORP_ID) => {
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
ul {
|
||||
.scroll {
|
||||
height: 120px;
|
||||
overflow: hidden;
|
||||
|
||||
li {
|
||||
.item {
|
||||
padding: 4px 0;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
|
|
|
@ -92,18 +92,16 @@ const fnInitEcharts = (data) => {
|
|||
},
|
||||
barWidth: 15,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (params) {
|
||||
const colorList = [
|
||||
"#ee6666",
|
||||
"#73c0de",
|
||||
"#3ca272",
|
||||
"#fc8452",
|
||||
"#9a60b4",
|
||||
"#5470c6",
|
||||
];
|
||||
return colorList[params.dataIndex];
|
||||
},
|
||||
color: function (params) {
|
||||
const colorList = [
|
||||
"#ee6666",
|
||||
"#73c0de",
|
||||
"#3ca272",
|
||||
"#fc8452",
|
||||
"#9a60b4",
|
||||
"#5470c6",
|
||||
];
|
||||
return colorList[params.dataIndex];
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -21,9 +21,7 @@ const fnInitEcharts = (data) => {
|
|||
text: "清单检查类型统计",
|
||||
textStyle: {
|
||||
fontSize: "14",
|
||||
normal: {
|
||||
fontWeight: "700",
|
||||
},
|
||||
fontWeight: "700",
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
|
@ -79,11 +77,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.xcqd,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#3ca272",
|
||||
lineStyle: {
|
||||
color: "#3ca272",
|
||||
lineStyle: {
|
||||
color: "#3ca272",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -92,11 +88,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.jcqd,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#5470c6",
|
||||
lineStyle: {
|
||||
color: "#5470c6",
|
||||
lineStyle: {
|
||||
color: "#5470c6",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -105,11 +99,9 @@ const fnInitEcharts = (data) => {
|
|||
type: "line",
|
||||
data: data.zhqd,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#ee6666",
|
||||
lineStyle: {
|
||||
color: "#ee6666",
|
||||
lineStyle: {
|
||||
color: "#ee6666",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -85,25 +85,23 @@ const fnInitEcharts = (data) => {
|
|||
data: yData,
|
||||
barWidth: "10px",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "#4abd91", // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#28b2d5", // 100% 处的颜色
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "#4abd91", // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#28b2d5", // 100% 处的颜色
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -33,7 +33,7 @@ const fnInitEcharts = (data) => {
|
|||
},
|
||||
legend: {
|
||||
icon: "rect",
|
||||
top: "5%",
|
||||
top: "8%",
|
||||
right: "5%",
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
|
@ -103,10 +103,8 @@ const fnInitEcharts = (data) => {
|
|||
data: data.all,
|
||||
smooth: true,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: colorList[0],
|
||||
borderColor: colorList[0],
|
||||
},
|
||||
color: colorList[0],
|
||||
borderColor: colorList[0],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -115,10 +113,8 @@ const fnInitEcharts = (data) => {
|
|||
data: data.wzg,
|
||||
smooth: true,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: colorList[1],
|
||||
borderColor: colorList[1],
|
||||
},
|
||||
color: colorList[1],
|
||||
borderColor: colorList[1],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -127,10 +123,8 @@ const fnInitEcharts = (data) => {
|
|||
data: data.yzg,
|
||||
smooth: true,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: colorList[2],
|
||||
borderColor: colorList[2],
|
||||
},
|
||||
color: colorList[2],
|
||||
borderColor: colorList[2],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -139,10 +133,8 @@ const fnInitEcharts = (data) => {
|
|||
data: data.yys,
|
||||
smooth: true,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: colorList[3],
|
||||
borderColor: colorList[3],
|
||||
},
|
||||
color: colorList[3],
|
||||
borderColor: colorList[3],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -3,20 +3,21 @@
|
|||
<div class="title">风险管控统计分析</div>
|
||||
<div class="round-box">
|
||||
<div class="content">
|
||||
<h1>{{ info.unitcount }}</h1>
|
||||
<span>风险点(单元)</span>
|
||||
<count-to :end-val="info.unitcount" class="value" />
|
||||
<span class="label">风险点(单元)</span>
|
||||
</div>
|
||||
<div class="round-jt" />
|
||||
<div class="content">
|
||||
<h1>{{ info.idcount }}</h1>
|
||||
<span>辨识部位</span>
|
||||
<count-to :end-val="info.idcount" class="value" />
|
||||
<span class="label">辨识部位</span>
|
||||
</div>
|
||||
<div class="round-jt" />
|
||||
<div class="content">
|
||||
<h1>
|
||||
{{ info.acount + info.bcount + info.ccount + info.dcount }}
|
||||
</h1>
|
||||
<span>存在风险</span>
|
||||
<count-to
|
||||
:end-val="info.acount + info.bcount + info.ccount + info.dcount"
|
||||
class="value"
|
||||
/>
|
||||
<span class="label">存在风险</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,6 +26,7 @@
|
|||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { getRiskManagement } from "@/request/large_screen_data_display.js";
|
||||
import CountTo from "vue-countup-v3";
|
||||
|
||||
const info = ref({
|
||||
unitcount: 0,
|
||||
|
@ -89,13 +91,16 @@ fnGetData();
|
|||
text-align: center;
|
||||
position: relative;
|
||||
|
||||
h1 {
|
||||
padding-top: 25px;
|
||||
.value {
|
||||
color: #70c5ff;
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
span {
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
color: #aaddff;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<img src="/src/assets/images/bi/faxianico.png" alt="" />
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ info.all }}</span>
|
||||
<span>发现隐患数</span>
|
||||
<count-to :end-val="info.all" />
|
||||
<div>发现隐患数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -17,8 +17,8 @@
|
|||
<img src="/src/assets/images/bi/noonico.png" alt="" />
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ info.wzg }}</span>
|
||||
<span>未完成整改隐患</span>
|
||||
<count-to :end-val="info.wzg" />
|
||||
<div>未完成整改隐患</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -26,12 +26,13 @@
|
|||
<img src="/src/assets/images/bi/yinhuan.png" alt="" />
|
||||
</div>
|
||||
<div>
|
||||
<span>
|
||||
{{
|
||||
<count-to
|
||||
:end-val="
|
||||
info.all !== 0 ? ((info.wzg / info.all) * 100).toFixed(2) : 0.0
|
||||
}}%
|
||||
</span>
|
||||
<span>未整改率</span>
|
||||
"
|
||||
:options="{ suffix: '%' }"
|
||||
/>
|
||||
<div>未整改率</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,6 +42,7 @@
|
|||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { getHiddenCount } from "@/request/large_screen_data_display.js";
|
||||
import CountTo from "vue-countup-v3";
|
||||
|
||||
const info = ref({
|
||||
all: 0,
|
||||
|
@ -108,16 +110,12 @@ fnGetData();
|
|||
height: 34px;
|
||||
}
|
||||
|
||||
div:nth-child(2) {
|
||||
> div:nth-child(2) {
|
||||
margin-left: 10px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
|
||||
&:first-child {
|
||||
color: #f8b62d;
|
||||
font-size: 20px;
|
||||
}
|
||||
.countup-wrap {
|
||||
color: #f8b62d;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,16 +4,25 @@
|
|||
<div class="p-20">
|
||||
<div class="top">
|
||||
<div>
|
||||
<div>现场类清单数</div>
|
||||
<div>{{ info["现场清单"] || 0 }}个</div>
|
||||
<div class="top_title">现场类清单数</div>
|
||||
<count-to
|
||||
:end-val="info['现场清单'] || 0"
|
||||
:options="{ suffix: '个' }"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div>基础类清单数</div>
|
||||
<div>{{ info["基础类清单"] || 0 }}个</div>
|
||||
<div class="top_title">基础类清单数</div>
|
||||
<count-to
|
||||
:end-val="info['基础类清单'] || 0"
|
||||
:options="{ suffix: '个' }"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div>综合类清单数</div>
|
||||
<div>{{ info["综合类清单"] || 0 }}个</div>
|
||||
<div class="top_title">综合类清单数</div>
|
||||
<count-to
|
||||
:end-val="info['综合类清单'] || 0"
|
||||
:options="{ suffix: '个' }"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
|
@ -46,6 +55,7 @@ import {
|
|||
import { sumBy } from "lodash-es";
|
||||
import { arrayObjectDeduplication } from "@/assets/js/utils.js";
|
||||
import * as echarts from "echarts";
|
||||
import CountTo from "vue-countup-v3";
|
||||
|
||||
const info = ref({});
|
||||
|
||||
|
@ -98,10 +108,8 @@ const fnInitEcharts = (count, total, color, el) => {
|
|||
type: "bar",
|
||||
zlevel: 1,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 0,
|
||||
color,
|
||||
},
|
||||
barBorderRadius: 0,
|
||||
color,
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
|
@ -117,10 +125,8 @@ const fnInitEcharts = (count, total, color, el) => {
|
|||
barGap: "-100%",
|
||||
data: [total],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: "#101f48",
|
||||
barBorderRadius: 0,
|
||||
},
|
||||
color: "#101f48",
|
||||
barBorderRadius: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -156,11 +162,11 @@ const fnInitEcharts = (count, total, color, el) => {
|
|||
border: 4px solid #0d2565;
|
||||
padding: 5px 20px 5px 5px;
|
||||
|
||||
div:nth-child(1) {
|
||||
.top_title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div:nth-child(2) {
|
||||
.countup-wrap {
|
||||
color: #04cbfd;
|
||||
text-align: right;
|
||||
padding-top: 5px;
|
||||
|
|
|
@ -503,12 +503,10 @@ const fnInitEcharts = (echartsData, example, id) => {
|
|||
{
|
||||
name: echartsData.legend[0],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: echartsData.color[0],
|
||||
lineStyle: {
|
||||
color: echartsData.color[0],
|
||||
lineStyle: {
|
||||
color: echartsData.color[0],
|
||||
width: 2,
|
||||
},
|
||||
width: 2,
|
||||
},
|
||||
},
|
||||
smooth: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="选点" :on-close="fnClose">
|
||||
<map-tools v-if="visible" ref="mapToolsRef" v-model:positions="positions" />
|
||||
<map-tools v-if="visible" v-model:positions="positions" />
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">关闭</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">保存</el-button>
|
||||
|
@ -23,9 +23,9 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: true,
|
||||
default: 0,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
|
|
|
@ -129,7 +129,6 @@ import SelectingPoints from "./components/selecting_points.vue";
|
|||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "1",
|
||||
},
|
||||
});
|
||||
|
|
|
@ -4,6 +4,30 @@
|
|||
:title="type === 'add' ? '新增' : '修改'"
|
||||
:on-close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="150px">
|
||||
<el-form-item label="名称" prop="layName">
|
||||
<el-input v-model="form.layName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分组" prop="layGroup">
|
||||
<el-input v-model="form.layGroup" />
|
||||
</el-form-item>
|
||||
<el-form-item label="楼层" prop="floor">
|
||||
<el-input v-model="form.floor" />
|
||||
</el-form-item>
|
||||
<el-form-item label="list" prop="floor">
|
||||
<el-input v-model="form.list" />
|
||||
</el-form-item>
|
||||
<el-form-item label="modUuid" prop="floor">
|
||||
<el-input v-model="form.modUuid" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<map-tools
|
||||
v-if="visible"
|
||||
ref="mapToolsRef"
|
||||
v-model:positions="form.list"
|
||||
v-model:modUuid="form.modUuid"
|
||||
:type="1"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">关闭</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">保存</el-button>
|
||||
|
@ -15,6 +39,10 @@
|
|||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
import MapTools from "@/components/map_tools";
|
||||
import { ref } from "vue";
|
||||
import { setLayAdd, setLayEdit } from "@/request/map_settings.js";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
|
@ -27,15 +55,45 @@ const props = defineProps({
|
|||
required: true,
|
||||
default: "",
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
const { visible } = useVModels(props, emits);
|
||||
const formRef = ref(null);
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const rules = {
|
||||
layName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
layGroup: [{ required: true, message: "分组不能为空", trigger: "blur" }],
|
||||
floor: [{ required: true, message: "楼层不能为空", trigger: "blur" }],
|
||||
};
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const fnClose = () => {
|
||||
positions.value = [];
|
||||
modUuid.value = "";
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const positions = ref([]);
|
||||
const modUuid = ref("");
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
if (props.form.list.length === 0 || props.form.modUuid === "") {
|
||||
ElMessage.error("未选择建筑,或者未扎点");
|
||||
return;
|
||||
}
|
||||
props.form.layId
|
||||
? await setLayAdd({
|
||||
...props.form,
|
||||
list: JSON.stringify(props.form.list),
|
||||
})
|
||||
: await setLayEdit({
|
||||
...props.form,
|
||||
list: JSON.stringify(props.form.list),
|
||||
});
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnAddOrEdit(row.layId, 'edit')"
|
||||
@click="fnAddOrEdit(row, 'edit')"
|
||||
>
|
||||
修改图层
|
||||
</el-button>
|
||||
|
@ -73,6 +73,7 @@
|
|||
<add
|
||||
v-model:visible="data.addOrEditDialog.visible"
|
||||
:type="data.addOrEditDialog.type"
|
||||
:form="data.addOrEditDialog.form"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
<edit-layer-info
|
||||
|
@ -102,8 +103,7 @@ const { list, searchForm, tableRef, pagination, fnGetData, fnResetPagination } =
|
|||
const data = reactive({
|
||||
addOrEditDialog: {
|
||||
visible: false,
|
||||
layId: "",
|
||||
type: "",
|
||||
form: {},
|
||||
},
|
||||
editLayerInfoDialog: {
|
||||
visible: false,
|
||||
|
@ -140,8 +140,8 @@ const fnBatchDelete = debounce(
|
|||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnAddOrEdit = (layId, type) => {
|
||||
data.addOrEditDialog.layId = layId;
|
||||
const fnAddOrEdit = (row, type) => {
|
||||
data.addOrEditDialog.form = row;
|
||||
data.addOrEditDialog.type = type;
|
||||
data.addOrEditDialog.visible = true;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="公告简介" prop="SYNOPSIS">
|
||||
<el-input v-model="form.SYNOPSIS" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否全部通知" prop="ISALL">
|
||||
<el-radio-group v-model="form.ISALL">
|
||||
<el-radio :label="'yes'">全部通知</el-radio>
|
||||
<el-radio :label="'no'">部分通知</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.ISALL === 'no'"
|
||||
label="选择通知人"
|
||||
prop="userNames"
|
||||
>
|
||||
<div style="flex: 1; display: flex; justify-content: space-between">
|
||||
<el-input
|
||||
:model-value="form.userNames.split(',').join('、')"
|
||||
disabled
|
||||
style="flex: 1"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="ml-10"
|
||||
@click="selectNotifierDialogVisible = true"
|
||||
>
|
||||
请选择
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="CONTENT">
|
||||
<layout-editor v-model="form.CONTENT" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件路径">
|
||||
<layout-upload v-model:file-list="form.fileList" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="mt-10 tc">
|
||||
<el-button type="primary" @click="fnSubmit">保存</el-button>
|
||||
</div>
|
||||
<select-notifier
|
||||
v-model:visible="selectNotifierDialogVisible"
|
||||
@confirm="fnSelectNotifierConfirm"
|
||||
/>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import LayoutEditor from "@/components/editor/index.vue";
|
||||
import LayoutUpload from "@/components/upload/index.vue";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { setNotificationAnnouncementAdd } from "@/request/notification_announcement.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import SelectNotifier from "./components/select_notifier.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const rules = {
|
||||
SYNOPSIS: [{ required: true, message: "公告简介不能为空", trigger: "blur" }],
|
||||
CONTENT: [{ required: true, message: "内容不能为空", trigger: "blur" }],
|
||||
userNames: [{ required: true, message: "请选择通知人", trigger: "blur" }],
|
||||
};
|
||||
const form = ref({
|
||||
SYNOPSIS: "",
|
||||
ISALL: "yes",
|
||||
CONTENT: "",
|
||||
userIds: "",
|
||||
userNames: "",
|
||||
fileList: [],
|
||||
});
|
||||
const formRef = ref(null);
|
||||
const selectNotifierDialogVisible = ref(false);
|
||||
const fnSelectNotifierConfirm = (userIds, userNames) => {
|
||||
form.value.userIds = userIds;
|
||||
form.value.userNames = userNames;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
Object.keys(form.value).forEach((key) => {
|
||||
formData.append(key, form.value[key]);
|
||||
});
|
||||
formData.delete("fileList");
|
||||
for (let i = 0; i < form.value.fileList.length; i++) {
|
||||
formData.append("file", form.value.fileList[i].raw);
|
||||
formData.append("fileName", form.value.fileList[i].name);
|
||||
}
|
||||
await setNotificationAnnouncementAdd(formData);
|
||||
ElMessage.success("添加成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,78 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="选择通知人">
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用户名/姓名" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="USER_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">关闭</el-button>
|
||||
<el-button type="primary" @click="fnConfirm">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getSelectNotifierList } from "@/request/notification_announcement.js";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "confirm"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const { list, searchForm, pagination, tableRef, fnResetPagination, fnGetData } =
|
||||
useListData(getSelectNotifierList, { key: "userList" });
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const fnConfirm = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
const userIds = selectionData.map((item) => item.USER_ID).join(",");
|
||||
const userNames = selectionData.map((item) => item.NAME).join(",");
|
||||
emits("confirm", userIds, userNames);
|
||||
fnClose();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,50 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="查看">
|
||||
<el-descriptions border :column="1">
|
||||
<el-descriptions-item label="发布人">
|
||||
{{ info.CREATOR }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发布时间">
|
||||
{{ info.CREATTIME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="内容">
|
||||
<div v-html="info.CONTENT" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="info.FILEPATH" label="附件">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="useDownloadFile(info.FILEPATH)"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import useDownloadFile from "@/assets/js/useDownloadFile.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,65 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="查看状态">
|
||||
<layout-table
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column label="阅读状态">
|
||||
<template #default="{ row }">
|
||||
{{ row.TYPE === 0 ? "未阅" : "已阅" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATOR" label="阅读时间" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getNotificationAnnouncementViewStatusList } from "@/request/notification_announcement.js";
|
||||
import { watchEffect } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const { list, pagination, fnResetPagination, fnGetData } = useListData(
|
||||
getNotificationAnnouncementViewStatusList,
|
||||
{
|
||||
immediate: false,
|
||||
}
|
||||
);
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({ NOTICECORP_ID: props.id });
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (visible.value) {
|
||||
fnResetPagination({ NOTICECORP_ID: props.id });
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,238 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="80px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="公告简介" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="NOTICECORP_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATOR" label="发布人" width="200" />
|
||||
<el-table-column prop="CREATTIME" label="发布时间" width="160" />
|
||||
<el-table-column
|
||||
prop="SYNOPSIS"
|
||||
label="公告简介"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="启用状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-model="row.STATUS"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="fnChangeStatus(row.NOTICECORP_ID)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查看状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnViewStatus(row.NOTICECORP_ID)"
|
||||
>
|
||||
{{ row.countCk }}/{{ row.countAll }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="140">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnTopping(row.NOTICECORP_ID, row.ISTOP === '0' ? 1 : 0)"
|
||||
>
|
||||
{{ row.ISTOP === "0" ? "置顶" : "取消置顶" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.NOTICECORP_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/notification_announcement/notification_announcement/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDeletion"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<view-info
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
:info="data.viewDialog.info"
|
||||
/>
|
||||
<view-status
|
||||
:id="data.viewStatusDialog.id"
|
||||
v-model:visible="data.viewStatusDialog.visible"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
getNotificationAnnouncementList,
|
||||
setNotificationAnnouncementChangeStatus,
|
||||
setNotificationAnnouncementDelete,
|
||||
setNotificationAnnouncementBatchDeletion,
|
||||
setNotificationAnnouncementTopping,
|
||||
} from "@/request/notification_announcement.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import { reactive } from "vue";
|
||||
import ViewInfo from "./components/view.vue";
|
||||
import ViewStatus from "./components/view_status.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, tableRef, fnGetData, fnResetPagination } =
|
||||
useListData(getNotificationAnnouncementList, {
|
||||
callbackFn: (list, resData) => {
|
||||
const countNotList = resData.countNotList;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const notMap = list[i];
|
||||
const notId = notMap.NOTICECORP_ID;
|
||||
let countCk = 0;
|
||||
let countWCK = 0;
|
||||
let countAll = 0;
|
||||
for (let j = 0; j < countNotList.length; j++) {
|
||||
const countNotId = countNotList[j].noticecorp_id;
|
||||
if (notId === countNotId) {
|
||||
if (countNotList[j].type === 1) countCk = countNotList[j].count;
|
||||
if (countNotList[j].type === 0) countWCK = countNotList[j].count;
|
||||
}
|
||||
}
|
||||
countAll = countCk + countWCK;
|
||||
notMap.countCk = countCk;
|
||||
notMap.countAll = countAll;
|
||||
}
|
||||
},
|
||||
});
|
||||
const data = reactive({
|
||||
viewDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
viewStatusDialog: {
|
||||
visible: false,
|
||||
id: "",
|
||||
},
|
||||
});
|
||||
const buttonJurisdiction = await useButtonJurisdiction("noticecorp");
|
||||
const fnChangeStatus = debounce(
|
||||
1000,
|
||||
async (NOTICECORP_ID) => {
|
||||
await setNotificationAnnouncementChangeStatus({ NOTICECORP_ID });
|
||||
ElMessage.success("状态修改成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnTopping = debounce(
|
||||
1000,
|
||||
async (NOTICECORP_ID, ISTOP) => {
|
||||
const message = ISTOP === 1 ? "置顶" : "取消置顶";
|
||||
await ElMessageBox.confirm("确定要" + message + "吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
await setNotificationAnnouncementTopping({ NOTICECORP_ID, ISTOP });
|
||||
ElMessage.success(message + "成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (NOTICECORP_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await setNotificationAnnouncementDelete({ NOTICECORP_ID });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDeletion = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS = selectionData.map((item) => item.NOTICECORP_ID).join(",");
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await setNotificationAnnouncementBatchDeletion({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnView = (row) => {
|
||||
data.viewDialog.info = row;
|
||||
data.viewDialog.visible = true;
|
||||
};
|
||||
const fnViewStatus = (NOTICECORP_ID) => {
|
||||
data.viewStatusDialog.visible = true;
|
||||
data.viewStatusDialog.id = NOTICECORP_ID;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,128 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="配置" :on-close="fnClose">
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
row-key="USER_ID"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { nextTick, ref, watch } from "vue";
|
||||
import {
|
||||
setNotificationTemplateConfigurationConfigure,
|
||||
setNotificationTemplateConfigurationConfigureList,
|
||||
} from "@/request/notification_announcement.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
noticeManagementId: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
noticeTemplateId: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const checkUserList = ref([]);
|
||||
const { list, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(setNotificationTemplateConfigurationConfigureList, {
|
||||
immediate: false,
|
||||
clearSelection: false,
|
||||
key: "userList",
|
||||
callbackFn: (list, resData) => {
|
||||
checkUserList.value = resData.checkuserList;
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({ NOTICE_MANAGEMENT_ID: props.noticeManagementId });
|
||||
};
|
||||
const fnResetPaginationTransfer = async () => {
|
||||
await fnResetPagination({ NOTICE_MANAGEMENT_ID: props.noticeManagementId });
|
||||
};
|
||||
const fnInit = async () => {
|
||||
await fnResetPaginationTransfer();
|
||||
await nextTick();
|
||||
checkUserList.value.forEach((item) => {
|
||||
tableRef.value.toggleRowSelection(item);
|
||||
});
|
||||
fnResetPaginationTransfer();
|
||||
};
|
||||
watch(
|
||||
() => props.visible,
|
||||
(val) => {
|
||||
if (val) {
|
||||
fnInit();
|
||||
}
|
||||
}
|
||||
);
|
||||
const fnClose = () => {
|
||||
tableRef.value.clearSelection();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选择要发送的用户");
|
||||
return;
|
||||
}
|
||||
const ADDRESSEE = selectionData.map((item) => item.USER_ID).join(",");
|
||||
const USERNAME = selectionData.map((item) => item.NAME).join(",");
|
||||
await ElMessageBox.confirm(
|
||||
`确定要发送短信给<span class="text-green">${USERNAME.split(",").join(
|
||||
"、"
|
||||
)}</span>吗?`,
|
||||
{
|
||||
type: "warning",
|
||||
dangerouslyUseHTMLString: true,
|
||||
}
|
||||
);
|
||||
await setNotificationTemplateConfigurationConfigure({
|
||||
NOTICE_MANAGEMENT_ID: props.noticeManagementId,
|
||||
NOTICETEMPLATE_ID: props.noticeTemplateId,
|
||||
ADDRESSEE,
|
||||
USERNAME,
|
||||
});
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,122 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="50px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" prop="KEYWORDS">
|
||||
<el-input v-model="searchForm.KEYWORDS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="类型" />
|
||||
<el-table-column prop="USERNAME" label="抄送人员" />
|
||||
<el-table-column label="启用状态" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
:model-value="row.ISENABLE"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="
|
||||
fnChangeStatus(row.NOTICE_MANAGEMENT_ID, row.NOTICETEMPLATE_ID)
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
fnConfigure(row.NOTICE_MANAGEMENT_ID, row.NOTICETEMPLATE_ID)
|
||||
"
|
||||
>
|
||||
配置
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<configure
|
||||
v-model:visible="data.configureDialog.visible"
|
||||
:notice-management-id="data.configureDialog.NOTICE_MANAGEMENT_ID"
|
||||
:notice-template-id="data.configureDialog.NOTICETEMPLATE_ID"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import Configure from "./components/configure.vue";
|
||||
import {
|
||||
getNotificationTemplateConfigurationList,
|
||||
setNotificationTemplateConfigurationAdd,
|
||||
} from "@/request/notification_announcement.js";
|
||||
|
||||
const data = reactive({
|
||||
configureDialog: {
|
||||
visible: false,
|
||||
NOTICE_MANAGEMENT_ID: "",
|
||||
NOTICETEMPLATE_ID: "",
|
||||
},
|
||||
});
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getNotificationTemplateConfigurationList, {
|
||||
callbackFn: (list) => {
|
||||
list.forEach((item) => {
|
||||
item.ISENABLE = item.ISENABLE || "0";
|
||||
});
|
||||
},
|
||||
});
|
||||
const fnChangeStatus = debounce(
|
||||
1000,
|
||||
async (NOTICE_MANAGEMENT_ID, NOTICETEMPLATE_ID) => {
|
||||
await setNotificationTemplateConfigurationAdd({
|
||||
NOTICE_MANAGEMENT_ID,
|
||||
NOTICETEMPLATE_ID,
|
||||
});
|
||||
ElMessage.success("状态修改成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnConfigure = async (NOTICE_MANAGEMENT_ID, NOTICETEMPLATE_ID) => {
|
||||
data.configureDialog.visible = true;
|
||||
data.configureDialog.NOTICE_MANAGEMENT_ID = NOTICE_MANAGEMENT_ID;
|
||||
data.configureDialog.NOTICETEMPLATE_ID = NOTICETEMPLATE_ID;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -4,7 +4,7 @@
|
|||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="70px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
@submit.prevent="fnGetDataTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
<el-button native-type="reset" @click="fnGetDataTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -98,25 +98,26 @@ import {
|
|||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, searchForm, pagination, fnResetPagination } = useListData(
|
||||
const { list, searchForm, pagination, fnGetData } = useListData(
|
||||
getDetectionSituationList,
|
||||
{
|
||||
immediate: false,
|
||||
usePagination: false,
|
||||
}
|
||||
);
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnGetData = async () => {
|
||||
const fnInit = async () => {
|
||||
const resData = await getDetectionSituationListTime();
|
||||
searchForm.value.dates = [resData.pd.MINTIME, resData.pd.MAXTIME];
|
||||
fnResetPaginationTransfer();
|
||||
fnGetDataTransfer();
|
||||
};
|
||||
fnGetData();
|
||||
fnInit();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="70px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
@submit.prevent="fnGetDataTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
|
@ -48,7 +48,7 @@
|
|||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
<el-button native-type="reset" @click="fnGetDataTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -112,7 +112,7 @@ const achieving = ref(0);
|
|||
const listNoCheckNum = ref(0);
|
||||
const listCheckedNum = ref(0);
|
||||
const checkTheRate = ref(0);
|
||||
const { list, searchForm, pagination, fnResetPagination } = useListData(
|
||||
const { list, searchForm, pagination, fnGetData } = useListData(
|
||||
getUsageSituationList,
|
||||
{
|
||||
defaultSearchForm: {
|
||||
|
@ -128,8 +128,8 @@ const { list, searchForm, pagination, fnResetPagination } = useListData(
|
|||
},
|
||||
}
|
||||
);
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="选点" :on-close="fnClose">
|
||||
<map-tools
|
||||
v-if="visible"
|
||||
ref="mapToolsRef"
|
||||
v-model:position="position"
|
||||
:type="2"
|
||||
/>
|
||||
<map-tools v-if="visible" v-model:position="position" :type="2" />
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">关闭</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">保存</el-button>
|
||||
|
@ -28,9 +23,9 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: true,
|
||||
default: 0,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
|
@ -46,7 +41,12 @@ const fnSubmit = debounce(
|
|||
ElMessage.warning("请选择坐标点");
|
||||
return;
|
||||
}
|
||||
await setPositioning({ camId: props.id, lon: position.value[0], lat: position.value[1], alt: position.value[2] });
|
||||
await setPositioning({
|
||||
camId: props.id,
|
||||
lon: position.value[0],
|
||||
lat: position.value[1],
|
||||
alt: position.value[2],
|
||||
});
|
||||
ElMessage.success("保存成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
|
|
Loading…
Reference in New Issue