From b40ae90237b1ce741dae89aed09047d0dfbffcf1 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 06 六月 2025 16:05:21 +0800
Subject: [PATCH] *

---
 src/main/webapp/views/index.html |   48 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 7f035d3..0c65f15 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -354,6 +354,10 @@
                             label="鐘舵��">
                     </el-table-column>
                     <el-table-column
+                            prop="error$"
+                            label="寮傚父">
+                    </el-table-column>
+                    <el-table-column
                             label="鎿嶄綔"
                             type="template">
                         <template slot-scope="scope">
@@ -453,6 +457,22 @@
                         this.getLicenseDays()
 
                     }, 1000)
+                },
+
+                verifyPassword(callback) {
+                    this.$prompt('璇疯緭鍏ョ鐞嗗憳瀵嗙爜: root', '楠岃瘉', {
+                        confirmButtonText: '纭畾',
+                        cancelButtonText: '鍙栨秷',
+                        inputType: 'password',
+                        inputPattern: /^root$/,
+                        inputErrorMessage: '瀵嗙爜閿欒'
+                    }).then(({ value }) => {
+                        if (value === 'root') {
+                            callback();
+                        }
+                    }).catch(() => {
+                        this.$message.info('宸插彇娑堟搷浣�');
+                    });
                 },
                 handleChange(val) {
                     console.log(val);
@@ -586,20 +606,22 @@
                 },
                 upDateValueSystem(){
                     let that = this;
-                    let operatorTypeI = 0;
-                    if (that.valueSystem){
-                        operatorTypeI = 1;
-                    }
-                    $.ajax({
-                        url: baseUrl + "/console/system/switch",
-                        headers: {'token': localStorage.getItem('token')},
-                        data: {operatorType : operatorTypeI},
-                        method: 'POST',
-                        success: function (res) {
-                            if (res.code === 200) {
-                                that.valueSystem = res.data.status;
-                            }
+                    this.verifyPassword(() => {
+                        let operatorTypeI = 0;
+                        if (that.valueSystem){
+                            operatorTypeI = 1;
                         }
+                        $.ajax({
+                            url: baseUrl + "/console/system/switch",
+                            headers: {'token': localStorage.getItem('token')},
+                            data: {operatorType : operatorTypeI},
+                            method: 'POST',
+                            success: function (res) {
+                                if (res.code === 200) {
+                                    that.valueSystem = res.data.status;
+                                }
+                            }
+                        });
                     });
                 },
                 getTableDataLeft() {

--
Gitblit v1.9.1