Compare commits

..

No commits in common. "5a6d68bd199ca2412496d63d73f631c7cf0ca637" and "15c86f500aa356aa77b4d032f8bb2ae77045ca04" have entirely different histories.

13 changed files with 184 additions and 183 deletions

View File

@ -7,10 +7,7 @@ VITE_SHOW_SOURCEMAP = true
# 是否启用读取配置文件 min # 是否启用读取配置文件 min
#VITE_WEBAPP = 'D://opt//AppUpdateTest' #VITE_WEBAPP = 'D://opt//AppUpdateTest'
VITE_WEBAPP = '' VITE_WEBAPP = ''
#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot' 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 = 'https://36.112.48.190/jeecg-boot' #VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot' #VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'

4
env/.env.production vendored
View File

@ -8,7 +8,7 @@ VITE_SHOW_SOURCEMAP = false
#VITE_WEBAPP = 'D://opt//AppUpdateTest' #VITE_WEBAPP = 'D://opt//AppUpdateTest'
VITE_WEBAPP = '' 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/wwapi'
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi' #VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi'

View File

@ -17,8 +17,8 @@ export default defineManifestConfig({
name: VITE_APP_TITLE, name: VITE_APP_TITLE,
appid: VITE_UNI_APPID, appid: VITE_UNI_APPID,
description: '', description: '',
versionName: '2.2.0', versionName: '2.1.0',
versionCode: '20250903', versionCode: '20250808',
transformPx: false, transformPx: false,
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans' locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
/* 5+App特有相关 */ /* 5+App特有相关 */

View File

@ -9,7 +9,9 @@ export function queryPostByUserIdApi(userid : string) {
return http({ return http({
url: '/sys/user/queryPostByUserId', url: '/sys/user/queryPostByUserId',
method: 'GET', method: 'GET',
data: { userid } data: {
userid
}
}); });
} }
@ -34,12 +36,3 @@ export function queryUserByOrgRoleApi(config : object) {
data: config data: config
}) })
} }
/*根据劳动合同号查询用户信息*/
export function queryUsernameByLdhth(ldhth : string) {
return http({
url: '/sys/user/queryUsernameByLdhth',
method: 'GET',
data: { ldhth }
})
}

View File

@ -80,7 +80,6 @@
iframeWin.value = iframe.value.contentWindow iframeWin.value = iframe.value.contentWindow
console.log(iframe.value) console.log(iframe.value)
console.log(iframe.value.contentWindow) console.log(iframe.value.contentWindow)
console.log(props.fileName)
try { try {
iframeWin.value.postMessage({ iframeWin.value.postMessage({
filename: props.fileName, filename: props.fileName,
@ -139,7 +138,7 @@
if(props.taskDefKey=='task1715564108096'){ // if(props.taskDefKey=='task1715564108096'){ //
return flag = true; // return flag = true; //
} }
// return flag = true; // return flag = true; //
if (sign.value) { if (sign.value) {
return flag = true; // return flag = true; //
} else { } else {

View File

@ -2,8 +2,8 @@
"name": "数智产销", "name": "数智产销",
"appid": "__UNI__9F097F0", "appid": "__UNI__9F097F0",
"description": "", "description": "",
"versionName": "2.2.0", "versionName": "2.1.0",
"versionCode": "20250903", "versionCode": "20250808",
"transformPx": false, "transformPx": false,
"app-plus": { "app-plus": {
"usingComponents": true, "usingComponents": true,

View File

@ -75,7 +75,6 @@
if(info.value.jdsqwj){ if(info.value.jdsqwj){
info.value.jdsqwj = info.value.jdsqwj.replace("PdfFiles/PdfFile/",'') info.value.jdsqwj = info.value.jdsqwj.replace("PdfFiles/PdfFile/",'')
} }
console.log(info.value.jdsqwj)
}else{ }else{
toast.error(res.message) toast.error(res.message)
} }

View File

@ -27,8 +27,6 @@
placeholder="请输入手机号" :rules="[{ validator: rules.phone }]" /> placeholder="请输入手机号" :rules="[{ validator: rules.phone }]" />
<wd-input label="邮箱" prop="email" clearable label-width="100px" v-model="model.email" <wd-input label="邮箱" prop="email" clearable label-width="100px" v-model="model.email"
placeholder="请输入邮箱" :rules="[{ validator: rules.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> </wd-cell-group>
<view class="footer p5"> <view class="footer p5">
<wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button> <wd-button type="primary" size="large" @click="handleSubmit" block>提交</wd-button>
@ -67,7 +65,6 @@
// sex: userStore.userInfo.sex ?? 1, // sex: userStore.userInfo.sex ?? 1,
phone: userStore.userInfo.phone, phone: userStore.userInfo.phone,
email: userStore.userInfo.email, email: userStore.userInfo.email,
password: ''
}) })
const rules = { const rules = {
phone: (value : string) => { phone: (value : string) => {

View File

@ -17,13 +17,13 @@
<view class="account-login-area"> <view class="account-login-area">
<view class="box account"> <view class="box account">
<wd-icon name="user" size="15px"></wd-icon> <wd-icon name="user" size="15px"></wd-icon>
<wd-text text=""></wd-text> <wd-text text="账号:"></wd-text>
<wd-input class="uni-input" placeholder="统一身份/劳动合同号" v-model.trim="userName"></wd-input> <wd-input class="uni-input" placeholder="请输入统一身份认证" v-model.trim="userName"></wd-input>
</view> </view>
<view class="box password"> <view class="box password">
<wd-icon name="lock-on" size="15px"></wd-icon> <wd-icon name="lock-on" size="15px"></wd-icon>
<wd-text text=""></wd-text> <wd-text text="密码:"></wd-text>
<input class="uni-input" placeholder="密码" :password="showPassword" <input class="uni-input" placeholder="请输入密码" :password="showPassword"
v-model.trim="password" /> v-model.trim="password" />
<wd-icon v-if="showPassword" name="eye-close" size="18px" <wd-icon v-if="showPassword" name="eye-close" size="18px"
@click="handleChangePassword"></wd-icon> @click="handleChangePassword"></wd-icon>
@ -52,32 +52,15 @@
</PageLayout> </PageLayout>
</template> </template>
<script setup> <script lang="ts" setup>
import { import { useToast } from 'wot-design-uni'
useToast import { ref } from 'vue'
} from 'wot-design-uni' import { useUserStore } from '@/store/user'
import { import { http } from '@/utils/http'
ref import { HOME_PAGE } from '@/common/constants'
} from 'vue' import { useRouter } from '@/plugin/uni-mini-router'
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 Base64 from 'base-64';
import { import { loginApi } from '@/api/system';
loginApi
} from '@/api/system';
import {
queryUsernameByLdhth
} from '@/api/system/user';
defineOptions({ defineOptions({
name: 'login', name: 'login',
@ -92,8 +75,7 @@
const showPassword = ref(true) // const showPassword = ref(true) //
const remPW = ref(false) // const remPW = ref(false) //
/**h5系统信息中没有appWgtVersion值*/ /**h5系统信息中没有appWgtVersion值*/
const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync() const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync().appVersion
.appVersion
const toast = useToast() const toast = useToast()
const userStore = useUserStore() const userStore = useUserStore()
const handleChangePassword = () => { const handleChangePassword = () => {
@ -110,85 +92,58 @@
uni.setStorageSync('accountpassword', JSON.stringify(localObj)) uni.setStorageSync('accountpassword', JSON.stringify(localObj))
uni.setStorageSync('savePwd', remPW.value) uni.setStorageSync('savePwd', remPW.value)
} }
const handleLogin = async () => { const handleLogin = () => {
if (userName.value.length === 0) { if (userName.value.length === 0) {
toast.warning('请输入统一身份/劳动合同号') toast.warning('请输入统一身份认证')
return return
} }
if (password.value.length === 0) { if (password.value.length === 0) {
toast.warning('请输入密码') toast.warning('请输入密码')
return return
} }
let params = { let un = Base64.encode(encodeURIComponent(userName.value))
username: userName.value, let pw = Base64.encode(encodeURIComponent(password.value))
password: password.value, loading.value = true
}; /*生产环境 begin */
/*判断是否是六位纯数字*/ // loginApi({ username: un, password: pw })
if (userName.value.match(/^\d{6}$/)) { /*开发环境 begin */
await queryUsernameByLdhth(userName.value).then(res => { loginApi({ username: userName.value, password: password.value, captcha: 'app' })
if (res) { .then((res : any) => {
params = { if (res.success) {
username: Base64.encode(encodeURIComponent(res)), const { result } = res
password: Base64.encode(encodeURIComponent(password.value)), const userInfo = result.userInfo
}; userStore.setUserInfo({
...userInfo,
token: result.token,
userid: userInfo.id,
username: userInfo.username,
realname: userInfo.realname,
avatar: userInfo.avatar,
post: userInfo.post,
tenantId: userInfo.loginTenantId,
localStorageTime: +new Date(),
})
savePwd() //
uni.setStorageSync('logintime', Date.now()) //
router.pushTab({ path: HOME_PAGE })
} else { } else {
params.captcha = 'app'; res.message == '数据库中已存在该记录' ? res.message = '请使用统一身份账号登录' : res.message
if (!res.success) {
try {
// JSON message JSON
const response = JSON.parse(res.message);
if (response.error_description === '用户名或密码错误') {
res.message = '用户名或密码错误';
}
} catch (e) {
}
}
toast.warning(res.message)
} }
}) })
} else { .finally(() => {
/*开发环境 */ loading.value = false
params.captcha = 'app'; })
/*生产环境 */
// params = {
// username: Base64.encode(encodeURIComponent(userName.value)),
// password: Base64.encode(encodeURIComponent(password.value)),
// };
}
login(params)
}
const login = async (params) => {
loading.value = true
try {
// API
const res = await loginApi(params);
if (res.success) {
const {
result
} = res
const userInfo = result.userInfo
userStore.setUserInfo({
...userInfo,
token: result.token,
userid: userInfo.id,
username: userInfo.username,
realname: userInfo.realname,
avatar: userInfo.avatar,
post: userInfo.post,
tenantId: userInfo.loginTenantId,
localStorageTime: +new Date(),
})
savePwd() //
uni.setStorageSync('logintime', Date.now()) //
router.pushTab({
path: HOME_PAGE
})
} else {
res.message == '数据库中已存在该记录' ? res.message = '请使用统一身份账号登录' : res.message
if (!res.success) {
try {
// JSON message JSON
const response = JSON.parse(res.message);
if (response.error_description === '用户名或密码错误') {
res.message = '用户名或密码错误';
}
} catch (e) {}
}
toast.warning(res.message)
}
} finally {
loading.value = false;
}
} }
onLoad(() => { onLoad(() => {

View File

@ -9,35 +9,51 @@
</route> </route>
<template> <template>
<PageLayout :navbarShow="false"> <PageLayout :navbarShow="false">
<view class="nav"> <view>
<view class="nav_box"> <view class="placeholder"></view>
<scroll-view direction="horizontal"> <view style="width: 100%; display: grid; place-items: center">
<uni-segmented-control :current="current" :values="items" styleType="string" mode="segmented" <uni-title :title="dateDate + ':生产情况'" type="h1" color="blue" />
@clickItem="onClickItem"></uni-segmented-control> </view>
</scroll-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">
<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>
<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>
</view> </view>
<view class="content">
<view v-if="current === 0">
<scroll-view scroll-y :style="{ height: scrollViewHeight + 'px' }">
<sssjData></sssjData>
</scroll-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>
</PageLayout> </PageLayout>
</template> </template>
<script setup> <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 { import {
ref, ref,
onMounted, onMounted,
@ -46,19 +62,14 @@
watchEffect, watchEffect,
onUnmounted onUnmounted
} from 'vue'; } from 'vue';
// const items = ref(['日报数据', '实时数据'])
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 current = ref(0) const current = ref(0)
const res = wx.getSystemInfoSync(); const res = wx.getSystemInfoSync();
const statusHeight = res.statusBarHeight; // const statusHeight = res.statusBarHeight; //
const cusnavbarheight = (statusHeight + 50) + "px"; const cusnavbarheight = statusHeight + 44 + 'px';
const scrollViewHeight = ref(0); // const scrollViewHeight = ref(0); //
const timePercent = ref(0);
const activeColor = ref("#0000ff") const dateDate = ref('');
const inActiveColor = ref("#000000")
function onClickItem(e) { function onClickItem(e) {
if (current.value != e.currentIndex) { 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(() => { onMounted(() => {
dateDate.value = strDate();
timePercent.value = getYearProgress();
calculateScrollViewHeight(); calculateScrollViewHeight();
// 使 Uniapp //
uni.onWindowResize(calculateScrollViewHeight); window.addEventListener('resize', calculateScrollViewHeight);
}); });
onUnmounted(() => { onUnmounted(() => {
// Uniapp //
uni.offWindowResize(calculateScrollViewHeight); window.removeEventListener('resize', calculateScrollViewHeight);
}); });
onHide(()=>{ // by
current.value = 0;
})
const calculateScrollViewHeight = () => { const calculateScrollViewHeight = () => {
// //
const screenHeight = uni.getSystemInfoSync().windowHeight; const screenHeight = uni.getSystemInfoSync().windowHeight;
@ -85,7 +111,18 @@
query query
.select('.nav') .select('.nav')
.boundingClientRect(); .boundingClientRect();
query
.select('.placeholder')
.boundingClientRect();
query
.select('.uni-title')
.boundingClientRect();
query
.select('.uni-segmented-control')
.boundingClientRect();
query
.select('.progress-bartime')
.boundingClientRect();
// //
query.exec((res) => { query.exec((res) => {
let totalHeight = 0; let totalHeight = 0;
@ -95,38 +132,62 @@
} }
}); });
// scroll-view // scroll-view
scrollViewHeight.value = screenHeight - totalHeight; scrollViewHeight.value = screenHeight - totalHeight - 80;
}); });
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.nav { .nav {
width: calc(100%); width: calc(100% - 60rpx);
padding: 0 30rpx;
height: v-bind(cusnavbarheight); height: v-bind(cusnavbarheight);
font-size: 24rpx; font-size: 24rpx;
//color: #333333; color: #ffffff;
position: fixed; position: fixed;
top: 0;
left: 0;
z-index: 99; z-index: 99;
background-image: url('@/static/navbg.png'); background-image: url('../../static/my/navbg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 750rpx 458rpx; background-size: 750rpx 458rpx;
} }
.nav_box { .placeholder {
font-size: 18; height: v-bind(cusnavbarheight);
position: absolute;
bottom: 6rpx;
width: calc(100% - 60rpx);
left: 30rpx;
right: 30rpx;
} }
.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; position: absolute;
top: v-bind(cusnavbarheight); left: 50%;
width: 100%; top: 50%;
min-height: calc(100vh - v-bind(cusnavbarheight)); transform: translate(-50%, -50%);
color: red;
/* 保持红色 */
font-size: 16px;
font-weight: bold;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
/* 提升可读性 */
} }
</style> </style>

View File

@ -15,7 +15,6 @@ const initState = {
post: '', post: '',
orgCode: '', orgCode: '',
workNo: '', workNo: '',
userIdentity: '',
// //
localStorageTime: 0, localStorageTime: 0,
} }

1
src/typings.d.ts vendored
View File

@ -28,7 +28,6 @@ declare global {
tenantId ?: string | number tenantId ?: string | number
// sex ?: number // sex ?: number
phone ?: string phone ?: string
userIdentity ?: string | number
post ?: string post ?: string
email ?: string email ?: string
/** 微信的 openid非微信没有这个字段 */ /** 微信的 openid非微信没有这个字段 */

View File

@ -235,7 +235,9 @@ export const useUpdateApp = defineStore('updateApp', () => {
if (webApp) {// upDateAppApi by min if (webApp) {// upDateAppApi by min
path = webApp path = webApp
} }
console.log(22222222222222222)
upDateAppApi(path).then(async (res : any) => { upDateAppApi(path).then(async (res : any) => {
console.log(3333333333)
let { let {
result result
} = res } = res