hookehuyr

✨ feat: 新增数据收集量上限控制

...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2022-05-26 23:52:36 3 * @Date: 2022-05-26 23:52:36
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2023-03-13 16:50:00 5 + * @LastEditTime: 2023-03-14 15:15:47
6 * @FilePath: /data-table/src/App.vue 6 * @FilePath: /data-table/src/App.vue
7 * @Description: 7 * @Description:
8 --> 8 -->
...@@ -30,6 +30,7 @@ import { apiList } from '@/api/wx/jsApiList.js' ...@@ -30,6 +30,7 @@ import { apiList } from '@/api/wx/jsApiList.js'
30 import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools"; 30 import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools";
31 import { styleColor } from "@/constant.js"; 31 import { styleColor } from "@/constant.js";
32 import { getFormSettingAPI } from "@/api/form.js"; 32 import { getFormSettingAPI } from "@/api/form.js";
33 +import { showDialog } from 'vant';
33 34
34 // 使用 include + pinia 状态管理动态缓存页面 35 // 使用 include + pinia 状态管理动态缓存页面
35 const store = mainStore(); 36 const store = mainStore();
...@@ -122,6 +123,15 @@ onMounted(async () => { ...@@ -122,6 +123,15 @@ onMounted(async () => {
122 $router.push("/stop?status=finish"); 123 $router.push("/stop?status=finish");
123 } 124 }
124 } 125 }
126 + // 当数据量达到限额时,该表单将不能继续提交数据。
127 + if (form_setting.is_reach_sjsj_max_count) {
128 + showDialog({
129 + title: '温馨提示',
130 + message: '表单收集量已达到限额,无法再提交数据。',
131 + theme: 'round-button',
132 + confirmButtonColor: styleColor.baseColor
133 + });
134 + }
125 } 135 }
126 }); 136 });
127 </script> 137 </script>
......