| | |
| | | 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 = 2; |
| | | this.ruleForm.hetype = 1; |
| | | console.log(22); |
| | | this.ruleForm.suitway = |
| | | this.ruleForm.suitway.length != 0 |
| | |
| | | // 上传图片成功 |
| | | 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; |
| | | // 获取光标所在位置 |
| | |
| | | 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); |
| | |
| | | .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); |