Compare commits

...

13 Commits

Author SHA1 Message Date
5a6d68bd19 修改生产模块页面,增加顶部标签,新建分包pages-production,将生产页面移动至分包下面。
下一步制作曲线页面,统计页面,继续做好设备,安防等页面。
2025-09-11 17:58:34 +08:00
年泽 闵
adcdb86db7 Merge branch 'minJeecg' into 'master'
Min jeecg

See merge request cxc/jeecguniapp!37
2025-09-11 07:27:26 +00:00
lagos
5477eaebe9 1 2025-09-11 15:26:23 +08:00
lagos
dd7d3bb64b Merge remote-tracking branch 'remotes/origin/master' into minJeecg 2025-09-09 10:11:58 +08:00
lagos
01292d1f50 1 2025-09-09 10:11:09 +08:00
yangzhq68909
3e75a37937 Merge remote-tracking branch 'remotes/origin/master' 2025-09-08 13:28:01 +08:00
yangzhq68909
cf7c21a160 增加临时劳务登录 2025-09-08 13:27:49 +08:00
年泽 闵
ea59b7b564 Merge branch 'minJeecg' into 'master'
Min jeecg

See merge request cxc/jeecguniapp!36
2025-09-05 00:14:15 +00:00
lagos
4b526dd5b4 Merge remote-tracking branch 'remotes/origin/master' into minJeecg
# Conflicts:
#	env/.env.development
2025-09-05 08:13:31 +08:00
lagos
2215b058ab 1 2025-09-05 08:12:18 +08:00
yangzhq68909
c97b130da9 app登录方式修改 增加劳动合同号 2025-09-03 15:17:38 +08:00
闵 年泽
8acb78320c Merge branch 'minJeecg' into 'master'
Min jeecg

See merge request cxcxt/jeecguniapp!35
2025-08-13 09:37:53 +08:00
闵 年泽
5e7843d456 Merge branch 'minJeecg' into 'master'
1.修改app

See merge request cxcxt/jeecguniapp!34
2025-08-09 11:27:18 +08:00
13 changed files with 184 additions and 185 deletions

View File

@ -7,7 +7,10 @@ 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.1.0', versionName: '2.2.0',
versionCode: '20250808', versionCode: '20250903',
transformPx: false, transformPx: false,
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans' locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
/* 5+App特有相关 */ /* 5+App特有相关 */

View File

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

View File

@ -80,6 +80,7 @@
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,
@ -138,7 +139,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.1.0", "versionName": "2.2.0",
"versionCode": "20250808", "versionCode": "20250903",
"transformPx": false, "transformPx": false,
"app-plus": { "app-plus": {
"usingComponents": true, "usingComponents": true,

View File

@ -75,6 +75,7 @@
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,6 +27,8 @@
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>
@ -65,6 +67,7 @@
// 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,15 +52,32 @@
</PageLayout> </PageLayout>
</template> </template>
<script lang="ts" setup> <script setup>
import { useToast } from 'wot-design-uni' import {
import { ref } from 'vue' useToast
import { useUserStore } from '@/store/user' } from 'wot-design-uni'
import { http } from '@/utils/http' import {
import { HOME_PAGE } from '@/common/constants' ref
import { useRouter } from '@/plugin/uni-mini-router' } 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 Base64 from 'base-64';
import { loginApi } from '@/api/system'; import {
loginApi
} from '@/api/system';
import {
queryUsernameByLdhth
} from '@/api/system/user';
defineOptions({ defineOptions({
name: 'login', name: 'login',
@ -75,7 +92,8 @@
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().appVersion const version = uni.getSystemInfoSync().appWgtVersion ? uni.getSystemInfoSync().appWgtVersion : uni.getSystemInfoSync()
.appVersion
const toast = useToast() const toast = useToast()
const userStore = useUserStore() const userStore = useUserStore()
const handleChangePassword = () => { const handleChangePassword = () => {
@ -92,58 +110,85 @@
uni.setStorageSync('accountpassword', JSON.stringify(localObj)) uni.setStorageSync('accountpassword', JSON.stringify(localObj))
uni.setStorageSync('savePwd', remPW.value) uni.setStorageSync('savePwd', remPW.value)
} }
const handleLogin = () => { const handleLogin = async () => {
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 un = Base64.encode(encodeURIComponent(userName.value)) let params = {
let pw = Base64.encode(encodeURIComponent(password.value)) username: userName.value,
loading.value = true password: password.value,
/*生产环境 begin */ };
// loginApi({ username: un, password: pw }) /*判断是否是六位纯数字*/
/*开发环境 begin */ if (userName.value.match(/^\d{6}$/)) {
loginApi({ username: userName.value, password: password.value, captcha: 'app' }) await queryUsernameByLdhth(userName.value).then(res => {
.then((res : any) => { if (res) {
if (res.success) { params = {
const { result } = res username: Base64.encode(encodeURIComponent(res)),
const userInfo = result.userInfo password: Base64.encode(encodeURIComponent(password.value)),
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 {
res.message == '数据库中已存在该记录' ? res.message = '请使用统一身份账号登录' : res.message params.captcha = 'app';
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(() => { } else {
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,51 +9,35 @@
</route> </route>
<template> <template>
<PageLayout :navbarShow="false"> <PageLayout :navbarShow="false">
<view> <view class="nav">
<view class="placeholder"></view> <view class="nav_box">
<view style="width: 100%; display: grid; place-items: center"> <scroll-view direction="horizontal">
<uni-title :title="dateDate + ':生产情况'" type="h1" color="blue" /> <uni-segmented-control :current="current" :values="items" styleType="string" mode="segmented"
</view> @clickItem="onClickItem"></uni-segmented-control>
<view style="margin: 0 10px;"> </scroll-view>
<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,
@ -62,14 +46,19 @@
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 + 44 + 'px'; const cusnavbarheight = (statusHeight + 50) + "px";
const scrollViewHeight = ref(0); // const scrollViewHeight = ref(0); //
const timePercent = ref(0);
const dateDate = ref(''); const activeColor = ref("#0000ff")
const inActiveColor = ref("#000000")
function onClickItem(e) { function onClickItem(e) {
if (current.value != e.currentIndex) { if (current.value != e.currentIndex) {
@ -77,31 +66,16 @@
} }
} }
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
window.addEventListener('resize', calculateScrollViewHeight); uni.onWindowResize(calculateScrollViewHeight);
}); });
onUnmounted(() => { onUnmounted(() => {
// // Uniapp
window.removeEventListener('resize', calculateScrollViewHeight); uni.offWindowResize(calculateScrollViewHeight);
}); });
onHide(()=>{ // by
current.value = 0;
})
const calculateScrollViewHeight = () => { const calculateScrollViewHeight = () => {
// //
const screenHeight = uni.getSystemInfoSync().windowHeight; const screenHeight = uni.getSystemInfoSync().windowHeight;
@ -111,18 +85,7 @@
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;
@ -132,62 +95,38 @@
} }
}); });
// scroll-view // scroll-view
scrollViewHeight.value = screenHeight - totalHeight - 80; scrollViewHeight.value = screenHeight - totalHeight;
}); });
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.nav { .nav {
width: calc(100% - 60rpx); width: calc(100%);
padding: 0 30rpx;
height: v-bind(cusnavbarheight); height: v-bind(cusnavbarheight);
font-size: 24rpx; font-size: 24rpx;
color: #ffffff; //color: #333333;
position: fixed; position: fixed;
top: 0;
left: 0;
z-index: 99; z-index: 99;
background-image: url('../../static/my/navbg.png'); background-image: url('@/static/navbg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 750rpx 458rpx; background-size: 750rpx 458rpx;
} }
.placeholder { .nav_box {
height: v-bind(cusnavbarheight); font-size: 18;
}
.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;
left: 50%; bottom: 6rpx;
top: 50%; width: calc(100% - 60rpx);
transform: translate(-50%, -50%); left: 30rpx;
color: red; right: 30rpx;
/* 保持红色 */ }
font-size: 16px;
font-weight: bold; .content {
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); position: absolute;
/* 提升可读性 */ top: v-bind(cusnavbarheight);
width: 100%;
min-height: calc(100vh - v-bind(cusnavbarheight));
} }
</style> </style>

View File

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

1
src/typings.d.ts vendored
View File

@ -28,6 +28,7 @@ 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,9 +235,7 @@ 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