| | |
| | | </el-dialog> |
| | | </el-container> |
| | | </el-container> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" :type="type" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </business-add> |
| | | </el-container> |
| | |
| | | name: "Business", |
| | | data() { |
| | | return { |
| | | type:"", |
| | | //生命周期对话框状态 |
| | | packageLifeBox: false, |
| | | //版本规则状态 |
| | |
| | | businessAdd() { |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.$refs.btmAdd.btmType = {}; |
| | | this.type = 'add'; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | businessEdit() { |
| | |
| | | const json = JSON.stringify(this.obj); |
| | | this.$refs.btmAdd.btmType = JSON.parse(json); |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.type = 'edit' |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | ifRefreshBtmAddRefresh() { |
| | |
| | | <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm" |
| | | :rules="rules" @resetFields="resetForm" status-icon="true"> |
| | | <el-form-item label="英文名称" label-width="100px" required="true" prop="id"> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="Object.keys(this.btmType).length !== 0 "></el-input> |
| | | <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="type !== 'add'"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="中文名称" label-width="100px"> |
| | | <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input> |
| | |
| | | }, |
| | | icons: { |
| | | type: Array |
| | | }, |
| | | type: { |
| | | type:String, |
| | | } |
| | | }, |
| | | watch: { |
| | | btmType: { |
| | | type: { |
| | | handler(newval, oldval) { |
| | | // console.log('监听', newval, oldval) |
| | | // console.log('监听', newval) |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons" |
| | | <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons" :linkStatus="linkStatus" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </link-type-add> |
| | | |
| | |
| | | name: "LinkType", |
| | | data() { |
| | | return { |
| | | linkStatus:'', |
| | | addOption: { |
| | | linkType: { |
| | | attributes:[] |
| | |
| | | // 添加按钮点击事件 |
| | | linkTypeAdd() { |
| | | this.$refs.linkAdd.linkType = {}; |
| | | this.linkStatus = 'add'; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // 编辑按钮点击事件 |
| | |
| | | var json = JSON.stringify(linktype); |
| | | this.addOption.linkType = JSON.parse(json); |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.linkStatus = 'edit'; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | }, |
| | | // 从已有中获取按钮点击事件 |
| | |
| | | <el-form ref="form" :model="linkType" :rules="rules" class="linkTypeForm" inline label-suffix=":" |
| | | show-message="true" size="medium" status-icon="true" @resetFields="resetForm"> |
| | | <el-form-item label="英文名称" label-width="100px" prop="id" required="true"> |
| | | <el-input v-model="linkType.id" :disabled="this.linkType.hasOwnProperty('id')" :prefix-icon="icons.id" maxlength="15" show-word-limit |
| | | <el-input v-model="linkType.id" :disabled="linkStatus !== 'add'" :prefix-icon="icons.id" maxlength="15" show-word-limit |
| | | type="text"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="中文名称" label-width="100px"> |
| | |
| | | }, |
| | | icons: { |
| | | type: Array |
| | | }, |
| | | linkStatus: { |
| | | type:String |
| | | } |
| | | }, |
| | | watch: { |