优化导航栏

This commit is contained in:
yangzhq68909 2025-05-16 16:03:56 +08:00
parent 096fa96eb7
commit 3c54607ab7
22 changed files with 401 additions and 538 deletions

View File

@ -12,7 +12,7 @@ export function queryZwmcAndExaApi(username : string) {
}
/*新增请假申请*/
export function addApi(config) {
export function addApi(config : Object) {
return http({
url: '/CxcQxj/cxcQxj/add',
method: 'POST',

View File

@ -1,6 +1,6 @@
import { http } from '@/utils/http';
export function getListApi(config) { //
export function getListApi(config : Object) { //
return http({
url: '/zhgl_zbgl/zhglZbglZbb/list',
method: 'GET',

View File

@ -1,6 +1,6 @@
import { http } from '@/utils/http';
export function queryDocumentApi(config) { //
export function queryDocumentApi(config : Object) { //
return http({
url: '/cxcoagwfb/cxcOaGwfb/bpmlist',
method: 'GET',
@ -8,7 +8,7 @@ export function queryDocumentApi(config) { // 公文列表
})
}
export function queryNoticeApi(config) { //
export function queryNoticeApi(config : Object) { //
return http({
url: '/cxctz/cxcTz/list',
method: 'GET',
@ -16,7 +16,7 @@ export function queryNoticeApi(config) { // 公告
})
}
export function querySuperiorSystemApi(config) { //
export function querySuperiorSystemApi(config : Object) { //
return http({
url: '/cxcjyglsjzdgl/cxcJyglSjzdgl/zslist',
method: 'GET',
@ -24,7 +24,7 @@ export function querySuperiorSystemApi(config) { // 上级制度
})
}
export function queryFactorySystemApi(config) { //
export function queryFactorySystemApi(config : Object) { //
return http({
url: '/cxczd/cxcZdgl/list',
method: 'GET',
@ -32,7 +32,7 @@ export function queryFactorySystemApi(config) { // 厂级制度
})
}
export function queryRegulationsApi(config) { //
export function queryRegulationsApi(config : Object) { //
return http({
url: '/cxcoaflgf/cxcOaFlgf/zslist',
method: 'GET',

View File

@ -8,7 +8,7 @@ export function getListApi(orgCode : string) {
})
}
export function getJobDesIdByDepAndName(config) {
export function getJobDesIdByDepAndName(config : Object) {
return http({
url: '/sjgl.tynr/cxcSjJobdescription/queryByNameDep',
method: 'GET',
@ -16,7 +16,7 @@ export function getJobDesIdByDepAndName(config) {
})
}
export function getPathByInsflagQuote(config) {
export function getPathByInsflagQuote(config : Object) {
return http({
url: '/sjgl.scnr/cxcSjSc/getPathByInsflagQuote',
method: 'GET',

View File

@ -1,32 +0,0 @@
import { http } from '@/utils/http';
export function getListApi(orgCode : string) {
return http({
url: '/sjgl.scnr/cxcSjSc/queryTreeData',
method: 'GET',
data: { orgCode }
})
}
export function taskListApi(config : Object) { //
return http({
url: '/act/task/list',
method: 'GET',
data: config
})
}
export function taskHistoryListApi(config : Object) { //
return http({
url: '/act/task/taskHistoryList',
method: 'GET',
data: config
})
}
export function claim(config : Object) {
return http({
url: '/act/task/claim',
method: 'PUT',
data: config
})
}

37
src/api/process/index.ts Normal file
View File

@ -0,0 +1,37 @@
import { http } from '@/utils/http';
/*我的任务列表*/
export function taskListApi(config : Object) {
return http({
url: '/act/task/list',
method: 'GET',
data: config
})
}
/*历史任务列表*/
export function taskHistoryListApi(config : Object) {
return http({
url: '/act/task/taskHistoryList',
method: 'GET',
data: config
})
}
/*签收*/
export function claim(config : Object) {
return http({
url: '/act/task/claim',
method: 'PUT',
data: config
})
}
/*发起流程*/
export function startMutilProcessApi(config : Object) { //
return http({
url: '/process/extActProcess/startMutilProcess',
method: 'POST',
data: config
})
}

View File

@ -1,192 +1,191 @@
<template>
<view class="pageLayout">
<view
v-if="navbarShow"
:class="{ pageNav: true, transparent: navBgTransparent, fixed: navFixed }"
:style="{ height: `${statusBarHeight + navHeight}px` }"
>
<view class="statusBar" :style="{ height: `${statusBarHeight}px` }"></view>
<wd-navbar
:bordered="!navBgTransparent"
:title="navTitle"
:leftText="navLeftText"
:leftArrow="navLeftArrow"
:rightText="navRightText"
@clickLeft="handleClickLeft"
@clickRight="handleClickRight"
custom-class="nav"
>
<template v-if="$slots.navRight" #right>
<slot name="navRight"></slot>
</template>
</wd-navbar>
</view>
<view class="pageContent">
<slot></slot>
</view>
<view class="tabbar"></view>
<wd-toast></wd-toast>
<wd-message-box></wd-message-box>
<wd-notify></wd-notify>
</view>
<view :class="['pageLayout', { 'gray': appStore.isGray == 1 }]">
<view v-if="navbarShow" :class="{ pageNav: true, transparent: navBgTransparent, fixed: navFixed }"
:style="{ height: `${statusBarHeight + navHeight}px` }">
<view class="statusBar" :style="{ height: `${statusBarHeight}px` }"></view>
<wd-navbar :bordered="!navBgTransparent" :title="navTitle" :leftText="navLeftText" :leftArrow="navLeftArrow"
:rightText="navRightText" @clickLeft="handleClickLeft" @clickRight="handleClickRight"
custom-class="nav">
<template v-if="$slots.navRight" #right>
<slot name="navRight"></slot>
</template>
</wd-navbar>
</view>
<view class="pageContent">
<slot></slot>
</view>
<view class="tabbar"></view>
<wd-toast></wd-toast>
<wd-message-box></wd-message-box>
<wd-notify></wd-notify>
</view>
</template>
<script setup lang="ts">
import { useSlots } from 'vue'
import { useRouter } from '@/plugin/uni-mini-router'
import { useParamsStore } from '@/store/page-params'
import { useSlots } from 'vue'
import { useRouter } from '@/plugin/uni-mini-router'
import { useParamsStore } from '@/store/page-params'
import { useAppStore } from '@/store'
defineOptions({
name: 'pageLayout',
options: {
// apply-shared.()
// shared.()
styleIsolation: 'shared',
},
})
const paramsStore = useParamsStore()
const router = useRouter()
const props = defineProps({
backRouteName: {
type: String,
default: '',
},
backRoutePath: {
type: String,
default: '',
},
routeParams: {
type: Object,
default: () => {},
},
routeQuery: {
type: Object,
default: () => {},
},
routeMethod: {
type: String,
default: 'replace',
},
navbarShow: {
type: Boolean,
default: true,
},
navBgTransparent: {
type: Boolean,
default: false,
},
navFixed: {
type: Boolean,
default: false,
},
type: {
type: String,
default: 'page', //'page','popup'
},
navTitle: {
type: String,
default: '',
},
navLeftText: {
type: String,
default: '返回',
},
navLeftArrow: {
typeof: Boolean,
default: true,
},
navRightText: {
typeof: String,
default: '',
},
})
const slot = useSlots()
const globalData = getApp().globalData
const { systemInfo, navHeight } = globalData
const { statusBarHeight } = systemInfo
const emit = defineEmits(['navBack', 'navRight'])
const handleClickLeft = () => {
emit('navBack')
//
if (props.type === 'page') {
const pages = getCurrentPages()
if (props.backRouteName || props.backRoutePath) {
const prevPage = pages[pages.length - 2]
if (prevPage) {
const route = prevPage.route
const name = route.split('/').pop()
if (route === props.backRoutePath || props.backRouteName === name) {
router.back()
clearPageParamsCache()
return
}
}
if (props.backRouteName) {
router[props.routeMethod]({ name: props.backRouteName, params: props.routeParams })
clearPageParamsCache()
} else {
router[props.routeMethod]({ name: props.backRoutePath, query: props.routeQuery })
clearPageParamsCache()
}
} else {
router.back()
clearPageParamsCache()
}
}
}
const clearPageParamsCache = () => {
//
const pages = getCurrentPages()
const curPage = pages[pages.length - 1]
const curRoute = curPage.route
const name = curRoute.split('/').pop()
paramsStore.clearPageParams(name)
}
const handleClickRight = () => {
emit('navRight')
}
defineOptions({
name: 'pageLayout',
options: {
// apply-shared.()
// shared.()
styleIsolation: 'shared',
},
})
const appStore = useAppStore()
const paramsStore = useParamsStore()
const router = useRouter()
const props = defineProps({
backRouteName: {
type: String,
default: '',
},
backRoutePath: {
type: String,
default: '',
},
routeParams: {
type: Object,
default: () => { },
},
routeQuery: {
type: Object,
default: () => { },
},
routeMethod: {
type: String,
default: 'replace',
},
navbarShow: {
type: Boolean,
default: true,
},
navBgTransparent: {
type: Boolean,
default: false,
},
navFixed: {
type: Boolean,
default: false,
},
type: {
type: String,
default: 'page', //'page','popup'
},
navTitle: {
type: String,
default: '',
},
navLeftText: {
type: String,
default: '返回',
},
navLeftArrow: {
typeof: Boolean,
default: true,
},
navRightText: {
typeof: String,
default: '',
},
})
const slot = useSlots()
const globalData = getApp().globalData
const { systemInfo, navHeight } = globalData
const { statusBarHeight } = systemInfo
const emit = defineEmits(['navBack', 'navRight'])
const handleClickLeft = () => {
emit('navBack')
//
if (props.type === 'page') {
const pages = getCurrentPages()
if (props.backRouteName || props.backRoutePath) {
const prevPage = pages[pages.length - 2]
if (prevPage) {
const route = prevPage.route
const name = route.split('/').pop()
if (route === props.backRoutePath || props.backRouteName === name) {
router.back()
clearPageParamsCache()
return
}
}
if (props.backRouteName) {
router[props.routeMethod]({ name: props.backRouteName, params: props.routeParams })
clearPageParamsCache()
} else {
router[props.routeMethod]({ name: props.backRoutePath, query: props.routeQuery })
clearPageParamsCache()
}
} else {
router.back()
clearPageParamsCache()
}
}
}
const clearPageParamsCache = () => {
//
const pages = getCurrentPages()
const curPage = pages[pages.length - 1]
const curRoute = curPage.route
const name = curRoute.split('/').pop()
paramsStore.clearPageParams(name)
}
const handleClickRight = () => {
emit('navRight')
}
</script>
<style lang="scss" scoped>
.pageLayout {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
.pageNav {
background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
&.transparent {
background-image: none;
}
&.fixed {
position: fixed;
top: 0;
left: 0;
width: 100%;
}
.statusBar {
width: 100%;
height: 0;
}
:deep(.wd-navbar) {
background-color: transparent;
--wot-navbar-title-font-weight: 400;
--wot-navbar-arrow-size: 18px;
--wot-navbar-desc-font-size: 14px;
--wot-navbar-title-font-size: 16px;
}
}
.pageContent {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
background-color: #f1f1f1;
}
.tabbar {
/* #ifdef H5 */
height: var(--window-bottom);
/* #endif */
}
}
.pageLayout {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
.pageNav {
background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
&.transparent {
background-image: none;
}
&.fixed {
position: fixed;
top: 0;
left: 0;
width: 100%;
}
.statusBar {
width: 100%;
height: 0;
}
:deep(.wd-navbar) {
background-color: transparent;
--wot-navbar-title-font-weight: 400;
--wot-navbar-arrow-size: 18px;
--wot-navbar-desc-font-size: 14px;
--wot-navbar-title-font-size: 16px;
}
}
.pageContent {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
background-color: #f1f1f1;
}
.tabbar {
/* #ifdef H5 */
height: var(--window-bottom);
/* #endif */
}
}
</style>

View File

@ -9,33 +9,30 @@
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<PageLayout navTitle="编辑资料" backRouteName="people" routeMethod="pushTab">
<wd-form ref="form" :model="model">
<wd-cell-group border>
<wd-cell title="头像" title-width="100px">
<avatar v-model="model.avatar"></avatar>
</wd-cell>
<wd-input label="统一身份认证" prop="username" label-width="100px" v-model="model.username"
:readonly="true" />
<wd-input label="姓名" prop="realname" label-width="100px" v-model="model.realname"
:readonly="true" />
<wd-input label="劳动合同号" prop="workno" label-width="100px" v-model="model.workno" :readonly="true" />
<wd-select-picker label="单位" type="radio" v-model="model.orgCode" :columns="columns" title="切换登录单位"
:safe-area-inset-bottom="false" label-width="100px"></wd-select-picker>
<!-- <wd-select-picker label="性别" type="radio" v-model="model.sex" :columns="columns" title="请选择性别"
<PageLayout navTitle="编辑资料" backRouteName="people" routeMethod="pushTab">
<wd-form ref="form" :model="model">
<wd-cell-group border>
<wd-cell title="头像" title-width="100px">
<avatar v-model="model.avatar"></avatar>
</wd-cell>
<wd-input label="统一身份认证" prop="username" label-width="100px" v-model="model.username"
:readonly="true" />
<wd-input label="姓名" prop="realname" label-width="100px" v-model="model.realname" :readonly="true" />
<wd-input label="劳动合同号" prop="workno" label-width="100px" v-model="model.workno" :readonly="true" />
<wd-select-picker label="单位" type="radio" v-model="model.orgCode" :columns="columns" title="切换登录单位"
:safe-area-inset-bottom="false" label-width="100px"></wd-select-picker>
<!-- <wd-select-picker label="性别" type="radio" v-model="model.sex" :columns="columns" title="请选择性别"
:safe-area-inset-bottom="false"></wd-select-picker> -->
<wd-input label="手机号" prop="phone" clearable label-width="100px" v-model="model.phone"
placeholder="请输入手机号" :rules="[{ validator: rules.phone }]" />
<wd-input label="邮箱" prop="email" clearable label-width="100px" v-model="model.email"
placeholder="请输入邮箱" :rules="[{ validator: rules.email }]" />
</wd-cell-group>
<view class="footer p5">
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
</view>
</wd-form>
</PageLayout>
</view>
<wd-input label="手机号" prop="phone" clearable label-width="100px" v-model="model.phone"
placeholder="请输入手机号" :rules="[{ validator: rules.phone }]" />
<wd-input label="邮箱" prop="email" clearable label-width="100px" v-model="model.email"
placeholder="请输入邮箱" :rules="[{ validator: rules.email }]" />
</wd-cell-group>
<view class="footer p5">
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
</view>
</wd-form>
</PageLayout>
</template>
<script lang="ts" setup>
@ -48,7 +45,6 @@
import { getFileAccessHttpUrl } from '@/common/uitls'
import { onLoad } from '@dcloudio/uni-app'
import { queryDepsByUserIdApi } from '@/api/system/department'
import { useAppStore } from '@/store'
defineOptions({
name: 'chatList',
@ -59,7 +55,6 @@
const toast = useToast()
const router = useRouter()
const userStore = useUserStore()
const appStore = useAppStore()
const columns = ref([])
const model = reactive({
avatar: getFileAccessHttpUrl(userStore.userInfo.avatar),

View File

@ -8,14 +8,10 @@
}
</route>
<template>
<view :class="{'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow title="请假申请"
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="请假申请">
<wd-form ref="form" :model="model">
<wd-cell-group border>
<!-- <wd-input label="职工姓名" prop="username" v-model="userStore.userInfo.realname" readonly
<wd-input label="职工姓名" prop="username" v-model="userStore.userInfo.realname" readonly
:rules="[{ required: true, message: '请输入职工姓名' }]" />
<wd-input label="工作单位" prop="sysOrgCode" v-model="userStore.userInfo.department" readonly
:rules="[{ required: true, message: '请输入工作单位' }]" />
@ -36,7 +32,7 @@
<wd-input label="目的地" prop="destination" v-model="model.destination"
:rules="[{ required: true, message: '请输入目的地' }]" />
<wd-input label="请假事由" prop="reason" v-model="model.reason"
:rules="[{ required: true, message: '请输入请假事由' }]" /> -->
:rules="[{ required: true, message: '请输入请假事由' }]" />
<wd-cell title="附件" title-width="100px" prop="path">
<wd-upload v-model:file-list="model.path" :action="uploadUrl" multiple></wd-upload>
</wd-cell>
@ -45,13 +41,13 @@
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
</view>
</wd-form>
<wd-message-box />
</view>
</PageLayout>
</template>
<script setup>
import {
useMessage
useMessage,
useToast
} from 'wot-design-uni'
import {
useAppStore
@ -75,6 +71,7 @@
} from '@/utils/index'
const message = useMessage()
const toast = useToast()
const appStore = useAppStore();
const userStore = useUserStore();
const model = reactive({
@ -105,9 +102,6 @@
const resDate = ref('')
const uploadUrl = ref(getEnvBaseUrl() + '/sys/common/upload?appPath=职工请假/' + userStore.userInfo.department + '/' +
userStore.userInfo.realname)
const handleClickLeft = () => {
uni.navigateBack();
};
const columnChange = ({
selectedItem,
resolve,
@ -162,7 +156,6 @@
errors
}) => {
if (valid) {
console.log('---1', model)
const submitData = {
...model,
type: model.type[model.type.length - 1], //
@ -174,7 +167,6 @@
return response.message;
}).join(',')
}
console.log('---2', submitData)
message
.confirm({
msg: '确认提交请假申请?',
@ -182,7 +174,12 @@
})
.then(() => {
addApi(submitData).then(res => {
console.log('----', res.message)
console.log('----', res)
// if (res.success) {
// startMutilProcess(res.message)
// } else {
toast.warning(res.message)
// }
})
})
.catch(() => {})

View File

@ -8,7 +8,7 @@
}
</route>
<template>
<PageLayout :navbarShow="false" :class="{ 'gray': appStore.isGray == 1 }">
<PageLayout :navbarShow="false">
<view class="nav">
<view class="nav_box">
<view class="weather_calender">

View File

@ -8,11 +8,7 @@
}
</route>
<template>
<view :class="{'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow title="干部值班"
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="干部值班">
<wd-datetime-picker type="year-month" v-model="dataValue" label="年月" @confirm="getList" />
<wd-table :data="dataSource">
<wd-table-col prop="date" label="日期" width="60" align="center"></wd-table-col>
@ -20,23 +16,15 @@
<wd-table-col prop="zbld_dictText" label="值班领导" width="73" align="center"></wd-table-col>
<wd-table-col prop="zbgbrealname" label="值班干部" width="153" align="center"></wd-table-col>
</wd-table>
</view>
</PageLayout>
</template>
<script setup>
import {
useAppStore
} from '@/store';
import {
getListApi
} from '@/api/pages/duty'
const appStore = useAppStore();
const dataValue = ref(Date.now())
const dataSource = ref([])
const handleClickLeft = () => {
uni.navigateBack();
};
const getList = () => {
const date = new Date(dataValue.value);
const year = date.getFullYear();

View File

@ -10,7 +10,7 @@
<template>
<PageLayout :navbarShow="false">
<view :class="['page-container', { 'gray': appStore.isGray == 1 }]">
<view class="page-container">
<view class="text-center">
<image src="@/static/sinopec.png" mode="aspectFit" class="logo"></image>
<view class="enter-area">
@ -53,7 +53,6 @@
<script lang="ts" setup>
import { useToast } from 'wot-design-uni'
import { ref } from 'vue'
import { useAppStore } from '@/store'
import { useUserStore } from '@/store/user'
import { http } from '@/utils/http'
import { HOME_PAGE } from '@/common/constants'
@ -76,7 +75,6 @@
/**h5系统信息中没有appWgtVersion值*/
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
const toast = useToast()
const appStore = useAppStore()
const userStore = useUserStore()
const handleChangePassword = () => {
showPassword.value = !showPassword.value
@ -106,8 +104,8 @@
loading.value = true
/*生产环境 begin */
// loginApi({ username: un, password: pw })
/*开发环境 begin */
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
/*开发环境 begin */
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
.then((res : any) => {
if (res.success) {
const { result } = res

View File

@ -8,68 +8,53 @@
}
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="在线预览">
<view class="serveBox">
<view class="title">
<view class="dot"></view>
<wd-text text="文件预览"></wd-text>
</view>
<view class="f-col">
<view v-if="ifH5">
<!-- 在线预览 by -->
<wd-text color="#1890ff" lines=1 style="font-size: 40rpx;padding-left: 25rpx;padding-top: 25rpx;" decoration="underline" @click="onlinePreview(`/pages/onlinePreview/onlinePreviewH5?data=${JSON.stringify(item)}`)"
v-for="item,i in detailArr" :text="captureText(item)">
</wd-text>
</view>
<view v-else>
<!-- 在线预览 by -->
<wd-text color="#1890ff" lines=1 style="font-size: 40rpx;padding-left: 25rpx;padding-top: 25rpx;" decoration="underline" @click="onlinePreview(`/pages/onlinePreview/onlinePreview?data=${JSON.stringify(item)}`)"
v-for="item,i in detailArr" :text="captureText(item)">
</wd-text>
</view>
<view v-if="ifH5">
<!-- 在线预览 by -->
<wd-text color="#1890ff" lines=1 style="font-size: 40rpx;padding-left: 25rpx;padding-top: 25rpx;"
decoration="underline"
@click="onlinePreview(`/pages/onlinePreview/onlinePreviewH5?data=${JSON.stringify(item)}`)"
v-for="item,i in detailArr" :text="captureText(item)">
</wd-text>
</view>
<view v-else>
<!-- 在线预览 by -->
<wd-text color="#1890ff" lines=1 style="font-size: 40rpx;padding-left: 25rpx;padding-top: 25rpx;"
decoration="underline"
@click="onlinePreview(`/pages/onlinePreview/onlinePreview?data=${JSON.stringify(item)}`)"
v-for="item,i in detailArr" :text="captureText(item)">
</wd-text>
</view>
</view>
</view>
</PageLayout>
</template>
<script setup>
import {
useAppStore
} from '@/store'
import {
ref
} from 'vue'
import {
onLoad,
onShow
onLoad
} from '@dcloudio/uni-app';
const appStore = useAppStore();
const detail = ref({})
const detailArr = ref([])
//h5 by
//h5 by
var ifH5 = false;
const onlinePreview = (url)=>{ //线 by
const onlinePreview = (url) => { //线 by
uni.navigateTo({
url:url
url: url
})
}
const handleClickLeft = () => {
uni.navigateBack()
}
const captureText = (text)=>{ //
const match = text.match(/\/([^_]+)(?=_)/);
console.log(match)
return match ? match[1] : '';
const captureText = (text) => { //
const match = text.match(/\/([^_]+)(?=_)/);
console.log(match)
return match ? match[1] : '';
}
onLoad((options) => {
@ -79,19 +64,12 @@
ifH5 = true;
//#endif
//
if(detailArr.value&&detailArr.value.length==1){
if (detailArr.value && detailArr.value.length == 1) {
let url = '/pages/onlinePreview/onlinePreview';
if(ifH5) url = '/pages/onlinePreview/onlinePreviewH5'
onlinePreview(url+`?data=${JSON.stringify(options.data)}`);
if (ifH5) url = '/pages/onlinePreview/onlinePreviewH5'
onlinePreview(url + `?data=${JSON.stringify(options.data)}`);
}
})
onShow (()=>{
// if(detailArr.value&&detailArr.value.length==1){
// uni.navigateBack()
// }
})
</script>
<style>
@ -136,6 +114,7 @@
.serveBox {
margin-bottom: 32upx;
background-color: #fff;
.title {
display: flex;
align-items: center;

View File

@ -8,19 +8,12 @@
}
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="在线预览">
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
</view>
</PageLayout>
</template>
<script setup>
import {
useAppStore
} from '@/store'
import {
onLoad
} from '@dcloudio/uni-app';
@ -28,19 +21,15 @@
import {
getEnvBaseUrl
} from '@/utils/index'
const appStore = useAppStore();
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
var fileUrl = "";
const handleClickLeft = () => {
uni.navigateBack()
}
onLoad((options) => {
let base64 = new Base64();
var url = baseUrl + JSON.parse(options.data);
console.log('-----111',url)
console.log('-----111', url)
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(url))
console.log('-----222',fileUrl)
console.log('-----222', fileUrl)
})
</script>

View File

@ -8,41 +8,30 @@
}
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="在线预览">
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
</view>
</PageLayout>
</template>
<script setup>
import {
useAppStore
} from '@/store'
import {
onLoad
} from '@dcloudio/uni-app';
import {
getEnvBaseUrl
} from '@/utils/index'
const appStore = useAppStore();
import {
Base64
} from 'js-base64'
var fileUrl = "";
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
const handleClickLeft = () => {
uni.navigateBack()
}
onLoad((options) => {
console.log(options)
let url = JSON.parse(options.data)
url = baseUrl + url;
console.log(url)
fileUrl ='https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
console.log(fileUrl)
})
</script>

View File

@ -8,11 +8,7 @@
}
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="制度详情">
<view class="container">
<wd-card title="制度">
<view @click="onlinePreview(`/pages/onlinePreview/detail?data=${dataSource.sszd}`)">
@ -25,7 +21,7 @@
</view>
</wd-card>
</view>
</view>
</PageLayout>
</template>
<script setup>
@ -46,10 +42,6 @@
const dataSource = ref({})
var ifH5 = false;
const handleClickLeft = () => {
uni.navigateBack()
}
const onlinePreview = (url) => {
uni.navigateTo({
url

View File

@ -9,20 +9,10 @@
</route>
<template>
<view :class="{'gray': appStore.isGray == 1 }">
<view class="fixed-header">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
<template #title>
<view class="search-box">
<wd-search v-model="keyword" hide-cancel placeholder-left placeholder="搜索" shape="round"
@change="onChange"></wd-search>
</view>
</template>
</wd-navbar>
</view>
<PageLayout :navTitle="type">
<view class="container">
<wd-search v-model="keyword" hide-cancel placeholder-left placeholder="搜索" shape="round" @change="onChange"
class="search-box"></wd-search>
<!-- 加载提示 -->
<wd-loading v-if="loading && pageNo === 1" class="loading-tip">加载中...</wd-loading>
<!-- 列表内容 -->
@ -43,7 +33,7 @@
<wd-loading size="16px">正在加载...</wd-loading>
</view>
</view>
</view>
</PageLayout>
</template>
<script setup>
@ -59,10 +49,6 @@
queryFactorySystemApi,
queryRegulationsApi
} from '@/api/pages/file'
import {
useAppStore
} from '@/store'
const appStore = useAppStore()
let pageNo = 1
let pageSize = 10
let loading = false
@ -105,7 +91,8 @@
fwbt: formatSearchkey()
}).then((res) => {
if (res.success) {
list.value = [...list.value, ...formatObj(res.result.records, 'fwbt', 'fwtime', 'wjlb', 'wjbt')]
list.value = [...list.value, ...formatObj(res.result.records, 'fwbt', 'fwtime', 'wjlb',
'wjbt')]
}
loading = false
}).catch((err) => {
@ -137,7 +124,8 @@
zdmc: formatSearchkey()
}).then((res) => {
if (res.success) {
list.value = [...list.value, ...formatObj(res.result.records, 'zdmc', 'updateTime2', 'zbbm', 'sszd')]
list.value = [...list.value, ...formatObj(res.result.records, 'zdmc', 'updateTime2', 'zbbm',
'sszd')]
}
loading = false
}).catch((err) => {
@ -153,7 +141,8 @@
zdmc: formatSearchkey()
}).then((res) => {
if (res.success) {
list.value = [...list.value, ...formatObj(res.result.records, 'zdmc', 'fatime', 'zbbm_dictText', 'id')]
list.value = [...list.value, ...formatObj(res.result.records, 'zdmc', 'fatime',
'zbbm_dictText', 'id')]
}
loading = false
}).catch((err) => {
@ -169,7 +158,8 @@
flfgmc: formatSearchkey()
}).then((res) => {
if (res.success) {
list.value = [...list.value, ...formatObj(res.result.records, 'flfgmc', 'updateTime2', 'fabubumen', 'mingcheng')]
list.value = [...list.value, ...formatObj(res.result.records, 'flfgmc', 'updateTime2',
'fabubumen', 'mingcheng')]
}
loading = false
}).catch((err) => {
@ -229,42 +219,33 @@
</script>
<style lang="scss">
/* 固定顶部区域 */
.fixed-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
}
.container {
padding: calc(60px + var(--status-bar-height, 0)) 5px 0 5px;
min-height: 100vh;
background-color: #f7f7f7;
}
.search-box {
display: flex;
height: 100%;
align-items: center;
width: 100%;
padding: 0 10px;
margin: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
border-radius: 20px;
:deep() {
.wd-search {
background: rgba(255, 255, 255, 0.2);
border-radius: 18px;
width: 100%;
// If you want to style the inner input
::v-deep .wd-search__content {
background-color: #fff;
.wd-search__input {
color: #fff;
}
.wd-search__placeholder {
color: rgba(255, 255, 255, 0.7);
}
.wd-search__input {
font-size: 14px;
color: #333;
}
.wd-search__placeholder {
color: #999;
}
}
// If you want to style the search icon
::v-deep .wd-search__search-icon {
color: #999;
}
}

View File

@ -8,19 +8,14 @@
}
</route>
<template>
<view :class="{'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow title="三册查看"
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="三册查看">
<wd-col-picker label="选择目录" v-model="selectedValue" :columns="dataSource" :column-change="columnChange"
@confirm="handleConfirm" :display-format="displayFormat"></wd-col-picker>
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" v-if="fileUrl" />
<view v-else @click="onlinePreview(item.path)" v-for="(item, i) in fileUrl2" style="padding: 15px 0 0 0">
<wd-card :title="item.name"></wd-card>
</view>
</view>
</PageLayout>
</template>
<script setup>
@ -30,9 +25,6 @@
import {
onLoad
} from '@dcloudio/uni-app'
import {
useAppStore
} from '@/store';
import {
useUserStore
} from '@/store/user';
@ -47,7 +39,6 @@
getEnvBaseUrl
} from '@/utils/index'
const appStore = useAppStore();
const data = ref([])
const dataSource = ref([])
const selectedValue = ref([]);
@ -56,9 +47,6 @@
const url = ref('')
const fileUrl = ref('')
const fileUrl2 = ref([])
const handleClickLeft = () => {
uni.navigateBack();
};
const columnChange = ({
selectedItem,
resolve,

View File

@ -8,27 +8,19 @@
}
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="流程审批导航">
<wd-tabs v-model="tab" swipeable color="#39b54a" autoLineWidth>
<wd-tab title="我的任务">
<myTask></myTask>
</wd-tab>
<wd-tab title="我的任务">
<myTask></myTask>
</wd-tab>
<wd-tab title="历史任务">
<view class="content">内容1</view>
<view class="content">内容1</view>
</wd-tab>
</wd-tabs>
</view>
</PageLayout>
</template>
<script setup lang="ts">
import {
useAppStore
} from '@/store'
import {
ref
} from 'vue'
@ -37,17 +29,11 @@
onShow
} from '@dcloudio/uni-app';
import myTask from './components/myTask.vue'
const appStore = useAppStore();
const tab = ref(0)
const handleClickLeft = () => {
uni.navigateBack()
}
</script>
<style scoped lang="scss">
::v-deep .wd-tabs__line{
::v-deep .wd-tabs__line {
background: #39b54a;
}
</style>

View File

@ -55,7 +55,7 @@
</template>
<script setup lang="ts">
import { taskListApi,claim } from '@/api/process/api'
import { taskListApi,claim } from '@/api/process'
import {
ref
} from 'vue'

View File

@ -8,22 +8,18 @@
}
</route>
<template>
<view :class="{ 'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<PageLayout navTitle="任务处理">
<wd-tabs v-model="tab" swipeable color="#39b54a" autoLineWidth>
<wd-tab title="单据">
</wd-tab>
<wd-tab title="单据">
</wd-tab>
<wd-tab title="任务处理">
<view class="content">内容2</view>
<view class="content">内容2</view>
</wd-tab>
<wd-tab title="流程图">
<view class="content">内容3</view>
</wd-tab>
</wd-tabs>
</view>
</PageLayout>
</template>
<script setup lang="ts">
@ -31,32 +27,17 @@
ref
} from 'vue'
import {
onLoad,
onShow,
onReachBottom,
onPullDownRefresh
onLoad
} from '@dcloudio/uni-app';
import { useToast, useMessage } from 'wot-design-uni'
import {
useAppStore
} from '@/store'
const appStore = useAppStore();
const tab = ref(0)
const handleClickLeft = () => {
uni.navigateBack()
}
onLoad((options) => {
console.log(JSON.parse(options.data))
})
</script>
<style lang="scss" scoped>
::v-deep .wd-tabs__line{
::v-deep .wd-tabs__line {
background: #39b54a;
}
</style>

View File

@ -10,46 +10,44 @@
<template>
<PageLayout :navbarShow="false">
<view :class="{'gray': appStore.isGray == 1 }">
<view class="avatar-area">
<wd-img width="100" height="100" :round="true" :radius="50"
:src="getFileAccessHttpUrl(userStore.userInfo.avatar)" @click="ChooseImage"></wd-img>
</view>
<view class="info-area shadow-warp mb-5">
<view class="user">
<wd-text custom-class="title" :text="userStore.userInfo.realname"></wd-text>
<view class="tag">
<view class="cuIcon-people mr-1"></view>
<wd-text text="用户"></wd-text>
</view>
</view>
<view class="department">
<wd-text custom-class="title" :text="userStore.userInfo.department"></wd-text>
<view class="tag">
<view class="cuIcon-group mr-1"></view>
<wd-text text="单位"></wd-text>
</view>
</view>
<view class="job">
<wd-text custom-class="title" :text="post"></wd-text>
<view class="tag">
<view class="cuIcon-news mr-1"></view>
<wd-text text="职务"></wd-text>
</view>
</view>
</view>
<scroll-view scroll-y>
<wd-cell-group custom-class="shadow-warp" border clickable>
<template v-for="(item, index) in dataSource" :key="index">
<wd-cell :title="item.title" is-link @click="handleCell(item)">
<template #icon>
<view :class="item.class" class="mr-2"></view>
</template>
</wd-cell>
</template>
</wd-cell-group>
</scroll-view>
<view class="avatar-area">
<wd-img width="100" height="100" :round="true" :radius="50"
:src="getFileAccessHttpUrl(userStore.userInfo.avatar)" @click="ChooseImage"></wd-img>
</view>
<view class="info-area shadow-warp mb-5">
<view class="user">
<wd-text custom-class="title" :text="userStore.userInfo.realname"></wd-text>
<view class="tag">
<view class="cuIcon-people mr-1"></view>
<wd-text text="用户"></wd-text>
</view>
</view>
<view class="department">
<wd-text custom-class="title" :text="userStore.userInfo.department"></wd-text>
<view class="tag">
<view class="cuIcon-group mr-1"></view>
<wd-text text="单位"></wd-text>
</view>
</view>
<view class="job">
<wd-text custom-class="title" :text="post"></wd-text>
<view class="tag">
<view class="cuIcon-news mr-1"></view>
<wd-text text="职务"></wd-text>
</view>
</view>
</view>
<scroll-view scroll-y>
<wd-cell-group custom-class="shadow-warp" border clickable>
<template v-for="(item, index) in dataSource" :key="index">
<wd-cell :title="item.title" is-link @click="handleCell(item)">
<template #icon>
<view :class="item.class" class="mr-2"></view>
</template>
</wd-cell>
</template>
</wd-cell-group>
</scroll-view>
</PageLayout>
</template>
@ -64,10 +62,8 @@
import useUpload from '@/hooks/useUpload'
import { getEnvBaseUrl } from '@/utils/index'
import { queryPostByUserIdApi, editUserApi } from '@/api/system/user'
import { useAppStore } from '@/store'
const userStore = useUserStore()
const appStore = useAppStore()
const toast = useToast()
const router = useRouter()
const message = useMessage()