请假、干租车、公文发布

This commit is contained in:
yangzhq68909 2025-06-13 16:27:09 +08:00
parent a6d16819e1
commit dab30417bd
18 changed files with 338 additions and 59 deletions

View File

@ -4,6 +4,6 @@ NODE_ENV = 'development'
VITE_DELETE_CONSOLE = false VITE_DELETE_CONSOLE = false
# 是否开启sourcemap # 是否开启sourcemap
VITE_SHOW_SOURCEMAP = true VITE_SHOW_SOURCEMAP = true
VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot' #VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot'
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot' #VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot' VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'

View File

@ -1,6 +1,16 @@
import { http } from '@/utils/http'; import { http } from '@/utils/http';
/*通过id查询数据*/ /*通过id查询公文数据*/
export function queryDocumentByIdApi(id : string) {
return http({
url: '/cxcoagwfb/cxcOaGwfb/queryById',
method: 'GET',
data: { id }
})
}
/*通过id查询干租车数据*/
export function queryCarRentalByIdApi(id : string) { export function queryCarRentalByIdApi(id : string) {
return http({ return http({
url: '/CarRental/cxcCarRental/queryById', url: '/CarRental/cxcCarRental/queryById',
@ -8,3 +18,31 @@ export function queryCarRentalByIdApi(id : string) {
data: { id } data: { id }
}) })
} }
/*通过id查询指标考核主表数据*/
export function queryZbkhZbByIdApi(id : string) {
return http({
url: '/jxkh.zbkh/cxcJxkhZbkhZb/listById',
method: 'GET',
data: { id }
})
}
/*通过id查询指标考核子表数据*/
export function queryZbkhFbByIdApi(mainId : string) {
return http({
url: '/jxkh.zbkh/cxcJxkhZbkhZb/listCxcJxkhZbkhDwkhByMainId',
method: 'GET',
data: { mainId }
})
}
/*通过id查询指标考核自定义表头*/
export function queryZbkhBtByIdApi(mainId : string) {
return http({
url: '/jxkh.dwkhbt/cxcJxkhZbkhDwkhBtZb/listByMainId',
method: 'GET',
data: { mainId }
})
}

View File

@ -37,7 +37,7 @@
}) })
// //
const qjQueryById = () => { const queryById = () => {
queryCarRentalByIdApi(props.formData.dataId).then((res) => { queryCarRentalByIdApi(props.formData.dataId).then((res) => {
if (res.success) { if (res.success) {
info.value = res.result.records[0] info.value = res.result.records[0]
@ -49,6 +49,6 @@
} }
onMounted(() => { onMounted(() => {
qjQueryById() queryById()
}) })
</script> </script>

View File

@ -0,0 +1,56 @@
<template>
<wd-cell-group title="申请信息">
<wd-cell title="发文字号" :value="info.fwzh" />
<wd-cell>
<template #title>
<view>
<view style="display: inline-block">发文标题</view>
</view>
</template>
<view style="color: blue;" @click="onlinePreview(info.wjbt)">
{{info.fwbt}}
</view>
</wd-cell>
<wd-cell title="发文日期" :value="info.fwtime" />
<wd-cell title="拟稿人" :value="info.ngr" />
<wd-cell title="拟稿人电话" :value="info.ngrdh" />
<wd-cell title="类别及代号" :value="info.wjlb" />
<wd-cell title="密级" :value="info.mj_dictText" />
<wd-cell title="主题词" :value="info.ztc" />
<wd-cell title="文件描述" :value="info.wjms" />
<wd-cell title="签发人" :value="info.qfr_dictText" />
</wd-cell-group>
</template>
<script setup>
import {
queryDocumentByIdApi
} from '@/api/bpm'
const info = ref({})
const props = defineProps({
formData: {
type: Object,
default: () => {},
}
})
//
const queryById = () => {
queryDocumentByIdApi(props.formData.dataId).then((res) => {
if (res.success) {
info.value = res.result.records[0]
}
})
}
const onlinePreview = (e) => {
uni.navigateTo({
url: `/pages/onlinePreview/detail?data=${e}`
})
}
onMounted(() => {
queryById()
})
</script>

View File

@ -41,7 +41,7 @@
}); });
} }
// //
const qjQueryById = () => { const queryById = () => {
queryByIdApi(props.formData.dataId).then((res) => { queryByIdApi(props.formData.dataId).then((res) => {
if (res.success) { if (res.success) {
info.value = res.result.records[0] info.value = res.result.records[0]
@ -53,6 +53,6 @@
} }
onMounted(() => { onMounted(() => {
qjQueryById() queryById()
}) })
</script> </script>

View File

@ -0,0 +1,113 @@
<template>
<wd-tabbar fixed v-model="tabbar" shape="round">
<wd-tabbar-item title="指标考核主表" icon="cart"></wd-tabbar-item>
<wd-tabbar-item title="指标考核子表" icon="user"></wd-tabbar-item>
</wd-tabbar>
<wd-cell-group border v-if="tabbar == '0'">
<wd-cell size="large" title="年月" :value="zbInfo.year + '年' + zbInfo.month + '月'" />
<wd-cell size="large" title="考核指标" :value="zbInfo.assessmentIndicators" />
<wd-cell size="large" title="指标类别" :value="zbInfo.indicatorCategory_dictText" />
<wd-cell size="large" title="考核对象" :value="zbInfo.templetName_dictText" />
<wd-cell size="large" title="考核周期" :value="zbInfo.assessmentCycle_dictText" />
<wd-cell size="large" title="考核部门" :value="zbInfo.assessmentDepart_dictText" />
<wd-collapse v-model="zbCollapse">
<wd-collapse-item title="评价方法" name="评价方法">{{zbInfo.evaluationMethod}}</wd-collapse-item>
</wd-collapse>
<wd-cell size="large">
<template #title>
<view>
<view style="display: inline-block">考核附件</view>
</view>
</template>
<view style="color: blue;" @click="onlinePreview(zbInfo.khfj)">
{{zbInfo.khfj}}
</view>
</wd-cell>
</wd-cell-group>
<wd-collapse v-model="collapse" v-if="tabbar == '1'">
<wd-collapse-item v-for="(fbItem, fbIndex) in fbInfo" :key="fbIndex" :title="fbItem.depart_dictText"
:name="'item' + (fbIndex + 1)">
<wd-cell v-for="(btItem, btIndex) in btInfo" :key="btIndex" :title="btItem.name"
:value="getDwkhValue(fbItem, btItem.id)" />
<wd-cell>
<template #title>
<view>
<view style="display: inline-block">附件</view>
</view>
</template>
<view style="color: blue;" @click="onlinePreview(fbItem.annex)">
{{getFilename(fbItem.annex)}}
</view>
</wd-cell>
</wd-collapse-item>
</wd-collapse>
</template>
<script setup>
import {
queryZbkhZbByIdApi,
queryZbkhFbByIdApi,
queryZbkhBtByIdApi
} from '@/api/bpm'
import {
getFilename
} from '@/utils'
const tabbar = ref(0)
const zbInfo = ref({})
const fbInfo = ref([])
const btInfo = ref([])
const btDataInfo = ref([])
const zbCollapse = ref(['评价方法'])
const collapse = ref(['item1'])
const props = defineProps({
formData: {
type: Object,
default: () => {},
}
})
const queryById = async () => {
// 1.
const zbRes = await queryZbkhZbByIdApi(props.formData.dataId);
if (zbRes.success) {
zbInfo.value = zbRes.result.records[0];
// 2. btInfo
if (zbInfo.value.dwkhBtId) {
const btRes = await queryZbkhBtByIdApi(zbInfo.value.dwkhBtId);
btInfo.value = btRes.result;
}
}
// 3. fbInfo
const fbRes = await queryZbkhFbByIdApi(props.formData.dataId);
fbInfo.value = fbRes.result.records;
};
const getDwkhValue = (fbItem, btId) => {
if (!fbItem.dwkhSaves) return ''; // dwkhSaves
const found = fbItem.dwkhSaves.find(item => item.dwkhBtId === btId);
return found ? found.value : '';
};
const onlinePreview = (e) => {
uni.navigateTo({
url: `/pages/onlinePreview/detail?data=${e}`
})
}
onMounted(() => {
queryById()
})
</script>
<style lang="scss">
/* 手动引入 wd-segmented 样式 */
@import 'wot-design-uni/components/wd-segmented/index.scss';
/* 或直接覆盖关键样式 */
.wd-segmented {
/* 确保样式优先级 */
opacity: 1 !important;
visibility: visible !important;
}
</style>

View File

@ -67,8 +67,10 @@
if (res.success) { if (res.success) {
info.value = res.result.records[0] info.value = res.result.records[0]
minDate.value = dateStringToTimestamp(info.value.begintime) minDate.value = dateStringToTimestamp(info.value.begintime)
if(image.value.path){
image.value = info.value.path.split(',').map(path => imgUrl(path)) image.value = info.value.path.split(',').map(path => imgUrl(path))
} }
}
}) })
} }

View File

@ -118,6 +118,7 @@
pageSize pageSize
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
console.log('----',res.result.records)
list.value = [...list.value, ...res.result.records] list.value = [...list.value, ...res.result.records]
} }
loading = false loading = false

View File

@ -19,7 +19,7 @@
<wd-card title="解读材料"> <wd-card title="解读材料">
<view style="color: blue;" <view style="color: blue;"
@click="onlinePreview(`/pages/onlinePreview/detail?data=${dataSource.jdwj}`)"> @click="onlinePreview(`/pages/onlinePreview/detail?data=${dataSource.jdwj}`)">
{{dataSource.jdwj}} {{getFilename(dataSource.jdwj)}}
</view> </view>
</wd-card> </wd-card>
</view> </view>
@ -33,6 +33,9 @@
import { import {
queryDataById queryDataById
} from '@/api/pages/file' } from '@/api/pages/file'
import {
getFilename
} from '@/utils'
const appStore = useAppStore() const appStore = useAppStore()
const dataSource = ref({}) const dataSource = ref({})

View File

@ -1,18 +1,18 @@
<!-- component标签可以变换组件 --> <!-- component标签可以变换组件 -->
<template> <template>
<view> <view>
<component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey" v-if="asyncComponent" <component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey"
@getStampSuc="getStampSuccess"></component> v-if="asyncComponent" @getStampSuc="getStampSuccess"></component>
<view v-else>该模块暂未建立审批页面</view> <view v-else>该模块暂未建立审批页面</view>
<wd-tabbar v-if="false">
<wd-tabbar-item></wd-tabbar-item>
</wd-tabbar>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
const compName = ref(''); const compName = ref('');
const asyncComponent = ref(null); const asyncComponent = ref(null);
const modules = import.meta.glob('/src/pages-bpm/**/*.vue'); const modules = import.meta.glob('/src/pages-bpm/**/*.vue');
defineOptions({ defineOptions({
name: 'DynamicLink', name: 'DynamicLink',
options: { options: {
@ -40,10 +40,10 @@
}) })
// option // option
watch(() => props.path, (newVal) => { watch(() => props.path, (newVal) => {
if (newVal){ if (newVal) {
compName.value = newVal; compName.value = newVal;
if(newVal.indexOf('index')==-1){ if (newVal.indexOf('index') == -1) {
compName.value = newVal+'/index' compName.value = newVal + '/index'
} }
} }
// //
@ -70,7 +70,3 @@
// }); // });
} }
</script> </script>
<style lang="scss" scoped>
</style>

View File

@ -189,7 +189,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
import SelectUserModal from '@/components/SelectUser/components/SelectUserModal.vue' import SelectUserModal from '@/components/SelectUser/components/SelectUserModal.vue'
import { getFileAccessHttpUrl } from '@/common/uitls' import { getFileAccessHttpUrl } from '@/common/uitls'
import { useQueue } from 'wot-design-uni' import { useQueue } from 'wot-design-uni'

View File

@ -52,16 +52,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {
ref,
computed
} from 'vue'
import {
onLoad,
onShow,
onReachBottom,
onPullDownRefresh
} from '@dcloudio/uni-app';
import { useToast, useMessage } from 'wot-design-uni' import { useToast, useMessage } from 'wot-design-uni'
import { import {
useAppStore useAppStore

View File

@ -521,9 +521,17 @@
"path": "carRental/index", "path": "carRental/index",
"type": "page" "type": "page"
}, },
{
"path": "document/index",
"type": "page"
},
{ {
"path": "leaveApplication/index", "path": "leaveApplication/index",
"type": "page" "type": "page"
},
{
"path": "zbkh/index",
"type": "page"
} }
] ]
} }

View File

@ -9,7 +9,7 @@
</route> </route>
<template> <template>
<PageLayout :navbarShow="false"> <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">
<view class="position position-left"> <view class="position position-left">
@ -103,7 +103,9 @@
import { import {
taskListApi taskListApi
} from '@/api/process' } from '@/api/process'
import { isH5 } from '@/utils/platform' import {
isH5
} from '@/utils/platform'
defineOptions({ defineOptions({
name: 'index', name: 'index',
@ -148,7 +150,6 @@
}) })
} }
const goPageMore = (page) => { const goPageMore = (page) => {
router.replace({ router.replace({
name: 'more', name: 'more',
@ -159,19 +160,69 @@
}) })
} }
const queryCarousel = () => { const queryCarousel = async () => {
// // 1.
queryCarouselApi({ const cachedData = await getCarouselCache();
// 2. 使
if (cachedData) {
carouselList.value = cachedData.data;
// 3. (25%)
const cacheAge = Date.now() - cachedData.timestamp;
if (cacheAge > 24 * 60 * 60 * 1000 * 7 * 0.75) { // 24 * 7
fetchAndUpdateCarousel(); //
}
return;
}
// 4.
await fetchAndUpdateCarousel();
};
const fetchAndUpdateCarousel = async () => {
try {
const res = await queryCarouselApi({
zslb: 6 zslb: 6
}).then((res) => { });
if (res.success) { if (res.success) {
let arr = res.result.records[0].wenjian.split(',') const arr = res.result.records[0].wenjian.split(',');
carouselList.value = arr.map((item) => { const newData = arr.map(item => getEnvBaseUrl() + '/sys/common/static/' + item);
return getEnvBaseUrl() + '/sys/common/static/' + item carouselList.value = newData;
}) setCarouselCache(newData);
} }
}) } catch (error) {
console.error('更新轮播图失败:', error);
} }
};
//
const getCarouselCache = () => {
const cacheStr = uni.getStorageSync('carousel_data')
if (!cacheStr) return null;
try {
const {
data,
timestamp
} = JSON.parse(cacheStr);
if (Date.now() - timestamp < 24 * 60 * 60 * 1000 * 7) {
return {
data,
timestamp
};
}
uni.removeStorageSync('carousel_data');
return null;
} catch {
return null;
}
};
//
const setCarouselCache = (data) => {
const cacheData = {
data,
timestamp: Date.now()
};
uni.setStorageSync('carousel_data', JSON.stringify(cacheData))
};
const queryModule = () => { const queryModule = () => {
getUserPermissionApi({ getUserPermissionApi({

View File

@ -105,9 +105,9 @@
let pw = Base64.encode(encodeURIComponent(password.value)) let pw = Base64.encode(encodeURIComponent(password.value))
loading.value = true loading.value = true
/*生产环境 begin */ /*生产环境 begin */
// loginApi({ username: un, password: pw }) loginApi({ username: un, password: pw })
/*开发环境 begin */ /*开发环境 begin */
loginApi({ username: userName.value, password: password.value, captcha: 'app' }) // loginApi({ username: userName.value, password: password.value, captcha: 'app' })
.then((res : any) => { .then((res : any) => {
if (res.success) { if (res.success) {
const { result } = res const { result } = res

View File

@ -58,7 +58,6 @@
} }
onLoad((options) => { onLoad((options) => {
console.log(2222)
detail.value = options.data detail.value = options.data
detailArr.value = options.data.split(","); detailArr.value = options.data.split(",");
//#ifdef H5 || MP-WEIXIN //#ifdef H5 || MP-WEIXIN
@ -78,7 +77,6 @@
onShow (()=>{ onShow (()=>{
// //
console.log(ifBackAll.value)
if(ifBackAll.value){ if(ifBackAll.value){
// //
uni.navigateBack({ uni.navigateBack({

View File

@ -57,7 +57,9 @@ interface NavigateToOptions {
"/pages-process/myApplyProcess" | "/pages-process/myApplyProcess" |
"/pages-process/taskHandle" | "/pages-process/taskHandle" |
"/pages-bpm/carRental/index" | "/pages-bpm/carRental/index" |
"/pages-bpm/leaveApplication/index"; "/pages-bpm/document/index" |
"/pages-bpm/leaveApplication/index" |
"/pages-bpm/zbkh/index";
} }
interface RedirectToOptions extends NavigateToOptions {} interface RedirectToOptions extends NavigateToOptions {}

View File

@ -446,3 +446,25 @@ export function getFileAccessHttpUrl(avatar, subStr) {
} }
} }
} }
/* 获取文件名 */
export function getFilename(text : string) {
if (!text) {
return text === null ? null : "";
}
if (text.indexOf(',') > 0) {
let arr = text.split(",")
let filearr = []
for (let a = 0; a < arr.length; a++) {
//818
let filename = arr[a].substr(arr[a].lastIndexOf('/') + 1, arr[a].length - arr[a].lastIndexOf(
'/')).replace(/_\d{8,18}|\d{8,18}/g, "");
filearr.push(filename)
}
return filearr
} else {
let filename = text.substr(text.lastIndexOf('/') + 1, text.length - text.lastIndexOf('/')).replace(/_\d{8,18}|\d{8,18}/g, "");
//818
return filename
}
}