From a346cfbcb03a303dca252d910d2181f00e7adc20 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期二, 03 九月 2024 10:39:10 +0800 Subject: [PATCH] 测试完成 --- src/views/knowledge/education/compilequer/index.vue | 48 ++++++++++++++++++++++++++++-------------------- 1 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue index dfdea95..860ede0 100644 --- a/src/views/knowledge/education/compilequer/index.vue +++ b/src/views/knowledge/education/compilequer/index.vue @@ -142,6 +142,7 @@ @change="handleInputConfirm" filterable remote + allow-create reserve-keyword default-first-option :remote-method="remoteMethodtag" @@ -175,22 +176,15 @@ ></el-col> <el-col :span="9"> <el-form-item label="鍙敤鐘舵��" prop="region"> - <el-select - v-model="ruleForm.isavailable" - size="medium" - filterable - placeholder="璇烽�夋嫨鍒嗙被" - > - <el-option - class="ruleFormaa" - v-for="item in usable" - :key="item.value" - :label="item.label" - :value="item.value" + <el-radio-group v-model="ruleForm.isAvailable"> + <el-radio + v-for="(item, index) in usable" + :label="item.value" + >{{ item.label }}</el-radio > - </el-option> - </el-select> </el-form-item - ></el-col> + </el-radio-group> + </el-form-item></el-col + > </el-row> <el-form-item label="瀹f暀鏂瑰紡" prop="region"> <el-select @@ -414,6 +408,7 @@ ]; export default { + name: "Educationinfo", components: { OptionalForm }, data() { return { @@ -489,6 +484,8 @@ radioas: "", //濉┖棰樼瓟妗� // 鎬绘潯鏁� total: 1, + hetype: "", + id: null, ruleForm: { campus: [], heLibraryTagList: [], @@ -546,6 +543,13 @@ }, }; }, + activated() { + if (this.id != this.$route.query.id) { + this.gettabList(); + this.getList(); + this.illnessUpdate(); + } + }, created() { this.gettabList(); @@ -573,6 +577,7 @@ getList() { this.loading = true; this.id = this.$route.query.id; + this.hetype = this.$route.query.hetype; if (this.id) { getlibraryinfo({ id: this.id }).then((res) => { this.ruleForm = res.data[0]; @@ -595,6 +600,7 @@ // 瀹f暀鍒嗙被 getheLibraryAssort({}).then((res) => { this.sortlist = res.rows; + console.log(this.sortlist); }); // 閮ㄩ棬 listDept(this.queryParams).then((response) => { @@ -611,6 +617,7 @@ this.ruleForm.campus = this.ruleForm.campus.join(","); this.ruleForm.labelInfo = tgs.length != 0 ? tgs.join(", ") : ""; this.ruleForm.otherdata = JSON.stringify(this.variablelist); + this.ruleForm.hetype = 1; console.log(22); this.ruleForm.suitway = this.ruleForm.suitway.length != 0 @@ -842,12 +849,11 @@ // 涓婁紶鍥剧墖鎴愬姛 uploadEditorSuccess(res, file) { console.log("涓婁紶鎴愬姛"); - // this.$emit('upload',res, file) - console.log(res, file); //鎷兼帴鍑轰笂浼犵殑鍥剧墖鍦ㄦ湇鍔″櫒鐨勫畬鏁村湴鍧� let imgUrl = res.url; let type = imgUrl.substring(imgUrl.lastIndexOf(".") + 1); - console.log(type); + this.fileName = this.getFileNameFromPath(res.url); + // 鑾峰彇瀵屾枃鏈粍浠跺疄渚� let quill = this.$refs.customQuillEditor.quill; // 鑾峰彇鍏夋爣鎵�鍦ㄤ綅缃� @@ -919,7 +925,8 @@ console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭 this.content = response.data; this.texturl = res.url; - this.fileName = this.getFileNameFromPath(res.url); + this.fileName = this.getFileNameFromPath(response.url); + console.log(this.fileName, "this.fileName"); }) .catch((error) => { console.error("Failed to fetch file:", error); @@ -931,7 +938,8 @@ .then((response) => { console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭 this.content = response.data; - this.fileName = this.getFileNameFromPath(res.url); + this.fileName = this.getFileNameFromPath(response.url); + console.log(this.fileName, "this.fileName"); }) .catch((error) => { console.error("Failed to fetch file:", error); -- Gitblit v1.9.3