(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-system-tag-edit"],{4757:function(t,a,n){"use strict";n.r(a);var e=n("e41b"),i=n("e546");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(a,t,(function(){return i[t]}))}(o);n("50a7");var r=n("828b"),u=Object(r["a"])(i["default"],e["b"],e["c"],!1,null,"1b3fe2af",null,!1,e["a"],void 0);a["default"]=u.exports},"50a7":function(t,a,n){"use strict";var e=n("9b9f"),i=n.n(e);i.a},"9b9f":function(t,a,n){var e=n("f541");e.__esModule&&(e=e.default),"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var i=n("967d").default;i("9fc13010",e,!0,{sourceMap:!1,shadowMode:!1})},e41b:function(t,a,n){"use strict";n.d(a,"b",(function(){return i})),n.d(a,"c",(function(){return o})),n.d(a,"a",(function(){return e}));var e={uniForms:n("b689").default,uniFormsItem:n("1898").default,uniEasyinput:n("4154").default},i=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("v-uni-view",{staticClass:"uni-container"},[n("uni-forms",{ref:"form",attrs:{value:t.formData,validateTrigger:"bind"}},[n("uni-forms-item",{attrs:{name:"tagid",label:"标签的tagid",required:!0}},[n("uni-easyinput",{attrs:{disabled:!0,placeholder:"标签tagid"},model:{value:t.formData.tagid,callback:function(a){t.$set(t.formData,"tagid",a)},expression:"formData.tagid"}})],1),n("uni-forms-item",{attrs:{name:"name",label:"标签名称",required:!0}},[n("uni-easyinput",{attrs:{placeholder:"标签名称"},model:{value:t.formData.name,callback:function(a){t.$set(t.formData,"name",a)},expression:"formData.name"}})],1),n("uni-forms-item",{attrs:{name:"description",label:"标签描述"}},[n("v-uni-textarea",{staticClass:"uni-textarea-border",attrs:{placeholder:"标签描述"},on:{input:function(a){arguments[0]=a=t.$handleEvent(a),t.binddata("description",a.detail.value)}},model:{value:t.formData.description,callback:function(a){t.$set(t.formData,"description",a)},expression:"formData.description"}})],1),n("v-uni-view",{staticClass:"uni-button-group"},[n("v-uni-button",{staticClass:"uni-button",staticStyle:{width:"100px"},attrs:{type:"primary"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.submit.apply(void 0,arguments)}}},[t._v("提交")]),n("v-uni-navigator",{staticStyle:{"margin-left":"15px"},attrs:{"open-type":"navigateBack"}},[n("v-uni-button",{staticClass:"uni-button",staticStyle:{width:"100px"}},[t._v("返回")])],1)],1)],1)],1)},o=[]},e546:function(t,a,n){"use strict";n.r(a);var e=n("f784"),i=n.n(e);for(var o in e)["default"].indexOf(o)<0&&function(t){n.d(a,t,(function(){return e[t]}))}(o);a["default"]=i.a},f541:function(t,a,n){var e=n("c86c");a=e(!1),a.push([t.i,"[data-v-1b3fe2af] .uni-forms-item__label{width:90px!important}",""]),t.exports=a},f784:function(t,a,n){"use strict";(function(t){n("6a54");var e=n("f5bd").default;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var i=e(n("9b1b"));n("4626"),n("5ac7"),n("dc8a"),n("bf0f");var o=n("3931"),r=t.database();r.command;function u(t){var a={};for(var n in o.validator)t.includes(n)&&(a[n]=o.validator[n]);return a}var s={data:function(){var t={tagid:"",name:"",description:""};return{formData:t,formOptions:{},rules:(0,i.default)({},u(Object.keys(t)))}},onLoad:function(t){if(t.id){var a=t.id;this.formDataId=a,this.getDetail(a)}},onReady:function(){this.$refs.form.setRules(this.rules)},methods:{submit:function(){var t=this;uni.showLoading({mask:!0}),this.$refs.form.validate().then((function(a){return t.submitForm(a)})).catch((function(){})).finally((function(){uni.hideLoading()}))},submitForm:function(t){var a=this;return r.collection("uni-id-tag").doc(this.formDataId).update(t).then((function(t){uni.showToast({title:"修改成功"}),a.getOpenerEventChannel().emit("refreshData"),setTimeout((function(){return uni.navigateBack()}),500)})).catch((function(t){uni.showModal({content:t.message||"请求服务失败",showCancel:!1})}))},getDetail:function(t){var a=this;uni.showLoading({mask:!0}),r.collection("uni-id-tag").doc(t).field("tagid,name,description").get().then((function(t){var n=t.result.data[0];n&&(a.formData=n)})).catch((function(t){uni.showModal({content:t.message||"请求服务失败",showCancel:!1})})).finally((function(){uni.hideLoading()}))}}};a.default=s}).call(this,n("861b")["default"])}}]);