Showing
1 changed file
with
21 additions
and
6 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-07-18 10:22:22 | 2 | * @Date: 2022-07-18 10:22:22 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-08-03 20:33:17 | 4 | + * @LastEditTime: 2024-08-04 10:22:01 |
| 5 | * @FilePath: /data-table/src/views/index.vue | 5 | * @FilePath: /data-table/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <van-notice-bar v-if="formSetting.sjsj_is_count_down" left-icon="volume-o" :text="notice_text" scrollable | 9 | <van-notice-bar v-if="formSetting.sjsj_is_count_down" left-icon="volume-o" :text="notice_text" scrollable |
| 10 | mode="closeable" /> | 10 | mode="closeable" /> |
| 11 | - <!-- <div class="table-box" :style="{ margin: is_pc ? '1rem 0' : '1rem' }"> --> | 11 | + <div v-if="!show_loading" class="table-box"> |
| 12 | - <div class="table-box"> | ||
| 13 | <template v-if="PHeader.visible && (page_type === 'add' || model === 'preview')"> | 12 | <template v-if="PHeader.visible && (page_type === 'add' || model === 'preview')"> |
| 14 | <van-image v-if="PHeader.type === 'image' && PHeader.cover" width="100%" :src="PHeader.cover + '?imageView2/0/w/2000'" fit="cover" /> | 13 | <van-image v-if="PHeader.type === 'image' && PHeader.cover" width="100%" :src="PHeader.cover + '?imageView2/0/w/2000'" fit="cover" /> |
| 15 | <template v-if="PHeader.type === 'carousel'"> | 14 | <template v-if="PHeader.type === 'carousel'"> |
| ... | @@ -187,6 +186,8 @@ | ... | @@ -187,6 +186,8 @@ |
| 187 | </van-checkbox-group> | 186 | </van-checkbox-group> |
| 188 | </div> | 187 | </div> |
| 189 | </van-dialog> | 188 | </van-dialog> |
| 189 | + | ||
| 190 | + <van-loading v-if="show_loading" size="24px" vertical style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 5rem;">加载中...</van-loading> | ||
| 190 | </template> | 191 | </template> |
| 191 | 192 | ||
| 192 | <script setup> | 193 | <script setup> |
| ... | @@ -416,7 +417,11 @@ const form_flow_process_list = ref([]); | ... | @@ -416,7 +417,11 @@ const form_flow_process_list = ref([]); |
| 416 | const active_flow_process = ref([]); | 417 | const active_flow_process = ref([]); |
| 417 | const collapseRef = ref(null); | 418 | const collapseRef = ref(null); |
| 418 | 419 | ||
| 420 | +const show_loading = ref(false); | ||
| 421 | + | ||
| 419 | onMounted(async () => { | 422 | onMounted(async () => { |
| 423 | + // 显示加载动画 | ||
| 424 | + show_loading.value = true; | ||
| 420 | // TAG: 全局背景色 | 425 | // TAG: 全局背景色 |
| 421 | document | 426 | document |
| 422 | .querySelector("body") | 427 | .querySelector("body") |
| ... | @@ -678,10 +683,17 @@ onMounted(async () => { | ... | @@ -678,10 +683,17 @@ onMounted(async () => { |
| 678 | } | 683 | } |
| 679 | }); | 684 | }); |
| 680 | historyData.value = history_data.data; // 历史表单字段数据 | 685 | historyData.value = history_data.data; // 历史表单字段数据 |
| 686 | + // 显示加载动画 | ||
| 687 | + show_loading.value = false; | ||
| 681 | } | 688 | } |
| 682 | if (!history_data) { | 689 | if (!history_data) { |
| 683 | PCommit.value.visible = false; // 查询数据错误,提交按钮隐藏 | 690 | PCommit.value.visible = false; // 查询数据错误,提交按钮隐藏 |
| 691 | + // 显示加载动画 | ||
| 692 | + show_loading.value = false; | ||
| 684 | } | 693 | } |
| 694 | + } else { | ||
| 695 | + // 显示加载动画 | ||
| 696 | + show_loading.value = false; | ||
| 685 | } | 697 | } |
| 686 | 698 | ||
| 687 | // TAG: mock数据 | 699 | // TAG: mock数据 |
| ... | @@ -798,9 +810,12 @@ onMounted(async () => { | ... | @@ -798,9 +810,12 @@ onMounted(async () => { |
| 798 | approval_actions.value = formSetting.value.flow_node_action_list?.map((item) => { return { name: item.btnText, id: item.id, parent_nodes: item.parent_nodes } }); | 810 | approval_actions.value = formSetting.value.flow_node_action_list?.map((item) => { return { name: item.btnText, id: item.id, parent_nodes: item.parent_nodes } }); |
| 799 | }, 1000); | 811 | }, 1000); |
| 800 | 812 | ||
| 801 | - const width = $('body').width(); | 813 | + setTimeout(() => { |
| 802 | - // 固定表单宽度 | 814 | + const width = $('body').width(); |
| 803 | - $('.table-box').css('width', (width - 30) + 'px'); | 815 | + // 固定表单宽度 |
| 816 | + $('.table-box').css('width', (width - 30) + 'px'); | ||
| 817 | + }, 100); | ||
| 818 | + | ||
| 804 | // TAG:表单样式统一修改 | 819 | // TAG:表单样式统一修改 |
| 805 | // 详情页表单的border去掉 | 820 | // 详情页表单的border去掉 |
| 806 | if (page_type === 'info') { | 821 | if (page_type === 'info') { | ... | ... |
-
Please register or login to post a comment