From db78e86024c5cc3928bdd837e148204d59bd4fbb Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期四, 07 十一月 2024 12:10:13 +0800 Subject: [PATCH] 业务类型和链接类型添加修改调整 --- Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue | 434 +++++++++++++++++++++++++---------------------------- 1 files changed, 205 insertions(+), 229 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue index f4a8835..4e45eca 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue @@ -29,125 +29,113 @@ <el-button icon="el-icon-circle-plus-outline" plain size="small" type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘</el-button> <el-button icon="el-icon-menu" plain size="small" type="primary" @click="checkClickHandler">涓�鑷存�ф鏌�</el-button> </div> - <div style="height: 380px;margin-top: 10px"> - <el-descriptions :column="2" border class="margin-top" size="medium"> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.id"></i> - 鍚嶇О - </template> - {{ nodeRow.name }} - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.name"></i> - 鏍囩 - </template> - {{ nodeRow.tag }} - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.tableName"></i> - 瀹炵幇绫� - </template> - {{ nodeRow.implClass }} - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.domain"></i> - 褰㈢姸 - </template> - <el-tag v-if="nodeRow.shape"> - {{ nodeRow.shape }} - </el-tag> - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.desc"></i> - 鎻忚堪 - </template> - {{ nodeRow.description }} - </el-descriptions-item> - </el-descriptions> - - <el-descriptions :column="3" border class="margin-top" direction="vertical"> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.from"></i> - From绔被鍨� - </template> - <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap"> - <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:3px;"> - <el-tag effect="plain" style="margin-top: 3px;"> - {{ item }} - </el-tag> - </span> - </div> - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.from"></i> - Form绔富绫诲瀷 - </template> - <el-tag v-if="nodeRow.primitivesFrom" effect="plain"> - {{ nodeRow.primitivesFrom === '璇烽�夋嫨' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }} - </el-tag> - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.from"></i> - From绔搴斿叧绯� - </template> - <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag> - </el-descriptions-item> - - </el-descriptions> - - <el-descriptions :column="3" border class="margin-top" direction="vertical"> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.to"></i> - To绔被鍨� - </template> - <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap"> - <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;"> - <el-tag effect="plain" style="margin-top: 2px;"> + <el-descriptions style="margin: 10px 0 20px" :column="2" border class="margin-top" size="medium"> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.id"></i> + 鍚嶇О + </template> + {{ nodeRow.name }} + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.name"></i> + 鏍囩 + </template> + {{ nodeRow.tag }} + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.tableName"></i> + 瀹炵幇绫� + </template> + <el-tooltip v-if="nodeRow.implClass" :content="nodeRow.implClass" class="item" effect="dark" + placement="top-start"> + <el-tag style="max-width: 100%;overflow: hidden;display: block">{{ nodeRow.implClass }}</el-tag> + </el-tooltip> + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.domain"></i> + 褰㈢姸 + </template> + <el-tag v-if="nodeRow.shape"> + {{ nodeRow.shape }} + </el-tag> + </el-descriptions-item> + <el-descriptions-item :span="2" :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.desc"></i> + 鎻忚堪 + </template> + {{ nodeRow.description }} + </el-descriptions-item> + <el-descriptions-item :span="2" contentStyle="word-break:break-all;" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.from"></i>From绔被鍨� + </template> + <span v-for="item in nodeRow.btmItemsFrom"> + <el-tag effect="plain" style="margin:2px 5px 2px 0;"> + {{ item }} + </el-tag> + </span> + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.from"></i> + Form绔富绫诲瀷 + </template> + <el-tag v-if="nodeRow.primitivesFrom" effect="plain"> + {{ nodeRow.primitivesFrom === '璇烽�夋嫨' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }} + </el-tag> + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.from"></i> + From绔搴斿叧绯� + </template> + <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag> + </el-descriptions-item> + <el-descriptions-item :span="2" contentStyle="word-break:break-all;" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.to"></i> + To绔被鍨� + </template> + <span v-for="item in nodeRow.btmItemsTo"> + <el-tag effect="plain" style="margin:2px 5px 2px 0;"> {{ item }} </el-tag> - </span> - </div> - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.to"></i> - To绔富绫诲瀷 - </template> - <el-tag v-if="nodeRow.primitivesTo" effect="plain"> - {{ nodeRow.primitivesTo === '璇烽�夋嫨' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }} - </el-tag> - </el-descriptions-item> - <el-descriptions-item :contentStyle="descriptionOption.contentStyle" - :labelStyle="descriptionOption.labelStyle"> - <template slot="label"> - <i :class="icons.to"></i> - To绔搴斿叧绯� - </template> - <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag> - </el-descriptions-item> - - </el-descriptions> - </div> - <div style="margin-top: 30px;position: relative"> + </span> + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.to"></i> + To绔富绫诲瀷 + </template> + <el-tag v-if="nodeRow.primitivesTo" effect="plain"> + {{ nodeRow.primitivesTo === '璇烽�夋嫨' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }} + </el-tag> + </el-descriptions-item> + <el-descriptions-item :contentStyle="descriptionOption.contentStyle" + :labelStyle="descriptionOption.labelStyle"> + <template slot="label"> + <i :class="icons.to"></i> + To绔搴斿叧绯� + </template> + <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag> + </el-descriptions-item> + </el-descriptions> + <div style="position: relative"> <h3 style="margin: 0;position: absolute;top:0;z-index: 1000;">灞炴�у垪琛�</h3> <avue-crud :data="tableData" @@ -183,50 +171,42 @@ <el-input v-model="form.shape"></el-input> </el-form-item> <el-form-item label="鎻忚堪"> - <el-input v-model="form.description" :rows="2" type="textarea"></el-input> + <el-input v-model="form.description" :rows="3" type="textarea"></el-input> </el-form-item> </div> <div class="centerForm"> - <el-form-item label="Form绔被鍨嬶細" label-width="110px"> - <div style="display: flex; align-items: center"> - <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> - <!-- 鍐呭 --> - <el-table - :data="bizFormData" - :show-header="false" - style="width: 100%"> - <el-table-column - align="center" - prop="name"> - </el-table-column> - <el-table-column - fixed="right" - label="鎿嶄綔" - width="60"> - <template slot-scope="scope"> - <el-button - size="small" - style="color:#F56C6C;" - type="text" - @click.native.prevent="bizTypeDeleteRow('form',scope.$index)"> - 绉婚櫎 - </el-button> - </template> - </el-table-column> - </el-table> - </div> - <el-button plain size="mini" style="margin-left: 5px" type="success" - @click="FormItemReferChange('form')">娣诲姞 - </el-button> - + <el-form-item label-width="110px" style="margin-bottom: 5px;"> + <div slot="label"> + <span>Form绔被鍨嬶細</span> + <el-button plain size="mini" style="margin-right: 10px" type="success" @click="FormItemReferChange('form')">娣诲姞</el-button> + </div> + <div style="height: 190px;border: 1px solid #EBEEF5;overflow-y: auto"> + <el-table :data="bizFormData" :show-header="false" style="width: 100%" size="mini"> + <el-table-column + align="center" + prop="name"> + </el-table-column> + <el-table-column + fixed="right" + label="鎿嶄綔" + width="60"> + <template slot-scope="scope"> + <el-button + size="mini" + style="color:#F56C6C;" + type="text" + @click.native.prevent="bizTypeDeleteRow('form',scope.$index)"> + 绉婚櫎 + </el-button> + </template> + </el-table-column> + </el-table> </div> </el-form-item> - <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px"> - <el-select v-model="form.relationFrom"> - <el-option label="N" value="N"></el-option> - <el-option label="1" value="1"></el-option> - </el-select> + <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px" style="margin-bottom: 5px;"> + <el-radio v-model="form.relationFrom" label="N">N</el-radio> + <el-radio v-model="form.relationFrom" label="1">1</el-radio> </el-form-item> <el-form-item label="涓荤被鍨嬶細" label-width="110px"> <el-select v-model="form.primitivesFrom"> @@ -237,45 +217,37 @@ </div> <div class="rightForm"> - <el-form-item label="To绔被鍨嬶細" label-width="110px"> - <div style="display: flex; align-items: center"> - <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> - <!-- 鍐呭 --> - <el-table - :data="bizToData" - :show-header="false" - style="width: 100%"> - <el-table-column - align="center" - prop="name"> - </el-table-column> - <el-table-column - fixed="right" - label="鎿嶄綔" - width="60"> - <template slot-scope="scope"> - <el-button - size="small" - style="color:#F56C6C;" - type="text" - @click.native.prevent="bizTypeDeleteRow('to',scope.$index)"> - 绉婚櫎 - </el-button> - </template> - </el-table-column> - </el-table> - </div> - <el-button plain size="mini" style="margin-left: 5px" type="success" - @click="FormItemReferChange('to')">娣诲姞 - </el-button> - + <el-form-item label-width="110px" style="margin-bottom: 5px;"> + <div slot="label"> + <span>To绔被鍨嬶細</span> + <el-button plain size="mini" style="margin-right: 10px" type="success" @click="FormItemReferChange('to')">娣诲姞</el-button> + </div> + <div style="height: 190px;border: 1px solid #EBEEF5;overflow-y: auto"> + <el-table :data="bizToData" :show-header="false" style="width: 100%" size="mini"> + <el-table-column + align="center" + prop="name"> + </el-table-column> + <el-table-column + fixed="right" + label="鎿嶄綔" + width="60"> + <template slot-scope="scope"> + <el-button + size="mini" + style="color:#F56C6C;" + type="text" + @click.native.prevent="bizTypeDeleteRow('to',scope.$index)"> + 绉婚櫎 + </el-button> + </template> + </el-table-column> + </el-table> </div> </el-form-item> - <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px"> - <el-select v-model="form.relationTo"> - <el-option label="N" value="N"></el-option> - <el-option label="1" value="1"></el-option> - </el-select> + <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px" style="margin-bottom: 5px;"> + <el-radio v-model="form.relationTo" label="N">N</el-radio> + <el-radio v-model="form.relationTo" label="1">1</el-radio> </el-form-item> <el-form-item label="涓荤被鍨嬶細" label-width="110px"> <el-select v-model="form.primitivesTo"> @@ -287,15 +259,16 @@ </div> </el-form> - <div class="bottomForm"> - <h3 style="margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3> + <div class="bottomForm" style="margin-top: 10px;"> <avue-crud + size="mini" :data="dialogBottomData" :option="dialogBottomOption" @row-del="dialogBottomAttrDel" > <template slot="menuLeft" slot-scope="scope"> - <el-button icon="el-icon-plus" plain size="small" type="primary" @click="dialogAddClickHandler">澧� 鍔� + <h3 style="display: inline-block;margin-right: 20px;margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3> + <el-button icon="el-icon-plus" plain size="mini" type="primary" @click="dialogAddClickHandler">澧� 鍔� </el-button> </template> </avue-crud> @@ -303,7 +276,7 @@ <span slot="footer" class="dialog-footer"> <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> <el-button @click="addDialogClose">鍙� 娑�</el-button> - </span> + </span> <!-- 灞炴�ф睜鍒楄〃 --> <el-dialog @@ -434,6 +407,7 @@ searchMenuSpan: 8, searchLabelWidth: 100, calcHeight: 30, + header: false, column: [ { label: '涓氬姟绫诲瀷鍚�', @@ -474,6 +448,7 @@ index: false, selection: false, refreshBtn: false, + header:false, column: [ { label: '绫诲瀷鍚�', @@ -501,7 +476,7 @@ dialogAttrReload: Math.random(), dialogAttrSelectList: [], dialogAttrLoading: false, - dialogAttrData: [], // 灞炴�ф睜鏂板琛ㄦ牸 + dialogAttrData: [], // 灞炴�ф睜寮圭獥琛ㄦ牸 dialogAttrOption: { ...basicOption, calcHeight: -60, @@ -513,22 +488,28 @@ height: 450, searchMenuSpan: 8, header:false, + selectable:function(row){ + return row.selectable; + }, column: [ { label: '灞炴�у悕', prop: 'id', sortable: true, search: true, + width:260, }, { label: '灞炴�х被鍨�', prop: 'attributeDataType', sortable: true, + width:150, }, { label: '鍒濆鍊�', prop: 'defaultValue', sortable: true, + width:200, }, { label: '璇存槑', @@ -565,24 +546,30 @@ editBtn: false, refreshBtn: false, selection: false, - height: 200, + height: 220, + menuWidth:100, addBtn: false, + gridBtn:false, + columnBtn:false, // index:false, column: [ { label: '灞炴�у悕', prop: 'id', sortable: true, + width:260, }, { label: '灞炴�х被鍨�', prop: 'attributeDataType', sortable: true, + width:150, }, { label: '鍒濆鍊�', prop: 'defaultValue', sortable: true, + width:200, }, { label: '璇存槑', @@ -614,22 +601,25 @@ // index:false, addBtn: false, menu: false, - calcHeight: -55, + calcHeight: -30, column: [ { label: '灞炴�у悕', prop: 'id', sortable: true, + width:260, }, { label: '灞炴�х被鍨�', prop: 'attributeDataType', sortable: true, + width:150, }, { label: '鍒濆鍊�', prop: 'defaultValue', sortable: true, + width:200, }, { label: '璇存槑', @@ -641,7 +631,7 @@ nodeRow: {}, descriptionOption: { labelStyle: 'text-align:center;width:120px', - contentStyle: 'width:240px;text-align:center;word-break;break-all;' + contentStyle: 'width:240px;text-align:center;word-break:break-all;' }, icons: { id: 'el-icon-finished', @@ -863,7 +853,10 @@ // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁 getAttrDialogDta() { gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => { - const data = res.data.data; + const data = res.data.data.map(item=>{ + item.selectable=!this.dialogBottomData.some(existingItem => existingItem.id === item.id); + return item; + }); this.dialogAttrData = data; this.attrPage.total = res.data.total; this.dialogAttrLoading = false; @@ -879,7 +872,9 @@ // 娣诲姞灞炴�ф睜 琛岀偣鍑� dialogAttrRowClickHandler(row) { - + if(!row.selectable){ + return; + } func.rowClickHandler( row, this.$refs.dialogAttrCrud, @@ -923,35 +918,15 @@ // 娣诲姞灞炴�ф睜 淇濆瓨 dialogAttrAddClickHandler() { - let hasDuplicate = false; - - // 鍏堝垱寤轰竴涓复鏃舵暟缁勬潵瀛樺偍涓嶉噸澶嶇殑椤� - const newItems = []; - this.dialogAttrSelectList.forEach(item => { - const exists = this.dialogBottomData.some(existingItem => existingItem.id === item.id); - - if (exists) { - hasDuplicate = true; - return; - } - - // 濡傛灉娌℃湁閲嶅椤癸紝鍒欏皢璇ラ」娣诲姞鍒颁复鏃舵暟缁勪腑 - newItems.push({ + this.dialogBottomData.push({ id: item.id, attributeDataType: item.attributeDataType, defaultValue: item.defaultValue, description: item.description }); }); - - if (hasDuplicate) { - this.$message.error('璇锋鏌ユ槸鍚︽湁娣诲姞閲嶅椤癸紒'); - } else { - // 濡傛灉娌℃湁閲嶅椤癸紝灏嗘柊椤规坊鍔犲埌 dialogBottomData - this.dialogBottomData.push(...newItems); - this.attrPollDialogVisible = false; - } + this.attrPollDialogVisible = false; }, //娣诲姞灞炴�ф睜 鏉℃暟 @@ -1163,18 +1138,19 @@ .dialogForm { display: flex; - justify-content: space-around; + justify-content: space-between; } .dialogForm > div { - width: 34%; - border: 1px solid #eee; + width: 32%; + border: 1px solid #EBEEF5; + border-radius: 2px; padding: 25px 20px 5px 10px; /* 涓� 鍙� 涓� 宸� */ - box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* 娣诲姞闃村奖鏁堟灉 */ + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* 娣诲姞闃村奖鏁堟灉 */ } .leftForm { - width: 19% !important; + width: 26% !important; padding: 25px 20px 5px 0px !important; } -- Gitblit v1.9.3