From 6d44a11fbb3ee7ce6b80b91275428567cd247c63 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sat, 23 Dec 2023 20:54:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=B7=E6=B1=82=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/components/server/script-config-box.js | 44 +++++++++++++++++-- .../server/script-group-config-box.js | 4 +- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/web/public/js/components/server/script-config-box.js b/web/public/js/components/server/script-config-box.js index abc950c4..ccbdb8d5 100644 --- a/web/public/js/components/server/script-config-box.js +++ b/web/public/js/components/server/script-config-box.js @@ -1,12 +1,34 @@ Vue.component("script-config-box", { - props: ["id", "v-script-config", "comment"], + props: ["id", "v-script-config", "comment", "v-auditing-status"], + mounted: function () { + let that = this + setTimeout(function () { + that.$forceUpdate() + }, 100) + }, data: function () { let config = this.vScriptConfig if (config == null) { config = { isPrior: false, isOn: false, - code: "" + code: "", + auditingCode: "" + } + } + + let auditingStatus = null + if (config.auditingCodeMD5 != null && config.auditingCodeMD5.length > 0 && config.auditingCode != null && config.auditingCode.length > 0) { + config.code = config.auditingCode + + if (this.vAuditingStatus != null) { + for (let i = 0; i < this.vAuditingStatus.length; i++) { + let status = this.vAuditingStatus[i] + if (status.md5 == config.auditingCodeMD5) { + auditingStatus = status + break + } + } } } @@ -15,7 +37,8 @@ Vue.component("script-config-box", { } return { - config: config + config: config, + auditingStatus: auditingStatus } }, watch: { @@ -30,6 +53,12 @@ Vue.component("script-config-box", { changeCode: function (code) { this.config.code = code this.change() + }, + isPlus: function () { + if (Tea == null || Tea.Vue == null) { + return false + } + return Tea.Vue.teaIsPlus } }, template: `
@@ -43,7 +72,14 @@ Vue.component("script-config-box", { 脚本代码 - {{config.code}} + +

+ 管理员审核结果:审核通过。 + 管理员审核结果:驳回     驳回理由:{{auditingStatus.rejectedReason}} + 当前脚本将在审核后生效,请耐心等待审核结果。 去审核 » +

+

管理员审核结果:审核通过。

+ {{config.code}}

{{comment}}

diff --git a/web/public/js/components/server/script-group-config-box.js b/web/public/js/components/server/script-group-config-box.js index 22889946..e22d4862 100644 --- a/web/public/js/components/server/script-group-config-box.js +++ b/web/public/js/components/server/script-group-config-box.js @@ -1,5 +1,5 @@ Vue.component("script-group-config-box", { - props: ["v-group", "v-is-location"], + props: ["v-group", "v-auditing-status", "v-is-location"], data: function () { let group = this.vGroup if (group == null) { @@ -37,7 +37,7 @@ Vue.component("script-group-config-box", {
- +
` }) \ No newline at end of file