|
|
@@ -1,64 +1,55 @@
|
|
|
<template>
|
|
|
<view class="work-container">
|
|
|
<!-- 宫格组件 -->
|
|
|
- <uni-section :title="flowList.ftypeList[0].typeName" type="line"></uni-section>
|
|
|
- <view class="grid-body">
|
|
|
- <uni-grid :column="4" :showBorder="false" @change="changeProcessGrid">
|
|
|
- <uni-grid-item v-for="(item, index) in flowList.fList" :index="index">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-outsourcing"></text>
|
|
|
- <text class="text">{{ item.modelName }}</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <!-- <uni-grid-item :index="2">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-car"></text>
|
|
|
- <text class="text">用车申请</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="3">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-business"></text>
|
|
|
- <text class="text">出差申请</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="4">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-out"></text>
|
|
|
- <text class="text">外出申请</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="5">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-expense"></text>
|
|
|
- <text class="text">费用报销</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="6">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-overtime"></text>
|
|
|
- <text class="text">加班申请</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="7">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-leave"></text>
|
|
|
- <text class="text">请假申请</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="8">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-purchase"></text>
|
|
|
- <text class="text">采购申请</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item>
|
|
|
- <uni-grid-item :index="9">
|
|
|
- <view class="grid-item-box">
|
|
|
- <text class="ygoa-icon icon-apply-sign-contract"></text>
|
|
|
- <text class="text">合同会签</text>
|
|
|
- </view>
|
|
|
- </uni-grid-item> -->
|
|
|
- </uni-grid>
|
|
|
+ <view>
|
|
|
+ <uni-section :title="processList.ftypeList[0].typeName" type="line"></uni-section>
|
|
|
+ <view class="grid-body">
|
|
|
+ <uni-grid :column="4" :showBorder="false" @change="changeProcessGrid">
|
|
|
+ <uni-grid-item v-for="(item, index) in processList.fList" :index="index">
|
|
|
+ <view class="grid-item-box">
|
|
|
+ <text class="ygoa-icon"
|
|
|
+ :class="item.modelPicture == 'default.png' ? 'icon-outsourcing' : item.modelPicture"></text>
|
|
|
+ <text class="text">{{ item.modelName }}</text>
|
|
|
+ </view>
|
|
|
+ </uni-grid-item>
|
|
|
+ <!-- <uni-grid-item :index="1">
|
|
|
+ <text class="ygoa-icon icon-outsourcing"></text>
|
|
|
+ <text class="text">外协结算申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="2">
|
|
|
+ <text class="ygoa-icon icon-apply-car"></text>
|
|
|
+ <text class="text">用车申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="3">
|
|
|
+ <text class="ygoa-icon icon-apply-business"></text>
|
|
|
+ <text class="text">出差申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="4">
|
|
|
+ <text class="ygoa-icon icon-apply-out"></text>
|
|
|
+ <text class="text">外出申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="5">
|
|
|
+ <text class="ygoa-icon icon-apply-expense"></text>
|
|
|
+ <text class="text">费用报销</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="6">
|
|
|
+ <text class="ygoa-icon icon-apply-overtime"></text>
|
|
|
+ <text class="text">加班申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="7">
|
|
|
+ <text class="ygoa-icon icon-apply-leave"></text>
|
|
|
+ <text class="text">请假申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="8">
|
|
|
+ <text class="ygoa-icon icon-apply-purchase"></text>
|
|
|
+ <text class="text">采购申请</text>
|
|
|
+ </uni-grid-item>
|
|
|
+ <uni-grid-item :index="9">
|
|
|
+ <text class="ygoa-icon icon-apply-sign-contract"></text>
|
|
|
+ <text class="text">合同会签</text>
|
|
|
+ </uni-grid-item> -->
|
|
|
+ </uni-grid>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<uni-section title="考勤管理" type="line"></uni-section>
|
|
|
<view class="grid-body">
|
|
|
@@ -126,178 +117,176 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
- import cuiCalculator from "@/components/cui-calculator/cui-calculator.vue"
|
|
|
- import { onMounted, ref } from "vue"
|
|
|
- import $tab from "@/plugins/tab.js"
|
|
|
- import { getUserInfo } from '@/utils/auth'
|
|
|
- import { useUserStore } from '@/store/user.js'
|
|
|
- import { getFlowList } from '@/api/work.js'
|
|
|
-
|
|
|
- const userStore = useUserStore()
|
|
|
-
|
|
|
- onMounted(() => {
|
|
|
- initFlowList()
|
|
|
- })
|
|
|
-
|
|
|
- const flowList = ref({
|
|
|
- fList: [],
|
|
|
- ftypeList: [
|
|
|
- {
|
|
|
- typeName: '日常办公'
|
|
|
- }
|
|
|
- ],
|
|
|
- })
|
|
|
-
|
|
|
- function initFlowList() {
|
|
|
- const staffId = userStore.user.useId
|
|
|
- const unitId = userStore.user.unitId
|
|
|
- getFlowList(staffId, unitId).then(res => {
|
|
|
- flowList.value = res.returnParams // 设置flowList
|
|
|
- console.log('getFlowList', flowList.value);
|
|
|
- })
|
|
|
- }
|
|
|
- function changeProcessGrid(e) { // 点击流程宫格
|
|
|
- console.log('changeProcessGrid', e);
|
|
|
- const flow = flowList.value.fList[e.detail.index]
|
|
|
- console.log('flow', flow);
|
|
|
- // 跳转流程申请页面
|
|
|
- // $tab.navigateTo('/pages/work/edit/index?title=' + '')
|
|
|
- }
|
|
|
- function changeAttendanceGrid(e) {
|
|
|
- if (1 == e.detail.index) { // 考勤
|
|
|
+import cuiCalculator from "@/components/cui-calculator/cui-calculator.vue"
|
|
|
+import { onMounted, ref } from "vue"
|
|
|
+import $tab from "@/plugins/tab.js"
|
|
|
+import { getUserInfo } from '@/utils/auth'
|
|
|
+import { useUserStore } from '@/store/user.js'
|
|
|
+import { getProcessList } from '@/api/work.js'
|
|
|
|
|
|
- }
|
|
|
- if (2 == e.detail.index) { // 打卡
|
|
|
+const userStore = useUserStore()
|
|
|
|
|
|
+onMounted(() => {
|
|
|
+ initProcessList()
|
|
|
+})
|
|
|
+
|
|
|
+const processList = ref({
|
|
|
+ fList: [],
|
|
|
+ ftypeList: [
|
|
|
+ {
|
|
|
+ typeName: ''
|
|
|
}
|
|
|
+ ],
|
|
|
+})
|
|
|
+
|
|
|
+function initProcessList() {
|
|
|
+ const staffId = userStore.user.useId
|
|
|
+ const unitId = userStore.user.unitId
|
|
|
+ getProcessList(staffId, unitId).then(res => {
|
|
|
+ processList.value = res.returnParams // 设置processList
|
|
|
+ })
|
|
|
+}
|
|
|
+function changeProcessGrid(e) { // 点击流程宫格
|
|
|
+ console.log('changeProcessGrid', e);
|
|
|
+ const { modelName, modelId, control } = processList.value.fList[e.detail.index]
|
|
|
+ // 跳转流程申请页面
|
|
|
+ $tab.navigateTo('/pages/work/edit/index?modelName=' + modelName + '&modelId=' + modelId + '&control=' + control)
|
|
|
+}
|
|
|
+function changeAttendanceGrid(e) {
|
|
|
+ if (1 == e.detail.index) { // 考勤
|
|
|
+ $tab.navigateTo('/pages/mine/checkIn/checkIn')
|
|
|
}
|
|
|
- function changeDiaryGrid(e) {
|
|
|
- if (1 == e.detail.index) {
|
|
|
- wx.navigateToMiniProgram({
|
|
|
- appId: 'wxd45c635d754dbf59',
|
|
|
- path: `pages/detail/detail?url=https://docs.qq.com/sheet/DZndGYU5aWVBpR1Nm`
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (2 == e.detail.index) {
|
|
|
- $tab.navigateTo('/pages/work/diary/index')
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- function changeToolsGrid(e) { // 点击工具宫格
|
|
|
- switch (e.detail.index) {
|
|
|
- case 1:
|
|
|
- openCalculatorPopup() // 打开计算器弹出层
|
|
|
- break
|
|
|
- case 2:
|
|
|
- openClearCachePopup() // 打开清除缓存弹出层
|
|
|
- break
|
|
|
- default:
|
|
|
- }
|
|
|
+ if (2 == e.detail.index) { // 打卡
|
|
|
+ $tab.navigateTo('/pages/mine/clockIn/clockIn')
|
|
|
}
|
|
|
- // 计算器
|
|
|
- const calculatorPopup = ref(null)
|
|
|
- function openCalculatorPopup() { // 打开计算器弹出层
|
|
|
- calculatorPopup.value.open()
|
|
|
+}
|
|
|
+function changeDiaryGrid(e) {
|
|
|
+ if (1 == e.detail.index) {
|
|
|
+ wx.navigateToMiniProgram({
|
|
|
+ appId: 'wxd45c635d754dbf59',
|
|
|
+ path: `pages/detail/detail?url=https://docs.qq.com/sheet/DZndGYU5aWVBpR1Nm`
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
- // 清除缓存
|
|
|
- const clearCacheDialog = ref(null)
|
|
|
- function openClearCachePopup() { // 打开清除缓存弹出层
|
|
|
- clearCacheDialog.value.open()
|
|
|
+ if (2 == e.detail.index) {
|
|
|
+ $tab.navigateTo('/pages/work/diary/index')
|
|
|
+ return
|
|
|
}
|
|
|
- // const userStore = useUserStore()
|
|
|
- function clearCache() {
|
|
|
- const userInfo = getUserInfo()
|
|
|
- uni.clearStorageSync();
|
|
|
- uni.setStorageSync('userInfo', userInfo)
|
|
|
- // 提示用户缓存清理成功
|
|
|
- uni.showToast({
|
|
|
- title: '缓存清理成功',
|
|
|
- icon: 'success',
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
+}
|
|
|
+function changeToolsGrid(e) { // 点击工具宫格
|
|
|
+ switch (e.detail.index) {
|
|
|
+ case 1:
|
|
|
+ openCalculatorPopup() // 打开计算器弹出层
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ openClearCachePopup() // 打开清除缓存弹出层
|
|
|
+ break
|
|
|
+ default:
|
|
|
}
|
|
|
+}
|
|
|
+// 计算器
|
|
|
+const calculatorPopup = ref(null)
|
|
|
+function openCalculatorPopup() { // 打开计算器弹出层
|
|
|
+ calculatorPopup.value.open()
|
|
|
+}
|
|
|
+// 清除缓存
|
|
|
+const clearCacheDialog = ref(null)
|
|
|
+function openClearCachePopup() { // 打开清除缓存弹出层
|
|
|
+ clearCacheDialog.value.open()
|
|
|
+}
|
|
|
+// const userStore = useUserStore()
|
|
|
+function clearCache() {
|
|
|
+ const userInfo = getUserInfo()
|
|
|
+ uni.clearStorageSync();
|
|
|
+ uni.setStorageSync('userInfo', userInfo)
|
|
|
+ // 提示用户缓存清理成功
|
|
|
+ uni.showToast({
|
|
|
+ title: '缓存清理成功',
|
|
|
+ icon: 'success',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- @import "@/static/font/ygoa/iconfont.css";
|
|
|
+@import "@/static/font/ygoa/iconfont.css";
|
|
|
|
|
|
- .ygoa-icon {
|
|
|
- font-size: 80rpx;
|
|
|
- // color: #468bf0;
|
|
|
- }
|
|
|
+.ygoa-icon {
|
|
|
+ font-size: 80rpx;
|
|
|
+ // color: #468bf0;
|
|
|
+}
|
|
|
|
|
|
- /* #ifndef APP-NVUE */
|
|
|
- page {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- box-sizing: border-box;
|
|
|
- background-color: #fff;
|
|
|
- min-height: 100%;
|
|
|
- height: auto;
|
|
|
- }
|
|
|
+/* #ifndef APP-NVUE */
|
|
|
+page {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background-color: #fff;
|
|
|
+ min-height: 100%;
|
|
|
+ height: auto;
|
|
|
+}
|
|
|
|
|
|
- view {
|
|
|
- font-size: 14px;
|
|
|
- line-height: inherit;
|
|
|
- }
|
|
|
+view {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: inherit;
|
|
|
+}
|
|
|
|
|
|
- /* #endif */
|
|
|
+/* #endif */
|
|
|
|
|
|
- .text {
|
|
|
- text-align: center;
|
|
|
- font-size: 26rpx;
|
|
|
- margin-top: 10rpx;
|
|
|
- }
|
|
|
+.text {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 26rpx;
|
|
|
+ margin-top: 10rpx;
|
|
|
+}
|
|
|
|
|
|
- .grid-item-box {
|
|
|
- flex: 1;
|
|
|
- /* #ifndef APP-NVUE */
|
|
|
- display: flex;
|
|
|
- /* #endif */
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- padding: 15px 0;
|
|
|
- }
|
|
|
+.grid-item-box {
|
|
|
+ flex: 1;
|
|
|
+ /* #ifndef APP-NVUE */
|
|
|
+ display: flex;
|
|
|
+ /* #endif */
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 15px 0;
|
|
|
+}
|
|
|
|
|
|
- .uni-margin-wrap {
|
|
|
- width: 690rpx;
|
|
|
- width: 100%;
|
|
|
- ;
|
|
|
- }
|
|
|
+.uni-margin-wrap {
|
|
|
+ width: 690rpx;
|
|
|
+ width: 100%;
|
|
|
+ ;
|
|
|
+}
|
|
|
|
|
|
- .swiper {
|
|
|
- height: 300rpx;
|
|
|
- }
|
|
|
+.swiper {
|
|
|
+ height: 300rpx;
|
|
|
+}
|
|
|
|
|
|
- .swiper-box {
|
|
|
- height: 150px;
|
|
|
- }
|
|
|
+.swiper-box {
|
|
|
+ height: 150px;
|
|
|
+}
|
|
|
+
|
|
|
+.swiper-item {
|
|
|
+ /* #ifndef APP-NVUE */
|
|
|
+ display: flex;
|
|
|
+ /* #endif */
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ color: #fff;
|
|
|
+ height: 300rpx;
|
|
|
+ line-height: 300rpx;
|
|
|
+}
|
|
|
|
|
|
- .swiper-item {
|
|
|
+@media screen and (min-width: 500px) {
|
|
|
+ .uni-swiper-dot-box {
|
|
|
+ width: 400px;
|
|
|
/* #ifndef APP-NVUE */
|
|
|
- display: flex;
|
|
|
+ margin: 0 auto;
|
|
|
/* #endif */
|
|
|
- flex-direction: column;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- color: #fff;
|
|
|
- height: 300rpx;
|
|
|
- line-height: 300rpx;
|
|
|
+ margin-top: 8px;
|
|
|
}
|
|
|
|
|
|
- @media screen and (min-width: 500px) {
|
|
|
- .uni-swiper-dot-box {
|
|
|
- width: 400px;
|
|
|
- /* #ifndef APP-NVUE */
|
|
|
- margin: 0 auto;
|
|
|
- /* #endif */
|
|
|
- margin-top: 8px;
|
|
|
- }
|
|
|
-
|
|
|
- .image {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
+ .image {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|