pnkx-admin-mongo/pnkx-app-apk/unpackage/cache/wgt/H5A8E5E14/static/js/chunk-162e97e6.33c2b994.js
2024-01-13 13:29:20 +08:00

1 line
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-162e97e6"],{"161f":function(e,t,o){"use strict";o.d(t,"e",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return i})),o.d(t,"f",(function(){return l})),o.d(t,"b",(function(){return c})),o.d(t,"d",(function(){return s}));var r=o("b775");function n(e){return Object(r["a"])({url:"/admin/toDo/list",method:"get",params:e})}function a(e){return Object(r["a"])({url:"/admin/toDo/"+e,method:"get"})}function i(e){return Object(r["a"])({url:"/admin/toDo",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/admin/toDo",method:"put",data:e})}function c(e){return Object(r["a"])({url:"/admin/toDo/"+e,method:"delete"})}function s(){return Object(r["a"])({url:"/admin/toDo/getLabelList",method:"get"})}},"51eb":function(e,t,o){"use strict";var r=o("825a"),n=o("c04e");e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return n(r(this),"number"!==e)}},5530:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));o("b64b"),o("a4d3"),o("4de4"),o("d3b7"),o("e439"),o("159b"),o("dbb4");var r=o("53ca");o("8172"),o("efec"),o("e01a"),o("a9e3");function n(e,t){if("object"!==Object(r["a"])(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==Object(r["a"])(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function a(e){var t=n(e,"string");return"symbol"===Object(r["a"])(t)?t:String(t)}function i(e,t,o){return t=a(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function c(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){i(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}},5695:function(e,t,o){"use strict";o("9ca7")},"7db0":function(e,t,o){"use strict";var r=o("23e7"),n=o("b727").find,a=o("44d2"),i=o("ae40"),l="find",c=!0,s=i(l);l in[]&&Array(1)[l]((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!s},{find:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a(l)},8172:function(e,t,o){var r=o("746f");r("toPrimitive")},"857a":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"add-to-do"},[o("van-nav-bar",{attrs:{title:e.$route.query.toDoId?"编辑待办":"新增待办",fixed:"","left-arrow":"","left-text":"返回","right-text":"保存"},on:{"click-right":e.handleSave,"click-left":function(t){return e.$router.go(-1)}}}),o("van-cell-group",{attrs:{inset:""}},[o("van-field",{attrs:{autosize:"",label:"待办内容",maxlength:"200",placeholder:"请输入待办内容",rows:"2","show-word-limit":"",type:"textarea"},model:{value:e.toDoForm.content,callback:function(t){e.$set(e.toDoForm,"content",t)},expression:"toDoForm.content"}}),o("van-cell",{attrs:{center:"",title:"状态(是否完成)"},scopedSlots:e._u([{key:"right-icon",fn:function(){return[o("van-switch",{attrs:{size:"24"},model:{value:e.toDoForm.status,callback:function(t){e.$set(e.toDoForm,"status",t)},expression:"toDoForm.status"}})]},proxy:!0}])}),o("van-field",{attrs:{"is-link":"",label:"标签",placeholder:"请选择标签",readonly:""},on:{click:function(t){e.showChangeLabel=!0}},model:{value:e.toDoForm.labelString,callback:function(t){e.$set(e.toDoForm,"labelString",t)},expression:"toDoForm.labelString"}}),o("van-field",{attrs:{"is-link":"",label:"执行者",placeholder:"请选择执行者",readonly:""},on:{click:function(t){e.showChangePerformer=!0}},model:{value:e.toDoForm.performerName,callback:function(t){e.$set(e.toDoForm,"performerName",t)},expression:"toDoForm.performerName"}}),o("van-field",{attrs:{"is-link":"",label:"开始时间",placeholder:"请选择开始时间",readonly:""},on:{click:function(t){return e.changeTime("planStartTime","开始时间",e.toDoForm.planStartTime)}},model:{value:e.toDoForm.planStartTime,callback:function(t){e.$set(e.toDoForm,"planStartTime",t)},expression:"toDoForm.planStartTime"}}),o("van-field",{attrs:{"is-link":"",label:"结束时间",placeholder:"请选择结束时间",readonly:""},on:{click:function(t){return e.changeTime("planEndTime","结束时间",e.toDoForm.planEndTime)}},model:{value:e.toDoForm.planEndTime,callback:function(t){e.$set(e.toDoForm,"planEndTime",t)},expression:"toDoForm.planEndTime"}}),o("van-field",{attrs:{autosize:"",label:"备注",maxlength:"200",placeholder:"请输入备注",rows:"2","show-word-limit":"",type:"textarea"},model:{value:e.toDoForm.remark,callback:function(t){e.$set(e.toDoForm,"remark",t)},expression:"toDoForm.remark"}})],1),o("van-action-sheet",{attrs:{"cancel-text":"取消",title:"选择待办标签"},on:{cancel:function(t){e.showChangePerformer=!1}},model:{value:e.showChangeLabel,callback:function(t){e.showChangeLabel=t},expression:"showChangeLabel"}},[o("van-checkbox-group",{model:{value:e.toDoForm.label,callback:function(t){e.$set(e.toDoForm,"label",t)},expression:"toDoForm.label"}},e._l(e.labelColumns,(function(t){return o("van-cell",{key:t,attrs:{title:t,clickable:""},on:{click:function(o){return e.onLabelConfirm(t)}},scopedSlots:e._u([{key:"right-icon",fn:function(){return[o("van-checkbox",{ref:"checkboxes",refInFor:!0,attrs:{name:t,shape:"square"}})]},proxy:!0}],null,!0)})})),1)],1),o("van-action-sheet",{attrs:{"cancel-text":"取消",title:"选择执行者"},on:{cancel:function(t){e.showChangePerformer=!1}},model:{value:e.showChangePerformer,callback:function(t){e.showChangePerformer=t},expression:"showChangePerformer"}},[o("van-checkbox-group",{model:{value:e.toDoForm.performer,callback:function(t){e.$set(e.toDoForm,"performer",t)},expression:"toDoForm.performer"}},e._l(e.userList,(function(t){return o("van-cell",{key:t.userId,attrs:{title:t.nickName,clickable:""},on:{click:function(o){return e.choiceUser(t)}},scopedSlots:e._u([{key:"right-icon",fn:function(){return[o("van-checkbox",{ref:"checkboxes",refInFor:!0,attrs:{name:t.userId,shape:"square"}})]},proxy:!0}],null,!0)})})),1)],1),o("van-popup",{attrs:{position:"bottom",round:""},model:{value:e.showTimePopup,callback:function(t){e.showTimePopup=t},expression:"showTimePopup"}},[o("van-datetime-picker",{attrs:{title:e.timePopupTitle,type:"datetime"},on:{confirm:e.confirmDate},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}})],1)],1)},n=[],a=o("5530"),i=(o("caad"),o("2532"),o("a434"),o("a15b"),o("d81d"),o("d3b7"),o("159b"),o("7db0"),o("c0c7")),l=o("161f"),c={name:"add",data:function(){return{toDoForm:{id:this.$route.query.toDoId,content:"",status:!1,label:[],labelString:"",planStartTime:this.parseTime(new Date),planEndTime:"",performer:[this.$store.getters.id],performerName:this.$store.getters.userInfo.nickName,remark:""},showChangePerformer:!1,showChangeLabel:!1,userList:[],showTimePopup:!1,timePopupTitle:"",currentDate:new Date,nowType:"",labelColumns:[]}},mounted:function(){this.listUser(),this.getLabelList()},methods:{onLabelConfirm:function(e){this.toDoForm.label.includes(e)?(this.toDoForm.label.splice(this.toDoForm.label.indexOf(e),1),this.toDoForm.labelString=this.toDoForm.label.join(" | ")):(this.toDoForm.label.push(e),this.toDoForm.labelString?this.toDoForm.labelString=this.toDoForm.labelString+" | "+e:this.toDoForm.labelString=e)},getLabelList:function(){var e=this;Object(l["d"])().then((function(t){e.labelColumns=t.data}))},confirmDate:function(e){this.toDoForm[this.nowType]=this.parseTime(e,"{y}-{m}-{d} {h}:{m}:{s}"),this.showTimePopup=!1},changeTime:function(e,t,o){this.currentDate=o?new Date(o):new Date,this.showTimePopup=!0,this.timePopupTitle=t,this.nowType=e},handleSave:function(){var e=this;this.toDoForm.content?this.toDoForm.planStartTime?this.toDoForm.planStartTime?(this.toDoForm.label=this.toDoForm.label.join(","),this.toDoForm.performer=this.toDoForm.performer.join(","),this.toDoForm.id?Object(l["f"])(this.toDoForm).then((function(t){e.$toast("保存成功"),e.$router.go(-1)})):Object(l["a"])(this.toDoForm).then((function(t){e.$toast("保存成功"),e.$router.go(-1)}))):this.$toast("请选择结束时间"):this.$toast("请选择开始时间"):this.$toast("请输入待办内容")},listUser:function(){var e=this;Object(i["b"])().then((function(t){e.userList=t.rows.map((function(e){return Object(a["a"])(Object(a["a"])({},e),{},{selected:!1})})),e.toDoForm.id&&Object(l["c"])(e.toDoForm.id).then((function(t){e.toDoForm=t.data,e.toDoForm.planStartTime=e.parseTime(new Date(e.toDoForm.planStartTime)),e.toDoForm.planEndTime=e.parseTime(new Date(e.toDoForm.planEndTime)),e.toDoForm.label=e.toDoForm.label&&e.toDoForm.label.split(",")||[],e.toDoForm.labelString=e.toDoForm.label&&e.toDoForm.label.join(" | "),e.toDoForm.performer=e.toDoForm.performer&&e.toDoForm.performer.split(","),e.toDoForm.performer.forEach((function(t){e.toDoForm.performerName?e.toDoForm.performerName=e.toDoForm.performerName+e.userList.find((function(e){return e.userId=t.userId})).nickName:e.toDoForm.performerName=e.userList.find((function(e){return e.userId=t})).nickName}))}))}))},choiceUser:function(e){this.toDoForm.performer.push(e.userId),this.toDoForm.performerName?this.toDoForm.performerName=this.toDoForm.performerName+" | "+e.nickName:this.toDoForm.performerName=e.nickName}}},s=c,m=(o("5695"),o("2877")),u=Object(m["a"])(s,r,n,!1,null,"344d0b75",null);t["default"]=u.exports},"9ca7":function(e,t,o){},a434:function(e,t,o){"use strict";var r=o("23e7"),n=o("23cb"),a=o("a691"),i=o("50c4"),l=o("7b0b"),c=o("65f0"),s=o("8418"),m=o("1dde"),u=o("ae40"),f=m("splice"),p=u("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,d=Math.min,b=9007199254740991,D="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f||!p},{splice:function(e,t){var o,r,m,u,f,p,F=l(this),g=i(F.length),v=n(e,g),w=arguments.length;if(0===w?o=r=0:1===w?(o=0,r=g-v):(o=w-2,r=d(h(a(t),0),g-v)),g+o-r>b)throw TypeError(D);for(m=c(F,r),u=0;u<r;u++)f=v+u,f in F&&s(m,u,F[f]);if(m.length=r,o<r){for(u=v;u<g-r;u++)f=u+r,p=u+o,f in F?F[p]=F[f]:delete F[p];for(u=g;u>g-r+o;u--)delete F[u-1]}else if(o>r)for(u=g-r;u>v;u--)f=u+r-1,p=u+o-1,f in F?F[p]=F[f]:delete F[p];for(u=0;u<o;u++)F[u+v]=arguments[u+2];return F.length=g-r+o,m}})},dbb4:function(e,t,o){var r=o("23e7"),n=o("83ab"),a=o("56ef"),i=o("fc6a"),l=o("06cf"),c=o("8418");r({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(e){var t,o,r=i(e),n=l.f,s=a(r),m={},u=0;while(s.length>u)o=n(r,t=s[u++]),void 0!==o&&c(m,t,o);return m}})},e439:function(e,t,o){var r=o("23e7"),n=o("d039"),a=o("fc6a"),i=o("06cf").f,l=o("83ab"),c=n((function(){i(1)})),s=!l||c;r({target:"Object",stat:!0,forced:s,sham:!l},{getOwnPropertyDescriptor:function(e,t){return i(a(e),t)}})},efec:function(e,t,o){var r=o("9112"),n=o("51eb"),a=o("b622"),i=a("toPrimitive"),l=Date.prototype;i in l||r(l,i,n)}}]);