Merge remote-tracking branch 'remotes/origin/master' into minJeecg

# Conflicts:
#	src/pages/login/login.vue
This commit is contained in:
lagos 2025-05-30 17:34:38 +08:00
commit 0b0836a91b
10 changed files with 74 additions and 79 deletions

View File

@ -1,7 +1,6 @@
<template>
<view :class="['pageLayout', { 'gray': appStore.isGray == 1 }]">
<wd-watermark :content="userStore.userInfo.realname + ' '+ userStore.userInfo.username"
:width="200" :height="200" :opacity="0.2"></wd-watermark>
<wd-watermark :content="content1" :width="200" :height="200" :opacity="0.3" :size="16" ></wd-watermark>
<view v-if="navbarShow" :class="{ pageNav: true, transparent: navBgTransparent, fixed: navFixed }"
:style="{ height: `${statusBarHeight + navHeight}px` }">
<view class="statusBar" :style="{ height: `${statusBarHeight}px` }"></view>
@ -29,6 +28,7 @@
import { useParamsStore } from '@/store/page-params'
import { useAppStore } from '@/store'
import { useUserStore } from '@/store/user'
import dayjs from 'dayjs';
defineOptions({
name: 'pageLayout',
options: {
@ -41,6 +41,7 @@
const userStore = useUserStore()
const paramsStore = useParamsStore()
const router = useRouter()
const content1 = userStore.userInfo.realname + ' ' + userStore.userInfo.workNo + ' ' + dayjs().format('YYYY-MM-DD')
const props = defineProps({
backRouteName: {
type: String,

View File

@ -56,10 +56,6 @@
const type = ref('') //
var ifH5 = false;
const handleClickLeft = () => {
uni.navigateBack()
}
const getList = (e) => {
loading = true;
const handlers = {
@ -69,7 +65,6 @@
'厂级制度': getFactorySystemList,
'法律法规': getRegulationsList
};
if (e === 1) {
handlers[type.value]?.();
} else if (type.value == '厂级制度') {
@ -183,7 +178,6 @@
}
const onlinePreView = (e) => {
console.log(e)
uni.navigateTo({
url: `/pages/onlinePreview/detail?data=${e}`
});

View File

@ -12,33 +12,33 @@
<wd-col-picker label="选择目录" v-model="selectedValue" :columns="dataSource" :column-change="columnChange"
@confirm="handleConfirm" :display-format="displayFormat"></wd-col-picker>
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" v-if="fileUrl" />
<view v-else @click="onlinePreview(item.path)" v-for="(item, i) in fileUrl2" style="padding: 15px 0 0 0">
<view v-if="fileUrl2" class="bdIframe" @click="onlinePreview(item.path)" v-for="(item, i) in fileUrl2" style="padding: 15px 0 0 0">
<wd-card :title="item.name"></wd-card>
</view>
<view v-else style="padding: 20px;">
未获取到文件信息请选择其他目录!
</view>
</PageLayout>
</template>
<script setup>
import {
ref,
} from 'vue';
import {
onLoad
} from '@dcloudio/uni-app'
import {
useUserStore
} from '@/store/user';
} from '@/store/user'
import {
getListApi,
getJobDesIdByDepAndName,
getPathByInsflagQuote,
queryByIdApi
} from '@/api/pages/sc';
import Base64 from '@/utils/code';
} from '@/api/pages/sc'
import {
Base64
} from 'js-base64'
import base64 from '@/utils/code';
import {
getEnvBaseUrl
} from '@/utils/index'
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
const data = ref([])
const dataSource = ref([])
const selectedValue = ref([]);
@ -70,14 +70,18 @@
const handleConfirm = ({
value
}) => {
let base64 = new Base64();
queryByIdApi(value[value.length - 1]).then(res => {
let url = res.result.path
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))
if (isH5()) {
fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(
Base64.encode(baseUrl + url))
} else {
fileUrl.value = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(
new base64().encode(baseUrl + url))
}
} else if (/^-?\d+$/.test(quote) && !insFlag) {
getJobDesIdByDepAndName({
jobname: quote,
@ -122,7 +126,7 @@
const onlinePreview = (e) => {
uni.navigateTo({
url: `/pages/onlinePreview/${path}?data=${e}`
url: `/pages/onlinePreview/detail?data=${e}`
});
};
@ -160,10 +164,11 @@
</script>
<style lang="scss">
#bdIframe {
position: absolute;
top: 10;
left: 0;
width: 100%;
height: 100%;
height: calc(100vh - 230rpx);
/* 使用视口高度减去顶部固定高度 */
border: none;
/* 移除absolute定位改用普通文档流 */
position: relative;
top: 0;
}
</style>

View File

@ -20,13 +20,15 @@
<view class="container">
<view
style="margin-bottom: 20px;height: 400px;overflow: hidden;overflow-y: auto;overflow-x: auto;background-color: #fff;">
<img :src="imgPath" style="border:2px;cursor:hand;" alt="流程图" usemap="#planetmap">
<!-- <map name="planetmap">
<template v-for="(item, key, index) in nodePositionInfo.positionList">
<area shape="rect" :coords="item.coords" title="Venus" @touchstart="showNodeInfo(nodePositionInfo.hisTasks,item.id)">
</template>
</map> -->
<img :src="imgPath" style="border:2px;cursor:hand;" alt="流程图" usemap="#planetmap"
@click="showFullScreen">
</view>
<!-- Full screen preview -->
<wd-popup v-model="popup" type="center" background-color="#fff">
<view class="fullscreen-preview">
<image :src="imgPath" mode="widthFix" style="width:100%;" @click="hideFullScreen" />
</view>
</wd-popup>
<wd-card title="流程历史追踪" type="rectangle">
<wd-steps :active="completedNum" vertical>
<wd-step v-for="item in dataSource">
@ -90,16 +92,13 @@
const appStore = useAppStore();
const tab = ref(0)
const completedNum = ref(0);
const handleClickLeft = () => {
uni.navigateBack()
}
const showNodeInfo = (data, taskId) => {
// this.$refs.nodeInfoModel.close();
// this.$refs.nodeInfoModel.showInfo(data,taskId);
}
const popup = ref(false)
const showFullScreen = () => {
popup.value = true
};
const hideFullScreen = () => {
popup.value = false
};
onLoad((options) => {
type.value = '';
@ -163,7 +162,6 @@
}
})
})
})
const imgPath = computed(() => {
@ -176,23 +174,16 @@
</script>
<style lang="scss" scoped>
::v-deep .wd-tabs__line {
background: #39b54a;
.fullscreen-preview {
width: 100vw;
height: 100vh;
background-color: #fff; /* 白色背景 */
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
::v-deep .wd-step.is-finished .wd-step__icon-outer {
border-color: #39b54a;
color: #fff;
background-color: #39b54a;
}
::v-deep .wd-step.is-process .wd-step__icon-outer {
border-color: #f0f0f0;
color: #fff;
background-color: #f0f0f0;
}
.container {
padding: 5px 0 5px;
min-height: 100vh;

View File

@ -45,6 +45,8 @@
<text style="display: block;">Copyright (c) 2024 天然气产销厂</text>
<text>版本号:{{version}}</text>
</view>
<wd-notice-bar type="danger" text="本平台为非涉密平台,严禁处理、传输国家秘密和企业核心商密等涉密敏感事项" wrapable :scrollable="false"
prefix="warn-bold" style="text-align: left;display: flex;align-items: flex-start;" />
</view>
</view>
</PageLayout>
@ -103,9 +105,9 @@
let pw = Base64.encode(encodeURIComponent(password.value))
loading.value = true
/*生产环境 begin */
// loginApi({ username: un, password: pw })
loginApi({ username: un, password: pw })
/*开发环境 begin */
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
// loginApi({ username: userName.value, password: password.value, captcha: 'app' })
.then((res : any) => {
if (res.success) {
const { result } = res
@ -232,6 +234,7 @@
.version {
margin-top: 63rpx;
font-size: 12px;
margin-bottom: 60rpx;
}
}
</style>

View File

@ -53,7 +53,6 @@
const captureText = (text) => { //
const match = text.match(/\/([^_]+)(?=_)/);
console.log(match)
return match ? match[1] : '';
}

View File

@ -17,7 +17,7 @@
import {
onLoad
} from '@dcloudio/uni-app';
import Base64 from '@/utils/code';
import base64 from '@/utils/code';
import {
getEnvBaseUrl
} from '@/utils/index'
@ -25,9 +25,9 @@
var fileUrl = "";
onLoad((options) => {
let base64 = new Base64();
let Base64 = new base64();
var url = baseUrl + JSON.parse(options.data);
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(base64.encode(url))
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
})
</script>

View File

@ -27,7 +27,6 @@
const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
onLoad((options) => {
console.log(options)
let url = JSON.parse(options.data)
url = baseUrl + url;
fileUrl = 'https://36.112.48.190/preview/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))

View File

@ -1,4 +1,4 @@
export default class Base64 {
export default class base64 {
//
private readonly _keyStr: string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

View File

@ -216,7 +216,10 @@ export function formatDate(value, fmt) {
export const hasNewVersion = (version, isWgt = false) => {
// #ifdef APP_PLUS
return new Promise((resolve) => {
const transfer = (str) => str.replace(/\./g, '')
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
@ -433,13 +436,13 @@ export const imgUrl = (url : string) => {
* @param subStr
* @returns {*}
*/
export function getFileAccessHttpUrl(avatar,subStr) {
if(!subStr) subStr = 'http'
if(avatar && avatar.startsWith(subStr)){
export function getFileAccessHttpUrl(avatar, subStr) {
if (!subStr) subStr = 'http'
if (avatar && avatar.startsWith(subStr)) {
return avatar;
}else{
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
return getEnvBaseUrl()+ "/sys/common/static/" + avatar;
} else {
if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) {
return getEnvBaseUrl() + "/sys/common/static/" + avatar;
}
}
}