请假信息
@ -1,4 +1,4 @@
|
|||||||
# 开发环境
|
# 开发环境
|
||||||
# 请求接口地址
|
# 请求接口地址
|
||||||
VITE_REQUEST_BASE_URL = https://36.112.48.190
|
VITE_REQUEST_BASE_URL = https://36.112.48.190
|
||||||
#VITE_REQUEST_BASE_URL = http://10.75.15.247:8080
|
#VITE_REQUEST_BASE_URL = http://10.75.15.249:8080
|
||||||
|
@ -45,4 +45,12 @@ export function queryLeaveListApi(params) { // 获取所有请假信息
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function countByOrgApi(params) { // 获取所有请假信息
|
||||||
|
return https({
|
||||||
|
url: '/CxcQxj/cxcQxj/countByOrg',
|
||||||
|
method: 'get',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
}
|
}
|
@ -3,6 +3,7 @@
|
|||||||
<view class="info_box">
|
<view class="info_box">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
申请信息
|
申请信息
|
||||||
|
<b style="text-align: right;color: blue;" @click="goToHis">历史查询</b>
|
||||||
</view>
|
</view>
|
||||||
<view class="info f-row aic jcb">
|
<view class="info f-row aic jcb">
|
||||||
<view>
|
<view>
|
||||||
@ -44,7 +45,7 @@
|
|||||||
<view>
|
<view>
|
||||||
请假天数:
|
请假天数:
|
||||||
</view>
|
</view>
|
||||||
<text>{{info.days}}</text>
|
<text>{{info.days}}天</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info f-row aic jcb">
|
<view class="info f-row aic jcb">
|
||||||
<view>
|
<view>
|
||||||
@ -113,8 +114,6 @@
|
|||||||
} from '@/api/leaveApi.js';
|
} from '@/api/leaveApi.js';
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
onBeforeMount,
|
|
||||||
watch,
|
|
||||||
onMounted
|
onMounted
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
@ -161,7 +160,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**审批步骤*/
|
/**审批步骤*/
|
||||||
@ -193,16 +191,16 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// watch(() => props.dataId, (nval, oval) => {
|
|
||||||
// if (nval) {
|
|
||||||
// qjQueryById()
|
|
||||||
// extActFlowData()
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
qjQueryById()
|
qjQueryById()
|
||||||
extActFlowData()
|
extActFlowData()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const goToHis = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/views/renliziyuan/qingjiaxinxi/index?username=${info.value.username}`
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -223,6 +221,8 @@
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: left bottom;
|
background-position: left bottom;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
|
56
package-lock.json
generated
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"name": "cxc-szcx-uniapp",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"@dcloudio/uni-ui": "^1.5.6",
|
||||||
|
"base-64": "^1.0.0",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
|
"echarts": "^5.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@dcloudio/uni-ui": {
|
||||||
|
"version": "1.5.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.6.tgz",
|
||||||
|
"integrity": "sha512-jmb98PasFvZkrIDXGh94GbdWg2/jyhgs1HUG+bU8eyL7Ltias/5XBz4q8w9RXyWUfqepJRqapPA2IIQpLCuTIg==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/base-64": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/base-64/-/base-64-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
|
||||||
|
},
|
||||||
|
"node_modules/dayjs": {
|
||||||
|
"version": "1.11.13",
|
||||||
|
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
|
||||||
|
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||||
|
},
|
||||||
|
"node_modules/echarts": {
|
||||||
|
"version": "5.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
|
||||||
|
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "2.3.0",
|
||||||
|
"zrender": "5.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tslib": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
||||||
|
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
|
||||||
|
"license": "0BSD"
|
||||||
|
},
|
||||||
|
"node_modules/zrender": {
|
||||||
|
"version": "5.6.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
|
||||||
|
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "2.3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
pages.json
@ -234,6 +234,7 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/views/renliziyuan/renyuanxinxi/qttongji",
|
"path": "pages/views/renliziyuan/renyuanxinxi/qttongji",
|
||||||
"style": {
|
"style": {
|
||||||
@ -247,27 +248,14 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "请假信息",
|
"navigationBarTitleText": "请假信息",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|
||||||
}
|
}
|
||||||
}<<<<<<< .mine
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/views/renliziyuan/qingjiaxinxi/index",
|
"path": "pages/views/renliziyuan/qingjiaxinxi/detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "请假信息",
|
"navigationBarTitleText": "请假详情",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/views/renliziyuan/renyuanxinxi/qttongji",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "其他统计信息",
|
|
||||||
"navigationBarTextStyle": "white"
|
|
||||||
|
|
||||||
}
|
|
||||||
>>>>>>> .theirs
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" v-for="item,i in list" :key="i"
|
<view class="item" v-for="item,i in list" :key="i"
|
||||||
@click="jump(`/pages/document/detail?data=${JSON.stringify(item)}&id=${id}`,item)">
|
@click="jump(`/pages/document/detail?data=${JSON.stringify(item)}&id=${id}`,item)">
|
||||||
<!-- <view class="dot">
|
|
||||||
|
|
||||||
</view> -->
|
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item._title}}
|
{{item._title}}
|
||||||
</view>
|
</view>
|
||||||
@ -31,10 +28,6 @@
|
|||||||
<view class="look f-row aic" v-if="item._depart">
|
<view class="look f-row aic" v-if="item._depart">
|
||||||
{{item._depart}}
|
{{item._depart}}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="look f-row aic">
|
|
||||||
<image src="../../static/index/eye.png" mode=""></image>
|
|
||||||
999+
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<tree-select :dataSource="dataSource" v-model="type" dataValue="name" />
|
<tree-select :dataSource="dataSource" v-model="type" dataValue="name" />
|
||||||
</view>
|
</view>
|
||||||
<picker mode="date" fields="day" @change="chooseStart" :value="beginTime" :end="endTime">
|
<picker mode="date" fields="day" @change="chooseStart" :value="beginTime" :start="startDate" :end="endTime">
|
||||||
<view class="f-row aic jcb box">
|
<view class="f-row aic jcb box">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
开始时间:
|
开始时间:
|
||||||
@ -145,6 +145,8 @@
|
|||||||
const chooseStart = (e) => {
|
const chooseStart = (e) => {
|
||||||
beginTime.value = e.detail.value
|
beginTime.value = e.detail.value
|
||||||
}
|
}
|
||||||
|
/**请假开始时间 绑定start*/
|
||||||
|
const startDate = ref('')
|
||||||
/**结束时间*/
|
/**结束时间*/
|
||||||
const endTime = ref('')
|
const endTime = ref('')
|
||||||
const chooseEnd = (e) => {
|
const chooseEnd = (e) => {
|
||||||
@ -278,8 +280,10 @@
|
|||||||
queryHisDateApi(store.userinfo.username).then((res) => { // 最新请假结束日期
|
queryHisDateApi(store.userinfo.username).then((res) => { // 最新请假结束日期
|
||||||
if (res) {
|
if (res) {
|
||||||
getTomorrowDate(res);
|
getTomorrowDate(res);
|
||||||
|
startDate.value = beginTime.value; // 如果有最新请假日期,设置startDate为该日期
|
||||||
} else {
|
} else {
|
||||||
getTomorrowDate();
|
getTomorrowDate();
|
||||||
|
startDate.value = '1900-01-01';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -98,17 +98,17 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/*生产环境 begin */
|
/*生产环境 begin */
|
||||||
loginApi({
|
// loginApi({
|
||||||
username: un,
|
// username: un,
|
||||||
password: pw,
|
// password: pw,
|
||||||
ip: getDeviceIp()
|
// ip: getDeviceIp()
|
||||||
/*生产环境 end */
|
/*生产环境 end */
|
||||||
|
|
||||||
/*开发环境 begin */
|
/*开发环境 begin */
|
||||||
// localLoginApi({
|
localLoginApi({
|
||||||
// username: username.value,
|
username: username.value,
|
||||||
// password: password.value,
|
password: password.value,
|
||||||
// captcha: 'app'
|
captcha: 'app'
|
||||||
/*开发环境 end */
|
/*开发环境 end */
|
||||||
}).then((loginres) => {
|
}).then((loginres) => {
|
||||||
if (loginres.success) {
|
if (loginres.success) {
|
||||||
|
@ -281,6 +281,7 @@
|
|||||||
pageSize
|
pageSize
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
console.log('--',res.result.records)
|
||||||
list.value = [...list.value, ...formatObj(res.result.records, 'neirong', 'fbdw', 'createTime')]
|
list.value = [...list.value, ...formatObj(res.result.records, 'neirong', 'fbdw', 'createTime')]
|
||||||
}
|
}
|
||||||
loading = false
|
loading = false
|
||||||
@ -308,7 +309,6 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
list.value = [...list.value, ...formatObj(res.result.records, 'flfgmc', 'ssbm', null)]
|
list.value = [...list.value, ...formatObj(res.result.records, 'flfgmc', 'ssbm', null)]
|
||||||
|
|
||||||
}
|
}
|
||||||
loading = false
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
@ -126,7 +126,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const popclose = (e) => {
|
const popclose = (e) => {
|
||||||
console.log('qqq', e);
|
|
||||||
}
|
}
|
||||||
const chooseArr = ref([])
|
const chooseArr = ref([])
|
||||||
const choose = (id) => {
|
const choose = (id) => {
|
||||||
|
174
pages/views/renliziyuan/qingjiaxinxi/detail.vue
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<view class="f-col aic">
|
||||||
|
<view class="info_box">
|
||||||
|
<view class="title">
|
||||||
|
申请信息
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
请假职工:
|
||||||
|
</view>
|
||||||
|
<text>{{info.username_dictText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
所属单位:
|
||||||
|
</view>
|
||||||
|
<text>{{info.sysOrgCode_dictText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
联系方式:
|
||||||
|
</view>
|
||||||
|
<text>{{info.phone}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
请假类型:
|
||||||
|
</view>
|
||||||
|
<text>{{info.type}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
请假开始时间:
|
||||||
|
</view>
|
||||||
|
<text>{{info.begintime}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
请假结束时间:
|
||||||
|
</view>
|
||||||
|
<text>{{info.endtime}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
请假天数:
|
||||||
|
</view>
|
||||||
|
<text>{{info.days}}天</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
审批人:
|
||||||
|
</view>
|
||||||
|
<text>{{info.examineleader_dictText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
出发地:
|
||||||
|
</view>
|
||||||
|
<text>{{info.departure}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
目的地:
|
||||||
|
</view>
|
||||||
|
<text>{{info.destination}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb">
|
||||||
|
<view>
|
||||||
|
请假原因:
|
||||||
|
</view>
|
||||||
|
<text>{{info.reason}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info f-row aic jcb" v-if="ifShowFj">
|
||||||
|
<view>
|
||||||
|
附件:
|
||||||
|
</view>
|
||||||
|
<uni-file-picker v-model="imageValue" :image-styles="imageStyles" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
processHistoryListApi
|
||||||
|
} from '@/api/api.js';
|
||||||
|
import {
|
||||||
|
qjQueryByIdApi
|
||||||
|
} from '@/api/leaveApi.js';
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
onMounted
|
||||||
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
imgUrl
|
||||||
|
} from '@/utils/index.js';
|
||||||
|
import {
|
||||||
|
onLoad
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
const imageValue = ref([])
|
||||||
|
const ifShowFj = ref(false)
|
||||||
|
const imageStyles = {
|
||||||
|
width: 64,
|
||||||
|
height: 64,
|
||||||
|
border: {
|
||||||
|
color: "#dce7e1",
|
||||||
|
width: 2,
|
||||||
|
style: 'dashed',
|
||||||
|
radius: '2px'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const info = ref({})
|
||||||
|
// 申请信息
|
||||||
|
const qjQueryById = (e) => {
|
||||||
|
qjQueryByIdApi({
|
||||||
|
id: e
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
info.value = res.result.records[0]
|
||||||
|
// 构造 imageValue 数组
|
||||||
|
if (info.value.path) {
|
||||||
|
ifShowFj.value = true;
|
||||||
|
imageValue.value = info.value.path.split(',').map(path => {
|
||||||
|
const name = path.split('/').pop(); // 获取文件名
|
||||||
|
const extname = name.split('.').pop(); // 获取文件扩展名并转换为大写
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
extname,
|
||||||
|
url: imgUrl(path)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onLoad((options) => {
|
||||||
|
qjQueryById(options.id)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.info_box {
|
||||||
|
padding: 40rpx 30rpx 16rpx 30rpx;
|
||||||
|
width: 630rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
background-image: url(../../static/index/line.png);
|
||||||
|
background-size: 44rpx 12rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left bottom;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
|
view {
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,47 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :class="['content',{'gray':store.isgray==1}]">
|
<view :class="['content',{'gray':store.isgray==1}]">
|
||||||
<uni-card>
|
<uni-card>
|
||||||
<!-- <view style="maring: 0 30rpx;"> -->
|
<view>
|
||||||
<!-- <uni-row>
|
<uni-row v-show="!username">
|
||||||
<uni-col :span="11">
|
<uni-col :span="12"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
|
||||||
<uni-title title="姓名" align="left" type="h5"></uni-title>
|
<uni-col :span="12"><uni-title title="重置" align="right" type="h5" color="#666666"
|
||||||
</uni-col> -->
|
@click="reset"></uni-title></uni-col>
|
||||||
<!-- <uni-col :span="11" :push="2">
|
|
||||||
<uni-title title="请假类别" align="left" type="h5"></uni-title>
|
|
||||||
</uni-col> -->
|
|
||||||
<!-- </uni-row>
|
|
||||||
<uni-row>
|
|
||||||
<uni-col :span="11">
|
|
||||||
<uni-easyinput v-model="xm" suffixIcon="search" clearable placeholder="姓名模糊查询" @change="Search"
|
|
||||||
@iconClick="Search" />
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="11" :push="2"> -->
|
|
||||||
<!-- <tree-select :dataSource="dataSource" v-model="type" dataValue="name" /> -->
|
|
||||||
<!-- <uni-easyinput v-model="ldhth" suffixIcon="search" clearable
|
|
||||||
@change="Search" @iconClick="Search" /> -->
|
|
||||||
<!-- </uni-col>
|
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</view> -->
|
<uni-row v-show="!username">
|
||||||
<view style="maring: 0 30rpx;">
|
|
||||||
<uni-row>
|
|
||||||
<uni-col :span="24"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row>
|
|
||||||
<uni-col :span="24">
|
<uni-col :span="24">
|
||||||
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode"
|
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode"
|
||||||
@change="departChange"></trq-depart-select>
|
@change="departChange"></trq-depart-select>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
<uni-row>
|
||||||
|
<uni-col :span="24"><uni-title title="请假时间" align="left" type="h5"></uni-title></uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row>
|
||||||
|
<uni-col :span="24">
|
||||||
|
<uni-datetime-picker v-model="datetimerange" type="datetimerange" rangeSeparator="至"
|
||||||
|
@input="handleInput" />
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<!-- ECharts图表 -->
|
||||||
|
<view class="chart-container">
|
||||||
|
<l-echart ref="chart" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" v-for="item,i in list" :key="i" @click="">
|
<view class="item" v-for="item,i in list" :key="i"
|
||||||
|
@click="jump(`/pages/views/renliziyuan/qingjiaxinxi/detail?id=${item.id}`)">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item._sysOrgCode}}的{{item._username}}{{item._type}}申请
|
{{item.username_dictText}}的{{item.type}}申请
|
||||||
</view>
|
</view>
|
||||||
<view class="time_box f-row aic">
|
<view class="time_box f-row aic">
|
||||||
<view class="time">
|
<view class="time">
|
||||||
{{item._begintime}}至{{item._endtime}}
|
{{item.sysOrgCode_dictText}}
|
||||||
|
</view>
|
||||||
|
<view class="f-row aic no-wrap-right">
|
||||||
|
{{item.begintime}}至{{item.endtime}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -55,11 +53,11 @@
|
|||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onPullDownRefresh,
|
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
queryLeaveListApi
|
queryLeaveListApi,
|
||||||
|
countByOrgApi
|
||||||
} from '@/api/leaveApi.js';
|
} from '@/api/leaveApi.js';
|
||||||
import {
|
import {
|
||||||
getCategoryItemsApi
|
getCategoryItemsApi
|
||||||
@ -67,26 +65,67 @@
|
|||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from '@/store';
|
} from '@/store';
|
||||||
// import treeSelect from "@/components/treeSelect/treeSelect.vue"
|
|
||||||
import {
|
import * as echarts from 'echarts';
|
||||||
beforeJump,
|
const chart = ref(null);
|
||||||
opendocument
|
const chartOption = ref({});
|
||||||
} from '@/utils/index.js';
|
const orgCode = ref('') //部门树选中的orgCode
|
||||||
const orgCode = ref("") //部门树选中的orgCode
|
const datetimerange = ref('') //时间查询
|
||||||
|
const type = ref('') //图表点击事件
|
||||||
|
const username = ref('') //用户名
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const list = ref([])
|
const list = ref([])
|
||||||
const dataSource = ref([])
|
|
||||||
const type = ref([])
|
|
||||||
let pageNo = 1
|
let pageNo = 1
|
||||||
let pageSize = 15
|
let pageSize = 15
|
||||||
let loading = false
|
let loading = false
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad((options) => {
|
||||||
queryLeaveList()
|
if (options.username) {
|
||||||
|
username.value = options.username
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function departChange(e) {
|
||||||
|
orgCode.value = e
|
||||||
|
queryLeave()
|
||||||
|
}
|
||||||
|
|
||||||
|
function reset() {
|
||||||
|
orgCode.value = null
|
||||||
|
datetimerange.value = []
|
||||||
|
type.value = ''
|
||||||
|
username.value = ''
|
||||||
|
queryLeave()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleInput(e) {
|
||||||
|
datetimerange.value = e;
|
||||||
|
queryLeave()
|
||||||
|
}
|
||||||
|
|
||||||
|
const queryLeave = (e) => {
|
||||||
|
let param = {
|
||||||
|
sysOrgCode: orgCode.value,
|
||||||
|
begin: datetimerange.value[0] ? datetimerange.value[0].substring(0, 10) : '',
|
||||||
|
end: datetimerange.value[1] ? datetimerange.value[1].substring(0, 10) : '',
|
||||||
|
type: type.value,
|
||||||
|
username: username.value
|
||||||
|
}
|
||||||
|
if (e == 1) { // 下拉刷新时,pageNo++
|
||||||
|
pageNo++;
|
||||||
|
} else { // list置空,pageNo置1
|
||||||
|
list.value = [];
|
||||||
|
pageNo = 1;
|
||||||
|
if (e != 2) {
|
||||||
|
// 如果不是图表点击事件,更新图表
|
||||||
|
setChartOption(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 更新数据
|
||||||
|
queryLeaveList(param);
|
||||||
|
}
|
||||||
|
|
||||||
const queryLeaveList = (params = {}) => {
|
const queryLeaveList = (params = {}) => {
|
||||||
list.value = []
|
|
||||||
loading = true
|
loading = true
|
||||||
queryLeaveListApi({
|
queryLeaveListApi({
|
||||||
...params,
|
...params,
|
||||||
@ -94,49 +133,55 @@
|
|||||||
pageSize
|
pageSize
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
list.value = [...list.value, ...formatObj(res.result.records, 'username_dictText', 'type',
|
list.value = [...list.value, ...res.result.records]
|
||||||
'begintime', 'endtime', 'sysOrgCode_dictText')]
|
|
||||||
}
|
}
|
||||||
loading = false
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {})
|
||||||
console.log('err', err);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const formatObj = (arr, username, type, begintime, endtime, sysOrgCode) => {
|
|
||||||
arr.map((item) => {
|
|
||||||
item['_username'] = item[username]
|
|
||||||
item['_type'] = item[type]
|
|
||||||
item['_begintime'] = item[begintime]
|
|
||||||
item['_endtime'] = item[endtime]
|
|
||||||
item['_sysOrgCode'] = item[sysOrgCode]
|
|
||||||
})
|
|
||||||
return arr
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function departChange(e) {
|
// 初始化图表
|
||||||
let params = {
|
const initChart = () => {
|
||||||
sysOrgCode: e
|
setTimeout(async () => {
|
||||||
}
|
if (!chart.value) return;
|
||||||
|
const myChart = await chart.value.init(echarts);
|
||||||
|
myChart.setOption(chartOption.value);
|
||||||
|
myChart.on('click', (params) => {
|
||||||
|
// 根据 params 处理点击事件
|
||||||
|
type.value = params.name
|
||||||
|
queryLeave(2);
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
|
};
|
||||||
|
|
||||||
queryLeaveList(params)
|
const setChartOption = (e) => {
|
||||||
|
countByOrgApi(e).then(res => {
|
||||||
|
chartOption.value = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
type: 'pie',
|
||||||
|
radius: '50%',
|
||||||
|
data: res.result
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
initChart()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const jump = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const back = () => {
|
const back = () => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
onPullDownRefresh(() => {
|
|
||||||
pageNo = 1
|
|
||||||
loading = false
|
|
||||||
list.value = []
|
|
||||||
queryLeaveList()
|
|
||||||
uni.stopPullDownRefresh()
|
|
||||||
})
|
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
if (loading) return
|
if (loading) return
|
||||||
pageNo++
|
queryLeave(1); //下拉刷新传1
|
||||||
queryLeaveList()
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -180,20 +225,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.time_box {
|
.time_box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 均匀分布子元素 */
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
.time {
|
||||||
width: 28rpx;
|
margin-right: 62rpx;
|
||||||
height: 22rpx;
|
width: 50%;
|
||||||
margin-left: 62rpx;
|
}
|
||||||
margin-right: 8rpx;
|
|
||||||
|
.no-wrap-right {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
static/office/leaveApplication.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
static/office/leaveRecord.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 2.8 KiB |
@ -57,7 +57,6 @@
|
|||||||
watch(
|
watch(
|
||||||
tempSelectDepartID,
|
tempSelectDepartID,
|
||||||
(newVal,oldVal)=>{ //通过监听触发change by 闵
|
(newVal,oldVal)=>{ //通过监听触发change by 闵
|
||||||
console.log(newVal)
|
|
||||||
$emit('change', newVal, departInfo)
|
$emit('change', newVal, departInfo)
|
||||||
},{
|
},{
|
||||||
immediate:true,
|
immediate:true,
|
||||||
@ -69,7 +68,6 @@
|
|||||||
const getDepartList = () => {
|
const getDepartList = () => {
|
||||||
queryMyDeptTreeListApi().then((res) => {
|
queryMyDeptTreeListApi().then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
console.log(res)
|
|
||||||
departList.value = res.result
|
departList.value = res.result
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@ -77,7 +75,6 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const onnodeclick = ((e) => {
|
const onnodeclick = ((e) => {
|
||||||
console.log(e)
|
|
||||||
departInfo.value = e;
|
departInfo.value = e;
|
||||||
if (props.returnCodeOrID == "orgCode") {
|
if (props.returnCodeOrID == "orgCode") {
|
||||||
tempSelectDepartID.value = e.orgCode
|
tempSelectDepartID.value = e.orgCode
|
||||||
@ -90,13 +87,11 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
const onchange = ((e) => {
|
const onchange = ((e) => {
|
||||||
console.log(e)
|
|
||||||
selectDepartID.value = e.detail.value[e.detail.value.length - 1].value
|
selectDepartID.value = e.detail.value[e.detail.value.length - 1].value
|
||||||
// $emit('change', e.detail.value[e.detail.value.length - 1].value, {})
|
// $emit('change', e.detail.value[e.detail.value.length - 1].value, {})
|
||||||
})
|
})
|
||||||
|
|
||||||
const onpopupclosed = ((e) => {
|
const onpopupclosed = ((e) => {
|
||||||
console.log(e)
|
|
||||||
selectDepartID.value = tempSelectDepartID.value
|
selectDepartID.value = tempSelectDepartID.value
|
||||||
// $emit('change', selectDepartID.value, departInfo)
|
// $emit('change', selectDepartID.value, departInfo)
|
||||||
})
|
})
|
||||||
|