Commit 76a32afb authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 317317e0 5e178bdc
+ eslint-plugin-node@11.1.0
added 3 packages from 2 contributors, updated 1 package and moved 1 package in 24.979s
<template>
<div>
<div>
<Input v-model="newName" placeholder="请选择上传文件" disabled>
<Button v-if="view" icon="md-download" slot="prepend" @click="downFile(newName)"> </Button>
<Button type="primary" icon="ios-cloud-upload-outline" slot="append" @click="handler">上传</Button>
<Button v-if="view" icon="md-download" slot="prepend" @click="downFile(newName)"> </Button>
<Button type="primary" icon="ios-cloud-upload-outline" slot="append" @click="handler">上传</Button>
</Input>
<Upload
v-model="name"
:action="postUrl"
:on-success="uploadSuccess"
:on-error="uploadError"
:on-remove="removeFile"
:format="formatList"
:max-size="maxSize"
:on-exceeded-size="onExceededSize"
:on-format-error="onFormatError"
:show-upload-list="false"
:files="files"
:on-progress="onProgress"
>
<Button v-show="1==2" type="primary" ref="upload">上传</Button>
<Upload v-model="name" :action="postUrl" :on-success="uploadSuccess" :on-error="uploadError" :on-remove="removeFile" :format="formatList" :max-size="maxSize" :on-exceeded-size="onExceededSize" :on-format-error="onFormatError" :show-upload-list="false" :files="files" :on-progress="onProgress">
<Button v-show="1==2" type="primary" ref="upload">上传</Button>
</Upload>
<Progress :percent="per" :stroke-width="5" v-show="vshowPro" />
</div>
</div>
</template>
<script>
import util from "@/libs/util";
export default {
name: "inputExcel",
model: {
prop: "value",
event: "on-change"
},
data() {
return {
file: null,
name: this.value,
downUrl: fileUrlDown,
fileUrlPath: "",
nameList: [],
postUrl:
fileUrl +
"/upload/?token=Bearer " +
util.cookies.get("token") +
"&" +
this.parms,
formatList: ["xlsx", "xls"],
newName: "",
newPath: "",
per: 0,
vshowPro: false
};
},
created() {},
props: {
value: [String, Number, Array, Object],
maxSize: {
type: Number,
default: 10240
name: "inputExcel",
model: {
prop: "value",
event: "on-change"
},
files: {
type: Boolean,
default: false
data() {
return {
file: null,
name: this.value,
downUrl: fileUrlDown,
fileUrlPath: "",
nameList: [],
postUrl: fileUrl +
"/upload/?token=Bearer " +
util.cookies.get("token") +
"&" +
this.parms,
formatList: ["xlsx", "xls", "jpg", "gif", "png", "pdf", "docx", "doc", "txt", "rar", "zip"],
newName: "",
newPath: "",
per: 0,
vshowPro: false
};
},
parms: {
type: String,
default: ""
},
showButton: {
type: Boolean,
default: true
}
},
methods: {
onProgress(event, file, fileList) {
this.per = 0;
this.vshowPro = true;
},
handler() {
this.$refs.upload.$el.click();
},
// change(event) {
// this.$emit('on-change', event.target.value)
// },
//上传成功文件
uploadSuccess(response, file, fileList) {
this.per = 60;
this.vshowPro = true;
const hbaseFileList = [];
const filesList = [];
if (file.response.status == 0) {
let objImag = {};
objImag.fileName = file.response.data.fileName;
objImag.filePath = file.response.data.downloadPath;
filesList.push(objImag);
this.newName = file.response.data.fileName;
this.newPath = file.response.data.downloadPath;
this.$emit("on-change", JSON.stringify(filesList));
this.per = 100;
setTimeout(() => {
this.per = 0;
this.vshowPro = false;
}, 2000);
} else {
this.$Message.error("上传失败,请重新上传!");
}
},
//上传文件失败
uploadError(response, file, fileList) {
this.$Message.error("上传失败,请重新上传!");
},
//文件大小验证返回
onExceededSize(file, fileList) {
if (Object.keys(file).length == 0) {
this.$Message.error(
"上传文件不能大于" + this.maxSize + "k,请重新上传!"
);
}
created() {},
props: {
value: [String, Number, Array, Object],
maxSize: {
type: Number,
default: 10240
},
files: {
type: Boolean,
default: false
},
parms: {
type: String,
default: ""
},
showButton: {
type: Boolean,
default: true
}
},
//文件格式验证
onFormatError(file, fileList) {
if (Object.keys(file).length == 0) {
this.$Message.error("上传文件格式不正确,请重新上传!");
}
methods: {
onProgress(event, file, fileList) {
this.per = 0;
this.vshowPro = true;
},
handler() {
this.$refs.upload.$el.click();
},
// change(event) {
// this.$emit('on-change', event.target.value)
// },
//上传成功文件
uploadSuccess(response, file, fileList) {
this.per = 60;
this.vshowPro = true;
const hbaseFileList = [];
const filesList = [];
if (file.response.status == 0) {
let objImag = {};
objImag.fileName = file.response.data.fileName;
objImag.filePath = file.response.data.downloadPath;
filesList.push(objImag);
this.newName = file.response.data.fileName;
this.newPath = file.response.data.downloadPath;
this.$emit("on-change", JSON.stringify(filesList));
this.per = 100;
setTimeout(() => {
this.per = 0;
this.vshowPro = false;
}, 2000);
} else {
this.$Message.error("上传失败,请重新上传!");
}
},
//上传文件失败
uploadError(response, file, fileList) {
this.$Message.error("上传失败,请重新上传!");
},
//文件大小验证返回
onExceededSize(file, fileList) {
if (Object.keys(file).length == 0) {
this.$Message.error(
"上传文件不能大于" + this.maxSize + "k,请重新上传!"
);
}
},
//文件格式验证
onFormatError(file, fileList) {
if (Object.keys(file).length == 0) {
this.$Message.error("上传文件格式不正确,请重新上传!");
}
},
//删除上传
removeFile(file, fileList) {},
formatL() {
if (this.files) {
this.formatList = [
"pdf",
"docx",
"doc",
"xls",
"xlsx",
"txt",
"png",
"jpg",
"gif",
"zip",
"rar"
];
}
return this.formatList;
},
downFile(path) {
let truePath = path.trim();
if (truePath.length > 2) {
if (
truePath.substring(0, 7).toLowerCase() == "http://" ||
truePath.substring(0, 8).toLowerCase() == "https://"
) {
window.open(truePath, "_blank");
} else {
this.fileUrlPath = this.downUrl + path;
window.open(this.fileUrlPath, "_blank");
}
}
}
},
//删除上传
removeFile(file, fileList) {},
formatL() {
if (this.files) {
this.formatList = [
"pdf",
"docx",
"doc",
"xls",
"xlsx",
"txt",
"png",
"jpg",
"gif",
"zip",
"rar"
];
}
return this.formatList;
mounted() {
this.formatL();
},
downFile(path) {
let truePath = path.trim();
if (truePath.length > 2) {
if (
truePath.substring(0, 7).toLowerCase() == "http://" ||
truePath.substring(0, 8).toLowerCase() == "https://"
) {
window.open(truePath, "_blank");
} else {
this.fileUrlPath = this.downUrl + path;
window.open(this.fileUrlPath, "_blank");
computed: {
nativeInputValue() {
return this.value === null || this.value === undefined ? "" : this.value;
},
view() {
return true
}
}
}
},
mounted() {
this.formatL();
},
computed: {
nativeInputValue() {
return this.value === null || this.value === undefined ? "" : this.value;
},
view(){
return true
}
},
watch: {
value(v) {
this.name = v;
watch: {
value(v) {
this.name = v;
}
}
}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
</style>
......@@ -1740,6 +1740,235 @@
"globby": "^9.2.0",
"webpack": "^4.0.0",
"yorkie": "^2.0.0"
},
"dependencies": {
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz?cache=0&sync_timestamp=1597480760804&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"optional": true,
"requires": {
"co": "^4.6.0",
"fast-deep-equal": "^1.0.0",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.3.0"
}
},
"ajv-keywords": {
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-2.1.1.tgz?cache=0&sync_timestamp=1595906977498&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv-keywords%2Fdownload%2Fajv-keywords-2.1.1.tgz",
"integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
"dev": true,
"optional": true
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz",
"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz?cache=0&sync_timestamp=1590421014780&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"optional": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-2.1.0.tgz",
"integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=",
"dev": true,
"optional": true,
"requires": {
"esutils": "^2.0.2"
}
},
"eslint": {
"version": "4.19.1",
"resolved": "https://registry.npm.taobao.org/eslint/download/eslint-4.19.1.tgz",
"integrity": "sha1-MtHWU+HZBAiFS/spbwdux+GGowA=",
"dev": true,
"optional": true,
"requires": {
"ajv": "^5.3.0",
"babel-code-frame": "^6.22.0",
"chalk": "^2.1.0",
"concat-stream": "^1.6.0",
"cross-spawn": "^5.1.0",
"debug": "^3.1.0",
"doctrine": "^2.1.0",
"eslint-scope": "^3.7.1",
"eslint-visitor-keys": "^1.0.0",
"espree": "^3.5.4",
"esquery": "^1.0.0",
"esutils": "^2.0.2",
"file-entry-cache": "^2.0.0",
"functional-red-black-tree": "^1.0.1",
"glob": "^7.1.2",
"globals": "^11.0.1",
"ignore": "^3.3.3",
"imurmurhash": "^0.1.4",
"inquirer": "^3.0.6",
"is-resolvable": "^1.0.0",
"js-yaml": "^3.9.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.4",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
"optionator": "^0.8.2",
"path-is-inside": "^1.0.2",
"pluralize": "^7.0.0",
"progress": "^2.0.0",
"regexpp": "^1.0.1",
"require-uncached": "^1.0.3",
"semver": "^5.3.0",
"strip-ansi": "^4.0.0",
"strip-json-comments": "~2.0.1",
"table": "4.0.2",
"text-table": "~0.2.0"
}
},
"eslint-scope": {
"version": "3.7.3",
"resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.3.tgz",
"integrity": "sha1-u1ByANPRf2AkdjYWC0gmKEsQhTU=",
"dev": true,
"optional": true,
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
}
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
"dev": true,
"optional": true
},
"file-entry-cache": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-2.0.0.tgz",
"integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=",
"dev": true,
"optional": true,
"requires": {
"flat-cache": "^1.2.1",
"object-assign": "^4.0.1"
}
},
"flat-cache": {
"version": "1.3.4",
"resolved": "https://registry.npm.taobao.org/flat-cache/download/flat-cache-1.3.4.tgz",
"integrity": "sha1-LC73dSXMKSkAff/6HdMUqpyd7m8=",
"dev": true,
"optional": true,
"requires": {
"circular-json": "^0.3.1",
"graceful-fs": "^4.1.2",
"rimraf": "~2.6.2",
"write": "^0.2.1"
}
},
"ignore": {
"version": "3.3.10",
"resolved": "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz",
"integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=",
"dev": true,
"optional": true
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true,
"optional": true
},
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427602316&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz",
"integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=",
"dev": true,
"optional": true,
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"regexpp": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/regexpp/download/regexpp-1.1.0.tgz",
"integrity": "sha1-DjUW3Qt5BPQT0tQZPc5GGMOmias=",
"dev": true,
"optional": true
},
"rimraf": {
"version": "2.6.3",
"resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.6.3.tgz?cache=0&sync_timestamp=1581257110269&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.6.3.tgz",
"integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=",
"dev": true,
"optional": true,
"requires": {
"glob": "^7.1.3"
}
},
"slice-ansi": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-1.0.0.tgz",
"integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=",
"dev": true,
"optional": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0"
}
},
"table": {
"version": "4.0.2",
"resolved": "https://registry.npm.taobao.org/table/download/table-4.0.2.tgz",
"integrity": "sha1-ozRHN1OR52atNNNIbm4q7chNLjY=",
"dev": true,
"optional": true,
"requires": {
"ajv": "^5.2.3",
"ajv-keywords": "^2.1.0",
"chalk": "^2.1.0",
"lodash": "^4.17.4",
"slice-ansi": "1.0.0",
"string-width": "^2.1.1"
}
},
"write": {
"version": "0.2.1",
"resolved": "https://registry.npm.taobao.org/write/download/write-0.2.1.tgz",
"integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
"dev": true,
"optional": true,
"requires": {
"mkdirp": "^0.5.1"
}
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true,
"optional": true
}
}
},
"@vue/cli-plugin-unit-jest": {
......@@ -2291,6 +2520,26 @@
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.1.0"
},
"dependencies": {
"eslint-plugin-node": {
"version": "6.0.1",
"resolved": "https://registry.npm.taobao.org/eslint-plugin-node/download/eslint-plugin-node-6.0.1.tgz",
"integrity": "sha1-vxlkIpgGQ3kxXXpLKnWTc3b6BeQ=",
"dev": true,
"requires": {
"ignore": "^3.3.6",
"minimatch": "^3.0.4",
"resolve": "^1.3.3",
"semver": "^5.4.1"
}
},
"ignore": {
"version": "3.3.10",
"resolved": "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz",
"integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=",
"dev": true
}
}
},
"@vue/preload-webpack-plugin": {
......@@ -2807,16 +3056,11 @@
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
},
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
"optional": true
},
"asn1": {
"version": "0.2.4",
"resolved": "http://r.cnpmjs.org/asn1/download/asn1-0.2.4.tgz",
"integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
"dev": true,
"requires": {
"safer-buffer": "~2.1.0"
}
......@@ -2845,7 +3089,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
},
"assign-symbols": {
"version": "1.0.0",
......@@ -2885,7 +3130,8 @@
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
},
"atob": {
"version": "2.1.2",
......@@ -2926,12 +3172,14 @@
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
"dev": true
},
"aws4": {
"version": "1.9.1",
"resolved": "http://r.cnpmjs.org/aws4/download/aws4-1.9.1.tgz",
"integrity": "sha1-fjPY99RJs/ZzzXLeuavcVS2+Uo4="
"integrity": "sha1-fjPY99RJs/ZzzXLeuavcVS2+Uo4=",
"dev": true
},
"axios": {
"version": "0.19.2",
......@@ -3445,6 +3693,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"dev": true,
"requires": {
"tweetnacl": "^0.14.3"
}
......@@ -4034,7 +4283,8 @@
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true
},
"cfb": {
"version": "1.2.0",
......@@ -4737,6 +4987,7 @@
"version": "1.0.8",
"resolved": "http://r.cnpmjs.org/combined-stream/download/combined-stream-1.0.8.tgz",
"integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=",
"dev": true,
"requires": {
"delayed-stream": "~1.0.0"
}
......@@ -5596,6 +5847,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"dev": true,
"requires": {
"assert-plus": "^1.0.0"
}
......@@ -5821,7 +6073,8 @@
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
"delegate": {
"version": "3.2.0",
......@@ -5923,11 +6176,10 @@
}
},
"doctrine": {
"version": "2.1.0",
"resolved": "http://r.cnpmjs.org/doctrine/download/doctrine-2.1.0.tgz",
"integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=",
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz",
"integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=",
"dev": true,
"optional": true,
"requires": {
"esutils": "^2.0.2"
}
......@@ -6079,6 +6331,7 @@
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"dev": true,
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
......@@ -6247,6 +6500,23 @@
}
}
},
"enquirer": {
"version": "2.3.6",
"resolved": "https://registry.npm.taobao.org/enquirer/download/enquirer-2.3.6.tgz?cache=0&sync_timestamp=1593693238207&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenquirer%2Fdownload%2Fenquirer-2.3.6.tgz",
"integrity": "sha1-Kn/l3WNKHkElqXXsmU/1RW3Dc00=",
"dev": true,
"requires": {
"ansi-colors": "^4.1.1"
},
"dependencies": {
"ansi-colors": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-4.1.1.tgz",
"integrity": "sha1-y7muJWv3UK8eqzRPIpqif+lLo0g=",
"dev": true
}
}
},
"entities": {
"version": "2.0.0",
"resolved": "http://r.cnpmjs.org/entities/download/entities-2.0.0.tgz",
......@@ -6342,138 +6612,305 @@
}
},
"eslint": {
"version": "4.19.1",
"resolved": "http://r.cnpmjs.org/eslint/download/eslint-4.19.1.tgz",
"integrity": "sha1-MtHWU+HZBAiFS/spbwdux+GGowA=",
"version": "7.7.0",
"resolved": "https://registry.npm.taobao.org/eslint/download/eslint-7.7.0.tgz",
"integrity": "sha1-GL66UUEZJ8S2TaCozq3v5AMNYHM=",
"dev": true,
"optional": true,
"requires": {
"ajv": "^5.3.0",
"babel-code-frame": "^6.22.0",
"chalk": "^2.1.0",
"concat-stream": "^1.6.0",
"cross-spawn": "^5.1.0",
"debug": "^3.1.0",
"doctrine": "^2.1.0",
"eslint-scope": "^3.7.1",
"eslint-visitor-keys": "^1.0.0",
"espree": "^3.5.4",
"esquery": "^1.0.0",
"@babel/code-frame": "^7.0.0",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"enquirer": "^2.3.5",
"eslint-scope": "^5.1.0",
"eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^1.3.0",
"espree": "^7.2.0",
"esquery": "^1.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^2.0.0",
"file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
"glob": "^7.1.2",
"globals": "^11.0.1",
"ignore": "^3.3.3",
"glob-parent": "^5.0.0",
"globals": "^12.1.0",
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"inquirer": "^3.0.6",
"is-resolvable": "^1.0.0",
"js-yaml": "^3.9.1",
"is-glob": "^4.0.0",
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.4",
"minimatch": "^3.0.2",
"mkdirp": "^0.5.1",
"levn": "^0.4.1",
"lodash": "^4.17.19",
"minimatch": "^3.0.4",
"natural-compare": "^1.4.0",
"optionator": "^0.8.2",
"path-is-inside": "^1.0.2",
"pluralize": "^7.0.0",
"optionator": "^0.9.1",
"progress": "^2.0.0",
"regexpp": "^1.0.1",
"require-uncached": "^1.0.3",
"semver": "^5.3.0",
"strip-ansi": "^4.0.0",
"strip-json-comments": "~2.0.1",
"table": "4.0.2",
"text-table": "~0.2.0"
"regexpp": "^3.1.0",
"semver": "^7.2.1",
"strip-ansi": "^6.0.0",
"strip-json-comments": "^3.1.0",
"table": "^5.2.3",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"acorn": {
"version": "7.4.0",
"resolved": "https://registry.npm.taobao.org/acorn/download/acorn-7.4.0.tgz?cache=0&sync_timestamp=1597235823632&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-7.4.0.tgz",
"integrity": "sha1-4a1IbmxUUBY0xsOXxcEh2qODYHw=",
"dev": true
},
"acorn-jsx": {
"version": "5.2.0",
"resolved": "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.2.0.tgz",
"integrity": "sha1-TGYGkXPW/daO2FI5/CViJhgrLr4=",
"dev": true
},
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz",
"integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=",
"dev": true
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.2.1.tgz",
"integrity": "sha1-kK51xCTQCNJiTFvynq0xd+v881k=",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz",
"integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz?cache=0&sync_timestamp=1590421014780&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.3.tgz",
"integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=",
"dev": true,
"requires": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
}
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz",
"integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"eslint-scope": {
"version": "5.1.0",
"resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-5.1.0.tgz",
"integrity": "sha1-0Plx3+WcaeDK2mhLI9Sdv4JgDOU=",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
}
},
"eslint-visitor-keys": {
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1597435347526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz",
"integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=",
"dev": true
},
"espree": {
"version": "7.3.0",
"resolved": "https://registry.npm.taobao.org/espree/download/espree-7.3.0.tgz",
"integrity": "sha1-3DBDfPZ5R89XYSHr14DxXurHI0g=",
"dev": true,
"requires": {
"acorn": "^7.4.0",
"acorn-jsx": "^5.2.0",
"eslint-visitor-keys": "^1.3.0"
}
},
"glob-parent": {
"version": "5.1.1",
"resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz",
"integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"globals": {
"version": "12.4.0",
"resolved": "https://registry.npm.taobao.org/globals/download/globals-12.4.0.tgz?cache=0&sync_timestamp=1596711111019&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-12.4.0.tgz",
"integrity": "sha1-oYgTV2pBsAokqX5/gVkYwuGZJfg=",
"dev": true,
"requires": {
"type-fest": "^0.8.1"
}
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true
},
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz",
"integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=",
"dev": true
},
"import-fresh": {
"version": "3.2.1",
"resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.2.1.tgz",
"integrity": "sha1-Yz/2GFBueTr1rJG/SLcmd+FcvmY=",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
}
},
"levn": {
"version": "0.4.1",
"resolved": "https://registry.npm.taobao.org/levn/download/levn-0.4.1.tgz",
"integrity": "sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=",
"dev": true,
"requires": {
"prelude-ls": "^1.2.1",
"type-check": "~0.4.0"
}
},
"lodash": {
"version": "4.17.20",
"resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.20.tgz",
"integrity": "sha1-tEqbYpe8tpjxxRo1RaKzs2jVnFI=",
"dev": true
},
"optionator": {
"version": "0.9.1",
"resolved": "https://registry.npm.taobao.org/optionator/download/optionator-0.9.1.tgz?cache=0&sync_timestamp=1585966141328&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Foptionator%2Fdownload%2Foptionator-0.9.1.tgz",
"integrity": "sha1-TyNqY3Pa4FZqbUPhMmZ09QwpFJk=",
"dev": true,
"requires": {
"deep-is": "^0.1.3",
"fast-levenshtein": "^2.0.6",
"levn": "^0.4.1",
"prelude-ls": "^1.2.1",
"type-check": "^0.4.0",
"word-wrap": "^1.2.3"
}
},
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz?cache=0&sync_timestamp=1574445307008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-3.1.1.tgz",
"integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=",
"dev": true
},
"prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.2.1.tgz",
"integrity": "sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=",
"dev": true
},
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz",
"integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=",
"dev": true
},
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.2.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.2.tgz",
"integrity": "sha1-YElisFK4HtB4aq6EOJ/7pw/9OTg=",
"dev": true
},
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz",
"integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=",
"dev": true,
"optional": true,
"requires": {
"co": "^4.6.0",
"fast-deep-equal": "^1.0.0",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.3.0"
"shebang-regex": "^3.0.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "http://r.cnpmjs.org/chalk/download/chalk-2.4.2.tgz",
"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
"shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz",
"integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=",
"dev": true
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz",
"integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
"ansi-regex": "^5.0.0"
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"strip-json-comments": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-3.1.1.tgz?cache=0&sync_timestamp=1594567580605&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-3.1.1.tgz",
"integrity": "sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=",
"dev": true
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.1.0.tgz",
"integrity": "sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E=",
"dev": true,
"optional": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
"has-flag": "^4.0.0"
}
},
"eslint-scope": {
"version": "3.7.3",
"resolved": "http://r.cnpmjs.org/eslint-scope/download/eslint-scope-3.7.3.tgz",
"integrity": "sha1-u1ByANPRf2AkdjYWC0gmKEsQhTU=",
"type-check": {
"version": "0.4.0",
"resolved": "https://registry.npm.taobao.org/type-check/download/type-check-0.4.0.tgz",
"integrity": "sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=",
"dev": true,
"optional": true,
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
"prelude-ls": "^1.2.1"
}
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
"dev": true,
"optional": true
},
"ignore": {
"version": "3.3.10",
"resolved": "http://r.cnpmjs.org/ignore/download/ignore-3.3.10.tgz",
"integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=",
"dev": true,
"optional": true
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true,
"optional": true
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npm.taobao.org/type-fest/download/type-fest-0.8.1.tgz",
"integrity": "sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=",
"dev": true
},
"lru-cache": {
"version": "4.1.5",
"resolved": "http://r.cnpmjs.org/lru-cache/download/lru-cache-4.1.5.tgz",
"integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=",
"which": {
"version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz",
"integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=",
"dev": true,
"optional": true,
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
"isexe": "^2.0.0"
}
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true,
"optional": true
}
}
},
......@@ -6559,6 +6996,16 @@
}
}
},
"eslint-plugin-es": {
"version": "3.0.1",
"resolved": "https://registry.npm.taobao.org/eslint-plugin-es/download/eslint-plugin-es-3.0.1.tgz",
"integrity": "sha1-dafN/czdwFiZNK7rOEF18iHFeJM=",
"dev": true,
"requires": {
"eslint-utils": "^2.0.0",
"regexpp": "^3.0.0"
}
},
"eslint-plugin-import": {
"version": "2.20.2",
"resolved": "http://r.cnpmjs.org/eslint-plugin-import/download/eslint-plugin-import-2.20.2.tgz",
......@@ -6670,21 +7117,23 @@
}
},
"eslint-plugin-node": {
"version": "6.0.1",
"resolved": "http://r.cnpmjs.org/eslint-plugin-node/download/eslint-plugin-node-6.0.1.tgz",
"integrity": "sha1-vxlkIpgGQ3kxXXpLKnWTc3b6BeQ=",
"version": "11.1.0",
"resolved": "https://registry.npm.taobao.org/eslint-plugin-node/download/eslint-plugin-node-11.1.0.tgz",
"integrity": "sha1-yVVEQW7kraJnQKMEdO78VALcZx0=",
"dev": true,
"requires": {
"ignore": "^3.3.6",
"eslint-plugin-es": "^3.0.0",
"eslint-utils": "^2.0.0",
"ignore": "^5.1.1",
"minimatch": "^3.0.4",
"resolve": "^1.3.3",
"semver": "^5.4.1"
"resolve": "^1.10.1",
"semver": "^6.1.0"
},
"dependencies": {
"ignore": {
"version": "3.3.10",
"resolved": "http://r.cnpmjs.org/ignore/download/ignore-3.3.10.tgz",
"integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=",
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
}
......@@ -6720,6 +7169,15 @@
"estraverse": "^4.1.1"
}
},
"eslint-utils": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1592222134559&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz",
"integrity": "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
},
"eslint-visitor-keys": {
"version": "1.1.0",
"resolved": "http://r.cnpmjs.org/eslint-visitor-keys/download/eslint-visitor-keys-1.1.0.tgz",
......@@ -6761,7 +7219,6 @@
"resolved": "http://r.cnpmjs.org/esquery/download/esquery-1.3.1.tgz",
"integrity": "sha1-t4tYKKqOIU4p+3TE1bdS4cAz2lc=",
"dev": true,
"optional": true,
"requires": {
"estraverse": "^5.1.0"
},
......@@ -6770,8 +7227,7 @@
"version": "5.1.0",
"resolved": "http://r.cnpmjs.org/estraverse/download/estraverse-5.1.0.tgz",
"integrity": "sha1-N0MJ05/ZNa5QDnuS6Ka0xyDllkI=",
"dev": true,
"optional": true
"dev": true
}
}
},
......@@ -7225,7 +7681,8 @@
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true
},
"fast-deep-equal": {
"version": "3.1.1",
......@@ -7300,14 +7757,12 @@
}
},
"file-entry-cache": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz",
"integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=",
"version": "5.0.1",
"resolved": "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-5.0.1.tgz",
"integrity": "sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w=",
"dev": true,
"optional": true,
"requires": {
"flat-cache": "^1.2.1",
"object-assign": "^4.0.1"
"flat-cache": "^2.0.1"
}
},
"file-loader": {
......@@ -7444,16 +7899,14 @@
}
},
"flat-cache": {
"version": "1.3.4",
"resolved": "http://r.cnpmjs.org/flat-cache/download/flat-cache-1.3.4.tgz",
"integrity": "sha1-LC73dSXMKSkAff/6HdMUqpyd7m8=",
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/flat-cache/download/flat-cache-2.0.1.tgz",
"integrity": "sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA=",
"dev": true,
"optional": true,
"requires": {
"circular-json": "^0.3.1",
"graceful-fs": "^4.1.2",
"rimraf": "~2.6.2",
"write": "^0.2.1"
"flatted": "^2.0.0",
"rimraf": "2.6.3",
"write": "1.0.3"
},
"dependencies": {
"rimraf": {
......@@ -7461,13 +7914,18 @@
"resolved": "http://r.cnpmjs.org/rimraf/download/rimraf-2.6.3.tgz",
"integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=",
"dev": true,
"optional": true,
"requires": {
"glob": "^7.1.3"
}
}
}
},
"flatted": {
"version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/flatted/download/flatted-2.0.2.tgz?cache=0&sync_timestamp=1593951653660&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fflatted%2Fdownload%2Fflatted-2.0.2.tgz",
"integrity": "sha1-RXWyHivO50NKqb5mL0t7X5wrUTg=",
"dev": true
},
"flatten": {
"version": "1.0.3",
"resolved": "http://r.cnpmjs.org/flatten/download/flatten-1.0.3.tgz",
......@@ -7536,12 +7994,14 @@
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true
},
"form-data": {
"version": "2.3.3",
"resolved": "http://r.cnpmjs.org/form-data/download/form-data-2.3.3.tgz",
"integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=",
"dev": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
......@@ -8165,8 +8625,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true,
"optional": true
"dev": true
},
"gantt-elastic": {
"version": "1.0.11",
......@@ -8222,6 +8681,7 @@
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"dev": true,
"requires": {
"assert-plus": "^1.0.0"
}
......@@ -8397,12 +8857,14 @@
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"dev": true
},
"har-validator": {
"version": "5.1.3",
"resolved": "http://r.cnpmjs.org/har-validator/download/har-validator-5.1.3.tgz",
"integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=",
"dev": true,
"requires": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
......@@ -8798,6 +9260,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
......@@ -8854,7 +9317,8 @@
"image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w="
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"dev": true
},
"import-cwd": {
"version": "2.1.0",
......@@ -9414,7 +9878,8 @@
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
"is-utf8": {
"version": "0.2.1",
......@@ -9456,7 +9921,8 @@
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true
},
"istanbul-api": {
"version": "1.3.7",
......@@ -9560,8 +10026,9 @@
},
"iview-loader": {
"version": "1.3.0",
"resolved": "http://r.cnpmjs.org/iview-loader/download/iview-loader-1.3.0.tgz",
"resolved": "https://registry.npm.taobao.org/iview-loader/download/iview-loader-1.3.0.tgz",
"integrity": "sha1-n0Yu6uI4K4tJ746JLNloFJfjVLc=",
"dev": true,
"requires": {
"loader-utils": "^1.1.0"
}
......@@ -11077,7 +11544,8 @@
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true
},
"jsdom": {
"version": "11.12.0",
......@@ -11143,7 +11611,8 @@
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"dev": true
},
"json-schema-traverse": {
"version": "0.4.1",
......@@ -11154,13 +11623,13 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
"dev": true,
"optional": true
"dev": true
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true
},
"json3": {
"version": "3.3.3",
......@@ -11188,6 +11657,7 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"dev": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
......@@ -11266,34 +11736,35 @@
"dev": true
},
"less": {
"version": "3.11.1",
"resolved": "http://r.cnpmjs.org/less/download/less-3.11.1.tgz",
"integrity": "sha1-xr8I454CQE/mswej3/+v3FW9NuI=",
"version": "3.12.2",
"resolved": "https://registry.npm.taobao.org/less/download/less-3.12.2.tgz?cache=0&sync_timestamp=1594915715159&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless%2Fdownload%2Fless-3.12.2.tgz",
"integrity": "sha1-FX5t0ypohp34hZMUrTjnAhGvOrQ=",
"dev": true,
"requires": {
"clone": "^2.1.2",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"mkdirp": "^0.5.0",
"promise": "^7.1.1",
"request": "^2.83.0",
"native-request": "^1.0.5",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
},
"dependencies": {
"source-map": {
"version": "0.6.1",
"resolved": "http://r.cnpmjs.org/source-map/download/source-map-0.6.1.tgz",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
"dev": true,
"optional": true
}
}
},
"less-loader": {
"version": "5.0.0",
"resolved": "http://r.cnpmjs.org/less-loader/download/less-loader-5.0.0.tgz",
"resolved": "https://registry.npm.taobao.org/less-loader/download/less-loader-5.0.0.tgz?cache=0&sync_timestamp=1598354442231&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless-loader%2Fdownload%2Fless-loader-5.0.0.tgz",
"integrity": "sha1-SY3eOmxsT4h0WO6e0/CGoSrRtGY=",
"dev": true,
"requires": {
"clone": "^2.1.1",
"loader-utils": "^1.1.0",
......@@ -12399,6 +12870,13 @@
"to-regex": "^3.0.1"
}
},
"native-request": {
"version": "1.0.7",
"resolved": "https://registry.npm.taobao.org/native-request/download/native-request-1.0.7.tgz?cache=0&sync_timestamp=1594999954089&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnative-request%2Fdownload%2Fnative-request-1.0.7.tgz",
"integrity": "sha1-/3QtxVW0yPLxwUtUhjm6F05XOFY=",
"dev": true,
"optional": true
},
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
......@@ -12738,7 +13216,8 @@
"oauth-sign": {
"version": "0.9.0",
"resolved": "http://r.cnpmjs.org/oauth-sign/download/oauth-sign-0.9.0.tgz",
"integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU="
"integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=",
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -13195,6 +13674,23 @@
"resolved": "http://r.cnpmjs.org/parchment/download/parchment-1.1.4.tgz",
"integrity": "sha1-rt7Xq5OP6SHUw0vDOc4RaLwv/eU="
},
"parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz",
"integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=",
"dev": true,
"requires": {
"callsites": "^3.0.0"
},
"dependencies": {
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz",
"integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=",
"dev": true
}
}
},
"parse-asn1": {
"version": "5.1.5",
"resolved": "http://r.cnpmjs.org/parse-asn1/download/parse-asn1-5.1.5.tgz",
......@@ -13352,7 +13848,8 @@
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
},
"picomatch": {
"version": "2.2.2",
......@@ -14612,17 +15109,7 @@
"version": "2.0.3",
"resolved": "http://r.cnpmjs.org/progress/download/progress-2.0.3.tgz",
"integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=",
"dev": true,
"optional": true
},
"promise": {
"version": "7.3.1",
"resolved": "http://r.cnpmjs.org/promise/download/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"optional": true,
"requires": {
"asap": "~2.0.3"
}
"dev": true
},
"promise-inflight": {
"version": "1.0.1",
......@@ -14677,7 +15164,8 @@
"psl": {
"version": "1.8.0",
"resolved": "http://r.cnpmjs.org/psl/download/psl-1.8.0.tgz",
"integrity": "sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ="
"integrity": "sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ=",
"dev": true
},
"public-encrypt": {
"version": "4.0.3",
......@@ -19608,11 +20096,10 @@
}
},
"regexpp": {
"version": "1.1.0",
"resolved": "http://r.cnpmjs.org/regexpp/download/regexpp-1.1.0.tgz",
"integrity": "sha1-DjUW3Qt5BPQT0tQZPc5GGMOmias=",
"dev": true,
"optional": true
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/regexpp/download/regexpp-3.1.0.tgz",
"integrity": "sha1-IG0K0KVkjP+9uK5GQ489xRyfeOI=",
"dev": true
},
"regexpu-core": {
"version": "4.7.0",
......@@ -19732,6 +20219,7 @@
"version": "2.88.2",
"resolved": "http://r.cnpmjs.org/request/download/request-2.88.2.tgz",
"integrity": "sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM=",
"dev": true,
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
......@@ -19758,7 +20246,8 @@
"qs": {
"version": "6.5.2",
"resolved": "http://r.cnpmjs.org/qs/download/qs-6.5.2.tgz",
"integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
"integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=",
"dev": true
}
}
},
......@@ -20332,12 +20821,13 @@
"dev": true
},
"slice-ansi": {
"version": "1.0.0",
"resolved": "http://r.cnpmjs.org/slice-ansi/download/slice-ansi-1.0.0.tgz",
"integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=",
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-2.1.0.tgz",
"integrity": "sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^3.2.0",
"astral-regex": "^1.0.0",
"is-fullwidth-code-point": "^2.0.0"
}
},
......@@ -20648,6 +21138,7 @@
"version": "1.16.1",
"resolved": "http://r.cnpmjs.org/sshpk/download/sshpk-1.16.1.tgz",
"integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=",
"dev": true,
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
......@@ -21292,65 +21783,48 @@
"dev": true
},
"table": {
"version": "4.0.2",
"resolved": "http://r.cnpmjs.org/table/download/table-4.0.2.tgz",
"integrity": "sha1-ozRHN1OR52atNNNIbm4q7chNLjY=",
"version": "5.4.6",
"resolved": "https://registry.npm.taobao.org/table/download/table-5.4.6.tgz",
"integrity": "sha1-EpLRlQDOP4YFOwXw6Ofko7shB54=",
"dev": true,
"optional": true,
"requires": {
"ajv": "^5.2.3",
"ajv-keywords": "^2.1.0",
"chalk": "^2.1.0",
"lodash": "^4.17.4",
"slice-ansi": "1.0.0",
"string-width": "^2.1.1"
"ajv": "^6.10.2",
"lodash": "^4.17.14",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
},
"dependencies": {
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"optional": true,
"requires": {
"co": "^4.6.0",
"fast-deep-equal": "^1.0.0",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.3.0"
}
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz",
"integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=",
"dev": true
},
"ajv-keywords": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz",
"integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
"dev": true,
"optional": true
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz",
"integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=",
"dev": true
},
"chalk": {
"version": "2.4.2",
"resolved": "http://r.cnpmjs.org/chalk/download/chalk-2.4.2.tgz",
"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz",
"integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
"dev": true,
"optional": true
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz",
"integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=",
"dev": true,
"optional": true
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
......@@ -21803,6 +22277,7 @@
"version": "2.5.0",
"resolved": "http://r.cnpmjs.org/tough-cookie/download/tough-cookie-2.5.0.tgz",
"integrity": "sha1-zZ+yoKodWhK0c72fuW+j3P9lreI=",
"dev": true,
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
......@@ -21868,6 +22343,7 @@
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"dev": true,
"requires": {
"safe-buffer": "^5.0.1"
}
......@@ -21875,7 +22351,8 @@
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true
},
"type-check": {
"version": "0.3.2",
......@@ -22195,6 +22672,12 @@
"viewerjs": "^1.5.0"
}
},
"v8-compile-cache": {
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.1.1.tgz",
"integrity": "sha1-VLw83UMxe8qR413K8wWxpyN950U=",
"dev": true
},
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "http://r.cnpmjs.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz",
......@@ -22219,6 +22702,7 @@
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"dev": true,
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
......@@ -23385,11 +23869,10 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
"integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
"version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/write/download/write-1.0.3.tgz",
"integrity": "sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM=",
"dev": true,
"optional": true,
"requires": {
"mkdirp": "^0.5.1"
}
......
......@@ -25,11 +25,8 @@
"gantt-elastic": "^1.0.11",
"gantt-elastic-header": "^0.1.11",
"gojs": "^2.1.19",
"iview-loader": "^1.3.0",
"iview-pro": "file:./iview-pro",
"js-cookie": "^2.2.1",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"lodash": "^4.17.15",
"lodash.chunk": "^4.2.0",
"lowdb": "^1.0.0",
......@@ -69,9 +66,11 @@
"@vue/test-utils": "^1.0.0-beta.28",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.0.1",
"eslint": "^7.7.0",
"eslint-plugin-node": "^11.1.0",
"iview-loader": "^1.3.0",
"less": "^2.7.3",
"less-loader": "^4.1.0",
"less": "^3.12.2",
"less-loader": "^5.0.0",
"lint-staged": "^7.2.0",
"script-loader": "^0.7.2",
"svg-sprite-loader": "^3.8.0",
......
......@@ -5,7 +5,7 @@
<TablePaste hide-table :input-props="inputProps" @on-success="handleSuccess" @on-error="handleError" />
</TabPane>
<TabPane label="预览">
<Table border="true" :columns="columnsImport" :data="excelData" :height="tableHeight" ref="tableExcel" class="tableCommon"></Table>
<Table :border="true" :columns="columnsImport" :data="excelData" :height="tableHeight" ref="tableExcel" class="tableCommon"></Table>
</TabPane>
</Tabs>
......@@ -27,6 +27,8 @@ export default {
rows: 10,
placeholder: "请从Excel复制一段表格数据,粘贴在这里",
},
columnsImport: [],
excelData: []
};
},
......@@ -51,14 +53,6 @@ export default {
};
},
methods: {
load(v) {
Api.get({
id: v,
}).then((r) => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
......@@ -77,10 +71,44 @@ export default {
}
}
},
l(key) {
key = "import_center" + "." + key;
return this.$t(key);
//粘贴excel成功
handleSuccess(tableData) {
//初始化数据
this.excelData = [];
this.columnsImport = [];
//处理colum和data
let tabColum = tableData.columns
let tabData = tableData.data
let arrData = []
tabData.forEach(ele => {
let objData = {}
tabColum.forEach(el => {
objData[el.title] = ele[el.key]
})
arrData.push(objData)
})
//处理title和key一致
tabColum.forEach(el => {
el.key = el.title
})
this.columnsImport = tabColum;
this.columnsImport.unshift({
type: 'index',
width: 80,
align: 'right',
title: '序号'
})
this.excelData = arrData;
this.$emit("on-datalength", this.excelData.length)
},
//粘贴excel失败
handleError(tableData, errorIndex) {
//console.log(tableData, errorIndex);
this.$Message.error("表格数据有误");
},
//粘贴excel相关end
},
watch: {
eid(v) {
......
<template>
<div class="table-content">
<TablePaste hide-table :input-props="inputProps" @on-success="handleSuccess" @on-error="handleError" v-show="showTablePaste" />
<div class="table-tools">
<div class="table-search">
<Form inline>
......@@ -10,11 +9,13 @@
<FormItem>
<dictionary code="import.im.page" style="width:160px" @on-change="pageChange" v-model="pageType"></dictionary>
</FormItem>
<!--
<FormItem>
<div class="tip mr20">{{excelData.length}}条数据</div>
<div class="tip mr20">{{listLength}}条数据</div>
</FormItem>
-->
<FormItem>
<Button type="primary" @click="openInfoModal">导入</Button>
<Button type="primary" @click="openInfoModal" :disabled="btnIm">导入</Button>
</FormItem>
<FormItem>
<div style="height:34px;overflow: hidden;padding:0">
......@@ -25,51 +26,58 @@
</FormItem>
</Form>
</div>
<div class="btns">
<Form inline>
<FormItem>
<a @click="downFile">
<Icon type="md-download" />{{entity.file}}
</a>
<Tooltip content="下载文件">
<a @click="downFile" tooltip="1111">
<Icon type="md-download" />{{entity.file}}
</a>
</Tooltip>
</FormItem>
<FormItem>
<a class="ml10 mr10" @click="resetTable">
<Icon type="md-eye" />预览
</a>
</FormItem>
<FormItem v-if="show">
<Button @click="openPaste" :type="btnType" :ghost="ghostStatus">{{btnTxt}}</Button>
<Tooltip content="预览文件">
<a class="ml10 mr10" @click="resetTable">
<Icon type="md-eye" />预览
</a>
</Tooltip>
</FormItem>
<FormItem>
<RadioGroup value="0" type="button" @on-change="changeExcel">
<Radio label="0">
<Icon type="md-list" />列表
</Radio>
<Radio label="1">
<Icon type="md-clipboard" />Excel
</Radio>
<RadioGroup v-model="excelType" type="button" @on-change="changeExcel" size="small">
<Tooltip content="文件数据">
<Radio label="0">
<Icon type="ios-list-box-outline" />
</Radio>
</Tooltip>
<Tooltip content="粘贴Excel数据">
<Radio label="1">
<Icon type="ios-copy" />
</Radio>
</Tooltip>
</RadioGroup>
</FormItem>
</Form>
</div>
</div>
<div class="table-main" ref="main">
<Table border="true" :columns="columnsImport" :data="excelData" :height="tdHeightExcel" ref="table" class="tableCommon" v-if="tableImport"></Table>
<component :is="detailExcel" />
<Table :border="true" :columns="columnsImport" :data="excelData" :height="tdHeightExcel" :no-data-text="noDataText" ref="table" class="tableCommon" v-if="tableImport"></Table>
<component :is="detailExcel" ref="comExcel" @on-datalength="datalength" />
</div>
<FooterToolbar v-if="sheetNames.length>1&&tableImport">
<Form inline>
<FormItem>
<Tabs :animated="false" :value="0" @on-click="sheetClick">
<TabPane :label="item" v-for="(item,index) in sheetNames"></TabPane>
<TabPane :label="item" v-for="(item,index) in sheetNames" :key="index"></TabPane>
</Tabs>
</FormItem>
</Form>
</FooterToolbar>
<Modal v-model="infoModal" title="提示信息" @on-ok="importOk">
<p>确定批量导入数据到<span class="red f16 fwBold ml10 mr10">用户管理</span>模块下?</p>
<Modal v-model="infoModal" :title="titleInfo" fullscreen>
<DataGrid :tool="false" :page="false" :columns="colsIm" :data="dataIm" :height="tdHeightExcel+30" ref="dataImport"></DataGrid>
<div slot="footer">
<Button @click="infoModal=false">关闭</Button>
<Button type="primary" @click="importOk" v-show="imBtn">确定导入</Button>
</div>
</Modal>
</div>
</template>
......@@ -334,15 +342,15 @@ export default {
workBook: {},
openDatas: [],
dataType: 0,
//粘贴excel内容start
btnType: "default",
ghostStatus: false,
btnTxt: "打开粘贴Excel",
showTablePaste: false,
inputProps: {
rows: 10,
placeholder: "请从Excel复制一段表格数据,粘贴在这里",
},
//new
colsIm: [],
dataIm: [],
excelType: '0',
btnIm: true,
listLength: 0,
titleInfo: '',
noDataText: '暂无数据',
imBtn: true,
};
},
props: {
......@@ -365,11 +373,7 @@ export default {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
if (this.showTablePaste) {
this.tdHeightExcel = window.screenHeight - 180 - 220;
} else {
this.tdHeightExcel = window.screenHeight - 180;
}
this.tdHeightExcel = window.screenHeight - 180;
})();
};
......@@ -385,6 +389,7 @@ export default {
this.sheetNames = [];
this.excelData = [];
this.excelDataBack = [];
Api.openExcel({
id: v,
}).then((res) => {
......@@ -398,15 +403,26 @@ export default {
});
}
}
});
}).catch(e => {
//this.$Message.error("数据解析失败,请下载原文件后转为Excel重新进行上传!")
this.noDataText = "文件无法解析,建议下载原文件后转换为Excel文件格式重新上传!"
})
},
//加载原文件列表
dealOpenTable(val) {
this.excelData = this.openDatas[val].dataTable;
this.excelDataBack = this.openDatas[val].dataTable;
this.listLength = this.excelData.length
var tempCos = Object.keys(this.openDatas[val].dataTable[0]); //获取列表标题
this.columnsImport = [];
var headersNow = [];
headersNow.push({
type: 'index',
width: 80,
align: 'right',
title: '序号'
})
tempCos.forEach((el) => {
let headObj = {};
headObj.title = el;
......@@ -418,16 +434,29 @@ export default {
//重新处理colum
loadColum(columns) {
let tempCol = this.$u.clone(columns);
tempCol.unshift({
type: 'index',
width: 80,
align: 'right',
title: '序号'
})
tempCol.forEach((ele, index) => {
if (ele.key == "action") {
ele.hide = true;
}
});
this.columnsImport = tempCol;
this.colsIm = tempCol;
//处理原始数据和表头进行对应
let temCol = this.$u.clone(this.columnsImport); //原始数据表头
let temCol = this.$u.clone(this.colsIm); //原始数据表头
let temColPage = this.$u.clone(columns); //需要显示的页面的表头
let temData = this.$u.clone(this.excelDataBack); //原始数据
//let temData = this.$u.clone(this.excelDataBack); //原始数据
let temData = []; //原始数据
if (this.excelType == "0") {
temData = this.$u.clone(this.excelDataBack)
} else {
temData = this.$u.clone(this.$refs.comExcel.excelData)
}
let arrTitleUse = []; ////使用数据字典的字段
temColPage.forEach((elCode) => {
if (elCode.code) {
......@@ -482,7 +511,7 @@ export default {
}
});
})
this.excelData = useData;
this.dataIm = useData;
},
//下载原excel文件
downFile() {
......@@ -503,10 +532,6 @@ export default {
//打开传时初始化
resetParms() {
this.pageType = undefined;
this.btnTxt = "打开粘贴Excel";
this.showTablePaste = false;
this.btnType = "default";
this.ghostStatus = false;
this.tdHeightExcel = window.innerHeight - 180;
},
async beforeUpload(file) {
......@@ -537,6 +562,12 @@ export default {
var lines = csv.split("\n"); //第一行标题
var headers = lines[0].split(",");
var headersNow = [];
headersNow.push({
type: 'index',
width: 80,
align: 'right',
title: '序号'
})
headers.forEach((elHead) => {
let headObj = {};
headObj.title = elHead;
......@@ -544,7 +575,6 @@ export default {
headersNow.push(headObj);
});
this.columnsImport = headersNow;
var result = [];
for (var i = 1; i < lines.length - 1; i++) {
var obj = {};
......@@ -556,6 +586,7 @@ export default {
}
this.excelData = result;
this.excelDataBack = result;
this.changeExcel(0)
},
//切换sheet表重新加载
sheetClick(val) {
......@@ -571,23 +602,13 @@ export default {
},
//选择导入的模块 0:用户管理
pageChange(val) {
switch (val) {
case 0:
//this.loadColum(this.columns0);
break;
case 1:
//this.loadColum(this.columns1);
break;
case undefined:
if (this.dataType == 0) {
this.load(this.eid);
} else {
this.dealSheet(this.tabVal);
}
break;
default:
//this.loadColum(this.columns1);
this.btnIm = false
if (val == undefined) {
this.btnIm = true
} else {
this.btnIm = false
}
},
handleClose() {
this.$emit("on-close");
......@@ -608,69 +629,37 @@ export default {
})
this.$emit("on-close");
},
//粘贴excel相关start
openPaste() {
if (this.btnTxt == "打开粘贴Excel") {
this.btnType = "primary";
this.ghostStatus = true;
this.showTablePaste = true;
this.btnTxt = "关闭粘贴Excel";
this.tdHeightExcel = window.innerHeight - 180 - 220;
} else {
this.btnType = "default";
this.ghostStatus = false;
this.showTablePaste = false;
this.btnTxt = "打开粘贴Excel";
this.tdHeightExcel = window.innerHeight - 180;
}
},
//粘贴excel成功
handleSuccess(tableData) {
//初始化数据
this.excelData = [];
this.excelDataBack = [];
this.columnsImport = [];
this.sheetNames = [];
this.pageType = undefined;
//处理colum和data
let tabColum = tableData.columns
let tabData = tableData.data
let arrData = []
tabData.forEach(ele => {
let objData = {}
tabColum.forEach(el => {
objData[el.title] = ele[el.key]
})
arrData.push(objData)
})
//处理title和key一致
tabColum.forEach(el => {
el.key = el.title
})
this.columnsImport = tabColum;
this.excelData = arrData;
this.excelDataBack = arrData;
},
//粘贴excel失败
handleError(tableData, errorIndex) {
//console.log(tableData, errorIndex);
this.$Message.error("表格数据有误");
},
//粘贴excel相关end
//重新加载excel
resetTable() {
this.pageType = undefined;
this.btnTxt = "打开粘贴Excel";
this.showTablePaste = false;
this.btnType = "default";
this.ghostStatus = false;
this.load(this.eid);
this.tdHeightExcel = window.innerHeight - 180;
if (this.excelType == 1) {
this.changeExcel(0)
}
},
//打开导入数据格式化后的窗口
openInfoModal() {
if (this.excelData.length > 0 && this.pageType != undefined) {
this.imBtn = true;
switch (this.pageType) {
case 0:
this.loadColum(this.columns0);
break;
case 1:
this.loadColum(this.columns1);
break;
default:
this.loadColum(this.columns0);
}
this.titleInfo = "批量导入到 【" + this.$u.dirName(
this.$store.getters.dictionaryByKey("import.im.page"),
this.pageType
) + "】 模块"
this.infoModal = true
} else {
this.imBtn = true;
if (this.excelData.length == 0) {
this.$Message.error("表【" + this.sheetNames[this.tabVal] + "】没有可导入的数据!")
} else if (this.pageType == undefined) {
......@@ -685,15 +674,15 @@ export default {
this.importUser();
break;
case 1:
this.loadColum(this.columns1);
//this.loadColum(this.columns1);
break;
default:
this.loadColum(this.columns1);
//this.loadColum(this.columns1);
}
},
//批量导入用户
importUser() {
let tempData = this.$u.clone(this.excelData);
let tempData = this.$u.clone(this.dataIm);
let tempList = [];
tempData.forEach((ele) => {
let obj = {
......@@ -711,30 +700,47 @@ export default {
titleId: ele.titleId,
departmentTitle: ele.departmentTitle,
};
tempList.push(obj);
});
let parms = {
list: tempList,
};
Api.importUser(parms).then((res) => {
if (res.success) {
this.$Message.success("批量导入用户管理成功!");
this.cancelExcel();
} else {
this.$Message.error("批量导入用户管理失败!");
if (ele.userName && ele.userName != '' && ele.cardNo && ele.cardNo != '' && ele.departmentId && ele.departmentId != '' && ele.phone && ele.phone != '') {
tempList.push(obj);
}
});
if (tempList.length == 0) {
this.$Message.error("所有导入的数据均不合法!");
} else {
let parms = {
list: tempList,
};
Api.importUser(parms).then((res) => {
if (res.success) {
this.$Message.success("成功批量导入用户管理成功模块 " + tempList.length + " 条数据");
this.imBtn = false;
this.cancelExcel();
} else {
this.$Message.error("批量导入用户管理失败!");
}
});
}
},
//切换列表和excel按钮
changeExcel(val) {
if (val == 1) {
this.tableImport = false
this.detailExcel = () => import("./detailExcel");
this.pageType = undefined
this.excelType = '1';
} else {
this.detailExcel = null;
this.tableImport = true
this.tableImport = true;
this.pageType = undefined
this.excelType = '0';
this.listLength = this.excelData.length;
}
},
datalength(val) {
this.listLength = val
},
l(key) {
key = "user" + "." + key;
......
......@@ -43,7 +43,7 @@
<Form inline>
<FormItem>
<Tabs :animated="false" :value="0" @on-click="sheetClick">
<TabPane :label="item" v-for="(item,index) in sheetNames"></TabPane>
<TabPane :label="item" v-for="(item,index) in sheetNames" :key="index"></TabPane>
</Tabs>
</FormItem>
</Form>
......
+ eslint@7.7.0
added 51 packages from 29 contributors, removed 3 packages, updated 12 packages and moved 7 packages in 48.231s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment