对接通知
This commit is contained in:
parent
3a56ef92d2
commit
6265706565
|
@ -7,4 +7,14 @@ export function noticeList(query) {
|
|||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 通知导出
|
||||
export function exportNotice(query) {
|
||||
return request({
|
||||
url: '/system/notice/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
<ul class="resource-list" v-if="notices.length > 0">
|
||||
<li v-for="(notice, index) in notices" :key="index" class="resource-link" @click="handleGoSupplierManage">
|
||||
{{ notice.noticeContent }}
|
||||
{{ notice.noticeTitle }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="no_result" v-else>
|
||||
|
|
|
@ -562,9 +562,7 @@ const calculateDistance = (point1, point2) => {
|
|||
const lng1 = point1.lng;
|
||||
const lat1 = point1.lat;
|
||||
const lng2 = point2.lng;
|
||||
const lat2 = point2.lat;
|
||||
|
||||
console.log('sdfadsf', point1.lng, point2)
|
||||
const lat2 = point2.lat;
|
||||
|
||||
const radLat1 = lat1 * Math.PI / 180.0;
|
||||
const radLat2 = lat2 * Math.PI / 180.0;
|
||||
|
@ -677,36 +675,43 @@ const addCustomControls = (AMap) => {
|
|||
// 工具箱测距按钮
|
||||
const toolRangingBtn = document.createElement('div');
|
||||
toolRangingBtn.className = 'map-control-btn map-ranging';
|
||||
toolRangingBtn.onclick = startRuler;
|
||||
toolRangingBtn.setAttribute('title', '测距');
|
||||
toolRangingBtn.onclick = startRuler;
|
||||
|
||||
// 工具箱测面积按钮
|
||||
const toolMeasureAreaBtn = document.createElement('div');
|
||||
toolMeasureAreaBtn.className = 'map-control-btn map-measureAreaBtn';
|
||||
toolMeasureAreaBtn.setAttribute('title', '测面积');
|
||||
toolMeasureAreaBtn.onclick = startMeasureArea;
|
||||
|
||||
// 工具箱添加点按钮
|
||||
const toolPointBtn = document.createElement('div');
|
||||
toolPointBtn.className = 'map-control-btn map-addPointBtn';
|
||||
toolPointBtn.setAttribute('title', '绘制点');
|
||||
toolPointBtn.onclick = startDrawMarker;
|
||||
|
||||
// 工具箱添加折线按钮
|
||||
const toolLineBtn = document.createElement('div');
|
||||
toolLineBtn.className = 'map-control-btn map-addLineBtn';
|
||||
toolLineBtn.setAttribute('title', '绘制折线');
|
||||
toolLineBtn.onclick = startDrawPolyline;
|
||||
|
||||
// 工具箱添加圆按钮
|
||||
const toolCircleBtn = document.createElement('div');
|
||||
toolCircleBtn.className = 'map-control-btn map-addCircleBtn';
|
||||
toolCircleBtn.setAttribute('title', '绘制圆');
|
||||
toolCircleBtn.onclick = startDrawCircle;
|
||||
|
||||
// 工具箱添加矩形按钮
|
||||
const toolRactBtn = document.createElement('div');
|
||||
toolRactBtn.className = 'map-control-btn map-addRactBtn';
|
||||
toolRactBtn.setAttribute('title', '绘制矩形');
|
||||
toolRactBtn.onclick = startDrawRectangle;
|
||||
|
||||
// 工具箱清除按钮
|
||||
const toolClearAllBtn = document.createElement('div');
|
||||
toolClearAllBtn.className = 'map-control-btn map-clearAllBtn';
|
||||
toolClearAllBtn.setAttribute('title', '清除');
|
||||
toolClearAllBtn.onclick = clearAll;
|
||||
|
||||
controlContainer.appendChild(toggle2D3DBtn);
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<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="请输入供应商/媒体名称/业务部门名称"
|
||||
<el-form-item label="">
|
||||
<el-input v-model="queryParams.noticeTitle" placeholder="请输入供应商/媒体名称"
|
||||
:prefix-icon="Search" style="width: 400px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -22,30 +22,33 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="noticeList" height="calc(100vh - 306px)">
|
||||
<el-table v-loading="loading" :data="noticeListData" 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">
|
||||
<el-table-column label="通知类型" align="center" prop="businessType" min-width="120">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.businessType == 1">供应商</span>
|
||||
<span v-if="scope.row.businessType == 2">媒体库</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="通知内容" align="left" prop="noticeTitle" min-width="300" />
|
||||
<el-table-column label="通知时间" align="center" prop="createTime" min-width="210">
|
||||
<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>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)">去处理</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" v-model:page="queryParams.pageIndex" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getpptTemplatePageList" />
|
||||
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getNoticePageList" />
|
||||
|
||||
</el-card>
|
||||
|
||||
|
@ -55,8 +58,7 @@
|
|||
<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 { noticeList, exportNotice } from "@/api/notice"
|
||||
import { useBackgroundStore } from '@/store/modules/background'
|
||||
import otherbg from '@/assets/images/otherbg.png'
|
||||
const bgStore = useBackgroundStore()
|
||||
|
@ -64,15 +66,17 @@ const bgStore = useBackgroundStore()
|
|||
const { proxy } = getCurrentInstance()
|
||||
|
||||
// 列表数据
|
||||
const noticeList = ref([])
|
||||
const noticeListData = ref([])
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
pageIndex: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
templateName: undefined,
|
||||
noticeType: 1,
|
||||
status: 0,
|
||||
noticeTitle: undefined,
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -81,22 +85,28 @@ 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
|
||||
// })
|
||||
noticeList(queryParams.value).then(res => {
|
||||
noticeListData.value = res.rows
|
||||
total.value = res.total
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageIndex = 1
|
||||
queryParams.value.pageNum = 1
|
||||
getNoticePageList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef")
|
||||
queryParams.value = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
noticeType: 1,
|
||||
status: 0,
|
||||
noticeTitle: undefined,
|
||||
}
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
|
@ -106,17 +116,17 @@ const handleUpdate = (row) => {
|
|||
}
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
// exportSupplier(queryParams.value).then(res => {
|
||||
// // 通过a标签打开新页面下载文件
|
||||
// const a = document.createElement('a')
|
||||
// a.href = URL.createObjectURL(res)
|
||||
// // a标签里有download属性可以自定义文件名
|
||||
// const downLoadName = '供应商_' + Date.now() + '.xlsx'
|
||||
// a.setAttribute('download', downLoadName)
|
||||
// document.body.appendChild(a)
|
||||
// a.click()
|
||||
// document.body.removeChild(a)
|
||||
// })
|
||||
exportNotice(queryParams.value).then(res => {
|
||||
// 通过a标签打开新页面下载文件
|
||||
const a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(res)
|
||||
// a标签里有download属性可以自定义文件名
|
||||
const downLoadName = '通知信息导出_' + Date.now() + '.xlsx'
|
||||
a.setAttribute('download', downLoadName)
|
||||
document.body.appendChild(a)
|
||||
a.click()
|
||||
document.body.removeChild(a)
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化
|
||||
|
|
|
@ -522,39 +522,46 @@ const addCustomControls = (AMap) => {
|
|||
fullscreenBtn.className = isFullscreen.value === true ? 'map-control-btn map-full-screen' : 'map-control-btn map-nofull-screen';
|
||||
fullscreenBtn.onclick = toggleFullscreen;
|
||||
|
||||
// 工具箱测距按钮
|
||||
// 工具箱测距按钮
|
||||
const toolRangingBtn = document.createElement('div');
|
||||
toolRangingBtn.className = 'map-control-btn map-ranging';
|
||||
toolRangingBtn.onclick = startRuler;
|
||||
toolRangingBtn.setAttribute('title', '测距');
|
||||
toolRangingBtn.onclick = startRuler;
|
||||
|
||||
// 工具箱测面积按钮
|
||||
const toolMeasureAreaBtn = document.createElement('div');
|
||||
toolMeasureAreaBtn.className = 'map-control-btn map-measureAreaBtn';
|
||||
toolMeasureAreaBtn.setAttribute('title', '测面积');
|
||||
toolMeasureAreaBtn.onclick = startMeasureArea;
|
||||
|
||||
// 工具箱添加点按钮
|
||||
const toolPointBtn = document.createElement('div');
|
||||
toolPointBtn.className = 'map-control-btn map-addPointBtn';
|
||||
toolPointBtn.setAttribute('title', '绘制点');
|
||||
toolPointBtn.onclick = startDrawMarker;
|
||||
|
||||
// 工具箱添加折线按钮
|
||||
const toolLineBtn = document.createElement('div');
|
||||
toolLineBtn.className = 'map-control-btn map-addLineBtn';
|
||||
toolLineBtn.setAttribute('title', '绘制折线');
|
||||
toolLineBtn.onclick = startDrawPolyline;
|
||||
|
||||
// 工具箱添加圆按钮
|
||||
const toolCircleBtn = document.createElement('div');
|
||||
toolCircleBtn.className = 'map-control-btn map-addCircleBtn';
|
||||
toolCircleBtn.setAttribute('title', '绘制圆');
|
||||
toolCircleBtn.onclick = startDrawCircle;
|
||||
|
||||
// 工具箱添加矩形按钮
|
||||
const toolRactBtn = document.createElement('div');
|
||||
toolRactBtn.className = 'map-control-btn map-addRactBtn';
|
||||
toolRactBtn.setAttribute('title', '绘制矩形');
|
||||
toolRactBtn.onclick = startDrawRectangle;
|
||||
|
||||
// 工具箱清除按钮
|
||||
const toolClearAllBtn = document.createElement('div');
|
||||
toolClearAllBtn.className = 'map-control-btn map-clearAllBtn';
|
||||
toolClearAllBtn.setAttribute('title', '清除');
|
||||
toolClearAllBtn.onclick = clearAll;
|
||||
|
||||
controlContainer.appendChild(toggle2D3DBtn);
|
||||
|
|
Loading…
Reference in New Issue
Block a user