pnkx-admin-mongo/pnkx-app-apk/static/js/chunk-1a5eea92.87da88ca.js

1 line
4.8 KiB
JavaScript
Raw Normal View History

2024-01-13 13:29:20 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a5eea92"],{"161f":function(t,n,e){"use strict";e.d(n,"e",(function(){return a})),e.d(n,"c",(function(){return s})),e.d(n,"a",(function(){return o})),e.d(n,"f",(function(){return r})),e.d(n,"b",(function(){return c})),e.d(n,"d",(function(){return u}));var i=e("b775");function a(t){return Object(i["a"])({url:"/admin/toDo/list",method:"get",params:t})}function s(t){return Object(i["a"])({url:"/admin/toDo/"+t,method:"get"})}function o(t){return Object(i["a"])({url:"/admin/toDo",method:"post",data:t})}function r(t){return Object(i["a"])({url:"/admin/toDo",method:"put",data:t})}function c(t){return Object(i["a"])({url:"/admin/toDo/"+t,method:"delete"})}function u(){return Object(i["a"])({url:"/admin/toDo/getLabelList",method:"get"})}},"281d":function(t,n,e){"use strict";e.r(n);var i=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"to-do-list"},[e("van-nav-bar",{attrs:{fixed:"","left-arrow":"","left-text":"返回",title:t.title},on:{"click-left":function(n){return t.$router.go(-1)}}}),e("van-row",{staticClass:"page-title"},[e("van-col",[t._v(" 未完成 ")])],1),e("van-list",{on:{load:t.getFinishToDoList}},t._l(t.noFinishList,(function(n){return e("van-cell-group",{key:n.id,attrs:{inset:""}},[e("van-swipe-cell",{scopedSlots:t._u([{key:"right",fn:function(){return[e("van-button",{attrs:{square:"",text:"删除",type:"danger"},on:{click:function(e){return t.handleDelete(n)}}}),e("van-button",{attrs:{square:"",text:"编辑",type:"primary"},on:{click:function(e){return t.$router.push("/addToDo?toDoId="+n.id)}}})]},proxy:!0}],null,!0)},[e("van-cell",{attrs:{center:""}},[e("van-row",{attrs:{align:"center",type:"flex"}},[e("van-col",{staticClass:"d-flex flex-items-center",attrs:{span:2},on:{click:function(e){return t.changeStatus(n)}}},[e("van-icon",{attrs:{name:"passed"}})],1),e("van-col",{attrs:{span:22},on:{click:function(e){return t.openToDoDetails(n)}}},[t._v(t._s(n.content))])],1)],1)],1)],1)})),1),e("van-row",{staticClass:"page-title",staticStyle:{"margin-top":"2rem"}},[e("van-col",[t._v(" 已完成 ")])],1),e("van-list",{on:{load:t.listDo}},t._l(t.finishList,(function(n){return e("van-cell-group",{key:n.id,attrs:{inset:""}},[e("van-swipe-cell",{scopedSlots:t._u([{key:"right",fn:function(){return[e("van-button",{attrs:{square:"",text:"删除",type:"danger"},on:{click:function(e){return t.handleDelete(n)}}}),e("van-button",{attrs:{square:"",text:"编辑",type:"primary"},on:{click:function(e){return t.$router.push("/addToDo?toDoId="+n.id)}}})]},proxy:!0}],null,!0)},[e("van-cell",{attrs:{center:""}},[e("van-row",{attrs:{align:"center",type:"flex"}},[e("van-col",{staticClass:"d-flex flex-items-center",attrs:{span:2},on:{click:function(e){return t.changeStatus(n)}}},[e("van-icon",{attrs:{name:"checked"}})],1),e("van-col",{attrs:{span:22},on:{click:function(e){return t.openToDoDetails(n)}}},[t._v(t._s(n.content))])],1)],1)],1)],1)})),1),e("van-pagination",{attrs:{"items-per-page":t.finishParams.pageSize,"total-items":t.total},on:{change:t.getFinishToDoList},model:{value:t.finishParams.pageNum,callback:function(n){t.$set(t.finishParams,"pageNum",n)},expression:"finishParams.pageNum"}})],1)},a=[],s=(e("fb6a"),e("161f")),o=(e("c0c7"),{name:"list",data:function(){return{title:"",loading:!1,noFinishList:[],finishList:[],noFinishParams:{status:"0"},finishParams:{status:"1",pageNum:1,pageSize:10},total:0}},methods:{handleDelete:function(t){var n=this;this.$dialog.confirm({title:"删除提示",message:"确认删除该待办"}).then((function(){Object(s["b"])(t.id).then((function(t){n.$toast("删除成功"),n.getToDoList()}))})).catch((function(){}))},getFinishToDoList:function(){var t=this;Object(s["e"])(this.finishParams).then((function(n){t.finishList=n.rows,t.total=n.total}))},listDo:function(){var t=this;switch(this.$route.params.status){case"all":this.title="全部待办";break;case"today":this.title="今日待办",this.noFinishParams.planStartTime=this.getNow().slice(0,10)+" 00:00:00",this.noFinishParams.planEndTime=this.getNow()+" 2