From aafe8eb927aa7410f703d993631527e222408dcf Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Tue, 23 Apr 2024 10:01:16 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E6=B3=A8=EF=BC=8C?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 32 +--
src/utils/api/index.js | 11 +
src/views/activityList/index.vue | 59 ++++-
.../homePage/components/rowMsgDialog.vue | 4 +-
src/views/homePage/components/tableMain.vue | 225 +++++++++++++-----
src/views/homePage/index.vue | 21 +-
6 files changed, 268 insertions(+), 84 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 3e8b1cd..cc9b0ae 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -82,24 +82,24 @@ body {
font-family: "PingFang SC", "Helvetica Neue", Helvetica, "microsoft yahei",
arial, STHeiTi, sans-serif;
}
-/* 整个滚动条 */
-::-webkit-scrollbar {
- width: 8px;
- height: 8px;
-}
+// /* 整个滚动条 */
+// ::-webkit-scrollbar {
+// width: 8px;
+// height: 8px;
+// }
-/* 滚动条上的滚动滑块 */
-::-webkit-scrollbar-thumb {
- background-color: #ccc;
- /* 关键代码 */
- border-radius: 32px;
-}
+// /* 滚动条上的滚动滑块 */
+// ::-webkit-scrollbar-thumb {
+// background-color: #ccc;
+// /* 关键代码 */
+// border-radius: 32px;
+// }
-/* 滚动条轨道 */
-::-webkit-scrollbar-track {
- background-color: #f0f0f0;
- border-radius: 32px;
-}
+// /* 滚动条轨道 */
+// ::-webkit-scrollbar-track {
+// background-color: #f0f0f0;
+// border-radius: 32px;
+// }
.el-dialog__headerbtn {
top: 18px;
.el-dialog__close {
diff --git a/src/utils/api/index.js b/src/utils/api/index.js
index 006e2ef..cc6e08c 100644
--- a/src/utils/api/index.js
+++ b/src/utils/api/index.js
@@ -159,3 +159,14 @@ export function getqueryActivityApi(data) {
},
});
}
+
+export function updComment(data) {
+ return request({
+ url: "api/updComment.php",
+ method: "get",
+ params: data,
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ },
+ });
+}
diff --git a/src/views/activityList/index.vue b/src/views/activityList/index.vue
index 59513dc..e01dedc 100644
--- a/src/views/activityList/index.vue
+++ b/src/views/activityList/index.vue
@@ -61,6 +61,13 @@
@click="handleEditClick(scope.row)"
size="small"
icon="el-icon-document"
+ >修改
+ 详情
row[dataField]);
console.log(`当前列数据字段:${dataField}`);
console.log(`当前列数据值:${columnData}`);
- //this.copyToClipboard(columnData.join("\n"));
+ this.copyToClipboard(columnData.join("\n"));
console.log(columnData);
- this.activityForm.cmdidArr = columnData.join("\n");
- this.activityForm.title = this.activityNameTitle;
- this.termsShow = false;
+ // this.activityForm.cmdidArr = columnData.join("\n");
+ // this.activityForm.title = this.activityNameTitle;
+ //this.termsShow = false;
},
copyToClipboard(text) {
const textArea = document.createElement("textarea");
@@ -217,8 +225,26 @@ export default {
})
.catch((err) => {});
},
- //活动详情
+ //修改活动详情
handleEditClick(row) {
+ console.log(row);
+ getqueryActivityApi({
+ act: "detail",
+ id: row.id,
+ })
+ .then((res) => {
+ console.log(res);
+ this.ActibityId = res.data.activity.id;
+ this.activityForm.title = res.data.activity.title;
+ console.log(this.activityForm.title);
+ const columnData = res.data.terms.map((item) => item.cmdid);
+ console.log(columnData);
+ this.activityForm.cmdidArr = columnData.join("\n");
+ })
+ .catch((err) => {});
+ },
+ //活动详情
+ handleLookClick(row) {
this.termsShow = true;
this.termsLoading = true;
this.termsData = [];
@@ -281,19 +307,32 @@ export default {
this.cmdidFlag = true;
return;
}
+ let actParams = {};
+ if (this.ActibityId !== "") {
+ console.log(this.ActibityId);
+ actParams = {
+ id: this.ActibityId,
+ title: this.activityForm.title,
+ cmdids: this.activityForm.cmdidArr,
+ act: "edt",
+ };
+ } else {
+ actParams = {
+ title: this.activityForm.title,
+ cmdids: this.activityForm.cmdidArr,
+ act: "new",
+ };
+ }
console.log(this.activityForm.title);
console.log(this.activityForm.cmdidArr);
//console.log(arrList);
- updActivityApi({
- title: this.activityForm.title,
- cmdids: this.activityForm.cmdidArr,
- act: "new",
- })
+ updActivityApi(actParams)
.then((res) => {
console.log(res);
this.getactivityList();
this.activityForm.title = "";
this.activityForm.cmdidArr = "";
+ this.ActibityId = "";
})
.catch((err) => {});
},
diff --git a/src/views/homePage/components/rowMsgDialog.vue b/src/views/homePage/components/rowMsgDialog.vue
index 51863a1..5af267a 100644
--- a/src/views/homePage/components/rowMsgDialog.vue
+++ b/src/views/homePage/components/rowMsgDialog.vue
@@ -260,7 +260,7 @@ export default {
justify-items: center;
justify-content: center;
.el-dialog {
- width: 90%;
+ width: 95%;
height: 83%;
margin-top: 0px !important;
@@ -299,6 +299,8 @@ export default {
}
.msgTootip {
color: #333;
+ overflow: auto;
+ height: 90%;
p {
font-size: 14px;
line-height: 22px;
diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue
index 6b057ef..4a5787a 100644
--- a/src/views/homePage/components/tableMain.vue
+++ b/src/views/homePage/components/tableMain.vue
@@ -47,7 +47,14 @@
>装置总数:{{ tableData.length }}
- 导出
+
+
+
+
-
+
-
-
+
-
+
-
+
离线
-
+
{{ ywNumber }} / {{ tableData.length }}
@@ -164,7 +163,7 @@
>
-
+
{{ kxtNumber }} / {{ tableData.length }}
@@ -195,20 +194,22 @@
- {{
- scope.row.last_heartbeat
- }}
+ {{ scope.row.last_heartbeat }}
@@ -229,7 +230,7 @@
{{ protocolMap[scope.row.protocol] }}
-
+
{{
scope.row.raw_report.battary
@@ -245,7 +246,7 @@
@@ -272,7 +273,7 @@
}}
-
+
{{
scope.row.raw_report.recv
@@ -287,7 +288,7 @@
-
+
{{
scope.row.raw_report.photoTimes
@@ -301,7 +302,7 @@
@@ -318,7 +319,7 @@
@@ -386,7 +387,7 @@
-
+
{{ scope.row.raw_report.cma }}
-
+
{{
scope.row.raw_report.i1Version
@@ -518,7 +519,7 @@
@@ -537,7 +538,7 @@
@@ -548,7 +549,7 @@
}}
-
+
{{
scope.row.raw_report.msgs.hasOwnProperty("aiVersion")
@@ -557,7 +558,7 @@
}}
-
+
{{
scope.row.raw_report.msgs.hasOwnProperty("mcu")
@@ -566,6 +567,32 @@
}}
+
+
+
+
+ {{
+ scope.row.comment
+ }}
+
+
+
MCU版本
+ 备注
@@ -816,7 +846,11 @@