@tongfun/tf-widget 0.1.28 → 0.1.31

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 (81) hide show
  1. package/README.md +282 -2
  2. package/lib/tf-widget.common.js +89118 -19254
  3. package/lib/tf-widget.css +1 -1
  4. package/lib/tf-widget.umd.js +89118 -19254
  5. package/lib/tf-widget.umd.min.js +17 -4
  6. package/package.json +2 -1
  7. package/package/svg-icon/index.js +0 -8
  8. package/package/svg-icon/src/SvgIcon.vue +0 -59
  9. package/package/t-data-list/index.js +0 -6
  10. package/package/t-data-list/main.vue +0 -193
  11. package/package/t-data-list/src/condition-input/basic.vue +0 -31
  12. package/package/t-data-list/src/condition-input/date.vue +0 -106
  13. package/package/t-data-list/src/condition-input/index.vue +0 -100
  14. package/package/t-data-list/src/condition-input/input.vue +0 -31
  15. package/package/t-data-list/src/condition-input/number.vue +0 -115
  16. package/package/t-data-list/src/condition-input/select.vue +0 -86
  17. package/package/t-data-list/src/js/fieldTypeEnum.js +0 -10
  18. package/package/t-data-list/src/js/operatorEnum.js +0 -108
  19. package/package/t-data-list/src/js/qureyParamsEnum.js +0 -4
  20. package/package/t-data-list/src/js/util.js +0 -34
  21. package/package/t-data-list/src/mixins/button-controll-mixin.js +0 -93
  22. package/package/t-data-list/src/pushdown/push-down.vue +0 -158
  23. package/package/t-data-list/src/t-list-search.vue +0 -36
  24. package/package/t-data-list/src/t-plan/condition-always-item.vue +0 -143
  25. package/package/t-data-list/src/t-plan/condition-mult-item.vue +0 -222
  26. package/package/t-data-list/src/t-plan/index.vue +0 -195
  27. package/package/t-data-list/src/t-plan/plan-content.vue +0 -389
  28. package/package/t-data-list/src/t-table/index.vue +0 -129
  29. package/package/t-data-list/src/t-table/table-group-item-edit.vue +0 -238
  30. package/package/t-data-list/src/t-table/table-group-item.vue +0 -87
  31. package/package/t-data-list/src/t-table/table-group.vue +0 -180
  32. package/package/t-data-list/src/t-table/table-records-header-popover.vue +0 -246
  33. package/package/t-data-list/src/t-table/table-records-selected.vue +0 -159
  34. package/package/t-data-list/src/t-table/table-records.vue +0 -336
  35. package/package/t-input/children/address.vue +0 -101
  36. package/package/t-input/children/basic-display.vue +0 -41
  37. package/package/t-input/children/basic.vue +0 -261
  38. package/package/t-input/children/date.vue +0 -84
  39. package/package/t-input/children/group-components/group-dialog.vue +0 -344
  40. package/package/t-input/children/group.vue +0 -126
  41. package/package/t-input/children/input.vue +0 -67
  42. package/package/t-input/children/number.vue +0 -71
  43. package/package/t-input/children/select.vue +0 -86
  44. package/package/t-input/children/tfile/fiile-enclosure.vue +0 -233
  45. package/package/t-input/children/tfile/file-img/comp.png +0 -0
  46. package/package/t-input/children/tfile/file-img/excel.png +0 -0
  47. package/package/t-input/children/tfile/file-img/img.png +0 -0
  48. package/package/t-input/children/tfile/file-img/pdf.png +0 -0
  49. package/package/t-input/children/tfile/file-img/word.png +0 -0
  50. package/package/t-input/index.js +0 -7
  51. package/package/t-input/index.vue +0 -337
  52. package/package/t-input/tInputCache.js +0 -24
  53. package/package/tf-icon-picker/README.md +0 -8
  54. package/package/tf-icon-picker/index.js +0 -8
  55. package/package/tf-icon-picker/src/tf-icon-picker.vue +0 -266
  56. package/package/tf-layout/README.md +0 -115
  57. package/package/tf-layout/index.js +0 -8
  58. package/package/tf-layout/src/components/tf-labelbar.vue +0 -394
  59. package/package/tf-layout/src/components/tf-menu.vue +0 -180
  60. package/package/tf-layout/src/components/tf-right-menu.vue +0 -89
  61. package/package/tf-layout/src/components/tf-rotate-box.vue +0 -50
  62. package/package/tf-layout/src/tf-layout.vue +0 -140
  63. package/package/tf-widget/index.js +0 -8
  64. package/package/tf-widget/src/assets/common-input.less +0 -11
  65. package/package/tf-widget/src/children/basic-data/basic-data.vue +0 -361
  66. package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +0 -1087
  67. package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +0 -750
  68. package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +0 -519
  69. package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +0 -93
  70. package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +0 -240
  71. package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +0 -108
  72. package/package/tf-widget/src/children/date-time.vue +0 -103
  73. package/package/tf-widget/src/children/date.vue +0 -103
  74. package/package/tf-widget/src/children/decimal.vue +0 -115
  75. package/package/tf-widget/src/children/integer.vue +0 -104
  76. package/package/tf-widget/src/children/property.vue +0 -59
  77. package/package/tf-widget/src/children/single-line-text.vue +0 -82
  78. package/package/tf-widget/src/children/small-pictures.vue +0 -223
  79. package/package/tf-widget/src/children/text-area.vue +0 -74
  80. package/package/tf-widget/src/children/tf-select.vue +0 -113
  81. package/package/tf-widget/src/tf-widget.vue +0 -175
@@ -1,222 +0,0 @@
1
- <template>
2
- <div class="condition-item">
3
- <!-- 左侧括号 -->
4
- <el-select v-model="condition.leftBracket" :popper-append-to-body="false" size="mini" class="bracket" placeholder="">
5
- <el-option lable="(" value="(" />
6
- <el-option lable="((" value="((" />
7
- <el-option lable="(((" value="(((" />
8
- </el-select>
9
-
10
- <!-- 字段名 -->
11
- <el-select v-model="condition.field" :popper-append-to-body="false" size="mini" placeholder="" class="condition-field" @change="handleFieldSelect">
12
- <el-option
13
- v-for="option in fieldsOptions"
14
- :key="option.field"
15
- :label="option.title"
16
- :value="option.field"
17
- />
18
- </el-select>
19
-
20
- <!-- 运算符 -->
21
- <el-select v-model="condition.operator" :popper-append-to-body="false" size="mini" placeholder="" class="condition-operator">
22
- <el-option
23
- v-for="option in operatorOptions"
24
- :key="option.value"
25
- :label="option.label"
26
- :value="option.value"
27
- />
28
- </el-select>
29
-
30
- <!-- 值 -->
31
- <ConditionInput
32
- v-model="condition.value"
33
- :disabled="inputDisabled"
34
- :type="inputType"
35
- :field="condition.field"
36
- :multi="multiSelect"
37
- :range="range"
38
- />
39
-
40
- <!-- 右侧括号 -->
41
- <el-select v-model="condition.rightBracket" :popper-append-to-body="false" class="bracket" size="mini" placeholder="">
42
- <el-option label=")" value=")" />
43
- <el-option label="))" value="))" />
44
- <el-option label=")))" value=")))" />
45
- </el-select>
46
-
47
- <!-- 条件之间的逻辑运算符 -->
48
- <el-select v-model="condition.relation" :popper-append-to-body="false" size="mini" class="condition-relation" placeholder="">
49
- <el-option value="AND" label="并且" />
50
- <el-option value="OR" label="或者" />
51
- </el-select>
52
-
53
- <!-- 移除条件按钮 -->
54
- <i class="el-icon-remove icon" @click="removeCondition" />
55
- </div>
56
- </template>
57
- <script>
58
- import getOperatorOption from '../js/operatorEnum.js'
59
- import ConditionInput from '../condition-input'
60
- import FieldTypeEnum from '../js/fieldTypeEnum.js'
61
- export default {
62
- name: 'ConditionItem',
63
- components: {
64
- ConditionInput
65
- },
66
- props: {
67
- condition: {
68
- type: Object,
69
- default: null
70
- }
71
- },
72
- data () {
73
- return {
74
- selectData: {
75
- field: {}
76
- }
77
- }
78
- },
79
- computed: {
80
- /**
81
- * 字段相关
82
- */
83
- // 字段的可选选项
84
- fieldsOptions () {
85
- this.getFieldsOption().forEach(e => {
86
- this.selectData.field[e.field] = e
87
- })
88
- return this.getFieldsOption()
89
- },
90
- // 当前选择的字段
91
- currentField () {
92
- return this.fieldsOptions.find(item => item.field === this.condition.field) || null
93
- },
94
-
95
- /**
96
- * 操作符相关
97
- */
98
- // 当前字段对应的操作符可选选项
99
- operatorOptions () {
100
- if (!this.currentField) {
101
- return []
102
- }
103
- return getOperatorOption(FieldTypeEnum[this.currentField.componentValueType])
104
- },
105
- // 当前选中的操作符选项
106
- currentOperatorOption () {
107
- return this.operatorOptions.find(item => item.value === this.condition.operator) || null
108
- },
109
-
110
- /**
111
- * 值相关
112
- */
113
- inputType () {
114
- if (!this.currentField) {
115
- return 'input'
116
- }
117
- return FieldTypeEnum[this.currentField.componentValueType]
118
- },
119
- // 如果值是枚举类型,是否要开启select的多选模式
120
- multiSelect () {
121
- const currentOperatorOption = this.operatorOptions.find(item => item.value === this.condition.operator)
122
- return currentOperatorOption && currentOperatorOption.multi
123
- },
124
- range () {
125
- const currentOperatorOption = this.operatorOptions.find(item => item.value === this.condition.operator)
126
- return currentOperatorOption && currentOperatorOption.range
127
- },
128
- // 值输入控件是否关闭
129
- inputDisabled () {
130
- if (!this.condition.field) {
131
- return true
132
- }
133
- const currentOperatorOption = this.operatorOptions.find(item => item.value === this.condition.operator)
134
- if (!currentOperatorOption) {
135
- return true
136
- }
137
- return currentOperatorOption.over
138
- }
139
- },
140
- watch: {
141
- // 当字段发生了变化,清空之前的字段的之后输入的内容,并将操作符切换到第一个
142
- 'condition.field' (newValue) {
143
- this.condition.value = ''
144
- this.$nextTick(() => {
145
- this.condition.operator = this.operatorOptions[0].value
146
- })
147
- },
148
- // 监听运算符选项的变化,清空输入框的值
149
- 'condition.operator' (newValue) {
150
- this.condition.value = ''
151
- }
152
- },
153
- created () {
154
- /**
155
- * 点击新增按钮添加的条件,需要进行初始化
156
- *
157
- */
158
- if (!this.condition.field) {
159
- this.condition.field = this.fieldsOptions[0].field
160
- this.condition.fieldType = this.fieldsOptions[0].componentType
161
- }
162
- },
163
- inject: ['getFieldsOption'],
164
- methods: {
165
- removeCondition () {
166
- this.$emit('remove')
167
- },
168
- // 绑定fieldType的值
169
- handleFieldSelect (field) {
170
- this.condition.fieldType = this.selectData.field[field].componentType
171
- }
172
- }
173
- }
174
- </script>
175
-
176
- <style scoped lang='less'>
177
- .condition-item {
178
- margin:10px 0;
179
- display:flex;
180
- //左右括号
181
- .bracket {
182
- ::v-deep .el-input__inner {
183
- width:70px;
184
- }
185
- }
186
-
187
- //字段选择框
188
- .condition-field {
189
- ::v-deep .el-input__inner {
190
- width:140px;
191
- }
192
- }
193
-
194
- // 条件运算符,选择框
195
- .condition-operator{
196
- ::v-deep .el-input__inner {
197
- width:100px;
198
- }
199
- }
200
-
201
- //值输入框
202
-
203
- // 条件直接的逻辑关系
204
- .condition-relation {
205
- ::v-deep .el-input__inner {
206
- width:76px;
207
- }
208
- }
209
-
210
- .el-icon-remove {
211
- color:gainsboro;
212
- display:flex;
213
- align-items: center;
214
- justify-content: center;
215
- font-size:15px;
216
- margin-left:7px;
217
- }
218
- .icon:hover {
219
- color:red !important;
220
- }
221
- }
222
- </style>
@@ -1,195 +0,0 @@
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>