From 54e14bff397221b5b0d64720f77217f4d34ebf98 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 14 七月 2023 09:50:53 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/views/modeling/Business.vue | 125 ++++++++++++++++++++++++----------------- 1 files changed, 73 insertions(+), 52 deletions(-) diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue index 7b12feb..6dd1b28 100644 --- a/Source/UBCS-WEB/src/views/modeling/Business.vue +++ b/Source/UBCS-WEB/src/views/modeling/Business.vue @@ -4,7 +4,8 @@ <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> @@ -14,7 +15,7 @@ <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick" class="businessTree"> <span class="el-tree-node__label" slot-scope="{ node, data }"> <span> - <i class="el-icon-star-on"></i> + <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i> {{ (node || {}).label }} </span> </span> @@ -27,14 +28,16 @@ <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> 涓枃鍚嶇О @@ -42,20 +45,22 @@ {{ 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"> @@ -71,28 +76,31 @@ </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 }} + {{ obj.revisionRuleName ? obj.revisionRuleName+ '(' + obj.revisionRuleId + ')' : ''}} </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 }} + {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + 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"> @@ -101,7 +109,8 @@ </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> 鎻忚堪 @@ -114,9 +123,9 @@ <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> @@ -129,7 +138,8 @@ <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> @@ -138,8 +148,9 @@ </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> @@ -165,6 +176,7 @@ defaultExpandAll: true, title: '涓氬姟绫诲瀷鏍�', addBtn: false, + menu:false, props: { labelText: '', label: 'label', @@ -172,8 +184,8 @@ children: 'childList', } }, - addOption:{ - btmType:{}, + addOption: { + btmType: {}, }, loadOption: { border: true, @@ -182,8 +194,8 @@ addBtn: false, menu: false, highlightCurrentRow: true, - refreshBtn:false, - columnBtn:false, + refreshBtn: false, + columnBtn: false, column: [ { label: '鑻辨枃鍚嶇О', @@ -213,12 +225,12 @@ ] }, 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', @@ -226,7 +238,8 @@ revisionRule: 'el-icon-s-check', lifeCycle: 'el-icon-refresh-right', view: 'el-icon-view', - desc: 'el-icon-chat-line-square' + desc: 'el-icon-chat-line-square', + referType: 'el-icon-search' }, ref: { // 浠庤〃涓�夋嫨dialog鐘舵�� @@ -258,10 +271,7 @@ } ] }, - data: [{ - tableName: '1', - description: '2' - }] + data: [], } } }, @@ -270,10 +280,14 @@ this.initDomainOption(); }, methods: { - nodeClick(data) { - getDetail(data.oid).then(res => { - this.obj = res.data.data; - }) + nodeClick(data,node,leaf) { + if (data.oid) { + getDetail(data.oid).then(res => { + this.obj = res.data.data; + }) + }else{ + this.$message.warning('璇风偣鍑诲瓙鑺傜偣'); + } }, // 鍩烘湰淇℃伅娣诲姞 basicSave(row, done, loading) { @@ -333,16 +347,22 @@ this.initTreeOnLoad(); }) }, - businessAdd(){ + businessAdd() { + this.$refs.btmAdd.showSubmitDialog = true; + this.$refs.btmAdd.btmType = {}; + this.ifRefreshBtmAddRefresh(); + }, + businessEdit() { + if (!this.obj.oid){ + this.$message.warning("璇烽�夋嫨涓�鏉″彾瀛愯妭鐐圭殑涓氬姟绫诲瀷"); + return; + } + const json = JSON.stringify(this.obj); + this.$refs.btmAdd.btmType =JSON.parse(json); this.$refs.btmAdd.showSubmitDialog = true; this.ifRefreshBtmAddRefresh(); }, - businessEdit(){ - this.$refs.btmAdd.btmType = this.obj; - this.$refs.btmAdd.showSubmitDialog = true; - this.ifRefreshBtmAddRefresh(); - }, - ifRefreshBtmAddRefresh(){ + ifRefreshBtmAddRefresh() { // this.$refs.btmAdd.refreshAttrTable(); } }, @@ -355,13 +375,14 @@ 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> -- Gitblit v1.9.3