{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\WorkItems\\components\\newsR-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\WorkItems\\components\\newsR-dialog.vue","mtime":1686215346968},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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'; // import flashFloods from '@/api/flashFloods.js'\n\nimport newsRelease from '@/api/newsRelease.js'; // import iconDialog from './iconDialog.vue'\n\nimport 'quill/dist/quill.core.css';\nimport 'quill/dist/quill.snow.css';\nimport 'quill/dist/quill.bubble.css';\nimport { quillEditor } from 'vue-quill-editor';\nimport RejectInfoDialog from '@/components/dialog/RejectInfoDialog.vue';\nimport utils from '@/utils.js';\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 RejectInfoDialog: RejectInfoDialog // iconDialog\n\n },\n data: function data() {\n return {\n markLoading: false,\n activeCollapse: ['1'],\n reqLoading: false,\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 header: {\n Authorization: \"Bearer \".concat(this.$store.state.login.currentUser.token)\n },\n fileList: [],\n params: {\n type: 2,\n title: null,\n titleDescription: null,\n isUrl: 0,\n url: null,\n endTime: null,\n drafter: null,\n operateType: 2,\n projectId: '',\n // rotatingDisplayPictures: null,\n file: null,\n content: null,\n excellent: '' // createTime: moment().format('YYYY-MM-DD HH:mm:ss')\n\n },\n rotatingDisplayPictures: null,\n // classifyNames: [\n // {\n // name: '区县工作动态',\n // value: '1635207542319882240'\n // },\n // {\n // name: '领导关注',\n // value: '1635207757647060992'\n // },\n // {\n // name: '工作部署',\n // value: '1635207810117804032'\n // }\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 newsType: [{\n required: true,\n message: '请选择类型',\n trigger: 'blur'\n }],\n excellent: [{\n required: true,\n message: '请选择优秀程度',\n trigger: 'blur'\n }],\n operateType: [{\n required: true,\n message: '请选择工作动态类型',\n trigger: 'change'\n }],\n projectId: [{\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 // {\n // required: true,\n // message: '请上传轮播展示图片',\n // trigger: 'blur'\n // }\n // ],\n drafter: [{\n required: true,\n message: '请输入拟稿人',\n trigger: 'blur'\n }]\n },\n buildTypes: [],\n buildStructures: [],\n // 优秀程度\n options: [{\n label: '不接受',\n value: '1'\n }, {\n label: '上分屏',\n value: '2'\n }, {\n label: '上主屏',\n value: '3'\n }],\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 imageDrop: true,\n imageResize: {\n displayStyles: {\n width: '200px',\n backgroundColor: 'black',\n border: 'none',\n color: 'white'\n },\n modules: ['Resize', 'DisplaySize', 'Toolbar']\n }\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 pickerOptions: {\n disabledDate: function disabledDate(time) {\n return time.getTime() < Date.now();\n }\n },\n workTypeOptions: [{\n label: '重大项目',\n value: 1\n }, {\n label: '区县动态',\n value: 2\n }],\n projectOptions: []\n };\n },\n created: function created() {\n this.getProjectAll();\n this.getDetailInfo();\n this.buildTypes = dictUtils.getDictItemsFromCache('shzhfz-zfjzlx');\n this.buildStructures = dictUtils.getDictItemsFromCache('shzhfz-zfjgxs');\n },\n // computed: mapState({\n // header: state => {\n // return {\n // Authorization: `Bearer ${state.login.currentUser.token}`\n // }\n // }\n // }),\n methods: {\n // 根据项目id获取项目名称\n getProjectName: function getProjectName(id) {\n var name = '';\n this.projectOptions.forEach(function (item) {\n if (item.id === id) {\n name = item.projectName;\n }\n });\n return name;\n },\n // 获取项目列表\n getProjectAll: function getProjectAll() {\n var _this = this;\n\n newsRelease.getProjectAllByUser(function (res) {\n _this.projectOptions = res;\n });\n },\n getDictName: function getDictName(code, value) {\n return utils.getDictName(code, value);\n },\n // handleAvatarSuccess(res, file) {\n // console.log(res);\n // this.$set(this.params, 'rotatingDisplayPictures', res.fileId)\n // this.rotatingDisplayPictures = this.previewUrl + res.fileId\n // },\n // beforeAvatarUpload(file) {\n // const suffix =\n // file.type === 'image/jpg' ||\n // file.type === 'image/png' ||\n // file.type === 'image/jpeg'\n // if (!suffix) {\n // this.$message.error('上传轮播图片支持格式-JPG/PNG/JPEG!')\n // }\n // return suffix\n // },\n handleClose: function handleClose() {\n this.params = {\n operateType: 2\n };\n this.$emit('closeFormDiao');\n },\n // uploadData() {\n // return {\n // body: JSON.stringify({\n // bizCode: 'Accessory',\n // bizId: ''\n // })\n // }\n // },\n // 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 var quill = this.$refs.QuillEditor.quill;\n quill.setSelection(length + 1);\n },\n // 值发生变化\n onEditorChange: function onEditorChange(editor) {\n this.params.content = editor.html;\n },\n qeuploadSuccess: function qeuploadSuccess(res) {\n console.log(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\n var _length = quill.getSelection().index ? quill.getSelection().index : quill.getLength(); // 插入图片,res为服务器返回的图片链接地址\n\n\n quill.insertEmbed(_length, 'image', url); // 调整光标到最后\n\n quill.setSelection(_length + 1);\n this.reqLoading = false;\n } else {\n // 提示信息,需引入Message\n this.$message.error('图片插入失败!');\n this.reqLoading = false;\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 console.log(file);\n this.reqLoading = true; // return true\n },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this2 = this;\n\n this.reqLoading = true;\n\n if (this.title === '修改' || this.title === '审核' || this.title === '详情') {\n newsRelease.detailId(this.pId, function (res) {\n _this2.params = res;\n _this2.params.approvalComments = res.approvalComments ? res.approvalComments.split('$_$') : []; // this.params.isUrl =\n // res.isUrl == 'false' ? false : res.isUrl == 'true' ? true : ''\n\n _this2.rotatingDisplayPictures = _this2.previewUrl + res.rotatingDisplayPictures;\n _this2.params.file = res.file;\n\n if (res.file) {\n var aaa = JSON.parse(res.file);\n aaa.forEach(function (e) {\n _this2.fileList.push({\n name: e.fileName,\n url: _this2.previewUrl + e.fileId\n });\n });\n }\n\n _this2.reqLoading = false;\n });\n } else {\n this.reqLoading = false;\n }\n },\n goInfo: function goInfo(status, type) {\n var _this3 = 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 // console.log(this.title);\n if (valid) {\n // console.log(this.params)\n // if (this.title == '新增') {\n var data = JSON.parse(JSON.stringify(_this3.params));\n\n if (type === 'edit') {\n data.status = status;\n } else if (type === 'audit') {\n data.status = _this3.$route.name == 'WorkReportsAudit' ? 3 : 5;\n }\n\n data.approvalComments = data.approvalComments ? data.approvalComments.join('$_$') : '';\n var msg = !data.status ? '提交保存为草稿成功' : data.status === 1 ? '提交并上报成功' : '通过成功';\n\n if (_this3.title == '修改' && !status && !type) {\n msg = '修改保存成功';\n }\n\n newsRelease.dynamicSaveOrUpdate(data, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: msg,\n duration: 2000 // offset: 80\n\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$emit('refList');\n } else {}\n }); // }\n // if (this.title == '修改') {\n // newsRelease.upData(this.params, response => {\n // if (response.state) {\n // this.$notify({\n // type: 'success',\n // message: '修改成功',\n // duration: 2000\n // })\n // this.$emit('closeFormDiao')\n // this.$emit('refList')\n // } else {\n // }\n // })\n // }\n } else {\n return false;\n }\n });\n },\n // 驳回\n openInputVisible: function openInputVisible() {\n var _this4 = this;\n\n this.$confirm('确认驳回吗?', this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n _this4.$refs.RejectInfoDialog.open();\n });\n },\n sendRejectInfo: function sendRejectInfo(approvalComments) {\n var _this5 = this;\n\n this.markLoading = true;\n var data = JSON.parse(JSON.stringify(this.params));\n data.status = this.$route.name == 'WorkReportsAudit' ? 2 : 4;\n data.approvalComments = approvalComments;\n newsRelease.dynamicSaveOrUpdate(data, function (response) {\n if (response.state) {\n _this5.$message.success('驳回成功');\n } else {\n _this5.$message.success('驳回失败');\n }\n\n _this5.$emit('closeFormDiao');\n\n _this5.$emit('refList');\n\n _this5.markLoading = false;\n });\n }\n }\n};",null]}