mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
0c56a3e599
Made-with: Cursor Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp_ninca-crk-access-control"]=window["webpackJsonp_ninca-crk-access-control"]||[]).push([["chunk-57a3f702","chunk-14ff34a7"],{"04f2":function(e,t,a){},"0b0c":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:"add-rule add-rule-layout"},[a("div",{staticClass:"rule-layout-content"},[a("div",{staticClass:"rule-left"},[a("in-head",{attrs:{label:"设备操作"}}),a("div",{staticClass:"form-rule-wrap"},[a("FormRule",{ref:"refForm",attrs:{detailData:e.detailData}})],1)],1),a("div",{staticClass:"rule-right"},[a("in-head",{attrs:{label:"关联机构"}}),a("div",{staticClass:"org-rule-wrap"},[a("OrgRule",{ref:"refOrg",attrs:{detailData:e.detailData},on:{change:e.orgChange}})],1)],1)]),a("div",{staticClass:"rule-layout-footer"},[a("el-button",{on:{click:e.cancelClick}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.confirmClick}},[e._v("确定")])],1)])},r=[],c=(a("d3b7"),a("4ae1"),a("25f0"),a("f3f3")),n=a("276c"),l=a("e954"),s=a("920b"),o=a("e1a7"),u=a("f20d"),d=a("9ab4"),f=a("60a3"),h=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("in-form",{ref:"cwform",staticClass:"form-rule",attrs:{formItems:e.formItems,options:e.options,model:e.addList},scopedSlots:e._u([{key:"a1",fn:function(){return[a("SelectTime",{staticStyle:{padding:"0"},model:{value:e.selectTime,callback:function(t){e.selectTime=t},expression:"selectTime"}})]},proxy:!0}])})},p=[],b=(a("d81d"),a("96cf"),a("c964")),v=a("48b1"),m=a("d156"),O=a("82e8");function y(e){function t(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var a,i=Object(u["a"])(e);if(t()){var r=Object(u["a"])(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Object(o["a"])(this,a)}}var g=function(e){Object(s["a"])(a,e);var t=y(a);function a(){var e;return Object(n["a"])(this,a),e=t.apply(this,arguments),e.addList={ruleName:"",includeLabels:[],excludeLabels:[]},e.selectTime={radio:1,selectValue:"",dateValue:[]},e.options={includeOrganizations:[],includeLabels:[],excludeLabels:[]},e.rules={},e}return Object(l["a"])(a,[{key:"detailDataChange",value:function(){return this.addList.ruleName=this.detailData.ruleName,this.addList.includeLabels=this.detailData.includeLabels.map((function(e){return e.id})),this.addList.excludeLabels=this.detailData.excludeLabels.map((function(e){return e.id})),1===this.detailData.passType?(this.selectTime.radio=2,this.selectTime.dateValue=[this.detailData.beginDate,this.detailData.endDate],void(this.selectTime.selectValue="")):2===this.detailData.passType?(this.selectTime.radio=3,this.selectTime.dateValue=[],void(this.selectTime.selectValue=this.detailData.passableTimeId)):(this.selectTime.radio=1,this.selectTime.dateValue=[],void(this.selectTime.selectValue=""))}},{key:"mounted",value:function(){this.getIncludeOrganizations(),this.getLables()}},{key:"getIncludeOrganizations",value:function(){var e=Object(b["a"])(regeneratorRuntime.mark((function e(){var t,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,m["a"].list();case 2:t=e.sent,a=t.tree,this.options.includeOrganizations=a;case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getLables",value:function(){var e=Object(b["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,m["a"].getAllLabels();case 2:t=e.sent,this.options.excludeLabels=t,this.options.includeLabels=t;case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getData",value:function(){var e=Object(b["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,a){t.formRef.getRefMethod("validate").then((function(i){var r=Object(c["a"])({timeRange:t.selectTime.dateValue,passableTimeId:t.selectTime.selectValue},t.addList);return 2===t.selectTime.radio&&0===t.selectTime.dateValue.length?(t.$message.info("请选择时间后提交"),void a("请选择时间后提交")):3!==t.selectTime.radio||t.selectTime.selectValue?(1===t.selectTime.radio?(r.timeRange=[],r.passableTimeId=""):2===t.selectTime.radio?r.passableTimeId="":3===t.selectTime.radio&&(r.timeRange=[]),void e(r)):(t.$message.info("请选择通行时间后提交"),void a("请选择通行时间后提交"))}))})));case 1:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"formItems",get:function(){return[{type:"input",name:"ruleName",formItemAttrs:{label:"规则名称"},colAttrs:{span:24},contentAttrs:{placeholder:"请输入规则名称"},rules:[{required:!0,message:"请输入规则名称",trigger:"blur"}]},{type:"select",name:"includeLabels",formItemAttrs:{label:"包含标签"},colAttrs:{span:24},contentAttrs:{placeholder:"请选择包含标签",clearable:!0,multiple:!0,filterable:!0}},{type:"select",name:"excludeLabels",formItemAttrs:{label:"排除标签"},colAttrs:{span:24},contentAttrs:{placeholder:"请选择排除标签",multiple:!0,clearable:!0,filterable:!0}},{type:"input",name:"a1",isSlot:!0,formItemAttrs:{label:""},colAttrs:{span:24}}]}}]),a}(Object(f["c"])(Object(v["a"])()));Object(d["a"])([Object(f["e"])({type:Object,default:function(){return{}}})],g.prototype,"detailData",void 0),Object(d["a"])([Object(f["i"])("detailData")],g.prototype,"detailDataChange",null),g=Object(d["a"])([Object(f["a"])({components:{SelectTime:O["a"]}})],g);var j=g,k=j,C=a("2877"),x=Object(C["a"])(k,h,p,!1,null,null,null),L=x.exports,R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"org-rule"},[a("div",{staticClass:"org-rule-header"},[a("div",{staticClass:"rule-header-left"},[a("el-input",{attrs:{placeholder:"请输入机构名称搜索",clearable:""},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.filterTextClick},slot:"append"})],1)],1),a("div",{staticClass:"rule-header-right"},[a("el-input",{attrs:{placeholder:"请输入机构名称搜索",clearable:""},model:{value:e.selectOrgFilter,callback:function(t){e.selectOrgFilter=t},expression:"selectOrgFilter"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.selectOrgFilterClick},slot:"append"})],1)],1)]),a("div",{staticClass:"org-rule-content"},[a("div",{staticClass:"left-wrap content-common-wrap"},[a("div",{staticClass:"content-top"},[a("el-button",{attrs:{type:"text"},on:{click:e.selectAll}},[e._v("全选")]),a("div",{staticClass:"content-top-right"},[e._v(e._s(e.selectNodes.length)+"/"+e._s(e.list.length)+"项目")])],1),a("div",{staticClass:"rule-content"},[a("el-tree",{ref:"tree",attrs:{data:e.data,"node-key":"id","default-checked-keys":e.defaultIds,"filter-node-method":e.filterNode,props:e.defaultProps,"show-checkbox":""},on:{"check-change":e.checkChange}})],1)]),a("div",{staticClass:"middle-wrap"},[a("div",{staticClass:"btn-wrap"},[a("div",{staticClass:"btn-top"},[a("el-button",{attrs:{icon:"el-icon-arrow-left"},on:{click:e.listToTree}})],1),a("div",{staticClass:"btn-bottom"},[a("el-button",{attrs:{type:"primary",icon:"el-icon-arrow-right"},on:{click:e.treeToList}})],1)])]),a("div",{staticClass:"right-wrap content-common-wrap"},[a("div",{staticClass:"content-top"},[a("el-checkbox",{attrs:{indeterminate:e.isIndeterminate,disabled:0===this.selectList.length},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")]),a("div",{staticClass:"content-top-right"},[e._v(e._s(e.checkedItem.length)+"/"+e._s(e.selectList.length)+"项目")])],1),a("div",{staticClass:"rule-content"},[a("div",{staticClass:"list-wrap"},[a("el-checkbox-group",{model:{value:e.checkedItem,callback:function(t){e.checkedItem=t},expression:"checkedItem"}},e._l(e.fSelectList,(function(t){return a("div",{key:t.id,staticClass:"list-item"},[a("el-checkbox",{attrs:{label:t.id}},[e._v(e._s(t.label))]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.delClick(t)}}},[e._v("删除")])],1)})),0)],1)])])])])},T=[],w=(a("4de4"),a("c975"),a("b0c0"),a("9fb5"));function D(e){function t(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var a,i=Object(u["a"])(e);if(t()){var r=Object(u["a"])(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Object(o["a"])(this,a)}}var I=function(e){Object(s["a"])(a,e);var t=D(a);function a(){var e;return Object(n["a"])(this,a),e=t.apply(this,arguments),e.checkedItem=[],e.filterText="",e.selectList=[],e.fSelectList=[],e.defaultIds=[],e.selectNodes=[],e.defaultProps={children:"children",label:"label"},e.data=[],e.list=[],e.selectOrgFilter="",e}return Object(l["a"])(a,[{key:"mounted",value:function(){var e=this;m["a"].list().then((function(t){var a=t.tree,i=t.list;e.data=a,e.list=i}))}},{key:"selectListChange",value:function(){this.$emit("change",this.selectList.map((function(e){return e.id})))}},{key:"detailDataChange",value:function(){var e=this.detailData.includeOrganizations.map((function(e){return Object(c["a"])({},e,{label:e.name})}));this.selectList=e,this.fSelectList=e,console.warn(e),this.defaultIds=e.map((function(e){return e.id}))}},{key:"filterTextClick",value:function(){this.tree.filter(this.filterText)}},{key:"filterNode",value:function(e,t){return!e||-1!==t.label.indexOf(e)}},{key:"treeToList",value:function(){var e=this.tree.getCheckedNodes();this.selectList=e,this.fSelectList=e}},{key:"listToTree",value:function(){var e=this;this.selectList=this.selectList.filter((function(t){return-1===e.checkedItem.indexOf(t.id)})),this.fSelectList=this.fSelectList.filter((function(t){return-1===e.checkedItem.indexOf(t.id)})),this.checkedItem=[]}},{key:"delClick",value:function(e){this.fSelectList=this.fSelectList.filter((function(t){return t.id!==e.id})),this.selectList=this.selectList.filter((function(t){return t.id!==e.id})),this.checkedItem=this.checkedItem.filter((function(t){return t!==e.id}))}},{key:"selectAll",value:function(){var e=this.list.map((function(e){return e.id}));this.tree.setCheckedKeys(e)}},{key:"checkChange",value:function(){this.selectNodes=this.tree.getCheckedNodes()}},{key:"selectOrgFilterClick",value:function(){var e=this;this.fSelectList=this.selectList.filter((function(t){return-1!==t.label.indexOf(e.selectOrgFilter)}));var t=Object(w["listToObj"])(this.fSelectList,{key:"id"});this.checkedItem=this.checkedItem.filter((function(e){return t[e]}))}},{key:"checkAll",get:function(){return this.fSelectList.length>0&&this.fSelectList.length===this.checkedItem.length},set:function(e){this.checkedItem=e?this.fSelectList.map((function(e){return e.id})):[]}},{key:"isIndeterminate",get:function(){return this.fSelectList.length>0&&this.checkedItem.length>0&&this.fSelectList.length!==this.checkedItem.length}}]),a}(f["h"]);Object(d["a"])([Object(f["e"])({type:Object,default:function(){return{}}})],I.prototype,"detailData",void 0),Object(d["a"])([Object(f["g"])()],I.prototype,"tree",void 0),Object(d["a"])([Object(f["i"])("selectList")],I.prototype,"selectListChange",null),Object(d["a"])([Object(f["i"])("detailData")],I.prototype,"detailDataChange",null),I=Object(d["a"])([f["a"]],I);var _=I,S=_,A=(a("9150"),Object(C["a"])(S,R,T,!1,null,"e9cf56ec",null)),V=A.exports,$=a("806c");function N(e){function t(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var a,i=Object(u["a"])(e);if(t()){var r=Object(u["a"])(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Object(o["a"])(this,a)}}var F=function(e){Object(s["a"])(a,e);var t=N(a);function a(){var e;return Object(n["a"])(this,a),e=t.apply(this,arguments),e.orgArr=[],e.detailData={},e}return Object(l["a"])(a,[{key:"cancelClick",value:function(){this.close()}},{key:"close",value:function(){this.$router.go(-1)}},{key:"orgChange",value:function(e){this.orgArr=e}},{key:"mounted",value:function(){this.$route.query.id&&this.getRuleDetail()}},{key:"getRuleDetail",value:function(){var e=this;$["a"].passRuleDetail({id:this.$route.query.id}).then((function(t){e.detailData=t}))}},{key:"confirmClick",value:function(){var e=this;this.refForm.getData().then((function(t){var a=Object(c["a"])({id:"",deviceId:e.$route.query.deviceId,deviceCode:e.$route.query.deviceCode,includeOrganizations:e.orgArr},t);e.$route.query.id?(a.id=e.$route.query.id,$["a"].passRuleEdit(a).then((function(t){e.close()}))):$["a"].passRuleAdd(a).then((function(t){e.close()}))}))}}]),a}(f["h"]);Object(d["a"])([Object(f["g"])()],F.prototype,"refForm",void 0),Object(d["a"])([Object(f["g"])()],F.prototype,"refOrg",void 0),F=Object(d["a"])([Object(f["a"])({components:{FormRule:L,OrgRule:V}})],F);var P=F,q=P,z=(a("5525"),Object(C["a"])(q,i,r,!1,null,"08103bb6",null));t["default"]=z.exports},5525:function(e,t,a){"use strict";var i=a("5a38"),r=a.n(i);r.a},"5a38":function(e,t,a){},62952: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("AddRule")},r=[],c=(a("d3b7"),a("4ae1"),a("25f0"),a("276c")),n=a("920b"),l=a("e1a7"),s=a("f20d"),o=a("9ab4"),u=a("60a3"),d=a("0b0c");function f(e){function t(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var a,i=Object(s["a"])(e);if(t()){var r=Object(s["a"])(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Object(l["a"])(this,a)}}var h=function(e){Object(n["a"])(a,e);var t=f(a);function a(){return Object(c["a"])(this,a),t.apply(this,arguments)}return a}(u["h"]);h=Object(o["a"])([Object(u["a"])({components:{AddRule:d["default"]}})],h);var p=h,b=p,v=a("2877"),m=Object(v["a"])(b,i,r,!1,null,"4e710570",null);t["default"]=m.exports},"82e8":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select-time"},[a("div",{staticClass:"select-time-left"},[e._v(" 通行时间 ")]),a("div",{staticClass:"select-time-right"},[a("el-radio-group",{model:{value:e.radioObj.radio,callback:function(t){e.$set(e.radioObj,"radio",t)},expression:"radioObj.radio"}},[a("div",{staticClass:"radio-item"},[a("el-radio",{attrs:{label:1}},[e._v("长期")])],1),a("div",{staticClass:"radio-item"},[a("el-radio",{attrs:{label:2}},[e._v("自定义时间周期")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:2===e.radioObj.radio,expression:"radioObj.radio === 2"}],staticClass:"date-picker-wrap"},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetimerange","range-separator":"-","value-format":"timestamp","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.radioObj.dateValue,callback:function(t){e.$set(e.radioObj,"dateValue",t)},expression:"radioObj.dateValue"}})],1),a("div",{staticClass:"radio-item"},[a("el-radio",{attrs:{label:3}},[e._v("选择已设定通行时间")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:3===e.radioObj.radio,expression:"radioObj.radio === 3"}],staticClass:"time-picker-wrap"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.radioObj.selectValue,callback:function(t){e.$set(e.radioObj,"selectValue",t)},expression:"radioObj.selectValue"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)]),a("div",{directives:[{name:"show",rawName:"v-show",value:3===e.radioObj.radio&&e.cIvalueObj,expression:"radioObj.radio === 3 && cIvalueObj"}],staticClass:"picker-view"},[a("PassTimeContent",{attrs:{data:e.cIvalueObj}})],1)],1)])},r=[],c=(a("4de4"),a("d81d"),a("d3b7"),a("4ae1"),a("25f0"),a("f3f3")),n=(a("96cf"),a("c964")),l=a("276c"),s=a("e954"),o=a("920b"),u=a("e1a7"),d=a("f20d"),f=a("9ab4"),h=a("60a3"),p=a("4243"),b=a("0627");function v(e){function t(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var a,i=Object(d["a"])(e);if(t()){var r=Object(d["a"])(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Object(u["a"])(this,a)}}var m=function(e){Object(o["a"])(a,e);var t=v(a);function a(){var e;return Object(l["a"])(this,a),e=t.apply(this,arguments),e.options=[],e.radioObj={radio:1,dateValue:[],selectValue:""},e}return Object(s["a"])(a,[{key:"mounted",value:function(){this.getData()}},{key:"getData",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,p["a"].query({},{_this:this,loading:"loading"});case 2:t=e.sent,this.options=t.map((function(e){return Object(c["a"])({},e,{value:e.passableTimeId,label:e.passableTimeName})}));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"objChange",value:function(e){this.radioObj=e}},{key:"radioChange",value:function(e){this.$emit("input",e)}},{key:"cIvalueObj",get:function(){var e=this;return this.options.filter((function(t){return t.value===e.radioObj.selectValue}))[0]}}]),a}(h["h"]);Object(f["a"])([Object(h["d"])("input",{type:Object})],m.prototype,"obj",void 0),Object(f["a"])([Object(h["i"])("obj",{immediate:!0})],m.prototype,"objChange",null),Object(f["a"])([Object(h["i"])("radioObj",{deep:!0})],m.prototype,"radioChange",null),m=Object(f["a"])([Object(h["a"])({components:{PassTimeContent:b["a"]}})],m);var O=m,y=O,g=(a("c8a6"),a("2877")),j=Object(g["a"])(y,i,r,!1,null,"556015b1",null);t["a"]=j.exports},9150:function(e,t,a){"use strict";var i=a("04f2"),r=a.n(i);r.a},a15b:function(e,t,a){"use strict";var i=a("23e7"),r=a("44ad"),c=a("fc6a"),n=a("a640"),l=[].join,s=r!=Object,o=n("join",",");i({target:"Array",proto:!0,forced:s||!o},{join:function(e){return l.call(c(this),void 0===e?",":e)}})},c8a6:function(e,t,a){"use strict";var i=a("ff6b"),r=a.n(i);r.a},ff6b:function(e,t,a){}}]); |