| | |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | typeAContent:{ |
| | | handler(newV,oldV){ |
| | | if(oldV!=newV && !verifyNull(newV)){ |
| | | this.initUI(); |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | |
| | | typeAContent(){ |
| | | return this.btmType+this.content; |
| | | } |
| | | }, |
| | | created() { |
| | | if (verifyNull(this.btmType) || verifyNull(this.content) ) { |
| | | this.$message.error("自定义组件配置的信息错误,请参考bs=name?type=xxx&context=yyy¶m=zzz这种形式。其中type是业务类型(或链接类型),context是UI上下文的名称,name为组件名称,空值时默认展示UI引擎"); |
| | | return false; |
| | | } |
| | | this.initUI(); |
| | | this.initContent(); |
| | | }, |
| | | methods: { |
| | | initUI() { |
| | | const query = {btmType: 'folder', id: 'cardtemplatemanager'} |
| | | getUIContent(query).then(res => { |
| | | getUIContent({btmType: this.btmType, id: this.content}).then(res => { |
| | | console.log(res.data.obj) |
| | | this.uiDefineVO = res.data.obj; |
| | | this.initContent(); |
| | | }) |
| | | }, |
| | | initContent() { |