分包处理
This commit is contained in:
parent
5ca961e10e
commit
f397dc0f5f
8
src/pages-humanResource/absence/index.vue
Normal file
8
src/pages-humanResource/absence/index.vue
Normal file
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
165
src/pages.json
165
src/pages.json
@ -58,13 +58,6 @@
|
||||
"navigationBarTitleText": "登录页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/about/about",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/annotation/annotationDetail",
|
||||
"type": "page",
|
||||
@ -83,51 +76,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/demo/demo",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationBarTitleText": "demo演示",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/demo/form",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationBarTitleText": "表单",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/demo/indexBar",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "通讯录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/demo/selectPicker",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationBarTitleText": "单选多选",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/demo/tree",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationBarTitleText": "树示例",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"type": "page",
|
||||
@ -217,51 +165,6 @@
|
||||
"navigationBarTitleText": "工作台",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/humanResources/absence/apply",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "请假申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/integrated/duty/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "干部值班"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/operate/file/detail",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "厂级制度详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/operate/file/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公文/通知公告/法律法规/上级制度/厂级制度"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/operate/sc/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "三册"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
@ -406,6 +309,74 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages-operate",
|
||||
"pages": [
|
||||
{
|
||||
"path": "file/detail",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "厂级制度详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "file/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公文/通知公告/法律法规/上级制度/厂级制度"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "sc/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "三册"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages-humanResource",
|
||||
"pages": [
|
||||
{
|
||||
"path": "absence/apply",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "请假申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "absence/index",
|
||||
"type": "page"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages-integrated",
|
||||
"pages": [
|
||||
{
|
||||
"path": "duty/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "干部值班"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages-process",
|
||||
"pages": []
|
||||
}
|
||||
]
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '关于',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view
|
||||
class="bg-white overflow-hidden pt-2 px-4"
|
||||
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
|
||||
>
|
||||
<RequestComp />
|
||||
<UploadComp />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import RequestComp from './components/request.vue'
|
||||
import UploadComp from './components/upload.vue'
|
||||
|
||||
// 获取屏幕边界到安全区域距离
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.test-css {
|
||||
// mt-4=>1rem=>16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
@ -1,65 +0,0 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
layout: 'demo',
|
||||
style: {
|
||||
navigationBarTitleText: '请求',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="p-6 text-center">
|
||||
<view class="my-2">使用的是 laf 云后台</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="my-2">
|
||||
<a class="my-2" :href="recommendUrl" target="_blank">{{ recommendUrl }}</a>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="my-2 text-left text-sm">{{ recommendUrl }}</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- http://localhost:9000/#/pages/index/request -->
|
||||
<wd-button @click="run" class="my-6">发送请求</wd-button>
|
||||
<view class="h-16">
|
||||
<view v-if="loading">loading...</view>
|
||||
<block v-else>
|
||||
<view class="text-xl">请求数据如下</view>
|
||||
<view class="text-green leading-8">{{ JSON.stringify(data) }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<wd-button type="error" @click="reset" class="my-6" :disabled="!data">重置数据</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getFooAPI, postFooAPI, IFooItem } from '@/service/index/foo'
|
||||
import { findPetsByStatusQueryOptions } from '@/service/app'
|
||||
import { useQuery } from '@tanstack/vue-query'
|
||||
|
||||
const recommendUrl = ref('http://laf.run/signup?code=ohaOgIX')
|
||||
|
||||
// const initialData = {
|
||||
// name: 'initialData',
|
||||
// id: '1234',
|
||||
// }
|
||||
const initialData = undefined
|
||||
// 适合少部分全局性的接口————多个页面都需要的请求接口,额外编写一个 Service 层
|
||||
const { loading, error, data, run } = useRequest<IFooItem>(() => getFooAPI('张三'), {
|
||||
immediate: true,
|
||||
initialData,
|
||||
})
|
||||
|
||||
// 使用 vue-query 的 useQuery 来请求数据,只做参考,是否使用请根据实际情况而定
|
||||
const {
|
||||
data: data2,
|
||||
error: error2,
|
||||
isLoading: isLoading2,
|
||||
refetch,
|
||||
} = useQuery(findPetsByStatusQueryOptions({ params: { status: ['available'] } }))
|
||||
|
||||
const reset = () => {
|
||||
data.value = initialData
|
||||
}
|
||||
</script>
|
@ -1,30 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationBarTitleText: '上传-状态一体化',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="p-4 text-center">
|
||||
<wd-button @click="run">选择图片并上传</wd-button>
|
||||
<view v-if="loading" class="text-blue h-10">上传...</view>
|
||||
<template v-else>
|
||||
<view class="m-2">上传后返回的接口数据:</view>
|
||||
<view class="m-2">{{ data }}</view>
|
||||
<view class="h-80 w-full">
|
||||
<image v-if="data" :src="data || data" mode="scaleToFill" />
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const { loading, data, run } = useUpload({ user: '张三' })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
@ -1,281 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationBarTitleText: 'demo演示',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<PageLayout backRouteName="index" navTitle="组件示例" routeMethod="pushTab">
|
||||
<scroll-view scroll-y>
|
||||
<view class="box shadow-warp">
|
||||
<div class="content">
|
||||
<SelectUser label="用户:" :required="true" v-model="user"></SelectUser>
|
||||
</div>
|
||||
</view>
|
||||
<view class="box shadow-warp">
|
||||
<div class="content">
|
||||
<SelectDept label="部门:" :required="true" v-model="dept"></SelectDept>
|
||||
</div>
|
||||
</view>
|
||||
<view class="box shadow-warp">
|
||||
<div class="content">
|
||||
<!-- <view class="title mb-2">流程进度图组件</view> -->
|
||||
<ProgressMap title="流程历史跟踪" :dataSource="proDataSource"></ProgressMap>
|
||||
</div>
|
||||
</view>
|
||||
<view class="box shadow-warp" v-for="(item, index) in dataSource">
|
||||
<view class="content">
|
||||
<template v-if="index === 0">
|
||||
<!-- <view class="title">万年历组件</view> -->
|
||||
<uni-calendar
|
||||
:showMonth="true"
|
||||
@change="change"
|
||||
@monthChange="monthChange"
|
||||
:selected="selected"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="title">{{ item.title }}</view>
|
||||
<template v-if="['图片预览'].includes(item.title)">
|
||||
<wd-img
|
||||
custom-class="imgView"
|
||||
:width="220"
|
||||
:height="120"
|
||||
src="https://jeecgos.oss-cn-beijing.aliyuncs.com/files/site/projectCase/mini/banner/10bdc1.jpg"
|
||||
@click="() => (imgPreview.show = true)"
|
||||
></wd-img>
|
||||
<ImgPreview
|
||||
v-if="imgPreview.show"
|
||||
:urls="imgPreview.urls"
|
||||
@close="() => (imgPreview.show = false)"
|
||||
></ImgPreview>
|
||||
</template>
|
||||
<wd-button v-else @click="handleSkip(item.path)">跳转页面</wd-button>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box router shadow-warp">
|
||||
<wd-button @click="handleSkip('/pages/demo/tree')">树组件</wd-button>
|
||||
<wd-button @click="handleSkip('/pages/demo/indexBar')">通讯录</wd-button>
|
||||
<wd-button @click="handleSkip('/pages/demo/selectPicker')">单选多选</wd-button>
|
||||
<wd-button @click="handleSkip('/pages/demo/form')">表单</wd-button>
|
||||
</view>
|
||||
<view class="box gridBox shadow-warp">
|
||||
<view class="content">
|
||||
<!-- <view class="title">九宫格</view> -->
|
||||
<Grid
|
||||
v-model="gridData"
|
||||
:column="3"
|
||||
@itemClik="(item) => toast.info(`点击了${item.text}`)"
|
||||
></Grid>
|
||||
</view>
|
||||
</view>
|
||||
<wd-cell-group border clickable custom-class="shadow-warp">
|
||||
<wd-cell title="组织管理" is-link icon="computer"></wd-cell>
|
||||
<wd-cell title="安全设置" is-link icon="setting"></wd-cell>
|
||||
<wd-cell title="个人设置" is-link icon="user"></wd-cell>
|
||||
<wd-cell title="退出登录" is-link icon="login"></wd-cell>
|
||||
</wd-cell-group>
|
||||
<view class="box shadow-warp p-3">
|
||||
<view class="content">
|
||||
<!-- <view class="title">提示</view> -->
|
||||
<view class="flex flex-col">
|
||||
<wd-button custom-class="mb-2 info" @click="handleToast(0)">常规</wd-button>
|
||||
<wd-button custom-class="mb-2 warning" @click="handleToast(1)">警告</wd-button>
|
||||
<wd-button custom-class="mb-2 success" @click="handleToast(2)">成功</wd-button>
|
||||
<wd-button custom-class="mb-2 error" @click="handleToast(3)">错误</wd-button>
|
||||
<wd-button custom-class="mb-2 basic" @click="handleToast(4)">
|
||||
基本用法(无icon)
|
||||
</wd-button>
|
||||
<wd-button @click="handleConfirm">确认提示</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
//
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from '@/plugin/uni-mini-router'
|
||||
import { useToast, useMessage, useNotify } from 'wot-design-uni'
|
||||
// import { us, os } from '@/common/work'
|
||||
import Grid from '@/components/Grid/Grid.vue'
|
||||
|
||||
const toast = useToast()
|
||||
const user = ref('')
|
||||
const dept = ref('')
|
||||
const message = useMessage()
|
||||
const { showNotify, closeNotify } = useNotify()
|
||||
|
||||
const router = useRouter()
|
||||
const selected = ref([])
|
||||
const gridData = ref([])
|
||||
// us.data.forEach((item: any, index) => {
|
||||
// if (index < 9) {
|
||||
// gridData.value.push({ text: item.title, img: item.icon, itemKey: index })
|
||||
// }
|
||||
// })
|
||||
// 图片预览
|
||||
const imgPreview = ref({
|
||||
show: false,
|
||||
urls: [
|
||||
'https://jeecgos.oss-cn-beijing.aliyuncs.com/files/site/projectCase/mini/banner/10bdc1.jpg',
|
||||
],
|
||||
})
|
||||
const change = () => {}
|
||||
const monthChange = () => {}
|
||||
|
||||
const proDataSource = [
|
||||
{
|
||||
activeStep: true,
|
||||
data: [
|
||||
{ label: '流程节点:start' },
|
||||
{ label: '申请人:神经蛙02' },
|
||||
{ label: '申请时间:2023-12-06 16:15:14' },
|
||||
{ label: '已完成' },
|
||||
],
|
||||
},
|
||||
{
|
||||
activeStep: false,
|
||||
data: [
|
||||
{ label: '流程节点:填写' },
|
||||
{ label: '申请人:神经蛙01' },
|
||||
{ label: '申请时间:2023-12-06 16:15:14' },
|
||||
],
|
||||
},
|
||||
{
|
||||
activeStep: false,
|
||||
data: [
|
||||
{ label: '流程节点:填写' },
|
||||
{ label: '申请人:神经蛙03' },
|
||||
{ label: '申请时间:2023-12-06 16:15:14' },
|
||||
],
|
||||
},
|
||||
]
|
||||
const dataSource = ref([
|
||||
{ title: '万年历组件' },
|
||||
{ title: '图片预览' },
|
||||
// {
|
||||
// group: [
|
||||
// { title: '树组件', path: '/pages/demo/tree' },
|
||||
// { title: '通讯录', path: '/pages/demo/indexBar' },
|
||||
// { title: '单选多选', path: '/pages/demo/selectPicker' },
|
||||
// { title: '表单', path: '/pages/demo/form' },
|
||||
// ],
|
||||
// },
|
||||
])
|
||||
const handleSkip = (path) => {
|
||||
router.push({ path: path })
|
||||
}
|
||||
const handleToast = (value) => {
|
||||
switch (value) {
|
||||
case 0:
|
||||
// 909cb8
|
||||
toast.info({ msg: '常规提示信息', duration: 10000 })
|
||||
break
|
||||
case 1:
|
||||
// f0863b
|
||||
toast.warning({ msg: '提示信息', duration: 10000 })
|
||||
break
|
||||
case 2:
|
||||
// 33d19d
|
||||
toast.success({ msg: '操作成功', duration: 10000 })
|
||||
break
|
||||
case 3:
|
||||
// f04550
|
||||
toast.error({ msg: '手机验证码输入错误,请重新输入', duration: 10000 })
|
||||
break
|
||||
case 4:
|
||||
toast.show({ msg: '手机验证码输入错误,请重新输入', duration: 10000 })
|
||||
break
|
||||
}
|
||||
}
|
||||
const handleConfirm = (params) => {
|
||||
message
|
||||
.confirm({
|
||||
msg: '提示文案',
|
||||
title: '标题',
|
||||
})
|
||||
.then(() => {
|
||||
showNotify({ type: 'success', message: '点击了确认按钮' })
|
||||
})
|
||||
.catch(() => {
|
||||
showNotify({ type: 'warning', message: '点击了取消按钮' })
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
.mb-2 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.box {
|
||||
background-color: #fff;
|
||||
margin: 25px 16px;
|
||||
.title {
|
||||
padding: 10px;
|
||||
padding-bottom: 0;
|
||||
font-size: 15;
|
||||
color: #666666;
|
||||
margin-bottom: 20upx;
|
||||
}
|
||||
|
||||
.content {
|
||||
:deep(.wd-button),
|
||||
:deep(.imgView) {
|
||||
margin: 10px;
|
||||
}
|
||||
:deep(.wd-button) {
|
||||
&.info {
|
||||
background-color: #909cb8;
|
||||
}
|
||||
&.warning {
|
||||
background-color: #f0863b;
|
||||
}
|
||||
&.success {
|
||||
background-color: #33d19d;
|
||||
}
|
||||
&.error {
|
||||
background-color: #f04550;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.router {
|
||||
padding: 30px 15px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.wd-button {
|
||||
margin-bottom: 15px;
|
||||
&:nth-child(3),
|
||||
&:nth-child(4) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.wd-cell-group) {
|
||||
margin: 0 26upx;
|
||||
border-radius: 18upx;
|
||||
overflow: hidden;
|
||||
--wot-cell-line-height: 32px;
|
||||
.wd-icon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.wd-cell {
|
||||
--wot-cell-title-fs: 15px;
|
||||
--wot-cell-title-color: var(--color-gray);
|
||||
.wd-cell__left {
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,123 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationBarTitleText: '表单',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<PageLayout navTitle="表单">
|
||||
<wd-form ref="form" :model="model">
|
||||
<wd-cell-group border class="mt-10px mb-10px">
|
||||
<wd-input
|
||||
label="姓名"
|
||||
label-width="80px"
|
||||
prop="value1"
|
||||
clearable
|
||||
v-model="model.value1"
|
||||
placeholder="姓名"
|
||||
:rules="[{ required: true, message: '请填写姓名' }]"
|
||||
/>
|
||||
<wd-picker
|
||||
label="性别"
|
||||
label-width="80px"
|
||||
prop="value3"
|
||||
:columns="columns"
|
||||
v-model="model.value3"
|
||||
:rules="[{ required: true, message: '请选择性别' }]"
|
||||
/>
|
||||
</wd-cell-group>
|
||||
<wd-cell-group border class="mb-10px">
|
||||
<wd-input
|
||||
label="密码"
|
||||
label-width="80px"
|
||||
prop="value2"
|
||||
show-password
|
||||
clearable
|
||||
v-model="model.value2"
|
||||
placeholder="请输入密码"
|
||||
:rules="[{ required: true, message: '请填写密码' }]"
|
||||
/>
|
||||
|
||||
<wd-select-picker
|
||||
label="爱好"
|
||||
label-width="80px"
|
||||
prop="value4"
|
||||
v-model="model.value4"
|
||||
:columns="selectColumns"
|
||||
:rules="[{ required: true, message: '请选择爱好' }]"
|
||||
></wd-select-picker>
|
||||
</wd-cell-group class="mb-10px">
|
||||
|
||||
<wd-cell-group border>
|
||||
<wd-calendar label-width="80px" prop="value5" v-model="model.value5" label=" 出生" />
|
||||
</wd-cell-group>
|
||||
<view class="footer">
|
||||
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
|
||||
</view>
|
||||
</wd-form>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useToast } from 'wot-design-uni'
|
||||
const { success: showSuccess } = useToast()
|
||||
const columns = ref([
|
||||
{ value: '1', label: '男' },
|
||||
{ value: '2', label: '女' },
|
||||
])
|
||||
const selectColumns = ref<any>([
|
||||
{
|
||||
value: '101',
|
||||
label: '篮球',
|
||||
},
|
||||
{
|
||||
value: '102',
|
||||
label: '足球',
|
||||
},
|
||||
{
|
||||
value: '103',
|
||||
label: '棒球',
|
||||
},
|
||||
])
|
||||
const model = reactive<{
|
||||
value1: string
|
||||
value2: string
|
||||
value3: string
|
||||
value4: any
|
||||
value5: number
|
||||
}>({
|
||||
value1: '',
|
||||
value2: '',
|
||||
value3: '',
|
||||
value4: [],
|
||||
value5: 0,
|
||||
})
|
||||
|
||||
const form = ref()
|
||||
|
||||
function handleSubmit() {
|
||||
form.value
|
||||
.validate()
|
||||
.then(({ valid, errors }) => {
|
||||
if (valid) {
|
||||
console.log("model:",model)
|
||||
showSuccess({
|
||||
msg: '校验通过',
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error, 'error')
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.footer{
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
@ -1,205 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '通讯录',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<PageLayout navTitle="通讯录">
|
||||
<wd-search
|
||||
hide-cancel
|
||||
placeholder="我要去哪里?"
|
||||
v-model="keyword"
|
||||
@search="handleSearch"
|
||||
@clear="handleClear"
|
||||
/>
|
||||
<view class="wraper">
|
||||
<wd-index-bar sticky v-if="showList.length">
|
||||
<view v-for="item in showList" :key="item.index">
|
||||
<wd-index-anchor :index="item.index" />
|
||||
<wd-cell
|
||||
border
|
||||
clickable
|
||||
v-for="city in item.data"
|
||||
:key="city"
|
||||
:title="city"
|
||||
@click="handleClick(item.index, city)"
|
||||
></wd-cell>
|
||||
</view>
|
||||
</wd-index-bar>
|
||||
</view>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { nextTick, onMounted, ref } from 'vue'
|
||||
const { show: showToast } = useToast()
|
||||
|
||||
onMounted(() => {
|
||||
handleSearch()
|
||||
})
|
||||
const handleClickLeft = (params) => {
|
||||
console.log('导航-返回')
|
||||
}
|
||||
|
||||
const keyword = ref('')
|
||||
|
||||
const showList = ref<any>([])
|
||||
|
||||
const indexList = [
|
||||
{
|
||||
index: 'A',
|
||||
data: ['阿坝', '阿拉善', '阿里', '安康', '安庆', '鞍山', '安顺', '安阳', '澳门'],
|
||||
},
|
||||
{
|
||||
index: 'B',
|
||||
data: [
|
||||
'北京',
|
||||
'白银',
|
||||
'保定',
|
||||
'宝鸡',
|
||||
'保山',
|
||||
'包头',
|
||||
'巴中',
|
||||
'北海',
|
||||
'蚌埠',
|
||||
'本溪',
|
||||
'毕节',
|
||||
'滨州',
|
||||
'百色',
|
||||
'亳州',
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'C',
|
||||
data: [
|
||||
'重庆',
|
||||
'成都',
|
||||
'长沙',
|
||||
'长春',
|
||||
'沧州',
|
||||
'常德',
|
||||
'昌都',
|
||||
'长治',
|
||||
'常州',
|
||||
'巢湖',
|
||||
'潮州',
|
||||
'承德',
|
||||
'郴州',
|
||||
'赤峰',
|
||||
'池州',
|
||||
'崇左',
|
||||
'楚雄',
|
||||
'滁州',
|
||||
'朝阳',
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'D',
|
||||
data: [
|
||||
'大连',
|
||||
'东莞',
|
||||
'大理',
|
||||
'丹东',
|
||||
'大庆',
|
||||
'大同',
|
||||
'大兴安岭',
|
||||
'德宏',
|
||||
'德阳',
|
||||
'德州',
|
||||
'定西',
|
||||
'迪庆',
|
||||
'东营',
|
||||
],
|
||||
},
|
||||
{
|
||||
index: 'E',
|
||||
data: ['鄂尔多斯', '恩施', '鄂州'],
|
||||
},
|
||||
{
|
||||
index: 'F',
|
||||
data: ['福州', '防城港', '佛山', '抚顺', '抚州', '阜新', '阜阳'],
|
||||
},
|
||||
{
|
||||
index: 'G',
|
||||
data: ['广州', '桂林', '贵阳', '甘南', '赣州', '甘孜', '广安', '广元', '贵港', '果洛'],
|
||||
},
|
||||
{
|
||||
index: 'H',
|
||||
data: [
|
||||
'杭州',
|
||||
'哈尔滨',
|
||||
'合肥',
|
||||
'海口',
|
||||
'呼和浩特',
|
||||
'海北',
|
||||
'海东',
|
||||
'海南',
|
||||
'海西',
|
||||
'邯郸',
|
||||
'汉中',
|
||||
'鹤壁',
|
||||
'河池',
|
||||
'鹤岗',
|
||||
'黑河',
|
||||
'衡水',
|
||||
'衡阳',
|
||||
'河源',
|
||||
'贺州',
|
||||
'红河',
|
||||
'淮安',
|
||||
'淮北',
|
||||
'怀化',
|
||||
'淮南',
|
||||
'黄冈',
|
||||
'黄南',
|
||||
'黄山',
|
||||
'黄石',
|
||||
'惠州',
|
||||
'葫芦岛',
|
||||
'呼伦贝尔',
|
||||
'湖州',
|
||||
'菏泽',
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
function handleClick(index: string, city: string) {
|
||||
showToast(`当前点击项:${index},城市:${city}`)
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
showList.value = []
|
||||
nextTick(() => {
|
||||
if (keyword.value) {
|
||||
showList.value = indexList.filter((item) => {
|
||||
return item.data.some((city) => {
|
||||
return city.includes(keyword.value)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
showList.value = indexList
|
||||
}
|
||||
})
|
||||
|
||||
// 筛选indexList项中data包含keyword的项
|
||||
}
|
||||
|
||||
function handleClear() {
|
||||
keyword.value = ''
|
||||
handleSearch()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.wraper {
|
||||
height: calc(100vh - var(--window-top));
|
||||
height: calc(100vh - var(--window-top) - constant(safe-area-inset-bottom));
|
||||
height: calc(100vh - var(--window-top) - env(safe-area-inset-bottom));
|
||||
}
|
||||
</style>
|
@ -1,57 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationBarTitleText: '单选多选',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<PageLayout navTitle="单复选择器" backRouteName="demo">
|
||||
<wd-select-picker
|
||||
label="多选"
|
||||
v-model="value"
|
||||
:columns="columns"
|
||||
@change="handleChange"
|
||||
></wd-select-picker>
|
||||
<wd-select-picker
|
||||
label="单选"
|
||||
type="radio"
|
||||
v-model="radioValue"
|
||||
:columns="columns"
|
||||
@change="handleRadioChange"
|
||||
></wd-select-picker>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
const { show: showToast } = useToast()
|
||||
const columns = ref<any>([
|
||||
{
|
||||
value: '101',
|
||||
label: '男装',
|
||||
},
|
||||
{
|
||||
value: '102',
|
||||
label: '奢侈品',
|
||||
},
|
||||
{
|
||||
value: '103',
|
||||
label: '女装',
|
||||
},
|
||||
])
|
||||
const value = ref<string[]>(['101'])
|
||||
const radioValue = ref<string>('101')
|
||||
const handleRadioChange = ({ value }) => {}
|
||||
function handleChange({ value }) {
|
||||
showToast('选择了' + value)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
@ -1,236 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationBarTitleText: '树示例',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<PageLayout navTitle="树示例" backRouteName="demo">
|
||||
<view class="btnArea bg-white">
|
||||
<view class="group">
|
||||
<wd-button @click="doCheckedTree(['2'], true)">全选</wd-button>
|
||||
<wd-button @click="doCheckedTree(['2'], false)">取消全选</wd-button>
|
||||
</view>
|
||||
<view class="group">
|
||||
<wd-button @click="doExpandTree('all', true)">展开全部节点</wd-button>
|
||||
<wd-button @click="doExpandTree('all', false)">收起全部节点</wd-button>
|
||||
</view>
|
||||
<view class="group">
|
||||
<wd-button @click="doExpandTree(['22', '23'], true)">展开节点</wd-button>
|
||||
<wd-button @click="doExpandTree(['22', '23'], false)">收起节点</wd-button>
|
||||
</view>
|
||||
<view class="group">
|
||||
<wd-button @click="doCheckedTree(['211', '222'], true)">选中指定节点</wd-button>
|
||||
<wd-button @click="doCheckedTree(['211', '222'], false)">取消选中指定节点</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="bg-gray-1" scroll-y>
|
||||
<view class="content p-2 mt-14px">
|
||||
<view class="title mt-5">多选</view>
|
||||
<DaTree
|
||||
ref="DaTreeRef"
|
||||
:data="roomTreeData"
|
||||
labelField="name"
|
||||
valueField="id"
|
||||
defaultExpandAll
|
||||
showCheckbox
|
||||
:defaultCheckedKeys="defaultCheckedKeysValue"
|
||||
@change="handleTreeChange"
|
||||
@expand="handleExpandChange"
|
||||
></DaTree>
|
||||
</view>
|
||||
<view class="content p-2 mt-14px">
|
||||
<view class="title mt-5">单选</view>
|
||||
<DaTree
|
||||
:data="roomTreeData"
|
||||
labelField="name"
|
||||
valueField="id"
|
||||
defaultExpandAll
|
||||
:defaultCheckedKeys="defaultCheckedKeysValue2"
|
||||
@change="handleTreeChange"
|
||||
@expand="handleExpandChange"
|
||||
></DaTree>
|
||||
</view>
|
||||
<view class="content p-2 mt-14px">
|
||||
<view class="title mt-5">默认展开指定节点</view>
|
||||
<DaTree
|
||||
:data="roomTreeData"
|
||||
labelField="name"
|
||||
valueField="id"
|
||||
showCheckbox
|
||||
:defaultExpandedKeys="defaultExpandKeysValue3"
|
||||
@change="handleTreeChange"
|
||||
@expand="handleExpandChange"
|
||||
></DaTree>
|
||||
</view>
|
||||
<view class="content p-2 mt-14px mb-14px">
|
||||
<view class="title mt-5">异步加载数据</view>
|
||||
<DaTree
|
||||
:data="roomTreeData"
|
||||
labelField="name"
|
||||
valueField="id"
|
||||
showCheckbox
|
||||
loadMode
|
||||
:loadApi="GetApiData"
|
||||
defaultExpandAll
|
||||
@change="handleTreeChange"
|
||||
@expand="handleExpandChange"
|
||||
></DaTree>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
//
|
||||
import { defineComponent, ref } from 'vue'
|
||||
|
||||
/**
|
||||
* 模拟创建一个接口数据
|
||||
*/
|
||||
function GetApiData(currentNode) {
|
||||
const { key } = currentNode
|
||||
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
// 模拟返回空数据
|
||||
if (key.indexOf('-') > -1) {
|
||||
return resolve(null)
|
||||
// return resolve([])
|
||||
}
|
||||
|
||||
return resolve([
|
||||
{
|
||||
id: `${key}-1`,
|
||||
name: `行政部X${key}-1`,
|
||||
},
|
||||
{
|
||||
id: `${key}-2`,
|
||||
name: `财务部X${key}-2`,
|
||||
append: '定义了末项数据',
|
||||
leaf: true,
|
||||
},
|
||||
{
|
||||
id: `${key}-3`,
|
||||
name: `资源部X${key}-3`,
|
||||
},
|
||||
{
|
||||
id: `${key}-4`,
|
||||
name: `资源部X${key}-3`,
|
||||
append: '被禁用,无展开图标',
|
||||
disabled: true,
|
||||
},
|
||||
])
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
|
||||
import DaTree from '@/uni_modules/da-tree/index.vue'
|
||||
const DaTreeRef = ref()
|
||||
// key的类型必须对应树数据key的类型
|
||||
const defaultCheckedKeysValue = ref(['211', '222'])
|
||||
const defaultCheckedKeysValue2 = ref('222')
|
||||
const defaultExpandKeysValue3 = ref(['212', '231'])
|
||||
const roomTreeData = ref([
|
||||
{
|
||||
id: '2',
|
||||
name: '行政中心',
|
||||
children: [
|
||||
{
|
||||
id: '21',
|
||||
name: '行政部',
|
||||
children: [
|
||||
{
|
||||
id: '211',
|
||||
name: '行政一部',
|
||||
children: null,
|
||||
},
|
||||
{
|
||||
id: '212',
|
||||
name: '行政二部',
|
||||
children: [],
|
||||
disabled: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '22',
|
||||
name: '财务部',
|
||||
children: [
|
||||
{
|
||||
id: '221',
|
||||
name: '财务一部',
|
||||
children: [],
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
id: '222',
|
||||
name: '财务二部',
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '23',
|
||||
name: '人力资源部',
|
||||
children: [
|
||||
{
|
||||
id: '231',
|
||||
name: '人力一部',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
id: '232',
|
||||
name: '人力二部',
|
||||
// append: '更多示例,请下载示例项目查看',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
function doExpandTree(keys, expand) {
|
||||
DaTreeRef.value?.setExpandedKeys(keys, expand)
|
||||
|
||||
const gek = DaTreeRef.value?.getExpandedKeys()
|
||||
console.log('当前已展开的KEY ==>', gek)
|
||||
}
|
||||
function doCheckedTree(keys, checked) {
|
||||
DaTreeRef.value?.setCheckedKeys(keys, checked)
|
||||
|
||||
const gek = DaTreeRef.value?.getCheckedKeys()
|
||||
console.log('当前已选中的KEY ==>', gek)
|
||||
}
|
||||
function handleTreeChange(allSelectedKeys, currentItem) {
|
||||
console.log('handleTreeChange ==>', allSelectedKeys, currentItem)
|
||||
}
|
||||
function handleExpandChange(expand, currentItem) {
|
||||
console.log('handleExpandChange ==>', expand, currentItem)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
.btnArea {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 10px;
|
||||
.group {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
:deep(.wd-button) {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
background-color: #fff;
|
||||
.title {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -16,7 +16,7 @@
|
||||
</view>
|
||||
<view v-if="ifH5">
|
||||
<!-- 在线预览 by 闵 -->
|
||||
<wd-text color="#1890ff" lines=1 style="font-size: 40rpx;padding-left: 25rpx;padding-top: 25rpx;"
|
||||
<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)">
|
||||
@ -24,7 +24,7 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 在线预览 by 闵 -->
|
||||
<wd-text color="#1890ff" lines=1 style="font-size: 40rpx;padding-left: 25rpx;padding-top: 25rpx;"
|
||||
<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)">
|
||||
|
@ -27,9 +27,7 @@
|
||||
onLoad((options) => {
|
||||
let base64 = new Base64();
|
||||
var url = baseUrl + JSON.parse(options.data);
|
||||
console.log('-----111', url)
|
||||
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(url))
|
||||
console.log('-----222', fileUrl)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -30,9 +30,7 @@
|
||||
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))
|
||||
console.log(fileUrl)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
45
src/pagess-process/approvalTabbar.vue
Normal file
45
src/pagess-process/approvalTabbar.vue
Normal file
@ -0,0 +1,45 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '流程审批导航',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<PageLayout nav-title="运行流程" >
|
||||
<wd-tabs v-model="tab" swipeable color="#39b54a" autoLineWidth>
|
||||
<wd-tab title="我的任务">
|
||||
<myTask></myTask>
|
||||
</wd-tab>
|
||||
<wd-tab title="历史任务">
|
||||
<view class="content">内容1</view>
|
||||
</wd-tab>
|
||||
</wd-tabs>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
useAppStore
|
||||
} from '@/store'
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import myTask from './components/myTask.vue'
|
||||
const appStore = useAppStore();
|
||||
const tab = ref(0)
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .wd-tabs__line{
|
||||
background: #39b54a;
|
||||
}
|
||||
</style>
|
170
src/pagess-process/components/myTask.vue
Normal file
170
src/pagess-process/components/myTask.vue
Normal file
@ -0,0 +1,170 @@
|
||||
<template>
|
||||
|
||||
<view class="container">
|
||||
<wd-loading v-if="loading && pageNo === 1" class="loading-tip">加载中...</wd-loading>
|
||||
<template v-for="(item, i) in list" :key="i">
|
||||
<wd-card :title="item.bpmBizTitle" title-bold border-radius="8" use-footer-slot @click="goToPage(item)">
|
||||
<view class="card-content">
|
||||
<wd-row style="color: #666666;">
|
||||
<wd-col :span="4">
|
||||
<text>当前环节:</text>
|
||||
</wd-col>
|
||||
<wd-col :span="20">
|
||||
{{item.taskName}}
|
||||
</wd-col>
|
||||
</wd-row>
|
||||
<wd-row style="padding-bottom: 2px;color: #666666;">
|
||||
<wd-col :span="4">
|
||||
<text>流程名称:</text>
|
||||
</wd-col>
|
||||
<wd-col :span="20">
|
||||
{{item.processDefinitionName}}
|
||||
</wd-col>
|
||||
</wd-row>
|
||||
<view class="meta-info">
|
||||
<wd-icon name="time" size="14px" color="#999"></wd-icon>
|
||||
<text class="meta-text">{{item.taskBeginTime?item.taskBeginTime.substring(0,10):''}}</text>
|
||||
<wd-icon name="user" size="14px" color="#999" style="margin-left: auto;"></wd-icon>
|
||||
<text class="meta-text">{{item.processApplyUserName}}</text>
|
||||
</view>
|
||||
<wd-row style="padding-top: 10px;">
|
||||
<view v-if="item.taskAssigneeName&&item.taskAssigneeName!=''">
|
||||
<wd-col :span="16">
|
||||
<wd-button>办理</wd-button>
|
||||
</wd-col>
|
||||
<wd-col :span="8">
|
||||
<wd-button>委托</wd-button>
|
||||
</wd-col>
|
||||
</view>
|
||||
<view v-else>
|
||||
<wd-col :span="12">
|
||||
<wd-button @click="goToPage(item)">签收</wd-button>
|
||||
</wd-col>
|
||||
<wd-col :span="12">
|
||||
</wd-col>
|
||||
</view>
|
||||
</wd-row>
|
||||
</view>
|
||||
</wd-card>
|
||||
</template>
|
||||
<view class="load-more" v-if="loading && pageNo > 1">
|
||||
<wd-loading size="16px">正在加载...</wd-loading>
|
||||
</view>
|
||||
<wd-message-box></wd-message-box>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { taskListApi,claim } from '@/api/process'
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from '@dcloudio/uni-app';
|
||||
import { useToast, useMessage } from 'wot-design-uni'
|
||||
defineOptions({
|
||||
name: 'myTask',
|
||||
options: {
|
||||
styleIsolation: 'shared',
|
||||
},
|
||||
})
|
||||
const toast = useToast()
|
||||
const message = useMessage()
|
||||
let pageNo = 1
|
||||
let pageSize = 10
|
||||
let loading = false
|
||||
const list = ref([])
|
||||
|
||||
|
||||
|
||||
const getList = () => {
|
||||
taskListApi({
|
||||
pageNo,
|
||||
pageSize
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.success) {
|
||||
list.value = [...list.value,...res.result.records];
|
||||
}
|
||||
loading = false
|
||||
}).catch((err) => {
|
||||
loading = false
|
||||
})
|
||||
}
|
||||
|
||||
const goToPage = (item)=>{
|
||||
//判断是否是签收项目,提示是否签收
|
||||
if(item.taskAssigneeName&&item.taskAssigneeName!=''){
|
||||
console.log(11)
|
||||
//办理任务,直接进入办理页面
|
||||
uni.navigateTo({
|
||||
url:`/pages/process/taskHandle?data=${JSON.stringify(item)}`
|
||||
})
|
||||
}else{
|
||||
message
|
||||
.confirm({
|
||||
msg: '是否签收该任务?',
|
||||
title: '确认签收吗',
|
||||
})
|
||||
.then(() => {
|
||||
claim({taskId:item.id}).then(()=>{
|
||||
uni.redirectTo({
|
||||
url: './approvalTabbar'
|
||||
});
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onReachBottom(() => {
|
||||
if (loading) return
|
||||
pageNo++
|
||||
getList()
|
||||
})
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
pageNo = 1
|
||||
list.value = []
|
||||
getList()
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
|
||||
|
||||
onShow(() => {
|
||||
list.value = []
|
||||
pageNo = 1
|
||||
pageSize = 10
|
||||
loading = false
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding: 5px 0 5px;
|
||||
min-height: 100vh;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
padding: 8px 0;
|
||||
|
||||
.meta-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
|
||||
.meta-text {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .wd-card__title-content{
|
||||
border-bottom: 1px solid #efefef;
|
||||
}
|
||||
</style>
|
98
src/pagess-process/taskHandle.vue
Normal file
98
src/pagess-process/taskHandle.vue
Normal file
@ -0,0 +1,98 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '任务处理',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<PageLayout nav-title="流程办理">
|
||||
<wd-tabs v-model="tab" swipeable color="#39b54a" autoLineWidth>
|
||||
<wd-tab title="单据">
|
||||
</wd-tab>
|
||||
<wd-tab title="任务处理">
|
||||
<view class="content">内容2</view>
|
||||
</wd-tab>
|
||||
<wd-tab title="流程图">
|
||||
<img :src="imgPath" style="border:2px;cursor:hand;" alt="流程图" usemap="#planetmap">
|
||||
</wd-tab>
|
||||
</wd-tabs>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from '@dcloudio/uni-app';
|
||||
import { useToast, useMessage } from 'wot-design-uni'
|
||||
import {
|
||||
useAppStore
|
||||
} from '@/store'
|
||||
import {
|
||||
getProcessNodeInfo,
|
||||
getHisProcessNodeInfo
|
||||
} from '@/api/process'
|
||||
import {
|
||||
getEnvBaseUrl
|
||||
} from '@/utils/index'
|
||||
import { json } from 'stream/consumers';
|
||||
|
||||
const formData = ref({})
|
||||
const path = ref('') //url路径
|
||||
const appStore = useAppStore();
|
||||
const tab = ref(0)
|
||||
|
||||
|
||||
const handleClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
|
||||
onLoad((options) => {
|
||||
let useData = JSON.parse(options.data);
|
||||
console.log(123)
|
||||
getProcessNodeInfo({taskId:useData.id}).then(res=>{
|
||||
console.log(res)
|
||||
if(res.success){
|
||||
let data = {
|
||||
dataId:res.result.dataId,
|
||||
taskId:useData.id,
|
||||
taskDefKey:useData.taskId,
|
||||
procInsId:useData.processInstanceId,
|
||||
tableName:res.result.tableName,
|
||||
permissionList:res.result.permissionList,
|
||||
vars:res.result.records
|
||||
}
|
||||
formData.value = data;//流程信息
|
||||
|
||||
let tempFormUrl = res.result.formUrlMobile;
|
||||
|
||||
path.value = tempFormUrl; //url路径
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const imgPath = () => {
|
||||
var params = JSON.stringify({
|
||||
'processInstanceId': formData.procInsId
|
||||
})
|
||||
let url = `${getEnvBaseUrl()}/act/task/traceImage?${params}`;
|
||||
console.log(url)
|
||||
return url;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .wd-tabs__line{
|
||||
background: #39b54a;
|
||||
}
|
||||
</style>
|
19
src/types/uni-pages.d.ts
vendored
19
src/types/uni-pages.d.ts
vendored
@ -5,14 +5,8 @@
|
||||
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/login/login" |
|
||||
"/pages/about/about" |
|
||||
"/pages/annotation/annotationDetail" |
|
||||
"/pages/annotation/annotationList" |
|
||||
"/pages/demo/demo" |
|
||||
"/pages/demo/form" |
|
||||
"/pages/demo/indexBar" |
|
||||
"/pages/demo/selectPicker" |
|
||||
"/pages/demo/tree" |
|
||||
"/pages/index/index" |
|
||||
"/pages/message/message" |
|
||||
"/pages/more/more" |
|
||||
@ -23,11 +17,6 @@ interface NavigateToOptions {
|
||||
"/pages/process/taskHandle" |
|
||||
"/pages/user/people" |
|
||||
"/pages/workHome/index" |
|
||||
"/pages/humanResources/absence/apply" |
|
||||
"/pages/integrated/duty/index" |
|
||||
"/pages/operate/file/detail" |
|
||||
"/pages/operate/file/index" |
|
||||
"/pages/operate/sc/index" |
|
||||
"/pages-home/home/home" |
|
||||
"/pages-message/chat/chat" |
|
||||
"/pages-message/contacts/contacts" |
|
||||
@ -40,7 +29,13 @@ interface NavigateToOptions {
|
||||
"/pages-work/onlinePage/onlineEdit" |
|
||||
"/pages-sub/online/online" |
|
||||
"/pages-sub/online/onlineCard" |
|
||||
"/pages-sub/online/onlineTable";
|
||||
"/pages-sub/online/onlineTable" |
|
||||
"/pages-operate/file/detail" |
|
||||
"/pages-operate/file/index" |
|
||||
"/pages-operate/sc/index" |
|
||||
"/pages-humanResource/absence/apply" |
|
||||
"/pages-humanResource/absence/index" |
|
||||
"/pages-integrated/duty/index";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
|
@ -65,6 +65,10 @@ export default ({ command, mode }) => {
|
||||
'src/pages-user',
|
||||
'src/pages-work',
|
||||
'src/pages-sub',
|
||||
'src/pages-operate',
|
||||
'src/pages-humanResource',
|
||||
'src/pages-integrated',
|
||||
'src/pages-process',
|
||||
], // 是个数组,可以配置多个,但是不能为pages里面的目录
|
||||
dts: 'src/types/uni-pages.d.ts',
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user