From fe0ef3441cd689e3679696d990b0ca1b5d7193ac Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期四, 24 八月 2023 14:10:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5_standard/src/views/workOrder/reportingForWork.vue | 1
minipro_standard/manifest.json | 11
screen_standard/.env.staging | 2
h5_standard/src/views/plannedProgress/details.vue | 104 ++++
minipro_standard/pages/index/index.vue | 8
screen_standard/src/views/index.vue | 308 +++++++------
screen_standard/vite.config.js | 6
screen_standard/src/components/AppLayout.vue | 28
minipro_standard/pages.json | 12
h5_standard/.env.production | 4
h5_standard/src/views/workOrder/workOrderReporting.vue | 3
minipro_standard/components/myTabber.vue | 2
screen_standard/.env.development | 3
screen_standard/src/router/index.js | 7
minipro_standard/main.js | 13
h5_standard/src/components/newCom/user.vue | 2
minipro_standard/pages/workbench/workbench.vue | 133 ++++++
screen_standard/src/views/process.vue | 98 ++--
minipro_standard/App.vue | 6
/dev/null | 277 -------------
minipro_standard/pages/mine/mine.vue | 168 +++++--
screen_standard/src/assets/main.css | 2
screen_standard/src/stores/counter.js | 4
minipro_standard/util/request/responseInterceptors.js | 24
screen_standard/.env.production | 4
25 files changed, 633 insertions(+), 597 deletions(-)
diff --git a/h5_standard/.env.production b/h5_standard/.env.production
index c874a31..af03e19 100644
--- a/h5_standard/.env.production
+++ b/h5_standard/.env.production
@@ -18,7 +18,7 @@
# VUE_APP_API = 'https://hsky.doumee.com/doumeeplant_api/'
# 娴嬭瘯
-# VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
+VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
# 婕旂ず
-VUE_APP_API = 'https://www.mes.red/doumeeplant/'
+# VUE_APP_API = 'https://www.mes.red/doumeeplant/'
diff --git a/h5_standard/src/components/newCom/user.vue b/h5_standard/src/components/newCom/user.vue
index 55d4505..7ae8a6a 100644
--- a/h5_standard/src/components/newCom/user.vue
+++ b/h5_standard/src/components/newCom/user.vue
@@ -17,7 +17,7 @@
<div class="content_total">鍏眥{form.total}}鏉℃暟鎹�</div>
<div class="content_list">
<div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
- <div class="content_list_item_name">{{item.name}} | {{item.dmodel.name}}</div>
+ <div class="content_list_item_name" v-if="item.dmodel">{{item.name}} | {{item.dmodel.name}}</div>
</div>
</div>
</div>
diff --git a/h5_standard/src/views/plannedProgress/details.vue b/h5_standard/src/views/plannedProgress/details.vue
index d1e61af..29d7c25 100644
--- a/h5_standard/src/views/plannedProgress/details.vue
+++ b/h5_standard/src/views/plannedProgress/details.vue
@@ -51,12 +51,33 @@
<div class="content_list_item_content_item_label">璁″垝浜哄憳锛�</div>
<div class="content_list_item_content_item_nr">{{info.usermodel.realname}}</div>
</div>
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">鍒嗛厤鏁伴噺锛�</div>
+ <div class="content_list_item_content_item_nr">{{info.createTime}}</div>
+ </div>
+ <div class="content_list_item_content_item">
+ <div class="content_list_item_content_item_label">瀹屽伐鏁伴噺锛�</div>
+ <div class="content_list_item_content_item_nr" v-if="info.umodel">{{info.doneNum}}{{info.umodel.name}}</div>
+ </div>
</div>
</div>
</div>
<NotFound info="鏆傛湭鍒嗛厤宸ュ崟" v-if="info.workorderList && info.workorderList.length === 0" />
<template v-else>
- <div class="details_timeline" v-for="(item, i) in info.workorderList" :key="i">
+ <div class="details_list">
+ <div class="details_list_item" v-for="(item, i) in info.workorderList" :key="i" @click="jump(item.id)">
+ <div class="details_list_item_top">
+ <span>{{ item.createUserName }}</span><span>{{ item.code }}</span>
+ </div>
+ <div class="details_list_item_center">
+ <span>鑹搧鏁帮細{{ item.qualifiedNum }}</span><span>涓嶈壇鏁帮細<span class="red">{{ item.unqualifiedNum }}</span></span>
+ </div>
+ <div class="details_list_item_bottom">
+ <span>{{ item.createTime }}</span>
+ </div>
+ </div>
+ </div>
+ <!-- <div class="details_timeline" v-for="(item, i) in info.workorderList" :key="i">
<div class="details_timeline_header">
<div class="details_timeline_header_code">
<span>宸ュ崟缂栧彿锛歿{item.code}}</span>
@@ -68,10 +89,10 @@
<span v-if="item.status === 3" class="purple">宸叉楠�</span>
<span v-if="item.status === 4">宸叉姤宸�</span>
<span v-if="item.status === 5">宸插叆搴�</span>
- <span v-if="item.status === 6">宸插彇娑�</span>
+ <span v-if="item.status === 6">宸插彇娑�</span> -->
<!-- <span v-if="item.status === 7">宸插彇娑�</span>-->
<!-- <span v-if="item.status === 8">宸插叧闂�</span>-->
- </div>
+ <!-- </div>
<div class="details_timeline_item" v-if="item.produceDate">
<div class="activedian"></div>
<div class="dian active"></div>
@@ -132,21 +153,22 @@
</div>
</div>
</div>
- </div>
+ </div> -->
</template>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue'
- import { useRoute } from "vue-router"
+ import { useRoute, useRouter } from "vue-router"
import { queryByID } from '@/apis/PlanningAPI'
import NotFound from '@/components/common/NotFound.vue'
const route = useRoute()
+ const router = useRouter()
// 璇︽儏鏁版嵁
- let info = ref({})
+ let info:any = ref({})
let loading = ref<boolean>(true)
@@ -158,6 +180,10 @@
info.value = res.data
}
})
+ }
+
+ const jump = (id: any) => {
+ router.push({ name: 'workOrderReporting', query: { id } })
}
const proUserStr = (item: any) => {
@@ -296,6 +322,72 @@
}
}
}
+ .details_list {
+ width: 100%;
+ height: auto;
+ background-color: #FFFFFF;
+ margin-top: 20px;
+ .details_list_item {
+ width: 100%;
+ padding: 24px 30px;
+ box-sizing: border-box;
+ background-color: #FFFFFF;
+ border-bottom: 2px solid #F7F7F7;
+ &:last-child {
+ border: none !important;
+ }
+ .details_list_item_top {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ span {
+ &:first-child {
+ font-size: 30px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ margin-right: 16px;
+ }
+ &:last-child {
+ font-size: 24px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #666666;
+ }
+ }
+ }
+ .details_list_item_center {
+ width: 100%;
+ margin: 16px 0 20px 0;
+ .red {
+ color: #DE5243;
+ }
+ span {
+ &:first-child {
+ font-size: 26px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #333333;
+ margin-right: 100px;
+ }
+ &:last-child {
+ font-size: 26px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #333333;
+ }
+ }
+ }
+ .details_list_item_bottom {
+ span {
+ font-size: 24px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #999999;
+ }
+ }
+ }
+ }
.details_timeline {
padding: 30px;
background: #ffffff;
diff --git a/h5_standard/src/views/workOrder/reportingForWork.vue b/h5_standard/src/views/workOrder/reportingForWork.vue
index 256d10c..241b071 100644
--- a/h5_standard/src/views/workOrder/reportingForWork.vue
+++ b/h5_standard/src/views/workOrder/reportingForWork.vue
@@ -697,6 +697,7 @@
getDeviceByCondition({ procedureId: res.procedureId })
.then(res1 => {
if (res1.code === 200) {
+ if (res1.data && res1.data.length > 0)
deviceId.value = res1.data[0].id
from.deviceId = res1.data[0].id
from.deviceName = res1.data[0].name
diff --git a/h5_standard/src/views/workOrder/workOrderReporting.vue b/h5_standard/src/views/workOrder/workOrderReporting.vue
index 531d7fd..b24be91 100644
--- a/h5_standard/src/views/workOrder/workOrderReporting.vue
+++ b/h5_standard/src/views/workOrder/workOrderReporting.vue
@@ -311,7 +311,8 @@
<div class="bh_zw"></div>
<div class="bg_footer">
<div class="bg_footer_submit" v-if="typeView == 0" @click="submit">纭鎶ュ伐</div>
- <div class="bg_footer_submit1" @click="jumpdj" v-if="proxy.$auth('h5:workorder:processRecord') && typeView == 1">
+ <!-- proxy.$auth('h5:workorder:processRecord') && -->
+ <div class="bg_footer_submit1" @click="jumpdj" v-if="typeView == 1">
<img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" />
<span>鏂板鐐规</span>
</div>
diff --git a/minipro_standard/App.vue b/minipro_standard/App.vue
index 000f628..d1aed6d 100644
--- a/minipro_standard/App.vue
+++ b/minipro_standard/App.vue
@@ -16,7 +16,7 @@
/*姣忎釜椤甸潰鍏叡css */
@import "@/uni_modules/uview-ui/index.scss";
@import "common/css/lib.css";
- page {
- background-color: #F3F6F9 !important;
- }
+ // page {
+ // background-color: #F3F6F9 !important;
+ // }
</style>
diff --git a/minipro_standard/components/myTabber.vue b/minipro_standard/components/myTabber.vue
index 5fdc680..b8b5250 100644
--- a/minipro_standard/components/myTabber.vue
+++ b/minipro_standard/components/myTabber.vue
@@ -6,7 +6,7 @@
fixed
activeColor="#222"
inactiveColor="#666"
- >
+ :safeAreaInsetBottom="true">
<u-tabbar-item text="寰呭姙">
<view class="" slot="active-icon">
<image src="@/static/nav_daiban_sel@2x.png" class="icon-style" mode=""></image>
diff --git a/minipro_standard/main.js b/minipro_standard/main.js
index 06bb2a0..a8ee7ad 100644
--- a/minipro_standard/main.js
+++ b/minipro_standard/main.js
@@ -1,32 +1,23 @@
import Vue from 'vue'
import App from './App'
-
-
import mixin from './common/mixin'
-
// 寮曞叆鍏ㄥ眬uView
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
-
// vuex
import store from './store'
Vue.prototype.$store = store
store.dispatch('getHeight')
-
Vue.config.productionTip = false
-
-App.mpType = 'app'
-
+App.mpType = 'app'
console.log(uni.$u);
// #ifdef MP
// 寮曞叆uView瀵瑰皬绋嬪簭鍒嗕韩鐨刴ixin灏佽
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
// #endif
-
Vue.mixin(mixin)
-// 寮曞叆璇锋眰灏佽
-
+// 寮曞叆璇锋眰灏佽
const app = new Vue({
store,
...App
diff --git a/minipro_standard/manifest.json b/minipro_standard/manifest.json
index 2188567..a25c0b8 100644
--- a/minipro_standard/manifest.json
+++ b/minipro_standard/manifest.json
@@ -50,14 +50,15 @@
"quickapp" : {},
/* 灏忕▼搴忕壒鏈夌浉鍏� */
"mp-weixin" : {
- "appid" : "wxf8f2d1ee4b273688",
+ "appid" : "wxcd2b89fd2ff065f8",
"setting" : {
- "urlCheck" : false
+ "urlCheck" : false,
+ "es6" : true,
+ "postcss" : true,
+ "minified" : true
},
"usingComponents" : true,
- "requiredPrivateInfos": [
- "getLocation"
- ],
+ "requiredPrivateInfos" : [ "getLocation" ],
"permission" : {
"scope.userLocation" : {
"desc" : "瀹炴椂涓婁紶鍥剧墖"
diff --git a/minipro_standard/pages.json b/minipro_standard/pages.json
index 5641535..cb37cc6 100644
--- a/minipro_standard/pages.json
+++ b/minipro_standard/pages.json
@@ -1,12 +1,11 @@
{
- "pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages
+ "pages": [
{
"path": "pages/workbench/workbench",
"style": {
"navigationBarTitleText": "宸ヤ綔鍙�",
"enablePullDownRefresh": false
}
-
},
{
"path": "pages/index/index",
@@ -26,16 +25,15 @@
{
"navigationBarTitleText": "鐧诲綍",
"enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
-
+ "navigationStyle": "custom"
+ }
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
- "navigationBarBackgroundColor": "#F3F6F9",
- "backgroundColor": "#F3F6F9"
+ "navigationBarBackgroundColor": "#ffffff",
+ "backgroundColor": "#ffffff"
},
"tabBar": {
"color": "#666666",
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 7308129..c6d7304 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -1,14 +1,10 @@
<template>
- <view>
-
+ <view>
<myTabbar :index="0" />
</view>
</template>
<script>
- // import { coustomLogin, wxEmpower } from '@/util/api/index'
-
-
import myTabbar from "@/components/myTabber.vue"
export default {
components: {
@@ -73,5 +69,5 @@
</script>
<style lang="scss" scoped>
-
+
</style>
diff --git a/minipro_standard/pages/mine/mine.vue b/minipro_standard/pages/mine/mine.vue
index 417e0d4..081c8eb 100644
--- a/minipro_standard/pages/mine/mine.vue
+++ b/minipro_standard/pages/mine/mine.vue
@@ -1,8 +1,31 @@
<template>
- <view>
-
- <myTabbar :index="2" />
- </view>
+<view>
+ <div class="box">
+ <div class="box_info" :style="{background: 'url(' + img + ')'}">
+ <image src="@/static/2@2x.png" mode="widthFix" />
+ <div class="box_info_box">
+ <text>寮犱笁</text>
+ <div class="box_info_box_x">
+ <text>璞嗙背绉戞妧</text>
+ <image src="@/static/mine_ic_change@2x.png" alt="" />
+ </div>
+ </div>
+ </div>
+ <div class="box_function">
+ <div class="box_function_item" v-for="(item, index) in MENU" :key="index">
+ <div class="box_function_item_left">
+ <image :src="item.icon" alt="" />
+ <text>{{item.name}}</text>
+ </div>
+ <div class="box_function_item_right">
+ <van-icon name="arrow" size="20" color="#CCCCCC" />
+ </div>
+ </div>
+ </div>
+ <div class="box_out"><text>閫�鍑虹櫥褰�</text></div>
+ </div>
+ <myTabbar :index="2" />
+</view>
</template>
<script>
@@ -13,15 +36,19 @@
},
data() {
return {
- form: {
- account: '',
- password: '',
- },
- logining: false,
- openId: ''
+ MENU: [
+ { name: '涓汉淇℃伅', url: '/personal/personalInformation', icon: require('@/static/mine_ic_gerenxinxi@2x.png') },
+ // { name: '绯荤粺閫氱煡', url: '', icon: require('@/assets/icon/mine_ic_xitonggonggao@2x.png') },
+ { name: '鏇存柊鎵嬫満鍙�', url: '/personal/updatePhone', icon: require('@/static/mine_ic_shoujihao@2x.png') },
+ { name: '鏇存柊閭鍙�', url: '/personal/updateMailbox', icon: require('@/static/mine_ic_youxianghao@2x.png') },
+ { name: '鎵爜缁戝畾璐﹀彿', url: '', icon: require('@/static/mine_ic_bangding@2x.png') },
+ { name: '淇敼瀵嗙爜', url: '/personal/changePassword', icon: require('@/static/mine_ic_xiugaimima@2x.png') },
+ ],
+ img: require('@/static/mine_bg@2x.png')
}
},
onLoad() {
+ uni.hideTabBar()
// uni.login({
// success: data => {
// this.wxLogin(data.code)
@@ -32,43 +59,96 @@
// })
},
methods: {
- // loginAction() {
- // if (!this.form.account || !this.form.password) {
- // uni.$u.toast('璐﹀彿鎴栬�呭瘑鐮佷笉鑳戒负绌�')
- // }
- // this.logining = true
- // coustomLogin({...this.form, openid: this.openId})
- // .then(res => {
- // this.$store.commit('SETTOKEN', res.token)
- // this.$store.commit('SETUSERINFO', res)
- // uni.navigateTo({
- // url:'/pages/projectList/projectList'
- // })
- // })
- // .finally(() => {
- // this.logining = false
- // })
- // },
- // wxLogin(code) {
- // wxEmpower({code})
- // .then(res => {
- // this.openId = res.openid
- // if (res.userInfo) {
- // this.$store.commit('SETTOKEN', res.userInfo.token)
- // this.$store.commit('SETUSERINFO', res.userInfo)
- // uni.navigateTo({
- // url:'/pages/projectList/projectList'
- // })
- // }
- // })
- // .catch(err => {
- // uni.$u.toast(err)
- // })
- // }
}
}
</script>
<style lang="scss" scoped>
-
+ .box {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ .box_info {
+ padding: 0 30rpx;
+ height: 168rpx;
+ border-radius: 16rpx;
+ display: flex;
+ align-items: center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ image {
+ width: 88rpx;
+ height: 88rpx;
+ }
+ .box_info_box {
+ height: 88rpx;
+ display: flex;
+ margin-left: 30rpx;
+ flex-direction: column;
+ justify-content: space-between;
+ .box_info_box_x {
+ display: flex;
+ align-items: center;
+ text {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: rgba(255, 255, 255, 0.8);
+ }
+ image {
+ width: 26rpx;
+ height: 26rpx;
+ margin-left: 10rpx;
+ }
+ }
+ text {
+ font-size: 34rpx;
+ font-weight: 500;
+ color: #FFFFFF;
+ }
+ }
+ }
+ .box_function {
+ margin-top: 30rpx;
+ .box_function_item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 98rpx;
+ border-bottom: 1rpx solid #E5E5E5;
+ /*&:last-child {*/
+ /* border: none;*/
+ /*}*/
+ .box_function_item_left {
+ display: flex;
+ align-items: center;
+ image {
+ width: 36rpx;
+ height: 36rpx;
+ margin-right: 24rpx;
+ }
+ text {
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
+ .box_out {
+ position: fixed;
+ bottom: 200rpx;
+ left: 50%;
+ transform: translate(-50%, 0);
+ width: 350rpx;
+ height: 88rpx;
+ background: #F7F7F7;
+ border-radius: 8rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #333333;
+ }
+ }
</style>
diff --git a/minipro_standard/pages/workbench/workbench.vue b/minipro_standard/pages/workbench/workbench.vue
index 8d77569..01a623e 100644
--- a/minipro_standard/pages/workbench/workbench.vue
+++ b/minipro_standard/pages/workbench/workbench.vue
@@ -1,6 +1,21 @@
<template>
- <view>
-
+ <view class="index">
+ <view class="menu">
+ <view class="menu_list" v-for="(row, i) in 3" :key="i">
+ <view class="menu_list_head">
+ <span>甯哥敤鍔熻兘</span>
+ </view>
+ <div class="menu_list_list">
+ <view class="menu_list_item" v-for="item in list" :key="item.id" @click="jump(item)">
+ <image :src="item.icon" mode="widthFix" />
+ <span>{{item.label}}</span>
+ </view>
+ <view class="menu_list_zw"></view>
+ <view class="menu_list_zw"></view>
+ <view class="menu_list_zw"></view>
+ </div>
+ </view>
+ </view>
<myTabbar :index="1" />
</view>
</template>
@@ -14,7 +29,32 @@
},
data() {
return {
-
+ list: [
+ {
+ icon: require('@/static/logo@2x.png'),
+ label: '娴嬭瘯'
+ },
+ {
+ icon: require('@/static/logo@2x.png'),
+ label: '娴嬭瘯'
+ },
+ {
+ icon: require('@/static/logo@2x.png'),
+ label: '娴嬭瘯'
+ },
+ {
+ icon: require('@/static/logo@2x.png'),
+ label: '娴嬭瘯'
+ },
+ {
+ icon: require('@/static/logo@2x.png'),
+ label: '娴嬭瘯'
+ },
+ {
+ icon: require('@/static/logo@2x.png'),
+ label: '娴嬭瘯'
+ }
+ ]
};
},
onLoad() {
@@ -49,7 +89,88 @@
}
}
</script>
-
-<style lang="scss">
-
+<style>
+ page {
+ background-color: #F7F7F7 !important;
+ }
+</style>
+<style scoped lang="scss">
+.index {
+ width: 100%;
+ .menu {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ .menu_list {
+ display: flex;
+ flex-direction: column;
+ padding: 30rpx;
+ box-sizing: border-box;
+ margin-bottom: 20rpx;
+ background: white;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ .menu_list_head {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 40rpx;
+ span {
+ font-size: 32rpx;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ }
+ }
+ .menu_list_list {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .menu_list_zw {
+ width: 20%;
+ height: 0;
+ }
+ .menu_list_item {
+ width: 20%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ margin-top: 40rpx;
+ &:nth-child(1) {
+ margin: 0;
+ }
+ &:nth-child(2) {
+ margin: 0;
+ }
+ &:nth-child(3) {
+ margin: 0;
+ }
+ &:nth-child(4) {
+ margin: 0;
+ }
+ &:nth-child(5) {
+ margin: 0;
+ }
+ image {
+ width: 88rpx;
+ height: 88rpx;
+ border-radius: 24rpx;
+ overflow: hidden;
+ }
+ span {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #333333;
+ margin-top: 16rpx;
+ }
+ }
+ }
+ }
+ }
+}
</style>
diff --git a/minipro_standard/util/request/responseInterceptors.js b/minipro_standard/util/request/responseInterceptors.js
index d2fe335..a88ed54 100644
--- a/minipro_standard/util/request/responseInterceptors.js
+++ b/minipro_standard/util/request/responseInterceptors.js
@@ -7,18 +7,18 @@
/* 瀵瑰搷搴旀垚鍔熷仛鐐逛粈涔� 鍙娇鐢╝sync await 鍋氬紓姝ユ搷浣�*/
const data = response.data
// 鑷畾涔夊弬鏁�
- const custom = response.config?.custom
- if (data.code !== 200) { // 鏈嶅姟绔繑鍥炵殑鐘舵�佺爜涓嶇瓑浜�200锛屽垯reject()
- uni.$u.toast(data.message)
- if (data.code === 401) {
- // console.log('鏈櫥褰曘�佺櫥褰曞け鏁�');
- // 鏈櫥褰曘�佺櫥褰曞け鏁�
- uni.reLaunch({
- url: '/pages/login/login'
- })
- }
- return Promise.reject(data)
- }
+ // const custom = response.config?.custom
+ // if (data.code !== 200) { // 鏈嶅姟绔繑鍥炵殑鐘舵�佺爜涓嶇瓑浜�200锛屽垯reject()
+ // uni.$u.toast(data.message)
+ // if (data.code === 401) {
+ // // console.log('鏈櫥褰曘�佺櫥褰曞け鏁�');
+ // // 鏈櫥褰曘�佺櫥褰曞け鏁�
+ // uni.reLaunch({
+ // url: '/pages/login/login'
+ // })
+ // }
+ // return Promise.reject(data)
+ // }
// console.log(data.data);
return data.data || {}
}, (response) => {
diff --git a/screen_standard/.env.development b/screen_standard/.env.development
index b059424..0ee6f4b 100644
--- a/screen_standard/.env.development
+++ b/screen_standard/.env.development
@@ -6,4 +6,5 @@
VITE_BASE_URL='http://192.168.0.35:10021'
# VITE_BASE_PATH='/doumeeplant_api'
-# VITE_BASE_URL='https://dmtest.ahapp.net/doumeeplant_api/'
\ No newline at end of file
+VITE_BASE_URL='https://dmtest.ahapp.net/doumeeplant_api'
+# VITE_BASE_URL = 'https://www.mes.red/doumeeplant'
diff --git a/screen_standard/.env.production b/screen_standard/.env.production
index bb4353f..e332e9c 100644
--- a/screen_standard/.env.production
+++ b/screen_standard/.env.production
@@ -1,5 +1,5 @@
NODE_ENV = production
VITE_NAME = '鐢熶骇鐜'
VITE_BASE_CONTEXT = 'screen'
-VITE_BASE_PATH = '/doumeeplant'
-VITE_BASE_URL = 'https://www.mes.red/doumeeplant/'
\ No newline at end of file
+VITE_BASE_PATH = '/api'
+VITE_BASE_URL = 'https://www.mes.red/doumeeplant'
\ No newline at end of file
diff --git a/screen_standard/.env.staging b/screen_standard/.env.staging
index bcb56b5..a511b8c 100644
--- a/screen_standard/.env.staging
+++ b/screen_standard/.env.staging
@@ -2,4 +2,4 @@
VITE_NAME='娴嬭瘯鐜'
VITE_BASE_CONTEXT='doumeeplant_screen'
VITE_BASE_PATH='/doumeeplant_api'
-VITE_BASE_URL='https://dmtest.ahapp.net/doumeeplant_api/'
\ No newline at end of file
+VITE_BASE_URL='https://dmtest.ahapp.net/doumeeplant_api'
\ No newline at end of file
diff --git a/screen_standard/src/assets/main.css b/screen_standard/src/assets/main.css
index ead72f7..5df6d48 100644
--- a/screen_standard/src/assets/main.css
+++ b/screen_standard/src/assets/main.css
@@ -10,7 +10,7 @@
margin: 0;
/* height: 100%; */
height: 100vh;
- /* overflow-y: scroll; */
+ overflow-y: hidden;
font-weight: normal;
}
diff --git a/screen_standard/src/components/AppLayout.vue b/screen_standard/src/components/AppLayout.vue
index 1083e29..fb9771d 100644
--- a/screen_standard/src/components/AppLayout.vue
+++ b/screen_standard/src/components/AppLayout.vue
@@ -115,9 +115,9 @@
}
const fullChange = () => {
- data.isFull = !data.isFull
+ // data.isFull = !data.isFull
let element = document.documentElement;
- if (data.isFull) { // 鍏ㄥ睆
+ if (!data.isFull) { // 鍏ㄥ睆
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullScreen) {
@@ -139,10 +139,11 @@
document.msExitFullscreen();
}
}
- // data.isFull = !data.isFull
+ data.isFull = !data.isFull
}
onMounted(() => {
+ enterprise.setDepartId()
getDepartmentList(enterprise.companyId)
.then(res => {
data.comList = res
@@ -150,17 +151,21 @@
enterprise.setDepartId(data.tempCom.id)
})
.catch(err => {})
+ fullChange()
const week = ['鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�', '鏄熸湡鏃�']
setInterval(() => {
- let date = new Date()
+ let tempDate = new Date()
+ let month = tempDate.getMonth()+1
+ let day = tempDate.getDate()
+ let hours = tempDate.getHours()
+ let minute = tempDate.getMinutes()
+ let seconds = tempDate.getSeconds()
data.tempDate = {
- time: `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`,
- date: `${date.getFullYear()}/${date.getMonth()+1}/${date.getDate()}`,
- day: week[date.getDay()-1]
+ time: `${hours<10?`0${hours}`:hours}:${minute<10?`0${minute}`:minute}:${seconds<10?`0${seconds}`:seconds}`,
+ date: `${tempDate.getFullYear()}/${month<10?`0${month}`:month}/${day<10?`0${day}`:day}`,
+ day: week[tempDate.getDay()-1]
}
}, 1000)
- // console.log(date.getDay());
-
})
const back = () => {
enterprise.setProcedureName('')
@@ -181,6 +186,11 @@
height: 100%;
padding: 20px 30px;
overflow-y: scroll;
+ scrollbar-width:none;
+ -ms-overflow-style:none;
+ &::-webkit-scrollbar{
+ width: 0;
+ }
display: flex;
flex-direction: column;
diff --git a/screen_standard/src/router/index.js b/screen_standard/src/router/index.js
index c756cb1..afebefa 100644
--- a/screen_standard/src/router/index.js
+++ b/screen_standard/src/router/index.js
@@ -1,5 +1,5 @@
import { createRouter, createWebHashHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
+// import HomeView from '../views/HomeView.vue'
import indexView from '../views/index.vue'
import processView from '../views/process.vue'
// console.log(import.meta.env.VITE_BASE_CONTEXT);
@@ -10,6 +10,11 @@
routes: [
{
path: '/',
+ redirect: '/home',
+
+ },
+ {
+ path: '/home',
name: 'home',
component: indexView
},
diff --git a/screen_standard/src/stores/counter.js b/screen_standard/src/stores/counter.js
index 9d972af..e3f5613 100644
--- a/screen_standard/src/stores/counter.js
+++ b/screen_standard/src/stores/counter.js
@@ -5,8 +5,8 @@
state: () => {
return {
- companyId: '8',
- departId: '',
+ companyId: window.sessionStorage.getItem('companyId'),
+ departId: window.sessionStorage.getItem('departId'),
delayNum: 0, // 寤舵湡璁″垝鏁�
deviceNum: 0, // 浠婃棩鐢熶骇璁惧鏁�
ingNum: 0, // 鎵ц涓鍒掓暟
diff --git a/screen_standard/src/views/HomeView.vue b/screen_standard/src/views/HomeView.vue
deleted file mode 100644
index 57c3298..0000000
--- a/screen_standard/src/views/HomeView.vue
+++ /dev/null
@@ -1,277 +0,0 @@
-<template>
- <div class="productProcess">
-
- <!-- 濡傛灉椤甸潰鍒锋柊鏁版嵁姣旇緝棰戠箒锛屽彲浠ュ皢loading銆乻howFlag鐨勭浉鍏充唬鐮佸垹闄わ紝闃叉杩囦簬棰戠箒鐨勫嚭鐜板姞杞藉姩鐢� -->
- <div class="loading_div" v-show="!showFlag">
- <div>Loading...</div> <!-- 杩欎釜loading鑷繁鍐欙紝浠g爜娌¤创鍑烘潵 -->
- </div>
-
- <div class="success_info_body" v-show="showFlag">
- <!-- 鍙傛暟鍚嶇О銆佸垪鏁版牴鎹疄闄呮儏鍐佃皟鏁� -->
- <div class="table_body">
- <div class="table_th">
- <div class="tr1 th_style">鎺掍骇缂栧彿</div>
- <div class="tr2 th_style">绫诲瀷</div>
- <div class="tr3 th_style">鏃ユ湡</div>
- <div class="tr4 th_style">杩涘害</div>
- </div>
- <div class="table_main_body">
- <div class="table_inner_body" :style="{top: tableTop + 'px'}">
- <div class="table_tr" v-for="(item,index) in tableList" :key="index">
- <div class="tr1 tr">{{item.planNo}}</div>
- <div class="tr2 tr">{{item.type}}</div>
- <div class="tr3 tr" v-if="item.startDate!='-'">{{item.startDate}} ~ {{item.endDate}}</div>
- <div class="tr3 tr" v-else>-</div>
- <div class="tr4 tr" v-if="item.process!='-'">{{Number(item.process).toFixed(2)}} %</div>
- <div class="tr4 tr" v-else>-</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
-export default {
-
- data() {
- return {
- showFlag: true,
- tableTimer: null,
- tableTop: 0,
- tableList: [],
- tableList:
- [{
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
- {
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
- {
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
- {
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
- {
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
- {
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
- {
- "process":0.0000,
- "planNo":"BP2022060701",
- "endDate":"2022-06-07",
- "type":"鐮屽潡",
- "startDate":"2022-06-07"
- },
-
- {
- "process":0.0000,
- "planNo":"WP2022061301",
- "endDate":"2022-06-13",
- "type":"澧欐澘",
- "startDate":"2022-06-13"
- }],
-
- tableListSize: 0,
- componentTimer: null,
-
- //闇�瑕佹牴鎹儏鍐佃缃殑鍙傛暟
- title: "鎺掍骇杩涘害",
- visibleSize: 6, //瀹瑰櫒鍐呭彲瑙嗘渶澶у畬鏁磋鏁�
- lineHeight: 49, //姣忚鐨勫疄闄呴珮搴︼紙鍖呭惈margin-top/bottom,border绛夛級
- componentTimerInterval: 3600000, //鍒锋柊鏁版嵁鐨勬椂闂撮棿闅�
- tableTimerInterval: 100 //鍚戜笂婊氬姩 1px 鎵�闇�瑕佺殑鏃堕棿锛岃秺灏忚秺蹇紝鎺ㄨ崘鍊� 100
- };
- },
-
- //濡傛灉娌℃湁鐖跺厓绱犱紶鍊硷紝灏唚atch鍐呯殑鍐呭鎼嚦mounted涓嵆鍙�
- props: ["activeFactoryId"],
- watch: {
- activeFactoryId(val, oldVal) {
- clearInterval(this.componentTimer);
- this.bsGetProductProcess();
- this.componentTimerFun();
- }
- },
- mounted() {
- clearInterval(this.componentTimer);
- this.bsGetProductProcess();
- this.componentTimerFun();
- },
- beforeDestroy() {
- clearInterval(this.componentTimer);
- clearInterval(this.tableTimer);
- },
- methods: {
- //璋冪敤鏁版嵁鎺ュ彛锛岃幏鍙栧垪琛ㄦ暟鎹紝鏍规嵁鑷繁鎯呭喌濉帴鍙rl
- bsGetProductProcess() {
- clearInterval(this.tableTimer);
- this.tableTop = 0;
- this.showFlag = true;
- this.tableActionFun();
- // if (this.activeFactoryId != "") {
- // this.showFlag = false;
- // this.$ajax({
- // method: "get",
- // url: `` //鏍规嵁鑷繁鎯呭喌濉帴鍙rl
- // })
- // .then(res => {
- // this.tableList = res.data.data;
- // this.showFlag = true;
- // this.tableActionFun();
- // })
- // .catch(function(err) {
- // console.log("bsGetProductProcess error!");
- // });
- // }
- },
- tableActionFun() {
- this.tableListSize = this.tableList.length;
- if (this.tableListSize > this.visibleSize) {
- this.tableList = this.tableList.concat(this.tableList);
- this.tableTimerFun();
- } else {
- this.fillTableList();
- }
- },
- //褰撴暟鎹繃灏戞椂锛屼笉瑙﹀彂鑷姩杞挱浜嬩欢锛屽苟濉厖娌℃湁鏁版嵁鐨勮锛屽弬鏁版牴鎹疄闄呮儏鍐典慨鏀瑰嵆鍙�
- fillTableList() {
- var addLength = this.visibleSize - this.tableListSize;
- for (var i = 0; i < addLength; i++) {
- this.tableList.push({
- planNo: "-",
- type: "-",
- startDate: "-",
- endDate: "-",
- process: "-"
- });
- }
- },
- tableTimerFun() {
- var count = 0;
- this.tableTimer = setInterval(() => {
- if (count < (this.tableList.length / 2) * this.lineHeight) {
- this.tableTop -= 1;
- count++;
- } else {
- count = 0;
- this.tableTop = 0;
- }
- }, this.tableTimerInterval);
- },
- componentTimerFun() {
- this.componentTimer = setInterval(() => {
- this.bsGetProductProcess();
- }, this.componentTimerInterval);
- }
- }
-};
-</script>
-
-<style scoped>
-.productProcess {
- width: 550px;
- height: 415px;
-}
-.loading_div {
- /* color: #eee; */
- padding-top: 100px;
-}
-.title_div {
- width: 100%;
-}
-.table_body {
- width: 100%;
- margin-top: 15px;
-}
-.table_th {
- width: 100%;
- display: flex;
- height: 40px;
- line-height: 40px;
-}
-.tr {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- box-sizing: border-box;
- padding: 0 5px;
- text-align: center;
- font-size: 14px;
-}
-.tr1 {
- width: 28%;
-}
-.tr2 {
- width: 15%;
-}
-.tr3 {
- width: 35%;
- font-size: 13px;
-}
-
-.tr4 {
- flex: 1;
-}
-
-.th_style {
- color: rgb(0, 221, 253);
- font-weight: bold;
- font-size: 18px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- box-sizing: border-box;
- padding: 0 5px;
- text-align: center;
-}
-.table_main_body {
- width: 100%;
- height: 294px;
- overflow: hidden;
- position: relative;
-}
-.table_inner_body {
- width: 100%;
- position: absolute;
- left: 0;
-}
-.table_tr {
- display: flex;
- height: 40px;
- line-height: 40px;
- color: #eee;
- font-size: 15px;
- background: rgba(3, 145, 167, 0.1);
- border: 1px solid rgb(4, 114, 131);
- margin-top: 7px;
-}
-</style>
\ No newline at end of file
diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index 7b7a115..c9970c2 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -54,14 +54,14 @@
<div class="scroll_item_row">{{ item.materialName }}</div>
<div class="scroll_item_row">{{ item.materialCode }}</div>
<div class="scroll_item_row">{{ item.num }}</div>
- <div class="scroll_item_row">
+ <div class="scroll_item_row" style="text-align: left;">
<el-tooltip v-for="(child, i) in item.procedureList" :key="i" effect="dark"
:content="'宸叉姤宸ヨ壇鍝佹暟' + child.doneNum + '锛涘伐搴忚鍒掓暟' + child.planNum" placement="top">
<div class="scroll_item_row_item" @click="jump(child.procedureId, child.procedureName)">
<div class="scroll_item_row_item_x"></div>
- <span v-if="child.rate < 100">{{ child.rate.toFixed(0) }}%</span>
+ <span v-if="child.rate < 100">{{ Math.floor(child.rate) }}%</span>
<img v-else src="@/assets/img/ic_complete@2x.png" alt="" />
- <span class="scroll_item_row_item_wz">{{ child.procedureName }}</span>
+ <span class="scroll_item_row_item_wz">{{ child.procedureName.substring(0, 3) }}</span>
</div>
</el-tooltip>
</div>
@@ -103,7 +103,7 @@
<div class="content_left_item1_head">
<span>褰撴棩鍛樺伐浜ч噺TOP10</span>
</div>
- <div class="content_left_item1_content" ref="scrollContainer">
+ <div class="content_left_item1_content" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave" ref="scrollContainer">
<div class="content_left_item1_content_row" v-for="(item, index) in data.production" :key="index">
<div class="content_left_item1_content_row_name">
<div :class="index > 2 ? 'num bg1' : 'num bg2'">{{ index + 1 }}</div>
@@ -137,8 +137,8 @@
<div v-for="(item, index) in data.log" :key="index"
:class="index % 2 == 0 ? 'scroll_item scroll_item_bg1' : 'scroll_item scroll_item_bg2'">
<div class="scroll_item_row">{{ item.userName }}</div>
+ <div class="scroll_item_row">{{ item.materialName }}</div>
<div class="scroll_item_row">{{ item.procedureName }}</div>
- <div class="scroll_item_row">{{ item.materialCode }}</div>
<div class="scroll_item_row">{{ dateToSub(item.createTime) }}</div>
<div class="scroll_item_row">{{ item.qualifiedNum || 0 }}</div>
<div class="scroll_item_row">{{ item.unqualifiedNum || 0 }}</div>
@@ -170,7 +170,7 @@
</div>
</div>
<!-- 璁惧宸℃璁板綍 -->
- <div class="content_right_bottom">
+ <div class="content_right_bottom" ref="bottom1">
<div class="content_right_bottom_head">
<span>璁惧宸℃璁板綍</span>
</div>
@@ -187,7 +187,10 @@
:class="index % 2 == 0 ? 'scroll_item scroll_item_bg1' : 'scroll_item scroll_item_bg2'">
<div class="scroll_item_row">{{ dateToSub(item.checkdate) }}</div>
<div class="scroll_item_row">{{ item.deviceName }}</div>
- <div class="scroll_item_row">{{ item.status == 0 ? '鍚堟牸' : '涓嶅悎鏍�' }}</div>
+ <div class="scroll_item_row">
+ <span v-if="item.status == 0">姝e父</span>
+ <span v-else style="color: #F84F26">寮傚父</span>
+ </div>
<div class="scroll_item_row">{{ item.userName }}</div>
</div>
</div>
@@ -200,8 +203,8 @@
<script setup>
import { dateToSub } from '@/utils'
-import { reactive, ref, onMounted, nextTick, onUnmounted, computed, watch, toRefs } from 'vue'
-import { getPlanData, getTop, getStockList, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js'
+import { reactive, ref, onMounted, onUnmounted, computed, watch, toRefs } from 'vue'
+import { getPlanData, getTop, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js'
import { useCounterStore } from '@/stores/counter.js'
import * as echarts from 'echarts'
import { useRouter } from 'vue-router'
@@ -218,22 +221,24 @@
dayDistribution: [],
typeDistribution: [],
num: 0,
- baseNum: 0
+ baseNum: 0,
+ firstScroll: false,
+ secondScroll: false,
+ thirdScroll: false,
+ fourthScroll: false,
+ fifthScroll: false,
})
let { baseNum } = toRefs(data)
let timer = ref(null)
-let timer1 = ref(null)
-let timer2 = ref(null)
-let timer3 = ref(null)
-let timer4 = ref(null)
let timer5 = ref(null)
let scrollContainer = ref(null)
let scrollContainer1 = ref(null)
let scrollContainer2 = ref(null)
let scrollContainer3 = ref(null)
let scrollContainer4 = ref(null)
+let bottom1 = ref(null)
let cate = ref([
{
name: '鎴愬搧璁″垝杩涘害',
@@ -271,16 +276,16 @@
}
})
-start1()
const init = () => {
+ console.log(timer.value);
// 褰撴棩鍛樺伐浜ч噺TOP10
getTop(companyId.value, departId.value)
.then(res => {
if (res.length > 0) {
data.baseNum = res[0].doneNum
data.production = res
- start()
+ data.fifthScroll = true
}
})
// 浠撳簱瀹炴椂浣欓噺缁熻
@@ -297,18 +302,14 @@
getProcedureProcessList(companyId.value, departId.value)
.then(res => {
data.processProgress = res
- nextTick(() => {
- start2()
- })
+ data.thirdScroll = true
})
} else {
// 鎴愬搧璁″垝杩涘害
getWorkPlansList(companyId.value, departId.value)
.then(res => {
data.plannedProgress = res
- nextTick(() => {
- start1()
- })
+ data.secondScroll = true
})
}
}
@@ -322,9 +323,7 @@
page: 1
}).then(res => {
data.log = res.records
- nextTick(() => {
- start3()
- })
+ data.fourthScroll = true
})
// 璁惧宸℃璁板綍
getDeviceCheckPage(companyId.value, departId.value, {
@@ -333,9 +332,7 @@
page: 1
}).then(res => {
data.patrolInspection = res.records
- nextTick(() => {
- start4()
- })
+ data.fifthScroll = true
})
// 杩戜竷澶╀笉鑹暟
getUnqualified7DayData(companyId.value, departId.value, '')
@@ -362,6 +359,7 @@
num: item.unqualifiedNum
}
})
+ console.log(data.num);
setTypeChart()
}
})
@@ -380,20 +378,22 @@
let myChart = echarts.init(dayChartDom);
let dateList = []
let numList = []
- let num = 0
data.dayDistribution.forEach(item => {
dateList.push(item.date)
numList.push(item.num)
- num += item.num
})
let option;
option = {
title: {
- text: `杩戜竷鏃ヤ笉鑹搧鎬绘暟锛�${num}`,
+ text: ` 杩戜竷鏃ヤ笉鑹搧鎬绘暟锛�${data.num}`,
textStyle: {
color: '#fff',
fontSize: 12
}
+ },
+ grid: {
+ top: 40,
+ bottom: 30
},
xAxis: {
type: 'category',
@@ -521,9 +521,6 @@
}
}
},
- // labelLayout: {
- // hideOverlap: true
- // },
endLabel: {
show: true,
distance: 5,
@@ -543,24 +540,7 @@
option && myChart.setOption(option);
}
-// onBeforeUnmount(()=>{
-// clearTimeout(timer.value)
-// clearTimeout(timer1.value)
-// clearTimeout(timer2.value)
-// clearTimeout(timer3.value)
-// clearTimeout(timer4.value)
-// })
-onUnmounted(() => {
- clearTimeout(timer.value)
- clearTimeout(timer1.value)
- clearTimeout(timer2.value)
- clearTimeout(timer3.value)
- clearTimeout(timer4.value)
- clearTimeout(timer5.value)
-})
const clickCate = (index) => {
- clearTimeout(timer1.value)
- clearTimeout(timer2.value)
cate.value.forEach((item, i) => {
if (i === index) {
// 鎴愬搧璁″垝杩涘害
@@ -568,17 +548,13 @@
getWorkPlansList(companyId.value, departId.value)
.then(res => {
data.plannedProgress = res
- nextTick(() => {
- start1()
- })
+ data.secondScroll = true
})
} else {
getProcedureProcessList(companyId.value, departId.value)
.then(res => {
data.processProgress = res
- nextTick(() => {
- start2()
- })
+ data.thirdScroll = true
})
}
item.active = true
@@ -588,86 +564,57 @@
})
}
function handleMouseEnter() {
- clearTimeout(timer.value)
+ data.firstScroll = false
}
function handleMouseEnter1() {
- clearTimeout(timer1.value)
+ data.secondScroll = false
}
function handleMouseEnter2() {
- clearTimeout(timer2.value)
+ data.thirdScroll = false
}
function handleMouseEnter3() {
- clearTimeout(timer3.value)
+ data.fourthScroll = false
}
function handleMouseEnter4() {
- clearTimeout(timer4.value)
+ data.fifthScroll = false
}
function handleMouseLeave() {
- start()
+ data.firstScroll = true
}
function handleMouseLeave1() {
- start1()
+ data.secondScroll = true
}
function handleMouseLeave2() {
- start2()
+ data.thirdScroll = true
}
function handleMouseLeave3() {
- start3()
+ data.fourthScroll = true
}
function handleMouseLeave4() {
- start4()
+ data.fifthScroll = true
}
-// 寮�鍚畾鏃跺櫒
-function start() {
- clearTimeout(timer.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- let speed = ref(100)
- timer.value = setInterval(ListScroll, speed.value)
-}
-// 寮�鍚畾鏃跺櫒
-function start1() {
- clearTimeout(timer1.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- let speed1 = ref(100)
- timer1.value = setInterval(ListScroll1, speed1.value)
-}
-// 寮�鍚畾鏃跺櫒
-function start2() {
- clearTimeout(timer2.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- let speed2 = ref(100)
- timer2.value = setInterval(ListScroll2, speed2.value)
-}
-// 寮�鍚畾鏃跺櫒
-function start3() {
- clearTimeout(timer3.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- let speed3 = ref(100)
- timer3.value = setInterval(ListScroll3, speed3.value)
-}
-// 寮�鍚畾鏃跺櫒
-function start4() {
- clearTimeout(timer4.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- let speed4 = ref(100)
- timer4.value = setInterval(ListScroll4, speed4.value)
-}
+
function ListScroll() {
+ if (!data.firstScroll) return
+ // console.log('ListScroll');
let scrollDom = scrollContainer.value
if (!scrollDom) return
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
if (scrollDom.offsetHeight == 0) {
scrollDom = scrollContainer.value
} else {
+ let maxLength = scrollDom.clientHeight/34
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length < 6) {
- clearTimeout(timer.value)
+ if (scrollDom.children.length <= maxLength) {
+ data.firstScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
+ // console.log(scrollDom.scrollHeight - scrollDom.clientHeight);
+ // console.log(scrollDom.scrollTop);
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -678,6 +625,8 @@
}
}
function ListScroll1() {
+ if (!data.secondScroll) return
+ // console.log('ListScroll1');
let scrollDom = scrollContainer1.value
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
if (!scrollDom) return
@@ -686,13 +635,16 @@
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
if (scrollDom.children.length < 7) {
- clearTimeout(timer1.value)
+ data.secondScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
+
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight-0.5)) {
+ console.log(scrollDom.scrollTop);
+ console.log(scrollDom.scrollHeight, scrollDom.clientHeight);
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -703,6 +655,8 @@
}
}
function ListScroll2() {
+ if (!data.thirdScroll) return
+ // console.log('ListScroll2');
let scrollDom = scrollContainer2.value
if (!scrollDom) return
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
@@ -711,15 +665,15 @@
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
if (scrollDom.children.length < 10) {
- clearTimeout(timer2.value)
+ data.thirdScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
// console.log('scrollDom.scrollTop', scrollDom.scrollTop);
// console.log('scrollDom.scrollHeight - scrollDom.clientHeight', scrollDom.scrollHeight - scrollDom.clientHeight);
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -730,6 +684,9 @@
}
}
function ListScroll3() {
+
+ if (!data.fourthScroll) return
+ // console.log('ListScroll3');
let scrollDom = scrollContainer3.value
if (!scrollDom) return
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
@@ -737,14 +694,17 @@
scrollDom = scrollContainer3.value
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length <= 5) {
- clearTimeout(timer3.value)
+ let num = scrollContainer3.value.offsetHeight / 35;
+ // alert(scrollDom.children.length +"---------------"+num)
+ // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
+ if (scrollDom.children.length <= num) {
+ data.fourthScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop = scrollDom.scrollTop+2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight -2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -755,21 +715,26 @@
}
}
function ListScroll4() {
+ if (!data.fifthScroll) return
+ // console.log('ListScroll4');
let scrollDom = scrollContainer4.value
if (!scrollDom) return
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
if (scrollDom.offsetHeight == 0) {
scrollDom = scrollContainer4.value
} else {
+ // console.log(bottom1.value.height);
+ let num = scrollContainer4.value.offsetHeight / 35;
+ // alert(scrollDom.children.length +"---------------"+num)
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length < 5) {
- clearTimeout(timer4.value)
+ if (scrollDom.children.length <= num) {
+ data.fifthScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -779,19 +744,38 @@
}
}
}
-
-// onUnmounted(() => {
-
-// })
+function scrillAction() {
+ ListScroll()
+ ListScroll1()
+ ListScroll2()
+ ListScroll3()
+ ListScroll4()
+}
onMounted(() => {
+ window.addEventListener('resize', () => {
+ setTypeChart()
+ setDayChart()
+ })
if (!departId.value) return;
- timer5.value = setInterval(init(), 60000)
+ init()
+ timer5.value = setInterval(init, 60000)
+ timer.value = setInterval(scrillAction, 100)
+})
+
+onUnmounted(() => {
+ console.log('鍋滄婊寸瓟');
+ clearTimeout(timer.value)
+ clearTimeout(timer5.value)
+
})
</script>
<style lang="scss" scoped>
+
+$fixed-height: 690px;
.content1 {
+
flex: 1;
width: 100%;
height: auto;
@@ -804,7 +788,8 @@
margin-right: 20px;
.content_left_item1 {
width: 100%;
- height: 284px;
+ height: calc(100vh - 690px);
+ // height: 284px;
margin-bottom: 20px;
.content_left_item1_head {
background: url('@/assets/img/home_title_short@2x.png');
@@ -828,7 +813,7 @@
.content_left_item1_content {
width: 100%;
- height: 246px;
+ height: calc(100% - 36px);
padding: 20px;
overflow: hidden;
box-sizing: border-box;
@@ -839,7 +824,8 @@
display: flex;
align-items: center;
justify-content: space-between;
- margin-bottom: 13px;
+ // margin-bottom: 13px;
+ padding: 7px 0;
&:last-child {
margin: 0;
@@ -965,7 +951,7 @@
.main_container {
width: 100%;
- height: calc(100% - 35px);
+ height: calc(100% - 38px);
.scroll_container {
width: 100%;
@@ -1079,8 +1065,13 @@
color: #01D9FE;
&:nth-child(5) {
- flex: 2.7;
-
+ flex: 3;
+ }
+ &:nth-child(4) {
+ flex: 0.7;
+ }
+ &:nth-child(6) {
+ flex: 0.7;
}
}
}
@@ -1117,10 +1108,15 @@
justify-content: center;
color: #FFFFFF;
font-size: 13px;
-
+ &:nth-child(4) {
+ flex: 0.7;
+ }
&:nth-child(5) {
flex: 3;
-
+ justify-content: start;
+ }
+ &:nth-child(6) {
+ flex: 0.7;
}
.scroll_item_row_item {
margin-top: -11px;
@@ -1276,7 +1272,8 @@
.content_center_bottom {
width: 100%;
- height: 284px;
+ // height: 284px;
+ height: calc(100vh - 690px);
flex: 2;
.content_center_bottom_head {
width: 100%;
@@ -1324,9 +1321,15 @@
font-weight: 500;
color: #01D9FE;
- &:nth-child(4) {
- flex: 2;
+ &:nth-child(5) {
+ flex: 0.5;
}
+ &:nth-child(6) {
+ flex: 0.5;
+ }
+ &:nth-child(7) {
+ flex: 0.7;
+ }
}
}
@@ -1365,9 +1368,16 @@
justify-content: center;
color: #FFFFFF;
- &:nth-child(4) {
- flex: 2;
+ &:nth-child(5) {
+ flex: 0.5;
}
+ &:nth-child(6) {
+ flex: 0.5;
+ }
+ &:nth-child(7) {
+ flex: 0.7;
+ }
+
}
}
}
@@ -1417,8 +1427,8 @@
left: 50%;
transform: translate(-50%, -50%);
z-index: 999;
- width: 114px;
- height: 114px;
+ width: 100px;
+ height: 100px;
border-radius: 50%;
border: 2px dashed #01D9FE;
display: flex;
@@ -1460,8 +1470,9 @@
.content_right_bottom {
width: 100%;
- height: 284px;
+ // height: 284px;
+ height: calc(100vh - 690px);
.content_right_bottom_head {
width: 100%;
height: 38px;
@@ -1506,8 +1517,11 @@
font-weight: 500;
color: #01D9FE;
- &:first-child {
- flex: 2;
+ // &:first-child {
+ // flex: 2;
+ // }
+ &:nth-child(3) {
+ flex: 0.7;
}
}
}
@@ -1546,10 +1560,12 @@
align-items: center;
justify-content: center;
color: #FFFFFF;
-
- &:first-child {
- flex: 2;
+ &:nth-child(3) {
+ flex: 0.7;
}
+ // &:first-child {
+ // flex: 2;
+ // }
}
}
}
diff --git a/screen_standard/src/views/process.vue b/screen_standard/src/views/process.vue
index 3ac67d4..5ddfde1 100644
--- a/screen_standard/src/views/process.vue
+++ b/screen_standard/src/views/process.vue
@@ -113,7 +113,7 @@
</template>
<script setup>
-import { reactive, ref, toRefs, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
+import { reactive, ref, toRefs, onMounted, onUnmounted, nextTick } from 'vue'
import { getProcedurePlanData, getTop, getProcedurePlansList, getRecordLogPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js'
import { useCounterStore } from '@/stores/counter.js'
import { useRoute } from 'vue-router'
@@ -122,8 +122,7 @@
const route = useRoute()
const enterprise = useCounterStore()
let mainTimer = ref(null)
-let planTimer = ref(null)
-let reportTimer = ref(null)
+let scrollTimer = ref(null)
let planContainer = ref(null)
let reportLogContainer = ref(null)
const data = reactive({
@@ -140,19 +139,26 @@
{ categoryName: '灏哄涓嶈壇', unqualifiedNum: 22 },
{ categoryName: '鏈夊垝鐥�', unqualifiedNum: 5 },
{ categoryName: '鍏朵粬', unqualifiedNum: 2 },
- ]
+ ],
+ planScroll: false,
+ reportScroll: false,
})
let { listData, top1, top2, baseNum, allBad, reportListData } = toRefs(data)
-// start()
-onBeforeUnmount(() => {
- clearTimeout(planTimer.value)
- clearTimeout(reportTimer.value)
- clearTimeout(mainTimer.value)
-})
onMounted(() => {
+ window.addEventListener('resize', () => {
+ console.log('resize');
+ nextTick(() => {
+ setDayChart()
+ setTypeChart()
+ })
+ })
initData()
+ scrollTimer.value = setInterval(() => {
+ ListScroll()
+ reportScroll()
+ }, 100)
mainTimer.value = setInterval(() => {
initData()
}, 60000)
@@ -160,8 +166,7 @@
onUnmounted(() => {
- clearTimeout(planTimer.value)
- clearTimeout(reportTimer.value)
+ clearTimeout(scrollTimer.value)
clearTimeout(mainTimer.value)
})
@@ -175,7 +180,6 @@
getTop(enterprise.companyId, enterprise.departId, { procedureId: route.query.procedureId })
.then(res => {
if (res.length) {
-
data.baseNum = res[0].doneNum
data.top1 = []
data.top2 = []
@@ -196,52 +200,46 @@
getProcedurePlansList(enterprise.companyId, enterprise.departId, { procedureId: route.query.procedureId })
.then(res => {
data.listData = res
- start()
+ data.planScroll = true
})
// 鎶ュ伐鏃ュ織鍒嗛〉鏌ヨ
- getRecordLogPage(enterprise.companyId, enterprise.departId, { capacity: 9999, page: 1, model: { procedureId: route.query.procedureId } })
+ getRecordLogPage(enterprise.companyId, enterprise.departId, { capacity: 20, page: 1, model: { procedureId: route.query.procedureId } })
.then(res => {
data.reportListData = res.records
- reportStart()
+ data.reportScroll = true
})
getUnqualified7DayData(enterprise.companyId, enterprise.departId, route.query.procedureId)
.then(res => {
data.dayDistribution = res
+ data.allBad = res.reduce((accumulator, currentValue) => accumulator + currentValue.unqualifiedNum, 0)
setDayChart()
})
getUnqualifiedCateData(enterprise.companyId, enterprise.departId, route.query.procedureId)
.then(res => {
data.typeDistribution = res
- data.allBad = res.reduce((accumulator, currentValue) => accumulator + currentValue.unqualifiedNum, 0)
setTypeChart()
})
}
-
+// 榧犳爣绉诲叆
function handleMouseEnter() {
- clearTimeout(planTimer.value)
+ data.planScroll = false
}
function handleMouseLeave() {
- start()
+ data.planScroll = true
}
-
+// 榧犳爣绉婚櫎
function handleMouseEnterReport() {
- clearTimeout(reportTimer.value)
+ data.reportScroll = false
}
function handleMouseLeaveReport() {
- reportStart()
+ data.reportScroll = true
}
/**
- * 宸ュ簭璁″垝
+ * 宸ュ簭璁″垝婊氬姩鏂规硶
*/
-// 寮�鍚畾鏃跺櫒
-function start() {
- clearTimeout(planTimer.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- // let speed = ref(100)
- planTimer.value = setInterval(ListScroll, 100)
-}
function ListScroll() {
+ if (!data.planScroll) return
let scrollDom = planContainer.value
if (!scrollDom) return
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
@@ -249,14 +247,14 @@
scrollDom = planContainer.value
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length < 10) {
- clearTimeout(planTimer.value)
+ if (scrollDom.children.length < 11) {
+ data.planScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1.5
+ scrollDom.scrollTop += 2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -267,15 +265,10 @@
}
}
/**
- * 鎶ュ伐鏃ュ織
+ * 鎶ュ伐鏃ュ織婊氬姩鏂规硶
*/
-function reportStart() {
- clearTimeout(reportTimer.value)
- // 瀹氭椂鍣ㄨЕ鍙戝懆鏈�
- // let speed = ref(100)
- reportTimer.value = setInterval(reportScroll, 100)
-}
function reportScroll() {
+ if (!data.reportScroll) return
let scrollDom = reportLogContainer.value
if (!scrollDom) return
// 鍒よ缁勪欢鏄惁娓叉煋瀹屾垚
@@ -284,13 +277,13 @@
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
if (scrollDom.children.length < 10) {
- clearTimeout(reportTimer.value)
+ data.reportScroll = false
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1.5
+ scrollDom.scrollTop += 2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight - 2)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -321,6 +314,10 @@
color: '#fff',
fontSize: 12
}
+ },
+ grid: {
+ top: 40,
+ bottom: 40
},
xAxis: {
type: 'category',
@@ -397,6 +394,7 @@
*/
function setTypeChart() {
let dayChartDom = document.getElementById('type-distribution');
+ console.log(dayChartDom);
let myChart = echarts.init(dayChartDom);
let legendData = []
let seriesData = []
@@ -495,13 +493,14 @@
flex: 1;
margin-right: 20px;
.proccess-plan {
- height: 424px;
+ height: 464px;
background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%);
margin-bottom: 20px;
}
.today-yield {
- height: 222px;
+ height: calc(100vh - 725px);
+ min-height: 226px;
background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%);
.yield-content {
@@ -601,13 +600,14 @@
flex: 1;
.report-log {
- height: 424px;
+ height: 464px;
background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%);
margin-bottom: 20px;
}
.bad-diagram {
- height: 222px;
+ height:calc(100vh - 725px);;
+ min-height: 226px;
background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%);
.bad-content {
diff --git a/screen_standard/vite.config.js b/screen_standard/vite.config.js
index af60791..0d025d2 100644
--- a/screen_standard/vite.config.js
+++ b/screen_standard/vite.config.js
@@ -13,7 +13,7 @@
let env = loadEnv(mode, process.cwd(), '')
console.log('-------');
console.log(env.VITE_BASE_PATH);
- console.log(env.VITE_BASE_URL);
+ console.log(env.VITE_BASE_PATH.replace(env.VITE_BASE_PATH, ''));
console.log('-------');
return {
base:env.VITE_BASE_CONTEXT,
@@ -50,9 +50,9 @@
target: env.VITE_BASE_URL, // 閫氳繃浠g悊鎺ュ彛璁块棶瀹為檯鍦板潃銆傝繖閲屾槸瀹為檯璁块棶鐨勫湴鍧�銆倂ue浼氶�氳繃浠g悊鏈嶅姟鍣ㄦ潵浠g悊璇锋眰
changeOrigin: true,
ws: false, // 鍏佽websocket浠g悊
- // rewrite: (path) => path.replace(/^[env.VITE_BASE_PATH]/, ''), // 灏哸pi鏇挎崲涓虹┖
secure: false,
- rewrite: (path) => path.replace(/^\/api/, '')
+ rewrite: (path) => path.replace(env.VITE_BASE_PATH, '/'),
+ // rewrite: (path) => path.replace(/^\api/, ''), // 灏哸pi鏇挎崲涓虹┖
},
/*'/api' : {
target: env.VITE_BASE_URL, // 閫氳繃浠g悊鎺ュ彛璁块棶瀹為檯鍦板潃銆傝繖閲屾槸瀹為檯璁块棶鐨勫湴鍧�銆倂ue浼氶�氳繃浠g悊鏈嶅姟鍣ㄦ潵浠g悊璇锋眰
--
Gitblit v1.9.3