ol-base-components 3.4.5 → 3.4.7
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/dist/index.mjs +7105 -0
- package/dist/index.umd.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +18 -4
- package/.eslintrc +0 -59
- package/.github/deploy.yml +0 -81
- package/.prettierignore +0 -6
- package/.prettierrc +0 -13
- package/.trae/rules/project.md +0 -2
- package/babel.config.js +0 -5
- package/jsconfig.json +0 -19
- package/readme1.md +0 -164
- package/src/App.vue +0 -932
- package/src/assets/Snipaste_2025-09-03_14-30-49.png +0 -0
- package/src/assets/api.png +0 -0
- package/src/assets/css/iconfont.css +0 -342
- package/src/assets/duojibiaotou.png +0 -0
- package/src/assets/effectPicture.png +0 -0
- package/src/assets/generator0.png +0 -0
- package/src/assets/generator1.png +0 -0
- package/src/assets/generator2.png +0 -0
- package/src/assets/icon/printModel.svg +0 -1
- package/src/assets/init.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/olBaseComponentsLogo.svg +0 -100
- package/src/assets/print.svg +0 -1
- package/src/assets/run.png +0 -0
- package/src/assets/vscodecj.png +0 -0
- package/src/bin/initTemplate.js +0 -409
- package/src/bin/news.js +0 -171
- package/src/bin/openCloseloop.js +0 -154
- package/src/bin/openLoop.js +0 -154
- package/src/main.js +0 -13
- package/src/package/customSearch/index.js +0 -7
- package/src/package/customSearch/src/index.vue +0 -120
- package/src/package/dialog/index.js +0 -7
- package/src/package/dialog/src/index.vue +0 -419
- package/src/package/form/index.js +0 -7
- package/src/package/form/src/index.vue +0 -405
- package/src/package/formSearch/index.js +0 -7
- package/src/package/formSearch/src/components/SearchConfigDialog.vue +0 -957
- package/src/package/formSearch/src/index.js +0 -29
- package/src/package/formSearch/src/index.vue +0 -928
- package/src/package/index.js +0 -243
- package/src/package/numberRange/index.js +0 -7
- package/src/package/numberRange/src/index.vue +0 -351
- package/src/package/print/index.js +0 -76
- package/src/package/print/src/components/PaperSelector.vue +0 -109
- package/src/package/print/src/index.vue +0 -622
- package/src/package/print/src/provide/provider1.js +0 -215
- package/src/package/printModel/index.js +0 -7
- package/src/package/printModel/src/index.vue +0 -493
- package/src/package/table/index.js +0 -12
- package/src/package/table/src/TableColumn.vue +0 -77
- package/src/package/table/src/components/PrintTemplateSelector.vue +0 -210
- package/src/package/table/src/index.vue +0 -945
- package/src/package/table/src/nodata.jpg +0 -0
- package/src/package/table/src/printTable.vue +0 -196
- package/src/utils/getEnum.js +0 -8
- package/src/utils/initData.js +0 -138
- package/vue.config.js +0 -21
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/index.html +0 -0
- /package/{public → dist}/print-lock.css +0 -0
package/src/App.vue
DELETED
|
@@ -1,932 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<ol-print-model />
|
|
4
|
-
<ol-customSearch
|
|
5
|
-
:form-search-data="formSearchData"
|
|
6
|
-
@handleSearch="handleSearch"
|
|
7
|
-
:dragable="false"
|
|
8
|
-
@onSave="save"
|
|
9
|
-
dragable
|
|
10
|
-
></ol-customSearch>
|
|
11
|
-
=========
|
|
12
|
-
<!-- <div>table组件案例</div> -->
|
|
13
|
-
<!-- url="/api/app/stock-in/stock-in-pages" -->
|
|
14
|
-
<!-- <ol-search
|
|
15
|
-
:form-search-data="formSearchData"
|
|
16
|
-
@handleSearch="handleSearch"
|
|
17
|
-
@handleReset="handleReset"
|
|
18
|
-
@onSave="saveHandler"
|
|
19
|
-
/> -->
|
|
20
|
-
<button @click="aaa">123</button>
|
|
21
|
-
<!-- url="/api/app/bind-record/bind-record-detail-pages" -->
|
|
22
|
-
<ol-table
|
|
23
|
-
:paginations="paginations"
|
|
24
|
-
:empty-img="tableData.emptyImg"
|
|
25
|
-
:btnlist="[]"
|
|
26
|
-
:table-data="tableData"
|
|
27
|
-
:multiple-selection="multipleSelection"
|
|
28
|
-
@SelectionChange="SelectionChange"
|
|
29
|
-
@handleSizeChange="handleSizeChange"
|
|
30
|
-
@handleindexChange="handleindexChange"
|
|
31
|
-
:onPrintData="onPrintData"
|
|
32
|
-
>
|
|
33
|
-
<template slot="ceshi" slot-scope="scope">
|
|
34
|
-
<span>333433{{ scope.row.ceshi }}</span>
|
|
35
|
-
</template>
|
|
36
|
-
<template slot="toolbox-before" slot-scope="scope">
|
|
37
|
-
<el-button type="primary" size="mini" @click="handlePrint1(scope)">打印</el-button>
|
|
38
|
-
</template>
|
|
39
|
-
</ol-table>
|
|
40
|
-
<!-- <el-button @click="handlePrint">接口</el-button>
|
|
41
|
-
<el-button @click="onAdd">新建</el-button>
|
|
42
|
-
<el-button @click="onEdit">编辑</el-button> -->
|
|
43
|
-
|
|
44
|
-
<!-- <el-dialog :title="`${this.form.title}`" :visible.sync="dialogVisible" width="80%">
|
|
45
|
-
<ol-form
|
|
46
|
-
v-if="dialogVisible"
|
|
47
|
-
url="/api/app/admission-info/admission-info"
|
|
48
|
-
:form="form"
|
|
49
|
-
@onCancel="dialogVisible = false"
|
|
50
|
-
@onSubmit="onSubmit"
|
|
51
|
-
/>
|
|
52
|
-
</el-dialog> -->
|
|
53
|
-
<!-- <ol-print /> -->
|
|
54
|
-
</div>
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<script>
|
|
58
|
-
export default {
|
|
59
|
-
name: "App",
|
|
60
|
-
data() {
|
|
61
|
-
return {
|
|
62
|
-
quantity: 0,
|
|
63
|
-
multipleSelection: [],
|
|
64
|
-
tableData: {
|
|
65
|
-
loading: false,
|
|
66
|
-
emptyImg: true,
|
|
67
|
-
options: {
|
|
68
|
-
selection: true, // 多选框
|
|
69
|
-
index: false, // 序号EmployeeInfoCode
|
|
70
|
-
headTool: true, // 开启头部工具栏
|
|
71
|
-
refreshBtn: true, // 开启表格头部刷新按钮
|
|
72
|
-
downloadBtn: true, // 开启表格头部下载按钮
|
|
73
|
-
// smartPrintBtn: false,
|
|
74
|
-
}, // 序号和复选框
|
|
75
|
-
rows: [
|
|
76
|
-
{
|
|
77
|
-
bindStateEnum: "11",
|
|
78
|
-
creationTime: "22",
|
|
79
|
-
ceshi: "hhh",
|
|
80
|
-
},
|
|
81
|
-
], // 表数据
|
|
82
|
-
columns: [
|
|
83
|
-
{
|
|
84
|
-
label: "测试",
|
|
85
|
-
prop: "ceshi",
|
|
86
|
-
renderSlot: true,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
prop: "unit",
|
|
90
|
-
show: false,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
label: "一级表头",
|
|
94
|
-
beforeProp: "qty", // 位置
|
|
95
|
-
show: true,
|
|
96
|
-
children: [
|
|
97
|
-
{
|
|
98
|
-
label: "二级表头",
|
|
99
|
-
children: [
|
|
100
|
-
{
|
|
101
|
-
prop: "creationTime",
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
prop: "orginalBillNo",
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
prop: "roadWayCode",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
prop: "batch",
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
label: "一级表头-1",
|
|
118
|
-
beforeProp: "containerType", // 位置
|
|
119
|
-
children: [
|
|
120
|
-
{
|
|
121
|
-
prop: "regionCode",
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
prop: "taskNo",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
operates: [], // 表格里面的操作按钮
|
|
130
|
-
tableHeightDiff: 300,
|
|
131
|
-
printData: {
|
|
132
|
-
name: "默认数据",
|
|
133
|
-
table: [{ name: "默认数据1" }],
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
paginations: {
|
|
137
|
-
page: 1, // 当前位于那页面
|
|
138
|
-
total: 10, // 总数
|
|
139
|
-
limit: 30, // 一页显示多少条
|
|
140
|
-
pagetionShow: true,
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
formSearchData: {
|
|
144
|
-
enableConfig: true,
|
|
145
|
-
reset: true, // 重置
|
|
146
|
-
expendShow: true, // 展开
|
|
147
|
-
tableSearchSlice: 5,
|
|
148
|
-
value: {
|
|
149
|
-
// DocNo: null, // 对应输入框的value字段
|
|
150
|
-
// QualityCheckStateType: null,
|
|
151
|
-
// QualityCheckState: null,
|
|
152
|
-
// timer: [],
|
|
153
|
-
// range: [10, 200],
|
|
154
|
-
},
|
|
155
|
-
tableSearch1: [
|
|
156
|
-
{
|
|
157
|
-
label: "数字区间",
|
|
158
|
-
value: "range",
|
|
159
|
-
inputType: "numberRange",
|
|
160
|
-
originalFields: {
|
|
161
|
-
begin: "begin123",
|
|
162
|
-
end: "end123",
|
|
163
|
-
},
|
|
164
|
-
listeners: {
|
|
165
|
-
change: e => {
|
|
166
|
-
const {
|
|
167
|
-
val: [start, end],
|
|
168
|
-
} = e;
|
|
169
|
-
this.formSearchData.value.rang1 = start;
|
|
170
|
-
this.formSearchData.value.rang2 = end;
|
|
171
|
-
console.log(this.formSearchData, e);
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
// {
|
|
176
|
-
// label: "标签号",
|
|
177
|
-
// value: "carBodyTagNumber",
|
|
178
|
-
// inputType: "text"
|
|
179
|
-
// },
|
|
180
|
-
// {
|
|
181
|
-
// label: "车架号",
|
|
182
|
-
// value: "frameNumber",
|
|
183
|
-
// inputType: "text"
|
|
184
|
-
// // value: "QualityCheckStateType",
|
|
185
|
-
// // inputType: "select",
|
|
186
|
-
// // children: this.SET_enumsSelect({
|
|
187
|
-
// // keyword: "qualityCheckTypeEnum",
|
|
188
|
-
// // }),
|
|
189
|
-
// },
|
|
190
|
-
// {
|
|
191
|
-
// label: "项目号",
|
|
192
|
-
// value: "projectCode",
|
|
193
|
-
// inputType: "text"
|
|
194
|
-
// },
|
|
195
|
-
// {
|
|
196
|
-
// label: "状态描述",
|
|
197
|
-
// value: "statusDescription",
|
|
198
|
-
// inputType: "select",
|
|
199
|
-
// // 0整车/1白车身/2碰撞加固车身/3爆破切割车身/4侧面切割下车身
|
|
200
|
-
// children: [
|
|
201
|
-
// {
|
|
202
|
-
// key: 0,
|
|
203
|
-
// value: "整车"
|
|
204
|
-
// },
|
|
205
|
-
// {
|
|
206
|
-
// key: 1,
|
|
207
|
-
// value: "白车身"
|
|
208
|
-
// },
|
|
209
|
-
// {
|
|
210
|
-
// key: 2,
|
|
211
|
-
// value: "碰撞加固车身"
|
|
212
|
-
// },
|
|
213
|
-
// {
|
|
214
|
-
// key: 3,
|
|
215
|
-
// value: "爆破切割车身"
|
|
216
|
-
// },
|
|
217
|
-
// {
|
|
218
|
-
// key: 4,
|
|
219
|
-
// value: "侧面切割下车身"
|
|
220
|
-
// }
|
|
221
|
-
// ]
|
|
222
|
-
// },
|
|
223
|
-
// {
|
|
224
|
-
// label: "实验状态",
|
|
225
|
-
// value: "experimentStatus",
|
|
226
|
-
// inputType: "select",
|
|
227
|
-
// // 0实验前 1实验中 2实验后
|
|
228
|
-
// children: [
|
|
229
|
-
// {
|
|
230
|
-
// key: 0,
|
|
231
|
-
// value: "实验前"
|
|
232
|
-
// },
|
|
233
|
-
// {
|
|
234
|
-
// key: 1,
|
|
235
|
-
// value: "实验中"
|
|
236
|
-
// },
|
|
237
|
-
// {
|
|
238
|
-
// key: 2,
|
|
239
|
-
// value: "实验后"
|
|
240
|
-
// }
|
|
241
|
-
// ]
|
|
242
|
-
// },
|
|
243
|
-
// {
|
|
244
|
-
// label: "状态",
|
|
245
|
-
// value: "tagStatus",
|
|
246
|
-
// inputType: "select",
|
|
247
|
-
// children: []
|
|
248
|
-
// },
|
|
249
|
-
// {
|
|
250
|
-
// label: "车身类型",
|
|
251
|
-
// value: "bodyWorkType",
|
|
252
|
-
// inputType: "select",
|
|
253
|
-
// children: []
|
|
254
|
-
// },
|
|
255
|
-
// {
|
|
256
|
-
// label: "项目名称",
|
|
257
|
-
// value: "projectName",
|
|
258
|
-
// inputType: "text"
|
|
259
|
-
// },
|
|
260
|
-
// {
|
|
261
|
-
// label: "入场日期",
|
|
262
|
-
// inputType: "picker",
|
|
263
|
-
// value: "admissionDate",
|
|
264
|
-
// props: {
|
|
265
|
-
// valueFormat: "yyyy-MM-dd",
|
|
266
|
-
// format: "yyyy/MM/dd"
|
|
267
|
-
// }
|
|
268
|
-
// },
|
|
269
|
-
// {
|
|
270
|
-
// label: "打印次数",
|
|
271
|
-
// value: "tagPrintNumber",
|
|
272
|
-
// inputType: "number"
|
|
273
|
-
// },
|
|
274
|
-
// {
|
|
275
|
-
// label: "创建时间",
|
|
276
|
-
// value: "createdTime",
|
|
277
|
-
// inputType: "picker",
|
|
278
|
-
// props: {
|
|
279
|
-
// type: "datetimerange",
|
|
280
|
-
// startPlaceholder: "开始时间",
|
|
281
|
-
// endPlaceholder: "结束时间",
|
|
282
|
-
// placeholder: "选择时间范围",
|
|
283
|
-
// valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
284
|
-
// format: "yyyy/MM/dd HH:mm:ss"
|
|
285
|
-
// }
|
|
286
|
-
// },
|
|
287
|
-
// {
|
|
288
|
-
// label: "虚拟项目",
|
|
289
|
-
// value: "tempProject",
|
|
290
|
-
// inputType: "text"
|
|
291
|
-
// }
|
|
292
|
-
],
|
|
293
|
-
tableSearch: [],
|
|
294
|
-
customs: [
|
|
295
|
-
{
|
|
296
|
-
name: "库位编码",
|
|
297
|
-
keyType: 1,
|
|
298
|
-
key: "WarehouseLocationCode",
|
|
299
|
-
enumName: null,
|
|
300
|
-
custom: false,
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: "使用状态",
|
|
304
|
-
keyType: 3,
|
|
305
|
-
key: "UsageStatus",
|
|
306
|
-
enumName: "usageStatusEnum",
|
|
307
|
-
custom: false,
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
name: "是否启用",
|
|
311
|
-
keyType: 1,
|
|
312
|
-
key: "Enabled",
|
|
313
|
-
enumName: null,
|
|
314
|
-
custom: false,
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
name: "创建时间",
|
|
318
|
-
keyType: 4,
|
|
319
|
-
key: "CreationTime",
|
|
320
|
-
enumName: null,
|
|
321
|
-
custom: false,
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
name: "备注",
|
|
325
|
-
keyType: 1,
|
|
326
|
-
key: "Remark",
|
|
327
|
-
enumName: null,
|
|
328
|
-
custom: false,
|
|
329
|
-
},
|
|
330
|
-
],
|
|
331
|
-
},
|
|
332
|
-
|
|
333
|
-
form: {
|
|
334
|
-
type: 0, // 0详情,1新增, 2编辑
|
|
335
|
-
title: "",
|
|
336
|
-
// 默认值
|
|
337
|
-
defaultValue: {},
|
|
338
|
-
value: {},
|
|
339
|
-
model: [
|
|
340
|
-
// {
|
|
341
|
-
// prop: "warehouseCode",
|
|
342
|
-
// },
|
|
343
|
-
{
|
|
344
|
-
label: "数量范围",
|
|
345
|
-
type: "numberRange",
|
|
346
|
-
prop: "range",
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
label: "项目名称",
|
|
350
|
-
type: "input",
|
|
351
|
-
prop: "projectName",
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
label: "项目状态",
|
|
355
|
-
type: "select",
|
|
356
|
-
prop: "projectStatus",
|
|
357
|
-
child: [
|
|
358
|
-
{
|
|
359
|
-
value: "正常",
|
|
360
|
-
key: 0,
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
value: "保密一级",
|
|
364
|
-
key: 1,
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
value: "保密二级",
|
|
368
|
-
key: 2,
|
|
369
|
-
},
|
|
370
|
-
],
|
|
371
|
-
},
|
|
372
|
-
],
|
|
373
|
-
rules: {
|
|
374
|
-
// employeePhoneNumber: [
|
|
375
|
-
// {
|
|
376
|
-
// required: true,
|
|
377
|
-
// message: "手机号不能为空",
|
|
378
|
-
// trigger: "blur",
|
|
379
|
-
// },
|
|
380
|
-
// {
|
|
381
|
-
// pattern: /^1[3-9]\d{9}$/,
|
|
382
|
-
// message: "请输入有效的手机号",
|
|
383
|
-
// trigger: "blur",
|
|
384
|
-
// },
|
|
385
|
-
// ],
|
|
386
|
-
projectCode: [
|
|
387
|
-
{
|
|
388
|
-
required: true,
|
|
389
|
-
message: "项目号不能为空",
|
|
390
|
-
trigger: "blur",
|
|
391
|
-
},
|
|
392
|
-
],
|
|
393
|
-
projectName: [
|
|
394
|
-
{
|
|
395
|
-
required: true,
|
|
396
|
-
message: "项目名称不能为空",
|
|
397
|
-
trigger: "blur",
|
|
398
|
-
},
|
|
399
|
-
],
|
|
400
|
-
projectStatus: [
|
|
401
|
-
{
|
|
402
|
-
required: true,
|
|
403
|
-
message: "项目状态不能为空",
|
|
404
|
-
trigger: "blur",
|
|
405
|
-
},
|
|
406
|
-
],
|
|
407
|
-
// productCode: [
|
|
408
|
-
// {
|
|
409
|
-
// required: true,
|
|
410
|
-
// message: "ALV零件号不能为空",
|
|
411
|
-
// trigger: "blur",
|
|
412
|
-
// },
|
|
413
|
-
// ],
|
|
414
|
-
productName: [
|
|
415
|
-
{
|
|
416
|
-
required: true,
|
|
417
|
-
message: "零件名称不能为空",
|
|
418
|
-
trigger: "blur",
|
|
419
|
-
},
|
|
420
|
-
],
|
|
421
|
-
qty: [
|
|
422
|
-
{
|
|
423
|
-
required: true,
|
|
424
|
-
message: "收货数量不能为空",
|
|
425
|
-
trigger: "blur",
|
|
426
|
-
},
|
|
427
|
-
],
|
|
428
|
-
receivedBatch: [
|
|
429
|
-
{
|
|
430
|
-
required: true,
|
|
431
|
-
message: "收货批次不能为空",
|
|
432
|
-
trigger: "blur",
|
|
433
|
-
},
|
|
434
|
-
],
|
|
435
|
-
employeeInfoId: [
|
|
436
|
-
{
|
|
437
|
-
required: true,
|
|
438
|
-
message: "接收人不能为空",
|
|
439
|
-
trigger: "blur",
|
|
440
|
-
},
|
|
441
|
-
],
|
|
442
|
-
// storageLocation: [
|
|
443
|
-
// {
|
|
444
|
-
// required: true,
|
|
445
|
-
// message: "外仓编码不能为空",
|
|
446
|
-
// trigger: "blur"
|
|
447
|
-
// }
|
|
448
|
-
// ]
|
|
449
|
-
},
|
|
450
|
-
attrs: {
|
|
451
|
-
labelWidth: "100px",
|
|
452
|
-
},
|
|
453
|
-
},
|
|
454
|
-
dialogVisible: false,
|
|
455
|
-
};
|
|
456
|
-
},
|
|
457
|
-
// onMounted() {
|
|
458
|
-
|
|
459
|
-
// },
|
|
460
|
-
mounted() {
|
|
461
|
-
// const el = document.getElementById("ellipsis-container");
|
|
462
|
-
// this.truncateMiddleByWidth(el)
|
|
463
|
-
},
|
|
464
|
-
methods: {
|
|
465
|
-
SelectionChange(row) {
|
|
466
|
-
this.multipleSelection = row;
|
|
467
|
-
},
|
|
468
|
-
handleSearch(from, item) {
|
|
469
|
-
console.log(1112223, item);
|
|
470
|
-
|
|
471
|
-
this.formSearchData.value = { ...from };
|
|
472
|
-
this.paginations.page = 1;
|
|
473
|
-
this.getTable();
|
|
474
|
-
},
|
|
475
|
-
handleReset() {},
|
|
476
|
-
handleSizeChange(val) {
|
|
477
|
-
this.paginations.page = 1;
|
|
478
|
-
this.paginations.limit = val;
|
|
479
|
-
this.getTable();
|
|
480
|
-
},
|
|
481
|
-
handleindexChange(val) {
|
|
482
|
-
this.paginations.page = val;
|
|
483
|
-
this.getTable();
|
|
484
|
-
},
|
|
485
|
-
async handlePrint() {
|
|
486
|
-
const newColumns = JSON.parse(JSON.stringify(this.tableData.columns));
|
|
487
|
-
const temp = newColumns.find(e => e.label == "多级表头");
|
|
488
|
-
// temp.children[0].label = "3333";
|
|
489
|
-
// temp.children[0].show = false
|
|
490
|
-
this.$set(temp.children[0], "show", false);
|
|
491
|
-
this.tableData.columns = newColumns;
|
|
492
|
-
// this.$set(temp.children[0], 'show', false)
|
|
493
|
-
// temp.children.push({
|
|
494
|
-
// prop: 'containerType',
|
|
495
|
-
// label: '容器类型',
|
|
496
|
-
// show: true
|
|
497
|
-
// })
|
|
498
|
-
// this.tableData.columns.push({
|
|
499
|
-
// prop: 'aaaa',
|
|
500
|
-
// label: 'aaaa',
|
|
501
|
-
// show: true
|
|
502
|
-
// })
|
|
503
|
-
},
|
|
504
|
-
// ================
|
|
505
|
-
getTable() {
|
|
506
|
-
console.log("getTable参数", this.formSearchData.value);
|
|
507
|
-
},
|
|
508
|
-
truncateMiddleByWidth(el) {
|
|
509
|
-
let text = el.textContent;
|
|
510
|
-
if (el.scrollWidth <= el.clientWidth) return;
|
|
511
|
-
const suffix = text.slice(-3);
|
|
512
|
-
let left = 0;
|
|
513
|
-
let right = text.length - 3;
|
|
514
|
-
let result = "";
|
|
515
|
-
while (left <= right) {
|
|
516
|
-
let mid = Math.floor((left + right) / 2);
|
|
517
|
-
const temp = text.slice(0, mid) + "..." + suffix;
|
|
518
|
-
el.textContent = temp;
|
|
519
|
-
if (el.scrollWidth <= el.clientWidth) {
|
|
520
|
-
result = temp;
|
|
521
|
-
left = mid + 1;
|
|
522
|
-
} else {
|
|
523
|
-
right = mid - 1;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
el.textContent = result;
|
|
527
|
-
},
|
|
528
|
-
onAdd() {
|
|
529
|
-
this.form.type = 1;
|
|
530
|
-
this.dialogVisible = true;
|
|
531
|
-
},
|
|
532
|
-
onEdit() {
|
|
533
|
-
this.form.type = 2;
|
|
534
|
-
this.dialogVisible = true;
|
|
535
|
-
},
|
|
536
|
-
async onSubmit(form) {
|
|
537
|
-
const { type } = this.form;
|
|
538
|
-
if (type === 1) {
|
|
539
|
-
// putAdmissioninfoByAdmissionId
|
|
540
|
-
// 新增
|
|
541
|
-
this.post({
|
|
542
|
-
url: StockIn.addStockIn,
|
|
543
|
-
data: this.form.value,
|
|
544
|
-
isLoading: true,
|
|
545
|
-
}).then(res => {
|
|
546
|
-
this.$message({ type: "success", message: "操作成功!" });
|
|
547
|
-
this.dialogVisible = false;
|
|
548
|
-
this.init();
|
|
549
|
-
});
|
|
550
|
-
} else if (type === 2) {
|
|
551
|
-
// 编辑
|
|
552
|
-
this.put({
|
|
553
|
-
url: `${StockIn.editStockIn}/${this.form.value.id}`,
|
|
554
|
-
data: this.form.value,
|
|
555
|
-
isLoading: true,
|
|
556
|
-
}).then(res => {
|
|
557
|
-
this.init();
|
|
558
|
-
this.dialogVisible = false;
|
|
559
|
-
this.message({ type: "success", message: "操作成功!" });
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
aaa() {
|
|
564
|
-
const printEnpty = this.$hiprint({
|
|
565
|
-
grid: true,
|
|
566
|
-
printData: {
|
|
567
|
-
name: "CcSimple",
|
|
568
|
-
barcode: "33321323",
|
|
569
|
-
table: [
|
|
570
|
-
{ id: "1", name: "王小可123", gender: "男", count: "120", amount: "9089元" },
|
|
571
|
-
{ id: "2", name: "梦之遥", gender: "女", count: "20", amount: "89元" },
|
|
572
|
-
],
|
|
573
|
-
table1: [
|
|
574
|
-
{ id: "1", name: "王小可11", gender: "男", count: "120", amount: "9089元" },
|
|
575
|
-
{ id: "2", name: "梦之遥", gender: "女", count: "20", amount: "89元" },
|
|
576
|
-
],
|
|
577
|
-
},
|
|
578
|
-
onPrintData: data => {
|
|
579
|
-
return data;
|
|
580
|
-
},
|
|
581
|
-
defaultTemplate: {
|
|
582
|
-
panels: [
|
|
583
|
-
{
|
|
584
|
-
index: 0,
|
|
585
|
-
name: 1,
|
|
586
|
-
paperType: "A4",
|
|
587
|
-
height: 297,
|
|
588
|
-
width: 210,
|
|
589
|
-
paperHeader: 0,
|
|
590
|
-
paperFooter: 841.8897637795277,
|
|
591
|
-
printElements: [
|
|
592
|
-
{
|
|
593
|
-
options: {
|
|
594
|
-
left: 117,
|
|
595
|
-
top: 94.5,
|
|
596
|
-
height: 9.75,
|
|
597
|
-
width: 120,
|
|
598
|
-
field: "name",
|
|
599
|
-
testData: "内容",
|
|
600
|
-
title: "文本",
|
|
601
|
-
qid: "name",
|
|
602
|
-
},
|
|
603
|
-
printElementType: {
|
|
604
|
-
title: "文本",
|
|
605
|
-
type: "text",
|
|
606
|
-
},
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
options: {
|
|
610
|
-
left: 160.5,
|
|
611
|
-
top: 174,
|
|
612
|
-
height: 36,
|
|
613
|
-
width: 550,
|
|
614
|
-
fields: [],
|
|
615
|
-
field: "table",
|
|
616
|
-
qid: "table",
|
|
617
|
-
columns: [
|
|
618
|
-
[
|
|
619
|
-
{
|
|
620
|
-
width: 137.5,
|
|
621
|
-
title: "名称",
|
|
622
|
-
field: "name",
|
|
623
|
-
checked: true,
|
|
624
|
-
columnId: "name",
|
|
625
|
-
fixed: false,
|
|
626
|
-
rowspan: 1,
|
|
627
|
-
colspan: 1,
|
|
628
|
-
align: "center",
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
width: 137.5,
|
|
632
|
-
title: "性别",
|
|
633
|
-
field: "gender",
|
|
634
|
-
checked: true,
|
|
635
|
-
columnId: "gender",
|
|
636
|
-
fixed: false,
|
|
637
|
-
rowspan: 1,
|
|
638
|
-
colspan: 1,
|
|
639
|
-
align: "center",
|
|
640
|
-
},
|
|
641
|
-
{
|
|
642
|
-
width: 137.5,
|
|
643
|
-
title: "数量",
|
|
644
|
-
field: "count",
|
|
645
|
-
checked: true,
|
|
646
|
-
columnId: "count",
|
|
647
|
-
fixed: false,
|
|
648
|
-
rowspan: 1,
|
|
649
|
-
colspan: 1,
|
|
650
|
-
align: "center",
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
width: 137.5,
|
|
654
|
-
title: "金额",
|
|
655
|
-
field: "amount",
|
|
656
|
-
checked: true,
|
|
657
|
-
columnId: "amount",
|
|
658
|
-
fixed: false,
|
|
659
|
-
rowspan: 1,
|
|
660
|
-
colspan: 1,
|
|
661
|
-
align: "center",
|
|
662
|
-
},
|
|
663
|
-
],
|
|
664
|
-
],
|
|
665
|
-
},
|
|
666
|
-
printElementType: {
|
|
667
|
-
title: "表格",
|
|
668
|
-
type: "table",
|
|
669
|
-
editable: true,
|
|
670
|
-
columnDisplayEditable: true,
|
|
671
|
-
columnDisplayIndexEditable: true,
|
|
672
|
-
columnTitleEditable: true,
|
|
673
|
-
columnResizable: true,
|
|
674
|
-
columnAlignEditable: true,
|
|
675
|
-
isEnableEditField: true,
|
|
676
|
-
isEnableContextMenu: true,
|
|
677
|
-
isEnableInsertRow: true,
|
|
678
|
-
isEnableDeleteRow: true,
|
|
679
|
-
isEnableInsertColumn: true,
|
|
680
|
-
isEnableDeleteColumn: true,
|
|
681
|
-
isEnableMergeCell: true,
|
|
682
|
-
},
|
|
683
|
-
},
|
|
684
|
-
],
|
|
685
|
-
paperNumberContinue: true,
|
|
686
|
-
watermarkOptions: {},
|
|
687
|
-
panelLayoutOptions: {},
|
|
688
|
-
},
|
|
689
|
-
],
|
|
690
|
-
},
|
|
691
|
-
onSubmit: data => {
|
|
692
|
-
// console.log(6666, data);
|
|
693
|
-
},
|
|
694
|
-
});
|
|
695
|
-
|
|
696
|
-
// this.$hiprint.print({
|
|
697
|
-
// printData: {
|
|
698
|
-
// name: "CcSimple",
|
|
699
|
-
// barcode: "33321323",
|
|
700
|
-
// table: [
|
|
701
|
-
// { id: "1", name: "王小可123", gender: "男", count: "120", amount: "9089元" },
|
|
702
|
-
// { id: "2", name: "梦之遥", gender: "女", count: "20", amount: "89元" },
|
|
703
|
-
// ],
|
|
704
|
-
// table1: [
|
|
705
|
-
// { id: "1", name: "王小可11", gender: "男", count: "120", amount: "9089元" },
|
|
706
|
-
// { id: "2", name: "梦之遥", gender: "女", count: "20", amount: "89元" },
|
|
707
|
-
// ],
|
|
708
|
-
// },
|
|
709
|
-
// onPrintData: data => {
|
|
710
|
-
// return data;
|
|
711
|
-
// },
|
|
712
|
-
// defaultTemplate: {
|
|
713
|
-
// panels: [
|
|
714
|
-
// {
|
|
715
|
-
// index: 0,
|
|
716
|
-
// name: 1,
|
|
717
|
-
// paperType: "A4",
|
|
718
|
-
// height: 297,
|
|
719
|
-
// width: 210,
|
|
720
|
-
// paperHeader: 0,
|
|
721
|
-
// paperFooter: 841.8897637795277,
|
|
722
|
-
// printElements: [
|
|
723
|
-
// {
|
|
724
|
-
// options: {
|
|
725
|
-
// left: 117,
|
|
726
|
-
// top: 94.5,
|
|
727
|
-
// height: 9.75,
|
|
728
|
-
// width: 120,
|
|
729
|
-
// field: "name",
|
|
730
|
-
// testData: "内容",
|
|
731
|
-
// title: "文本",
|
|
732
|
-
// qid: "name",
|
|
733
|
-
// },
|
|
734
|
-
// printElementType: {
|
|
735
|
-
// title: "文本",
|
|
736
|
-
// type: "text",
|
|
737
|
-
// },
|
|
738
|
-
// },
|
|
739
|
-
// {
|
|
740
|
-
// options: {
|
|
741
|
-
// left: 160.5,
|
|
742
|
-
// top: 174,
|
|
743
|
-
// height: 36,
|
|
744
|
-
// width: 550,
|
|
745
|
-
// fields: [],
|
|
746
|
-
// field: "table",
|
|
747
|
-
// qid: "table",
|
|
748
|
-
// columns: [
|
|
749
|
-
// [
|
|
750
|
-
// {
|
|
751
|
-
// width: 137.5,
|
|
752
|
-
// title: "名称",
|
|
753
|
-
// field: "name",
|
|
754
|
-
// checked: true,
|
|
755
|
-
// columnId: "name",
|
|
756
|
-
// fixed: false,
|
|
757
|
-
// rowspan: 1,
|
|
758
|
-
// colspan: 1,
|
|
759
|
-
// align: "center",
|
|
760
|
-
// },
|
|
761
|
-
// {
|
|
762
|
-
// width: 137.5,
|
|
763
|
-
// title: "性别",
|
|
764
|
-
// field: "gender",
|
|
765
|
-
// checked: true,
|
|
766
|
-
// columnId: "gender",
|
|
767
|
-
// fixed: false,
|
|
768
|
-
// rowspan: 1,
|
|
769
|
-
// colspan: 1,
|
|
770
|
-
// align: "center",
|
|
771
|
-
// },
|
|
772
|
-
// {
|
|
773
|
-
// width: 137.5,
|
|
774
|
-
// title: "数量",
|
|
775
|
-
// field: "count",
|
|
776
|
-
// checked: true,
|
|
777
|
-
// columnId: "count",
|
|
778
|
-
// fixed: false,
|
|
779
|
-
// rowspan: 1,
|
|
780
|
-
// colspan: 1,
|
|
781
|
-
// align: "center",
|
|
782
|
-
// },
|
|
783
|
-
// {
|
|
784
|
-
// width: 137.5,
|
|
785
|
-
// title: "金额",
|
|
786
|
-
// field: "amount",
|
|
787
|
-
// checked: true,
|
|
788
|
-
// columnId: "amount",
|
|
789
|
-
// fixed: false,
|
|
790
|
-
// rowspan: 1,
|
|
791
|
-
// colspan: 1,
|
|
792
|
-
// align: "center",
|
|
793
|
-
// },
|
|
794
|
-
// ],
|
|
795
|
-
// ],
|
|
796
|
-
// },
|
|
797
|
-
// printElementType: {
|
|
798
|
-
// title: "表格",
|
|
799
|
-
// type: "table",
|
|
800
|
-
// editable: true,
|
|
801
|
-
// columnDisplayEditable: true,
|
|
802
|
-
// columnDisplayIndexEditable: true,
|
|
803
|
-
// columnTitleEditable: true,
|
|
804
|
-
// columnResizable: true,
|
|
805
|
-
// columnAlignEditable: true,
|
|
806
|
-
// isEnableEditField: true,
|
|
807
|
-
// isEnableContextMenu: true,
|
|
808
|
-
// isEnableInsertRow: true,
|
|
809
|
-
// isEnableDeleteRow: true,
|
|
810
|
-
// isEnableInsertColumn: true,
|
|
811
|
-
// isEnableDeleteColumn: true,
|
|
812
|
-
// isEnableMergeCell: true,
|
|
813
|
-
// },
|
|
814
|
-
// },
|
|
815
|
-
// ],
|
|
816
|
-
// paperNumberContinue: true,
|
|
817
|
-
// watermarkOptions: {},
|
|
818
|
-
// panelLayoutOptions: {},
|
|
819
|
-
// },
|
|
820
|
-
// ],
|
|
821
|
-
// },
|
|
822
|
-
// onSubmit: data => {
|
|
823
|
-
// console.log(6666, data);
|
|
824
|
-
// },
|
|
825
|
-
// });
|
|
826
|
-
},
|
|
827
|
-
saveHandler(configList) {
|
|
828
|
-
console.log("保存配置", configList);
|
|
829
|
-
},
|
|
830
|
-
handlePrint1(row) {
|
|
831
|
-
console.log(11122333, row);
|
|
832
|
-
},
|
|
833
|
-
onPrintData(tempItem, done) {
|
|
834
|
-
console.log("111app", tempItem, done);
|
|
835
|
-
if (tempItem.templeteName === "自定义模式") {
|
|
836
|
-
// 模拟异步接口请求
|
|
837
|
-
const data = {
|
|
838
|
-
name: "自定义模式",
|
|
839
|
-
table: [
|
|
840
|
-
{ name: "2233" },
|
|
841
|
-
{ name: "3344" },
|
|
842
|
-
{ name: "2233" },
|
|
843
|
-
{ name: "2233" },
|
|
844
|
-
{ name: "2233" },
|
|
845
|
-
{ name: "2233" },
|
|
846
|
-
{ name: "2233" },
|
|
847
|
-
{ name: "2233" },
|
|
848
|
-
{ name: "2233" },
|
|
849
|
-
],
|
|
850
|
-
};
|
|
851
|
-
done(data);
|
|
852
|
-
}
|
|
853
|
-
},
|
|
854
|
-
save(e) {
|
|
855
|
-
console.log(123, e);
|
|
856
|
-
|
|
857
|
-
// this.formSearchData.value.usageStatus = null;
|
|
858
|
-
},
|
|
859
|
-
},
|
|
860
|
-
};
|
|
861
|
-
</script>
|
|
862
|
-
|
|
863
|
-
<style lang="scss" scoped>
|
|
864
|
-
/* #app {
|
|
865
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
866
|
-
-webkit-font-smoothing: antialiased;
|
|
867
|
-
-moz-osx-font-smoothing: grayscale;
|
|
868
|
-
text-align: center;
|
|
869
|
-
color: #2c3e50;
|
|
870
|
-
margin-top: 60px;
|
|
871
|
-
} */
|
|
872
|
-
.grid-content {
|
|
873
|
-
display: grid;
|
|
874
|
-
// grid-template-columns: repeat(2, 1fr);
|
|
875
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
876
|
-
// align-items: center;
|
|
877
|
-
// justify-items: center;
|
|
878
|
-
// justify-content: center;
|
|
879
|
-
align-content: center;
|
|
880
|
-
height: 300px; /* 你想要的高度 */
|
|
881
|
-
gap: 10px;
|
|
882
|
-
div {
|
|
883
|
-
background-color: aqua;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
.container {
|
|
888
|
-
display: flex;
|
|
889
|
-
align-items: center; /* 默认让所有子项在垂直方向居中 */
|
|
890
|
-
height: 200px;
|
|
891
|
-
background: #eee;
|
|
892
|
-
}
|
|
893
|
-
.item {
|
|
894
|
-
width: 60px;
|
|
895
|
-
height: 60px;
|
|
896
|
-
background: orange;
|
|
897
|
-
margin: 5px;
|
|
898
|
-
}
|
|
899
|
-
.item2 {
|
|
900
|
-
align-self: flex-start; /* 只让这个item到底部对齐 */
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
.triangle-up {
|
|
904
|
-
margin-left: 400px;
|
|
905
|
-
width: 100px;
|
|
906
|
-
height: 100px;
|
|
907
|
-
background-color: purple;
|
|
908
|
-
clip-path: polygon(50% 0%, 0% 0%, 0% 100%, 100% 100%);
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
.square-container {
|
|
912
|
-
width: 100px; /* 控制容器宽度 */
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
.square {
|
|
916
|
-
width: 100%;
|
|
917
|
-
aspect-ratio: 1 / 1;
|
|
918
|
-
background-color: red;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
.ellipsis-container {
|
|
922
|
-
width: 200px;
|
|
923
|
-
// height: 100px;
|
|
924
|
-
border: 1px solid #ccc;
|
|
925
|
-
overflow: hidden;
|
|
926
|
-
white-space: nowrap;
|
|
927
|
-
// text-overflow: ellipsis;
|
|
928
|
-
// display: -webkit-box;
|
|
929
|
-
// -webkit-line-clamp: 4; /* 设置行数,例如3行 */
|
|
930
|
-
// -webkit-box-orient: vertical;
|
|
931
|
-
}
|
|
932
|
-
</style>
|