干部值班

This commit is contained in:
yangzhq68909 2025-05-14 09:58:47 +08:00
parent 3424a06b36
commit ca7bc6bdaa
5 changed files with 94 additions and 2 deletions

View File

@ -5,5 +5,5 @@ 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'

View File

@ -0,0 +1,9 @@
import { http } from '@/utils/http';
export function getListApi(config) { //
return http({
url: '/zhgl_zbgl/zhglZbglZbb/list',
method: 'GET',
data: config
})
}

View File

@ -191,6 +191,15 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"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",

View File

@ -0,0 +1,73 @@
<route lang="json5" type="page">
{
layout: 'default',
style: {
navigationStyle: 'custom',
navigationBarTitleText: '干部值班',
},
}
</route>
<template>
<view :class="{'gray': appStore.isGray == 1 }">
<wd-navbar left-text="返回" left-arrow
custom-style="padding-top: var(--status-bar-height, 0); background-image: linear-gradient(to right, #1890ff, #096dd9); color: #fff;"
@click-left="handleClickLeft">
</wd-navbar>
<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>
</view>
</template>
<script setup>
import {
useAppStore
} from '@/store';
import {
getListApi
} from '@/api/pages/duty'
const dataValue = ref(Date.now())
const dataSource = ref([])
const appStore = useAppStore();
const handleClickLeft = () => {
uni.navigateBack();
};
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>
<style>
</style>

View File

@ -20,6 +20,7 @@ interface NavigateToOptions {
"/pages/onlinePreview/onlinePreviewH5" | "/pages/onlinePreview/onlinePreviewH5" |
"/pages/user/people" | "/pages/user/people" |
"/pages/workHome/index" | "/pages/workHome/index" |
"/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" |