vue2-client 1.11.4 → 1.11.6-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.babelrc +3 -0
  2. package/babel.config.js +18 -21
  3. package/jest.config.js +22 -21
  4. package/package.json +5 -4
  5. package/src/base-client/components/common/CitySelect/CitySelect.vue +366 -342
  6. package/src/base-client/components/common/Upload/Upload.vue +322 -322
  7. package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +314 -304
  8. package/src/base-client/components/common/XDescriptions/demo.vue +51 -50
  9. package/src/base-client/components/common/XFormGroup/demo.vue +39 -46
  10. package/src/base-client/components/common/XFormTable/demo.vue +60 -60
  11. package/src/components/STable/index.js +426 -426
  12. package/src/expression/ExpressionRunner.js +26 -0
  13. package/src/expression/TestExpression.js +508 -0
  14. package/src/expression/core/Delegate.js +113 -0
  15. package/src/expression/core/Expression.js +1323 -0
  16. package/src/expression/core/Program.js +933 -0
  17. package/src/expression/core/Token.js +27 -0
  18. package/src/expression/enums/ExpressionType.js +81 -0
  19. package/src/expression/enums/TokenType.js +11 -0
  20. package/src/expression/exception/BreakWayException.js +2 -0
  21. package/src/expression/exception/ContinueWayException.js +2 -0
  22. package/src/expression/exception/ExpressionException.js +28 -0
  23. package/src/expression/exception/ReturnWayException.js +14 -0
  24. package/src/expression/exception/ServiceException.js +22 -0
  25. package/src/expression/instances/JSONArray.js +48 -0
  26. package/src/expression/instances/JSONObject.js +122 -0
  27. package/src/expression/instances/LogicConsole.js +45 -0
  28. package/src/expression/ts/ExpressionRunner.ts +28 -0
  29. package/src/expression/ts/TestExpression.ts +509 -0
  30. package/src/expression/ts/core/Delegate.ts +114 -0
  31. package/src/expression/ts/core/Expression.ts +1309 -0
  32. package/src/expression/ts/core/Program.ts +950 -0
  33. package/src/expression/ts/core/Token.ts +29 -0
  34. package/src/expression/ts/enums/ExpressionType.ts +81 -0
  35. package/src/expression/ts/enums/TokenType.ts +13 -0
  36. package/src/expression/ts/exception/BreakWayException.ts +2 -0
  37. package/src/expression/ts/exception/ContinueWayException.ts +2 -0
  38. package/src/expression/ts/exception/ExpressionException.ts +28 -0
  39. package/src/expression/ts/exception/ReturnWayException.ts +14 -0
  40. package/src/expression/ts/exception/ServiceException.ts +22 -0
  41. package/src/expression/ts/instances/JSONArray.ts +48 -0
  42. package/src/expression/ts/instances/JSONObject.ts +109 -0
  43. package/src/expression/ts/instances/LogicConsole.ts +32 -0
  44. package/src/logic/LogicRunner.js +67 -0
  45. package/src/logic/TestLogic.js +13 -0
  46. package/src/logic/plugins/common/DateTools.js +32 -0
  47. package/src/logic/plugins/index.js +5 -0
  48. package/src/logic/ts/LogicRunner.ts +67 -0
  49. package/src/logic/ts/TestLogic.ts +13 -0
  50. package/src/pages/LogicCallExample/index.vue +30 -0
  51. package/src/router/async/router.map.js +4 -2
  52. package/src/services/user.js +2 -0
  53. package/src/store/mutation-types.js +1 -0
  54. package/src/utils/EncryptUtil.js +23 -0
  55. package/src/utils/indexedDB.js +234 -234
  56. package/src/utils/request.js +382 -362
  57. package/test/request.test.js +17 -0
@@ -1,50 +1,51 @@
1
- <script>
2
- import XDescriptionsGroup from '@vue2-client/base-client/components/common/XDescriptions/XDescriptionsGroup.vue'
3
- import { runLogic } from '@vue2-client/services/api/common'
4
-
5
- export default {
6
- name: 'Demo',
7
- components: { XDescriptionsGroup },
8
- data () {
9
- return {
10
- visible: false,
11
- userinfo: {
12
- f_userinfo_code: '143400000003',
13
- f_gasbrand: '测试表品牌'
14
- }
15
- }
16
- },
17
- methods: {
18
- open () {
19
- runLogic('querySingleUserDetail', {
20
- f_userinfo_code: '143400000003'
21
- }, 'af-revenue').then(res => {
22
- this.userinfo = res
23
- this.visible = true
24
- })
25
- }
26
- }
27
- }
28
- </script>
29
-
30
- <template>
31
- <div>
32
- <a-button @click="open">
33
- 展开详情
34
- </a-button>
35
- <a-drawer
36
- title="描述列表详情"
37
- placement="right"
38
- width="65vw"
39
- :body-style="{height:'92%'}"
40
- :visible="visible"
41
- @close="()=>{visible = false}"
42
- >
43
- <x-descriptions-group config-name="用户详情描述列表" :showLeftTab="true" :data="userinfo" service-name="af-revenue"/>
44
- </a-drawer>
45
- </div>
46
- </template>
47
-
48
- <style scoped lang="less">
49
-
50
- </style>
1
+ <script>
2
+ import XDescriptionsGroup from '@vue2-client/base-client/components/common/XDescriptions/XDescriptionsGroup.vue'
3
+
4
+ export default {
5
+ name: 'Demo',
6
+ components: { XDescriptionsGroup },
7
+ data () {
8
+ return {
9
+ visible: false,
10
+ userinfo: {
11
+ f_userinfo_code: '143400000003',
12
+ f_gasbrand: '测试表品牌',
13
+ f_address: '11'
14
+ }
15
+ }
16
+ },
17
+ methods: {
18
+ open () {
19
+ // runLogic('querySingleUserDetail', {
20
+ // f_userinfo_code: '143400000003'
21
+ // }, 'af-revenue').then(res => {
22
+ // this.userinfo = res
23
+ // this.visible = true
24
+ // })
25
+ this.visible = true
26
+ }
27
+ }
28
+ }
29
+ </script>
30
+
31
+ <template>
32
+ <div>
33
+ <a-button @click="open">
34
+ 展开详情
35
+ </a-button>
36
+ <a-drawer
37
+ title="描述列表详情"
38
+ placement="right"
39
+ width="65vw"
40
+ :body-style="{height:'92%'}"
41
+ :visible="visible"
42
+ @close="()=>{visible = false}"
43
+ >
44
+ <x-descriptions-group config-name="测试Config" :showLeftTab="true" :data="userinfo" service-name="af-system"/>
45
+ </a-drawer>
46
+ </div>
47
+ </template>
48
+
49
+ <style scoped lang="less">
50
+
51
+ </style>
@@ -1,46 +1,39 @@
1
- <script>
2
- import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'
3
- import { getConfigByNameAsync } from '@vue2-client/services/api/common'
4
-
5
- export default {
6
- name: 'Demo',
7
- components: { XFormGroup },
8
- data () {
9
- return {
10
- visible: true
11
- }
12
- },
13
- created () {
14
- getConfigByNameAsync('addUserGeneralInfoFrom', 'af-revenue').then(res => {
15
- this.$refs.xFormGroupDemo.init({
16
- ...res,
17
- serviceName: 'af-revenue',
18
- showLeftTab: true,
19
- })
20
- })
21
- },
22
- methods: {
23
- submitForm () {
24
- this.$refs.xFormGroupDemo.onSubmit().then(res => {
25
- console.log('所有表单的结果', res)
26
- })
27
- }
28
- }
29
- }
30
- </script>
31
-
32
- <template>
33
- <a-modal
34
- v-model="visible"
35
- :bodyStyle="{height:'70vh'}"
36
- :dialog-style="{ top: '30px' }"
37
- title="测试表单组"
38
- @ok="submitForm"
39
- width="85vw">
40
- <x-form-group ref="xFormGroupDemo"></x-form-group>
41
- </a-modal>
42
- </template>
43
-
44
- <style scoped lang="less">
45
-
46
- </style>
1
+ <script>
2
+ import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'
3
+ import { getConfigByNameAsync } from '@vue2-client/services/api/common'
4
+
5
+ export default {
6
+ name: 'Demo',
7
+ components: { XFormGroup },
8
+ data () {
9
+ return {
10
+ visible: true
11
+ }
12
+ },
13
+ created () {
14
+ getConfigByNameAsync('testFormGroup', 'af-revenue').then(res => {
15
+ this.$refs.xFormGroupDemo.init({
16
+ ...res,
17
+ serviceName: 'af-revenue',
18
+ showLeftTab: true,
19
+ })
20
+ })
21
+ },
22
+ methods: {
23
+ submitForm () {
24
+ this.$refs.xFormGroupDemo.onSubmit().then(res => {
25
+ console.log('所有表单的结果', res)
26
+ })
27
+ }
28
+ }
29
+ }
30
+ </script>
31
+
32
+ <template>
33
+
34
+ <x-form-group ref="xFormGroupDemo"></x-form-group>
35
+ </template>
36
+
37
+ <style scoped lang="less">
38
+
39
+ </style>
@@ -1,60 +1,60 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <!-- <a-button @click="()=>{queryParamsName = 'MeterBookUnallocatedUserCRUD'}">测试1</a-button>-->
4
- <!-- <a-button @click="()=>{queryParamsName = 'MeterBookUnallocatedAreaCRUD'}">测试2</a-button>-->
5
- <x-form-table
6
- title="示例表单"
7
- :queryParamsName="queryParamsName"
8
- :fixedAddForm="fixedAddForm"
9
- service-name="af-system"
10
- @action="action"
11
- @columnClick="columnClick"
12
- ref="xFormTable">
13
- </x-form-table>
14
- </a-card>
15
- </template>
16
-
17
- <script>
18
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
19
- import { microDispatch } from '@vue2-client/utils/microAppUtils'
20
- export default {
21
- name: 'Demo',
22
- components: {
23
- XFormTable
24
- },
25
- data () {
26
- return {
27
- // 查询配置文件名
28
- queryParamsName: 'ceshiCRUD',
29
- // 查询配置左侧tree
30
- // xTreeConfigName: 'addressType',
31
- // 新增表单固定值
32
- fixedAddForm: {},
33
- // 是否显示详情抽屉
34
- detailVisible: false,
35
- // 当前记录
36
- record: {}
37
- }
38
- },
39
- methods: {
40
- columnClick (key, value, record) {
41
- microDispatch({ type: 'v3route', path: '/bingliguanli/dianzibingliluru', props: { selected: arguments[0].his_f_admission_id } })
42
- },
43
- action (record, id, actionType) {
44
- this.detailVisible = true
45
- console.log('触发了详情操作', record, id, actionType)
46
- },
47
- onClose () {
48
- this.detailVisible = false
49
- // 关闭详情之后重新查询表单
50
- this.$refs.xFormTable.refreshTable(true)
51
- }
52
- },
53
- computed: {
54
- },
55
- }
56
- </script>
57
-
58
- <style scoped>
59
-
60
- </style>
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <!-- <a-button @click="()=>{queryParamsName = 'MeterBookUnallocatedUserCRUD'}">测试1</a-button>-->
4
+ <!-- <a-button @click="()=>{queryParamsName = 'MeterBookUnallocatedAreaCRUD'}">测试2</a-button>-->
5
+ <x-form-table
6
+ title="示例表单"
7
+ :queryParamsName="queryParamsName"
8
+ :fixedAddForm="fixedAddForm"
9
+ service-name="af-system"
10
+ @action="action"
11
+ @columnClick="columnClick"
12
+ ref="xFormTable">
13
+ </x-form-table>
14
+ </a-card>
15
+ </template>
16
+
17
+ <script>
18
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
19
+ import { microDispatch } from '@vue2-client/utils/microAppUtils'
20
+ export default {
21
+ name: 'Demo',
22
+ components: {
23
+ XFormTable
24
+ },
25
+ data () {
26
+ return {
27
+ // 查询配置文件名
28
+ queryParamsName: 'ceshiCRUD',
29
+ // 查询配置左侧tree
30
+ // xTreeConfigName: 'addressType',
31
+ // 新增表单固定值
32
+ fixedAddForm: {},
33
+ // 是否显示详情抽屉
34
+ detailVisible: false,
35
+ // 当前记录
36
+ record: {}
37
+ }
38
+ },
39
+ methods: {
40
+ columnClick (key, value, record) {
41
+ microDispatch({ type: 'v3route', path: '/bingliguanli/dianzibingliluru', props: { selected: arguments[0].his_f_admission_id } })
42
+ },
43
+ action (record, id, actionType) {
44
+ this.detailVisible = true
45
+ console.log('触发了详情操作', record, id, actionType)
46
+ },
47
+ onClose () {
48
+ this.detailVisible = false
49
+ // 关闭详情之后重新查询表单
50
+ this.$refs.xFormTable.refreshTable(true)
51
+ }
52
+ },
53
+ computed: {
54
+ },
55
+ }
56
+ </script>
57
+
58
+ <style scoped>
59
+
60
+ </style>