hz-zhhq-web/node_modules/.cache/babel-loader/2c69b5c0cc069f150f9224fdb4c...

1 line
12 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\healthmsg\\addhealthmsgDetail\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\healthmsg\\addhealthmsgDetail\\index.vue","mtime":1737610069422},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\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//\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 { Quill, quillEditor } from 'vue-quill-editor';\nimport 'quill/dist/quill.core.css';\nimport 'quill/dist/quill.snow.css';\nimport 'quill/dist/quill.bubble.css';\n\n//引入font.css \nimport \"../../../assets/custom-theme/font.css\";\n\n// 自定义字体大小\nvar Size = Quill.import('attributors/style/size');\nSize.whitelist = ['10px', '12px', '14px', '16px', '18px', '20px'];\nQuill.register(Size, true);\n\n// 自定义字体类型\nvar fonts = ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial', 'Times-New-Roman', 'sans-serif', '宋体', '黑体'];\nvar Font = Quill.import('formats/font');\nFont.whitelist = fonts;\nQuill.register(Font, true);\nimport { UpdataHealthmsg, AdddataHealthmsg, Uploading, saveImage } from \"@/api/getdata\";\nimport { getToken } from '@/utils/auth';\nimport Cookies from 'js-cookie';\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nimport { constants } from \"crypto\";\nexport default {\n components: {\n Popup: Popup,\n quillEditor: quillEditor\n },\n data: function data() {\n var priceVa = function priceVa(rule, value, callback) {\n var reg = /^\\d{1,}(\\.\\d{1,2})?$/;\n var reg2 = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,;'\\\\[\\]·~@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (reg.test(value) && !reg2.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入数字、且小数点后最多两位!\"));\n }\n };\n var titleVa = function titleVa(rule, value, callback) {\n var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"不支持输入@#¥%……...等特殊字符 \"));\n }\n };\n return {\n types: [{\n label: \"好文转发\",\n value: \"1\"\n }, {\n label: \"自己撰文\",\n value: \"2\"\n }],\n indexCall: this.$route.query.index ? this.$route.query.index : window.localStorage.getItem(\"healthmsgIndex\"),\n validation: false,\n completeTitle: \"\",\n nav: \"\",\n dialogImageUrl: \"\",\n dialogVisible: false,\n view: false,\n //切换富文本框\n visib_uri: '2',\n //editorOption : {},\n serverUrl: process.env.VUE_APP_BASE_API + '/greenH5/greenWebmodul/rest/healthmsg/saveImage',\n editorOption: {\n placeholder: \"请输入\",\n theme: \"snow\",\n // or 'bubble' \n modules: {\n toolbar: {\n container: '#toolbar'\n // handlers: {\n // 'image': function (value) {\n // if (value) {\n // // 调用iview图片上传\n // document.querySelector('.avatar-uploader input').click();\n // } else {\n // this.quill.format('image', false);\n // }\n // }\n // },\n }\n }\n },\n ruleForm: {\n title: \"\",\n des_info: \"\",\n type: \"\",\n cate: \"\",\n content: \"\",\n author: '',\n status: ''\n },\n aa: \"\",\n til: \"添加\",\n id: \"\",\n rules: {\n title: [{\n required: true,\n message: \"请输入标题\",\n trigger: \"blur\"\n }, {\n validator: titleVa,\n trigger: \"blur\"\n }],\n content: [{\n required: true,\n message: \"请输入链接地址\",\n trigger: \"blur\"\n }, {\n //validator: contentVa,\n trigger: \"blur\"\n }],\n type: [{\n required: true,\n message: \"请选择\",\n trigger: \"blur\"\n }],\n cate: [{\n required: true,\n message: \"请选择\",\n trigger: \"blur\"\n }]\n }\n };\n },\n created: function created() {},\n mounted: function mounted() {\n var author = \"\";\n var data = typeof this.$route.query.rowdata == \"string\" ? JSON.parse(window.localStorage.getItem(\"healthmsgRowdata\")) : this.$route.query.rowdata;\n this.ruleForm.title = data ? data.title : \"\";\n this.ruleForm.des_info = data ? data.des_info : \"\";\n this.ruleForm.type = data ? data.type : \"\";\n this.ruleForm.cate = data ? data.cate : \"\";\n this.ruleForm.content = data ? data.content : \"\";\n this.ruleForm.author = data ? data.author : author;\n this.til = data ? data.til : \"添加\";\n this.id = data ? data.id : \"\";\n //仅适用查看\n this.view = data ? data.view : false;\n\n //默认新增时加载富文本框\n if (!data) {\n this.ruleForm.type = '2';\n }\n },\n methods: {\n // 获得焦点事件\n onEditorFocus: function onEditorFocus(e) {\n this.lenIndex = e.getSelection().index;\n },\n // 内容改变事件\n onEditorChange: function onEditorChange(e) {\n this.lenIndex = e.quill.getSelection().index;\n },\n // 富文本图片上传前\n beforeUpload: function beforeUpload() {\n this.quillUpdateImg = true;\n },\n uploadSuccess: function uploadSuccess(res) {\n // 获取富文本组件实例\n var quill = this.$refs.myQuillEditor.quill;\n // 如果上传成功\n if (res.returnCode === '1') {\n // 获取光标所在位置\n var length = quill.getSelection().index;\n // 插入图片res为服务器返回的图片链接地址\n quill.insertEmbed(length, 'image', res.data);\n // 调整光标到最后\n quill.setSelection(length + 1);\n } else {\n // 提示信息需引入Message\n this.$message.error('图片插入失败');\n }\n this.quillUpdateImg = false;\n },\n // 富文本图片上传失败\n uploadError: function uploadError() {\n // loading动画消失\n this.quillUpdateImg = false;\n this.$message.error('图片插入失败');\n },\n close: function close() {\n // 关闭按钮事件\n this.dialogFormVisible = false;\n this.$refs['dataforms'].resetFields();\n },\n /**返回上一级 */comeBack: function comeBack() {\n this.$router.push({\n path: \"healthmsg-index\",\n params: {\n index: this.indexCall\n }\n });\n },\n submitForm: function submitForm(formName, idx) {\n var _this = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n // if(idx==0){\n // this.validation = true;\n // this.completeTitle = \"保存\";\n // this.nav = \"是否保存?\";\n // }else{\n // this.validation = true;\n // this.completeTitle = \"发布\";\n // this.nav = \"是否发布?\";\n // }\n if (_this.til == \"编辑\") {\n _this.validation = true;\n _this.completeTitle = \"编辑\";\n _this.nav = \"是否编辑?\";\n } else {\n _this.validation = true;\n _this.completeTitle = \"添加\";\n _this.nav = \"是否添加?\";\n }\n }\n });\n this.ruleForm.status = idx;\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this2 = this;\n if (val == \"2\") {\n var Content = {\n id: this.id,\n title: this.ruleForm.title,\n des_info: this.ruleForm.des_info,\n type: this.ruleForm.type,\n cate: this.ruleForm.cate,\n content: this.ruleForm.content,\n author: this.ruleForm.author,\n status: this.ruleForm.status\n };\n UpdataHealthmsg(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this2.$router.push({\n path: \"healthmsg-index\",\n params: {\n index: _this2.indexCall\n }\n });\n // this.$router.go(-1);\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n } else if (val == \"3\") {\n var _Content = {\n title: this.ruleForm.title,\n des_info: this.ruleForm.des_info,\n type: this.ruleForm.type,\n cate: this.ruleForm.cate,\n content: this.ruleForm.content,\n author: this.ruleForm.author,\n status: this.ruleForm.status\n };\n AdddataHealthmsg(_Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n if (_this2.completeTitle == \"添加\") {\n _this2.$router.push({\n path: \"healthmsg-index\",\n params: {\n index: 1\n }\n });\n //this.$router.go(-1);\n }\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n }\n // this.$refs[\"ruleForm\"].resetFields();\n this.validation = false;\n },\n handlePictureCardPreview: function handlePictureCardPreview(file) {\n this.dialogImageUrl = file.url;\n this.dialogVisible = true;\n },\n resetForm: function resetForm(formName) {\n if (!this.view) {\n this.$refs[formName].resetFields();\n }\n this.$router.push({\n path: \"healthmsg-index\",\n params: {\n index: this.indexCall\n }\n });\n if (!this.view) {\n this.$message({\n message: \"取消成功\",\n type: \"success\",\n duration: 800\n });\n }\n },\n // 上传图片\n handleAvatarSuccess: function handleAvatarSuccess(res, file) {\n this.picture = file;\n }\n }\n};",null]}