@tongfun/tf-widget 0.1.15 → 0.1.20

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 (111) hide show
  1. package/.browserslistrc +3 -3
  2. package/.editorconfig +5 -5
  3. package/.eslintrc.js +17 -17
  4. package/README.md +46 -39
  5. package/lib/css/1.841c5d60.css +1 -0
  6. package/lib/tf-widget.common.1.js +10 -18
  7. package/lib/tf-widget.common.js +2838 -5940
  8. package/lib/tf-widget.css +1 -1
  9. package/lib/tf-widget.umd.1.js +10 -18
  10. package/lib/tf-widget.umd.js +2838 -5940
  11. package/lib/tf-widget.umd.min.1.js +1 -1
  12. package/lib/tf-widget.umd.min.js +4 -13
  13. package/package/svg-icon/index.js +8 -8
  14. package/package/svg-icon/src/SvgIcon.vue +59 -59
  15. package/package/t-data-list/index.js +6 -6
  16. package/package/t-data-list/main.vue +193 -192
  17. package/package/t-data-list/src/condition-input/basic.vue +31 -31
  18. package/package/t-data-list/src/condition-input/date.vue +106 -106
  19. package/package/t-data-list/src/condition-input/index.vue +100 -100
  20. package/package/t-data-list/src/condition-input/input.vue +31 -31
  21. package/package/t-data-list/src/condition-input/number.vue +115 -115
  22. package/package/t-data-list/src/condition-input/select.vue +86 -86
  23. package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
  24. package/package/t-data-list/src/js/operatorEnum.js +108 -109
  25. package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
  26. package/package/t-data-list/src/js/util.js +34 -34
  27. package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -77
  28. package/package/t-data-list/src/pushdown/push-down.vue +158 -158
  29. package/package/t-data-list/src/t-list-search.vue +36 -32
  30. package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
  31. package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
  32. package/package/t-data-list/src/t-plan/index.vue +195 -190
  33. package/package/t-data-list/src/t-plan/plan-content.vue +389 -396
  34. package/package/t-data-list/src/t-table/index.vue +129 -120
  35. package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
  36. package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
  37. package/package/t-data-list/src/t-table/table-group.vue +180 -179
  38. package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -250
  39. package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
  40. package/package/t-data-list/src/t-table/table-records.vue +337 -324
  41. package/package/t-input/children/address.vue +101 -101
  42. package/package/t-input/children/basic-display.vue +41 -41
  43. package/package/t-input/children/basic.vue +253 -251
  44. package/package/t-input/children/date.vue +89 -89
  45. package/package/t-input/children/group-components/group-dialog.vue +344 -350
  46. package/package/t-input/children/group.vue +126 -126
  47. package/package/t-input/children/input.vue +72 -72
  48. package/package/t-input/children/number.vue +74 -74
  49. package/package/t-input/children/select.vue +89 -89
  50. package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
  51. package/package/t-input/index.js +7 -7
  52. package/package/t-input/index.vue +337 -337
  53. package/package/t-input/tInputCache.js +24 -24
  54. package/package/tf-icon-picker/README.md +8 -0
  55. package/package/tf-icon-picker/index.js +8 -8
  56. package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
  57. package/package/tf-layout/README.md +115 -115
  58. package/package/tf-layout/index.js +8 -8
  59. package/package/tf-layout/src/components/tf-labelbar.vue +382 -382
  60. package/package/tf-layout/src/components/tf-menu.vue +180 -180
  61. package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
  62. package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
  63. package/package/tf-layout/src/tf-layout.vue +120 -120
  64. package/package/tf-widget/index.js +8 -8
  65. package/package/tf-widget/src/assets/common-input.less +10 -10
  66. package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
  67. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1082
  68. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
  69. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
  70. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
  71. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
  72. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
  73. package/package/tf-widget/src/children/date-time.vue +103 -103
  74. package/package/tf-widget/src/children/date.vue +103 -103
  75. package/package/tf-widget/src/children/decimal.vue +115 -115
  76. package/package/tf-widget/src/children/integer.vue +104 -104
  77. package/package/tf-widget/src/children/property.vue +59 -59
  78. package/package/tf-widget/src/children/single-line-text.vue +82 -82
  79. package/package/tf-widget/src/children/small-pictures.vue +223 -223
  80. package/package/tf-widget/src/children/text-area.vue +74 -74
  81. package/package/tf-widget/src/children/tf-select.vue +113 -113
  82. package/package/tf-widget/src/tf-widget.vue +175 -175
  83. package/package.json +44 -43
  84. package/postinstall.js +10 -10
  85. package/src/api/edit.js +97 -97
  86. package/src/api/file-enclosure.js +26 -26
  87. package/src/api/push-down.js +19 -19
  88. package/src/api/table.js +294 -294
  89. package/src/api/tableV3.js +160 -186
  90. package/src/assets/images/icons/index.js +9 -9
  91. package/src/assets/images/icons/svg/add.svg +5 -5
  92. package/src/assets/images/icons/svg/push-down.svg +1 -1
  93. package/src/assets/images/icons/svg/remove.svg +1 -1
  94. package/src/assets/styles/common-table.less +202 -202
  95. package/src/directives/debounce.js +24 -0
  96. package/src/index.js +31 -31
  97. package/src/mixins/t-data-query-mixin.js +290 -289
  98. package/src/utils/auth.js +22 -22
  99. package/src/utils/request.js +42 -42
  100. package/src/utils/stato-anormale.js +59 -59
  101. package/src/utils/utils.js +109 -109
  102. package/src/utils/validate.js +84 -84
  103. package/dist/css/chunk-9c7a8e06.920744ef.css +0 -1
  104. package/dist/css/chunk-vendors.de967301.css +0 -1
  105. package/dist/css/index.153bd82e.css +0 -1
  106. package/dist/fonts/element-icons.535877f5.woff +0 -0
  107. package/dist/fonts/element-icons.732389de.ttf +0 -0
  108. package/dist/js/chunk-9c7a8e06.ffff58b5.js +0 -1
  109. package/dist/js/chunk-vendors.45086d09.js +0 -39
  110. package/dist/js/index.52bcef0d.js +0 -1
  111. package/lib/css/1.920744ef.css +0 -1
@@ -1,175 +1,175 @@
1
- <template>
2
- <component
3
- :is="type"
4
- :value="value"
5
- v-bind="property"
6
- :default-value="defaultValue"
7
- :scope-data="type === 'basic_data' ? scopeData : null"
8
- :in-entity="inEntity"
9
- :enumtype="enumType"
10
- :table-id="tableId"
11
- :field="field"
12
- :widgets="widgets"
13
- :relation-fields="relationFields"
14
- :much-select="muchSelect"
15
- :input-more-select="inputMoreSelect"
16
- :specific-cache="specificCache"
17
- :disabled="disablesControl"
18
- :for-dead-component-flag="forDeadComponentFlag"
19
- @input="handleInput"
20
- @addMuchData="addMuchData"
21
- @handleSelected="handleSelected"
22
- @rowClose="rowClose"
23
- @receiptClose="receiptClose"
24
- v-on="$listeners"
25
- />
26
- </template>
27
- <script>
28
- import BasicData from './children/basic-data/basic-data.vue'
29
- import TDate from './children/date'
30
- import SingleLineText from './children/single-line-text'
31
- import TextArea from './children/text-area'
32
- import DropDownList from './children/tf-select'
33
- import Decimal from './children/decimal'
34
- import Integer from './children/integer'
35
- import Property from './children/property'
36
- import dateTime from './children/date-time'
37
- import smallPictures from './children/small-pictures'
38
-
39
- export default {
40
- name: 'TfWidget',
41
- components: {
42
- basic_data: BasicData,
43
- single_line_text: SingleLineText,
44
- text_area: TextArea,
45
- drop_down_list: DropDownList,
46
- date: TDate,
47
- decimal: Decimal,
48
- integer: Integer,
49
- index: Integer,
50
- property: Property,
51
- datetime: dateTime,
52
- small_pictures: smallPictures
53
- },
54
- props: {
55
- // 控件类型
56
- type: {
57
- type: String,
58
- default: ''
59
- },
60
- // 双向绑定
61
- value: {
62
- type: [String, Number, Object, Array],
63
- default: undefined
64
- },
65
- // 当前控件所在单据体的行的数据(用来实现属性自动填充
66
- scopeData: {
67
- type: Object,
68
- default: null
69
- },
70
- // 控件是否在单据体当中(采用不同的样式和赋值策略)
71
- inEntity: {
72
- type: Boolean,
73
- default: false
74
- },
75
- enumType: {
76
- type: String,
77
- default: ''
78
- },
79
- // 检索使用的tableid
80
- tableId: {
81
- type: String,
82
- default: ''
83
- },
84
- // 绑定的字段
85
- field: {
86
- type: String,
87
- default: ''
88
- },
89
- // 允许多选(用于基础资料)
90
- muchSelect: {
91
- type: Boolean,
92
- default: false
93
- },
94
- // (用于基础资料)
95
- widgets: {
96
- type: Array,
97
- default: () => []
98
- },
99
- // 关联属性
100
- relationFields: {
101
- type: Object,
102
- default: null
103
- },
104
- /**
105
- * 控件需要的所有信息集合对象
106
- */
107
- property: {
108
- type: Object,
109
- default: () => {
110
- return {}
111
- }
112
- },
113
- inputMoreSelect: {
114
- type: Boolean,
115
- default: false
116
- },
117
- // 另外一个控制组件是否显示的属性(与自有的disabled联合确认属性值)
118
- selfDisabled: {
119
- type: Boolean,
120
- default: false
121
- },
122
- // 特殊组件的缓存,非必填
123
- specificCache: {
124
- type: Object,
125
- default: () => {
126
- return {}
127
- }
128
- },
129
- forDeadComponentFlag: { // 此标识用于写死的组件,将事件发射出去自己处理
130
- type: Boolean,
131
- default: false
132
- }
133
- },
134
- data () {
135
- return {
136
- }
137
- },
138
- computed: {
139
- defaultValue: function () {
140
- return this.property.default_value
141
- },
142
- disablesControl: function () {
143
- return this.selfDisabled || this.property.disabled
144
- }
145
- },
146
- watch: {
147
-
148
- value: {
149
- handler: function (newValue) {
150
- }
151
- }
152
- },
153
- methods: {
154
- handleInput (newValue) {
155
- this.$emit('input', newValue)
156
- },
157
- addMuchData (value) {
158
- this.$emit('addMuchData', value)
159
- },
160
- handleSelected (value) {
161
- this.$emit('handleSelected', value)
162
- },
163
- receiptClose (value) {
164
- this.$emit('receiptClose', value)
165
- },
166
- rowClose (value) {
167
- this.$emit('rowClose', value)
168
- }
169
- }
170
- }
171
- </script>
172
-
173
- <style scoped>
174
-
175
- </style>
1
+ <template>
2
+ <component
3
+ :is="type"
4
+ :value="value"
5
+ v-bind="property"
6
+ :default-value="defaultValue"
7
+ :scope-data="type === 'basic_data' ? scopeData : null"
8
+ :in-entity="inEntity"
9
+ :enumtype="enumType"
10
+ :table-id="tableId"
11
+ :field="field"
12
+ :widgets="widgets"
13
+ :relation-fields="relationFields"
14
+ :much-select="muchSelect"
15
+ :input-more-select="inputMoreSelect"
16
+ :specific-cache="specificCache"
17
+ :disabled="disablesControl"
18
+ :for-dead-component-flag="forDeadComponentFlag"
19
+ @input="handleInput"
20
+ @addMuchData="addMuchData"
21
+ @handleSelected="handleSelected"
22
+ @rowClose="rowClose"
23
+ @receiptClose="receiptClose"
24
+ v-on="$listeners"
25
+ />
26
+ </template>
27
+ <script>
28
+ import BasicData from './children/basic-data/basic-data.vue'
29
+ import TDate from './children/date'
30
+ import SingleLineText from './children/single-line-text'
31
+ import TextArea from './children/text-area'
32
+ import DropDownList from './children/tf-select'
33
+ import Decimal from './children/decimal'
34
+ import Integer from './children/integer'
35
+ import Property from './children/property'
36
+ import dateTime from './children/date-time'
37
+ import smallPictures from './children/small-pictures'
38
+
39
+ export default {
40
+ name: 'TfWidget',
41
+ components: {
42
+ basic_data: BasicData,
43
+ single_line_text: SingleLineText,
44
+ text_area: TextArea,
45
+ drop_down_list: DropDownList,
46
+ date: TDate,
47
+ decimal: Decimal,
48
+ integer: Integer,
49
+ index: Integer,
50
+ property: Property,
51
+ datetime: dateTime,
52
+ small_pictures: smallPictures
53
+ },
54
+ props: {
55
+ // 控件类型
56
+ type: {
57
+ type: String,
58
+ default: ''
59
+ },
60
+ // 双向绑定
61
+ value: {
62
+ type: [String, Number, Object, Array],
63
+ default: undefined
64
+ },
65
+ // 当前控件所在单据体的行的数据(用来实现属性自动填充
66
+ scopeData: {
67
+ type: Object,
68
+ default: null
69
+ },
70
+ // 控件是否在单据体当中(采用不同的样式和赋值策略)
71
+ inEntity: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ enumType: {
76
+ type: String,
77
+ default: ''
78
+ },
79
+ // 检索使用的tableid
80
+ tableId: {
81
+ type: String,
82
+ default: ''
83
+ },
84
+ // 绑定的字段
85
+ field: {
86
+ type: String,
87
+ default: ''
88
+ },
89
+ // 允许多选(用于基础资料)
90
+ muchSelect: {
91
+ type: Boolean,
92
+ default: false
93
+ },
94
+ // (用于基础资料)
95
+ widgets: {
96
+ type: Array,
97
+ default: () => []
98
+ },
99
+ // 关联属性
100
+ relationFields: {
101
+ type: Object,
102
+ default: null
103
+ },
104
+ /**
105
+ * 控件需要的所有信息集合对象
106
+ */
107
+ property: {
108
+ type: Object,
109
+ default: () => {
110
+ return {}
111
+ }
112
+ },
113
+ inputMoreSelect: {
114
+ type: Boolean,
115
+ default: false
116
+ },
117
+ // 另外一个控制组件是否显示的属性(与自有的disabled联合确认属性值)
118
+ selfDisabled: {
119
+ type: Boolean,
120
+ default: false
121
+ },
122
+ // 特殊组件的缓存,非必填
123
+ specificCache: {
124
+ type: Object,
125
+ default: () => {
126
+ return {}
127
+ }
128
+ },
129
+ forDeadComponentFlag: { // 此标识用于写死的组件,将事件发射出去自己处理
130
+ type: Boolean,
131
+ default: false
132
+ }
133
+ },
134
+ data () {
135
+ return {
136
+ }
137
+ },
138
+ computed: {
139
+ defaultValue: function () {
140
+ return this.property.default_value
141
+ },
142
+ disablesControl: function () {
143
+ return this.selfDisabled || this.property.disabled
144
+ }
145
+ },
146
+ watch: {
147
+
148
+ value: {
149
+ handler: function (newValue) {
150
+ }
151
+ }
152
+ },
153
+ methods: {
154
+ handleInput (newValue) {
155
+ this.$emit('input', newValue)
156
+ },
157
+ addMuchData (value) {
158
+ this.$emit('addMuchData', value)
159
+ },
160
+ handleSelected (value) {
161
+ this.$emit('handleSelected', value)
162
+ },
163
+ receiptClose (value) {
164
+ this.$emit('receiptClose', value)
165
+ },
166
+ rowClose (value) {
167
+ this.$emit('rowClose', value)
168
+ }
169
+ }
170
+ }
171
+ </script>
172
+
173
+ <style scoped>
174
+
175
+ </style>
package/package.json CHANGED
@@ -1,43 +1,44 @@
1
- {
2
- "name": "@tongfun/tf-widget",
3
- "version": "0.1.15",
4
- "description": "tf-widget",
5
- "main": "lib/tf-widget.umd.js",
6
- "private": false,
7
- "license": "MIT",
8
- "author": "blackspace,t-bug",
9
- "scripts": {
10
- "serve": "vue-cli-service serve",
11
- "build": "vue-cli-service build",
12
- "lint": "vue-cli-service lint",
13
- "lib": "vue-cli-service build --target lib --name tf-widget --dest lib src/index.js",
14
- "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
15
- },
16
- "dependencies": {
17
- "axios": "^0.21.1",
18
- "core-js": "^3.6.5",
19
- "element-ui": "^2.15.5",
20
- "js-base64": "^3.6.0",
21
- "less": "^4.1.0",
22
- "less-loader": "^7.2.1",
23
- "sortablejs": "^1.13.0",
24
- "vue": "^2.6.11",
25
- "vue2-datepicker": "^3.10.4",
26
- "vuedraggable": "^2.24.3"
27
- },
28
- "devDependencies": {
29
- "@vue/cli-plugin-babel": "~4.5.0",
30
- "@vue/cli-plugin-eslint": "~4.5.0",
31
- "@vue/cli-service": "~4.5.0",
32
- "@vue/eslint-config-standard": "^5.1.2",
33
- "babel-eslint": "^10.1.0",
34
- "eslint": "^6.7.2",
35
- "eslint-plugin-import": "^2.20.2",
36
- "eslint-plugin-node": "^11.1.0",
37
- "eslint-plugin-promise": "^4.2.1",
38
- "eslint-plugin-standard": "^4.0.0",
39
- "eslint-plugin-vue": "^6.2.2",
40
- "svg-sprite-loader": "^5.2.1",
41
- "vue-template-compiler": "^2.6.11"
42
- }
43
- }
1
+ {
2
+ "name": "@tongfun/tf-widget",
3
+ "version": "0.1.20",
4
+ "description": "tf-widget",
5
+ "main": "lib/tf-widget.umd.js",
6
+ "private": false,
7
+ "license": "MIT",
8
+ "author": "blackspace,t-bug",
9
+ "scripts": {
10
+ "serve": "vue-cli-service serve",
11
+ "build": "vue-cli-service build",
12
+ "lint": "vue-cli-service lint",
13
+ "lib": "vue-cli-service build --target lib --name tf-widget --dest lib src/index.js",
14
+ "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"",
15
+ "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch package -C -e js,vue,less --debug -x \"npm run lib && yalc push\" "
16
+ },
17
+ "dependencies": {
18
+ "axios": "^0.21.1",
19
+ "core-js": "^3.6.5",
20
+ "element-ui": "^2.15.5",
21
+ "js-base64": "^3.6.0",
22
+ "less": "^4.1.0",
23
+ "less-loader": "^7.2.1",
24
+ "sortablejs": "^1.13.0",
25
+ "vue": "^2.6.11",
26
+ "vue2-datepicker": "^3.10.4",
27
+ "vuedraggable": "^2.24.3"
28
+ },
29
+ "devDependencies": {
30
+ "@vue/cli-plugin-babel": "~4.5.0",
31
+ "@vue/cli-plugin-eslint": "~4.5.0",
32
+ "@vue/cli-service": "~4.5.0",
33
+ "@vue/eslint-config-standard": "^5.1.2",
34
+ "babel-eslint": "^10.1.0",
35
+ "eslint": "^6.7.2",
36
+ "eslint-plugin-import": "^2.20.2",
37
+ "eslint-plugin-node": "^11.1.0",
38
+ "eslint-plugin-promise": "^4.2.1",
39
+ "eslint-plugin-standard": "^4.0.0",
40
+ "eslint-plugin-vue": "^6.2.2",
41
+ "svg-sprite-loader": "^5.2.1",
42
+ "vue-template-compiler": "^2.6.11"
43
+ }
44
+ }
package/postinstall.js CHANGED
@@ -1,10 +1,10 @@
1
-
2
- const BANNER = '\u001B[96mThank you for using tf-widget for polyfilling JavaScript standard library!\u001B[0m\n\n' +
3
- '\u001B[96mWe need the best of you! Come and join us\n\n' +
4
- '\u001B[96mWe are waiting for you\n'
5
-
6
- function showBanner () {
7
- console.log(BANNER)
8
- }
9
-
10
- showBanner()
1
+
2
+ const BANNER = '\u001B[96mThank you for using tf-widget for polyfilling JavaScript standard library!\u001B[0m\n\n' +
3
+ '\u001B[96mWe need the best of you! Come and join us\n\n' +
4
+ '\u001B[96mWe are waiting for you\n'
5
+
6
+ function showBanner () {
7
+ console.log(BANNER)
8
+ }
9
+
10
+ showBanner()
package/src/api/edit.js CHANGED
@@ -1,97 +1,97 @@
1
- import request from '@/utils/request.js'
2
-
3
- /**
4
- * 获取编辑页面的布局信息
5
- */
6
- export function getFormConfig (tableId) {
7
- return request({
8
- url: '/api/crud/layout/editV2',
9
- method: 'get',
10
- params: { tableId }
11
- })
12
- }
13
-
14
- /**
15
- * 获取枚举的可选项
16
- */
17
- export function getEnumOptions (enumType) {
18
- return request({
19
- url: '/api/crud/uCrudEnum/type',
20
- method: 'get',
21
- params: { type: enumType }
22
- })
23
- }
24
-
25
- /**
26
- * 获取基础资料的搜索建议
27
- */
28
- export function getBasicDataSearchAdvice (tableId, value) {
29
- const params = { tableId, value }
30
- return request({
31
- url: '/api/crud/filter/searchBasicDataSuggestion',
32
- method: 'get',
33
- params
34
- })
35
- }
36
-
37
- /**
38
- * 新增一张单据数据数据
39
- */
40
- export function insert (data) {
41
- return request({
42
- url: '/api/crud/insert',
43
- method: 'post',
44
- data
45
- })
46
- }
47
-
48
- /**
49
- * 获取一张单据的数据
50
- */
51
- export function getFormData (data) {
52
- return request({
53
- url: '/api/crud/selSingleReceipt',
54
- method: 'post',
55
- data
56
- })
57
- }
58
-
59
- /**
60
- *更新单据数据
61
- */
62
- export function update (data) {
63
- return request({
64
- url: '/api/crud/update',
65
- method: 'post',
66
- data
67
- })
68
- }
69
-
70
- /**
71
- * 获取经过单据转换后的数据
72
- */
73
- export function getConversionResult (data) {
74
- return request({
75
- url: '/api/crud/conversion/push',
76
- method: 'post',
77
- data
78
- })
79
- // return {
80
- // code: 0,
81
- // data: [
82
- // {},{}
83
- // ],
84
- // msg: 'jjjjj'
85
- // }
86
- }
87
-
88
- /**
89
- * 根据tableName获取tableId
90
- */
91
- export function getTableIdByTableName (tableName) {
92
- return request({
93
- url: '/api/crud/layout/getTableIdByName',
94
- method: 'get',
95
- params: { tableName }
96
- })
97
- }
1
+ import request from '@/utils/request.js'
2
+
3
+ /**
4
+ * 获取编辑页面的布局信息
5
+ */
6
+ export function getFormConfig (tableId) {
7
+ return request({
8
+ url: '/api/crud/layout/editV2',
9
+ method: 'get',
10
+ params: { tableId }
11
+ })
12
+ }
13
+
14
+ /**
15
+ * 获取枚举的可选项
16
+ */
17
+ export function getEnumOptions (enumType) {
18
+ return request({
19
+ url: '/api/crud/uCrudEnum/type',
20
+ method: 'get',
21
+ params: { type: enumType }
22
+ })
23
+ }
24
+
25
+ /**
26
+ * 获取基础资料的搜索建议
27
+ */
28
+ export function getBasicDataSearchAdvice (tableId, value) {
29
+ const params = { tableId, value }
30
+ return request({
31
+ url: '/api/crud/filter/searchBasicDataSuggestion',
32
+ method: 'get',
33
+ params
34
+ })
35
+ }
36
+
37
+ /**
38
+ * 新增一张单据数据数据
39
+ */
40
+ export function insert (data) {
41
+ return request({
42
+ url: '/api/crud/insert',
43
+ method: 'post',
44
+ data
45
+ })
46
+ }
47
+
48
+ /**
49
+ * 获取一张单据的数据
50
+ */
51
+ export function getFormData (data) {
52
+ return request({
53
+ url: '/api/crud/selSingleReceipt',
54
+ method: 'post',
55
+ data
56
+ })
57
+ }
58
+
59
+ /**
60
+ *更新单据数据
61
+ */
62
+ export function update (data) {
63
+ return request({
64
+ url: '/api/crud/update',
65
+ method: 'post',
66
+ data
67
+ })
68
+ }
69
+
70
+ /**
71
+ * 获取经过单据转换后的数据
72
+ */
73
+ export function getConversionResult (data) {
74
+ return request({
75
+ url: '/api/crud/conversion/push',
76
+ method: 'post',
77
+ data
78
+ })
79
+ // return {
80
+ // code: 0,
81
+ // data: [
82
+ // {},{}
83
+ // ],
84
+ // msg: 'jjjjj'
85
+ // }
86
+ }
87
+
88
+ /**
89
+ * 根据tableName获取tableId
90
+ */
91
+ export function getTableIdByTableName (tableName) {
92
+ return request({
93
+ url: '/api/crud/layout/getTableIdByName',
94
+ method: 'get',
95
+ params: { tableName }
96
+ })
97
+ }