ci-plus 1.8.7 → 1.8.9
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
CHANGED
package/package.json
CHANGED
|
@@ -1,287 +1,275 @@
|
|
|
1
1
|
## 使用示例
|
|
2
2
|
|
|
3
3
|
```ts
|
|
4
|
-
const useBackStoreM = defineStore(
|
|
5
|
-
|
|
6
|
-
() => {
|
|
7
|
-
const ifshow = ref(true)
|
|
4
|
+
const useBackStoreM = defineStore('MaterialWarehouse-MaterialsPreparationNotice-index', () => {
|
|
5
|
+
const ifshow = ref(true)
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
})
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
col: { width: 150, label: '产线', prop: 'line_name' },
|
|
60
|
-
// 示例3:输入框
|
|
61
|
-
header(createVNode: any) {
|
|
62
|
-
return createVNode(HeaderInput, {
|
|
63
|
-
text: '产线',
|
|
64
|
-
column: 'line_name',
|
|
65
|
-
storePar: store.params.value,
|
|
66
|
-
type: 'text',
|
|
67
|
-
disableFilter: false,// 关闭筛选功能true
|
|
68
|
-
selectConfig: {},
|
|
69
|
-
placeholder: '请输入关键字...',
|
|
70
|
-
onChange(val: any) {
|
|
71
|
-
console.log('val: ', val)
|
|
72
|
-
store.HEADERSEARCH(val)
|
|
73
|
-
console.log('当前的参数: ', store.params.value)
|
|
74
|
-
},
|
|
75
|
-
onGetstore(val: any) {
|
|
76
|
-
console.log('val: ', val)
|
|
77
|
-
console.log('当前的参数: ', store.params.value)
|
|
78
|
-
},
|
|
79
|
-
ordersConfig: { enableOrder: false }, // 开启排序功能true
|
|
80
|
-
})
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
col: {
|
|
85
|
-
width: 100,
|
|
86
|
-
label: '通用件库存',
|
|
87
|
-
prop: 'common_parts_inventory_count',
|
|
88
|
-
},
|
|
89
|
-
component(createVNode, { row }: Scoped) {
|
|
90
|
-
return createVNode(
|
|
91
|
-
'div',
|
|
92
|
-
{
|
|
93
|
-
style: {
|
|
94
|
-
color: `${row.common_parts_inventory_count < row.count
|
|
95
|
-
? 'red'
|
|
96
|
-
: 'black'
|
|
97
|
-
}`,
|
|
98
|
-
}, // 行内样式
|
|
99
|
-
class: 'flex-a-c', // 添加一个flex-a-c的class名称
|
|
100
|
-
},
|
|
101
|
-
row.common_parts_inventory_count,
|
|
102
|
-
)
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
col: { width: 100, label: '状态', prop: 'state', fixed: 'right' },
|
|
108
|
-
component(createVNode, { row }: Scoped) {
|
|
109
|
-
let { type, val } = setLibraryName(row.state)
|
|
110
|
-
if (val) {
|
|
111
|
-
return createVNode(ElTag, { type, class: 'ml-2' }, () => val)
|
|
112
|
-
} else {
|
|
113
|
-
return createVNode('div', [val])
|
|
7
|
+
type Scoped = Scope<MPNRes>
|
|
8
|
+
const store: ReturnType<
|
|
9
|
+
ReturnType<typeof getOptStore<MPNRes, any, any, any, { ids: number[] }>>
|
|
10
|
+
> = getOptStore<MPNRes, any, any, any, { ids: number[] }>({
|
|
11
|
+
model: 'material_preparation_notice_list', // 请求地址:material_preparation_notice_list_post
|
|
12
|
+
id: 'MaterialWarehouse-MaterialsPreparationNotice-index', // 配置存储的id(约定项目名称-模块名称-页面名称)
|
|
13
|
+
name: '材料库_备料通知',
|
|
14
|
+
storage_type: '', //CHUKU
|
|
15
|
+
params: { limit: 20, storage_type: 'CAILIAO' },
|
|
16
|
+
baseUrl: storageModule,
|
|
17
|
+
setId: true,
|
|
18
|
+
ifInitData: false, // 是否初始请求表格数据
|
|
19
|
+
sortColumn: [
|
|
20
|
+
{ col: { width: 60, label: '序号', type: 'index', fixed: 'left' } },
|
|
21
|
+
{
|
|
22
|
+
col: { width: 130, label: '计划开始时间', prop: 'plan_start_date' },
|
|
23
|
+
// 示例1:日期格式
|
|
24
|
+
header(createVNode: any) {
|
|
25
|
+
return createVNode(HeaderInput, {
|
|
26
|
+
text: '计划开始时间',
|
|
27
|
+
column: 'plan_start_date',
|
|
28
|
+
storePar: store.params.value,
|
|
29
|
+
type: 'date',
|
|
30
|
+
placeholder: '请选择...',
|
|
31
|
+
popperStyle: { width: '450px', height: '300px' },
|
|
32
|
+
onChange(val: any) {
|
|
33
|
+
console.log('val: ', val)
|
|
34
|
+
store.HEADERSEARCH(val)
|
|
35
|
+
console.log('当前的参数: ', store.params.value)
|
|
36
|
+
},
|
|
37
|
+
ordersConfig: { enableOrder: true }
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
col: { width: 330, label: '物料编码', prop: 'material_info' },
|
|
43
|
+
// 示例2:输入框(简写)
|
|
44
|
+
header(createVNode: any) {
|
|
45
|
+
return createVNode(HeaderInput, {
|
|
46
|
+
text: '物料编码|物料名称|物料型号',
|
|
47
|
+
column: 'material_info',
|
|
48
|
+
storePar: store.params.value,
|
|
49
|
+
placeholder: '请输入关键字...',
|
|
50
|
+
onChange(val: any) {
|
|
51
|
+
store.HEADERSEARCH(val)
|
|
114
52
|
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
col: { width: 150, label: '产线', prop: 'line_name' },
|
|
58
|
+
// 示例3:输入框
|
|
59
|
+
header(createVNode: any) {
|
|
60
|
+
return createVNode(HeaderInput, {
|
|
61
|
+
text: '产线',
|
|
62
|
+
column: 'line_name',
|
|
63
|
+
storePar: store.params.value,
|
|
64
|
+
type: 'text',
|
|
65
|
+
disableFilter: false, // 关闭筛选功能true
|
|
66
|
+
selectConfig: {},
|
|
67
|
+
placeholder: '请输入关键字...',
|
|
68
|
+
onChange(val: any) {
|
|
69
|
+
console.log('val: ', val)
|
|
70
|
+
store.HEADERSEARCH(val)
|
|
71
|
+
console.log('当前的参数: ', store.params.value)
|
|
72
|
+
},
|
|
73
|
+
onGetstore(val: any) {
|
|
74
|
+
console.log('val: ', val)
|
|
75
|
+
console.log('当前的参数: ', store.params.value)
|
|
76
|
+
},
|
|
77
|
+
ordersConfig: { enableOrder: false } // 开启排序功能true
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
col: {
|
|
83
|
+
width: 100,
|
|
84
|
+
label: '通用件库存',
|
|
85
|
+
prop: 'common_parts_inventory_count'
|
|
138
86
|
},
|
|
139
|
-
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
prop: 'state',
|
|
144
|
-
fixed: 'right',
|
|
145
|
-
},
|
|
146
|
-
component(createVNode: any, { row }: Scoped) {
|
|
147
|
-
// 单元格内容为一个开关 ElSwitch 组件
|
|
148
|
-
return createVNode(ElSwitch, {
|
|
87
|
+
component(createVNode, { row }: Scoped) {
|
|
88
|
+
return createVNode(
|
|
89
|
+
'div',
|
|
90
|
+
{
|
|
149
91
|
style: {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
// 点击事件
|
|
168
|
-
onClick: (event: MouseEvent) => {
|
|
169
|
-
event.stopPropagation() // 阻止事件冒泡
|
|
170
|
-
},
|
|
171
|
-
// 禁用状态
|
|
172
|
-
disabled:
|
|
173
|
-
Number(row.material_preparation_count) >= Number(row.count)
|
|
174
|
-
? true
|
|
175
|
-
: false,
|
|
176
|
-
})
|
|
177
|
-
},
|
|
178
|
-
header(createVNode: any) {
|
|
179
|
-
return createVNode(HeaderInput, {
|
|
180
|
-
text: '操作',
|
|
181
|
-
column: 'state',
|
|
182
|
-
storePar: store.params.value,
|
|
183
|
-
type: 'select',
|
|
184
|
-
initValue: '0',
|
|
185
|
-
popperStyle: { width: '300px', height: '150px' },
|
|
186
|
-
selectConfig: {
|
|
187
|
-
options: [
|
|
188
|
-
{ value: '0', label: '备货中' },
|
|
189
|
-
{ value: '1', label: '已备货' },
|
|
190
|
-
],
|
|
191
|
-
selectMultiple: true, // 是否多选
|
|
192
|
-
},
|
|
193
|
-
placeholder: '请选择...',
|
|
194
|
-
onChange(val: any) {
|
|
195
|
-
console.log('val: ', val)
|
|
196
|
-
store.HEADERSEARCH(val)
|
|
197
|
-
console.log('当前的参数: ', store.params.value)
|
|
198
|
-
},
|
|
199
|
-
})
|
|
200
|
-
},
|
|
92
|
+
color: `${row.common_parts_inventory_count < row.count ? 'red' : 'black'}`
|
|
93
|
+
}, // 行内样式
|
|
94
|
+
class: 'flex-a-c' // 添加一个flex-a-c的class名称
|
|
95
|
+
},
|
|
96
|
+
row.common_parts_inventory_count
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
col: { width: 100, label: '状态', prop: 'state', fixed: 'right' },
|
|
102
|
+
component(createVNode, { row }: Scoped) {
|
|
103
|
+
let { type, val } = setLibraryName(row.state)
|
|
104
|
+
if (val) {
|
|
105
|
+
return createVNode(ElTag, { type, class: 'ml-2' }, () => val)
|
|
106
|
+
} else {
|
|
107
|
+
return createVNode('div', [val])
|
|
108
|
+
}
|
|
201
109
|
},
|
|
202
|
-
|
|
203
|
-
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
110
|
+
// 示例4:下拉选择框(多选)
|
|
111
|
+
header(createVNode: any) {
|
|
112
|
+
return createVNode(HeaderInput, {
|
|
113
|
+
text: '状态',
|
|
114
|
+
column: 'state',
|
|
115
|
+
storePar: store.params.value,
|
|
116
|
+
type: 'select',
|
|
117
|
+
selectConfig: {
|
|
118
|
+
options: [
|
|
119
|
+
{ value: '0', label: '备货中' },
|
|
120
|
+
{ value: '1', label: '已备货' }
|
|
121
|
+
],
|
|
122
|
+
selectMultiple: true // 是否多选
|
|
123
|
+
},
|
|
124
|
+
placeholder: '请选择...',
|
|
125
|
+
onChange(val: any) {
|
|
126
|
+
console.log('val: ', val)
|
|
127
|
+
store.HEADERSEARCH(val)
|
|
128
|
+
console.log('当前的参数: ', store.params.value)
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
col: {
|
|
135
|
+
width: 100,
|
|
136
|
+
label: '操作',
|
|
137
|
+
prop: 'state',
|
|
138
|
+
fixed: 'right'
|
|
139
|
+
},
|
|
140
|
+
component(createVNode: any, { row }: Scoped) {
|
|
141
|
+
// 单元格内容为一个开关 ElSwitch 组件
|
|
142
|
+
return createVNode(ElSwitch, {
|
|
143
|
+
style: {
|
|
144
|
+
'--el-switch-on-color': '#13ce66',
|
|
145
|
+
'--el-switch-off-color': '#e6a23c'
|
|
146
|
+
},
|
|
147
|
+
modelValue: row.state === 0 ? false : true, //ifshow.value,
|
|
148
|
+
inlinePrompt: true,
|
|
149
|
+
activeText: '备货完成',
|
|
150
|
+
inactiveText: '备货中',
|
|
151
|
+
'onUpdate:modelValue': (newValue: any) => {
|
|
152
|
+
console.log('newValue: ', newValue)
|
|
153
|
+
// ifshow.value = newValue
|
|
154
|
+
row.state = newValue ? 1 : 0
|
|
155
|
+
materialPreparationCompleted([row], store.loading, store.UPDATEPOST)
|
|
156
|
+
},
|
|
157
|
+
// 点击事件
|
|
158
|
+
onClick: (event: MouseEvent) => {
|
|
159
|
+
event.stopPropagation() // 阻止事件冒泡
|
|
160
|
+
},
|
|
161
|
+
// 禁用状态
|
|
162
|
+
disabled: Number(row.material_preparation_count) >= Number(row.count) ? true : false
|
|
163
|
+
})
|
|
235
164
|
},
|
|
165
|
+
header(createVNode: any) {
|
|
166
|
+
return createVNode(HeaderInput, {
|
|
167
|
+
text: '操作',
|
|
168
|
+
column: 'state',
|
|
169
|
+
storePar: store.params.value,
|
|
170
|
+
type: 'select',
|
|
171
|
+
initValue: '0',
|
|
172
|
+
popperStyle: { width: '300px', height: '150px' },
|
|
173
|
+
selectConfig: {
|
|
174
|
+
options: [
|
|
175
|
+
{ value: '0', label: '备货中' },
|
|
176
|
+
{ value: '1', label: '已备货' }
|
|
177
|
+
],
|
|
178
|
+
selectMultiple: true // 是否多选
|
|
179
|
+
},
|
|
180
|
+
placeholder: '请选择...',
|
|
181
|
+
onChange(val: any) {
|
|
182
|
+
console.log('val: ', val)
|
|
183
|
+
store.HEADERSEARCH(val)
|
|
184
|
+
console.log('当前的参数: ', store.params.value)
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
}
|
|
188
|
+
},
|
|
236
189
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
190
|
+
{
|
|
191
|
+
col: { label: '操作', prop: '', width: 240 },
|
|
192
|
+
// 单元格中渲染2个普通按钮组件
|
|
193
|
+
component(createVNode, { row }: Scoped) {
|
|
194
|
+
return createVNode('div', [
|
|
195
|
+
createVNode(
|
|
196
|
+
ElButton,
|
|
197
|
+
{
|
|
243
198
|
size: 'small',
|
|
244
199
|
type: 'warning',
|
|
245
|
-
icon: View, // 查看
|
|
246
200
|
color: '#2193b0',
|
|
247
201
|
onClick(evt) {
|
|
248
202
|
evt.stopPropagation() // 阻止冒泡事件
|
|
249
|
-
console.log('
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
{
|
|
258
|
-
size: 'small',
|
|
259
|
-
icon: EditPen,
|
|
260
|
-
onClick(evt) {
|
|
261
|
-
evt.stopPropagation() // 阻止冒泡事件
|
|
262
|
-
onAdd(true, addRef.value, row)
|
|
263
|
-
},
|
|
264
|
-
}, //, () => '修改'
|
|
265
|
-
),
|
|
266
|
-
createVNode(ElButton, {
|
|
203
|
+
console.log('修改', row)
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
() => '公司详情记录'
|
|
207
|
+
),
|
|
208
|
+
createVNode(
|
|
209
|
+
ElButton,
|
|
210
|
+
{
|
|
267
211
|
size: 'small',
|
|
268
|
-
|
|
269
|
-
icon: Delete,
|
|
212
|
+
color: '#2c56a0',
|
|
270
213
|
onClick(evt) {
|
|
271
214
|
evt.stopPropagation() // 阻止冒泡事件
|
|
272
|
-
console.log('
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
215
|
+
console.log('编辑', row)
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
() => '条款详情记录'
|
|
219
|
+
)
|
|
220
|
+
])
|
|
221
|
+
}
|
|
222
|
+
},
|
|
279
223
|
|
|
224
|
+
{
|
|
225
|
+
col: { width: 180, label: '操作', prop: '' },
|
|
226
|
+
component(createVNode, { row }: Scoped) {
|
|
227
|
+
// 单元格中渲染3个图标按钮组件
|
|
228
|
+
return createVNode('div', [
|
|
229
|
+
createVNode(ElButton, {
|
|
230
|
+
size: 'small',
|
|
231
|
+
type: 'warning',
|
|
232
|
+
icon: View, // 查看
|
|
233
|
+
color: '#2193b0',
|
|
234
|
+
onClick(evt) {
|
|
235
|
+
evt.stopPropagation() // 阻止冒泡事件
|
|
236
|
+
console.log('查看', row)
|
|
237
|
+
console.log('detailsRef', detailsRef.value)
|
|
238
|
+
// detailsRef.value?.showMydia()
|
|
239
|
+
onSeeDetails(detailsRef.value, row)
|
|
240
|
+
}
|
|
241
|
+
}),
|
|
242
|
+
createVNode(
|
|
243
|
+
ElButton,
|
|
244
|
+
{
|
|
245
|
+
size: 'small',
|
|
246
|
+
icon: EditPen,
|
|
247
|
+
onClick(evt) {
|
|
248
|
+
evt.stopPropagation() // 阻止冒泡事件
|
|
249
|
+
onAdd(true, addRef.value, row)
|
|
250
|
+
}
|
|
251
|
+
} //, () => '修改'
|
|
252
|
+
),
|
|
253
|
+
createVNode(ElButton, {
|
|
254
|
+
size: 'small',
|
|
255
|
+
type: 'danger',
|
|
256
|
+
icon: Delete,
|
|
257
|
+
onClick(evt) {
|
|
258
|
+
evt.stopPropagation() // 阻止冒泡事件
|
|
259
|
+
console.log('修改', row)
|
|
260
|
+
deleteOpen([row.id], store.UPDATEPOST)
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
])
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
})()
|
|
268
|
+
return store
|
|
269
|
+
})
|
|
270
|
+
```
|
|
280
271
|
|
|
272
|
+
## 说明
|
|
281
273
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
return store
|
|
285
|
-
},
|
|
286
|
-
)
|
|
287
|
-
```
|
|
274
|
+
- showConnector: false, // 不使用连接符输入框的时候需要传入 initValue 属性,否则无法监听到筛选按钮的颜色变化
|
|
275
|
+
- 因为 不显示连接符输入框的时候, storePar属性中就可能没有 filter属性和 orders属性, 就无法监听到筛选按钮的颜色变化, 所以需要传入 initValue 属性, 使得 storePar中即使没有 filter属性和 orders属性, 也能能监听到筛选按钮的颜色变化。
|
|
@@ -510,7 +510,12 @@ if (props.type === 'date') {
|
|
|
510
510
|
}
|
|
511
511
|
// 不是日期筛选的时候将介于禁用
|
|
512
512
|
if (props.type !== 'date') {
|
|
513
|
-
operatorOptions.value
|
|
513
|
+
// 查找 operatorOptions.value 中value为between的项
|
|
514
|
+
// operatorOptions.value[7].disabled = true
|
|
515
|
+
const betweenItem = operatorOptions.value.find((item) => item.value === 'between')
|
|
516
|
+
if (betweenItem) {
|
|
517
|
+
betweenItem.disabled = true
|
|
518
|
+
}
|
|
514
519
|
}
|
|
515
520
|
|
|
516
521
|
// 监听operator.value的变化重置value的值
|
|
@@ -680,6 +685,7 @@ watch(
|
|
|
680
685
|
hasValue.value = true
|
|
681
686
|
} else {
|
|
682
687
|
hasValue.value = false
|
|
688
|
+
value.value = '' // 重置value的值
|
|
683
689
|
}
|
|
684
690
|
if (newVal?.filters) {
|
|
685
691
|
// 判断是否是当前列的筛选条件
|
|
@@ -691,9 +697,11 @@ watch(
|
|
|
691
697
|
hasValue.value = true
|
|
692
698
|
} else {
|
|
693
699
|
hasValue.value = false
|
|
700
|
+
value.value = '' // 重置value的值
|
|
694
701
|
}
|
|
695
702
|
} else {
|
|
696
703
|
hasValue.value = false
|
|
704
|
+
value.value = '' // 重置value的值
|
|
697
705
|
}
|
|
698
706
|
}
|
|
699
707
|
if (newVal?.orders) {
|
|
@@ -720,6 +728,9 @@ watch(
|
|
|
720
728
|
immediate: true
|
|
721
729
|
}
|
|
722
730
|
)
|
|
731
|
+
|
|
732
|
+
// 监听 props.initValue 的变化:当不显示条件连接符下拉选择框的时候,监听props.initValue 的变化
|
|
733
|
+
// showConnector: false, // 不使用连接符输入框的时候需要传入 initValue 属性,否则无法监听到筛选按钮的颜色变化
|
|
723
734
|
watch(
|
|
724
735
|
() => props.initValue,
|
|
725
736
|
(newVal, oldVal) => {
|
|
@@ -729,6 +740,7 @@ watch(
|
|
|
729
740
|
hasValue.value = true
|
|
730
741
|
} else {
|
|
731
742
|
hasValue.value = false
|
|
743
|
+
value.value = '' // 重置value的值
|
|
732
744
|
}
|
|
733
745
|
},
|
|
734
746
|
{
|
|
@@ -33,11 +33,15 @@
|
|
|
33
33
|
</div>
|
|
34
34
|
<div class="ifshow">
|
|
35
35
|
<el-button :type="element.hide ? 'primary' : ''" @click="handleShow(element)" size="small">
|
|
36
|
-
{{
|
|
36
|
+
{{
|
|
37
|
+
element.hide
|
|
38
|
+
? t('sortableTable.sortableTableDialog.show')
|
|
39
|
+
: t('sortableTable.sortableTableDialog.hide')
|
|
40
|
+
}}
|
|
37
41
|
</el-button>
|
|
38
42
|
</div>
|
|
39
43
|
<div class="widths">
|
|
40
|
-
{{t('sortableTable.sortableTableDialog.width')}}:
|
|
44
|
+
{{ t('sortableTable.sortableTableDialog.width') }}:
|
|
41
45
|
<el-input class="w-50 m-2" v-model="element.col.width" size="small" width="50"></el-input>
|
|
42
46
|
</div>
|
|
43
47
|
<sortable-table-drag-item v-if="element.children" v-model="element.children" />
|
|
@@ -47,8 +51,8 @@
|
|
|
47
51
|
<script setup lang="ts">
|
|
48
52
|
import SvgIcon from '../../svgIcon/index'
|
|
49
53
|
import { computed } from 'vue'
|
|
50
|
-
import { ElInput, ElButton
|
|
51
|
-
import t from '
|
|
54
|
+
import { ElInput, ElButton, ElIcon } from 'element-plus'
|
|
55
|
+
import t from '../../utils/lang/index'
|
|
52
56
|
import { VueDraggable } from 'vue-draggable-plus'
|
|
53
57
|
import { SortColumn, SortableTableIns } from './interface'
|
|
54
58
|
import { Rank } from '@element-plus/icons-vue'
|