var $url="/common/tableStyle/layerAddMultiple",data=utils.init({tableName:utils.getQueryString("tableName"),relatedIdentities:utils.getQueryString("relatedIdentities"),excludes:utils.getQueryStringList("excludes"),inputTypes:null,form:{styles:[]}}),methods={apiGet:function(){var t=this;utils.loading(this,!0),$api.get($url,{params:{tableName:this.tableName,relatedIdentities:this.relatedIdentities}}).then(function(e){var i=e.data;t.inputTypes=i.inputTypes.filter(function(e){return-1==t.excludes.indexOf(e.key)}),t.form.styles=i.styles}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},apiSubmit:function(){var t=this;utils.loading(this,!0),$api.post($url,{tableName:this.tableName,relatedIdentities:this.relatedIdentities,styles:this.form.styles}).then(function(t){t.data;utils.closeLayer(),parent.$vue.runTableStyleLayerAddMultiple&&parent.$vue.runTableStyleLayerAddMultiple()}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},btnSubmitClick(){var t=this;this.$refs.form.validate(function(e){e&&t.apiSubmit()})},btnCancelClick:function(){utils.closeLayer()},btnStyleRemoveClick:function(t){this.form.styles.splice(t,1),0===this.form.styles.length&&this.btnStyleAddClick()},btnStyleAddClick:function(){this.form.styles.push({attributeName:"",displayName:"",inputType:"Text"})}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});