ol-base-components 3.4.5 → 3.4.6
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
|
Binary file
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="Print_box" style="width: 100%">
|
|
3
|
-
<!-- 理货清单 -->
|
|
4
|
-
<div
|
|
5
|
-
class="Print_hader"
|
|
6
|
-
style="
|
|
7
|
-
text-align: center;
|
|
8
|
-
font-size: 25px;
|
|
9
|
-
font-weight: 500;
|
|
10
|
-
margin-bottom: 15px;
|
|
11
|
-
"
|
|
12
|
-
>
|
|
13
|
-
{{ printListObj.title }}
|
|
14
|
-
</div>
|
|
15
|
-
<div class="Print_body">
|
|
16
|
-
<div class="Print_body_table" style="margin-bottom: 15px">
|
|
17
|
-
<table
|
|
18
|
-
style="
|
|
19
|
-
width: 100%;
|
|
20
|
-
border-collapse: collapse;
|
|
21
|
-
border: 1px black solid;
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
"
|
|
24
|
-
>
|
|
25
|
-
<thead style="display: table-header-group">
|
|
26
|
-
<tr>
|
|
27
|
-
<th
|
|
28
|
-
v-for="(head, index) in printListObj.tableHeader"
|
|
29
|
-
:key="index"
|
|
30
|
-
:colspan="head.colspan"
|
|
31
|
-
:style="{
|
|
32
|
-
border: '1px solid black',
|
|
33
|
-
padding: '7px',
|
|
34
|
-
fontSize: '12px',
|
|
35
|
-
width: head.width,
|
|
36
|
-
minWidth: head.width,
|
|
37
|
-
maxWidth: head.width,
|
|
38
|
-
wordBreak: 'break-all',
|
|
39
|
-
wordWrap: 'break-word',
|
|
40
|
-
}"
|
|
41
|
-
>
|
|
42
|
-
{{ head.label }}
|
|
43
|
-
</th>
|
|
44
|
-
</tr>
|
|
45
|
-
</thead>
|
|
46
|
-
<tbody>
|
|
47
|
-
<tr v-for="(item, index) in printListObj.tableData" :key="index">
|
|
48
|
-
<div v-for="(head, i) in printListObj.tableHeader" :key="i">
|
|
49
|
-
<td
|
|
50
|
-
v-if="item.hot == 2"
|
|
51
|
-
:style="{
|
|
52
|
-
border: '1px solid black',
|
|
53
|
-
padding: '7px',
|
|
54
|
-
fontSize: '12px',
|
|
55
|
-
width: head.width,
|
|
56
|
-
wordBreak: 'break-all',
|
|
57
|
-
wordWrap: 'break-word',
|
|
58
|
-
background: '#ccc !important',
|
|
59
|
-
}"
|
|
60
|
-
>
|
|
61
|
-
<span>{{ item[head.prop] }} </span>
|
|
62
|
-
</td>
|
|
63
|
-
|
|
64
|
-
<td
|
|
65
|
-
v-else
|
|
66
|
-
:style="{
|
|
67
|
-
border: '1px solid black',
|
|
68
|
-
padding: '7px',
|
|
69
|
-
fontSize: '12px',
|
|
70
|
-
width: head.width,
|
|
71
|
-
fontWeight: head.weight,
|
|
72
|
-
wordBreak: 'break-all',
|
|
73
|
-
wordWrap: 'break-word',
|
|
74
|
-
}"
|
|
75
|
-
>
|
|
76
|
-
<span>{{ item[head.prop] }} </span>
|
|
77
|
-
</td>
|
|
78
|
-
</div>
|
|
79
|
-
</tr>
|
|
80
|
-
</tbody>
|
|
81
|
-
</table>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="Print_footer"></div>
|
|
85
|
-
<div style="page-break-after: always"></div>
|
|
86
|
-
</div>
|
|
87
|
-
</template>
|
|
88
|
-
|
|
89
|
-
<script>
|
|
90
|
-
export default {
|
|
91
|
-
props: {
|
|
92
|
-
printListObj: Object, //打印参数
|
|
93
|
-
},
|
|
94
|
-
data() {
|
|
95
|
-
return {
|
|
96
|
-
//表头
|
|
97
|
-
tableHeader: [
|
|
98
|
-
{
|
|
99
|
-
label: "Item No",
|
|
100
|
-
prop: "itemNo",
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
label: "STO",
|
|
104
|
-
prop: "sto",
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: "Country of Origin",
|
|
108
|
-
prop: "countryofOrigin",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: "Material",
|
|
112
|
-
prop: "material",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: "Deliervy Qty",
|
|
116
|
-
prop: "deliervyQty",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
label: "Label Req.",
|
|
120
|
-
prop: "labenReq",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
label: "Batch",
|
|
124
|
-
prop: "batch",
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
label: "Bill of Land",
|
|
128
|
-
prop: "billofLand",
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
//body 数据
|
|
132
|
-
tableData: [
|
|
133
|
-
{
|
|
134
|
-
countryofOrigin: "22",
|
|
135
|
-
createDate: "2020-08-03T15:10:16",
|
|
136
|
-
deliervyQty: 33,
|
|
137
|
-
invoice: "22",
|
|
138
|
-
itemNo: "1",
|
|
139
|
-
labenReq: "22",
|
|
140
|
-
material: "22",
|
|
141
|
-
sto: "sto",
|
|
142
|
-
actualQty: 0,
|
|
143
|
-
batch: "batch",
|
|
144
|
-
billofLand: "billofLand",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
actualQty: 0,
|
|
148
|
-
batch: "444",
|
|
149
|
-
billofLand: "555",
|
|
150
|
-
countryofOrigin: "66666",
|
|
151
|
-
createDate: "2020-08-03T15:10:16",
|
|
152
|
-
deliervyQty: 33,
|
|
153
|
-
invoice: "6677",
|
|
154
|
-
itemNo: "1",
|
|
155
|
-
labenReq: "666666",
|
|
156
|
-
material: "6666666",
|
|
157
|
-
sto: "88888888888",
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
};
|
|
161
|
-
},
|
|
162
|
-
watch: {
|
|
163
|
-
printListObj: {
|
|
164
|
-
handler() {
|
|
165
|
-
// debugger
|
|
166
|
-
},
|
|
167
|
-
deep: true,
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
</script>
|
|
172
|
-
|
|
173
|
-
<style lang="scss" scoped>
|
|
174
|
-
.Print_box {
|
|
175
|
-
width: 100%;
|
|
176
|
-
}
|
|
177
|
-
.Print_hader {
|
|
178
|
-
text-align: center;
|
|
179
|
-
font-size: 30px;
|
|
180
|
-
font-weight: 500;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.Print_body_QR {
|
|
184
|
-
float: right;
|
|
185
|
-
}
|
|
186
|
-
.Print_body_label {
|
|
187
|
-
display: flex;
|
|
188
|
-
justify-content: space-between;
|
|
189
|
-
}
|
|
190
|
-
.Print_body_table {
|
|
191
|
-
// margin-bottom: 15px;
|
|
192
|
-
}
|
|
193
|
-
::v-deep .active {
|
|
194
|
-
font-weight: 800 !important;
|
|
195
|
-
}
|
|
196
|
-
</style>
|
package/src/utils/getEnum.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// 1缓存获取 2如果没有就全局接口获取
|
|
2
|
-
export const getEnum = enumName => {
|
|
3
|
-
const local = localStorage.getItem("wms");
|
|
4
|
-
if (!local) return [];
|
|
5
|
-
// enumName首字母转成小写
|
|
6
|
-
const enumStr = enumName[0].toLowerCase() + enumName.slice(1);
|
|
7
|
-
return JSON.parse(local).SET_enumsSelect[enumStr].enums || [];
|
|
8
|
-
};
|
package/src/utils/initData.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { getData } from "../package/index.js";
|
|
2
|
-
import { getEnum } from "./getEnum.js";
|
|
3
|
-
// java数据类型转成js数据类型
|
|
4
|
-
const javaTypeToJsType = javaType => {
|
|
5
|
-
switch (javaType) {
|
|
6
|
-
case "integer":
|
|
7
|
-
return "number";
|
|
8
|
-
case "array":
|
|
9
|
-
return "Array";
|
|
10
|
-
case "object":
|
|
11
|
-
return "Object";
|
|
12
|
-
default:
|
|
13
|
-
return javaType;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const javaTypeToformType = javaType => {
|
|
18
|
-
switch (javaType) {
|
|
19
|
-
case "integer":
|
|
20
|
-
return "number";
|
|
21
|
-
case "boolean":
|
|
22
|
-
return "switch";
|
|
23
|
-
case "string":
|
|
24
|
-
return "input";
|
|
25
|
-
default:
|
|
26
|
-
return javaType;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const setModelItemByProperty = (prop, property) => {
|
|
31
|
-
const temp = {
|
|
32
|
-
prop: prop,
|
|
33
|
-
label: property.description,
|
|
34
|
-
type: "input",
|
|
35
|
-
hidden: false,
|
|
36
|
-
listeners: () => {},
|
|
37
|
-
props: {},
|
|
38
|
-
};
|
|
39
|
-
if (property.enum || Array.isArray(property.enum)) {
|
|
40
|
-
temp.type = "select";
|
|
41
|
-
const ref = property["$$ref"].split("/");
|
|
42
|
-
const enumName = ref[ref.length - 1];
|
|
43
|
-
const tempEnum = getEnum(enumName);
|
|
44
|
-
temp.children = tempEnum.length
|
|
45
|
-
? tempEnum
|
|
46
|
-
: property.enum.map(e => ({
|
|
47
|
-
key: e,
|
|
48
|
-
value: e,
|
|
49
|
-
}));
|
|
50
|
-
} else if (property.format === "date-time") {
|
|
51
|
-
temp.type = "date";
|
|
52
|
-
temp.props.valueFormat = "yyyy-MM-dd";
|
|
53
|
-
temp.props.format = "yyyy/MM/dd";
|
|
54
|
-
} else if (property.type == "boolean") {
|
|
55
|
-
temp.type = "switch";
|
|
56
|
-
} else if (property.type == "integer") {
|
|
57
|
-
temp.type = "number";
|
|
58
|
-
} else {
|
|
59
|
-
temp.type = "input";
|
|
60
|
-
}
|
|
61
|
-
return temp;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// 弹框接口数据来源判断 优先级:新增接口>编辑接口>详情接口
|
|
65
|
-
const getDialogSwaggerData = (url, swaggerData) => {
|
|
66
|
-
try {
|
|
67
|
-
// 新增 post
|
|
68
|
-
const entity = swaggerData.paths[url].post;
|
|
69
|
-
const schema = entity.requestBody.content["application/json"].schema;
|
|
70
|
-
const properties = schema.properties;
|
|
71
|
-
|
|
72
|
-
return [schema, properties];
|
|
73
|
-
} catch (err) {
|
|
74
|
-
try {
|
|
75
|
-
//编辑 put
|
|
76
|
-
const entity = swaggerData.paths[url].put;
|
|
77
|
-
const schema = entity.requestBody.content["application/json"].schema;
|
|
78
|
-
const properties = schema.properties;
|
|
79
|
-
return [schema, properties];
|
|
80
|
-
} catch (err) {
|
|
81
|
-
// 详情 get
|
|
82
|
-
const entity = swaggerData.paths[url].get;
|
|
83
|
-
const schema = entity.responses[200].content["application/json"].schema;
|
|
84
|
-
const properties = schema.properties;
|
|
85
|
-
return [schema, properties];
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const initForm = options => {
|
|
91
|
-
const { url, form } = options;
|
|
92
|
-
getData().then(swaggerData => {
|
|
93
|
-
// swagger数据可以来源于,新增接口/编辑接口/详情接口(优先级:新增接口>编辑接口>详情接口)
|
|
94
|
-
const [schema, properties] = getDialogSwaggerData(url, swaggerData);
|
|
95
|
-
if (!schema || !properties) return console.log(`\x1b[36m\x1b[4mol插件-弹框数据异常`);
|
|
96
|
-
// 生成model
|
|
97
|
-
// 1.循环model,将properties中prop相同的匹配,属性合并,model权限大,properties权限小,且保持响应式
|
|
98
|
-
form.model.forEach(item => {
|
|
99
|
-
const property = properties[item.prop];
|
|
100
|
-
if (property) {
|
|
101
|
-
const modelItem = setModelItemByProperty(item.prop, property);
|
|
102
|
-
item = { ...modelItem, ...item };
|
|
103
|
-
// Object.assign(item, {
|
|
104
|
-
// prop: item.prop,
|
|
105
|
-
// label: property.description,
|
|
106
|
-
// type: javaTypeToformType(property.type),
|
|
107
|
-
// hidden: false,
|
|
108
|
-
// listeners: () => {},
|
|
109
|
-
// props: {},
|
|
110
|
-
// ...item,
|
|
111
|
-
// });
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
// 2.将properties都push到model中(只提取swagger中有的type和description)
|
|
115
|
-
Object.keys(properties).forEach(key => {
|
|
116
|
-
const property = properties[key];
|
|
117
|
-
if (!form.model.find(item => item.prop === key) && property.description) {
|
|
118
|
-
// 删除对象的某些属性
|
|
119
|
-
const modelItem = setModelItemByProperty(key, property);
|
|
120
|
-
form.model.push(modelItem);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// 校验规则
|
|
125
|
-
if (schema.required && Array.isArray(schema.required)) {
|
|
126
|
-
schema.required.forEach(item => {
|
|
127
|
-
if (!Object.keys(form.rules).includes(item)) {
|
|
128
|
-
form.rules[item] = [
|
|
129
|
-
{
|
|
130
|
-
required: true,
|
|
131
|
-
message: `${properties[item].description}不能为空`,
|
|
132
|
-
},
|
|
133
|
-
];
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
};
|
package/vue.config.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const { defineConfig } = require("@vue/cli-service");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
|
|
4
|
-
module.exports = defineConfig({
|
|
5
|
-
transpileDependencies: true,
|
|
6
|
-
lintOnSave: false,
|
|
7
|
-
configureWebpack: {
|
|
8
|
-
output: {
|
|
9
|
-
// filename: "my-library.js", // 输出文件名
|
|
10
|
-
library: "MyComponentLibrary", // 库名称
|
|
11
|
-
libraryTarget: "umd", // 输出格式
|
|
12
|
-
globalObject: "this", // 适应不同环境
|
|
13
|
-
},
|
|
14
|
-
resolve: {
|
|
15
|
-
alias: {
|
|
16
|
-
"@": path.resolve(__dirname, "src"),
|
|
17
|
-
"my-component-library": path.resolve(__dirname, "src/package/index.js"), // 指向你的组件入口
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|