Showing
2 changed files
with
71 additions
and
41 deletions
| ... | @@ -318,6 +318,26 @@ export default { | ... | @@ -318,6 +318,26 @@ export default { |
| 318 | }); | 318 | }); |
| 319 | 319 | ||
| 320 | onMounted(() => { | 320 | onMounted(() => { |
| 321 | + // // 显示提示框的标志位 | ||
| 322 | + // var showConfirmation = true; | ||
| 323 | + // // 监听 beforeunload 事件 | ||
| 324 | + // window.addEventListener('beforeunload', function (event) { | ||
| 325 | + // if (showConfirmation) { | ||
| 326 | + // // 取消事件的默认行为(弹出确认对话框) | ||
| 327 | + // event.preventDefault(); | ||
| 328 | + // // Chrome 和 Firefox 需要返回一个值以显示确认对话框 | ||
| 329 | + // event.returnValue = ''; | ||
| 330 | + // // 显示自定义的提示信息 | ||
| 331 | + // var confirmationMessage = '确定要离开此页面吗?'; | ||
| 332 | + // (event || window.event).returnValue = confirmationMessage; // 兼容旧版浏览器 | ||
| 333 | + // return confirmationMessage; | ||
| 334 | + // } | ||
| 335 | + // }); | ||
| 336 | + // // 监听 unload 事件 | ||
| 337 | + // window.addEventListener('unload', function () { | ||
| 338 | + // // 设置标志位为 false,避免在刷新页面时再次显示提示框 | ||
| 339 | + // showConfirmation = false; | ||
| 340 | + // }); | ||
| 321 | }); | 341 | }); |
| 322 | 342 | ||
| 323 | function handleActiveChange(name) { | 343 | function handleActiveChange(name) { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-11-01 10:18:53 | 2 | * @Date: 2023-11-01 10:18:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-11-01 11:33:00 | 4 | + * @LastEditTime: 2023-11-01 14:07:53 |
| 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue | 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | - <el-dialog v-model="dialogUserFormVisible" title="成员列表"> | 9 | + <el-dialog |
| 10 | - <div style="border: 1px dashed #DCDFE6; padding: 10px;"> | 10 | + v-model="dialogUserFormVisible" |
| 11 | + title="成员列表" | ||
| 12 | + @close="closeUserForm" | ||
| 13 | + > | ||
| 14 | + <div class="flow-tag__wrapper"> | ||
| 11 | <el-tag | 15 | <el-tag |
| 12 | v-if="userTags.length" | 16 | v-if="userTags.length" |
| 13 | v-for="tag in userTags" | 17 | v-for="tag in userTags" |
| 14 | :key="tag.name" | 18 | :key="tag.name" |
| 15 | - class="" | ||
| 16 | style="margin-left: 0.25rem; margin-right: 0.25rem;" | 19 | style="margin-left: 0.25rem; margin-right: 0.25rem;" |
| 17 | closable | 20 | closable |
| 18 | @close="handleTagClose(tag)" | 21 | @close="handleTagClose(tag)" |
| 19 | > | 22 | > |
| 20 | {{ tag.name }} | 23 | {{ tag.name }} |
| 21 | </el-tag> | 24 | </el-tag> |
| 22 | - <div v-else style="text-align: center; color: #DCDFE6;">请选择成员</div> | 25 | + <div v-else class="text-empty">请选择成员</div> |
| 23 | </div> | 26 | </div> |
| 24 | - <div style="border: 1px solid #DCDFE6; padding: 10px; margin-top: 10px;"> | 27 | + <div class="flow-tabs__wrapper"> |
| 25 | <div style="height: 40px"> | 28 | <div style="height: 40px"> |
| 26 | - <div style="padding: 0; position: relative; margin: 0 0 15px;"> | 29 | + <div class="search_box"> |
| 27 | <div v-if="!is_active_search"> | 30 | <div v-if="!is_active_search"> |
| 28 | <div class="flow-tabs__nav-wrap"> | 31 | <div class="flow-tabs__nav-wrap"> |
| 29 | <div class="flow-tabs__nav-scroll"> | 32 | <div class="flow-tabs__nav-scroll"> |
| ... | @@ -88,12 +91,11 @@ | ... | @@ -88,12 +91,11 @@ |
| 88 | :default-expanded-keys="currentNodeKey" | 91 | :default-expanded-keys="currentNodeKey" |
| 89 | empty-text="暂无数据" | 92 | empty-text="暂无数据" |
| 90 | @node-click="handleNodeClick" | 93 | @node-click="handleNodeClick" |
| 94 | + style="margin-top: 10px;" | ||
| 91 | /> | 95 | /> |
| 92 | </el-col> | 96 | </el-col> |
| 93 | <el-col :span="16"> | 97 | <el-col :span="16"> |
| 94 | - <div | 98 | + <div class="flow-checkbox-box"> |
| 95 | - style="border-left: 2px solid #e4e7ed; width: 2px; height: 100%; padding-left: 10px;" | ||
| 96 | - > | ||
| 97 | <el-checkbox-group | 99 | <el-checkbox-group |
| 98 | class="flow-checkbox-group" | 100 | class="flow-checkbox-group" |
| 99 | v-model="checkedUserList" | 101 | v-model="checkedUserList" |
| ... | @@ -204,26 +206,6 @@ const defaultProps = ref({ | ... | @@ -204,26 +206,6 @@ const defaultProps = ref({ |
| 204 | 206 | ||
| 205 | onMounted(() => { | 207 | onMounted(() => { |
| 206 | // console.log(props.visible); | 208 | // console.log(props.visible); |
| 207 | - // // 显示提示框的标志位 | ||
| 208 | - // var showConfirmation = true; | ||
| 209 | - // // 监听 beforeunload 事件 | ||
| 210 | - // window.addEventListener('beforeunload', function (event) { | ||
| 211 | - // if (showConfirmation) { | ||
| 212 | - // // 取消事件的默认行为(弹出确认对话框) | ||
| 213 | - // event.preventDefault(); | ||
| 214 | - // // Chrome 和 Firefox 需要返回一个值以显示确认对话框 | ||
| 215 | - // event.returnValue = ''; | ||
| 216 | - // // 显示自定义的提示信息 | ||
| 217 | - // var confirmationMessage = '确定要离开此页面吗?'; | ||
| 218 | - // (event || window.event).returnValue = confirmationMessage; // 兼容旧版浏览器 | ||
| 219 | - // return confirmationMessage; | ||
| 220 | - // } | ||
| 221 | - // }); | ||
| 222 | - // // 监听 unload 事件 | ||
| 223 | - // window.addEventListener('unload', function () { | ||
| 224 | - // // 设置标志位为 false,避免在刷新页面时再次显示提示框 | ||
| 225 | - // showConfirmation = false; | ||
| 226 | - // }); | ||
| 227 | // axios.get('/srv/?a=query_form_all_field') | 209 | // axios.get('/srv/?a=query_form_all_field') |
| 228 | // .then(res => { | 210 | // .then(res => { |
| 229 | // console.warn(res.data); | 211 | // console.warn(res.data); |
| ... | @@ -657,12 +639,32 @@ watch( | ... | @@ -657,12 +639,32 @@ watch( |
| 657 | </script> | 639 | </script> |
| 658 | 640 | ||
| 659 | <style lang="scss"> | 641 | <style lang="scss"> |
| 660 | -.flow-tabs__nav-wrap { | 642 | +.flow-tag__wrapper { |
| 643 | + border: 1px dashed #dcdfe6; | ||
| 644 | + padding: 10px; | ||
| 645 | + .text-empty { | ||
| 646 | + text-align: center; | ||
| 647 | + color: #dcdfe6; | ||
| 648 | + } | ||
| 649 | +} | ||
| 650 | + | ||
| 651 | +.flow-tabs__wrapper { | ||
| 652 | + border: 1px solid #dcdfe6; | ||
| 653 | + padding: 10px; | ||
| 654 | + margin-top: 10px; | ||
| 655 | + | ||
| 656 | + .search_box { | ||
| 657 | + padding: 0; | ||
| 658 | + position: relative; | ||
| 659 | + margin: 0 0 15px; | ||
| 660 | + } | ||
| 661 | + | ||
| 662 | + .flow-tabs__nav-wrap { | ||
| 661 | overflow: hidden; | 663 | overflow: hidden; |
| 662 | margin-bottom: -1px; | 664 | margin-bottom: -1px; |
| 663 | position: relative; | 665 | position: relative; |
| 664 | -} | 666 | + } |
| 665 | -.flow-tabs__nav-wrap::after { | 667 | + .flow-tabs__nav-wrap::after { |
| 666 | content: ""; | 668 | content: ""; |
| 667 | position: absolute; | 669 | position: absolute; |
| 668 | left: 0; | 670 | left: 0; |
| ... | @@ -671,14 +673,14 @@ watch( | ... | @@ -671,14 +673,14 @@ watch( |
| 671 | height: 2px; | 673 | height: 2px; |
| 672 | background-color: #e4e7ed; | 674 | background-color: #e4e7ed; |
| 673 | /* z-index: 1; */ | 675 | /* z-index: 1; */ |
| 674 | -} | 676 | + } |
| 675 | 677 | ||
| 676 | -.flow-tabs__nav-scroll { | 678 | + .flow-tabs__nav-scroll { |
| 677 | /* overflow: hidden; */ | 679 | /* overflow: hidden; */ |
| 678 | overflow: scroll; | 680 | overflow: scroll; |
| 679 | -} | 681 | + } |
| 680 | 682 | ||
| 681 | -.flow-tabs__active-bar { | 683 | + .flow-tabs__active-bar { |
| 682 | position: absolute; | 684 | position: absolute; |
| 683 | bottom: 0; | 685 | bottom: 0; |
| 684 | left: 0; | 686 | left: 0; |
| ... | @@ -688,9 +690,9 @@ watch( | ... | @@ -688,9 +690,9 @@ watch( |
| 688 | transition: width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), | 690 | transition: width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), |
| 689 | transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); | 691 | transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
| 690 | list-style: none; | 692 | list-style: none; |
| 691 | -} | 693 | + } |
| 692 | 694 | ||
| 693 | -.flow-tabs__nav { | 695 | + .flow-tabs__nav { |
| 694 | display: flex; | 696 | display: flex; |
| 695 | white-space: nowrap; | 697 | white-space: nowrap; |
| 696 | position: relative; | 698 | position: relative; |
| ... | @@ -719,9 +721,9 @@ watch( | ... | @@ -719,9 +721,9 @@ watch( |
| 719 | padding-left: 0; | 721 | padding-left: 0; |
| 720 | } | 722 | } |
| 721 | } | 723 | } |
| 722 | -} | 724 | + } |
| 723 | 725 | ||
| 724 | -.flow-tab-search { | 726 | + .flow-tab-search { |
| 725 | position: absolute; | 727 | position: absolute; |
| 726 | top: 0; | 728 | top: 0; |
| 727 | right: 0; | 729 | right: 0; |
| ... | @@ -735,6 +737,14 @@ watch( | ... | @@ -735,6 +737,14 @@ watch( |
| 735 | &:hover { | 737 | &:hover { |
| 736 | cursor: pointer; | 738 | cursor: pointer; |
| 737 | } | 739 | } |
| 740 | + } | ||
| 741 | +} | ||
| 742 | + | ||
| 743 | +.flow-checkbox-box { | ||
| 744 | + border-left: 2px solid #e4e7ed; | ||
| 745 | + width: 2px; | ||
| 746 | + height: 100%; | ||
| 747 | + padding-left: 10px; | ||
| 738 | } | 748 | } |
| 739 | 749 | ||
| 740 | .flow-checkbox-group { | 750 | .flow-checkbox-group { | ... | ... |
-
Please register or login to post a comment