5414.82be153e.js 7.2 KB

12
  1. "use strict";(self["webpackChunkscproject"]=self["webpackChunkscproject"]||[]).push([[5414],{95414:function(t,e,i){i.r(e),i.d(e,{default:function(){return c}});var s=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"messageNotification"},[t._m(0),e("hr"),e("div",{staticClass:"twoSelectInp"},[e("div",{staticClass:"selectTwo"},[e("div",{staticClass:"selectsBlock"},[e("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入"},model:{value:t.selectInput,callback:function(e){t.selectInput=e},expression:"selectInput"}}),e("el-button",{staticClass:"btn2",attrs:{type:"primary"},on:{click:t.getCourseManagement}},[t._v("查询")])],1)]),0==t.$store.state.userInfo.type?e("el-button",{staticClass:"btn",attrs:{type:"primary",size:"mini"},on:{click:t.addMessage}},[t._v("新建全站通知")]):t._e()],1),e("div",{staticClass:"projectBlock"},[e("span",{staticStyle:{"font-size":"12px"}},[t._v("共 "+t._s(t.table.total)+" 条")]),e("el-table",{staticClass:"fontSize",attrs:{data:t.tableData,"tooltip-effect":"dark",stripe:"","header-cell-style":{background:"#f2f2f2",color:"#000"}}},[e("el-table-column",{attrs:{prop:"title",label:"通知标题",align:"center","min-width":"25%"}}),e("el-table-column",{attrs:{prop:"username",label:"创建者",align:"center","min-width":"20%"}}),e("el-table-column",{attrs:{prop:"create_at",label:"创建时间",align:"center","min-width":"25%"}}),e("el-table-column",{attrs:{prop:"operation",label:"操作",align:"center",width:"200"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("div",{staticClass:"operations"},[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.lookIntro(i.row.newId)}}},[t._v("查看信息")]),0==t.$store.state.userInfo.type?e("el-button",{staticStyle:{width:"85px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.del(i.row.newId)}}},[t._v("删除")]):t._e()],1)]}}])})],1)],1),e("el-pagination",{staticClass:"paginations",attrs:{"current-page":t.table.currentPage,"page-size":t.table.packageSize,layout:" prev, pager, next",background:"",total:t.table.total},on:{"current-change":t.handleCurrentChange}}),e("el-dialog",{staticClass:"addDialog",attrs:{title:"添加全站通知",visible:t.dialogVisible,width:"1000px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{staticClass:"addDialogMid"},[e("div",{staticClass:"addDialogTit"},[e("div",{staticClass:"addLabel"},[t._v("通知标题")]),e("el-input",{attrs:{placeholder:"请输入内容"},model:{value:t.addMess.tit,callback:function(e){t.$set(t.addMess,"tit",e)},expression:"addMess.tit"}})],1),e("div",{staticClass:"addDialogTit addDialogCon"},[e("div",{staticClass:"addLabel",staticStyle:{position:"relative",top:"-8px","margin-right":"-5px",width:"105px"}},[t._v("通知内容")]),e("vue-editor",{staticStyle:{"margin-bottom":"30px"},attrs:{editorToolbar:t.customToolbar},model:{value:t.addMess.con,callback:function(e){t.$set(t.addMess,"con",e)},expression:"addMess.con"}})],1)]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{staticClass:"AllDialogBtn",attrs:{type:"primary"},on:{click:t.confirmAdd}},[t._v("确认添加")]),e("el-button",{staticClass:"AllDialogBtn",on:{click:t.init}},[t._v("取 消")])],1)]),e("el-dialog",{staticClass:"delDialog",attrs:{title:"删除通知",visible:t.dialogVisible1,width:"600px"},on:{"update:visible":function(e){t.dialogVisible1=e}}},[e("div",{staticClass:"deleteContent"},[t._v("确定删除通知?")]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{staticClass:"AllDialogBtn",attrs:{type:"primary"},on:{click:t.confirmDel}},[t._v("确认删除")]),e("el-button",{staticClass:"AllDialogBtn",on:{click:function(e){t.dialogVisible1=!1}}},[t._v("取消")])],1)]),e("el-dialog",{staticClass:"addDialog",attrs:{title:"查看通知",visible:t.dialogVisible2,width:"800px"},on:{"update:visible":function(e){t.dialogVisible2=e}}},[e("div",{staticClass:"addDialogMid"},[e("div",{staticClass:"addDialogTit1"},[e("div",{staticStyle:{"font-size":"18px",color:"#000"}},[t._v(t._s(t.messageCon.title))]),e("div",{staticStyle:{"margin-top":"13px","font-size":"14px"}},[t._v(t._s(t.messageCon.username))])]),e("hr"),e("div",{staticClass:"addDialogTit2"},[e("vue-editor",{attrs:{editorToolbar:t.customToolbar},model:{value:t.messageCon.brief,callback:function(e){t.$set(t.messageCon,"brief",e)},expression:"messageCon.brief"}})],1)]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{staticClass:"AllDialogBtn",attrs:{type:"primary"},on:{click:function(e){t.dialogVisible2=!1}}},[t._v("关闭")])],1)])],1)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"pAHeader"},[e("div",{staticClass:"pAHeader1"},[t._v("消息通知")])])}],l=i(95245),o={props:["data","next","back"],components:{VueEditor:l.bR},data(){return{loading:!1,customToolbar:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],[{align:""},{align:"center"},{align:"right"},{align:"justify"}],[{header:[!1,1,2,3,4]}]],textarea:"",selectInput:"",dialogVisible:!1,dialogVisible1:!1,dialogVisible2:!1,input:"",infromId:"",tableData:[],table:{total:0,packageSize:9,currentPage:1},messageCon:{},addMess:{tit:"",con:""}}},methods:{del(t){this.infromId=t,this.dialogVisible1=!0},confirmDel(){let t={uid:this.$store.state.userInfo.userid,nid:this.infromId};this.ajax.post(this.$store.state.api+"/DeleteNotification",t).then((t=>{this.getCourseManagement(),this.dialogVisible1=!1,t.data?this.$message.success("删除成功"):this.$message.error("删除失败")}),(t=>{console.log(t)}))},init(){this.dialogVisible=!1,this.dialogVisible1=!1,this.dialogVisible2=!1},addMessage(){this.dialogVisible=!0},confirmAdd(){if(""==this.addMess.tit||""==this.addMess.con)return void this.$message.error("请输入内容");let t={uid:this.$store.state.userInfo.userid,title:encodeURIComponent(this.addMess.tit),brief:encodeURIComponent(this.addMess.con)};this.ajax.post(this.$store.state.api+"/CreateNewNotification",t).then((t=>{this.dialogVisible=!1,this.addMess.tit="",this.addMess.con="",this.getCourseManagement(),t.data?this.$message.success("创建成功"):this.$message.error("创建失败")}),(t=>{console.log(t)}))},lookIntro(t){console.log(t);let e={uid:this.$store.state.userInfo.userid,nid:t};this.ajax.get(this.$store.state.api+"/SelectNotificationDetail",e).then((t=>{console.log(t),this.messageCon=t.data[0][0]}),(t=>{console.log(t)})),this.dialogVisible2=!0},getCourseManagement(){this.loading=!0;let t=this.table.currentPage;const e={uid:this.$store.state.userInfo.userid,title:encodeURIComponent(this.selectInput),nowPage:t,lim:9};this.ajax.get(this.$store.state.api+"/SelectNotification",e).then((t=>{console.log(t),1!==this.table.currentPage&&0==t.data[0].length&&(this.table.currentPage=1,this.getCourseManagement()),this.tableData=t.data[0],this.table.total=t.data[1][0].total,this.loading=!1}),(t=>{console.log(t)}))},handleCurrentChange(t){this.table.currentPage=t,this.getCourseManagement()}},watch:{selectInput:{handler(){this.getCourseManagement()}}},mounted(){this.getCourseManagement()}},n=o,r=i(43736),d=(0,r.Z)(n,s,a,!1,null,null,null),c=d.exports}}]);
  2. //# sourceMappingURL=5414.82be153e.js.map