text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-jiaxiao_manage-all_jiaxiao-add_jiaxiao"],{"046f":function(e,t,a){"use strict";(function(e){a("99af"),a("4de4"),a("4160"),a("a15b"),a("a9e3"),a("b64b"),a("ac1f"),a("1276"),a("498a"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={props:{localdata:{type:[Array,Object],default:function(){return[]}},collection:{type:String,default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},getone:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},manual:{type:Boolean,default:!1},value:{type:[Array,String,Number],default:function(){return[]}},modelValue:{type:[Array,String,Number],default:function(){return[]}},preload:{type:Boolean,default:!1},stepSearh:{type:Boolean,default:!0},selfField:{type:String,default:""},parentField:{type:String,default:""},multiple:{type:Boolean,default:!1}},data:function(){return{loading:!1,errorMessage:"",loadMore:{contentdown:"",contentrefresh:"",contentnomore:""},dataList:[],selected:[],selectedIndex:0,page:{current:this.pageCurrent,size:this.pageSize,count:0}}},computed:{isLocaldata:function(){return!this.collection.length},postField:function(){var e=[this.field];return this.parentField&&e.push("".concat(this.parentField," as parent_value")),e.join(",")},dataValue:function(){var e=Array.isArray(this.value)&&0===this.value.length,t="string"===typeof this.value&&!this.value,a="number"===typeof this.value&&!this.value;return e||t||a?this.modelValue:this.value}},created:function(){var e=this;this.$watch((function(){var t=[];return["pageCurrent","pageSize","value","modelValue","localdata","collection","action","field","orderby","where","getont","getcount","gettree"].forEach((function(a){t.push(e[a])})),t}),(function(t,a){for(var i=2;i<t.length;i++)if(t[i]!=a[i]){!0;break}t[0]!=a[0]&&(e.page.current=e.pageCurrent),e.page.size=e.pageSize,e.onPropsChange()})),this._treeData=[]},methods:{onPropsChange:function(){this._treeData=[]},getCommand:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.database(),i=t.action||this.action;i&&(a=a.action(i));var n=t.collection||this.collection;a=a.collection(n);var o=t.where||this.where;o&&Object.keys(o).length&&(a=a.where(o));var r=t.field||this.field;r&&(a=a.field(r));var l=t.orderby||this.orderby;l&&(a=a.orderBy(l));var s=void 0!==t.pageCurrent?t.pageCurrent:this.page.current,d=void 0!==t.pageSize?t.pageSize:this.page.size,c=void 0!==t.getcount?t.getcount:this.getcount,u=void 0!==t.gettree?t.gettree:this.gettree,f={getCount:c,getTree:u};return t.getTreePath&&(f.getTreePath=t.getTreePath),a=a.skip(d*(s-1)).limit(d).get(f),a},getNodeData:function(e){var t=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,where:this._pathWhere()}).then((function(a){t.loading=!1,t.selected=a.result.data,e&&e()})).catch((function(e){t.loading=!1,t.errorMessage=e})))},getTreePath:function(e){var t=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,getTreePath:{startWith:"".concat(this.selfField,"=='").concat(this.dataValue,"'")}}).then((function(a){t.loading=!1;var i=[];t._extractTreePath(a.result.data,i),t.selected=i,e&&e()})).catch((function(e){t.loading=!1,t.errorMessage=e})))},loadData:function(){var e=this;this.isLocaldata?this._processLocalData():this.dataValue.length?this._loadNodeData((function(t){e._treeData=t,e._updateBindData(),e._updateSelected()})):this.stepSearh?this._loadNodeData((function(t){e._treeData=t,e._updateBindData()})):this._loadAllData((function(t){e._treeData=[],e._extractTree(t,e._treeData,null),e._updateBindData()}))},_loadAllData:function(e){var t=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,gettree:!0,startwith:"".concat(this.selfField,"=='").concat(this.dataValue,"'")}).then((function(a){t.loading=!1,e(a.result.data),t.onDataChange()})).catch((function(e){t.loading=!1,t.errorMessage=e})))},_loadNodeData:function(e,t){var a=this;this.loading||(this.loading=!0,this.getCommand({field:this.postField,where:t||this._postWhere(),pageSize:500}).then((function(t){a.loading=!1,e(t.result.data),a.onDataChange()})).catch((function(e){a.loading=!1,a.errorMessage=e})))},_pathWhere:function(){var e=[],t=this._getParentNameByField();return t&&e.push("".concat(t," == '").concat(this.dataValue,"'")),this.where?"(".concat(this.where,") && (").concat(e.join(" || "),")"):e.join(" || ")},_postWhere:function(){var e=[],t=this.selected,a=this.parentField;if(a&&e.push("".concat(a," == null || ").concat(a,' == ""')),t.length)for(var i=0;i<t.length-1;i++)e.push("".concat(a," == '").concat(t[i].value,"'"));var n=[];return this.where&&n.push("(".concat(this.where,")")),e.length&&n.push("(".concat(e.join(" || "),")")),n.join(" && ")},_nodeWhere:function(){var e=[],t=this.selected;return t.length&&e.push("".concat(this.parentField," == '").concat(t[t.length-1].value,"'")),this.where?"(".concat(this.where,") && (").concat(e.join(" || "),")"):e.join(" || ")},_getParentNameByField:function(){for(var e=this.field.split(","),t=null,a=0;a<e.length;a++){var i=e[a].split("as");if(!(i.length<2)&&"value"===i[1].trim()){t=i[0].trim();break}}return t},_isTreeView:function(){return this.parentField&&this.selfField},_updateSelected:function(){for(var e=this.dataList,t=this.selected,a=0;a<t.length;a++)for(var i=t[a].value,n=e[a],o=0;o<n.length;o++){var r=n[o];if(r.value===i){t[a].text=r.text;break}}},_updateBindData:function(e){var t=this._filterData(this._treeData,this.selected),a=t.dataList,i=t.hasNodes,n=!1===this._stepSearh&&!i;return e&&(e.isleaf=n),this.dataList=a,this.selectedIndex=a.length-1,!n&&this.selected.length<a.length&&this.selected.push({value:null,text:"请选择"}),{isleaf:n,hasNodes:i}},_filterData:function(e,t){var a=[],i=!0;a.push(e.filter((function(e){return void 0===e.parent_value})));for(var n=0;n<t.length;n++){var o=t[n].value,r=e.filter((function(e){return e.parent_value===o}));r.length?a.push(r):i=!1}return{dataList:a,hasNodes:i}},_extractTree:function(e,t,a){for(var i=0;i<e.length;i++){var n=e[i],o={};for(var r in n)"children"!==r&&(o[r]=n[r]);void 0!==a&&(o.parent_value=a),t.push(o);var l=n.children;l&&this._extractTree(l,t,n.value)}},_extractTreePath:function(e,t){for(var a=0;a<e.length;a++){var i=e[a],n={};for(var o in i)"children"!==o&&(n[o]=i[o]);t.push(n);var r=i.children;r&&this._extractTreePath(r,t)}},_findNodePath:function(e,t){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<t.length;i++){var n=t[i],o=n.value,r=n.text,l=n.children;if(a.push({value:o,text:r}),o===e)return a;if(l){var s=this._findNodePath(e,l,a);if(s.length)return s}a.pop()}return[]},_processLocalData:function(){this._treeData=[],this._extractTree(this.localdata,this._treeData);var e=this.dataValue;void 0!==e&&(Array.isArray(e)&&(e=e[e.length-1],"object"===typeof e&&e.value&&(e=e.value)),this.selected=this._findNodePath(e,this.localdata))}}};t.default=i}).call(this,a("a9ff")["default"])},"09df":function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".uni-data-tree[data-v-6c5f08e6]{position:relative;font-size:14px}.error-text[data-v-6c5f08e6]{color:#dd524d}.input-value[data-v-6c5f08e6]{\ndisplay:flex;\nflex-direction:row;align-items:center;flex-wrap:nowrap;font-size:14px;line-height:38px;padding:0 5px;overflow:hidden;\n}.input-value-border[data-v-6c5f08e6]{border:1px solid #e5e5e5;border-radius:5px}.selected-area[data-v-6c5f08e6]{flex:1;overflow:hidden;\ndisplay:flex;\nflex-direction:row}.load-more[data-v-6c5f08e6]{\nmargin-right:auto;\n}.selected-list[data-v-6c5f08e6]{\ndisplay:flex;\nflex-direction:row;flex-wrap:nowrap;padding:0 5px}.selected-item[data-v-6c5f08e6]{flex-direction:row;padding:0 1px;\nwhite-space:nowrap\n}.placeholder[data-v-6c5f08e6]{color:grey}.input-split-line[data-v-6c5f08e6]{opacity:.5}.arrow-area[data-v-6c5f08e6]{position:relative;width:20px;\nmargin-left:auto;display:flex;\njustify-content:center;transform:rotate(-45deg);transform-origin:center}.input-arrow[data-v-6c5f08e6]{width:7px;height:7px;border-left:1px solid #999;border-bottom:1px solid #999}.uni-data-tree-cover[data-v-6c5f08e6]{position:fixed;left:0;top:0;right:0;bottom:0;background-color:rgba(0,0,0,.4);\ndisplay:flex;\nflex-direction:column;z-index:100}.uni-data-tree-dialog[data-v-6c5f08e6]{position:fixed;left:0;top:20%;right:0;bottom:0;background-color:#fff;border-top-left-radius:10px;border-top-right-radius:10px;\ndisplay:flex;\nflex-direction:column;z-index:102;overflow:hidden;\n}.dialog-caption[data-v-6c5f08e6]{position:relative;\ndisplay:flex;\nflex-direction:row;border-bottom:1px solid #f0f0f0}.title-area[data-v-6c5f08e6]{\ndisplay:flex;\nalign-items:center;\nmargin:auto;\npadding:0 10px}.dialog-title[data-v-6c5f08e6]{font-weight:700;line-height:44px}.dialog-close[data-v-6c5f08e6]{position:absolute;top:0;right:0;bottom:0;\ndisplay:flex;\nflex-direction:row;align-items:center;padding:0 15px}.dialog-close-plus[data-v-6c5f08e6]{width:16px;height:2px;background-color:#666;border-radius:2px;transform:rotate(45deg)}.dialog-close-rotate[data-v-6c5f08e6]{position:absolute;transform:rotate(-45deg)}.picker-view[data-v-6c5f08e6]{flex:1;overflow:hidden}\n@media (min-width:768px){.uni-data-tree-cover[data-v-6c5f08e6]{background-color:initial}.uni-data-tree-dialog[data-v-6c5f08e6]{position:absolute;top:100%;height:auto;min-height:400px;max-height:50vh;background-color:#fff;border-radius:5px;box-shadow:0 0 20px 5px rgba(0,0,0,.3)}.dialog-caption[data-v-6c5f08e6]{display:none}}\n\n",""]),e.exports=t},"0fa5":function(e,t,a){"use strict";a.r(t);var i=a("c770"),n=a("124f");for(var o in n)"default"!==o&&function(e){a.d(t,e,(function(){return n[e]}))}(o);a("987a");var r,l=a("f0c5"),s=Object(l["a"])(n["default"],i["b"],i["c"],!1,null,"53cca06c",null,!1,i["a"],r);t["default"]=s.exports},"124f":function(e,t,a){"use strict";a.r(t);var i=a("7868"),n=a.n(i);for(var o in i)"default"!==o&&function(e){a.d(t,e,(function(){return i[e]}))}(o);t["default"]=n.a},1738:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enumConverter=t.validator=void 0;var i={name:{rules:[{required:!0,errorMessage:"{label}必填"},{format:"string"}],label:"驾校名称"},number:{rules:[{required:!0,errorMessage:"{label}必填"},{format:"string"}],label:"编号"},city:{rules:[{required:!0,errorMessage:"{label}必填"},{format:"string"}],label:"城市"}};t.validator=i;var n={};t.enumConverter=n},1772:function(e,t,a){"use strict";a.r(t);var i=a("454e"),n=a.n(i);for(var o in i)"default"!==o&&function(e){a.d(t,e,(function(){return i[e]}))}(o);t["default"]=n.a},"1e14":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return i}));var i={uniLoadMore:a("8f9d").default},n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"uni-data-pickerview"},[a("v-uni-scroll-view",{staticClass:"selected-area",attrs:{"scroll-x":"true","scroll-y":"false","show-scrollbar":!1}},[a("v-uni-view",{staticClass:"selected-list"},[e._l(e.selected,(function(t,i){return[t.text?a("v-uni-view",{key:i,staticClass:"selected-item",class:{"selected-item-active":i==e.selectedIndex},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleSelect(i)}}},[a("v-uni-text",{},[e._v(e._s(t.text))])],1):e._e()]}))],2)],1),a("v-uni-view",{staticClass:"tab-c"},[e._l(e.dataList,(function(t,i){return[i==e.selectedIndex?a("v-uni-scroll-view",{key:i,staticClass:"list",attrs:{"scroll-y":!0}},e._l(t,(function(t,n){return a("v-uni-view",{key:n,staticClass:"item",class:{"is-disabled":!!t.disable},on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.handleNodeClick(t,i,n)}}},[a("v-uni-text",{staticClass:"item-text"},[e._v(e._s(t.text))]),e.selected.length>i&&t.value==e.selected[i].value?a("v-uni-view",{staticClass:"check"}):e._e()],1)})),1):e._e()]})),e.loading?a("v-uni-view",{staticClass:"loading-cover"},[a("uni-load-more",{staticClass:"load-more",attrs:{contentText:e.loadMore,status:"loading"}})],1):e._e(),e.errorMessage?a("v-uni-view",{staticClass:"error-message"},[a("v-uni-text",{staticClass:"error-text"},[e._v(e._s(e.errorMessage))])],1):e._e()],2)],1)},o=[]},"36e4":function(e,t,a){"use strict";var i=a("4ea4");a("7db0"),a("c740"),a("fb6a"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(a("046f")),o=i(a("a145")),r={name:"UniDataPicker",emits:["popupopened","popupclosed","nodeclick","input","change","update:modelValue"],mixins:[n.default],components:{DataPickerView:o.default},props:{options:{type:[Object,Array],default:function(){return{}}},popupTitle:{type:String,default:"请选择"},placeholder:{type:String,default:"请选择"},heightMobile:{type:String,default:""},readonly:{type:Boolean,default:!1},border:{type:Boolean,default:!0},split:{type:String,default:"/"}},data:function(){return{isOpened:!1,inputSelected:[]}},created:function(){var e=this;this.form=this.getForm("uniForms"),this.formItem=this.getForm("uniFormsItem"),this.formItem&&this.formItem.name&&(this.rename=this.formItem.name,this.form.inputChildrens.push(this)),this.$nextTick((function(){e.load()}))},methods:{onPropsChange:function(){this._treeData=[],this.selectedIndex=0,this.load()},load:function(){var e=this;this.readonly?this._processReadonly(this.localdata,this.dataValue):this.isLocaldata?(this.loadData(),this.inputSelected=this.selected.slice(0)):this.parentField||this.selfField||!this.dataValue?this.dataValue.length&&this.getTreePath((function(){e.inputSelected=e.selected.slice(0)})):this.getNodeData((function(){e.inputSelected=e.selected.slice(0)}))},getForm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uniForms",t=this.$parent,a=t.$options.name;while(a!==e){if(t=t.$parent,!t)return!1;a=t.$options.name}return t},show:function(){var e=this;this.isOpened=!0,this.$nextTick((function(){e.$refs.pickerView.updateData({treeData:e._treeData,selected:e.selected,selectedIndex:e.selectedIndex})})),this.$emit("popupopened")},hide:function(){this.isOpened=!1,this.$emit("popupclosed")},handleInput:function(){this.readonly||this.show()},handleClose:function(e){this.hide()},onnodeclick:function(e){this.$emit("nodeclick",e)},ondatachange:function(e){this._treeData=this.$refs.pickerView._treeData},onchange:function(e){this.hide(),this.inputSelected=e,this._dispatchEvent(e)},_processReadonly:function(e,t){var a=e.findIndex((function(e){return e.children}));if(a>-1){if(Array.isArray(t)){var i=t[t.length-1];"object"===typeof i&&i.value&&(i=i.value)}this.inputSelected=this._findNodePath(inputValue,this.localdata)}else{for(var n=[],o=0;o<t.length;o++){var r=t[o],l=e.find((function(e){return e.value==r}));l&&n.push(l)}n.length&&(this.inputSelected=n)}},_filterForArray:function(e,t){for(var a=[],i=0;i<t.length;i++){var n=t[i],o=e.find((function(e){return e.value==n}));o&&a.push(o)}return a},_dispatchEvent:function(e){for(var t=new Array(e.length),a=0;a<e.length;a++)t[a]=e[a].value;var i=e[e.length-1];this.formItem&&this.formItem.setValue(i.value),this.$emit("input",i.value),this.$emit("update:modelValue",i.value),this.$emit("change",{detail:{value:e}})}}};t.default=r},"38f6":function(e,t,a){"use strict";var i=a("d7bb"),n=a.n(i);n.a},"3fe7":function(e,t,a){"use strict";a.r(t);var i=a("36e4"),n=a.n(i);for(var o in i)"default"!==o&&function(e){a.d(t,e,(function(){return i[e]}))}(o);t["default"]=n.a},"454e":function(e,t,a){"use strict";var i=a("4ea4");a("fb6a"),a("a434"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(a("2909")),o=i(a("046f")),r={name:"UniDataPickerView",emits:["nodeclick","change","datachange","update:modelValue"],mixins:[o.default],props:{managedMode:{type:Boolean,default:!1}},data:function(){return{}},created:function(){var e=this;this.managedMode||this.$nextTick((function(){e.load()}))},methods:{onPropsChange:function(){this._treeData=[],this.selectedIndex=0,this.load()},load:function(){var e=this;this.isLocaldata?this.loadData():this.dataValue.length&&this.getTreePath((function(t){e.loadData()}))},handleSelect:function(e){this.selectedIndex=e},handleNodeClick:function(e,t,a){var i=this;if(!e.disable){var o=this.dataList[t][a];o.value,o.text;if(t<this.selected.length-1?(this.selected.splice(t,this.selected.length-t),this.selected.push(o)):t===this.selected.length-1&&(this.selected[t]=o),o.isleaf)this.onSelectedChange(o,o.isleaf);else{var r=this._updateBindData(),l=r.isleaf,s=r.hasNodes;(this._isTreeView()||s)&&(!this.isLocaldata||s&&!l)?l||s?this.onSelectedChange(o,!1):this._loadNodeData((function(e){var t;e.length?((t=i._treeData).push.apply(t,(0,n.default)(e)),i._updateBindData(o)):o.isleaf=!0;i.onSelectedChange(o,o.isleaf)}),this._nodeWhere()):this.onSelectedChange(o,!0)}}},updateData:function(e){this._treeData=e.treeData,this.selected=e.selected,this._treeData.length?this._updateBindData():this.loadData()},onDataChange:function(){this.$emit("datachange")},onSelectedChange:function(e,t){t&&this._dispatchEvent(),e&&this.$emit("nodeclick",e)},_dispatchEvent:function(){this.$emit("change",this.selected.slice(0))}}};t.default=r},"50cf":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return i}));var i={uniLoadMore:a("8f9d").default},n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"uni-data-tree"},[a("v-uni-view",{staticClass:"uni-data-tree-input",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleInput.apply(void 0,arguments)}}},[e._t("default",[a("v-uni-view",{staticClass:"input-value",class:{"input-value-border":e.border}},[e.errorMessage?a("v-uni-text",{staticClass:"selected-area error-text"},[e._v(e._s(e.errorMessage))]):e.loading&&!e.isOpened?a("v-uni-view",{staticClass:"selected-area"},[a("uni-load-more",{staticClass:"load-more",attrs:{contentText:e.loadMore,status:"loading"}})],1):e.inputSelected.length?a("v-uni-scroll-view",{staticClass:"selected-area",attrs:{"scroll-x":"true"}},[a("v-uni-view",{staticClass:"selected-list"},e._l(e.inputSelected,(function(t,i){return a("v-uni-view",{key:i,staticClass:"selected-item"},[a("v-uni-text",[e._v(e._s(t.text))]),i<e.inputSelected.length-1?a("v-uni-text",{staticClass:"input-split-line"},[e._v(e._s(e.split))]):e._e()],1)})),1)],1):a("v-uni-text",{staticClass:"selected-area placeholder"},[e._v(e._s(e.placeholder))]),e.readonly?e._e():a("v-uni-view",{staticClass:"arrow-area"},[a("v-uni-view",{staticClass:"input-arrow"})],1)],1)],{options:e.options,data:e.inputSelected,error:e.errorMessage})],2),e.isOpened?a("v-uni-view",{staticClass:"uni-data-tree-cover",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleClose.apply(void 0,arguments)}}}):e._e(),e.isOpened?a("v-uni-view",{staticClass:"uni-data-tree-dialog"},[a("v-uni-view",{staticClass:"dialog-caption"},[a("v-uni-view",{staticClass:"title-area"},[a("v-uni-text",{staticClass:"dialog-title"},[e._v(e._s(e.popupTitle))])],1),a("v-uni-view",{staticClass:"dialog-close",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleClose.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"dialog-close-plus",attrs:{"data-id":"close"}}),a("v-uni-view",{staticClass:"dialog-close-plus dialog-close-rotate",attrs:{"data-id":"close"}})],1)],1),a("data-picker-view",{ref:"pickerView",staticClass:"picker-view",attrs:{localdata:e.localdata,preload:e.preload,collection:e.collection,field:e.field,orderby:e.orderby,where:e.where,"step-searh":e.stepSearh,"self-field":e.selfField,"parent-field":e.parentField,"managed-mode":!0},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.onchange.apply(void 0,arguments)},datachange:function(t){arguments[0]=t=e.$handleEvent(t),e.ondatachange.apply(void 0,arguments)},nodeclick:function(t){arguments[0]=t=e.$handleEvent(t),e.onnodeclick.apply(void 0,arguments)}},model:{value:e.dataValue,callback:function(t){e.dataValue=t},expression:"dataValue"}})],1):e._e()],1)},o=[]},"5ed4":function(e,t,a){var i=a("8d50");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("6514e78b",i,!0,{sourceMap:!1,shadowMode:!1})},7406:function(e,t,a){"use strict";var i=a("ba84"),n=a.n(i);n.a},7868:function(e,t,a){"use strict";(function(e){var i=a("4ea4");a("caad"),a("d3b7"),a("ac1f"),a("2532"),a("466d"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(a("5530")),o=a("1738"),r=e.database(),l=(r.command,"companies");function s(e){var t={};for(var a in o.validator)e.includes(a)&&(t[a]=o.validator[a]);return t}var d={data:function(){return{formData:{name:"",number:"",city:""},formOptions:{},rules:(0,n.default)({},s(["name","number","city"]))}},onReady:function(){this.$refs.form.setRules(this.rules)},methods:{onchange:function(e){console.log(e.detail.value[1].text),this.formData.city=e.detail.value[1].text.match(/(\S*)市/)[1]},onnodeclick:function(e){},submit:function(){var e=this;uni.showLoading({mask:!0}),this.$refs.form.submit().then((function(t){e.submitForm(t)})).catch((function(e){uni.hideLoading()}))},submitForm:function(e){var t=this;r.collection(l).add(e).then((function(e){uni.showToast({title:"新增成功"}),t.getOpenerEventChannel().emit("refreshData"),setTimeout((function(){return uni.navigateBack()}),500)})).catch((function(e){uni.showModal({content:e.message||"请求服务失败",showCancel:!1})})).finally((function(){uni.hideLoading()}))}}};t.default=d}).call(this,a("a9ff")["default"])},"8d50":function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,"",""]),e.exports=t},"8d70":function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".uni-data-pickerview[data-v-099c4236]{flex:1;\ndisplay:flex;\nflex-direction:column;overflow:hidden;height:100%}.error-text[data-v-099c4236]{color:#dd524d}.loading-cover[data-v-099c4236]{position:absolute;left:0;top:0;right:0;bottom:0;background-color:hsla(0,0%,100%,.5);\ndisplay:flex;\nflex-direction:column;align-items:center;z-index:1001}.load-more[data-v-099c4236]{\nmargin:auto\n}.error-message[data-v-099c4236]{background-color:#fff;position:absolute;left:0;top:0;right:0;bottom:0;padding:15px;opacity:.9;z-index:102}\n.selected-list[data-v-099c4236]{\ndisplay:flex;\nflex-direction:row;flex-wrap:nowrap;padding:0 5px;border-bottom:1px solid #f8f8f8}.selected-item[data-v-099c4236]{margin-left:10px;margin-right:10px;padding:12px 0;\nwhite-space:nowrap\n}.selected-item-active[data-v-099c4236]{border-bottom:2px solid #007aff}.selected-item-text[data-v-099c4236]{color:#007aff}.tab-c[data-v-099c4236]{position:relative;flex:1;\ndisplay:flex;\nflex-direction:row;overflow:hidden}.list[data-v-099c4236]{flex:1}.item[data-v-099c4236]{padding:12px 15px;border-bottom:1px solid #f0f0f0;\ndisplay:flex;\nflex-direction:row}.is-disabled[data-v-099c4236]{opacity:.5}.item-text[data-v-099c4236]{flex:1;color:#333}.check[data-v-099c4236]{margin-right:5px;border:2px solid #007aff;border-left:0;border-top:0;height:12px;width:6px;transform-origin:center;\ntransition:all .3s;\ntransform:rotate(45deg)}",""]),e.exports=t},"987a":function(e,t,a){"use strict";var i=a("5ed4"),n=a.n(i);n.a},a145:function(e,t,a){"use strict";a.r(t);var i=a("1e14"),n=a("1772");for(var o in n)"default"!==o&&function(e){a.d(t,e,(function(){return n[e]}))}(o);a("7406");var r,l=a("f0c5"),s=Object(l["a"])(n["default"],i["b"],i["c"],!1,null,"099c4236",null,!1,i["a"],r);t["default"]=s.exports},ba84:function(e,t,a){var i=a("8d70");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("7e275944",i,!0,{sourceMap:!1,shadowMode:!1})},c14f:function(e,t,a){"use strict";a.r(t);var i=a("50cf"),n=a("3fe7");for(var o in n)"default"!==o&&function(e){a.d(t,e,(function(){return n[e]}))}(o);a("38f6");var r,l=a("f0c5"),s=Object(l["a"])(n["default"],i["b"],i["c"],!1,null,"6c5f08e6",null,!1,i["a"],r);t["default"]=s.exports},c770:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return i}));var i={uniForms:a("c05f").default,uniFormsItem:a("1f79").default,uniEasyinput:a("79b5").default,uniDataPicker:a("c14f").default},n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"uni-container"},[a("uni-forms",{ref:"form",attrs:{value:e.formData,validateTrigger:"bind"}},[a("uni-forms-item",{attrs:{name:"name",label:"驾校名称"}},[a("uni-easyinput",{attrs:{placeholder:"驾校名称，不允许重复",trim:"both"},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),a("uni-forms-item",{attrs:{name:"number",label:"编号"}},[a("uni-easyinput",{attrs:{placeholder:"驾校的编号"},model:{value:e.formData.number,callback:function(t){e.$set(e.formData,"number",t)},expression:"formData.number"}})],1),a("uni-forms-item",{attrs:{name:"city",label:"城市"}},[a("uni-easyinput",{attrs:{disabled:!0,placeholder:"驾校的所在城市"},model:{value:e.formData.city,callback:function(t){e.$set(e.formData,"city",t)},expression:"formData.city"}}),a("uni-data-picker",{staticStyle:{"margin-top":"20px"},attrs:{placeholder:"请选择地址","popup-title":"请选择城市",collection:"opendb-city-china",field:"code as value, name as text",orderby:"value asc","step-searh":!0,"self-field":"code","parent-field":"parent_code"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.onchange.apply(void 0,arguments)},nodeclick:function(t){arguments[0]=t=e.$handleEvent(t),e.onnodeclick.apply(void 0,arguments)}}})],1),a("v-uni-view",{staticClass:"uni-button-group"},[a("v-uni-button",{staticClass:"uni-button",staticStyle:{width:"100px"},attrs:{type:"primary"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}},[e._v("提交")]),a("v-uni-navigator",{staticStyle:{"margin-left":"15px"},attrs:{"open-type":"navigateBack"}},[a("v-uni-button",{staticClass:"uni-button",staticStyle:{width:"100px"}},[e._v("返回")])],1)],1)],1)],1)},o=[]},d7bb:function(e,t,a){var i=a("09df");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("68148fdc",i,!0,{sourceMap:!1,shadowMode:!1})}}]);