Showing
2 changed files
with
126 additions
and
96 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,84 +639,112 @@ watch( | ... | @@ -657,84 +639,112 @@ watch( |
| 657 | </script> | 639 | </script> |
| 658 | 640 | ||
| 659 | <style lang="scss"> | 641 | <style lang="scss"> |
| 660 | -.flow-tabs__nav-wrap { | 642 | +.flow-tag__wrapper { |
| 661 | - overflow: hidden; | 643 | + border: 1px dashed #dcdfe6; |
| 662 | - margin-bottom: -1px; | 644 | + padding: 10px; |
| 663 | - position: relative; | 645 | + .text-empty { |
| 664 | -} | 646 | + text-align: center; |
| 665 | -.flow-tabs__nav-wrap::after { | 647 | + color: #dcdfe6; |
| 666 | - content: ""; | 648 | + } |
| 667 | - position: absolute; | ||
| 668 | - left: 0; | ||
| 669 | - bottom: 0; | ||
| 670 | - width: 100%; | ||
| 671 | - height: 2px; | ||
| 672 | - background-color: #e4e7ed; | ||
| 673 | - /* z-index: 1; */ | ||
| 674 | } | 649 | } |
| 675 | 650 | ||
| 676 | -.flow-tabs__nav-scroll { | 651 | +.flow-tabs__wrapper { |
| 677 | - /* overflow: hidden; */ | 652 | + border: 1px solid #dcdfe6; |
| 678 | - overflow: scroll; | 653 | + padding: 10px; |
| 679 | -} | 654 | + margin-top: 10px; |
| 680 | 655 | ||
| 681 | -.flow-tabs__active-bar { | 656 | + .search_box { |
| 682 | - position: absolute; | 657 | + padding: 0; |
| 683 | - bottom: 0; | 658 | + position: relative; |
| 684 | - left: 0; | 659 | + margin: 0 0 15px; |
| 685 | - height: 2px; | 660 | + } |
| 686 | - background-color: #409eff; | ||
| 687 | - z-index: 1; | ||
| 688 | - 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); | ||
| 690 | - list-style: none; | ||
| 691 | -} | ||
| 692 | 661 | ||
| 693 | -.flow-tabs__nav { | 662 | + .flow-tabs__nav-wrap { |
| 694 | - display: flex; | 663 | + overflow: hidden; |
| 695 | - white-space: nowrap; | 664 | + margin-bottom: -1px; |
| 696 | - position: relative; | 665 | + position: relative; |
| 697 | - transition: transformX(0px); | 666 | + } |
| 698 | - float: left; | 667 | + .flow-tabs__nav-wrap::after { |
| 699 | - .flow-tabs__item { | 668 | + content: ""; |
| 700 | - padding: 0 20px; | 669 | + position: absolute; |
| 701 | - height: 40px; | 670 | + left: 0; |
| 702 | - box-sizing: border-box; | 671 | + bottom: 0; |
| 703 | - display: flex; | 672 | + width: 100%; |
| 704 | - align-items: center; | 673 | + height: 2px; |
| 705 | - justify-content: center; | 674 | + background-color: #e4e7ed; |
| 675 | + /* z-index: 1; */ | ||
| 676 | + } | ||
| 677 | + | ||
| 678 | + .flow-tabs__nav-scroll { | ||
| 679 | + /* overflow: hidden; */ | ||
| 680 | + overflow: scroll; | ||
| 681 | + } | ||
| 682 | + | ||
| 683 | + .flow-tabs__active-bar { | ||
| 684 | + position: absolute; | ||
| 685 | + bottom: 0; | ||
| 686 | + left: 0; | ||
| 687 | + height: 2px; | ||
| 688 | + background-color: #409eff; | ||
| 689 | + z-index: 1; | ||
| 690 | + transition: width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), | ||
| 691 | + transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); | ||
| 706 | list-style: none; | 692 | list-style: none; |
| 707 | - font-size: 14px; | 693 | + } |
| 708 | - font-weight: 500; | 694 | + |
| 709 | - color: #303133; | 695 | + .flow-tabs__nav { |
| 696 | + display: flex; | ||
| 697 | + white-space: nowrap; | ||
| 710 | position: relative; | 698 | position: relative; |
| 699 | + transition: transformX(0px); | ||
| 700 | + float: left; | ||
| 701 | + .flow-tabs__item { | ||
| 702 | + padding: 0 20px; | ||
| 703 | + height: 40px; | ||
| 704 | + box-sizing: border-box; | ||
| 705 | + display: flex; | ||
| 706 | + align-items: center; | ||
| 707 | + justify-content: center; | ||
| 708 | + list-style: none; | ||
| 709 | + font-size: 14px; | ||
| 710 | + font-weight: 500; | ||
| 711 | + color: #303133; | ||
| 712 | + position: relative; | ||
| 713 | + &:hover { | ||
| 714 | + color: #409eff; | ||
| 715 | + cursor: pointer; | ||
| 716 | + } | ||
| 717 | + &.is-active { | ||
| 718 | + color: #409eff; | ||
| 719 | + } | ||
| 720 | + &.is-top:nth-child(2) { | ||
| 721 | + padding-left: 0; | ||
| 722 | + } | ||
| 723 | + } | ||
| 724 | + } | ||
| 725 | + | ||
| 726 | + .flow-tab-search { | ||
| 727 | + position: absolute; | ||
| 728 | + top: 0; | ||
| 729 | + right: 0; | ||
| 730 | + width: 100px; | ||
| 731 | + display: flex; | ||
| 732 | + align-items: center; | ||
| 733 | + background-color: #e4e7ed; | ||
| 734 | + padding: 5px 5px 5px 15px; | ||
| 735 | + border-radius: 15px; | ||
| 736 | + color: #b1b3b8; | ||
| 711 | &:hover { | 737 | &:hover { |
| 712 | - color: #409eff; | ||
| 713 | cursor: pointer; | 738 | cursor: pointer; |
| 714 | } | 739 | } |
| 715 | - &.is-active { | ||
| 716 | - color: #409eff; | ||
| 717 | - } | ||
| 718 | - &.is-top:nth-child(2) { | ||
| 719 | - padding-left: 0; | ||
| 720 | - } | ||
| 721 | } | 740 | } |
| 722 | } | 741 | } |
| 723 | 742 | ||
| 724 | -.flow-tab-search { | 743 | +.flow-checkbox-box { |
| 725 | - position: absolute; | 744 | + border-left: 2px solid #e4e7ed; |
| 726 | - top: 0; | 745 | + width: 2px; |
| 727 | - right: 0; | 746 | + height: 100%; |
| 728 | - width: 100px; | 747 | + padding-left: 10px; |
| 729 | - display: flex; | ||
| 730 | - align-items: center; | ||
| 731 | - background-color: #e4e7ed; | ||
| 732 | - padding: 5px 5px 5px 15px; | ||
| 733 | - border-radius: 15px; | ||
| 734 | - color: #b1b3b8; | ||
| 735 | - &:hover { | ||
| 736 | - cursor: pointer; | ||
| 737 | - } | ||
| 738 | } | 748 | } |
| 739 | 749 | ||
| 740 | .flow-checkbox-group { | 750 | .flow-checkbox-group { | ... | ... |
-
Please register or login to post a comment