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: `
+ 管理员审核结果:审核通过。 + 管理员审核结果:驳回 驳回理由:{{auditingStatus.rejectedReason}} + 当前脚本将在审核后生效,请耐心等待审核结果。 去审核 » +
+管理员审核结果:审核通过。
+{{comment}}