| | |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | export const remove = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-omd/attribute/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | oid, |
| | | } |
| | | }) |
| | | } |
| | |
| | | <el-button-group> |
| | | <el-button type="primary" @click="businessAdd" size="small"> <i class="el-icon-plus"></i> 新增</el-button> |
| | | <el-button type="primary" @click="businessEdit" size="small"><i class="el-icon-edit"></i> 修改</el-button> |
| | | <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i> 从已有中获取</el-button> |
| | | <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i> |
| | | 从已有中获取</el-button> |
| | | </el-button-group> |
| | | </el-header> |
| | | <el-container> |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">基本信息</p> |
| | | <el-descriptions class="margin-top" :column="3" :size="size" border> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.key"></i> |
| | | 英文名称 |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | 中文名称 |
| | |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label" :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label" :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <i :class="icons.tableName"></i> |
| | | 数据库表名 |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | 所属领域 |
| | | </template> |
| | | <el-tag size="small"> |
| | | {{ obj.domainText }} |
| | | </el-tag> |
| | | <el-tag size="small"> |
| | | {{ obj.domainText }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <!-- <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | </template> |
| | | {{ obj.sss }} |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.revisionRule"></i> |
| | | 版本规则 |
| | | </template> |
| | | {{ obj.versionRule }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.lifeCycle"></i> |
| | | 生命周期 |
| | | </template> |
| | | {{ obj.lifeCycleId }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.view"></i> |
| | | 视图 |
| | | </template> |
| | | <el-tag size="small"> |
| | | <el-tag size="small"> |
| | | {{ obj.viewText }} |
| | | </el-tag> |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <!-- <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | </template> |
| | | {{ obj.implClass }} |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | 描述 |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">属性列表</p> |
| | | <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"> |
| | | <template slot="attrDataTypeText" slot-scope="{row}" > |
| | | <el-tag>{{row.attrDataTypeText}}</el-tag> |
| | | </template> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | |
| | | <div class="sep" style="height:7px"> |
| | | |
| | | </div> |
| | | <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange"> |
| | | <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" |
| | | @selection-change="selectionChange"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandelfalse">取 消</el-button> |
| | |
| | | </el-dialog> |
| | | </el-container> |
| | | </el-container> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" @refreshTable="initTreeOnLoad"> |
| | | </business-add> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </business-add> |
| | | </el-container> |
| | | </template> |
| | | <script> |
| | |
| | | children: 'childList', |
| | | } |
| | | }, |
| | | addOption:{ |
| | | btmType:{}, |
| | | addOption: { |
| | | btmType: {}, |
| | | }, |
| | | loadOption: { |
| | | border: true, |
| | |
| | | addBtn: false, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | | refreshBtn:false, |
| | | columnBtn:false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | column: [ |
| | | { |
| | | label: '英文名称', |
| | |
| | | ] |
| | | }, |
| | | descriptionOption: { |
| | | labelStyle:'text-align:center;width:120px', |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons:{ |
| | | icons: { |
| | | key: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | tableName: 'el-icon-date', |
| | |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | if (data.oid) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }else{ |
| | | this.$message.warning('请点击子节点'); |
| | | } |
| | | }, |
| | | // 基本信息添加 |
| | | basicSave(row, done, loading) { |
| | |
| | | this.initTreeOnLoad(); |
| | | }) |
| | | }, |
| | | businessAdd(){ |
| | | businessAdd() { |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | businessEdit(){ |
| | | businessEdit() { |
| | | var json = JSON.stringify(this.obj); |
| | | this.$refs.btmAdd.btmType = JSON.parse(json); |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | ifRefreshBtmAddRefresh(){ |
| | | ifRefreshBtmAddRefresh() { |
| | | // this.$refs.btmAdd.refreshAttrTable(); |
| | | } |
| | | }, |
| | |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | .businessCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | |
| | | .attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .businessTreeContainer > .el-card > .el-card__body { |
| | | |
| | | .businessTreeContainer>.el-card>.el-card__body { |
| | | height: 775px; |
| | | } |
| | | </style> |
| | | }</style> |
| | |
| | | this.addOption.linkType = JSON.parse(json); |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | console.log(this.obj); |
| | | }, |
| | | // 从已有中获取按钮点击事件 |
| | | selectFromTable() { |
| | |
| | | searchMenuSpan:5, |
| | | highlightCurrentRow: true, |
| | | stripe:true, |
| | | viewBtn:false, |
| | | columnBtn:false, |
| | | column:[ |
| | | { |
| | | label: '', |
| | | label: '选择', |
| | | prop: 'radio', |
| | | width: 120 |
| | | width: 120, |
| | | display:false |
| | | }, |
| | | { |
| | | label:'英文名称', |
| | | prop: 'id' |
| | | prop: 'id', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '英文名称不能为空', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label:"中文名称", |
| | | prop:"name", |
| | | search:true, |
| | | required: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '中文名称不能为空', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label:"跳跃字符", |
| | |
| | | }, |
| | | { |
| | | label: "初始值", |
| | | prop:"startCode" |
| | | prop:"startCode", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '初始值不能为空', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "步长", |
| | | prop: "serialStep" |
| | | prop: "serialStep", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '步长不能为空', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "前缀", |
| | |
| | | }) |
| | | }, |
| | | searchChange(params, done) { |
| | | if (done) done(); |
| | | this.params = params; |
| | | this.page.currentPage = 1; |
| | | this.getList(); |
| | | this.$message.success('搜索成功') |
| | | var p = {"name_like" : params.name} |
| | | getPage(this.page.currentPage,this.page.pageSize,p).then(res => { |
| | | const data = res.data.data |
| | | this.loading = false; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | }); |
| | | if (done) { |
| | | done(); |
| | | } |
| | | }, |
| | | refreshChange() { |
| | | this.getList(); |
| | |
| | | <el-radio v-model="selectRow" :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | <template slot="menu"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave">编辑</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">删除</el-button> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)">编辑</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave(row,index)">删除</el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">新 增 |
| | | </el-button> |
| | | <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">查看使用范围 |
| | | </el-button> |
| | | <el-input placeholder="按属性英文名称查询" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch" |
| | | size="small" @change="doSearch" type="text"></el-input> |
| | | <el-button size="small" plain type="primary" icon="el-icon-search" @click="doSearch"> 搜索</el-button> |
| | | </template> |
| | | <template slot="typeValue" slot-scope="{row}"> |
| | | <el-tag>{{ row.typeValue }}</el-tag> |
| | |
| | | </el-tabs> |
| | | </basic-container> |
| | | </el-aside> |
| | | <originalAdd ref="originalAdd" :attribute="attribute" @refreshTable="refreshChange"></originalAdd> |
| | | <originalAdd ref="originalAdd" @refreshTable="refreshChange"></originalAdd> |
| | | </el-container> |
| | | </template> |
| | | |
| | |
| | | attribute: { |
| | | nullable: true |
| | | }, |
| | | editAttibute: {}, |
| | | applyRangeData: [], |
| | | option: { |
| | | height: "550px", |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | columnBtn:false, |
| | | column: [{ |
| | | label: "选择", |
| | | prop: "radio", |
| | |
| | | itemData: {}, |
| | | activeName: "referTab", |
| | | form: {} |
| | | } |
| | | }, |
| | | searchId: '', |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.$refs.originalAdd.attribute = {}; |
| | | }, |
| | | updateSave() { |
| | | updateSave(row,index) { |
| | | this.selectRow = index; |
| | | var json = JSON.stringify(row); |
| | | this.editAttibute = JSON.parse(json); |
| | | this.editAttibute.nullable = row.nullable == 'true' ? true : false; |
| | | this.$refs.originalAdd.attribute = this.editAttibute; |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.$refs.originalAdd.attribute = this.attribute; |
| | | this.refreshChange() |
| | | }, |
| | | deleteSave() { |
| | | remove(this.itemForm.itemData).then(res => { |
| | | deleteSave(row,index) { |
| | | console.log(row); |
| | | remove(row.oid).then(res => { |
| | | this.$message.success("删除成功"); |
| | | }); |
| | | this.refreshChange(); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | |
| | | |
| | | }); |
| | | }, |
| | | doSearch(){ |
| | | var params = {"id_like":this.searchId}; |
| | | this.onLoad(this.page,params); |
| | | } |
| | | }, |
| | | components: { Versionpackage } |
| | | } |
| | |
| | | .applyRangeTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .attrSearch { |
| | | width:201px; |
| | | } |
| | | .attrSearch > .el-input__inner { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | |
| | | <el-switch v-model="attribute.nullable" active-text="允许" inactive-text="不允许"></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="长度" label-width="100px" prop="maxLength"> |
| | | <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" controls-position="right"></el-input-number> |
| | | <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" |
| | | controls-position="right"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="精度" label-width="100px" v-if="attribute.typeValue == 'VTDouble'"> |
| | | <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" @change="changeNumber"></el-input-number> |
| | | <el-form-item label="精度" label-width="100px" v-if="attribute.typeKey == 'VTDouble'"> |
| | | <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" |
| | | @change="changeNumber"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="描述" label-width="100px"> |
| | | <el-input v-model="attribute.description" type="text"></el-input> |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="枚举项" label-width="100px"> |
| | | |
| | | |
| | | </el-form-item> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> |
| | | <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> |
| | | <div style="height:20px;"></div> |
| | | <avue-tree id="domain" :data="domain.data" :option="domain.treeOption" @node-click="nodeClick" |
| | | class="businessTree" style="height: 418px"> |
| | |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" @row-click="btmReferClick"> |
| | | <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" |
| | | @row-click="btmReferClick"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="btmRefer.selectRow" :label="row.$index"> |
| | | </el-radio> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 选择枚举时的弹窗 --> |
| | | <el-dialog title="枚举列表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" |
| | | <el-dialog title="枚举列表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" |
| | | style="height: 115vh;"> |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" |
| | | @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="enumRefer.selectRow" :label="row.$index"> |
| | | </el-radio> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDictionary,getParentList } from '@/api/omd/enum' |
| | | import { initTree,btmPage } from '@/api/omd/btmType' |
| | | import { add} from '@/api/omd/OmdAttribute' |
| | | import { getDictionary, getParentList } from '@/api/omd/enum' |
| | | import { initTree, btmPage } from '@/api/omd/btmType' |
| | | import { add } from '@/api/omd/OmdAttribute' |
| | | export default { |
| | | name: 'originalAdd', |
| | | props: { |
| | |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | }, |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }, { |
| | | label: '中文名称', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }] |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | }, |
| | | { |
| | | label: '英文名称', |
| | | prop: 'id', |
| | | align: 'center', |
| | | searchSpan: 8, |
| | | search: true, |
| | | }, { |
| | | label: '中文名称', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan: 8, |
| | | search: true, |
| | | }] |
| | | }, |
| | | // 参照页面表格数据 |
| | | data: [], |
| | |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | }, { |
| | | label: '枚举代号', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | searchSpan: 8, |
| | | search: true, |
| | | }, { |
| | | label: '枚举名称', |
| | | prop: 'label', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | searchSpan: 8, |
| | | search: true, |
| | | }] |
| | | }, |
| | |
| | | this.referToFlag = true; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | submitAttribute() { |
| | | add(this.attribute).then(res => { |
| | | this.$message.success("保存成功"); |
| | | this.showSubmitDialog = false; |
| | | this.attribute = {}; |
| | | this.$emit('refreshTable'); |
| | | }); |
| | | |
| | | submitAttribute() { |
| | | const that = this; |
| | | this.$refs.form.validate(function (pass, field) { |
| | | if (pass) { |
| | | add(that.attribute).then(res => { |
| | | that.$message.success("保存成功"); |
| | | that.showSubmitDialog = false; |
| | | that.attribute = {}; |
| | | that.$emit('refreshTable'); |
| | | }); |
| | | } else { |
| | | that.$message.error('必填'); |
| | | } |
| | | }) |
| | | }, |
| | | cancleSubmit() { |
| | | this.closeSubmitDialog(); |
| | | }, |
| | | closeEnumDialog() { |
| | | this.cancleEnum(); |
| | | }, |
| | | closeReferDialog() { |
| | | }, |
| | | closeReferDialog() { |
| | | this.cancleBtm(); |
| | | }, |
| | | confirmBtm() { |
| | | confirmBtm() { |
| | | this.attribute.referToId = this.btmRefer.selectItem.oid; |
| | | this.attribute.referToName = this.btmRefer.selectItem.name; |
| | | this.btmRefer.show = false; |
| | | }, |
| | | cancleBtm() { |
| | | cancleBtm() { |
| | | this.btmRefer.selectItem = {}; |
| | | this.btmRefer.show = false; |
| | | this.btmRefer.selectRow = ''; |
| | |
| | | this.attribute.dictCode = this.enumRefer.selectItem.name; |
| | | this.attribute.dictValue = this.enumRefer.selectItem.label; |
| | | this.enumRefer.show = false; |
| | | }, |
| | | cancleEnum() { |
| | | }, |
| | | cancleEnum() { |
| | | this.enumRefer.selectItem = {}; |
| | | this.enumRefer.show = false; |
| | | this.enumRefer.selectRow = ''; |
| | |
| | | // 参照类型树的点击事件 |
| | | nodeClick(data) { |
| | | // 区分业务类型的查询和链接类型的查询 |
| | | if(this.attribute.referTypeKey == 'btmType'){ |
| | | btmPage(this.btmRefer.btmPage.currentPage,this.btmRefer.btmPage.pageSize,{domain:data.id}).then(res => { |
| | | if (this.attribute.referTypeKey == 'btmType') { |
| | | btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { domain: data.id }).then(res => { |
| | | this.btmRefer.data = res.data.data.records; |
| | | this.btmRefer.btmPage.total = res.data.data.total; |
| | | }) |
| | | } |
| | | if(this.attribute.referTypeKey == 'linkType'){ |
| | | if (this.attribute.referTypeKey == 'linkType') { |
| | | |
| | | } |
| | | }, |
| | | // 枚举类型输入框获得焦点时的事件 |
| | | openEnumConfig() { |
| | | getParentList(this.enumRefer.enumPage.currentPage,this.enumRefer.enumPage.pageSize).then(res => { |
| | | getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => { |
| | | this.enumRefer.enumPage.total = res.data.data.total; |
| | | this.enumRefer.data = res.data.data.records; |
| | | }) |
| | |
| | | // 属性类型下拉框选择事件 |
| | | typeSelectChange(value) { |
| | | if (value == 'VTString') { |
| | | this.$set(this.attribute,"maxLength",150) |
| | | this.$set(this.attribute, "maxLength", 150) |
| | | } else if (value == 'VTInteger') { |
| | | this.$set(this.attribute,"maxLength",50) |
| | | this.$set(this.attribute, "maxLength", 50) |
| | | } else if (value == 'VTBoolean') { |
| | | this.$set(this.attribute,"maxLength",5) |
| | | this.$set(this.attribute, "maxLength", 5) |
| | | } else if (value == 'VTDouble') { |
| | | this.$set(this.attribute,"maxLength",26) |
| | | this.$set(this.attribute,"precision",8) |
| | | this.$set(this.attribute, "maxLength", 26) |
| | | this.$set(this.attribute, "precision", 8) |
| | | } else if (value == 'VTLong') { |
| | | this.$set(this.attribute,"maxLength",150) |
| | | this.$set(this.attribute, "maxLength", 150) |
| | | } else if (value == 'VTDate' || value == 'VTTime' || value == 'VTDateTime') { |
| | | this.$set(this.attribute,"maxLength",6) |
| | | this.$set(this.attribute, "maxLength", 6) |
| | | } else { |
| | | this.$set(this.attribute,"maxLength",50) |
| | | this.$set(this.attribute, "maxLength", 50) |
| | | } |
| | | this.attribute.typeCode = 'attributeType'; |
| | | this.attribute.typeKey = value; |
| | |
| | | this.$message.error('属性类型没找到或者未定义') |
| | | }) |
| | | }, |
| | | initAttributeReferTypeList(){ |
| | | initAttributeReferTypeList() { |
| | | getDictionary({ code: 'attributeReferType' }).then(res => { |
| | | res.data.data.forEach(element => { |
| | | this.btmRefer.referTypeList.push( |
| | |
| | | this.$message.error('参照类型没找到或者未定义') |
| | | }) |
| | | }, |
| | | btmReferClick(row){ |
| | | btmReferClick(row) { |
| | | this.btmRefer.selectItem = row; |
| | | this.btmRefer.selectRow = row.$index; |
| | | }, |
| | | enumReferClick(row){ |
| | | enumReferClick(row) { |
| | | this.enumRefer.selectItem = row; |
| | | this.enumRefer.selectRow = row.$index; |
| | | }, |
| | | // 参照名称点击清除数据 |
| | | clearReferTo(){ |
| | | this.$delete(this.attribute,'referToId'); |
| | | this.$delete(this.attribute,'referToName'); |
| | | clearReferTo() { |
| | | this.$delete(this.attribute, 'referToId'); |
| | | this.$delete(this.attribute, 'referToName'); |
| | | this.btmRefer.selectItem = {}; |
| | | this.btmRefer.selectRow = ''; |
| | | }, |
| | | handleClick(tab){ |
| | | // 因为只能参照和枚举二选一。所以在切换的时候把属性给清空。 |
| | | this.$delete(this.attribute,'referTypeCode'); |
| | | this.$delete(this.attribute,'referTypeKey'); |
| | | this.$delete(this.attribute,'referTypeValue'); |
| | | this.$delete(this.attribute,'referToId'); |
| | | this.$delete(this.attribute,'referToName'); |
| | | this.$delete(this.attribute,'dictCode'); |
| | | this.$delete(this.attribute,'dictKey'); |
| | | this.$delete(this.attribute,'dictValue'); |
| | | this.$delete(this.attribute,'usingDict'); |
| | | } |
| | | // handleClick(tab){ |
| | | // // 因为只能参照和枚举二选一。所以在切换的时候把属性给清空。 |
| | | // this.$delete(this.attribute,'referTypeCode'); |
| | | // this.$delete(this.attribute,'referTypeKey'); |
| | | // this.$delete(this.attribute,'referTypeValue'); |
| | | // this.$delete(this.attribute,'referToId'); |
| | | // this.$delete(this.attribute,'referToName'); |
| | | // this.$delete(this.attribute,'dictCode'); |
| | | // this.$delete(this.attribute,'dictKey'); |
| | | // this.$delete(this.attribute,'dictValue'); |
| | | // this.$delete(this.attribute,'usingDict'); |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | width: 200px; |
| | | } |
| | | |
| | | .attributeForm>.el-form-item>.el-form-item__content> .el-select>.el-input>.el-input__inner { |
| | | .attributeForm>.el-form-item>.el-form-item__content>.el-select>.el-input>.el-input__inner { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | | }</style> |
| | |
| | | stripe:true, |
| | | column:[ |
| | | { |
| | | label: '', |
| | | label: '选择', |
| | | prop: 'radio', |
| | | width: 120 |
| | | width: 120, |
| | | display: false |
| | | }, |
| | | { |
| | | label:'英文名称', |
| | | prop: 'id', |
| | | search: true |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: '英文名称不能为空', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | { |
| | | label:'中文名称', |
| | | prop:'name', |
| | | search:true, |
| | | rules: [{ |
| | | required: true, |
| | | message: '中文名称不能为空', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | { |
| | | label: '描述', |
| | |
| | | }) |
| | | }, |
| | | searchChange(params, done) { |
| | | if (done) done(); |
| | | this.params = params; |
| | | this.loading = true; |
| | | this.page.currentPage = 1; |
| | | this.getList(); |
| | | const p = {}; |
| | | if(params.id){ |
| | | p["id_like"] = params.id; |
| | | } |
| | | if(params.name){ |
| | | p["name_like"] = params.name |
| | | } |
| | | getPage(this.page.currentPage,this.page.pageSize,p).then(res => { |
| | | const data = res.data.data |
| | | this.loading = false; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | done(); |
| | | }) |
| | | this.$message.success('搜索成功') |
| | | }, |
| | | refreshChange() { |