@tongfun/tf-widget 0.1.6 → 0.1.10

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 (80) hide show
  1. package/.browserslistrc +3 -3
  2. package/.editorconfig +5 -5
  3. package/.eslintrc.js +17 -17
  4. package/README.md +39 -8
  5. package/dist/css/chunk-9c7a8e06.920744ef.css +1 -0
  6. package/dist/css/chunk-vendors.de967301.css +1 -0
  7. package/dist/css/index.153bd82e.css +1 -0
  8. package/dist/fonts/element-icons.535877f5.woff +0 -0
  9. package/dist/fonts/element-icons.732389de.ttf +0 -0
  10. package/dist/js/chunk-9c7a8e06.ffff58b5.js +1 -0
  11. package/dist/js/chunk-vendors.45086d09.js +39 -0
  12. package/dist/js/index.52bcef0d.js +1 -0
  13. package/lib/css/1.920744ef.css +1 -0
  14. package/lib/tf-widget.common.1.js +387 -0
  15. package/lib/tf-widget.common.js +85007 -63712
  16. package/lib/tf-widget.css +1 -1
  17. package/lib/tf-widget.umd.1.js +387 -0
  18. package/lib/tf-widget.umd.js +85007 -63712
  19. package/lib/tf-widget.umd.min.1.js +1 -0
  20. package/lib/tf-widget.umd.min.js +10 -3
  21. package/package/t-data-list/index.js +6 -0
  22. package/package/t-data-list/main.vue +192 -0
  23. package/package/t-data-list/src/condition-input/basic.vue +31 -0
  24. package/package/t-data-list/src/condition-input/date.vue +106 -0
  25. package/package/t-data-list/src/condition-input/index.vue +100 -0
  26. package/package/t-data-list/src/condition-input/input.vue +31 -0
  27. package/package/t-data-list/src/condition-input/number.vue +115 -0
  28. package/package/t-data-list/src/condition-input/select.vue +86 -0
  29. package/package/t-data-list/src/js/fieldTypeEnum.js +10 -0
  30. package/package/t-data-list/src/js/operatorEnum.js +109 -0
  31. package/package/t-data-list/src/js/qureyParamsEnum.js +4 -0
  32. package/package/t-data-list/src/js/util.js +34 -0
  33. package/package/t-data-list/src/mixins/button-controll-mixin.js +77 -0
  34. package/package/t-data-list/src/pushdown/push-down.vue +158 -0
  35. package/package/t-data-list/src/t-list-search.vue +32 -0
  36. package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -0
  37. package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -0
  38. package/package/t-data-list/src/t-plan/index.vue +190 -0
  39. package/package/t-data-list/src/t-plan/plan-content.vue +396 -0
  40. package/package/t-data-list/src/t-table/index.vue +120 -0
  41. package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -0
  42. package/package/t-data-list/src/t-table/table-group-item.vue +87 -0
  43. package/package/t-data-list/src/t-table/table-group.vue +179 -0
  44. package/package/t-data-list/src/t-table/table-records-header-popover.vue +250 -0
  45. package/package/t-data-list/src/t-table/table-records-selected.vue +159 -0
  46. package/package/t-data-list/src/t-table/table-records.vue +324 -0
  47. package/package/t-input/children/address.vue +101 -0
  48. package/package/t-input/children/basic-display.vue +41 -0
  49. package/package/t-input/children/basic.vue +251 -0
  50. package/package/t-input/children/date.vue +89 -0
  51. package/package/t-input/children/group-components/group-dialog.vue +350 -0
  52. package/package/t-input/children/group.vue +126 -0
  53. package/package/t-input/children/input.vue +72 -0
  54. package/package/t-input/children/number.vue +74 -0
  55. package/package/t-input/children/select.vue +89 -0
  56. package/package/t-input/children/tfile/fiile-enclosure.vue +233 -0
  57. package/package/t-input/children/tfile/file-img/comp.png +0 -0
  58. package/package/t-input/children/tfile/file-img/excel.png +0 -0
  59. package/package/t-input/children/tfile/file-img/img.png +0 -0
  60. package/package/t-input/children/tfile/file-img/pdf.png +0 -0
  61. package/package/t-input/children/tfile/file-img/word.png +0 -0
  62. package/package/t-input/index.js +7 -0
  63. package/package/t-input/index.vue +337 -0
  64. package/package/t-input/tInputCache.js +24 -0
  65. package/package/tf-layout/README.md +69 -0
  66. package/package/tf-layout/index.js +8 -0
  67. package/package/tf-layout/src/components/tf-labelbar.vue +376 -0
  68. package/package/tf-layout/src/components/tf-menu.vue +180 -0
  69. package/package/tf-layout/src/components/tf-right-menu.vue +89 -0
  70. package/package/tf-layout/src/components/tf-rotate-box.vue +50 -0
  71. package/package/tf-layout/src/tf-layout.vue +115 -0
  72. package/package/tf-widget/src/children/decimal.vue +15 -16
  73. package/package/tf-widget/src/children/integer.vue +15 -16
  74. package/package.json +4 -2
  75. package/postinstall.js +10 -10
  76. package/src/api/file-enclosure.js +26 -0
  77. package/src/api/push-down.js +19 -0
  78. package/src/api/tableV3.js +186 -0
  79. package/src/index.js +11 -3
  80. package/src/mixins/t-data-query-mixin.js +289 -0
@@ -0,0 +1,6 @@
1
+ import TDataList from './main.vue'
2
+
3
+ TDataList.install = function (Vue) {
4
+ Vue.component(TDataList.name, TDataList)
5
+ }
6
+ export default TDataList
@@ -0,0 +1,192 @@
1
+ <template>
2
+ <div class="page">
3
+ <div class="t-data-list-controll">
4
+ <div class="common-table-header">
5
+ <!--
6
+ 按钮区域
7
+ 以下按钮的处理逻辑统一在button-controll-mixin的混入对象当中
8
+ -->
9
+ <div class="common-table-buttons">
10
+ <slot name="insertReplace" />
11
+ <el-button v-if="!$slots.insertReplace" v-debounce type="primary" size="mini" @click="insert">新增</el-button>
12
+
13
+ <slot name="updateReplace" />
14
+ <el-button v-if="!$slots.updateReplace" v-debounce type="primary" size="mini" @click="update">修改</el-button>
15
+
16
+ <slot name="pushDownReplace" />
17
+ <el-button v-if="!$slots.pushDownReplace && pushDownTableName" v-debounce type="primary" size="mini" @click="showPushDown">下推</el-button>
18
+
19
+ <slot name="deleteReplace" />
20
+ <el-button v-if="!$slots.deleteReplace" v-debounce type="primary" size="mini" @click="del">删除 </el-button>
21
+
22
+ <el-button v-debounce type="primary" size="mini" @click="refresh(false,true)">刷新 </el-button>
23
+ <!-- <el-button type="primary" size="mini">批改</el-button> -->
24
+ <slot name="importAndExport" />
25
+ <slot name="buttons" />
26
+ </div>
27
+
28
+ <!-- 搜索输入框 -->
29
+ <TListSearch class="common-table-buttons-search" @search="handleSuggestMultiCondition($event)" />
30
+ </div>
31
+ <!--过滤方案-->
32
+ <Tplan :fields-option="tableLayout" @change="handlePlanConditionChange" />
33
+ </div>
34
+
35
+ <!--
36
+ 数据区域
37
+ layout:表格表头字段和类型
38
+ sum: 表格的底部合集行的数据,条件发生改变的时候获取新的结果,翻页不获取
39
+ show-summary
40
+ data:表格的数据
41
+ enableGroup:是否显示分组,一般基础资料列表显示分组,业务列表不显示
42
+ enable-group-edit: 分组是否可以编辑(添加修改,一般基础资料列表中可以修改,弹窗中不允许修改
43
+ page-size:每页条数
44
+ current-page:当前页数
45
+ update-in-dialog:点击编辑或者双击数据行的时候,不进行页面跳转,而是将该行的id发射出来
46
+ @groupChange:监听分组条件改变
47
+ @conditionChange 监听到表头条件改变
48
+ @size-change 监听每页条数改变
49
+ @current-change 监听当前页改
50
+ @dbclick 处理双击事件
51
+ @dbRowClick 也是双击事件,但是当前行的数据被事件发射出来
52
+ -->
53
+ <Ttable
54
+ class="t-table"
55
+ :layout="tableLayout"
56
+ :sum="tableSum"
57
+ show-summary
58
+ :data="tableData"
59
+ :disable-sum="disableSum"
60
+ :enable-group="enableGroup"
61
+ enable-group-edit
62
+ :page-size="query.pageSize"
63
+ :current-page="query.pageNum"
64
+ :update-in-dialog="getDbId"
65
+ @condition-change="handleHeadChange"
66
+ @groupChange="handleGroupChange"
67
+ @size-change="handleSizeChange"
68
+ @current-change="handleCurrentChange"
69
+ @dbClick="handleDbClick"
70
+ @dbRowClick="$emit('dbRowClick',$event)"
71
+ />
72
+
73
+ <!-- 下推弹窗 -->
74
+ <PushDown
75
+ :visible.sync="pushdownVisible"
76
+ :push-down-table-name="pushDownTableName"
77
+ :parent-selection-data="ids"
78
+ />
79
+ </div>
80
+ </template>
81
+ <script>
82
+ import TListSearch from './src/t-list-search.vue'
83
+ import Tplan from './src/t-plan'
84
+ import Ttable from './src/t-table'
85
+ import PushDown from './src/pushdown/push-down.vue'
86
+ import buttonControll from './src/mixins/button-controll-mixin.js'
87
+ import dataQuery from '@/mixins/t-data-query-mixin.js'
88
+ export default {
89
+ name: 'TDataList',
90
+ components: {
91
+ Tplan, Ttable, PushDown, TListSearch
92
+ },
93
+ mixins: [buttonControll, dataQuery],
94
+ props: {
95
+ // 目标单据,接口地址的一部分,单据列表的标识符
96
+ target: {
97
+ type: String,
98
+ default: ''
99
+ },
100
+ pushDownTableName: {
101
+ type: String,
102
+ default: null
103
+ },
104
+ // 表格双击不跳转路由,而是将数据的id发射出来
105
+ getDbId: {
106
+ type: Boolean,
107
+ default: false
108
+ },
109
+ getDbRow: {
110
+ type: Boolean,
111
+ default: false
112
+ },
113
+ // 页面组件控制配置
114
+ showHeader: {
115
+ type: Boolean,
116
+ default: true
117
+ },
118
+ enableGroup: {
119
+ type: Boolean,
120
+ default: false
121
+ },
122
+ disableSum: {
123
+ type: Boolean,
124
+ default: false
125
+ }
126
+ },
127
+ data () {
128
+ return {
129
+ // 下推弹窗是否显示
130
+ pushdownVisible: false,
131
+ queryType: 'LIST'
132
+ }
133
+ },
134
+ created () {
135
+ this.getTableLayout()
136
+ },
137
+ methods: {
138
+ /**
139
+ * 方案进行切换/方案中的高级条件变化后进行查询
140
+ * 在方案中点击查促按钮触发此事件
141
+ * 也是列表页面第一次获取表格数据内容的入口
142
+ */
143
+ handlePlanConditionChange (value) {
144
+ this.queryPlanCondition = value.conditionMulti
145
+ this.query.conditionAlwaysList = value.conditionAlways
146
+ this.getTableData(false, true)
147
+ },
148
+ // 数据行被双击
149
+ handleDbClick (value) {
150
+ this.$emit('dbClick', value)
151
+ }
152
+ }
153
+ }
154
+ </script>
155
+
156
+ <style scoped lang='less'>
157
+ // 列表页面的外轮廓
158
+ .page{
159
+ height:100%;
160
+ margin:0 10px;
161
+ background-color: #F0F2F5;
162
+ border-radius:10px;
163
+ //按钮组和过滤条件所在列表的操控区域的样式
164
+ .t-data-list-controll {
165
+ // height:6vh;
166
+ border-radius: 4px;
167
+ padding: 1.1111vh 1.1111vh 0 1.1111vh;
168
+ background-color: #fff;
169
+ margin-bottom:10px;
170
+ .common-table-header{
171
+ display: flex;
172
+ justify-content: space-between;
173
+ .common-table-buttons{
174
+ min-width: 800px;
175
+ display: flex;
176
+ justify-content: flex-start;
177
+ .el-button{
178
+ background-color: #0c4c8e!important;
179
+ border-color: #0c4c8e;
180
+ }
181
+ }
182
+ .common-table-buttons-search{
183
+ height: 30px;
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ // .t-table{
190
+ // height: 80vh
191
+ // }
192
+ </style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <el-input :value="value" size="mini" :disabled="disabled" @input="handleInput" />
3
+ </template>
4
+ <script>
5
+ export default {
6
+ props: {
7
+ value: {
8
+ type: String,
9
+ default: ''
10
+ },
11
+ disabled: {
12
+ type: Boolean,
13
+ default: false
14
+ }
15
+ },
16
+ data () {
17
+ return {
18
+
19
+ }
20
+ },
21
+ methods: {
22
+ handleInput (newValue) {
23
+ this.$emit('input', newValue)
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+
29
+ <style scoped>
30
+
31
+ </style>
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <!-- <el-date-picker
3
+ :value="dateValue"
4
+ size="mini"
5
+ :type="type"
6
+ :disabled="disabled"
7
+ :format="timeFormmat"
8
+ value-format="yyyy-MM-dd HH:mm:ss"
9
+ style="width:100%"
10
+ @input="dateValue = $event"
11
+ /> -->
12
+ <DatePicker
13
+ v-model="dateValue"
14
+ class="wrapper"
15
+ range-separator="-"
16
+ :type="type"
17
+ value-type="YYYY-MM-DD HH:mm:ss"
18
+ confirm
19
+ confirm-text="确定"
20
+ :range="range"
21
+ :append-to-body="false"
22
+ :format="displayFormat"
23
+ />
24
+
25
+ </template>
26
+ <script>
27
+ import DatePicker from 'vue2-datepicker'
28
+ import 'vue2-datepicker/index.css'
29
+ import 'vue2-datepicker/locale/zh-cn'
30
+ export default {
31
+ components: {
32
+ DatePicker
33
+ },
34
+ props: {
35
+ value: {
36
+ type: String,
37
+ default: null
38
+ },
39
+ disabled: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ datetime: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ range: {
48
+ type: Boolean,
49
+ default: false
50
+ }
51
+ },
52
+ data () {
53
+ return {
54
+
55
+ }
56
+ },
57
+ computed: {
58
+ /**
59
+ * 时间范围element使用数组,时间使用字符串
60
+ * 该计算属性,始终保持外界的数据格式为字符串,如果是范围,将使用‘,’对两个值进行分割
61
+ */
62
+ dateValue: {
63
+ get () {
64
+ if (this.range) {
65
+ if (this.value) {
66
+ return this.value.split(',')
67
+ }
68
+ }
69
+ return this.value
70
+ },
71
+ set (value) {
72
+ if (this.range) {
73
+ return this.$emit('input', value.join())
74
+ }
75
+ this.$emit('input', value)
76
+ }
77
+ },
78
+ type () {
79
+ return this.datetime ? 'datetime' : 'date'
80
+ },
81
+ displayFormat () {
82
+ return this.datetime
83
+ ? 'YYYY-MM-DD HH:mm:ss'
84
+ : 'YYYY-MM-DD'
85
+ }
86
+ }
87
+ }
88
+ </script>
89
+
90
+ <style scoped lang='less'>
91
+ .wrapper {
92
+ height:100%;
93
+ width:100%;
94
+ height:100%;
95
+ width:100%;
96
+ ::v-deep .mx-input {
97
+ height:28px !important;
98
+ }
99
+ }
100
+ // .t-date-picker {
101
+ // height:100%;
102
+ // border:1px solid #dddfe6;
103
+ // width:100%;
104
+ // }
105
+
106
+ </style>
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div class="condition-input">
3
+ <component
4
+ :is="inputType"
5
+ :value="value"
6
+ :disabled="disabled"
7
+ :datetime="isDateTime"
8
+ :multi="multi"
9
+ :field="field"
10
+ :range="range"
11
+ :table-head="tableHead"
12
+ @input="handleInput"
13
+ />
14
+ <span class="err-msg">{{ errorMsg }}</span>
15
+ </div>
16
+ </template>
17
+ <script>
18
+ import cdate from './date.vue'
19
+ import cinput from './input.vue'
20
+ import cselect from './select.vue'
21
+ import cnumber from './number.vue'
22
+ import cbasic from './basic.vue'
23
+ export default {
24
+ components: {
25
+ cdate, cinput, cselect, cnumber, cbasic
26
+ },
27
+ props: {
28
+ type: {
29
+ type: String,
30
+ default: ''
31
+ },
32
+ value: {
33
+ type: String,
34
+ default: ''
35
+ },
36
+ disabled: {
37
+ type: Boolean,
38
+ default: false
39
+ },
40
+ // 当前的字段,用来获取枚举的选项的参数
41
+ field: {
42
+ type: String,
43
+ default: ''
44
+ },
45
+ // 是否开启多选,针对枚举类型的数据
46
+ multi: {
47
+ type: Boolean,
48
+ default: false
49
+ },
50
+ // 是否是范围类型的输入
51
+ range: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ // 当前的输入空间在表头上进行使用,使用不同样式和不同逻辑的判断依据
56
+ tableHead: {
57
+ type: Boolean,
58
+ default: false
59
+ }
60
+
61
+ },
62
+ data () {
63
+ return {
64
+ typeEnum: {
65
+ input: 'cinput',
66
+ enum: 'cselect',
67
+ date: 'cdate',
68
+ datetime: 'cdate',
69
+ number: 'cnumber',
70
+ basic: 'cbasic'
71
+ },
72
+ errorMsg: ''
73
+ }
74
+ },
75
+ computed: {
76
+ inputType () {
77
+ return this.typeEnum[this.type]
78
+ },
79
+ isDateTime () {
80
+ return this.type === 'datetime'
81
+ }
82
+ },
83
+ methods: {
84
+ handleInput (newValue) {
85
+ this.$emit('input', newValue)
86
+ }
87
+
88
+ }
89
+ }
90
+ </script>
91
+
92
+ <style lang='less' scoped>
93
+ .condition-input {
94
+ ::v-deep el-input {
95
+ box-sizing: border-box;
96
+
97
+ }
98
+ }
99
+
100
+ </style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <el-input :value="value" size="mini" :disabled="disabled" @input="handleInput" />
3
+ </template>
4
+ <script>
5
+ export default {
6
+ props: {
7
+ value: {
8
+ type: String,
9
+ default: ''
10
+ },
11
+ disabled: {
12
+ type: Boolean,
13
+ default: false
14
+ }
15
+ },
16
+ data () {
17
+ return {
18
+
19
+ }
20
+ },
21
+ methods: {
22
+ handleInput (newValue) {
23
+ this.$emit('input', newValue)
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+
29
+ <style scoped>
30
+
31
+ </style>
@@ -0,0 +1,115 @@
1
+ <template>
2
+ <el-input v-if="!range" :value="value" size="mini" @input="handleInput" />
3
+ <div v-else :class="[tableHead?'col-layout':'row-layout']">
4
+ <el-input :value="numberRangeValue.start" size="mini" @input="handleStartInput" />
5
+ <span class="number-separators">~</span>
6
+ <el-input :value="numberRangeValue.end" size="mini" @input="handleEndInput" />
7
+ </div>
8
+ </template>
9
+ <script>
10
+ export default {
11
+ components: {
12
+
13
+ },
14
+ props: {
15
+ value: {
16
+ type: String,
17
+ default: ''
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ range: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ tableHead: {
28
+ type: Boolean,
29
+ default: false
30
+ }
31
+ },
32
+ data () {
33
+ return {
34
+ numberRangeValue: {
35
+ start: '',
36
+ end: ''
37
+ }
38
+ }
39
+ },
40
+ watch: {
41
+ value () {
42
+ if (this.range) {
43
+ if (!this.value) return
44
+ const dataArr = this.value.split(',')
45
+ this.numberRangeValue.start = dataArr[0] || ''
46
+ this.numberRangeValue.end = dataArr[1] || ''
47
+ }
48
+ }
49
+ },
50
+ methods: {
51
+ /**
52
+ * 将输入转换为数字,如果不能转换则进行忽略
53
+ */
54
+ inputValid (value) {
55
+ return /^\d*$/g.test(value)
56
+ },
57
+
58
+ /**
59
+ * 非范围状态的输入处理函数
60
+ */
61
+ handleInput (value) {
62
+ if (!this.inputValid(value)) {
63
+ return
64
+ }
65
+ this.$emit('input', value)
66
+ },
67
+
68
+ /**
69
+ * 范围开始的输入处理
70
+ */
71
+ handleStartInput (value) {
72
+ if (!this.inputValid(value)) {
73
+ return
74
+ }
75
+ this.numberRangeValue.start = value
76
+ this.emitRangeValue()
77
+ },
78
+
79
+ /**
80
+ * 范围的结束输入处理
81
+ */
82
+ handleEndInput (value) {
83
+ if (!this.inputValid(value)) {
84
+ return
85
+ }
86
+ this.numberRangeValue.end = value
87
+ this.emitRangeValue()
88
+ },
89
+
90
+ /**
91
+ * 范围输入对外发射
92
+ */
93
+ emitRangeValue () {
94
+ const start = this.numberRangeValue.start
95
+ const end = this.numberRangeValue.end
96
+ this.$emit('input', `${start},${end}`)
97
+ }
98
+
99
+ }
100
+ }
101
+ </script>
102
+ <style lang='less' scoped>
103
+ .row-layout {
104
+ display:flex;
105
+ }
106
+ .col-layout {
107
+ display:flex;
108
+ flex-direction: column;
109
+ }
110
+ .number-separators{
111
+ display:flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ }
115
+ </style>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <el-select
3
+ :value="selectValue"
4
+ :popper-append-to-body="false"
5
+ size="mini"
6
+ filterable
7
+ clearable
8
+ placeholder=""
9
+ :multiple="multi"
10
+ collapse-tags
11
+ :disabled="disabled"
12
+ style="display:block"
13
+ @input="selectValue = $event"
14
+ >
15
+ <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.enumId" />
16
+ </el-select>
17
+ </template>
18
+ <script>
19
+ import { getEnumOptions } from '@/api/tableV3.js'
20
+ export default {
21
+ props: {
22
+ value: {
23
+ type: String,
24
+ default: ''
25
+ },
26
+ disabled: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ multi: {
31
+ type: Boolean,
32
+ default: false
33
+ },
34
+ field: {
35
+ type: String,
36
+ default: '2'
37
+ }
38
+ },
39
+ inject: ['target', 'enumOptionCache'],
40
+ data () {
41
+ return {
42
+ options: []
43
+ }
44
+ },
45
+ computed: {
46
+ selectValue: {
47
+ set (value) {
48
+ if (this.multi) {
49
+ return this.$emit('input', value.join())
50
+ }
51
+ this.$emit('input', value)
52
+ },
53
+ get () {
54
+ if (this.multi) {
55
+ if (this.value === '') {
56
+ return []
57
+ }
58
+ return this.value.split(',')
59
+ }
60
+ return this.value
61
+ }
62
+ }
63
+
64
+ },
65
+ created () {
66
+ this.getOptions()
67
+ },
68
+ methods: {
69
+ async getOptions () {
70
+ if (this.enumOptionCache[this.field]) {
71
+ this.options = this.enumOptionCache[this.field]
72
+ return
73
+ }
74
+ const res = await getEnumOptions(this.target, this.field)
75
+ if (res.code !== 0) {
76
+ return this.$message.error(res.msg)
77
+ }
78
+ this.options = res.data
79
+ this.enumOptionCache[this.field] = res.data
80
+ }
81
+ }
82
+ }
83
+ </script>
84
+
85
+ <style lang="less" scoped>
86
+ </style>
@@ -0,0 +1,10 @@
1
+ const fieldType = {
2
+ PARAM_TEXT: 'input',
3
+ PARAM_TIME_LONG: 'datetime',
4
+ PARAM_TIME_SHORT: 'date',
5
+ PARAM_ENUM: 'enum',
6
+ PARAM_BASIC: 'basic',
7
+ PARAM_NUMBER: 'number'
8
+ }
9
+
10
+ export default fieldType