对接通知
This commit is contained in:
parent
3a56ef92d2
commit
6265706565
|
@ -8,3 +8,13 @@ export function noticeList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 通知导出
|
||||||
|
export function exportNotice(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/notice/export',
|
||||||
|
method: 'post',
|
||||||
|
data: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
<ul class="resource-list" v-if="notices.length > 0">
|
<ul class="resource-list" v-if="notices.length > 0">
|
||||||
<li v-for="(notice, index) in notices" :key="index" class="resource-link" @click="handleGoSupplierManage">
|
<li v-for="(notice, index) in notices" :key="index" class="resource-link" @click="handleGoSupplierManage">
|
||||||
{{ notice.noticeContent }}
|
{{ notice.noticeTitle }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="no_result" v-else>
|
<div class="no_result" v-else>
|
||||||
|
|
|
@ -564,8 +564,6 @@ 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;
|
||||||
|
@ -677,36 +675,43 @@ const addCustomControls = (AMap) => {
|
||||||
// 工具箱测距按钮
|
// 工具箱测距按钮
|
||||||
const toolRangingBtn = document.createElement('div');
|
const toolRangingBtn = document.createElement('div');
|
||||||
toolRangingBtn.className = 'map-control-btn map-ranging';
|
toolRangingBtn.className = 'map-control-btn map-ranging';
|
||||||
|
toolRangingBtn.setAttribute('title', '测距');
|
||||||
toolRangingBtn.onclick = startRuler;
|
toolRangingBtn.onclick = startRuler;
|
||||||
|
|
||||||
// 工具箱测面积按钮
|
// 工具箱测面积按钮
|
||||||
const toolMeasureAreaBtn = document.createElement('div');
|
const toolMeasureAreaBtn = document.createElement('div');
|
||||||
toolMeasureAreaBtn.className = 'map-control-btn map-measureAreaBtn';
|
toolMeasureAreaBtn.className = 'map-control-btn map-measureAreaBtn';
|
||||||
|
toolMeasureAreaBtn.setAttribute('title', '测面积');
|
||||||
toolMeasureAreaBtn.onclick = startMeasureArea;
|
toolMeasureAreaBtn.onclick = startMeasureArea;
|
||||||
|
|
||||||
// 工具箱添加点按钮
|
// 工具箱添加点按钮
|
||||||
const toolPointBtn = document.createElement('div');
|
const toolPointBtn = document.createElement('div');
|
||||||
toolPointBtn.className = 'map-control-btn map-addPointBtn';
|
toolPointBtn.className = 'map-control-btn map-addPointBtn';
|
||||||
|
toolPointBtn.setAttribute('title', '绘制点');
|
||||||
toolPointBtn.onclick = startDrawMarker;
|
toolPointBtn.onclick = startDrawMarker;
|
||||||
|
|
||||||
// 工具箱添加折线按钮
|
// 工具箱添加折线按钮
|
||||||
const toolLineBtn = document.createElement('div');
|
const toolLineBtn = document.createElement('div');
|
||||||
toolLineBtn.className = 'map-control-btn map-addLineBtn';
|
toolLineBtn.className = 'map-control-btn map-addLineBtn';
|
||||||
|
toolLineBtn.setAttribute('title', '绘制折线');
|
||||||
toolLineBtn.onclick = startDrawPolyline;
|
toolLineBtn.onclick = startDrawPolyline;
|
||||||
|
|
||||||
// 工具箱添加圆按钮
|
// 工具箱添加圆按钮
|
||||||
const toolCircleBtn = document.createElement('div');
|
const toolCircleBtn = document.createElement('div');
|
||||||
toolCircleBtn.className = 'map-control-btn map-addCircleBtn';
|
toolCircleBtn.className = 'map-control-btn map-addCircleBtn';
|
||||||
|
toolCircleBtn.setAttribute('title', '绘制圆');
|
||||||
toolCircleBtn.onclick = startDrawCircle;
|
toolCircleBtn.onclick = startDrawCircle;
|
||||||
|
|
||||||
// 工具箱添加矩形按钮
|
// 工具箱添加矩形按钮
|
||||||
const toolRactBtn = document.createElement('div');
|
const toolRactBtn = document.createElement('div');
|
||||||
toolRactBtn.className = 'map-control-btn map-addRactBtn';
|
toolRactBtn.className = 'map-control-btn map-addRactBtn';
|
||||||
|
toolRactBtn.setAttribute('title', '绘制矩形');
|
||||||
toolRactBtn.onclick = startDrawRectangle;
|
toolRactBtn.onclick = startDrawRectangle;
|
||||||
|
|
||||||
// 工具箱清除按钮
|
// 工具箱清除按钮
|
||||||
const toolClearAllBtn = document.createElement('div');
|
const toolClearAllBtn = document.createElement('div');
|
||||||
toolClearAllBtn.className = 'map-control-btn map-clearAllBtn';
|
toolClearAllBtn.className = 'map-control-btn map-clearAllBtn';
|
||||||
|
toolClearAllBtn.setAttribute('title', '清除');
|
||||||
toolClearAllBtn.onclick = clearAll;
|
toolClearAllBtn.onclick = clearAll;
|
||||||
|
|
||||||
controlContainer.appendChild(toggle2D3DBtn);
|
controlContainer.appendChild(toggle2D3DBtn);
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<el-row :gutter="10" class="my_row">
|
<el-row :gutter="10" class="my_row">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
|
||||||
<el-form-item label="" prop="templateName">
|
<el-form-item label="">
|
||||||
<el-input v-model="queryParams.templateName" placeholder="请输入供应商/媒体名称/业务部门名称"
|
<el-input v-model="queryParams.noticeTitle" placeholder="请输入供应商/媒体名称"
|
||||||
:prefix-icon="Search" style="width: 400px;" />
|
:prefix-icon="Search" style="width: 400px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -22,30 +22,33 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</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">
|
<el-table-column label="序号" align="center" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.$index + 1 }}
|
{{ scope.$index + 1 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商/媒体名称" align="center" prop="templateName" />
|
<el-table-column label="通知类型" align="center" prop="businessType" min-width="120">
|
||||||
<el-table-column label="业务部门" align="center" prop="type" />
|
<template #default="scope">
|
||||||
<el-table-column label="通知内容" align="center" prop="originalFileName" />
|
<span v-if="scope.row.businessType == 1">供应商</span>
|
||||||
<el-table-column label="通知时间" align="center" prop="createTime">
|
<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">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)"
|
<el-button link type="primary" @click="handleUpdate(scope.row)">去处理</el-button>
|
||||||
v-hasPermi="['system:pptTemplate:edit']">去处理</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination :total="total" v-model:page="queryParams.pageIndex" v-model:limit="queryParams.pageSize"
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getpptTemplatePageList" />
|
@pagination="getNoticePageList" />
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
@ -55,8 +58,7 @@
|
||||||
<script setup name="Post">
|
<script setup name="Post">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
// import { pptTemplatePage, addPptTemplate, updatePptTemplate, getPptTemplate, deletePptTemplate } from "@/api/system/pptTemplate"
|
import { noticeList, exportNotice } from "@/api/notice"
|
||||||
import { uploadFile } from "@/api/common"
|
|
||||||
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'
|
||||||
const bgStore = useBackgroundStore()
|
const bgStore = useBackgroundStore()
|
||||||
|
@ -64,15 +66,17 @@ const bgStore = useBackgroundStore()
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const noticeList = ref([])
|
const noticeListData = ref([])
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageIndex: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
templateName: undefined,
|
noticeType: 1,
|
||||||
|
status: 0,
|
||||||
|
noticeTitle: undefined,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -81,22 +85,28 @@ const { queryParams } = toRefs(data)
|
||||||
/** 查询通知列表 */
|
/** 查询通知列表 */
|
||||||
const getNoticePageList = () => {
|
const getNoticePageList = () => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
// pptTemplatePage(queryParams.value).then(res => {
|
noticeList(queryParams.value).then(res => {
|
||||||
// templateList.value = res.data.list
|
noticeListData.value = res.rows
|
||||||
// total.value = res.data.total
|
total.value = res.total
|
||||||
// loading.value = false
|
loading.value = false
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.value.pageIndex = 1
|
queryParams.value.pageNum = 1
|
||||||
getNoticePageList()
|
getNoticePageList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
proxy.resetForm("queryRef")
|
queryParams.value = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
noticeType: 1,
|
||||||
|
status: 0,
|
||||||
|
noticeTitle: undefined,
|
||||||
|
}
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,17 +116,17 @@ const handleUpdate = (row) => {
|
||||||
}
|
}
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
// exportSupplier(queryParams.value).then(res => {
|
exportNotice(queryParams.value).then(res => {
|
||||||
// // 通过a标签打开新页面下载文件
|
// 通过a标签打开新页面下载文件
|
||||||
// const a = document.createElement('a')
|
const a = document.createElement('a')
|
||||||
// a.href = URL.createObjectURL(res)
|
a.href = URL.createObjectURL(res)
|
||||||
// // a标签里有download属性可以自定义文件名
|
// a标签里有download属性可以自定义文件名
|
||||||
// const downLoadName = '供应商_' + Date.now() + '.xlsx'
|
const downLoadName = '通知信息导出_' + Date.now() + '.xlsx'
|
||||||
// a.setAttribute('download', downLoadName)
|
a.setAttribute('download', downLoadName)
|
||||||
// document.body.appendChild(a)
|
document.body.appendChild(a)
|
||||||
// a.click()
|
a.click()
|
||||||
// document.body.removeChild(a)
|
document.body.removeChild(a)
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
|
|
|
@ -525,36 +525,43 @@ const addCustomControls = (AMap) => {
|
||||||
// 工具箱测距按钮
|
// 工具箱测距按钮
|
||||||
const toolRangingBtn = document.createElement('div');
|
const toolRangingBtn = document.createElement('div');
|
||||||
toolRangingBtn.className = 'map-control-btn map-ranging';
|
toolRangingBtn.className = 'map-control-btn map-ranging';
|
||||||
|
toolRangingBtn.setAttribute('title', '测距');
|
||||||
toolRangingBtn.onclick = startRuler;
|
toolRangingBtn.onclick = startRuler;
|
||||||
|
|
||||||
// 工具箱测面积按钮
|
// 工具箱测面积按钮
|
||||||
const toolMeasureAreaBtn = document.createElement('div');
|
const toolMeasureAreaBtn = document.createElement('div');
|
||||||
toolMeasureAreaBtn.className = 'map-control-btn map-measureAreaBtn';
|
toolMeasureAreaBtn.className = 'map-control-btn map-measureAreaBtn';
|
||||||
|
toolMeasureAreaBtn.setAttribute('title', '测面积');
|
||||||
toolMeasureAreaBtn.onclick = startMeasureArea;
|
toolMeasureAreaBtn.onclick = startMeasureArea;
|
||||||
|
|
||||||
// 工具箱添加点按钮
|
// 工具箱添加点按钮
|
||||||
const toolPointBtn = document.createElement('div');
|
const toolPointBtn = document.createElement('div');
|
||||||
toolPointBtn.className = 'map-control-btn map-addPointBtn';
|
toolPointBtn.className = 'map-control-btn map-addPointBtn';
|
||||||
|
toolPointBtn.setAttribute('title', '绘制点');
|
||||||
toolPointBtn.onclick = startDrawMarker;
|
toolPointBtn.onclick = startDrawMarker;
|
||||||
|
|
||||||
// 工具箱添加折线按钮
|
// 工具箱添加折线按钮
|
||||||
const toolLineBtn = document.createElement('div');
|
const toolLineBtn = document.createElement('div');
|
||||||
toolLineBtn.className = 'map-control-btn map-addLineBtn';
|
toolLineBtn.className = 'map-control-btn map-addLineBtn';
|
||||||
|
toolLineBtn.setAttribute('title', '绘制折线');
|
||||||
toolLineBtn.onclick = startDrawPolyline;
|
toolLineBtn.onclick = startDrawPolyline;
|
||||||
|
|
||||||
// 工具箱添加圆按钮
|
// 工具箱添加圆按钮
|
||||||
const toolCircleBtn = document.createElement('div');
|
const toolCircleBtn = document.createElement('div');
|
||||||
toolCircleBtn.className = 'map-control-btn map-addCircleBtn';
|
toolCircleBtn.className = 'map-control-btn map-addCircleBtn';
|
||||||
|
toolCircleBtn.setAttribute('title', '绘制圆');
|
||||||
toolCircleBtn.onclick = startDrawCircle;
|
toolCircleBtn.onclick = startDrawCircle;
|
||||||
|
|
||||||
// 工具箱添加矩形按钮
|
// 工具箱添加矩形按钮
|
||||||
const toolRactBtn = document.createElement('div');
|
const toolRactBtn = document.createElement('div');
|
||||||
toolRactBtn.className = 'map-control-btn map-addRactBtn';
|
toolRactBtn.className = 'map-control-btn map-addRactBtn';
|
||||||
|
toolRactBtn.setAttribute('title', '绘制矩形');
|
||||||
toolRactBtn.onclick = startDrawRectangle;
|
toolRactBtn.onclick = startDrawRectangle;
|
||||||
|
|
||||||
// 工具箱清除按钮
|
// 工具箱清除按钮
|
||||||
const toolClearAllBtn = document.createElement('div');
|
const toolClearAllBtn = document.createElement('div');
|
||||||
toolClearAllBtn.className = 'map-control-btn map-clearAllBtn';
|
toolClearAllBtn.className = 'map-control-btn map-clearAllBtn';
|
||||||
|
toolClearAllBtn.setAttribute('title', '清除');
|
||||||
toolClearAllBtn.onclick = clearAll;
|
toolClearAllBtn.onclick = clearAll;
|
||||||
|
|
||||||
controlContainer.appendChild(toggle2D3DBtn);
|
controlContainer.appendChild(toggle2D3DBtn);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user