瀏覽代碼

Merge branch 'xqc_181'

yujinwen 4 月之前
父節點
當前提交
a8d8adbe85

+ 22 - 1
src/views/hzyb/forexCalendar/Index.vue

@@ -163,6 +163,15 @@ async function renderCalendar(){
 function handleClickEvent(item){
     if(item.matter_type===1) return Toast("该事项未关联指标")
     const {activeStart,activeEnd} = baseCalendarRef.value?.calendarApi.view||{}
+    // 存一份数据到sessionStorage 回退时回显用
+    const obj={
+        permissionValue:permissionValue.value,
+        permissionName:permissionName.value,
+        monthValue:monthValue.value,
+        activeId:activeId.value,
+        activeIndex:activeIndex.value
+    }
+    sessionStorage.setItem('forexCalendarData',JSON.stringify(obj))
     //信息传到transIndex,在transIndex跳转
     window.parent.postMessage({
         path:'/hzyb/forex/detail',
@@ -178,7 +187,19 @@ function handleClickEvent(item){
     showEventList.value = false
 }
 onMounted(()=>{
-    monthValue.value = new Date()
+    const obj=sessionStorage.getItem('forexCalendarData')?JSON.parse(sessionStorage.getItem('forexCalendarData')):null
+    if(obj){
+        const d=moment(obj.monthValue).format('YYYY/MM/DD')
+        monthValue.value = new Date(d)
+        permissionValue.value=obj.permissionValue
+        permissionName.value=obj.permissionName
+        activeId.value=Number(obj.activeId) 
+        activeIndex.value= Number(obj.activeIndex)
+        changeMonth(monthValue.value)
+    }else{
+        monthValue.value = new Date()
+    }
+    
     getPermissionList()
 })
 </script>

+ 4 - 3
src/views/hzyb/forexCalendar/components/BaseCalendar.vue

@@ -68,7 +68,7 @@ defineExpose({ calendarApi });
             </template>
         </FullCalendar>
         <div class="water-mark" v-if="showMark">
-            <p>{{ moment(markText.date).format("YYYY-MM") }}</p>
+            <p>{{ moment(markText.date).format("YYYY年M月") }}</p>
             <p>{{ markText.type }}</p>
         </div>
     </div>
@@ -178,8 +178,9 @@ defineExpose({ calendarApi });
         flex-direction: column;
         justify-content: center;
         align-items: center;
-        font-size: 64px;
-        opacity: 0.3;
+        font-size: 60px;
+        opacity: 0.2;
+        color: #E3B377;
         p{
             margin:0;
             padding:0;

+ 2 - 2
src/views/hzyb/forexCalendar/transIndex.vue

@@ -86,7 +86,7 @@ watch(hasAuth,(newVal,oldVal)=>{
     }
 })
 
-const iframeURLBase = ref(process.env.NODE_ENV === 'development'?'/xcx_h5':'')
+const iframeURLBase = ref(import.meta.env.VITE_APP_BASE_URL)
 const route = useRoute()
 onMounted(()=>{
     localStorage.setItem('hzyb-token',route.query.token)
@@ -98,7 +98,7 @@ onMounted(()=>{
 <template>
     <!-- 直接将旋转作用在Index.vue上会导致日历插件dateClick不触发,vant组件滑动手势x,y轴相反 -->
     <!-- 包一层,iframe为可替换元素,内部元素不受父级样式影响,但overflow-x,overflow-y判断会对调 -->
-    <iframe :src="iframeURLBase+'/hzyb/forex/index'" class="iframe-class" v-if="hasAuth"></iframe>
+    <iframe :src="iframeURLBase+'hzyb/forex/index'" class="iframe-class" v-if="hasAuth"></iframe>
     <NoAuth v-else :data="noAuth"></NoAuth>
 </template>