mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
0c56a3e599
Made-with: Cursor Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
1 line
9.9 KiB
JavaScript
1 line
9.9 KiB
JavaScript
(window["webpackJsonp_park-unit-web"]=window["webpackJsonp_park-unit-web"]||[]).push([["chunk-3b19376c"],{"021d":function(t,e,r){"use strict";function s(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];""===r&&(t[e]=null)}}r.d(e,"a",(function(){return s}))},"29da":function(t,e,r){t.exports={elInputWidth:"200px",elInputNumberWidth:"200px",elTextareaWidth:"300px",elSelectWidth:"200px",primaryColor:"#0075da",primaryHoverColor:"#3391e1",primaryActiveColor:"#0069c4"}},"45fc":function(t,e,r){"use strict";var s=r("23e7"),i=r("b727").some,a=r("a640"),n=r("ae40"),o=a("some"),c=n("some");s({target:"Array",proto:!0,forced:!o||!c},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"98ec":function(t,e,r){"use strict";r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return n}));r("4160"),r("caad"),r("a15b"),r("ac1f"),r("1276"),r("159b");var s=",",i=["organizationIds","labelIds","comparePictures"];function a(t,e){try{t.forEach((function(t){if(2===t.type&&t.hasMultiple){var r=e[t.code];"string"===typeof r&&(e[t.code]=r?r.split(s):[])}if(i.includes(t.code)){var a=e[t.code]||"";"string"===typeof a&&(e[t.code]=a?a.split(s):[])}}))}catch(r){}}function n(t,e){t.forEach((function(t){var r=e[t.code]||[];2===t.type&&t.hasMultiple&&(e[t.code]=r.join(s))}))}},a8a5:function(t,e,r){"use strict";r.r(e);var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("qz-wrap",{staticClass:"person-edit",attrs:{loading:t.loading},scopedSlots:t._u([t.hasAccount?{key:"footer",fn:function(){return[r("el-button",{on:{click:function(e){return t.$router.go(-1)}}},[t._v("取消")]),r("el-button",{attrs:{type:"primary",loading:t.submitting},on:{click:t.onConfirm}},[t._v("确定")])]},proxy:!0}:null],null,!0)},[t.attrLoaded?[t.hasAccount?[r("CwPropertyForm",{ref:"propertyFormRef",attrs:{properties:t.attrList,form:t.submitForm},scopedSlots:t._u([{key:"footer",fn:function(){return[r("el-form-item",{attrs:{label:"默认楼层"}},[r("CwAreaChoose",{attrs:{props:t.props},model:{value:t.submitForm.defaultFloor,callback:function(e){t.$set(t.submitForm,"defaultFloor",e)},expression:"submitForm.defaultFloor"}})],1),r("el-form-item",{attrs:{label:"下属车辆"}},[r("el-select",{attrs:{placeholder:"请选择车辆",clearable:"",multiple:"",filterable:""},model:{value:t.submitForm.vehicleList,callback:function(e){t.$set(t.submitForm,"vehicleList",e)},expression:"submitForm.vehicleList"}},t._l(t.carOptions,(function(t){return r("el-option",{key:t.value,attrs:{value:t.value,label:t.label}})})),1)],1),t.hasCreatedSysId?r("el-form-item",{attrs:{label:"系统ID",prop:"createSysAccount"}},[r("span",{staticClass:"sysId"},[t._v(" "+t._s(t.submitForm.sysAccountId)+" ")])]):r("el-form-item",{attrs:{label:" ",prop:"createSysAccount"}},[r("el-checkbox",{attrs:{disabled:t.sysDisabled},model:{value:t.submitForm.createSysAccount,callback:function(e){t.$set(t.submitForm,"createSysAccount",e)},expression:"submitForm.createSysAccount"}},[t._v("是否同步创建系统账号")]),t.submitForm.createSysAccount?r("div",{staticClass:"sysAccount-box"},[r("div",[t._v("请选择以下任一属性作为系统账号")]),r("div",{staticClass:"field-row"},[r("el-select",{attrs:{placeholder:"请选择系统属性"},model:{value:t.sysAccountField,callback:function(e){t.sysAccountField=e},expression:"sysAccountField"}},t._l(t.sysAttrs,(function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.code}})})),1),r("el-input",{attrs:{placeholder:"请输入系统账号ID",clearable:""},model:{value:t.submitForm[t.sysAccountField],callback:function(e){t.$set(t.submitForm,t.sysAccountField,"string"===typeof e?e.trim():e)},expression:"submitForm[sysAccountField]"}})],1)]):t._e()],1)]},proxy:!0}],null,!1,332754098)})]:[r("div",{staticClass:"empty-wrp"},[r("div",[t._v("尚未进行人员属性初始化,无法新增人员")]),r("router-link",{attrs:{to:{path:"/person/attr"}}},[r("el-button",{attrs:{type:"text"}},[t._v("去进行初始化")])],1)],1)]]:t._e()],2)},i=[],a=(r("4de4"),r("c975"),r("d81d"),r("fb6a"),r("45fc"),r("96cf"),r("1da1")),n=r("d4ec"),o=r("bee2"),c=r("99de"),u=r("7e84"),l=r("262e"),d=r("9ab4"),p=r("60a3"),f=r("de57"),h=r("9dda"),m=r("98ec"),b=r("021d"),y=r("71c8"),v=function(t){function e(){var t;return Object(n["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.submitForm={},t.sysAccountField="",t.parseTime=f["b"],t.normalRule=h["b"],t.lenRule=h["a"],t.submitting=!1,t.attrList=[],t.attrLoaded=!1,t.hasAccount=!1,t.loading=!1,t.sysDisabled=!1,t.info={timeRange:[]},t.hasCreatedSysId=!1,t.personFieldsLength=y["f"],t.carOptions=[],t.props={multiple:!1,emitPath:!1,checkStrictly:!0,label:"name",value:"id"},t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"created",value:function(){this.init()}},{key:"getCarOptions",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.service.getVehicleList();case 3:e=t.sent,r=e.data,this.carOptions=r.map((function(t){return{label:t.plateNo,value:t.id}})),t.next=10;break;case 8:t.prev=8,t.t0=t["catch"](0);case 10:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"getAttr",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.service.propertyList({});case 3:e=t.sent,r=e.data,this.hasAccount=r.hasAccount,this.attrList=r.properties.filter((function(t){return"floorName"!=t.code&&"floorNames"!=t.code})),this.attrLoaded=!0,t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](0);case 12:case"end":return t.stop()}}),t,this,[[0,10]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"init",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,r,s,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getCarOptions();case 2:return t.next=4,this.getAttr();case 4:if(this.ifEdit){t.next=7;break}return this.setDefaultRegImage(),t.abrupt("return");case 7:return this.loading=!0,t.prev=8,t.next=11,this.service.personDetail(this.$route.query.id);case 11:e=t.sent,r=e.data,s=r,Object(m["a"])(this.attrList,s),s.createSysAccount=!!s.createSysAccount,this.hasCreatedSysId=s.createSysAccount,this.sysAttr&&(i=s[this.sysAttr],i||(this.sysDisabled=!0)),s.createSysAccount&&(this.sysDisabled=!0),this.info=s,this.submitForm=s,t.next=25;break;case 23:t.prev=23,t.t0=t["catch"](8);case 25:return t.prev=25,this.loading=!1,t.finish(25);case 28:case"end":return t.stop()}}),t,this,[[8,23,25,28]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"onCustomAttrValidate",value:function(){if((!this.finalPara.labelIds||0===this.finalPara.labelIds.length)&&(!this.finalPara.organizationIds||0===this.finalPara.organizationIds.length))return this.$message.error("所属机构和人员标签至少设置一项"),!1;if(this.submitForm.createSysAccount&&!this.ifEdit){if(!this.sysAccountField)return this.$message.error("请选择系统属性"),!1;if(!this.submitForm[this.sysAccountField])return this.$message.error("系统属性值不能为空"),!1}return!0}},{key:"onConfirm",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.propertyFormRef.validate();case 3:if(e=this.onCustomAttrValidate(),e){t.next=6;break}return t.abrupt("return");case 6:return this.submitting=!0,r=this.ifEdit?this.service.updatePerson:this.service.addPerson,t.next=10,r(this.finalPara);case 10:this.$message.success(this.ifEdit?"编辑成功":"新增成功"),this.$router.push("/person/list"),t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](0);case 17:return t.prev=17,this.submitting=!1,t.finish(17);case 20:case"end":return t.stop()}}),t,this,[[0,14,17,20]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"setDefaultRegImage",value:function(){try{var t=localStorage.getItem("person-add");if(t){var e=JSON.parse(t).bestCaptureImg;this.$set(this.submitForm,"comparePicture",e.slice(e.indexOf("=")+1)),localStorage.removeItem("person-add")}}catch(r){}}},{key:"ifEdit",get:function(){return!!this.$route.query.id}},{key:"hasOrgAndLabel",get:function(){var t=this.attrList.filter((function(t){return"organizationIds"===t.code||"labelIds"===t.code}));return 2===t.length}},{key:"sysAttr",get:function(){var t="";return this.attrList.some((function(e){e.hasSysAccount&&(t=e.code)})),t}},{key:"sysAttrs",get:function(){return this.attrList.filter((function(t){return t.hasSysAccountAvailable}))}},{key:"finalPara",get:function(){var t=JSON.parse(JSON.stringify(this.submitForm));Object(m["b"])(this.attrList,t);var e=t.comparePictures;return t.comparePictures=(e||[]).map((function(t){return t.url})),t.createSysAccount=t.createSysAccount?1:0,t.sysAccountId=this.sysAccountField?this.submitForm[this.sysAccountField]:t.sysAccountId||"",Object(b["a"])(t),t}}]),e}(p["e"]);d["a"]([Object(p["d"])()],v.prototype,"propertyFormRef",void 0),v=d["a"]([Object(p["a"])({components:{}})],v);var g=v,A=g,k=(r("ea74"),r("2877")),F=Object(k["a"])(A,s,i,!1,null,null,null);e["default"]=F.exports},ea74:function(t,e,r){"use strict";var s=r("29da"),i=r.n(s);i.a},fb6a:function(t,e,r){"use strict";var s=r("23e7"),i=r("861d"),a=r("e8b5"),n=r("23cb"),o=r("50c4"),c=r("fc6a"),u=r("8418"),l=r("b622"),d=r("1dde"),p=r("ae40"),f=d("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),m=l("species"),b=[].slice,y=Math.max;s({target:"Array",proto:!0,forced:!f||!h},{slice:function(t,e){var r,s,l,d=c(this),p=o(d.length),f=n(t,p),h=n(void 0===e?p:e,p);if(a(d)&&(r=d.constructor,"function"!=typeof r||r!==Array&&!a(r.prototype)?i(r)&&(r=r[m],null===r&&(r=void 0)):r=void 0,r===Array||void 0===r))return b.call(d,f,h);for(s=new(void 0===r?Array:r)(y(h-f,0)),l=0;f<h;f++,l++)f in d&&u(s,l,d[f]);return s.length=l,s}})}}]); |