@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.
- package/README.md +49 -46
- package/lib/tf-widget.common.js +460 -416
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +460 -416
- package/lib/tf-widget.umd.min.js +3 -3
- package/package/svg-icon/index.js +8 -8
- package/package/svg-icon/src/SvgIcon.vue +59 -59
- package/package/t-data-list/index.js +6 -6
- package/package/t-data-list/main.vue +193 -193
- package/package/t-data-list/src/condition-input/basic.vue +31 -31
- package/package/t-data-list/src/condition-input/date.vue +106 -106
- package/package/t-data-list/src/condition-input/index.vue +100 -100
- package/package/t-data-list/src/condition-input/input.vue +31 -31
- package/package/t-data-list/src/condition-input/number.vue +115 -115
- package/package/t-data-list/src/condition-input/select.vue +86 -86
- package/package/t-data-list/src/js/fieldTypeEnum.js +10 -10
- package/package/t-data-list/src/js/operatorEnum.js +108 -108
- package/package/t-data-list/src/js/qureyParamsEnum.js +4 -4
- package/package/t-data-list/src/js/util.js +34 -34
- package/package/t-data-list/src/mixins/button-controll-mixin.js +93 -93
- package/package/t-data-list/src/pushdown/push-down.vue +158 -158
- package/package/t-data-list/src/t-list-search.vue +36 -36
- package/package/t-data-list/src/t-plan/condition-always-item.vue +143 -143
- package/package/t-data-list/src/t-plan/condition-mult-item.vue +222 -222
- package/package/t-data-list/src/t-plan/index.vue +195 -195
- package/package/t-data-list/src/t-plan/plan-content.vue +389 -389
- package/package/t-data-list/src/t-table/index.vue +129 -129
- package/package/t-data-list/src/t-table/table-group-item-edit.vue +238 -238
- package/package/t-data-list/src/t-table/table-group-item.vue +87 -87
- package/package/t-data-list/src/t-table/table-group.vue +180 -180
- package/package/t-data-list/src/t-table/table-records-header-popover.vue +246 -246
- package/package/t-data-list/src/t-table/table-records-selected.vue +159 -159
- package/package/t-data-list/src/t-table/table-records.vue +337 -337
- package/package/t-input/children/address.vue +101 -101
- package/package/t-input/children/basic-display.vue +41 -41
- package/package/t-input/children/basic.vue +253 -253
- package/package/t-input/children/date.vue +89 -89
- package/package/t-input/children/group-components/group-dialog.vue +344 -344
- package/package/t-input/children/group.vue +126 -126
- package/package/t-input/children/input.vue +72 -72
- package/package/t-input/children/number.vue +74 -74
- package/package/t-input/children/select.vue +89 -89
- package/package/t-input/children/tfile/fiile-enclosure.vue +233 -233
- package/package/t-input/index.js +7 -7
- package/package/t-input/index.vue +337 -337
- package/package/t-input/tInputCache.js +24 -24
- package/package/tf-icon-picker/README.md +7 -7
- package/package/tf-icon-picker/index.js +8 -8
- package/package/tf-icon-picker/src/tf-icon-picker.vue +266 -266
- package/package/tf-layout/README.md +115 -115
- package/package/tf-layout/index.js +8 -8
- package/package/tf-layout/src/components/tf-labelbar.vue +394 -382
- package/package/tf-layout/src/components/tf-menu.vue +180 -180
- package/package/tf-layout/src/components/tf-right-menu.vue +89 -89
- package/package/tf-layout/src/components/tf-rotate-box.vue +50 -50
- package/package/tf-layout/src/tf-layout.vue +140 -120
- package/package/tf-widget/index.js +8 -8
- package/package/tf-widget/src/assets/common-input.less +10 -10
- package/package/tf-widget/src/children/basic-data/basic-data.vue +361 -361
- package/package/tf-widget/src/children/basic-data/dependcy/basic-data-selector.vue +1087 -1087
- package/package/tf-widget/src/children/basic-data/dependcy/common-table.vue +750 -750
- package/package/tf-widget/src/children/basic-data/dependcy/condition-filter.vue +519 -519
- package/package/tf-widget/src/children/basic-data/dependcy/pagination.vue +93 -93
- package/package/tf-widget/src/children/basic-data/dependcy/table-control.vue +240 -240
- package/package/tf-widget/src/children/basic-data/dependcy/view-picture.vue +108 -108
- package/package/tf-widget/src/children/date-time.vue +103 -103
- package/package/tf-widget/src/children/date.vue +103 -103
- package/package/tf-widget/src/children/decimal.vue +115 -115
- package/package/tf-widget/src/children/integer.vue +104 -104
- package/package/tf-widget/src/children/property.vue +59 -59
- package/package/tf-widget/src/children/single-line-text.vue +82 -82
- package/package/tf-widget/src/children/small-pictures.vue +223 -223
- package/package/tf-widget/src/children/text-area.vue +74 -74
- package/package/tf-widget/src/children/tf-select.vue +113 -113
- package/package/tf-widget/src/tf-widget.vue +175 -175
- package/package.json +44 -44
- package/src/api/edit.js +97 -97
- package/src/api/file-enclosure.js +26 -26
- package/src/api/push-down.js +19 -19
- package/src/api/table.js +294 -294
- package/src/api/tableV3.js +160 -160
- package/src/assets/images/icons/index.js +9 -9
- package/src/assets/images/icons/svg/add.svg +5 -5
- package/src/assets/images/icons/svg/push-down.svg +1 -1
- package/src/assets/images/icons/svg/remove.svg +1 -1
- package/src/assets/styles/common-table.less +202 -202
- package/src/directives/debounce.js +24 -24
- package/src/index.js +31 -31
- package/src/mixins/t-data-query-mixin.js +290 -290
- package/src/utils/auth.js +22 -22
- package/src/utils/request.js +42 -42
- package/src/utils/stato-anormale.js +59 -59
- package/src/utils/utils.js +109 -109
- package/src/utils/validate.js +84 -84
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- 分组输入框 -->
|
|
4
|
-
<div class="address">
|
|
5
|
-
<el-cascader
|
|
6
|
-
:value="value"
|
|
7
|
-
:options="options"
|
|
8
|
-
placeholder="选择地址"
|
|
9
|
-
popper-class="t-input-cascader-box"
|
|
10
|
-
separator=""
|
|
11
|
-
:props="{
|
|
12
|
-
value:'name',
|
|
13
|
-
label:'name',
|
|
14
|
-
children:'districts',
|
|
15
|
-
leaf:'leaf',
|
|
16
|
-
lazy:'true',
|
|
17
|
-
lazyLoad:lazyLoad,
|
|
18
|
-
checkStrictly: true
|
|
19
|
-
}"
|
|
20
|
-
filterable
|
|
21
|
-
@input="handleInput"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script>
|
|
28
|
-
|
|
29
|
-
import axios from 'axios'
|
|
30
|
-
import TInputCache from '../tInputCache'
|
|
31
|
-
|
|
32
|
-
export default {
|
|
33
|
-
name: 'Address',
|
|
34
|
-
props: {
|
|
35
|
-
value: {
|
|
36
|
-
type: [String, Object],
|
|
37
|
-
default: null
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
data () {
|
|
41
|
-
return {
|
|
42
|
-
options: []
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
mounted () {
|
|
46
|
-
this.getAddress()
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
lazyLoad (node, resolve) {
|
|
50
|
-
const { data } = node
|
|
51
|
-
resolve(data)
|
|
52
|
-
},
|
|
53
|
-
async getAddress () {
|
|
54
|
-
const tInputDataCache = new TInputCache()
|
|
55
|
-
console.log(tInputDataCache.getCacheData('address'))
|
|
56
|
-
if (tInputDataCache.getCacheData('address')) {
|
|
57
|
-
this.options = tInputDataCache.getCacheData('address')
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
// 这边的接口用的自己的key,后期可能会换
|
|
61
|
-
const res = await axios.get('https://restapi.amap.com/v3/config/district?subdistrict=3&key=7f3a1929b7016033782ef2aace13c449')
|
|
62
|
-
if (!res.data) {
|
|
63
|
-
this.$message.error('未查询到数据')
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
const optionData = this.setLeaf(res.data.districts[0].districts)
|
|
67
|
-
this.options = optionData
|
|
68
|
-
tInputDataCache.setCacheData('address', optionData)
|
|
69
|
-
},
|
|
70
|
-
setLeaf (data) {
|
|
71
|
-
if (!data || data.length === 0) {
|
|
72
|
-
return
|
|
73
|
-
}
|
|
74
|
-
console.log(data)
|
|
75
|
-
data.forEach(e => {
|
|
76
|
-
e.leaf = true
|
|
77
|
-
if (e.districts.length > 0) {
|
|
78
|
-
e.leaf = false
|
|
79
|
-
this.setLeaf(e.districts)
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
return data
|
|
83
|
-
},
|
|
84
|
-
handleInput (value) {
|
|
85
|
-
console.log(value.join(''))
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
</script>
|
|
90
|
-
<style lang="less">
|
|
91
|
-
// 更改地址组组件的样式
|
|
92
|
-
.t-input-cascader-box{
|
|
93
|
-
.el-cascader-panel{
|
|
94
|
-
height: 400px;
|
|
95
|
-
ul{
|
|
96
|
-
height: 400px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- 分组输入框 -->
|
|
4
|
+
<div class="address">
|
|
5
|
+
<el-cascader
|
|
6
|
+
:value="value"
|
|
7
|
+
:options="options"
|
|
8
|
+
placeholder="选择地址"
|
|
9
|
+
popper-class="t-input-cascader-box"
|
|
10
|
+
separator=""
|
|
11
|
+
:props="{
|
|
12
|
+
value:'name',
|
|
13
|
+
label:'name',
|
|
14
|
+
children:'districts',
|
|
15
|
+
leaf:'leaf',
|
|
16
|
+
lazy:'true',
|
|
17
|
+
lazyLoad:lazyLoad,
|
|
18
|
+
checkStrictly: true
|
|
19
|
+
}"
|
|
20
|
+
filterable
|
|
21
|
+
@input="handleInput"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
|
|
29
|
+
import axios from 'axios'
|
|
30
|
+
import TInputCache from '../tInputCache'
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'Address',
|
|
34
|
+
props: {
|
|
35
|
+
value: {
|
|
36
|
+
type: [String, Object],
|
|
37
|
+
default: null
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data () {
|
|
41
|
+
return {
|
|
42
|
+
options: []
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
mounted () {
|
|
46
|
+
this.getAddress()
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
lazyLoad (node, resolve) {
|
|
50
|
+
const { data } = node
|
|
51
|
+
resolve(data)
|
|
52
|
+
},
|
|
53
|
+
async getAddress () {
|
|
54
|
+
const tInputDataCache = new TInputCache()
|
|
55
|
+
console.log(tInputDataCache.getCacheData('address'))
|
|
56
|
+
if (tInputDataCache.getCacheData('address')) {
|
|
57
|
+
this.options = tInputDataCache.getCacheData('address')
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
// 这边的接口用的自己的key,后期可能会换
|
|
61
|
+
const res = await axios.get('https://restapi.amap.com/v3/config/district?subdistrict=3&key=7f3a1929b7016033782ef2aace13c449')
|
|
62
|
+
if (!res.data) {
|
|
63
|
+
this.$message.error('未查询到数据')
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
const optionData = this.setLeaf(res.data.districts[0].districts)
|
|
67
|
+
this.options = optionData
|
|
68
|
+
tInputDataCache.setCacheData('address', optionData)
|
|
69
|
+
},
|
|
70
|
+
setLeaf (data) {
|
|
71
|
+
if (!data || data.length === 0) {
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
console.log(data)
|
|
75
|
+
data.forEach(e => {
|
|
76
|
+
e.leaf = true
|
|
77
|
+
if (e.districts.length > 0) {
|
|
78
|
+
e.leaf = false
|
|
79
|
+
this.setLeaf(e.districts)
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
return data
|
|
83
|
+
},
|
|
84
|
+
handleInput (value) {
|
|
85
|
+
console.log(value.join(''))
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
</script>
|
|
90
|
+
<style lang="less">
|
|
91
|
+
// 更改地址组组件的样式
|
|
92
|
+
.t-input-cascader-box{
|
|
93
|
+
.el-cascader-panel{
|
|
94
|
+
height: 400px;
|
|
95
|
+
ul{
|
|
96
|
+
height: 400px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
</style>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-input disabled :value="displayName" suffix-icon="el-icon-search" />
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
export default {
|
|
6
|
-
components: {
|
|
7
|
-
},
|
|
8
|
-
props: {
|
|
9
|
-
value: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: function () {
|
|
12
|
-
return { name: null, id: null }
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
data () {
|
|
17
|
-
return {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
computed: {
|
|
22
|
-
displayName () {
|
|
23
|
-
return this.value.name
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
created () {
|
|
27
|
-
if (!this.value) {
|
|
28
|
-
this.hanleInput({ name: null, id: null })
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
hanleInput (value) {
|
|
33
|
-
this.$emit('input', value)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<style scoped>
|
|
40
|
-
|
|
41
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<el-input disabled :value="displayName" suffix-icon="el-icon-search" />
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
export default {
|
|
6
|
+
components: {
|
|
7
|
+
},
|
|
8
|
+
props: {
|
|
9
|
+
value: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: function () {
|
|
12
|
+
return { name: null, id: null }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
data () {
|
|
17
|
+
return {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
computed: {
|
|
22
|
+
displayName () {
|
|
23
|
+
return this.value.name
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
created () {
|
|
27
|
+
if (!this.value) {
|
|
28
|
+
this.hanleInput({ name: null, id: null })
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
hanleInput (value) {
|
|
33
|
+
this.$emit('input', value)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
|
|
41
|
+
</style>
|