ol-base-components 0.1.2
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/.eslintrc +8 -0
- package/README.md +2 -0
- package/babel.config.js +5 -0
- package/dist/css/app.6cd72c4d.css +1 -0
- package/dist/css/chunk-vendors.10dd4e95.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/fonts/element-icons.f1a45d74.ttf +0 -0
- package/dist/fonts/element-icons.ff18efd1.woff +0 -0
- package/dist/index.html +1 -0
- package/dist/js/app.f06356ec.js +2 -0
- package/dist/js/app.f06356ec.js.map +1 -0
- package/dist/js/chunk-vendors.0d051653.js +49 -0
- package/dist/js/chunk-vendors.0d051653.js.map +1 -0
- package/jsconfig.json +19 -0
- package/package.json +51 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +205 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/nodata.jpg +0 -0
- package/src/components/HelloWorld.vue +58 -0
- package/src/main.js +12 -0
- package/src/package/index.js +22 -0
- package/src/package/table/index.js +7 -0
- package/src/package/table/src/index.vue +569 -0
- package/src/package/table/src/printTable.vue +196 -0
- package/vue.config.js +21 -0
package/jsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"baseUrl": "./",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@/*": [
|
|
9
|
+
"src/*"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"lib": [
|
|
13
|
+
"esnext",
|
|
14
|
+
"dom",
|
|
15
|
+
"dom.iterable",
|
|
16
|
+
"scripthost"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ol-base-components",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/js/app.f06356ec.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"serve": "vue-cli-service serve --no-verify",
|
|
8
|
+
"build": "vue-cli-service build",
|
|
9
|
+
"lint": "vue-cli-service lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"core-js": "^3.8.3",
|
|
13
|
+
"element-ui": "^2.15.14",
|
|
14
|
+
"eslint": "^8.57.1",
|
|
15
|
+
"eslint-plugin-vue": "^10.3.0",
|
|
16
|
+
"vue": "^2.6.14"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@babel/core": "^7.12.16",
|
|
20
|
+
"@babel/eslint-parser": "^7.12.16",
|
|
21
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
|
22
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
23
|
+
"@vue/cli-service": "~5.0.0",
|
|
24
|
+
"sass": "^1.89.2",
|
|
25
|
+
"sass-loader": "^16.0.5",
|
|
26
|
+
"vue-template-compiler": "^2.6.14"
|
|
27
|
+
},
|
|
28
|
+
"eslintConfig": {
|
|
29
|
+
"root": true,
|
|
30
|
+
"env": {
|
|
31
|
+
"node": true
|
|
32
|
+
},
|
|
33
|
+
"extends": [
|
|
34
|
+
"plugin:vue/essential",
|
|
35
|
+
"eslint:recommended"
|
|
36
|
+
],
|
|
37
|
+
"parserOptions": {
|
|
38
|
+
"parser": "@babel/eslint-parser"
|
|
39
|
+
},
|
|
40
|
+
"rules": {}
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"ol-base-components"
|
|
44
|
+
],
|
|
45
|
+
"description": "二次封装的通用组件库。table,form",
|
|
46
|
+
"browserslist": [
|
|
47
|
+
"> 1%",
|
|
48
|
+
"last 2 versions",
|
|
49
|
+
"not dead"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
+
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>
|
|
12
|
+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
+
</noscript>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<!-- built files will be auto injected -->
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<div>1111</div>
|
|
4
|
+
<MyTable
|
|
5
|
+
:paginations="paginations"
|
|
6
|
+
:empty-img="tableData.emptyImg"
|
|
7
|
+
:btnlist="[]"
|
|
8
|
+
:table-data="tableData"
|
|
9
|
+
:multiple-selection="multipleSelection"
|
|
10
|
+
@SelectionChange="SelectionChange"
|
|
11
|
+
@handleSizeChange="handleSizeChange"
|
|
12
|
+
@handleindexChange="handleindexChange"
|
|
13
|
+
></MyTable>
|
|
14
|
+
<el-button>默认按钮</el-button>
|
|
15
|
+
<el-button type="primary">主要按钮</el-button>
|
|
16
|
+
<el-button type="success">成功按钮</el-button>
|
|
17
|
+
<el-button type="info">信息按钮</el-button>
|
|
18
|
+
<el-button type="warning">警告按钮</el-button>
|
|
19
|
+
<el-button type="danger">危险按钮</el-button>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
// import HelloWorld from "./components/HelloWorld.vue";
|
|
25
|
+
import MyTable from "@/package/table/src/index.vue";
|
|
26
|
+
export default {
|
|
27
|
+
name: "App",
|
|
28
|
+
components: {
|
|
29
|
+
// HelloWorld,
|
|
30
|
+
MyTable,
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
multipleSelection: [],
|
|
35
|
+
tableData: {
|
|
36
|
+
loading: false,
|
|
37
|
+
emptyImg: true,
|
|
38
|
+
options: {
|
|
39
|
+
selection: true, // 多选框
|
|
40
|
+
index: false, // 序号EmployeeInfoCode
|
|
41
|
+
headTool: true, // 开启头部工具栏
|
|
42
|
+
refreshBtn: true, // 开启表格头部刷新按钮
|
|
43
|
+
downloadBtn: true, // 开启表格头部下载按钮
|
|
44
|
+
}, // 序号和复选框
|
|
45
|
+
rows: [], // 表数据
|
|
46
|
+
columns: [
|
|
47
|
+
{
|
|
48
|
+
label: "",
|
|
49
|
+
minWidth: "",
|
|
50
|
+
type: "selection",
|
|
51
|
+
show: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
prop: "qualityEnumDesc",
|
|
55
|
+
label: "状态",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
prop: "stockTypeDesc",
|
|
59
|
+
label: "类型",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
prop: "productCode",
|
|
63
|
+
label: "零件编码",
|
|
64
|
+
minWidth: "200",
|
|
65
|
+
sortable: false,
|
|
66
|
+
show: true,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
prop: "productName",
|
|
70
|
+
label: "零件名称",
|
|
71
|
+
minWidth: "180",
|
|
72
|
+
sortable: false,
|
|
73
|
+
show: true,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
prop: "productBatch",
|
|
77
|
+
label: "批次",
|
|
78
|
+
minWidth: "",
|
|
79
|
+
sortable: false,
|
|
80
|
+
show: true,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
prop: "receivingTime",
|
|
84
|
+
label: "收货日期",
|
|
85
|
+
minWidth: "160",
|
|
86
|
+
sortable: false,
|
|
87
|
+
show: true,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
prop: "expireTime",
|
|
91
|
+
label: "到期时间",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
prop: "projectCode",
|
|
95
|
+
label: "项目号",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
prop: "boxCode",
|
|
99
|
+
label: "箱卡号",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
prop: "region",
|
|
103
|
+
label: "区域",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
prop: "area",
|
|
107
|
+
label: "库区",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
prop: "carBodyTagNumber",
|
|
111
|
+
label: "标签号",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
prop: "cargoLocationCode",
|
|
115
|
+
label: "库位编码",
|
|
116
|
+
minWidth: "",
|
|
117
|
+
sortable: false,
|
|
118
|
+
show: true,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
prop: "containerCode",
|
|
122
|
+
label: "容器编码",
|
|
123
|
+
minWidth: "",
|
|
124
|
+
sortable: false,
|
|
125
|
+
show: true,
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
prop: "totalQty",
|
|
129
|
+
label: "库存数量",
|
|
130
|
+
minWidth: "120",
|
|
131
|
+
sortable: false,
|
|
132
|
+
show: true,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
prop: "usableQty",
|
|
136
|
+
label: "可用数量",
|
|
137
|
+
minWidth: "120",
|
|
138
|
+
sortable: false,
|
|
139
|
+
show: true,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
prop: "lockQty",
|
|
143
|
+
label: "占用数量",
|
|
144
|
+
minWidth: "120",
|
|
145
|
+
sortable: false,
|
|
146
|
+
show: true,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
prop: "stockoutBillNo",
|
|
150
|
+
label: "出库单号",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
prop: "loadPercent",
|
|
154
|
+
label: "容器承载百分比",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
prop: "alv",
|
|
158
|
+
label: "客户件号",
|
|
159
|
+
},
|
|
160
|
+
], // 表头
|
|
161
|
+
operates: [], // 表格里面的操作按钮
|
|
162
|
+
tableHeightDiff: 300,
|
|
163
|
+
},
|
|
164
|
+
paginations: {
|
|
165
|
+
page: 1, // 当前位于那页面
|
|
166
|
+
total: 10, // 总数
|
|
167
|
+
limit: 30, // 一页显示多少条
|
|
168
|
+
pagetionShow: true,
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
methods: {
|
|
173
|
+
SelectionChange(row) {
|
|
174
|
+
this.multipleSelection = row;
|
|
175
|
+
},
|
|
176
|
+
handleSearch(from) {
|
|
177
|
+
var self = this;
|
|
178
|
+
self.formSearchData.value = { ...from };
|
|
179
|
+
self.paginations.page = 1;
|
|
180
|
+
this.getTable();
|
|
181
|
+
},
|
|
182
|
+
handleReset() {},
|
|
183
|
+
handleSizeChange(val) {
|
|
184
|
+
this.paginations.page = 1;
|
|
185
|
+
this.paginations.limit = val;
|
|
186
|
+
this.getTable();
|
|
187
|
+
},
|
|
188
|
+
handleindexChange(val) {
|
|
189
|
+
this.paginations.page = val;
|
|
190
|
+
this.getTable();
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
</script>
|
|
195
|
+
|
|
196
|
+
<style>
|
|
197
|
+
#app {
|
|
198
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
199
|
+
-webkit-font-smoothing: antialiased;
|
|
200
|
+
-moz-osx-font-smoothing: grayscale;
|
|
201
|
+
text-align: center;
|
|
202
|
+
color: #2c3e50;
|
|
203
|
+
margin-top: 60px;
|
|
204
|
+
}
|
|
205
|
+
</style>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hello">
|
|
3
|
+
<h1>{{ msg }}</h1>
|
|
4
|
+
<p>
|
|
5
|
+
For a guide and recipes on how to configure / customize this project,<br>
|
|
6
|
+
check out the
|
|
7
|
+
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
|
8
|
+
</p>
|
|
9
|
+
<h3>Installed CLI Plugins</h3>
|
|
10
|
+
<ul>
|
|
11
|
+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
|
12
|
+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
|
13
|
+
</ul>
|
|
14
|
+
<h3>Essential Links</h3>
|
|
15
|
+
<ul>
|
|
16
|
+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
|
17
|
+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
|
18
|
+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
|
19
|
+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
|
20
|
+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
|
21
|
+
</ul>
|
|
22
|
+
<h3>Ecosystem</h3>
|
|
23
|
+
<ul>
|
|
24
|
+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
|
25
|
+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
|
26
|
+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
|
27
|
+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
|
28
|
+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: 'HelloWorld',
|
|
36
|
+
props: {
|
|
37
|
+
msg: String
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
43
|
+
<style scoped>
|
|
44
|
+
h3 {
|
|
45
|
+
margin: 40px 0 0;
|
|
46
|
+
}
|
|
47
|
+
ul {
|
|
48
|
+
list-style-type: none;
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
li {
|
|
52
|
+
display: inline-block;
|
|
53
|
+
margin: 0 10px;
|
|
54
|
+
}
|
|
55
|
+
a {
|
|
56
|
+
color: #42b983;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
package/src/main.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Vue from "vue";
|
|
2
|
+
import ElementUI from "element-ui";
|
|
3
|
+
import "element-ui/lib/theme-chalk/index.css";
|
|
4
|
+
import App from "./App.vue";
|
|
5
|
+
import OldCom from "@/package/table/index";
|
|
6
|
+
|
|
7
|
+
Vue.config.productionTip = false;
|
|
8
|
+
Vue.use(ElementUI);
|
|
9
|
+
Vue.use(OldCom);
|
|
10
|
+
new Vue({
|
|
11
|
+
render: (h) => h(App),
|
|
12
|
+
}).$mount("#app");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import OlTable from "./table";
|
|
2
|
+
|
|
3
|
+
const components = [OlTable];
|
|
4
|
+
|
|
5
|
+
const install = function (Vue) {
|
|
6
|
+
// 判断是否安装
|
|
7
|
+
if (install.installed) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
// 遍历所有组件
|
|
11
|
+
components.map((item) => {
|
|
12
|
+
Vue.component(item.name, item);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
// 判断是否引入文件
|
|
16
|
+
if (typeof window !== "undefined" && window.Vue) {
|
|
17
|
+
install(window.Vue);
|
|
18
|
+
}
|
|
19
|
+
export default {
|
|
20
|
+
install,
|
|
21
|
+
...components,
|
|
22
|
+
};
|