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
...@@ -253,6 +253,28 @@ const routes: RouteRecordRaw[] = [ ...@@ -253,6 +253,28 @@ const routes: RouteRecordRaw[] = [
253 } 253 }
254 } 254 }
255 ] 255 ]
256 },
257 {
258 path: '/data-meta/portraitMap',
259 component: Layout,
260 meta: {
261 title: '全景地图',
262 icon: 'sidebar-videos',
263 },
264 children: [
265 {
266 path: '',
267 name: 'portraitMap',
268 component: () => import('@/views/data_meta/portraitMap.vue'),
269 meta: {
270 title: '全景地图',
271 sidebar: false,
272 breadcrumb: false,
273 cache: true,
274 reuse: true
275 },
276 }
277 ]
256 } 278 }
257 ] 279 ]
258 280
......
...@@ -177,6 +177,9 @@ const useMenuStore = defineStore( ...@@ -177,6 +177,9 @@ const useMenuStore = defineStore(
177 if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) { 177 if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
178 return true; 178 return true;
179 } 179 }
180 if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
181 return true;
182 }
180 if (data.indexOf(`${r.path}/`) === 0 || data === r.path) { 183 if (data.indexOf(`${r.path}/`) === 0 || data === r.path) {
181 return true; 184 return true;
182 } 185 }
......
...@@ -157,9 +157,9 @@ const useRouteStore = defineStore( ...@@ -157,9 +157,9 @@ const useRouteStore = defineStore(
157 }; 157 };
158 } 158 }
159 r = routes.find((route: any) => { 159 r = routes.find((route: any) => {
160 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'))); 160 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')));
161 }); 161 });
162 if (r && (path.includes('budgetDataIndex') || path.includes('iframePage'))) { 162 if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) {
163 r.path = path; 163 r.path = path;
164 } 164 }
165 if(r && m.icon && m.icon !== "{}") { 165 if(r && m.icon && m.icon !== "{}") {
......
1 <route lang="yaml">
2 # 组件名称
3 name: ""
4 </route>
5
6 <template>
7 <div class="container_wrap" v-loading="loading">
8 <iframe :src="link" frameborder="0" @load="iframeLoad"></iframe>
9 </div>
10 </template>
11
12 <script lang="ts" setup name="portraitMap">
13
14 import { ref, reactive, computed } from "vue";
15
16 import { JSEncrypt } from 'jsencrypt';
17 import useUserStore from '@/store/modules/user'
18 const route = useRoute()
19
20 const encryptor = new JSEncrypt()
21 const publicKey = '-----BEGIN PUBLIC KEY-----MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgFiv3Ko6rOBvWDK96tIExpdyuuQAGgZo0YmQxpT10hD3qu/MnNKlIJgo4+NwUHcwpleKE2DBOxgvCeMtUoP4FDWt8q18X+4+7t8p0D/57NhA0liNKQ/Ise6b5i293ht1XPen3XhR5xIcDNxauQ5vKqdwwzhoonsbJDtbowoinLQbAgMBAAE=-----END PUBLIC KEY-----';
22 function encrypt(txt) {
23 encryptor.setPublicKey(publicKey) // 设置公钥
24 return encryptor.encrypt(txt); // 对数据进行加密
25 }
26 const userStore = useUserStore()
27 const userInfoData = JSON.parse(localStorage.userData)
28 const url: any = 'https://scm-operation-test.csbr.cn/portraitBMap?fUrl=portraitMap';
29 // const url: any = 'http://localhost:8086/portraitBMap?fUrl=portraitMap';
30
31 const link = ref('')
32 const loading = ref(true);
33 const iframeLoad = () => {
34 loading.value = false;
35 }
36
37 // 搜索区域的schema
38 onBeforeMount(() => {
39 const loginInfo = JSON.stringify({
40 username: '13822222222',
41 pwd: '666666',
42 timestamp: new Date().getTime()
43 })
44 let linkValue = decodeURIComponent(url) + '&loginInfo=' + encodeURI(encrypt(loginInfo));
45 link.value = linkValue;
46 });
47
48 onActivated(() => {
49 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === route.fullPath);
50 if (tab) {
51 tab.meta.title = route.query.title || '全景地图';
52 }
53 })
54
55 </script>
56
57 <style lang="scss" scoped>
58 .container_wrap {
59 width: 100%;
60 height: 100%;
61 padding: 0;
62
63 iframe {
64 width: 100%;
65 height: 100%;
66 }
67 }
68 </style>
...@@ -730,7 +730,7 @@ const setSignatoryTableInfo = (row, isEdit = false) => { ...@@ -730,7 +730,7 @@ const setSignatoryTableInfo = (row, isEdit = false) => {
730 }, 730 },
731 { 731 {
732 label: "默认值", field: "defaultValue", width: 180, align: 'right', getName: (scope) => { 732 label: "默认值", field: "defaultValue", width: 180, align: 'right', getName: (scope) => {
733 return changeNum(scope.row.defaultValue, 2) || '-' 733 return scope.row.defaultValue !== null && scope.row.defaultValue !== '' ? changeNum(scope.row.defaultValue, 2) : '-'
734 } 734 }
735 }, 735 },
736 { 736 {
...@@ -842,11 +842,11 @@ const inputChange = (val, scope, field) => { ...@@ -842,11 +842,11 @@ const inputChange = (val, scope, field) => {
842 let strArr = val.split("."); 842 let strArr = val.split(".");
843 if (strArr.length > 1) { 843 if (strArr.length > 1) {
844 let right = strArr[1]; 844 let right = strArr[1];
845 if (right === "" || right.length < 2) { 845 if (right === "" || right.length < 3) {
846 row[field] = val = parseFloat(val || 0).toFixed(2); 846 row[field] = val = parseFloat(val || 0).toFixed(3);
847 } 847 }
848 } else { 848 } else {
849 row[field] = val = parseFloat(val || 0).toFixed(2); 849 row[field] = val = parseFloat(val || 0).toFixed(3);
850 } 850 }
851 } 851 }
852 852
...@@ -857,7 +857,7 @@ const inputEventChange = (val, scope, field) => { ...@@ -857,7 +857,7 @@ const inputEventChange = (val, scope, field) => {
857 row[field] = row[field].toString().replace(/\.{2,}/g, ".") 857 row[field] = row[field].toString().replace(/\.{2,}/g, ".")
858 row[field] = row[field].toString().replace(".", "$#$").replace(/\./g, "").replace("$#$", ".") 858 row[field] = row[field].toString().replace(".", "$#$").replace(/\./g, "").replace("$#$", ".")
859 row[field] = row[field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3") 859 row[field] = row[field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")
860 row[field] = row[field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,2})?).*$/g, "$1") 860 row[field] = row[field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,3})?).*$/g, "$1")
861 } 861 }
862 862
863 // 设置表格合并下标 863 // 设置表格合并下标
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!