From 8b76298e3077e1823e2ab52e9ab3fafb4451c3a5 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期六, 27 四月 2024 23:32:46 +0800
Subject: [PATCH] udpate
---
src/views/mdc/components/Shift.vue | 11 ++++++++---
src/views/mdc/components/Time.vue | 13 +++++++++----
src/views/tpm/MachineGroup.vue | 7 +++++--
3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/src/views/mdc/components/Shift.vue b/src/views/mdc/components/Shift.vue
index 630353b..2bab6cf 100644
--- a/src/views/mdc/components/Shift.vue
+++ b/src/views/mdc/components/Shift.vue
@@ -1,7 +1,7 @@
<!--
* @Date: 2024-04-18 21:52:18
* @LastEditors: Sneed
- * @LastEditTime: 2024-04-23 19:45:06
+ * @LastEditTime: 2024-04-27 23:31:53
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Shift.vue
-->
<template>
@@ -151,7 +151,12 @@
type: 'category',
},
yAxis: {
- type: 'value'
+ type: 'value',
+ axisLabel: {
+ formatter: (value) => {
+ return value + '%'
+ }
+ },
},
dataZoom: [
{ type: 'slider' }
@@ -171,7 +176,7 @@
}
option2.dataset.source = [['product', '鐝1', '鐝2']]
res.data.items.records.forEach(v => {
- option2.dataset.source.push([v.workstationName, v.data[1] === '-' ? 0 : v.data[1], v.data[2] === '-' ? 0 : v.data[2]])
+ option2.dataset.source.push([v.workstationName, v.data[1] === '-' ? 0 : v.data[1] * 100, v.data[2] === '-' ? 0 : v.data[2] * 100])
});
this.option2 = option2
console.log(option2)
diff --git a/src/views/mdc/components/Time.vue b/src/views/mdc/components/Time.vue
index d9db372..17d160d 100644
--- a/src/views/mdc/components/Time.vue
+++ b/src/views/mdc/components/Time.vue
@@ -1,7 +1,7 @@
<!--
* @Date: 2024-04-18 21:52:18
* @LastEditors: Sneed
- * @LastEditTime: 2024-04-23 19:44:57
+ * @LastEditTime: 2024-04-27 23:30:06
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Time.vue
-->
<template>
@@ -140,11 +140,16 @@
xAxis: {
type: 'category',
axisLabel: {
- interval: 'auto'
+ interval: 'auto',
}
},
yAxis: {
- type: 'value'
+ type: 'value',
+ axisLabel: {
+ formatter: (value) => {
+ return value + '%'
+ }
+ },
},
dataZoom: [
{ type: 'slider' }
@@ -166,7 +171,7 @@
res.data.items.records.forEach(v => {
let current = [v.id]
Object.keys(v.nameData).forEach(key => {
- current.push(row.data[key] - 0)
+ current.push((v.data[key] - 0) * 100)
})
option2.dataset.source.push(current)
});
diff --git a/src/views/tpm/MachineGroup.vue b/src/views/tpm/MachineGroup.vue
index e77729e..3c561a9 100644
--- a/src/views/tpm/MachineGroup.vue
+++ b/src/views/tpm/MachineGroup.vue
@@ -1,7 +1,7 @@
<!--
* @Date: 2024-04-27 20:02:44
* @LastEditors: Sneed
- * @LastEditTime: 2024-04-27 21:40:33
+ * @LastEditTime: 2024-04-27 22:21:36
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/MachineGroup.vue
-->
<template>
@@ -19,7 +19,7 @@
<el-header>
<div class="left-panel">
<el-button @click="addChild" type="primary" plain>鏂板涓嬬骇</el-button>
- <el-button @click="del" type="danger" plain>鍒犻櫎</el-button>
+ <el-button :disabled="!form.id" @click="del" type="danger" plain>鍒犻櫎</el-button>
</div>
</el-header>
<el-main class="">
@@ -83,6 +83,9 @@
}
},
addChild() {
+ if (!this.form.id) {
+ return
+ }
let { name, id, groupType, groupCategory } = this.form
this.form.id = ''
this.form.name = ''
--
Gitblit v1.9.3