large-model-component 1.0.0 → 1.0.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/README.md +1 -1
- package/dist/img/blue_tip.2d17b827.png +0 -0
- package/dist/large-model-component.common.js +9094 -141318
- 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 +9098 -141322
- 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} +25 -64
- 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/.env +0 -2
- package/.env.development +0 -2
- package/.env.production +0 -2
- package/dist/css/248.e455a0b7.css +0 -1
- package/dist/css/712.3716bdaf.css +0 -1
- package/dist/css/792.3716bdaf.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.712.js +0 -73
- package/dist/large-model-component.common.712.js.map +0 -1
- package/dist/large-model-component.umd.792.js +0 -73
- package/dist/large-model-component.umd.792.js.map +0 -1
- package/dist/large-model-component.umd.min.248.js +0 -2
- package/dist/large-model-component.umd.min.248.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
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import ajax from './ajax';
|
|
3
|
+
import UploadDragger from './upload-dragger.vue';
|
|
4
|
+
import SparkMD5 from 'spark-md5';
|
|
5
|
+
function getFileMD5(file) {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
const spark = new SparkMD5.ArrayBuffer();
|
|
8
|
+
const fileReader = new FileReader();
|
|
9
|
+
fileReader.onload = (e) => {
|
|
10
|
+
spark.append(e.target.result);
|
|
11
|
+
resolve(spark.end());
|
|
12
|
+
};
|
|
13
|
+
fileReader.onerror = () => {
|
|
14
|
+
reject('');
|
|
15
|
+
};
|
|
16
|
+
fileReader.readAsArrayBuffer(file);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
inject: ['uploader'],
|
|
22
|
+
components: {
|
|
23
|
+
UploadDragger,
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
type: String,
|
|
27
|
+
action: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'file',
|
|
34
|
+
},
|
|
35
|
+
data: Object,
|
|
36
|
+
chunkSize: Number,
|
|
37
|
+
thread: Number,
|
|
38
|
+
headers: Object,
|
|
39
|
+
withCredentials: Boolean,
|
|
40
|
+
multiple: Boolean,
|
|
41
|
+
accept: String,
|
|
42
|
+
onStart: Function,
|
|
43
|
+
onProgress: Function,
|
|
44
|
+
onSuccess: Function,
|
|
45
|
+
onError: Function,
|
|
46
|
+
beforeUpload: Function,
|
|
47
|
+
drag: Boolean,
|
|
48
|
+
onPreview: {
|
|
49
|
+
type: Function,
|
|
50
|
+
default: function () {},
|
|
51
|
+
},
|
|
52
|
+
onRemove: {
|
|
53
|
+
type: Function,
|
|
54
|
+
default: function () {},
|
|
55
|
+
},
|
|
56
|
+
fileList: Array,
|
|
57
|
+
autoUpload: Boolean,
|
|
58
|
+
listType: String,
|
|
59
|
+
httpRequest: {
|
|
60
|
+
type: Function,
|
|
61
|
+
default: ajax,
|
|
62
|
+
},
|
|
63
|
+
disabled: Boolean,
|
|
64
|
+
limit: Number,
|
|
65
|
+
onExceed: Function,
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
data() {
|
|
69
|
+
return {
|
|
70
|
+
mouseover: false,
|
|
71
|
+
reqs: {},
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
methods: {
|
|
76
|
+
isImage(str) {
|
|
77
|
+
return str.indexOf('image') !== -1;
|
|
78
|
+
},
|
|
79
|
+
handleChange(ev) {
|
|
80
|
+
const files = ev.target.files;
|
|
81
|
+
|
|
82
|
+
if (!files) return;
|
|
83
|
+
this.uploadFiles(files);
|
|
84
|
+
},
|
|
85
|
+
uploadFiles(files) {
|
|
86
|
+
if (this.limit && this.fileList.length + files.length > this.limit) {
|
|
87
|
+
this.onExceed && this.onExceed(files, this.fileList);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let postFiles = Array.prototype.slice.call(files);
|
|
92
|
+
if (!this.multiple) {
|
|
93
|
+
postFiles = postFiles.slice(0, 1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (postFiles.length === 0) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
postFiles.forEach((rawFile) => {
|
|
101
|
+
this.onStart(rawFile);
|
|
102
|
+
if (this.autoUpload) this.upload(rawFile);
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
upload(rawFile) {
|
|
106
|
+
this.$refs.input.value = null;
|
|
107
|
+
|
|
108
|
+
if (!this.beforeUpload) {
|
|
109
|
+
return this.post(rawFile);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const before = this.beforeUpload(rawFile);
|
|
113
|
+
if (before && before.then) {
|
|
114
|
+
before.then(
|
|
115
|
+
(processedFile) => {
|
|
116
|
+
const fileType = Object.prototype.toString.call(processedFile);
|
|
117
|
+
|
|
118
|
+
if (fileType === '[object File]' || fileType === '[object Blob]') {
|
|
119
|
+
if (fileType === '[object Blob]') {
|
|
120
|
+
processedFile = new File([processedFile], rawFile.name, {
|
|
121
|
+
type: rawFile.type,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
for (const p in rawFile) {
|
|
125
|
+
if (rawFile.hasOwnProperty(p)) {
|
|
126
|
+
processedFile[p] = rawFile[p];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
this.post(processedFile);
|
|
130
|
+
} else {
|
|
131
|
+
this.post(rawFile);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
() => {
|
|
135
|
+
this.onRemove(null, rawFile);
|
|
136
|
+
},
|
|
137
|
+
);
|
|
138
|
+
} else if (before !== false) {
|
|
139
|
+
this.post(rawFile);
|
|
140
|
+
} else {
|
|
141
|
+
this.onRemove(null, rawFile);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
abort(file) {
|
|
145
|
+
const { reqs } = this;
|
|
146
|
+
if (file) {
|
|
147
|
+
let uid = file;
|
|
148
|
+
if (file.uid) uid = file.uid;
|
|
149
|
+
if (reqs[uid]) {
|
|
150
|
+
// reqs[uid].abort();
|
|
151
|
+
reqs[uid].forEach((item) => {
|
|
152
|
+
item.abort();
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
Object.keys(reqs).forEach((uid) => {
|
|
157
|
+
if (reqs[uid]) {
|
|
158
|
+
// reqs[uid].abort();
|
|
159
|
+
reqs[uid].forEach((item) => {
|
|
160
|
+
item.abort();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
delete reqs[uid];
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
async post(rawFile) {
|
|
168
|
+
//计算整个大文件hash
|
|
169
|
+
let fileHash = await getFileMD5(rawFile);
|
|
170
|
+
//大文件切片后的数组
|
|
171
|
+
let chunkList = [];
|
|
172
|
+
//开始切片
|
|
173
|
+
for (let i = 0; i < rawFile.size; i = i + this.chunkSize) {
|
|
174
|
+
const tmp = rawFile.slice(i, Math.min(i + this.chunkSize, rawFile.size));
|
|
175
|
+
chunkList.push(tmp);
|
|
176
|
+
}
|
|
177
|
+
// 计算每个切换的hash
|
|
178
|
+
const chunkHashList = await Promise.all(
|
|
179
|
+
chunkList.map(async (item) => {
|
|
180
|
+
return await getFileMD5(item);
|
|
181
|
+
}),
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
const { uid } = rawFile;
|
|
185
|
+
const options = {
|
|
186
|
+
headers: this.headers,
|
|
187
|
+
withCredentials: this.withCredentials,
|
|
188
|
+
file: rawFile,
|
|
189
|
+
data: this.data,
|
|
190
|
+
filename: this.name,
|
|
191
|
+
action: this.action,
|
|
192
|
+
fileHash: fileHash,
|
|
193
|
+
chunkList: chunkList,
|
|
194
|
+
chunkHashList: chunkHashList,
|
|
195
|
+
chunkSize: this.chunkSize,
|
|
196
|
+
thread: this.thread,
|
|
197
|
+
onProgress: (e) => {
|
|
198
|
+
this.onProgress(e, rawFile);
|
|
199
|
+
},
|
|
200
|
+
onSuccess: (res) => {
|
|
201
|
+
this.onSuccess(res, rawFile);
|
|
202
|
+
delete this.reqs[uid];
|
|
203
|
+
},
|
|
204
|
+
onError: (err) => {
|
|
205
|
+
this.onError(err, rawFile);
|
|
206
|
+
delete this.reqs[uid];
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
const req = this.httpRequest(options);
|
|
210
|
+
this.reqs[uid] = req;
|
|
211
|
+
if (req && req.then) {
|
|
212
|
+
req.then(options.onSuccess, options.onError);
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
handleClick() {
|
|
216
|
+
if (!this.disabled) {
|
|
217
|
+
this.$refs.input.value = null;
|
|
218
|
+
this.$refs.input.click();
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
handleKeydown(e) {
|
|
222
|
+
if (e.target !== e.currentTarget) return;
|
|
223
|
+
if (e.keyCode === 13 || e.keyCode === 32) {
|
|
224
|
+
this.handleClick();
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
render(h) {
|
|
230
|
+
let {
|
|
231
|
+
handleClick,
|
|
232
|
+
drag,
|
|
233
|
+
name,
|
|
234
|
+
handleChange,
|
|
235
|
+
multiple,
|
|
236
|
+
accept,
|
|
237
|
+
listType,
|
|
238
|
+
uploadFiles,
|
|
239
|
+
disabled,
|
|
240
|
+
handleKeydown,
|
|
241
|
+
} = this;
|
|
242
|
+
const data = {
|
|
243
|
+
class: {
|
|
244
|
+
'el-upload': true,
|
|
245
|
+
},
|
|
246
|
+
on: {
|
|
247
|
+
click: handleClick,
|
|
248
|
+
keydown: handleKeydown,
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
data.class[`el-upload--${listType}`] = true;
|
|
252
|
+
return (
|
|
253
|
+
<div {...data} tabindex="0">
|
|
254
|
+
{drag ? (
|
|
255
|
+
<upload-dragger disabled={disabled} on-file={uploadFiles}>
|
|
256
|
+
{this.$slots.default}
|
|
257
|
+
</upload-dragger>
|
|
258
|
+
) : (
|
|
259
|
+
this.$slots.default
|
|
260
|
+
)}
|
|
261
|
+
<input
|
|
262
|
+
class="el-upload__input"
|
|
263
|
+
type="file"
|
|
264
|
+
ref="input"
|
|
265
|
+
name={name}
|
|
266
|
+
on-change={handleChange}
|
|
267
|
+
multiple={multiple}
|
|
268
|
+
accept={accept}
|
|
269
|
+
></input>
|
|
270
|
+
</div>
|
|
271
|
+
);
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
</script>
|
package/src/App.vue
CHANGED
|
@@ -1,21 +1,251 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app">
|
|
3
|
+
<iipHeader :userName="'111'" :columns="columns" :showWorkBench="true" :token="'4ac43982-671d-45e5-8942-4f3d69b6a83c'"> </iipHeader>
|
|
4
|
+
<div class="content">
|
|
5
|
+
<!-- <iipUpload
|
|
6
|
+
class="upload-demo"
|
|
7
|
+
action="http://10.221.19.220:9922/file/part"
|
|
8
|
+
:on-preview="handlePreview"
|
|
9
|
+
:on-remove="handleRemove"
|
|
10
|
+
:before-remove="beforeRemove"
|
|
11
|
+
multiple
|
|
12
|
+
:limit="3"
|
|
13
|
+
:on-exceed="handleExceed"
|
|
14
|
+
:file-list="fileList"
|
|
15
|
+
>
|
|
16
|
+
<button size="small" type="primary">点击上传</button>
|
|
17
|
+
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
18
|
+
</iipUpload> -->
|
|
19
|
+
|
|
20
|
+
<!-- <HelloWorld msg="Welcome to Your Vue.js App" /> -->
|
|
21
|
+
</div>
|
|
3
22
|
<largeModel />
|
|
23
|
+
|
|
24
|
+
<iipFooter apiHost="https://ips.inspuriip.com" :apiPath="`/gateway/site`"></iipFooter>
|
|
4
25
|
</div>
|
|
5
26
|
</template>
|
|
6
27
|
|
|
7
28
|
<script>
|
|
8
|
-
import
|
|
29
|
+
import HelloWorld from './components/HelloWorld.vue';
|
|
30
|
+
import iipHeader from '../packages/header/header.vue';
|
|
31
|
+
import iipFooter from '../packages/footer/footer.vue';
|
|
32
|
+
import iipUpload from '../packages/upload/index.js';
|
|
33
|
+
import largeModel from '../packages/model/model.vue'
|
|
9
34
|
export default {
|
|
10
35
|
name: 'App',
|
|
11
36
|
components: {
|
|
12
|
-
|
|
37
|
+
HelloWorld,
|
|
38
|
+
iipHeader,
|
|
39
|
+
iipFooter,
|
|
40
|
+
iipUpload,
|
|
41
|
+
largeModel,
|
|
13
42
|
},
|
|
14
43
|
data() {
|
|
15
44
|
return {
|
|
45
|
+
logoUrl: 'https://uoc.oss.cn-north-3.inspurcloudoss.com/uoc/1692862054225974.svg',
|
|
46
|
+
fileList: [
|
|
47
|
+
{
|
|
48
|
+
name: 'food.jpeg',
|
|
49
|
+
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'food2.jpeg',
|
|
53
|
+
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
userInfo: {},
|
|
57
|
+
columns: [
|
|
58
|
+
{
|
|
59
|
+
id: '17125390210365hp8af54mvj',
|
|
60
|
+
tenantId: '1739891443916546049',
|
|
61
|
+
columnName: '金融服务',
|
|
62
|
+
columnLink: 'https://sdsc.inspuriip.com/financial-service',
|
|
63
|
+
child: [],
|
|
64
|
+
sequence: '9',
|
|
65
|
+
runType: '1',
|
|
66
|
+
parentId: '0',
|
|
67
|
+
isShow: '1',
|
|
68
|
+
columnType: '1',
|
|
69
|
+
clientId: '894283562298114048',
|
|
70
|
+
updateTime: '2024-04-08 09:17:14',
|
|
71
|
+
createUser: '942046827627151360',
|
|
72
|
+
updateUser: '942046827627151360',
|
|
73
|
+
createTime: '2024-04-08 09:17:14',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: '17049758382557lzl57j150f',
|
|
77
|
+
tenantId: '1739891443916546049',
|
|
78
|
+
columnName: '政策服务',
|
|
79
|
+
columnLink: 'https://sdsc.inspuriip.com/content-web/domain/industry_policy/',
|
|
80
|
+
child: [],
|
|
81
|
+
sequence: '8',
|
|
82
|
+
runType: '1',
|
|
83
|
+
parentId: '0',
|
|
84
|
+
isShow: '1',
|
|
85
|
+
columnType: '1',
|
|
86
|
+
clientId: '894283562298114048',
|
|
87
|
+
updateTime: '2024-04-08 09:17:14',
|
|
88
|
+
createUser: '942046827627151360',
|
|
89
|
+
updateUser: '942046827627151360',
|
|
90
|
+
createTime: '2024-04-08 09:17:14',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: '17049741097141gmr2ov64r3',
|
|
94
|
+
tenantId: '1739891443916546049',
|
|
95
|
+
columnName: '产品方案',
|
|
96
|
+
columnLink: 'https://sdsc.inspuriip.com/service-web/product',
|
|
97
|
+
child: [
|
|
98
|
+
{
|
|
99
|
+
id: '1712538588667wndje2xe77',
|
|
100
|
+
tenantId: '1739891443916546049',
|
|
101
|
+
columnName: '解决方案',
|
|
102
|
+
columnLink: 'https://sdsc.inspuriip.com/service-web/scheme',
|
|
103
|
+
child: [],
|
|
104
|
+
sequence: '7',
|
|
105
|
+
runType: '1',
|
|
106
|
+
parentId: '17049741097141gmr2ov64r3',
|
|
107
|
+
isShow: '1',
|
|
108
|
+
columnType: '1',
|
|
109
|
+
clientId: '894283562298114048',
|
|
110
|
+
updateTime: '2024-04-08 09:17:14',
|
|
111
|
+
createUser: '942046827627151360',
|
|
112
|
+
updateUser: '942046827627151360',
|
|
113
|
+
createTime: '2024-04-08 09:17:14',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: '1712538578330f2m7x85ajww',
|
|
117
|
+
tenantId: '1739891443916546049',
|
|
118
|
+
columnName: '服务产品',
|
|
119
|
+
columnLink: 'https://sdsc.inspuriip.com/service-web/product',
|
|
120
|
+
child: [],
|
|
121
|
+
sequence: '6',
|
|
122
|
+
runType: '1',
|
|
123
|
+
parentId: '17049741097141gmr2ov64r3',
|
|
124
|
+
isShow: '1',
|
|
125
|
+
columnType: '1',
|
|
126
|
+
clientId: '894283562298114048',
|
|
127
|
+
updateTime: '2024-04-08 09:17:14',
|
|
128
|
+
createUser: '942046827627151360',
|
|
129
|
+
updateUser: '942046827627151360',
|
|
130
|
+
createTime: '2024-04-08 09:17:14',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
sequence: '5',
|
|
134
|
+
runType: '1',
|
|
135
|
+
parentId: '0',
|
|
136
|
+
isShow: '1',
|
|
137
|
+
columnType: '1',
|
|
138
|
+
clientId: '894283562298114048',
|
|
139
|
+
updateTime: '2024-04-08 09:17:14',
|
|
140
|
+
createUser: '942046827627151360',
|
|
141
|
+
updateUser: '942046827627151360',
|
|
142
|
+
createTime: '2024-04-08 09:17:14',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: '1704975259913hgxqsu10yz4',
|
|
146
|
+
tenantId: '1739891443916546049',
|
|
147
|
+
columnName: '供需对接',
|
|
148
|
+
columnLink: 'https://sdsc.inspuriip.com/demand-web/',
|
|
149
|
+
child: [],
|
|
150
|
+
sequence: '4',
|
|
151
|
+
runType: '1',
|
|
152
|
+
parentId: '0',
|
|
153
|
+
isShow: '1',
|
|
154
|
+
columnType: '1',
|
|
155
|
+
clientId: '894283562298114048',
|
|
156
|
+
updateTime: '2024-04-08 09:17:14',
|
|
157
|
+
createUser: '942046827627151360',
|
|
158
|
+
updateUser: '942046827627151360',
|
|
159
|
+
createTime: '2024-04-08 09:17:14',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: '17125384397583zghuz9qp7u',
|
|
163
|
+
tenantId: '1739891443916546049',
|
|
164
|
+
columnName: '场景体验',
|
|
165
|
+
columnLink: 'https://sdsc.inspuriip.com/service-web/case',
|
|
166
|
+
child: [],
|
|
167
|
+
sequence: '3',
|
|
168
|
+
runType: '1',
|
|
169
|
+
parentId: '0',
|
|
170
|
+
isShow: '1',
|
|
171
|
+
columnType: '1',
|
|
172
|
+
clientId: '894283562298114048',
|
|
173
|
+
updateTime: '2024-04-08 09:17:14',
|
|
174
|
+
createUser: '942046827627151360',
|
|
175
|
+
updateUser: '942046827627151360',
|
|
176
|
+
createTime: '2024-04-08 09:17:14',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: '171253840393102xwb7411gne',
|
|
180
|
+
tenantId: '1739891443916546049',
|
|
181
|
+
columnName: '企业诊断',
|
|
182
|
+
columnLink: 'https://sdsc.inspuriip.com/digital-diagosis-web/',
|
|
183
|
+
child: [],
|
|
184
|
+
sequence: '2',
|
|
185
|
+
runType: '1',
|
|
186
|
+
parentId: '0',
|
|
187
|
+
isShow: '1',
|
|
188
|
+
columnType: '1',
|
|
189
|
+
clientId: '894283562298114048',
|
|
190
|
+
updateTime: '2024-04-08 09:17:14',
|
|
191
|
+
createUser: '942046827627151360',
|
|
192
|
+
updateUser: '942046827627151360',
|
|
193
|
+
createTime: '2024-04-08 09:17:14',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: '17125387536464kv0s0k1s29',
|
|
197
|
+
tenantId: '1739891443916546049',
|
|
198
|
+
columnName: '人才培训',
|
|
199
|
+
columnLink: 'https://sdsc.inspuriip.com/lecture-theatre/',
|
|
200
|
+
child: [],
|
|
201
|
+
sequence: '10',
|
|
202
|
+
runType: '1',
|
|
203
|
+
parentId: '0',
|
|
204
|
+
isShow: '1',
|
|
205
|
+
columnType: '1',
|
|
206
|
+
clientId: '894283562298114048',
|
|
207
|
+
updateTime: '2024-04-08 09:17:14',
|
|
208
|
+
createUser: '942046827627151360',
|
|
209
|
+
updateUser: '942046827627151360',
|
|
210
|
+
createTime: '2024-04-08 09:17:14',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: '17049572082266uwn25bp1tn',
|
|
214
|
+
tenantId: '1739891443916546049',
|
|
215
|
+
columnName: '首页',
|
|
216
|
+
columnLink: 'https://sdsc.inspuriip.com/',
|
|
217
|
+
child: [],
|
|
218
|
+
sequence: '1',
|
|
219
|
+
runType: '1',
|
|
220
|
+
parentId: '0',
|
|
221
|
+
isShow: '1',
|
|
222
|
+
columnType: '1',
|
|
223
|
+
clientId: '894283562298114048',
|
|
224
|
+
updateTime: '2024-04-08 09:17:14',
|
|
225
|
+
createUser: '942046827627151360',
|
|
226
|
+
updateUser: '942046827627151360',
|
|
227
|
+
createTime: '2024-04-08 09:17:14',
|
|
228
|
+
},
|
|
229
|
+
],
|
|
16
230
|
};
|
|
17
231
|
},
|
|
18
232
|
methods: {
|
|
233
|
+
handleRemove(file, fileList) {
|
|
234
|
+
console.log(file, fileList);
|
|
235
|
+
},
|
|
236
|
+
handlePreview(file) {
|
|
237
|
+
console.log(file);
|
|
238
|
+
},
|
|
239
|
+
handleExceed(files, fileList) {
|
|
240
|
+
this.$message.warning(
|
|
241
|
+
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
|
|
242
|
+
files.length + fileList.length
|
|
243
|
+
} 个文件`,
|
|
244
|
+
);
|
|
245
|
+
},
|
|
246
|
+
beforeRemove(file, fileList) {
|
|
247
|
+
return this.$confirm(`确定移除 ${file.name}?`);
|
|
248
|
+
},
|
|
19
249
|
},
|
|
20
250
|
};
|
|
21
251
|
</script>
|
|
@@ -25,6 +255,14 @@ export default {
|
|
|
25
255
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
26
256
|
-webkit-font-smoothing: antialiased;
|
|
27
257
|
-moz-osx-font-smoothing: grayscale;
|
|
258
|
+
|
|
259
|
+
.content {
|
|
260
|
+
text-align: center;
|
|
261
|
+
color: #2c3e50;
|
|
262
|
+
height: 1000px;
|
|
263
|
+
width: 100%;
|
|
264
|
+
background: #2c3e50;
|
|
265
|
+
}
|
|
28
266
|
}
|
|
29
267
|
.column {
|
|
30
268
|
padding-left: 10px;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-jest" target="_blank" rel="noopener">unit-jest</a></li>
|
|
14
|
+
</ul>
|
|
15
|
+
<h3>Essential Links</h3>
|
|
16
|
+
<ul>
|
|
17
|
+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
|
18
|
+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
|
19
|
+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
|
20
|
+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
|
21
|
+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
|
22
|
+
</ul>
|
|
23
|
+
<h3>Ecosystem</h3>
|
|
24
|
+
<ul>
|
|
25
|
+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
|
26
|
+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
|
27
|
+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
|
28
|
+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
|
29
|
+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
export default {
|
|
36
|
+
name: 'HelloWorld',
|
|
37
|
+
props: {
|
|
38
|
+
msg: String
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
44
|
+
<style scoped>
|
|
45
|
+
h3 {
|
|
46
|
+
margin: 40px 0 0;
|
|
47
|
+
}
|
|
48
|
+
ul {
|
|
49
|
+
list-style-type: none;
|
|
50
|
+
padding: 0;
|
|
51
|
+
}
|
|
52
|
+
li {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
margin: 0 10px;
|
|
55
|
+
}
|
|
56
|
+
a {
|
|
57
|
+
color: #42b983;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -19,8 +19,14 @@ import container from 'markdown-it-container';
|
|
|
19
19
|
import abbr from 'markdown-it-abbr';
|
|
20
20
|
import ins from 'markdown-it-ins';
|
|
21
21
|
import mark from 'markdown-it-mark';
|
|
22
|
+
import MarkdownItLatex from 'markdown-it-latex';
|
|
22
23
|
import hljs from 'highlight.js';
|
|
23
24
|
|
|
25
|
+
// 确保样式文件在 main.js 全局引入了,或者在这里正确相对路径引入
|
|
26
|
+
// import 'highlight.js/styles/github.css';
|
|
27
|
+
// import 'markdown-it-latex/dist/index.css';
|
|
28
|
+
// import './css/github-markdown.css';
|
|
29
|
+
|
|
24
30
|
export default {
|
|
25
31
|
props: {
|
|
26
32
|
content: { type: String, default: '' },
|
|
@@ -86,6 +92,13 @@ export default {
|
|
|
86
92
|
.use(sub).use(sup).use(footnote).use(taskLists)
|
|
87
93
|
.use(container, 'warning').use(abbr).use(ins).use(mark);
|
|
88
94
|
|
|
95
|
+
// 动态注册 latex,如果不需要可移除
|
|
96
|
+
try {
|
|
97
|
+
md.use(MarkdownItLatex);
|
|
98
|
+
} catch (e) {
|
|
99
|
+
console.warn('Latex plugin load failed', e);
|
|
100
|
+
}
|
|
101
|
+
|
|
89
102
|
try {
|
|
90
103
|
const parts = text.split('</think>');
|
|
91
104
|
if (parts.length > 1) {
|
package/src/main.js
CHANGED
|
@@ -2,14 +2,9 @@ import Vue from 'vue'
|
|
|
2
2
|
import App from './App.vue'
|
|
3
3
|
import ElementUI from "element-ui";
|
|
4
4
|
import "element-ui/lib/theme-chalk/index.css";
|
|
5
|
-
import 'highlight.js/styles/github.css'
|
|
6
|
-
import store from './store'
|
|
7
|
-
import router from './router'
|
|
8
5
|
Vue.config.productionTip = false
|
|
9
6
|
import '@/assets/css/base.css'
|
|
10
7
|
Vue.use(ElementUI);
|
|
11
8
|
new Vue({
|
|
12
|
-
store,
|
|
13
|
-
router,
|
|
14
9
|
render: h => h(App),
|
|
15
10
|
}).$mount('#app')
|