(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-work-editWrok"],{"1c40":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.centent-btn[data-v-ba638294]{font-size:22px}.file-size[data-v-ba638294]{font-size:%?48?%}',""]),t.exports=e},"48b1":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("aa9c"),n("bf0f"),n("2797"),n("9327");var a=i(n("0cca")),s=n("094a"),o=n("7fee"),r=n("d6b0"),c=i(n("e86e")),l=i(n("1f0a")),d={data:function(){return{workName:"",workTypes:[],workTypeIndex:-1,wtId:"",workCycles:[{name:this.$t("pages.work.editWrok.一次性工单"),value:"1001"},{name:this.$t("pages.work.editWrok.周期性工单"),value:"2002"}],workCycleIndex:0,workCycle:"1001",startTime:"",endTime:"",staffs:[],copyStaffs:[],pathUrls:[],contents:[],period:"2020022",periodIndex:0,periods:[{name:this.$t("pages.work.editWrok.月/天"),value:"2020022"},{name:this.$t("pages.work.editWrok.按周"),value:"2020023"}],allMonths:[],allDays:[],allWorkdays:[],months:[],days:[],workdays:[],hours:"24",communityId:"",staffFlag:"",workId:"",fileType:"",uploadImage:{maxPhotoNum:5,imgTitle:this.$t("pages.work.editWrok.图片上传"),canEdit:!0}}},onLoad:function(t){this.workId=t.workId,this._loadWorkTypes(),this._loadStaffs(),this._loadStaffCopys(),this._loadWorkCycle();for(var e=1;e<13;e++)this.allMonths.push({index:e,checked:!1});for(var n=1;n<32;n++)this.allMonths.push({index:n,checked:!1});for(var i=1;i<8;i++)this.allWorkdays.push({index:i,checked:!1})},components:{selectMutiStaffs:a.default,vcUploadFile:c.default,uploadImageAsync:l.default},methods:{workTypeChange:function(t){this.workTypeIndex=t.detail.value,this.wtId=this.workTypes[this.workTypeIndex].wtId},workCycleChange:function(t){this.workCycleIndex=t.detail.value,this.workCycle=this.workCycles[this.workCycleIndex].value},dateChange:function(t){this.endTime=t.detail.value},periodChange:function(t){this.periodIndex=t.detail.value,this.period=this.periods[this.periodIndex].value},_changeMonths:function(t){this.months=t.detail.value},_changeDays:function(t){this.days=t.detail.value},_changeWorkDays:function(t){this.workdays=t.detail.value},updateWorkOrder:function(){(0,s.updateWorkPool)(this,{workId:this.workId,workName:this.workName,wtId:this.wtId,workCycle:this.workCycle,startTime:(0,r.formatTime)(new Date),endTime:this.endTime,staffs:this.staffs,copyStaffs:this.copyStaffs,pathUrls:this.pathUrls,contents:this.contents,period:this.period,months:this.months,days:this.days,workdays:this.workdays,hours:this.hours,communityId:(0,o.getCommunityId)()}).then((function(t){uni.navigateBack()}))},selectStaffs:function(){var t=[];this.staffs.forEach((function(e){t.push(e.staffId)})),this.staffFlag="staff",this.$refs.selectMutiStaffsRel.switchShow(t)},deleteStaffPerson:function(t){var e=[];this.staffs.forEach((function(n){n.staffId!=t.staffId&&e.push(n)})),this.staffs=e},selectCopyStaffs:function(){var t=[];this.copyStaffs.forEach((function(e){t.push(e.staffId)})),this.staffFlag="copyStaff",this.$refs.selectMutiStaffsRel.switchShow(t)},deleteCopyPerson:function(t){var e=[];this.copyStaffs.forEach((function(n){n.staffId!=t.staffId&&e.push(n)})),this.copyStaffs=e},getStaffs:function(t){"staff"!=this.staffFlag?this.copyStaffs.push(t):this.staffs.push(t)},uploadFile:function(t){this.pathUrls=[],this.pathUrls.push(t.realFileName)},_loadWorkTypes:function(){var t=this;(0,s.queryWorkType)(this,{page:1,row:100,communityId:(0,o.getCommunityId)()}).then((function(e){t.workTypes=e.data,t._loadStartWork()}))},_loadStartWork:function(){var t=this;(0,s.queryStartWork)(this,{page:1,row:1,workId:this.workId}).then((function(e){var n=e.data[0];t.workName=n.workName,t.wtId=n.wtId,t.workCycle=n.workCycle,t.startTime=n.startTime,t.endTime=n.endTime,t.pathUrls=n.pathUrls,t.contents=[],n.contents.forEach((function(e){e.id=t.contents.length+1,t.contents.push(e)})),"2002"==t.workCycle&&(t.workCycleIndex=1);for(var i=0;i1?arguments[1]:void 0,i=e.length,a=void 0===n?i:h(o(n),i),s=r(t);return f(e,a-s.length,a)===s}})},9877:function(t,e,n){"use strict";n.r(e);var i=n("48b1"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},f123:function(t,e,n){"use strict";n.r(e);var i=n("8e05"),a=n("9877");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("853e");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"ba638294",null,!1,i["a"],void 0);e["default"]=r.exports}}]);