26 Commits

Author SHA1 Message Date
xuli3099
56f050e285 Merge branch 'develop' into develop-intranet 2025-08-25 12:28:45 +08:00
xuli3099
d49dd05baf 修改详情内容 2025-08-25 12:28:13 +08:00
xuli3099
06b537c6da Merge branch 'develop' into develop-intranet 2025-08-25 10:04:41 +08:00
xuli3099
e34fa23547 增加审批详情 2025-08-25 10:04:13 +08:00
xuli3099
48912d6319 修改为外网 2025-08-22 22:16:36 +08:00
xuli3099
d77edd97e0 Merge branch 'develop' into develop-intranet 2025-08-22 22:15:58 +08:00
xuli3099
ad49a47367 增加待审批页面 2025-08-22 21:58:11 +08:00
xuli3099
8e8fdc02c6 修改样式 2025-08-22 16:00:08 +08:00
xuli3099
711785fe8e 修改样式 2025-08-22 15:55:18 +08:00
xuli3099
c856fe3da6 修改样式 2025-08-20 16:39:16 +08:00
xuli3099
d6053ec1aa 修改样式 2025-08-20 16:38:21 +08:00
xuli3099
b276c74be1 修改webview 2025-08-20 13:55:24 +08:00
xuli3099
7868a0447d 修改webview 2025-08-20 13:54:53 +08:00
xuli3099
d0f29a4b71 修改webview 2025-08-20 13:54:18 +08:00
xuli3099
558b56420b 修改webview 2025-08-20 13:52:43 +08:00
xuli3099
9262eeea35 合并解决冲突 2025-08-20 11:42:50 +08:00
xuli3099
876b9b1c06 修改样式 2025-08-20 11:39:24 +08:00
xuli3099
27d64dbd72 增加 弹窗显示 2025-08-20 11:36:31 +08:00
xuli3099
b1064f9118 还改为外网打包 2025-08-20 10:22:34 +08:00
xuli3099
08ca660b87 增加退出登录提示 2025-08-20 10:14:22 +08:00
xuli3099
6635ceb0d8 查询版本加内外网处理 2025-08-20 10:04:40 +08:00
xuli3099
9d5432058a 修改配置 2025-08-20 09:52:32 +08:00
xuli3099
b2b0c11966 增加内网设备绑定 2025-08-20 09:43:00 +08:00
xuli3099
8f849cda40 修改登录及设备授权处理 2025-08-19 17:31:28 +08:00
xuli3099
7fa1e5b2f9 删除 设备id删除入口 2025-08-19 14:39:45 +08:00
xuli3099
93e1557cb2 修改首页及样式 2025-08-19 13:27:26 +08:00
21 changed files with 792 additions and 105 deletions

View File

@@ -6,4 +6,12 @@ export function noticeList(data) {
url: '/acc/message/notify/detail',
data
})
}
}
// 获取用户审批的待办和已办详情
export function flowList(data) {
return request.post({
url: '/acc/message/flow/detail',
data
})
}

View File

@@ -0,0 +1,163 @@
<template>
<view class="model" v-if="visibleF">
<view class="model-con">
<view class="model-top" v-if="title">{{title}}</view>
<view :class="{'model-middle':true,'m-height':!title}">{{contents}}</view>
<view class="model-bottom">
<button type="primary" class="btn-cancel" @click="handleCancel" v-if="btnFlag2">Cancel</button>
<button type="default" class="btn-green" @click="handleConfirm" v-if="btnFlag" :loading="loading" :disabled="loading">{{btnTxt}}</button>
</view>
</view>
</view>
</template>
<script setup>
import { ref,watch } from 'vue'
const props = defineProps({
visible:{
type:Boolean
},
title:{
type: String,
},
content: {
type: String
},
btnFlag:{
type:Boolean,
default:true
},
btnFlag2:{
type:Boolean,
default:true
},
btnTxt:{
type:String,
default:'确定'
}
})
let visibleF = ref(props.visible)
let titles = ref(props.title)
let contents = ref(props.content)
let btnFlags = ref(props.btnFlag)
let loading = ref(false);
// 显示隐藏
watch(() => props.visible, (newVal, oldVal) => {
loading.value = false;
visibleF = newVal
},{
deep:true, // 深度监听
immediate:true // 立即执行
});
// 标题
watch(() => props.title, (newVal, oldVal) => {
titles.value = newVal
},{
deep:true,
immediate:true
});
// 内容
watch(() => props.content, (newVal, oldVal) => {
contents = newVal
},{
deep:true,
immediate:true
});
// 按钮
watch(() => props.btnFlag, (newVal, oldVal) => {
btnFlags.value = newVal
},{
deep:true,
immediate:true
});
// 调用父组件的方法
const emit = defineEmits(['close','confirm'])
const handleCancel = ()=>{
emit('close');
}
const handleConfirm = ()=>{
loading.value=true;
emit('confirm')
}
</script>
<style lang="scss" scoped>
.model {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.4);
z-index: 9999;
.model-con{
background: #fff;
position: fixed;
top:50%;
left:50%;
width:500rpx;
min-height: 278rpx;
margin-left: -270rpx;
margin-top:-139rpx;
border-radius: 24rpx;
padding:20rpx 20rpx 30rpx;
}
.model-top{
text-align: center;
padding:20rpx 0;
font-size:36rpx;
}
.model-middle{
// margin-top:290rpx;
text-align: center;
font-size:36rpx;
color:#333333;
.font-green{
color:#05A3F4;
font-size: 42rpx;
font-weight: bold;
padding:20rpx 0;
}
}
.model-middle.m-height{
padding:60rpx 0 20rpx;
}
.model-bottom{
display: flex;
justify-content: center;
margin-top:40rpx;
// align-items: center;
.btn-green,.btn-cancel{
background-color: #fff;
color:#05A3F4;
border-radius: 48rpx;
font-size:30rpx;
width:200rpx;
height:65rpx;
line-height: 60rpx;
text-align: center;
font-size:30rpx;
border: 1px solid #05A3F4;
margin-left:0rpx !important;
margin-right:0 !important;
&::after{
border:none;
border-radius: 37rpx;
}
}
.btn-green{
border: 1px solid #05A3F4;
background-color:#05A3F4;
color:#fff;
margin-left:20rpx !important;
}
}
}
</style>

View File

@@ -4,5 +4,5 @@ export const AGREEWELCOME_KEY="agreewelcome";
// clientId 默认写2
export const CLIENT_ID="2";
// #区分内外网 //1-内网2-外网
export const NETWORK_ENV=1;
export const NETWORK_ENV=2;

View File

@@ -1,20 +1,30 @@
import { createSSRApp } from "vue";
import App from "./App.vue";
import { CLIENT_ID,NETWORK_ENV } from '@/enums/cacheEnums';
import '@/static/font/iconfont.css'
// 注册自定义组件
import customShowModal from '@/components/customShowModal.vue'
// pinia
import { createPinia } from 'pinia'
const pinia = createPinia()
export function createApp() {
const app = createSSRApp(App);
// 全局变量
app.config.globalProperties.$CLIENT_ID = CLIENT_ID;
app.config.globalProperties.$NETWORK_ENV = NETWORK_ENV;
// 全局自定义组件
app.component('customShowModal', customShowModal)
app.use(pinia)

View File

@@ -106,11 +106,19 @@
{
"path": "pages/notice/notice",
"style": {
"navigationBarTitleText": "",
"app-plus" : {
"bounce" : "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
},
"mp-alipay":{"allowsBounceVertical":"NO"} // 取消支付宝和钉钉小程序的iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
"navigationBarTitleText": ""
}
},
{
"path": "pages/notice/waitApprove",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/notice/waitApproveDetail",
"style": {
"navigationBarTitleText": ""
}
},
{

View File

@@ -82,7 +82,10 @@ const mescrollRef = ref(null);
const upOption = ref({
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: { tip: '~ 空空如也 ~' },
empty: {
tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png"
},
textLoading: '加载中...',
textNoMore: '已经到底了'
});

View File

@@ -89,7 +89,10 @@ const mescrollRef = ref(null);
const upOption = ref({
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: { tip: '~ 空空如也 ~' },
empty: {
tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png"
},
textLoading: '加载中...',
textNoMore: '已经到底了'
});

View File

@@ -296,6 +296,7 @@ const inputRefs = ref([]);
const activeIndex = ref(0);//初始化焦点
let authCode = ref('')
const handleInput = (index, event) => {
activeIndex.value = index;
// 只允许数字输入
const value = event.detail.value.replace(/\D/g, '')
codes.value[index] = value

View File

@@ -1,39 +1,50 @@
<template>
<view id="test">
<!-- #ifdef h5 -->
<!-- #ifdef H5 -->
<web-view :src="url"></web-view>
<!-- #endif -->
</view>
</template>
<script setup>
import { ref,onMounted,getCurrentInstance } from 'vue';
import { onLoad,onReady,onBackPress } from '@dcloudio/uni-app';
const { proxy } = getCurrentInstance();
import { ref,getCurrentInstance } from 'vue';
import { onLoad,onBackPress } from '@dcloudio/uni-app';
let windowInfo = ref(null);
let url = ref('');
let title = ref('');
onLoad(async(opt) => {
console.log(opt)
url.value = opt.url;
// console.log(opt)
url.value = opt.url ;
title.value = opt.title;
// #ifdef APP-PLUS
titleNViewWebview(url.value,title.value);
// #endif
// uni.getSystemInfo({
// success: (res)=> {
// windowInfo.value = res;
// createWvAndLoadUrl(url.value,title.value);
// }
// });
})
onBackPress((e)=> {//响应返回事件
console.log("onBackPress=>",e)
if (e.from === 'navigateBack') { //这个地方必须要有的,否则会死循环
return false;
}
console.log('点击返回....');
let pages = getCurrentPages()
let page = pages[pages.length - 1];
let currentPages = page.$getAppWebview()
currentPages.close()
uni.navigateBack({delta:2})
return true;
})
// 带标题栏控件的Webview窗口
let webview = null;
function titleNViewWebview(url,title) {
console.log("titleNViewWebview=>",url,title)
let nwating = plus.nativeUI.showWaiting("loading...",{
width:'110px',
padding:'10px'
})
webview = plus.webview.create(url, 'test', {
titleNView: {
backgroundColor: '#307AF5',
@@ -41,32 +52,21 @@ function titleNViewWebview(url,title) {
titleColor: '#ffffff',
autoBackButton: true,
backgroundImage:'./../../static/images/bg-Blue-header.png',
buttons:[{onclick:clickButton}]
}
});
webview.addEventListener('close', function(){
webview=null;
});
webview.addEventListener('titleUpdate', function(){
webview.addEventListener('loaded', function() {
nwating.close();
webview.show();
}, false);
webview.addEventListener('close', function(){
console.log("close=>")
webview=null;
uni.navigateBack();
});
webview.addEventListener('loading', () => {
plus.nativeUI.showWaiting("loading...",{
width:'110px',
padding:'10px'
})
}, false);
//plus.nativeUI.showWaiting()
webview.addEventListener('loaded', () => {
plus.nativeUI.closeWaiting();
}, false);
}
// 左侧按钮返回
function clickButton(){
// plus.nativeUI.alert('clicked!');
webview=null;
}
</script>
<style scoped>

View File

@@ -21,11 +21,11 @@
<!-- 待办内容 -->
<view class="backlog-bg">
<view class="backlog-b-item">
<view class="backlog-b-item" @click="handleJump('/pages/notice/notice',1)">
<view class="font-number">{{ backBlogObj.count1 }}</view>
<view class="font-title">待办</view>
</view>
<view class="backlog-b-item">
<view class="backlog-b-item" @click="handleJump('/pages/notice/waitApprove')">
<view class="font-number">{{ backBlogObj.count2 }}</view>
<view class="font-title">待审查</view>
</view>
@@ -136,17 +136,17 @@
<!-- 底部加高度来避免tabbar遮挡 -->
<view class="bottom-height"></view>
</mescroll-uni>
</view>
</view>
</view>
</template>
<script setup>
import { ref,onMounted,computed } from 'vue';
import { ref,onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import customHeader from '@/components/customHeader.vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import customSteps from '@/components/customSteps.vue'
import customSearch from '@/components/customSearch.vue'
// import customSearch from '@/components/customSearch.vue'
import { getNavBarPaddingTop} from '@/utils/system.js'
// ,swiperList,stepData,salesTask,commonServices,newsQueryList
import { messageNotifyCount,messageFlowCount,getUserFavorite} from '@/api/home.js';
@@ -326,10 +326,14 @@ const getCommonServices = async ()=>{
let data = await getUserFavorite({});
commonServiceList.value = data || []
}
// 跳转
let handleJump=(url)=>{
// 跳转 type:1-tabbar
let handleJump=(url,type)=>{
if(url){
if(type==1){
uni.switchTab({url});
}else{
uni.navigateTo({ url })
}
}
}

View File

@@ -1,6 +1,8 @@
<template>
<view class="container" :style="{ height: `100vh` }">
<view class="bg"></view>
<view class="bg">
<view class="env-txt" v-if="networkEnv==1">企业内网</view>
</view>
<view class="version">Version {{ appVersion }}</view>
<!-- <view class="bottom-bg"></view> -->
@@ -29,6 +31,7 @@ import {showAlert} from '@/utils/message.js'
import { useUserStore } from '@/stores/user';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
// #ifdef APP-PLUS
// 获取 存储手机的module
@@ -58,13 +61,13 @@ onLoad(async(opt) => {
if(!versionVisible.value){
try {
// 授权设备存储
let granted = requestAndroidPermission(systemInfo);
if(granted){
// let granted = requestAndroidPermission(systemInfo);
// if(granted){
// showAlert("22授权成功")
setTimeout(()=>{
// setTimeout(()=>{
selectDeviceId();
},500)
}
// },500)
// }
} catch (error) {
console.error('权限请求出错:', error);
// showAlert(JSON.stringify(error))
@@ -100,12 +103,7 @@ const getOSVesion = async()=>{
// #ifdef H5
verNumber : systemInfo.appVersion,
// #endif
// deviceType:systemInfo.model,//型号
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
// osVersion:systemInfo.osVersion,//操作系统版本
// resolution:systemInfo.windowWidth+"*"+systemInfo.windowHeight,//分辨率
// trademark:systemInfo.deviceBrand,//设备品牌
// uniqueCode:systemInfo.deviceId//设备ID
}
// 当前手机版本
appVersion.value = param.verNumber;
@@ -137,40 +135,44 @@ const selectDeviceId = async()=>{
// let deviceId = uni.getStorageSync('app_device_id');// 本地设备ID
try {
safeSave.getSafeFile({ "key": "app_device_id" }, res2 => {
// showAlert(JSON.stringify(res2));
if (res2.code == 1) {
let deviceId = res2.data;
console.log("读取成功=>",deviceId)
// showAlert("读取成功=>"+deviceId);
getBindStatus({uniqCode:deviceId}).then(res=>{
let bindStatus = res.bindStatus
// setTimeout(()=>{
// 绑定状态1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
if(bindStatus == 4){
// 检查是否已登录 并 获取用户信息
if (userStore.isLogin) {
uni.reLaunch({
url: '/pages/home/home',
});
if(deviceId!=""){
getBindStatus({uniqCode:deviceId}).then(res=>{
let bindStatus = res.bindStatus
// setTimeout(()=>{
// 绑定状态1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
if(bindStatus == 4){
// 检查是否已登录 并 获取用户信息
if (userStore.isLogin) {
uni.reLaunch({
url: '/pages/home/home',
});
}else{
uni.reLaunch({
url: '/pages/login/login',
});
}
}else{
uni.reLaunch({
url: '/pages/login/login',
url: '/pages/deviceAuth/deviceAuth',
});
}
}else{
uni.reLaunch({
url: '/pages/deviceAuth/deviceAuth',
});
}
// },1000)
});
} else {
// showAlert('读取失败:'+res2.msg)
// setTimeout(()=>{
// },1000)
});
}else{
uni.reLaunch({
url: '/pages/deviceAuth/deviceAuth',
});
// },1000)
}
} else {
uni.reLaunch({
url: '/pages/deviceAuth/deviceAuth',
});
}
})
} catch (error) {
@@ -206,12 +208,22 @@ const handleClose=()=>{
position: relative;
padding-top:100px;
}
.container .bg{
background:url('@/static/images/loading-logo.png') no-repeat;
background-size:700rpx 800rpx;
width: 700rpx;
height: 800rpx;
margin:0 auto;
position: relative;
}
.container .bg .env-txt{
position: absolute;
right: 35rpx;
top:10rpx;
color:#fff;
font-size: 36rpx;
font-weight: bold;
}
.container .version{
color:#A8D4FF;

View File

@@ -3,7 +3,8 @@
<view class="login-con">
<view :style="{height: navBarPaddingTop + 'px'}"></view>
<image mode="aspectFit" src="../../static/images/pic-logo.png" class="login-logo"></image>
<view class="login-title">欢迎来到718友晟</view>
<view class="login-title" v-if="networkEnv==1"><text>718友晟</text><text>企业内网</text></view>
<view class="login-title" v-else>欢迎来到718友晟</view>
<view class="login-tab">
<customTabs v-model="activeTab" :tabs="tabList" :modelValue="activeTab">
<!-- 验证码登录 -->
@@ -257,7 +258,9 @@ const submitForm = () => {
param.runEnv = networkEnv.value;
// #ifdef H5
param.uniqCode = 'sn123456';//h5测试用 内网-sn123456 外网-e5687e80-526f-4522-ba7d-41d5db197a15
// b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9
param.uniqCode = '679d5560-534f-4df8-815a-49227ba6ffd2';//h5测试用 内网-sn123456 外网-b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9
let res = await login(param);
userStore.login(res);
uni.switchTab({ url: '/pages/home/home' })
@@ -329,6 +332,12 @@ const submitForm = () => {
margin: 0 0 35rpx 70rpx;
}
.login-con .login-title text:not(:last-child)::after {
content: "·";
margin: 0 10px;
color: #fff;
}
:deep(.login-tab .tabs-header) {
background: none !important;
border-bottom: none !important;

View File

@@ -133,7 +133,10 @@ const mescrollRef = ref(null);
const upOption = ref({
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: { tip: '~ 空空如也 ~' },
empty: {
tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png"
},
textLoading: '加载中...',
textNoMore: '已经到底了'
});

View File

@@ -0,0 +1,221 @@
<template>
<view class="con-body">
<view class="con-bg">
<!-- 头部 -->
<customHeader ref="customHeaderRef" :title="'待审批'" :leftFlag="true" :rightFlag="true"></customHeader>
<!-- 高度来避免头部遮挡 -->
<view class="top-height"></view>
<!-- 正文内容 -->
<view class="all-body">
<!-- 分页部分 -->
<mescroll-uni ref="mescrollRef"
@init="mescrollInit"
@down="downCallback"
@up="upCallback"
:up="upOption"
:down="downOption"
:fixed="false"
textColor="#ffffff"
bgColor="#ffffff"
class="scroll-h"
:class="{'loading-scroll':cssFlag}"
>
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index" @click="handleJump(item)">
<view class="report-list">
<view class="r-list">
<view class="r-name">{{ item.subject }}</view>
<view class="r-right btn-orange" size="mini" v-if="item.status==1">待处理</view>
<view v-else-if="item.status==2">已处理</view>
</view>
<view class="r-list">
<view class="r-left">来自 <text>{{ item.appName }}</text></view>
<view class="r-right">
<text style="color:#FF2B44" v-if="item.status==1 && (item.level==1 || item.level==2)">
{{ formatLevel(item.level) }}
</text>
<text v-else>{{ formatLevel(item.level) }}</text>
</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">创建人 <text>{{ item.createUser?item.createUser.userId:'' }}</text></view>
<view class="r-right">{{ parseTime(item.createTime,'{y}-{m}-{d} {h}:{i}') }}</view>
</view>
</view>
</view>
</mescroll-uni>
</view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import customHeader from '@/components/customHeader.vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { getNavBarPaddingTop } from '@/utils/system.js'
import { flowList } from '@/api/notice.js'
import {formatLevel} from '@/utils/status.js'
import { parseTime } from '@/utils/datetime.js'
// 获取导航栏高度用于内容区域padding
const navBarPaddingTop = ref(0);
onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
})
// 查询列表
let list = ref([]);
const mescrollRef = ref(null);
const upOption = ref({
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: {
tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png"
},
textLoading: '加载中...',
textNoMore: '已经到底了'
});
const downOption = ref({
auto: false,
textInOffset: '下拉刷新',
textOutOffset: '释放更新',
textLoading: '刷新中...'
});
let cssFlag=ref(false);//控制样式
const mescrollInit = (mescroll) => {
console.log("mescrollInit=>")
cssFlag.value = true;
mescrollRef.value = mescroll;
};
// 下拉刷新
const downCallback = async (mescroll) => {
try {
console.log("downCallback=>下拉刷新")
const res = await getFlowList(1, upOption.value.page.size);
cssFlag.value = false;
list.value = res.list;
mescroll.resetUpScroll();
} catch (error) {
mescroll.endErr();
} finally {
mescroll.endSuccess();
}
}
// 上拉加载更多
const upCallback = async (mescroll) => {
try {
console.log("upCallback=>上拉加载更多")
const res = await getFlowList(mescroll.num, mescroll.size);
if (mescroll.num === 1) {
list.value = res.list;
} else {
list.value.push(...res.list);
}
mescroll.endBySize(res.list.length, res.total);
} catch (error) {
mescroll.endErr();
}
}
// 获取数据列表
const getFlowList = (pageIndex, pageSize) => {
return new Promise(async (resolve) => {
let param = {
pageIndex,
pageSize
}
let res = await flowList(param);
let list = res.list || [];
resolve({
list,
total: res.recordCount
});
});
}
// 跳转webview
const handleJump = (item)=>{
uni.navigateTo({
url: `/pages/notice/waitApproveDetail?detail=${encodeURIComponent(JSON.stringify(item))}`
})
}
</script>
<style scoped>
.all-body {
/* #ifdef APP-PLUS */
top: 150rpx;
height: calc(100vh - 75px);
/* #endif */
/* #ifndef APP-PLUS */
top:120rpx;
height: calc(100vh);
/* #endif */
}
.search{
display: flex;
}
.search .btn-search{
border:none;
background: none;
line-height: normal;
color:#fff;
line-height: 56rpx !important;
padding:10rpx 0 0;
text-align: left;
cursor: pointer;
}
.search .btn-search::after{
display: none;
}
.search .custom-search{
width:80%;
}
.search .custom-search.uni-searchbar{
padding-right:0 !important;
}
.scroll-h{
/* #ifdef APP-PLUS */
height:calc(100vh - 78px) !important;
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 65px) !important;
/* #endif */
}
.white-bg{
padding-top:0rpx;
padding-bottom:10rpx;
}
.report-list .r-list{
align-items: flex-start;
}
.report-list .r-list:first-child{
padding-bottom:10rpx;
}
.report-list .r-list .r-name {
color: #3384DF;
font-size: 35rpx;
font-weight: bold;
width:500rpx;
}
.report-list .r-list .r-left text{
font-size: 28rpx;
color:#919191;
}
</style>

View File

@@ -0,0 +1,149 @@
<template>
<view class="con-body">
<view class="con-bg">
<!-- 头部 -->
<customHeader ref="customHeaderRef" :title="'待审批'" :leftFlag="true" :rightFlag="true"></customHeader>
<!-- 高度来避免头部遮挡 -->
<view class="top-height"></view>
<!-- 正文内容 -->
<view class="all-body">
<view class="white-bg bg-height">
<view class="report-list">
<view class="title">{{ detail.subject }}</view>
<view class="r-list">
<view class="r-name">进度</view>
<view class="r-right btn-orange" size="mini" v-if="detail.status==1">待处理</view>
<view v-else-if="detail.status==2">已处理</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">来自</view>
<view class="r-right">{{ detail.appName }}</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">状态</view>
<view class="r-right">
<text style="color:#FF2B44" v-if="detail.status==1 && (detail.level==1 || detail.level==2)">
{{ formatLevel(detail.level) }}
</text>
<text v-else>{{ formatLevel(detail.level) }}</text>
</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">创建人</view>
<view class="r-right">{{ detail.createUser?detail.createUser.userId:'' }}</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">创建时间</view>
<view class="r-right">{{ parseTime(detail.createTime,'{y}-{m}-{d} {h}:{i}') }}</view>
</view>
</view>
<view class="btn-blue" @click="handleJump">跳转详情页</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import customHeader from '@/components/customHeader.vue'
// import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { getNavBarPaddingTop } from '@/utils/system.js'
import {formatLevel} from '@/utils/status.js'
import { parseTime } from '@/utils/datetime.js'
let detail = ref({})
onLoad(async(opt) => {
try {
detail.value = JSON.parse(decodeURIComponent(opt.detail));
// console.log(detail.value);
} catch (e) {
console.error('参数解析失败', e);
}
});
// 获取导航栏高度用于内容区域padding
const navBarPaddingTop = ref(0);
onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
})
// 跳转webview
const handleJump = ()=>{
let item = detail.value;
uni.navigateTo({
url: `/pages/h5-webview/h5-webview?url=${item.mobileLink}&title=${item.subject}`
});
}
</script>
<style scoped>
.all-body {
/* #ifdef APP-PLUS */
top: 150rpx;
height: calc(100vh - 75px);
/* #endif */
/* #ifndef APP-PLUS */
top:120rpx;
height: calc(100vh - 60px);
/* #endif */
}
.scroll-h{
/* #ifdef APP-PLUS */
height:calc(100vh - 78px) !important;
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 10px) !important;
/* #endif */
}
.white-bg{
width: 750rpx;
padding: 25rpx 0 20rpx;
margin-bottom:0;
border-radius: 8px 8px 0 0;
}
.white-bg.bg-height{
/* #ifdef APP-PLUS */
height:calc(100vh - 78px) !important;
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 80px) !important;
/* #endif */
}
.report-list{
padding: 0 0 0 30rpx;
}
.report-list .r-list{
padding-right: 30rpx;
}
.report-list .r-list:first-child{
padding-bottom:10rpx;
}
.report-list .border-bottom{
width:720rpx;
}
.btn-blue {
background-color: #05A3F4;
color: #fff;
width:380rpx;
height:80rpx;
line-height: 80rpx;
margin:120rpx auto 0;
text-align: center;
border-radius: 40rpx;
}
</style>

View File

@@ -2,14 +2,18 @@
<view class="con-body">
<view class="con-bg">
<!-- 头部 -->
<customHeader ref="customHeaderRef" :title="myTitle"
:leftFlag="false" :rightFlag="false"
></customHeader>
<!-- 高度来避免头部遮挡 -->
<view class="top-height"></view>
<!-- 下拉刷新 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
:down="downOption" @down="downCallback"
:fixed="false" class="scroll-h" :style="{ paddingTop: navBarPaddingTop + 'px' }"
:fixed="false" class="scroll-h"
>
<!-- #ifdef H5 -->
<view style="height:50rpx"></view>
<!-- #endif -->
<!-- 头像 -->
<view class="head-pic">
<img class="pic-img" :src="'static/images/userinfo/icon-userinfo.png'" />
@@ -91,14 +95,24 @@
<!-- 底部加高度来避免tabbar遮挡 -->
<!-- <view class="bottom-height"></view> -->
</mescroll-uni>
</mescroll-uni>
</view>
<!-- 弹窗模板 -->
<!-- <customShowModal
:title="title"
:content="content"
:visible="visible"
@close="handleClose"
@confirm="handleLoginOut"
ref="showModel"
></customShowModal> -->
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted,getCurrentInstance } from 'vue'
import { onLoad } from '@dcloudio/uni-app';
import customHeader from '@/components/customHeader.vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { getNavBarPaddingTop } from '@/utils/system.js'
import { getUserInfo,versionCheck } from '@/api/auth.js'
@@ -106,6 +120,12 @@ import { formatIOS } from '@/utils/status.js'
import { showAlert } from '@/utils/message.js'
import { useUserStore } from '@/stores/user';
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
let myTitle = '我的';
myTitle = networkEnv.value==1?'我的 · 企业内网':'我的'
// 1.头部导航栏
const navBarPaddingTop = ref(0);
@@ -179,6 +199,7 @@ const downCallback = async (mescroll) => {
// 3.查询是否有更新的版本显示点
const getVersion = async ()=>{
let networkEnv = proxy.$NETWORK_ENV;//1-内网 2-外网
let param = {
// #ifdef APP-PLUS
verNumber:systemInfo.appWgtVersion,//当前版本号
@@ -187,11 +208,26 @@ const getVersion = async ()=>{
verNumber : systemInfo.appVersion,
// #endif
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
runEnv:networkEnv
}
let data = await versionCheck(param);
isCurrent.value = data.isCurrent;
}
// 自定义弹窗
let title = ref('');
let content = ref('');
let visible = ref(false);
const showModel=()=>{
title.value = '提示'
content.value = '是否确认退出?';
visible.value = true;
}
//关闭
const handleClose=()=>{
visible.value = false;
}
// 3.退出登录
const handleLoginOut = async ()=>{
@@ -217,19 +253,19 @@ onMounted(() => {
<style scoped>
.scroll-h{
/* #ifdef APP-PLUS */
height:calc(100vh - 50px) !important;
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 30px) !important;
/* #endif */
/* #ifdef APP-PLUS */
height:calc(100vh - 78px) !important;
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 80px) !important;
/* #endif */
}
:deep(.mescroll-upwarp){
display:none
}
.head-pic {
display: flex;
padding: 40rpx 0rpx 10rpx 30rpx;
padding: 0rpx 0rpx 10rpx 30rpx;
}
.head-pic .pic-img {

View File

@@ -26,12 +26,13 @@
</template>
<script setup>
import { ref, onMounted,getCurrentInstance } from 'vue'
import { onLoad } from '@dcloudio/uni-app';
import { ref, onMounted } from 'vue'
import customHeader from '@/components/customHeader.vue'
import { versionCheck } from '@/api/auth.js';
import { getNavBarPaddingTop } from '@/utils/system.js'
import { formatIOS } from '@/utils/status.js'
const { proxy } = getCurrentInstance();
// 初始load页面
onLoad(async(opt) => {
@@ -49,6 +50,7 @@ onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
})
let getOSVesion = async()=>{
let networkEnv = proxy.$NETWORK_ENV;//1-内网 2-外网
let systemInfo = uni.getSystemInfoSync();
let param = {
// #ifdef APP-PLUS
@@ -58,15 +60,16 @@ let getOSVesion = async()=>{
verNumber : systemInfo.appVersion,
// #endif
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
runEnv:networkEnv
}
// 当前手机版本
appVersion.value = param.appVersion;
console.log("appVersion=>",appVersion)
console.log("appVersion=>",appVersion.value)
let data = await versionCheck(param);
newVersion.value = data.verNumber;
downloadURL.value = data.downloadUrl || '';
isCurrent.value = data.isCurrent;
remark.value = data.remark //|| '全新的UI界面 优化了签到/打卡功能,整体流程更加简洁清晰 搜索功能全面升级 修复了已知BUG'
remark.value = data.remark; //|| '全新的UI界面 优化了签到/打卡功能,整体流程更加简洁清晰 搜索功能全面升级 修复了已知BUG'
}
// 下载最新版本

View File

@@ -628,4 +628,8 @@ uni-button[type='primary'][plain] {
}
/* CRM 样式 end */
/* CRM 样式 end */
.mescroll-empty .empty-tip{
color: #fff !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -86,4 +86,45 @@ export function getDate(type) {
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
}
// 日期格式化
export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}

View File

@@ -8,4 +8,13 @@ export function formatIOS(type){
return result[type];
}
// 紧急程度 1-紧急 2-急 3-一般
export function formatLevel(type){
const result = {
1:'紧急',
2:'急',
3:'一般',
}
return result[type];
}