From 5e4a673ecc95d6fb06aec6c5e2f3ec4ffb72584b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 01 八月 2022 14:33:51 +0800 Subject: [PATCH] 修复视频播放点击音量报错 #557,修复编解码信息获取失败 --- web_src/src/components/dialog/catalogEdit.vue | 37 +++++++++++++++++++++++++++++++++++-- 1 files changed, 35 insertions(+), 2 deletions(-) diff --git a/web_src/src/components/dialog/catalogEdit.vue b/web_src/src/components/dialog/catalogEdit.vue index 13cabfb..11dbe4e 100644 --- a/web_src/src/components/dialog/catalogEdit.vue +++ b/web_src/src/components/dialog/catalogEdit.vue @@ -49,11 +49,42 @@ props: ['platformId'], created() {}, data() { + let checkId = (rule, value, callback) => { + console.log("checkId") + console.log(this.treeType) + console.log(rule) + console.log(value) + console.log(value.length) + console.log(this.level) + if (!value) { + return callback(new Error('缂栧彿涓嶈兘涓虹┖')); + } + if (this.treeType === "BusinessGroup" && value.length !== 20) { + return callback(new Error('缂栧彿蹇呴』鐢�20浣嶆暟瀛楃粍鎴�')); + } + if (this.treeType === "CivilCode" && value.length <= 8 && value.length%2 !== 0) { + return callback(new Error('琛屾斂鍖哄垝蹇呴』鏄叓浣嶄互涓嬬殑鍋舵暟涓暟瀛楃粍鎴�')); + } + if (this.treeType === "BusinessGroup") { + let catalogType = value.substring(10, 13); + console.log(catalogType) + // 216 涓鸿櫄鎷熺粍缁� 215 涓轰笟鍔″垎缁勶紱鐩綍绗竴绾у繀椤讳负涓氬姟鍒嗙粍锛� 涓氬姟鍒嗙粍涓嬩负铏氭嫙缁勭粐锛岃櫄鎷熺粍缁囦笅鍙互鏈夊叾浠栬櫄鎷熺粍缁� + if (this.level === 1 && catalogType !== "215") { + return callback(new Error('涓氬姟鍒嗙粍妯″紡涓嬬涓�灞傜洰褰曠殑缂栧彿11鍒�13浣嶅繀椤讳负215')); + } + if (this.level > 1 && catalogType !== "216") { + return callback(new Error('涓氬姟鍒嗙粍妯″紡涓嬬涓�灞備互涓嬬洰褰曠殑缂栧彿11鍒�13浣嶅繀椤讳负216')); + } + } + callback(); + } return { submitCallback: null, showDialog: false, isLoging: false, isEdit: false, + treeType: null, + level: 0, form: { id: null, name: null, @@ -62,12 +93,12 @@ }, rules: { name: [{ required: true, message: "璇疯緭鍏ュ悕绉�", trigger: "blur" }], - id: [{ required: true, message: "璇疯緭鍏D", trigger: "blur" }] + id: [{ required: true, trigger: "blur",validator: checkId }] }, }; }, methods: { - openDialog: function (isEdit, id, name, parentId, callback) { + openDialog: function (isEdit, id, name, parentId, treeType, level, callback) { console.log("parentId: " + parentId) console.log(this.form) this.isEdit = isEdit; @@ -77,6 +108,8 @@ this.form.parentId = parentId; this.showDialog = true; this.submitCallback = callback; + this.treeType = treeType; + this.level = level; }, onSubmit: function () { console.log("onSubmit"); -- Gitblit v1.8.0