@tongfun/tf-widget 0.1.29 → 0.1.30

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 +4 -0
  2. package/lib/tf-widget.common.js +264 -226
  3. package/lib/tf-widget.css +1 -1
  4. package/lib/tf-widget.umd.js +264 -226
  5. package/lib/tf-widget.umd.min.js +4 -4
  6. package/package.json +1 -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 -366
  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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tongfun/tf-widget",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "tf-widget",
5
5
  "main": "lib/tf-widget.umd.js",
6
6
  "private": false,
@@ -1,8 +0,0 @@
1
- import SvgIcon from './src/SvgIcon'
2
-
3
- /* istanbul ignore next */
4
- SvgIcon.install = function (Vue) {
5
- Vue.component(SvgIcon.name, SvgIcon)
6
- }
7
-
8
- export default SvgIcon
@@ -1,59 +0,0 @@
1
- <template>
2
- <div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
3
- <svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
4
- <use :xlink:href="iconName" />
5
- </svg>
6
- </template>
7
-
8
- <script>
9
- import { isExternal } from '@/utils/validate'
10
- export default {
11
- name: 'SvgIcon',
12
- props: {
13
- iconClass: {
14
- type: String,
15
- required: true
16
- },
17
- className: {
18
- type: String,
19
- default: ''
20
- }
21
- },
22
- computed: {
23
- isExternal () {
24
- return isExternal(this.iconClass)
25
- },
26
- iconName () {
27
- return `#icon-${this.iconClass}`
28
- },
29
- svgClass () {
30
- if (this.className) {
31
- return 'svg-icon ' + this.className
32
- } else {
33
- return 'svg-icon'
34
- }
35
- },
36
- styleExternalIcon () {
37
- return {
38
- mask: `url(${this.iconClass}) no-repeat 50% 50%`,
39
- '-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
40
- }
41
- }
42
- }
43
- }
44
- </script>
45
-
46
- <style scoped>
47
- .svg-icon {
48
- width: 1em;
49
- height: 1em;
50
- vertical-align: -0.15em;
51
- fill: currentColor;
52
- overflow: hidden;
53
- }
54
- .svg-external-icon {
55
- background-color: currentColor;
56
- mask-size: cover!important;
57
- display: inline-block;
58
- }
59
- </style>
@@ -1,6 +0,0 @@
1
- import TDataList from './main.vue'
2
-
3
- TDataList.install = function (Vue) {
4
- Vue.component(TDataList.name, TDataList)
5
- }
6
- export default TDataList
@@ -1,193 +0,0 @@
1
- <template>
2
- <div class="page">
3
- <div class="t-data-list-controll">
4
- <div class="common-table-header">
5
- <!--
6
- 按钮区域
7
- 以下按钮的处理逻辑统一在button-controll-mixin的混入对象当中
8
- -->
9
- <div class="common-table-buttons">
10
- <slot name="insertReplace" />
11
- <el-button v-if="!$slots.insertReplace" v-debounce type="primary" size="mini" @click="insert">新增</el-button>
12
-
13
- <slot name="updateReplace" />
14
- <el-button v-if="!$slots.updateReplace" v-debounce type="primary" size="mini" @click="update">修改</el-button>
15
-
16
- <slot name="pushDownReplace" />
17
- <el-button v-if="!$slots.pushDownReplace && pushDownTableName" v-debounce type="primary" size="mini" @click="showPushDown">下推</el-button>
18
-
19
- <slot name="deleteReplace" />
20
- <el-button v-if="!$slots.deleteReplace" v-debounce type="primary" size="mini" @click="del">删除 </el-button>
21
-
22
- <el-button v-debounce type="primary" size="mini" @click="refresh(false,true)">刷新 </el-button>
23
- <!-- <el-button type="primary" size="mini">批改</el-button> -->
24
- <slot name="importAndExport" />
25
- <slot name="buttons" :ids="ids" :rows="selectedRows" />
26
- </div>
27
-
28
- <!-- 搜索输入框 -->
29
- <TListSearch ref="tListSearchRef" class="common-table-buttons-search" @search="handleSuggestMultiCondition($event,false)" />
30
- </div>
31
- <!--过滤方案-->
32
- <Tplan ref="TplanRef" :fields-option="tableLayout" @change="handlePlanConditionChange" />
33
- </div>
34
-
35
- <!--
36
- 数据区域
37
- layout:表格表头字段和类型
38
- sum: 表格的底部合集行的数据,条件发生改变的时候获取新的结果,翻页不获取
39
- show-summary
40
- data:表格的数据
41
- enableGroup:是否显示分组,一般基础资料列表显示分组,业务列表不显示
42
- enable-group-edit: 分组是否可以编辑(添加修改,一般基础资料列表中可以修改,弹窗中不允许修改
43
- page-size:每页条数
44
- current-page:当前页数
45
- update-in-dialog:点击编辑或者双击数据行的时候,不进行页面跳转,而是将该行的id发射出来
46
- @groupChange:监听分组条件改变
47
- @conditionChange 监听到表头条件改变
48
- @size-change 监听每页条数改变
49
- @current-change 监听当前页改
50
- @dbclick 处理双击事件
51
- @dbRowClick 也是双击事件,但是当前行的数据被事件发射出来
52
- -->
53
- <Ttable
54
- ref="TtableRef"
55
- class="t-table"
56
- :layout="tableLayout"
57
- :sum="tableSum"
58
- show-summary
59
- :data="tableData"
60
- :enable-sum="enableSum"
61
- :enable-group="enableGroup"
62
- enable-group-edit
63
- :page-size="query.pageSize"
64
- :current-page="query.pageNum"
65
- :update-in-dialog="getDbId"
66
- @condition-change="handleHeadChange"
67
- @groupChange="handleGroupChange"
68
- @size-change="handleSizeChange"
69
- @current-change="handleCurrentChange"
70
- @dbClick="handleDbClick"
71
- @dbRowClick="$emit('dbRowClick',$event)"
72
- />
73
-
74
- <!-- 下推弹窗 -->
75
- <PushDown
76
- :visible.sync="pushdownVisible"
77
- :push-down-table-name="pushDownTableName"
78
- :parent-selection-data="ids"
79
- />
80
- </div>
81
- </template>
82
- <script>
83
- import TListSearch from './src/t-list-search.vue'
84
- import Tplan from './src/t-plan'
85
- import Ttable from './src/t-table'
86
- import PushDown from './src/pushdown/push-down.vue'
87
- import buttonControll from './src/mixins/button-controll-mixin.js'
88
- import dataQuery from '@/mixins/t-data-query-mixin.js'
89
- import debounce from '@/directives/debounce.js'
90
- export default {
91
- name: 'TDataList',
92
- components: {
93
- Tplan, Ttable, PushDown, TListSearch
94
- },
95
- directives: {
96
- debounce
97
- },
98
- mixins: [buttonControll, dataQuery],
99
- props: {
100
- // 目标单据,接口地址的一部分,单据列表的标识符
101
- target: {
102
- type: String,
103
- default: ''
104
- },
105
- pushDownTableName: {
106
- type: String,
107
- default: null
108
- },
109
- // 表格双击不跳转路由,而是将数据的id发射出来
110
- getDbId: {
111
- type: Boolean,
112
- default: false
113
- },
114
- getDbRow: {
115
- type: Boolean,
116
- default: false
117
- },
118
- // 页面组件控制配置
119
- showHeader: {
120
- type: Boolean,
121
- default: true
122
- },
123
- enableGroup: {
124
- type: Boolean,
125
- default: false
126
- },
127
- enableSum: {
128
- type: Boolean,
129
- default: false
130
- }
131
- },
132
- data () {
133
- return {
134
- // 下推弹窗是否显示
135
- pushdownVisible: false,
136
- queryType: 'LIST'
137
- }
138
- },
139
- created () {
140
- this.getTableLayout()
141
- },
142
- methods: {
143
- /**
144
- * 方案进行切换/方案中的高级条件变化后进行查询
145
- * 在方案中点击查促按钮触发此事件
146
- * 也是列表页面第一次获取表格数据内容的入口
147
- */
148
- handlePlanConditionChange (value) {
149
- this.queryPlanCondition = value.conditionMulti
150
- this.query.conditionAlwaysList = value.conditionAlways
151
- this.getTableData(false, true)
152
- },
153
- // 数据行被双击
154
- handleDbClick (value) {
155
- this.$emit('dbClick', value)
156
- }
157
- }
158
- }
159
- </script>
160
-
161
- <style lang="less" scoped>
162
- // 列表页面的外轮廓
163
- .page{
164
- height:100%;
165
- margin:0 10px;
166
- background-color: #F0F2F5;
167
- border-radius:10px;
168
- //按钮组和过滤条件所在列表的操控区域的样式
169
- .t-data-list-controll {
170
- // height:6vh;
171
- border-radius: 4px;
172
- padding: 1.1111vh 1.1111vh 0 1.1111vh;
173
- background-color: #fff;
174
- margin-bottom:10px;
175
- .common-table-header{
176
- display: flex;
177
- justify-content: space-between;
178
- .common-table-buttons{
179
- min-width: 800px;
180
- display: flex;
181
- justify-content: flex-start;
182
- .el-button{
183
- background-color: #0c4c8e!important;
184
- border-color: #0c4c8e;
185
- }
186
- }
187
- .common-table-buttons-search{
188
- height: 30px;
189
- }
190
- }
191
- }
192
- }
193
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <el-input :value="value" size="mini" :disabled="disabled" @input="handleInput" />
3
- </template>
4
- <script>
5
- export default {
6
- props: {
7
- value: {
8
- type: String,
9
- default: ''
10
- },
11
- disabled: {
12
- type: Boolean,
13
- default: false
14
- }
15
- },
16
- data () {
17
- return {
18
-
19
- }
20
- },
21
- methods: {
22
- handleInput (newValue) {
23
- this.$emit('input', newValue)
24
- }
25
- }
26
- }
27
- </script>
28
-
29
- <style scoped>
30
-
31
- </style>
@@ -1,106 +0,0 @@
1
- <template>
2
- <!-- <el-date-picker
3
- :value="dateValue"
4
- size="mini"
5
- :type="type"
6
- :disabled="disabled"
7
- :format="timeFormmat"
8
- value-format="yyyy-MM-dd HH:mm:ss"
9
- style="width:100%"
10
- @input="dateValue = $event"
11
- /> -->
12
- <DatePicker
13
- v-model="dateValue"
14
- class="wrapper"
15
- range-separator="-"
16
- :type="type"
17
- value-type="YYYY-MM-DD HH:mm:ss"
18
- confirm
19
- confirm-text="确定"
20
- :range="range"
21
- :append-to-body="false"
22
- :format="displayFormat"
23
- />
24
-
25
- </template>
26
- <script>
27
- import DatePicker from 'vue2-datepicker'
28
- import 'vue2-datepicker/index.css'
29
- import 'vue2-datepicker/locale/zh-cn'
30
- export default {
31
- components: {
32
- DatePicker
33
- },
34
- props: {
35
- value: {
36
- type: String,
37
- default: null
38
- },
39
- disabled: {
40
- type: Boolean,
41
- default: false
42
- },
43
- datetime: {
44
- type: Boolean,
45
- default: false
46
- },
47
- range: {
48
- type: Boolean,
49
- default: false
50
- }
51
- },
52
- data () {
53
- return {
54
-
55
- }
56
- },
57
- computed: {
58
- /**
59
- * 时间范围element使用数组,时间使用字符串
60
- * 该计算属性,始终保持外界的数据格式为字符串,如果是范围,将使用‘,’对两个值进行分割
61
- */
62
- dateValue: {
63
- get () {
64
- if (this.range) {
65
- if (this.value) {
66
- return this.value.split(',')
67
- }
68
- }
69
- return this.value
70
- },
71
- set (value) {
72
- if (this.range) {
73
- return this.$emit('input', value.join())
74
- }
75
- this.$emit('input', value)
76
- }
77
- },
78
- type () {
79
- return this.datetime ? 'datetime' : 'date'
80
- },
81
- displayFormat () {
82
- return this.datetime
83
- ? 'YYYY-MM-DD HH:mm:ss'
84
- : 'YYYY-MM-DD'
85
- }
86
- }
87
- }
88
- </script>
89
-
90
- <style scoped lang='less'>
91
- .wrapper {
92
- height:100%;
93
- width:100%;
94
- height:100%;
95
- width:100%;
96
- ::v-deep .mx-input {
97
- height:28px !important;
98
- }
99
- }
100
- // .t-date-picker {
101
- // height:100%;
102
- // border:1px solid #dddfe6;
103
- // width:100%;
104
- // }
105
-
106
- </style>
@@ -1,100 +0,0 @@
1
- <template>
2
- <div class="condition-input">
3
- <component
4
- :is="inputType"
5
- :value="value"
6
- :disabled="disabled"
7
- :datetime="isDateTime"
8
- :multi="multi"
9
- :field="field"
10
- :range="range"
11
- :table-head="tableHead"
12
- @input="handleInput"
13
- />
14
- <span class="err-msg">{{ errorMsg }}</span>
15
- </div>
16
- </template>
17
- <script>
18
- import cdate from './date.vue'
19
- import cinput from './input.vue'
20
- import cselect from './select.vue'
21
- import cnumber from './number.vue'
22
- import cbasic from './basic.vue'
23
- export default {
24
- components: {
25
- cdate, cinput, cselect, cnumber, cbasic
26
- },
27
- props: {
28
- type: {
29
- type: String,
30
- default: ''
31
- },
32
- value: {
33
- type: String,
34
- default: ''
35
- },
36
- disabled: {
37
- type: Boolean,
38
- default: false
39
- },
40
- // 当前的字段,用来获取枚举的选项的参数
41
- field: {
42
- type: String,
43
- default: ''
44
- },
45
- // 是否开启多选,针对枚举类型的数据
46
- multi: {
47
- type: Boolean,
48
- default: false
49
- },
50
- // 是否是范围类型的输入
51
- range: {
52
- type: Boolean,
53
- default: false
54
- },
55
- // 当前的输入空间在表头上进行使用,使用不同样式和不同逻辑的判断依据
56
- tableHead: {
57
- type: Boolean,
58
- default: false
59
- }
60
-
61
- },
62
- data () {
63
- return {
64
- typeEnum: {
65
- input: 'cinput',
66
- enum: 'cselect',
67
- date: 'cdate',
68
- datetime: 'cdate',
69
- number: 'cnumber',
70
- basic: 'cbasic'
71
- },
72
- errorMsg: ''
73
- }
74
- },
75
- computed: {
76
- inputType () {
77
- return this.typeEnum[this.type]
78
- },
79
- isDateTime () {
80
- return this.type === 'datetime'
81
- }
82
- },
83
- methods: {
84
- handleInput (newValue) {
85
- this.$emit('input', newValue)
86
- }
87
-
88
- }
89
- }
90
- </script>
91
-
92
- <style lang='less' scoped>
93
- .condition-input {
94
- ::v-deep el-input {
95
- box-sizing: border-box;
96
-
97
- }
98
- }
99
-
100
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <el-input :value="value" size="mini" :disabled="disabled" @input="handleInput" />
3
- </template>
4
- <script>
5
- export default {
6
- props: {
7
- value: {
8
- type: String,
9
- default: ''
10
- },
11
- disabled: {
12
- type: Boolean,
13
- default: false
14
- }
15
- },
16
- data () {
17
- return {
18
-
19
- }
20
- },
21
- methods: {
22
- handleInput (newValue) {
23
- this.$emit('input', newValue)
24
- }
25
- }
26
- }
27
- </script>
28
-
29
- <style scoped>
30
-
31
- </style>
@@ -1,115 +0,0 @@
1
- <template>
2
- <el-input v-if="!range" :value="value" size="mini" @input="handleInput" />
3
- <div v-else :class="[tableHead?'col-layout':'row-layout']">
4
- <el-input :value="numberRangeValue.start" size="mini" @input="handleStartInput" />
5
- <span class="number-separators">~</span>
6
- <el-input :value="numberRangeValue.end" size="mini" @input="handleEndInput" />
7
- </div>
8
- </template>
9
- <script>
10
- export default {
11
- components: {
12
-
13
- },
14
- props: {
15
- value: {
16
- type: String,
17
- default: ''
18
- },
19
- disabled: {
20
- type: Boolean,
21
- default: false
22
- },
23
- range: {
24
- type: Boolean,
25
- default: false
26
- },
27
- tableHead: {
28
- type: Boolean,
29
- default: false
30
- }
31
- },
32
- data () {
33
- return {
34
- numberRangeValue: {
35
- start: '',
36
- end: ''
37
- }
38
- }
39
- },
40
- watch: {
41
- value () {
42
- if (this.range) {
43
- if (!this.value) return
44
- const dataArr = this.value.split(',')
45
- this.numberRangeValue.start = dataArr[0] || ''
46
- this.numberRangeValue.end = dataArr[1] || ''
47
- }
48
- }
49
- },
50
- methods: {
51
- /**
52
- * 将输入转换为数字,如果不能转换则进行忽略
53
- */
54
- inputValid (value) {
55
- return /^\d*$/g.test(value)
56
- },
57
-
58
- /**
59
- * 非范围状态的输入处理函数
60
- */
61
- handleInput (value) {
62
- if (!this.inputValid(value)) {
63
- return
64
- }
65
- this.$emit('input', value)
66
- },
67
-
68
- /**
69
- * 范围开始的输入处理
70
- */
71
- handleStartInput (value) {
72
- if (!this.inputValid(value)) {
73
- return
74
- }
75
- this.numberRangeValue.start = value
76
- this.emitRangeValue()
77
- },
78
-
79
- /**
80
- * 范围的结束输入处理
81
- */
82
- handleEndInput (value) {
83
- if (!this.inputValid(value)) {
84
- return
85
- }
86
- this.numberRangeValue.end = value
87
- this.emitRangeValue()
88
- },
89
-
90
- /**
91
- * 范围输入对外发射
92
- */
93
- emitRangeValue () {
94
- const start = this.numberRangeValue.start
95
- const end = this.numberRangeValue.end
96
- this.$emit('input', `${start},${end}`)
97
- }
98
-
99
- }
100
- }
101
- </script>
102
- <style lang='less' scoped>
103
- .row-layout {
104
- display:flex;
105
- }
106
- .col-layout {
107
- display:flex;
108
- flex-direction: column;
109
- }
110
- .number-separators{
111
- display:flex;
112
- align-items: center;
113
- justify-content: center;
114
- }
115
- </style>