yxk_pc_mdh/gyhl/static/js/361.8f6cd539690e03163a44.js

1 line
6.2 KiB
JavaScript
Raw Normal View History

2025-08-28 15:26:35 +08:00
webpackJsonp([361],{"8wcG":function(t,e){},OYzQ:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n=a("bOdI"),s=a.n(n),o=a("bzuE"),r=a("lbHh"),c=a.n(r),l={data:function(){return{total:0,pageSizes:[10,20,50],search_data:{toUserId:"",pageno:1,pagesize:10},search_data_type:{},checked:!1,btnDelDisabled:!0,btnOtherDisabled:!0,btnDisAuditDisabled:!0,btnAuditDisabled:!0,rowIds:[],tableData:[],pictLoading:!1,config:o.a}},mounted:function(){this.getList()},methods:(i={getNotReadCount:function(){var t=this;this.$api.notificationAPI.countNotRead().then(function(e){t.$emit("update:notreadnum",e.notReadCount)}).catch(function(e){t.pictLoading=!1,console.log(e)})},clickRow:function(t){this.$refs.tb.toggleRowSelection(t)},search:function(){this.search_data.pageno=1,this.getList()},getList:function(){var t=this;this.pictLoading=!0;var e=JSON.parse(c.a.get("userInfo"));this.search_data.toUserId=e.userId,this.$api.notificationAPI.list(this.search_data).then(function(e){t.pictLoading=!1,e.data?(t.total=e.data.totalRows,t.tableData=e.data.datas?e.data.datas:[]):(t.total=0,t.tableData=[])}).catch(function(e){t.pictLoading=!1,console.log(e)})}},s()(i,"search",function(){this.search_data.pageno=1,this.getList()}),s()(i,"handleCurrentChange",function(t){this.search_data.pageno=t,this.getList()}),s()(i,"handleSizeChange",function(t){this.search_data.pagesize=t,this.getList()}),s()(i,"openDetail",function(t){var e=this,a=[];a.push(t.assocId),this.$api.notificationAPI.signReaded(a).then(function(t){e.getList(),e.getNotReadCount(),console.log("标记为已读")}).catch(function(t){console.log("标为已读失败")});var i=JSON.parse(t.contentDetail),n=t.typeId;1===n?this.$router.push({path:"/schedule/dailyplan_detail",query:{id:i.id,from:1,t:(new Date).getTime()}}):2===n?this.$router.push({path:"/schedule/weekplan_detail",query:{id:i.id,from:1,t:(new Date).getTime()}}):3===n?this.$router.push({path:"/schedule/monthplan_detail",query:{id:i.id,from:1,t:(new Date).getTime()}}):4===n?this.$router.push({path:"/task/detail",query:{id:i.id}}):5===n?this.$router.push({path:"/repair/detail",query:{id:i.id,t:(new Date).getTime(),type:371}}):this.$router.push({path:i.url,query:{t:(new Date).getTime()}})}),s()(i,"remove",function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.assocId)}),this.$confirm("确认删除选中的消息吗?","提示",{type:"warning"}).then(function(){t.$api.notificationAPI.batchRemove(e).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getList()):t.$message({message:e.msg?e.msg:"删除失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"删除失败,请重试",type:"error"})})})}),s()(i,"signReaded",function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.assocId)}),this.$confirm("确认将选中消息标记为已读?","提示",{type:"warning"}).then(function(){t.$api.notificationAPI.signReaded(e).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getNotReadCount(),t.getList()):t.$message({message:e.msg?e.msg:"标记失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"标记失败,请重试",type:"error"})})})}),s()(i,"handleSelectionChange",function(t){this.rowIds=t,this.setBtn(t)}),s()(i,"setBtn",function(t){var e=!0,a=!0,i=!0;if(t.length>0){if(i=!1,1==t.length){var n=this.rowIds[0].auditSign;1==n&&(a=!1),0==n&&(e=!1)}}else i=!0;this.btnDelDisabled=i,this.btnAuditDisabled=a,this.btnDisAuditDisabled=e}),i)},d={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-task sys-box"},[a("div",{staticClass:"sys-operate",staticStyle:{"padding-bottom":"10px"}},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"management:notice:remove",expression:"'management:notice:remove'"}],attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.remove()}}},[t._v("删除")]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:t.btnDelDisabled,size:"small"},on:{click:function(e){return t.signReaded()}}},[t._v("标为已读