@tongfun/tf-widget 0.1.20 → 0.1.21

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 (94) hide show
  1. package/README.md +49 -46
  2. package/lib/tf-widget.common.js +460 -416
  3. package/lib/tf-widget.css +1 -1
  4. package/lib/tf-widget.umd.js +460 -416
  5. package/lib/tf-widget.umd.min.js +3 -3
  6. package/package/svg-icon/index.js +8 -8
  7. package/package/svg-icon/src/SvgIcon.vue +59 -59
  8. package/package/t-data-list/index.js +6 -6
  9. package/package/t-data-list/main.vue +193 -193
  10. package/package/t-data-list/src/condition-input/basic.vue +31 -31
  11. package/package/t-data-list/src/condition-input/date.vue +106 -106
  12. package/package/t-data-list/src/condition-input/index.vue +100 -100
  13. package/package/t-data-list/src/condition-input/input.vue +31 -31
  14. package/package/t-data-list/src/condition-input/number.vue +115 -115
  15. package/package/t-data-list/src/condition-input/select.vue +86 -86
  16. package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
  17. package/package/t-data-list/src/js/operatorEnum.js +108 -108
  18. package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
  19. package/package/t-data-list/src/js/util.js +34 -34
  20. package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -93
  21. package/package/t-data-list/src/pushdown/push-down.vue +158 -158
  22. package/package/t-data-list/src/t-list-search.vue +36 -36
  23. package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
  24. package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
  25. package/package/t-data-list/src/t-plan/index.vue +195 -195
  26. package/package/t-data-list/src/t-plan/plan-content.vue +389 -389
  27. package/package/t-data-list/src/t-table/index.vue +129 -129
  28. package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
  29. package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
  30. package/package/t-data-list/src/t-table/table-group.vue +180 -180
  31. package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -246
  32. package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
  33. package/package/t-data-list/src/t-table/table-records.vue +337 -337
  34. package/package/t-input/children/address.vue +101 -101
  35. package/package/t-input/children/basic-display.vue +41 -41
  36. package/package/t-input/children/basic.vue +253 -253
  37. package/package/t-input/children/date.vue +89 -89
  38. package/package/t-input/children/group-components/group-dialog.vue +344 -344
  39. package/package/t-input/children/group.vue +126 -126
  40. package/package/t-input/children/input.vue +72 -72
  41. package/package/t-input/children/number.vue +74 -74
  42. package/package/t-input/children/select.vue +89 -89
  43. package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
  44. package/package/t-input/index.js +7 -7
  45. package/package/t-input/index.vue +337 -337
  46. package/package/t-input/tInputCache.js +24 -24
  47. package/package/tf-icon-picker/README.md +7 -7
  48. package/package/tf-icon-picker/index.js +8 -8
  49. package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
  50. package/package/tf-layout/README.md +115 -115
  51. package/package/tf-layout/index.js +8 -8
  52. package/package/tf-layout/src/components/tf-labelbar.vue +394 -382
  53. package/package/tf-layout/src/components/tf-menu.vue +180 -180
  54. package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
  55. package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
  56. package/package/tf-layout/src/tf-layout.vue +140 -120
  57. package/package/tf-widget/index.js +8 -8
  58. package/package/tf-widget/src/assets/common-input.less +10 -10
  59. package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
  60. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
  61. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
  62. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
  63. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
  64. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
  65. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
  66. package/package/tf-widget/src/children/date-time.vue +103 -103
  67. package/package/tf-widget/src/children/date.vue +103 -103
  68. package/package/tf-widget/src/children/decimal.vue +115 -115
  69. package/package/tf-widget/src/children/integer.vue +104 -104
  70. package/package/tf-widget/src/children/property.vue +59 -59
  71. package/package/tf-widget/src/children/single-line-text.vue +82 -82
  72. package/package/tf-widget/src/children/small-pictures.vue +223 -223
  73. package/package/tf-widget/src/children/text-area.vue +74 -74
  74. package/package/tf-widget/src/children/tf-select.vue +113 -113
  75. package/package/tf-widget/src/tf-widget.vue +175 -175
  76. package/package.json +44 -44
  77. package/src/api/edit.js +97 -97
  78. package/src/api/file-enclosure.js +26 -26
  79. package/src/api/push-down.js +19 -19
  80. package/src/api/table.js +294 -294
  81. package/src/api/tableV3.js +160 -160
  82. package/src/assets/images/icons/index.js +9 -9
  83. package/src/assets/images/icons/svg/add.svg +5 -5
  84. package/src/assets/images/icons/svg/push-down.svg +1 -1
  85. package/src/assets/images/icons/svg/remove.svg +1 -1
  86. package/src/assets/styles/common-table.less +202 -202
  87. package/src/directives/debounce.js +24 -24
  88. package/src/index.js +31 -31
  89. package/src/mixins/t-data-query-mixin.js +290 -290
  90. package/src/utils/auth.js +22 -22
  91. package/src/utils/request.js +42 -42
  92. package/src/utils/stato-anormale.js +59 -59
  93. package/src/utils/utils.js +109 -109
  94. package/src/utils/validate.js +84 -84
@@ -1,126 +1,126 @@
1
- <template>
2
- <div>
3
- <!-- 输入控件 -->
4
- <el-autocomplete
5
- ref="group"
6
- v-model="showValue"
7
- placeholder=""
8
- :fetch-suggestions="getAdvice"
9
- :disabled="disabled"
10
- :trigger-on-focus="false"
11
- @select="handleSelect"
12
- @blur="handleBlur"
13
- @keydown.delete.native="handleDeleteKeyDown"
14
- >
15
- <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="showDialog" />
16
- <template slot-scope="{item}">
17
- <div>{{ item.name }}</div>
18
- </template>
19
- </el-autocomplete>
20
-
21
- <!-- 弹窗数据选择器 -->
22
- <GroupDialog
23
- ref="groupDialog"
24
- :value="value"
25
- :data="options"
26
- :visible.sync="dialogVisible"
27
- @confirm="handleConfig"
28
- @success="handleSuccess"
29
- />
30
- </div>
31
- </template>
32
-
33
- <script>
34
- import { getGroupTree } from '@/api/tableV3.js'
35
- import GroupDialog from './group-components/group-dialog'
36
- // 使用该组件必穿一个target
37
-
38
- export default {
39
- name: 'Group',
40
- components: {
41
- GroupDialog
42
- },
43
- props: {
44
- value: {
45
- type: Object,
46
- default: null
47
- },
48
- disabled: {
49
- type: Boolean,
50
- default: false
51
- }
52
- },
53
- inject: ['target'],
54
- data () {
55
- return {
56
- options: [],
57
- dialogVisible: false,
58
- groupList: []
59
- }
60
- },
61
- computed: {
62
- showValue: {
63
- get: function () {
64
- return this.value ? this.value.name : ''
65
- },
66
- set: function (newVal) {
67
- this.$emit('input', { id: '', name: newVal })
68
- }
69
- }
70
- },
71
- mounted () {
72
- this.getGroupTree()
73
- },
74
- methods: {
75
- // 获取分组数据
76
- async getGroupTree () {
77
- const res = await getGroupTree(this.target)
78
- if (res.code !== 0) {
79
- return this.$message.error(res.msg)
80
- }
81
- this.groupList = []
82
- this.options = [res.data]
83
- this.groupList = Object.values(this.$refs.groupDialog.createSelectMap(this.options))
84
- if (this.dialogVisible) {
85
- this.$refs.groupDialog.updateGroupStatus()
86
- }
87
- },
88
- handleSelect (val) {
89
- this.$emit('input', { id: val.id, name: val.name })
90
- // this.$emit('input', val[val.length - 1])
91
- },
92
- // 点击删除时进行的操作
93
- handleDeleteKeyDown () {
94
- this.$emit('input', { id: '', name: '' })
95
- },
96
- // 获取搜索建议
97
- getAdvice (str, cb) {
98
- if (str) {
99
- cb(this.groupList.filter(e => e.name.includes(str)))
100
- }
101
- },
102
- // 展示dialog
103
- showDialog () {
104
- this.dialogVisible = true
105
- },
106
- handleBlur () {
107
- if (!this.value.id) {
108
- this.$emit('input', { id: '', name: '' })
109
- }
110
- },
111
- handleConfig (val) {
112
- this.$emit('input', val)
113
- },
114
- handleSuccess () {
115
- this.getGroupTree()
116
- }
117
-
118
- }
119
- }
120
- </script>
121
- <style lang="less" scoped>
122
- /deep/.el-scrollbar__wrap{
123
- overflow-x: hidden!important;
124
- }
125
-
126
- </style>
1
+ <template>
2
+ <div>
3
+ <!-- 输入控件 -->
4
+ <el-autocomplete
5
+ ref="group"
6
+ v-model="showValue"
7
+ placeholder=""
8
+ :fetch-suggestions="getAdvice"
9
+ :disabled="disabled"
10
+ :trigger-on-focus="false"
11
+ @select="handleSelect"
12
+ @blur="handleBlur"
13
+ @keydown.delete.native="handleDeleteKeyDown"
14
+ >
15
+ <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="showDialog" />
16
+ <template slot-scope="{item}">
17
+ <div>{{ item.name }}</div>
18
+ </template>
19
+ </el-autocomplete>
20
+
21
+ <!-- 弹窗数据选择器 -->
22
+ <GroupDialog
23
+ ref="groupDialog"
24
+ :value="value"
25
+ :data="options"
26
+ :visible.sync="dialogVisible"
27
+ @confirm="handleConfig"
28
+ @success="handleSuccess"
29
+ />
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import { getGroupTree } from '@/api/tableV3.js'
35
+ import GroupDialog from './group-components/group-dialog'
36
+ // 使用该组件必穿一个target
37
+
38
+ export default {
39
+ name: 'Group',
40
+ components: {
41
+ GroupDialog
42
+ },
43
+ props: {
44
+ value: {
45
+ type: Object,
46
+ default: null
47
+ },
48
+ disabled: {
49
+ type: Boolean,
50
+ default: false
51
+ }
52
+ },
53
+ inject: ['target'],
54
+ data () {
55
+ return {
56
+ options: [],
57
+ dialogVisible: false,
58
+ groupList: []
59
+ }
60
+ },
61
+ computed: {
62
+ showValue: {
63
+ get: function () {
64
+ return this.value ? this.value.name : ''
65
+ },
66
+ set: function (newVal) {
67
+ this.$emit('input', { id: '', name: newVal })
68
+ }
69
+ }
70
+ },
71
+ mounted () {
72
+ this.getGroupTree()
73
+ },
74
+ methods: {
75
+ // 获取分组数据
76
+ async getGroupTree () {
77
+ const res = await getGroupTree(this.target)
78
+ if (res.code !== 0) {
79
+ return this.$message.error(res.msg)
80
+ }
81
+ this.groupList = []
82
+ this.options = [res.data]
83
+ this.groupList = Object.values(this.$refs.groupDialog.createSelectMap(this.options))
84
+ if (this.dialogVisible) {
85
+ this.$refs.groupDialog.updateGroupStatus()
86
+ }
87
+ },
88
+ handleSelect (val) {
89
+ this.$emit('input', { id: val.id, name: val.name })
90
+ // this.$emit('input', val[val.length - 1])
91
+ },
92
+ // 点击删除时进行的操作
93
+ handleDeleteKeyDown () {
94
+ this.$emit('input', { id: '', name: '' })
95
+ },
96
+ // 获取搜索建议
97
+ getAdvice (str, cb) {
98
+ if (str) {
99
+ cb(this.groupList.filter(e => e.name.includes(str)))
100
+ }
101
+ },
102
+ // 展示dialog
103
+ showDialog () {
104
+ this.dialogVisible = true
105
+ },
106
+ handleBlur () {
107
+ if (!this.value.id) {
108
+ this.$emit('input', { id: '', name: '' })
109
+ }
110
+ },
111
+ handleConfig (val) {
112
+ this.$emit('input', val)
113
+ },
114
+ handleSuccess () {
115
+ this.getGroupTree()
116
+ }
117
+
118
+ }
119
+ }
120
+ </script>
121
+ <style lang="less" scoped>
122
+ /deep/.el-scrollbar__wrap{
123
+ overflow-x: hidden!important;
124
+ }
125
+
126
+ </style>
@@ -1,72 +1,72 @@
1
- <template>
2
- <el-input
3
- ref="input"
4
- :value="value"
5
- :type="inputType"
6
- :disabled="disabled"
7
- :rows="rows"
8
- :placeholder="placeholder"
9
- @input="handleInput"
10
- />
11
- </template>
12
- <script>
13
- export default {
14
- components: {
15
-
16
- },
17
- props: {
18
- value: {
19
- type: String,
20
- default: ''
21
- },
22
- disabled: {
23
- type: Boolean,
24
- default: false
25
- },
26
- defaultValue: {
27
- type: String,
28
- default: ''
29
- }
30
- },
31
- inject: ['rows', 'placeholder', 'text', 'entity'],
32
- data () {
33
- return {
34
-
35
- }
36
- },
37
- computed: {
38
- inputType () {
39
- if (this.text) {
40
- return 'textarea'
41
- }
42
- return 'text'
43
- }
44
- },
45
- created () {
46
- // 对象还不存在这个属性,创建属性,如果有属性,但是值是null不进行任何操作
47
- if (!this.value) {
48
- this.handleInput(null)
49
- }
50
- },
51
- mounted () {
52
- if (this.entity) {
53
- this.$refs.input.focus()
54
- }
55
- },
56
- methods: {
57
- handleInput (value) {
58
- this.$emit('input', value)
59
- }
60
- }
61
- }
62
- </script>
63
-
64
- <style lang="less" scoped>
65
- .el-textarea{
66
- ::v-deep .el-textarea__inner{
67
- border:0;
68
- border-bottom: 1px solid #dcdcdc;
69
- border-radius: 0;
70
- }
71
- }
72
- </style>
1
+ <template>
2
+ <el-input
3
+ ref="input"
4
+ :value="value"
5
+ :type="inputType"
6
+ :disabled="disabled"
7
+ :rows="rows"
8
+ :placeholder="placeholder"
9
+ @input="handleInput"
10
+ />
11
+ </template>
12
+ <script>
13
+ export default {
14
+ components: {
15
+
16
+ },
17
+ props: {
18
+ value: {
19
+ type: String,
20
+ default: ''
21
+ },
22
+ disabled: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ defaultValue: {
27
+ type: String,
28
+ default: ''
29
+ }
30
+ },
31
+ inject: ['rows', 'placeholder', 'text', 'entity'],
32
+ data () {
33
+ return {
34
+
35
+ }
36
+ },
37
+ computed: {
38
+ inputType () {
39
+ if (this.text) {
40
+ return 'textarea'
41
+ }
42
+ return 'text'
43
+ }
44
+ },
45
+ created () {
46
+ // 对象还不存在这个属性,创建属性,如果有属性,但是值是null不进行任何操作
47
+ if (!this.value) {
48
+ this.handleInput(null)
49
+ }
50
+ },
51
+ mounted () {
52
+ if (this.entity) {
53
+ this.$refs.input.focus()
54
+ }
55
+ },
56
+ methods: {
57
+ handleInput (value) {
58
+ this.$emit('input', value)
59
+ }
60
+ }
61
+ }
62
+ </script>
63
+
64
+ <style lang="less" scoped>
65
+ .el-textarea{
66
+ ::v-deep .el-textarea__inner{
67
+ border:0;
68
+ border-bottom: 1px solid #dcdcdc;
69
+ border-radius: 0;
70
+ }
71
+ }
72
+ </style>
@@ -1,74 +1,74 @@
1
- <template>
2
- <el-input-number
3
- ref="number"
4
- :disabled="disabled"
5
- :controls="false"
6
- :placeholder="placeholder"
7
- :precision="percision"
8
- :min="0"
9
- :value="value"
10
- @input="handleInput"
11
- />
12
- </template>
13
- <script>
14
- export default {
15
- components: {
16
-
17
- },
18
- props: {
19
- value: {
20
- type: Number,
21
- default: undefined
22
- },
23
- disabled: {
24
- type: Boolean,
25
- default: false
26
- },
27
- defaultValue: {
28
- type: Number,
29
- default: null
30
- }
31
- },
32
- inject: ['percision', 'placeholder', 'entity'],
33
- data () {
34
- return {
35
-
36
- }
37
- },
38
- mounted () {
39
- this.entity && this.$refs.number.focus()
40
- },
41
- created () {
42
- if (!this.value) {
43
- const initValue = this.defaultValue || null
44
- this.handleInput(initValue)
45
- }
46
- },
47
- methods: {
48
- handleInput (value) {
49
- this.$emit('input', value)
50
- }
51
- }
52
- }
53
- </script>
54
-
55
- <style scoped lang='less'>
56
- .el-input-number {
57
- width:100%;
58
-
59
- ::v-deep .el-input{
60
- height: 100%;
61
- //margin-top: -0.55vh;
62
- }
63
- ::v-deep .el-input-number{
64
- width: 100%;
65
- }
66
- ::v-deep .el-input__inner{
67
- width: 100%;
68
- border: none;
69
- border-bottom: 1px solid #DCDCDC;
70
- border-radius: 0;
71
- text-align: left;
72
- }
73
- }
74
- </style>
1
+ <template>
2
+ <el-input-number
3
+ ref="number"
4
+ :disabled="disabled"
5
+ :controls="false"
6
+ :placeholder="placeholder"
7
+ :precision="percision"
8
+ :min="0"
9
+ :value="value"
10
+ @input="handleInput"
11
+ />
12
+ </template>
13
+ <script>
14
+ export default {
15
+ components: {
16
+
17
+ },
18
+ props: {
19
+ value: {
20
+ type: Number,
21
+ default: undefined
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ defaultValue: {
28
+ type: Number,
29
+ default: null
30
+ }
31
+ },
32
+ inject: ['percision', 'placeholder', 'entity'],
33
+ data () {
34
+ return {
35
+
36
+ }
37
+ },
38
+ mounted () {
39
+ this.entity && this.$refs.number.focus()
40
+ },
41
+ created () {
42
+ if (!this.value) {
43
+ const initValue = this.defaultValue || null
44
+ this.handleInput(initValue)
45
+ }
46
+ },
47
+ methods: {
48
+ handleInput (value) {
49
+ this.$emit('input', value)
50
+ }
51
+ }
52
+ }
53
+ </script>
54
+
55
+ <style scoped lang='less'>
56
+ .el-input-number {
57
+ width:100%;
58
+
59
+ ::v-deep .el-input{
60
+ height: 100%;
61
+ //margin-top: -0.55vh;
62
+ }
63
+ ::v-deep .el-input-number{
64
+ width: 100%;
65
+ }
66
+ ::v-deep .el-input__inner{
67
+ width: 100%;
68
+ border: none;
69
+ border-bottom: 1px solid #DCDCDC;
70
+ border-radius: 0;
71
+ text-align: left;
72
+ }
73
+ }
74
+ </style>