@tongfun/tf-widget 0.1.18 → 0.1.22

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 (99) hide show
  1. package/README.md +49 -42
  2. package/lib/css/1.841c5d60.css +1 -0
  3. package/lib/tf-widget.common.1.js +9 -13
  4. package/lib/tf-widget.common.js +1102 -950
  5. package/lib/tf-widget.css +1 -1
  6. package/lib/tf-widget.umd.1.js +9 -13
  7. package/lib/tf-widget.umd.js +1102 -950
  8. package/lib/tf-widget.umd.min.1.js +1 -1
  9. package/lib/tf-widget.umd.min.js +4 -4
  10. package/package/svg-icon/index.js +8 -8
  11. package/package/svg-icon/src/SvgIcon.vue +59 -59
  12. package/package/t-data-list/index.js +6 -6
  13. package/package/t-data-list/main.vue +193 -192
  14. package/package/t-data-list/src/condition-input/basic.vue +31 -31
  15. package/package/t-data-list/src/condition-input/date.vue +106 -106
  16. package/package/t-data-list/src/condition-input/index.vue +100 -100
  17. package/package/t-data-list/src/condition-input/input.vue +31 -31
  18. package/package/t-data-list/src/condition-input/number.vue +115 -115
  19. package/package/t-data-list/src/condition-input/select.vue +86 -86
  20. package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
  21. package/package/t-data-list/src/js/operatorEnum.js +108 -109
  22. package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
  23. package/package/t-data-list/src/js/util.js +34 -34
  24. package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -77
  25. package/package/t-data-list/src/pushdown/push-down.vue +158 -158
  26. package/package/t-data-list/src/t-list-search.vue +36 -32
  27. package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
  28. package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
  29. package/package/t-data-list/src/t-plan/index.vue +195 -190
  30. package/package/t-data-list/src/t-plan/plan-content.vue +389 -396
  31. package/package/t-data-list/src/t-table/index.vue +129 -120
  32. package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
  33. package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
  34. package/package/t-data-list/src/t-table/table-group.vue +180 -179
  35. package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -250
  36. package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
  37. package/package/t-data-list/src/t-table/table-records.vue +337 -324
  38. package/package/t-input/children/address.vue +101 -101
  39. package/package/t-input/children/basic-display.vue +41 -41
  40. package/package/t-input/children/basic.vue +253 -251
  41. package/package/t-input/children/date.vue +89 -89
  42. package/package/t-input/children/group-components/group-dialog.vue +344 -350
  43. package/package/t-input/children/group.vue +126 -126
  44. package/package/t-input/children/input.vue +72 -72
  45. package/package/t-input/children/number.vue +74 -74
  46. package/package/t-input/children/select.vue +89 -89
  47. package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
  48. package/package/t-input/index.js +7 -7
  49. package/package/t-input/index.vue +337 -337
  50. package/package/t-input/tInputCache.js +24 -24
  51. package/package/tf-icon-picker/README.md +7 -7
  52. package/package/tf-icon-picker/index.js +8 -8
  53. package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
  54. package/package/tf-layout/README.md +115 -115
  55. package/package/tf-layout/index.js +8 -8
  56. package/package/tf-layout/src/components/tf-labelbar.vue +394 -382
  57. package/package/tf-layout/src/components/tf-menu.vue +180 -180
  58. package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
  59. package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
  60. package/package/tf-layout/src/tf-layout.vue +140 -120
  61. package/package/tf-widget/index.js +8 -8
  62. package/package/tf-widget/src/assets/common-input.less +10 -10
  63. package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
  64. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
  65. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
  66. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
  67. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
  68. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
  69. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
  70. package/package/tf-widget/src/children/date-time.vue +103 -103
  71. package/package/tf-widget/src/children/date.vue +103 -103
  72. package/package/tf-widget/src/children/decimal.vue +115 -115
  73. package/package/tf-widget/src/children/integer.vue +104 -104
  74. package/package/tf-widget/src/children/property.vue +59 -59
  75. package/package/tf-widget/src/children/single-line-text.vue +82 -82
  76. package/package/tf-widget/src/children/small-pictures.vue +223 -223
  77. package/package/tf-widget/src/children/text-area.vue +74 -74
  78. package/package/tf-widget/src/children/tf-select.vue +113 -113
  79. package/package/tf-widget/src/tf-widget.vue +175 -175
  80. package/package.json +44 -43
  81. package/src/api/edit.js +97 -97
  82. package/src/api/file-enclosure.js +26 -26
  83. package/src/api/push-down.js +19 -19
  84. package/src/api/table.js +294 -294
  85. package/src/api/tableV3.js +166 -186
  86. package/src/assets/images/icons/index.js +9 -9
  87. package/src/assets/images/icons/svg/add.svg +5 -5
  88. package/src/assets/images/icons/svg/push-down.svg +1 -1
  89. package/src/assets/images/icons/svg/remove.svg +1 -1
  90. package/src/assets/styles/common-table.less +202 -202
  91. package/src/directives/debounce.js +24 -0
  92. package/src/index.js +31 -31
  93. package/src/mixins/t-data-query-mixin.js +290 -289
  94. package/src/utils/auth.js +22 -22
  95. package/src/utils/request.js +42 -42
  96. package/src/utils/stato-anormale.js +59 -59
  97. package/src/utils/utils.js +109 -109
  98. package/src/utils/validate.js +84 -84
  99. package/lib/css/1.920744ef.css +0 -1
@@ -1,190 +1,195 @@
1
- <template>
2
- <div class="t-plan">
3
- <!-- 展开关闭方案详情的按钮 -->
4
- <div
5
- :class="['plan-expanser',showExpanse?'expanse-active':'']"
6
- @mouseup.stop="showExpanse = !showExpanse"
7
- >
8
- <span>{{ showExpanse ? '收起方案' : '展开方案' }}</span>
9
- <i :class="[showExpanse? 'el-icon-arrow-up':'el-icon-arrow-down']" />
10
- </div>
11
-
12
- <!-- 过滤方案列表 -->
13
- <div class="plan-list">
14
- <span class="title">过滤方案:</span>
15
- <draggble v-model="planList" class="draggble-wraper" @start="handleStart" @end="handleEnd">
16
- <div
17
- v-for="plan in planList"
18
- :key="plan.id"
19
- :class="['plan-item',isActive(plan.id)?'plan-active':'']"
20
- @click="handlePlanClick(plan.id)"
21
- >
22
- <span>{{ plan.name }}</span>
23
- </div>
24
- </draggble>
25
- </div>
26
-
27
- <!-- 当先选中的方案详情 -->
28
- <planContent
29
- ref="planContentRef"
30
- :visible.sync="showExpanse"
31
- :plan-names="planNameList"
32
- :content="currentPlan"
33
- @listChange="handleListChange"
34
- @change="handleChange"
35
- />
36
- </div>
37
- </template>
38
- <script>
39
- import draggble from 'vuedraggable'
40
- import planContent from './plan-content.vue'
41
- import { getFilterPlan } from '@/api/tableV3.js'
42
- export default {
43
- components: {
44
- draggble, planContent
45
- },
46
- props: {
47
- // 表的布局,作为高级过滤的字段可选项目
48
- fieldsOption: {
49
- type: Array,
50
- default: null
51
- }
52
- },
53
- data () {
54
- return {
55
- showExpanse: false,
56
- currentPlanId: '',
57
- planList: []
58
- }
59
- },
60
- computed: {
61
- // 目前所有方案列表的内容,用来在新增方案的时候你,进行判断相同名称的方案是否已经存在
62
- planNameList () {
63
- const planNameList = []
64
- for (const plan of this.planList) {
65
- planNameList.push(plan.name)
66
- }
67
- return planNameList
68
- },
69
- // 计算是否使用激活状态下的样式
70
- isActive () {
71
- return function (planId) {
72
- return this.currentPlanId === planId
73
- }
74
- },
75
- currentPlan () {
76
- const emptyContent = {
77
- name: '',
78
- schemeUsefulList: [],
79
- contentsList: []
80
- }
81
- return this.planList.find(item => item.id === this.currentPlanId) || emptyContent
82
- }
83
- },
84
- provide () {
85
- return {
86
- getFieldsOption: () => this.fieldsOption
87
- }
88
- },
89
- inject: ['target'],
90
- created () {
91
- this.getFilterPlan()
92
- },
93
- methods: {
94
- /**
95
- * 获取方案列表
96
- * 并切换到指定方案(选中状态)
97
- */
98
- async getFilterPlan (selectId) {
99
- const res = await getFilterPlan(this.target)
100
- if (res.code !== 0) {
101
- return this.$message.error(res.msg)
102
- }
103
- this.planList = res.data
104
- this.currentPlanId = selectId || this.planList.find(item => item.isDefault).id
105
- !selectId && this.$refs.planContentRef.$emit('doSearch')
106
- },
107
-
108
- /**
109
- * 方案被添加或者删除,导致方案数量发生了变化
110
- */
111
- handleListChange (planId) {
112
- this.getFilterPlan(planId)
113
- },
114
-
115
- /**
116
- * 方案被点击切换方法并查询数据
117
- */
118
- handlePlanClick (planId) {
119
- if (this.currentPlanId === planId) {
120
- return
121
- }
122
- this.currentPlanId = planId
123
- this.$refs.planContentRef.$emit('doSearch')
124
- },
125
-
126
- /**
127
- *
128
- */
129
- handleChange (condition) {
130
- this.$emit('change', condition)
131
- },
132
- /**
133
- * 方案列表的拖动
134
- */
135
- handleStart () {
136
-
137
- },
138
- handleEnd () {
139
-
140
- }
141
- }
142
- }
143
- </script>
144
-
145
- <style scoped lang='less'>
146
- .t-plan {
147
- position:relative;
148
- margin:1vh 0;
149
- padding-bottom:5px;
150
- display:flex;
151
-
152
- .plan-expanser{
153
- cursor: pointer;
154
- user-select:none;
155
- margin-right:10px;
156
- color:#0a5295;
157
- span {
158
- font-size:15px;
159
- }
160
- }
161
- .expanse-active {
162
- // background-color: #f6f7f9;
163
- color:black;
164
- // border:1px solid gray;
165
- border-bottom:none;
166
- // box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.2);
167
- }
168
-
169
- .plan-list {
170
- display:flex;
171
- font-size: 15px;
172
- .title {
173
- margin-right:10px;
174
- }
175
-
176
- .draggble-wraper {
177
- display:flex;
178
- .plan-item{
179
- cursor: pointer;
180
- margin-right:7px;
181
- }
182
- .plan-active {
183
- color:#0a5295;
184
- }
185
- }
186
-
187
- }
188
- }
189
-
190
- </style>
1
+ <template>
2
+ <div class="t-plan">
3
+ <!-- 展开关闭方案详情的按钮 -->
4
+ <div
5
+ :class="['plan-expanser',showExpanse?'expanse-active':'']"
6
+ @mouseup.stop="showExpanse = !showExpanse"
7
+ >
8
+ <span>{{ showExpanse ? '收起方案' : '展开方案' }}</span>
9
+ <i :class="[showExpanse? 'el-icon-arrow-up':'el-icon-arrow-down']" />
10
+ </div>
11
+
12
+ <!-- 过滤方案列表 -->
13
+ <div class="plan-list">
14
+ <span class="title">过滤方案:</span>
15
+ <draggble v-model="planList" class="draggble-wraper" @start="handleStart" @end="handleEnd">
16
+ <div
17
+ v-for="plan in planList"
18
+ :key="plan.id"
19
+ :class="['plan-item',isActive(plan.id)?'plan-active':'']"
20
+ @click="handlePlanClick(plan.id)"
21
+ >
22
+ <span>{{ plan.name }}</span>
23
+ </div>
24
+ </draggble>
25
+ </div>
26
+
27
+ <!-- 当先选中的方案详情 -->
28
+ <planContent
29
+ ref="planContentRef"
30
+ :visible.sync="showExpanse"
31
+ :plan-names="planNameList"
32
+ :content="currentPlan"
33
+ @listChange="getFilterPlan"
34
+ @change="$emit('change',$event)"
35
+ />
36
+ </div>
37
+ </template>
38
+ <script>
39
+ import draggble from 'vuedraggable'
40
+ import planContent from './plan-content.vue'
41
+ import { getFilterPlan } from '@/api/tableV3.js'
42
+ export default {
43
+ components: {
44
+ draggble, planContent
45
+ },
46
+ props: {
47
+ // 表的布局,作为高级过滤的字段可选项目
48
+ fieldsOption: {
49
+ type: Array,
50
+ default: null
51
+ }
52
+ },
53
+ data () {
54
+ return {
55
+ showExpanse: false,
56
+ currentPlanId: '',
57
+ planList: []
58
+ }
59
+ },
60
+ computed: {
61
+ // 目前所有方案列表的内容,用来在新增方案的时候你,进行判断相同名称的方案是否已经存在
62
+ planNameList () {
63
+ const planNameList = []
64
+ for (const plan of this.planList) {
65
+ planNameList.push(plan.name)
66
+ }
67
+ return planNameList
68
+ },
69
+ // 计算是否使用激活状态下的样式
70
+ isActive () {
71
+ return function (planId) {
72
+ return this.currentPlanId === planId
73
+ }
74
+ },
75
+ currentPlan () {
76
+ const emptyContent = {
77
+ name: '',
78
+ schemeUsefulList: [],
79
+ contentsList: []
80
+ }
81
+ return this.planList.find(item => item.id === this.currentPlanId) || emptyContent
82
+ }
83
+ },
84
+ provide () {
85
+ return {
86
+ getFieldsOption: () => this.fieldsOption
87
+ }
88
+ },
89
+ inject: ['target'],
90
+ created () {
91
+ this.getFilterPlan()
92
+ },
93
+ methods: {
94
+ /**
95
+ * 获取方案列表
96
+ * 并切换到指定方案(为选中状态)
97
+ */
98
+ async getFilterPlan (selectId) {
99
+ const res = await getFilterPlan(this.target)
100
+ if (res.code !== 0) {
101
+ return this.$message.error(res.msg)
102
+ }
103
+ this.planList = res.data
104
+ this.currentPlanId = selectId || this.planList.find(item => item.isDefault).id
105
+ },
106
+
107
+ /**
108
+ * 方案被添加或者删除,导致方案数量发生了变化
109
+ */
110
+ handleListChange (planId) {
111
+ this.getFilterPlan(planId)
112
+ },
113
+
114
+ /**
115
+ * 将方案重置到默认方案
116
+ */
117
+ resetToDefaultPlan () {
118
+ const defaultPlanContent = this.planList.find(item => item.isDefault)
119
+ const defaultPlanId = defaultPlanContent?.id
120
+ if (this.currentPlanId === defaultPlanId) {
121
+ return this.$refs.planContentRef.loadPlanContent(defaultPlanContent, true)
122
+ }
123
+ this.currentPlanId = defaultPlanId
124
+ },
125
+
126
+ /**
127
+ * 方案被点击切换方法并查询数据
128
+ */
129
+ handlePlanClick (planId) {
130
+ if (this.currentPlanId === planId) {
131
+ return
132
+ }
133
+ this.currentPlanId = planId
134
+ // this.$refs.planContentRef.$emit('doSearch')
135
+ },
136
+
137
+ /**
138
+ * 方案列表的拖动
139
+ */
140
+ handleStart () {
141
+
142
+ },
143
+ handleEnd () {
144
+
145
+ }
146
+ }
147
+ }
148
+ </script>
149
+
150
+ <style scoped lang='less'>
151
+ .t-plan {
152
+ position:relative;
153
+ margin:1vh 0;
154
+ padding-bottom:5px;
155
+ display:flex;
156
+
157
+ .plan-expanser{
158
+ cursor: pointer;
159
+ user-select:none;
160
+ margin-right:10px;
161
+ color:#0a5295;
162
+ span {
163
+ font-size:15px;
164
+ }
165
+ }
166
+ .expanse-active {
167
+ // background-color: #f6f7f9;
168
+ color:black;
169
+ // border:1px solid gray;
170
+ border-bottom:none;
171
+ // box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.2);
172
+ }
173
+
174
+ .plan-list {
175
+ display:flex;
176
+ font-size: 15px;
177
+ .title {
178
+ margin-right:10px;
179
+ }
180
+
181
+ .draggble-wraper {
182
+ display:flex;
183
+ .plan-item{
184
+ cursor: pointer;
185
+ margin-right:7px;
186
+ }
187
+ .plan-active {
188
+ color:#0a5295;
189
+ }
190
+ }
191
+
192
+ }
193
+ }
194
+
195
+ </style>