审核端添加版本号;字体设置优化;

This commit is contained in:
2025-08-26 15:48:42 +08:00
parent e4ec2f1c69
commit ae10b928ba
5 changed files with 176 additions and 108 deletions
+1 -1
View File
@@ -1 +1 @@
VITE_APP_VERSION=1.2.20250825-12
VITE_APP_VERSION=1.2.20250825-21
+3 -3
View File
@@ -96,7 +96,7 @@ const onClickSave = () => {
;
font-size: .5333rem /* 40/75 */
;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #222222;
padding: .8533rem /* 64/75 */
@@ -127,7 +127,7 @@ const onClickSave = () => {
line-height: 4.4rem /* 330/75 */
;
font-size: $size30;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #999999;
@@ -156,7 +156,7 @@ const onClickSave = () => {
line-height: .5333rem /* 40/75 */
;
font-size: $md-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #5F6583;
text-align: center;
+33 -12
View File
@@ -2,7 +2,7 @@
<div v-if="true" class='box'>
<header>
<h3>Hello~{{ userName }}</h3>
<h4> 你又来审批预约了啊ㄟ( , )</h4>
<h4> 你又来审批预约了啊ㄟ( , )<br/>v{{ appVersion }}</h4>
<div class="plate-box">
<div @click="onClickGo('/Invitation')" class="plate-button">
@@ -31,7 +31,7 @@
<span @click="onClickGo('/visitorRecord')">查看全部</span>
</h2>
<div class="content-ul">
<div v-for="item in recordArr" class="wait-list" :key="item.id">
<div v-for="item in recordArr" @click="onClickItem(item)" class="wait-list" :key="item.id">
<h5>被拜访人{{ item.visitingName }}</h5>
<h5>拜访时间{{ item.hours }}</h5>
<div class="apply-box">
@@ -65,6 +65,7 @@ import {rulesForm, resetForm, rulesPhone} from '@/com/index'
import {getToken, getVisitorRecord, getWhiteCode} from '@/api/admin.js'
/* @data */
const appVersion = ref(import.meta.env.VITE_APP_VERSION || '1.0.0')
const router = useRouter()
const store = useStore()
const isLoading = ref(false)
@@ -176,6 +177,26 @@ const initializeApp = () => {
}
};
const onClickItem = (item) => {
// 检查instanceUrl是否存在且非空
let instanceUrl;
if (item.instanceUrl && item.instanceUrl.trim() !== '') {
instanceUrl = item.instanceUrl;
}else{
instanceUrl = `https://aflow.dingtalk.com/dingtalk/mobile/homepage.htm?corpid=ding03f8e88dde9b426835c2f4657eb6378f&dd_share=false&showmenu=false&dd_progress=false&back=native&procInstId=${item.instanceId}&taskId=&swfrom=isv&dinghash=approval&dtaction=os&dd_from=corp#approval`;
}
dd.openLink({
url: instanceUrl,
success: () => {
},
fail: () => {
},
complete: () => {
},
});
}
// 在组件挂载时调用
onMounted(() => {
initializeApp();
@@ -207,7 +228,7 @@ onMounted(() => {
;
font-size: .48rem /* 36/75 */
;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #222222;
}
@@ -216,7 +237,7 @@ onMounted(() => {
line-height: .48rem /* 36/75 */
;
font-size: $sm-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #FFFFFF;
padding: 0 .6933rem /* 52/75 */
@@ -281,7 +302,7 @@ onMounted(() => {
line-height: .64rem /* 48/75 */
;
font-size: $lg-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #222222;
}
@@ -291,7 +312,7 @@ onMounted(() => {
;
font-size: .2667rem /* 20/75 */
;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #5F6583;
margin-top: .1067rem /* 8/75 */
@@ -327,14 +348,14 @@ onMounted(() => {
;
font-size: .48rem /* 36/75 */
;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #222222;
span {
// line-height: 36px;
font-size: $sm-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #999999;
}
@@ -359,7 +380,7 @@ onMounted(() => {
height: .6667rem /* 50/75 */
;
font-size: $md-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #222222;
}
@@ -375,7 +396,7 @@ onMounted(() => {
border-radius: .1333rem /* 10/75 */
;
font-size: $md-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #999999;
line-height: .72rem /* 54/75 */
@@ -403,7 +424,7 @@ onMounted(() => {
;
color: #FF6643;
font-size: $sm-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
text-align: center;
@@ -436,7 +457,7 @@ onMounted(() => {
}
// font-size: 15px;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #999999;
text-align: center;
+8 -8
View File
@@ -274,7 +274,7 @@ if (token.value) {
;
font-size: .7467rem /* 56/75 */
;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #FFFFFF;
padding: .8533rem /* 64/75 */
@@ -292,7 +292,7 @@ if (token.value) {
line-height: .5333rem /* 40/75 */
;
font-size: $sm-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #FFFFFF;
@@ -337,7 +337,7 @@ if (token.value) {
.entering-center {
flex: 1;
font-size: $md-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #FFFFFF;
@@ -367,7 +367,7 @@ if (token.value) {
;
outline: none;
font-size: $size26;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #202F44;
border: none;
@@ -396,7 +396,7 @@ if (token.value) {
;
font-size: .5333rem /* 40/75 */
;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
color: #222222;
}
@@ -438,7 +438,7 @@ if (token.value) {
;
font-size: $md-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #5F6583;
margin-bottom: .28rem /* 21/75 */
@@ -499,7 +499,7 @@ if (token.value) {
line-height: .9867rem /* 74/75 */
;
font-size: $size30;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #4B4C4E;
}
@@ -515,7 +515,7 @@ if (token.value) {
border: none;
outline: none;
font-size: $sm-size;
font-family: Source Han Sans CN, serif;
font-family: Source Han Sans CN, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
color: #999999;
box-sizing: border-box;
+126 -79
View File
@@ -1,14 +1,15 @@
<template>
<div class='box'>
<header class="tabbar">
<div @click="onClickTabbar(item)" v-for="item in stateEnum" class="tabbar-li" :key="item.status" :class="query.status == item.status ? 'active' : ''">
<div @click="onClickTabbar(item)" v-for="item in stateEnum" class="tabbar-li" :key="item.status"
:class="query.status === item.status ? 'active' : ''">
{{ item.statusName }}
<img v-if="query.status == item.status" src="../assets/maomaochong.png" alt="">
<img v-if="query.status === item.status" src="../assets/maomaochong.png" alt="">
</div>
</header>
<div v-if="recordArr.length" class="content">
<div @click="onClcikItem(item)" v-for="item in recordArr" class="wait-list" :key="item.id">
<div @click="onClickItem(item)" v-for="item in recordArr" class="wait-list" :key="item.id">
<h5>被拜访人{{ item.visitingName }}</h5>
<h5>拜访时间{{ item.hours }}</h5>
<div class="apply-box">
@@ -17,11 +18,11 @@
<p><span>随行人数</span><span>{{ item.visitingNum }} </span></p>
<p><span>来访事由</span><span>{{ item.reason }}</span></p>
</div>
<!-- refuse 拒绝 pass 通过 状态 -->
<!-- refuse 拒绝 pass 通过 状态 -->
<div class="status" :class="stateEnum[item.status].className">{{ stateEnum[item.status].statusName }}</div>
</div>
</div>
<div v-if="isLoading && recordArr.length == 0" class="content">
<div v-if="isLoading && recordArr.length === 0" class="content">
<div class="no-have">
暂无数据
</div>
@@ -30,146 +31,190 @@
</template>
<script setup>
import { ref, reactive } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useStore } from 'vuex'
import {ref, reactive} from 'vue'
import {useRouter, useRoute} from 'vue-router'
import {useStore} from 'vuex'
import dd from 'dingtalk-jsapi'
import { Toast, ImagePreview } from 'vant';
import {Toast, ImagePreview} from 'vant';
import { rulesForm, resetForm, rulesPhone } from '@/com/index'
import { getToken, getVisitorRecord } from '@/api/admin.js'
import {rulesForm, resetForm, rulesPhone} from '@/com/index'
import {getToken, getVisitorRecord} from '@/api/admin.js'
/* @data */
const router = useRouter()
const route = useRoute()
const store = useStore()
const stateEnum = store.state.stateEnum
const recordArr = ref([])
const isLoading = ref(false)
const router = useRouter()
const route = useRoute()
const store = useStore()
const stateEnum = store.state.stateEnum
const recordArr = ref([])
const isLoading = ref(false)
const query = reactive({
status: 0,
size: -1,
current: 1,
})
const query = reactive({
status: 0,
size: -1,
current: 1,
})
console.log(route)
console.log(route)
/* @setup */
/* @method */
const onClcikItem = (item) =>{
// window.location.href = item.instanceUrl
// window.open(item.instanceUrl, '审批详情');
dd.openLink({
url: item.instanceUrl,
success: () => {},
fail: () => {},
complete: () => {},
});
}
const onClickTabbar = (item) =>{
if(query.status != item.status){
query.status = item.status
recordArr.value = []
visitorList()
}
const onClickItem = (item) => {
// window.location.href = item.instanceUrl
// window.open(item.instanceUrl, '审批详情');
// 检查instanceUrl是否存在且非空
let instanceUrl;
if (item.instanceUrl && item.instanceUrl.trim() !== '') {
instanceUrl = item.instanceUrl;
}else{
instanceUrl = `https://aflow.dingtalk.com/dingtalk/mobile/homepage.htm?corpid=ding03f8e88dde9b426835c2f4657eb6378f&dd_share=false&showmenu=false&dd_progress=false&back=native&procInstId=${item.instanceId}&taskId=&swfrom=isv&dinghash=approval&dtaction=os&dd_from=corp#approval`;
}
const visitorList = () =>{
Toast.loading({ duration: 0, forbidClick: true, message: '加载中', });
getVisitorRecord(query).then(res =>{
isLoading.value = true
recordArr.value = res.data
}).catch(err =>{
isLoading.value = true
})
dd.openLink({
url: instanceUrl,
success: () => {
},
fail: () => {
},
complete: () => {
},
});
}
const onClickTabbar = (item) => {
if (query.status !== item.status) {
query.status = item.status
recordArr.value = []
visitorList()
}
visitorList()
}
const visitorList = () => {
Toast.loading({duration: 0, forbidClick: true, message: '加载中',});
getVisitorRecord(query).then(res => {
isLoading.value = true
recordArr.value = res.data
}).catch(err => {
isLoading.value = true
})
}
visitorList()
</script>
<style lang='scss' scoped>
.box{
.box {
background: #F9FBFC;;
display: flex;
flex-direction: column;
.tabbar{
height: 1.8933rem /* 142/75 */;
line-height: .6133rem /* 46/75 */;
.tabbar {
height: 1.8933rem /* 142/75 */
;
line-height: .6133rem /* 46/75 */
;
display: flex;
font-size: $md-size;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
color: #999999;
padding: .56rem /* 42/75 */ .4rem /* 30/75 */ 0;
padding: .56rem /* 42/75 */
.4rem /* 30/75 */
0;
box-sizing: border-box;
.tabbar-li{
.tabbar-li {
position: relative;
flex: 1;
text-align: center;
img{
img {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: .48rem /* 36/75 */;
width: .6133rem /* 46/75 */;
height: .2667rem /* 20/75 */;
bottom: .48rem /* 36/75 */
;
width: .6133rem /* 46/75 */
;
height: .2667rem /* 20/75 */
;
}
}
.active{
.active {
font-size: $size30;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
color: #222222;
}
}
.content{
.content {
width: 100%;
flex: 1;
padding: 0 .4rem /* 30/75 */;
padding: 0 .4rem /* 30/75 */
;
box-sizing: border-box;
overflow: auto;
.wait-list{
.wait-list {
position: relative;
width: 100%;
// height: 470px;
background: #FFFFFF;
border-radius: .2667rem /* 20/75 */;
padding: .48rem /* 36/75 */;
border-radius: .2667rem /* 20/75 */
;
padding: .48rem /* 36/75 */
;
box-sizing: border-box;
margin-bottom: .2667rem /* 20/75 */;
h5{
height: .6667rem /* 50/75 */;
margin-bottom: .2667rem /* 20/75 */
;
h5 {
height: .6667rem /* 50/75 */
;
font-size: $md-size;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
color: #222222;
}
.apply-box{
.apply-box {
width: 100%;
padding: .4rem /* 30/75 */ .3733rem /* 28/75 */ .5067rem /* 38/75 */;
padding: .4rem /* 30/75 */
.3733rem /* 28/75 */
.5067rem /* 38/75 */
;
box-sizing: border-box;
border-radius: .1333rem /* 10/75 */;
border-radius: .1333rem /* 10/75 */
;
font-size: $md-size;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
color: #999999;
line-height: .72rem /* 54/75 */;
line-height: .72rem /* 54/75 */
;
background: #F5F7F9;
span:last-child{
span:last-child {
color: #5F6583;
}
}
.status{
.status {
position: absolute;
top: 0;
right: 0;
width: 1.52rem /* 114/75 */;
height: .6667rem /* 50/75 */;
line-height: .6667rem /* 50/75 */;
width: 1.52rem /* 114/75 */
;
height: .6667rem /* 50/75 */
;
line-height: .6667rem /* 50/75 */
;
background: #FFE9E4;
border-radius: 0px .2667rem /* 20/75 */ 0px .1333rem /* 10/75 */;
border-radius: 0px .2667rem /* 20/75 */
0px .1333rem /* 10/75 */
;
color: #FF6643;
font-size: $sm-size;
font-family: Source Han Sans CN, Source Han Sans CN;
@@ -178,11 +223,13 @@ import { getToken, getVisitorRecord } from '@/api/admin.js'
text-align: center;
}
.refuse{
.refuse {
color: #5F6583;
background: #EAEEF6;
}
.pass{
.pass {
color: #30BF78;
background: #E7F8F5;
}