| | |
| | | <el-dialog title="模板预览" :visible.sync="previewtf" width="60%"> |
| | | <div class="preview-left"> |
| | | <!-- 单选 --> |
| | | <div v-html="richText"></div> |
| | | <div v-html="htmlRichText"></div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="previewGo">前往模板详情修改</el-button> |
| | |
| | | checkboxlist: [], |
| | | tableLabel: [], |
| | | questionList: [], |
| | | richText: "<p>Hello, <strong>world</strong>!</p>", |
| | | htmlRichText: "<p>Hello, <strong>world</strong>!</p>", |
| | | // 患者表单 |
| | | tableLabelhz: [ |
| | | // { label: "序号", width: "", prop: "patid" }, |
| | |
| | | selectfn(row, type) { |
| | | // 模板情况下获取模板信息 |
| | | this.libName = row.preachname; |
| | | this.richText = null; |
| | | this.htmlRichText = null; |
| | | this.libId = row.id; |
| | | console.log(row, "row"); |
| | | this.Tasktemplate = row; |
| | |
| | | this.previewid = row.svyid; |
| | | console.log(this.questionList, "questionList"); |
| | | // this.Variablehandling(row.svyLibScripts, 1); |
| | | console.log(row.richText); |
| | | console.log(row.htmlRichText); |
| | | axios |
| | | .get(row.richText) |
| | | .get(row.htmlRichText) |
| | | .then((response) => { |
| | | console.log(response.data, "数据"); // 输出获取到的文件内容 |
| | | this.richText = response.data; |
| | | this.richText = this.addStyleToImages(this.richText); |
| | | this.htmlRichText = response.data; |
| | | this.htmlRichText = this.addStyleToImages(this.htmlRichText); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("获取富文本失败"); |