Merge branch 'yzqUniapp' into 'master'
Yzq uniapp See merge request cxcxt/cxc-szcx-uniapp!12
@ -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
|
||||||
|
@ -72,7 +72,7 @@ export function indexChartScdtDataApi(config) { // 首页
|
|||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function bpmlistApi(config) { // 公文
|
export function gongwenlistApi(config) { // 公文
|
||||||
return https({
|
return https({
|
||||||
url: '/cxcoagwfb/cxcOaGwfb/bpmlist',
|
url: '/cxcoagwfb/cxcOaGwfb/bpmlist',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -10,6 +10,7 @@ export function qjAddApi(config) { // 发起请假流程申请
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function queryZwmcAndExaApi(username) { // 根据username获取职位名称和审批领导列表
|
export function queryZwmcAndExaApi(username) { // 根据username获取职位名称和审批领导列表
|
||||||
return https({
|
return https({
|
||||||
url: '/CxcQxj/cxcQxj/queryZwmcByUsername',
|
url: '/CxcQxj/cxcQxj/queryZwmcByUsername',
|
||||||
@ -37,3 +38,19 @@ export function queryHisDateApi(username) { // 根据username获取最新请假
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function queryLeaveListApi(params) { // 获取所有请假信息
|
||||||
|
return https({
|
||||||
|
url: '/CxcQxj/cxcQxj/list',
|
||||||
|
method: 'get',
|
||||||
|
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>
|
||||||
@ -110,11 +111,9 @@
|
|||||||
} from '@/api/api.js';
|
} from '@/api/api.js';
|
||||||
import {
|
import {
|
||||||
qjQueryByIdApi
|
qjQueryByIdApi
|
||||||
} from '@/api/pages.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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
pages.json
@ -242,6 +242,20 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/views/renliziyuan/qingjiaxinxi/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "请假信息",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/views/renliziyuan/qingjiaxinxi/detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "请假详情",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"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>
|
||||||
@ -52,7 +45,7 @@
|
|||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
bpmlistApi,
|
gongwenlistApi,
|
||||||
faguiApi,
|
faguiApi,
|
||||||
zhiduApi,
|
zhiduApi,
|
||||||
gonggaolistApi,
|
gonggaolistApi,
|
||||||
@ -62,7 +55,7 @@
|
|||||||
useStore
|
useStore
|
||||||
} from '@/store';
|
} from '@/store';
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
import customNav from '../../bpm/customNav.vue';
|
import customNav from '@/bpm/customNav.vue';
|
||||||
import {
|
import {
|
||||||
beforeJump,
|
beforeJump,
|
||||||
opendocument
|
opendocument
|
||||||
@ -76,7 +69,7 @@
|
|||||||
/**公文接口*/
|
/**公文接口*/
|
||||||
const bpmlist = () => {
|
const bpmlist = () => {
|
||||||
loading = true
|
loading = true
|
||||||
bpmlistApi({
|
gongwenlistApi({
|
||||||
pageNo,
|
pageNo,
|
||||||
pageSize,
|
pageSize,
|
||||||
fwbt: formatSearchkey()
|
fwbt: formatSearchkey()
|
||||||
|
@ -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">
|
||||||
开始时间:
|
开始时间:
|
||||||
@ -111,7 +111,7 @@
|
|||||||
qjAddApi,
|
qjAddApi,
|
||||||
queryZwmcAndExaApi,
|
queryZwmcAndExaApi,
|
||||||
queryHisDateApi
|
queryHisDateApi
|
||||||
} from '@/api/pages.js';
|
} from '@/api/leaveApi.js';
|
||||||
import {
|
import {
|
||||||
queryDepByCode,
|
queryDepByCode,
|
||||||
queryZbDepByLdhth
|
queryZbDepByLdhth
|
||||||
@ -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) => {
|
||||||
@ -178,7 +180,6 @@
|
|||||||
}
|
}
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
loadData()
|
loadData()
|
||||||
// getTomorrowDate()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const select = (e) => {
|
const select = (e) => {
|
||||||
@ -278,11 +279,11 @@
|
|||||||
|
|
||||||
queryHisDateApi(store.userinfo.username).then((res) => { // 最新请假结束日期
|
queryHisDateApi(store.userinfo.username).then((res) => { // 最新请假结束日期
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('--0', res)
|
|
||||||
getTomorrowDate(res);
|
getTomorrowDate(res);
|
||||||
|
startDate.value = beginTime.value; // 如果有最新请假日期,设置startDate为该日期
|
||||||
} else {
|
} else {
|
||||||
console.log('--1', res)
|
|
||||||
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) {
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
// onReachBottom
|
// onReachBottom
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
bpmlistApi,
|
gongwenlistApi,
|
||||||
gonggaolistApi,
|
gonggaolistApi,
|
||||||
zhibanApi,
|
zhibanApi,
|
||||||
faguiApi,
|
faguiApi,
|
||||||
@ -261,7 +261,7 @@
|
|||||||
/**公文接口*/
|
/**公文接口*/
|
||||||
const bpmlist = () => {
|
const bpmlist = () => {
|
||||||
loading = true
|
loading = true
|
||||||
bpmlistApi({
|
gongwenlistApi({
|
||||||
pageNo,
|
pageNo,
|
||||||
pageSize
|
pageSize
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@ -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>
|
251
pages/views/renliziyuan/qingjiaxinxi/index.vue
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
<template>
|
||||||
|
<view :class="['content',{'gray':store.isgray==1}]">
|
||||||
|
<uni-card>
|
||||||
|
<view>
|
||||||
|
<uni-row v-show="!username">
|
||||||
|
<uni-col :span="12"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
|
||||||
|
<uni-col :span="12"><uni-title title="重置" align="right" type="h5" color="#666666"
|
||||||
|
@click="reset"></uni-title></uni-col>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row v-show="!username">
|
||||||
|
<uni-col :span="24">
|
||||||
|
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode"
|
||||||
|
@change="departChange"></trq-depart-select>
|
||||||
|
</uni-col>
|
||||||
|
</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>
|
||||||
|
</uni-card>
|
||||||
|
<view class="list">
|
||||||
|
<view class="item" v-for="item,i in list" :key="i"
|
||||||
|
@click="jump(`/pages/views/renliziyuan/qingjiaxinxi/detail?id=${item.id}`)">
|
||||||
|
<view class="title">
|
||||||
|
{{item.username_dictText}}的{{item.type}}申请
|
||||||
|
</view>
|
||||||
|
<view class="time_box f-row aic">
|
||||||
|
<view class="time">
|
||||||
|
{{item.sysOrgCode_dictText}}
|
||||||
|
</view>
|
||||||
|
<view class="f-row aic no-wrap-right">
|
||||||
|
{{item.begintime}}至{{item.endtime}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onReachBottom,
|
||||||
|
onLoad
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
queryLeaveListApi,
|
||||||
|
countByOrgApi
|
||||||
|
} from '@/api/leaveApi.js';
|
||||||
|
import {
|
||||||
|
getCategoryItemsApi
|
||||||
|
} from '@/api/api.js';
|
||||||
|
import {
|
||||||
|
useStore
|
||||||
|
} from '@/store';
|
||||||
|
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
const chart = ref(null);
|
||||||
|
const chartOption = ref({});
|
||||||
|
const orgCode = ref('') //部门树选中的orgCode
|
||||||
|
const datetimerange = ref('') //时间查询
|
||||||
|
const type = ref('') //图表点击事件
|
||||||
|
const username = ref('') //用户名
|
||||||
|
const store = useStore();
|
||||||
|
const list = ref([])
|
||||||
|
let pageNo = 1
|
||||||
|
let pageSize = 15
|
||||||
|
let loading = false
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
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 = {}) => {
|
||||||
|
loading = true
|
||||||
|
queryLeaveListApi({
|
||||||
|
...params,
|
||||||
|
pageNo,
|
||||||
|
pageSize
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
list.value = [...list.value, ...res.result.records]
|
||||||
|
}
|
||||||
|
loading = false
|
||||||
|
}).catch((err) => {})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化图表
|
||||||
|
const initChart = () => {
|
||||||
|
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);
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = () => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (loading) return
|
||||||
|
queryLeave(1); //下拉刷新传1
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
padding-top: v-bind(cusnavbarheight);
|
||||||
|
padding-bottom: 24rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background: #ED361D;
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
left: 9rpx;
|
||||||
|
top: 44rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time_box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 均匀分布子元素 */
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #888888;
|
||||||
|
|
||||||
|
.time {
|
||||||
|
margin-right: 62rpx;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-wrap-right {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.back {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
</style>
|
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)
|
||||||
})
|
})
|
||||||
|