添加打包命令 区分 冀北还是其他地方的页面

This commit is contained in:
GGJ
2024-08-08 11:04:59 +08:00
parent ac07f7ec17
commit f4f9c4c5b5
17 changed files with 208 additions and 64 deletions

5
.env.dev Normal file
View File

@@ -0,0 +1,5 @@
NODE_ENV = dev
VITE_NAME="dev"
# 电网一张图 地图图层
VITE_NARIMAP=null
VITE_NRGISCOMMON=null

7
.env.jibei Normal file
View File

@@ -0,0 +1,7 @@
NODE_ENV = jibei
VITE_NAME="jibei"
# 电网一张图 地图图层
VITE_NARIMAP="http://25.42.182.218/narimap/libs/narimap.umd.min.js"
VITE_NRGISCOMMON="http://25.42.182.218/narimap/libs/nrgis-common/libs/index.min.js"
# <!-- <script src="http://25.42.182.218/narimap/libs/narimap.umd.min.js"></script>
# <script src="http://25.42.182.218/narimap/libs/nrgis-common/libs/index.min.js"></script> -->

View File

@@ -16,9 +16,9 @@
<script src="/static/luckysheet/luckysheet.umd.js"></script>
<!-- 冀北地图 -->
<!--引入样式文件-->
<!-- <script src="http://25.42.182.218/narimap/libs/narimap.umd.min.js"></script>
<script src="http://25.42.182.218/narimap/libs/nrgis-common/libs/index.min.js"></script> -->
<!--引入样式文件-->
<script src="%VITE_NARIMAP%"></script>
<script src="%VITE_NRGISCOMMON%"></script>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>

View File

@@ -7,3 +7,12 @@ export function getHistoryResult(data: any) {
data: data
})
}
// word报告
export function exportModelJB(data: any) {
return request({
url: '/harmonic-boot/exportmodel/exportModelJB',
method: 'post',
responseType: 'blob',
data: data
})
}

View File

@@ -22,7 +22,7 @@ import VueOfficePdf from '@vue-office/pdf'
const { push, options, currentRoute } = useRouter()
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
// http://192.168.1.22:9009/excelreport/onlineReport/%E7%94%B5%E8%83%BD%5B%E5%91%8A%5D2024%E5%B9%B41%E5%8F%B7-%E5%BC%A0%E5%AE%B6%E5%8F%A3%E5%9C%B0%E5%B8%82%20%E7%94%B5%E8%83%BD%E8%B4%A8%E9%87%8F%E6%8A%80%E6%9C%AF%E7%9B%91%E7%9D%A3%E5%91%8A%E8%AD%A6%E5%8D%95.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20240807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240807T021320Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=0173318ad09fa6cc9067123b6997f423c692c820ef9e185ca7dda300e5f7853c
const url = '/api-docx/excelreport' + currentRoute.value.href?.split('?')[1]
const url = '/api-docx/excelreport' + cuwrrentRoute.value.href?.split('?')[1]
onMounted(() => {
console.log()
})

View File

@@ -106,7 +106,8 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
response.data.code === 'A0000' ||
response.data.type === 'application/json' ||
Array.isArray(response.data) ||
response.data.size
response.data.size ||
response.config.url == '/harmonic-boot/exportmodel/exportModelJB'
// ||
// response.data.type === 'application/octet-stream' ||
// response.data.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'

View File

@@ -75,19 +75,23 @@
</TableHeader>
<Table
ref="tableRef"
:column-config="{ resizable: true }"
:checkbox-config="{ labelField: 'name', highlight: true }"
:radio-config="{
labelField: 'name',
highlight: true,
visibleMethod: row => row.row.level == 6
}"
:tree-config="{ transform: true, parentField: 'pid' }"
:scroll-y="{ enabled: true }"
/>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import { exportModelJB } from '@/api/harmonic-boot/harmonic.ts'
const dictData = useDictData()
const tableRef = ref()
@@ -104,7 +108,7 @@ const tableStore = new TableStore({
method: 'POST',
column: [
// { width: '60', title: '111', },
{ field: 'name', title: '电网拓扑', minWidth: '180px', type: 'checkbox', align: 'left', treeNode: true },
{ field: 'name', title: '电网拓扑', minWidth: '180px', type: 'radio', align: 'left', treeNode: true },
{
field: 'ip',
title: '网络参数',
@@ -227,7 +231,39 @@ onMounted(() => {
tableStore.index()
})
const exportEvent = () => {
console.log(tableRef.value.getRef().getCheckboxRecords())
let line = tableRef.value.getRef().getRadioRecord()
if (!line) {
ElMessage({
type: 'warning',
message: '请选择要导出的数据'
})
return
}
let form = new FormData()
form.append('isUrl', false)
form.append('lineIndex', line.id)
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
form.append('type', 0)
form.append('name', line.name)
exportModelJB(form).then(async res => {
let blob = new Blob([res], {
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download =
line.name +
TableHeaderRef.value.datePickerRef.timeValue[0] +
'_' +
TableHeaderRef.value.datePickerRef.timeValue[1] // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
})
}
</script>

View File

@@ -46,7 +46,7 @@
</div>
</div>
<MyEChart :style="`height:calc(${EchHeight.height} + 10px)`" :options="exceededCharts" />
<MyEChart :style="`height:calc(${EchHeight.height} + 15px)`" :options="exceededCharts" />
</div>
</div>
@@ -356,11 +356,11 @@ const info = (row: any) => {
}),
axisLabel: {
color: '#000',
fontSize: 12
fontSize: 10
}
},
grid: {
top: '30px',
top: '35px',
left: '10px',
right: '20px'
},
@@ -606,7 +606,7 @@ defineExpose({ info, show })
justify-content: space-between;
// grid-template-columns: 1fr 1fr 1fr;
margin-top: 10px;
margin-bottom: 10px;
margin-bottom: 3px;
.line {
display: inline-block;
width: 0.5rem;

View File

@@ -146,7 +146,8 @@ const echart = (row: any) => {
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0
borderWidth: 0,
position:'bottom'
},
legend: {
data: row.map((item: any) => item.time),

View File

@@ -26,7 +26,14 @@
</div>
<!-- 地图 -->
<!-- <Map ref="mapRef" @changeValue="changeValue" :lineInfo="lineInfo" @drop="drop" @show="infoShow" /> -->
<Map
v-if="VITE_FLAG"
ref="mapRef"
@changeValue="changeValue"
:lineInfo="lineInfo"
@drop="drop"
@show="infoShow"
/>
<div v-show="lineInfo">
<!-- 省级 -->
<div v-show="control == 1">
@@ -48,7 +55,7 @@
<script setup lang="ts">
import { onMounted, nextTick, ref, provide } from 'vue'
import Area from '@/components/form/area/index.vue'
// import Map from './components/map.vue'
import Map from './components/map.vue'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
import { Search, Refresh } from '@element-plus/icons-vue'
@@ -56,14 +63,15 @@ import mapL from './components/mapL.vue'
import mapR from './components/mapR.vue'
import cityMapL from './components/cityMapL.vue'
import cityMapR from './components/cityMapR.vue'
import Info from './components/line/info.vue'
import DatePicker from '@/components/form/datePicker/index.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const dictData = useDictData()
defineOptions({
name: 'panorama'
})
const datePickerRef = ref()
const areaRef = ref()
const lineInfo = ref(true)
@@ -73,6 +81,7 @@ const InfoRef = ref()
const mapRRef = ref()
const cityMapLRef = ref()
const cityMapRRef = ref()
// const list: any = [dictData.state.area[0], ...dictData.state.area[0].children]
const options: any = ref([
{
@@ -95,8 +104,7 @@ const form: any = ref({
const height = mainHeight(10)
// 获取区域名称
const changeValue = (e: any) => {
console.log('🚀 ~ changeValue ~ e:', e.data)
// mapRef.value.locatePositions(e)
VITE_FLAG ? mapRef.value.locatePositions(e) : ''
form.value.orgNo = e.data.id //list.filter((item: any) => item.code == e.orgId)[0]?.id || dictData.state.area[0].id
form.value.areaName = e.data.name
options.value[0].name = e.data.areaName
@@ -121,7 +129,7 @@ const infoShow = (e: boolean) => {
}
// 地图控制图层
const LookMap = (row: any, key?: any) => {
// mapRef.value.addMarkers({ ...row, type: 1 }, key)
VITE_FLAG ? mapRef.value.addMarkers({ ...row, type: 1 }, key) : ''
}
const LngLat = [
{
@@ -162,14 +170,14 @@ const LngLat = [
]
//区域统计展示切换
const GridDiagram = (k?: number, num?: number) => {
// mapRef.value.radiusPop(k)
VITE_FLAG ? mapRef.value.radiusPop(k) : ''
if (num == 3) {
// form.value.areaName
let value = LngLat.filter(item => item.name == form.value.areaName)[0]
// if (value) mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom)
if (value) VITE_FLAG ? mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom) : ''
} else {
// mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425)
VITE_FLAG ? mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425) : ''
}
}
const info = () => {
@@ -180,7 +188,7 @@ const info = () => {
form.value.type = datePickerRef.value.interval
// mapRef.value.grids(form.value)
VITE_FLAG ? mapRef.value.grids(form.value) : ''
if (control.value == 1) {
mapLRef.value.info(form.value)
mapRRef.value.info(form.value)

View File

@@ -487,7 +487,7 @@ const getProviteData = async () => {
}
// 入网评估报告
if (detailData.value.netInReport.length > 0) {
if (detailData.value.netInReport.length > 0 && detailData.value.netInReport[0] != null) {
netInReportList.value = []
detailData.value.netInReport.forEach((item: any) => {
getFileNamePath(item, 'netInReport')

View File

@@ -40,6 +40,7 @@ import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
const dictData = useDictData()
@@ -121,9 +122,73 @@ const tableStore = new TableStore({
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
// {
// title: '报告',
// minWidth: '150',
// align: 'center',
// render: 'buttons',
// fixed: 'right',
// buttons: [
// {
// name: 'productSetting',
// title: '查看报告',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// disabled: row => {
// return !(row.problemType == 2 || row.problemType == 4)
// },
// click: row => {
// if (row.problemType == 2) {
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
// window.open(window.location.origin + '/#/previewFile?' + match[1])
// } else {
// if (row.problemPath == null) {
// ElMessage({
// message: '暂无报告!',
// type: 'warning'
// })
// } else {
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
// // window.open(res.data.url)
// })
// }
// }
// }
// },
// {
// name: 'productSetting',
// title: '报告下载',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// disabled: row => {
// return !(row.problemType == 2 || row.problemType == 4)
// },
// click: row => {
// if (row.problemType == 2) {
// window.open(row.filePath)
// } else {
// if (row.problemPath == null) {
// ElMessage({
// message: '暂无报告!',
// type: 'warning'
// })
// } else {
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
// window.open(res.data.url)
// })
// }
// }
// }
// }
// ]
// },
{
title: '报告',
minWidth: '150',
title: '操作',
minWidth: '220',
align: 'center',
render: 'buttons',
fixed: 'right',
@@ -149,9 +214,10 @@ const tableStore = new TableStore({
type: 'warning'
})
} else {
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
// window.open(res.data.url)
})
window.open(window.location.origin + '/#/previewFile?/' + row.problemPath)
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
// // window.open(res.data.url)
// })
}
}
}
@@ -181,17 +247,7 @@ const tableStore = new TableStore({
}
}
}
}
]
},
{
title: '操作',
minWidth: '220',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'edit',
title: '查看信息',

View File

@@ -96,9 +96,19 @@ const tableStore = new TableStore({
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
// {
// title: '报告',
// minWidth: '150',
// align: 'center',
// render: 'buttons',
// fixed: 'right',
// buttons: [
// ]
// },
{
title: '报告',
minWidth: '150',
title: '操作',
minWidth: '220',
align: 'center',
render: 'buttons',
fixed: 'right',
@@ -130,16 +140,7 @@ const tableStore = new TableStore({
click: row => {
window.open(row.filePath)
}
}
]
},
{
title: '操作',
minWidth: '220',
align: 'center',
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'productSetting',
title: '发送督办单',

View File

@@ -33,8 +33,9 @@ const tableStore = new TableStore({
isWebPaging: true,
paramsPOST: true,
column: [
{ field: 'substationName', title: '变电站名称', minWidth: 100 },
{ field: 'deptName', title: '所在地市', minWidth: 100 },
{ field: 'substationName', title: '变电站名称', minWidth: 100 },
{
field: 'dwLineList',
title: '电网侧监测点名称',

View File

@@ -1356,6 +1356,9 @@ watch(
}
)
onMounted(() => {
//初始化数据
resetForm()
console.log()
})
// 上传报告

View File

@@ -141,15 +141,17 @@ const tableStore = new TableStore({
buttons: [
{
name: 'productSetting',
title: '流程详情',
title: '查看报告',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
return row.testRunReport == null || row.testRunReport.length == 0
},
click: row => {
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
window.open(window.location.origin + '/#/previewFile?' + row.testRunReport)
}
},
{
@@ -165,6 +167,20 @@ const tableStore = new TableStore({
return row.testRunReport == null || row.testRunReport.length == 0
}
},
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
}
},
{
name: 'productSetting',
title: '重新试运行',
@@ -317,7 +333,7 @@ const startRunTest = () => {
// 下载报告
const downloadTheReport = (url: string) => {
getFileNameAndFilePath({ filePath: url }).then((res: any) => {
console.log(res.data.url,"res");
console.log(res.data.url, 'res')
const link = document.createElement('a')
link.href = res.data.url
link.download = res.data.name

View File

@@ -308,10 +308,10 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
background: var(--el-color-primary-light-3);
// background: #009688;
//background: #4d6ea1;
border-radius: 0;
&:hover {
background: var(--el-color-primary-light-5);
}
border-radius: 0;
}
@media screen and (max-width: 720px) {