1.流程审批页面增加考核实施、指标考核
This commit is contained in:
parent
3801233bf0
commit
2175a82f6c
2
env/.env.development
vendored
2
env/.env.development
vendored
@ -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.247: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'
|
@ -29,11 +29,11 @@ export function queryZbkhZbByIdApi(id : string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*通过id查询指标考核子表数据*/
|
/*通过id查询指标考核子表数据*/
|
||||||
export function queryZbkhFbByIdApi(mainId : string) {
|
export function queryZbkhFbByIdApi(data : object) {
|
||||||
return http({
|
return http({
|
||||||
url: '/jxkh.zbkh/cxcJxkhZbkhZb/listCxcJxkhZbkhDwkhByMainId',
|
url: '/jxkh.zbkh/cxcJxkhZbkhZb/listCxcJxkhZbkhDwkhByMainId',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { mainId }
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,3 +46,47 @@ export function queryZbkhBtByIdApi(mainId : string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*通过id查询考核实施主表数据*/
|
||||||
|
export function queryKhssZbByIdApi(id : string) {
|
||||||
|
return http({
|
||||||
|
url: '/jxkh.khss/cxcJxkhXhss/getAllById',
|
||||||
|
method: 'GET',
|
||||||
|
data: { id }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/*通过id查询考核实施主表自定义表头*/
|
||||||
|
export function queryKhssZbBtByIdApi(mainId : string) {
|
||||||
|
return http({
|
||||||
|
url: '/jxkh.jxkh/cxcJxkhKhssKhjxZb/getByMainId',
|
||||||
|
method: 'GET',
|
||||||
|
data: { mainId }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/*通过id查询考核实施子表数据*/
|
||||||
|
export function queryKhssFbByIdApi(data : object) {
|
||||||
|
return http({
|
||||||
|
url: '/jxkh.khss/cxcJxkhXhss/selectAllByMainId',
|
||||||
|
method: 'GET',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/*通过id查询总金额*/
|
||||||
|
export function queryKhssAllSumByIdApi(mainId : string) {
|
||||||
|
return http({
|
||||||
|
url: '/jxkh.khss/cxcJxkhXhss/getAllSum',
|
||||||
|
method: 'GET',
|
||||||
|
data: { mainId }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/*通过id查询考核实子表自定义表头*/
|
||||||
|
export function queryKhssFbBtByIdApi(mainId : string) {
|
||||||
|
return http({
|
||||||
|
url: '/jxkh.jxfp.bt/cxcJxkhJxfbBtZb/listByMainId',
|
||||||
|
method: 'GET',
|
||||||
|
data: { mainId }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
11
src/api/humanResource/clockin/index.ts
Normal file
11
src/api/humanResource/clockin/index.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { http } from '@/utils/http';
|
||||||
|
|
||||||
|
|
||||||
|
/*新增打卡记录*/
|
||||||
|
export function addApi(config : Object) {
|
||||||
|
return http({
|
||||||
|
url: '/cxc_rlzy.wbxm.wbdk/cxcRlzyWbdk/add',
|
||||||
|
method: 'POST',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
230
src/pages-bpm/khss/index.vue
Normal file
230
src/pages-bpm/khss/index.vue
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 可滚动内容区域 -->
|
||||||
|
<scroll-view class="content-scroll" :style="{ height: scrollViewHeight }" scroll-y :scroll-top="scrollTop">
|
||||||
|
<!-- 主表内容 -->
|
||||||
|
<wd-cell-group border v-if="tabbar == '0'">
|
||||||
|
<wd-cell size="large" title="年月" :value="zbInfo.assessmentDate" />
|
||||||
|
<wd-cell size="large" title="单位" :value="zbInfo.templetName_dictText" />
|
||||||
|
<wd-cell size="large" title="当月人数" :value="zbInfo.monthNumber" />
|
||||||
|
<wd-cell size="large" title="本次兑现合计" :value="zbInfo.redemptionTotal" />
|
||||||
|
<wd-collapse v-model="collapse">
|
||||||
|
<wd-collapse-item title="考核绩效" name="item01">
|
||||||
|
<wd-cell v-for="(item, index) in zbBtInfo" :key="index" :title="item.name"
|
||||||
|
:value="getKhjxValue(item.id)" />
|
||||||
|
</wd-collapse-item>
|
||||||
|
</wd-collapse>
|
||||||
|
<wd-cell size="large">
|
||||||
|
<template #title>
|
||||||
|
<view style="display: inline-block">考核公报</view>
|
||||||
|
</template>
|
||||||
|
<view style="color: blue;" @click="onlinePreview(zbInfo.bmKhgb)">
|
||||||
|
{{getFilename(zbInfo.bmKhgb)}}
|
||||||
|
</view>
|
||||||
|
</wd-cell>
|
||||||
|
</wd-cell-group>
|
||||||
|
|
||||||
|
<!-- 子表内容 -->
|
||||||
|
<wd-collapse v-model="fbCollapse" v-if="tabbar == '1'">
|
||||||
|
<div style="display: flex;justify-content: space-between;padding: 10px 15px;font-weight: bold;">
|
||||||
|
<span>已分配金额: {{ sumJx }}</span>
|
||||||
|
<span>待分配金额: {{ (allJx - 0) - (sumJx - 0) }}</span>
|
||||||
|
</div>
|
||||||
|
<wd-collapse-item v-for="(fbItem, fbIndex) in fbInfo" :key="fbIndex" :title="fbItem.userName"
|
||||||
|
:name="'item' + (fbIndex + 1)">
|
||||||
|
<wd-cell-group border>
|
||||||
|
<wd-cell size="large" title="单位/部门" :value="fbItem.depart_dictText" />
|
||||||
|
<wd-cell size="large" title="劳动合同号" :value="fbItem.ldhth" />
|
||||||
|
<wd-cell size="large" title="岗位/职务" :value="fbItem.gw" />
|
||||||
|
<wd-cell size="large" title="绩效工资合计" :value="fbItem.jxgz" />
|
||||||
|
<wd-collapse v-model="fbCollapse2">
|
||||||
|
<wd-collapse-item title="绩效详情" :name="'item0' + (fbIndex + 1)">
|
||||||
|
<wd-cell v-for="(item, index) in fbBtInfo" :key="index" :title="item.name"
|
||||||
|
:value="getJxDetailValue(fbItem.id, item.id)" />
|
||||||
|
</wd-collapse-item>
|
||||||
|
</wd-collapse>
|
||||||
|
<wd-cell size="large" title="备注" :value="fbItem.bz" />
|
||||||
|
</wd-cell-group>
|
||||||
|
</wd-collapse-item>
|
||||||
|
</wd-collapse>
|
||||||
|
<wd-pagination v-if="tabbar == '1'" v-model="page" :total="total" @change="handleChange" />
|
||||||
|
|
||||||
|
<!-- 底部占位视图 -->
|
||||||
|
<view class="bottom-spacer" :style="{ height: safeAreaBottom }"></view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- 固定在底部的TabBar -->
|
||||||
|
<wd-tabbar fixed v-model="tabbar" class="safe-area-tabbar">
|
||||||
|
<wd-tabbar-item title="考核实施主表" icon="cart"></wd-tabbar-item>
|
||||||
|
<wd-tabbar-item title="考核实施子表" icon="user"></wd-tabbar-item>
|
||||||
|
</wd-tabbar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
queryKhssZbByIdApi,
|
||||||
|
queryKhssZbBtByIdApi,
|
||||||
|
queryKhssFbByIdApi,
|
||||||
|
queryKhssFbBtByIdApi,
|
||||||
|
queryKhssAllSumByIdApi
|
||||||
|
} from '@/api/bpm'
|
||||||
|
import {
|
||||||
|
getFilename
|
||||||
|
} from '@/utils'
|
||||||
|
|
||||||
|
// 响应式数据
|
||||||
|
const tabbar = ref(0)
|
||||||
|
const zbInfo = ref({})
|
||||||
|
const fbInfo = ref([])
|
||||||
|
const zbBtInfo = ref([])
|
||||||
|
const fbBtInfo = ref([])
|
||||||
|
const collapse = ref([''])
|
||||||
|
const fbCollapse = ref([''])
|
||||||
|
const fbCollapse2 = ref([''])
|
||||||
|
const jxxqList = ref([])
|
||||||
|
const sumJx = ref(0)
|
||||||
|
const allJx = ref(0)
|
||||||
|
const page = ref(1)
|
||||||
|
const total = ref(0)
|
||||||
|
const scrollTop = ref(0)
|
||||||
|
const tabbarHeight = ref(50)
|
||||||
|
const systemInfo = ref({})
|
||||||
|
const scrollViewHeight = ref('100vh')
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 计算安全区域底部高度
|
||||||
|
const safeAreaBottom = computed(() => {
|
||||||
|
// #ifdef H5
|
||||||
|
return `${tabbarHeight.value}px`
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP-PLUS || MP-WEIXIN
|
||||||
|
return `calc(${tabbarHeight.value}px + env(safe-area-inset-bottom))`
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取系统信息
|
||||||
|
const getSystemInfo = () => {
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res) => {
|
||||||
|
systemInfo.value = res
|
||||||
|
const safeBottom = res.safeAreaInsets?.bottom || 0
|
||||||
|
scrollViewHeight.value =
|
||||||
|
`calc(${res.windowHeight}px - ${tabbarHeight.value + safeBottom}px)`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化TabBar高度
|
||||||
|
const initTabbarHeight = () => {
|
||||||
|
const query = uni.createSelectorQuery().select('.safe-area-tabbar')
|
||||||
|
query.boundingClientRect(data => {
|
||||||
|
if (data) {
|
||||||
|
tabbarHeight.value = data.height
|
||||||
|
getSystemInfo()
|
||||||
|
}
|
||||||
|
}).exec()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取数据
|
||||||
|
const queryById = async () => {
|
||||||
|
const zbRes = await queryKhssZbByIdApi(props.formData.dataId)
|
||||||
|
if (zbRes.success) {
|
||||||
|
zbInfo.value = zbRes.result.records[0]
|
||||||
|
allJx.value = zbInfo.value.redemptionTotal
|
||||||
|
if (zbInfo.value.jxxqs) {
|
||||||
|
jxxqList.value = zbInfo.value.jxxqs
|
||||||
|
}
|
||||||
|
if (zbInfo.value.khjxZbId) {
|
||||||
|
const btRes = await queryKhssZbBtByIdApi(zbInfo.value.khjxZbId)
|
||||||
|
zbBtInfo.value = btRes.result
|
||||||
|
}
|
||||||
|
if (zbInfo.value.jxfpBtId) {
|
||||||
|
const btRes = await queryKhssFbBtByIdApi(zbInfo.value.jxfpBtId)
|
||||||
|
fbBtInfo.value = btRes.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const fbRes = await queryKhssFbByIdApi({
|
||||||
|
mainId: props.formData.dataId
|
||||||
|
})
|
||||||
|
fbInfo.value = fbRes.result.records
|
||||||
|
total.value = fbRes.result.total
|
||||||
|
|
||||||
|
queryKhssAllSumByIdApi(props.formData.dataId).then(res => {
|
||||||
|
sumJx.value = res.result
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取考核绩效值
|
||||||
|
const getKhjxValue = (khjxId) => {
|
||||||
|
if (!jxxqList.value || jxxqList.value.length === 0) return ''
|
||||||
|
const item = jxxqList.value.find(item => item.khjxId === khjxId)
|
||||||
|
return item ? item.numValue : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取绩效详情值
|
||||||
|
const getJxDetailValue = (mainId, jxfpBtId) => {
|
||||||
|
if (!fbInfo.value || fbInfo.value.length === 0) return ''
|
||||||
|
const currentItem = fbInfo.value.find(item => item.id === mainId)
|
||||||
|
if (!currentItem || !currentItem.jxxfpSaves) return ''
|
||||||
|
const detail = currentItem.jxxfpSaves.find(save => save.jxfpBt === jxfpBtId)
|
||||||
|
return detail ? detail.value : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleChange = (value) => {
|
||||||
|
fbInfo.value = []
|
||||||
|
queryKhssFbByIdApi({
|
||||||
|
mainId: props.formData.dataId,
|
||||||
|
pageNo: value.value
|
||||||
|
}).then(res => {
|
||||||
|
fbInfo.value = res.result.records
|
||||||
|
scrollTop.value = scrollTop.value ? 0 : 1 // 触发滚动
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const onlinePreview = (e) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/onlinePreview/detail?data=${e}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
queryById()
|
||||||
|
})
|
||||||
|
|
||||||
|
onReady(() => {
|
||||||
|
initTabbarHeight()
|
||||||
|
getSystemInfo()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/* 滚动内容区域 */
|
||||||
|
.content-scroll {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部占位视图 */
|
||||||
|
.bottom-spacer {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 安全区域适配 */
|
||||||
|
.safe-area-tabbar {
|
||||||
|
/* #ifdef APP-PLUS || MP-WEIXIN */
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,13 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<wd-tabbar fixed v-model="tabbar" shape="round">
|
<!-- 可滚动内容区域 -->
|
||||||
<wd-tabbar-item title="指标考核主表" icon="cart"></wd-tabbar-item>
|
<scroll-view class="content-scroll" :style="{ height: scrollViewHeight }" scroll-y :scroll-top="scrollTop">
|
||||||
<wd-tabbar-item title="指标考核子表" icon="user"></wd-tabbar-item>
|
<!-- 主表内容 -->
|
||||||
</wd-tabbar>
|
|
||||||
<wd-cell-group border v-if="tabbar == '0'">
|
<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.year + '年' + zbInfo.month + '月'" />
|
||||||
<wd-cell size="large" title="考核指标" :value="zbInfo.assessmentIndicators" />
|
<wd-cell size="large" title="考核指标" :value="zbInfo.assessmentIndicators" />
|
||||||
<wd-cell size="large" title="指标类别" :value="zbInfo.indicatorCategory_dictText" />
|
<wd-cell size="large" title="指标类别" :value="zbInfo.indicatorCategory_dictText" />
|
||||||
<wd-cell size="large" title="考核对象" :value="zbInfo.templetName_dictText" />
|
<wd-collapse v-model="khdxCollapse">
|
||||||
|
<wd-collapse-item title="考核对象" name="考核对象">{{zbInfo.templetName_dictText}}</wd-collapse-item>
|
||||||
|
</wd-collapse>
|
||||||
<wd-cell size="large" title="考核周期" :value="zbInfo.assessmentCycle_dictText" />
|
<wd-cell size="large" title="考核周期" :value="zbInfo.assessmentCycle_dictText" />
|
||||||
<wd-cell size="large" title="考核部门" :value="zbInfo.assessmentDepart_dictText" />
|
<wd-cell size="large" title="考核部门" :value="zbInfo.assessmentDepart_dictText" />
|
||||||
<wd-collapse v-model="zbCollapse">
|
<wd-collapse v-model="zbCollapse">
|
||||||
@ -20,10 +21,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view style="color: blue;" @click="onlinePreview(zbInfo.khfj)">
|
<view style="color: blue;" @click="onlinePreview(zbInfo.khfj)">
|
||||||
{{zbInfo.khfj}}
|
{{getFilename(zbInfo.khfj)}}
|
||||||
</view>
|
</view>
|
||||||
</wd-cell>
|
</wd-cell>
|
||||||
</wd-cell-group>
|
</wd-cell-group>
|
||||||
|
<!-- 子表内容 -->
|
||||||
<wd-collapse v-model="collapse" v-if="tabbar == '1'">
|
<wd-collapse v-model="collapse" v-if="tabbar == '1'">
|
||||||
<wd-collapse-item v-for="(fbItem, fbIndex) in fbInfo" :key="fbIndex" :title="fbItem.depart_dictText"
|
<wd-collapse-item v-for="(fbItem, fbIndex) in fbInfo" :key="fbIndex" :title="fbItem.depart_dictText"
|
||||||
:name="'item' + (fbIndex + 1)">
|
:name="'item' + (fbIndex + 1)">
|
||||||
@ -41,6 +43,15 @@
|
|||||||
</wd-cell>
|
</wd-cell>
|
||||||
</wd-collapse-item>
|
</wd-collapse-item>
|
||||||
</wd-collapse>
|
</wd-collapse>
|
||||||
|
<wd-pagination v-if="tabbar == '1'" v-model="page" :total="total" @change="handleChange" />
|
||||||
|
<!-- 底部占位视图 -->
|
||||||
|
<view class="bottom-spacer" :style="{ height: safeAreaBottom }"></view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<wd-tabbar fixed v-model="tabbar" class="safe-area-tabbar">
|
||||||
|
<wd-tabbar-item title="指标考核主表" icon="cart"></wd-tabbar-item>
|
||||||
|
<wd-tabbar-item title="指标考核子表" icon="user"></wd-tabbar-item>
|
||||||
|
</wd-tabbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -58,7 +69,14 @@
|
|||||||
const btInfo = ref([])
|
const btInfo = ref([])
|
||||||
const btDataInfo = ref([])
|
const btDataInfo = ref([])
|
||||||
const zbCollapse = ref(['评价方法'])
|
const zbCollapse = ref(['评价方法'])
|
||||||
const collapse = ref(['item1'])
|
const khdxCollapse = ref(['考核对象'])
|
||||||
|
const collapse = ref(['item01'])
|
||||||
|
const page = ref(1)
|
||||||
|
const total = ref(0)
|
||||||
|
const scrollTop = ref(0)
|
||||||
|
const tabbarHeight = ref(50)
|
||||||
|
const systemInfo = ref({})
|
||||||
|
const scrollViewHeight = ref('100vh')
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formData: {
|
formData: {
|
||||||
@ -67,20 +85,57 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 计算安全区域底部高度
|
||||||
|
const safeAreaBottom = computed(() => {
|
||||||
|
// #ifdef H5
|
||||||
|
return `${tabbarHeight.value}px`
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP-PLUS || MP-WEIXIN
|
||||||
|
return `calc(${tabbarHeight.value}px + env(safe-area-inset-bottom))`
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 获取系统信息
|
||||||
|
const getSystemInfo = () => {
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res) => {
|
||||||
|
systemInfo.value = res
|
||||||
|
const safeBottom = res.safeAreaInsets?.bottom || 0
|
||||||
|
scrollViewHeight.value =
|
||||||
|
`calc(${res.windowHeight}px - ${tabbarHeight.value + safeBottom}px)`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化TabBar高度
|
||||||
|
const initTabbarHeight = () => {
|
||||||
|
const query = uni.createSelectorQuery().select('.safe-area-tabbar')
|
||||||
|
query.boundingClientRect(data => {
|
||||||
|
if (data) {
|
||||||
|
tabbarHeight.value = data.height
|
||||||
|
getSystemInfo()
|
||||||
|
}
|
||||||
|
}).exec()
|
||||||
|
}
|
||||||
|
|
||||||
const queryById = async () => {
|
const queryById = async () => {
|
||||||
// 1. 获取主表数据
|
// 1. 获取主表数据
|
||||||
const zbRes = await queryZbkhZbByIdApi(props.formData.dataId);
|
const zbRes = await queryZbkhZbByIdApi(props.formData.dataId);
|
||||||
if (zbRes.success) {
|
if (zbRes.success) {
|
||||||
zbInfo.value = zbRes.result.records[0];
|
zbInfo.value = zbRes.result.records[0];
|
||||||
// 2. 获取指标模板数据(btInfo)
|
// 2. 获取标题数据(btInfo)
|
||||||
if (zbInfo.value.dwkhBtId) {
|
if (zbInfo.value.dwkhBtId) {
|
||||||
const btRes = await queryZbkhBtByIdApi(zbInfo.value.dwkhBtId);
|
const btRes = await queryZbkhBtByIdApi(zbInfo.value.dwkhBtId);
|
||||||
btInfo.value = btRes.result;
|
btInfo.value = btRes.result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 3. 获取子表数据(fbInfo)
|
// 3. 获取子表数据(fbInfo)
|
||||||
const fbRes = await queryZbkhFbByIdApi(props.formData.dataId);
|
const fbRes = await queryZbkhFbByIdApi({
|
||||||
|
mainId: props.formData.dataId
|
||||||
|
});
|
||||||
fbInfo.value = fbRes.result.records;
|
fbInfo.value = fbRes.result.records;
|
||||||
|
total.value = fbRes.result.total
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDwkhValue = (fbItem, btId) => {
|
const getDwkhValue = (fbItem, btId) => {
|
||||||
@ -89,6 +144,18 @@
|
|||||||
return found ? found.value : '';
|
return found ? found.value : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleChange = (value) => {
|
||||||
|
fbInfo.value = []
|
||||||
|
queryZbkhFbByIdApi({
|
||||||
|
mainId: props.formData.dataId,
|
||||||
|
pageNo: value.value
|
||||||
|
}).then(res => {
|
||||||
|
fbInfo.value = res.result.records
|
||||||
|
scrollTop.value = scrollTop.value ? 0 : 1 // 触发滚动
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const onlinePreview = (e) => {
|
const onlinePreview = (e) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/onlinePreview/detail?data=${e}`
|
url: `/pages/onlinePreview/detail?data=${e}`
|
||||||
@ -97,17 +164,32 @@
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryById()
|
queryById()
|
||||||
|
getSystemInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
/* 手动引入 wd-segmented 样式 */
|
/* 滚动内容区域 */
|
||||||
@import 'wot-design-uni/components/wd-segmented/index.scss';
|
.content-scroll {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
/* 或直接覆盖关键样式 */
|
/* 底部占位视图 */
|
||||||
.wd-segmented {
|
.bottom-spacer {
|
||||||
/* 确保样式优先级 */
|
width: 100%;
|
||||||
opacity: 1 !important;
|
}
|
||||||
visibility: visible !important;
|
|
||||||
}
|
/* 安全区域适配 */
|
||||||
|
.safe-area-tabbar {
|
||||||
|
/* #ifdef APP-PLUS || MP-WEIXIN */
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -118,7 +118,6 @@
|
|||||||
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
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
<!-- component标签可以变换组件 -->
|
<!-- component标签可以变换组件 -->
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<component ref="comptRef" :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey" v-if="asyncComponent"
|
<component ref="comptRef" :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>
|
||||||
</view>
|
</view>
|
||||||
|
<wd-tabbar v-if="false">
|
||||||
|
<wd-tabbar-item></wd-tabbar-item>
|
||||||
|
</wd-tabbar>
|
||||||
|
<wd-pagination v-if="false"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
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');
|
||||||
@ -35,21 +38,21 @@
|
|||||||
},
|
},
|
||||||
formData: {
|
formData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
// 监听 option 变化
|
// 监听 option 变化
|
||||||
watch(() => props.path, (newVal) => {
|
watch(() => props.path, (newVal) => {
|
||||||
if (newVal){
|
if (newVal) {
|
||||||
compName.value = newVal;
|
compName.value = newVal;
|
||||||
}
|
}
|
||||||
//动态加载页面
|
//动态加载页面
|
||||||
const comp = modules[`/src/pages-bpm/${compName.value}.vue`]
|
const comp = modules[`/src/pages-bpm/${compName.value}.vue`]
|
||||||
if(!comp){
|
if (!comp) {
|
||||||
console.log(newVal)
|
console.log(newVal)
|
||||||
if(newVal.indexOf('index')==-1){
|
if (newVal.indexOf('index') == -1) {
|
||||||
compName.value = newVal+'/index'
|
compName.value = newVal + '/index'
|
||||||
console.log(compName.value)
|
console.log(compName.value)
|
||||||
const comp2 = modules[`/src/pages-bpm/${compName.value}.vue`]
|
const comp2 = modules[`/src/pages-bpm/${compName.value}.vue`]
|
||||||
comp2().then((myModule) => {
|
comp2().then((myModule) => {
|
||||||
@ -58,7 +61,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
comp().then((myModule) => {
|
comp().then((myModule) => {
|
||||||
asyncComponent.value = myModule.default
|
asyncComponent.value = myModule.default
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -73,13 +76,13 @@
|
|||||||
// #endif
|
// #endif
|
||||||
});
|
});
|
||||||
|
|
||||||
const signValidator = ()=>{
|
const signValidator = () => {
|
||||||
console.log(comptRef.value)
|
console.log(comptRef.value)
|
||||||
//这里进行电子签章验证
|
//这里进行电子签章验证
|
||||||
if(!comptRef.value.signValidator){
|
if (!comptRef.value.signValidator) {
|
||||||
console.log(123124)
|
console.log(123124)
|
||||||
return null;
|
return null;
|
||||||
}else{
|
} else {
|
||||||
console.log(12)
|
console.log(12)
|
||||||
return comptRef.value.signValidator()
|
return comptRef.value.signValidator()
|
||||||
}
|
}
|
||||||
|
@ -525,6 +525,10 @@
|
|||||||
"path": "document/index",
|
"path": "document/index",
|
||||||
"type": "page"
|
"type": "page"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "khss/index",
|
||||||
|
"type": "page"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "leaveApplication/index",
|
"path": "leaveApplication/index",
|
||||||
"type": "page"
|
"type": "page"
|
||||||
|
@ -52,9 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, onBeforeUnmount } from 'vue'
|
|
||||||
import { getFileAccessHttpUrl } from '@/common/uitls'
|
import { getFileAccessHttpUrl } from '@/common/uitls'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
|
||||||
import { useToast, useMessage } from 'wot-design-uni'
|
import { useToast, useMessage } from 'wot-design-uni'
|
||||||
import { useRouter } from '@/plugin/uni-mini-router'
|
import { useRouter } from '@/plugin/uni-mini-router'
|
||||||
import { http } from '@/utils/http'
|
import { http } from '@/utils/http'
|
||||||
@ -62,20 +60,22 @@
|
|||||||
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'
|
||||||
|
import { addApi } from '@/api/humanResource/clockin'
|
||||||
|
|
||||||
|
const appStore = useAppStore();
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
const loading = ref(false)
|
||||||
const post = ref('')
|
const post = ref('')
|
||||||
let stopWatch : any = null
|
let stopWatch : any = null
|
||||||
|
|
||||||
const dataSource = [
|
const dataSource = [
|
||||||
// { key: 'collect', title: '收藏', class: 'cuIcon-favorfill text-yellow' },
|
|
||||||
// { key: 'redPacket', title: '红包', class: 'cuIcon-redpacket_fill text-red' },
|
|
||||||
{ key: 'setting', title: '个人资料', class: 'cuIcon-settingsfill text-cyan' },
|
{ key: 'setting', title: '个人资料', class: 'cuIcon-settingsfill text-cyan' },
|
||||||
|
{ key: 'clockin', title: '打卡', class: 'cuIcon-location text-cyan' },
|
||||||
{ key: 'scan', title: '扫码', class: 'cuIcon-scan text-red' },
|
{ key: 'scan', title: '扫码', class: 'cuIcon-scan text-red' },
|
||||||
// { key: 'location', title: '定位', class: 'cuIcon-location text-cyan' },
|
|
||||||
{ key: 'exit', title: '退出', class: 'cuIcon-exit text-cyan' },
|
{ key: 'exit', title: '退出', class: 'cuIcon-exit text-cyan' },
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -156,8 +156,28 @@
|
|||||||
toast.warning('H5暂不支持')
|
toast.warning('H5暂不支持')
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const clockin = () => {
|
||||||
|
// #ifndef H5
|
||||||
|
if (loading.value) return
|
||||||
|
addApi({
|
||||||
|
weizhi: appStore.clockin
|
||||||
|
}).then((res : any) => {
|
||||||
|
if(res.success){
|
||||||
|
toast.success(res.message)
|
||||||
|
}else{
|
||||||
|
toast.warning(res.message)
|
||||||
|
}
|
||||||
|
loading.value = true
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
toast.warning('H5暂不支持')
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const exit = () => {
|
const exit = () => {
|
||||||
console.log(message)
|
|
||||||
message
|
message
|
||||||
.confirm({
|
.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@ -180,6 +200,9 @@
|
|||||||
case 'exit':
|
case 'exit':
|
||||||
exit()
|
exit()
|
||||||
break
|
break
|
||||||
|
case 'clockin':
|
||||||
|
clockin()
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
toast.show('功能暂未开发~')
|
toast.show('功能暂未开发~')
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ export const useAppStore = defineStore('app', {
|
|||||||
isGray: 0 as 0 | 1, // 0=正常,1=灰化
|
isGray: 0 as 0 | 1, // 0=正常,1=灰化
|
||||||
position: null, //市
|
position: null, //市
|
||||||
location: null, //省市区
|
location: null, //省市区
|
||||||
|
clockin: null, //详细位置 精确到街道
|
||||||
temperature: null, //温度
|
temperature: null, //温度
|
||||||
weather: null //天气
|
weather: null //天气
|
||||||
}),
|
}),
|
||||||
@ -28,6 +29,9 @@ export const useAppStore = defineStore('app', {
|
|||||||
setLocation(value : string) {
|
setLocation(value : string) {
|
||||||
this.location = value
|
this.location = value
|
||||||
},
|
},
|
||||||
|
setClockin(value : string) {
|
||||||
|
this.clockin = value
|
||||||
|
},
|
||||||
setTemperature(value : number) {
|
setTemperature(value : number) {
|
||||||
this.temperature = value
|
this.temperature = value
|
||||||
},
|
},
|
||||||
|
1
src/types/uni-pages.d.ts
vendored
1
src/types/uni-pages.d.ts
vendored
@ -58,6 +58,7 @@ interface NavigateToOptions {
|
|||||||
"/pages-process/taskHandle" |
|
"/pages-process/taskHandle" |
|
||||||
"/pages-bpm/carRental/index" |
|
"/pages-bpm/carRental/index" |
|
||||||
"/pages-bpm/document/index" |
|
"/pages-bpm/document/index" |
|
||||||
|
"/pages-bpm/khss/index" |
|
||||||
"/pages-bpm/leaveApplication/index" |
|
"/pages-bpm/leaveApplication/index" |
|
||||||
"/pages-bpm/unconventional/index" |
|
"/pages-bpm/unconventional/index" |
|
||||||
"/pages-bpm/unconventional/stamp" |
|
"/pages-bpm/unconventional/stamp" |
|
||||||
|
@ -398,6 +398,7 @@ export const getLocation = () => {
|
|||||||
const obj = data.result.addressComponent
|
const obj = data.result.addressComponent
|
||||||
store.setPosition(obj.city ? obj.city : obj.province) //市
|
store.setPosition(obj.city ? obj.city : obj.province) //市
|
||||||
store.setLocation(obj.city ? obj.province + obj.city + obj.county : obj.province + obj.county) //省市区
|
store.setLocation(obj.city ? obj.province + obj.city + obj.county : obj.province + obj.county) //省市区
|
||||||
|
store.setClockin(data.result.formatted_address)
|
||||||
getWeather(position.latitude, position.longitude)
|
getWeather(position.latitude, position.longitude)
|
||||||
} else {
|
} else {
|
||||||
handleDefaultLocation()
|
handleDefaultLocation()
|
||||||
|
Loading…
Reference in New Issue
Block a user