请假、干租车、公文发布
This commit is contained in:
parent
a6d16819e1
commit
dab30417bd
4
env/.env.development
vendored
4
env/.env.development
vendored
@ -4,6 +4,6 @@ NODE_ENV = 'development'
|
||||
VITE_DELETE_CONSOLE = false
|
||||
# 是否开启sourcemap
|
||||
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://szcx.zyyt.sinopec.com/jeecg-boot'
|
||||
VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
@ -1,6 +1,16 @@
|
||||
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) {
|
||||
return http({
|
||||
url: '/CarRental/cxcCarRental/queryById',
|
||||
@ -8,3 +18,31 @@ export function queryCarRentalByIdApi(id : string) {
|
||||
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 }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
})
|
||||
|
||||
// 申请信息
|
||||
const qjQueryById = () => {
|
||||
const queryById = () => {
|
||||
queryCarRentalByIdApi(props.formData.dataId).then((res) => {
|
||||
if (res.success) {
|
||||
info.value = res.result.records[0]
|
||||
@ -49,6 +49,6 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
qjQueryById()
|
||||
queryById()
|
||||
})
|
||||
</script>
|
56
src/pages-bpm/document/index.vue
Normal file
56
src/pages-bpm/document/index.vue
Normal 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>
|
@ -41,7 +41,7 @@
|
||||
});
|
||||
}
|
||||
// 申请信息
|
||||
const qjQueryById = () => {
|
||||
const queryById = () => {
|
||||
queryByIdApi(props.formData.dataId).then((res) => {
|
||||
if (res.success) {
|
||||
info.value = res.result.records[0]
|
||||
@ -53,6 +53,6 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
qjQueryById()
|
||||
queryById()
|
||||
})
|
||||
</script>
|
113
src/pages-bpm/zbkh/index.vue
Normal file
113
src/pages-bpm/zbkh/index.vue
Normal 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>
|
@ -67,8 +67,10 @@
|
||||
if (res.success) {
|
||||
info.value = res.result.records[0]
|
||||
minDate.value = dateStringToTimestamp(info.value.begintime)
|
||||
if(image.value.path){
|
||||
image.value = info.value.path.split(',').map(path => imgUrl(path))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -118,6 +118,7 @@
|
||||
pageSize
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
console.log('----',res.result.records)
|
||||
list.value = [...list.value, ...res.result.records]
|
||||
}
|
||||
loading = false
|
||||
|
@ -19,7 +19,7 @@
|
||||
<wd-card title="解读材料">
|
||||
<view style="color: blue;"
|
||||
@click="onlinePreview(`/pages/onlinePreview/detail?data=${dataSource.jdwj}`)">
|
||||
{{dataSource.jdwj}}
|
||||
{{getFilename(dataSource.jdwj)}}
|
||||
</view>
|
||||
</wd-card>
|
||||
</view>
|
||||
@ -33,6 +33,9 @@
|
||||
import {
|
||||
queryDataById
|
||||
} from '@/api/pages/file'
|
||||
import {
|
||||
getFilename
|
||||
} from '@/utils'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const dataSource = ref({})
|
||||
|
@ -1,18 +1,18 @@
|
||||
<!-- component标签可以变换组件 -->
|
||||
<template>
|
||||
<view>
|
||||
<component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey" v-if="asyncComponent"
|
||||
@getStampSuc="getStampSuccess"></component>
|
||||
<component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey"
|
||||
v-if="asyncComponent" @getStampSuc="getStampSuccess"></component>
|
||||
<view v-else>该模块暂未建立审批页面!</view>
|
||||
<wd-tabbar v-if="false">
|
||||
<wd-tabbar-item></wd-tabbar-item>
|
||||
</wd-tabbar>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
|
||||
const compName = ref('');
|
||||
const asyncComponent = ref(null);
|
||||
const modules = import.meta.glob('/src/pages-bpm/**/*.vue');
|
||||
|
||||
|
||||
defineOptions({
|
||||
name: 'DynamicLink',
|
||||
options: {
|
||||
@ -70,7 +70,3 @@
|
||||
// });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -189,7 +189,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
|
||||
import SelectUserModal from '@/components/SelectUser/components/SelectUserModal.vue'
|
||||
import { getFileAccessHttpUrl } from '@/common/uitls'
|
||||
import { useQueue } from 'wot-design-uni'
|
||||
|
@ -52,16 +52,6 @@
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
useAppStore
|
||||
|
@ -521,9 +521,17 @@
|
||||
"path": "carRental/index",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "document/index",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "leaveApplication/index",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "zbkh/index",
|
||||
"type": "page"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -103,7 +103,9 @@
|
||||
import {
|
||||
taskListApi
|
||||
} from '@/api/process'
|
||||
import { isH5 } from '@/utils/platform'
|
||||
import {
|
||||
isH5
|
||||
} from '@/utils/platform'
|
||||
|
||||
defineOptions({
|
||||
name: 'index',
|
||||
@ -148,7 +150,6 @@
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const goPageMore = (page) => {
|
||||
router.replace({
|
||||
name: 'more',
|
||||
@ -159,19 +160,69 @@
|
||||
})
|
||||
}
|
||||
|
||||
const queryCarousel = () => {
|
||||
// 轮播图
|
||||
queryCarouselApi({
|
||||
const queryCarousel = async () => {
|
||||
// 1. 尝试从缓存获取
|
||||
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
|
||||
}).then((res) => {
|
||||
});
|
||||
if (res.success) {
|
||||
let arr = res.result.records[0].wenjian.split(',')
|
||||
carouselList.value = arr.map((item) => {
|
||||
return getEnvBaseUrl() + '/sys/common/static/' + item
|
||||
})
|
||||
const arr = res.result.records[0].wenjian.split(',');
|
||||
const newData = arr.map(item => 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 = () => {
|
||||
getUserPermissionApi({
|
||||
|
@ -105,9 +105,9 @@
|
||||
let pw = Base64.encode(encodeURIComponent(password.value))
|
||||
loading.value = true
|
||||
/*生产环境 begin */
|
||||
// loginApi({ username: un, password: pw })
|
||||
loginApi({ username: un, password: pw })
|
||||
/*开发环境 begin */
|
||||
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
||||
// loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
||||
.then((res : any) => {
|
||||
if (res.success) {
|
||||
const { result } = res
|
||||
|
@ -58,7 +58,6 @@
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(2222)
|
||||
detail.value = options.data
|
||||
detailArr.value = options.data.split(",");
|
||||
//#ifdef H5 || MP-WEIXIN
|
||||
@ -78,7 +77,6 @@
|
||||
|
||||
onShow (()=>{
|
||||
//页面卸载,如果是从
|
||||
console.log(ifBackAll.value)
|
||||
if(ifBackAll.value){
|
||||
//直接返回上一级
|
||||
uni.navigateBack({
|
||||
|
4
src/types/uni-pages.d.ts
vendored
4
src/types/uni-pages.d.ts
vendored
@ -57,7 +57,9 @@ interface NavigateToOptions {
|
||||
"/pages-process/myApplyProcess" |
|
||||
"/pages-process/taskHandle" |
|
||||
"/pages-bpm/carRental/index" |
|
||||
"/pages-bpm/leaveApplication/index";
|
||||
"/pages-bpm/document/index" |
|
||||
"/pages-bpm/leaveApplication/index" |
|
||||
"/pages-bpm/zbkh/index";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
|
@ -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++) {
|
||||
//清除连续8到18位数字
|
||||
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, "");
|
||||
//清除连续8到18位数字
|
||||
return filename
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user