{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\newsR-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\newsR-dialog.vue","mtime":1684458239215},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/bbsl-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\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//\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 { mapState } from 'vuex';\nimport req from '@/request.js';\nimport latitude from '@/mixins/latitude';\nimport moment from 'moment';\nimport dictUtils from '@/components/dict/DictSelectUtils.js'; // import flashFloods from '@/api/flashFloods.js'\n\nimport newsRelease from '@/api/newsRelease.js';\nimport iconDialog from \"./iconDialog.vue\";\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 script: 'sub'\n}, {\n script: 'super'\n}], // 下角标,上角标\n[{\n indent: '-1'\n}, {\n indent: '+1'\n}], // 缩进\n[{\n direction: 'rtl'\n}], // 文字输入方向\n[{\n size: ['small', false, 'large', 'huge']\n}], // 字体大小\n[{\n header: [1, 2, 3, 4, 5, 6, false]\n}], // 标题\n[{\n color: []\n}, {\n background: []\n}], // 颜色选择\n[{\n font: ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial']\n}], // 字体\n[{\n align: []\n}], // 居中\n['clean'], // 清除样式,\n['link', 'image'] // 上传图片、上传视频\n];\nexport default {\n name: 'falshForm',\n props: {\n showFormDia: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n default: ''\n },\n pId: {\n type: String,\n default: ''\n }\n },\n components: {\n quillEditor: quillEditor,\n iconDialog: iconDialog\n },\n data: function data() {\n var _params;\n\n return {\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n uploadUrl: window.context.portal + '/file/v1/uploadFileForConfig',\n // 服务器上传地址\n accept: '.bmp,.jpg,.png,.tif,.gif,.pcx,.tga,.exif,.fpx,.svg,.psd,.cdr,.pcd,.dxf,.ufo,.eps,.ai,.raw,.WMF,.webp,.avif,.apng,.xls,.docx,.docm,.doc,.dotx,.pptx,.pptm,.ppt,.pdf,.xps,.potx,.txt,.xls,.xlsx,.xps,.zip,.rar,.7z',\n acceptImg: '.jpg,.jpeg,.png,.JPG,.JPEG,.gif,.PNG,.GIF',\n fileList: [],\n params: (_params = {\n type: null,\n title: null,\n titleDescription: null,\n isUrl: true,\n url: null,\n endTime: null,\n drafter: null,\n rotatingDisplayPictures: null,\n file: null\n }, _defineProperty(_params, \"type\", null), _defineProperty(_params, \"content\", null), _defineProperty(_params, \"createTime\", moment().format('YYYY-MM-DD HH:mm:ss')), _params),\n rotatingDisplayPictures: null,\n classifyNames: [{\n name: '新闻公告',\n value: 1\n }, {\n name: '轮播图',\n value: 2\n }],\n crOverTypes: [],\n //跨界类型字典数组\n basGrads: [],\n //流域级别字典类型\n basAdNames: [],\n //行政下拉\n AdName: null,\n //接受每次选中的值\n setKesLabel: {\n value: 'code',\n label: 'name',\n children: 'children'\n },\n rules: {\n type: [{\n required: true,\n message: '请选择所属类型',\n trigger: 'change'\n }],\n title: [{\n required: true,\n message: '请输入标题',\n trigger: 'blur'\n }],\n isUrl: [{\n required: true,\n message: '请选择是否外部链接',\n trigger: 'blur'\n }],\n url: [{\n required: true,\n message: '请输入外部链接',\n trigger: 'blur'\n }],\n rotatingDisplayPictures: [{\n required: true,\n message: '请上传轮播展示图片',\n trigger: 'blur'\n }],\n drafter: [{\n required: true,\n message: '请输入拟稿人',\n trigger: 'blur'\n }]\n },\n buildTypes: [],\n buildStructures: [],\n // 富文本配置\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.getDetailInfo();\n this.buildTypes = dictUtils.getDictItemsFromCache('shzhfz-zfjzlx');\n this.buildStructures = dictUtils.getDictItemsFromCache('shzhfz-zfjgxs');\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n methods: {\n handleAvatarSuccess: function handleAvatarSuccess(res, file) {\n console.log(res.fileId);\n console.log(this.previewUrl + res.fileId);\n this.$set(this.params, 'rotatingDisplayPictures', res.fileId);\n this.rotatingDisplayPictures = this.previewUrl + res.fileId; // this.$set(this.params, 'rotatingDisplayPictures', res.fileId)\n // this.params.rotatingDisplayPictures = URL.createObjectURL(file.raw);\n },\n beforeAvatarUpload: function beforeAvatarUpload(file) {\n var suffix = file.type === 'image/jpg' || file.type === 'image/png' || file.type === 'image/jpeg';\n\n if (!suffix) {\n this.$message.error('上传轮播图片支持格式-JPG/PNG/JPEG!');\n }\n\n return suffix;\n },\n handleClose: function handleClose() {\n this.params = {};\n this.$emit('closeFormDiao');\n },\n uploadData: function uploadData() {\n return {\n body: JSON.stringify({\n bizCode: 'newAccessory',\n bizId: ''\n })\n };\n },\n selectIcon: function selectIcon(data) {\n this.params.icon = data;\n this.$forceUpdate();\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 this.params.content = editor.html;\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 uploadSuccess: function uploadSuccess(res) {\n if (res) {\n console.log(res);\n var arr = [];\n arr.push({\n fileName: res.fileName,\n fileId: res.fileId\n });\n this.params.file = JSON.stringify(arr);\n } else {\n // 提示信息,需引入Message\n this.$message.error('上传失败!');\n }\n },\n beforeUpload: function beforeUpload(file) {\n return true;\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this = this;\n\n if (this.title === '修改') {\n newsRelease.detailId(this.pId, function (res) {\n _this.params = res;\n _this.params.isUrl = res.isUrl == 'false' ? false : res.isUrl == 'true' ? true : '';\n _this.rotatingDisplayPictures = _this.previewUrl + res.rotatingDisplayPictures;\n _this.params.file = res.file;\n\n if (res.file) {\n var aaa = JSON.parse(res.file);\n aaa.forEach(function (e) {\n _this.fileList.push({\n name: e.fileName,\n url: _this.previewUrl + e.fileId\n });\n });\n }\n });\n } else {}\n },\n goInfo: function goInfo() {\n var _this2 = this;\n\n if (!this.params.isUrl) {\n this.params.url = '';\n } else if (this.params.isUrl) {\n this.params.content = '';\n } else {\n this.params.url = '';\n this.params.content = '';\n }\n\n if (this.params.type == '1') {\n this.params.rotatingDisplayPictures = '';\n } else if (this.params.type == '2') {\n this.params.icon = '';\n } else {\n this.params.rotatingDisplayPictures = '';\n this.icon = '';\n }\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this2.title === '新增') {\n newsRelease.addSave(_this2.params, function (response) {\n if (response.state) {\n _this2.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000 // offset: 80\n\n });\n\n _this2.$emit('closeFormDiao');\n\n _this2.$emit('refList');\n } else {}\n });\n }\n\n if (_this2.title === '修改') {\n newsRelease.upData(_this2.params, function (response) {\n if (response.state) {\n _this2.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this2.$emit('closeFormDiao');\n\n _this2.$emit('refList');\n } else {}\n });\n }\n } else {\n return false;\n }\n });\n }\n }\n};",null]}