1 line
42 KiB
JavaScript
1 line
42 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-systemSetting-systemSetting"],{"0ed5":function(t,e,i){"use strict";(function(t){i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("5ffc"),o=i("2352"),c=a(i("144a")),d=a(i("4c78")),r={components:{loadMore:c.default,contentNone:d.default},data:function(){return{vschecked:!0,vschecked2:!0,cmchecked:!0,cmchecked2:!0,approvalchecked:!0,approvalchecked2:!0,formatDate:o.formatDate,visitSwich:[{id:"0",name:"开"},{id:"1",name:"关"}],visitSwichIndex:0,cameraSwichIndex:0,approvalSwichIndex:0,userInfo:(0,o.getStorage)("userInfo"),currentTabIndex:0}},watch:{},onReachBottom:function(){0===this.loadingType&&0!=this.currentTabIndex&&(this.loadingType=1,this.page=this.page+1)},onLoad:function(){this.getInitData()},methods:{changePlace:function(t){this.visitSwichIndex=t.detail.value},visitChangePlace:function(e){var i=this;i.vschecked2=i.vschecked,i.vschecked=e.target.value;var a="";a=1==i.vschecked2?"关闭":"开启";var c="是否"+a+"访客预约功能?";uni.showModal({title:"提示",content:c,success:function(e){if(e.confirm){var a=0;a=1==i.vschecked?0:1;var c={method:n.greenSetSetting,data:{type:"visit",code:a}};(0,o.callbackRequest)(c).then((function(t){1==t.data.returnCode?(0,o.alertTip)("修改成功"):((0,o.alertTip)("修改失败"),i.vschecked=i.vschecked2)}))}else t.log("2"+i.vschecked),i.vschecked=i.vschecked2}})},cameraChangePlace:function(e){var i=this;i.cmchecked2=i.cmchecked,i.cmchecked=e.target.value;var a="";a=1==i.cmchecked2?"关闭":"开启";var c="是否"+a+"陌生人声音预警功能?";uni.showModal({title:"提示",content:c,success:function(e){if(e.confirm){var a=0;a=1==i.cmchecked?0:1;var c={method:n.greenSetSetting,data:{type:"cameraSet",code:a}};(0,o.callbackRequest)(c).then((function(t){1==t.data.returnCode?(0,o.alertTip)("修改成功"):((0,o.alertTip)("修改失败"),i.cmchecked=i.cmchecked2)}))}else t.log("2"+i.cmchecked),i.cmchecked=i.cmchecked2}})},approvalChangePlace:function(e){var i=this;i.approvalchecked2=i.approvalchecked,i.approvalchecked=e.target.value;var a="";a=1==i.approvalchecked2?"关闭":"开启";var c="是否"+a+"访客后勤部审批功能?";uni.showModal({title:"提示",content:c,success:function(e){if(e.confirm){var a=0;a=1==i.approvalchecked?0:1;var c={method:n.greenSetSetting,data:{type:"approvalCenter",code:a}};(0,o.callbackRequest)(c).then((function(t){1==t.data.returnCode?(0,o.alertTip)("修改成功"):((0,o.alertTip)("修改失败"),i.approvalchecked=i.approvalchecked2)}))}else t.log("2"+i.approvalchecked),i.approvalchecked=i.approvalchecked2}})},getInitData:function(){self=this;var e={method:n.greenGetSetting,data:{userId:this.userInfo.id}};(0,o.callbackRequest)(e).then((function(e){if(e=e.data,1==e.returnCode){t.log(e.returnData);for(var i=0;i<e.returnData.length;i++)"访客预约"==e.returnData[i].name?0==e.returnData[i].is_open?self.vschecked=!0:self.vschecked=!1:"摄像头报警"==e.returnData[i].name?0==e.returnData[i].is_open?self.cmchecked=!0:self.cmchecked=!1:"approvalCenter"==e.returnData[i].name&&(1==e.returnData[i].is_open?self.approvalchecked=!0:2==e.returnData[i].is_open&&(self.approvalchecked=!1))}}))},submit:function(){t.log(this.visitSwich[this.visitSwichIndex].id+"--------==-===="+this.visitSwich[this.cameraSwichIndex].id);var e={method:n.greenSetSetting,data:{visit:this.visitSwich[this.visitSwichIndex].id,camera:this.visitSwich[this.cameraSwichIndex].id}};(0,o.callbackRequest)(e).then((function(t){1==t.data.returnCode&&(0,o.alertTip)("提交成功")}))},person:function(e){this.index=e.detail.value,t.log(e)}}};e.default=r}).call(this,i("ba7c")["default"])},"144a":function(t,e,i){"use strict";i.r(e);var a=i("e11b"),n=i("81de");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("4197");var c=i("828b"),d=Object(c["a"])(n["default"],a["b"],a["c"],!1,null,"347c93c8",null,!1,a["a"],void 0);e["default"]=d.exports},"21a3":function(t,e,i){var a=i("d130");a.__esModule&&(a=a.default),"string"===typeof a&&
|