@tongfun/tf-widget 0.1.19 → 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 (96) hide show
  1. package/README.md +46 -42
  2. package/lib/tf-widget.common.1.js +1 -1
  3. package/lib/tf-widget.common.js +472 -455
  4. package/lib/tf-widget.css +1 -1
  5. package/lib/tf-widget.umd.1.js +1 -1
  6. package/lib/tf-widget.umd.js +472 -455
  7. package/lib/tf-widget.umd.min.js +3 -3
  8. package/package/svg-icon/index.js +8 -8
  9. package/package/svg-icon/src/SvgIcon.vue +59 -59
  10. package/package/t-data-list/index.js +6 -6
  11. package/package/t-data-list/main.vue +193 -193
  12. package/package/t-data-list/src/condition-input/basic.vue +31 -31
  13. package/package/t-data-list/src/condition-input/date.vue +106 -106
  14. package/package/t-data-list/src/condition-input/index.vue +100 -100
  15. package/package/t-data-list/src/condition-input/input.vue +31 -31
  16. package/package/t-data-list/src/condition-input/number.vue +115 -115
  17. package/package/t-data-list/src/condition-input/select.vue +86 -86
  18. package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
  19. package/package/t-data-list/src/js/operatorEnum.js +108 -108
  20. package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
  21. package/package/t-data-list/src/js/util.js +34 -34
  22. package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -93
  23. package/package/t-data-list/src/pushdown/push-down.vue +158 -158
  24. package/package/t-data-list/src/t-list-search.vue +36 -36
  25. package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
  26. package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
  27. package/package/t-data-list/src/t-plan/index.vue +195 -195
  28. package/package/t-data-list/src/t-plan/plan-content.vue +389 -389
  29. package/package/t-data-list/src/t-table/index.vue +129 -129
  30. package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
  31. package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
  32. package/package/t-data-list/src/t-table/table-group.vue +180 -180
  33. package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -246
  34. package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
  35. package/package/t-data-list/src/t-table/table-records.vue +337 -337
  36. package/package/t-input/children/address.vue +101 -101
  37. package/package/t-input/children/basic-display.vue +41 -41
  38. package/package/t-input/children/basic.vue +253 -253
  39. package/package/t-input/children/date.vue +89 -89
  40. package/package/t-input/children/group-components/group-dialog.vue +344 -344
  41. package/package/t-input/children/group.vue +126 -126
  42. package/package/t-input/children/input.vue +72 -72
  43. package/package/t-input/children/number.vue +74 -74
  44. package/package/t-input/children/select.vue +89 -89
  45. package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
  46. package/package/t-input/index.js +7 -7
  47. package/package/t-input/index.vue +337 -337
  48. package/package/t-input/tInputCache.js +24 -24
  49. package/package/tf-icon-picker/README.md +7 -7
  50. package/package/tf-icon-picker/index.js +8 -8
  51. package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
  52. package/package/tf-layout/README.md +115 -115
  53. package/package/tf-layout/index.js +8 -8
  54. package/package/tf-layout/src/components/tf-labelbar.vue +382 -382
  55. package/package/tf-layout/src/components/tf-menu.vue +180 -180
  56. package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
  57. package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
  58. package/package/tf-layout/src/tf-layout.vue +120 -120
  59. package/package/tf-widget/index.js +8 -8
  60. package/package/tf-widget/src/assets/common-input.less +10 -10
  61. package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
  62. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
  63. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
  64. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
  65. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
  66. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
  67. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
  68. package/package/tf-widget/src/children/date-time.vue +103 -103
  69. package/package/tf-widget/src/children/date.vue +103 -103
  70. package/package/tf-widget/src/children/decimal.vue +115 -115
  71. package/package/tf-widget/src/children/integer.vue +104 -104
  72. package/package/tf-widget/src/children/property.vue +59 -59
  73. package/package/tf-widget/src/children/single-line-text.vue +82 -82
  74. package/package/tf-widget/src/children/small-pictures.vue +223 -223
  75. package/package/tf-widget/src/children/text-area.vue +74 -74
  76. package/package/tf-widget/src/children/tf-select.vue +113 -113
  77. package/package/tf-widget/src/tf-widget.vue +175 -175
  78. package/package.json +44 -43
  79. package/src/api/edit.js +97 -97
  80. package/src/api/file-enclosure.js +26 -26
  81. package/src/api/push-down.js +19 -19
  82. package/src/api/table.js +294 -294
  83. package/src/api/tableV3.js +160 -186
  84. package/src/assets/images/icons/index.js +9 -9
  85. package/src/assets/images/icons/svg/add.svg +5 -5
  86. package/src/assets/images/icons/svg/push-down.svg +1 -1
  87. package/src/assets/images/icons/svg/remove.svg +1 -1
  88. package/src/assets/styles/common-table.less +202 -202
  89. package/src/directives/debounce.js +24 -0
  90. package/src/index.js +31 -31
  91. package/src/mixins/t-data-query-mixin.js +290 -290
  92. package/src/utils/auth.js +22 -22
  93. package/src/utils/request.js +42 -42
  94. package/src/utils/stato-anormale.js +59 -59
  95. package/src/utils/utils.js +109 -109
  96. package/src/utils/validate.js +84 -84
@@ -1,195 +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="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>
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>