做生产数据展示页面

This commit is contained in:
杨哲琦 2025-03-03 18:14:17 +08:00 committed by ldeyun
commit e1c02d2905
15 changed files with 499 additions and 429 deletions

View File

@ -1,4 +1,4 @@
# 开发环境
# 请求接口地址
# VITE_REQUEST_BASE_URL = https://36.112.48.190
VITE_REQUEST_BASE_URL = http://10.75.15.249:8080
VITE_REQUEST_BASE_URL = https://36.112.48.190
#VITE_REQUEST_BASE_URL = http://10.75.15.249:8080

11
api/shengchan.js Normal file
View File

@ -0,0 +1,11 @@
import {
https
} from '@/utils/http.js';
export function queryJinriShengchansj(orgCode) { // 获取今日生产数据
return https({
url: '/scdt.CxcScdtChart/cxcScdtChart/list',
method: 'get',
data: orgCode
})
}

View File

@ -3,7 +3,7 @@
<view class="info_box">
<view class="title">
申请信息
<b style="text-align: right;color: blue;" @click="goToHis">历史查询</b>
<b style="text-align: right;color: blue;" @click="goToHis">历史查询</b>
</view>
<view class="info f-row aic jcb">
<view>
@ -49,7 +49,7 @@
</view>
<view class="info f-row aic jcb">
<view>
审批人
{{examineleader}}
</view>
<text>{{info.examineleader_dictText}}</text>
</view>
@ -125,6 +125,7 @@
default: ''
},
})
const examineleader = ref('')
const imageValue = ref([])
const ifShowFj = ref(false)
const imageStyles = {
@ -144,6 +145,12 @@
id: props.dataId
}).then((res) => {
if (res.success) {
if (res.result.records[0].zwmc == '单位专家' || res.result.records[0].zwmc == '基层正职' ||
res.result.records[0].zwmc == '高级主管') {
examineleader.value = '分管领导';
} else {
examineleader.value = '审批领导';
}
info.value = res.result.records[0]
// imageValue
if (info.value.path) {
@ -195,7 +202,7 @@
qjQueryById()
extActFlowData()
})
const goToHis = () => {
uni.navigateTo({
url: `/pages/views/renliziyuan/qingjiaxinxi/index?username=${info.value.username}`

View File

@ -1,123 +1,122 @@
{
"name" : "数智产销",
"appid" : "__UNI__9F097F0",
"description" : "",
"versionName" : "1.1.9",
"versionCode" : 20250302,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"compatible" : {
"ignoreVersion" : true
},
/* */
"modules" : {
"Geolocation" : {},
"Fingerprint" : {},
"Camera" : {},
"Barcode" : {}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"ad" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "android" ]
}
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
"name": "数智产销",
"appid": "__UNI__9F097F0",
"description": "",
"versionName": "1.1.11",
"versionCode": 20250303,
"transformPx": false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"compatible": {
"ignoreVersion": true
},
/* */
"modules": {
"Geolocation": {},
"Fingerprint": {},
"Camera": {},
"Barcode": {}
},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios": {
"dSYMs": false
},
/* SDK */
"sdkConfigs": {
"ad": {},
"geolocation": {
"system": {
"__platform__": ["android"]
}
}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "3"
}
/* */
/* */

View File

@ -26,6 +26,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/tab/product",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/tab/my",
"style": {
@ -110,14 +116,6 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/leave/application",
"style": {
"navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/checkin/index",
"style": {
@ -256,6 +254,14 @@
"navigationBarTitleText": "请假详情",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/views/renliziyuan/qingjiaxinxi/application",
"style": {
"navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
}
],
"tabBar": {
@ -270,17 +276,23 @@
"iconPath": "static/tab/index1.png",
"selectedIconPath": "static/tab/index2.png"
},
{
"text": "任务",
"pagePath": "pages/task/todotask",
"iconPath": "static/tab/office1.png",
"selectedIconPath": "static/tab/office2.png"
"text": "生产",
"pagePath": "pages/tab/product",
"iconPath": "/static/tab/product.png",
"selectedIconPath": "/static/tab/product1.png"
},
{
"text": "办公",
"pagePath": "pages/tab/office",
"iconPath": "static/tab/product1.png",
"selectedIconPath": "static/tab/product2.png"
"iconPath": "static/tab/OA.png",
"selectedIconPath": "static/tab/OA1.png"
}, {
"text": "任务",
"pagePath": "pages/task/todotask",
"iconPath": "static/tab/office1.png",
"selectedIconPath": "static/tab/office2.png"
},
{
"text": "我的",

View File

@ -202,7 +202,6 @@
}
}
}
console.log(deviceIp)
return deviceIp;
// #endif
}

View File

@ -1,32 +1,234 @@
<template>
<view :class="['f-col','aic',{'gray':store.isgray==1}]">
<dataCom title="实时输差" :list="shishiArr"></dataCom>
<dataCom title="偏远计量点" :list="shishiArr"></dataCom>
<dataCom title="生产实时数据" :list="productArr"></dataCom>
<view :class="{'gray':store.isgray==1}">
<view class="container">
<uni-card class="main-card" :is-link="false">
<uni-title title="气产量" type="h3" color="blue" />
<view class="card-content">
<view v-for="(row, rowIndex) in groupedData" :key="rowIndex" class="data-row">
<uni-row>
<uni-col v-for="(item, colIndex) in row" :key="colIndex" :span="8">
<uni-title :title="item.gas" type="h5" class="data-label" />
<view class="value-group">
<text class="value">今日量{{ item.dailyVolume }}</text>
<text class="value">年累计{{ item.dailyVolume }}</text>
</view>
</uni-col>
</uni-row>
</view>
</view>
</uni-card>
</view>
</view>
</template>
<script setup>
import dataCom from '@/bpm/dataCom.vue';
import {
ref,
onMounted,
computed
} from 'vue';
import {
onLoad
} from '@dcloudio/uni-app';
import {
ref
} from 'vue';
queryJinriShengchansj
} from "@/api/shengchan.js"
import {
formatDate
} from "@/utils/dateTime.js"
import {
beforeJump
} from '@/utils/index.js';
import {
useStore
} from '@/store'
const store = useStore()
const shishiArr = ref([])
const productArr = ref([])
onLoad((options) => {
shishiArr.value = JSON.parse(options.shishi)
productArr.value = JSON.parse(options.product)
} from '@/store';
const store = useStore();
import dataCom from '@/bpm/dataCom.vue';
const shishiArr = ref([{
gas: '气井气',
dailyVolume: '',
yearVolume: ''
}, {
gas: '伴生气',
dailyVolume: '',
yearVolume: ''
}, {
gas: '外部气',
dailyVolume: '',
yearVolume: ''
}, {
gas: '站输差',
dailyVolume: '',
yearVolume: ''
}, {
gas: '线输差',
dailyVolume: '',
yearVolume: ''
}, {
gas: '综合输差',
dailyVolume: '',
yearVolume: ''
}, ])
onMounted(() => {
getJinriShengchansj()
})
const dataJinri = ref([])
const dataJinriSum = ref([])
const queryParms = ref({})
//
const groupedData = computed(() => {
const groups = [];
for (let i = 0; i < shishiArr.value.length; i += 3) {
groups.push(shishiArr.value.slice(i, i + 3));
}
return groups;
});
const getJinriShengchansj = () => {
const now = new Date();
queryParms.rqDate = formatDate(now);
queryParms.pageSize = 100
queryJinriShengchansj(queryParms).then((res) => {
if (res.success) {
console.log(res.result.records)
dataJinri.value = res.result.records;
dataJinriSum.value = sumByGas(dataJinri.value)
console.log(dataJinriSum.value, shishiArr.value)
try {
shishiArr.value.forEach((item) => {
dataJinriSum.value.forEach((itemjinri) => {
if (item.gas === itemjinri.gas) {
if (item.gas.includes("输差")) {
item.dailyVolume = itemjinri.totalGas.toFixed(4);
} else {
item.dailyVolume = itemjinri.rq.toFixed(4);
}
}
})
})
} catch (error) {
console.log(error)
}
console.log(dataJinriSum.value, shishiArr.value)
}
})
}
function sumByGas(records) {
const summaryMap = {};
records.forEach(record => {
const gas = record.gas;
if (!summaryMap[gas]) {
summaryMap[gas] = {
gas: gas,
rq: 0,
sq: 0,
totalGas: 0
};
}
summaryMap[gas].rq += record.rq || 0;
summaryMap[gas].sq += record.sq || 0;
summaryMap[gas].totalGas += record.totalGas || 0;
});
return Object.values(summaryMap);
}
const res = wx.getSystemInfoSync();
const statusHeight = res.statusBarHeight; //
const cusnavbarheight = (statusHeight + 44) + "px";
const indexChartScdtData = () => {
indexChartScdtDataApi().then((res) => {
if (res.success) {
productArr.value = handleData(res.result.today)
otherArr = [{
text: '安全管理',
img: '../../static/tab/anquan.png',
path: '/pages/safe/manage'
}, {
text: '生产数据',
img: '../../static/tab/product.png',
path: `/pages/product/index?shishi=${JSON.stringify(shishiArr)}&product=${JSON.stringify(productArr.value)}`
}, {
text: '运输管理',
img: '../../static/tab/yunshu.png',
path: ''
}, {
text: '设备台账',
img: '../../static/tab/taizhang.png',
path: ''
}, {
text: '车辆派遣',
img: '../../static/tab/cheliang.png',
path: ''
}, {
text: '事项审批',
img: '../../static/tab/shenpi.png',
path: ''
}]
}
}).catch((err) => {
console.log(err);
})
}
const handleData = (arr) => {
let arrMap = new Map()
arr.forEach(el => {
if (arrMap.has(el.gas)) {
let obj = arrMap.get(el.gas)
arrMap.set(el.gas, {
...el,
dailyVolume: Number(el.dailyVolume + +obj.dailyVolume).toFixed(4)
})
} else {
arrMap.set(el.gas, el)
}
})
return [...arrMap.values()]
}
const jump = (url) => {
beforeJump(url, () => {
if (!url) return
uni.navigateTo({
url
})
})
}
</script>
<style lang="scss" scoped>
.container {
padding: 20rpx;
background-color: #f8f8f8;
min-height: 100vh;
}
.main-card {
border-radius: 20rpx;
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.1);
padding: 30rpx;
}
.data-row {
margin-bottom: 20rpx;
}
.value-group {
display: flex;
flex-direction: column;
gap: 5rpx;
}
/* 覆盖uni-col默认样式 */
.uni-col {
padding: 15rpx;
background-color: #f8f8f8;
border-radius: 15rpx;
}
</style>

View File

@ -1,140 +1,11 @@
<template>
<view :class="{'gray':store.isgray==1}">
<view class="nav">
</view>
<view class="content">
<view class="info f-col aic">
<view class="item_box">
<dataCom title="实时输差" :list="shishiArr"></dataCom>
<dataCom title="偏远计量点" :list="shishiArr"></dataCom>
<dataCom title="生产实时数据" :list="productArr"></dataCom>
<view class="item">
<view class="title_box other f-row aic jcb">
<view class="title">
其他信息
</view>
</view>
<view class="other_box f-row aic">
<view class="data" v-for="other,i in otherArr" :key="i" @click="jump(other.path)">
<view class="f-col aic">
<image :src="other.img" mode=""></image>
<view class="">
{{other.text}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view>
<product-data></product-data>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import {
onLoad
} from '@dcloudio/uni-app';
import {
indexChartScdtDataApi
} from '@/api/api.js';
import {
beforeJump
} from '@/utils/index.js';
import {
useStore
} from '@/store';
const store = useStore();
import dataCom from '@/bpm/dataCom.vue';
const shishiArr = [{
gas: '今日进气总量',
dailyVolume: '28392'
}, {
gas: '今日进气总量',
dailyVolume: '28392'
}, {
gas: '今日输差百分数',
dailyVolume: '0.32'
}, {
gas: '实时进气总量',
dailyVolume: '28392'
}, {
gas: '实时进气总量',
dailyVolume: '28392'
}, {
gas: '实时输差百分数',
dailyVolume: '0.32'
}, ]
const productArr = ref([])
let otherArr
onLoad(() => {
indexChartScdtData()
})
const res = wx.getSystemInfoSync();
const statusHeight = res.statusBarHeight; //
const cusnavbarheight = (statusHeight + 44) + "px";
const indexChartScdtData = () => {
indexChartScdtDataApi().then((res) => {
if (res.success) {
productArr.value = handleData(res.result.today)
otherArr = [{
text: '安全管理',
img: '../../static/tab/anquan.png',
path: '/pages/safe/manage'
}, {
text: '生产数据',
img: '../../static/tab/product.png',
path: `/pages/product/index?shishi=${JSON.stringify(shishiArr)}&product=${JSON.stringify(productArr.value)}`
}, {
text: '运输管理',
img: '../../static/tab/yunshu.png',
path: ''
}, {
text: '设备台账',
img: '../../static/tab/taizhang.png',
path: ''
}, {
text: '车辆派遣',
img: '../../static/tab/cheliang.png',
path: ''
}, {
text: '事项审批',
img: '../../static/tab/shenpi.png',
path: ''
}]
}
}).catch((err) => {
console.log(err);
})
}
const handleData = (arr) => {
let arrMap = new Map()
arr.forEach(el => {
if (arrMap.has(el.gas)) {
let obj = arrMap.get(el.gas)
arrMap.set(el.gas, {
...el,
dailyVolume: Number(el.dailyVolume + +obj.dailyVolume).toFixed(4)
})
} else {
arrMap.set(el.gas, el)
}
})
return [...arrMap.values()]
}
const jump = (url) => {
beforeJump(url, () => {
if (!url) return
uni.navigateTo({
url
})
})
}
import productData from "@/pages/product/index.vue"
</script>
<style>
@ -143,102 +14,5 @@
}
</style>
<style lang="scss" scoped>
.nav {
width: calc(100% - 60rpx);
padding: 0 30rpx;
height: v-bind(cusnavbarheight);
font-size: 24rpx;
color: #FFFFFF;
position: fixed;
top: 0;
left: 0;
z-index: 99;
background-image: url('../../static/my/navbg.png');
background-repeat: no-repeat;
background-size: 750rpx 458rpx;
}
.content {
padding: v-bind(cusnavbarheight) 0 42rpx 0;
}
.info {
.item_box {
.item {
width: 690rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
border-radius: 16rpx;
padding: 30rpx 0;
margin-top: 24rpx;
.title_box {
padding: 0 30rpx;
margin-bottom: -20rpx;
}
.title {
font-size: 28rpx;
color: #333333;
background-image: url('../../static/index/line.png');
background-size: 44rpx 13rpx;
background-repeat: no-repeat;
background-position: left bottom;
}
.more {
font-size: 24rpx;
color: #999999;
text {
margin-right: 6rpx;
}
}
.data_box {
.data {
width: 33.33%;
margin-top: 60rpx;
}
flex-wrap: wrap;
view {
font-size: 32rpx;
color: #333333;
margin-bottom: 8rpx;
}
text {
font-size: 24rpx;
color: #333333;
}
}
.other {
margin-bottom: -10rpx;
}
.other_box {
flex-wrap: wrap;
.data {
width: 25%;
margin-top: 40rpx;
font-size: 28rpx;
color: #333333;
image {
width: 98rpx;
height: 98rpx;
margin-bottom: 20rpx;
}
}
}
}
}
}
</style>

View File

@ -51,10 +51,10 @@
</view>
</view>
</picker>
<picker @change="bindType" :value="typeIndex" :range="typeArr" range-key="realname" v-if="ifShow">
<picker @change="bindType" :value="typeIndex" :range="typeArr" range-key="realname">
<view class="f-row aic jcb box">
<view class="title">
审批领导
{{examineleader}}
</view>
<view class="f-row aic">
<view :class="[{'choose':typeIndex==null},{'choosed':typeIndex!=null}]">
@ -155,8 +155,8 @@
/**审批领导*/
const typeArr = ref([])
const typeIndex = ref(null)
/**判断是否显示审批领导字段*/
const ifShow = ref(true)
/**判断显示审批 / 分管 领导*/
const examineleader = ref(true)
/**职位层级*/
const zwcj = ref('')
/**出发地*/
@ -205,10 +205,8 @@
if (!type.value) return proxy.$toast('请选择请假类型')
if (!beginTime.value) return proxy.$toast('请选择开始时间')
if (!endTime.value) return proxy.$toast('请选择结束时间')
if (ifShow.value) {
if (typeIndex.value == null) { //
return proxy.$toast('请选择审批领导')
}
if (typeIndex.value == null) { //
return proxy.$toast('请选择' + examineleader.value)
}
if (!departure.value.trim()) return proxy.$toast('请输入出发地')
if (!destination.value.trim()) return proxy.$toast('请输入目的地')
@ -270,7 +268,9 @@
typeArr.value = res.result.list
zwcj.value = res.result.zwmc
if (zwcj.value == '单位专家' || zwcj.value == '基层正职' || zwcj.value == '高级主管') {
ifShow.value = false;
examineleader.value = '分管领导';
}else{
examineleader.value = '审批领导';
}
} else {
proxy.$toast(res.message);

View File

@ -120,43 +120,50 @@
</script>
<style lang="scss" scoped>
.date {
width: 690rpx;
padding: 20rpx 30rpx 0 30rpx;
font-size: 28rpx;
color: #333333;
}
// 使便
$primary-color: #0056b3;
$secondary-color: #f2f9fc;
$border-color: #d1e7ff;
$text-color: #333;
.date {
width: 100%; //
padding: 20rpx 30rpx;
font-size: 28rpx;
color: $text-color;
text-align: center; //
background: $secondary-color; // 使
border-bottom: 1px solid $border-color; //
}
.titleStyle {
font-size: 12px;
color: #747474;
line-height: 25px;
height: 25px;
background: #F2F9FC;
text-align: center;
vertical-align: middle;
border-left: 1px solid #919191;
border-bottom: 1px solid #919191;
;
}
.titleStyle {
font-size: 14px; //
color: $primary-color; //
line-height: 2;
height: auto; //
background: $secondary-color;
text-align: center; //
vertical-align: middle;
border-left: 1px solid $border-color;
border-bottom: 1px solid $border-color;
}
/* 内容样式 */
.dataStyle {
max-font-size: 14px;
/* 最大字体限制 */
min-font-size: 10px;
/* 最小字体限制 */
font-size: 12px;
color: #00007f;
line-height: 25px;
height: 25px;
font-weight: 500;
text-align: center;
vertical-align: middle;
border-bottom: 1px solid #919191;
border-left: 1px solid #919191;
text-overflow: ellipsis;
/* 内容样式 */
.dataStyle {
font-size: 14px;
color: $text-color;
line-height: 1.5; //
height: auto; //
font-weight: normal; //
text-align: center; //
vertical-align: middle;
border-bottom: 1px solid $border-color;
border-left: 1px solid $border-color;
padding: 10rpx; //
}
//
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

BIN
static/tab/OA.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 53 KiB

59
utils/dateTime.js Normal file
View File

@ -0,0 +1,59 @@
// 日期格式化函数 by liaody 2025-3-5
// 使用示例
///const now = new Date();
//const formattedDate = formatDate(now);
//console.log(formattedDate);
function formatDate(date, format = 'YYYY-MM-DD') {
if (!(date instanceof Date)) {
date = new Date(date);
}
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hour = String(date.getHours()).padStart(2, '0');
const minute = String(date.getMinutes()).padStart(2, '0');
const second = String(date.getSeconds()).padStart(2, '0');
return format
.replace('YYYY', year)
.replace('MM', month)
.replace('DD', day)
.replace('HH', hour)
.replace('mm', minute)
.replace('ss', second);
}
// 计算两个日期之间相差的天数
// 使用示例
// const dateA = '2025-01-01';
// const dateB = '2025-01-10';
// const daysDiff = getDaysDifference(dateA, dateB);
// console.log(daysDiff);
function getDaysDifference(date1, date2) {
const oneDay = 24 * 60 * 60 * 1000; // 一天的毫秒数
const firstDate = new Date(date1);
const secondDate = new Date(date2);
const diffDays = Math.round(Math.abs((firstDate - secondDate) / oneDay));
return diffDays;
}
// 使用示例
// const startDate = '2025-03-01';
// const daysToAdd = 5;
// const futureDate = getDateAfterDays(startDate, daysToAdd);
// const formattedFutureDate = formatDate(futureDate);
// console.log(formattedFutureDate);
// 获取指定日期之后 n 天的日期
function getDateAfterDays(date, days) {
const newDate = new Date(date);
newDate.setDate(newDate.getDate() + days);
return newDate;
}
export {
formatDate,
getDateAfterDays,
getDaysDifference
}