Merge remote-tracking branch 'remotes/origin/master' into minJeecg
# Conflicts: # src/api/process/index.ts # src/pages/process/approvalTabbar.vue # src/pages/process/taskHandle.vue
This commit is contained in:
commit
99435c0610
32
src/api/pages/absence/index.ts
Normal file
32
src/api/pages/absence/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { http } from '@/utils/http';
|
||||
|
||||
/*根据username获取职位名称和审批领导列表*/
|
||||
export function queryZwmcAndExaApi(username : string) {
|
||||
return http({
|
||||
url: '/CxcQxj/cxcQxj/queryZwmcByUsername',
|
||||
method: 'GET',
|
||||
data: {
|
||||
username
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/*新增请假申请*/
|
||||
export function addApi(config : Object) {
|
||||
return http({
|
||||
url: '/CxcQxj/cxcQxj/add',
|
||||
method: 'POST',
|
||||
data: config
|
||||
})
|
||||
}
|
||||
|
||||
/*根据username获取最新请假结束日期*/
|
||||
export function queryHisDateApi(username : string) {
|
||||
return http({
|
||||
url: '/CxcQxj/cxcQxj/queryHisDate',
|
||||
method: 'GET',
|
||||
data: {
|
||||
username
|
||||
}
|
||||
})
|
||||
}
|
9
src/api/pages/duty/index.ts
Normal file
9
src/api/pages/duty/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { http } from '@/utils/http';
|
||||
|
||||
export function getListApi(config : Object) { // 值班按月查看
|
||||
return http({
|
||||
url: '/zhgl_zbgl/zhglZbglZbb/list',
|
||||
method: 'GET',
|
||||
data: config
|
||||
})
|
||||
}
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -1,21 +1,16 @@
|
||||
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) { // 我的任务列表
|
||||
/*我的任务列表*/
|
||||
export function taskListApi(config : Object) {
|
||||
return http({
|
||||
url: '/act/task/list',
|
||||
method: 'GET',
|
||||
data: config
|
||||
})
|
||||
}
|
||||
export function taskHistoryListApi(config : Object) { // 我的历史任务列表
|
||||
|
||||
/*历史任务列表*/
|
||||
export function taskHistoryListApi(config : Object) {
|
||||
return http({
|
||||
url: '/act/task/taskHistoryList',
|
||||
method: 'GET',
|
||||
@ -23,6 +18,7 @@ export function taskHistoryListApi(config : Object) { // 我的历史任务列
|
||||
})
|
||||
}
|
||||
|
||||
/*签收*/
|
||||
export function claim(config : Object) {
|
||||
return http({
|
||||
url: '/act/task/claim',
|
||||
@ -31,6 +27,14 @@ export function claim(config : Object) {
|
||||
})
|
||||
}
|
||||
|
||||
/*发起流程*/
|
||||
export function startMutilProcessApi(config : Object) { // 发起流程
|
||||
return http({
|
||||
url: '/process/extActProcess/startMutilProcess',
|
||||
method: 'POST',
|
||||
data: config
|
||||
})
|
||||
}
|
||||
export function getProcessNodeInfo(config : Object) { // 获取节点信息
|
||||
return http({
|
||||
url: '/process/extActProcessNode/getProcessNodeInfo',
|
||||
|
@ -66,3 +66,16 @@ export function queryCarouselApi(config) {
|
||||
data: config
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类字典
|
||||
*/
|
||||
export function getCategoryItemsApi(pid) { // 分类字典专用
|
||||
return http({
|
||||
url: '/sys/category/findtree',
|
||||
method: 'GET',
|
||||
data: {
|
||||
pid
|
||||
}
|
||||
})
|
||||
}
|
@ -1,193 +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')
|
||||
}
|
||||
console.log('props:', props)
|
||||
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>
|
@ -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),
|
||||
|
@ -218,6 +218,24 @@
|
||||
"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",
|
||||
|
336
src/pages/humanResources/absence/apply.vue
Normal file
336
src/pages/humanResources/absence/apply.vue
Normal file
@ -0,0 +1,336 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '请假申请',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<PageLayout navTitle="请假申请">
|
||||
<wd-form ref="form" :model="model">
|
||||
<wd-cell-group border>
|
||||
<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: '请输入工作单位' }]" />
|
||||
<wd-input label="联系方式" prop="phone" v-model="model.phone" readonly
|
||||
:rules="[{ required: true, message: '请输入联系方式' }]" />
|
||||
<wd-col-picker label="请假类型" prop="type" v-model="model.type" :columns="typeData" @confirm="queryMinDate"
|
||||
:column-change="columnChange" :display-format="displayFormat" :rules="[{
|
||||
validator: (val) => validateType(val),
|
||||
message: ifOk ? '请选择请假类型' : '有未销假数据,当前只能选择干部离返濮报备', required: true }]" />
|
||||
<wd-calendar label="开始时间" prop="begintime" v-model="model.begintime" @confirm="begintimeConfirm"
|
||||
:rules="[{ required: true, message: '请选择开始时间' }]" :min-date="minBegintime" />
|
||||
<wd-calendar label="结束时间" prop="endtime" v-model="model.endtime"
|
||||
:rules="[{ required: true, message: '请选择结束时间' }]" :min-date="minEndtime" />
|
||||
<wd-picker :label="examineleader" prop="examineleader" v-model="model.examineleader"
|
||||
:columns="examineleaderData" :rules="[{ required: true, message: '请选择' + examineleader }]" />
|
||||
<wd-input label="出发地" prop="departure" v-model="model.departure"
|
||||
:rules="[{ required: true, message: '请输入出发地' }]" />
|
||||
<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: '请输入请假事由' }]" />
|
||||
<wd-cell title="附件" title-width="100px" prop="path">
|
||||
<wd-upload v-model:file-list="model.path" :action="uploadUrl" multiple></wd-upload>
|
||||
</wd-cell>
|
||||
</wd-cell-group>
|
||||
<view class="footer">
|
||||
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
|
||||
</view>
|
||||
</wd-form>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
useMessage,
|
||||
useToast
|
||||
} from 'wot-design-uni'
|
||||
import {
|
||||
useAppStore
|
||||
} from '@/store';
|
||||
import {
|
||||
useUserStore
|
||||
} from '@/store/user'
|
||||
import {
|
||||
getCategoryItemsApi
|
||||
} from '@/api/system'
|
||||
import {
|
||||
queryZwmcAndExaApi,
|
||||
addApi,
|
||||
queryHisDateApi
|
||||
} from '@/api/pages/absence'
|
||||
import {
|
||||
queryPostByUserIdApi
|
||||
} from '@/api/system/user'
|
||||
import {
|
||||
getEnvBaseUrl
|
||||
} from '@/utils/index'
|
||||
|
||||
const message = useMessage()
|
||||
const toast = useToast()
|
||||
const appStore = useAppStore();
|
||||
const userStore = useUserStore();
|
||||
const model = reactive({
|
||||
contractNumber: userStore.userInfo.workNo,
|
||||
sysOrgCode: userStore.userInfo.orgCode,
|
||||
username: userStore.userInfo.username,
|
||||
phone: userStore.userInfo.phone,
|
||||
type: [], //用[]、0无法正常被验证 就是不选请假类型时也能通过表单验证 所以在form中使用自定义验证
|
||||
begintime: null,
|
||||
endtime: null,
|
||||
examineleader: '',
|
||||
departure: appStore.location,
|
||||
destination: '',
|
||||
reason: '',
|
||||
path: []
|
||||
})
|
||||
const form = ref()
|
||||
const data = ref([])
|
||||
const typeData = ref([])
|
||||
const examineleaderData = ref([])
|
||||
/**判断显示审批 / 分管领导*/
|
||||
const examineleader = ref('')
|
||||
const zwmc = ref('')
|
||||
const ifOk = ref(true)
|
||||
const minBegintime = ref(0)
|
||||
const minEndtime = ref(0)
|
||||
/**返回的最新一条请假结束时间*/
|
||||
const resDate = ref('')
|
||||
const uploadUrl = ref(getEnvBaseUrl() + '/sys/common/upload?appPath=职工请假/' + userStore.userInfo.department + '/' +
|
||||
userStore.userInfo.realname)
|
||||
const columnChange = ({
|
||||
selectedItem,
|
||||
resolve,
|
||||
finish
|
||||
}) => {
|
||||
const areaData = findChildren(data.value, selectedItem.value)
|
||||
if (areaData && areaData.length) {
|
||||
resolve(
|
||||
areaData.map((item) => {
|
||||
return {
|
||||
value: item.name,
|
||||
label: item.name
|
||||
}
|
||||
})
|
||||
)
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
const findChildren = (data, code) => {
|
||||
if (!code) {
|
||||
return data
|
||||
}
|
||||
for (const item of data) {
|
||||
if (item.name === code) {
|
||||
return item.children || null
|
||||
}
|
||||
if (item.children) {
|
||||
const childrenResult = findChildren(item.children, code)
|
||||
if (childrenResult) {
|
||||
return childrenResult
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
const displayFormat = (selectedItems) => {
|
||||
if (selectedItems.length > 0) {
|
||||
return selectedItems[selectedItems.length - 1].label
|
||||
}
|
||||
}
|
||||
const validateType = (val) => {
|
||||
if (!val || val.length === 0) return false // 必须选择
|
||||
const selectedType = val[val.length - 1] // 获取最后一级选中的类型
|
||||
// ifOk为true时可以选任何类型,为false时只能选"干部离返濮报备"
|
||||
return ifOk.value ? true : selectedType === '干部离返濮报备'
|
||||
}
|
||||
|
||||
const handleSubmit = () => {
|
||||
form.value.validate().then(({
|
||||
valid,
|
||||
errors
|
||||
}) => {
|
||||
if (valid) {
|
||||
const submitData = {
|
||||
...model,
|
||||
type: model.type[model.type.length - 1], // 取最后一级
|
||||
begintime: formatDate(model.begintime),
|
||||
endtime: formatDate(model.endtime),
|
||||
zwmc: zwmc.value,
|
||||
path: model.path.map(item => {
|
||||
const response = JSON.parse(item.response);
|
||||
return response.message;
|
||||
}).join(',')
|
||||
}
|
||||
message
|
||||
.confirm({
|
||||
msg: '确认提交请假申请?',
|
||||
title: '提示',
|
||||
})
|
||||
.then(() => {
|
||||
addApi(submitData).then(res => {
|
||||
console.log('----', res)
|
||||
// if (res.success) {
|
||||
// startMutilProcess(res.message)
|
||||
// } else {
|
||||
toast.warning(res.message)
|
||||
// }
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function formatDate(date) {
|
||||
date = new Date(date)
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
/*获取请假类型*/
|
||||
const getTypeList = () => {
|
||||
getCategoryItemsApi('1838487445813645313').then((res) => {
|
||||
if (res.success) {
|
||||
data.value = res.result
|
||||
typeData.value = [data.value.map(item => {
|
||||
return {
|
||||
value: item.name,
|
||||
label: item.name
|
||||
}
|
||||
})]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getZwmcAndExa = () => {
|
||||
queryZwmcAndExaApi(userStore.userInfo.username).then((res) => {
|
||||
if (res.success) {
|
||||
examineleaderData.value = res.result.list.map(item => {
|
||||
return {
|
||||
label: item.realname,
|
||||
value: item.username
|
||||
}
|
||||
})
|
||||
zwmc.value = res.result.zwmc
|
||||
if (zwmc.value == '单位专家' || zwmc.value == '基层正职' || zwmc.value == '高级主管') {
|
||||
examineleader.value = '分管领导';
|
||||
} else {
|
||||
examineleader.value = '审批领导';
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'error'
|
||||
})
|
||||
setTimeout(() => {
|
||||
handleClickLeft()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const queryHisDate = () => {
|
||||
queryPostByUserIdApi(userStore.userInfo.userid).then(ress => {
|
||||
queryHisDateApi(userStore.userInfo.username).then(res => {
|
||||
if (ress == '员工') { // 员工需要先销假,才能新增请假信息
|
||||
if (res.endtime != null && res.resumptiontime == null) {
|
||||
uni.showToast({
|
||||
title: '请先销假上一条请假信息!',
|
||||
icon: 'error'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
return
|
||||
}
|
||||
} else { //基层干部请假
|
||||
if (res.endtime != null && res.resumptiontime == null) {
|
||||
ifOk.value = false; //ifOk为false时,说明 有未销假数据 ,只能请 '干部离返濮'
|
||||
} else {
|
||||
ifOk.value = true;
|
||||
}
|
||||
}
|
||||
resDate.value = res.resumptiontime ? dateStringToTimestamp(res.resumptiontime) :
|
||||
res.endtime ? dateStringToTimestamp(res.endtime, 1) : null
|
||||
queryMinDate();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 将日期字符串转换为13位时间戳(支持yyyymmdd和yyyy-mm-dd格式)
|
||||
* @param {string} dateStr
|
||||
* @returns {number} 13位时间戳(毫秒)
|
||||
*/
|
||||
function dateStringToTimestamp(dateStr, flag) {
|
||||
if (dateStr != null) {
|
||||
const normalized = dateStr.replace(/-/g, '');
|
||||
const year = parseInt(normalized.substring(0, 4));
|
||||
const month = parseInt(normalized.substring(4, 6)) - 1;
|
||||
const day = parseInt(normalized.substring(6, 8));
|
||||
const date = new Date(year, month, day);
|
||||
// 如果flag为1,则增加一天
|
||||
if (flag === 1) {
|
||||
date.setDate(date.getDate() + 1);
|
||||
}
|
||||
return date.getTime();
|
||||
} else { // dateStr为空返回当天时间戳
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
return today.getTime();
|
||||
}
|
||||
}
|
||||
|
||||
const queryMinDate = () => {
|
||||
const today = new Date(); // 获取当前日期
|
||||
if (resDate.value) {
|
||||
if (model.type[model.type.length - 1] != '干部离返濮报备') {
|
||||
minBegintime.value = resDate.value;
|
||||
} else {
|
||||
const today = new Date(); // 当前日期
|
||||
const sixMonthsAgo = new Date(today);
|
||||
sixMonthsAgo.setMonth(today.getMonth() - 3); // 3个月前 min-date尽量不要设置过大,避免大量数据的计算和传递导致页面性能低下。
|
||||
minBegintime.value = sixMonthsAgo.getTime();
|
||||
}
|
||||
model.begintime = resDate.value > dateStringToTimestamp() ? resDate.value : dateStringToTimestamp()
|
||||
} else {
|
||||
const today = new Date(); // 当前日期
|
||||
const sixMonthsAgo = new Date(today);
|
||||
sixMonthsAgo.setMonth(today.getMonth() - 3); // 3个月前 min-date尽量不要设置过大,避免大量数据的计算和传递导致页面性能低下。
|
||||
minBegintime.value = sixMonthsAgo.getTime();
|
||||
// 如果 resDate 不存在 返回当天
|
||||
model.begintime = dateStringToTimestamp()
|
||||
}
|
||||
minEndtime.value = model.begintime
|
||||
}
|
||||
|
||||
const begintimeConfirm = () => {
|
||||
/*将结束时间置空*/
|
||||
model.endtime = null
|
||||
/*改变结束时间最小值*/
|
||||
minEndtime.value = model.begintime
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
/*获取请假类别*/
|
||||
getTypeList()
|
||||
/*获取审批领导*/
|
||||
getZwmcAndExa()
|
||||
/*获取*/
|
||||
queryHisDate()
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.footer {
|
||||
padding: 12px;
|
||||
}
|
||||
</style>
|
@ -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">
|
||||
|
57
src/pages/integrated/duty/index.vue
Normal file
57
src/pages/integrated/duty/index.vue
Normal file
@ -0,0 +1,57 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '干部值班',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<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>
|
||||
<wd-table-col prop="dbld_dictText" label="带班领导" width="73" align="center"></wd-table-col>
|
||||
<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>
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getListApi
|
||||
} from '@/api/pages/duty'
|
||||
const dataValue = ref(Date.now())
|
||||
const dataSource = ref([])
|
||||
const getList = () => {
|
||||
const date = new Date(dataValue.value);
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1;
|
||||
getListApi({
|
||||
year: year,
|
||||
month: month
|
||||
}).then(res => {
|
||||
// 格式化日期字段
|
||||
dataSource.value = res.result.records.map(item => {
|
||||
return {
|
||||
...item,
|
||||
date: formatDate(item.date) // 调用格式化函数
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const formatDate = (dateStr) => {
|
||||
if (!dateStr) return '';
|
||||
const [year, month, day] = dateStr.split('-');
|
||||
const formattedMonth = parseInt(month, 10); // 去除前导 0
|
||||
const formattedDay = parseInt(day, 10); // 去除前导 0
|
||||
return `${formattedMonth}.${formattedDay}`;
|
||||
};
|
||||
|
||||
onLoad(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -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'
|
||||
@ -71,12 +70,11 @@
|
||||
const loading = ref(false)
|
||||
const userName = ref()
|
||||
const password = ref()
|
||||
const showPassword = ref(false) //是否显示明文
|
||||
const showPassword = ref(true) //是否显示明文
|
||||
const remPW = ref(false) //是否记住密码
|
||||
/**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
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,19 +8,14 @@
|
||||
}
|
||||
</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-col-picker label="选择目录" v-model="selectedValue" :columns="dataSource" :column-change="columnChange"
|
||||
@confirm="handleConfirm" :display-format="displayFormat" ></wd-col-picker>
|
||||
|
||||
@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';
|
||||
@ -42,19 +34,11 @@
|
||||
getPathByInsflagQuote,
|
||||
queryByIdApi
|
||||
} from '@/api/pages/sc';
|
||||
import {
|
||||
useColPickerData
|
||||
} from '@/hooks/useColPickerData'
|
||||
import Base64 from '@/utils/code';
|
||||
import {
|
||||
getEnvBaseUrl
|
||||
} from '@/utils/index'
|
||||
const {
|
||||
colPickerData,
|
||||
findChildrenByCode
|
||||
} = useColPickerData()
|
||||
|
||||
const appStore = useAppStore();
|
||||
const data = ref([])
|
||||
const dataSource = ref([])
|
||||
const selectedValue = ref([]);
|
||||
@ -63,9 +47,6 @@
|
||||
const url = ref('')
|
||||
const fileUrl = ref('')
|
||||
const fileUrl2 = ref([])
|
||||
const handleClickLeft = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
const columnChange = ({
|
||||
selectedItem,
|
||||
resolve,
|
||||
@ -95,16 +76,18 @@
|
||||
let quote = res.result.quote
|
||||
let insFlag = res.result.insFlag
|
||||
if (url) {
|
||||
fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(getEnvBaseUrl() + '/sys/common/static/' + url))
|
||||
}else if(/^-?\d+$/.test(quote) && !insFlag){
|
||||
fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64
|
||||
.encode(getEnvBaseUrl() + '/sys/common/static/' + url))
|
||||
} else if (/^-?\d+$/.test(quote) && !insFlag) {
|
||||
getJobDesIdByDepAndName({
|
||||
jobname: quote,
|
||||
jobdep: useUserStore().userInfo.orgCode
|
||||
}).then((res) => {
|
||||
fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res.id +
|
||||
fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res
|
||||
.id +
|
||||
"&token=" + useUserStore().userInfo.token;
|
||||
})
|
||||
}else if(insFlag){
|
||||
} else if (insFlag) {
|
||||
getPathByInsflagQuote({
|
||||
insFlag: insFlag,
|
||||
quote: quote
|
||||
@ -112,7 +95,7 @@
|
||||
fileUrl.value = ''
|
||||
fileUrl2.value = res;
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
fileUrl.value = ''
|
||||
fileUrl2.value = ''
|
||||
}
|
||||
@ -143,21 +126,36 @@
|
||||
});
|
||||
};
|
||||
|
||||
const findChildrenByCode = (data, code) => {
|
||||
if (!code) {
|
||||
return data
|
||||
}
|
||||
for (const item of data) {
|
||||
if (item.value === code) {
|
||||
return item.children || null
|
||||
}
|
||||
if (item.children) {
|
||||
const childrenResult = findChildrenByCode(item.children, code)
|
||||
if (childrenResult) {
|
||||
return childrenResult
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
// 判断是否是 H5 环境
|
||||
const isH5 = () => {
|
||||
// #ifdef H5
|
||||
return true;
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
return false;
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
return true;
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
return false;
|
||||
// #endif
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
getList();
|
||||
//#ifdef H5 || MP-WEIXIN
|
||||
ifH5 = true;
|
||||
//#endif
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
@ -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()
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { createRouter } from '@/plugin/uni-mini-router'
|
||||
// 导入pages.json
|
||||
import pagesJson from '../pages.json'
|
||||
console.log("pagesJson::",pagesJson);
|
||||
// 引入uni-parse-pages
|
||||
import pagesJsonToRoutes from 'uni-parse-pages'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
2
src/types/uni-pages.d.ts
vendored
2
src/types/uni-pages.d.ts
vendored
@ -23,6 +23,8 @@ 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" |
|
||||
|
@ -371,7 +371,7 @@ export const getLocation = () => {
|
||||
});
|
||||
}
|
||||
|
||||
const getWeather = (lat : string, lon : string) => {
|
||||
const getWeather = (lat : number, lon : number) => {
|
||||
let params = {
|
||||
lat: lat,
|
||||
lon: lon
|
||||
@ -388,7 +388,7 @@ function handleDefaultLocation() {
|
||||
}
|
||||
|
||||
|
||||
function weatherRequest(params: { lat?: string; lon?: string; q?: string }) {
|
||||
function weatherRequest(params : { lat ?: string; lon ?: string; q ?: string }) {
|
||||
const store = useAppStore()
|
||||
uni.request({
|
||||
url: 'https://api.openweathermap.org/data/2.5/weather',
|
||||
|
Loading…
Reference in New Issue
Block a user