Compare commits
No commits in common. "5a6d68bd199ca2412496d63d73f631c7cf0ca637" and "15c86f500aa356aa77b4d032f8bb2ae77045ca04" have entirely different histories.
5a6d68bd19
...
15c86f500a
5
env/.env.development
vendored
5
env/.env.development
vendored
@ -7,10 +7,7 @@ VITE_SHOW_SOURCEMAP = true
|
||||
# 是否启用读取配置文件 min
|
||||
#VITE_WEBAPP = 'D://opt//AppUpdateTest'
|
||||
VITE_WEBAPP = ''
|
||||
#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
||||
VITE_SERVER_BASEURL = 'http://10.75.166.6:8080/jeecg-boot'
|
||||
#VITE_SERVER_BASEURL = 'http://10.75.173.194:8080/jeecg-boot'
|
||||
#VITE_SERVER_BASEURL = 'https://10.75.166.6/test'
|
||||
VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
||||
|
||||
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
||||
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
||||
|
4
env/.env.production
vendored
4
env/.env.production
vendored
@ -8,7 +8,7 @@ VITE_SHOW_SOURCEMAP = false
|
||||
#VITE_WEBAPP = 'D://opt//AppUpdateTest'
|
||||
VITE_WEBAPP = ''
|
||||
|
||||
VITE_SERVER_BASEURL = 'https://10.75.166.6/test'
|
||||
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
||||
|
||||
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'
|
||||
|
@ -17,8 +17,8 @@ export default defineManifestConfig({
|
||||
name: VITE_APP_TITLE,
|
||||
appid: VITE_UNI_APPID,
|
||||
description: '',
|
||||
versionName: '2.2.0',
|
||||
versionCode: '20250903',
|
||||
versionName: '2.1.0',
|
||||
versionCode: '20250808',
|
||||
transformPx: false,
|
||||
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
||||
/* 5+App特有相关 */
|
||||
|
@ -9,7 +9,9 @@ export function queryPostByUserIdApi(userid : string) {
|
||||
return http({
|
||||
url: '/sys/user/queryPostByUserId',
|
||||
method: 'GET',
|
||||
data: { userid }
|
||||
data: {
|
||||
userid
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -34,12 +36,3 @@ export function queryUserByOrgRoleApi(config : object) {
|
||||
data: config
|
||||
})
|
||||
}
|
||||
|
||||
/*根据劳动合同号查询用户信息*/
|
||||
export function queryUsernameByLdhth(ldhth : string) {
|
||||
return http({
|
||||
url: '/sys/user/queryUsernameByLdhth',
|
||||
method: 'GET',
|
||||
data: { ldhth }
|
||||
})
|
||||
}
|
@ -80,7 +80,6 @@
|
||||
iframeWin.value = iframe.value.contentWindow
|
||||
console.log(iframe.value)
|
||||
console.log(iframe.value.contentWindow)
|
||||
console.log(props.fileName)
|
||||
try {
|
||||
iframeWin.value.postMessage({
|
||||
filename: props.fileName,
|
||||
@ -139,7 +138,7 @@
|
||||
if(props.taskDefKey=='task1715564108096'){ //如果是综合办审核,不需要该区
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
}
|
||||
// return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
if (sign.value) {
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
} else {
|
||||
|
@ -2,8 +2,8 @@
|
||||
"name": "数智产销",
|
||||
"appid": "__UNI__9F097F0",
|
||||
"description": "",
|
||||
"versionName": "2.2.0",
|
||||
"versionCode": "20250903",
|
||||
"versionName": "2.1.0",
|
||||
"versionCode": "20250808",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
|
@ -75,7 +75,6 @@
|
||||
if(info.value.jdsqwj){
|
||||
info.value.jdsqwj = info.value.jdsqwj.replace("PdfFiles/PdfFile/",'')
|
||||
}
|
||||
console.log(info.value.jdsqwj)
|
||||
}else{
|
||||
toast.error(res.message)
|
||||
}
|
||||
|
@ -27,8 +27,6 @@
|
||||
placeholder="请输入手机号" :rules="[{ validator: rules.phone }]" />
|
||||
<wd-input label="邮箱" prop="email" clearable label-width="100px" v-model="model.email"
|
||||
placeholder="请输入邮箱" :rules="[{ validator: rules.email }]" />
|
||||
<wd-input label="密码" prop="clock" clearable label-width="100px" v-model="model.password"
|
||||
placeholder="修改密码,不修改密码无需输入" v-if="userStore.userInfo.userIdentity == 3"/>
|
||||
</wd-cell-group>
|
||||
<view class="footer p5">
|
||||
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
|
||||
@ -67,7 +65,6 @@
|
||||
// sex: userStore.userInfo.sex ?? 1,
|
||||
phone: userStore.userInfo.phone,
|
||||
email: userStore.userInfo.email,
|
||||
password: ''
|
||||
})
|
||||
const rules = {
|
||||
phone: (value : string) => {
|
||||
|
@ -17,13 +17,13 @@
|
||||
<view class="account-login-area">
|
||||
<view class="box account">
|
||||
<wd-icon name="user" size="15px"></wd-icon>
|
||||
<wd-text text=""></wd-text>
|
||||
<wd-input class="uni-input" placeholder="统一身份/劳动合同号" v-model.trim="userName"></wd-input>
|
||||
<wd-text text="账号:"></wd-text>
|
||||
<wd-input class="uni-input" placeholder="请输入统一身份认证" v-model.trim="userName"></wd-input>
|
||||
</view>
|
||||
<view class="box password">
|
||||
<wd-icon name="lock-on" size="15px"></wd-icon>
|
||||
<wd-text text=""></wd-text>
|
||||
<input class="uni-input" placeholder="密码" :password="showPassword"
|
||||
<wd-text text="密码:"></wd-text>
|
||||
<input class="uni-input" placeholder="请输入密码" :password="showPassword"
|
||||
v-model.trim="password" />
|
||||
<wd-icon v-if="showPassword" name="eye-close" size="18px"
|
||||
@click="handleChangePassword"></wd-icon>
|
||||
@ -52,32 +52,15 @@
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
useToast
|
||||
} from 'wot-design-uni'
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
useUserStore
|
||||
} from '@/store/user'
|
||||
import {
|
||||
http
|
||||
} from '@/utils/http'
|
||||
import {
|
||||
HOME_PAGE
|
||||
} from '@/common/constants'
|
||||
import {
|
||||
useRouter
|
||||
} from '@/plugin/uni-mini-router'
|
||||
<script lang="ts" setup>
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { ref } from 'vue'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { http } from '@/utils/http'
|
||||
import { HOME_PAGE } from '@/common/constants'
|
||||
import { useRouter } from '@/plugin/uni-mini-router'
|
||||
import Base64 from 'base-64';
|
||||
import {
|
||||
loginApi
|
||||
} from '@/api/system';
|
||||
import {
|
||||
queryUsernameByLdhth
|
||||
} from '@/api/system/user';
|
||||
import { loginApi } from '@/api/system';
|
||||
|
||||
defineOptions({
|
||||
name: 'login',
|
||||
@ -92,8 +75,7 @@
|
||||
const showPassword = ref(true) //是否显示明文
|
||||
const remPW = ref(false) //是否记住密码
|
||||
/**h5系统信息中没有appWgtVersion值*/
|
||||
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync()
|
||||
.appVersion
|
||||
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
|
||||
const toast = useToast()
|
||||
const userStore = useUserStore()
|
||||
const handleChangePassword = () => {
|
||||
@ -110,52 +92,25 @@
|
||||
uni.setStorageSync('accountpassword', JSON.stringify(localObj))
|
||||
uni.setStorageSync('savePwd', remPW.value)
|
||||
}
|
||||
const handleLogin = async () => {
|
||||
const handleLogin = () => {
|
||||
if (userName.value.length === 0) {
|
||||
toast.warning('请输入统一身份/劳动合同号')
|
||||
toast.warning('请输入统一身份认证')
|
||||
return
|
||||
}
|
||||
if (password.value.length === 0) {
|
||||
toast.warning('请输入密码')
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
username: userName.value,
|
||||
password: password.value,
|
||||
};
|
||||
/*判断是否是六位纯数字*/
|
||||
if (userName.value.match(/^\d{6}$/)) {
|
||||
await queryUsernameByLdhth(userName.value).then(res => {
|
||||
if (res) {
|
||||
params = {
|
||||
username: Base64.encode(encodeURIComponent(res)),
|
||||
password: Base64.encode(encodeURIComponent(password.value)),
|
||||
};
|
||||
} else {
|
||||
params.captcha = 'app';
|
||||
}
|
||||
})
|
||||
} else {
|
||||
/*开发环境 */
|
||||
params.captcha = 'app';
|
||||
/*生产环境 */
|
||||
// params = {
|
||||
// username: Base64.encode(encodeURIComponent(userName.value)),
|
||||
// password: Base64.encode(encodeURIComponent(password.value)),
|
||||
// };
|
||||
}
|
||||
login(params)
|
||||
}
|
||||
|
||||
const login = async (params) => {
|
||||
let un = Base64.encode(encodeURIComponent(userName.value))
|
||||
let pw = Base64.encode(encodeURIComponent(password.value))
|
||||
loading.value = true
|
||||
try {
|
||||
// 调用API
|
||||
const res = await loginApi(params);
|
||||
/*生产环境 begin */
|
||||
// loginApi({ username: un, password: pw })
|
||||
/*开发环境 begin */
|
||||
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
||||
.then((res : any) => {
|
||||
if (res.success) {
|
||||
const {
|
||||
result
|
||||
} = res
|
||||
const { result } = res
|
||||
const userInfo = result.userInfo
|
||||
userStore.setUserInfo({
|
||||
...userInfo,
|
||||
@ -170,9 +125,7 @@
|
||||
})
|
||||
savePwd() //记住账号密码
|
||||
uni.setStorageSync('logintime', Date.now()) //缓存登录时间
|
||||
router.pushTab({
|
||||
path: HOME_PAGE
|
||||
})
|
||||
router.pushTab({ path: HOME_PAGE })
|
||||
} else {
|
||||
res.message == '数据库中已存在该记录' ? res.message = '请使用统一身份账号登录' : res.message
|
||||
if (!res.success) {
|
||||
@ -182,13 +135,15 @@
|
||||
if (response.error_description === '用户名或密码错误') {
|
||||
res.message = '用户名或密码错误';
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
toast.warning(res.message)
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
|
@ -9,35 +9,51 @@
|
||||
</route>
|
||||
<template>
|
||||
<PageLayout :navbarShow="false">
|
||||
<view class="nav">
|
||||
<view class="nav_box">
|
||||
<scroll-view direction="horizontal">
|
||||
<uni-segmented-control :current="current" :values="items" styleType="string" mode="segmented"
|
||||
@clickItem="onClickItem"></uni-segmented-control>
|
||||
</scroll-view>
|
||||
<view>
|
||||
<view class="placeholder"></view>
|
||||
<view style="width: 100%; display: grid; place-items: center">
|
||||
<uni-title :title="dateDate + ':生产情况'" type="h1" color="blue" />
|
||||
</view>
|
||||
<view style="margin: 0 10px;">
|
||||
<uni-segmented-control style="margin-top: 10px;margin-bottom: 10px" :current="current" :values="items"
|
||||
@clickItem="onClickItem" styleType="button" activeColor="#0055ff"></uni-segmented-control>
|
||||
</view>
|
||||
<view class="content">
|
||||
|
||||
<view v-if="current === 0">
|
||||
<scroll-view scroll-y :style="{ height: scrollViewHeight + 'px' }">
|
||||
<sssjData></sssjData>
|
||||
</scroll-view>
|
||||
<view style="padding: 0 10px">
|
||||
<view class="progress-bartime">
|
||||
<!-- 动态设置宽度和颜色 -->
|
||||
<view class="progressTime"
|
||||
:style="{ width: `${timePercent}%`, 'background-color': '#0055ff' }">
|
||||
</view>
|
||||
<!-- 显示带符号的百分比 -->
|
||||
<text class="progress-text">全年时间进度:{{ timePercent }}%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="current === 1">
|
||||
<scroll-view scroll-y :style="{ height: scrollViewHeight + 'px' }">
|
||||
<trq-data></trq-data>
|
||||
<yy-data></yy-data>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view v-if="current === 1">
|
||||
<scroll-view scroll-y :style="{ height: scrollViewHeight + 'px' }">
|
||||
<sssjForm></sssjForm>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</PageLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import trqData from './ribaoshuju/trqRbsj';
|
||||
import yyData from './ribaoshuju/yyRbsj';
|
||||
import sssjForm from './shishishuju/index';
|
||||
import {
|
||||
formatDate,
|
||||
getDateAfterDays,
|
||||
getYearProgress
|
||||
} from '@/utils/dateTime';
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
@ -46,19 +62,14 @@
|
||||
watchEffect,
|
||||
onUnmounted
|
||||
} from 'vue';
|
||||
//、、东风风光的
|
||||
import trqData from '@/pages-production/ribaoshuju/trqRbsj';
|
||||
import yyData from '@/pages-production/ribaoshuju/yyRbsj';
|
||||
import sssjData from '@/pages-production/shishishuju/trqSssj';
|
||||
const items = ref(['油气实时', '油气历史', '管线运行', '安防监控', '设备运行'])
|
||||
const items = ref(['日报数据', '实时数据'])
|
||||
const current = ref(0)
|
||||
const res = wx.getSystemInfoSync();
|
||||
const statusHeight = res.statusBarHeight; //状态栏高度
|
||||
const cusnavbarheight = (statusHeight + 50) + "px";
|
||||
const scrollViewHeight = ref(0); //滚动控件的高度
|
||||
|
||||
const activeColor = ref("#0000ff")
|
||||
const inActiveColor = ref("#000000")
|
||||
const cusnavbarheight = statusHeight + 44 + 'px';
|
||||
const scrollViewHeight = ref(0); //状态栏高度
|
||||
const timePercent = ref(0);
|
||||
const dateDate = ref('');
|
||||
|
||||
function onClickItem(e) {
|
||||
if (current.value != e.currentIndex) {
|
||||
@ -66,16 +77,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
const strDate = () => {
|
||||
const now = new Date();
|
||||
if (now.getHours() < 11) {
|
||||
return formatDate(getDateAfterDays(now, -1)); //11点之前 头一天的数据
|
||||
} else {
|
||||
return formatDate(now);
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
dateDate.value = strDate();
|
||||
timePercent.value = getYearProgress();
|
||||
calculateScrollViewHeight();
|
||||
// 使用 Uniapp 提供的窗口大小变化监听方法
|
||||
uni.onWindowResize(calculateScrollViewHeight);
|
||||
// 监听窗口大小变化事件,当窗口大小改变时重新计算高度
|
||||
window.addEventListener('resize', calculateScrollViewHeight);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
// 移除 Uniapp 窗口大小变化监听
|
||||
uni.offWindowResize(calculateScrollViewHeight);
|
||||
// 移除窗口大小变化事件监听器
|
||||
window.removeEventListener('resize', calculateScrollViewHeight);
|
||||
});
|
||||
|
||||
onHide(()=>{ //切换首页后,将生产切换为日本数据以清楚定时 by闵
|
||||
current.value = 0;
|
||||
})
|
||||
|
||||
const calculateScrollViewHeight = () => {
|
||||
// 获取屏幕的总高度
|
||||
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||
@ -85,7 +111,18 @@
|
||||
query
|
||||
.select('.nav')
|
||||
.boundingClientRect();
|
||||
|
||||
query
|
||||
.select('.placeholder')
|
||||
.boundingClientRect();
|
||||
query
|
||||
.select('.uni-title')
|
||||
.boundingClientRect();
|
||||
query
|
||||
.select('.uni-segmented-control')
|
||||
.boundingClientRect();
|
||||
query
|
||||
.select('.progress-bartime')
|
||||
.boundingClientRect();
|
||||
// 执行查询操作
|
||||
query.exec((res) => {
|
||||
let totalHeight = 0;
|
||||
@ -95,38 +132,62 @@
|
||||
}
|
||||
});
|
||||
// 计算 scroll-view 的高度
|
||||
scrollViewHeight.value = screenHeight - totalHeight;
|
||||
scrollViewHeight.value = screenHeight - totalHeight - 80;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.nav {
|
||||
width: calc(100%);
|
||||
width: calc(100% - 60rpx);
|
||||
padding: 0 30rpx;
|
||||
height: v-bind(cusnavbarheight);
|
||||
|
||||
font-size: 24rpx;
|
||||
//color: #333333;
|
||||
color: #ffffff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
background-image: url('@/static/navbg.png');
|
||||
background-image: url('../../static/my/navbg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 750rpx 458rpx;
|
||||
}
|
||||
|
||||
.nav_box {
|
||||
font-size: 18;
|
||||
|
||||
position: absolute;
|
||||
bottom: 6rpx;
|
||||
width: calc(100% - 60rpx);
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
.placeholder {
|
||||
height: v-bind(cusnavbarheight);
|
||||
}
|
||||
|
||||
.content {
|
||||
.progress-bartime {
|
||||
position: relative;
|
||||
height: 25px;
|
||||
background: #f0f0f0;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.progress {
|
||||
height: 100%;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.progressTime {
|
||||
height: 100%;
|
||||
transition: all 0.3s;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
position: absolute;
|
||||
top: v-bind(cusnavbarheight);
|
||||
width: 100%;
|
||||
min-height: calc(100vh - v-bind(cusnavbarheight));
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: red;
|
||||
/* 保持红色 */
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
/* 提升可读性 */
|
||||
}
|
||||
</style>
|
@ -15,7 +15,6 @@ const initState = {
|
||||
post: '',
|
||||
orgCode: '',
|
||||
workNo: '',
|
||||
userIdentity: '',
|
||||
// 本地存储时间
|
||||
localStorageTime: 0,
|
||||
}
|
||||
|
1
src/typings.d.ts
vendored
1
src/typings.d.ts
vendored
@ -28,7 +28,6 @@ declare global {
|
||||
tenantId ?: string | number
|
||||
// sex ?: number
|
||||
phone ?: string
|
||||
userIdentity ?: string | number
|
||||
post ?: string
|
||||
email ?: string
|
||||
/** 微信的 openid,非微信没有这个字段 */
|
||||
|
@ -235,7 +235,9 @@ export const useUpdateApp = defineStore('updateApp', () => {
|
||||
if (webApp) {//如果是测试环境 ,upDateAppApi 传递参数 by min
|
||||
path = webApp
|
||||
}
|
||||
console.log(22222222222222222)
|
||||
upDateAppApi(path).then(async (res : any) => {
|
||||
console.log(3333333333)
|
||||
let {
|
||||
result
|
||||
} = res
|
||||
|
Loading…
Reference in New Issue
Block a user