{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/information.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/information.vue","mtime":1725957645725},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["\nimport API from \"@/api.js\";\nimport Constant from \"@/Constant.js\";\nimport escapeHTML from \"@/assets/js/escapeHTML.js\";\nimport platAd from \"./platAd\";\nexport default {\n props: [\"openParams\"],\n components: {\n platAd,\n },\n data() {\n return {\n Constant,\n showEmotion: false,\n imag: '',\n emotionList: [\n {\n type: \"[去旅行]\",\n path: '',\n url: \"/message/img/face/qlx_thumb.gif\",\n },\n {\n type: \"[广告]\",\n path: '',\n url: \"/message/img/face/ad_new0902_thumb.gif\",\n },\n {\n type: \"[doge]\",\n path: '',\n url: \"/message/img/face/doge_thumb.gif\",\n },\n {\n type: \"[喵喵]\",\n path: '',\n url: \"/message/img/face/mm_thumb.gif\",\n },\n {\n type: \"[二哈]\",\n path: '',\n url: \"/message/img/face/moren_hashiqi_thumb.png\",\n },\n {\n type: \"[哆啦A梦吃惊]\",\n path: '',\n url: \"/message/img/face/dorachijing_thumb.gif\",\n },\n {\n type: \"[哆啦A梦花心]\",\n path: '',\n url: \"/message/img/face/dorachijing_thumb.gif\",\n },\n {\n type: \"[哆啦A梦微笑]\",\n path: '',\n url: \"/message/img/face/jqmweixiao_thumb.gif\",\n },\n {\n type: \"[笑cry]\",\n path: '< src=\"/message/img/face/xiaoku_thumb.gif\" />',\n url: \"/message/img/face/xiaoku_thumb.gif\",\n },\n {\n type: \"[摊手]\",\n path: '',\n url: \"/message/img/face/pcmoren_tanshou_thumb.png\",\n },\n {\n type: \"[抱手]\",\n path: '',\n url: \"/message/img/face/pcmoren_baobao_thumb.png\",\n },\n {\n type: \"[群体围观]\",\n path: '',\n url: \"/message/img/face/lxhweiguan_thumb.gif\",\n },\n\n //12\n {\n type: \"[坏笑]\",\n path: '',\n url: \"/message/img/face/pcmoren_huaixiao_thumb.png\",\n },\n {\n type: \"[舔屏]\",\n path: '',\n url: \"/message/img/face/pcmoren_tian_thumb.png\",\n },\n {\n type: \"[污]\",\n path: '',\n url: \"/message/img/face/pcmoren_wu_thumb.png\",\n },\n {\n type: \"[微笑]\",\n path: '',\n url: \"/message/img/face/huanglianwx_thumb.gif\",\n },\n {\n type: \"[嘻嘻]\",\n path: '',\n url: \"/message/img/face/tootha_thumb.gif\",\n },\n {\n type: \"[哈哈]\",\n path: '',\n url: \"/message/img/face/laugh.gif\",\n },\n {\n type: \"[挖鼻]\",\n path: '',\n url: \"/message/img/face/wabi_thumb.gif\",\n },\n {\n type: \"[可爱]\",\n path: '',\n url: \"/message/img/face/tza_thumb.gif\",\n },\n {\n type: \"[可怜]\",\n path: '',\n url: \"/message/img/face/kl_thumb.gif\",\n },\n {\n type: \"[吃惊]\",\n path: '',\n url: \"/message/img/face/cj_thumb.gif\",\n },\n {\n type: \"[害羞]\",\n path: '',\n url: \"/message/img/face/shamea_thumb.gif\",\n },\n {\n type: \"[挤眼]\",\n path: '',\n url: \"/message/img/face/zy_thumb.gif\",\n },\n //24\n {\n type: \"[闭嘴]\",\n path: '',\n url: \"/message/img/face/bz_thumb.gif\",\n },\n {\n type: \"[鄙视]\",\n path: '',\n url: \"/message/img/face/bs2_thumb.gif\",\n },\n {\n type: \"[爱你]\",\n path: '',\n url: \"/message/img/face/lovea_thumb.gif\",\n },\n {\n type: \"[泪]\",\n path: '',\n url: \"/message/img/face/sada_thumb.gif\",\n },\n {\n type: \"[偷笑]\",\n path: '',\n url: \"/message/img/face/heia_thumb.gif\",\n },\n {\n type: \"[亲亲]\",\n path: '',\n url: \"/message/img/face/qq_thumb.gif\",\n },\n {\n type: \"[生病]\",\n path: '',\n url: \"/message/img/face/sb_thumb.gif\",\n },\n {\n type: \"[太开心]\",\n path: '',\n url: \"/message/img/face/mb_thumb.gif\",\n },\n {\n type: \"[白眼]\",\n path: '',\n url: \"/message/img/face/landeln_thumb.gif\",\n },\n {\n type: \"[右哼哼]\",\n path: '',\n url: \"/message/img/face/yhh_thumb.gif\",\n },\n {\n type: \"[左哼哼]\",\n path: '',\n url: \"/message/img/face/zhh_thumb.gif\",\n },\n {\n type: \"[嘘]\",\n path: '',\n url: \"/message/img/face/x_thumb.gif\",\n },\n //36\n {\n type: \"[哀]\",\n path: '',\n url: \"/message/img/face/cry.gif\",\n },\n {\n type: \"[委屈]\",\n path: '',\n url: \"/message/img/face/wq_thumb.gif\",\n },\n\n {\n type: \"[吐]\",\n path: '',\n url: \"/message/img/face/t_thumb.gif\",\n },\n {\n type: \"[哈欠]\",\n path: '',\n url: \"/message/img/face/haqianv2_thumb.gif\",\n },\n {\n type: \"[抱抱_旧]\",\n path: '',\n url: \"/message/img/face/bba_thumb.gif\",\n },\n {\n type: \"[怒]\",\n path: '',\n url: \"/message/img/face/angrya_thumb.gif\",\n },\n {\n type: \"[疑问]\",\n path: '',\n url: \"/message/img/face/yw_thumb.gif\",\n },\n {\n type: \"[馋嘴]\",\n path: '',\n url: \"/message/img/face/cza_thumb.gif\",\n },\n {\n type: \"[拜拜]\",\n path: '',\n url: \"/message/img/face/88_thumb.gif\",\n },\n {\n type: \"[思考]\",\n path: '',\n url: \"/message/img/face/sk_thumb.gif\",\n },\n {\n type: \"[汗]\",\n path: '',\n url: \"/message/img/face/sweata_thumb.gif\",\n },\n {\n type: \"[困]\",\n path: '',\n url: \"/message/img/face/kunv2_thumb.gif\",\n },\n //48\n {\n type: \"[睡]\",\n path: '',\n url: \"/message/img/face/huangliansj_thumb.gif\",\n },\n {\n type: \"[钱]\",\n path: '',\n url: \"/message/img/face/money_thumb.gif\",\n },\n {\n type: \"[失望]\",\n path: '',\n url: \"/message/img/face/sw_thumb.gif\",\n },\n {\n type: \"[酷]\",\n path: '',\n url: \"/message/img/face/cool_thumb.gif\",\n },\n {\n type: \"[色]\",\n path: '',\n url: \"/message/img/face/huanglianse_thumb.gif\",\n },\n {\n type: \"[哼]\",\n path: '',\n url: \"/message/img/face/hatea_thumb.gif\",\n },\n {\n type: \"[鼓掌]\",\n path: '',\n url: \"/message/img/face/gza_thumb.gif\",\n },\n {\n type: \"[晕]\",\n path: '',\n url: \"/message/img/face/dizzya_thumb.gif\",\n },\n {\n type: \"[悲伤]\",\n path: '',\n url: \"/message/img/face/bs_thumb.gif\",\n },\n {\n type: \"[抓狂]\",\n path: '',\n url: \"/message/img/face/crazya_thumb.gif\",\n },\n {\n type: \"[黑线]\",\n path: '',\n url: \"/message/img/face/h_thumb.gif\",\n },\n {\n type: \"[阴险]\",\n path: '',\n url: \"/message/img/face/yx_thumb.gif\",\n },\n //60\n {\n type: \"[怒骂]\",\n path: '',\n url: \"/message/img/face/numav2_thumb.gif\",\n },\n {\n type: \"[互粉]\",\n path: '',\n url: \"/message/img/face/hufen_thumb.gif\",\n },\n {\n type: \"[心]\",\n path: '',\n url: \"/message/img/face/hearta_thumb.gif\",\n },\n {\n type: \"[伤心]\",\n path: '',\n url: \"/message/img/face/unheart.gif\",\n },\n {\n type: \"[猪头]\",\n path: '',\n url: \"/message/img/face/pig.gif\",\n },\n {\n type: \"[熊猫]\",\n path: '',\n url: \"/message/img/face/panda_thumb.gif\",\n },\n {\n type: \"[兔子]\",\n path: '',\n url: \"/message/img/face/rabbit_thumb.gif\",\n },\n {\n type: \"[ok]\",\n path: '',\n url: \"/message/img/face/ok_thumb.gif\",\n },\n {\n type: \"[耶]\",\n path: '',\n url: \"/message/img/face/ye_thumb.gif\",\n },\n {\n type: \"[good]\",\n path: '',\n url: \"/message/img/face/good_thumb.gif\",\n },\n {\n type: \"[NO]\",\n path: '',\n url: \"/message/img/face/buyao_org.gif\",\n },\n {\n type: \"[赞]\",\n path: '',\n url: \"/message/img/face/z2_thumb.gif\",\n },\n //72\n {\n type: \"[来]\",\n path: '',\n url: \"/message/img/face/come_thumb.gif\",\n },\n {\n type: \"[弱]\",\n path: '',\n url: \"/message/img/face/sad_thumb.gif\",\n },\n {\n type: \"[草泥马]\",\n path: '',\n url: \"/message/img/face/shenshou_thumb.gif\",\n },\n {\n type: \"[神马]\",\n path: '',\n url: \"/message/img/face/horse2_thumb.gif\",\n },\n {\n type: \"[囧]\",\n path: '',\n url: \"/message/img/face/j_thumb.gif\",\n },\n {\n type: \"[浮云]\",\n path: '',\n url: \"/message/img/face/fuyun_thumb.gif\",\n },\n {\n type: \"[给力]\",\n path: '',\n url: \"/message/img/face/geiliv2_thumb.gif\",\n },\n {\n type: \"[围观]\",\n path: '',\n url: \"/message/img/face/wg_thumb.gif\",\n },\n {\n type: \"[威武]\",\n path: '',\n url: \"/message/img/face/vw_thumb.gif\",\n },\n {\n type: \"[话筒]\",\n path: '',\n url: \"/message/img/face/huatongv2_thumb.gif\",\n },\n {\n type: \"[蜡烛]\",\n path: '',\n url: \"/message/img/face/lazhuv2_thumb.gif\",\n },\n {\n type: \"[蛋糕]\",\n path: '',\n url: \"/message/img/face/cakev2_thumb.gif\",\n },\n ],\n readStatus: \"\",\n currentActiveName: \"first\",\n currentWordCount: 0,\n wordsRemaining: 10000,\n isEmptyPage: false,\n noReply: false,\n noReplyMy: false,\n allIsEmptyPage: false,\n messagesListNum: \"\", //企业动态信息列表数量\n messagesList: [], //企业动态信息列表\n currentArray: [],\n currentIndex: \"\", //点击回复时的index值\n isSendRange: \"\",\n sendRangeList: [], //发送范围部门列表\n sendRangeName: \"\", //发送范围部门名字\n deptList: [],\n otherSettings: false,\n labelPosition: \"right\",\n fileList: [],\n tabPosition: \"left\",\n information: \"\",\n msgsubmit: \"\",\n headline: \"\",\n recipient: \"\",\n selectDeptList: \"\", //发公告窗口选择的部门数据\n Howmanywords: 140,\n tabpanelComment: \"\",\n textarea: \"\",\n workslide: \"first\",\n activekeep: \"first\",\n activeName: \"first\",\n dialogVisible: false,\n Receivedby: false, //发公告里面的加号弹框\n centerDialogVisible: false,\n remnant: 140,\n eduiPlus: 0,\n eduisubtract: 10000,\n props: {\n label: \"name\",\n children: \"zones\",\n isLeaf: \"leaf\",\n },\n propsPull: {\n label: \"name\",\n children: \"zones\",\n isLeaf: \"leaf\",\n },\n\n //评论回复接口所需的参数缓存\n replyToUser: \"\",\n replyToUserId: \"\",\n replyMessageId: \"\",\n replyCommentId: \"\",\n replyTocontent: \"\",\n\n labelSwitchVal: \"first\",\n unreadWorkItems: [], //未读工作事项\n unreadWorkNum: 0, // 未读工作事项总页数\n unReadCurrentPage: 1, // 未读工作事项当前页数\n allNotice: [], //全部工作事项\n allNoticeNum: 0, // 全部工作事项总页数\n allNoticeCurrentPage: 1, // 全部工作事项当前页数\n myReplyData: [],\n myReplyNum: 0,\n receiveNum: 0,\n receiveData: [],\n announcementList: [],\n currentFlowType: \"\",\n currentFlowTypeNum: \"\", // 工作事项的类型\n flowType: \"first\",\n defaultCheckedKeys: [],\n isAnnouncementPage: false,\n announcementData: \"\",\n contextPath: \"\",\n statiContextPath: \"\",\n };\n },\n created() {\n this.contextPath = obpmConfig.obpmFilePath;\n this.statiContextPath = obpmConfig.statiContextPath;\n //this.notices();\n this.getMessagesList();\n //点击消息提醒通过传入自定义参数,判断参数再定义currentActiveName的值即可\n if (this.openParams.remind) {\n this.currentActiveName = \"second\";\n this.labelSwitch(\"first\");\n }\n if (this.openParams.isWorkMatters) {\n this.currentActiveName = \"second\";\n let data = {\n readStatus: 0,\n type: 0,\n _currpage: this.unReadCurrentPage,\n _rowcount: 30,\n };\n this.$api.getNotice(data, {\n onSucess: (res) => {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n },\n });\n }\n },\n\n methods: {\n backToDynamic() {\n //{{$t('form.back')}}企业动态\n this.isAnnouncementPage = false;\n },\n viewAnnouncement(id) {\n //预览公告\n this.isAnnouncementPage = true;\n this.$api.lockAnnouncementInfo(id, {\n onSucess: (res) => {\n this.announcementData = res.data.data.message;\n },\n });\n },\n showEmotionDialog(val) {\n if (val) {\n this.showEmotion = false;\n } else {\n this.showEmotion = !this.showEmotion;\n }\n },\n getEmoticons(item) {\n this.information += item.type;\n },\n deleteReplyMessage(el, index, parentIndex) {\n let commentId = el.id,\n messageId = el.messageId;\n this.$confirm(this.$t(\"msg.cant_recovery\"), this.$t(\"tip\"), {\n confirmButtonText: this.$t(\"msg.confirm\"),\n cancelButtonText: this.$t(\"btns.cancel\"),\n type: \"warning\",\n })\n .then(() => {\n this.$api.deleteReply(commentId, messageId, {\n onSucess: (res) => {\n if (res.data.status == 1) {\n this.$notify({\n title: this.$t(\"msg.es\"),\n message: \"\",\n type: \"sucess\",\n });\n this.messagesList[parentIndex].replayData.splice(index, 1);\n this.messagesList[parentIndex].commentCount =\n this.messagesList[parentIndex].commentCount - 1; //删除成功评论总数实时-1\n this.$forceUpdate();\n }\n },\n });\n })\n .catch(() => {});\n },\n hiddenBulletinDialog() {\n this.headline = \"\";\n this.recipient = \"\";\n this.textarea = \"\";\n this.centerDialogVisible = false;\n },\n deleteMessage(item, type) {\n let messageId = item.id;\n this.$confirm(this.$t(\"msg.cant_recovery\"), this.$t(\"tip\"), {\n confirmButtonText: this.$t(\"msg.confirm\"),\n cancelButtonText: this.$t(\"btns.cancel\"),\n type: \"warning\",\n })\n .then(() => {\n this.$api.deleteMessage(messageId, {\n onSucess: (response) => {\n if (response.data.status == 1) {\n this.$notify({\n title: this.$t(\"msg.es\"),\n message: \"\",\n type: \"sucess\",\n });\n if (type == \"1\") {\n this.$api.getMessagesList({\n onSucess: (res) => {\n this.messagesListNum = res.data.data.rowCount;\n this.messagesList = res.data.data.datas;\n },\n });\n } else if (type == \"2\") {\n this.$api.getAnnouncement({\n onSucess: (res) => {\n this.announcementList = res.data.data.datas;\n },\n });\n }\n }\n },\n });\n })\n .catch(() => {});\n },\n //$t('view.my_reply')(删除)\n deleteReply(item, index, num) {\n let commentId = item.id,\n messageId = item.messageId;\n this.$confirm(this.$t(\"msg.cant_recovery\"), this.$t(\"tip\"), {\n confirmButtonText: this.$t(\"msg.confirm\"),\n cancelButtonText: this.$t(\"btns.cancel\"),\n type: \"warning\",\n })\n .then(() => {\n this.$api.deleteReply(commentId, messageId, {\n onSucess: (res) => {\n if (res.data.status == 1) {\n this.$notify({\n title: this.$t(\"msg.es\"),\n message: \"\",\n type: \"sucess\",\n });\n if (num == \"1\") {\n this.myReplyData.splice(index, 1);\n } else if (num == \"2\") {\n this.receiveData.splice(index, 1);\n }\n this.$forceUpdate();\n }\n },\n });\n })\n .catch(() => {});\n },\n\n doJump(item, index) {\n let obj = JSON.parse(item.linkParams);\n let params = {\n appId: this.$root.appid,\n linkType: \"00\",\n actionContent: obj._formid,\n name: this.$t(\"view.flow\"),\n docId: obj._docid,\n _select: obj._docid,\n };\n this.$emit(\"add-tab\", params);\n if (index >= 0) {\n this.$api.noticeRead(item.id, {\n onSucess: () => {},\n });\n this.unreadWorkItems.splice(index, 1);\n if (this.unreadWorkItems.length == 0) {\n this.isEmptyPage = true;\n }\n }\n this.openParams.notice = this.openParams.notice - 1;\n },\n announcementClick(tab) {\n if (tab.index == 1) {\n this.$api.getAnnouncement({\n onSucess: (res) => {\n this.announcementList = res.data.data.datas;\n },\n });\n }\n },\n paging() {},\n /**\n * 工作事项类型切换\n */\n workHandleClick(val, currentType) {\n // console.log(\"----------->menu\", val)\n this.currentFlowType = currentType;\n this.currentFlowTypeNum = val;\n let data;\n if (this.flowType == \"first\") {\n data = {\n readStatus: 0,\n type: val,\n _currpage: 1,\n _rowcount: 30,\n };\n this.$api.getNotice(data, {\n onSucess: (res) => {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.isEmptyPage = false;\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n },\n });\n } else if (this.flowType == \"second\") {\n data = {\n readStatus: \"\",\n type: val,\n _currpage: 1,\n _rowcount: 30,\n };\n this.$api.getNotice(data, {\n onSucess: (res) => {\n this.allNoticeNum = res.data.data.rowCount;\n this.allNotice = res.data.data.datas;\n if (res.data.data.datas.length <= 0) {\n this.allIsEmptyPage = true;\n } else {\n this.allIsEmptyPage = false;\n }\n },\n });\n }\n },\n\n replyClick(tab) {\n if (tab.index == 1) {\n let currpage = 1;\n let _rowcount = 30;\n this.$api.getReceive(currpage, _rowcount, {\n onSucess: (res) => {\n if (res.data.data.rowCount <= 0) {\n this.noReplyMy = true;\n }\n this.receiveNum = res.data.data.rowCount;\n this.receiveData = res.data.data.datas;\n },\n });\n }\n },\n\n handleClick(tab) {\n if (tab.index == 1) {\n let readStatus = 0;\n let type = 0;\n let data = {\n readStatus: 0,\n type: 0,\n _currpage: 1,\n _rowcount: 30,\n };\n this.$api.getNotice(data, {\n onSucess: (res) => {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n },\n });\n } else if (tab.index == 2) {\n let currpage = 1;\n let _rowcount = 30;\n this.$api.getMyreply(currpage, _rowcount, {\n onSucess: (res) => {\n if (res.data.data.rowCount <= 0) {\n this.noReply = true;\n }\n this.myReplyNum = res.data.data.rowCount;\n this.myReplyData = res.data.data.datas;\n },\n });\n }\n },\n\n //全部标记已读\n setAllRead() {\n this.$api.setAllRead({\n onSucess: (res) => {\n // console.log(\"res-->\",res);\n if (res.data.status) {\n this.readStatus = 0;\n let type = 0;\n let data = {\n readStatus: 0,\n type: this.currentFlowTypeNum ? this.currentFlowTypeNum : 0,\n _currpage: 1,\n _rowcount: 30,\n };\n this.$api.getNotice(data, {\n onSucess: (res) => {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n },\n });\n }\n },\n });\n this.openParams.notice = \"\";\n },\n\n //删除工作事项\n deleteWorkItem(id, index, val) {\n this.$confirm(this.$t(\"msg.cant_recovery\"), this.$t(\"tip\"), {\n confirmButtonText: this.$t(\"msg.confirm\"),\n cancelButtonText: this.$t(\"btns.cancel\"),\n type: \"warning\",\n })\n .then(() => {\n this.$api.deleteNotice(id, {\n onSucess: (res) => {\n if (res.data.status == 1) {\n this.$notify({\n title: this.$t(\"msg.es\"),\n message: \"\",\n type: \"sucess\",\n });\n if (val == \"isUnread\") {\n this.$api.getNotice(\n {\n readStatus: 0,\n type: 0,\n _currpage: 1,\n _rowcount: 30,\n },\n {\n onSucess: (res) => {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n },\n }\n );\n } else if (val == \"isHaveRead\") {\n this.allNotice.splice(index, 1);\n if (this.allNotice.length <= 0) {\n this.allIsEmptyPage = true;\n }\n }\n }\n },\n });\n })\n .catch(() => {});\n },\n\n //工作事项\n labelSwitch(val) {\n this.labelSwitchVal = val;\n //this.currentFlowType = '';\n if (val == \"first\") {\n this.flowType = \"first\";\n this.readStatus = 0;\n let type = 0;\n let data = {\n readStatus: 0,\n type: this.currentFlowTypeNum ? this.currentFlowTypeNum : 0,\n _currpage: 1,\n _rowcount: 30,\n };\n this.$api.getNotice(data, {\n onSucess: (res) => {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.isEmptyPage = false;\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n },\n });\n } else if (val == \"second\") {\n this.flowType = \"second\";\n let readStatus = \"\";\n let type = 0;\n let data = {\n readStatus: \"\",\n type: this.currentFlowTypeNum ? this.currentFlowTypeNum : 0,\n _currpage: 1,\n _rowcount: 30,\n };\n\n this.$api.getNotice(data, {\n onSucess: (res) => {\n this.allNoticeNum = res.data.data.rowCount;\n this.allNotice = res.data.data.datas;\n if (res.data.data.datas.length <= 0) {\n this.allIsEmptyPage = true;\n } else {\n this.allIsEmptyPage = false;\n }\n this.$forceUpdate();\n },\n });\n }\n },\n //评论\n doComment(item, index) {\n if (item.length === 0) {\n this.$message({\n message: this.$t(\"view.c_notnull\"),\n type: \"warning\",\n });\n return false;\n }\n let newData =\n encodeURIComponent(\"content.toUser\") +\n \"=\" +\n encodeURIComponent(this.replyToUser ? this.replyToUser : item.sender) +\n \"&\" +\n encodeURIComponent(\"content.toUserId\") +\n \"=\" +\n encodeURIComponent(\n this.replyToUserId ? this.replyToUserId : item.senderId\n ) +\n \"&\" +\n encodeURIComponent(\"content.messageId\") +\n \"=\" +\n encodeURIComponent(\n this.replyMessageId ? this.replyMessageId : item.id\n ) +\n \"&\" +\n encodeURIComponent(\"content.commentId\") +\n \"=\" +\n encodeURIComponent(this.replyCommentId) +\n \"&\" +\n encodeURIComponent(\"toContent\") +\n \"=\" +\n encodeURIComponent(\n this.replyTocontent ? this.replyTocontent : item.content\n ) +\n \"&\" +\n encodeURIComponent(\"content.content\") +\n \"=\" +\n encodeURIComponent(item.tabpanelComment) +\n \"&\" +\n encodeURIComponent(\"content.attachment\") +\n \"=\" +\n encodeURIComponent(\"\");\n this.$api.doComment(newData, {\n onSucess: (res) => {\n if (res.data.status == 1) {\n this.messagesList[\n this.currentIndex ? this.currentIndex : index\n ].replayData.unshift(res.data.data);\n let commentCount =\n this.messagesList[this.currentIndex ? this.currentIndex : index]\n .commentCount;\n this.messagesList[\n this.currentIndex ? this.currentIndex : index\n ].commentCount = commentCount + 1; //评论总数实时+1\n this.$forceUpdate();\n this.replyToUser = \"\";\n this.replyToUserId = \"\";\n this.replyMessageId = \"\";\n this.replyCommentId = \"\";\n this.replyTocontent = \"\";\n item.tabpanelComment = \"\";\n this.$notify({\n title: this.$t(\"view.dis_ss\"),\n message: \"\",\n type: \"success\",\n });\n }\n },\n });\n },\n //评论回复\n replyToComment(el, item, index) {\n item.tabpanelComment = this.$t(\"reply\") + \"@\" + el.toUser + \" \";\n this.replyToUser = el.toUser;\n this.replyToUserId = el.toUserId;\n this.replyMessageId = el.messageId;\n this.replyCommentId = el.id;\n this.replyTocontent = el.content;\n this.currentIndex = index;\n },\n\n //展示评论区\n showComments(index, id) {\n if (this.currentArray.indexOf(index) > -1) {\n for (let i = 0; i < this.currentArray.length; i++) {\n if (index == this.currentArray[i]) {\n this.currentArray.splice(i, 1);\n return;\n }\n }\n } else {\n this.currentArray.push(index);\n this.$api.getMessagesReplay(id, {\n onSucess: (res) => {\n this.messagesList[index].replayData = res.data.data.datas;\n this.$forceUpdate();\n },\n });\n }\n },\n //上传文件\n uploadFile(e) {\n let fileArray = e.file;\n let file = fileArray;\n let that = this;\n let form = new FormData();\n let id = \"WU_FILE_0\",\n name = e.file.name,\n type = e.file.type,\n lastModifiedDate = e.file.lastModifiedDate,\n size = e.file.size;\n form.append(\"id\", id);\n form.append(\"name\", name);\n form.append(\"type\", type);\n form.append(\"lastModifiedDate\", lastModifiedDate);\n form.append(\"size\", size);\n form.append(\"file\", file);\n this.$api.messageUploadFile(form, {\n onSucess: (res) => {\n let obj = {\n extName: res.data.extName,\n id: res.data.id,\n size: res.data.size,\n type: res.data.type,\n name: res.data.name,\n\n url: res.data.url,\n };\n this.fileList.push(obj);\n },\n });\n },\n\n getDeptData() {\n let nodes = this.$refs.deptTree.getCheckedNodes();\n let dept = [];\n let name = [];\n let deptIdArray = [];\n if (nodes && nodes.length > 0) {\n for (let i = 0; i < nodes.length; i++) {\n let obj = {};\n obj.deptId = nodes[i].id;\n obj.deptName = nodes[i].name;\n name += nodes[i].name + \";\";\n dept.push(obj);\n deptIdArray.push(nodes[i].id);\n }\n this.defaultCheckedKeys = deptIdArray;\n // this.$refs.deptTree.setCheckedKeys(deptIdArray);\n if (this.isSendRange) {\n this.sendRangeName = name;\n this.sendRangeList = dept;\n } else {\n this.recipient = name;\n this.selectDeptList = dept;\n }\n }\n\n this.Receivedby = false;\n },\n\n loadNodeDept(node, resolve) {\n let appid = this.$root.appid;\n if (node.level === 0) {\n API.getDepartmentsByParentId(appid, \"\", {\n onSucess: function (response) {\n resolve(response.data.data);\n },\n });\n } else {\n API.getDepartmentsByParentId(appid, node.key, {\n onSucess: function (response) {\n resolve(response.data.data);\n },\n });\n }\n },\n\n //发送公告里面的加号弹框\n PlusSign(val) {\n if (val) {\n this.isSendRange = true;\n } else {\n this.isSendRange = \"\";\n }\n this.$api.getAllDeptList({\n onSucess: (res) => {\n this.deptList = res.data.data;\n },\n });\n this.Receivedby = true;\n },\n //把获取到的数据放到接受人里面去\n Receivethetitle(event) {\n this.recipient = event.name;\n },\n Sendthescope(event) {\n this.msgsubmit = event.name;\n },\n\n updateData(event) {\n this.textarea = event;\n // console.log(\"event--->\",event);\n this.currentWordCount = event.length;\n this.wordsRemaining = 10000 - event.length;\n },\n\n eduirelease() {\n let that = this;\n if (this.headline.length == 0) {\n this.$message({\n message: this.$t(\"view.t_notnull\"),\n type: \"warning\",\n });\n } else if (this.recipient.length == 0) {\n this.$message({\n message: this.$t(\"view.receiver_notnull\"),\n type: \"warning\",\n });\n } else if (this.textarea.length == 0) {\n this.$message({\n message: this.$t(\"view.c_notnull\"),\n type: \"warning\",\n });\n } else {\n let userData = {\n user: [],\n dept: this.selectDeptList,\n };\n let newData =\n encodeURIComponent(\"content.title\") +\n \"=\" +\n encodeURIComponent(this.headline) +\n \"&\" +\n encodeURIComponent(\"content.content\") +\n \"=\" +\n encodeURIComponent(this.textarea) +\n \"&\" +\n encodeURIComponent(\"content.attachment\") +\n \"=\" +\n encodeURIComponent(\"\") +\n \"&\" +\n encodeURIComponent(\"content.scope\") +\n \"=\" +\n encodeURIComponent(2) +\n \"&\" +\n encodeURIComponent(\"receiverInfo\") +\n \"=\" +\n encodeURIComponent(JSON.stringify(userData)) +\n \"&\" +\n encodeURIComponent(\"content.type\") +\n \"=\" +\n encodeURIComponent(1) +\n \"&\" +\n encodeURIComponent(\"content.sticky\") +\n \"=\" +\n encodeURIComponent(this.otherSettings);\n this.$api.makeAnnouncement(newData, {\n onSucess: (res) => {\n if (res.data.status == 1) {\n this.otherSettings = false;\n that.getMessagesList();\n that.centerDialogVisible = false;\n that.$notify({\n title: res.data.message,\n message: \"\",\n type: \"success\",\n });\n this.$api.getAnnouncement({\n onSucess: (res) => {\n this.announcementList = res.data.data.datas;\n },\n });\n } else {\n that.centerDialogVisible = false;\n that.$notify({\n title: this.$t(\"view.publish_fail\"),\n message: \"\",\n type: \"error\",\n });\n }\n },\n });\n this.headline = \"\";\n this.recipient = \"\";\n this.textarea = \"\";\n }\n },\n tabpanelInput(value) {\n let txtVal = value.length;\n this.Howmanywords = 140 - txtVal;\n },\n eduiInput() {\n let txtVal = this.textarea.length;\n this.eduisubtract = 10000 - txtVal;\n this.eduiPlus = 0 + txtVal;\n },\n descInput() {\n let txtVal = this.information.length;\n this.remnant = 140 - txtVal;\n },\n handleRemove(file, fileList) {\n let fl = this.fileList;\n if (fl && fl.length > 0) {\n for (let i = 0; i < fl.length; i++) {\n if (file.id == fl[i].id) {\n fl.splice(i, 1);\n break;\n }\n }\n }\n this.fileList = fl;\n },\n handlePreview(file) {\n let params = {\n id: file.id,\n extName: file.extName,\n url: file.url,\n _: new Date().getTime(),\n };\n this.$api.getPreview(params, {\n onSucess: (res) => {\n if (res.data.status === 1) {\n // console.log(\"file--->\",file);\n let fileName = file.id + file.extName;\n let cp = obpmConfig.obpmFilePath;\n sessionStorage.setItem(\"obpmContextPath\", cp);\n let statiContextPath = obpmConfig.statiContextPath;\n let pdfPath = \"\";\n if (statiContextPath) {\n //5.0 trunk\n sessionStorage.setItem(\"isTrunk\", true);\n pdfPath = obpmConfig.statiContextPath;\n } else {\n //4.4 stable\n sessionStorage.setItem(\"isTrunk\", false);\n pdfPath = cp;\n }\n let url =\n pdfPath +\n \"/message/pdfviewer.html?fileName=\" +\n fileName +\n \"&path=\" +\n file.url +\n \"&showName=\" +\n encodeURI(file.name) +\n \"&fileType=\" +\n file.extName;\n let URL = encodeURI(url);\n window.open(URL);\n }\n },\n });\n },\n handleExceed(files) {\n this.$message.warning(\n this.$t(\"view.limit\") +\n ` ${files.length}` +\n this.$t(\"view.all_select\") +\n `${files.length}` +\n this.$t(\"view.n_file\")\n );\n },\n beforeRemove(file) {\n return this.$confirm(this.$t(\"btns.comfirm_remove\") + `${file.name}?`);\n },\n //重置发送范围的输入框\n minus() {\n this.sendRangeName = \"\";\n },\n eduiminus() {\n // console.log(\"this.recipient-->\",this.recipient);\n // console.log(\"this.selectDeptList-->\",this.selectDeptList);\n this.recipient = \"\";\n this.selectDeptList = \"\";\n },\n adhibition() {\n let that = this;\n if (!this.information) {\n this.$message({\n message: this.$t(\"view.c_notnull\"),\n type: \"warning\",\n });\n } else if (!this.sendRangeName) {\n this.$message({\n message: this.$t(\"view.range_notnull\"),\n type: \"warning\",\n });\n } else {\n let userData = {\n user: [],\n dept: this.sendRangeList,\n };\n let newData =\n encodeURIComponent(\"content.content\") +\n \"=\" +\n encodeURIComponent(this.information) +\n \"&\" +\n encodeURIComponent(\"content.attachment\") +\n \"=\" +\n encodeURIComponent(JSON.stringify(this.fileList)) +\n \"&\" +\n encodeURIComponent(\"content.scope\") +\n \"=\" +\n encodeURIComponent(2) +\n \"&\" +\n encodeURIComponent(\"receiverInfo\") +\n \"=\" +\n encodeURIComponent(JSON.stringify(userData)) +\n \"&\" +\n encodeURIComponent(\"content.type\") +\n \"=\" +\n encodeURIComponent(0);\n this.$api.annouce(newData, {\n onSucess: (res) => {\n if (res.data.status == 1) {\n this.information = \"\";\n this.sendRangeName = \"\";\n this.sendRangeList = [];\n this.getMessagesList();\n that.$notify({\n title: res.data.message,\n message: \"\",\n type: \"success\",\n });\n }\n },\n });\n }\n },\n //获取企业动态公告和评论\n getMessagesList() {\n this.$api.getMessagesList({\n onSucess: (res) => {\n this.messagesListNum = res.data.data.rowCount;\n //this.messagesList = res.data.data.datas;\n let newData = res.data.data.datas.map((item) => {\n return {\n attachment: item.attachment,\n comment: item.comment,\n commentCount: item.commentCount,\n content: this.getEmot(item.content),\n createTime: item.createTime,\n id: item.id,\n module: item.module,\n receiverDeptId: item.receiverDeptId,\n receiverId: item.receiverId,\n receiverInfo: item.receiverInfo,\n scope: item.scope,\n sender: item.sender,\n senderDept: item.senderDept,\n senderDeptId: item.senderDeptId,\n senderId: item.senderId,\n sticky: item.sticky,\n title: item.title,\n type: item.type,\n tabpanelComment: \"\",\n };\n });\n\n let newDataArr = newData.filter((item, index) => {\n return item.type == 0;\n });\n this.messagesList = newDataArr;\n\n this.messagesList.forEach((item, index) => {\n if (item.content) {\n item.contentT = item.content.split(\";\");\n item.contentArr = []; //转成 [{appName:\"日程管理&&\",appId:\"__Z9Q7OLCk3xcm8EcAy22&&\"}]\n let obj = {};\n item.contentT.forEach((items) => {\n //[\"appName=招聘系统&&\", \"appId=__fvczOjqrbOsFVl8hNiv&&\"]\n obj[items.split(\"=\")[0]] =\n items.split(\"=\")[1] && items.split(\"=\")[1].replace(\"&&\", \" \"); //value去掉&&\n });\n item.contentArr.push(obj);\n }\n });\n },\n });\n },\n noticeUrl(obj) {\n console.log(obj.webActionUrl); //url跳转\n var param = {\n id: \"notice\",\n name: obj.appName,\n linkType: \"07\",\n actionContent: obj.webActionUrl,\n icon: \"\",\n key: \"\",\n };\n this.$listeners[\"add-tab\"](param); //监听传递给父元素---重要父子传递 跳转iframe\n },\n getEmot(val) {\n // eplaceFace : function(str){\n //     if(str && str != undefined){\n //       let re = /\\[.[^[]*\\]/g;\n //       let faceArr = str.match(re);\n //       if(faceArr != null && faceArr.length > 0){\n //         for(let i = 0; i < faceArr.length; i++){\n //           let fileName = Message.Util.cache.mapping[\"face_\"+faceArr[i]];\n //           str = str.replace(faceArr[i],'');\n //         }\n //       }\n //       return str;\n //     }\n //   },\n let value = val;\n let emo = \"\";\n for (let i = 0; i < this.emotionList.length; i++) {\n //value = value.replace(this.emotionList[i].type,'');\n\n value = value.replace(\n this.emotionList[i].type,\n this.emotionList[i].path\n );\n // console.log(\"value.--->\",value)\n }\n //路径处理\n let path = this.statiContextPath\n ? this.statiContextPath\n : this.contextPath;\n value = value.replace(\n / {\n if (type == \"unread\") {\n if (res.data.data.datas.length == 0) {\n this.isEmptyPage = true;\n } else {\n this.isEmptyPage = false;\n this.unreadWorkNum = res.data.data.rowCount;\n this.unreadWorkItems = res.data.data.datas;\n }\n } else {\n this.allNoticeNum = res.data.data.rowCount;\n this.allNotice = res.data.data.datas;\n if (res.data.data.datas.length <= 0) {\n this.allIsEmptyPage = true;\n } else {\n this.allIsEmptyPage = false;\n }\n }\n\n this.$forceUpdate();\n },\n });\n },\n\n timeAgo(dateTimeStamp) {\n const minute = 1000 * 60;\n const hour = minute * 60;\n const day = hour * 24;\n const halfamonth = day * 15;\n const month = day * 30;\n let time = \"\";\n if (dateTimeStamp == undefined) {\n return false;\n } else {\n dateTimeStamp = dateTimeStamp.replace(/\\-/g, \"/\");\n let sTime = new Date(dateTimeStamp).getTime(); //把时间pretime的值转为时间戳\n let now = new Date().getTime(); //获取当前时间的时间戳\n let diffValue = now - sTime;\n if (diffValue < 0) {\n console.log(\"结束日期不能小于开始日期!\");\n }\n let monthC = diffValue / month;\n let weekC = diffValue / (7 * day);\n let dayC = diffValue / day;\n let hourC = diffValue / hour;\n let minC = diffValue / minute;\n if (monthC >= 1) {\n time = parseInt(monthC) + this.$t(\"view.month_ago\");\n } else if (weekC >= 1) {\n time = parseInt(weekC) + this.$t(\"view.week_ago\");\n } else if (dayC >= 1) {\n time = parseInt(dayC) + this.$t(\"view.day_ago\");\n } else if (hourC >= 1) {\n time = parseInt(hourC) + this.$t(\"date.hour_ago\");\n } else if (minC >= 1) {\n time = parseInt(minC) + this.$t(\"date.min_ago\");\n } else {\n time = this.$t(\"date.now\");\n }\n }\n return time;\n },\n },\n filters: {\n writeCurrentDate(val) {\n let now = new Date(val);\n let year = now.getFullYear();\n let month = now.getMonth() + 1;\n let date = now.getDate();\n let hour = now.getHours();\n let minute = now.getMinutes();\n let second = now.getSeconds();\n return (\n year +\n \"-\" +\n month +\n \"-\" +\n date +\n \" \" +\n hour +\n \":\" +\n minute +\n \":\" +\n second\n );\n },\n },\n};\n",null]}