{"remainingRequest":"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\\logistics\\addLogisticsDetail\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\logistics\\addLogisticsDetail\\index.vue","mtime":1737610069434},{"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\\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":["\"use strict\";\n\nvar _interopRequireDefault = require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _vueQuillEditor = require(\"vue-quill-editor\");\nrequire(\"quill/dist/quill.core.css\");\nrequire(\"quill/dist/quill.snow.css\");\nrequire(\"quill/dist/quill.bubble.css\");\nrequire(\"../../../assets/custom-theme/font.css\");\nvar _getdata = require(\"@/api/getdata\");\nvar _auth = require(\"@/utils/auth\");\nvar _jsCookie = _interopRequireDefault(require(\"js-cookie\"));\nvar _popup = _interopRequireDefault(require(\"@/views/estate/examine/dialog/popup.vue\"));\nvar _crypto = require(\"crypto\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n//引入font.css \n\n// 自定义字体大小\nvar Size = _vueQuillEditor.Quill.import('attributors/style/size');\nSize.whitelist = ['10px', '12px', '14px', '16px', '18px', '20px'];\n_vueQuillEditor.Quill.register(Size, true);\n\n// 自定义字体类型\nvar fonts = ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial', 'Times-New-Roman', 'sans-serif', '宋体', '黑体'];\nvar Font = _vueQuillEditor.Quill.import('formats/font');\nFont.whitelist = fonts;\n_vueQuillEditor.Quill.register(Font, true);\nvar _default = exports.default = {\n components: {\n Popup: _popup.default,\n quillEditor: _vueQuillEditor.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: \"1\",\n cate: \"1\",\n content: \"\",\n author: '',\n status: '',\n info_type: '1'\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 author: [{\n required: true,\n message: \"请输入作者\",\n trigger: \"blur\"\n }, {\n validator: titleVa,\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(\"logisticsRowdata\")) : this.$route.query.rowdata;\n this.ruleForm.title = data ? data.title : \"\";\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: \"logistics-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 (_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 info_type: this.ruleForm.info_type\n };\n (0, _getdata.updataLogistics)(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: \"logistics-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 info_type: this.ruleForm.info_type\n };\n (0, _getdata.addLogistics)(_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: \"logistics-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: \"logistics-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]}