large-model-component 1.0.1 → 1.0.3
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 +1 -1
- package/dist/img/blue_tip.2d17b827.png +0 -0
- package/dist/large-model-component.common.js +8927 -141151
- package/dist/large-model-component.common.js.map +1 -1
- package/dist/large-model-component.css +1 -1
- package/dist/large-model-component.umd.js +8931 -141155
- package/dist/large-model-component.umd.js.map +1 -1
- package/dist/large-model-component.umd.min.js +6 -31
- package/dist/large-model-component.umd.min.js.map +1 -1
- package/docs/comps/README.md +1 -1
- package/package.json +10 -16
- package/packages/footer/footer.vue +346 -0
- package/packages/footer/index.js +2 -0
- package/packages/header/header.vue +516 -0
- package/packages/header/index.js +3 -0
- package/packages/index.js +7 -3
- package/packages/model/index.js +3 -0
- package/packages/{largeModel/index.vue → model/model.vue} +26 -65
- package/packages/upload/index.js +2 -0
- package/packages/upload/src/ajax.js +156 -0
- package/packages/upload/src/index.vue +329 -0
- package/packages/upload/src/upload-dragger.vue +70 -0
- package/packages/upload/src/upload-list.vue +94 -0
- package/packages/upload/src/upload.vue +274 -0
- package/src/App.vue +240 -2
- package/src/assets/blue_tip.png +0 -0
- package/src/assets/gray_tip.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/HelloWorld.vue +59 -0
- package/{packages/largeModel → src/components}/contentFold.vue +13 -0
- package/src/main.js +0 -5
- package/src/utils/request.js +3 -11
- package/tests/unit/example.spec.js +12 -0
- package/vue.config.js +3 -0
- package/.env +0 -2
- package/.env.development +0 -2
- package/.env.production +0 -2
- package/dist/css/107.3716bdaf.css +0 -1
- package/dist/css/644.3716bdaf.css +0 -1
- package/dist/css/848.e455a0b7.css +0 -1
- package/dist/img/ai-chart.167a7713.png +0 -0
- package/dist/img/scrol-bg.f446933a.png +0 -0
- package/dist/img/zhijing-model.6a81c5a7.png +0 -0
- package/dist/large-model-component.common.644.js +0 -73
- package/dist/large-model-component.common.644.js.map +0 -1
- package/dist/large-model-component.umd.107.js +0 -73
- package/dist/large-model-component.umd.107.js.map +0 -1
- package/dist/large-model-component.umd.min.848.js +0 -2
- package/dist/large-model-component.umd.min.848.js.map +0 -1
- package/packages/largeModel/index.js +0 -2
- package/src/assets/css/app.css +0 -3255
- package/src/assets/css/chunk-vendors.css +0 -2071
- package/src/assets/css/github-markdown.css +0 -985
- package/src/router/index.js +0 -20
- package/src/store/index.js +0 -26
- package/src/utils/auth.js +0 -48
- package/src/utils/index.js +0 -111
- package/src/utils/spceialistConfig.js +0 -44
- package/src/utils/tool.js +0 -4
- package/src/utils/validate.js +0 -20
- /package/{packages/largeModel → src/utils}/pubsub.js +0 -0
- /package/{packages/largeModel → src/utils}/wsconnecter.js +0 -0
package/src/router/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import VueRouter from 'vue-router';
|
|
3
|
-
|
|
4
|
-
Vue.use(VueRouter);
|
|
5
|
-
|
|
6
|
-
const routes = [
|
|
7
|
-
{
|
|
8
|
-
path: '/',
|
|
9
|
-
name: 'Home',
|
|
10
|
-
component: () => import('@/App.vue')
|
|
11
|
-
}
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
const router = new VueRouter({
|
|
15
|
-
mode: 'history',
|
|
16
|
-
base: process.env.BASE_URL,
|
|
17
|
-
routes
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export default router;
|
package/src/store/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import Vuex from 'vuex';
|
|
3
|
-
|
|
4
|
-
Vue.use(Vuex);
|
|
5
|
-
|
|
6
|
-
export default new Vuex.Store({
|
|
7
|
-
state: {
|
|
8
|
-
userInfo: null,
|
|
9
|
-
siteConfig: {
|
|
10
|
-
aiUrl: '',
|
|
11
|
-
loginUrl: ''
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
getters: {
|
|
15
|
-
'industrial-access-token': () => localStorage.getItem('Industrial-Access-Token')
|
|
16
|
-
},
|
|
17
|
-
mutations: {
|
|
18
|
-
SET_USER_INFO(state, userInfo) {
|
|
19
|
-
state.userInfo = userInfo;
|
|
20
|
-
},
|
|
21
|
-
SET_SITE_CONFIG(state, config) {
|
|
22
|
-
state.siteConfig = config;
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
actions: {}
|
|
26
|
-
});
|
package/src/utils/auth.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import utils from '@/utils/utils';
|
|
2
|
-
import Cookies from 'js-cookie';
|
|
3
|
-
export function setToken(value) {
|
|
4
|
-
Cookies.set('industrial-access-token', value);
|
|
5
|
-
}
|
|
6
|
-
export function getToken() {
|
|
7
|
-
return Cookies.get('industrial-access-token');
|
|
8
|
-
}
|
|
9
|
-
export function removeToken() {
|
|
10
|
-
Cookies.remove('industrial-access-token');
|
|
11
|
-
}
|
|
12
|
-
// 公共存储方法
|
|
13
|
-
export function setByLocalStorage(key, value) {
|
|
14
|
-
localStorage.setItem(key, value);
|
|
15
|
-
}
|
|
16
|
-
export function getByLocalStorage(key) {
|
|
17
|
-
return localStorage.getItem(key);
|
|
18
|
-
}
|
|
19
|
-
export function removeByLocalStorage(key) {
|
|
20
|
-
return localStorage.removeItem(key);
|
|
21
|
-
}
|
|
22
|
-
export function removeAllByLocalStorage() {
|
|
23
|
-
localStorage.clear();
|
|
24
|
-
}
|
|
25
|
-
export function cleanCode(func, route) {
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
// const newUrl = window.location.origin;
|
|
28
|
-
const newUrl = utils.dealPath(process.env.VUE_APP_DEFAULT_REDIRECTURL_URL);
|
|
29
|
-
window.history.replaceState({ path: newUrl }, '', newUrl);
|
|
30
|
-
console.log('----newUrl------', newUrl);
|
|
31
|
-
func(route);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export function pathHandle(data) {
|
|
35
|
-
let path = process.env[data];
|
|
36
|
-
if (process.env.NODE_ENV != 'development') {
|
|
37
|
-
path = window.location.origin + path;
|
|
38
|
-
}
|
|
39
|
-
return path;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function routerParams(params) {
|
|
43
|
-
let data = [];
|
|
44
|
-
for (let i in params) {
|
|
45
|
-
data.push(i + '=' + params[i]);
|
|
46
|
-
}
|
|
47
|
-
return data.length > 0 ? '?' + data.join('&') : '';
|
|
48
|
-
}
|
package/src/utils/index.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by PanJiaChen on 16/11/18.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Parse the time to string
|
|
7
|
-
* @param {(Object|string|number)} time
|
|
8
|
-
* @param {string} cFormat
|
|
9
|
-
* @returns {string | null}
|
|
10
|
-
*/
|
|
11
|
-
export function parseTime(time, cFormat) {
|
|
12
|
-
if (arguments.length === 0 || !time) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}";
|
|
16
|
-
let date;
|
|
17
|
-
if (typeof time === "object") {
|
|
18
|
-
date = time;
|
|
19
|
-
} else {
|
|
20
|
-
if (typeof time === "string") {
|
|
21
|
-
if (/^[0-9]+$/.test(time)) {
|
|
22
|
-
// support "1548221490638"
|
|
23
|
-
time = parseInt(time);
|
|
24
|
-
} else {
|
|
25
|
-
// support safari
|
|
26
|
-
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
|
|
27
|
-
time = time.replace(new RegExp(/-/gm), "/");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (typeof time === "number" && time.toString().length === 10) {
|
|
32
|
-
time *= 1000;
|
|
33
|
-
}
|
|
34
|
-
date = new Date(time);
|
|
35
|
-
}
|
|
36
|
-
const formatObj = {
|
|
37
|
-
y: date.getFullYear(),
|
|
38
|
-
m: date.getMonth() + 1,
|
|
39
|
-
d: date.getDate(),
|
|
40
|
-
h: date.getHours(),
|
|
41
|
-
i: date.getMinutes(),
|
|
42
|
-
s: date.getSeconds(),
|
|
43
|
-
a: date.getDay(),
|
|
44
|
-
};
|
|
45
|
-
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
|
46
|
-
const value = formatObj[key];
|
|
47
|
-
// Note: getDay() returns 0 on Sunday
|
|
48
|
-
if (key === "a") {
|
|
49
|
-
return ["日", "一", "二", "三", "四", "五", "六"][value];
|
|
50
|
-
}
|
|
51
|
-
return value.toString().padStart(2, "0");
|
|
52
|
-
});
|
|
53
|
-
return time_str;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @param {number} time
|
|
58
|
-
* @param {string} option
|
|
59
|
-
* @returns {string}
|
|
60
|
-
*/
|
|
61
|
-
export function formatTime(time, option) {
|
|
62
|
-
if (`${time}`.length === 10) {
|
|
63
|
-
time = parseInt(time) * 1000;
|
|
64
|
-
} else {
|
|
65
|
-
time = +time;
|
|
66
|
-
}
|
|
67
|
-
const d = new Date(time);
|
|
68
|
-
const now = Date.now();
|
|
69
|
-
|
|
70
|
-
const diff = (now - d) / 1000;
|
|
71
|
-
|
|
72
|
-
if (diff < 30) {
|
|
73
|
-
return "刚刚";
|
|
74
|
-
} else if (diff < 3600) {
|
|
75
|
-
// less 1 hour
|
|
76
|
-
return `${Math.ceil(diff / 60)}分钟前`;
|
|
77
|
-
} else if (diff < 3600 * 24) {
|
|
78
|
-
return `${Math.ceil(diff / 3600)}小时前`;
|
|
79
|
-
} else if (diff < 3600 * 24 * 2) {
|
|
80
|
-
return "1天前";
|
|
81
|
-
}
|
|
82
|
-
if (option) {
|
|
83
|
-
return parseTime(time, option);
|
|
84
|
-
} else {
|
|
85
|
-
return `${
|
|
86
|
-
d.getMonth() + 1
|
|
87
|
-
}月${d.getDate()}日${d.getHours()}时${d.getMinutes()}分`;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @param {string} url
|
|
93
|
-
* @returns {Object}
|
|
94
|
-
*/
|
|
95
|
-
export function param2Obj(url) {
|
|
96
|
-
const search = decodeURIComponent(url.split("?")[1]).replace(/\+/g, " ");
|
|
97
|
-
if (!search) {
|
|
98
|
-
return {};
|
|
99
|
-
}
|
|
100
|
-
const obj = {};
|
|
101
|
-
const searchArr = search.split("&");
|
|
102
|
-
searchArr.forEach((v) => {
|
|
103
|
-
const index = v.indexOf("=");
|
|
104
|
-
if (index !== -1) {
|
|
105
|
-
const name = v.substring(0, index);
|
|
106
|
-
const val = v.substring(index + 1, v.length);
|
|
107
|
-
obj[name] = val;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
return obj;
|
|
111
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export default{
|
|
2
|
-
|
|
3
|
-
sexList: [
|
|
4
|
-
{label:'男', value:'1'},
|
|
5
|
-
{label:'女', value:'2'},
|
|
6
|
-
],
|
|
7
|
-
degreeList: [
|
|
8
|
-
{label:'大学本科', value:'1'},
|
|
9
|
-
{label:'硕士研究生', value:'2'},
|
|
10
|
-
{label:'博士研究生', value:'3'}
|
|
11
|
-
],
|
|
12
|
-
titleList: [
|
|
13
|
-
{label:'初级', value:'1'},
|
|
14
|
-
{label:'中级', value:'2'},
|
|
15
|
-
{label:'副高级', value:'3'},
|
|
16
|
-
{label:'正高级', value:'4'}
|
|
17
|
-
],
|
|
18
|
-
areaList: [
|
|
19
|
-
{label:'运维服务', value:'1'},
|
|
20
|
-
{label:'节能减排', value:'2'},
|
|
21
|
-
{label:'安全生产', value:'3'},
|
|
22
|
-
{label:'仓储物流', value:'4'},
|
|
23
|
-
{label:'运营管理', value:'5'},
|
|
24
|
-
{label:'质量管控', value:'6'},
|
|
25
|
-
{label:'生产制造', value:'7'},
|
|
26
|
-
{label:'供应链管理', value:'8'},
|
|
27
|
-
{label:'研发设计', value:'9'},
|
|
28
|
-
],
|
|
29
|
-
serviceList: [
|
|
30
|
-
{label:'政策咨询', value:'1'},
|
|
31
|
-
{label:'市场营销', value:'2'},
|
|
32
|
-
{label:'技术创新', value:'3'},
|
|
33
|
-
{label:'经营管理', value:'4'},
|
|
34
|
-
{label:'财务税务', value:'5'},
|
|
35
|
-
{label:'投资融资', value:'6'},
|
|
36
|
-
{label:'法律服务', value:'7'},
|
|
37
|
-
{label:'人才服务', value:'8'},
|
|
38
|
-
],
|
|
39
|
-
industryList: [
|
|
40
|
-
{label:'食品', value:'1'},
|
|
41
|
-
{label:'机械', value:'2'},
|
|
42
|
-
{label:'电子', value:'3'},
|
|
43
|
-
]
|
|
44
|
-
}
|
package/src/utils/tool.js
DELETED
package/src/utils/validate.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by PanJiaChen on 16/11/18.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @param {string} path
|
|
7
|
-
* @returns {Boolean}
|
|
8
|
-
*/
|
|
9
|
-
export function isExternal(path) {
|
|
10
|
-
return /^(https?:|mailto:|tel:)/.test(path);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @param {string} str
|
|
15
|
-
* @returns {Boolean}
|
|
16
|
-
*/
|
|
17
|
-
export function validUsername(str) {
|
|
18
|
-
const valid_map = ["admin", "editor"];
|
|
19
|
-
return valid_map.indexOf(str.trim()) >= 0;
|
|
20
|
-
}
|
|
File without changes
|
|
File without changes
|