diff --git a/ebts-ui/package.json b/ebts-ui/package.json index 5db0a5a..da1f022 100644 --- a/ebts-ui/package.json +++ b/ebts-ui/package.json @@ -41,7 +41,7 @@ "axios": "0.18.1", "ckeditor4-vue": "^1.4.0", "clipboard": "2.0.4", - "codemirror": "^5.59.2", + "codemirror": "^5.65.9", "core-js": "3.6.5", "diff-match-patch": "^1.0.5", "echarts": "4.2.1", diff --git a/ebts-ui/src/components/Editor/index.vue b/ebts-ui/src/components/Editor/index.vue index 80ba2f3..b8f1089 100644 --- a/ebts-ui/src/components/Editor/index.vue +++ b/ebts-ui/src/components/Editor/index.vue @@ -55,7 +55,6 @@ export default { }, data () { return { - // 默认有这么多菜单,meanArray有值以meanArray为准 defaultMeanus: [ 'head', diff --git a/ebts-ui/src/components/Editor/index_back.vue b/ebts-ui/src/components/Editor/index_back.vue new file mode 100644 index 0000000..80ba2f3 --- /dev/null +++ b/ebts-ui/src/components/Editor/index_back.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/ebts-ui/src/views/cas-login.vue b/ebts-ui/src/views/cas-login.vue index 5a96816..f4b6b30 100644 --- a/ebts-ui/src/views/cas-login.vue +++ b/ebts-ui/src/views/cas-login.vue @@ -6,7 +6,6 @@ import {setToken} from "@/utils/auth"; export default { name: "cas-login", mounted() { - debugger let search = window.location.search; let token = search.slice(search.indexOf("=") + 1) setToken(token) diff --git a/ebts-ui/src/views/sist/banner/index.vue b/ebts-ui/src/views/sist/banner/index.vue index 0604257..30ee3ea 100644 --- a/ebts-ui/src/views/sist/banner/index.vue +++ b/ebts-ui/src/views/sist/banner/index.vue @@ -83,6 +83,7 @@ + diff --git a/ebts-ui/src/views/sist/navigation/index.vue b/ebts-ui/src/views/sist/navigation/index.vue index dcab3ee..2eafea0 100644 --- a/ebts-ui/src/views/sist/navigation/index.vue +++ b/ebts-ui/src/views/sist/navigation/index.vue @@ -137,7 +137,7 @@ - + + + + {{ dict.label }} + + + @@ -192,6 +202,9 @@ + + + @@ -207,7 +220,9 @@ - + + + @@ -235,7 +250,8 @@ import { } from '@/api/sist/navigation' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' -import Editor from '@/components/Editor' +import Editor from '@/views/utils/Editor' +import CodeEdit from '@/views/utils/CodeEdit' import UploadFile from '@/views/utils/uploadFile' import { getArticleNav } from '../../../api/sist/article' @@ -243,6 +259,7 @@ export default { name: 'Navigation', components: { Treeselect, + CodeEdit, Editor, UploadFile }, @@ -258,6 +275,7 @@ export default { // 显示搜索条件 showSearch: true, articleSelShow: false, + isThumbnailShow:false, empleeSelShow: false, imageShow: false, // 导航表格数据 @@ -272,6 +290,16 @@ export default { label: '有' } ], + simpleOptions:[ + { + key: 0, + label: '正常列表' + }, + { + key: 1, + label: '简单列表' + } + ], // 导航树选项 navigationList: [], articleTypeOptions: [], @@ -408,6 +436,7 @@ export default { }, // 表单重置 reset() { + this.isThumbnailShow = false this.articleSelShow = false this.imageShow = false this.empleeSelShow = false @@ -455,6 +484,11 @@ export default { this.formData = res.data }) }, + code(){ + let html = this.$refs.editor.getHtml() + this.$refs.editor.setHtml(html) + console.log(this.$refs.editor.getHtml()) + }, save() { updateDetails(this.formData).then(res => { this.msgSuccess('修改成功') @@ -468,7 +502,8 @@ export default { // } this.articleTypeOptions = [] this.direTypeOptions = [] - if (type == 2) { + if (type == "2") { + this.isThumbnailShow = true this.articleSelShow = true this.empleeSelShow = false if (this.form.sitetype == 1) { @@ -476,9 +511,10 @@ export default { } else if (this.form.sitetype == 2) { this.articleTypeOptions = this.labArticleTypeOption } - } else if (type == 3) { + } else if (type == "3") { this.articleSelShow = false this.empleeSelShow = true + this.isThumbnailShow = false if (this.form.sitetype == 1) { this.direTypeOptions = this.sistDireTypeOptions } else if (this.form.sitetype == 2) { @@ -489,7 +525,7 @@ export default { this.empleeSelShow = false } - if (this.form.type == 0) { + if (this.form.type == "0") { this.imageShow = false } else { this.imageShow = true @@ -529,6 +565,7 @@ export default { } else { this.imageShow = true } + this.navigationTypeChang(this.form.type) this.open = true this.title = '修改导航' }) diff --git a/ebts-ui/src/views/utils/CodeEdit.vue b/ebts-ui/src/views/utils/CodeEdit.vue new file mode 100644 index 0000000..7161d3b --- /dev/null +++ b/ebts-ui/src/views/utils/CodeEdit.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/ebts-ui/src/views/utils/Editor.vue b/ebts-ui/src/views/utils/Editor.vue index cec7451..80ba2f3 100644 --- a/ebts-ui/src/views/utils/Editor.vue +++ b/ebts-ui/src/views/utils/Editor.vue @@ -40,7 +40,7 @@ export default { style.minHeight = `${this.minHeight}px`; } if (this.height) { - style.height = `${this.height}px`; + style.height = `${this.height+50}px`; } return style; }, @@ -89,7 +89,11 @@ export default { init () { const _this = this this.editor = new Editor(this.$refs.editor) + this.editor.config.uploadImgAccept = ['doc', 'docx', 'png', 'gif', 'bmp', 'webp'] this.editor.config.uploadImgShowBase64 = true // 使用 base64 保存图片 + this.editor.config.height = this.height + this.editor.config.pasteFilterStyle = false + this.editor.config.zIndex = 10 this.setMenus() // 设置菜单 this.editor.config.onchange = (html) => { _this.$emit('change', html) // 将内容同步到父组件中 @@ -123,9 +127,11 @@ export default { diff --git a/ebts-ui/src/views/utils/Editor_back.vue b/ebts-ui/src/views/utils/Editor_back.vue new file mode 100644 index 0000000..cec7451 --- /dev/null +++ b/ebts-ui/src/views/utils/Editor_back.vue @@ -0,0 +1,131 @@ + + + + +