You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
9.6 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5a37d24a"],{"333d":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"20px",display:"flex","flex-direction":"row-reverse"}},[a("el-pagination",{attrs:{background:"","hide-on-single-page":"",layout:"total, prev, pager, next, jumper","current-page":e.currentPage,"page-size":e.size,total:e.total},on:{"current-change":e.handleCurrentChange}})],1)},l=[],n=(a("a9e3"),{props:{currentPage:{type:Number,default:1},size:{type:Number,default:10},total:{type:Number,default:0}},data:function(){return{}},methods:{handleCurrentChange:function(e){this.$emit("currentChange",e)}}}),r=n,s=a("2877"),o=Object(s["a"])(r,i,l,!1,null,null,null);t["a"]=o.exports},"4d50":function(e,t,a){},a9e3:function(e,t,a){"use strict";var i=a("83ab"),l=a("da84"),n=a("94ca"),r=a("6eeb"),s=a("5135"),o=a("c6b6"),c=a("7156"),u=a("c04e"),d=a("d039"),p=a("7c73"),f=a("241c").f,m=a("06cf").f,g=a("9bf2").f,h=a("58a8").trim,v="Number",b=l[v],y=b.prototype,_=o(p(y))==v,w=function(e){var t,a,i,l,n,r,s,o,c=u(e,!1);if("string"==typeof c&&c.length>2)if(c=h(c),t=c.charCodeAt(0),43===t||45===t){if(a=c.charCodeAt(2),88===a||120===a)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:i=2,l=49;break;case 79:case 111:i=8,l=55;break;default:return+c}for(n=c.slice(2),r=n.length,s=0;s<r;s++)if(o=n.charCodeAt(s),o<48||o>l)return NaN;return parseInt(n,i)}return+c};if(n(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var k,V=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof V&&(_?d((function(){y.valueOf.call(a)})):o(a)!=v)?c(new b(w(t)),a,V):w(t)},I=i?f(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),N=0;I.length>N;N++)s(b,k=I[N])&&!s(V,k)&&g(V,k,m(b,k));V.prototype=y,y.constructor=V,r(l,v,V)}},b8a8:function(e,t,a){"use strict";a("4d50")},f0c3:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"container"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"新留言",name:"first"}}),a("el-tab-pane",{attrs:{label:"已回复",name:"second"}})],1),a("div",{staticClass:"toolbar"},[a("div",[a("el-input",{attrs:{placeholder:"请输入关键字",size:"small"},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}}),a("el-button",{staticStyle:{"margin-left":"5px"},attrs:{size:"small"},on:{click:e.searchFn}},[e._v("查询")])],1)]),a("el-table",{attrs:{data:e.adviseList,size:"medium","empty-text":"暂无数据",border:""}},[a("el-table-column",{attrs:{align:"center",prop:"userId",label:"用户ID","min-width":"80"}}),a("el-table-column",{attrs:{align:"center",prop:"createTime",label:"留言日期","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e.getTimes(t.row.createTime)))])]}}])}),a("el-table-column",{attrs:{align:"center",prop:"adviseTitle",label:"留言标题","min-width":"130","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{align:"center",prop:"adviseTypeId",label:"留言类型","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[2==t.row.adviseTypeId?a("div",[e._v("建议")]):e._e(),3==t.row.adviseTypeId?a("div",[e._v("投诉")]):e._e(),4==t.row.adviseTypeId?a("div",[e._v("表扬")]):e._e()]}}])}),a("el-table-column",{attrs:{align:"center",prop:"adviseContent",label:"留言内容","min-width":"180","show-overflow-tooltip":""}}),1===e.isReply?a("el-table-column",{attrs:{align:"center",prop:"replyList",label:"回复","min-width":"180","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.replyList,(function(t,i){return a("div",{key:i},[a("div",[e._v("回复时间:"+e._s(e.getTimes(t.createTime)))]),a("div",[e._v("回复内容:"+e._s(t.reply))])])}))}}],null,!1,2529227692)}):e._e(),a("el-table-column",{attrs:{align:"center",label:"审核状态","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isValid?a("span",[e._v("未审核")]):1==t.row.isValid?a("span",[e._v("通过")]):2==t.row.isValid?a("span",[e._v("未通过")]):e._e()]}}])}),a("el-table-column",{attrs:{align:"center",label:"操作",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[1!==e.isReply?a("span",[a("el-link",{staticStyle:{"margin-right":"10px"},attrs:{underline:!1,type:"primary"},on:{click:function(a){return e.handling(t.row)}}},[e._v("回复")])],1):e._e(),a("el-link",{attrs:{underline:!1,type:"primary",disabled:0!=t.row.isValid},on:{click:function(a){return e.handling2(t.row)}}},[e._v("审核")]),a("el-popconfirm",{attrs:{title:"您确定要删除吗?"},on:{onConfirm:function(a){return e.deleteFn(t.row.adviseId)}}},[a("el-link",{staticStyle:{"margin-left":"10px"},attrs:{slot:"reference",underline:!1,type:"danger"},slot:"reference"},[e._v("删除")])],1)]}}])})],1),a("Pagination",{attrs:{currentPage:e.currentPage,size:e.size,total:e.total},on:{currentChange:e.currentChange}}),a("el-dialog",{attrs:{title:"审核留言",visible:e.dialogFormVisible2,width:"500px"},on:{"update:visible":function(t){e.dialogFormVisible2=t}}},[a("el-form",{staticClass:"form",attrs:{"label-width":"80px",model:e.obj,size:"small"}},[a("el-form-item",{attrs:{label:"处理审核"}},[a("el-radio",{attrs:{label:1},model:{value:e.obj.isValid,callback:function(t){e.$set(e.obj,"isValid",t)},expression:"obj.isValid"}},[e._v("通过")]),a("el-radio",{attrs:{label:2},model:{value:e.obj.isValid,callback:function(t){e.$set(e.obj,"isValid",t)},expression:"obj.isValid"}},[e._v("不通过")])],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogFormVisible2=!1}}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.toexamine()}}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"回复留言",visible:e.dialogFormVisible,width:"500px"},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{staticClass:"form",attrs:{"label-width":"80px",model:e.form,size:"small"}},[a("el-form-item",{attrs:{label:"处理备注"}},[a("el-input",{attrs:{placeholder:"请输入回复内容"},model:{value:e.form.reply,callback:function(t){e.$set(e.form,"reply",t)},expression:"form.reply"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.determine()}}},[e._v("确 定")])],1)],1)],1)},l=[],n=(a("b0c0"),a("d81d"),a("b775"));function r(e,t,a){var i=e?"isReply="+e+"&":"";return Object(n["a"])({url:"/api/back/advise/list?"+i+"page="+t+"&size="+a,method:"get"})}function s(e,t){return Object(n["a"])({url:"/api/back/advise/list/search?isReply="+e+"&key="+t,method:"get"})}function o(e){return Object(n["a"])({url:"/api/back/advise/update",method:"put",data:e})}function c(e){return Object(n["a"])({url:"/api/back/advise/delete/"+e,method:"delete"})}function u(e){return Object(n["a"])({url:"/api/back/adviseReply/insert",method:"post",data:e})}var d=a("333d"),p={name:"appoManagement",components:{Pagination:d["a"]},data:function(){return{isReply:null,searchValue:"",dialogFormVisible:!1,dialogFormVisible2:!1,currentPage:1,size:10,total:0,adviseList:[],activeName:"first",form:{reply:""},obj:{isValid:1},advise:{}}},created:function(){this.getData(this.isReply,this.currentPage,this.size)},methods:{handleClick:function(e){"first"==e.name?this.isReply=null:"second"==e.name&&(this.isReply=1),this.currentPage=1,this.getData(this.isReply,this.currentPage,this.size)},searchFn:function(){var e=this,t=null===this.isReply?0:1;s(t,this.searchValue).then((function(t){if(console.log(t),200===t.code){var a=t.data.map((function(e){return e}));e.adviseList=a.reverse()}}))},deleteFn:function(e){var t=this;console.log(e),c(e).then((function(e){200===e.code?(t.$message.success("删除成功"),t.getData(t.isReply,t.currentPage,t.size)):(console.log(e),t.$message.error(e.msg))}))},handling:function(e){this.dialogFormVisible=!0,this.advise=e},determine:function(){var e=this,t={adviseId:this.advise.adviseId,createTime:(new Date).getTime(),reply:this.form.reply,userId:this.advise.userId};u(t).then((function(t){200==t.code?(e.$message.success("回复成功!"),e.dialogFormVisible=!1,e.form.reply=null,e.getData(e.isReply,e.currentPage,e.size)):console.log(t)}))},handling2:function(e){this.dialogFormVisible2=!0,this.advise=e},toexamine:function(){var e=this,t=this.advise;t.isValid=this.obj.isValid,o(t).then((function(t){200==t.code&&(e.$message.success("审核完成!"),e.dialogFormVisible2=!1)}))},getData:function(e,t,a){var i=this;r(e,t,a).then((function(e){if(200===e.code){t>1&&!e.data.list.length&&(i.currentPage=--t,i.getData(i.isReply,i.currentPage,i.size));var a=e.data.list.map((function(e){return e}));i.total=e.data.total,i.adviseList=a.reverse()}else console.log(e)}))},currentChange:function(e){console.log(e),this.currentPage=e,this.getData(this.isReply,this.currentPage,this.size)},getTimes:function(e){var t=new Date(e),a=t.getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var l=t.getDate(),n=t.getHours();n=n<10?"0"+n:n;var r=t.getMinutes();r=r<10?"0"+r:r;var s=t.getSeconds();return s=s<10?"0"+s:s,a+"年"+i+"月"+l+"日"}}},f=p,m=(a("b8a8"),a("2877")),g=Object(m["a"])(f,i,l,!1,null,"27782cce",null);t["default"]=g.exports}}]);