This commit is contained in:
ylj20011123 2025-08-18 19:09:14 +08:00
parent 57c0135413
commit 590499fb84
11 changed files with 1592 additions and 485 deletions

71
components/noData.vue Normal file
View File

@ -0,0 +1,71 @@
<template>
<div class="no-data-tip">
<!-- <image :src="noDataPath" v-if="type === 1"></image> -->
<div v-if="type === 1" class="imgBox">
<image style="width: 72rpx; height: 72rpx" :src="newNoDataPath"></image>
</div>
<image :src="noCoupon" v-else class="imgBigBox"></image>
<div class="textBox" @click="refresh">{{ text }}</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
// , null
text: String,
isShow: Boolean,
type: {
type: Number,
default: 1,
},
},
data() {
return {
newNoDataPath: "/static/images/home/lostAndFoundIcon.svg",
noDataPath: "https://eshangtech.com/ShopICO/no-data.png",
noCoupon: "https://eshangtech.com/ShopICO/no-coupon.png",
};
},
computed: {
...mapGetters({
isLoading: "isLoading",
}),
},
methods: {
refresh() {
if (this.text.indexOf("点击") > -1) {
this.$emit("refresh");
}
},
},
};
</script>
<style lang="less" scoped>
.no-data-tip {
width: 100%;
.imgBox {
width: 100%;
display: flex;
justify-content: center;
}
.imgBigBox {
width: 200px;
height: 150px;
}
.textBox {
font-size: 28rpx;
font-weight: bolder;
color: #b8b7b4;
width: 100%;
text-align: center;
margin-top: 8rpx;
}
}
</style>

View File

@ -54,6 +54,22 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#F5F6F7" "navigationBarBackgroundColor": "#F5F6F7"
} }
},
{
"path": "attendanceStatistics",
"style": {
"navigationBarTitleText": "考勤统计",
"navigationBarBackgroundColor": "#F5F6F7",
"navigationStyle": "custom"
}
},
{
"path": "roster",
"style": {
"navigationBarTitleText": "排班表",
"navigationBarBackgroundColor": "#F5F6F7",
"navigationStyle": "custom"
}
} }
] ]
}, },

View File

@ -0,0 +1,484 @@
<!-- 考勤统计 -->
<template>
<page-meta :page-style="'overflow:' + (showPopup ? 'hidden' : 'visible')"></page-meta>
<view class="main">
<!-- 自定义的页面顶部内容 -->
<view class="summaryTab" :style="{ height: (menu.bottom + 14) + 'px' }">
<view class="leftArrow" :style="{ top: (menu.top + ((menu.height - 24) / 2)) + 'px' }">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"
@click="handleBack"></image>
<view class="picker" :style="{ top: (menu.bottom + 24) + 'px' }" @click="handleChangeService">
<view class="selectService">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
<view class="select">
<view class="content">
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'' }}
</view>
<image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 考勤统计的列表 -->
<view class="attendanceListBox" :style="{ paddingTop: (menu.bottom + 30) + 'px' }">
<view class="onDutyPersonBoxHeader">
<text class="title">考勤统计</text>
<!-- 居中的日历时间 -->
<view class="dateBox">
<view class="centerDateBox">
<image class="arrowIcon" src="https://eshangtech.com/cyy_DIB/leftArrowIcon.png"
@click="handleChangeDate(2)" />
<view class="center">
<text class="date-text">{{ selectDate ? $util.cutDate(new Date(selectDate), 'YYYY-MM') : ""
}}</text>
<!-- <text class="date-icon">📅</text> -->
</view>
<image class="arrowIcon" src="https://eshangtech.com/cyy_DIB/rightArrowIcon.png"
@click="handleChangeDate(1)" />
</view>
</view>
</view>
<view class="attendanceStatisticsItem" v-for="(item, index) in attendanceStatisticsData" :key="index"
:style="{
borderTopRightRadius: index === 0 ? '0' : '',
borderTopLeftRadius: index === 0 ? '0' : '',
marginBottom: index + 1 === attendanceStatisticsData.length ? '0' : '24rpx'
}">
<view class="attendanceStatisticsItemTop">
<view class="eventsItem" style="margin-bottom: 16rpx;">
<view class="eventsHaveImgLabel">
<image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/personIcon.png" />
<view class="eventsHaveLabel">联系人</view>
</view>
<view class="eventsValue">{{ item.userName || "" }}</view>
</view>
<view class="eventsItem">
<view class="eventsHaveImgLabel">
<image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/phoneLabelIcon.png" />
<view class="eventsHaveLabel">联系电话</view>
</view>
<view class="eventsValue">{{ item.phone || "" }}</view>
</view>
</view>
<view class="line"></view>
<view class="attendanceStatisticsItemTop attendanceStatisticsItemBottom">
<view class="eventsItem">
<view class="eventsHaveImgLabel">
<view class="eventsHaveLabel">当月排班</view>
</view>
<view class="eventsValue">{{ item.scheduleTotal || "" }}</view>
</view>
<view class="eventsItem">
<view class="eventsHaveImgLabel">
<view class="eventsHaveLabel">出勤</view>
</view>
<view class="eventsValue">{{ item.attendTotal || "" }}</view>
</view>
<view class="eventsItem">
<view class="eventsHaveImgLabel">
<view class="eventsHaveLabel">休息</view>
</view>
<view class="eventsValue">{{ item.restTotal || "" }}</view>
</view>
<view class="eventsItem">
<view class="eventsHaveImgLabel">
<view class="eventsHaveLabel">迟到</view>
</view>
<view class="eventsValue">{{ item.lateTotal || "" }}</view>
</view>
<view class="eventsItem" style="margin-bottom: 0;">
<view class="eventsHaveImgLabel">
<view class="eventsHaveLabel">早退</view>
</view>
<view class="eventsValue">{{ item.earlyTotal || "" }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import request from "@/util/index.js";
import { formatTime } from '@/util/dateTime/index.js'
export default {
data() {
const nowDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD') //
return {
menu: {},
serviceInfo: {},
showPopup: false,
selectDate: nowDay,//
attendanceStatisticsData: [],
isFirst: true,
seatInfo: {}
}
},
onLoad() {
this.menu = uni.getMenuButtonBoundingClientRect()
let currentService = uni.getStorageSync('currentService')
this.serviceInfo = currentService
this.handleGetServerpartDetail(currentService.Serverpart_ID || currentService.SERVERPART_ID)
this.handleGetData(currentService.SERVERPART_NAME)
},
async onShow() {
let currentService = uni.getStorageSync('currentService')
if (currentService.Serverpart_ID !== this.serviceInfo.SERVERPART_ID && !this.isFirst) {
this.handleGetServerpartDetail(currentService.Serverpart_ID)
this.handleGetData(currentService.SERVERPART_NAME)
}
this.isFirst = false
},
methods: {
//
async handleGetData(SERVERPART_NAME) {
let req = {
bsessionKey: "0B30475A94674D608022885F7763959B",
workTime: new Date(this.selectDate).getTime(),
saName: SERVERPART_NAME || "",//
phone: "",//
}
uni.showLoading({
title: "加载中..."
})
const data = await new Promise((resolve, reject) => {
uni.request({
url: "https://fwqznxj.yciccloud.com:9081/ynjt/pushManage/queryUserSchedule",
method: "POST",
data: req,
header: {
"content-type": "application/x-www-form-urlencoded",
},
success(res) {
resolve(res.data.data)
},
});
});
uni.hideLoading()
let list = data
if (list && list.length > 0) {
list.forEach((item) => {
item.dutyClockInTime = item.dutyClockInTime ? formatTime(item.dutyClockInTime) : ""
item.offDutyClockInTime = item.offDutyClockInTime ? formatTime(item.offDutyClockInTime) : ""
})
}
this.attendanceStatisticsData = list
},
//
async handleGetServerpartDetail(id) {
let currentService = uni.getStorageSync("currentService");
let seatInfo = uni.getStorageSync("seatInfo");
this.seatInfo = JSON.parse(seatInfo);
let req = {
ServerpartId: id || currentService.Serverpart_ID || currentService.SERVERPART_ID,
latitude: this.seatInfo.latitude,
longitude: this.seatInfo.longitude,
};
console.log('req', req);
uni.showLoading({
title: "加载中...",
});
const data = await request.$webJavaGet(
"/third-party/getServerPartInfo",
req
);
uni.hideLoading();
let obj = data.Result_Data;
this.serviceInfo = obj;
this.$forceUpdate();
console.log('this.serviceInfo', this.serviceInfo);
},
//
handleChangeService() {
this.$util.toNextRoute("navigateTo", "/pages/map/index?type=attendanceStatus");
},
handleBack() {
uni.navigateBack({
delta: 1
});
},
//
async handleChangeDate(type) {
this.attendanceStatisticsData = []
// type 1 2
// iOS 2025-08-15 2025/08/15
const cur = new Date((this.selectDate || '').replace(/-/g, '/'));
if (Number.isNaN(cur.getTime())) return;
// 12
const delta = type === 1 ? 1 : (type === 2 ? -1 : 0);
// new Date(, +1, 0)
const last = new Date(cur.getFullYear(), cur.getMonth() + delta + 1, 0);
const y = last.getFullYear();
const m = String(last.getMonth() + 1).padStart(2, '0');
const d = String(last.getDate()).padStart(2, '0');
this.selectDate = `${y}-${m}-${d}`;
await this.handleGetData(this.serviceInfo.SERVERPART_NAME)
},
}
}
</script>
<style lang="less" scoped>
@bg: #f8f9fa;
@muted: #666;
@card: #fff;
@shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
@primary: #27B25F;
@primary2: #4CCC7F;
@ok: #2ed573;
@warn: #ff9f43;
@danger: #ff4757;
.main {
width: 100vw;
min-height: 100vh;
background-color: #f0f2f3;
box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.summaryTab {
position: fixed;
left: 0;
top: 0;
width: 100vw;
// background: #fff;
background-image: url("https://eshangtech.com/minTestImg/pageBg.png");
z-index: 99;
display: flex;
align-items: center;
box-sizing: border-box;
padding-bottom: 16px;
.leftArrow {
width: 100%;
height: 24px;
position: absolute;
// left: 16px;
z-index: 99999999999;
box-sizing: border-box;
display: flex;
align-items: center;
padding: 0 32rpx;
.img {
width: 24px;
height: 24px;
margin-right: 8px;
z-index: 99;
}
.picker {
.selectService {
display: flex;
align-items: center;
.img {
width: 40px;
height: 40px;
z-index: 2;
}
.select {
height: 32px;
background: #fff;
border-radius: 0 16px 16px 0;
transform: translateX(-40px);
box-sizing: border-box;
padding-left: 35px;
padding-right: 8rpx;
display: flex;
align-items: center;
.content {
display: flex;
align-items: center;
.uni-input {
padding: 0;
background: transparent;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
}
.area {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow {
width: 12px;
height: 12px;
}
.noticeText {
font-size: 24rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #B6BACB;
line-height: 40rpx;
white-space: nowrap;
}
}
}
}
}
}
}
.attendanceListBox {
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
.onDutyPersonBoxHeader {
background: @bg;
padding: 0 30rpx;
border-bottom: 1rpx solid #e9ecef;
font-weight: 700;
font-size: 28rpx;
color: #2c3e50;
display: flex;
justify-content: space-between;
align-items: center;
border-top-left-radius: 8rpx;
border-top-right-radius: 8rpx;
.dateBox {
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
align-items: center;
justify-content: center;
.centerDateBox {
display: flex;
align-items: center;
gap: 10rpx;
padding: 10rpx 20rpx;
border-radius: 30rpx;
background-color: #fff;
// border: 2rpx solid #27B35F;
// background: rgba(255, 255, 255, .15);
.arrowIcon {
width: 40rpx;
height: 40rpx;
}
.center {
.date-text {
font-size: 28rpx;
font-weight: 700;
}
}
}
}
}
.attendanceStatisticsItem {
width: 100%;
box-sizing: border-box;
padding: 24rpx;
box-shadow: @shadow;
border-radius: 8rpx;
background-color: #fff;
.attendanceStatisticsItemTop {
width: 100%;
flex-wrap: wrap;
.eventsItem {
width: 50%;
display: inline-block;
display: flex;
align-items: center;
.eventsHaveImgLabel {
display: flex;
width: 200rpx;
align-items: center;
.eventsHaveImg {
width: 30rpx;
height: 30rpx;
margin-right: 16rpx;
margin-top: 6rpx;
}
.eventsHaveLabel {
width: 154rpx;
font-size: 24rpx;
}
}
.eventsLabel {
width: 200rpx;
text-align: left;
font-size: 24rpx;
}
.eventsValue {
flex: 1;
font-size: 24rpx;
}
}
}
.line {
width: 100%;
height: 2rpx;
background-color: #dad9d3;
margin: 24rpx 0;
}
.attendanceStatisticsItemBottom {
display: flex;
flex-wrap: wrap;
align-items: center;
.eventsItem {
margin-bottom: 16rpx;
}
}
}
}
}
</style>

View File

@ -5,28 +5,27 @@
<view class="emergencyItem" v-for="(item, index) in showList" :key="index" @click="handleShowDetail(item)" <view class="emergencyItem" v-for="(item, index) in showList" :key="index" @click="handleShowDetail(item)"
:style="{ :style="{
marginBottom: index + 1 === showList.length ? '0' : '', marginBottom: index + 1 === showList.length ? '0' : '',
border: item.status === 1 ? '2rpx solid #f4db9c' : item.status === 2 ? '2rpx solid #d3d3d3' : '' border: item.state === '完成' ? '2rpx solid #f4db9c' : item.state === '处理中' ? '2rpx solid #d3d3d3' : ''
}"> }">
<view class="emergencyItemTitle"> <view class="emergencyItemTitle">
<view class="emergencyItemTitleLeft"> <view class="emergencyItemTitleLeft">
{{ type === 1 ? item.title || "" : type === 2 ? item.service || "" : "" }} {{ type === 1 ? item.title || "" : type === 2 ? item.type || "" : "" }}
</view> </view>
<view class="emergencyItemTitleRight"> <view class="emergencyItemTitleRight">
<view class="emergencyItemStatus" :style="{ <view class="emergencyItemStatus" v-if="item.state" :style="{
background: item.status === 1 ? '#ecbd44' : item.status === 2 ? '#d3d3d3' : '', background: item.state === '完成' ? '#ecbd44' : item.state === '处理中' ? '#d3d3d3' : '',
color: item.status === 1 ? '#fff' : item.status === 2 ? '#fff' : '' color: item.state === '完成' ? '#fff' : item.state === '处理中' ? '#fff' : ''
}"> }">
{{ item.status === 1 ? '已完成' : item.status === {{ item.state }}</view>
2 ? '处理中' : '' }}</view>
</view> </view>
</view> </view>
<view class="emergencyDesc">{{ item.desc || "" }}</view> <view class="emergencyDesc">{{ item.sceneOverview || "" }}</view>
<view class="line"></view> <view class="line"></view>
<view class="otherMessageRow"> <view class="otherMessageRow">
<image class="otherMessageIcon" src="https://eshangtech.com/cyy_DIB/personIcon.png" /> <image class="otherMessageIcon" src="https://eshangtech.com/cyy_DIB/personIcon.png" />
<view class="otherMessageValue">{{ item.person }}</view> <view class="otherMessageValue">{{ item.userName || item.createUserName }}</view>
</view> </view>
<view class="otherMessageRow"> <view class="otherMessageRow">
@ -36,12 +35,13 @@
<view class="otherMessageRow" style="margin-bottom: 0;"> <view class="otherMessageRow" style="margin-bottom: 0;">
<image class="otherMessageIcon" src="https://eshangtech.com/cyy_DIB/timeIcon.png" /> <image class="otherMessageIcon" src="https://eshangtech.com/cyy_DIB/timeIcon.png" />
<view class="otherMessageValue">{{ item.time }}</view> <view class="otherMessageValue">{{ item.createTime }}</view>
</view> </view>
</view> </view>
<view class="noDataBox" v-if="!isLoading && !(showList && showList.length > 0)">
<noData :type="1" :text="'暂无数据'" />
</view>
<!-- <view :class="item.status === 1 ? 'event-item left-ok' : item.status === 2 ? 'event-item' : ''" <!-- <view :class="item.status === 1 ? 'event-item left-ok' : item.status === 2 ? 'event-item' : ''"
v-for="(item, index) in showList" :key="index" @click="handleShowDetail(item)"> v-for="(item, index) in showList" :key="index" @click="handleShowDetail(item)">
@ -150,7 +150,7 @@
<image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/personIcon.png" /> <image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/personIcon.png" />
<view class="eventsHaveLabel">联系人</view> <view class="eventsHaveLabel">联系人</view>
</view> </view>
<view class="eventsValue">{{ eventsDetail.person || "" }}</view> <view class="eventsValue">{{ eventsDetail.createUserName || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsHaveImgLabel"> <view class="eventsHaveImgLabel">
@ -164,11 +164,11 @@
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">事件片区</view> <view class="eventsLabel">事件片区</view>
<view class="eventsValue">{{ eventsDetail.area || "" }}</view> <view class="eventsValue">{{ eventsDetail.belongArea || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">事件服务区</view> <view class="eventsLabel">事件服务区</view>
<view class="eventsValue">{{ eventsDetail.service || "" }}</view> <view class="eventsValue">{{ eventsDetail.saName || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">类型</view> <view class="eventsLabel">类型</view>
@ -176,7 +176,7 @@
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">问题描述</view> <view class="eventsLabel">问题描述</view>
<view class="eventsValue">{{ eventsDetail.desc || "" }}</view> <view class="eventsValue">{{ eventsDetail.describe || "" }}</view>
</view> </view>
@ -184,36 +184,36 @@
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">协调处理结果</view> <view class="eventsLabel">协调处理结果</view>
<view class="eventsValue">{{ eventsDetail.startRes || "" }}</view> <view class="eventsValue">{{ eventsDetail.coorResult || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理人</view> <view class="eventsLabel">办理人</view>
<view class="eventsValue">{{ eventsDetail.startPerson || "" }}</view> <view class="eventsValue">{{ eventsDetail.coorUserName || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理完成时间</view> <view class="eventsLabel">办理完成时间</view>
<view class="eventsValue">{{ eventsDetail.startTime || "" }}</view> <view class="eventsValue">{{ eventsDetail.coorEndTime || "" }}</view>
</view> </view>
<view class="eventsSmallTitle">经营公司协调处理情况</view> <view class="eventsSmallTitle">经营公司协调处理情况</view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">协调处理结果</view> <view class="eventsLabel">协调处理结果</view>
<view class="eventsPic">{{ eventsDetail.endRes || "" }}</view> <view class="eventsPic">{{ eventsDetail.companyResult || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理人</view> <view class="eventsLabel">办理人</view>
<view class="eventsValue">{{ eventsDetail.endPerson || "" }}</view> <view class="eventsValue">{{ eventsDetail.companyUserName || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理完成时间</view> <view class="eventsLabel">办理完成时间</view>
<view class="eventsValue">{{ eventsDetail.endTime || "" }}</view> <view class="eventsValue">{{ eventsDetail.companyEndTime || "" }}</view>
</view> </view>
<view class="eventsItemPic"> <view class="eventsItemPic">
<view class="eventsLabel">事件现场照片</view> <view class="eventsLabel">事件现场照片</view>
<view class="eventsPic" v-if="eventsDetail.imgList && eventsDetail.imgList.length > 0"> <view class="eventsPic" v-if="eventsDetail.companyFileUp && eventsDetail.companyFileUp.length > 0">
<view class="eventsPicItem" v-for="(item, index) in eventsDetail.imgList" :key="index" <view class="eventsPicItem" v-for="(item, index) in eventsDetail.companyFileUp" :key="index"
@click="showImg(eventsDetail.imgList, index)"> @click="showImg(eventsDetail.companyFileUp, index)">
<image class="eventsPicImg" :src="item.url" /> <image class="eventsPicImg" :src="item.url" />
</view> </view>
@ -225,89 +225,96 @@
</template> </template>
<script> <script>
import { formatTime } from '@/util/dateTime/index.js'
import noData from '../../components/noData.vue'
export default { export default {
data() { data() {
return { return {
dataList: [ dataList: [
{ // {
title: "中和停车区下行停水", // title: "",
time: "2023-09-26 13:30:38", // time: "2023-09-26 13:30:38",
area: "昭通片区管理补",// // area: "",//
service: "中和加油站-上行",// // service: "-",//
eventType: "事件类型1",// // eventType: "1",//
person: "徐琴",// // person: "",//
phone: "13408871099",// // phone: "13408871099",//
theInjured: "",// // theInjured: "",//
haveTime: "待定",// // haveTime: "",//
diePerson: "0",// // diePerson: "0",//
desc: "水泵房故障,导致停水,急需处理",// // desc: "",//
lossDesc: "因突发情况 卫生间卫生无法保障",// // lossDesc: " ",//
res: "已联系施工方,未处理",// // res: "",//
imgList: [{ url: "https://eshangtech.com/cyy_DIB/1695785143848.jpg" }],// // imgList: [{ url: "https://eshangtech.com/cyy_DIB/1695785143848.jpg" }],//
status: 1, // status: 1,
}, // },
{ // {
title: "楼坝服务区停水", // title: "",
time: "2023-08-02 13:57:27", // time: "2023-08-02 13:57:27",
area: "昭通片区管理补",// // area: "",//
service: "楼坝服务区-下行",// // service: "-",//
eventType: "事件类型1",// // eventType: "1",//
person: "孔令婷",// // person: "",//
phone: "19987196597",// // phone: "19987196597",//
theInjured: "",// // theInjured: "",//
haveTime: "7小时",// // haveTime: "7",//
diePerson: "0",// // diePerson: "0",//
desc: "楼坝街道主水管道被路面改造施工的挖机挖断目前正在抢修中预计7小时后可正常供水服务区现用水箱里的储水进行供水。",// // desc: "7",//
lossDesc: "无",// // lossDesc: "",//
res: "正在进行抢修预计7小时后可正常供水服务区现用水箱里的储水进行供水。",// // res: "7",//
imgList: null,// // imgList: null,//
status: 2, // status: 2,
} // status 1 2 // } // status 1 2
], ],
everyDayList: [ everyDayList: [
{ // {
area: "版纳片区管理部", // // area: "", //
service: "小勐养服务区-上行", // // service: "-", //
time: "2024-09-12 09:14:47", // time: "2024-09-12 09:14:47",
type: "其他", // // type: "", //
desc: "小勐养服务区上行卫生间5号蹲坑隔板底座损坏已修复。",// // desc: "5",//
person: "杨杰",// // person: "",//
phone: "13628710377",// // phone: "13628710377",//
startRes: "修复完毕,建议结束流程",// // startRes: "",//
startPerson: "刀天华",// // startPerson: "",//
startTime: "2024-09-12 09:43:53",// // startTime: "2024-09-12 09:43:53",//
endRes: "",// // endRes: "",//
endPerson: "",// // endPerson: "",//
endTime: "流转后自动显示",// // endTime: "",//
imgList: [ // imgList: [
{ url: "https://eshangtech.com/cyy_DIB/1726104387683_mmexport1726104287279.jpg" }, // { url: "https://eshangtech.com/cyy_DIB/1726104387683_mmexport1726104287279.jpg" },
{ url: "https://eshangtech.com/cyy_DIB/1726104504808_IMG_20240912_091809.jpg" } // { url: "https://eshangtech.com/cyy_DIB/1726104504808_IMG_20240912_091809.jpg" }
],// // ],//
status: 1, // status: 1,
}, // },
{ // {
area: "昆东片区管理部", // // area: "", //
service: "阳宗服务区-上行", // // service: "-", //
time: "2024-08-08 13:45:25", // time: "2024-08-08 13:45:25",
type: "维修上报", // // type: "", //
desc: "关于昆东片区管理部阳宗服务区上行更换入口车辆引导标识牌的请示",// // desc: "",//
person: "唐林波",// // person: "",//
phone: "15287959258",// // phone: "15287959258",//
startRes: "按照公司相关流程进行更换标识牌审批事宜",// // startRes: "",//
startPerson: "申锐娟",// // startPerson: "",//
startTime: "流转后自动显示",// // startTime: "",//
endRes: "",// // endRes: "",//
endPerson: "",// // endPerson: "",//
endTime: "流转后自动显示",// // endTime: "",//
imgList: null,// // imgList: null,//
status: 2, // status: 2,
} // }
], ],
showList: [], showList: [],
eventsDetail: null, eventsDetail: null,
type: 0 type: 0,
serviceInfo: {},
isLoading: false
} }
}, },
components: {
noData
},
onLoad(query) { onLoad(query) {
if (query.type) { if (query.type) {
this.type = Number(query.type) this.type = Number(query.type)
@ -320,8 +327,81 @@ export default {
}) })
} }
} }
let currentService = uni.getStorageSync('currentService')
this.serviceInfo = currentService
this.handleGetData()
}, },
methods: { methods: {
//
async handleGetData() {
let data = []
uni.showLoading({
title: "加载中..."
})
this.isLoading = true
if (this.type === 1) {
this.showList = []
const req = {
bsessionKey: "EA65F66FA29B47FD8072A4AFC66967B3",
saName: this.serviceInfo.SERVERPART_NAME
}
const data = await new Promise((resolve, reject) => {
uni.request({
url: "https://fwqznxj.yciccloud.com:9081/ynjt/pushManage/queryEmergency",
method: "POST",
data: req,
header: {
"content-type": "application/x-www-form-urlencoded",
},
success(res) {
resolve(res.data.data)
},
});
});
let list = data
if (list && list.length > 0) {
list.forEach((item) => {
item.imgUp = item.imgUp ? JSON.parse(item.imgUp) : ""
item.createTime = formatTime(item.createTime)
})
}
this.showList = list
} else {
this.showList = []
const req = {
bsessionKey: "0DAF3A5982D54A619D4B63A34CA20C55",
saName: this.serviceInfo.SERVERPART_NAME
}
const data = await new Promise((resolve, reject) => {
uni.request({
url: "https://fwqznxj.yciccloud.com:9081/ynjt/pushManage/queryQuestions",
method: "POST",
data: req,
header: {
"content-type": "application/x-www-form-urlencoded",
},
success(res) {
resolve(res.data.data)
},
});
});
let list = data
if (list && list.length > 0) {
list.forEach((item) => {
item.fileUp = item.fileUp ? JSON.parse(item.fileUp) : ""
item.createTime = item.createTime ? formatTime(item.createTime) : ""
item.coorEndTime = item.coorEndTime ? formatTime(item.coorEndTime) : ""
})
}
this.showList = data
}
console.log('this.showListthis.showListthis.showListthis.showList', this.showList);
uni.hideLoading()
this.isLoading = false
},
handleShowDetail(obj) { handleShowDetail(obj) {
// this.$refs.popup.open('center') // this.$refs.popup.open('center')
// this.eventsDetail = obj // this.eventsDetail = obj
@ -410,6 +490,13 @@ export default {
.emergencyList { .emergencyList {
padding: 30rpx; padding: 30rpx;
.noDataBox{
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.emergencyItem { .emergencyItem {
width: 100%; width: 100%;

View File

@ -5,15 +5,14 @@
<view class="userDetailBox" :style="{ marginTop: pageType === 1 ? '' : '0' }"> <view class="userDetailBox" :style="{ marginTop: pageType === 1 ? '' : '0' }">
<view class="userDetailBoxTop"> <view class="userDetailBoxTop">
<view class="userDetailBoxService">{{ detailObj.service || "" }}</view> <view class="userDetailBoxService">{{ detailObj.saName || "" }}</view>
<view class="userDetailBoxServiceRight"> <view class="userDetailBoxServiceRight">
<view class="userDetailBoxStatus" :style="{ <view class="userDetailBoxStatus" :style="{
background: detailObj.status === 1 ? '#ecbd44' : detailObj.status === 2 ? '#d3d3d3' : '', background: detailObj.state === '完成' ? '#ecbd44' : detailObj.state === '处理中' ? '#d3d3d3' : '',
color: detailObj.status === 1 ? '#fff' : detailObj.status === 2 ? '#fff' : '' color: detailObj.state === '完成' ? '#fff' : detailObj.state === '处理中' ? '#fff' : ''
}"> }">
{{ detailObj.status === 1 ? '已完成' : detailObj.status === {{ detailObj.state }}</view>
2 ? '处理中' : '' }}</view>
</view> </view>
</view> </view>
@ -22,7 +21,7 @@
<image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/personIcon.png" /> <image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/personIcon.png" />
<view class="eventsHaveLabel">联系人</view> <view class="eventsHaveLabel">联系人</view>
</view> </view>
<view class="eventsValue">{{ detailObj.person || "" }}</view> <view class="eventsValue">{{ detailObj.userName || detailObj.createUserName || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsHaveImgLabel"> <view class="eventsHaveImgLabel">
@ -34,9 +33,10 @@
<view class="eventsItem" style="margin-bottom: 0;"> <view class="eventsItem" style="margin-bottom: 0;">
<view class="eventsHaveImgLabel"> <view class="eventsHaveImgLabel">
<image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/timeIcon.png" /> <image class="eventsHaveImg" src="https://eshangtech.com/cyy_DIB/timeIcon.png" />
<view class="eventsHaveLabel">处理用时</view> <view class="eventsHaveLabel">{{ pageType === 1 ? '处理用时:' : pageType === 2 ? '创建时间' : '' }}
</view>
</view> </view>
<view class="eventsValue">{{ detailObj.haveTime || "" }}</view> <view class="eventsValue">{{ detailObj.handlingTime || detailObj.createTime || "" }}</view>
</view> </view>
</view> </view>
@ -53,7 +53,7 @@
</view> --> </view> -->
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">事件片区</view> <view class="eventsLabel">事件片区</view>
<view class="eventsValue">{{ detailObj.area || "" }}</view> <view class="eventsValue">{{ detailObj.belongArea || "" }}</view>
</view> </view>
<!-- <view class="eventsItem"> <!-- <view class="eventsItem">
<view class="eventsLabel">事件服务区</view> <view class="eventsLabel">事件服务区</view>
@ -66,22 +66,23 @@
</view> --> </view> -->
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">事件概况</view> <view class="eventsLabel">事件概况</view>
<view class="eventsValue">{{ detailObj.desc || "" }}</view> <view class="eventsValue">{{ detailObj.sceneOverview || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">事件损失情况</view> <view class="eventsLabel">事件损失情况</view>
<view class="eventsValue">{{ detailObj.lossDesc || "" }}</view> <view class="eventsValue">{{ detailObj.lossSituation || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">处理结果</view> <view class="eventsLabel">处理结果</view>
<view class="eventsValue">{{ detailObj.res || "" }}</view> <view class="eventsValue">{{ detailObj.handlingResult || "" }}</view>
</view> </view>
<view class="eventsItemPic"> <view class="eventsItemPic">
<view class="eventsLabel">事件现场照片</view> <view class="eventsLabel">事件现场照片</view>
<view class="eventsPic" v-if="detailObj.imgList && detailObj.imgList.length > 0"> <view class="eventsPic" v-if="detailObj.imgUp && detailObj.imgUp.length > 0">
<view class="eventsPicItem" v-for="(item, index) in detailObj.imgList" :key="index" <view class="eventsPicItem" v-for="(item, index) in detailObj.imgUp" :key="index"
@click="showImg(detailObj.imgList, index)"> @click="showImg(detailObj.imgUp, index)">
<image class="eventsPicImg" :src="item.url" /> <image class="eventsPicImg"
:src="'https://fwqznxj.yciccloud.com:9081/fileDownloadApi/bsys/document/docDownloadAction?fileId=' + item.fileID" />
</view> </view>
</view> </view>
@ -93,7 +94,7 @@
<view class="userDetailBox noBoxShow"> <view class="userDetailBox noBoxShow">
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">事件片区</view> <view class="eventsLabel">事件片区</view>
<view class="eventsValue">{{ detailObj.area || "" }}</view> <view class="eventsValue">{{ detailObj.belongArea || "" }}</view>
</view> </view>
<!-- <view class="eventsItem"> <!-- <view class="eventsItem">
<view class="eventsLabel">事件服务区</view> <view class="eventsLabel">事件服务区</view>
@ -105,7 +106,7 @@
</view> </view>
<view class="eventsItem" style="margin-bottom: 0;"> <view class="eventsItem" style="margin-bottom: 0;">
<view class="eventsLabel">问题描述</view> <view class="eventsLabel">问题描述</view>
<view class="eventsValue">{{ detailObj.desc || "" }}</view> <view class="eventsValue">{{ detailObj.describe || "" }}</view>
</view> </view>
</view> </view>
@ -116,15 +117,15 @@
<view class="detailBox" v-if="pageType === 2" style="padding-bottom: 24rpx;"> <view class="detailBox" v-if="pageType === 2" style="padding-bottom: 24rpx;">
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">协调处理结果</view> <view class="eventsLabel">协调处理结果</view>
<view class="eventsValue">{{ detailObj.startRes || "" }}</view> <view class="eventsValue">{{ detailObj.coorResult || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理人</view> <view class="eventsLabel">办理人</view>
<view class="eventsValue">{{ detailObj.startPerson || "" }}</view> <view class="eventsValue">{{ detailObj.coorUserName || "" }}</view>
</view> </view>
<view class="eventsItem" style="margin-bottom: 0;"> <view class="eventsItem" style="margin-bottom: 0;">
<view class="eventsLabel">办理完成时间</view> <view class="eventsLabel">办理完成时间</view>
<view class="eventsValue">{{ detailObj.startTime || "" }}</view> <view class="eventsValue">{{ detailObj.coorEndTime || "" }}</view>
</view> </view>
</view> </view>
@ -133,29 +134,28 @@
<view class="detailBox" v-if="pageType === 2" style="padding-bottom: 24rpx;"> <view class="detailBox" v-if="pageType === 2" style="padding-bottom: 24rpx;">
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">协调处理结果</view> <view class="eventsLabel">协调处理结果</view>
<view class="eventsPic">{{ detailObj.endRes || "" }}</view> <view class="eventsPic">{{ detailObj.companyResult || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理人</view> <view class="eventsLabel">办理人</view>
<view class="eventsValue">{{ detailObj.endPerson || "" }}</view> <view class="eventsValue">{{ detailObj.companyUserName || "" }}</view>
</view> </view>
<view class="eventsItem"> <view class="eventsItem">
<view class="eventsLabel">办理完成时间</view> <view class="eventsLabel">办理完成时间</view>
<view class="eventsValue">{{ detailObj.endTime || "" }}</view> <view class="eventsValue">{{ detailObj.companyEndTime || "" }}</view>
</view> </view>
<view class="eventsItemPic" style="margin-bottom: 0;"> <view class="eventsItemPic" style="margin-bottom: 0;">
<view class="eventsLabel">事件现场照片</view> <view class="eventsLabel">事件现场照片</view>
<view class="eventsPic" v-if="detailObj.imgList && detailObj.imgList.length > 0"> <view class="eventsPic" v-if="detailObj.fileUp && detailObj.fileUp.length > 0">
<view class="eventsPicItem" v-for="(item, index) in detailObj.imgList" :key="index" <view class="eventsPicItem" v-for="(item, index) in detailObj.fileUp" :key="index"
@click="showImg(detailObj.imgList, index)"> @click="showImg(detailObj.fileUp, index)">
<image class="eventsPicImg" :src="item.url" /> <image class="eventsPicImg"
:src="'https://fwqznxj.yciccloud.com:9081/fileDownloadApi/bsys/document/docDownloadAction?fileId=' + item.fileID" />
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
@ -170,6 +170,8 @@ export default {
if (query.detail) { if (query.detail) {
this.detailObj = JSON.parse(query.detail) this.detailObj = JSON.parse(query.detail)
} }
console.log('this.detailObjthis.detailObjthis.detailObjthis.detailObj', this.detailObj);
if (query.type) { if (query.type) {
this.pageType = Number(query.type) this.pageType = Number(query.type)
} }
@ -191,14 +193,14 @@ export default {
console.log('indexindex', index); console.log('indexindex', index);
let urls = [] let urls = []
list.forEach((item) => { list.forEach((item) => {
urls.push(item.url) urls.push('https://fwqznxj.yciccloud.com:9081/fileDownloadApi/bsys/document/docDownloadAction?fileId=' + item.fileID)
}) })
uni.previewImage({ uni.previewImage({
urls: urls, urls: urls,
current: list[index].url, current: urls[index],
}); });
}, }
} }
} }
</script> </script>

View File

@ -67,24 +67,6 @@
<uni-calendar ref="calendar" class="selectDateCalendar" :clear-date="true" :date="selectDate" :insert="false" <uni-calendar ref="calendar" class="selectDateCalendar" :clear-date="true" :date="selectDate" :insert="false"
:startDate="info.startDate" :range="info.range" @confirm="handleChangeTime" /> :startDate="info.startDate" :range="info.range" @confirm="handleChangeTime" />
<!-- 人员类型的tab -->
<view class="personTabBox">
<view :class="selectTab === 1 ? 'personItem personItemSelect' : 'personItem '" @click="handleChangeTab(1)">
<view class="personValue">3</view>
<view class="personLabel">在岗人员</view>
</view>
<view :class="selectTab === 2 ? 'personItem personItemSelect' : 'personItem '" @click="handleChangeTab(2)">
<view class="personValue">4</view>
<view class="personLabel">请假人员</view>
</view>
<!-- <view :class="selectTab === 3 ? 'personItem personItemSelect' : 'personItem '" @click="handleChangeTab(3)">
<view class="personValue">1</view>
<view class="personLabel">值班经理</view>
</view> -->
</view>
<view class="thingBox"> <view class="thingBox">
<!-- 特情事件提醒横幅 --> <!-- 特情事件提醒横幅 -->
@ -92,7 +74,7 @@
<view class="emergency-header"> <view class="emergency-header">
<view class="emergency-title"> <view class="emergency-title">
<text>🚨 应急事件</text> <text>🚨 应急事件</text>
<view class="emergency-count">{{ 2 }}</view> <!-- <view class="emergency-count">{{ 2 }}</view> -->
</view> </view>
<!-- <text>👉</text> --> <!-- <text>👉</text> -->
</view> </view>
@ -103,21 +85,40 @@
<view class="emergency-header"> <view class="emergency-header">
<view class="emergency-title"> <view class="emergency-title">
<text> 日常问题</text> <text> 日常问题</text>
<view class="emergency-count">{{ 2 }}</view> <!-- <view class="emergency-count">{{ 2 }}</view> -->
</view> </view>
<!-- <text>👉</text> --> <!-- <text>👉</text> -->
</view> </view>
</view> </view>
</view> </view>
<!-- 人员类型的tab -->
<view class="personTabBox">
<view :class="selectTab === 1 ? 'personItem personItemSelect' : 'personItem '" @click="handleChangeTab(1)">
<view class="personValue">{{ onDutyPersonList && onDutyPersonList.length > 0 ? onDutyPersonList.length :
0 }}
</view>
<view class="personLabel">在岗人员</view>
</view>
<view :class="selectTab === 2 ? 'personItem personItemSelect' : 'personItem '" @click="handleChangeTab(2)">
<view class="personValue">{{ EmployeesOnLeaveList && EmployeesOnLeaveList.length > 0 ?
EmployeesOnLeaveList.length : 0 }}</view>
<view class="personLabel">请假人员</view>
</view>
<!-- <view :class="selectTab === 3 ? 'personItem personItemSelect' : 'personItem '" @click="handleChangeTab(3)">
<view class="personValue">1</view>
<view class="personLabel">值班经理</view>
</view> -->
</view>
<!-- 在岗人员 --> <!-- 在岗人员 -->
<view class="onDutyPersonBox"> <view class="onDutyPersonBox">
<view class="onDutyPersonBoxHeader"> <view class="onDutyPersonBoxHeader">
<text class="title">{{ selectTab === 1 ? "👥 当前在岗人员" : selectTab === 2 ? "📋 请假人员列表" : selectTab === 3 <text class="title">{{ selectTab === 1 ? "👥 当前在岗人员" : selectTab === 2 ? "📋 请假人员列表" : selectTab === 3
? "👑 值班经理信息" : "" ? "👑 值班经理信息" : ""
}}</text> }}</text>
<!-- 居中的日历时间 --> <!-- 居中的日历时间 -->
@ -144,17 +145,16 @@
<view class="onDutyPersonList" v-if="selectTab === 1"> <view class="onDutyPersonList" v-if="selectTab === 1">
<view class="onDutyPersonItem" v-for="(item, index) in onDutyPersonList" :key="index" <view class="onDutyPersonItem" v-for="(item, index) in onDutyPersonList" :key="index"
@click="viewStaffDetails(item)"> @click="viewStaffDetails(item)">
<view class="avatar">{{ item.name ? item.name.slice(0, 1) : "" }}</view> <view class="avatar">{{ item.userName ? item.userName.slice(0, 1) : "" }}</view>
<view class="staffInfo"> <view class="staffInfo">
<view class="staffInfoLeft"> <view class="staffInfoLeft">
<view class="staffInfoTop"> <view class="staffInfoTop">
<view class="staff-name">{{ item.name || "" }}</view> <view class="staff-name">{{ item.userName || "" }}</view>
<view class="staff-role">{{ item.post || "" }}</view> <view class="staff-role" v-if="item.userJob">{{ item.userJob }}</view>
</view> </view>
<view class="staff-status"> <view class="staff-status">
<view class="status-badge status-online" v-if="item.status === 1">在岗</view> <view class="status-badge status-online" v-if="item.workType">{{ item.workType }}
<view class="status-badge status-absentee" v-if="item.status === 5">旷工</view> </view>
<view class="status-badge status-beLate" v-if="item.status === 6">迟到</view>
</view> </view>
</view> </view>
@ -169,17 +169,15 @@
<view class="EmployeesOnLeaveList" v-if="selectTab === 2"> <view class="EmployeesOnLeaveList" v-if="selectTab === 2">
<view class="EmployeesOnLeaveItem" v-for="(item, index) in EmployeesOnLeaveList" :key="index" <view class="EmployeesOnLeaveItem" v-for="(item, index) in EmployeesOnLeaveList" :key="index"
@click="viewStaffDetails(item)"> @click="viewStaffDetails(item)">
<view class="avatar">{{ item.name ? item.name.slice(0, 1) : "" }}</view> <view class="avatar">{{ item.userName ? item.userName.slice(0, 1) : "" }}</view>
<view class="staffInfo"> <view class="staffInfo">
<view class="staffInfoLeft"> <view class="staffInfoLeft">
<view class="staffInfoTop"> <view class="staffInfoTop">
<view class="staff-name">{{ item.name || "" }}</view> <view class="staff-name">{{ item.userName || "" }}</view>
<view class="staff-role">{{ item.post || "" }}</view> <view class="staff-role">{{ item.userJob || "" }}</view>
</view> </view>
<view class="staff-status"> <view class="staff-status">
<view class="status-badge status-rest" v-if="item.status === 2">休息</view> <view class="status-badge status-rest" v-if="item.workType">{{ item.workType }}</view>
<view class="status-badge status-adjust" v-if="item.status === 3">调休</view>
<view class="status-badge status-leave" v-if="item.status === 4">请假</view>
</view> </view>
</view> </view>
@ -200,7 +198,7 @@
<view class="staffInfoLeft"> <view class="staffInfoLeft">
<view class="staffInfoTop"> <view class="staffInfoTop">
<view class="staff-name manager-name">{{ item.name || "" }}</view> <view class="staff-name manager-name">{{ item.name || "" }}</view>
<view class="staff-role manager-role">👑{{ item.post || "" }}</view> <view class="staff-role manager-role">👑{{ item.post || "-" }}</view>
</view> </view>
<view class="staff-status"> <view class="staff-status">
<view class="status-badge status-manager">值班中</view> <view class="status-badge status-manager">值班中</view>
@ -234,20 +232,20 @@
<view class="userDetailBox"> <view class="userDetailBox">
<view class="userAvatar"> <view class="userAvatar">
<image class="userAvatarIcon" v-if="userDetail.url" :src="userDetail.url" /> <image class="userAvatarIcon" v-if="userDetail.url" :src="userDetail.url" />
<view class="userAvatarBox">{{ userDetail.name ? userDetail.name.slice(0, 1) : "" }}</view> <view class="userAvatarBox">{{ userDetail.userName ? userDetail.userName.slice(0, 1) : "" }}
</view>
</view> </view>
<view class="userDetailRight"> <view class="userDetailRight">
<view class="userDetailTop"> <view class="userDetailTop">
<view class="userDetailName">{{ userDetail.name || "" }}</view> <view class="userDetailName">{{ userDetail.userName || "" }}</view>
<view class="userDetailStatus" v-if="userDetail.status" :style="{ <view class="userDetailStatus" v-if="userDetail.workType" :style="{
background: userDetail.status === 1 ? '#27B25F' : '', background: userDetail.workType === '班' || userDetail.workType === '差' || userDetail.workType === '出' ? '#27B25F' : '#F6F6F6',
color: userDetail.status === 1 ? '#fff' : '', color: userDetail.workType === '班' || userDetail.workType === '差' || userDetail.workType === '出' ? '#fff' : '#9FA6A3',
}">{{ userDetail.status === 1 ? '在岗' : }">{{ userDetail.workType }}</view>
"" }}</view>
</view> </view>
<view class="userDetailPostBox"> <view class="userDetailPostBox">
<span class="userDetailLabel">岗位</span> <span class="userDetailLabel">岗位</span>
<span class="userDetailValue">{{ userDetail.post || "" }}</span> <span class="userDetailValue">{{ userDetail.userJob || "-" }}</span>
</view> </view>
<view class="userDetailPhoneBox"> <view class="userDetailPhoneBox">
<span class="userDetailLabel">电话</span> <span class="userDetailLabel">电话</span>
@ -261,38 +259,37 @@
<view class="attendanceStatusBox"> <view class="attendanceStatusBox">
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">当前排班信息</view> <view class="attendanceStatusLabel">当前排班信息</view>
<view class="attendanceStatusValue">{{ userDetail.status === 1 ? '班' : userDetail.status === 2 ? <view class="attendanceStatusValue" v-if="userDetail.workType">{{ userDetail.workType }}</view>
'休' : '' }}</view>
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">上班打卡地</view> <view class="attendanceStatusLabel">上班打卡地</view>
<view class="attendanceStatusValue">{{ userDetail.dutyPlace || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.dutyClockInPlace || "" }}</view>
<!-- dutyPlace --> <!-- dutyClockInPlace -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">上班打卡时间</view> <view class="attendanceStatusLabel">上班打卡时间</view>
<view class="attendanceStatusValue">{{ userDetail.dutyTime || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.dutyClockInTime || "" }}</view>
<!-- dutyTime --> <!-- dutyClockInTime -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">迟到时长</view> <view class="attendanceStatusLabel">迟到时长</view>
<view class="attendanceStatusValue">{{ userDetail.toLateTime || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.lateNum || "" }}</view>
<!-- toLateTime --> <!-- lateNum -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">下班打卡地</view> <view class="attendanceStatusLabel">下班打卡地</view>
<view class="attendanceStatusValue">{{ userDetail.offWorkPlace || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.offDutyClockInPlace || "" }}</view>
<!-- offWorkPlace --> <!-- offDutyClockInPlace -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">下班打卡时间</view> <view class="attendanceStatusLabel">下班打卡时间</view>
<view class="attendanceStatusValue">{{ userDetail.offWorkTime || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.offDutyClockInTime || "" }}</view>
<!-- offWorkTime --> <!-- offDutyClockInTime -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">早退时长</view> <view class="attendanceStatusLabel">早退时长</view>
<view class="attendanceStatusValue">{{ userDetail.earlyWorkTime || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.earlyNum || "" }}</view>
<!-- earlyWorkTime --> <!-- earlyNum -->
</view> </view>
</view> </view>
<view class="line"></view> <view class="line"></view>
@ -302,28 +299,28 @@
<view class="attendanceStatusBox"> <view class="attendanceStatusBox">
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">当月排班天数</view> <view class="attendanceStatusLabel">当月排班天数</view>
<view class="attendanceStatusValue">{{ userDetail.monthDay || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.scheduleTotal || "" }}</view>
<!-- monthDay --> <!-- scheduleTotal -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">出勤天数</view> <view class="attendanceStatusLabel">出勤天数</view>
<view class="attendanceStatusValue">{{ userDetail.AttendanceDay || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.attendTotal || "" }}</view>
<!-- AttendanceDay --> <!-- attendTotal -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">休息天数</view> <view class="attendanceStatusLabel">休息天数</view>
<view class="attendanceStatusValue">{{ userDetail.leaveDay || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.restTotal || "" }}</view>
<!-- leaveDay --> <!-- restTotal -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">迟到天数</view> <view class="attendanceStatusLabel">迟到天数</view>
<view class="attendanceStatusValue">{{ userDetail.beLateDay || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.lateTotal || "" }}</view>
<!-- beLateDay --> <!-- lateTotal -->
</view> </view>
<view class="attendanceStatusItem"> <view class="attendanceStatusItem">
<view class="attendanceStatusLabel">早退天数</view> <view class="attendanceStatusLabel">早退天数</view>
<view class="attendanceStatusValue">{{ userDetail.leaveEarlyDay || "" }}</view> <view class="attendanceStatusValue">{{ userDetail.earlyTotal || "" }}</view>
<!-- leaveEarlyDay --> <!-- earlyTotal -->
</view> </view>
</view> </view>
@ -334,6 +331,7 @@
<script> <script>
import request from "@/util/index.js"; import request from "@/util/index.js";
import { formatTime } from '@/util/dateTime/index.js'
export default { export default {
data() { data() {
const nowDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD') // const nowDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD') //
@ -346,166 +344,224 @@ export default {
}, },
selectTab: 1, selectTab: 1,
onDutyPersonList: [ onDutyPersonList: [
{ // {
name: "曹鑫", // name: "",
post: "三级驻站经理", // post: "",
status: 1, // status: 1,
phone: "13987822022", // phone: "13987822022",
service: "达连坝停车区-下行", // service: "-",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "2025-08-14 07:26",// // dutyTime: "2025-08-14 07:26",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "10",// // AttendanceDay: "10",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "1",// 退 // leaveEarlyDay: "1",// 退
}, // },
{ // {
name: "陈艳雄", // name: "",
post: "安全管理岗", // post: "",
status: 1, // status: 1,
phone: "18787834836", // phone: "18787834836",
service: "昆西片区管理部", // service: "西",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "",// // dutyTime: "",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "0",// // AttendanceDay: "0",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "",// 退 // leaveEarlyDay: "",// 退
}, // },
{ // {
name: "陈芝丽", // name: "",
post: "三级驻站经理", // post: "",
status: 1, // status: 1,
phone: "15887779180", // phone: "15887779180",
service: "猫街停车区-下行", // service: "-",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "2025-08-14 07:11",// // dutyTime: "2025-08-14 07:11",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "11",// // AttendanceDay: "11",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "1",// 退 // leaveEarlyDay: "1",// 退
} // }
],// 1 2 3 4 5 6 ],// 1 2 3 4 5 6
EmployeesOnLeaveList: [ EmployeesOnLeaveList: [
{ // {
name: "高金平", // name: "",
post: "三级驻站经理", // post: "",
status: 2, // status: 2,
phone: "17787888023", // phone: "17787888023",
service: "大姚服务区-下行", // service: "-",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "",// // dutyTime: "",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "9",// // AttendanceDay: "9",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "",// 退 // leaveEarlyDay: "",// 退
}, // },
{ // {
name: "雷自云", // name: "",
post: "三级驻站经理", // post: "",
status: 2, // status: 2,
phone: "15825167023", // phone: "15825167023",
service: "永仁停车区-下行", // service: "-",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "",// // dutyTime: "",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "8",// // AttendanceDay: "8",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "1",// 退 // leaveEarlyDay: "1",// 退
}, // },
{ // {
name: "刘凯峰", // name: "",
post: "一级驻站副经理", // post: "",
status: 2, // status: 2,
phone: "15198787593", // phone: "15198787593",
service: "恐龙山服务区-上行", // service: "-",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "",// // dutyTime: "",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "9",// // AttendanceDay: "9",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "",// 退 // leaveEarlyDay: "",// 退
}, // },
{ // {
name: "宋永鑫", // name: "",
post: "一级驻站副经理", // post: "",
service: "读书铺服务区-上行", // service: "-",
status: 2, // status: 2,
phone: "13649668882", // phone: "13649668882",
dutyPlace: "", // // dutyPlace: "", //
dutyTime: "",// // dutyTime: "",//
toLateTime: "",// // toLateTime: "",//
offWorkPlace: "",// // offWorkPlace: "",//
offWorkTime: "",// // offWorkTime: "",//
earlyWorkTime: "",// 退 // earlyWorkTime: "",// 退
monthDay: "23",// // monthDay: "23",//
AttendanceDay: "13",// // AttendanceDay: "13",//
leaveDay: "8",// // leaveDay: "8",//
beLateDay: "",// // beLateDay: "",//
leaveEarlyDay: "",// 退 // leaveEarlyDay: "",// 退
} // }
],// ],//
dutyManagerList: [ dutyManagerList: [
{ name: "王五", post: "经理", status: 1, phone: "6666", address: "G56杭瑞高速主干道昆明至滇西方向" }, // { name: "", post: "", status: 1, phone: "6666", address: "G56西" },
],// ],//
jumpItemList: [ jumpItemList: [
// { label: "", value: 1, url: "https://eshangtech.com/cyy_DIB/funIcon1.png" }, // { label: "", value: 1, url: "https://eshangtech.com/cyy_DIB/funIcon1.png" },
{ label: "设施状态", value: 2, url: "https://eshangtech.com/cyy_DIB/funIcon2.png" }, { label: "设施状态", value: 2, url: "https://eshangtech.com/cyy_DIB/funIcon2.png" },
{ label: "考勤统计", value: 3, url: "https://eshangtech.com/cyy_DIB/funIcon3.png" }, { label: "考勤统计", value: 3, url: "https://eshangtech.com/cyy_DIB/funIcon3.png" },
{ label: "请假管理", value: 4, url: "https://eshangtech.com/cyy_DIB/funIcon4.png" },
{ label: "排班表", value: 5, url: "https://eshangtech.com/cyy_DIB/funIcon5.png" }, { label: "排班表", value: 5, url: "https://eshangtech.com/cyy_DIB/funIcon5.png" },
// { label: "", value: 4, url: "https://eshangtech.com/cyy_DIB/funIcon4.png" },
// { label: "", value: 6, url: "https://eshangtech.com/cyy_DIB/funIcon6.png" }, // { label: "", value: 6, url: "https://eshangtech.com/cyy_DIB/funIcon6.png" },
], ],
showPopup: false, showPopup: false,
userDetail: null userDetail: null,
isFirst: true
}; };
}, },
onLoad() { onLoad() {
this.menu = uni.getMenuButtonBoundingClientRect() this.menu = uni.getMenuButtonBoundingClientRect()
let currentService = uni.getStorageSync('currentService') let currentService = uni.getStorageSync('currentService')
this.handleGetServerpartDetail(currentService.Serverpart_ID || currentService.SERVERPART_ID) this.handleGetServerpartDetail(currentService.Serverpart_ID || currentService.SERVERPART_ID)
this.handleGetCurrentServiceAttendanceData(currentService.SERVERPART_NAME)
}, },
onShow() { onShow() {
let currentService = uni.getStorageSync('currentService') let currentService = uni.getStorageSync('currentService')
console.log('currentService', currentService); console.log('currentService', currentService);
if (currentService.Serverpart_ID !== this.serviceInfo.SERVERPART_ID) { if (currentService.Serverpart_ID !== this.serviceInfo.SERVERPART_ID && !this.isFirst) {
this.handleGetServerpartDetail(currentService.Serverpart_ID) this.handleGetServerpartDetail(currentService.Serverpart_ID)
this.handleGetCurrentServiceAttendanceData(currentService.SERVERPART_NAME)
} else {
this.isFirst = false
} }
}, },
methods: { methods: {
//
async handleGetCurrentServiceAttendanceData(SERVERPART_NAME) {
let req = {
bsessionKey: "0B30475A94674D608022885F7763959B",
workTime: new Date(this.selectDate).getTime(),
saName: SERVERPART_NAME || "",//
phone: "",//
}
uni.showLoading({
title: "加载中..."
})
const data = await new Promise((resolve, reject) => {
uni.request({
url: "https://fwqznxj.yciccloud.com:9081/ynjt/pushManage/queryUserSchedule",
method: "POST",
data: req,
header: {
"content-type": "application/x-www-form-urlencoded",
},
success(res) {
resolve(res.data.data)
},
});
});
uni.hideLoading()
this.onDutyPersonList = []
this.EmployeesOnLeaveList = []
//
let list = data
console.log("listlistlistlistlistlistlistlist", list);
//
let workPersonList = []
//
let leaveList = []
if (list && list.length > 0) {
list.forEach((item) => {
item.dutyClockInTime = item.dutyClockInTime ? formatTime(item.dutyClockInTime) : ""
item.offDutyClockInTime = item.offDutyClockInTime ? formatTime(item.offDutyClockInTime) : ""
if (item.workType === '班' || item.workType === '差' || item.workType === '出') {
workPersonList.push(item)
} else {
leaveList.push(item)
}
})
}
this.onDutyPersonList = workPersonList
this.EmployeesOnLeaveList = leaveList
},
// //
handleChangeDate(type) { async handleChangeDate(type) {
// type 1 2 // type 1 2
// iOS 2025-08-15 2025/08/15 // iOS 2025-08-15 2025/08/15
const date = new Date(this.selectDate.replace(/-/g, "/")); const date = new Date(this.selectDate.replace(/-/g, "/"));
@ -521,6 +577,9 @@ export default {
const day = String(date.getDate()).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0");
this.selectDate = `${year}-${month}-${day}`; this.selectDate = `${year}-${month}-${day}`;
console.log('serviceInfo', this.serviceInfo);
await this.handleGetCurrentServiceAttendanceData(this.serviceInfo.SERVERPART_NAME)
}, },
// //
async handleGetServerpartDetail(id) { async handleGetServerpartDetail(id) {
@ -612,7 +671,12 @@ export default {
} else if (value === 2) { } else if (value === 2) {
// this.$util.toNextRoute("navigateTo", `/pages/attendanceStatus/serviceFacility`); // this.$util.toNextRoute("navigateTo", `/pages/attendanceStatus/serviceFacility`);
this.$util.toNextRoute('navigateTo', `/pages/summaryOfPortraits/index?index=0`) this.$util.toNextRoute('navigateTo', `/pages/summaryOfPortraits/index?index=0`)
} else if (value === 3) {
this.$util.toNextRoute('navigateTo', `/pages/attendanceStatus/attendanceStatistics`)
} }
// else if (value === 5) {
// this.$util.toNextRoute('navigateTo', `/pages/attendanceStatus/roster`)
// }
}, },
// //
viewStaffDetails(obj) { viewStaffDetails(obj) {
@ -621,7 +685,6 @@ export default {
} }
}, },
onUnload() { onUnload() {
} }

View File

@ -0,0 +1,345 @@
<!-- 排班表 -->
<template>
<view class="main" :style="{ paddingTop: (menu.bottom + 28) + 'px' }">
<view class="summaryTab" :style="{ height: (menu.bottom + 14) + 'px' }">
<view class="leftArrow" :style="{ top: (menu.top + ((menu.height - 24) / 2)) + 'px' }">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"
@click="handleBack"></image>
<view class="picker" :style="{ top: (menu.bottom + 24) + 'px' }" @click="handleChangeService">
<view class="selectService">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
<view class="select">
<view class="content">
<view class="uni-input">{{ serviceInfo.SERVERPART_NAME ? serviceInfo.SERVERPART_NAME :
'' }}
</view>
<image class="rightArrow"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="rosterContent">
<view class="rosterContentTop">
<view>
<picker>
{{ selectPerson || "-" }}
</picker>
</view>
<!-- 居中的日历时间 -->
<!-- <view class="dateBox">
<view class="centerDateBox">
<image class="arrowIcon" src="https://eshangtech.com/cyy_DIB/leftArrowIcon.png"
@click="handleChangeDate(2)" />
<view class="center">
<text class="date-text">{{ selectDate ? $util.cutDate(new Date(selectDate), 'YYYY-MM') : ""
}}</text>
</view>
<image class="arrowIcon" src="https://eshangtech.com/cyy_DIB/rightArrowIcon.png"
@click="handleChangeDate(1)" />
</view>
</view> -->
</view>
<view class="calendarBpx">
<uni-calendar ref="calendar" class="selectDateCalendar" :insert="true" :startDate="info.startDate"
:selected="selectedList" />
</view>
</view>
</view>
</template>
<script>
export default {
data() {
const nowDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD') //
return {
menu: {},
serviceInfo: {},
selectDate: nowDay,//
selectPerson: "张三",
selectedList: [
{
date: '2025-08-11',
info: "班",
},
{
date: '2025-08-12',
info: "班",
color: "#000"
},
{
date: '2025-08-13',
info: "班",
},
{
date: '2025-08-14',
info: "班",
},
{
date: '2025-08-15',
info: "班"
},
{
date: '2025-08-16',
info: "休",
},
{
date: '2025-08-17',
info: "休",
},
{
date: '2025-08-18',
info: "班",
}
]
}
},
onLoad() {
this.menu = uni.getMenuButtonBoundingClientRect()
let currentService = uni.getStorageSync('currentService')
this.serviceInfo = currentService
},
methods: {
//
async handleChangeDate(type) {
// type 1 2
// iOS 2025-08-15 2025/08/15
const cur = new Date((this.selectDate || '').replace(/-/g, '/'));
if (Number.isNaN(cur.getTime())) return;
// 12
const delta = type === 1 ? 1 : (type === 2 ? -1 : 0);
// new Date(, +1, 0)
const last = new Date(cur.getFullYear(), cur.getMonth() + delta + 1, 0);
const y = last.getFullYear();
const m = String(last.getMonth() + 1).padStart(2, '0');
const d = String(last.getDate()).padStart(2, '0');
this.selectDate = `${y}-${m}-${d}`;
},
}
}
</script>
<style lang="less" scoped>
@bg: #f8f9fa;
@muted: #666;
@card: #fff;
@shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
@primary: #27B25F;
@primary2: #4CCC7F;
@ok: #2ed573;
@warn: #ff9f43;
@danger: #ff4757;
.main {
width: 100vw;
min-height: 100vh;
background-color: #f0f2f3;
box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
padding: 16rpx 32rpx 0;
.summaryTab {
position: fixed;
left: 0;
top: 0;
width: 100vw;
// background: #fff;
background-image: url("https://eshangtech.com/minTestImg/pageBg.png");
z-index: 99;
display: flex;
align-items: center;
box-sizing: border-box;
padding-bottom: 16px;
.leftArrow {
width: 100%;
height: 24px;
position: absolute;
// left: 16px;
z-index: 99999999999;
box-sizing: border-box;
display: flex;
align-items: center;
padding: 0 32rpx;
.img {
width: 24px;
height: 24px;
margin-right: 8px;
z-index: 99;
}
.picker {
.selectService {
display: flex;
align-items: center;
.img {
width: 40px;
height: 40px;
z-index: 2;
}
.select {
height: 32px;
background: #fff;
border-radius: 0 16px 16px 0;
transform: translateX(-40px);
box-sizing: border-box;
padding-left: 35px;
padding-right: 8rpx;
display: flex;
align-items: center;
.content {
display: flex;
align-items: center;
.uni-input {
padding: 0;
background: transparent;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
}
.area {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow {
width: 12px;
height: 12px;
}
.noticeText {
font-size: 24rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #B6BACB;
line-height: 40rpx;
white-space: nowrap;
}
}
}
}
}
}
}
.rosterContent {
width: 100%;
background-color: #fff;
box-sizing: border-box;
padding: 0 24rpx;
border-radius: 8rpx;
.rosterContentTop {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.dateBox {
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
align-items: center;
justify-content: center;
.centerDateBox {
display: flex;
align-items: center;
gap: 10rpx;
padding: 10rpx 20rpx;
border-radius: 30rpx;
background-color: #fff;
// border: 2rpx solid #27B35F;
// background: rgba(255, 255, 255, .15);
.arrowIcon {
width: 40rpx;
height: 40rpx;
}
.center {
.date-text {
font-size: 28rpx;
font-weight: 700;
}
}
}
}
}
.calendarBpx {
/deep/ .uni-calendar-item__weeks-box-item {
width: calc(100% / 7);
.uni-calendar-item__weeks-box-circle {
display: none;
}
}
/deep/ .uni-calendar-item--checked {
background-color: transparent;
color: #000 !important;
opacity: 1 !important;
}
/deep/ .uni-calendar-item--isDay {
background-color: transparent;
color: #000 !important;
opacity: 1 !important;
}
/deep/ .uni-calendar-item--isDay-text {
white-space: nowrap;
color: #000;
}
/deep/ .uni-calendar__backtoday {
display: none;
}
/* === info 文字颜色控制 === */
.selectDateCalendar ::v-deep .uni-calendar__info {
color: #000 !important;
/* 默认黑色 */
}
/* 如果 info 等于“休”,文字改为红色 */
.selectDateCalendar ::v-deep .uni-calendar__info[title="休"],
.selectDateCalendar ::v-deep .uni-calendar__info[data-info="休"] {
color: red !important;
}
}
}
}
</style>

View File

@ -303,14 +303,14 @@
</view> </view>
<view class="funItem" @click="goToRobot"> <!-- <view class="funItem" @click="goToRobot">
<view class="funItemContent"> <view class="funItemContent">
<view class="funIconBox"> <view class="funIconBox">
<image class="funIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/statistics.svg" /> <image class="funIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/statistics.svg" />
</view> </view>
<text class="funText">数智助手</text> <text class="funText">数智助手</text>
</view> </view>
</view> </view> -->
</view> </view>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="36px" height="36px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>图标/失物招领_2</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="切图汇总" transform="translate(-320.000000, -459.000000)">
<g id="图标/失物招领" transform="translate(320.000000, 459.000000)">
<rect id="矩形" x="0" y="0" width="36" height="36"></rect>
<g id="编组-57" transform="translate(2.916667, 3.000000)" stroke="#B8B7B4" stroke-width="1.3">
<path d="M15,0 L15,5 M20.8333333,5.83333333 L24.1666667,2.5 M9.16666667,5.83333333 L5.83333333,2.5 M28.3333333,30 L1.66666667,30 C0.746192084,30 0,29.2538079 0,28.3333333 L0,21.2833333 C0,20.9884858 0.0782133529,20.6989149 0.226666667,20.4441667 L5.35166667,11.6608333 C5.6499609,11.1489661 6.19755834,10.8339231 6.79,10.8333333 L23.2083333,10.8333333 C23.8011993,10.8333333 24.3495289,11.1479395 24.6483333,11.66 L29.7725,20.4441667 C29.9213872,20.6990776 30,20.98896 30,21.2841667 L30,28.3333333 C30,29.2538079 29.2538079,30 28.3333333,30 Z" id="形状"></path>
<path d="M29.5833333,19.8333333 L18.3333333,19.8333333 C18.3333333,19.8333333 17.5,22.3333333 15,22.3333333 C12.5,22.3333333 11.6666667,19.8333333 11.6666667,19.8333333 L0.416666667,19.8333333" id="路径"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,187 +1,189 @@
<template> <template>
<view class="uni-calendar-item__weeks-box" :class="{ <view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable, 'uni-calendar-item--disable': weeks.disable,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, 'uni-calendar-item--isDay': calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate && !weeks.isDay) , 'uni-calendar-item--checked': (calendar.fullDate === weeks.fullDate && !weeks.isDay),
'uni-calendar-item--before-checked':weeks.beforeMultiple, 'uni-calendar-item--before-checked': weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple, 'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple, 'uni-calendar-item--after-checked': weeks.afterMultiple,
}" }" @click="choiceDate(weeks)">
@click="choiceDate(weeks)">
<view class="uni-calendar-item__weeks-box-item"> <view class="uni-calendar-item__weeks-box-item">
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text> <text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
<text class="uni-calendar-item__weeks-box-text" :class="{ <text class="uni-calendar-item__weeks-box-text" :class="{
'uni-calendar-item--isDay-text': weeks.isDay, 'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, 'uni-calendar-item--isDay': calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, 'uni-calendar-item--checked': calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple, 'uni-calendar-item--before-checked': weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple, 'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple, 'uni-calendar-item--after-checked': weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable, 'uni-calendar-item--disable': weeks.disable,
}">{{weeks.date}}</text> }">{{ weeks.date }}</text>
<text v-if="!lunar&&!weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{ <text v-if="!lunar && !weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--isDay-text':weeks.isDay, 'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, 'uni-calendar-item--isDay': calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, 'uni-calendar-item--checked': calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple, 'uni-calendar-item--before-checked': weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple, 'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple, 'uni-calendar-item--after-checked': weeks.afterMultiple,
}">{{todayText}}</text> }">{{ todayText }}</text>
<text v-if="lunar&&!weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{ <text v-if="lunar && !weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--isDay-text':weeks.isDay, 'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, 'uni-calendar-item--isDay': calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, 'uni-calendar-item--checked': calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple, 'uni-calendar-item--before-checked': weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple, 'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple, 'uni-calendar-item--after-checked': weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable, 'uni-calendar-item--disable': weeks.disable,
}">{{weeks.isDay ? todayText : (weeks.lunar.IDayCn === '初一'?weeks.lunar.IMonthCn:weeks.lunar.IDayCn)}}</text> }">{{ weeks.isDay ? todayText : (weeks.lunar.IDayCn === '初一' ? weeks.lunar.IMonthCn : weeks.lunar.IDayCn) }}</text>
<text v-if="weeks.extraInfo&&weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{ <text v-if="weeks.extraInfo && weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--extra':weeks.extraInfo.info, 'uni-calendar-item--extra': weeks.extraInfo.info,
'uni-calendar-item--isDay-text':weeks.isDay, 'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, 'uni-calendar-item--isDay': calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, 'uni-calendar-item--checked': calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple, 'uni-calendar-item--before-checked': weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple, 'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple, 'uni-calendar-item--after-checked': weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable, 'uni-calendar-item--disable': weeks.disable,
}">{{weeks.extraInfo.info}}</text> }" :style="{ color: weeks.extraInfo.info === '休' ? 'red' : '#000' }">{{ weeks.extraInfo.info }}</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { initVueI18n } from '@dcloudio/uni-i18n' import { initVueI18n } from '@dcloudio/uni-i18n'
import i18nMessages from './i18n/index.js' import i18nMessages from './i18n/index.js'
const { t } = initVueI18n(i18nMessages) const { t } = initVueI18n(i18nMessages)
export default { export default {
emits:['change'], emits: ['change'],
props: { props: {
weeks: { weeks: {
type: Object, type: Object,
default () { default() {
return {} return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
} }
}, },
computed: { calendar: {
todayText() { type: Object,
return t("uni-calender.today") default: () => {
}, return {}
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
} }
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
}
},
computed: {
todayText() {
return t("uni-calender.today")
},
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
$uni-font-size-base:14px; $uni-font-size-base: 14px;
$uni-text-color:#333; $uni-text-color: #333;
$uni-font-size-sm:12px; $uni-font-size-sm: 12px;
$uni-color-error: #e43d33; $uni-color-error: #e43d33;
$uni-opacity-disabled: 0.3; $uni-opacity-disabled: 0.3;
$uni-text-color-disable:#c0c0c0; $uni-text-color-disable: #c0c0c0;
$uni-primary: #2979ff !default; $uni-primary: #2979ff !default;
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
}
.uni-calendar-item__weeks-box-text { .uni-calendar-item__weeks-box {
font-size: $uni-font-size-base; flex: 1;
color: $uni-text-color; /* #ifndef APP-NVUE */
} display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
}
.uni-calendar-item__weeks-lunar-text { .uni-calendar-item__weeks-box-text {
font-size: $uni-font-size-sm; font-size: $uni-font-size-base;
color: $uni-text-color; color: $uni-text-color;
} }
.uni-calendar-item__weeks-box-item { .uni-calendar-item__weeks-lunar-text {
position: relative; font-size: $uni-font-size-sm;
/* #ifndef APP-NVUE */ color: $uni-text-color;
display: flex; }
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 100rpx;
height: 100rpx;
}
.uni-calendar-item__weeks-box-circle { .uni-calendar-item__weeks-box-item {
position: absolute; position: relative;
top: 5px; /* #ifndef APP-NVUE */
right: 5px; display: flex;
width: 8px; /* #endif */
height: 8px; flex-direction: column;
border-radius: 8px; justify-content: center;
background-color: $uni-color-error; align-items: center;
width: 100rpx;
height: 100rpx;
}
} .uni-calendar-item__weeks-box-circle {
position: absolute;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: $uni-color-error;
.uni-calendar-item--disable { }
background-color: rgba(249, 249, 249, $uni-opacity-disabled);
color: $uni-text-color-disable;
}
.uni-calendar-item--isDay-text { .uni-calendar-item--disable {
color: $uni-primary; background-color: rgba(249, 249, 249, $uni-opacity-disabled);
} color: $uni-text-color-disable;
}
.uni-calendar-item--isDay { .uni-calendar-item--isDay-text {
background-color: $uni-primary; color: $uni-primary;
opacity: 0.8; }
color: #fff;
}
.uni-calendar-item--extra { .uni-calendar-item--isDay {
color: $uni-color-error; background-color: $uni-primary;
opacity: 0.8; opacity: 0.8;
} color: #fff;
}
.uni-calendar-item--checked { .uni-calendar-item--extra {
background-color: $uni-primary; color: $uni-color-error;
color: #fff; opacity: 0.8;
opacity: 0.8; }
}
.uni-calendar-item--multiple { .uni-calendar-item--checked {
background-color: $uni-primary; background-color: $uni-primary;
color: #fff; color: #fff;
opacity: 0.8; opacity: 0.8;
} }
.uni-calendar-item--before-checked {
background-color: #ff5a5f; .uni-calendar-item--multiple {
color: #fff; background-color: $uni-primary;
} color: #fff;
.uni-calendar-item--after-checked { opacity: 0.8;
background-color: #ff5a5f; }
color: #fff;
} .uni-calendar-item--before-checked {
background-color: #ff5a5f;
color: #fff;
}
.uni-calendar-item--after-checked {
background-color: #ff5a5f;
color: #fff;
}
</style> </style>

View File

@ -3,18 +3,18 @@ export function timestampToTime(timestamp) {
const date = new Date(timestamp) //时间戳为10位需*1000时间戳为13位的话不需乘1000 const date = new Date(timestamp) //时间戳为10位需*1000时间戳为13位的话不需乘1000
const Y = date.getFullYear() + '-' const Y = date.getFullYear() + '-'
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
const D =date.getDate()<10?'0'+date.getDate():date.getDate() const D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
// const h = date.getHours() + ':' // const h = date.getHours() + ':'
// const m = date.getMinutes() + ':' // const m = date.getMinutes() + ':'
// const s = date.getSeconds() // const s = date.getSeconds()
return Y + M + D return Y + M + D
} }
export function timestampToTimeMonth(timestamp){ export function timestampToTimeMonth(timestamp) {
const date = new Date(timestamp) //时间戳为10位需*1000时间戳为13位的话不需乘1000 const date = new Date(timestamp) //时间戳为10位需*1000时间戳为13位的话不需乘1000
const Y = date.getFullYear() + '-' const Y = date.getFullYear() + '-'
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
const D =date.getDate()<10?'0'+date.getDate():date.getDate() const D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
// const h = date.getHours() + ':' // const h = date.getHours() + ':'
// const m = date.getMinutes() + ':' // const m = date.getMinutes() + ':'
// const s = date.getSeconds() // const s = date.getSeconds()
@ -94,10 +94,32 @@ export function formateField(list) {
}); });
return valueNumber.length > 0 ? valueNumber : list; return valueNumber.length > 0 ? valueNumber : list;
} }
export async function getFieldEnum(params){ export async function getFieldEnum(params) {
const data = await request.$webGet(`/EShangApiMain/FrameWork/GetFieldEnumByField`, params); const data = await request.$webGet(`/EShangApiMain/FrameWork/GetFieldEnumByField`, params);
if (data.Result_Code !== 100) { if (data.Result_Code !== 100) {
return []; return [];
} }
return data.Result_Data.List; return data.Result_Data.List;
} }
export function formatTime(ts) {
let n = Number(ts);
if (!Number.isFinite(n)) return '';
// 兼容秒级/毫秒级时间戳
if (n < 1e12) n *= 1000;
const d = new Date(n);
const pad = (x) => String(x).padStart(2, '0');
const Y = d.getFullYear();
const M = pad(d.getMonth() + 1);
const D = pad(d.getDate());
const h = pad(d.getHours());
const m = pad(d.getMinutes());
const s = pad(d.getSeconds());
return `${Y}-${M}-${D} ${h}:${m}:${s}`;
}