diff --git a/env/.env b/env/.env index 895cca4..8a9e6a3 100644 --- a/env/.env +++ b/env/.env @@ -2,8 +2,12 @@ VITE_APP_TITLE = '数智产销' VITE_APP_PORT = 9000 VITE_UNI_APPID = '__UNI__9F097F0' +#测试APPID +#VITE_UNI_APPID = '__UNI__1B02D50' VITE_WX_APPID = 'wx8e287639924edb51' +#发布版本号 + # h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base VITE_APP_PUBLIC_BASE=/ @@ -26,4 +30,4 @@ VITE_APP_PROXY= false VITE_APP_PROXY_PREFIX = '/api' # 是否启用mock (1.仅支持h5 2.启用必须要开启代理,否则生效。) -VITE_USE_MOCK = true +VITE_USE_MOCK = true \ No newline at end of file diff --git a/env/.env.development b/env/.env.development index 65c9105..f347345 100644 --- a/env/.env.development +++ b/env/.env.development @@ -4,6 +4,14 @@ NODE_ENV = 'development' VITE_DELETE_CONSOLE = false # 是否开启sourcemap VITE_SHOW_SOURCEMAP = true -VITE_SERVER_BASEURL = 'http://10.75.15.246:8080/jeecg-boot' +# 是否启用读取配置文件 min +#VITE_WEBAPP = 'D://opt//AppUpdateTest' +VITE_WEBAPP = '' +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://szcx.zyyt.sinopec.com/jeecg-boot' \ No newline at end of file +#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot' + + + +#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/wwapi' +#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi' \ No newline at end of file diff --git a/env/.env.production b/env/.env.production index 99f7ca7..6bf67f0 100644 --- a/env/.env.production +++ b/env/.env.production @@ -4,4 +4,10 @@ NODE_ENV = 'development' VITE_DELETE_CONSOLE = true # 是否开启sourcemap VITE_SHOW_SOURCEMAP = false +# 是否启用读取配置文件 min +#VITE_WEBAPP = 'D://opt//AppUpdateTest' +VITE_WEBAPP = '' VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot' +#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/wwapi' +#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi' +#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot' \ No newline at end of file diff --git a/manifest.config.ts b/manifest.config.ts index ff0af2f..1ee837f 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -18,7 +18,7 @@ export default defineManifestConfig({ appid: VITE_UNI_APPID, description: '', versionName: '2.0.0', - versionCode: '20250605', + versionCode: '20250616', transformPx: false, locale: VITE_FALLBACK_LOCALE, // 'zh-Hans' /* 5+App特有相关 */ @@ -26,9 +26,20 @@ export default defineManifestConfig({ usingComponents: true, nvueStyleCompiler: 'uni-app', compilerVersion: 3, + android: { + webView: { + domStorageEnabled: true, + databaseEnabled: true, + allowFileAccess: true + } + }, compatible: { ignoreVersion: true, }, + webview: { + debug: true, + crossDomain: true // 允许跨域通信 + }, splashscreen: { alwaysShowBeforeRender: true, waiting: true, diff --git a/package.json b/package.json index aabe517..7d4d70a 100644 --- a/package.json +++ b/package.json @@ -134,9 +134,13 @@ "@uni-helper/vite-plugin-uni-pages": "0.2.20", "@uni-helper/vite-plugin-uni-platform": "^0.0.4", "@unocss/preset-legacy-compat": "^0.59.4", + "@vue/devtools-api": "^7.7.6", + "@vue/devtools-kit": "^7.7.6", + "@vue/devtools-shared": "^7.7.6", "@vue/runtime-core": "^3.4.21", "@vue/tsconfig": "^0.1.3", "autoprefixer": "^10.4.20", + "birpc": "^2.3.0", "commitlint": "^18.6.1", "czg": "^1.9.4", "eslint": "^8.57.1", @@ -146,8 +150,10 @@ "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-vue": "^9.32.0", + "hookable": "^5.5.3", "mockjs": "^1.1.0", "openapi-ts-request": "^1.1.2", + "perfect-debounce": "^1.0.0", "postcss": "^8.4.49", "postcss-html": "^1.7.0", "postcss-scss": "^4.0.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b06ce6..fa6df3b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -225,6 +225,15 @@ importers: '@unocss/preset-legacy-compat': specifier: ^0.59.4 version: 0.59.4 + '@vue/devtools-api': + specifier: ^7.7.6 + version: 7.7.6 + '@vue/devtools-kit': + specifier: ^7.7.6 + version: 7.7.6 + '@vue/devtools-shared': + specifier: ^7.7.6 + version: 7.7.6 '@vue/runtime-core': specifier: ^3.4.21 version: 3.5.13 @@ -234,6 +243,9 @@ importers: autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) + birpc: + specifier: ^2.3.0 + version: 2.3.0 commitlint: specifier: ^18.6.1 version: 18.6.1(@types/node@20.17.9)(typescript@5.7.2) @@ -261,12 +273,18 @@ importers: eslint-plugin-vue: specifier: ^9.32.0 version: 9.32.0(eslint@8.57.1) + hookable: + specifier: ^5.5.3 + version: 5.5.3 mockjs: specifier: ^1.1.0 version: 1.1.0 openapi-ts-request: specifier: ^1.1.2 version: 1.1.2(@types/node@20.17.9)(@vue/compiler-sfc@3.5.13)(chokidar@3.6.0)(typescript@5.7.2) + perfect-debounce: + specifier: ^1.0.0 + version: 1.0.0 postcss: specifier: ^8.4.49 version: 8.4.49 @@ -1234,14 +1252,12 @@ packages: engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [gnu] '@dcloudio/uts-linux-x64-musl@3.0.0-4030620241128001': resolution: {integrity: sha512-HbuOIYCe0KTzW42oqACQDmSuLWmiEG9zUE3rGpp5QP3MKpcB4wJ5BAOusCt3V02akyVv4/IGToktN8dc9N7+Eg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [musl] '@dcloudio/uts-win32-ia32-msvc@3.0.0-4030620241128001': resolution: {integrity: sha512-pgITm85ya64iJ19mixTUOiYVAyCJQ+V66L5Ue/cmME6CA2dU9DjTtPEP6DdSnoyq9JWcdbQLyVEQkxxtBSOyGA==} @@ -1968,55 +1984,46 @@ packages: resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.28.0': resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.28.0': resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.28.0': resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.28.0': resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.28.0': resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.28.0': resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.28.0': resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.28.0': resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.28.0': resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==} diff --git a/src/App.vue b/src/App.vue index 1814e62..a987fbc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,8 +3,8 @@ import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only' import { beforEach } from '@/router/index' import { jurisdictionApi } from '@/api/system'; - import { useAppStore, useUpdateApp } from '@/store' - import { getLocation } from '@/utils'; + import { useAppStore } from '@/store' + import { getLocation, useUpdateApp } from '@/utils'; export default { onLaunch: function (options) { // 检查更新 @@ -13,30 +13,49 @@ getLocation() }, onShow: function (options) { - if (uni.getStorageSync('logintime') && uni.getStorageSync('logintime') + 1800000 <= Date.now()) { //登录半小时自动注销 需重新登陆 - uni.removeStorageSync('logintime') - uni.navigateTo({ - url: '/pages/login/login' - }) - return + //改造了一下,加了白名单验证 + //为了实现实流检定的证书验证页面 + //jiang 20250605 + // 定义白名单页面 + const publicPages = [ + '/pages/sljd/index' + ] + + // 检查当前页面是否在白名单中 + const isPublicPage = publicPages.includes(`/${options.path}`) + + // 非白名单页面才执行登录检查 + if (!isPublicPage) { + if (uni.getStorageSync('logintime') && uni.getStorageSync('logintime') + 1800000 <= Date.now()) { + uni.removeStorageSync('logintime') + uni.navigateTo({ + url: '/pages/login/login' + }) + return + } } - // 首次进入页面时路由拦截 + + // 路由拦截(白名单页面跳过) setTimeout(() => { const currentPage = options.path - beforEach({ path: '/' }, { path: currentPage, fullPath: currentPage }, (data) => { - if (data?.path) { - uni.redirectTo({ url: data.path }) - } - }) + if (!isPublicPage) { + beforEach({ path: '/' }, { path: currentPage, fullPath: currentPage }, (data) => { + if (data?.path) { + uni.redirectTo({ url: data.path }) + } + }) + } }, 100) - jurisdictionApi("1827997127165677570").then((res : any) => { - // 0正常 1灰化 - if (res.success) { - const appStore = useAppStore() - appStore.setIsGray(res.result.value) // 更新状态 - } - }) + // 权限检查(非白名单页面执行) + if (!isPublicPage) { + jurisdictionApi("1827997127165677570").then((res : any) => { + if (res.success) { + const appStore = useAppStore() + appStore.setIsGray(res.result.value) + } + }) + } }, // 全局变量 diff --git a/src/api/bpm/index.ts b/src/api/bpm/index.ts new file mode 100644 index 0000000..c7cc202 --- /dev/null +++ b/src/api/bpm/index.ts @@ -0,0 +1,92 @@ +import { http } from '@/utils/http'; + +/*通过id查询公文数据*/ +export function queryDocumentByIdApi(id : string) { + return http({ + url: '/cxcoagwfb/cxcOaGwfb/queryById', + method: 'GET', + data: { id } + }) +} + + +/*通过id查询干租车数据*/ +export function queryCarRentalByIdApi(id : string) { + return http({ + url: '/CarRental/cxcCarRental/queryById', + method: 'GET', + data: { id } + }) +} + +/*通过id查询指标考核主表数据*/ +export function queryZbkhZbByIdApi(id : string) { + return http({ + url: '/jxkh.zbkh/cxcJxkhZbkhZb/listById', + method: 'GET', + data: { id } + }) +} + +/*通过id查询指标考核子表数据*/ +export function queryZbkhFbByIdApi(data : object) { + return http({ + url: '/jxkh.zbkh/cxcJxkhZbkhZb/listCxcJxkhZbkhDwkhByMainId', + method: 'GET', + data + }) +} + +/*通过id查询指标考核自定义表头*/ +export function queryZbkhBtByIdApi(mainId : string) { + return http({ + url: '/jxkh.dwkhbt/cxcJxkhZbkhDwkhBtZb/listByMainId', + method: 'GET', + data: { mainId } + }) +} + +/*通过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 } + }) + } diff --git a/src/api/bpm/sign.ts b/src/api/bpm/sign.ts new file mode 100644 index 0000000..76769f8 --- /dev/null +++ b/src/api/bpm/sign.ts @@ -0,0 +1,26 @@ +import { http } from '@/utils/http'; + +/*通过id查询数据*/ +export function checkSign(ldhth : string) { + return http({ + url: '/cxcesign/cxcEsign/getUserCo', + method: 'GET', + data: { ldhth } + }) +} + +export function getCompleteNum(procInsId : string) { + return http({ + url: '/cxcesign/cxcEsign/getCompleteNum', + method: 'GET', + data: { procInsId } + }) +} + +export function processHistoryList(processInstanceId : string) { + return http({ + url: '/act/task/processHistoryList', + method: 'GET', + data: { processInstanceId } + }) +} \ No newline at end of file diff --git a/src/api/humanResource/absence/index.ts b/src/api/humanResource/absence/index.ts index 874629f..1fa18e2 100644 --- a/src/api/humanResource/absence/index.ts +++ b/src/api/humanResource/absence/index.ts @@ -49,7 +49,7 @@ export function countByOrgApi(params : object) { }) } -/*通过id查询请假数据*/ +/*通过id查询数据*/ export function queryByIdApi(id : string) { return http({ url: '/CxcQxj/cxcQxj/queryById', diff --git a/src/api/humanResource/clockin/index.ts b/src/api/humanResource/clockin/index.ts new file mode 100644 index 0000000..57c1f37 --- /dev/null +++ b/src/api/humanResource/clockin/index.ts @@ -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 + }) +} \ No newline at end of file diff --git a/src/api/integrated/unconventional.ts b/src/api/integrated/unconventional.ts new file mode 100644 index 0000000..3221818 --- /dev/null +++ b/src/api/integrated/unconventional.ts @@ -0,0 +1,10 @@ +import { http } from '@/utils/http'; + +// 健康数据提交API +export function queryUnData(data : Object) { + return http({ + url: '/cxcfcggzsq/cxcFcggzsq/queryByIdDict', + method: 'get', + data + }) +} \ No newline at end of file diff --git a/src/api/pages/sc/index.ts b/src/api/pages/sc/index.ts index 0f6c53a..bfd3db7 100644 --- a/src/api/pages/sc/index.ts +++ b/src/api/pages/sc/index.ts @@ -1,18 +1,17 @@ import { http } from '@/utils/http'; -export function getListApi(orgCode : string) { +export function getListApi() { return http({ url: '/sjgl.scnr/cxcSjSc/queryTreeData', - method: 'GET', - data: { orgCode } + method: 'GET' }) } -export function getJobDesIdByDepAndName(config : Object) { +export function getJobDesIdByDepAndName(jobname : string) { return http({ url: '/sjgl.tynr/cxcSjJobdescription/queryByNameDep', method: 'GET', - data: config + data: { jobname } }) } diff --git a/src/api/system/index.ts b/src/api/system/index.ts index 3ec4a04..f1c117c 100644 --- a/src/api/system/index.ts +++ b/src/api/system/index.ts @@ -26,10 +26,13 @@ export function loginApi(config : LoginParams) { * @param * @returns */ -export function upDateAppApi() { +export function upDateAppApi(path : string) { return http({ url: '/sys/common/upDateApp', - method: 'GET' + method: 'GET', + data: { + path + } }) } diff --git a/src/components/Esign/SinopecEsignPage.vue b/src/components/Esign/SinopecEsignPage.vue new file mode 100644 index 0000000..1e41d35 --- /dev/null +++ b/src/components/Esign/SinopecEsignPage.vue @@ -0,0 +1,77 @@ + + + + + \ No newline at end of file diff --git a/src/components/Esign/SinopecEsignPageAPP.vue b/src/components/Esign/SinopecEsignPageAPP.vue new file mode 100644 index 0000000..fb275f8 --- /dev/null +++ b/src/components/Esign/SinopecEsignPageAPP.vue @@ -0,0 +1,250 @@ + + + + + + + + \ No newline at end of file diff --git a/src/components/Esign/SinopecEsignPageH5.vue b/src/components/Esign/SinopecEsignPageH5.vue new file mode 100644 index 0000000..72a21bb --- /dev/null +++ b/src/components/Esign/SinopecEsignPageH5.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts index 561b633..41fc2ef 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -14,7 +14,9 @@ interface ImportMetaEnv { /** 服务端口号 */ readonly VITE_SERVER_PORT: string /** 后台接口地址 */ - readonly VITE_SERVER_BASEURL: string + readonly VITE_WEBAPP: string + /** 读取更新配置文件路径 by min */ + readonly WEBAPP: string /** H5是否需要代理 */ readonly VITE_APP_PROXY: 'true' | 'false' /** H5是否需要代理,需要的话有个前缀 */ diff --git a/src/manifest.json b/src/manifest.json index 5fdabbc..cf7c67b 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,7 +3,7 @@ "appid": "__UNI__9F097F0", "description": "", "versionName": "2.0.0", - "versionCode": "20250605", + "versionCode": "20250616", "transformPx": false, "app-plus": { "usingComponents": true, @@ -89,8 +89,19 @@ } } }, + "android": { + "webView": { + "domStorageEnabled": true, + "databaseEnabled": true, + "allowFileAccess": true + } + }, "compatible": { "ignoreVersion": true + }, + "webview": { + "debug": true, + "crossDomain": true } }, "quickapp": {}, diff --git a/src/pages-bpm/carRental/index.vue b/src/pages-bpm/carRental/index.vue new file mode 100644 index 0000000..1366a9f --- /dev/null +++ b/src/pages-bpm/carRental/index.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/src/pages-bpm/document/index.vue b/src/pages-bpm/document/index.vue new file mode 100644 index 0000000..ae44163 --- /dev/null +++ b/src/pages-bpm/document/index.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/src/pages-bpm/khss/index.vue b/src/pages-bpm/khss/index.vue new file mode 100644 index 0000000..0f7ba0d --- /dev/null +++ b/src/pages-bpm/khss/index.vue @@ -0,0 +1,230 @@ + + + + + \ No newline at end of file diff --git a/src/pages-bpm/leaveApplication/index.vue b/src/pages-bpm/leaveApplication/index.vue index c7e60ee..29a49ce 100644 --- a/src/pages-bpm/leaveApplication/index.vue +++ b/src/pages-bpm/leaveApplication/index.vue @@ -26,13 +26,6 @@ import { imgUrl } from '@/utils/index' - - defineOptions({ - name: 'index', - options: { - styleIsolation: 'shared', - }, - }) const info = ref({}) const image = ref([]) const props = defineProps({ @@ -48,140 +41,18 @@ }); } // 申请信息 - const qjQueryById = () => { + const queryById = () => { queryByIdApi(props.formData.dataId).then((res) => { if (res.success) { info.value = res.result.records[0] - image.value = info.value.path.split(',').map(path => imgUrl(path)) + if(info.value.path){ + image.value = info.value.path.split(',').map(path => imgUrl(path)) + } } }) } onMounted(() => { - qjQueryById() + queryById() }) - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/pages-bpm/unconventional/index.vue b/src/pages-bpm/unconventional/index.vue new file mode 100644 index 0000000..0b6079e --- /dev/null +++ b/src/pages-bpm/unconventional/index.vue @@ -0,0 +1,51 @@ + + + \ No newline at end of file diff --git a/src/pages-bpm/unconventional/stamp.vue b/src/pages-bpm/unconventional/stamp.vue new file mode 100644 index 0000000..c5e37a3 --- /dev/null +++ b/src/pages-bpm/unconventional/stamp.vue @@ -0,0 +1,115 @@ + + + + \ No newline at end of file diff --git a/src/pages-bpm/zbkh/index.vue b/src/pages-bpm/zbkh/index.vue new file mode 100644 index 0000000..940d603 --- /dev/null +++ b/src/pages-bpm/zbkh/index.vue @@ -0,0 +1,195 @@ + + + + + \ No newline at end of file diff --git a/src/pages-humanResource/absence/add.vue b/src/pages-humanResource/absence/add.vue index 2405a10..9e3d463 100644 --- a/src/pages-humanResource/absence/add.vue +++ b/src/pages-humanResource/absence/add.vue @@ -25,8 +25,8 @@ :rules="[{ required: true, message: '请选择开始时间' }]" :min-date="minBegintime" /> - + { diff --git a/src/pages-humanResource/absence/detail.vue b/src/pages-humanResource/absence/detail.vue index 5c45dd6..8fe62d8 100644 --- a/src/pages-humanResource/absence/detail.vue +++ b/src/pages-humanResource/absence/detail.vue @@ -67,7 +67,9 @@ if (res.success) { info.value = res.result.records[0] minDate.value = dateStringToTimestamp(info.value.begintime) - image.value = info.value.path.split(',').map(path => imgUrl(path)) + if(image.value.path){ + image.value = info.value.path.split(',').map(path => imgUrl(path)) + } } }) } diff --git a/src/pages-operate/file/detail.vue b/src/pages-operate/file/detail.vue index 310104f..f93bb7a 100644 --- a/src/pages-operate/file/detail.vue +++ b/src/pages-operate/file/detail.vue @@ -19,7 +19,7 @@ - {{dataSource.jdwj}} + {{getFilename(dataSource.jdwj)}} @@ -33,7 +33,10 @@ import { queryDataById } from '@/api/pages/file' - + import { + getFilename + } from '@/utils' + const appStore = useAppStore() const dataSource = ref({}) diff --git a/src/pages-operate/sc/index.vue b/src/pages-operate/sc/index.vue index e8d57d4..2628dc1 100644 --- a/src/pages-operate/sc/index.vue +++ b/src/pages-operate/sc/index.vue @@ -83,10 +83,7 @@ new base64().encode(baseUrl + url)) } } else if (/^-?\d+$/.test(quote) && !insFlag) { - getJobDesIdByDepAndName({ - jobname: quote, - jobdep: useUserStore().userInfo.orgCode - }).then((res) => { + getJobDesIdByDepAndName(quote).then((res) => { fileUrl.value = getEnvBaseUrl() + '/jmreport/view/929517863011811328?id=' + res .id + "&token=" + useUserStore().userInfo.token; @@ -113,7 +110,7 @@ } const getList = () => { - getListApi(useUserStore().userInfo.orgCode).then(res => { + getListApi().then(res => { data.value = res.result dataSource.value = [data.value.map(item => { return { diff --git a/src/pages-process/components/DynamicLink.vue b/src/pages-process/components/DynamicLink.vue index b7b0692..3347dac 100644 --- a/src/pages-process/components/DynamicLink.vue +++ b/src/pages-process/components/DynamicLink.vue @@ -1,16 +1,20 @@ - \ No newline at end of file diff --git a/src/pages/user/people.vue b/src/pages/user/people.vue index f4d1354..ab17ebb 100644 --- a/src/pages/user/people.vue +++ b/src/pages/user/people.vue @@ -52,9 +52,7 @@ + + + + +
+ + + +
+ + + + +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ + +
+ +
+ +
+ + + + + + +
+
+ + +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + +
+ 请点击你需要盖章的位置 +
+ +
+
+ + + + + \ No newline at end of file diff --git a/src/store/index.ts b/src/store/index.ts index 5958050..d23a18b 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,8 +1,5 @@ import { createPinia, defineStore } from 'pinia' import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化 -import { upDateAppApi } from '@/api/system' -import { hasNewVersion, onClickUpdate } from '@/utils/index' -import { getEnvBaseUrl } from '@/utils/index' const store = createPinia() store.use( @@ -18,6 +15,7 @@ export const useAppStore = defineStore('app', { isGray: 0 as 0 | 1, // 0=正常,1=灰化 position: null, //市 location: null, //省市区 + clockin: null, //详细位置 精确到街道 temperature: null, //温度 weather: null //天气 }), @@ -31,6 +29,9 @@ export const useAppStore = defineStore('app', { setLocation(value : string) { this.location = value }, + setClockin(value : string) { + this.clockin = value + }, setTemperature(value : number) { this.temperature = value }, @@ -41,66 +42,6 @@ export const useAppStore = defineStore('app', { persist: true, // 启用持久化 }) -export const useUpdateApp = defineStore('updateApp', () => { - const updateOptions = reactive({ - force: false, - hasNew: false, - content: '', - url: '', - apkUrl: '', - wgtUrl: '' - }) - const systemInfo = uni.getSystemInfoSync() - - /** - * 当前处于APP_PLUS时 检查是否有新版本 - * - * @param to 是否跳转新页面显示更新 默认值false - */ - function checkAppUpdate(to = false) { - try { - upDateAppApi().then(async (res : any) => { - let { - result - } = res - result.apkUrl = getEnvBaseUrl() + '/sys/common/static/' + result.apkUrl - result.wgtUrl = getEnvBaseUrl() + '/sys/common/static/' + result.wgtUrl - updateOptions.wgtUrl = result.wgtUrl - if (systemInfo.osName === 'android') { - // Android - updateOptions.apkUrl = result.apkUrl - // #ifdef APP_PLUS - updateOptions.hasNew = await hasNewVersion(result.versionCode, result.update == 'wgt') as boolean - // #endif - } else { - // IOS - updateOptions.url = `itms-apps://itunes.apple.com/cn/app/id${123456}?mt=8` - } - updateOptions.hasNew && - uni.showModal({ - title: '更新', - content: '发现新版本,请更新', - success(res) { - if (res.confirm) { - onClickUpdate(result.update, result) - } else { - plus.runtime.quit() - } - } - }) - }) - } catch (error) { - updateOptions.hasNew = false - } - } - - return { - checkAppUpdate, - ...toRefs(updateOptions), - systemInfo - } -}) - export default store // 模块统一导出 diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts index 1f2ff16..70fddc4 100644 --- a/src/types/uni-pages.d.ts +++ b/src/types/uni-pages.d.ts @@ -15,6 +15,7 @@ interface NavigateToOptions { "/pages/onlinePreview/onlinePreviewH5" | "/pages/operation/index" | "/pages/production/index" | + "/pages/sljd/index" | "/pages/user/people" | "/pages/workHome/index" | "/pages/production/ribaoshuju/rbsjLsxq" | @@ -59,6 +60,9 @@ interface NavigateToOptions { "/pages-bpm/leaveApplication/index" | "/pages-bpm/OfficeEquipmentMaintenanceApplication/index" | "/pages-bpm/SuperiorSystem/index"; + "/pages-bpm/unconventional/index" | + "/pages-bpm/unconventional/stamp" | + "/pages-bpm/zbkh/index"; } interface RedirectToOptions extends NavigateToOptions {} diff --git a/src/utils/index.ts b/src/utils/index.ts index 3f3efc1..431290f 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,10 @@ +import { defineStore } from 'pinia' import { pages, subPackages, tabBar } from '@/pages.json' import { isMpWeixin } from './platform' import { useAppStore } from '@/store' +import { upDateAppApi } from '@/api/system' + + const getLastPage = () => { // getCurrentPages() 至少有1个元素,所以不再额外判断 @@ -208,29 +212,92 @@ export function formatDate(value, fmt) { } } +export const useUpdateApp = defineStore('updateApp', () => { + const updateOptions = reactive({ + force: false, + hasNew: false, + content: '', + url: '', + apkUrl: '', + wgtUrl: '' + }) + const systemInfo = uni.getSystemInfoSync() + + /** + * 当前处于APP_PLUS时 检查是否有新版本 + * + * @param to 是否跳转新页面显示更新 默认值false + */ + function checkAppUpdate(to = false) { + try { + let path = '' + let webApp = import.meta.env.VITE_WEBAPP + console.log(webApp) + if(webApp){//如果是测试环境 ,upDateAppApi 传递参数 by min + path = webApp + } + console.log(path) + upDateAppApi(path).then(async (res : any) => { + let { + result + } = res + result.apkUrl = getEnvBaseUrl() + '/sys/common/static/' + result.apkUrl + result.wgtUrl = getEnvBaseUrl() + '/sys/common/static/' + result.wgtUrl + updateOptions.wgtUrl = result.wgtUrl + if (systemInfo.osName === 'android') { + // Android + updateOptions.apkUrl = result.apkUrl + // #ifdef APP_PLUS + updateOptions.hasNew = await hasNewVersion(result.versionCode, result.update == 'wgt') as boolean + // #endif + } else { + // IOS + updateOptions.url = `itms-apps://itunes.apple.com/cn/app/id${123456}?mt=8` + } + updateOptions.hasNew && + uni.showModal({ + title: '更新', + content: '发现新版本,请更新', + success(res) { + if (res.confirm) { + onClickUpdate(result.update, result) + } else { + plus.runtime.quit() + } + } + }) + }) + } catch (error) { + updateOptions.hasNew = false + } + } + + return { + checkAppUpdate, + ...toRefs(updateOptions), + systemInfo + } +}) + /** * 判断是否有新版本 * @param version 接口返回的版本号 * @param isWgt 是否是热资源更新 默认不是 */ export const hasNewVersion = (version, isWgt = false) => { - // #ifdef APP_PLUS - return new Promise((resolve) => { - const transfer = (str) => { - const parts = str.split('.').map(part => part.padStart(4, '0')) - return parts.join('') - } - if (isWgt) { - plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => { - const currentVersion = widgetInfo.version - resolve(+transfer(version) > +transfer(currentVersion)) - }) - } else { - const currentVersion = plus.runtime.version - resolve(+transfer(version) > +transfer(currentVersion)) - } - }) - // #endif + // #ifdef APP_PLUS + return new Promise((resolve) => { + if (isWgt) { + plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => { + const currentVersion = widgetInfo.versionCode + resolve(Number(version) > Number(currentVersion)) + }) + } else { + const currentVersion = plus.runtime.versionCode + resolve(Number(version) > Number(currentVersion)) + } + }) + // #endif } export function onClickUpdate(updateType : string, url) { @@ -340,6 +407,7 @@ export const getLocation = () => { const obj = data.result.addressComponent store.setPosition(obj.city ? obj.city : obj.province) //市 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) } else { handleDefaultLocation() @@ -445,4 +513,26 @@ export function getFileAccessHttpUrl(avatar, subStr) { return getEnvBaseUrl() + "/sys/common/static/" + avatar; } } +} + +/* 获取文件名 */ +export function getFilename(text : string) { + if (!text) { + return text === null ? null : ""; + } + if (text.indexOf(',') > 0) { + let arr = text.split(",") + let filearr = [] + for (let a = 0; a < arr.length; a++) { + //清除连续8到18位数字 + let filename = arr[a].substr(arr[a].lastIndexOf('/') + 1, arr[a].length - arr[a].lastIndexOf( + '/')).replace(/_\d{8,18}|\d{8,18}/g, ""); + filearr.push(filename) + } + return filearr + } else { + let filename = text.substr(text.lastIndexOf('/') + 1, text.length - text.lastIndexOf('/')).replace(/_\d{8,18}|\d{8,18}/g, ""); + //清除连续8到18位数字 + return filename + } } \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index c795bd1..117c126 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -47,6 +47,7 @@ export default ({ command, mode }) => { VITE_APP_PROXY, VITE_APP_PROXY_PREFIX, VITE_USE_MOCK, + WEBAPP } = env console.log('环境变量 env -> ', env) @@ -152,6 +153,9 @@ export default ({ command, mode }) => { }, server: { host: '0.0.0.0', + headers: { //允许跨域by 闵 + 'Access-Control-Allow-Origin': '*' + }, hmr: true, port: Number.parseInt(VITE_APP_PORT, 10), // 仅 H5 端生效,其他端不生效(其他端走build,不走devServer)