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';
|
import { http } from '@/utils/http';
|
||||||
|
|
||||||
export function queryDocumentApi(config) { // 公文列表
|
export function queryDocumentApi(config : Object) { // 公文列表
|
||||||
return http({
|
return http({
|
||||||
url: '/cxcoagwfb/cxcOaGwfb/bpmlist',
|
url: '/cxcoagwfb/cxcOaGwfb/bpmlist',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -8,7 +8,7 @@ export function queryDocumentApi(config) { // 公文列表
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryNoticeApi(config) { // 公告
|
export function queryNoticeApi(config : Object) { // 公告
|
||||||
return http({
|
return http({
|
||||||
url: '/cxctz/cxcTz/list',
|
url: '/cxctz/cxcTz/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -16,7 +16,7 @@ export function queryNoticeApi(config) { // 公告
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function querySuperiorSystemApi(config) { // 上级制度
|
export function querySuperiorSystemApi(config : Object) { // 上级制度
|
||||||
return http({
|
return http({
|
||||||
url: '/cxcjyglsjzdgl/cxcJyglSjzdgl/zslist',
|
url: '/cxcjyglsjzdgl/cxcJyglSjzdgl/zslist',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -24,7 +24,7 @@ export function querySuperiorSystemApi(config) { // 上级制度
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryFactorySystemApi(config) { // 厂级制度
|
export function queryFactorySystemApi(config : Object) { // 厂级制度
|
||||||
return http({
|
return http({
|
||||||
url: '/cxczd/cxcZdgl/list',
|
url: '/cxczd/cxcZdgl/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -32,7 +32,7 @@ export function queryFactorySystemApi(config) { // 厂级制度
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function queryRegulationsApi(config) { // 法律法规
|
export function queryRegulationsApi(config : Object) { // 法律法规
|
||||||
return http({
|
return http({
|
||||||
url: '/cxcoaflgf/cxcOaFlgf/zslist',
|
url: '/cxcoaflgf/cxcOaFlgf/zslist',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -8,7 +8,7 @@ export function getListApi(orgCode : string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getJobDesIdByDepAndName(config) {
|
export function getJobDesIdByDepAndName(config : Object) {
|
||||||
return http({
|
return http({
|
||||||
url: '/sjgl.tynr/cxcSjJobdescription/queryByNameDep',
|
url: '/sjgl.tynr/cxcSjJobdescription/queryByNameDep',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -16,7 +16,7 @@ export function getJobDesIdByDepAndName(config) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPathByInsflagQuote(config) {
|
export function getPathByInsflagQuote(config : Object) {
|
||||||
return http({
|
return http({
|
||||||
url: '/sjgl.scnr/cxcSjSc/getPathByInsflagQuote',
|
url: '/sjgl.scnr/cxcSjSc/getPathByInsflagQuote',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -1,21 +1,16 @@
|
|||||||
import { http } from '@/utils/http';
|
import { http } from '@/utils/http';
|
||||||
|
|
||||||
export function getListApi(orgCode : string) {
|
/*我的任务列表*/
|
||||||
return http({
|
export function taskListApi(config : Object) {
|
||||||
url: '/sjgl.scnr/cxcSjSc/queryTreeData',
|
|
||||||
method: 'GET',
|
|
||||||
data: { orgCode }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function taskListApi(config : Object) { // 我的任务列表
|
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/list',
|
url: '/act/task/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function taskHistoryListApi(config : Object) { // 我的历史任务列表
|
|
||||||
|
/*历史任务列表*/
|
||||||
|
export function taskHistoryListApi(config : Object) {
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/taskHistoryList',
|
url: '/act/task/taskHistoryList',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@ -23,6 +18,7 @@ export function taskHistoryListApi(config : Object) { // 我的历史任务列
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*签收*/
|
||||||
export function claim(config : Object) {
|
export function claim(config : Object) {
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/claim',
|
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) { // 获取节点信息
|
export function getProcessNodeInfo(config : Object) { // 获取节点信息
|
||||||
return http({
|
return http({
|
||||||
url: '/process/extActProcessNode/getProcessNodeInfo',
|
url: '/process/extActProcessNode/getProcessNodeInfo',
|
||||||
|
@ -66,3 +66,16 @@ export function queryCarouselApi(config) {
|
|||||||
data: config
|
data: config
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分类字典
|
||||||
|
*/
|
||||||
|
export function getCategoryItemsApi(pid) { // 分类字典专用
|
||||||
|
return http({
|
||||||
|
url: '/sys/category/findtree',
|
||||||
|
method: 'GET',
|
||||||
|
data: {
|
||||||
|
pid
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
@ -1,21 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pageLayout">
|
<view :class="['pageLayout', { 'gray': appStore.isGray == 1 }]">
|
||||||
<view
|
<view v-if="navbarShow" :class="{ pageNav: true, transparent: navBgTransparent, fixed: navFixed }"
|
||||||
v-if="navbarShow"
|
:style="{ height: `${statusBarHeight + navHeight}px` }">
|
||||||
:class="{ pageNav: true, transparent: navBgTransparent, fixed: navFixed }"
|
|
||||||
:style="{ height: `${statusBarHeight + navHeight}px` }"
|
|
||||||
>
|
|
||||||
<view class="statusBar" :style="{ height: `${statusBarHeight}px` }"></view>
|
<view class="statusBar" :style="{ height: `${statusBarHeight}px` }"></view>
|
||||||
<wd-navbar
|
<wd-navbar :bordered="!navBgTransparent" :title="navTitle" :leftText="navLeftText" :leftArrow="navLeftArrow"
|
||||||
:bordered="!navBgTransparent"
|
:rightText="navRightText" @clickLeft="handleClickLeft" @clickRight="handleClickRight"
|
||||||
:title="navTitle"
|
custom-class="nav">
|
||||||
:leftText="navLeftText"
|
|
||||||
:leftArrow="navLeftArrow"
|
|
||||||
:rightText="navRightText"
|
|
||||||
@clickLeft="handleClickLeft"
|
|
||||||
@clickRight="handleClickRight"
|
|
||||||
custom-class="nav"
|
|
||||||
>
|
|
||||||
<template v-if="$slots.navRight" #right>
|
<template v-if="$slots.navRight" #right>
|
||||||
<slot name="navRight"></slot>
|
<slot name="navRight"></slot>
|
||||||
</template>
|
</template>
|
||||||
@ -32,21 +22,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSlots } from 'vue'
|
import { useSlots } from 'vue'
|
||||||
import { useRouter } from '@/plugin/uni-mini-router'
|
import { useRouter } from '@/plugin/uni-mini-router'
|
||||||
import { useParamsStore } from '@/store/page-params'
|
import { useParamsStore } from '@/store/page-params'
|
||||||
|
import { useAppStore } from '@/store'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'pageLayout',
|
name: 'pageLayout',
|
||||||
options: {
|
options: {
|
||||||
// apply-shared:当前页面样式会影响到子组件样式.(小程序)
|
// apply-shared:当前页面样式会影响到子组件样式.(小程序)
|
||||||
// shared:当前页面样式影响到子组件,子组件样式也会影响到当前页面.(小程序)
|
// shared:当前页面样式影响到子组件,子组件样式也会影响到当前页面.(小程序)
|
||||||
styleIsolation: 'shared',
|
styleIsolation: 'shared',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const paramsStore = useParamsStore()
|
const appStore = useAppStore()
|
||||||
const router = useRouter()
|
const paramsStore = useParamsStore()
|
||||||
const props = defineProps({
|
const router = useRouter()
|
||||||
|
const props = defineProps({
|
||||||
backRouteName: {
|
backRouteName: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
@ -57,11 +49,11 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
routeParams: {
|
routeParams: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {},
|
default: () => { },
|
||||||
},
|
},
|
||||||
routeQuery: {
|
routeQuery: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {},
|
default: () => { },
|
||||||
},
|
},
|
||||||
routeMethod: {
|
routeMethod: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -99,13 +91,13 @@ const props = defineProps({
|
|||||||
typeof: String,
|
typeof: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const slot = useSlots()
|
const slot = useSlots()
|
||||||
const globalData = getApp().globalData
|
const globalData = getApp().globalData
|
||||||
const { systemInfo, navHeight } = globalData
|
const { systemInfo, navHeight } = globalData
|
||||||
const { statusBarHeight } = systemInfo
|
const { statusBarHeight } = systemInfo
|
||||||
const emit = defineEmits(['navBack', 'navRight'])
|
const emit = defineEmits(['navBack', 'navRight'])
|
||||||
const handleClickLeft = () => {
|
const handleClickLeft = () => {
|
||||||
emit('navBack')
|
emit('navBack')
|
||||||
// 只有在页面中才默认返回,弹层中不返回
|
// 只有在页面中才默认返回,弹层中不返回
|
||||||
if (props.type === 'page') {
|
if (props.type === 'page') {
|
||||||
@ -133,42 +125,46 @@ const handleClickLeft = () => {
|
|||||||
clearPageParamsCache()
|
clearPageParamsCache()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const clearPageParamsCache = () => {
|
const clearPageParamsCache = () => {
|
||||||
// 清除页面传参缓存
|
// 清除页面传参缓存
|
||||||
const pages = getCurrentPages()
|
const pages = getCurrentPages()
|
||||||
const curPage = pages[pages.length - 1]
|
const curPage = pages[pages.length - 1]
|
||||||
const curRoute = curPage.route
|
const curRoute = curPage.route
|
||||||
const name = curRoute.split('/').pop()
|
const name = curRoute.split('/').pop()
|
||||||
paramsStore.clearPageParams(name)
|
paramsStore.clearPageParams(name)
|
||||||
}
|
}
|
||||||
const handleClickRight = () => {
|
const handleClickRight = () => {
|
||||||
emit('navRight')
|
emit('navRight')
|
||||||
}
|
}
|
||||||
console.log('props:', props)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.pageLayout {
|
.pageLayout {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
||||||
.pageNav {
|
.pageNav {
|
||||||
background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
|
background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
|
||||||
|
|
||||||
&.transparent {
|
&.transparent {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.fixed {
|
&.fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.statusBar {
|
.statusBar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.wd-navbar) {
|
:deep(.wd-navbar) {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
--wot-navbar-title-font-weight: 400;
|
--wot-navbar-title-font-weight: 400;
|
||||||
@ -177,6 +173,7 @@ console.log('props:', props)
|
|||||||
--wot-navbar-title-font-size: 16px;
|
--wot-navbar-title-font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pageContent {
|
.pageContent {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -184,10 +181,11 @@ console.log('props:', props)
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabbar {
|
.tabbar {
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
height: var(--window-bottom);
|
height: var(--window-bottom);
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -9,7 +9,6 @@
|
|||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view :class="{ 'gray': appStore.isGray == 1 }">
|
|
||||||
<PageLayout navTitle="编辑资料" backRouteName="people" routeMethod="pushTab">
|
<PageLayout navTitle="编辑资料" backRouteName="people" routeMethod="pushTab">
|
||||||
<wd-form ref="form" :model="model">
|
<wd-form ref="form" :model="model">
|
||||||
<wd-cell-group border>
|
<wd-cell-group border>
|
||||||
@ -18,8 +17,7 @@
|
|||||||
</wd-cell>
|
</wd-cell>
|
||||||
<wd-input label="统一身份认证" prop="username" label-width="100px" v-model="model.username"
|
<wd-input label="统一身份认证" prop="username" label-width="100px" v-model="model.username"
|
||||||
:readonly="true" />
|
:readonly="true" />
|
||||||
<wd-input label="姓名" prop="realname" label-width="100px" v-model="model.realname"
|
<wd-input label="姓名" prop="realname" label-width="100px" v-model="model.realname" :readonly="true" />
|
||||||
:readonly="true" />
|
|
||||||
<wd-input label="劳动合同号" prop="workno" label-width="100px" v-model="model.workno" :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="切换登录单位"
|
<wd-select-picker label="单位" type="radio" v-model="model.orgCode" :columns="columns" title="切换登录单位"
|
||||||
:safe-area-inset-bottom="false" label-width="100px"></wd-select-picker>
|
:safe-area-inset-bottom="false" label-width="100px"></wd-select-picker>
|
||||||
@ -35,7 +33,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</wd-form>
|
</wd-form>
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -48,7 +45,6 @@
|
|||||||
import { getFileAccessHttpUrl } from '@/common/uitls'
|
import { getFileAccessHttpUrl } from '@/common/uitls'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { queryDepsByUserIdApi } from '@/api/system/department'
|
import { queryDepsByUserIdApi } from '@/api/system/department'
|
||||||
import { useAppStore } from '@/store'
|
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'chatList',
|
name: 'chatList',
|
||||||
@ -59,7 +55,6 @@
|
|||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const appStore = useAppStore()
|
|
||||||
const columns = ref([])
|
const columns = ref([])
|
||||||
const model = reactive({
|
const model = reactive({
|
||||||
avatar: getFileAccessHttpUrl(userStore.userInfo.avatar),
|
avatar: getFileAccessHttpUrl(userStore.userInfo.avatar),
|
||||||
|
@ -218,6 +218,24 @@
|
|||||||
"navigationStyle": "custom"
|
"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",
|
"path": "pages/operate/file/detail",
|
||||||
"type": "page",
|
"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>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<PageLayout :navbarShow="false" :class="{ 'gray': appStore.isGray == 1 }">
|
<PageLayout :navbarShow="false">
|
||||||
<view class="nav">
|
<view class="nav">
|
||||||
<view class="nav_box">
|
<view class="nav_box">
|
||||||
<view class="weather_calender">
|
<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>
|
<template>
|
||||||
<PageLayout :navbarShow="false">
|
<PageLayout :navbarShow="false">
|
||||||
<view :class="['page-container', { 'gray': appStore.isGray == 1 }]">
|
<view class="page-container">
|
||||||
<view class="text-center">
|
<view class="text-center">
|
||||||
<image src="@/static/sinopec.png" mode="aspectFit" class="logo"></image>
|
<image src="@/static/sinopec.png" mode="aspectFit" class="logo"></image>
|
||||||
<view class="enter-area">
|
<view class="enter-area">
|
||||||
@ -53,7 +53,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useToast } from 'wot-design-uni'
|
import { useToast } from 'wot-design-uni'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useAppStore } from '@/store'
|
|
||||||
import { useUserStore } from '@/store/user'
|
import { useUserStore } from '@/store/user'
|
||||||
import { http } from '@/utils/http'
|
import { http } from '@/utils/http'
|
||||||
import { HOME_PAGE } from '@/common/constants'
|
import { HOME_PAGE } from '@/common/constants'
|
||||||
@ -71,12 +70,11 @@
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const userName = ref()
|
const userName = ref()
|
||||||
const password = ref()
|
const password = ref()
|
||||||
const showPassword = ref(false) //是否显示明文
|
const showPassword = ref(true) //是否显示明文
|
||||||
const remPW = ref(false) //是否记住密码
|
const remPW = ref(false) //是否记住密码
|
||||||
/**h5系统信息中没有appWgtVersion值*/
|
/**h5系统信息中没有appWgtVersion值*/
|
||||||
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
|
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const appStore = useAppStore()
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const handleChangePassword = () => {
|
const handleChangePassword = () => {
|
||||||
showPassword.value = !showPassword.value
|
showPassword.value = !showPassword.value
|
||||||
|
@ -8,65 +8,50 @@
|
|||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view :class="{ 'gray': appStore.isGray == 1 }">
|
<PageLayout navTitle="在线预览">
|
||||||
<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>
|
|
||||||
<view class="serveBox">
|
<view class="serveBox">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="dot"></view>
|
<view class="dot"></view>
|
||||||
<wd-text text="文件预览"></wd-text>
|
<wd-text text="文件预览"></wd-text>
|
||||||
</view>
|
</view>
|
||||||
<view class="f-col">
|
|
||||||
<view v-if="ifH5">
|
<view v-if="ifH5">
|
||||||
<!-- 在线预览 by 闵 -->
|
<!-- 在线预览 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)}`)"
|
<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)">
|
v-for="item,i in detailArr" :text="captureText(item)">
|
||||||
|
|
||||||
</wd-text>
|
</wd-text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<!-- 在线预览 by 闵 -->
|
<!-- 在线预览 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)}`)"
|
<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)">
|
v-for="item,i in detailArr" :text="captureText(item)">
|
||||||
</wd-text>
|
</wd-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
|
||||||
useAppStore
|
|
||||||
} from '@/store'
|
|
||||||
import {
|
import {
|
||||||
ref
|
ref
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad
|
||||||
onShow
|
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
const appStore = useAppStore();
|
|
||||||
const detail = ref({})
|
const detail = ref({})
|
||||||
const detailArr = ref([])
|
const detailArr = ref([])
|
||||||
//判断是否h5 by 闵
|
//判断是否h5 by 闵
|
||||||
var ifH5 = false;
|
var ifH5 = false;
|
||||||
|
const onlinePreview = (url) => { //在线预览文件 by 闵
|
||||||
const onlinePreview = (url)=>{ //在线预览文件 by 闵
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:url
|
url: url
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const captureText = (text) => { //截取字符串显示
|
||||||
const handleClickLeft = () => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
|
|
||||||
const captureText = (text)=>{ //截取字符串显示
|
|
||||||
const match = text.match(/\/([^_]+)(?=_)/);
|
const match = text.match(/\/([^_]+)(?=_)/);
|
||||||
console.log(match)
|
console.log(match)
|
||||||
return match ? match[1] : '';
|
return match ? match[1] : '';
|
||||||
@ -79,19 +64,12 @@
|
|||||||
ifH5 = true;
|
ifH5 = true;
|
||||||
//#endif
|
//#endif
|
||||||
//判断是否只有一个文件
|
//判断是否只有一个文件
|
||||||
if(detailArr.value&&detailArr.value.length==1){
|
if (detailArr.value && detailArr.value.length == 1) {
|
||||||
let url = '/pages/onlinePreview/onlinePreview';
|
let url = '/pages/onlinePreview/onlinePreview';
|
||||||
if(ifH5) url = '/pages/onlinePreview/onlinePreviewH5'
|
if (ifH5) url = '/pages/onlinePreview/onlinePreviewH5'
|
||||||
onlinePreview(url+`?data=${JSON.stringify(options.data)}`);
|
onlinePreview(url + `?data=${JSON.stringify(options.data)}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow (()=>{
|
|
||||||
// if(detailArr.value&&detailArr.value.length==1){
|
|
||||||
// uni.navigateBack()
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -136,6 +114,7 @@
|
|||||||
.serveBox {
|
.serveBox {
|
||||||
margin-bottom: 32upx;
|
margin-bottom: 32upx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -8,19 +8,12 @@
|
|||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view :class="{ 'gray': appStore.isGray == 1 }">
|
<PageLayout navTitle="在线预览">
|
||||||
<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>
|
|
||||||
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
|
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
|
||||||
</view>
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
|
||||||
useAppStore
|
|
||||||
} from '@/store'
|
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
@ -28,19 +21,15 @@
|
|||||||
import {
|
import {
|
||||||
getEnvBaseUrl
|
getEnvBaseUrl
|
||||||
} from '@/utils/index'
|
} from '@/utils/index'
|
||||||
const appStore = useAppStore();
|
|
||||||
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
|
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
|
||||||
var fileUrl = "";
|
var fileUrl = "";
|
||||||
const handleClickLeft = () => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
let base64 = new Base64();
|
let base64 = new Base64();
|
||||||
var url = baseUrl + JSON.parse(options.data);
|
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))
|
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(url))
|
||||||
console.log('-----222',fileUrl)
|
console.log('-----222', fileUrl)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -8,41 +8,30 @@
|
|||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view :class="{ 'gray': appStore.isGray == 1 }">
|
<PageLayout navTitle="在线预览">
|
||||||
<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>
|
|
||||||
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
|
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
|
||||||
</view>
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
|
||||||
useAppStore
|
|
||||||
} from '@/store'
|
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
getEnvBaseUrl
|
getEnvBaseUrl
|
||||||
} from '@/utils/index'
|
} from '@/utils/index'
|
||||||
const appStore = useAppStore();
|
|
||||||
import {
|
import {
|
||||||
Base64
|
Base64
|
||||||
} from 'js-base64'
|
} from 'js-base64'
|
||||||
|
|
||||||
var fileUrl = "";
|
var fileUrl = "";
|
||||||
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
|
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
|
||||||
const handleClickLeft = () => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log(options)
|
console.log(options)
|
||||||
let url = JSON.parse(options.data)
|
let url = JSON.parse(options.data)
|
||||||
url = baseUrl + url;
|
url = baseUrl + url;
|
||||||
console.log(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)
|
console.log(fileUrl)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,11 +8,7 @@
|
|||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view :class="{ 'gray': appStore.isGray == 1 }">
|
<PageLayout navTitle="制度详情">
|
||||||
<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>
|
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<wd-card title="制度">
|
<wd-card title="制度">
|
||||||
<view @click="onlinePreview(`/pages/onlinePreview/detail?data=${dataSource.sszd}`)">
|
<view @click="onlinePreview(`/pages/onlinePreview/detail?data=${dataSource.sszd}`)">
|
||||||
@ -25,7 +21,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</wd-card>
|
</wd-card>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -46,10 +42,6 @@
|
|||||||
const dataSource = ref({})
|
const dataSource = ref({})
|
||||||
var ifH5 = false;
|
var ifH5 = false;
|
||||||
|
|
||||||
const handleClickLeft = () => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
|
|
||||||
const onlinePreview = (url) => {
|
const onlinePreview = (url) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
|
@ -9,20 +9,10 @@
|
|||||||
</route>
|
</route>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view :class="{'gray': appStore.isGray == 1 }">
|
<PageLayout :navTitle="type">
|
||||||
<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>
|
|
||||||
<view class="container">
|
<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>
|
<wd-loading v-if="loading && pageNo === 1" class="loading-tip">加载中...</wd-loading>
|
||||||
<!-- 列表内容 -->
|
<!-- 列表内容 -->
|
||||||
@ -43,7 +33,7 @@
|
|||||||
<wd-loading size="16px">正在加载...</wd-loading>
|
<wd-loading size="16px">正在加载...</wd-loading>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -59,10 +49,6 @@
|
|||||||
queryFactorySystemApi,
|
queryFactorySystemApi,
|
||||||
queryRegulationsApi
|
queryRegulationsApi
|
||||||
} from '@/api/pages/file'
|
} from '@/api/pages/file'
|
||||||
import {
|
|
||||||
useAppStore
|
|
||||||
} from '@/store'
|
|
||||||
const appStore = useAppStore()
|
|
||||||
let pageNo = 1
|
let pageNo = 1
|
||||||
let pageSize = 10
|
let pageSize = 10
|
||||||
let loading = false
|
let loading = false
|
||||||
@ -105,7 +91,8 @@
|
|||||||
fwbt: formatSearchkey()
|
fwbt: formatSearchkey()
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
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
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@ -137,7 +124,8 @@
|
|||||||
zdmc: formatSearchkey()
|
zdmc: formatSearchkey()
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
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
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@ -153,7 +141,8 @@
|
|||||||
zdmc: formatSearchkey()
|
zdmc: formatSearchkey()
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
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
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@ -169,7 +158,8 @@
|
|||||||
flfgmc: formatSearchkey()
|
flfgmc: formatSearchkey()
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
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
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@ -229,42 +219,33 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/* 固定顶部区域 */
|
|
||||||
.fixed-header {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: calc(60px + var(--status-bar-height, 0)) 5px 0 5px;
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
display: flex;
|
margin: 16px;
|
||||||
height: 100%;
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
align-items: center;
|
border-radius: 20px;
|
||||||
width: 100%;
|
|
||||||
padding: 0 10px;
|
|
||||||
|
|
||||||
:deep() {
|
// If you want to style the inner input
|
||||||
.wd-search {
|
::v-deep .wd-search__content {
|
||||||
background: rgba(255, 255, 255, 0.2);
|
background-color: #fff;
|
||||||
border-radius: 18px;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.wd-search__input {
|
.wd-search__input {
|
||||||
color: #fff;
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wd-search__placeholder {
|
.wd-search__placeholder {
|
||||||
color: rgba(255, 255, 255, 0.7);
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If you want to style the search icon
|
||||||
|
::v-deep .wd-search__search-icon {
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,19 +8,14 @@
|
|||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<view :class="{'gray': appStore.isGray == 1 }">
|
<PageLayout navTitle="三册查看">
|
||||||
<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>
|
|
||||||
<wd-col-picker label="选择目录" v-model="selectedValue" :columns="dataSource" :column-change="columnChange"
|
<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" />
|
<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">
|
<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>
|
<wd-card :title="item.name"></wd-card>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -30,9 +25,6 @@
|
|||||||
import {
|
import {
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import {
|
|
||||||
useAppStore
|
|
||||||
} from '@/store';
|
|
||||||
import {
|
import {
|
||||||
useUserStore
|
useUserStore
|
||||||
} from '@/store/user';
|
} from '@/store/user';
|
||||||
@ -42,19 +34,11 @@
|
|||||||
getPathByInsflagQuote,
|
getPathByInsflagQuote,
|
||||||
queryByIdApi
|
queryByIdApi
|
||||||
} from '@/api/pages/sc';
|
} from '@/api/pages/sc';
|
||||||
import {
|
|
||||||
useColPickerData
|
|
||||||
} from '@/hooks/useColPickerData'
|
|
||||||
import Base64 from '@/utils/code';
|
import Base64 from '@/utils/code';
|
||||||
import {
|
import {
|
||||||
getEnvBaseUrl
|
getEnvBaseUrl
|
||||||
} from '@/utils/index'
|
} from '@/utils/index'
|
||||||
const {
|
|
||||||
colPickerData,
|
|
||||||
findChildrenByCode
|
|
||||||
} = useColPickerData()
|
|
||||||
|
|
||||||
const appStore = useAppStore();
|
|
||||||
const data = ref([])
|
const data = ref([])
|
||||||
const dataSource = ref([])
|
const dataSource = ref([])
|
||||||
const selectedValue = ref([]);
|
const selectedValue = ref([]);
|
||||||
@ -63,9 +47,6 @@
|
|||||||
const url = ref('')
|
const url = ref('')
|
||||||
const fileUrl = ref('')
|
const fileUrl = ref('')
|
||||||
const fileUrl2 = ref([])
|
const fileUrl2 = ref([])
|
||||||
const handleClickLeft = () => {
|
|
||||||
uni.navigateBack();
|
|
||||||
};
|
|
||||||
const columnChange = ({
|
const columnChange = ({
|
||||||
selectedItem,
|
selectedItem,
|
||||||
resolve,
|
resolve,
|
||||||
@ -95,16 +76,18 @@
|
|||||||
let quote = res.result.quote
|
let quote = res.result.quote
|
||||||
let insFlag = res.result.insFlag
|
let insFlag = res.result.insFlag
|
||||||
if (url) {
|
if (url) {
|
||||||
fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(getEnvBaseUrl() + '/sys/common/static/' + url))
|
fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64
|
||||||
}else if(/^-?\d+$/.test(quote) && !insFlag){
|
.encode(getEnvBaseUrl() + '/sys/common/static/' + url))
|
||||||
|
} else if (/^-?\d+$/.test(quote) && !insFlag) {
|
||||||
getJobDesIdByDepAndName({
|
getJobDesIdByDepAndName({
|
||||||
jobname: quote,
|
jobname: quote,
|
||||||
jobdep: useUserStore().userInfo.orgCode
|
jobdep: useUserStore().userInfo.orgCode
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res.id +
|
fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res
|
||||||
|
.id +
|
||||||
"&token=" + useUserStore().userInfo.token;
|
"&token=" + useUserStore().userInfo.token;
|
||||||
})
|
})
|
||||||
}else if(insFlag){
|
} else if (insFlag) {
|
||||||
getPathByInsflagQuote({
|
getPathByInsflagQuote({
|
||||||
insFlag: insFlag,
|
insFlag: insFlag,
|
||||||
quote: quote
|
quote: quote
|
||||||
@ -112,7 +95,7 @@
|
|||||||
fileUrl.value = ''
|
fileUrl.value = ''
|
||||||
fileUrl2.value = res;
|
fileUrl2.value = res;
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
fileUrl.value = ''
|
fileUrl.value = ''
|
||||||
fileUrl2.value = ''
|
fileUrl2.value = ''
|
||||||
}
|
}
|
||||||
@ -143,6 +126,24 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 环境
|
// 判断是否是 H5 环境
|
||||||
const isH5 = () => {
|
const isH5 = () => {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
@ -155,9 +156,6 @@
|
|||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getList();
|
getList();
|
||||||
//#ifdef H5 || MP-WEIXIN
|
|
||||||
ifH5 = true;
|
|
||||||
//#endif
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<PageLayout :navbarShow="false">
|
<PageLayout :navbarShow="false">
|
||||||
<view :class="{'gray': appStore.isGray == 1 }">
|
|
||||||
<view class="avatar-area">
|
<view class="avatar-area">
|
||||||
<wd-img width="100" height="100" :round="true" :radius="50"
|
<wd-img width="100" height="100" :round="true" :radius="50"
|
||||||
:src="getFileAccessHttpUrl(userStore.userInfo.avatar)" @click="ChooseImage"></wd-img>
|
:src="getFileAccessHttpUrl(userStore.userInfo.avatar)" @click="ChooseImage"></wd-img>
|
||||||
@ -49,7 +48,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</wd-cell-group>
|
</wd-cell-group>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -64,10 +62,8 @@
|
|||||||
import useUpload from '@/hooks/useUpload'
|
import useUpload from '@/hooks/useUpload'
|
||||||
import { getEnvBaseUrl } from '@/utils/index'
|
import { getEnvBaseUrl } from '@/utils/index'
|
||||||
import { queryPostByUserIdApi, editUserApi } from '@/api/system/user'
|
import { queryPostByUserIdApi, editUserApi } from '@/api/system/user'
|
||||||
import { useAppStore } from '@/store'
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const appStore = useAppStore()
|
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { createRouter } from '@/plugin/uni-mini-router'
|
import { createRouter } from '@/plugin/uni-mini-router'
|
||||||
// 导入pages.json
|
// 导入pages.json
|
||||||
import pagesJson from '../pages.json'
|
import pagesJson from '../pages.json'
|
||||||
console.log("pagesJson::",pagesJson);
|
|
||||||
// 引入uni-parse-pages
|
// 引入uni-parse-pages
|
||||||
import pagesJsonToRoutes from 'uni-parse-pages'
|
import pagesJsonToRoutes from 'uni-parse-pages'
|
||||||
import { useUserStore } from '@/store/user'
|
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/process/taskHandle" |
|
||||||
"/pages/user/people" |
|
"/pages/user/people" |
|
||||||
"/pages/workHome/index" |
|
"/pages/workHome/index" |
|
||||||
|
"/pages/humanResources/absence/apply" |
|
||||||
|
"/pages/integrated/duty/index" |
|
||||||
"/pages/operate/file/detail" |
|
"/pages/operate/file/detail" |
|
||||||
"/pages/operate/file/index" |
|
"/pages/operate/file/index" |
|
||||||
"/pages/operate/sc/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 = {
|
let params = {
|
||||||
lat: lat,
|
lat: lat,
|
||||||
lon: lon
|
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()
|
const store = useAppStore()
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'https://api.openweathermap.org/data/2.5/weather',
|
url: 'https://api.openweathermap.org/data/2.5/weather',
|
||||||
|
Loading…
Reference in New Issue
Block a user