@tongfun/tf-widget 0.1.21 → 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.
- package/README.md +49 -49
- package/lib/tf-widget.common.js +547 -503
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +547 -503
- package/lib/tf-widget.umd.min.js +4 -4
- 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 -394
- 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 -140
- 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 +166 -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,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>
|