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
19 KiB
JavaScript
1 line
19 KiB
JavaScript
(window["webpackJsonp_park-unit-web"]=window["webpackJsonp_park-unit-web"]||[]).push([["chunk-e4397088"],{"06b8":function(e,t,n){e.exports={elInputWidth:"200px",elInputNumberWidth:"200px",elTextareaWidth:"300px",elSelectWidth:"200px",primaryColor:"#0075da",primaryHoverColor:"#3391e1",primaryActiveColor:"#0069c4"}},"2a83":function(e,t,n){"use strict";var i=n("9ae3"),a=n.n(i);a.a},"437f":function(e,t,n){},"9ae3":function(e,t,n){e.exports={elInputWidth:"200px",elInputNumberWidth:"200px",elTextareaWidth:"300px",elSelectWidth:"200px",primaryColor:"#0075da",primaryHoverColor:"#3391e1",primaryActiveColor:"#0069c4"}},adda:function(e,t,n){"use strict";var i=n("eaa4"),a=n.n(i);a.a},b0c0:function(e,t,n){var i=n("83ab"),a=n("9bf2").f,s=Function.prototype,r=s.toString,o=/^\s*function ([^ (]*)/,l="name";!i||l in s||a(s,l,{configurable:!0,get:function(){try{return r.call(this).match(o)[1]}catch(e){return""}}})},baa0:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("qz-wrap",{staticClass:"photo-edit",scopedSlots:e._u([{key:"footer",fn:function(){return[n("el-button",{on:{click:function(t){return e.$router.go(-1)}}},[e._v("取消")]),n("el-button",{attrs:{type:"primary",loading:e.submitting},on:{click:e.handleConfirm}},[e._v("确定")])]},proxy:!0}])},[n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"ruleForm",staticClass:"container",attrs:{model:e.submitForm,"label-width":"80px"}},[e.ifEdit?n("CwPanel",{staticClass:"base-panel",attrs:{title:"基本信息"}},[n("div",{staticClass:"flex"},[n("el-form-item",{attrs:{label:"图库ID",prop:"name"}},[n("span",[e._v(e._s(e.submitForm.id))])]),n("el-form-item",{attrs:{label:"人员数量",prop:"name"}},[e._v(e._s(e.submitForm.personNum))])],1),n("div",{staticClass:"flex"},[n("el-form-item",{attrs:{label:"创建企业",prop:"name"}},[n("CwOverflowText",{attrs:{text:e.submitForm.businessName}})],1),n("el-form-item",{attrs:{label:"图库名称",prop:"name",rules:[e.normalRule("empty","请输入图库名称")]}},[n("el-input",{attrs:{placeholder:"请输入图库名称"},model:{value:e.submitForm.name,callback:function(t){e.$set(e.submitForm,"name",t)},expression:"submitForm.name"}})],1)],1)]):e._e(),n("CwPanel",{attrs:{title:"订阅规则"}},[n("el-form-item",{attrs:{label:"规则说明","label-width":"68px"}},[n("div",[n("p",[e._v("1.可以从机构、标签、个人3个维度去筛选底照")]),n("p",[e._v("2.图库底库集合=包含机构+包含标签-排除标签-排除个人+包含个人")]),n("p",[e._v("3.订阅规则内的数据源发生更新,图库底照集合会保持同步更新")])])]),n("div",{staticClass:"flex"},[n("el-form-item",{attrs:{label:"包含机构",prop:"includeOrganizations","label-width":"68px"}},[n("CwOrgChoose",{model:{value:e.submitForm.includeOrganizations,callback:function(t){e.$set(e.submitForm,"includeOrganizations",t)},expression:"submitForm.includeOrganizations"}})],1),n("el-form-item",{attrs:{label:"包含标签",prop:"includeLabels","label-width":"82px"}},[n("CwLabelChoose",{model:{value:e.submitForm.includeLabels,callback:function(t){e.$set(e.submitForm,"includeLabels",t)},expression:"submitForm.includeLabels"}})],1)],1),n("div",{staticClass:"flex"},[n("el-form-item",{attrs:{label:"排除标签",prop:"excludeLabels","label-width":"68px"}},[n("CwLabelChoose",{model:{value:e.submitForm.excludeLabels,callback:function(t){e.$set(e.submitForm,"excludeLabels",t)},expression:"submitForm.excludeLabels"}})],1),n("el-form-item",{attrs:{label:"排除个人",prop:"excludePersons","label-width":"82px"}},[n("ChoosePerson",{staticClass:"person-select-block",attrs:{defaultOptions:e.excludePersonsOp},model:{value:e.submitForm.excludePersons,callback:function(t){e.$set(e.submitForm,"excludePersons",t)},expression:"submitForm.excludePersons"}})],1)],1),n("el-form-item",{attrs:{label:"包含个人","label-width":"68px"}},[n("div",{staticClass:"contain-people"},[n("div",{staticClass:"operate-group"},[n("el-button",{attrs:{type:"primary"},on:{click:e.onAddPerson}},[e._v("添加")])],1),e.groupContainPeople.length>0?n("div",{staticClass:"contain-content"},e._l(e.groupContainPeople,(function(t,i){return n("div",{key:i,staticClass:"contain-row"},e._l(t,(function(t){return n("div",{key:t.id,staticClass:"contain-item"},[n("div",{staticClass:"head"},[e._v("人员ID:"+e._s(t.id))]),n("div",{staticClass:"item-content"},[n("CwImage",{attrs:{src:e.splicingImgPath(t.comparePicture),width:90}}),n("div",{staticClass:"item-content-right"},[n("div",{staticClass:"label"},[e._v("人员姓名:")]),n("div",{staticClass:"text"},[e._v(e._s(t.name))]),n("div",{staticClass:"label"},[e._v("有效期:")]),t.expiryBeginDate||t.expiryEndDate?[n("div",{staticClass:"text"},[e._v(e._s(e._f("datetime")(t.expiryBeginDate)))]),n("div",{staticClass:"text"},[e._v(e._s(e._f("datetime")(t.expiryEndDate)))])]:n("div",{staticClass:"text"},[e._v("长期")]),n("el-button",{attrs:{type:"text"},on:{click:function(n){return e.onRemovePeople(t.id)}}},[e._v("删除")])],2)],1)])})),0)})),0):e._e(),e.customPager.total>0?n("qz-pager",{on:{change:e.onPagerChange},model:{value:e.customPager,callback:function(t){e.customPager=t},expression:"customPager"}}):e._e()],1)])],1)],1),n("photo-add-person",{ref:"addPersonRef",on:{chosen:e.onChosen}})],1)},a=[],s=(n("99af"),n("4de4"),n("c740"),n("caad"),n("d81d"),n("fb6a"),n("a434"),n("b0c0"),n("d3b7"),n("e25e"),n("25f0"),n("2532"),n("96cf"),n("1da1")),r=n("d4ec"),o=n("bee2"),l=n("99de"),c=n("7e84"),u=n("262e"),p=n("9ab4"),d=n("60a3"),h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-select",{attrs:{multiple:"",filterable:"",remote:"","collapse-tags":e.collapse,"reserve-keyword":"",placeholder:"选择人员","remote-method":e.remoteMethod,loading:e.loading},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}},e._l(e.options,(function(t){return n("el-option",{key:t.id,attrs:{label:t.label,value:t.id}},[e._v(" "+e._s(t.showName)+" ")])})),1)},m=[],f=(n("a15b"),function(e){function t(){var e;return Object(r["a"])(this,t),e=Object(l["a"])(this,Object(c["a"])(t).apply(this,arguments)),e.options=[],e.loading=!1,e}return Object(u["a"])(t,e),Object(o["a"])(t,[{key:"onDefaultOptionsChange",value:function(e){this.options=e}},{key:"fetchData",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,this.service.personList({name:t,source:1});case 4:n=e.sent,i=n.data,this.options=(i||[]).map((function(e){var t="";return e.organizationNames&&e.organizationNames.length&&(t="-".concat(e.organizationNames.join(","))),{label:e.name,showName:"".concat(e.name).concat(t),id:e.id}})),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:return e.prev=11,this.loading=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,this,[[0,9,11,14]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"remoteMethod",value:function(e){this.fetchData(e)}},{key:"handleClose",value:function(){}},{key:"created",value:function(){}},{key:"selected",get:function(){return this.value||[]},set:function(e){this.$emit("input",e)}}]),t}(d["e"]));p["a"]([Object(d["f"])("defaultOptions")],f.prototype,"onDefaultOptionsChange",null),p["a"]([Object(d["c"])({type:Array,default:function(){return[]}})],f.prototype,"defaultOptions",void 0),p["a"]([Object(d["c"])({type:Array,default:function(){return[]}})],f.prototype,"value",void 0),p["a"]([Object(d["c"])({type:Boolean,default:!0})],f.prototype,"collapse",void 0),f=p["a"]([Object(d["a"])({components:{}})],f);var v=f,g=v,b=(n("d32a"),n("2877")),y=Object(b["a"])(g,h,m,!1,null,"267251f4",null),P=y.exports,x=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("qz-drawer",{attrs:{title:"添加人员",visible:e.visible,size:826},on:{"update:visible":function(t){e.visible=t}}},[n("div",{directives:[{name:"show",rawName:"v-show",value:1===e.step,expression:"step === 1"}]},[n("CwFormFilter",{attrs:{form:e.searchForm,rows:e.formRows},on:{search:e.onSearch,reset:e.onSearch}}),e.peopleList&&e.peopleList.length>0?n("div",{staticClass:"people-list"},[e._l(e.peopleList,(function(t){return n("div",{key:t.id,staticClass:"item",class:{active:e.chosenIds.includes(t.id)},on:{click:function(n){return e.onChoose(t)}}},[n("img",{staticClass:"picture",attrs:{src:e.splicingImgPath(t.comparePicture),alt:""}}),n("div",[n("div",{staticClass:"row"},[n("span",{staticClass:"label"},[e._v("人员ID:")]),n("span",{staticClass:"text"},[e._v(e._s(t.id))])]),n("div",{staticClass:"row"},[n("span",{staticClass:"label"},[e._v("人员姓名:")]),n("span",{staticClass:"text"},[e._v(e._s(t.name))])])]),e.chosenIds.includes(t.id)?n("el-checkbox",{staticClass:"checked-btn",attrs:{checked:""}}):e._e()],1)})),n("qz-pager",{on:{change:e.fetchPeople},model:{value:e.pager,callback:function(t){e.pager=t},expression:"pager"}})],2):n("qz-no-data")],1),n("div",{directives:[{name:"show",rawName:"v-show",value:2===e.step,expression:"step === 2"}],staticStyle:{padding:"12px 0"}},[n("span",[e._v("授权通行时间:")]),n("el-checkbox",{model:{value:e.isLongTerm,callback:function(t){e.isLongTerm=t},expression:"isLongTerm"}},[e._v("长期有效")]),n("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:!e.isLongTerm,expression:"!isLongTerm"}],staticStyle:{"margin-left":"12px"},attrs:{type:"datetimerange","value-format":"timestamp","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"]},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1),n("span",{attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取 消")]),1===e.step&&e.peopleList.length>0?n("el-button",{attrs:{type:"primary"},on:{click:function(t){e.step=2}}},[e._v("下一步")]):e._e(),2===e.step?[n("el-button",{on:{click:function(t){e.step=1}}},[e._v("上一步")]),n("el-button",{attrs:{type:"primary"},on:{click:e.onConfirm}},[e._v("完成")])]:e._e()],2)])},O=[],C=(n("a4d3"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b"),n("ade3"));function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){Object(C["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=function(e){function t(){var e;return Object(r["a"])(this,t),e=Object(l["a"])(this,Object(c["a"])(t).apply(this,arguments)),e.visible=!1,e.peopleList=[],e.searchForm={id:null,name:null},e.formRows={id:{label:"人员ID",type:"text"},name:{label:"人员名称",type:"text"}},e.pager={currentPage:1,rowsOfPage:10,total:0},e.total=0,e.splicingImgPath=e.$utils.splicingImgPath,e.chosenPeople=[],e.step=1,e.isLongTerm=!0,e.dateRange=[],e.loading=!1,e}return Object(u["a"])(t,e),Object(o["a"])(t,[{key:"openDialog",value:function(e){this.chosenPeople=[],this.searchForm={id:null,name:null},this.pager={currentPage:1,rowsOfPage:10},this.total=0,this.isLongTerm=!0,this.dateRange=[],this.step=1,this.peopleList=[],this.fetchPeople(),this.visible=!0}},{key:"onChoose",value:function(e){var t=this.chosenPeople.findIndex((function(t){return t.id===e.id}));t>-1?this.chosenPeople.splice(t,1):this.chosenPeople.push(e)}},{key:"onSearch",value:function(){this.pager.currentPage=1,this.pager.rowsOfPage=10,this.fetchPeople()}},{key:"fetchPeople",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,t=k({},this.pager),this.searchForm.id&&(t.ids=[this.searchForm.id]),this.searchForm.name&&(t.name=this.searchForm.name),e.next=7,this.service.personPage(t);case 7:n=e.sent,i=n.data,this.peopleList=i.datas||[],this.pager.total=i.totalRows,this.loading=!1,e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](0),this.loading=!1;case 17:case"end":return e.stop()}}),e,this,[[0,14]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"onConfirm",value:function(){var e=this;this.isLongTerm||0!==this.dateRange.length?0!==this.chosenPeople.length?(this.chosenPeople.forEach((function(t){e.isLongTerm?(t.expiryBeginDate=null,t.expiryEndDate=null):2===e.dateRange.length&&(t.expiryBeginDate=e.dateRange[0],t.expiryEndDate=e.dateRange[1])})),this.$emit("chosen",this.chosenPeople),this.visible=!1):this.$message.error("请选择人员"):this.$message.error("请选择授权通行时间")}},{key:"chosenIds",get:function(){return this.chosenPeople.map((function(e){return e.id}))}}]),t}(d["e"]);_=p["a"]([Object(d["a"])({name:"photo-add-person",components:{}})],_);var j=_,L=j,F=(n("adda"),Object(b["a"])(L,x,O,!1,null,"7f6eb1ae",null)),I=F.exports,R=n("9dda"),D=n("f58a"),S=function(e){function t(){var e;return Object(r["a"])(this,t),e=Object(l["a"])(this,Object(c["a"])(t).apply(this,arguments)),e.submitForm={name:"",includeOrganizations:[],includeLabels:[],includePersons:[],excludeLabels:[],excludePersons:[]},e.normalRule=R["b"],e.splicingImgPath=e.$utils.splicingImgPath,e.total=0,e.submitting=!1,e.tableData=[],e.excludePersonsOp=[],e.includePersonsOp=[],e.loading=!1,e.info={timeRange:[]},e.customPager={currentPage:1,rowsOfPage:10,total:0},e.sliceContainList=[],e.groupContainPeople=[],e}return Object(u["a"])(t,e),Object(o["a"])(t,[{key:"getIdsByArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e&&e.length?e.map((function(e){return e[t||"id"]})):[]}},{key:"init",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.ifEdit){e.next=2;break}return e.abrupt("return");case 2:return this.loading=!0,e.prev=3,e.next=6,this.service.photoDetail(this.$route.query.id);case 6:t=e.sent,t.success&&(n=t.data,n.includeOrganizations=this.getIdsByArray(n.includeOrganizations),n.includeLabels=this.getIdsByArray(n.includeLabels),this.includePersonsOp=n.includePersons,this.customPager.total=this.includePersonsOp.length,this.onSliceContainPeople(),n.excludeLabels=this.getIdsByArray(n.excludeLabels),this.excludePersonsOp=n.excludePersons.map((function(e){return{label:e.name,id:e.id,showName:"".concat(e.name)}})),n.excludePersons=this.getIdsByArray(n.excludePersons),this.submitForm=n),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](3);case 12:return e.prev=12,this.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,this,[[3,10,12,15]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleConfirm",value:function(){var e=this;this.submitForm.includeLabels&&this.$refs.ruleForm.validate((function(t){if(t){var n=e.submitForm,i=n.includeLabels,a=void 0===i?[]:i,s=n.includeOrganizations,r=void 0===s?[]:s;n.includePersons;if(!a.length&&!r.length&&!e.includePersonsOp.length)return void e.$message.error("请至少选择一个包含规则");e.submitting=!0;var o=e.ifEdit?e.service.updatePhoto:e.service.addPhoto;o(e.finalPara).then((function(t){t.success?(e.$message.success(e.ifEdit?"编辑成功":"新增成功"),e.$router.push("/photo/list")):e.$message.error(t.message||"编辑失败")})).finally((function(){e.submitting=!1}))}}))}},{key:"onAddPerson",value:function(){this.addPersonRef.openDialog(this.includePersonsOp)}},{key:"onPagerChange",value:function(){this.onSliceContainPeople()}},{key:"onSliceContainPeople",value:function(){this.sliceContainList=this.includePersonsOp.slice((this.customPager.currentPage-1)*this.customPager.rowsOfPage,this.customPager.currentPage*this.customPager.rowsOfPage),this.getGroupContainPeople()}},{key:"getGroupContainPeople",value:function(){var e=parseInt((this.sliceContainList.length/3).toString()),t=this.sliceContainList.length%3,n=[];e=t>0?e+1:e;for(var i=0;i<e;i++)n.push(this.sliceContainList.slice(3*i,3*(i+1)));this.groupContainPeople=n}},{key:"onInitSliceList",value:function(){this.customPager={currentPage:1,rowsOfPage:10,total:this.includePersonsOp.length},this.onSliceContainPeople()}},{key:"onChosen",value:function(e){if(e&&e.length>0){var t=e.map((function(e){return e.id})),n=this.includePersonsOp.filter((function(e){return!t.includes(e.id)}));this.includePersonsOp=e.concat(n),this.onInitSliceList()}}},{key:"onRemovePeople",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:try{n=this.includePersonsOp.findIndex((function(e){return e.id===t})),n>-1&&(this.includePersonsOp.splice(n,1),this.onInitSliceList())}catch(i){}case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"created",value:function(){this.init()}},{key:"mounted",value:function(){}},{key:"ifEdit",get:function(){return!!this.$route.query.id}},{key:"finalPara",get:function(){var e=JSON.parse(JSON.stringify(this.submitForm));return e.imageStoreId=this.$route.query.id,e.includePersons=[],e.includePersons=this.includePersonsOp.map((function(e){return{objectId:e.id,expiryBeginDate:e.expiryBeginDate,expiryEndDate:e.expiryEndDate}})),e}}]),t}(d["e"]);p["a"]([Object(d["d"])()],S.prototype,"addPersonRef",void 0),p["a"]([Object(D["a"])("确定移除该人员?")],S.prototype,"onRemovePeople",null),S=p["a"]([Object(d["a"])({components:{ChoosePerson:P,photoAddPerson:I}})],S);var $=S,A=$,E=(n("dbe3"),n("2a83"),Object(b["a"])(A,i,a,!1,null,null,null));t["default"]=E.exports},d32a:function(e,t,n){"use strict";var i=n("437f"),a=n.n(i);a.a},dbe3:function(e,t,n){"use strict";var i=n("06b8"),a=n.n(i);a.a},eaa4:function(e,t,n){},f58a:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("5c96"),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"是否确认执行该操作?";return function(t,n,a){var s=a.value;return a.value=function(){for(var t=this,n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];Object(i["MessageBox"])({title:"提示",message:e,type:"warning",confirmButtonText:"确认",cancelButtonText:"取消",center:!1,callback:function(e){"confirm"===e&&s.apply(t,a)}})},a}}},fb6a:function(e,t,n){"use strict";var i=n("23e7"),a=n("861d"),s=n("e8b5"),r=n("23cb"),o=n("50c4"),l=n("fc6a"),c=n("8418"),u=n("b622"),p=n("1dde"),d=n("ae40"),h=p("slice"),m=d("slice",{ACCESSORS:!0,0:0,1:2}),f=u("species"),v=[].slice,g=Math.max;i({target:"Array",proto:!0,forced:!h||!m},{slice:function(e,t){var n,i,u,p=l(this),d=o(p.length),h=r(e,d),m=r(void 0===t?d:t,d);if(s(p)&&(n=p.constructor,"function"!=typeof n||n!==Array&&!s(n.prototype)?a(n)&&(n=n[f],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return v.call(p,h,m);for(i=new(void 0===n?Array:n)(g(m-h,0)),u=0;h<m;h++,u++)h in p&&c(i,u,p[h]);return i.length=u,i}})}}]); |