修改媒体地图、供应商表单、PPT工具分析添加上传图片。添加查看全部通知界面

This commit is contained in:
wangchengming 2025-09-22 23:49:44 +08:00
parent ab440226c7
commit 37a07491b6
8 changed files with 463 additions and 119 deletions

View File

@ -1049,7 +1049,7 @@ h6 {
// 弹窗样式覆盖 // 弹窗样式覆盖
.media_dialog { .media_dialog {
padding: 0 !important; padding: 0 !important;
top: 148px; top: 164px;
margin-left: 40px; margin-left: 40px;
} }
@ -1118,7 +1118,7 @@ h6 {
.media_dialog .el-dialog__body { .media_dialog .el-dialog__body {
padding: 0px; padding: 0px;
overflow-y: auto; overflow-y: auto;
height: calc(100vh - 220px); height: calc(100vh - 234px);
} }
.my_dialog .el-dialog__body { .my_dialog .el-dialog__body {

View File

@ -19,7 +19,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<img :src="userStore.avatar ? userStore.avatar : avatar_icon" class="user-avatar" /> <img :src="userStore.avatar ? userStore.avatar : avatar_icon" class="user-avatar" />
<span class="user-nickname"> {{ userStore.nickName }} admin </span> <span class="user-nickname"> {{ userStore.name }} </span>
<div class="logout_icon"> <div class="logout_icon">
<el-tooltip class="box-item" effect="dark" content="退出" placement="bottom-start"> <el-tooltip class="box-item" effect="dark" content="退出" placement="bottom-start">
<img :src="logout_icon" class="custom-icon" @click="logout" /> <img :src="logout_icon" class="custom-icon" @click="logout" />

View File

@ -13,7 +13,9 @@ const useUserStore = defineStore(
id: '', id: '',
name: '', name: '',
nickName: '', nickName: '',
userName: '',
avatar: '', avatar: '',
phoneNumber: '',
roles: [], roles: [],
permissions: [] permissions: []
}), }),
@ -50,9 +52,11 @@ const useUserStore = defineStore(
this.roles = ['ROLE_DEFAULT'] this.roles = ['ROLE_DEFAULT']
} }
this.id = user.userId this.id = user.userId
this.name = user.userName this.name = user.realName
this.nickName = user.nickName // this.nickName = user.nickName
this.userName = user.userName
this.avatar = avatar this.avatar = avatar
this.phoneNumber = user.phonenumber
/* 初始密码提示 */ /* 初始密码提示 */
if(res.isDefaultModifyPwd) { if(res.isDefaultModifyPwd) {
ElMessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { ElMessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {

View File

@ -45,7 +45,9 @@
<div class="right-content"> <div class="right-content">
<div class="title-container"> <div class="title-container">
<div class="title-label"> <div class="title-label">
<img :src="notic_icon" class="custom-icon" /><span>系统通知</span> <img :src="notic_icon" class="custom-icon" />
<span>系统通知</span>
<span class="moreText" @click="handleGoNoticeList">更多...</span>
</div> </div>
</div> </div>
<ul class="resource-list" v-if="notices.length > 0"> <ul class="resource-list" v-if="notices.length > 0">
@ -67,6 +69,7 @@
<script setup name="Index"> <script setup name="Index">
import { nextTick, onMounted, ref } from 'vue'; import { nextTick, onMounted, ref } from 'vue';
// import { More } from '@element-plus/icons-vue'
import { noticeList } from "@/api/notice" import { noticeList } from "@/api/notice"
import mediaMap from '@/assets/images/mediaMap.png' import mediaMap from '@/assets/images/mediaMap.png'
import supplierManage from '@/assets/images/supplierManage.png' import supplierManage from '@/assets/images/supplierManage.png'
@ -171,6 +174,10 @@ const getNoticeList = () => {
notices.value = res.rows notices.value = res.rows
}) })
} }
//
const handleGoNoticeList = () => {
router.push('/noticeList')
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.flex-container { .flex-container {
@ -350,4 +357,13 @@ const getNoticeList = () => {
line-height: 28px; line-height: 28px;
cursor: pointer; cursor: pointer;
} }
.moreText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
color: #FFFFFF;
padding-left: 158px !important;
cursor: pointer;
}
</style> </style>

View File

@ -1,5 +1,47 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="searchPanel">
<div class="more-search-pane">
<div class="search-where-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchPanelForm">
<el-form-item label="媒体类型:">
<el-select v-model="queryParams.mediaType" placeholder="请选择" @change="getMediaTypeTwo"
clearable style="min-width: 30px">
<el-option v-for="item in mediaTypeOne" :key="item.id" :label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="媒体大类:">
<el-select v-model="queryParams.mediaCategory" placeholder="请选择" @change="getMediaTypeThree"
clearable style="min-width: 30px">
<el-option v-for="item in mediaTypeTwo" :key="item.id" :label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="展示形式:">
<el-select v-model="queryParams.displayForm" placeholder="请选择" clearable
style="min-width: 30px">
<el-option v-for="item in mediaTypeThree" :key="item.id" :label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div class="choseResultPanel">
<el-form :inline="true" class="searchSmallPanelForm">
<el-form-item label="已选媒体:">
<div v-if="multipleChoseArr.length == 0" class="noChoseLabel">未选择媒体</div>
<template v-else>
<el-tag v-for="tag in multipleChoseArr" :key="tag.id" class="choseResultTag"
@close="handleCloseTag(tag)" closable>
{{ tag.mediaName }}
</el-tag>
</template>
</el-form-item>
</el-form>
</div>
<el-card class="mediaCard"> <el-card class="mediaCard">
<el-row :gutter="10" class="my_row" style="padding: 0 20px;"> <el-row :gutter="10" class="my_row" style="padding: 0 20px;">
<el-col :span="12"> <el-col :span="12">
@ -7,13 +49,9 @@
<el-form-item label="" prop="templateName"> <el-form-item label="" prop="templateName">
<el-select class="filterSelect" v-model="centerPointName" filterable remote reserve-keyword <el-select class="filterSelect" v-model="centerPointName" filterable remote reserve-keyword
:remote-method="getLocaleListList" :loading="selectLoading" @change="currentSelect" :remote-method="getLocaleListList" :loading="selectLoading" @change="currentSelect"
placeholder="请输入内容以设置中心点" remote-show-suffix clearable style="width: 400px"> placeholder="请输入媒体名称/媒体编号/关键字" remote-show-suffix clearable style="width: 400px">
<el-option v-for="item in localeList" :key="item.id" :label="item.name" :value="item" <el-option v-for="item in localeList" :key="item.mediaId" :label="item.mediaName"
class="one-text"> :value="item.mediaId" class="one-text">
<div style="height: 24px; line-height: 24px;font-size: 16px;">{{ item.name }}</div>
<div style="color: #8492a6; font-size: 12px;height: 18px; line-height: 18px;">{{
item.address
}}</div>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -33,10 +71,29 @@
</template> </template>
</el-dropdown> </el-dropdown>
<div class="clearBtn" @click="resetQuery">清除条件</div> <div class="clearBtn" @click="resetQuery">清除条件</div>
<el-dropdown placement="bottom-start" style="margin: 0 12px;">
<el-button type="primary" class="mediaMapExportBtn">
导出PPT
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item class="dropItem" v-for="temp in templateList"
@click="handleExportPPT(temp.id)">
<span v-if="temp.type == 3">优客模板导出</span>
<span v-if="temp.type == 2">滴滴模板导出</span>
<span v-if="temp.type == 1">空白模板导出</span>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</el-col> </el-col>
</el-row> </el-row>
<div id="mapContainer" class="mediaMapContainer"></div> <div id="mapContainer" class="mediaMapContainer">
</div>
<div v-if="contextMenuVisible" class="custom-context-menu" :style="menuPosition" @click="handleChoseMedia">
选择媒体
</div>
<el-dialog v-model="open" width="400px" :modal="false" class="media_dialog" :destroy-on-close="true" <el-dialog v-model="open" width="400px" :modal="false" class="media_dialog" :destroy-on-close="true"
:close-on-click-modal="false"> :close-on-click-modal="false">
@ -148,6 +205,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
<export-p-p-t-dialog ref="exportPPTDialogRef" />
</el-card> </el-card>
</div> </div>
@ -166,21 +224,34 @@ import {
ZoomOut, ZoomOut,
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import AMapLoader from "@amap/amap-jsapi-loader"; // import AMapLoader from "@amap/amap-jsapi-loader"; //
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
import { useBackgroundStore } from '@/store/modules/background' import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png' import otherbg from '@/assets/images/otherbg.png'
import { mediaByMap, mediaDetail } from "@/api/mediaLibrary" import { mediaByMap, mediaDetail } from "@/api/mediaLibrary"
import { pptTemplatePage } from "@/api/system/pptTemplate"
import exportPPTDialog from '../mediaLibrary/exportPPTDialog.vue';
const baseUrl = import.meta.env.VITE_APP_BASE_API const baseUrl = import.meta.env.VITE_APP_BASE_API
const bgStore = useBackgroundStore() const bgStore = useBackgroundStore()
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const { apiKey, secretKey } = window._CONFIG const { apiKey, secretKey } = window._CONFIG
// ppt
const templateList = ref([])
const exportPPTDialogRef = ref(null)
//
const mediaTypeOne = ref([])
const mediaTypeTwo = ref([])
const mediaTypeThree = ref([])
//
const multipleChoseArr = ref([])
const open = ref(false) const open = ref(false)
const detailForm = ref({}) const detailForm = ref({})
const fileList = ref([]) const fileList = ref([])
const previewImg = ref([]) const previewImg = ref([])
//
const centerPointName = ref(null)
// map // map
const mapInstance = ref(null) const mapInstance = ref(null)
const massMarks = ref(null) const massMarks = ref(null)
@ -191,9 +262,12 @@ const mapMode = ref('2D')
const isFullscreen = ref(false) const isFullscreen = ref(false)
const placeSearch = ref(null) const placeSearch = ref(null)
//
const centerPointName = ref(null)
// //
const circle = ref(null); const circle = ref(null);
const circleRadius = ref(500); // const circleRadius = ref(1000); //
const circleHandle = ref(null); // const circleHandle = ref(null); //
// //
@ -213,6 +287,13 @@ const distanceLableArray = ref([
]) ])
const points = ref([]) const points = ref([])
//
const contextMenuVisible = ref(false);
const menuPosition = ref({
top: '0px', left: '0px', zIndex: 999
});
//
const curMediaInfo = ref(null)
const data = reactive({ const data = reactive({
queryParams: { queryParams: {
@ -220,6 +301,9 @@ const data = reactive({
x: undefined, // x: undefined, //
y: undefined, // y: undefined, //
distance: undefined, distance: undefined,
mediaType: undefined,
mediaCategory: undefined,
displayForm: undefined
} }
}) })
const { queryParams } = toRefs(data) const { queryParams } = toRefs(data)
@ -231,12 +315,15 @@ const resetQuery = () => {
x: undefined, // x: undefined, //
y: undefined, // y: undefined, //
distance: undefined, distance: undefined,
mediaType: undefined,
mediaCategory: undefined,
displayForm: undefined
} }
// //
distanceLable.value = '请选择' distanceLable.value = '请选择'
// //
activeLableIndex.value = null activeLableIndex.value = null
circleRadius.value = 500; // circleRadius.value = 1000; //
selectConfig.value = null selectConfig.value = null
// //
@ -272,72 +359,79 @@ const handleViewMedia = (_mediaId) => {
} }
// API //
const getLocaleListList = (searchValue) => { const getLocaleListList = (searchValue) => {
selectLoading.value = true selectLoading.value = true
if (searchValue !== "") { if (searchValue !== "") {
placeSearch.value.search(searchValue, function (status, result) { queryParams.value.keyword = searchValue
// resultPOI mediaByMap(queryParams.value).then(res => {
if (result.poiList.pois?.length) { if (res.code == 200) {
localeList.value = result.poiList?.pois localeList.value = res.data.length > 0 ? res.data : []
selectLoading.value = false
} }
selectLoading.value = false })
});
// placeSearch.value.search(searchValue, function (status, result) {
// // resultPOI
// if (result.poiList.pois?.length) {
// localeList.value = result.poiList?.pois
// }
// selectLoading.value = false
// });
} }
} }
// //
const currentSelect = (val) => { const currentSelect = (val) => {
selectConfig.value = val const chosedMedia = localeList.value.filter(item => item.mediaId == val)[0]
centerPointName.value = val.name if (chosedMedia) {
// queryParams.value.keyword = val.name centerPointName.value = chosedMedia.mediaName
queryParams.value.x = val.location.lng
queryParams.value.y = val.location.lat
queryParams.value.distance = circleRadius.value
// //
distanceLable.value = circleRadius.value == 500 ? '500米' : circleRadius.value + '米' distanceLable.value = circleRadius.value == 1000 ? '1000米' : circleRadius.value + '米'
// //
activeLableIndex.value = circleRadius.value == 500 ? 500 : circleRadius.value activeLableIndex.value = circleRadius.value == 1000 ? 1000 : circleRadius.value
// //
if (circle.value) { if (circle.value) {
mapInstance.value.remove(circle.value); mapInstance.value.remove(circle.value);
circle.value = null; circle.value = null;
} }
if (circleHandle.value) { if (circleHandle.value) {
mapInstance.value.remove(circleHandle.value); mapInstance.value.remove(circleHandle.value);
circleHandle.value = null; circleHandle.value = null;
}
// addCenterMark(chosedMedia)
createCircle(chosedMedia)
} }
createCircle(val)
addCenterMark(val)
} }
// //
const addCenterMark = (val) => { const addCenterMark = (val) => {
if (centerMarker.value) mapInstance.value.remove(centerMarker.value); if (centerMarker.value) mapInstance.value.remove(centerMarker.value);
centerMarker.value = new AMap.Marker({ centerMarker.value = new AMap.Marker({
position: [val.location.lng, val.location.lat], position: [val.x, val.y],
title: val.name, title: val.mediaName,
zIndex: 100, zIndex: 100,
draggable: false, // draggable: false, //
cursor: 'move' cursor: 'move'
}); });
// //
mapInstance.value.add(centerMarker.value); mapInstance.value.add(centerMarker.value);
mapInstance.value.setFitView(); mapInstance.value.setFitView(centerMarker.value);
} }
// //
const createCircle = (val) => { const createCircle = (val) => {
// //
circle.value = new AMap.Circle({ circle.value = new AMap.Circle({
center: [val.location.lng, val.location.lat], center: [val.x, val.y],
radius: circleRadius.value, radius: circleRadius.value,
strokeColor: '#4e54c8', strokeColor: '#4e54c8',
strokeOpacity: 0.8, strokeOpacity: 0.8,
strokeWeight: 2, strokeWeight: 2,
fillColor: '#4e54c8', fillColor: '#4e54c8',
fillOpacity: 0.15, fillOpacity: 0.15,
zIndex: 100,
bubble: true, bubble: true,
cursor: 'move', cursor: 'move',
draggable: false // draggable: false //
@ -345,12 +439,10 @@ const createCircle = (val) => {
// //
mapInstance.value.add(circle.value); mapInstance.value.add(circle.value);
mapInstance.value.setFitView(circle.value);
// //
createCircleHandle(); createCircleHandle();
//
renderMassMarks()
} }
// //
const createCircleHandle = () => { const createCircleHandle = () => {
@ -367,11 +459,11 @@ const createCircleHandle = () => {
position: [handlePosition.lng, handlePosition.lat], position: [handlePosition.lng, handlePosition.lat],
icon: new AMap.Icon({ icon: new AMap.Icon({
size: new AMap.Size(20, 20), size: new AMap.Size(20, 20),
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', // image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
image: otherbg,
imageSize: new AMap.Size(20, 20) imageSize: new AMap.Size(20, 20)
}), }),
offset: new AMap.Pixel(-10, -10), offset: new AMap.Pixel(-10, -10),
zIndex: 101,
draggable: true, draggable: true,
cursor: 'pointer' cursor: 'pointer'
}); });
@ -385,7 +477,7 @@ const createCircleHandle = () => {
const newRadius = Math.round(calculateDistance(center, handlePos)); const newRadius = Math.round(calculateDistance(center, handlePos));
circleRadius.value = newRadius; circleRadius.value = newRadius;
distanceLable.value = `${Math.round(circleRadius.value)}`; distanceLable.value = `${Math.round(circleRadius.value)}`;
queryParams.value.distance = circleRadius.value //
if (circleRadius.value !== 1000 && circleRadius.value !== 2000 && circleRadius.value !== 3000 && circleRadius.value !== 5000) activeLableIndex.value = null if (circleRadius.value !== 1000 && circleRadius.value !== 2000 && circleRadius.value !== 3000 && circleRadius.value !== 5000) activeLableIndex.value = null
else activeLableIndex.value = circleRadius.value else activeLableIndex.value = circleRadius.value
circle.value.setRadius(newRadius); circle.value.setRadius(newRadius);
@ -394,8 +486,6 @@ const createCircleHandle = () => {
circleHandle.value.on('dragend', () => { circleHandle.value.on('dragend', () => {
// //
updateCircleHandlePosition(); updateCircleHandlePosition();
//
renderMassMarks()
}); });
} }
// //
@ -419,6 +509,8 @@ const calculateDistance = (point1, point2) => {
const lng2 = point2.lng; const lng2 = point2.lng;
const lat2 = point2.lat; const lat2 = point2.lat;
console.log('sdfadsf', point1.lng, point2)
const radLat1 = lat1 * Math.PI / 180.0; const radLat1 = lat1 * Math.PI / 180.0;
const radLat2 = lat2 * Math.PI / 180.0; const radLat2 = lat2 * Math.PI / 180.0;
const a = radLat1 - radLat2; const a = radLat1 - radLat2;
@ -437,14 +529,10 @@ const handleChangeDistance = (itemDistance) => {
queryParams.value.distance = itemDistance.value queryParams.value.distance = itemDistance.value
activeLableIndex.value = itemDistance.value activeLableIndex.value = itemDistance.value
distanceLable.value = itemDistance.value + '米' distanceLable.value = itemDistance.value + '米'
// //
circleRadius.value = itemDistance.value; circleRadius.value = itemDistance.value;
circle.value.setRadius(itemDistance.value); circle.value.setRadius(itemDistance.value);
updateCircleHandlePosition(); updateCircleHandlePosition();
//
renderMassMarks()
} }
// //
const loadMap = () => { const loadMap = () => {
@ -453,10 +541,10 @@ const loadMap = () => {
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: secretKey securityJsCode: secretKey
}; };
AMapLoader.load({ AMapLoader.load({
key: apiKey, key: apiKey,
plugins: ["AMap.PlaceSearch"], plugins: ["AMap.PlaceSearch"],
version: '2.0', // API
AMapUI: { AMapUI: {
plugins: [] plugins: []
} }
@ -469,8 +557,6 @@ const loadMap = () => {
resizeEnable: true, resizeEnable: true,
pitch: initialPitch, // 2D/3D pitch: initialPitch, // 2D/3D
rotation: initialRotation, // rotation: initialRotation, //
zoom: 16,
zooms: [3, 16],
viewMode: mapMode.value // 3D viewMode: mapMode.value // 3D
}); });
@ -493,14 +579,13 @@ const loadMap = () => {
// //
mapInstance.value.on('render', hideAmapLogo); mapInstance.value.on('render', hideAmapLogo);
// // //
mapInstance.value.on('zoomchange', handleZoomChange); // mapInstance.value.on('rightclick', handleRightClick);
if (selectConfig.value !== null) { mapInstance.value.on('click', function (e) {
currentSelect(selectConfig.value) hideContextMenu()
} else { });
// //
renderMassMarks(); renderMassMarks();
}
resolve(); resolve();
@ -510,15 +595,7 @@ const loadMap = () => {
}); });
}); });
} }
//
const handleZoomChange = () => {
const currentZoomLevel = mapInstance.value.getZoom();
// 1616
if (currentZoomLevel > 16) {
mapInstance.value.setZoom(16);
return;
}
}
// //
const addCustomControls = (AMap) => { const addCustomControls = (AMap) => {
// //
@ -649,6 +726,7 @@ const createPointStyle = (color, size, styleType) => {
return canvas; return canvas;
} }
// //
const renderMassMarks = () => { const renderMassMarks = () => {
// //
@ -683,8 +761,8 @@ const renderMassMarks = () => {
mediaByMap(queryParams.value).then(res => { mediaByMap(queryParams.value).then(res => {
if (res.code == 200) { if (res.code == 200) {
res.data.forEach(itemPoint => { res.data.forEach(itemPoint => {
if (itemPoint.dataScopeDeptId == 220) points.value.push({ "lnglat": [itemPoint.x, itemPoint.y], "mediaId": itemPoint.mediaId, "style": 0 }) if (itemPoint.dataScopeDeptId == 220) points.value.push({ "lnglat": [itemPoint.x, itemPoint.y], "mediaId": itemPoint.mediaId, 'mediaName': itemPoint.mediaName, "style": 0 })
else if (itemPoint.dataScopeDeptId == 219) points.value.push({ "lnglat": [itemPoint.x, itemPoint.y], "mediaId": itemPoint.mediaId, "style": 1 }) else if (itemPoint.dataScopeDeptId == 219) points.value.push({ "lnglat": [itemPoint.x, itemPoint.y], "mediaId": itemPoint.mediaId, 'mediaName': itemPoint.mediaName, "style": 1 })
// //
const lng = itemPoint.x; const lng = itemPoint.x;
@ -709,9 +787,17 @@ const renderMassMarks = () => {
// //
massMarks.value.on('click', function (e) { massMarks.value.on('click', function (e) {
hideContextMenu()
handleViewMedia(e.data.mediaId) handleViewMedia(e.data.mediaId)
}); });
//
massMarks.value.on('mouseover', function (e) {
var pixel = mapInstance.value.lngLatToContainer(e.data.lnglat);
curMediaInfo.value = e.data
showContextMenu(pixel)
});
// ================================================== // ==================================================
// //
// ================================================== // ==================================================
@ -723,6 +809,25 @@ const renderMassMarks = () => {
mapInstance.value.setBounds(bounds); mapInstance.value.setBounds(bounds);
}) })
} }
const showContextMenu = (pixel) => {
//
menuPosition.value = {
top: `${pixel.y + 210}px`,
left: `${pixel.x + 50}px`,
position: 'absolute',
padding: '10px',
background: '#FFFFFF',
lineHeight: '16px',
borderRadius: '4px',
cursor: 'pointer',
boxShadow: '0 0 4px #ccc'
};
contextMenuVisible.value = true;
}
const hideContextMenu = () => {
contextMenuVisible.value = false;
}
// Logo // Logo
const hideAmapLogo = () => { const hideAmapLogo = () => {
const logos = document.querySelectorAll('.amap-logo, .amap-copyright'); const logos = document.querySelectorAll('.amap-logo, .amap-copyright');
@ -732,7 +837,55 @@ const hideAmapLogo = () => {
logo.style.opacity = '0'; logo.style.opacity = '0';
}); });
} }
// PPT
const getpptTemplatePageList = () => {
pptTemplatePage(queryParams.value).then(res => {
templateList.value = res.data.list
})
}
/** 导出PPT按钮操作 */
const handleExportPPT = (tempId) => {
if (multipleChoseArr.value.length == 0) {
proxy.$modal.msgWarning("请选择要导出的媒体!!!")
return false
}
const mediaIds = multipleChoseArr.value.map(item => item.id);
exportPPTDialogRef.value.initExportPPT(tempId, mediaIds, multipleChoseArr.value)
}
//
const getMediaTypeOne = () => {
sysMediaTypeListByPid({ parentId: 0 }).then(res => {
mediaTypeOne.value = res.data
})
}
//
const getMediaTypeTwo = (value) => {
sysMediaTypeListByPid({ parentId: value }).then(res => {
queryParams.value.mediaTypeTwo = undefined
queryParams.value.mediaTypeThree = undefined
mediaTypeTwo.value = res.data
})
}
//
const getMediaTypeThree = (value) => {
sysMediaTypeListByPid({ parentId: value }).then(res => {
queryParams.value.mediaTypeThree = undefined
mediaTypeThree.value = res.data
})
}
//
const handleChoseMedia = () => {
hideContextMenu()
if (curMediaInfo.value) {
const rowIndex = multipleChoseArr.value.findIndex(item => item.id == curMediaInfo.value.mediaId)
if (rowIndex == -1) multipleChoseArr.value.push({ id: curMediaInfo.value.mediaId, mediaName: curMediaInfo.value.mediaName })
}
}
//
const handleCloseTag = (tag) => {
const rowIndex = multipleChoseArr.value.findIndex(item => item.id == tag.id)
multipleChoseArr.value.splice(rowIndex, 1)
}
onUnmounted(() => { onUnmounted(() => {
if (mapInstance.value) { if (mapInstance.value) {
mapInstance.value.destroy(); mapInstance.value.destroy();
@ -741,6 +894,8 @@ onUnmounted(() => {
// //
onMounted(() => { onMounted(() => {
bgStore.setBgImage(otherbg) bgStore.setBgImage(otherbg)
getMediaTypeOne()
getpptTemplatePageList()
loadMap() loadMap()
}); });
</script> </script>
@ -773,6 +928,30 @@ onMounted(() => {
background: #1a75e6; background: #1a75e6;
} }
.mediaMapExportBtn {
// min-width: 122px;
height: 34px;
border-radius: 4px;
background: #1a75e6;
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
text-align: left;
color: #FFFFFF;
padding: 10px;
}
.mediaMapExportBtn>span {
align-items: center;
display: inline-flex;
width: 100%;
}
.mediaMapExportBtn:hover {
background: #1a75e6;
}
.distanceItem { .distanceItem {
position: relative; position: relative;
padding-left: 40px; padding-left: 40px;
@ -839,7 +1018,7 @@ onMounted(() => {
.mediaMapContainer { .mediaMapContainer {
width: 100%; width: 100%;
height: calc(100vh - 170px); height: calc(100vh - 256px);
background: #3f8bff; background: #3f8bff;
} }
@ -919,10 +1098,10 @@ onMounted(() => {
height: 100% !important; height: 100% !important;
} }
.one-text { // .one-text {
height: 50px; // height: 50px;
padding-top: 4px; // padding-top: 4px;
} // }
// 线 // 线
.splineBar { .splineBar {
@ -936,4 +1115,23 @@ onMounted(() => {
max-height: 70vh; max-height: 70vh;
object-fit: contain; object-fit: contain;
} }
.noChoseLabel {
height: 24px;
line-height: 24px;
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
color: #ffffff90;
}
.custom-menu {
position: absolute;
background: white;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
z-index: 1000;
display: none;
}
</style> </style>

View File

@ -0,0 +1,132 @@
<template>
<div class="app-container">
<el-card>
<template #header>
<div class="card-header">
<span>工作台</span> <span class="subHeaderTitle">- 系统通知</span>
</div>
</template>
<el-row :gutter="10" class="my_row">
<el-col :span="12">
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
<el-form-item label="" prop="templateName">
<el-input v-model="queryParams.templateName" placeholder="请输入供应商/媒体名称/业务部门名称"
:prefix-icon="Search" style="width: 400px;" />
</el-form-item>
</el-form>
</el-col>
<el-col :span="12" style="text-align: right;">
<el-button type="primary" class="primaryBtn" @click="handleQuery">查询</el-button>
<el-button type="primary" class="primaryBtn" @click="resetQuery">重置</el-button>
<el-button type="primary" class="primaryBtn" @click="handleExport">导出</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="noticeList" height="calc(100vh - 306px)">
<el-table-column label="序号" align="center" width="80">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="供应商/媒体名称" align="center" prop="templateName" />
<el-table-column label="业务部门" align="center" prop="type" />
<el-table-column label="通知内容" align="center" prop="originalFileName" />
<el-table-column label="通知时间" align="center" prop="createTime">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
v-hasPermi="['system:pptTemplate:edit']">去处理</el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="total" v-model:page="queryParams.pageIndex" v-model:limit="queryParams.pageSize"
@pagination="getpptTemplatePageList" />
</el-card>
</div>
</template>
<script setup name="Post">
import { onMounted, ref } from 'vue';
import { Search } from '@element-plus/icons-vue'
// import { pptTemplatePage, addPptTemplate, updatePptTemplate, getPptTemplate, deletePptTemplate } from "@/api/system/pptTemplate"
import { uploadFile } from "@/api/common"
import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png'
const bgStore = useBackgroundStore()
const { proxy } = getCurrentInstance()
//
const noticeList = ref([])
const loading = ref(true)
const total = ref(0)
const data = reactive({
queryParams: {
pageIndex: 1,
pageSize: 10,
templateName: undefined,
}
})
const { queryParams } = toRefs(data)
/** 查询通知列表 */
const getNoticePageList = () => {
loading.value = false
// pptTemplatePage(queryParams.value).then(res => {
// templateList.value = res.data.list
// total.value = res.data.total
// loading.value = false
// })
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageIndex = 1
getNoticePageList()
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef")
handleQuery()
}
/** 去处理 */
const handleUpdate = (row) => {
}
/** 导出按钮操作 */
const handleExport = () => {
// exportSupplier(queryParams.value).then(res => {
// // a
// const a = document.createElement('a')
// a.href = URL.createObjectURL(res)
// // adownload
// const downLoadName = '_' + Date.now() + '.xlsx'
// a.setAttribute('download', downLoadName)
// document.body.appendChild(a)
// a.click()
// document.body.removeChild(a)
// })
}
//
onMounted(() => {
bgStore.setBgImage(otherbg)
getNoticePageList()
});
</script>
<style lang='scss'>
.el-form-item__content {
display: block;
}
</style>

View File

@ -20,7 +20,7 @@
<span class="upload_tip">将文件拖曳至此区域</span> <em>点击上传</em> <span class="upload_tip">将文件拖曳至此区域</span> <em>点击上传</em>
</div> </div>
<div class="el-upload__text"> <div class="el-upload__text">
支持扩展名.pptx 支持扩展名.jpeg.jpg.png.pptx
</div> </div>
</el-upload> </el-upload>
</el-col> </el-col>
@ -150,32 +150,20 @@ const requestDocUpload = (options) => {
} }
// //
const beforeDocUpload = (file) => { const beforeDocUpload = (file) => {
const type = [ const validTypes = [
//
"image/jpeg",
"image/jpg",
"image/png",
// PPT
'application/vnd.openxmlformats-officedocument.presentationml.presentation' 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
]; ]
const isXlsx = type.includes(file.type); const isValidType = validTypes.includes(file.type)
// if (!isValidType) {
if (!isXlsx) { proxy.$modal.msgError("文件格式错误,请上传 .jpeg、.jpg、.png、.pptx 后缀的文件。");
proxy.$modal.msgError("文件格式错误,请上传.pptx后缀的文件。");
return false;
}
// 500MB = 500 * 1024 * 1024
const MAX_SIZE = 500 * 1024 * 1024
if (file.size > MAX_SIZE) {
//
proxy.$modal.msgError(`文件大小不能超过 500MB当前文件为 ${formatFileSize(file.size)}`);
// false
return false return false
} }
} return true
const formatFileSize = (bytes) => {
if (bytes === 0) return '0 B'
const k = 1024
const sizes = ['B', 'KB', 'MB', 'GB']
const i = Math.floor(Math.log(bytes) / Math.log(k))
return (bytes / Math.pow(k, i)).toFixed(2) + ' ' + sizes[i]
} }
// //
const removeDocUpload = (file, fileList) => { const removeDocUpload = (file, fileList) => {

View File

@ -330,11 +330,13 @@ import { Close } from '@element-plus/icons-vue'
import { sysRegionListByPid } from "@/api/system/administrativeRegion" import { sysRegionListByPid } from "@/api/system/administrativeRegion"
import { addBusSupplier, updateBusSupplier, getBusSupplier } from "@/api/supplier" import { addBusSupplier, updateBusSupplier, getBusSupplier } from "@/api/supplier"
import { listDept } from "@/api/system/dept" import { listDept } from "@/api/system/dept"
import useUserStore from '@/store/modules/user'
import multiFileUpload from '../../components/FileUpload/multiFileUpload.vue' import multiFileUpload from '../../components/FileUpload/multiFileUpload.vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const emit = defineEmits(['handleShowList']); const emit = defineEmits(['handleShowList']);
const userStore = useUserStore()
const formTitle = ref('新建') const formTitle = ref('新建')
// //
@ -550,6 +552,10 @@ const initForm = (_formTitle, _ruleForm) => {
getDepList() getDepList()
getProvinceList() getProvinceList()
if (ruleForm.value.supplierId) getSupplierInfo() if (ruleForm.value.supplierId) getSupplierInfo()
else {
ruleForm.value.dockingName = userStore.name
ruleForm.value.dockingPhone = userStore.phoneNumber
}
nextTick(() => { nextTick(() => {
businessLicenseRef.value._fileType = 1 businessLicenseRef.value._fileType = 1
otherFileRef.value._fileType = 9 otherFileRef.value._fileType = 9