应急管理厅专家管理系统
祖安之光
2026-06-09 c163668a14236d1b7f33e9fc97ac16153ba2a90c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<template>
  <div class="login">
    <login-form ref="loginRef"/>
    <el-dialog
          v-model="tipVisible"
          title="提示"
          width="600"
          align-center
          center
        >
          <span>2026年度专家申请已开始。</span>
          <template #footer>
            <div class="dialog-footer">
              <el-button @click="tipVisible = false">关闭</el-button>
              <el-button type="primary" @click="openApply()">
                点此申请
              </el-button>
            </div>
          </template>
        </el-dialog>
    <!--  底部  -->
    <div class="el-login-footer">
      <span>Copyright ©2023-{{nowYear}} All Rights Reserved.</span>
    </div>
  </div>
</template>
 
<script setup>
import {onMounted, ref, reactive, watch, defineAsyncComponent, nextTick, onUnmounted} from "vue"
import useUserStore from '@/store/modules/user'
import LoginForm from './components/loginForm'
import {getSettings} from "@/api/backManage/evaluate";
const { proxy } = getCurrentInstance()
const route = useRoute()
const router = useRouter()
const nowYear = ref();
// 时间格式化
const timeForm = {
  hour12: false,
  year: 'numeric',
  month: '2-digit',
  day: '2-digit',
  hour: '2-digit',
  minute: '2-digit',
  second: '2-digit'
}
 
const noticeRef = ref(null)
const tipVisible = ref(true)
const state = reactive({
  activeMenu: 1,
  date: '',
  weekDay: '',
  dayTime: '',
  checkDetails: false
})
 
const getApplyStatus = async ()=>{
  const res = await getSettings()
  if(res.code == 200){
    return res.data
  }else{
    ElMessage.warning(res.msg)
    return '0'
  }
}
 
const openApply = async () => {
  const status = await getApplyStatus();
  if(status == '1'){
    const routePath = '/fillForm';
    const resolvedRoute = router.resolve(routePath);
    const fullPath = resolvedRoute.href
    window.open(fullPath, '_blank');
  }else{
    ElMessage.warning('抱歉,专家申请暂未开启,请联系相关人员进行处理')
  }
}
 
// 当前时间
const getDateTime = () => {
  const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g, '-');
  state.date = curTime.slice(0, 10);
  nowYear.value = curTime.slice(0, 4);
  let week = ['日', '一', '二', '三', '四', '五', '六'];
  let day = new Date().getDay();
  state.weekDay = '星期' + week[day];
  let curHour = Number(curTime.slice(10, 13));
  if (curHour >= 5 && curHour <= 10) {
    state.dayTime = '上午';
  }
  if (curHour > 10 && curHour <= 12) {
    state.dayTime = '中午';
  }
  if (curHour > 12 && curHour <= 18) {
    state.dayTime = '下午';
  }
  if (curHour > 18 && curHour <= 22) {
    state.dayTime = '晚上';
  }
  if (curHour > 22) {
    state.dayTime = '午夜';
  }
};
 
 
const redirect = ref(undefined);
 
onMounted(()=>{
  getDateTime();
})
 
onUnmounted(()=>{
 
})
 
watch(route, (newRoute) => {
    redirect.value = newRoute.query && newRoute.query.redirect;
}, { immediate: true });
 
</script>
 
<style lang='scss' scoped>
.login {
  width: 100%;
  display: flex;
  justify-content: center;
  height: 100%;
}
::v-deep(.el-overlay-dialog){
  .el-dialog:not(.is-fullscreen){
    margin-top: auto !important;
    .el-dialog__body{
      padding-top: 50px;
      padding-bottom: 50px;
      font-size: 20px;
    }
  }
}
.el-login-footer {
  height: 40px;
  line-height: 40px;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
}
</style>