ee42281f by fanguang

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents 9eaaa709 ad1b49cc
......@@ -147,7 +147,7 @@ const routes: RouteRecordRaw[] = [
component: () => import('@/views/data_meta/budgetDataIndex.vue'),
meta: {
title: '',
// sidebar: false,
// sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
......@@ -156,7 +156,7 @@ const routes: RouteRecordRaw[] = [
}
]
},
{
{
path: '/data-meta/reports',
component: Layout,
meta: {
......@@ -253,6 +253,28 @@ const routes: RouteRecordRaw[] = [
}
}
]
},
{
path: '/data-meta/portraitMap',
component: Layout,
meta: {
title: '全景地图',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'portraitMap',
component: () => import('@/views/data_meta/portraitMap.vue'),
meta: {
title: '全景地图',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
},
}
]
}
]
......
......@@ -177,6 +177,9 @@ const useMenuStore = defineStore(
if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
return true;
}
if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
return true;
}
if (data.indexOf(`${r.path}/`) === 0 || data === r.path) {
return true;
}
......
......@@ -157,9 +157,9 @@ const useRouteStore = defineStore(
};
}
r = routes.find((route: any) => {
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')));
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
});
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage'))) {
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) {
r.path = path;
}
if(r && m.icon && m.icon !== "{}") {
......
<route lang="yaml">
# 组件名称
name: ""
</route>
<template>
<div class="container_wrap" v-loading="loading">
<iframe :src="link" frameborder="0" @load="iframeLoad"></iframe>
</div>
</template>
<script lang="ts" setup name="portraitMap">
import { ref, reactive, computed } from "vue";
import { JSEncrypt } from 'jsencrypt';
import useUserStore from '@/store/modules/user'
const route = useRoute()
const encryptor = new JSEncrypt()
const publicKey = '-----BEGIN PUBLIC KEY-----MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgFiv3Ko6rOBvWDK96tIExpdyuuQAGgZo0YmQxpT10hD3qu/MnNKlIJgo4+NwUHcwpleKE2DBOxgvCeMtUoP4FDWt8q18X+4+7t8p0D/57NhA0liNKQ/Ise6b5i293ht1XPen3XhR5xIcDNxauQ5vKqdwwzhoonsbJDtbowoinLQbAgMBAAE=-----END PUBLIC KEY-----';
function encrypt(txt) {
encryptor.setPublicKey(publicKey) // 设置公钥
return encryptor.encrypt(txt); // 对数据进行加密
}
const userStore = useUserStore()
const userInfoData = JSON.parse(localStorage.userData)
const url: any = 'https://scm-operation-test.csbr.cn/portraitBMap?fUrl=portraitMap';
// const url: any = 'http://localhost:8086/portraitBMap?fUrl=portraitMap';
const link = ref('')
const loading = ref(true);
const iframeLoad = () => {
loading.value = false;
}
// 搜索区域的schema
onBeforeMount(() => {
const loginInfo = JSON.stringify({
username: '13822222222',
pwd: '666666',
timestamp: new Date().getTime()
})
let linkValue = decodeURIComponent(url) + '&loginInfo=' + encodeURI(encrypt(loginInfo));
link.value = linkValue;
});
onActivated(() => {
let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === route.fullPath);
if (tab) {
tab.meta.title = route.query.title || '全景地图';
}
})
</script>
<style lang="scss" scoped>
.container_wrap {
width: 100%;
height: 100%;
padding: 0;
iframe {
width: 100%;
height: 100%;
}
}
</style>
......@@ -730,7 +730,7 @@ const setSignatoryTableInfo = (row, isEdit = false) => {
},
{
label: "默认值", field: "defaultValue", width: 180, align: 'right', getName: (scope) => {
return changeNum(scope.row.defaultValue, 2) || '-'
return scope.row.defaultValue !== null && scope.row.defaultValue !== '' ? changeNum(scope.row.defaultValue, 2) : '-'
}
},
{
......@@ -842,11 +842,11 @@ const inputChange = (val, scope, field) => {
let strArr = val.split(".");
if (strArr.length > 1) {
let right = strArr[1];
if (right === "" || right.length < 2) {
row[field] = val = parseFloat(val || 0).toFixed(2);
if (right === "" || right.length < 3) {
row[field] = val = parseFloat(val || 0).toFixed(3);
}
} else {
row[field] = val = parseFloat(val || 0).toFixed(2);
row[field] = val = parseFloat(val || 0).toFixed(3);
}
}
......@@ -857,7 +857,7 @@ const inputEventChange = (val, scope, field) => {
row[field] = row[field].toString().replace(/\.{2,}/g, ".")
row[field] = row[field].toString().replace(".", "$#$").replace(/\./g, "").replace("$#$", ".")
row[field] = row[field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")
row[field] = row[field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,2})?).*$/g, "$1")
row[field] = row[field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,3})?).*$/g, "$1")
}
// 设置表格合并下标
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!