Compare commits
13 Commits
15c86f500a
...
5a6d68bd19
Author | SHA1 | Date | |
---|---|---|---|
5a6d68bd19 | |||
![]() |
adcdb86db7 | ||
![]() |
5477eaebe9 | ||
![]() |
dd7d3bb64b | ||
![]() |
01292d1f50 | ||
![]() |
3e75a37937 | ||
![]() |
cf7c21a160 | ||
![]() |
ea59b7b564 | ||
![]() |
4b526dd5b4 | ||
![]() |
2215b058ab | ||
![]() |
c97b130da9 | ||
![]() |
8acb78320c | ||
![]() |
5e7843d456 |
5
env/.env.development
vendored
5
env/.env.development
vendored
@ -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
4
env/.env.production
vendored
@ -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'
|
||||||
|
@ -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特有相关 */
|
||||||
|
@ -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 }
|
||||||
|
})
|
||||||
}
|
}
|
@ -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 {
|
||||||
|
@ -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,
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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) => {
|
||||||
|
@ -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(() => {
|
||||||
|
@ -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>
|
@ -15,6 +15,7 @@ const initState = {
|
|||||||
post: '',
|
post: '',
|
||||||
orgCode: '',
|
orgCode: '',
|
||||||
workNo: '',
|
workNo: '',
|
||||||
|
userIdentity: '',
|
||||||
// 本地存储时间
|
// 本地存储时间
|
||||||
localStorageTime: 0,
|
localStorageTime: 0,
|
||||||
}
|
}
|
||||||
|
1
src/typings.d.ts
vendored
1
src/typings.d.ts
vendored
@ -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,非微信没有这个字段 */
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user