hookehuyr

✨ feat(测试表单渲染结构和保存表单数据):

...@@ -14,7 +14,7 @@ VITE_ID = 13761653761 ...@@ -14,7 +14,7 @@ VITE_ID = 13761653761
14 VITE_PIN = 14 VITE_PIN =
15 15
16 # 反向代理服务器地址 16 # 反向代理服务器地址
17 -# VITE_PROXY_TARGET = http://oa-dev.onwall.cn 17 +VITE_PROXY_TARGET = http://oa-dev.onwall.cn
18 # VITE_PROXY_TARGET = http://guanzong.onwall.cn 18 # VITE_PROXY_TARGET = http://guanzong.onwall.cn
19 19
20 # PC端地址 20 # PC端地址
......
...@@ -11,7 +11,7 @@ VITE_APP_ID = ...@@ -11,7 +11,7 @@ VITE_APP_ID =
11 VITE_APP_PIN = 11 VITE_APP_PIN =
12 12
13 # 反向代理服务器地址 13 # 反向代理服务器地址
14 -# VITE_PROXY_TARGET = http://guanzong.onwall.cn 14 +VITE_PROXY_TARGET = http://oa.onwall.cn
15 15
16 # PC端地址 16 # PC端地址
17 # VITE_MOBILE_URL = http://oa.onwall.cn/f/guanzong/web/ 17 # VITE_MOBILE_URL = http://oa.onwall.cn/f/guanzong/web/
......
...@@ -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: 2022-09-06 16:24:19 5 + * @LastEditTime: 2022-11-17 13:34:07
6 * @FilePath: /data-table/src/App.vue 6 * @FilePath: /data-table/src/App.vue
7 * @Description: 7 * @Description:
8 --> 8 -->
...@@ -16,37 +16,39 @@ ...@@ -16,37 +16,39 @@
16 </template> 16 </template>
17 17
18 <script setup> 18 <script setup>
19 -import { mainStore, useTitle } from '@/utils/generatePackage' 19 +import { mainStore, useTitle } from "@/utils/generatePackage";
20 -import { computed, watchEffect, onMounted } from 'vue'; 20 +import { computed, watchEffect, onMounted } from "vue";
21 -import { useRoute, useRouter } from 'vue-router' 21 +import { useRoute, useRouter } from "vue-router";
22 -import { Toast } from 'vant'; 22 +import { Toast } from "vant";
23 // 会根据配置判断是否显示调试控件 23 // 会根据配置判断是否显示调试控件
24 // eslint-disable-next-line no-unused-vars 24 // eslint-disable-next-line no-unused-vars
25 -import vConsole from '@/utils/vconsole' 25 +import vConsole from "@/utils/vconsole";
26 // 初始化WX环境 26 // 初始化WX环境
27 // import wx from 'weixin-js-sdk' 27 // import wx from 'weixin-js-sdk'
28 // import { wxJsAPI } from '@/api/wx/config' 28 // import { wxJsAPI } from '@/api/wx/config'
29 // import { apiList } from '@/api/wx/jsApiList.js' 29 // import { apiList } from '@/api/wx/jsApiList.js'
30 -import { wxInfo } from '@/utils/tools' 30 +import { wxInfo } from "@/utils/tools";
31 31
32 // 使用 include + pinia 状态管理动态缓存页面 32 // 使用 include + pinia 状态管理动态缓存页面
33 -const store = mainStore() 33 +const store = mainStore();
34 -const keepPages = computed(() => store.getKeepPages) 34 +const keepPages = computed(() => store.getKeepPages);
35 35
36 // // TAG: 全局设置页面标题 36 // // TAG: 全局设置页面标题
37 // const $route = useRoute(); 37 // const $route = useRoute();
38 -watchEffect( 38 +watchEffect(() => useTitle("表单标题"));
39 - () => useTitle('表单标题')
40 -)
41 // 监听路由变化 39 // 监听路由变化
42 // 切换路由页面返回顶部 40 // 切换路由页面返回顶部
43 const $router = useRouter(); 41 const $router = useRouter();
44 -watch(() => $router.currentRoute.value, (newValue, oldValue) => { 42 +watch(
45 - nextTick(() => { 43 + () => $router.currentRoute.value,
46 - // document.getElementById('app')?.scrollIntoView(); 44 + (newValue, oldValue) => {
47 - }) 45 + nextTick(() => {
48 - // console.warn(wxInfo().isMobile); 46 + // document.getElementById('app')?.scrollIntoView();
49 -}, { immediate: true }) 47 + });
48 + // console.warn(wxInfo().isMobile);
49 + },
50 + { immediate: true }
51 +);
50 52
51 // TAG: 全局配置Toast 53 // TAG: 全局配置Toast
52 // Toast.setDefaultOptions({ 54 // Toast.setDefaultOptions({
...@@ -55,7 +57,7 @@ watch(() => $router.currentRoute.value, (newValue, oldValue) => { ...@@ -55,7 +57,7 @@ watch(() => $router.currentRoute.value, (newValue, oldValue) => {
55 // }); 57 // });
56 58
57 // web端判断 59 // web端判断
58 -const is_pc = computed(() => wxInfo().isPC) 60 +const is_pc = computed(() => wxInfo().isPC);
59 61
60 onMounted(async () => { 62 onMounted(async () => {
61 // const { data } = await wxJsAPI(); 63 // const { data } = await wxJsAPI();
...@@ -67,18 +69,20 @@ onMounted(async () => { ...@@ -67,18 +69,20 @@ onMounted(async () => {
67 // wx.error((err) => { 69 // wx.error((err) => {
68 // console.warn(err); 70 // console.warn(err);
69 // }); 71 // });
70 -}) 72 +});
71 </script> 73 </script>
72 74
73 <style lang="less"> 75 <style lang="less">
74 -@prefix: ~'@{namespace}-x'; 76 +@prefix: ~"@{namespace}-x";
75 77
76 html, 78 html,
77 body { 79 body {
78 width: 100%; 80 width: 100%;
79 height: 100%; 81 height: 100%;
80 color: @base-font-color; 82 color: @base-font-color;
81 - background-color: #F7F8FA; 83 + background-color: #f7f8fa;
84 + padding: 0;
85 + margin: 0;
82 } 86 }
83 87
84 body { 88 body {
......
1 +/*
2 + * @Date: 2022-06-17 14:54:29
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-11-17 13:49:35
5 + * @FilePath: /data-table/src/api/data.js
6 + * @Description: 表单数据接口
7 + */
8 +import { fn, fetch } from '@/api/fn';
9 +
10 +const Api = {
11 + ADD_FORM_DATA: '/srv/?a=add_formdata',
12 +}
13 +/**
14 + * @description: 添加表单数据
15 + * @param: form_code 表单唯一标识
16 + * @param: data 待添加的数据,json对象结构;键值对记录变更的字段和值;
17 + */
18 +export const addFormDataAPI = (params) => fn(fetch.post(Api.ADD_FORM_DATA, params));
1 +/*
2 + * @Date: 2022-06-17 14:54:29
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2022-11-17 10:41:39
5 + * @FilePath: /data-table/src/api/form.js
6 + * @Description: 表单接口
7 + */
8 +import { fn, fetch } from '@/api/fn';
9 +
10 +const Api = {
11 + FORM_QUERY: '/srv/?a=query_form',
12 +}
13 +/**
14 + * @description: 查询表单
15 + * @param: client_id 主体客户id
16 + * @param: form_code 表单唯一标识
17 + * @param: name 表单名称,模糊查询
18 + */
19 +export const queryFormAPI = (params) => fn(fetch.get(Api.FORM_QUERY, params));
1 /* 1 /*
2 * @Date: 2022-06-17 14:54:29 2 * @Date: 2022-06-17 14:54:29
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-08-29 13:58:16 4 + * @LastEditTime: 2022-11-17 13:46:01
5 * @FilePath: /data-table/src/api/index.js 5 * @FilePath: /data-table/src/api/index.js
6 * @Description: 首页接口 6 * @Description: 首页接口
7 */ 7 */
...@@ -9,7 +9,7 @@ import { fn, fetch } from '@/api/fn'; ...@@ -9,7 +9,7 @@ import { fn, fetch } from '@/api/fn';
9 9
10 const Api = { 10 const Api = {
11 INDEX: '/srv/?a=home_page', 11 INDEX: '/srv/?a=home_page',
12 - 12 +}
13 /** 13 /**
14 * @description: 首页接口 14 * @description: 首页接口
15 * @returns HOMEBANNER 轮播区 15 * @returns HOMEBANNER 轮播区
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2022-05-28 10:17:40 3 * @Date: 2022-05-28 10:17:40
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2022-09-06 18:01:36 5 + * @LastEditTime: 2022-11-17 10:17:01
6 * @FilePath: /data-table/src/utils/axios.js 6 * @FilePath: /data-table/src/utils/axios.js
7 * @Description: 7 * @Description:
8 */ 8 */
...@@ -13,7 +13,7 @@ import { strExist } from '@/utils/tools' ...@@ -13,7 +13,7 @@ import { strExist } from '@/utils/tools'
13 // import { parseQueryString } from '@/utils/tools' 13 // import { parseQueryString } from '@/utils/tools'
14 14
15 axios.defaults.params = { 15 axios.defaults.params = {
16 - f: 'customize', 16 + f: 'custom_form',
17 }; 17 };
18 18
19 /** 19 /**
......
This diff is collapsed. Click to expand it.
...@@ -62,6 +62,7 @@ export default ({ command, mode }) => { ...@@ -62,6 +62,7 @@ export default ({ command, mode }) => {
62 "@css": path.resolve(__dirname, "src/assets/css"), 62 "@css": path.resolve(__dirname, "src/assets/css"),
63 "@mock": path.resolve(__dirname, "src/assets/mock"), 63 "@mock": path.resolve(__dirname, "src/assets/mock"),
64 "common": path.resolve(__dirname, "src/common"), 64 "common": path.resolve(__dirname, "src/common"),
65 + "@api": path.resolve(__dirname, "src/api"),
65 }, 66 },
66 // dedupe: [''], // 如果你在你的应用程序中有相同依赖的副本(比如 monorepos),使用这个选项来强制 Vite 总是将列出的依赖关系解析到相同的副本(从项目根目录)。 67 // dedupe: [''], // 如果你在你的应用程序中有相同依赖的副本(比如 monorepos),使用这个选项来强制 Vite 总是将列出的依赖关系解析到相同的副本(从项目根目录)。
67 // conditions: [''], // 在解析包的 情景导出 时允许的附加条件。 68 // conditions: [''], // 在解析包的 情景导出 时允许的附加条件。
......