From 3c2dc3ac5ef6f39cf87adeef2f913c8333e4a7c3 Mon Sep 17 00:00:00 2001
From: yangzhq68909 <993367776@qq.com>
Date: Fri, 16 May 2025 11:01:27 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E5=81=87=E7=94=B3=E8=AF=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
env/.env.development | 4 +-
src/api/pages/absence/index.ts | 32 +++
src/api/system/index.ts | 13 +
src/components/PageLayout/PageLayout.vue | 1 -
src/pages.json | 9 +
src/pages/humanResources/absence/apply.vue | 319 +++++++++++++++++++++
src/pages/integrated/duty/index.vue | 10 +-
src/pages/login/login.vue | 2 +-
src/pages/operate/sc/index.vue | 60 ++--
src/router/index.ts | 1 -
src/types/uni-pages.d.ts | 1 +
src/utils/index.ts | 4 +-
12 files changed, 417 insertions(+), 39 deletions(-)
create mode 100644 src/api/pages/absence/index.ts
create mode 100644 src/pages/humanResources/absence/apply.vue
diff --git a/env/.env.development b/env/.env.development
index 5137213..4cde61d 100644
--- a/env/.env.development
+++ b/env/.env.development
@@ -5,5 +5,5 @@ VITE_DELETE_CONSOLE = false
# 是否开启sourcemap
VITE_SHOW_SOURCEMAP = true
-#VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot'
-VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
\ No newline at end of file
+VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot'
+#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
\ No newline at end of file
diff --git a/src/api/pages/absence/index.ts b/src/api/pages/absence/index.ts
new file mode 100644
index 0000000..2b2b9e2
--- /dev/null
+++ b/src/api/pages/absence/index.ts
@@ -0,0 +1,32 @@
+import { http } from '@/utils/http';
+
+/*根据username获取职位名称和审批领导列表*/
+export function queryZwmcAndExaApi(username : string) {
+ return http({
+ url: '/CxcQxj/cxcQxj/queryZwmcByUsername',
+ method: 'GET',
+ data: {
+ username
+ }
+ })
+}
+
+/*新增请假申请*/
+export function addApi(config) {
+ return http({
+ url: '/CxcQxj/cxcQxj/add',
+ method: 'POST',
+ data: config
+ })
+}
+
+/*根据username获取最新请假结束日期*/
+export function queryHisDateApi(username : string) {
+ return http({
+ url: '/CxcQxj/cxcQxj/queryHisDate',
+ method: 'GET',
+ data: {
+ username
+ }
+ })
+}
\ No newline at end of file
diff --git a/src/api/system/index.ts b/src/api/system/index.ts
index 208c86a..290795c 100644
--- a/src/api/system/index.ts
+++ b/src/api/system/index.ts
@@ -65,4 +65,17 @@ export function queryCarouselApi(config) {
method: 'GET',
data: config
});
+}
+
+/**
+ * 获取分类字典
+ */
+export function getCategoryItemsApi(pid) { // 分类字典专用
+ return http({
+ url: '/sys/category/findtree',
+ method: 'GET',
+ data: {
+ pid
+ }
+ })
}
\ No newline at end of file
diff --git a/src/components/PageLayout/PageLayout.vue b/src/components/PageLayout/PageLayout.vue
index 9ba8f11..167e533 100644
--- a/src/components/PageLayout/PageLayout.vue
+++ b/src/components/PageLayout/PageLayout.vue
@@ -145,7 +145,6 @@ const clearPageParamsCache = () => {
const handleClickRight = () => {
emit('navRight')
}
-console.log('props:', props)
\ No newline at end of file
diff --git a/src/pages/integrated/duty/index.vue b/src/pages/integrated/duty/index.vue
index f80d866..d115524 100644
--- a/src/pages/integrated/duty/index.vue
+++ b/src/pages/integrated/duty/index.vue
@@ -9,7 +9,7 @@
-
@@ -30,10 +30,9 @@
import {
getListApi
} from '@/api/pages/duty'
-
+ const appStore = useAppStore();
const dataValue = ref(Date.now())
const dataSource = ref([])
- const appStore = useAppStore();
const handleClickLeft = () => {
uni.navigateBack();
};
@@ -67,7 +66,4 @@
onLoad(() => {
getList()
})
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue
index 53ab088..931a302 100644
--- a/src/pages/login/login.vue
+++ b/src/pages/login/login.vue
@@ -71,7 +71,7 @@
const loading = ref(false)
const userName = ref()
const password = ref()
- const showPassword = ref(false) //是否显示明文
+ const showPassword = ref(true) //是否显示明文
const remPW = ref(false) //是否记住密码
/**h5系统信息中没有appWgtVersion值*/
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
diff --git a/src/pages/operate/sc/index.vue b/src/pages/operate/sc/index.vue
index b06ae7c..2b079bd 100644
--- a/src/pages/operate/sc/index.vue
+++ b/src/pages/operate/sc/index.vue
@@ -9,13 +9,13 @@
-
-
+ @confirm="handleConfirm" :display-format="displayFormat">
+
@@ -42,17 +42,10 @@
getPathByInsflagQuote,
queryByIdApi
} from '@/api/pages/sc';
- import {
- useColPickerData
- } from '@/hooks/useColPickerData'
import Base64 from '@/utils/code';
import {
getEnvBaseUrl
} from '@/utils/index'
- const {
- colPickerData,
- findChildrenByCode
- } = useColPickerData()
const appStore = useAppStore();
const data = ref([])
@@ -95,16 +88,18 @@
let quote = res.result.quote
let insFlag = res.result.insFlag
if (url) {
- fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(getEnvBaseUrl() + '/sys/common/static/' + url))
- }else if(/^-?\d+$/.test(quote) && !insFlag){
+ fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64
+ .encode(getEnvBaseUrl() + '/sys/common/static/' + url))
+ } else if (/^-?\d+$/.test(quote) && !insFlag) {
getJobDesIdByDepAndName({
jobname: quote,
jobdep: useUserStore().userInfo.orgCode
}).then((res) => {
- fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res.id +
+ fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res
+ .id +
"&token=" + useUserStore().userInfo.token;
})
- }else if(insFlag){
+ } else if (insFlag) {
getPathByInsflagQuote({
insFlag: insFlag,
quote: quote
@@ -112,7 +107,7 @@
fileUrl.value = ''
fileUrl2.value = res;
})
- }else {
+ } else {
fileUrl.value = ''
fileUrl2.value = ''
}
@@ -143,22 +138,37 @@
url: `/pages/onlinePreview/${path}?data=${e}`
});
};
-
+
+ const findChildrenByCode = (data, code) => {
+ if (!code) {
+ return data
+ }
+ for (const item of data) {
+ if (item.value === code) {
+ return item.children || null
+ }
+ if (item.children) {
+ const childrenResult = findChildrenByCode(item.children, code)
+ if (childrenResult) {
+ return childrenResult
+ }
+ }
+ }
+ return null
+ }
+
// 判断是否是 H5 环境
const isH5 = () => {
- // #ifdef H5
- return true;
- // #endif
- // #ifndef H5
- return false;
- // #endif
+ // #ifdef H5
+ return true;
+ // #endif
+ // #ifndef H5
+ return false;
+ // #endif
}
onLoad(() => {
getList();
- //#ifdef H5 || MP-WEIXIN
- ifH5 = true;
- //#endif
});