Compare commits
8 Commits
c856fe3da6
...
d77edd97e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d77edd97e0 | ||
|
|
ad49a47367 | ||
|
|
8e8fdc02c6 | ||
|
|
711785fe8e | ||
|
|
d6053ec1aa | ||
|
|
7868a0447d | ||
|
|
d0f29a4b71 | ||
|
|
558b56420b |
@@ -7,3 +7,11 @@ export function noticeList(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户审批的待办和已办详情
|
||||
export function flowList(data) {
|
||||
return request.post({
|
||||
url: '/acc/message/flow/detail',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -106,11 +106,13 @@
|
||||
{
|
||||
"path": "pages/notice/notice",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"app-plus" : {
|
||||
"bounce" : "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
"mp-alipay":{"allowsBounceVertical":"NO"} // 取消支付宝和钉钉小程序的iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
|
||||
{
|
||||
"path": "pages/notice/waitApprove",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
@@ -141,12 +141,12 @@
|
||||
</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,12 +326,16 @@ 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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 添加常用服务
|
||||
const handleAddCommonSercice = ()=>{
|
||||
|
||||
@@ -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,10 +135,11 @@ 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);
|
||||
if(deviceId!=""){
|
||||
getBindStatus({uniqCode:deviceId}).then(res=>{
|
||||
let bindStatus = res.bindStatus
|
||||
// setTimeout(()=>{
|
||||
@@ -165,12 +164,15 @@ const selectDeviceId = async()=>{
|
||||
// },1000)
|
||||
});
|
||||
}else{
|
||||
// showAlert('读取失败:'+res2.msg)
|
||||
// setTimeout(()=>{
|
||||
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;
|
||||
|
||||
@@ -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,7 @@ const submitForm = () => {
|
||||
param.runEnv = networkEnv.value;
|
||||
|
||||
// #ifdef H5
|
||||
param.uniqCode = '7666ac20-827a-4c23-8e2e-fbbf24564fc0';//h5测试用 内网-sn123456 外网-7666ac20-827a-4c23-8e2e-fbbf24564fc0
|
||||
param.uniqCode = 'b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9';//h5测试用 内网-sn123456 外网-b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9
|
||||
let res = await login(param);
|
||||
userStore.login(res);
|
||||
uni.switchTab({ url: '/pages/home/home' })
|
||||
@@ -329,6 +330,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;
|
||||
|
||||
216
src/pages/notice/waitApprove.vue
Normal file
216
src/pages/notice/waitApprove.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<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.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: '~ 空空如也 ~' },
|
||||
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/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);
|
||||
/* #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{
|
||||
padding: 10rpx 0;
|
||||
} */
|
||||
.report-list .r-list:first-child{
|
||||
padding-bottom:10rpx;
|
||||
}
|
||||
|
||||
.report-list .r-list .r-name {
|
||||
color: #3384DF;
|
||||
font-size: 38rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.report-list .r-list .r-left text{
|
||||
font-size: 28rpx;
|
||||
color:#919191;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -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'" />
|
||||
@@ -93,7 +97,6 @@
|
||||
<!-- <view class="bottom-height"></view> -->
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗模板 -->
|
||||
<!-- <customShowModal
|
||||
:title="title"
|
||||
@@ -109,6 +112,7 @@
|
||||
<script setup>
|
||||
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'
|
||||
@@ -117,6 +121,11 @@ 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);
|
||||
@@ -245,10 +254,10 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
.scroll-h{
|
||||
/* #ifdef APP-PLUS */
|
||||
height:calc(100vh - 50px) !important;
|
||||
height:calc(100vh - 78px) !important;
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 30px) !important;
|
||||
height: calc(100vh - 80px) !important;
|
||||
/* #endif */
|
||||
}
|
||||
:deep(.mescroll-upwarp){
|
||||
@@ -256,7 +265,7 @@ onMounted(() => {
|
||||
}
|
||||
.head-pic {
|
||||
display: flex;
|
||||
padding: 40rpx 0rpx 10rpx 30rpx;
|
||||
padding: 0rpx 0rpx 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.head-pic .pic-img {
|
||||
|
||||
@@ -87,3 +87,44 @@ export function getDate(type) {
|
||||
|
||||
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
|
||||
}
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user