"use strict";(self.webpackChunkmy_package_ext=self.webpackChunkmy_package_ext||[]).push([[3074],{83074:function(t,n,i){i.r(n),i.d(n,{default:function(){return o}});var e=i(13974),o=(n={props:{data:null,inputValue:null},data:function(){return{inputComponentVisible:!1,inputComponent:null,inputComponentProp:null,inputEntityModel:null}},watch:{data:function(t){t?this.init():this.cancelInputDialog()}},methods:{init:function(){var t=this.data.cell.config.datasource;this.inputComponent=this.data.cell.config.controlType,this.inputComponentProp={settings:t},this.inputComponentVisible=!0},cancelInputDialog:function(){this.inputComponentVisible=!1,this.inputComponent=null,this.inputValue=null,this.inputEntityModel=null},getLabel:function(){var t=(0,e.get)(this.inputComponentProp,"settings.type");return"dict"!==t&&"entity"===t?(0,e.get)(this.inputEntityModel,this.inputComponentProp.settings.labelField,this.inputValue):(0,e.get)(this.inputEntityModel,"name",null)},saveInputDialog:function(){this.$emit("save",this.data.cell.rowIndex,this.data.cell.columnIndex,this.inputValue,this.getLabel()),this.$emit("update:data",null)}}},(0,i(51900).Z)(n,(function(){var t=this,n=t._self._c;return n("el-dialog",{attrs:{modal:!1,width:"600px",visible:t.inputComponentVisible},on:{"update:visible":function(n){t.inputComponentVisible=n}}},[t.inputComponent?n(t.inputComponent,t._b({tag:"component",staticStyle:{width:"430px"},attrs:{entityModel:t.inputEntityModel},on:{"update:entityModel":function(n){t.inputEntityModel=n},"update:entity-model":function(n){t.inputEntityModel=n}},model:{value:t.inputValue,callback:function(n){t.inputValue=n},expression:"inputValue"}},"component",t.inputComponentProp,!1)):t._e(),t._v(" "),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.cancelInputDialog}},[t._v("取消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.saveInputDialog}},[t._v("确定")])],1)],1)}),[],!1,null,null,null).exports)}}]);