Compare commits

...

13 Commits

Author SHA1 Message Date
‘937886381’
035bf0e095 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-05 14:14:44 +08:00
‘937886381’
69f953fb0c 修改 2024-06-05 14:14:12 +08:00
d43a53e7f5 Merge pull request '修改bug' (#32) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #32
2024-06-04 15:43:44 +08:00
7fc6ed87a4 修改bug 2024-06-04 15:43:00 +08:00
006d44b842 Merge pull request 'projects/mescc/zjl' (#31) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #31
2024-06-04 09:09:27 +08:00
7c6949dfa0 Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-04 09:08:07 +08:00
78f7784f23 router 2024-06-04 09:07:23 +08:00
7d7e4314e9 Merge pull request 'projects/mescc/dy' (#30) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #30
2024-06-04 08:57:54 +08:00
helloDy
c77130603e merge 2024-06-04 08:56:52 +08:00
helloDy
7cb8abd618 滚动条 2024-06-04 08:55:45 +08:00
c6169afaec Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-04 08:36:06 +08:00
ff98ad35c5 logo图标等 2024-06-04 08:35:23 +08:00
acb87e86a1 Merge pull request 'projects/mescc/zhp' (#29) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #29
2024-06-03 16:44:17 +08:00
50 changed files with 9919 additions and 9236 deletions

View File

@ -1,15 +1,15 @@
###
# @Author: zhp
# @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-03 15:41:29
# @LastEditors: zhp
# @LastEditTime: 2024-06-04 08:56:35
# @LastEditors: DY
# @Description:
###
# 开发环境配置
ENV = 'development'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.1.70:30307'
@ -26,7 +26,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
VUE_APP_CAPTCHA_ENABLE = false
# 文档的开关
VUE_APP_DOC_ENABLE = true

View File

@ -2,7 +2,7 @@
ENV = 'development'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/本地环境
VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn'
@ -14,7 +14,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
VUE_APP_CAPTCHA_ENABLE = false
# 文档的开关
VUE_APP_DOC_ENABLE = true

View File

@ -2,7 +2,7 @@
NODE_ENV = 'production'
# 页面标题
VUE_APP_TITLE = 玻璃控股信息平台
VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/生产环境
VUE_APP_BASE_API = ''
@ -16,7 +16,7 @@ PUBLIC_PATH = ''
VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
VUE_APP_CAPTCHA_ENABLE = false
# 文档的开关
VUE_APP_DOC_ENABLE = false

View File

@ -1,7 +1,7 @@
NODE_ENV = production
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = 发电玻璃智能管控平台
# 测试环境配置
ENV = 'staging'
@ -16,7 +16,7 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
VUE_APP_CAPTCHA_ENABLE = false
# 文档的开关
VUE_APP_DOC_ENABLE = false

View File

@ -4,7 +4,7 @@ NODE_ENV = development
ENV = 'staging'
# 页面标题
VUE_APP_TITLE = 芋道管理系统
VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/测试环境
VUE_APP_BASE_API = 'http://127.0.0.1:48080'
@ -18,7 +18,7 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
VUE_APP_CAPTCHA_ENABLE = false
# 文档的开关
VUE_APP_DOC_ENABLE = true

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2024-05-07 08:54:59
* @LastEditTime: 2024-05-31 15:08:27
* @LastEditTime: 2024-06-03 14:25:02
* @LastEditors: DY
* @Description:
*/
@ -50,3 +50,11 @@ export function exportExcel(data) {
responseType: 'blob'
})
}
// 获得工单数据概览
export function getOverView(){
return request({
url: '/ip/prod-work-order/getOverView',
method: 'get'
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -49,7 +49,7 @@
</template>
<script>
import logoImg from "@/assets/logo/logo.png";
import logoImg from "@/assets/logo/cnbm.png";
import variables from "@/assets/styles/variables.scss";
export default {
@ -70,7 +70,7 @@ export default {
},
data() {
return {
title: "玻璃控股信息平台",
title: "发电玻璃智能管控平台",
logo: logoImg,
};
},
@ -104,7 +104,7 @@ export default {
width: 32px;
height: 32px;
vertical-align: middle;
margin-right: 12px;
margin-right: 10px;
}
& .sidebar-title {
@ -113,7 +113,7 @@ export default {
color: #fff;
font-weight: 600;
line-height: 50px;
font-size: 14px;
font-size: 19px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}

View File

@ -127,7 +127,8 @@ Router.prototype.push = function push(location) {
export default new Router({
base: process.env.VUE_APP_APP_NAME ? process.env.VUE_APP_APP_NAME : "/",
mode: "history", // 去掉url中的#
// mode: "history", // 去掉url中的#
mode: "hash",
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes,
});

View File

@ -96,7 +96,7 @@ const actions = {
let preData = dataArr.previousProdOutputOutDO
let preFtoData = dataArr.previousProdOutputFtoDO
// const targetArr = await getHomeInfo();
const payload = splitCurrentAndPrevious(dataArr.prodOutputOutDO, dataArr.prodTargetDO,dataArr.prodOutputFtoDO,preData,preFtoData);
const payload = splitCurrentAndPrevious(dataArr.prodOutputOutDO, dataArr.prodTargetOutputDO,dataArr.prodOutputFtoDO,dataArr.previousProdOutputOutDO,preData,preFtoData);
commit("SET_HOME_INFO", payload);
},
/** 初始化驾驶舱数据 */
@ -345,7 +345,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
if (preData && preData[0] != null) {
for (const factory of preData) {
const fId = getPreFactoryId(factory);
chipInvest.previous[fId] = factory.previousYearInputNumber;
// chipInvest.previous[fId] = factory.previousYearInputNumber;
// chipOeeRate.current[fId] = factory.oee;
chipOeeRate.previous[fId] = factory.previousYearOee;
// 转化效率

View File

@ -83,6 +83,7 @@ export default {
nameTextStyle: {
color: "#fff",
fontSize: 12,
align: "right",
},
axisTick: {
show: false,

View File

@ -7,9 +7,13 @@
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
@click="() => $emit('update:than', i)" />
<div class="btn-group">
<el-tooltip class="item" effect="dark" content="导出" placement="top">
<button type="button" class="export-btn" @click="handleExport" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="isFullscreen === false ? '退出全屏' : '全屏'" placement="top">
<button type="button" class="fullscreen-btn" :class="[isFullscreen ? 'exit-fullscreen' : '']"
@click="toggleFullScreen" />
</el-tooltip>
</div>
</section>
<div class="page-title">{{ companyName }}</div>
@ -46,7 +50,8 @@ export default {
},
data() {
return {
isFullscreen: false,
// isFullscreen: false,
content:'全屏',
dataList: [
{ id: 1, name: "日" },
{ id: 2, name: "周" },
@ -61,6 +66,7 @@ export default {
exportFactoryDataExcel({
factoryId: this.companyId,
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
compare: this.than === '同比' ? 1 : 2
}).then(response => {
this.$download.excel(response, `${this.companyName}生产数据.xls`);
// this.exportLoading = false;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-23 15:49:14
* @LastEditTime: 2024-05-31 16:06:50
* @LastEditTime: 2024-06-04 08:54:10
* @LastEditors: zhp
* @Description:
-->
@ -84,6 +84,7 @@ export default {
nameTextStyle: {
color: "#fff",
fontSize: 12,
align: "right",
},
axisTick: {
show: false,

View File

@ -0,0 +1,234 @@
<!--
* @Author: zhp
* @Date: 2024-06-05 09:43:51
* @LastEditTime: 2024-06-05 09:43:52
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button
v-if="false"
style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
"
@click="$emit('refresh')"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div
class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"
>
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 100%;
width: 0.11415vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(
circle at center,
#024798 2%,
#024798 30%,
transparent
);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 60%;
height: 0.31415vh;
border-radius: 2px;
left: 8%;
bottom: 0;
background: linear-gradient(to right, #024798, transparent);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1.18vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.95vw;
height: 0.95vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@ -41,8 +41,8 @@
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div v-if="side == 'left'" class="corner bl"></div>
<div v-if="side == 'right'" class="corner br"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div
class="container-head"
@ -207,10 +207,11 @@ export default {
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
border-right: 0.532vw solid transparent;
}
.gradient-to-right {

View File

@ -0,0 +1,239 @@
<!--
* @Author: zhp
* @Date: 2024-06-05 09:48:37
* @LastEditTime: 2024-06-05 09:53:49
* @LastEditors: zhp
* @Description:
-->
<!--
filename: Container.vue
author: liubin
date: 2024-04-09 10:44:09
description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button
v-if="0"
style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
"
@click="$emit('refresh')"
>rotate
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div
class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"
>
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 100%;
width: 0.11415vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(
circle at center,
#024798 2%,
#024798 30%,
transparent
);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 60%;
height: 0.31415vh;
border-radius: 2px;
left: 8%;
bottom: 0;
background: linear-gradient(to right, #024798, transparent);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1.18vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.95vw;
height: 0.95vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid #0175dc;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@ -25,7 +25,7 @@ import YieldCopilot from "./yield/index.vue";
// import EfficiencyCopilot from "./efficiency/index.vue";
export default {
name: "CopilotContainer",
name: "copilotContainer",
components: {
CopilotHeaderVue,
YieldCopilot,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-07 10:25:10
* @LastEditTime: 2024-06-03 16:40:45
* @LastEditTime: 2024-06-04 14:18:52
* @LastEditors: zhp
* @Description:
-->
@ -33,7 +33,15 @@ export default {
default: "同比",
},
},
data() {
return {
// data: null
}
},
computed: {
data() {
return this.$store.getters.copilot.efficiency.stdRate
},
cities() {
console.log('ztl', this.$store.getters.copilot.efficiency.stdRate)
// let getterName = "";
@ -57,22 +65,22 @@ export default {
{ name: "凯盛光伏", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
{ name: "蚌埠", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
]
if (this.$store.getters.copilot?.efficiency.stdRate?.previous) {
this.$store.getters.copilot?.efficiency.stdRate?.previous.forEach(
if (this.data?.previous) {
this.data?.previous.forEach(
(v, idx) => {
_cities[idx].previous = v ?? 0;
}
);
}
if (this.$store.getters.copilot?.efficiency.stdRate?.target) {
this.$store.getters.copilot?.efficiency.stdRate?.target.forEach(
if (this.data?.target) {
this.data?.target.forEach(
(v, idx) => {
_cities[idx].target = v ?? 0;
}
)
}
if (this.$store.getters.copilot?.efficiency.stdRate?.current) {
this.$store.getters.copilot?.efficiency.stdRate?.current.forEach(
if (this.data?.current) {
this.data?.current.forEach(
(v, idx) => {
_cities[idx].current = v ?? 0;
}
@ -86,19 +94,24 @@ export default {
return arr;
},
},
data() {
return {
// cities: [
// { name: "", target: 100, total: 200, current: 20 },
// { name: "", target: 200, total: 300, current: 20 },
// { name: "", target: 300, total: 400, current: 20 },
// { name: "", target: 400, total: 500, current: 20 },
// { name: "", target: 500, total: 600, current: 20 },
// { name: "", target: 400, total: 500, current: 20 },
// { name: "", target: 500, total: 600, current: 20 },
// ],
};
watch: {
period() {
this.data = this.$store.getters.copilot.efficiency.stdRate
}
},
// data() {
// return {
// // cities: [
// // { name: "", target: 100, total: 200, current: 20 },
// // { name: "", target: 200, total: 300, current: 20 },
// // { name: "", target: 300, total: 400, current: 20 },
// // { name: "", target: 400, total: 500, current: 20 },
// // { name: "", target: 500, total: 600, current: 20 },
// // { name: "", target: 400, total: 500, current: 20 },
// // { name: "", target: 500, total: 600, current: 20 },
// // ],
// };
// },
methods: {},
};
</script>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-07 10:04:53
* @LastEditTime: 2024-06-03 16:08:27
* @LastEditTime: 2024-06-05 09:45:47
* @LastEditors: zhp
* @Description:
-->
@ -12,17 +12,17 @@
<Container title="芯片良率" icon="chip2">
<ChipRate :period="period" :than="than" />
</Container>
<Container title="标准组件良率" icon="std">
<left-container title="标准组件良率" icon="std">
<StdRate :period="period" :than="than" />
</Container>
</left-container>
</section>
<section class="bottom flex">
<Container title="芯片OEE" icon="chip">
<ChipOee :chipOeeRate="chipOeeRate" :period="period" :than="than" />
</Container>
<Container title="转化效率" icon="cube">
<left-container title="转化效率" icon="cube">
<TransformRate :transformRate="transformRate" :period="period" :than="than" />
</Container>
</left-container>
</section>
@ -30,7 +30,8 @@
</template>
<script>
import Container from "@/views/copilot/components/Container.vue";
import Container from "@/views/copilot/components/rightContainer.vue";
import leftContainer from "@/views/copilot/components/leftContainer.vue";
import ChipOeeVue from "./components/ChipOee.vue";
import ChipRateVue from "./components/ChipRate.vue";
import StdRateVue from "./components/StdRate.vue";
@ -40,6 +41,7 @@ export default {
name: "efficiencyCopilot",
components: {
Container,
leftContainer,
ChipOee: ChipOeeVue,
ChipRate: ChipRateVue,
StdRate: StdRateVue,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-20 16:04:18
* @LastEditTime: 2024-06-03 15:45:58
* @LastEditTime: 2024-06-03 16:46:11
* @LastEditors: zhp
* @Description:
-->
@ -25,7 +25,7 @@ import CopilotHeaderVue from "./components/CopilotHeader.vue";
import EfficiencyCopilot from "./efficiency/index.vue";
export default {
name: "CopilotContainer",
name: "copilotEfficiencyContainer",
components: {
CopilotHeaderVue,
EfficiencyCopilot,

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,8 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +39,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer: leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,8 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +39,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer: leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -231,7 +231,13 @@ export default {
console.log("this.energyCockpits", this.energyCockpits);
let orderXAxis = ['目标产量', '计划投入量', '实际投入量', '实际产出量', '废品数量', '待再加工数量'];
// let n = 0;
let seriesArr =[]
let seriesArr = []
// let arr = []
// if (this.energyCockpits) {
// this.energyCockpits.forEach(ele => {
// arr.push()
// });
// }
seriesArr[0] = this.energyCockpits.length != 0 && this.energyCockpits[0].targetProduction ? this.energyCockpits[0].targetProduction :0
seriesArr[1] = this.energyCockpits.length != 0 && this.energyCockpits[0].plannedInvestment ? this.energyCockpits[0].plannedInvestment : 0
seriesArr[2] = this.energyCockpits.length != 0 && this.energyCockpits[0].actualInvestment ? this.energyCockpits[0].actualInvestment : 0

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-30 08:58:39
* @LastEditTime: 2024-05-31 15:52:28
* @LastEditTime: 2024-06-05 09:15:03
* @LastEditors: zhp
* @Description:
-->
@ -83,6 +83,7 @@ export default {
nameTextStyle: {
color: "#fff",
fontSize: 12,
align: "right",
},
axisTick: {
show: false,
@ -173,32 +174,11 @@ export default {
},
{
name: "", // "2024",
type: "bar",
type: "line",
barWidth: 12,
itemStyle: {
borderRadius: [10, 10, 0, 0],
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#f3c000", // 0%
},
{
offset: 1,
color: "#f3c00033",
},
{
offset: 1,
color: "transparent", // 100%
},
],
global: false, // false
},
color:'#f3c000'
},
data: [], // this.series[0].data,
},
@ -337,7 +317,32 @@ export default {
background-color: #58adfa;
}
.legend-item:nth-child(3):before {
// width: 12px;
// height: 2px;
width: 1vw;
height: 0.1064vw;
background-color: #f3c000;
position: absolute;
top: 50%;
// left: -16px;
left: -0.951vw;
transform: translateY(-50%);
}
.legend-item:nth-child(3):after {
background-color: #f3c000;
content: "";
display: inline-block;
position: absolute;
// width: 6px;
// height: 6px;
width: 0.3191vw;
height: 0.3191vw;
border-radius: 100%;
top: 50%;
left: -0.851vw;
// left: -16px;
transform: translateY(-50%) translateX(50%);
}
}
</style>

View File

@ -23,7 +23,7 @@
<div class="separate">
<div>
<span class="type">玻璃类型</span>
<span class="type-name">标准组产量</span>
<span class="type-name">标准组产量</span>
</div>
<div>
<span class="type">良品数量</span>

View File

@ -0,0 +1,241 @@
<!--
* @Author: zhp
* @Date: 2024-06-05 09:36:07
* @LastEditTime: 2024-06-05 09:38:23
* @LastEditors: zhp
* @Description:
-->
<!--
filename: Container.vue
author: liubin
date: 2024-04-09 10:44:09
description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button
v-if="false"
style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
"
@click="$emit('refresh')"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div
class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"
>
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 100%;
width: 0.11415vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(
circle at center,
#024798 2%,
#024798 30%,
transparent
);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 60%;
height: 0.31415vh;
border-radius: 2px;
left: 8%;
bottom: 0;
background: linear-gradient(to right, #024798, transparent);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1.18vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.95vw;
height: 0.95vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@ -0,0 +1,233 @@
<!--
filename: Container.vue
author: liubin
date: 2024-04-09 10:44:09
description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button
v-if="false"
style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
"
@click="$emit('refresh')"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div
class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"
>
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 100%;
width: 0.11415vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(
circle at center,
#024798 2%,
#024798 30%,
transparent
);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 60%;
height: 0.31415vh;
border-radius: 2px;
left: 8%;
bottom: 0;
background: linear-gradient(to right, #024798, transparent);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1.18vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.95vw;
height: 0.95vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid #0175dc;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,8 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +39,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer: leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,9 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +40,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer:leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,8 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +39,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer: leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,8 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +39,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer: leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-21 13:24:03
* @LastEditTime: 2024-05-21 13:24:03
* @LastEditTime: 2024-06-05 09:43:30
* @LastEditors: zhp
* @Description:
-->
@ -37,7 +37,7 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
// import Container from "./components/Container.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import Store from "./components/Store.vue";
import Energy from "./components/Energy.vue";
@ -47,7 +47,7 @@ export default {
name: "factoryData",
components: {
FactoryDataHeader,
DbContainer: Container,
// DbContainer: Container,
ProdMonitor,
Store,
Energy,

View File

@ -8,9 +8,9 @@
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container>
<db-container title="工单监控" icon="order">
<left-container title="工单监控" icon="order">
<order :prodOrder="prodOrder" />
</db-container>
</left-container>
<!-- <db-container title="" icon="store"> -->
<!-- <store :stock="stock" /> -->
<!-- </db-container> -->
@ -26,7 +26,9 @@
</template>
<script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/Container.vue";
import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue";
import { deepClone } from "@/utils";
// import Store from "./components/Store.vue";
@ -38,6 +40,7 @@ export default {
components: {
FactoryDataHeader,
DbContainer: Container,
LeftContainer: leftContainer,
ProdMonitor,
// Store,
// Energy,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-20 13:32:59
* @LastEditTime: 2024-06-03 16:26:24
* @LastEditTime: 2024-06-05 13:43:13
* @LastEditors: zhp
* @Description:
-->
@ -115,21 +115,25 @@ export default {
items = [
{ label: `${month}${today}日累计`,},
{ label: `去年${month}${today}日累计` },
{ label: `${month}${today}日目标`, },
];
} else if (this.period === '日' && this.than === '环比') {
items = [
{ label: `${month}${today}日累计`},
{ label: `${yesterday}日累计`},
{ label: `${yesterday}日累计` },
{ label: `${month}${today}日目标`, },
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `本周累计`,},
{ label: `去年本周累计`},
{ label: `去年本周累计` },
{ label: `本周目标`, },
];
} else if (this.period === '周' && this.than === '环比') {
items = [
{ label: `本周累计`,},
{ label: `上周累计`,},
{ label: `上周累计`, },
{ label: `本周目标`, },
];
} else if (this.period === '月' && this.than === '同比') {
items = [
@ -156,9 +160,9 @@ export default {
: (vt[1] != 0 && vt[1] != null) && vt[2] == 0
? "100%" : '0%',
subtitle =
this.period == "日" ? `${month}${today}日累计` : this.period == "周" ? `本周` : this.period == "月" ? `${month}月累计产出` : `${year}年累计产出`;
this.period == "日" ? `${month}${today}日累计完成` : this.period == "周" ? `本周累计完成` : this.period == "月" ? `${month}月累计完成` : `${year}年累计完成`;
console.log(this.valueTuple[0], this.valueTuple[1], this.valueTuple[2],)
console.log(items)
console.log(this.valueTuple[2]- this.valueTuple[1])
return getOptions({
titleValue,
subtitle,
@ -166,7 +170,7 @@ export default {
preName: items[1].label,
previousSum: this.valueTuple[0],
currentSum: this.valueTuple[1],
targetSum: this.valueTuple[2] ? this.valueTuple[2] :0 ,
targetSum: this.valueTuple[2] ? this.valueTuple[2] :0,
});
},
@ -213,7 +217,8 @@ export default {
},
};
function calculateItems(period, valueTuple,than) {
function calculateItems(period, valueTuple, than) {
console.log('valueTuple', valueTuple);
let items = [];
var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
@ -231,21 +236,25 @@ function calculateItems(period, valueTuple,than) {
items = [
{ label: `去年${month}${today}日累计`, value: valueTuple[0] },
{ label: `${month}${today}日累计`, value: valueTuple[1] },
{ label: `${month}${today}日目标`, value: valueTuple[2] },
];
} else if (period === '日' && than === '环比') {
items = [
{ label: `${yesterday}日累计`, value: valueTuple[0] },
{ label: `${month}${today}日累计`, value: valueTuple[1] },
{ label: `${month}${today}日目标`, value: valueTuple[2] },
];
} else if (period === '周' && than === '同比') {
items = [
{ label: `去年本周累计`, value: valueTuple[0] },
{ label: `本周累计`, value: valueTuple[1] },
{ label: `本周目标`, value: valueTuple[2] },
];
} else if (period === '周' && than === '环比') {
items = [
{ label: `上周累计`, value: valueTuple[0] },
{ label: `本周累计`, value: valueTuple[1] },
{ label: `本周目标`, value: valueTuple[2] },
];
} else if (period === '月' && than === '同比') {
items = [

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-10 11:10:54
* @LastEditTime: 2024-05-28 13:36:07
* @LastEditTime: 2024-06-05 09:49:46
* @LastEditors: zhp
* @Description:
-->
@ -9,29 +9,32 @@
<template>
<div class="yield-copilot">
<section class="top flex">
<db-container class="std-yield" title="标准组件产出" icon="std">
<right-container class="std-yield" title="标准组件产出" icon="std">
<std-output v-if="show" :period="period" :than="than" />
</db-container>
</right-container>
<db-container class="chip-yield" title="芯片产出" icon="chip2">
<chip-output v-if="show" :period="period" :than="than" />
</db-container>
<db-container class="bipv-yield" title="BIPV产出" icon="bipv">
<left-container class="bipv-yield" title="BIPV产出" icon="bipv">
<bipv-output v-if="show" :period="period" :than="than" />
</db-container>
</left-container>
</section>
<section class="bottom flex">
<db-container class="fto-involve" title="FTO投入">
<right-container class="fto-involve" title="FTO投入">
<fto-invest :period="period" :than="than" />
</db-container>
<db-container class="chip-involve" title="芯片投入" icon="chip">
</right-container>
<left-container class="chip-involve" title="芯片投入" icon="chip">
<chip-invest :period="period" :than="than" />
</db-container>
</left-container>
</section>
</div>
</template>
<script>
import Container from "@/views/copilot/components/Container.vue";
import twoContainer from "@/views/copilot/components/twoContainer.vue";
import leftContainer from "@/views/copilot/components/leftContainer.vue";
import rightContainer from "@/views/copilot/components/rightContainer.vue";
import StdOutput from "./components/StdOutput.vue";
import ChipOutput from "./components/ChipOutput.vue";
import FtoInvest from "./components/FtoInvest.vue";
@ -41,7 +44,9 @@ import ChipInvest from "./components/ChipInvest.vue";
export default {
name: "YieldCopilot",
components: {
DbContainer: Container,
DbContainer: twoContainer,
leftContainer,
rightContainer,
StdOutput,
ChipOutput,
BipvOutput,

View File

@ -61,6 +61,9 @@ export default ({
value: currentSum,
name: currentName,
selected: false,
tooltip: {
formatter: `${currentName} : ${currentSum}`
},
itemStyle: {
borderJoin: "round",
borderCap: "round",
@ -80,10 +83,11 @@ export default ({
},
},
{
value:currentSum == 0
? 1
: 0,
name: "未达成累计",
value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
name: currentName,
tooltip: {
formatter: `${currentName} : ${currentSum}`
},
itemStyle: { color: "transparent" },
label: { show: false },
},
@ -106,6 +110,9 @@ export default ({
value: previousSum,
name: preName,
selected: false,
tooltip: {
formatter: `${preName} : ${previousSum}`
},
itemStyle: {
borderJoin: "round",
borderCap: "round",
@ -125,10 +132,12 @@ export default ({
},
},
{
value:previousSum == 0
? 1
: 0,
name: "-",
value:previousSum === 0 ? 1 : 0,
name: preName,
tooltip: {
formatter: `${preName} : ${previousSum}`
},
itemStyle: { color: "transparent" },
label: { show: false },
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-05-31 16:11:56
* @LastEditTime: 2024-06-05 14:12:31
* @LastEditors: zhp
* @Description:
-->
@ -98,9 +98,12 @@ export default {
},
data: [
{
value: 90,
value: 0,
name: `${year}累计产出`,
selected: false,
tooltip: {
formatter: null,
},
itemStyle: {
borderJoin: "round",
borderCap: "round",
@ -120,8 +123,11 @@ export default {
},
},
{
value: 20,
name: "-",
value: 0,
name: `${year}目标`,
tooltip: {
formatter: null,
},
itemStyle: { color: "transparent" },
label: { show: false },
},
@ -141,9 +147,12 @@ export default {
},
data: [
{
value: 90,
value: 0,
name: `${year - 1}累计产出`,
selected: false,
tooltip: {
formatter: null,
},
itemStyle: {
borderJoin: "round",
borderCap: "round",
@ -164,7 +173,10 @@ export default {
},
{
value: 0,
name: "-",
name: `${year - 1}累计产出`,
tooltip: {
formatter:null,
},
itemStyle: { color: "transparent" },
label: { show: false },
},
@ -209,7 +221,9 @@ export default {
};
},
actualOptions() {
const year = new Date().getFullYear()
const options = JSON.parse(JSON.stringify(this.options));
// console.log('options', options);
//
if (!this.output.target) options.title.text = "0%";
else
@ -221,20 +235,29 @@ export default {
this.output.current == 0
) {
options.series[1].data[0].value = 0;
options.series[1].data[1].value = 100;
options.series[1].data[1].value = 1;
options.series[1].data[0].tooltip.formatter = year + '累计完成:0';
options.series[1].data[1].tooltip.formatter = year + '累计完成:0';
} else {
options.series[1].data[0].value = this.output.current;
options.series[1].data[1].value =
this.output.target - this.output.current;
options.series[1].data[0].tooltip.formatter = year + '累计完成:' + this.output.current;
options.series[1].data[1].tooltip.formatter = year + '累计完成:' + this.output.current;
}
//
if (this.output.previous == 0) {
options.series[2].data[0].value = 0;
options.series[2].data[1].value = 100;
options.series[2].data[1].value = 1;
options.series[2].data[0].tooltip.formatter = year-1 + '累计完成:' + 0;
options.series[2].data[1].tooltip.formatter = year-1 + '累计完成:' + 0;
} else {
options.series[2].data[0].value = this.output.previous;
options.series[2].data[1].value = 0;
options.series[2].data[0].tooltip.formatter = year - 1 + '累计完成:' + this.output.previous;
options.series[2].data[1].tooltip.formatter = year - 1 + '累计完成:' + this.output.previous;
}
console.log('options', options);
return options;
},
},

View File

@ -86,6 +86,7 @@ export default {
nameTextStyle: {
color: "#fff",
fontSize: 12,
align:'right'
},
axisTick: {
show: false,
@ -113,10 +114,11 @@ export default {
barWidth: 12,
label: {
show: true, //
align: 'right', //
position: 'top', //
textStyle: { //
color: '#DFF1FE',
fontSize: 16
fontSize: 12
}
},
itemStyle: {
@ -156,10 +158,11 @@ export default {
barWidth: 12,
label: {
show: true, //
align: 'left', //
position: 'top', //
textStyle: { //
color: '#DFF1FE',
fontSize: 16
fontSize: 12
}
},
itemStyle: {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-05-31 16:13:47
* @LastEditTime: 2024-06-04 15:35:54
* @LastEditors: zhp
* @Description:
-->
@ -92,6 +92,7 @@ export default {
nameTextStyle: {
color: "#fff",
fontSize: 12,
align: 'right'
},
axisTick: {
show: false,

View File

@ -5,8 +5,8 @@
<!-- <div v-if="visible" class="zzLine"></div> -->
<!-- <div v-if="visible" class="rcLine"></div> -->
<!-- <div v-if="visible" class="rcLineTwo"></div> -->
<div v-if="visible" class="hdLine"></div>
<div v-if="visible" class="hdLineTwo"></div>
<!-- <div v-if="visible" class="hdLine"></div> -->
<!-- <div v-if="visible" class="hdLineTwo"></div> -->
<!-- <div v-if="visible" class="ksLine"></div> -->
<!-- <div v-if="visible" class="bbLine"></div> -->
<!-- <div v-if="visible" class="bbLineTwo"></div> -->
@ -69,11 +69,11 @@ const LOCATIONS = [
// 2
// { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' },
// 西
{ x: 60, y: 58, tx: 68, ty: 52,lx:61,ly:61.5,ltx:68.8,lty:52, path: 'factoryData/factory-data' },
{ x: 60, y: 58, tx: 68, ty: 52,lx:61,ly:61.5,ltx:69.5,lty:52, path: 'factoryData/factory-data' },
//
// { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' },
//
{ x: 58, y: 45, tx: 47, ty: 34, lx: 58.7, ly: 34, ltx: 53, lty: 34, path: 'factoryData/hdIndex' },
{ x: 58, y: 45, tx: 47.4, ty: 34.3, lx: 58.7, ly: 34, ltx: 53.2, lty: 34, path: 'factoryData/hdIndex' },
];
// rcLine.style.left = `66.8%`;
// rcLine.style.top = `52%`;
@ -395,9 +395,9 @@ export default {
.hdLine {
position: absolute;
left: 58.7%;
/* left: 58.7%; */
width: 1px;
top: 34%;
/* top: 34%; */
display: inline-block;
/* // x: 60, y: 58, */
height: 6vw;
@ -405,9 +405,9 @@ export default {
}
.hdLineTwo {
position: absolute;
left: 53%;
/* left: 53%; */
width: 5vw;
top: 34%;
/* top: 34%; */
display: inline-block;
/* // x: 60, y: 58, */
height: 1px;

View File

@ -218,7 +218,7 @@ export default {
data() {
return {
codeUrl: "",
captchaEnable: true,
captchaEnable: false,
tenantEnable: true,
mobileCodeTimer: 0,
loginForm: {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-05-22 15:29:18
* @LastEditTime: 2024-06-03 15:42:47
* @LastEditors: DY
* @Description:
-->
@ -18,11 +18,11 @@
</el-col>
<el-col :span="8">
<p class="title">时间维度</p>
<p class="text">{{ dataForm.targetType === 0 ? '月' : '年' }}</p>
<p class="text">{{ ['日', '周', '月', '年'][dataForm.targetType] }}</p>
</el-col>
<el-col :span="8">
<p class="title">时间</p>
<p class="text">{{ dataForm.targetType === 1 ? dataForm.targetYear + '年' : dataForm.targetYear + '年' + dataForm.targetMonth + '月'}}</p>
<p class="text">{{ dataForm.targetTime}}</p>
</el-col>
</el-row>
<el-divider></el-divider>
@ -371,5 +371,8 @@ export default {
color: rgba(102,102,102,0.75);
padding-bottom: 20px;
}
.detailBox {
width: 98%;
}
</style>

View File

@ -1,15 +1,15 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-05-31 16:41:12
* @LastEditTime: 2024-06-03 16:02:56
* @LastEditors: DY
* @Description:
-->
<template>
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 32px)">
<ButtonNav v-show="false" :menus="['碲化镉工厂', '铜铟镓硒工厂']" :button-mode="true" @change="changeFactory" style="margin-top: -10px">
</ButtonNav>
<div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;">
<div class="app-container" style="height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item v-if="facType === 0" label="工厂名称" prop="factorys">
<el-select size="small" v-model="listQuery.factorys" placeholder="请选择工厂名称" multiple clearable>
@ -42,9 +42,9 @@
<el-date-picker size="small" clearable v-model="end" type="week" format="yyyy 第 WW 周" placeholder="选择周"
style="width: 180px" @change="onValueChange">
</el-date-picker>
<span v-if="start && end" style="margin-left: 10px">
<!-- <span v-if="start && end" style="margin-left: 10px">
{{ date1 }} {{ date2 }} {{ weekNum }}
</span>
</span> -->
</el-form-item>
<el-form-item v-show="listQuery.date === 3" label="时间值" prop="reportTime">
<el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange" value-format="yyyyMM" range-separator="" start-placeholder="开始月份"
@ -173,7 +173,7 @@ export default {
current: 1,
factorys: null,
total: 0,
date: 1,
date: 3,
beginTime: undefined,
endTime: undefined,
reportTime: []
@ -450,13 +450,12 @@ export default {
})
this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
}
console.log(112, this.tableProps)
}
},
mounted() {
// this.getDict()
// this.getCurrentYearFirst()
this.getDataList()
created() {
const currentMonth = new Date()
this.listQuery.reportTime = [moment(currentMonth).format('yyyyMM'), moment(currentMonth).format('yyyyMM')]
this.changeTime()
},
methods: {
handleImport() {
@ -469,42 +468,6 @@ export default {
this.upload.isUploading = true;
},
//
// handleFileSuccess(param, type) {
// console.log('', param.file)
// const formData = new FormData()
// formData.append('multipartFile', param.file)
// console.log('', param)
// importDiTarget(formData).then(res => {
// console.log(res)
// if (res.code !== 0) {
// this.$modal.msgError(response.msg)
// return;
// }
// this.upload.open = false;
// this.upload.isUploading = false;
// this.$refs.upload.clearFiles();
// }).catch(() => {
// this.upload.open = false
// this.upload.isUploading = false
// })
// //
// // let data = response.data;
// // let text = '' + data.createUsernames.length;
// // for (const username of data.createUsernames) {
// // text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username;
// // }
// // text += '<br />' + data.updateUsernames.length;
// // for (const username of data.updateUsernames) {
// // text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username;
// // }
// // text += '<br />' + Object.keys(data.failureUsernames).length;
// // for (const username in data.failureUsernames) {
// // text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username + '' + data.failureUsernames[username];
// // }
// this.$message.success('');
// this.getDataList();
// },
//
handleFileSuccess(response, file, fileList) {
if (response.code !== 0) {
this.$modal.msgError(response.msg)
@ -529,11 +492,6 @@ export default {
changeFactory($event) {
this.currentMenu = $event
this.facType = this.currentMenu === '碲化镉工厂' ? 0 : 1
// if (this.facType === 0) {
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
// } else {
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
// }
this.getDataList()
},
handleClick(val) {
@ -544,7 +502,6 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
console.log('啊啊', val)
this.deleteHandle(val.data.id, val.data.factory, val.data._pageIndex)
} else {
this.otherMethods(val)
@ -600,6 +557,10 @@ export default {
this.listQuery.endTime = Number(this.end)
}
}
if (!this.start && !this.end) {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
// console.log(e);
},
changeTime() {
@ -615,6 +576,9 @@ export default {
this.listQuery.beginTime = Number(this.listQuery.reportTime[0])
this.listQuery.endTime = Number(this.listQuery.reportTime[1])
}
} else {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
onValueChange(picker, k) { // k
@ -633,6 +597,10 @@ export default {
this.listQuery.endTime = Number(moment(this.end.getTime()).format('YYYYWW'))
}
}
if (!this.start && !this.end) {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
changeDayTime() {
if (this.listQuery.reportTime) {
@ -647,44 +615,12 @@ export default {
this.listQuery.beginTime = Number(this.listQuery.reportTime[0])
this.listQuery.endTime = Number(this.listQuery.reportTime[1])
}
} else {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
//
multipliedByHundred(str) {
console.log(str);
// console.log(str)
if ( str != 0) {
let floatVal = parseFloat(str);
if (isNaN(floatVal)) {
return 0;
}
floatVal = Math.round(str * 10000) / 100;
let strVal = floatVal.toString();
let searchVal = strVal.indexOf('.');
if (searchVal < 0) {
searchVal = strVal.length;
strVal += '.';
}
while (strVal.length <= searchVal + 2) {
strVal += '0';
}
return parseFloat(strVal);
}
},
async getDataList() {
// if (this.listQuery.date === 3) {
// if (this.listQuery.reportTime?.length > 0) {
// this.listQuery.beginTime = this.listQuery.reportTime[0] ? Number(this.listQuery.reportTime[0]) : undefined
// this.listQuery.endTime = this.listQuery.reportTime[1] ? this.listQuery.reportTime[1] : undefined
// }
// }
// if (this.listQuery.date === 4) {
// if (this.listQuery.reportTime?.length > 0) {
// this.listQuery.beginTime = this.start ? this.start : undefined
// this.listQuery.endTime = this.end ? this.end : undefined
// }
// }
if (this.currentMenu === '碲化镉工厂') {
await prodTargetDiPage(this.listQuery).then(res => {
if (res.code === 0) {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-05-31 16:13:22
* @LastEditTime: 2024-06-03 10:17:33
* @LastEditors: DY
* @Description:
-->
@ -134,14 +134,29 @@ export default {
exportDetail() {
//
const pdf = new jsPDF('l', 'pt', 'a4');
const options = {
scale: 2
};
const canvas = document.createElement('canvas')
const element = this.$refs['detail'];
const width = pdf.internal.pageSize.getWidth()
const height = pdf.internal.pageSize.getHeight()
canvas.width = width * 2
canvas.height = height * 2
canvas.style.width = width + 'px'
canvas.style.height = height + 'px'
const options = {
// scale: 2,
dpi: 300,
canvas: canvas,
useCORS: true
};
html2canvas(element, options).then((canvas) => {
const imgData = canvas.toDataURL('image/png');
pdf.addImage(imgData, 'PNG', 0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight());
const imgData = canvas.toDataURL('image/png', 1.0);
pdf.addImage(imgData, 'PNG', 0, 0, width, height);
pdf.save(this.dataForm.workOrderNumber + '详情.pdf');
});
},

View File

@ -1,16 +1,25 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-05-31 17:13:56
* @LastEditTime: 2024-06-03 15:15:18
* @LastEditors: DY
* @Description:
-->
<template>
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
<div class="app-container" style="margin-top: 8px;padding: 16px; height: auto;">
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 35px)">
<div class="app-container" style="margin-top: 8px; padding: 0 16px; height: auto; font-size: 20px; text-align: center;">
<p style="margin-bottom: 0">数据概览</p>
<div class="view">
<div v-for="(item, index) in data" :key="index">
<p style="color: rgb(194,128,255)">{{ item }}</p>
<p>{{ index }}</p>
</div>
</div>
</div>
<div class="app-container" style="margin-top: 8px; height: auto;">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
</div>
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto; padding: 16px;">
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;">
<search-bar :formConfigs="formConfig2" ref="searchBarForm" style="margin-bottom: 0" />
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="tableData">
@ -30,7 +39,7 @@
<script>
// import { parseTime } from '../../core/mixins/code-filter';
import { getWorkOrderPage, exportExcel } from '@/api/produceData/order';
import { getWorkOrderPage, exportExcel, getOverView } from '@/api/produceData/order';
// import inputTable from './inputTable.vue';
import lineChart from './lineChart';
import moment from 'moment'
@ -217,7 +226,8 @@ export default {
],
tableData: [],
xAxis: [],
lineData: {}
lineData: {},
data: {}
// proLineList: [],
// all: {}
};
@ -228,7 +238,16 @@ export default {
this.listQuery.time = [moment(sevenDaysAgo).format('yyyy-MM-DD'), moment(today).format('yyyy-MM-DD')]
this.formConfig[2].defaultSelect = this.listQuery.time
},
mounted() {
this.getOverView()
},
methods: {
getOverView() {
getOverView().then(res => {
this.data = res.data
console.log('aa', res.data)
})
},
otherMethods(val) {
this.detailOrUpdateVisible = true;
// this.addOrEditTitle = "";
@ -299,6 +318,12 @@ export default {
/* padding-bottom: 10px; */
/* } */
/* .blueTi */
.view {
display: flex;
justify-content: space-around;
align-items: center;
flex: 1;
}
.blueTip::before{
display: inline-block;
content: '';

View File

@ -6,60 +6,143 @@
* @Description:
-->
<template>
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
<div class="app-container" style="padding: 16px 24px 0; max-height: 45vh; flex-grow: 1;">
<div
style="
display: flex;
flex-direction: column;
min-height: calc(100vh - 96px - 31px);
"
>
<div
class="app-container"
style="padding: 16px; max-height: 45vh; flex-grow: 1"
>
<!-- <div style="position: relative;z-index: 999;"> -->
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="reportTime">
<el-select clearable v-model="timeSelect" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
<el-select
clearable
v-model="timeSelect"
placeholder="请选择"
style="width: 80px"
>
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item v-show="timeSelect === 'month'" label="时间范围" prop="reportTime">
<el-date-picker clearable v-model="listQuery.reportTime" type="monthrange" range-separator=""
start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
<el-form-item
v-show="timeSelect === 'month'"
label="时间范围"
prop="reportTime"
>
<el-date-picker
clearable
v-model="listQuery.reportTime"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
@change="changeTime"
>
</el-date-picker>
</el-form-item>
<el-form-item v-show="timeSelect === 'year'" label="时间范围" prop="reportTime">
<el-date-picker clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
placeholder="开始时间">
<el-form-item
v-show="timeSelect === 'year'"
label="时间范围"
prop="reportTime"
>
<el-date-picker
clearable
v-model="listQuery.reportTime[0]"
value-format="yyyy"
type="year"
placeholder="开始时间"
>
</el-date-picker>
~
<el-date-picker v-model="listQuery.reportTime[1]" value-format="yyyy" type="year" placeholder="结束时间"
@change="getYear">
<el-date-picker
v-model="listQuery.reportTime[1]"
value-format="yyyy"
type="year"
placeholder="结束时间"
@change="getYear"
>
</el-date-picker>
</el-form-item>
<el-form-item label="工厂名称" prop="factoryId">
<el-select clearable v-model="listQuery.factoryId" placeholder="请选择工厂名称">
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
<el-select
multiple
collapse-tags
v-model="listQuery.factoryId"
placeholder="请选择工厂名称"
>
<el-option
v-for="item in factoryList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="玻璃类型" prop="type">
<el-select clearable v-model="listQuery.type" placeholder="请选择玻璃类型">
<el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
<el-select
clearable
v-model="listQuery.type"
placeholder="请选择玻璃类型"
style="width: 120px"
>
<el-option
v-for="item in typeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getDataList">查询</el-button>
<el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
<el-button type="primary" size="small" @click="getDataList"
>查询</el-button
>
<el-button type="primary" size="small" plain @click="handleExport"
>导出</el-button
>
</el-form-item>
</el-form>
<!-- </div> -->
<!-- <el-row style="height: 500px;"> -->
<!-- <div> -->
<line-chart class="yearChart" ref="lineChart" style="height: 35vh;width: 100%"></line-chart>
<line-chart
class="yearChart"
ref="lineChart"
style="height: 35vh; width: 100%"
></line-chart>
<!-- </div> -->
<!-- </el-row> -->
</div>
<!-- <el-row style="height: 400px;"> -->
<!-- </el-row> -->
<div class="app-container" style="margin-top: 18px; height: unset; flex-grow: 1; padding: 16px;">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="tableData">
<div
class="app-container"
style="margin-top: 18px; height: unset; flex-grow: 1; padding: 16px"
>
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData"
>
</base-table>
</div>
</div>
@ -69,9 +152,9 @@
// import { parseTime } from '../../core/mixins/code-filter';
// import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
// import inputTable from './inputTable.vue';
import { report } from 'process';
import lineChart from './lineChart';
import moment from 'moment'
import { report } from "process";
import lineChart from "./lineChart";
import moment from "moment";
// import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx'
export default {
@ -85,50 +168,62 @@ export default {
total: 0,
type: null,
// reportType: 2,
reportTime: []
reportTime: [],
},
// startDatePicker: this.beginDate(),
// endDatePicker: this.processDate(),
yeartsStart: '',
yeartsEnd: '',
yeartsStart: "",
yeartsEnd: "",
urlOptions: {
// getDataListURL: getGlassPage,
// exportURL: exportGlasscExcel
},
timeList: [
{
value: 'month',
label:'月'
value: "day",
label: "日",
},
{
value: 'year',
label: '年'
}
value: "week",
label: "周",
},
{
value: "month",
label: "月",
},
{
value: "year",
label: "年",
},
],
factoryList: [
{
name: '测试',
id:1
}
],
typeList: [
{
name: '芯片',
id:0,
},
{
name: '标准组件',
name: "瑞昌",
id: 1,
},
{
name: 'BIPV产品',
name: "邯郸",
id: 2,
},
],
typeList: [
{
name: "芯片",
id: 0,
},
{
name: "标准组件",
id: 1,
},
{
name: "BIPV产品",
id: 2,
},
],
formConfig: [
{
type: 'title',
label: '报表管理',
type: "title",
label: "报表管理",
},
],
tableProps: [
@ -140,69 +235,72 @@ export default {
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{
prop: 'userName',
label: '科目',
prop: "userName",
label: "科目",
},
{
prop: 'nickName',
label: '类别',
prop: "nickName",
label: "类别",
},
{
prop: 'datas',
label: '数值',
prop: "datas",
label: "数值",
// subcomponent: row
},
{
prop: 'unit',
label: '单位',
prop: "unit",
label: "单位",
// subcomponent: row
},
{
prop: 'remark',
label: '备注',
prop: "remark",
label: "备注",
// subcomponent: row
}
},
],
timeSelect:'month',
startTimeStamp:null, //
endTimeStamp:null, //
date:'凯盛玻璃控股成员企业2024生产数据',
timeSelect: "month",
startTimeStamp: null, //
endTimeStamp: null, //
date: "凯盛玻璃控股成员企业2024生产数据",
// reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
startTimeStamp: "",
endTimeStamp: "",
tableData: [
{
userName: 'userName',
nickName: '用户名',
datas:'111111'
userName: "userName",
nickName: "用户名",
datas: "111111",
},
{
userName: 'userName',
nickName: '用户名',
datas: '111111'
userName: "userName",
nickName: "用户名",
datas: "111111",
},
{
userName: 'userName',
nickName: '用户名',
datas: '111111'
userName: "userName",
nickName: "用户名",
datas: "111111",
// subcomponent: row
}
},
],
// proLineList: [],
// all: {}
};
},
mounted() {
this.getDict()
this.getDict();
// this.getCurrentYearFirst()
// this.getDataList()
},
methods: {
getYear(e) {
if (this.listQuery.reportTime[0] && e - this.listQuery.reportTime[0] > 10) {
if (
this.listQuery.reportTime[0] &&
e - this.listQuery.reportTime[0] > 10
) {
this.$message({
message: '年份起止时间不能超过十年',
type: 'warning'
message: "年份起止时间不能超过十年",
type: "warning",
});
// console.log();
}
@ -210,24 +308,34 @@ export default {
},
changeTime() {
if (this.listQuery.reportTime) {
this.createStartDate = moment(new Date(this.listQuery.reportTime[0]), 'yyyy-MM-dd hh:mm:ss');
this.createEndDate = moment(new Date(this.listQuery.reportTime[1]), 'yyyy-MM-dd hh:mm:ss');
const numDays = (new Date(this.listQuery.reportTime[1]).getTime() - new Date(this.listQuery.reportTime[0]).getTime()) / (24 * 3600 * 1000); if (numDays > 730) {
this.createStartDate = moment(
new Date(this.listQuery.reportTime[0]),
"yyyy-MM-dd hh:mm:ss"
);
this.createEndDate = moment(
new Date(this.listQuery.reportTime[1]),
"yyyy-MM-dd hh:mm:ss"
);
const numDays =
(new Date(this.listQuery.reportTime[1]).getTime() -
new Date(this.listQuery.reportTime[0]).getTime()) /
(24 * 3600 * 1000);
if (numDays > 730) {
this.$message({
message: '时间范围不能超过24个月',
type: 'warning'
message: "时间范围不能超过24个月",
type: "warning",
});
this.listQuery.reportTime = [];
this.createStartDate = '';
this.createEndDate = '';
this.createStartDate = "";
this.createEndDate = "";
}
} else {
this.createStartDate = '';
this.createEndDate = '';
this.createStartDate = "";
this.createEndDate = "";
}
},
async getDict() {
this.$refs.lineChart.initChart()
this.$refs.lineChart.initChart();
// 线
// const res = await getCorePLList();
// this.proLineList = res.data;
@ -236,33 +344,31 @@ export default {
multipliedByHundred(str) {
console.log(str);
// console.log(str)
if ( str != 0) {
if (str != 0) {
let floatVal = parseFloat(str);
if (isNaN(floatVal)) {
return 0;
}
floatVal = Math.round(str * 10000) / 100;
let strVal = floatVal.toString();
let searchVal = strVal.indexOf('.');
let searchVal = strVal.indexOf(".");
if (searchVal < 0) {
searchVal = strVal.length;
strVal += '.';
strVal += ".";
}
while (strVal.length <= searchVal + 2) {
strVal += '0';
strVal += "0";
}
return parseFloat(strVal);
}
},
async getDataList() {
},
async getDataList() {},
add0(m) {
return m < 10 ? '0' + m : m
return m < 10 ? "0" + m : m;
},
format(shijianchuo) {
//shijianchuoparseInt
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
var time = moment(new Date(shijianchuo)).format("YYYY-MM-DD HH:mm:ss");
// console.log(time)
// var y = time.getFullYear();
// var m = time.getMonth() + 1;
@ -270,7 +376,7 @@ export default {
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
return time
return time;
},
// changeTime(val) {
// if (val) {
@ -295,17 +401,23 @@ export default {
var year = 1900 + unixtimestamp.getYear();
var month = "0" + (unixtimestamp.getMonth() + 1);
var date = "0" + unixtimestamp.getDate();
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
return (
year +
"-" +
month.substring(month.length - 2, month.length) +
"-" +
date.substring(date.length - 2, date.length)
);
},
buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) {
case 'search':
case "search":
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.getDataList();
break;
case 'export':
case "export":
this.handleExport();
break;
default:
@ -344,25 +456,23 @@ export default {
// return wbout;
// //do something......
// })
},
},
};
</script>
<style scoped>
.blueTip::before{
.blueTip::before {
display: inline-block;
content: '';
content: "";
width: 4px;
height: 18px;
background: #0B58FF;
background: #0b58ff;
border-radius: 1px;
margin-right: 8PX;
margin-right: 8px;
margin-top: 8px;
}
.app-container {
margin: 0 16px 0;
background-color: #fff;
border-radius: 4px;
padding: 16px 16px 0;

View File

@ -106,6 +106,8 @@
import { listOperateLog, exportOperateLog } from "@/api/system/operatelog";
import tableHeightMixin from "@/mixins/tableHeightMixin";
import statusBtn3 from "./../components/statusBtn3.vue";
import { DICT_TYPE, publicFormatter } from "@/utils/dict";
import { parseTime } from "@/utils/ruoyi";
const tableProps = [
{
prop: "id",
@ -123,9 +125,16 @@ const tableProps = [
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "type",
label: "操作类型",
minWidth: 80,
filter: publicFormatter(DICT_TYPE.SYSTEM_OPERATE_TYPE),
showOverflowtooltip: true,
},
{
prop: "userNickname",
label: "操作人",
label: "操作人",
minWidth: 80,
showOverflowtooltip: true,
},
@ -134,6 +143,13 @@ const tableProps = [
label: "操作结果",
subcomponent: statusBtn3,
},
{
prop: "startTime",
label: "操作时间",
filter: parseTime,
minWidth: 150,
showOverflowtooltip: true,
},
{
prop: "duration",
label: "执行时长",
@ -166,6 +182,7 @@ export default {
labelField: "label",
valueField: "value",
param: "type",
width: 100,
},
{
type: "select",
@ -175,6 +192,7 @@ export default {
{ id: false, name: "失败" },
],
param: "success",
width: 100,
},
{
type: "datePicker",

View File

@ -193,6 +193,7 @@ export default {
console.log(val);
if (val.btnName === "search") {
this.queryParams.pageNo = 1;
this.queryParams.name = val.name;
this.getList();
} else {
this.addOrEditTitle = "新增";

View File

@ -714,7 +714,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
username: undefined,
mobile: undefined,
status: undefined,
@ -801,7 +801,7 @@ export default {
console.log(val);
switch (val.btnName) {
case "search":
this.handleQuery();
this.handleQuery(val);
break;
case "addNew":
this.handleAdd();
@ -899,8 +899,12 @@ export default {
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
handleQuery(val) {
this.queryParams.pageNo = 1;
this.queryParams.username = val.username;
this.queryParams.mobile = val.mobile;
this.queryParams.status = val.status;
this.queryParams.createTime = val.createTime;
this.getList();
},
/** 新增按钮操作 */

17154
yarn.lock

File diff suppressed because it is too large Load Diff