{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\publicNotice\\components\\noticeMenuDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\publicNotice\\components\\noticeMenuDialog.vue","mtime":1669637191969},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nimport noticeMenu from '@/api/examination/noticeMenu.js'\nimport {\n\tmapState\n} from 'vuex'\nimport 'quill/dist/quill.core.css'\nimport 'quill/dist/quill.snow.css'\nimport 'quill/dist/quill.bubble.css'\nimport {\n\tquillEditor\n} from 'vue-quill-editor'\nconst toolbarOptions = [\n\t['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线\n\t['blockquote', 'code-block'], //引用,代码块\n\t[{\n\t\t\theader: 1\n\t\t},\n\t\t{\n\t\t\theader: 2\n\t\t}\n\t], // 几级标题\n\t[{\n\t\t\tlist: 'ordered'\n\t\t},\n\t\t{\n\t\t\tlist: 'bullet'\n\t\t}\n\t],\n\t// 字体大小\n\t[{\n\t\theader: [1, 2, 3, 4, 5, 6, false]\n\t}], // 标题\n\t[{\n\t\t\tcolor: []\n\t\t}\n\n\t], // 颜色选择\n\n\t['clean'], // 清除样式,\n\t['link', 'image'] // 上传图片、上传视频\n]\n\nexport default {\n\tname: 'equSysMenuDialog',\n\tcomponents: {\n\t\tquillEditor,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttitle: '',\n\t\t\tvisible: false,\n\t\t\tparameter: {\n\t\t\t\tcontent: \"\",\n\t\t\t\tendTime: \"\",\n\t\t\t\tmemo: \"\",\n\t\t\t\tstatus: \"\",\n\t\t\t\ttitle: \"\",\n\t\t\t\ttype: \"\"\n\t\t\t},\n\t\t\trules: {\n\t\t\t\ttitle: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入公告标题',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\ttype: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入公告类型',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tstatus: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择公告状态',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tendTime: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择截至时间',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tcontent: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入公告内容',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t},\n\t\t\tNoticeTypeList: [],\n\t\t\tNoticeStatusList: [],\n\t\t\t// 富文本配置\n\t\t\tuploadUrl: window.context.portal + '/file/v1/uploadFileForConfig', // 服务器上传地址\n\t\t\tacceptImg: '.jpg,.jpeg,.png,.JPG,.JPEG,.gif,.PNG,.GIF',\n\t\t\teditorOption: {\n\t\t\t\tplaceholder: '请在这里输入',\n\t\t\t\ttheme: 'snow', //主题 snow/bubble\n\t\t\t\tmodules: {\n\t\t\t\t\thistory: {\n\t\t\t\t\t\tdelay: 1000,\n\t\t\t\t\t\tmaxStack: 50,\n\t\t\t\t\t\tuserOnly: false\n\t\t\t\t\t},\n\t\t\t\t\ttoolbar: {\n\t\t\t\t\t\tcontainer: toolbarOptions,\n\t\t\t\t\t\thandlers: {\n\t\t\t\t\t\t\timage: function(value) {\n\t\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t\t// 调用element的图片上传组件\n\t\t\t\t\t\t\t\t\tdocument.querySelector('.avatar-qeuploader input').click()\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.quill.format('image', false)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.NoticeTypeList = dictUtils.getDictItemsFromCache('gglx')\n\t\tthis.NoticeStatusList = dictUtils.getDictItemsFromCache('ggzt')\n\t},\n\tcomputed: mapState({\n\t\theader: state => {\n\t\t\treturn {\n\t\t\t\tAuthorization: `Bearer ${state.login.currentUser.token}`\n\t\t\t}\n\t\t}\n\t}),\n\tmounted() {},\n\tmethods: {\n\t\tedit(val) {\n\t\t\tthis.parameter = val\n\t\t\tthis.title = '修改'\n\t\t\tthis.visible = true\n\t\t},\n\t\tadd(val) {\n\t\t\tthis.title = '新增'\n\t\t\tthis.visible = true\n\t\t\tconsole.log(val)\n\t\t},\n\t\t// 关闭新增人员窗口\n\t\thandleClose() {\n\t\t\tthis.visible = false\n\t\t\tthis.parameter = {\n\t\t\t\tcontent: \"\",\n\t\t\t\tendTime: \"\",\n\t\t\t\tmemo: \"\",\n\t\t\t\tstatus: \"\",\n\t\t\t\ttitle: \"\",\n\t\t\t\ttype: \"\"\n\t\t\t}\n\t\t},\n\t\t// 保存\n\t\thandleSave() {\n\t\t\tthis.$refs.formInfo.validate(valid => {\n\t\t\t\tif (valid) {\n\t\t\t\t\tlet method\n\t\t\t\t\tif (this.title === '新增') {\n\t\t\t\t\t\tmethod = noticeMenu.addNotice\n\t\t\t\t\t}\n\t\t\t\t\tif (this.title === '修改') {\n\t\t\t\t\t\tmethod = noticeMenu.editNotice\n\t\t\t\t\t}\n\t\t\t\t\tmethod(this.parameter, response => {\n\t\t\t\t\t\tif (response.state) {\n\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\tmessage: this.title + '成功',\n\t\t\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.handleClose()\n\t\t\t\t\t\t\tthis.$emit('loadData')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.$message.warning(response.message)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tqeuploadSuccess(res) {\n\t\t\t// 获取富文本组件实例\n\t\t\tlet quill = this.$refs.QuillEditor.quill\n\t\t\t// 如果上传成功\n\t\t\tif (res) {\n\t\t\t\t// 获取光标所在位置\n\t\t\t\tlet fileId = res.fileId\n\t\t\t\tlet url = this.previewUrl + fileId\n\t\t\t\tlet length = quill.getSelection().index\n\t\t\t\t// 插入图片,res为服务器返回的图片链接地址\n\t\t\t\tquill.insertEmbed(length, 'image', url)\n\t\t\t\t// 调整光标到最后\n\t\t\t\tquill.setSelection(length + 1)\n\t\t\t} else {\n\t\t\t\t// 提示信息,需引入Message\n\t\t\t\tthis.$message.error('图片插入失败!')\n\t\t\t}\n\t\t},\n\t\tbeforeUpload(file) {\n\t\t\treturn true\n\t\t},\n\t\t// 失去焦点\n\t\tonEditorBlur(editor) {},\n\t\t// 获得焦点\n\t\tonEditorFocus(editor) {},\n\t\t// 开始\n\t\tonEditorReady(editor) {},\n\t\t// 值发生变化\n\t\tonEditorChange(editor) {},\n\t}\n}\n",null]}