From a5f2dad996fcdb22a670743102b9fd08370738cd Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 27 九月 2024 16:25:10 +0800 Subject: [PATCH] 整合代码 --- Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue | 117 ++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 72 insertions(+), 45 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue index 5d66a6e..c5506eb 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue @@ -1,55 +1,68 @@ <template> - <el-container> - - <el-aside> - <basic-container> - <!-- 宸︿晶鏍� --> - <div style="height:580px"> - <avue-tree - ref="tree" - v-model="treeForm" - :data="treeData" - :option="treeOption" - @node-click="nodeClick"> + <el-dialog + v-dialogDrag + :visible.sync="btnActionVisible" + append-to-body="true" + class="avue-dialog" + title="閫夋嫨Action" + width="70%" + @close="dialogClose"> + <el-container> + <el-aside> + <basic-container> + <!-- 宸︿晶鏍� --> + <div> + <avue-tree + ref="tree" + v-model="treeForm" + :data="treeData" + :option="treeOption" + node-key="value" + @node-click="nodeClick"> <span slot-scope="{ node, data }" class="el-tree-node__label"> <span style="font-size: 15px"> <i class="el-icon-s-promotion"></i> {{ (node || {}).label }} </span> </span> - </avue-tree> - </div> - </basic-container> - </el-aside> + </avue-tree> + </div> + </basic-container> + </el-aside> - <el-main> - <basic-container> - <div> - <avue-crud - ref="crud" - v-model="form" - :data="data" - :option="option" - :page.sync="page" - :table-loading="tableLoading" - @search-change="handleSearch" - @search-reset="handleReset" - @refresh-change="handleRefresh" - @selection-change="selectChangeHandler" - @row-click="rowClickHandler"> - <template slot="plTypeType" slot-scope="{row}"> - <el-tag :type="row.plTypeType === 'business' ? '' : 'success'"> - {{ row.plTypeType === 'business' ? '涓氬姟绫诲瀷' : '閾炬帴绫诲瀷' }} - </el-tag> - </template> + <el-main> + <basic-container> + <div> + <avue-crud + ref="crud" + v-model="form" + :data="data" + :option="option" + :page.sync="page" + :table-loading="tableLoading" + @search-change="handleSearch" + @search-reset="handleReset" + @refresh-change="handleRefresh" + @selection-change="selectChangeHandler" + @row-click="rowClickHandler"> + <template slot="plTypeType" slot-scope="{row}"> + <el-tag :type="row.plTypeType === 'business' ? '' : 'success'"> + {{ row.plTypeType === 'business' ? '涓氬姟绫诲瀷' : '閾炬帴绫诲瀷' }} + </el-tag> + </template> - </avue-crud> - </div> - </basic-container> - </el-main> + </avue-crud> + </div> + </basic-container> + </el-main> - </el-container> + </el-container> + <span slot="footer" class="dialog-footer"> + <el-button @click="btnActionVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="actionSaveHandler">纭� 瀹�</el-button> + </span> + </el-dialog> </template> <script> @@ -75,6 +88,7 @@ name: "index", data() { return { + btnActionVisible: false, currenRow: {}, // action褰撳墠琛屼俊鎭� topMethodsObj: { select: true, @@ -126,7 +140,7 @@ option: { ...basicOption, addBtn: false, - height: 'auto', + height: 500, highlightCurrentRow: true, column: [ { @@ -334,9 +348,6 @@ this.selectList = []; } ); - - // 璇锋眰action涓嬫柟鍙傛暟鍒楄〃鏁版嵁 - this.getBottomList(row); }, // 鎼滅储 @@ -368,6 +379,22 @@ this.getRightTableList(this.treeNodeRow); }, + // 淇濆瓨action + actionSaveHandler() { + if (this.selectList.length != 1) { + this.$message.error('鍙兘閫夋嫨涓�鏉℃暟鎹�'); + return; + } + this.$emit('updataAction', this.selectList[0]); + this.dialogClose(); + }, + + dialogClose(){ + this.btnActionVisible = false; + this.data = []; + this.$refs.tree.setCurrentKey(null); + } + } } </script> -- Gitblit v1.9.3