@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,143 +1,143 @@
1
- <template>
2
- <div class="condition-always-item">
3
- <div class="title">
4
- <span>{{ data.title }}:</span>
5
- </div>
6
-
7
- <div class="values">
8
- <div
9
- v-for="item in conditonOptions"
10
- :key="item.enumId"
11
- :class="['value-item',isActive(item.enumId)? 'active':'']"
12
- @click="handleClick(item)"
13
- >
14
- {{ item.name }}
15
- </div>
16
- </div>
17
-
18
- <div class="swich-button">
19
- <template v-if="singleSelect">
20
- <el-button size="mini" type="primary" @click="switchToMulti">多选</el-button>
21
- </template>
22
- <template v-else>
23
- <el-button size="mini" type="primary" @click="multiSelected">确定</el-button>
24
- <el-button size="mini" type="danger" @click="switchToSingle">取消</el-button>
25
- </template>
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- export default {
32
- props: {
33
- data: {
34
- type: Object,
35
- default: null
36
- },
37
- value: {
38
- type: Array,
39
- default: null
40
- }
41
- },
42
- data () {
43
- return {
44
- multiSelectedCache: [],
45
- singleSelect: true
46
- }
47
- },
48
- computed: {
49
- isActive () {
50
- return function (value) {
51
- if (this.singleSelect) {
52
- return this.value.includes(value)
53
- }
54
- return this.multiSelectedCache.includes(value)
55
- }
56
- },
57
- conditonOptions () {
58
- if (this.singleSelect) {
59
- return this.data.options
60
- }
61
- return this.data.options.filter(option => option.enumId !== '-1')
62
- }
63
- },
64
- methods: {
65
- handleClick (item) {
66
- // 单选模式下
67
- if (this.singleSelect) {
68
- this.selected = [item.enumId]
69
- return this.$emit('input', [item.enumId])
70
- }
71
-
72
- // 多选模式下
73
- if (this.multiSelectedCache.includes(item.enumId)) {
74
- return this.multiSelectedCache.splice(this.multiSelectedCache.indexOf(item.enumId), 1)
75
- }
76
- this.multiSelectedCache.push(item.enumId)
77
- },
78
- // 切换到多选状态
79
- switchToMulti () {
80
- this.singleSelect = false
81
- this.multiSelectedCache = []
82
- this.multiSelectedCache.push(...this.value)
83
- },
84
- // 切换到单选状态
85
- switchToSingle () {
86
- this.singleSelect = true
87
- this.multiSelectedCache = []
88
- },
89
- multiSelected () {
90
- const index = this.multiSelectedCache.indexOf('-1')
91
- index !== -1 && this.multiSelectedCache.splice(index, 1)
92
- this.$emit('input', this.multiSelectedCache)
93
- this.singleSelect = true
94
- }
95
- }
96
-
97
- }
98
- </script>
99
-
100
- <style scoped lang='less'>
101
- // 整体
102
- .condition-always-item {
103
- display:flex;
104
- justify-content: space-between;
105
- border-top:1px solid #dddfe6;
106
- padding-top:5px;
107
- // align-items:center;
108
-
109
- .title {
110
- margin-top:5px;
111
- }
112
-
113
- // 可选值wrapper
114
- .values {
115
- flex:1;
116
- display:flex;
117
- flex-wrap: wrap;
118
-
119
- //可选值 item
120
- .value-item {
121
- cursor: pointer;
122
- user-select: none;
123
- border:1px #d5d5d9 solid;
124
- color:#9999a1;
125
- border-radius:3px;
126
- padding:5px;
127
- margin-left:10px;
128
- margin-bottom:5px;
129
- }
130
- .active {
131
- color:#075699;
132
- border:1px solid #075699;
133
- }
134
- }
135
-
136
- .swich-button {
137
- .el-button {
138
- background-color: #075699;
139
- border:none;
140
- }
141
- }
142
- }
143
- </style>
1
+ <template>
2
+ <div class="condition-always-item">
3
+ <div class="title">
4
+ <span>{{ data.title }}:</span>
5
+ </div>
6
+
7
+ <div class="values">
8
+ <div
9
+ v-for="item in conditonOptions"
10
+ :key="item.enumId"
11
+ :class="['value-item',isActive(item.enumId)? 'active':'']"
12
+ @click="handleClick(item)"
13
+ >
14
+ {{ item.name }}
15
+ </div>
16
+ </div>
17
+
18
+ <div class="swich-button">
19
+ <template v-if="singleSelect">
20
+ <el-button size="mini" type="primary" @click="switchToMulti">多选</el-button>
21
+ </template>
22
+ <template v-else>
23
+ <el-button size="mini" type="primary" @click="multiSelected">确定</el-button>
24
+ <el-button size="mini" type="danger" @click="switchToSingle">取消</el-button>
25
+ </template>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ export default {
32
+ props: {
33
+ data: {
34
+ type: Object,
35
+ default: null
36
+ },
37
+ value: {
38
+ type: Array,
39
+ default: null
40
+ }
41
+ },
42
+ data () {
43
+ return {
44
+ multiSelectedCache: [],
45
+ singleSelect: true
46
+ }
47
+ },
48
+ computed: {
49
+ isActive () {
50
+ return function (value) {
51
+ if (this.singleSelect) {
52
+ return this.value.includes(value)
53
+ }
54
+ return this.multiSelectedCache.includes(value)
55
+ }
56
+ },
57
+ conditonOptions () {
58
+ if (this.singleSelect) {
59
+ return this.data.options
60
+ }
61
+ return this.data.options.filter(option => option.enumId !== '-1')
62
+ }
63
+ },
64
+ methods: {
65
+ handleClick (item) {
66
+ // 单选模式下
67
+ if (this.singleSelect) {
68
+ this.selected = [item.enumId]
69
+ return this.$emit('input', [item.enumId])
70
+ }
71
+
72
+ // 多选模式下
73
+ if (this.multiSelectedCache.includes(item.enumId)) {
74
+ return this.multiSelectedCache.splice(this.multiSelectedCache.indexOf(item.enumId), 1)
75
+ }
76
+ this.multiSelectedCache.push(item.enumId)
77
+ },
78
+ // 切换到多选状态
79
+ switchToMulti () {
80
+ this.singleSelect = false
81
+ this.multiSelectedCache = []
82
+ this.multiSelectedCache.push(...this.value)
83
+ },
84
+ // 切换到单选状态
85
+ switchToSingle () {
86
+ this.singleSelect = true
87
+ this.multiSelectedCache = []
88
+ },
89
+ multiSelected () {
90
+ const index = this.multiSelectedCache.indexOf('-1')
91
+ index !== -1 && this.multiSelectedCache.splice(index, 1)
92
+ this.$emit('input', this.multiSelectedCache)
93
+ this.singleSelect = true
94
+ }
95
+ }
96
+
97
+ }
98
+ </script>
99
+
100
+ <style scoped lang='less'>
101
+ // 整体
102
+ .condition-always-item {
103
+ display:flex;
104
+ justify-content: space-between;
105
+ border-top:1px solid #dddfe6;
106
+ padding-top:5px;
107
+ // align-items:center;
108
+
109
+ .title {
110
+ margin-top:5px;
111
+ }
112
+
113
+ // 可选值wrapper
114
+ .values {
115
+ flex:1;
116
+ display:flex;
117
+ flex-wrap: wrap;
118
+
119
+ //可选值 item
120
+ .value-item {
121
+ cursor: pointer;
122
+ user-select: none;
123
+ border:1px #d5d5d9 solid;
124
+ color:#9999a1;
125
+ border-radius:3px;
126
+ padding:5px;
127
+ margin-left:10px;
128
+ margin-bottom:5px;
129
+ }
130
+ .active {
131
+ color:#075699;
132
+ border:1px solid #075699;
133
+ }
134
+ }
135
+
136
+ .swich-button {
137
+ .el-button {
138
+ background-color: #075699;
139
+ border:none;
140
+ }
141
+ }
142
+ }
143
+ </style>