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
#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
View File

@ -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'

View File

@ -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特有相关 */

View File

@ -9,7 +9,9 @@ export function queryPostByUserIdApi(userid : string) {
return http({
url: '/sys/user/queryPostByUserId',
method: 'GET',
data: { userid }
data: {
userid
}
});
}
@ -27,19 +29,10 @@ export function editUserApi(config : object) {
}
/*根据部门Cod和角色Id查询用户信息*/
export function queryUserByOrgRoleApi(config : object) {
export function queryUserByOrgRoleApi(config : object) {
return http({
url: '/cxcChangesInPersonnel/cxcChangesInPersonnel/queryByDepCodRoleId',
method: 'GET',
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
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 {

View File

@ -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,

View File

@ -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)
}

View File

@ -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) => {

View File

@ -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,85 +92,58 @@
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)),
};
let un = Base64.encode(encodeURIComponent(userName.value))
let pw = Base64.encode(encodeURIComponent(password.value))
loading.value = true
/*生产环境 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 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 {
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 {
/*开发环境 */
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;
}
.finally(() => {
loading.value = false
})
}
onLoad(() => {

View File

@ -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">
<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 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>
</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>

View File

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

1
src/typings.d.ts vendored
View File

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

View File

@ -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