From 61930e5488faa1a457661b87902c53c2889989b1 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 13 九月 2023 16:40:45 +0800
Subject: [PATCH] 主界面添加操作确认提示,添加图片
---
CanadaMes-ui/src/img/taimian.png | 0
CanadaMes-ui/src/img/dipan.png | 0
CanadaMes-ui/src/views/home/index.vue | 134 ++++++++++++++++++++++++++++++++------------
CanadaMes-ui/src/lang/locales/en-US.json | 15 ++++
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 2
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java | 2
CanadaMes-ui/src/lang/locales/zh-CN.json | 15 ++++
7 files changed, 128 insertions(+), 40 deletions(-)
diff --git a/CanadaMes-ui/src/img/dipan.png b/CanadaMes-ui/src/img/dipan.png
new file mode 100644
index 0000000..923b811
--- /dev/null
+++ b/CanadaMes-ui/src/img/dipan.png
Binary files differ
diff --git a/CanadaMes-ui/src/img/taimian.png b/CanadaMes-ui/src/img/taimian.png
new file mode 100644
index 0000000..81e0723
--- /dev/null
+++ b/CanadaMes-ui/src/img/taimian.png
Binary files differ
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 70125f4..f73526c 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -231,6 +231,19 @@
"glassid":"glassid",
"order number":"order number",
"delete":"delete",
- "out":"out"
+ "out":"out",
+
+ "Operation successful":"Operation successful",
+ "Operation canceled":"Operation canceled",
+ "There is no glass for this order":"There is no glass for this order",
+ "There are currently tasks":"There are currently tasks",
+ "There is no such glass":"There is no such glass",
+ "There is no such grid":"There is no such grid",
+ "No delete allowed":"No delete allowed",
+ "No out allowed":"No out allowed",
+ "Are you sure to perform this operation ?":"Are you sure to perform this operation ?",
+ "prompt":"prompt",
+ "Yes":"Yes",
+ "No":"No"
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 671caf1..8c531db 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -228,5 +228,18 @@
"glassid":"鐜荤拑id",
"order number":"璁㈠崟",
"delete":"鍒犻櫎",
- "out":"鍑虹墖"
+ "out":"鍑虹墖",
+
+ "Operation successful":"鎿嶄綔鎴愬姛",
+ "Operation canceled":"鎿嶄綔鍙栨秷",
+ "There is no such order":"娌℃湁姝よ鍗曠殑鐜荤拑",
+ "There are currently tasks":"褰撳墠鏈変换鍔�",
+ "There is no such glass":"娌℃湁姝ょ幓鐠�",
+ "There is no such grid":"娌℃湁绌洪棽鏍煎瓙",
+ "No delete allowed":"涓嶈兘鍒犻櫎",
+ "No out allowed":"涓嶈兘鍑虹墖",
+ "Are you sure to perform this operation ?":"纭畾鎵ц姝ゆ搷浣�?",
+ "prompt":"鎻愮ず",
+ "Yes":"鏄�",
+ "No":"鍚�"
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 98c0f36..c2448cd 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -91,11 +91,36 @@
background-size: 46px 94px;
background-attachment: local;
width: 32px;
-
position: absolute;
/* left: 116px; */
/* left:1060px;18.88px */
background-image: url('../../img/bigcar01.png');
+}
+
+.blocks-img2 {
+ height: 100px;
+ max-width: 100vw;
+ background-repeat: no-repeat;
+ background-size: 85px 100px;
+ background-attachment: local;
+ width: 100px;
+ position: absolute;
+ /* left: 116px; */
+ /* left:1060px;18.88px */
+ background-image: url('../../img/dipan.png');
+}
+
+.blocks-img3 {
+ height: 90px;
+ max-width: 100vw;
+ background-repeat: no-repeat;
+ background-size: 160px 40px;
+ background-attachment: local;
+ width: 160px;
+ position: absolute;
+ /* left: 116px; */
+ /* left:1060px;18.88px */
+ background-image: url('../../img/taimian.png');
}
.el-table td,
@@ -167,7 +192,7 @@
<el-table-column :label="$t('Operate')">
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
- @click="endtask(0, scope.row.glassId, scope.row.cell)">{{$t('end task')}}</el-button>
+ @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
</template>
</el-table-column>
</el-table>
@@ -181,7 +206,7 @@
<el-table-column :label="$t('Operate')">
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
- @click="endtask(1, scope.row.glassId, scope.row.cell)">{{$t('end task')}}</el-button>
+ @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
</template>
</el-table-column>
</el-table>
@@ -219,6 +244,8 @@
</div>
<div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
<div class="blocks-img" :style="{ left: car2 + 'px', top: '194px' }"></div>
+ <div class="blocks-img2" :style="{ left: '912px', top: '366px' }"></div>
+ <div class="blocks-img3" :style="{ left: '875px', top: '455px' }"></div>
</div>
</el-footer>
<el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')">
@@ -280,6 +307,8 @@
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('delete') }}</el-button>
+ <!-- <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="open">{{ $t('delete')
+ }}</el-button> -->
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
</template>
@@ -441,11 +470,11 @@
if (this.form1.order != "") {
InsertOrder(this.order).then(res => {
if (res.data.message == 200) {
- this.dialogFormVisible1=false;
- this.$message.success("Operation successful");
+ this.dialogFormVisible1 = false;
+ this.$message.success(this.$t('Operation successful'));
} else {
- this.$message.success("There is no such order");
+ this.$message.success(this.$t('There is no glass for this order'));
}
this.load();
});
@@ -457,16 +486,16 @@
if (this.form.order != "") {
Addglassid(this.glassid).then(res => {
if (res.data.message2 == 200) {
- this.$message.success("Operation successful");
+ this.$message.success(this.$t('Operation successful'));
this.cancal();
- } else if(res.data.message2 == 500) {
- this.$message.success("There are currently tasks");
+ } else if (res.data.message2 == 500) {
+ this.$message.success(this.$t('There are currently tasks'));
}
- else if(res.data.message2 == 300) {
- this.$message.success("There is no such glass");
+ else if (res.data.message2 == 300) {
+ this.$message.success(this.$t('There is no such glass'));
}
- else if(res.data.message2 == 400) {
- this.$message.success("There is no such grid");
+ else if (res.data.message2 == 400) {
+ this.$message.success(this.$t('There is no such grid'));
}
});
}
@@ -504,11 +533,23 @@
this.form1 = {};
},
endtask(type, glassid, cell) {
- UpdateTask(type, glassid, cell).then(res => {
- if (res.data.message3 == 200) {
- this.$message.success("Operation successful");
- }
+ this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ confirmButtonText: this.$t('Yes'),
+ cancelButtonText: this.$t('No'),
+ type: 'warning'
+ }).then(() => {
+ UpdateTask(type, glassid, cell).then(res => {
+ if (res.data.message3 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
});
+
},
showcageinfo(cage) {
this.cage = cage;
@@ -518,31 +559,52 @@
});
},
deleteglass(glassid, state) {
- if (state == 1) {
- DeleteByGlassID(glassid).then(res => {
- if (res.data.message3 == 200) {
- this.$message.success("Operation successful");
- }
+ this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ confirmButtonText: this.$t('Yes'),
+ cancelButtonText: this.$t('No'),
+ type: 'warning'
+ }).then(() => {
+ if (state == 1) {
+ DeleteByGlassID(glassid).then(res => {
+ if (res.data.message3 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ } else {
+ this.$message.success(this.$t('No delete allowed'));
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
});
- } else {
- this.$message.success("No out allowed");
- }
+ });
},
outglass(glassid, state) {
- if (state == 1) {
- OutByGlassID(glassid).then(res => {
- if (res.data.message3 == 200) {
- this.$message.success("Operation successful");
- }
+ this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ confirmButtonText: this.$t('Yes'),
+ cancelButtonText: this.$t('No'),
+ type: 'warning'
+ }).then(() => {
+ if (state == 1) {
+ OutByGlassID(glassid).then(res => {
+ if (res.data.message3 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ } else {
+ this.$message.success(this.$t('No out allowed'));
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
});
- } else {
- this.$message.success("No out allowed");
- }
+ });
+
}
-
}
+
}
-
-
</script>
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index 9425f7a..cc53b99 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -17,7 +17,7 @@
public void run() {
while (this != null) {
try {
- Thread.sleep(5000);
+ Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
index 9f32cd3..a404103 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -113,7 +113,7 @@
datas.add((short) 2);
datas.add((short) 1);
// 杞Щ鍘熻皟鎷ㄦ牸瀛愭暟鎹�
- spianMapper.UpdataAddCage(glasswidth, cages, cells);//鍑忓皯鏂版牸瀛愬搴�
+ spianMapper.UpdataAddCage1(glasswidth, cages, cells);//鍑忓皯鏂版牸瀛愬搴�
spianMapper.UpdateDBCage(ids, cage, cell);// 灏嗗師鏍煎瓙鏁版嵁鏇存柊鍒版柊鏍煎瓙閲�
spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 0);// 娓呴櫎鍘熸牸瀛愭暟鎹�
spianMapper.UpdataOutCage(glasswidth, cage, cell);//澧炲姞鍘熸牸瀛愬搴�
--
Gitblit v1.8.0