{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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//\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport noticeMenu from '@/api/examination/noticeMenu.js';\nimport { mapState } from 'vuex';\nimport 'quill/dist/quill.core.css';\nimport 'quill/dist/quill.snow.css';\nimport 'quill/dist/quill.bubble.css';\nimport { quillEditor } from 'vue-quill-editor';\nvar toolbarOptions = [['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线\n['blockquote', 'code-block'], //引用,代码块\n[{\n header: 1\n}, {\n header: 2\n}], // 几级标题\n[{\n list: 'ordered'\n}, {\n list: 'bullet'\n}], // 字体大小\n[{\n header: [1, 2, 3, 4, 5, 6, false]\n}], // 标题\n[{\n color: []\n}], // 颜色选择\n['clean'], // 清除样式,\n['link', 'image'] // 上传图片、上传视频\n];\nexport default {\n name: 'equSysMenuDialog',\n components: {\n quillEditor: quillEditor\n },\n data: function data() {\n return {\n title: '',\n visible: false,\n parameter: {\n content: \"\",\n endTime: \"\",\n memo: \"\",\n status: \"\",\n title: \"\",\n type: \"\"\n },\n rules: {\n title: [{\n required: true,\n message: '请输入公告标题',\n trigger: 'blur'\n }],\n type: [{\n required: true,\n message: '请输入公告类型',\n trigger: 'blur'\n }],\n status: [{\n required: true,\n message: '请选择公告状态',\n trigger: 'blur'\n }],\n endTime: [{\n required: true,\n message: '请选择截至时间',\n trigger: 'blur'\n }],\n content: [{\n required: true,\n message: '请输入公告内容',\n trigger: 'blur'\n }]\n },\n NoticeTypeList: [],\n NoticeStatusList: [],\n // 富文本配置\n uploadUrl: window.context.portal + '/file/v1/uploadFileForConfig',\n // 服务器上传地址\n acceptImg: '.jpg,.jpeg,.png,.JPG,.JPEG,.gif,.PNG,.GIF',\n editorOption: {\n placeholder: '请在这里输入',\n theme: 'snow',\n //主题 snow/bubble\n modules: {\n history: {\n delay: 1000,\n maxStack: 50,\n userOnly: false\n },\n toolbar: {\n container: toolbarOptions,\n handlers: {\n image: function image(value) {\n if (value) {\n // 调用element的图片上传组件\n document.querySelector('.avatar-qeuploader input').click();\n } else {\n this.quill.format('image', false);\n }\n }\n }\n }\n }\n }\n };\n },\n created: function created() {\n this.NoticeTypeList = dictUtils.getDictItemsFromCache('gglx');\n this.NoticeStatusList = dictUtils.getDictItemsFromCache('ggzt');\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n mounted: function mounted() {},\n methods: {\n edit: function edit(val) {\n this.parameter = val;\n this.title = '修改';\n this.visible = true;\n },\n add: function add(val) {\n this.title = '新增';\n this.visible = true;\n console.log(val);\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.visible = false;\n this.parameter = {\n content: \"\",\n endTime: \"\",\n memo: \"\",\n status: \"\",\n title: \"\",\n type: \"\"\n };\n },\n // 保存\n handleSave: function handleSave() {\n var _this = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (_this.title === '新增') {\n method = noticeMenu.addNotice;\n }\n\n if (_this.title === '修改') {\n method = noticeMenu.editNotice;\n }\n\n method(_this.parameter, function (response) {\n if (response.state) {\n _this.$notify({\n type: 'success',\n message: _this.title + '成功',\n duration: 2000\n });\n\n _this.handleClose();\n\n _this.$emit('loadData');\n } else {\n _this.$message.warning(response.message);\n }\n });\n }\n });\n },\n qeuploadSuccess: function qeuploadSuccess(res) {\n // 获取富文本组件实例\n var quill = this.$refs.QuillEditor.quill; // 如果上传成功\n\n if (res) {\n // 获取光标所在位置\n var fileId = res.fileId;\n var url = this.previewUrl + fileId;\n var length = quill.getSelection().index; // 插入图片,res为服务器返回的图片链接地址\n\n quill.insertEmbed(length, 'image', url); // 调整光标到最后\n\n quill.setSelection(length + 1);\n } else {\n // 提示信息,需引入Message\n this.$message.error('图片插入失败!');\n }\n },\n beforeUpload: function beforeUpload(file) {\n return true;\n },\n // 失去焦点\n onEditorBlur: function onEditorBlur(editor) {},\n // 获得焦点\n onEditorFocus: function onEditorFocus(editor) {},\n // 开始\n onEditorReady: function onEditorReady(editor) {},\n // 值发生变化\n onEditorChange: function onEditorChange(editor) {}\n }\n};",null]}