Compare commits
26 Commits
main
...
b302b3af2b
| Author | SHA1 | Date | |
|---|---|---|---|
| b302b3af2b | |||
| 38b57adb5e | |||
| 776de99441 | |||
| 8524d2112e | |||
| fd35dc532b | |||
| cc5d380551 | |||
| 6f8a3e72a5 | |||
| f2ee833412 | |||
| ab003714bf | |||
| 4bd5797772 | |||
| 927e2ebc4c | |||
| b020976ace | |||
| 3d9a5f399e | |||
| 186bfcdcd7 | |||
| bbf953f47a | |||
| 473aa04ea4 | |||
| 2698e2c2cf | |||
| f8d73b1ddb | |||
| af5894dd5a | |||
| 716b383a87 | |||
| aeaf68307f | |||
| 2d7470c133 | |||
| e0f8d6c574 | |||
| 2694a0c905 | |||
| a66092dea0 | |||
| 5ccdeaff58 |
@@ -2,7 +2,7 @@ ENV = 'dev'
|
|||||||
|
|
||||||
VITE_APP_API_BASEURL =https://dev.ow.f2b211.com/admapi/v1
|
VITE_APP_API_BASEURL =https://dev.ow.f2b211.com/admapi/v1
|
||||||
#前端回显图片之类的地址
|
#前端回显图片之类的地址
|
||||||
VITE_APP_API_BASE_UPLOAD_URL =https://dev.ow.f2b211.com/
|
VITE_APP_API_BASE_UPLOAD_URL =https://dev.ow.f2b211.com
|
||||||
# 本地环境
|
# 本地环境
|
||||||
VITE_USER_NODE_ENV = development
|
VITE_USER_NODE_ENV = development
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
VITE_APP_API_BASEURL = https://opsscmapi.f2b211.com/api/ #请求地址
|
VITE_APP_API_BASEURL =https://ow.f2b211.com/admapi/v1
|
||||||
|
#前端回显图片之类的地址
|
||||||
|
|
||||||
# 线上环境
|
# 线上环境
|
||||||
VITE_USER_NODE_ENV = production
|
VITE_USER_NODE_ENV = production
|
||||||
#前端回显图片之类的地址
|
#前端回显图片之类的地址
|
||||||
VITE_APP_API_BASE_UPLOAD_URL =https://dev.ow.f2b211.com/
|
VITE_APP_API_BASE_UPLOAD_URL =https://ow.f2b211.com/
|
||||||
|
|
||||||
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔
|
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔
|
||||||
# Optional: gzip | brotli | none
|
# Optional: gzip | brotli | none
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# node 版本
|
# node 版本
|
||||||
|
|
||||||
16.12.0
|
16.12.0 -16.18.0
|
||||||
|
|
||||||
# nrm 安装(镜像源管理)
|
# nrm 安装(镜像源管理)
|
||||||
|
|
||||||
|
|||||||
47
index.html
47
index.html
@@ -103,51 +103,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
<script>
|
<script></script>
|
||||||
// let gwUser = JSON.parse(localStorage.getItem("gw-user"));
|
|
||||||
|
|
||||||
// if (gwUser) {
|
|
||||||
// const { phpToken, refreshToken } = gwUser;
|
|
||||||
// function offline() {
|
|
||||||
// const pathurl = localStorage.getItem("baseUrl") + `uc/offline`;
|
|
||||||
// fetch(pathurl, {
|
|
||||||
// method: "POST",
|
|
||||||
// credentials: "include",
|
|
||||||
// keepalive: true,
|
|
||||||
// headers: {
|
|
||||||
// Authorization: phpToken,
|
|
||||||
// "Refresh-Authorization": refreshToken
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// window.onbeforeunload = function (e) {
|
|
||||||
// offline();
|
|
||||||
// };
|
|
||||||
// var ua = window.navigator.userAgent.toLowerCase();
|
|
||||||
// var rkn =
|
|
||||||
// /\b(opera|chrome|webkit|safari|msie|firefox|gecko|qqbrowser|edg)\b(\s*(version|rv:|\/)*(\d+(\.\d+)*))?/g;
|
|
||||||
// window.addEventListener("mouseover", function () {
|
|
||||||
// window.removeEventListener("beforeunload", offline, true);
|
|
||||||
// ua.replace(rkn, function (match, type, all, rv, version) {
|
|
||||||
// if (type == "chrome" && parseInt(version) <= 86) {
|
|
||||||
// window.removeEventListener("unload", offline, true);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
// window.addEventListener("mouseout", function () {
|
|
||||||
// window.addEventListener("beforeunload", offline, true);
|
|
||||||
// ua.replace(rkn, function (match, type, all, rv, version) {
|
|
||||||
// if (type == "qqbrowser" || type == "edg" || (type == "chrome" && parseInt(version) <= 86)) {
|
|
||||||
// window.addEventListener("unload", offline, true);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// if (window.location.pathnam !== "/login") {
|
|
||||||
// window.removeEventListener("beforeunload", offline);
|
|
||||||
// window.removeEventListener("unload", offline);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
589
package-lock.json
generated
589
package-lock.json
generated
@@ -10,6 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.1.0",
|
"@element-plus/icons-vue": "^2.1.0",
|
||||||
"@types/decimal.js": "^7.4.0",
|
"@types/decimal.js": "^7.4.0",
|
||||||
|
"@vueup/vue-quill": "^1.2.0",
|
||||||
"@vueuse/core": "^10.1.2",
|
"@vueuse/core": "^10.1.2",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
@@ -27,12 +28,14 @@
|
|||||||
"jsbarcode": "^3.11.6",
|
"jsbarcode": "^3.11.6",
|
||||||
"jsonpack": "^1.1.5",
|
"jsonpack": "^1.1.5",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
"mavon-editor": "^3.0.2",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.1.3",
|
"pinia": "^2.1.3",
|
||||||
"pinia-plugin-persistedstate": "^3.1.0",
|
"pinia-plugin-persistedstate": "^3.1.0",
|
||||||
"print-js": "^1.6.0",
|
"print-js": "^1.6.0",
|
||||||
"qs": "^6.13.1",
|
"qs": "^6.13.1",
|
||||||
|
"quill": "^2.0.3",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-router": "^4.2.2",
|
"vue-router": "^4.2.2",
|
||||||
@@ -3607,6 +3610,74 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz",
|
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz",
|
||||||
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
|
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@vueup/vue-quill": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@vueup/vue-quill/-/vue-quill-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-kd5QPSHMDpycklojPXno2Kw2JSiKMYduKYQckTm1RJoVDA557MnyUXgcuuDpry4HY/Rny9nGNcK+m3AHk94wag==",
|
||||||
|
"dependencies": {
|
||||||
|
"quill": "^1.3.7",
|
||||||
|
"quill-delta": "^4.2.2"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "^3.2.41"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/eventemitter3": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/fast-diff": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w=="
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/parchment": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/quill": {
|
||||||
|
"version": "1.3.7",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz",
|
||||||
|
"integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
|
||||||
|
"dependencies": {
|
||||||
|
"clone": "^2.1.1",
|
||||||
|
"deep-equal": "^1.0.1",
|
||||||
|
"eventemitter3": "^2.0.3",
|
||||||
|
"extend": "^3.0.2",
|
||||||
|
"parchment": "^1.1.4",
|
||||||
|
"quill-delta": "^3.6.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/quill-delta": {
|
||||||
|
"version": "4.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz",
|
||||||
|
"integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==",
|
||||||
|
"dependencies": {
|
||||||
|
"fast-diff": "1.2.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.isequal": "^4.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/quill/node_modules/fast-diff": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
|
||||||
|
},
|
||||||
|
"node_modules/@vueup/vue-quill/node_modules/quill/node_modules/quill-delta": {
|
||||||
|
"version": "3.6.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz",
|
||||||
|
"integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
|
||||||
|
"dependencies": {
|
||||||
|
"deep-equal": "^1.0.1",
|
||||||
|
"extend": "^3.0.2",
|
||||||
|
"fast-diff": "1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@vueuse/core": {
|
"node_modules/@vueuse/core": {
|
||||||
"version": "10.1.2",
|
"version": "10.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.1.2.tgz",
|
||||||
@@ -4323,13 +4394,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/call-bind": {
|
"node_modules/call-bind": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.8.tgz",
|
||||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"function-bind": "^1.1.1",
|
"call-bind-apply-helpers": "^1.0.0",
|
||||||
"get-intrinsic": "^1.0.2"
|
"es-define-property": "^1.0.0",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"set-function-length": "^1.2.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/call-bind-apply-helpers": {
|
"node_modules/call-bind-apply-helpers": {
|
||||||
@@ -4683,7 +4761,6 @@
|
|||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
||||||
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
|
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8"
|
"node": ">=0.8"
|
||||||
}
|
}
|
||||||
@@ -5448,6 +5525,11 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/cssfilter": {
|
||||||
|
"version": "0.0.10",
|
||||||
|
"resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz",
|
||||||
|
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
|
||||||
|
},
|
||||||
"node_modules/csso": {
|
"node_modules/csso": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz",
|
||||||
@@ -5617,6 +5699,25 @@
|
|||||||
"node": ">=0.10"
|
"node": ">=0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/deep-equal": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==",
|
||||||
|
"dependencies": {
|
||||||
|
"is-arguments": "^1.1.1",
|
||||||
|
"is-date-object": "^1.0.5",
|
||||||
|
"is-regex": "^1.1.4",
|
||||||
|
"object-is": "^1.1.5",
|
||||||
|
"object-keys": "^1.1.1",
|
||||||
|
"regexp.prototype.flags": "^1.5.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/deep-is": {
|
"node_modules/deep-is": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
|
"resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
|
||||||
@@ -5637,6 +5738,22 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz",
|
||||||
"integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ=="
|
"integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/define-data-property": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||||
|
"dependencies": {
|
||||||
|
"es-define-property": "^1.0.0",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"gopd": "^1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/define-lazy-prop": {
|
"node_modules/define-lazy-prop": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
||||||
@@ -5647,16 +5764,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/define-properties": {
|
"node_modules/define-properties": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz",
|
||||||
"integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==",
|
"integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"define-data-property": "^1.0.1",
|
||||||
"has-property-descriptors": "^1.0.0",
|
"has-property-descriptors": "^1.0.0",
|
||||||
"object-keys": "^1.1.1"
|
"object-keys": "^1.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/define-property": {
|
"node_modules/define-property": {
|
||||||
@@ -6566,6 +6686,11 @@
|
|||||||
"es5-ext": "~0.10.14"
|
"es5-ext": "~0.10.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eventemitter3": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
|
||||||
|
},
|
||||||
"node_modules/execa": {
|
"node_modules/execa": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz",
|
||||||
@@ -6715,6 +6840,11 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/type/-/type-2.7.2.tgz",
|
"resolved": "https://registry.npmmirror.com/type/-/type-2.7.2.tgz",
|
||||||
"integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
|
"integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/extend": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
||||||
|
},
|
||||||
"node_modules/extend-shallow": {
|
"node_modules/extend-shallow": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||||
@@ -6755,8 +6885,7 @@
|
|||||||
"node_modules/fast-diff": {
|
"node_modules/fast-diff": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz",
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz",
|
||||||
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
|
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/fast-glob": {
|
"node_modules/fast-glob": {
|
||||||
"version": "3.2.12",
|
"version": "3.2.12",
|
||||||
@@ -7061,8 +7190,7 @@
|
|||||||
"node_modules/functions-have-names": {
|
"node_modules/functions-have-names": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
"resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
||||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/gensync": {
|
"node_modules/gensync": {
|
||||||
"version": "1.0.0-beta.2",
|
"version": "1.0.0-beta.2",
|
||||||
@@ -7576,12 +7704,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/has-property-descriptors": {
|
"node_modules/has-property-descriptors": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||||
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
|
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"get-intrinsic": "^1.1.1"
|
"es-define-property": "^1.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/has-proto": {
|
"node_modules/has-proto": {
|
||||||
@@ -7605,15 +7735,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/has-tostringtag": {
|
"node_modules/has-tostringtag": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||||
"integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
|
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"has-symbols": "^1.0.2"
|
"has-symbols": "^1.0.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/has-value": {
|
"node_modules/has-value": {
|
||||||
@@ -7958,6 +8090,21 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-arguments": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bound": "^1.0.2",
|
||||||
|
"has-tostringtag": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-array-buffer": {
|
"node_modules/is-array-buffer": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
|
||||||
@@ -8049,7 +8196,6 @@
|
|||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz",
|
"resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz",
|
||||||
"integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
|
"integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"has-tostringtag": "^1.0.0"
|
"has-tostringtag": "^1.0.0"
|
||||||
},
|
},
|
||||||
@@ -8202,7 +8348,6 @@
|
|||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz",
|
"resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz",
|
||||||
"integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
|
"integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"call-bind": "^1.0.2",
|
"call-bind": "^1.0.2",
|
||||||
"has-tostringtag": "^1.0.0"
|
"has-tostringtag": "^1.0.0"
|
||||||
@@ -9161,6 +9306,14 @@
|
|||||||
"integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==",
|
"integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/mavon-editor": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-QmmsypznEkru3Gj9u/i3OLs7uWOwrAUDyLAiQnl7bj2lvZZ++J7MPA+Al0G26cQZ8GwzyC69T5l6NQjZ2z1Nuw==",
|
||||||
|
"dependencies": {
|
||||||
|
"xss": "^1.0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mdn-data": {
|
"node_modules/mdn-data": {
|
||||||
"version": "2.0.30",
|
"version": "2.0.30",
|
||||||
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz",
|
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz",
|
||||||
@@ -9725,11 +9878,25 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/object-is": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz",
|
||||||
|
"integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.7",
|
||||||
|
"define-properties": "^1.2.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/object-keys": {
|
"node_modules/object-keys": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz",
|
||||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
@@ -9898,6 +10065,11 @@
|
|||||||
"tslib": "^2.0.3"
|
"tslib": "^2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/parchment": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/parchment/-/parchment-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A=="
|
||||||
|
},
|
||||||
"node_modules/parent-module": {
|
"node_modules/parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
@@ -10653,6 +10825,33 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/quill": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill/-/quill-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==",
|
||||||
|
"dependencies": {
|
||||||
|
"eventemitter3": "^5.0.1",
|
||||||
|
"lodash-es": "^4.17.21",
|
||||||
|
"parchment": "^3.0.0",
|
||||||
|
"quill-delta": "^5.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"npm": ">=8.2.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/quill-delta": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==",
|
||||||
|
"dependencies": {
|
||||||
|
"fast-diff": "^1.3.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.isequal": "^4.5.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 12.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/randombytes": {
|
"node_modules/randombytes": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz",
|
||||||
@@ -10925,17 +11124,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/regexp.prototype.flags": {
|
"node_modules/regexp.prototype.flags": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.4",
|
||||||
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz",
|
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
|
||||||
"integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==",
|
"integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"call-bind": "^1.0.2",
|
"call-bind": "^1.0.8",
|
||||||
"define-properties": "^1.2.0",
|
"define-properties": "^1.2.1",
|
||||||
"functions-have-names": "^1.2.3"
|
"es-errors": "^1.3.0",
|
||||||
|
"get-proto": "^1.0.1",
|
||||||
|
"gopd": "^1.2.0",
|
||||||
|
"set-function-name": "^2.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/regexpu-core": {
|
"node_modules/regexpu-core": {
|
||||||
@@ -11284,6 +11488,36 @@
|
|||||||
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
|
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/set-function-length": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||||
|
"dependencies": {
|
||||||
|
"define-data-property": "^1.1.4",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"gopd": "^1.0.1",
|
||||||
|
"has-property-descriptors": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/set-function-name": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"define-data-property": "^1.1.4",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"functions-have-names": "^1.2.3",
|
||||||
|
"has-property-descriptors": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/set-value": {
|
"node_modules/set-value": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz",
|
||||||
@@ -14839,6 +15073,26 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/xss": {
|
||||||
|
"version": "1.0.15",
|
||||||
|
"resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.15.tgz",
|
||||||
|
"integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==",
|
||||||
|
"dependencies": {
|
||||||
|
"commander": "^2.20.3",
|
||||||
|
"cssfilter": "0.0.10"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"xss": "bin/xss"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/xss/node_modules/commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
||||||
|
},
|
||||||
"node_modules/xtend": {
|
"node_modules/xtend": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
|
||||||
@@ -17502,6 +17756,72 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz",
|
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz",
|
||||||
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
|
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
|
||||||
},
|
},
|
||||||
|
"@vueup/vue-quill": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@vueup/vue-quill/-/vue-quill-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-kd5QPSHMDpycklojPXno2Kw2JSiKMYduKYQckTm1RJoVDA557MnyUXgcuuDpry4HY/Rny9nGNcK+m3AHk94wag==",
|
||||||
|
"requires": {
|
||||||
|
"quill": "^1.3.7",
|
||||||
|
"quill-delta": "^4.2.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eventemitter3": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
|
||||||
|
},
|
||||||
|
"fast-diff": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w=="
|
||||||
|
},
|
||||||
|
"parchment": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
|
||||||
|
},
|
||||||
|
"quill": {
|
||||||
|
"version": "1.3.7",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz",
|
||||||
|
"integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
|
||||||
|
"requires": {
|
||||||
|
"clone": "^2.1.1",
|
||||||
|
"deep-equal": "^1.0.1",
|
||||||
|
"eventemitter3": "^2.0.3",
|
||||||
|
"extend": "^3.0.2",
|
||||||
|
"parchment": "^1.1.4",
|
||||||
|
"quill-delta": "^3.6.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fast-diff": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
|
||||||
|
},
|
||||||
|
"quill-delta": {
|
||||||
|
"version": "3.6.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz",
|
||||||
|
"integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
|
||||||
|
"requires": {
|
||||||
|
"deep-equal": "^1.0.1",
|
||||||
|
"extend": "^3.0.2",
|
||||||
|
"fast-diff": "1.1.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"quill-delta": {
|
||||||
|
"version": "4.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz",
|
||||||
|
"integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==",
|
||||||
|
"requires": {
|
||||||
|
"fast-diff": "1.2.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.isequal": "^4.5.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@vueuse/core": {
|
"@vueuse/core": {
|
||||||
"version": "10.1.2",
|
"version": "10.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.1.2.tgz",
|
||||||
@@ -18014,13 +18334,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"call-bind": {
|
"call-bind": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.8.tgz",
|
||||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"function-bind": "^1.1.1",
|
"call-bind-apply-helpers": "^1.0.0",
|
||||||
"get-intrinsic": "^1.0.2"
|
"es-define-property": "^1.0.0",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"set-function-length": "^1.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"call-bind-apply-helpers": {
|
"call-bind-apply-helpers": {
|
||||||
@@ -18301,8 +18622,7 @@
|
|||||||
"clone": {
|
"clone": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
||||||
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
|
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"codepage": {
|
"codepage": {
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
@@ -18909,6 +19229,11 @@
|
|||||||
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"cssfilter": {
|
||||||
|
"version": "0.0.10",
|
||||||
|
"resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz",
|
||||||
|
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
|
||||||
|
},
|
||||||
"csso": {
|
"csso": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz",
|
||||||
@@ -19040,6 +19365,19 @@
|
|||||||
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"deep-equal": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==",
|
||||||
|
"requires": {
|
||||||
|
"is-arguments": "^1.1.1",
|
||||||
|
"is-date-object": "^1.0.5",
|
||||||
|
"is-regex": "^1.1.4",
|
||||||
|
"object-is": "^1.1.5",
|
||||||
|
"object-keys": "^1.1.1",
|
||||||
|
"regexp.prototype.flags": "^1.5.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"deep-is": {
|
"deep-is": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
|
"resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
|
||||||
@@ -19057,6 +19395,16 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz",
|
||||||
"integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ=="
|
"integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ=="
|
||||||
},
|
},
|
||||||
|
"define-data-property": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||||
|
"requires": {
|
||||||
|
"es-define-property": "^1.0.0",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"gopd": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"define-lazy-prop": {
|
"define-lazy-prop": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
||||||
@@ -19064,11 +19412,11 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"define-properties": {
|
"define-properties": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz",
|
||||||
"integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==",
|
"integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"define-data-property": "^1.0.1",
|
||||||
"has-property-descriptors": "^1.0.0",
|
"has-property-descriptors": "^1.0.0",
|
||||||
"object-keys": "^1.1.1"
|
"object-keys": "^1.1.1"
|
||||||
}
|
}
|
||||||
@@ -19784,6 +20132,11 @@
|
|||||||
"es5-ext": "~0.10.14"
|
"es5-ext": "~0.10.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eventemitter3": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
|
||||||
|
},
|
||||||
"execa": {
|
"execa": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz",
|
||||||
@@ -19914,6 +20267,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"extend": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
||||||
|
},
|
||||||
"extend-shallow": {
|
"extend-shallow": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||||
@@ -19948,8 +20306,7 @@
|
|||||||
"fast-diff": {
|
"fast-diff": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz",
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz",
|
||||||
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
|
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"fast-glob": {
|
"fast-glob": {
|
||||||
"version": "3.2.12",
|
"version": "3.2.12",
|
||||||
@@ -20191,8 +20548,7 @@
|
|||||||
"functions-have-names": {
|
"functions-have-names": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
"resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
||||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"gensync": {
|
"gensync": {
|
||||||
"version": "1.0.0-beta.2",
|
"version": "1.0.0-beta.2",
|
||||||
@@ -20600,12 +20956,11 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"has-property-descriptors": {
|
"has-property-descriptors": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||||
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
|
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"get-intrinsic": "^1.1.1"
|
"es-define-property": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-proto": {
|
"has-proto": {
|
||||||
@@ -20620,12 +20975,11 @@
|
|||||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
|
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
|
||||||
},
|
},
|
||||||
"has-tostringtag": {
|
"has-tostringtag": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||||
"integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
|
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"has-symbols": "^1.0.2"
|
"has-symbols": "^1.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-value": {
|
"has-value": {
|
||||||
@@ -20901,6 +21255,15 @@
|
|||||||
"kind-of": "^6.0.0"
|
"kind-of": "^6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"is-arguments": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
|
||||||
|
"requires": {
|
||||||
|
"call-bound": "^1.0.2",
|
||||||
|
"has-tostringtag": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"is-array-buffer": {
|
"is-array-buffer": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
|
||||||
@@ -20980,7 +21343,6 @@
|
|||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz",
|
"resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz",
|
||||||
"integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
|
"integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"has-tostringtag": "^1.0.0"
|
"has-tostringtag": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -21088,7 +21450,6 @@
|
|||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz",
|
"resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz",
|
||||||
"integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
|
"integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"call-bind": "^1.0.2",
|
"call-bind": "^1.0.2",
|
||||||
"has-tostringtag": "^1.0.0"
|
"has-tostringtag": "^1.0.0"
|
||||||
@@ -21866,6 +22227,14 @@
|
|||||||
"integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==",
|
"integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"mavon-editor": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-QmmsypznEkru3Gj9u/i3OLs7uWOwrAUDyLAiQnl7bj2lvZZ++J7MPA+Al0G26cQZ8GwzyC69T5l6NQjZ2z1Nuw==",
|
||||||
|
"requires": {
|
||||||
|
"xss": "^1.0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"mdn-data": {
|
"mdn-data": {
|
||||||
"version": "2.0.30",
|
"version": "2.0.30",
|
||||||
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz",
|
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz",
|
||||||
@@ -22328,11 +22697,19 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.3.tgz",
|
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.3.tgz",
|
||||||
"integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA=="
|
"integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA=="
|
||||||
},
|
},
|
||||||
|
"object-is": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz",
|
||||||
|
"integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==",
|
||||||
|
"requires": {
|
||||||
|
"call-bind": "^1.0.7",
|
||||||
|
"define-properties": "^1.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"object-keys": {
|
"object-keys": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz",
|
||||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"object-visit": {
|
"object-visit": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@@ -22466,6 +22843,11 @@
|
|||||||
"tslib": "^2.0.3"
|
"tslib": "^2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"parchment": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/parchment/-/parchment-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A=="
|
||||||
|
},
|
||||||
"parent-module": {
|
"parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
@@ -23059,6 +23441,27 @@
|
|||||||
"integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==",
|
"integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"quill": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill/-/quill-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==",
|
||||||
|
"requires": {
|
||||||
|
"eventemitter3": "^5.0.1",
|
||||||
|
"lodash-es": "^4.17.21",
|
||||||
|
"parchment": "^3.0.0",
|
||||||
|
"quill-delta": "^5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"quill-delta": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==",
|
||||||
|
"requires": {
|
||||||
|
"fast-diff": "^1.3.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.isequal": "^4.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"randombytes": {
|
"randombytes": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz",
|
||||||
@@ -23280,14 +23683,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regexp.prototype.flags": {
|
"regexp.prototype.flags": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.4",
|
||||||
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz",
|
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
|
||||||
"integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==",
|
"integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"call-bind": "^1.0.2",
|
"call-bind": "^1.0.8",
|
||||||
"define-properties": "^1.2.0",
|
"define-properties": "^1.2.1",
|
||||||
"functions-have-names": "^1.2.3"
|
"es-errors": "^1.3.0",
|
||||||
|
"get-proto": "^1.0.1",
|
||||||
|
"gopd": "^1.2.0",
|
||||||
|
"set-function-name": "^2.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regexpu-core": {
|
"regexpu-core": {
|
||||||
@@ -23557,6 +23962,30 @@
|
|||||||
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
|
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"set-function-length": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||||
|
"requires": {
|
||||||
|
"define-data-property": "^1.1.4",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"get-intrinsic": "^1.2.4",
|
||||||
|
"gopd": "^1.0.1",
|
||||||
|
"has-property-descriptors": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"set-function-name": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
|
||||||
|
"requires": {
|
||||||
|
"define-data-property": "^1.1.4",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"functions-have-names": "^1.2.3",
|
||||||
|
"has-property-descriptors": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"set-value": {
|
"set-value": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz",
|
||||||
@@ -26355,6 +26784,22 @@
|
|||||||
"integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
|
"integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"xss": {
|
||||||
|
"version": "1.0.15",
|
||||||
|
"resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.15.tgz",
|
||||||
|
"integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==",
|
||||||
|
"requires": {
|
||||||
|
"commander": "^2.20.3",
|
||||||
|
"cssfilter": "0.0.10"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"xtend": {
|
"xtend": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.1.0",
|
"@element-plus/icons-vue": "^2.1.0",
|
||||||
"@types/decimal.js": "^7.4.0",
|
"@types/decimal.js": "^7.4.0",
|
||||||
|
"@vueup/vue-quill": "^1.2.0",
|
||||||
"@vueuse/core": "^10.1.2",
|
"@vueuse/core": "^10.1.2",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
@@ -39,12 +40,14 @@
|
|||||||
"jsbarcode": "^3.11.6",
|
"jsbarcode": "^3.11.6",
|
||||||
"jsonpack": "^1.1.5",
|
"jsonpack": "^1.1.5",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
"mavon-editor": "^3.0.2",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.1.3",
|
"pinia": "^2.1.3",
|
||||||
"pinia-plugin-persistedstate": "^3.1.0",
|
"pinia-plugin-persistedstate": "^3.1.0",
|
||||||
"print-js": "^1.6.0",
|
"print-js": "^1.6.0",
|
||||||
"qs": "^6.13.1",
|
"qs": "^6.13.1",
|
||||||
|
"quill": "^2.0.3",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-router": "^4.2.2",
|
"vue-router": "^4.2.2",
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
// import { useUserStore } from "@/stores/modules/user";
|
||||||
|
// const userStore: any = useUserStore();
|
||||||
import { reactive, ref, computed } from "vue";
|
import { reactive, ref, computed } from "vue";
|
||||||
|
|
||||||
import { useTheme } from "@/hooks/useTheme";
|
import { useTheme } from "@/hooks/useTheme";
|
||||||
@@ -26,4 +28,11 @@ const assemblySize = computed(() => globalStore.assemblySize);
|
|||||||
|
|
||||||
// element button config
|
// element button config
|
||||||
const buttonConfig = reactive({ autoInsertSpace: false });
|
const buttonConfig = reactive({ autoInsertSpace: false });
|
||||||
|
// watch(
|
||||||
|
// () => userStore.languageType,
|
||||||
|
// (newVal: any) => {
|
||||||
|
// console.log(newVal, "=======newVal=======");
|
||||||
|
// window.location.reload();
|
||||||
|
// }
|
||||||
|
// );
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { showFullScreenLoading, tryHideFullScreenLoading } from "@/config/servic
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { ResultData } from "@/api/interface";
|
import { ResultData } from "@/api/interface";
|
||||||
import { ResultEnum } from "@/enums/httpEnum";
|
import { ResultEnum } from "@/enums/httpEnum";
|
||||||
import { checkStatus } from "./helper/checkStatus";
|
// import { checkStatus } from "./helper/checkStatus";
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
import router from "@/routers";
|
import router from "@/routers";
|
||||||
//获取导出表格name
|
//获取导出表格name
|
||||||
@@ -14,8 +14,10 @@ const getDispositionName = (response: any) => {
|
|||||||
//导出表格,从content-disposition获取表格的名称 只有导出服务端才会返回该字段
|
//导出表格,从content-disposition获取表格的名称 只有导出服务端才会返回该字段
|
||||||
const contentDisposition = response.headers["content-disposition"];
|
const contentDisposition = response.headers["content-disposition"];
|
||||||
if (contentDisposition) {
|
if (contentDisposition) {
|
||||||
|
let contentDispositionClone = decodeURIComponent(contentDisposition);
|
||||||
|
console.log(contentDispositionClone);
|
||||||
// 解析 Content-Disposition 以提取文件名
|
// 解析 Content-Disposition 以提取文件名
|
||||||
const filenameMatch = contentDisposition.match(/filename=(.*)/i);
|
const filenameMatch = contentDispositionClone.match(/filename=(.*)/i);
|
||||||
if (filenameMatch && filenameMatch[1]) {
|
if (filenameMatch && filenameMatch[1]) {
|
||||||
let filename = filenameMatch[1].trim();
|
let filename = filenameMatch[1].trim();
|
||||||
localStorage.setItem("filename", filename);
|
localStorage.setItem("filename", filename);
|
||||||
@@ -54,7 +56,7 @@ class RequestHttp {
|
|||||||
// 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制
|
// 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制
|
||||||
config.noLoading || showFullScreenLoading();
|
config.noLoading || showFullScreenLoading();
|
||||||
if (config.headers && typeof config.headers.set === "function") {
|
if (config.headers && typeof config.headers.set === "function") {
|
||||||
config.headers.set("Authorization", "Bearer" + " " + userStore.token);
|
config.headers.set("Authorization", userStore.token);
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
@@ -73,6 +75,15 @@ class RequestHttp {
|
|||||||
tryHideFullScreenLoading();
|
tryHideFullScreenLoading();
|
||||||
//获取导出表格名称
|
//获取导出表格名称
|
||||||
getDispositionName(response);
|
getDispositionName(response);
|
||||||
|
// 获取响应头中的 Authorization 信息
|
||||||
|
const authorization = response.headers["authorization"];
|
||||||
|
if (authorization) {
|
||||||
|
// 可以在这里更新用户的 token 信息
|
||||||
|
const userStore = useUserStore();
|
||||||
|
userStore.setToken(authorization);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
//0正常,1非正常
|
//0正常,1非正常
|
||||||
if (data.code == 1) {
|
if (data.code == 1) {
|
||||||
ElMessage.error(data.msg);
|
ElMessage.error(data.msg);
|
||||||
@@ -94,7 +105,7 @@ class RequestHttp {
|
|||||||
// 根据服务器响应的错误状态码,做不同的处理
|
// 根据服务器响应的错误状态码,做不同的处理
|
||||||
if (response) {
|
if (response) {
|
||||||
console.log("error-走到了这里", response.status);
|
console.log("error-走到了这里", response.status);
|
||||||
checkStatus(response.status, response.data);
|
// checkStatus(response.status, response.data);
|
||||||
}
|
}
|
||||||
// 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面
|
// 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面
|
||||||
if (!window.navigator.onLine) router.replace("/500");
|
if (!window.navigator.onLine) router.replace("/500");
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ const ARTICLE_CATEGORY = `/article/category`;
|
|||||||
export const getArticleClassListApi = (params: any) => {
|
export const getArticleClassListApi = (params: any) => {
|
||||||
return http.get<any>(`${ARTICLE_CATEGORY}/index`, params);
|
return http.get<any>(`${ARTICLE_CATEGORY}/index`, params);
|
||||||
};
|
};
|
||||||
|
//文章分类下拉框
|
||||||
|
export const getArticleClassApi = () => {
|
||||||
|
return http.get<any>(`/article/categorys`);
|
||||||
|
};
|
||||||
//文章分类新增
|
//文章分类新增
|
||||||
export const getArticleClassAddSaveApi = (params: any) => {
|
export const getArticleClassAddSaveApi = (params: any) => {
|
||||||
return http.post<any>(`${ARTICLE_CATEGORY}/save`, params);
|
return http.post<any>(`${ARTICLE_CATEGORY}/save`, params);
|
||||||
@@ -15,12 +19,13 @@ export const getArticleClassDelApi = (params: any) => {
|
|||||||
};
|
};
|
||||||
//文章分类更新(用于编辑后)
|
//文章分类更新(用于编辑后)
|
||||||
export const getArticleClassEditUpApi = (params: any) => {
|
export const getArticleClassEditUpApi = (params: any) => {
|
||||||
const { id, name, sort, is_show, seo_title, seo_keywords, seo_desc } = params;
|
const { id, name, sort, is_show, pid, seo_title, seo_keywords, seo_desc } = params;
|
||||||
|
|
||||||
return http.put<any>(`/article/category/update/${id}`, {
|
return http.put<any>(`/article/category/update/${id}`, {
|
||||||
name,
|
name,
|
||||||
sort,
|
sort,
|
||||||
is_show,
|
is_show,
|
||||||
|
pid,
|
||||||
seo_title,
|
seo_title,
|
||||||
seo_keywords,
|
seo_keywords,
|
||||||
seo_desc
|
seo_desc
|
||||||
@@ -30,3 +35,7 @@ export const getArticleClassEditUpApi = (params: any) => {
|
|||||||
export const getArticleClassDetailsApi = (params: any) => {
|
export const getArticleClassDetailsApi = (params: any) => {
|
||||||
return http.get<any>(`${ARTICLE_CATEGORY}/read/${params}`);
|
return http.get<any>(`${ARTICLE_CATEGORY}/read/${params}`);
|
||||||
};
|
};
|
||||||
|
export const getArticleClassSortApi = (params: any) => {
|
||||||
|
const { id, sort } = params;
|
||||||
|
return http.post<any>(`${ARTICLE_CATEGORY}/sort/${id}`, { sort });
|
||||||
|
};
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export const getBannerListApi = (params: any) => {
|
|||||||
};
|
};
|
||||||
//新增
|
//新增
|
||||||
export const getBannerListSaveApi = (params: any) => {
|
export const getBannerListSaveApi = (params: any) => {
|
||||||
console.log("1232323");
|
|
||||||
return http.post<any>(`${B}/save`, params, {
|
return http.post<any>(`${B}/save`, params, {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
@@ -37,3 +36,7 @@ export const getBannerListExportApi = (params: any) => {
|
|||||||
responseType: "arraybuffer"
|
responseType: "arraybuffer"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//分类
|
||||||
|
export const getBannerClassListApi = (params?: any) => {
|
||||||
|
return http.get<any>(`/banner/list`, params); //v1/banner/list
|
||||||
|
};
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ export const getCategorySortApi = (params: any) => {
|
|||||||
return http.post<any>(`${ATT_C}/sort/${params.id}`, { sort: params.sort });
|
return http.post<any>(`${ATT_C}/sort/${params.id}`, { sort: params.sort });
|
||||||
};
|
};
|
||||||
//下载分类下拉列表
|
//下载分类下拉列表
|
||||||
export const getCategorysApi = () => {
|
export const getCategorysApi = (params?: any) => {
|
||||||
return http.get<any>(`/attachment/categorys`);
|
return http.get<any>(`/attachment/tree`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export const getProductAttrDelApi = (params: any) => {
|
|||||||
// 产品属性更新
|
// 产品属性更新
|
||||||
export const getProductAttrUpApi = (params: any) => {
|
export const getProductAttrUpApi = (params: any) => {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
|
||||||
return http.put<any>(`${PRODUCT_ATTR}/update/${id}`, params);
|
return http.put<any>(`${PRODUCT_ATTR}/update/${id}`, params);
|
||||||
};
|
};
|
||||||
//产品属性新增
|
//产品属性新增
|
||||||
|
|||||||
@@ -23,3 +23,12 @@ export const getProductBuypassUpdateApi = (params: any) => {
|
|||||||
const { id, param } = params;
|
const { id, param } = params;
|
||||||
return http.put<any>(`${PRODUCT_BUYPASS}/update/${id}`, param);
|
return http.put<any>(`${PRODUCT_BUYPASS}/update/${id}`, param);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//新增
|
||||||
|
export const getProductBuypassListSaveApi = (params: any) => {
|
||||||
|
return http.post<any>(`${PRODUCT_BUYPASS}/save`, params, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -36,3 +36,7 @@ export const getProductListSortApi = (params: any) => {
|
|||||||
const { id, sort } = params;
|
const { id, sort } = params;
|
||||||
return http.post<any>(`${PRODUCT}/sort/${id}`, { sort });
|
return http.post<any>(`${PRODUCT}/sort/${id}`, { sort });
|
||||||
};
|
};
|
||||||
|
// 产品分类
|
||||||
|
export const getProductCategoryListApi = (params?: any) => {
|
||||||
|
return http.get<any>(`/product/categorys`, params);
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import http from "@/api";
|
import http from "@/api";
|
||||||
const VIDEO_CATEGORY = `video/category`;
|
const VIDEO_CATEGORY = `video/category`;
|
||||||
// 视频分类分页列表
|
// 视频分类分页列表
|
||||||
export const getVideoClassListApi = (params: any) => {
|
export const getVideoClassListApi = (params?: any) => {
|
||||||
return http.get<any>(`${VIDEO_CATEGORY}/index`, params);
|
return http.get<any>(`${VIDEO_CATEGORY}/index`, params);
|
||||||
};
|
};
|
||||||
//视频分类详情
|
//视频分类详情
|
||||||
|
|||||||
@@ -26,3 +26,7 @@ export const getVideoListExportApi = (params: any) => {
|
|||||||
responseType: "arraybuffer"
|
responseType: "arraybuffer"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//视频分类
|
||||||
|
export const getVideoClassListApi = (params?: any) => {
|
||||||
|
return http.get<any>(`/video/categorys`, params);
|
||||||
|
};
|
||||||
|
|||||||
20
src/components.d.ts
vendored
20
src/components.d.ts
vendored
@@ -7,10 +7,6 @@ export {}
|
|||||||
|
|
||||||
declare module "vue" {
|
declare module "vue" {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
403: typeof import("./components/ErrorMessage/403.vue")["default"];
|
|
||||||
404: typeof import("./components/ErrorMessage/404.vue")["default"];
|
|
||||||
500: typeof import("./components/ErrorMessage/500.vue")["default"];
|
|
||||||
ColSetting: typeof import("./components/ProTable/components/ColSetting.vue")["default"];
|
|
||||||
ElAside: typeof import("element-plus/es")["ElAside"];
|
ElAside: typeof import("element-plus/es")["ElAside"];
|
||||||
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
|
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
|
||||||
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
||||||
@@ -57,10 +53,6 @@ declare module "vue" {
|
|||||||
ElTree: typeof import("element-plus/es")["ElTree"];
|
ElTree: typeof import("element-plus/es")["ElTree"];
|
||||||
ElTreeSelect: typeof import("element-plus/es")["ElTreeSelect"];
|
ElTreeSelect: typeof import("element-plus/es")["ElTreeSelect"];
|
||||||
ElUpload: typeof import("element-plus/es")["ElUpload"];
|
ElUpload: typeof import("element-plus/es")["ElUpload"];
|
||||||
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
|
||||||
FormTable: typeof import("./components/FormTable/index.vue")["default"];
|
|
||||||
Grid: typeof import("./components/Grid/index.vue")["default"];
|
|
||||||
GridItem: typeof import("./components/Grid/components/GridItem.vue")["default"];
|
|
||||||
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
|
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
|
||||||
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
|
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
|
||||||
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
|
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
|
||||||
@@ -68,19 +60,7 @@ declare module "vue" {
|
|||||||
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
||||||
IEpSearch: typeof import("~icons/ep/search")["default"];
|
IEpSearch: typeof import("~icons/ep/search")["default"];
|
||||||
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
||||||
ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"];
|
|
||||||
Loading: typeof import("./components/Loading/index.vue")["default"];
|
|
||||||
Pagination: typeof import("./components/ProTable/components/Pagination.vue")["default"];
|
|
||||||
ProTable: typeof import("./components/ProTable/index.vue")["default"];
|
|
||||||
RouterLink: typeof import("vue-router")["RouterLink"];
|
RouterLink: typeof import("vue-router")["RouterLink"];
|
||||||
RouterView: typeof import("vue-router")["RouterView"];
|
RouterView: typeof import("vue-router")["RouterView"];
|
||||||
RulesForm: typeof import("./components/rulesForm/index.vue")["default"];
|
|
||||||
SearchForm: typeof import("./components/SearchForm/index.vue")["default"];
|
|
||||||
SearchFormItem: typeof import("./components/SearchForm/components/SearchFormItem.vue")["default"];
|
|
||||||
TableColumn: typeof import("./components/ProTable/components/TableColumn.vue")["default"];
|
|
||||||
UploadImg: typeof import("./components/Upload/UploadImg.vue")["default"];
|
|
||||||
UploadImgs: typeof import("./components/Upload/UploadImgs.vue")["default"];
|
|
||||||
UploadVideo: typeof import("./components/Upload/UploadVideo.vue")["default"];
|
|
||||||
WangEditor: typeof import("./components/WangEditor/index.vue")["default"];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
80
src/components/Editor/index.scss
Normal file
80
src/components/Editor/index.scss
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
.editor,
|
||||||
|
.ql-toolbar {
|
||||||
|
line-height: normal !important;
|
||||||
|
white-space: pre-wrap !important;
|
||||||
|
}
|
||||||
|
.editor-img-uploader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.ql-editor {
|
||||||
|
min-height: 600px;
|
||||||
|
max-height: 600px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ql-snow .ql-tooltip[data-mode="link"]::before {
|
||||||
|
content: "请输入链接地址:";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
|
||||||
|
padding-right: 0;
|
||||||
|
content: "保存";
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
.ql-snow .ql-tooltip[data-mode="video"]::before {
|
||||||
|
content: "请输入视频地址:";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
|
||||||
|
content: "14px";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
|
||||||
|
content: "10px";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
|
||||||
|
content: "18px";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
|
||||||
|
content: "32px";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
|
||||||
|
content: "文本";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
|
||||||
|
content: "标题1";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
|
||||||
|
content: "标题2";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
|
||||||
|
content: "标题3";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
|
||||||
|
content: "标题4";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
|
||||||
|
content: "标题5";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
|
||||||
|
content: "标题6";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
|
||||||
|
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
|
||||||
|
content: "标准字体";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
|
||||||
|
content: "衬线字体";
|
||||||
|
}
|
||||||
|
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
|
||||||
|
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
|
||||||
|
content: "等宽字体";
|
||||||
|
}
|
||||||
242
src/components/Editor/index.vue
Normal file
242
src/components/Editor/index.vue
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
<template>
|
||||||
|
<el-upload
|
||||||
|
:id="uuid"
|
||||||
|
action="#"
|
||||||
|
:multiple="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
:http-request="handleHttpUpload"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
|
class="editor-img-uploader"
|
||||||
|
accept=".jpeg,.jpg,.png"
|
||||||
|
>
|
||||||
|
<i ref="uploadRef" class="Plus editor-img-uploader"></i>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
<!-- 使用input 标签劫持原本视频上传事件,实现视频上传 -->
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
accept="video/*"
|
||||||
|
name="file"
|
||||||
|
ref="uploadFileVideo"
|
||||||
|
id="uploadFileVideo"
|
||||||
|
@change="handleVideoUpload"
|
||||||
|
style="width: 0; height: 0; cursor: pointer; opacity: 0"
|
||||||
|
/>
|
||||||
|
<div class="editor">
|
||||||
|
<QuillEditor
|
||||||
|
id="editorId"
|
||||||
|
ref="myQuillEditor"
|
||||||
|
v-model:content="editorContent"
|
||||||
|
contentType="html"
|
||||||
|
@update:content="onContentChange"
|
||||||
|
:options="options"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Editor">
|
||||||
|
import { QuillEditor, Quill } from "@vueup/vue-quill";
|
||||||
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
||||||
|
import { getCurrentInstance, reactive, ref, toRaw, computed, onMounted } from "vue";
|
||||||
|
import { generateUUID } from "@/utils";
|
||||||
|
import { h } from "@/utils/url";
|
||||||
|
import { routerObj } from "./utils.js";
|
||||||
|
import { titleConfig } from "./titleConfig.js";
|
||||||
|
import { uploadVideo, uploadImg } from "@/api/modules/upload";
|
||||||
|
// 引入插入图片标签自定义的类
|
||||||
|
import ImageBlot from "./quill-image";
|
||||||
|
import Video from "./quill-video";
|
||||||
|
const uuid = ref("id-" + generateUUID());
|
||||||
|
const $router = useRouter();
|
||||||
|
const routerValueName = $router.currentRoute.value.name;
|
||||||
|
|
||||||
|
const routerName = ref(routerObj[routerValueName]);
|
||||||
|
|
||||||
|
Quill.register(Video);
|
||||||
|
Quill.register(ImageBlot);
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const emit = defineEmits(["update:content", "handleRichTextContentChange"]);
|
||||||
|
const uploadFileVideo = ref(null);
|
||||||
|
const props = defineProps({
|
||||||
|
/* 编辑器的内容 */
|
||||||
|
content: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
},
|
||||||
|
/* 只读 */
|
||||||
|
readOnly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 上传文件大小限制(MB)
|
||||||
|
fileSizeLimit: {
|
||||||
|
type: Number,
|
||||||
|
default: 10
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//值
|
||||||
|
const editorContent = computed({
|
||||||
|
get: () => props.content,
|
||||||
|
set: val => {
|
||||||
|
emit("update:content", val);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//富文本ref
|
||||||
|
const myQuillEditor = ref(null);
|
||||||
|
//富文本值
|
||||||
|
const oldContent = ref("");
|
||||||
|
//富文本配置项
|
||||||
|
const options = reactive({
|
||||||
|
theme: "snow",
|
||||||
|
debug: "warn",
|
||||||
|
modules: {
|
||||||
|
// 工具栏配置
|
||||||
|
toolbar: {
|
||||||
|
container: [
|
||||||
|
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
|
||||||
|
["blockquote", "code-block"], // 引用 代码块
|
||||||
|
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
|
||||||
|
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||||
|
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
||||||
|
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||||
|
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||||
|
[{ align: [] }], // 对齐方式
|
||||||
|
["clean"], // 清除文本格式
|
||||||
|
["link", "image", "video"] // 链接、图片、视频
|
||||||
|
],
|
||||||
|
handlers: {
|
||||||
|
// 重写图片上传事件
|
||||||
|
image: function (value) {
|
||||||
|
if (value) {
|
||||||
|
//调用图片上传
|
||||||
|
proxy.$refs.uploadRef.click();
|
||||||
|
} else {
|
||||||
|
Quill.format("image", true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
video: function (value) {
|
||||||
|
if (value) {
|
||||||
|
// 劫持原来的视频点击按钮事件
|
||||||
|
document.querySelector("#uploadFileVideo")?.click();
|
||||||
|
} else {
|
||||||
|
Quill.format("video", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
placeholder: "请输入内容...",
|
||||||
|
readOnly: props.readOnly,
|
||||||
|
clipboard: {
|
||||||
|
matchers: [
|
||||||
|
[
|
||||||
|
"img",
|
||||||
|
(node, delta) => {
|
||||||
|
const src = node.getAttribute("src");
|
||||||
|
const id = node.getAttribute("id");
|
||||||
|
delta.insert({ image: { src, id: id } });
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//上传前的钩子
|
||||||
|
const handleBeforeUpload = file => {
|
||||||
|
const fileType = file.type;
|
||||||
|
|
||||||
|
// 图片
|
||||||
|
if (
|
||||||
|
fileType == "image/jpeg" ||
|
||||||
|
fileType == "image/png" ||
|
||||||
|
fileType == "image/gif" ||
|
||||||
|
fileType == "image/jpg" ||
|
||||||
|
fileType == "image/bmp" ||
|
||||||
|
fileType == "image/webp" ||
|
||||||
|
fileType == "video/mov" ||
|
||||||
|
fileType == "video/ts" ||
|
||||||
|
fileType == "video/mp4" ||
|
||||||
|
fileType == "video/avi"
|
||||||
|
) {
|
||||||
|
const fileSizeLimit = file.size;
|
||||||
|
// 校检文件大小
|
||||||
|
const isLt = fileSizeLimit / 1024 / 1024 < props.fileSizeLimit;
|
||||||
|
if (!isLt) {
|
||||||
|
console.log(`上传文件大小不能超过 ${props.fileSizeLimit} MB!`);
|
||||||
|
alert(`上传文件大小不能超过 ${props.fileSizeLimit} MB!`);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
console.log(`RIch MB!`);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
alert(`文件格式不正确!`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//图片上传
|
||||||
|
const handleHttpUpload = async options => {
|
||||||
|
let formData = new FormData();
|
||||||
|
//这里要根据后端设置的name设置key值,如果name是file就传file是image就传image
|
||||||
|
formData.append("image", options.file);
|
||||||
|
try {
|
||||||
|
const result = await uploadImg(formData, routerName.value);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
const { data } = result;
|
||||||
|
let rawMyQuillEditor = toRaw(myQuillEditor.value);
|
||||||
|
// 获取富文本实例
|
||||||
|
let quill = rawMyQuillEditor.getQuill();
|
||||||
|
// 获取光标位置
|
||||||
|
let length = quill.selection.savedRange.index;
|
||||||
|
quill.insertEmbed(length, "image", {
|
||||||
|
url: h + data.path,
|
||||||
|
id: generateUUID()
|
||||||
|
});
|
||||||
|
quill.setSelection(length + 1);
|
||||||
|
}
|
||||||
|
} catch (error) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
//视频上传
|
||||||
|
const handleVideoUpload = async evt => {
|
||||||
|
if (evt.target.files.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("video", evt.target.files[0]);
|
||||||
|
try {
|
||||||
|
let quill = toRaw(myQuillEditor.value).getQuill();
|
||||||
|
// 获取光标位置
|
||||||
|
let length = quill.selection.savedRange.index;
|
||||||
|
const { data } = await uploadVideo(formData);
|
||||||
|
quill.insertEmbed(length, "video", {
|
||||||
|
url: h + data.path, //h + data.fileUrl, //
|
||||||
|
id: generateUUID()
|
||||||
|
});
|
||||||
|
uploadFileVideo.value.value = "";
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 监听富文本内容变化,删除被服务器中被用户回车删除的图片
|
||||||
|
const onContentChange = content => {
|
||||||
|
emit("handleRichTextContentChange", content);
|
||||||
|
};
|
||||||
|
// 增加hover工具栏有中文提示
|
||||||
|
const initTitle = () => {
|
||||||
|
document.getElementsByClassName("ql-editor")[0].dataset.placeholder = "";
|
||||||
|
for (let item of titleConfig.value) {
|
||||||
|
let tip = document.querySelector(".ql-toolbar " + item.Choice);
|
||||||
|
if (!tip) continue;
|
||||||
|
tip.setAttribute("title", item.title);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
initTitle();
|
||||||
|
oldContent.value = props.content;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
@import "./index.scss";
|
||||||
|
</style>
|
||||||
20
src/components/Editor/quill-image.js
Normal file
20
src/components/Editor/quill-image.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { Quill } from "@vueup/vue-quill";
|
||||||
|
let BlockEmbed = Quill.import("blots/block/embed");
|
||||||
|
class ImageBlot extends BlockEmbed {
|
||||||
|
static create(value) {
|
||||||
|
let node = super.create();
|
||||||
|
node.setAttribute("src", value.url);
|
||||||
|
node.setAttribute("id", value.id);
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
static value(node) {
|
||||||
|
return {
|
||||||
|
url: node.getAttribute("src"),
|
||||||
|
id: node.getAttribute("id")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImageBlot.blotName = "image";
|
||||||
|
ImageBlot.tagName = "img";
|
||||||
|
export default ImageBlot;
|
||||||
64
src/components/Editor/quill-video.js
Normal file
64
src/components/Editor/quill-video.js
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
import { Quill } from "@vueup/vue-quill";
|
||||||
|
// 源码中是import直接倒入,这里要用Quill.import引入
|
||||||
|
const BlockEmbed = Quill.import("blots/block/embed");
|
||||||
|
const Link = Quill.import("formats/link");
|
||||||
|
|
||||||
|
const ATTRIBUTES = ["height", "width"];
|
||||||
|
|
||||||
|
class Video extends BlockEmbed {
|
||||||
|
static create(value) {
|
||||||
|
let node = super.create();
|
||||||
|
// 添加video标签所需的属性
|
||||||
|
node.setAttribute("controls", "controls");
|
||||||
|
node.setAttribute("playsinline", "true");
|
||||||
|
node.setAttribute("webkit-playsinline", "true");
|
||||||
|
node.setAttribute("type", "video/mp4");
|
||||||
|
// poster 属性指定视频下载时显示的图像,或者在用户点击播放按钮前显示的图像。
|
||||||
|
node.setAttribute("poster", value.poster);
|
||||||
|
node.setAttribute("src", this.sanitize(value.url));
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
static formats(domNode) {
|
||||||
|
return ATTRIBUTES.reduce((formats, attribute) => {
|
||||||
|
if (domNode.hasAttribute(attribute)) {
|
||||||
|
formats[attribute] = domNode.getAttribute(attribute);
|
||||||
|
}
|
||||||
|
return formats;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
static sanitize(url) {
|
||||||
|
return Link.sanitize(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
static value(domNode) {
|
||||||
|
// 设置自定义的属性值
|
||||||
|
return {
|
||||||
|
url: domNode.getAttribute("src"),
|
||||||
|
poster: domNode.getAttribute("poster")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
format(name, value) {
|
||||||
|
if (ATTRIBUTES.indexOf(name) > -1) {
|
||||||
|
if (value) {
|
||||||
|
this.domNode.setAttribute(name, value);
|
||||||
|
} else {
|
||||||
|
this.domNode.removeAttribute(name);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
super.format(name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
html() {
|
||||||
|
const { video } = this.value();
|
||||||
|
return `<a href="${video}">${video}</a>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Video.blotName = "video"; // 这里不用改,不用iframe,直接替换掉原来,如果需要也可以保留原来的,这里用个新的blot
|
||||||
|
Video.className = "ql-video"; // 可添加样式,看实际使用需要
|
||||||
|
Video.tagName = "video"; // 用video标签替换iframe
|
||||||
|
|
||||||
|
export default Video;
|
||||||
47
src/components/Editor/titleConfig.js
Normal file
47
src/components/Editor/titleConfig.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
// toolbar标题(此项是用来增加hover标题)
|
||||||
|
export const titleConfig = ref([
|
||||||
|
{ Choice: ".ql-insertMetric", title: "跳转配置" },
|
||||||
|
{ Choice: ".ql-bold", title: "加粗" },
|
||||||
|
{ Choice: ".ql-italic", title: "斜体" },
|
||||||
|
{ Choice: ".ql-underline", title: "下划线" },
|
||||||
|
{ Choice: ".ql-header", title: "段落格式" },
|
||||||
|
{ Choice: ".ql-strike", title: "删除线" },
|
||||||
|
{ Choice: ".ql-blockquote", title: "块引用" },
|
||||||
|
{ Choice: ".ql-code", title: "插入代码" },
|
||||||
|
{ Choice: ".ql-code-block", title: "插入代码段" },
|
||||||
|
{ Choice: ".ql-font", title: "字体" },
|
||||||
|
{ Choice: ".ql-size", title: "字体大小" },
|
||||||
|
{ Choice: '.ql-list[value="ordered"]', title: "编号列表" },
|
||||||
|
{ Choice: '.ql-list[value="bullet"]', title: "项目列表" },
|
||||||
|
{ Choice: ".ql-direction", title: "文本方向" },
|
||||||
|
{ Choice: '.ql-header[value="1"]', title: "h1" },
|
||||||
|
{ Choice: '.ql-header[value="2"]', title: "h2" },
|
||||||
|
{ Choice: ".ql-align", title: "对齐方式" },
|
||||||
|
{ Choice: ".ql-color", title: "字体颜色" },
|
||||||
|
{ Choice: ".ql-background", title: "背景颜色" },
|
||||||
|
{ Choice: ".ql-image", title: "图像" },
|
||||||
|
{ Choice: ".ql-video", title: "视频" },
|
||||||
|
{ Choice: ".ql-link", title: "添加链接" },
|
||||||
|
{ Choice: ".ql-formula", title: "插入公式" },
|
||||||
|
{ Choice: ".ql-clean", title: "清除字体格式" },
|
||||||
|
{ Choice: '.ql-script[value="sub"]', title: "下标" },
|
||||||
|
{ Choice: '.ql-script[value="super"]', title: "上标" },
|
||||||
|
{ Choice: '.ql-indent[value="-1"]', title: "向左缩进" },
|
||||||
|
{ Choice: '.ql-indent[value="+1"]', title: "向右缩进" },
|
||||||
|
{ Choice: ".ql-header .ql-picker-label", title: "标题大小" },
|
||||||
|
{ Choice: '.ql-header .ql-picker-item[data-value="1"]', title: "标题一" },
|
||||||
|
{ Choice: '.ql-header .ql-picker-item[data-value="2"]', title: "标题二" },
|
||||||
|
{ Choice: '.ql-header .ql-picker-item[data-value="3"]', title: "标题三" },
|
||||||
|
{ Choice: '.ql-header .ql-picker-item[data-value="4"]', title: "标题四" },
|
||||||
|
{ Choice: '.ql-header .ql-picker-item[data-value="5"]', title: "标题五" },
|
||||||
|
{ Choice: '.ql-header .ql-picker-item[data-value="6"]', title: "标题六" },
|
||||||
|
{ Choice: ".ql-header .ql-picker-item:last-child", title: "标准" },
|
||||||
|
{ Choice: '.ql-size .ql-picker-item[data-value="small"]', title: "小号" },
|
||||||
|
{ Choice: '.ql-size .ql-picker-item[data-value="large"]', title: "大号" },
|
||||||
|
{ Choice: '.ql-size .ql-picker-item[data-value="huge"]', title: "超大号" },
|
||||||
|
{ Choice: ".ql-size .ql-picker-item:nth-child(2)", title: "标准" },
|
||||||
|
{ Choice: ".ql-align .ql-picker-item:first-child", title: "居左对齐" },
|
||||||
|
{ Choice: '.ql-align .ql-picker-item[data-value="center"]', title: "居中对齐" },
|
||||||
|
{ Choice: '.ql-align .ql-picker-item[data-value="right"]', title: "居右对齐" },
|
||||||
|
{ Choice: '.ql-align .ql-picker-item[data-value="justify"]', title: "两端对齐" }
|
||||||
|
]);
|
||||||
8
src/components/Editor/utils.js
Normal file
8
src/components/Editor/utils.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
export const routerObj = {
|
||||||
|
articleEditIndex: "article",
|
||||||
|
productEditIndex: "product",
|
||||||
|
bannerListIndex: "banner",
|
||||||
|
downloadListIndex: "download",
|
||||||
|
videoListIndex: "video",
|
||||||
|
QAListIndex: "QA"
|
||||||
|
};
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
:max="9999"
|
:max="9999"
|
||||||
:controls="true"
|
:controls="true"
|
||||||
style="width: 125px"
|
style="width: 125px"
|
||||||
v-model.trim="scope.row[item.prop]"
|
v-model="scope.row[item.prop]"
|
||||||
:disabled="tableData[scope.$index].disabled"
|
:disabled="tableData[scope.$index].disabled"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:maxlength="item.maxLength"
|
:maxlength="item.maxLength"
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<template #default="scope" v-if="item.formType === 'input'">
|
<template #default="scope" v-if="item.formType === 'input'">
|
||||||
<el-input
|
<el-input
|
||||||
:style="item.width ? item.width : 'width:200px'"
|
:style="item.width ? item.width : 'width:200px'"
|
||||||
v-model.trim="scope.row[item.prop]"
|
v-model="scope.row[item.prop]"
|
||||||
:disabled="tableData[scope.$index].disabled"
|
:disabled="tableData[scope.$index].disabled"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:maxlength="item.maxLength"
|
:maxlength="item.maxLength"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<template #default="scope" v-if="item.formType === 'selectRemote'">
|
<template #default="scope" v-if="item.formType === 'selectRemote'">
|
||||||
<el-select
|
<el-select
|
||||||
:style="item.width ? item.width : 'width:200px'"
|
:style="item.width ? item.width : 'width:200px'"
|
||||||
v-model.trim="scope.row[item.prop]"
|
v-model="scope.row[item.prop]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
clearable
|
clearable
|
||||||
remote
|
remote
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="ProTable">
|
<script setup lang="ts" name="ProTable">
|
||||||
// /watch
|
// /watch
|
||||||
import { ref, provide, onMounted, watch } from "vue";
|
import { ref, provide, onMounted } from "vue";
|
||||||
import { ElTable } from "element-plus";
|
import { ElTable } from "element-plus";
|
||||||
import { useTable } from "@/hooks/useTable";
|
import { useTable } from "@/hooks/useTable";
|
||||||
import { useSelection } from "@/hooks/useSelection";
|
import { useSelection } from "@/hooks/useSelection";
|
||||||
@@ -93,6 +93,8 @@ import SearchForm from "@/components/SearchForm/index.vue";
|
|||||||
import Pagination from "./components/Pagination.vue";
|
import Pagination from "./components/Pagination.vue";
|
||||||
import ColSetting from "./components/ColSetting.vue";
|
import ColSetting from "./components/ColSetting.vue";
|
||||||
import TableColumn from "./components/TableColumn.vue";
|
import TableColumn from "./components/TableColumn.vue";
|
||||||
|
// import { useUserStore } from "@/stores/modules/user";
|
||||||
|
// const userStore = useUserStore();
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
const routeName: any = ref($router.currentRoute.value.name);
|
const routeName: any = ref($router.currentRoute.value.name);
|
||||||
export interface ProTableProps {
|
export interface ProTableProps {
|
||||||
@@ -157,7 +159,7 @@ onMounted(() => props.requestAuto && getTableList());
|
|||||||
// 监听页面 initParam 改化,重新获取表格数据
|
// 监听页面 initParam 改化,重新获取表格数据
|
||||||
// watch(() => props.initParam, getTableList, { deep: true });
|
// watch(() => props.initParam, getTableList, { deep: true });
|
||||||
// 监听页面 orgCode 改化,重新获取表格数据
|
// 监听页面 orgCode 改化,重新获取表格数据
|
||||||
watch(() => props.orgCode, getTableList, { deep: true });
|
// watch(() => userStore.languageType, getTableList, { deep: true });
|
||||||
// 接收 columns 并设置为响应式
|
// 接收 columns 并设置为响应式
|
||||||
const tableColumns = ref<ColumnProps[]>(props.columns);
|
const tableColumns = ref<ColumnProps[]>(props.columns);
|
||||||
|
|
||||||
@@ -195,7 +197,12 @@ const colRef = ref();
|
|||||||
const colSetting = tableColumns.value!.filter(
|
const colSetting = tableColumns.value!.filter(
|
||||||
item => !["selection", "index", "expand"].includes(item.type!) && item.prop !== "operation" && item.isShow
|
item => !["selection", "index", "expand"].includes(item.type!) && item.prop !== "operation" && item.isShow
|
||||||
);
|
);
|
||||||
|
// watch(
|
||||||
|
// () => userStore.languageType,
|
||||||
|
// (newVal: any) => {
|
||||||
|
// console.log(newVal, "=newVal=");
|
||||||
|
// }
|
||||||
|
// );
|
||||||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||||
defineExpose({
|
defineExpose({
|
||||||
element: tableRef,
|
element: tableRef,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:maxlength="item.maxlength || 255"
|
:maxlength="item.maxlength || 255"
|
||||||
v-model.trim="_searchParam[`${item.prop}`]"
|
v-model="_searchParam[`${item.prop}`]"
|
||||||
style="width: 224px"
|
style="width: 224px"
|
||||||
@input="handleInput(item)"
|
@input="handleInput(item)"
|
||||||
@keyup.enter="search"
|
@keyup.enter="search"
|
||||||
@@ -72,16 +72,20 @@
|
|||||||
v-model="_searchParam[`${item.prop}`]"
|
v-model="_searchParam[`${item.prop}`]"
|
||||||
:data="item.options"
|
:data="item.options"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
|
multiple
|
||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
|
:check-strictly="false"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
style="width: 224px"
|
style="width: 224px"
|
||||||
clearable
|
clearable
|
||||||
|
:collapse-tags="true"
|
||||||
|
@change="handleTreeSelectChange(item)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<!-- 双 -->
|
<!-- 双 -->
|
||||||
<template v-if="item.type === 'inputs'">
|
<template v-if="item.type === 'inputs'">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="_searchParam[`${item.startProp}`]"
|
v-model="_searchParam[`${item.startProp}`]"
|
||||||
:placeholder="item.startPlaceholder"
|
:placeholder="item.startPlaceholder"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
@@ -91,7 +95,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<span style="margin: 0 3px">-</span>
|
<span style="margin: 0 3px">-</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="_searchParam[`${item.endProp}`]"
|
v-model="_searchParam[`${item.endProp}`]"
|
||||||
:placeholder="item.endPlaceholder"
|
:placeholder="item.endPlaceholder"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
@@ -130,7 +134,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="_searchParam[`${item.startProp}`]"
|
v-model="_searchParam[`${item.startProp}`]"
|
||||||
:placeholder="item.startPlaceholder"
|
:placeholder="item.startPlaceholder"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
@@ -140,7 +144,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<span style="margin: 0 3px">-</span>
|
<span style="margin: 0 3px">-</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="_searchParam[`${item.endProp}`]"
|
v-model="_searchParam[`${item.endProp}`]"
|
||||||
:placeholder="item.endPlaceholder"
|
:placeholder="item.endPlaceholder"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
@@ -178,7 +182,7 @@ const options = [
|
|||||||
label: "数字序列号"
|
label: "数字序列号"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
// const treeSelectValue = ref(null);
|
||||||
const props = defineProps<SearchFormItem>();
|
const props = defineProps<SearchFormItem>();
|
||||||
const _searchParam = computed(() => props.searchParam);
|
const _searchParam = computed(() => props.searchParam);
|
||||||
|
|
||||||
@@ -189,7 +193,7 @@ const handlePicker = (item: any) => {
|
|||||||
if (Array.isArray(_searchParam.value[prop]) && _searchParam.value[prop].length > 0) {
|
if (Array.isArray(_searchParam.value[prop]) && _searchParam.value[prop].length > 0) {
|
||||||
let _date: any = cloneDeep(_searchParam.value[prop]);
|
let _date: any = cloneDeep(_searchParam.value[prop]);
|
||||||
_date[0] = _date[0] + " " + "00:00:00";
|
_date[0] = _date[0] + " " + "00:00:00";
|
||||||
_date[1] = _date[1] + " " + "00:00:00";
|
_date[1] = _date[1] + " " + "23:59:59";
|
||||||
_searchParam.value[item.startDate] = _date.join(",");
|
_searchParam.value[item.startDate] = _date.join(",");
|
||||||
} else {
|
} else {
|
||||||
_searchParam.value[item.startDate] = "";
|
_searchParam.value[item.startDate] = "";
|
||||||
@@ -216,7 +220,14 @@ const remoteMethod = async (query: any, item: any) => {
|
|||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
const handleTreeSelectChange = (item: any) => {
|
||||||
|
if (_searchParam.value[item.prop].length) {
|
||||||
|
let values = cloneDeep(_searchParam.value[item.prop]);
|
||||||
|
_searchParam.value[item.prop1] = values.join(",");
|
||||||
|
} else {
|
||||||
|
_searchParam.value[item.prop1] = "";
|
||||||
|
}
|
||||||
|
};
|
||||||
const handleClear = (item: any) => {
|
const handleClear = (item: any) => {
|
||||||
item.options = [];
|
item.options = [];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,19 +12,19 @@ export const verificationInput = (item: any, _searchParam: any, selectInputValue
|
|||||||
//序列号区间值开始 限制只能输入正整数
|
//序列号区间值开始 限制只能输入正整数
|
||||||
if (startProp === "startNumber") {
|
if (startProp === "startNumber") {
|
||||||
_searchParam.value[startProp] = integerNumber(_searchParam.value[startProp]);
|
_searchParam.value[startProp] = integerNumber(_searchParam.value[startProp]);
|
||||||
if (selectInputValue === 1) {
|
if (selectInputValue == 1) {
|
||||||
_searchParam.value["serialNumberBegin"] = _searchParam.value[startProp];
|
_searchParam.value["serialNumberBegin"] = _searchParam.value[startProp];
|
||||||
}
|
}
|
||||||
if (selectInputValue === 2) {
|
if (selectInputValue == 2) {
|
||||||
_searchParam.value["numberCodeBegin"] = _searchParam.value[startProp];
|
_searchParam.value["numberCodeBegin"] = _searchParam.value[startProp];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (endProp === "endNumber") {
|
if (endProp === "endNumber") {
|
||||||
_searchParam.value[endProp] = integerNumber(_searchParam.value[endProp]);
|
_searchParam.value[endProp] = integerNumber(_searchParam.value[endProp]);
|
||||||
if (selectInputValue === 1) {
|
if (selectInputValue == 1) {
|
||||||
_searchParam.value["serialNumberEnd"] = _searchParam.value[endProp];
|
_searchParam.value["serialNumberEnd"] = _searchParam.value[endProp];
|
||||||
}
|
}
|
||||||
if (selectInputValue === 2) {
|
if (selectInputValue == 2) {
|
||||||
_searchParam.value["numberCodeEnd"] = _searchParam.value[endProp];
|
_searchParam.value["numberCodeEnd"] = _searchParam.value[endProp];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.el-form-item--default {
|
.el-form-item--default {
|
||||||
|
height: auto !important;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.form-item {
|
.form-item {
|
||||||
@@ -6,7 +7,7 @@
|
|||||||
height: 32px;
|
height: 32px;
|
||||||
margin-right: 12px !important;
|
margin-right: 12px !important;
|
||||||
.form-item-select {
|
.form-item-select {
|
||||||
width: 224px !important;
|
width: 254px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.form-box1 {
|
.form-box1 {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ import { ElNotification, formContextKey, formItemContextKey } from "element-plus
|
|||||||
import type { UploadProps, UploadRequestOptions } from "element-plus";
|
import type { UploadProps, UploadRequestOptions } from "element-plus";
|
||||||
|
|
||||||
interface UploadFileProps {
|
interface UploadFileProps {
|
||||||
imageUrl: string; // 图片地址 ==> 必传
|
imageUrl: any; // 图片地址 ==> 必传
|
||||||
api?: (params: any) => Promise<any>; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传
|
api?: (params: any) => Promise<any>; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传
|
||||||
drag?: boolean; // 是否支持拖拽上传 ==> 非必传(默认为 true)
|
drag?: boolean; // 是否支持拖拽上传 ==> 非必传(默认为 true)
|
||||||
disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false)
|
disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false)
|
||||||
@@ -73,7 +73,7 @@ const props = withDefaults(defineProps<UploadFileProps>(), {
|
|||||||
drag: true,
|
drag: true,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
fileSize: 5,
|
fileSize: 5,
|
||||||
fileType: () => ["image/jpeg", "image/png", "image/gif"],
|
fileType: () => ["image/jpeg", "image/png", "image/gif", "image/webp"],
|
||||||
height: "150px",
|
height: "150px",
|
||||||
width: "150px",
|
width: "150px",
|
||||||
borderRadius: "8px"
|
borderRadius: "8px"
|
||||||
@@ -102,7 +102,7 @@ const formItemContext = inject(formItemContextKey, void 0);
|
|||||||
const self_disabled = computed(() => {
|
const self_disabled = computed(() => {
|
||||||
return props.disabled || formContext?.disabled;
|
return props.disabled || formContext?.disabled;
|
||||||
});
|
});
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
/**
|
/**
|
||||||
* @description 图片上传
|
* @description 图片上传
|
||||||
* @param options upload 所有配置项
|
* @param options upload 所有配置项
|
||||||
@@ -151,7 +151,9 @@ const editImg = () => {
|
|||||||
* @param rawFile 选择的文件
|
* @param rawFile 选择的文件
|
||||||
* */
|
* */
|
||||||
const beforeUpload: UploadProps["beforeUpload"] = rawFile => {
|
const beforeUpload: UploadProps["beforeUpload"] = rawFile => {
|
||||||
|
// console.log(rowFile.type, "=============1111111111");
|
||||||
const imgSize = rawFile.size / 1024 / 1024 < props.fileSize;
|
const imgSize = rawFile.size / 1024 / 1024 < props.fileSize;
|
||||||
|
|
||||||
const imgType = props.fileType.includes(rawFile.type as File.ImageMimeType);
|
const imgType = props.fileType.includes(rawFile.type as File.ImageMimeType);
|
||||||
|
|
||||||
if (!imgType)
|
if (!imgType)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const props = withDefaults(defineProps<UploadFileProps>(), {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
limit: 9,
|
limit: 9,
|
||||||
fileSize: 5,
|
fileSize: 5,
|
||||||
fileType: () => ["image/jpeg", "image/png", "image/gif"],
|
fileType: () => ["image/jpeg", "image/png", "image/gif", "image/webp"],
|
||||||
height: "150px",
|
height: "150px",
|
||||||
width: "150px",
|
width: "150px",
|
||||||
borderRadius: "8px"
|
borderRadius: "8px"
|
||||||
@@ -75,7 +75,11 @@ const $router = useRouter();
|
|||||||
const routerValueName: string = $router.currentRoute.value.name as string;
|
const routerValueName: string = $router.currentRoute.value.name as string;
|
||||||
const routerObj: any = {
|
const routerObj: any = {
|
||||||
articleEditIndex: "article",
|
articleEditIndex: "article",
|
||||||
productEditIndex: "product"
|
productEditIndex: "product",
|
||||||
|
bannerListIndex: "banner",
|
||||||
|
downloadListIndex: "download",
|
||||||
|
videoListIndex: "video",
|
||||||
|
QAListIndex: "QA"
|
||||||
};
|
};
|
||||||
const routerName = ref(routerObj[routerValueName]);
|
const routerName = ref(routerObj[routerValueName]);
|
||||||
// 获取 el-form 组件上下文
|
// 获取 el-form 组件上下文
|
||||||
@@ -88,7 +92,7 @@ const self_disabled = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const _fileList = ref<UploadUserFile[]>(props.fileList);
|
const _fileList = ref<UploadUserFile[]>(props.fileList);
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
// 监听 props.fileList 列表默认值改变
|
// 监听 props.fileList 列表默认值改变
|
||||||
watch(
|
watch(
|
||||||
() => props.fileList,
|
() => props.fileList,
|
||||||
|
|||||||
@@ -9,13 +9,15 @@
|
|||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:http-request="handleHttpUpload"
|
:http-request="handleHttpUpload"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-success="uploadSuccess"
|
|
||||||
:on-error="uploadError"
|
:on-error="uploadError"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:accept="fileType.join(',')"
|
:accept="fileType.join(',')"
|
||||||
|
ref="upload"
|
||||||
>
|
>
|
||||||
|
<!-- :on-success="uploadSuccess" -->
|
||||||
<!-- disabled -->
|
<!-- disabled -->
|
||||||
<el-input v-model="videoShowUrl" style="width: 414px" @click.stop @input="handleInput" disabled>
|
<el-input v-model="videoShowUrl" style="width: 414px" @click.stop @input="handleInput">
|
||||||
<template #prepend
|
<template #prepend
|
||||||
><el-icon :size="20" style="cursor: pointer"><FolderAdd /></el-icon
|
><el-icon :size="20" style="cursor: pointer"><FolderAdd /></el-icon
|
||||||
></template>
|
></template>
|
||||||
@@ -33,11 +35,12 @@ import { FolderAdd } from "@element-plus/icons-vue";
|
|||||||
import { ref, computed, inject } from "vue";
|
import { ref, computed, inject } from "vue";
|
||||||
import { generateUUID } from "@/utils";
|
import { generateUUID } from "@/utils";
|
||||||
import { uploadVideo } from "@/api/modules/upload";
|
import { uploadVideo } from "@/api/modules/upload";
|
||||||
|
import { genFileId } from "element-plus";
|
||||||
import { ElNotification, formContextKey, formItemContextKey } from "element-plus";
|
import { ElNotification, formContextKey, formItemContextKey } from "element-plus";
|
||||||
import type { UploadProps, UploadRequestOptions } from "element-plus";
|
import type { UploadProps, UploadRawFile, UploadInstance } from "element-plus";
|
||||||
|
//UploadRequestOptions
|
||||||
interface UploadFileProps {
|
interface UploadFileProps {
|
||||||
videoUrl: string; // 图片地址 ==> 必传
|
videoUrl: any; // 图片地址 ==> 必传
|
||||||
api?: (params: any) => Promise<any>; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传
|
api?: (params: any) => Promise<any>; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传
|
||||||
width?: string;
|
width?: string;
|
||||||
disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false)
|
disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false)
|
||||||
@@ -45,7 +48,7 @@ interface UploadFileProps {
|
|||||||
fileType?: any[]; //视频类型限制 ==> 非必传(默认为[".mp4", ".avi", ".mov"])
|
fileType?: any[]; //视频类型限制 ==> 非必传(默认为[".mp4", ".avi", ".mov"])
|
||||||
borderRadius?: string; // 组件边框圆角 ==> 非必传(默认为 8px)
|
borderRadius?: string; // 组件边框圆角 ==> 非必传(默认为 8px)
|
||||||
}
|
}
|
||||||
const videoShowUrl = ref(null);
|
const videoShowUrl = ref<any>(null);
|
||||||
// 接受父组件参数
|
// 接受父组件参数
|
||||||
const props = withDefaults(defineProps<UploadFileProps>(), {
|
const props = withDefaults(defineProps<UploadFileProps>(), {
|
||||||
videoUrl: "",
|
videoUrl: "",
|
||||||
@@ -60,13 +63,16 @@ const routerValueName: string = $router.currentRoute.value.name as string;
|
|||||||
const routerObj: any = {
|
const routerObj: any = {
|
||||||
articleEditIndex: "article",
|
articleEditIndex: "article",
|
||||||
productEditIndex: "product",
|
productEditIndex: "product",
|
||||||
videoListIndex: "video"
|
bannerListIndex: "banner",
|
||||||
|
downloadListIndex: "download",
|
||||||
|
videoListIndex: "video",
|
||||||
|
QAListIndex: "QA"
|
||||||
};
|
};
|
||||||
const routerName = ref(routerObj[routerValueName]);
|
const routerName = ref(routerObj[routerValueName]);
|
||||||
|
|
||||||
// 生成组件唯一id
|
// 生成组件唯一id
|
||||||
const uuid = ref("id-" + generateUUID());
|
const uuid = ref("id-" + generateUUID());
|
||||||
|
const upload = ref<UploadInstance>();
|
||||||
// 获取 el-form 组件上下文
|
// 获取 el-form 组件上下文
|
||||||
const formContext = inject(formContextKey, void 0);
|
const formContext = inject(formContextKey, void 0);
|
||||||
// 获取 el-form-item 组件上下文
|
// 获取 el-form-item 组件上下文
|
||||||
@@ -83,22 +89,45 @@ interface UploadEmits {
|
|||||||
(e: "update:videoUrl", value: string): void;
|
(e: "update:videoUrl", value: string): void;
|
||||||
}
|
}
|
||||||
const emit = defineEmits<UploadEmits>();
|
const emit = defineEmits<UploadEmits>();
|
||||||
const handleHttpUpload = async (options: UploadRequestOptions) => {
|
const handleHttpUpload = async (options: any) => {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("video", options.file);
|
formData.append("video", options.file);
|
||||||
try {
|
try {
|
||||||
const api = props.api ?? uploadVideo;
|
const api = props.api ?? uploadVideo;
|
||||||
const { data } = await api(formData, routerName.value);
|
const { data } = await api(formData, routerName.value);
|
||||||
emit("update:videoUrl", data.path);
|
if (data.path) {
|
||||||
// 调用 el-form 内部的校验方法(可自动校验)
|
ElNotification({
|
||||||
formItemContext?.prop && formContext?.validateField([formItemContext.prop as string]);
|
title: "温馨提示",
|
||||||
|
message: "视频上传成功!",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
|
emit("update:videoUrl", data.path);
|
||||||
|
// 调用 el-form 内部的校验方法(可自动校验)
|
||||||
|
formItemContext?.prop && formContext?.validateField([formItemContext.prop as string]);
|
||||||
|
} else {
|
||||||
|
videoShowUrl.value = "";
|
||||||
|
emit("update:videoUrl", "");
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
videoShowUrl.value = "";
|
||||||
|
emit("update:videoUrl", "");
|
||||||
|
if (!error) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
options.onError(error as any);
|
options.onError(error as any);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const handleExceed: UploadProps["onExceed"] = files => {
|
||||||
|
upload.value!.clearFiles();
|
||||||
|
const file = files[0] as UploadRawFile;
|
||||||
|
file.uid = genFileId();
|
||||||
|
let options: any = {
|
||||||
|
file
|
||||||
|
};
|
||||||
|
handleHttpUpload(options);
|
||||||
|
};
|
||||||
const handleInput = () => {
|
const handleInput = () => {
|
||||||
console.log("会触发吗");
|
emit("update:videoUrl", videoShowUrl.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,13 +157,13 @@ const beforeUpload: UploadProps["beforeUpload"] = rawFile => {
|
|||||||
/**
|
/**
|
||||||
* @description 视频上传成功
|
* @description 视频上传成功
|
||||||
* */
|
* */
|
||||||
const uploadSuccess = () => {
|
// const uploadSuccess = () => {
|
||||||
ElNotification({
|
// ElNotification({
|
||||||
title: "温馨提示",
|
// title: "温馨提示",
|
||||||
message: "视频上传成功!",
|
// message: "视频上传成功!",
|
||||||
type: "success"
|
// type: "success"
|
||||||
});
|
// });
|
||||||
};
|
// };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 视频上传错误
|
* @description 视频上传错误
|
||||||
@@ -149,7 +178,9 @@ const uploadError = () => {
|
|||||||
watch(
|
watch(
|
||||||
() => props.videoUrl,
|
() => props.videoUrl,
|
||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
videoShowUrl.value = newVal;
|
if (newVal) {
|
||||||
|
videoShowUrl.value = newVal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -26,3 +26,6 @@
|
|||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
span img {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Toolbar v-if="!hideToolBar" class="editor-toolbar" :editor="editorRef" :default-config="toolbarConfig" :mode="mode" />
|
<Toolbar v-if="!hideToolBar" class="editor-toolbar" :editor="editorRef" :default-config="toolbarConfig" :mode="mode" />
|
||||||
<Editor
|
<Editor
|
||||||
v-model="valueHtml"
|
v-model="valueHtml"
|
||||||
class="editor-content'"
|
class="editor-content"
|
||||||
:style="{ height }"
|
:style="{ height }"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
:default-config="editorConfig"
|
:default-config="editorConfig"
|
||||||
@@ -20,7 +20,7 @@ import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
|
|||||||
import { uploadImg, uploadVideo } from "@/api/modules/upload";
|
import { uploadImg, uploadVideo } from "@/api/modules/upload";
|
||||||
import "@wangeditor/editor/dist/css/style.css";
|
import "@wangeditor/editor/dist/css/style.css";
|
||||||
import { formContextKey, formItemContextKey } from "element-plus";
|
import { formContextKey, formItemContextKey } from "element-plus";
|
||||||
|
// import { cloneDeep } from "lodash-es";
|
||||||
// 富文本 DOM 元素
|
// 富文本 DOM 元素
|
||||||
const editorRef = shallowRef();
|
const editorRef = shallowRef();
|
||||||
|
|
||||||
@@ -28,11 +28,17 @@ const editorRef = shallowRef();
|
|||||||
const handleCreated = (editor: any) => {
|
const handleCreated = (editor: any) => {
|
||||||
editorRef.value = editor;
|
editorRef.value = editor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(editorRef.value, "=editorRef.value=");
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
const routerValueName: string = $router.currentRoute.value.name as string;
|
const routerValueName: string = $router.currentRoute.value.name as string;
|
||||||
const routerObj: any = {
|
const routerObj: any = {
|
||||||
articleEditIndex: "article",
|
articleEditIndex: "article",
|
||||||
productEditIndex: "product"
|
productEditIndex: "product",
|
||||||
|
bannerListIndex: "banner",
|
||||||
|
downloadListIndex: "download",
|
||||||
|
videoListIndex: "video",
|
||||||
|
QAListIndex: "QA"
|
||||||
};
|
};
|
||||||
const routerName = ref(routerObj[routerValueName]);
|
const routerName = ref(routerObj[routerValueName]);
|
||||||
// 接收父组件参数,并设置默认值
|
// 接收父组件参数,并设置默认值
|
||||||
@@ -51,12 +57,23 @@ const props = withDefaults(defineProps<RichEditorProps>(), {
|
|||||||
excludeKeys: []
|
excludeKeys: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
editorConfig: () => {
|
editorConfig: () => {
|
||||||
return {
|
return {
|
||||||
placeholder: "请输入内容...",
|
placeholder: "请输入内容...",
|
||||||
MENU_CONF: {}
|
MENU_CONF: {}
|
||||||
|
// parseElemHtml: (elemHtml: string, elem: HTMLElement, editor: any) => {
|
||||||
|
// console.log(editor, "========editor=========");
|
||||||
|
// console.log(elem.tagName, "=elem.tagName=");
|
||||||
|
// if (elem.tagName === "SPAN" && elem.querySelector("img")) {
|
||||||
|
// // 确保 span 元素可以正确显示 img
|
||||||
|
// elem.style.display = "inline-block";
|
||||||
|
// }
|
||||||
|
// return elemHtml;
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
height: "500px",
|
height: "500px",
|
||||||
mode: "default",
|
mode: "default",
|
||||||
hideToolBar: false,
|
hideToolBar: false,
|
||||||
@@ -80,7 +97,9 @@ type EmitProps = {
|
|||||||
(e: "update:value", val: string): void;
|
(e: "update:value", val: string): void;
|
||||||
(e: "check-validate"): void;
|
(e: "check-validate"): void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const emit = defineEmits<EmitProps>();
|
const emit = defineEmits<EmitProps>();
|
||||||
|
|
||||||
const valueHtml = computed({
|
const valueHtml = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.value;
|
return props.value;
|
||||||
@@ -108,7 +127,7 @@ props.editorConfig.MENU_CONF!["uploadImage"] = {
|
|||||||
const result = await uploadImg(formData, routerName.value);
|
const result = await uploadImg(formData, routerName.value);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
insertFn(import.meta.env.VITE_APP_API_BASE_UPLOAD_URL + data.url);
|
insertFn(import.meta.env.VITE_APP_API_BASE_UPLOAD_URL + data.path);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|||||||
1
src/components/WangEditor/text.txt
Normal file
1
src/components/WangEditor/text.txt
Normal file
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
style="width: 440px"
|
style="width: 440px"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
v-model.trim="_ruleForm[`${item.prop}`]"
|
v-model="_ruleForm[`${item.prop}`]"
|
||||||
clearable
|
clearable
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
@blur="handleInputBlur"
|
@blur="handleInputBlur"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<template v-if="item.type === 'inputSelect'">
|
<template v-if="item.type === 'inputSelect'">
|
||||||
<el-input
|
<el-input
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
v-model.trim="_ruleForm[`${item.prop}`]"
|
v-model="_ruleForm[`${item.prop}`]"
|
||||||
clearable
|
clearable
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
@blur="handleInputBlur"
|
@blur="handleInputBlur"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<template v-if="item.type === 'inputButton'">
|
<template v-if="item.type === 'inputButton'">
|
||||||
<el-input
|
<el-input
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
v-model.trim="_ruleForm[`${item.prop}`]"
|
v-model="_ruleForm[`${item.prop}`]"
|
||||||
clearable
|
clearable
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
>
|
>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
:min="1"
|
:min="1"
|
||||||
:max="9999"
|
:max="9999"
|
||||||
:controls="true"
|
:controls="true"
|
||||||
v-model.trim="_ruleForm[`${item.prop}`]"
|
v-model="_ruleForm[`${item.prop}`]"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
:maxlength="item.maxLength"
|
:maxlength="item.maxLength"
|
||||||
@@ -92,8 +92,9 @@
|
|||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
clearable
|
clearable
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
format="YYYY/MM/DD hh:mm:ss"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
value-format="YYYY-MM-DD hh:mm:ss"
|
date-format="MMM DD, YYYY"
|
||||||
|
time-format="HH:mm"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'radio'">
|
<template v-if="item.type === 'radio'">
|
||||||
@@ -107,7 +108,17 @@
|
|||||||
>
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- <template v-if="item.type === 'radio1'">
|
||||||
|
<el-radio-group v-model="_ruleForm[`${item.prop}`]">
|
||||||
|
<el-radio
|
||||||
|
:value="option.value"
|
||||||
|
:label="option.value"
|
||||||
|
v-for="(option, optionIndex) in item.options"
|
||||||
|
:key="optionIndex"
|
||||||
|
>{{ option.label }}</el-radio
|
||||||
|
>
|
||||||
|
</el-radio-group>
|
||||||
|
</template> -->
|
||||||
<template v-if="item.type === 'upImg'">
|
<template v-if="item.type === 'upImg'">
|
||||||
<UploadImg v-model:image-url="_ruleForm[`${item.prop}`]">
|
<UploadImg v-model:image-url="_ruleForm[`${item.prop}`]">
|
||||||
<template #tip>
|
<template #tip>
|
||||||
@@ -123,7 +134,13 @@
|
|||||||
<UploadVideo width="440px" v-model:video-url="_ruleForm[`${item.prop}`]"> </UploadVideo>
|
<UploadVideo width="440px" v-model:video-url="_ruleForm[`${item.prop}`]"> </UploadVideo>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'select'">
|
<template v-if="item.type === 'select'">
|
||||||
<el-select style="width: 240px" v-model="_ruleForm[`${item.prop}`]" :placeholder="item.placeholder" clearable>
|
<el-select
|
||||||
|
style="width: 240px"
|
||||||
|
v-model="_ruleForm[`${item.prop}`]"
|
||||||
|
:placeholder="item.placeholder"
|
||||||
|
clearable
|
||||||
|
@change="handleSelectChange(_ruleForm[`${item.prop}`], item.prop)"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="option.label"
|
:label="option.label"
|
||||||
:value="option.value"
|
:value="option.value"
|
||||||
@@ -141,7 +158,8 @@
|
|||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
check-strictly
|
check-strictly
|
||||||
@change="handleSelectChange(_ruleForm[`${item.prop}`])"
|
@change="handleSelectChange(_ruleForm[`${item.prop}`], item.prop)"
|
||||||
|
style="max-width: 340px"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'treeSelects'">
|
<template v-if="item.type === 'treeSelects'">
|
||||||
@@ -153,12 +171,15 @@
|
|||||||
show-checkbox
|
show-checkbox
|
||||||
check-strictly
|
check-strictly
|
||||||
check-on-click-node
|
check-on-click-node
|
||||||
style="width: 240px"
|
style="width: 340px"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'treeSelectInput'">
|
<template v-if="item.type === 'treeSelectInput'">
|
||||||
<slot />
|
<slot />
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="item.type === 'WangEditor'">
|
||||||
|
<Editor v-model:content="_ruleForm[`${item.prop}`]"></Editor>
|
||||||
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -168,6 +189,7 @@
|
|||||||
import type { FormInstance, FormRules } from "element-plus";
|
import type { FormInstance, FormRules } from "element-plus";
|
||||||
import UploadVideo from "@/components/Upload/UploadVideo.vue";
|
import UploadVideo from "@/components/Upload/UploadVideo.vue";
|
||||||
import UploadImg from "@/components/Upload/UploadImg.vue";
|
import UploadImg from "@/components/Upload/UploadImg.vue";
|
||||||
|
import Editor from "@/components/Editor/index.vue";
|
||||||
interface IProps {
|
interface IProps {
|
||||||
ruleForm: { [key: string]: any };
|
ruleForm: { [key: string]: any };
|
||||||
formData: any[];
|
formData: any[];
|
||||||
@@ -201,8 +223,8 @@ const handleInputButtonClick = () => {
|
|||||||
const handleInputBlur = () => {
|
const handleInputBlur = () => {
|
||||||
emits("handleInputBlurEmits");
|
emits("handleInputBlurEmits");
|
||||||
};
|
};
|
||||||
const handleSelectChange = (params: any) => {
|
const handleSelectChange = (params: any, prop: any) => {
|
||||||
emits("handleSelectChangeEmits", { id: params });
|
emits("handleSelectChangeEmits", { id: params, prop });
|
||||||
};
|
};
|
||||||
// const handleTreesSelectChange = (params: any) => {
|
// const handleTreesSelectChange = (params: any) => {
|
||||||
// emits("handleTreesSelectChangeEmits", params);
|
// emits("handleTreesSelectChangeEmits", params);
|
||||||
|
|||||||
@@ -87,9 +87,10 @@ export const useTable = (
|
|||||||
// 处理查询参数,可以给查询参数加自定义前缀操作
|
// 处理查询参数,可以给查询参数加自定义前缀操作
|
||||||
let nowSearchParam: Table.StateProps["searchParam"] = {};
|
let nowSearchParam: Table.StateProps["searchParam"] = {};
|
||||||
// 防止手动清空输入框携带参数(这里可以自定义查询参数前缀)
|
// 防止手动清空输入框携带参数(这里可以自定义查询参数前缀)
|
||||||
|
console.log(state.searchParam, "=state.searchParam=");
|
||||||
for (let key in state.searchParam) {
|
for (let key in state.searchParam) {
|
||||||
//剔除日期参数
|
//剔除日期参数
|
||||||
if (key !== "Time" && key !== "Time1") {
|
if (key !== "Time" && key !== "Time1" && key !== "treeIds") {
|
||||||
// * 某些情况下参数为 false/0 也应该携带参数
|
// * 某些情况下参数为 false/0 也应该携带参数
|
||||||
if (state.searchParam[key] || state.searchParam[key] === false || state.searchParam[key] === 0) {
|
if (state.searchParam[key] || state.searchParam[key] === false || state.searchParam[key] === 0) {
|
||||||
nowSearchParam[key] = state.searchParam[key];
|
nowSearchParam[key] = state.searchParam[key];
|
||||||
|
|||||||
@@ -42,27 +42,28 @@ import { ref } from "vue";
|
|||||||
import { logoutApi } from "@/api/modules/login";
|
import { logoutApi } from "@/api/modules/login";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
|
|
||||||
import { ElMessageBox } from "element-plus";
|
import { ElMessageBox } from "element-plus";
|
||||||
import { outLogin } from "@/utils/outLogin";
|
import { outLogin } from "@/utils/outLogin";
|
||||||
//getLanguageCutoverApi
|
|
||||||
import { getLanguageListApi, getLanguageCutoverApi } from "@/api/modules/global";
|
import { getLanguageListApi, getLanguageCutoverApi } from "@/api/modules/global";
|
||||||
const userStore: any = useUserStore();
|
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
document.cookie = `lang=zh_cn`;
|
document.cookie = `lang=zh_cn`;
|
||||||
const langs = ref<any>([]);
|
const langs = ref<any>([]);
|
||||||
const name = ref("");
|
const name = ref("");
|
||||||
//站点列表
|
|
||||||
|
// 站点列表
|
||||||
const getLanguageList = async () => {
|
const getLanguageList = async () => {
|
||||||
const result = await getLanguageListApi();
|
const result = await getLanguageListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
langs.value = data;
|
langs.value = data;
|
||||||
getLanguageCutover(data[0]?.id);
|
let id = userStore?.languageType ? userStore?.languageType : data[0]?.id;
|
||||||
|
getLanguageCutover(id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getLanguageList();
|
getLanguageList();
|
||||||
//站点切换接口
|
|
||||||
|
// 站点切换接口
|
||||||
const getLanguageCutover = async (id: any) => {
|
const getLanguageCutover = async (id: any) => {
|
||||||
const result = await getLanguageCutoverApi(id);
|
const result = await getLanguageCutoverApi(id);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
@@ -73,10 +74,12 @@ const getLanguageCutover = async (id: any) => {
|
|||||||
name.value = names[0]?.country_name;
|
name.value = names[0]?.country_name;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//站点切换事件
|
|
||||||
|
// 站点切换事件
|
||||||
const handleCommand = (val: string) => {
|
const handleCommand = (val: string) => {
|
||||||
getLanguageCutover(val);
|
getLanguageCutover(val);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 退出登录
|
// 退出登录
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
ElMessageBox.confirm("您是否确认重新登录?", "温馨提示", {
|
ElMessageBox.confirm("您是否确认重新登录?", "温馨提示", {
|
||||||
@@ -84,7 +87,7 @@ const logout = () => {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
//1.退出登录
|
// 1. 退出登录
|
||||||
const result: any = await logoutApi();
|
const result: any = await logoutApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
outLogin();
|
outLogin();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const { keepAliveName } = storeToRefs(keepAliveStore);
|
|||||||
const isRouterShow = ref(true);
|
const isRouterShow = ref(true);
|
||||||
const refreshCurrentPage = (val: boolean) => {
|
const refreshCurrentPage = (val: boolean) => {
|
||||||
isRouterShow.value = val;
|
isRouterShow.value = val;
|
||||||
|
keepAliveStore.setKeepAliveName([]);
|
||||||
};
|
};
|
||||||
|
|
||||||
provide("refresh", refreshCurrentPage);
|
provide("refresh", refreshCurrentPage);
|
||||||
|
|||||||
@@ -34,30 +34,38 @@ import { useTabsStore } from "@/stores/modules/tabs";
|
|||||||
import { useGlobalStore } from "@/stores/modules/global";
|
import { useGlobalStore } from "@/stores/modules/global";
|
||||||
import { useKeepAliveStore } from "@/stores/modules/keepAlive";
|
import { useKeepAliveStore } from "@/stores/modules/keepAlive";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
// import { initCache } from "./init/init";
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const tabStore = useTabsStore();
|
const tabStore = useTabsStore();
|
||||||
const globalStore = useGlobalStore();
|
const globalStore = useGlobalStore();
|
||||||
const keepAliveStore = useKeepAliveStore();
|
const keepAliveStore = useKeepAliveStore();
|
||||||
|
|
||||||
// // refresh current page
|
// refresh current page
|
||||||
// const refreshCurrentPage: Function = inject("refresh") as Function;
|
const refreshCurrentPage: Function = inject("refresh") as Function;
|
||||||
|
|
||||||
// const refresh = async () => {
|
|
||||||
// // initCache(data);
|
|
||||||
// setTimeout(() => {
|
|
||||||
// keepAliveStore.removeKeepAliveName(route.name as string);
|
|
||||||
// refreshCurrentPage(false);
|
|
||||||
// nextTick(() => {
|
|
||||||
// keepAliveStore.addKeepAliveName(route.name as string);
|
|
||||||
// refreshCurrentPage(true);
|
|
||||||
// });
|
|
||||||
// }, 300);
|
|
||||||
// };
|
|
||||||
|
|
||||||
|
const refresh = async () => {
|
||||||
|
// initCache(data);
|
||||||
|
setTimeout(() => {
|
||||||
|
keepAliveStore.removeKeepAliveName(route.name as string);
|
||||||
|
refreshCurrentPage(false);
|
||||||
|
nextTick(() => {
|
||||||
|
keepAliveStore.addKeepAliveName(route.name as string);
|
||||||
|
refreshCurrentPage(true);
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
|
};
|
||||||
|
watch(
|
||||||
|
() => userStore.languageType,
|
||||||
|
(newVal: any) => {
|
||||||
|
if (!newVal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
);
|
||||||
// maximize current page
|
// maximize current page
|
||||||
const maximize = () => {
|
const maximize = () => {
|
||||||
globalStore.setGlobalState("maximize", true);
|
globalStore.setGlobalState("maximize", true);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import { useTabsStore } from "@/stores/modules/tabs";
|
|||||||
import { useAuthStore } from "@/stores/modules/auth";
|
import { useAuthStore } from "@/stores/modules/auth";
|
||||||
import { useKeepAliveStore } from "@/stores/modules/keepAlive";
|
import { useKeepAliveStore } from "@/stores/modules/keepAlive";
|
||||||
import { TabsPaneContext, TabPaneName } from "element-plus";
|
import { TabsPaneContext, TabPaneName } from "element-plus";
|
||||||
|
|
||||||
import MoreButton from "./components/MoreButton.vue";
|
import MoreButton from "./components/MoreButton.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -55,9 +56,6 @@ watch(
|
|||||||
() => {
|
() => {
|
||||||
if (route.meta.isFull) return;
|
if (route.meta.isFull) return;
|
||||||
tabsMenuValue.value = route.fullPath;
|
tabsMenuValue.value = route.fullPath;
|
||||||
// const TITLES_OBJ = {
|
|
||||||
// "/articleManagement/list/edit?type=add": "添加文章"
|
|
||||||
// };
|
|
||||||
let title: any = route.query.title ? route.query.title : route.meta.title;
|
let title: any = route.query.title ? route.query.title : route.meta.title;
|
||||||
const tabsParams = {
|
const tabsParams = {
|
||||||
icon: route.meta.icon as string,
|
icon: route.meta.icon as string,
|
||||||
|
|||||||
@@ -33,8 +33,10 @@ import errorHandler from "@/utils/errorHandler";
|
|||||||
import VXETable from "vxe-table";
|
import VXETable from "vxe-table";
|
||||||
import "vxe-table/lib/style.css";
|
import "vxe-table/lib/style.css";
|
||||||
|
|
||||||
|
import mavonEditor from "mavon-editor";
|
||||||
|
import "mavon-editor/dist/css/index.css";
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
app.config.errorHandler = errorHandler;
|
app.config.errorHandler = errorHandler;
|
||||||
|
|
||||||
app.use(directives).use(router).use(pinia).use(VXETable).mount("#app");
|
app.use(directives).use(router).use(pinia).use(VXETable).use(mavonEditor).mount("#app");
|
||||||
|
|||||||
@@ -97,6 +97,8 @@
|
|||||||
|
|
||||||
// table-search 表格搜索样式
|
// table-search 表格搜索样式
|
||||||
.table-search {
|
.table-search {
|
||||||
|
// height: auto;
|
||||||
|
// max-height: 80px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item__content > * {
|
.el-form-item__content > * {
|
||||||
@@ -268,3 +270,6 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.el-message__wrapper {
|
||||||
|
z-index: 9999; /* 一个较大的值,确保在抽屉之上 */
|
||||||
|
}
|
||||||
|
|||||||
15
src/utils/convertSpanToDiv.ts
Normal file
15
src/utils/convertSpanToDiv.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export const convertSpanToDiv = (html: any) => {
|
||||||
|
const parser = new DOMParser();
|
||||||
|
const doc = parser.parseFromString(html, "text/html");
|
||||||
|
const spans = doc.querySelectorAll("span");
|
||||||
|
if (!spans.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
spans.forEach((span: any) => {
|
||||||
|
if (span.querySelector("img")) {
|
||||||
|
const img = span.querySelector("img");
|
||||||
|
span.parentNode.replaceChild(img, span);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return doc.body.innerHTML;
|
||||||
|
};
|
||||||
13
src/utils/recursiveCompare.ts
Normal file
13
src/utils/recursiveCompare.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
export const recursiveCompare = (item: any, targetId: any) => {
|
||||||
|
if (typeof item === "object" && item !== null) {
|
||||||
|
if (item.value !== undefined && item.value === targetId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
for (const key in item) {
|
||||||
|
if (recursiveCompare(item[key], targetId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
1
src/utils/url.ts
Normal file
1
src/utils/url.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<el-tab-pane label="问答详细" name="third">
|
<el-tab-pane label="问答详细" name="third">
|
||||||
<div style="width: 1280px; margin: 0 auto">
|
<div style="width: 1280px; margin: 0 auto">
|
||||||
<WangEditor v-model:value="dataStore.value" />
|
<Editor v-model:content="dataStore.editRuleForm.answer" />
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -32,7 +32,8 @@
|
|||||||
import rulesForm from "@/components/rulesForm/index.vue";
|
import rulesForm from "@/components/rulesForm/index.vue";
|
||||||
import { getQAListDetailsApi, getQAListEditUpApi, getQAListSaveApi } from "@/api/modules/QAList";
|
import { getQAListDetailsApi, getQAListEditUpApi, getQAListSaveApi } from "@/api/modules/QAList";
|
||||||
import { ref, reactive } from "vue";
|
import { ref, reactive } from "vue";
|
||||||
import WangEditor from "@/components/WangEditor/index.vue";
|
// import { convertSpanToDiv } from "@/utils/convertSpanToDiv";
|
||||||
|
import Editor from "@/components/Editor/index.vue";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
|
import { EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
@@ -40,7 +41,7 @@ const $route = useRoute();
|
|||||||
const activeName = ref("basicInfo");
|
const activeName = ref("basicInfo");
|
||||||
//数据集合
|
//数据集合
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
value: "",
|
// value: "",
|
||||||
editRuleForm: cloneDeep(EDIT_RULE_FORM),
|
editRuleForm: cloneDeep(EDIT_RULE_FORM),
|
||||||
editFormData: cloneDeep(EDIT_FORM_DATA),
|
editFormData: cloneDeep(EDIT_FORM_DATA),
|
||||||
rules: RULES
|
rules: RULES
|
||||||
@@ -49,7 +50,6 @@ const formRef: any = ref(null);
|
|||||||
//详情
|
//详情
|
||||||
const getQAListDetails = async () => {
|
const getQAListDetails = async () => {
|
||||||
let id = $route.query.id;
|
let id = $route.query.id;
|
||||||
console.log(id, "=========id========");
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -58,12 +58,16 @@ const getQAListDetails = async () => {
|
|||||||
const { data } = result;
|
const { data } = result;
|
||||||
//这里是传给基本信息组件的表单数据
|
//这里是传给基本信息组件的表单数据
|
||||||
dataStore.editRuleForm = cloneDeep(data);
|
dataStore.editRuleForm = cloneDeep(data);
|
||||||
|
// dataStore.editRuleForm.answer = convertSpanToDiv(dataStore.editRuleForm.answer);
|
||||||
|
|
||||||
|
dataStore.value = data.answer;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getQAListDetails();
|
getQAListDetails();
|
||||||
|
|
||||||
//更新
|
//更新
|
||||||
const getQAListEditUp = async () => {
|
const getQAListEditUp = async () => {
|
||||||
|
// dataStore.editRuleForm.answer = dataStore.value;
|
||||||
const result: any = await getQAListEditUpApi(dataStore.editRuleForm);
|
const result: any = await getQAListEditUpApi(dataStore.editRuleForm);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
@@ -72,6 +76,7 @@ const getQAListEditUp = async () => {
|
|||||||
};
|
};
|
||||||
//新增 getQAListSaveApi
|
//新增 getQAListSaveApi
|
||||||
const getQAListSave = async () => {
|
const getQAListSave = async () => {
|
||||||
|
// dataStore.editRuleForm.answer = dataStore.value;
|
||||||
const result: any = await getQAListSaveApi(dataStore.editRuleForm);
|
const result: any = await getQAListSaveApi(dataStore.editRuleForm);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
@@ -88,6 +93,10 @@ const handleReset = () => {
|
|||||||
const resetFields = () => {
|
const resetFields = () => {
|
||||||
if (!formRef.value!.ruleFormRef) return;
|
if (!formRef.value!.ruleFormRef) return;
|
||||||
formRef!.value!.ruleFormRef.resetFields();
|
formRef!.value!.ruleFormRef.resetFields();
|
||||||
|
for (let key in dataStore.editRuleForm) {
|
||||||
|
dataStore.editRuleForm[key] = "";
|
||||||
|
}
|
||||||
|
// dataStore.value = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>
|
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="QAListIndex">
|
<script setup lang="ts" name="QAListIndex">
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { integerRexg } from "@/utils/regexp/index";
|
import { integerRexg } from "@/utils/regexp/index";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
|
|||||||
@@ -46,34 +46,20 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
value: 0
|
value: 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "pid",
|
||||||
|
placeholder: "请选择",
|
||||||
|
type: "treeSelect",
|
||||||
|
label: "所属分类: ",
|
||||||
|
options: []
|
||||||
}
|
}
|
||||||
|
|
||||||
// {
|
|
||||||
// prop: "seo_title",
|
|
||||||
// placeholder: "请输入",
|
|
||||||
// type: "input",
|
|
||||||
// label: "SEO标题: "
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// prop: "seo_keywords",
|
|
||||||
// placeholder: "请输入",
|
|
||||||
// type: "input",
|
|
||||||
// label: "SEO关键词: "
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// prop: "seo_desc",
|
|
||||||
// placeholder: "请输入",
|
|
||||||
// type: "input",
|
|
||||||
// label: "SEO描述: "
|
|
||||||
// }
|
|
||||||
];
|
];
|
||||||
export const EDIT_RULE_FORM = {
|
export const EDIT_RULE_FORM = {
|
||||||
is_show: 1,
|
is_show: 1,
|
||||||
seo_desc: "",
|
|
||||||
seo_keywords: "",
|
|
||||||
seo_title: "",
|
|
||||||
sort: 1,
|
sort: 1,
|
||||||
name: ""
|
name: "",
|
||||||
|
pid: 0
|
||||||
};
|
};
|
||||||
// editRuleForm: {},
|
// editRuleForm: {},
|
||||||
//editFormData: [],
|
//editFormData: [],
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export const RULES = {
|
export const RULES = {
|
||||||
name: [{ required: true, message: "文章分类名称不能为空 ! ", trigger: "blur" }],
|
name: [{ required: true, message: "文章分类名称不能为空 ! ", trigger: "blur" }],
|
||||||
sort: [{ required: true, message: "文章分类排序不能为空 ! ", trigger: "blur" }]
|
sort: [{ required: true, message: "文章分类排序不能为空 ! ", trigger: "blur" }],
|
||||||
|
pid: [{ required: true, message: "所属分类不能为空 ! ", trigger: "blur" }]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const RULE_FORM = {
|
export const RULE_FORM = {
|
||||||
page: 1,
|
// page: 1,
|
||||||
size: 50
|
// size: 50
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,7 +32,5 @@ export const COLUMNS = [
|
|||||||
render: (scope: RenderScope<any>): VNode | string | any => {
|
render: (scope: RenderScope<any>): VNode | string | any => {
|
||||||
return YES_OR_NO[scope.row.is_show];
|
return YES_OR_NO[scope.row.is_show];
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 300 }
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,24 +4,45 @@
|
|||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
<el-button type="primary" @click="handleAdd"> 添加 </el-button>
|
<el-button type="primary" @click="handleAdd"> 添加 </el-button>
|
||||||
</div>
|
</div>
|
||||||
<ProTable
|
<div class="card table-main">
|
||||||
ref="proTableRef"
|
<SearchForm :search="search" :reset="reset" :formData="dataStore.formData" :search-param="dataStore.ruleForm" />
|
||||||
:formData="dataStore.formData"
|
<el-table :data="dataStore.tableData" style="width: 100%; margin-bottom: 20px; font-size: 14px" row-key="id" border>
|
||||||
:columns="dataStore.columns"
|
<el-table-column prop="id" label="id" />
|
||||||
:request-api="getArticleClassListApi"
|
<el-table-column prop="name" label="分类名称" />
|
||||||
:init-param="dataStore.initParam"
|
<el-table-column prop="sort" label="分类排序">
|
||||||
>
|
<template #default="{ row }">
|
||||||
<template #operation="scope">
|
<div @click.stop="">
|
||||||
<el-button
|
<el-input v-model="row.sort" @blur="handleBlur(row)" @input="handleInput(row)" />
|
||||||
size="small"
|
</div>
|
||||||
v-for="(item, index) in dataStore.btns"
|
</template>
|
||||||
:key="index"
|
</el-table-column>
|
||||||
:type="item.btnType"
|
<el-table-column prop="is_show" label="是否显示">
|
||||||
@click="handleBtnClick(item.type, scope.row)"
|
<template #default="{ row }">
|
||||||
>{{ item.name }}</el-button
|
{{ row.is_show == 1 ? "✔️" : "❌" }}
|
||||||
>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</ProTable>
|
<el-table-column prop="icon" label="图片">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-image :src="row.icon ? h + row.icon : ''" style="width: 60px; height: 60px" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<!-- <template #default="scope"> -->
|
||||||
|
<el-table-column label="操作" :width="240">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
v-for="(item, index) in dataStore.btns"
|
||||||
|
:key="index"
|
||||||
|
:type="item.btnType"
|
||||||
|
@click="handleBtnClick(item.type, scope.row)"
|
||||||
|
>{{ item.name }}</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="dataStore.visible"
|
v-model="dataStore.visible"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
@@ -40,6 +61,7 @@
|
|||||||
:formData="dataStore.editFormData"
|
:formData="dataStore.editFormData"
|
||||||
:rules="dataStore.rules"
|
:rules="dataStore.rules"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
|
@handleSelectChangeEmits="handleSelectChangeEmits"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -54,7 +76,10 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="articleClassListIndex">
|
<script setup lang="ts" name="articleClassListIndex">
|
||||||
import rulesForm from "@/components/rulesForm/index.vue";
|
import rulesForm from "@/components/rulesForm/index.vue";
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import { integerRexg } from "@/utils/regexp/index";
|
||||||
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
import { h } from "@/utils/url";
|
||||||
|
// import ProTable from "@/components/ProTable/index.vue";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
//列表接口
|
//列表接口
|
||||||
@@ -63,14 +88,15 @@ import {
|
|||||||
getArticleClassAddSaveApi,
|
getArticleClassAddSaveApi,
|
||||||
getArticleClassDelApi,
|
getArticleClassDelApi,
|
||||||
getArticleClassEditUpApi,
|
getArticleClassEditUpApi,
|
||||||
getArticleClassDetailsApi
|
getArticleClassDetailsApi,
|
||||||
|
getArticleClassApi,
|
||||||
|
getArticleClassSortApi
|
||||||
} from "@/api/modules/articleClass";
|
} from "@/api/modules/articleClass";
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
//表格和搜索條件
|
//表格和搜索條件
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, EDIT_FORM_DATA, EDIT_RULE_FORM, RULES, BTNS } from "./constant/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, EDIT_FORM_DATA, EDIT_RULE_FORM, RULES, BTNS } from "./constant/index";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
|
||||||
const proTableRef = ref<any>(null);
|
|
||||||
const formRef: any = ref(null);
|
const formRef: any = ref(null);
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
// 数据源
|
// 数据源
|
||||||
@@ -85,9 +111,56 @@ const dataStore = reactive<any>({
|
|||||||
formData: FORM_DATA, //搜索配置项
|
formData: FORM_DATA, //搜索配置项
|
||||||
visible: false,
|
visible: false,
|
||||||
btns: BTNS,
|
btns: BTNS,
|
||||||
|
tableData: [],
|
||||||
selectRow: {} //当前选择的row
|
selectRow: {} //当前选择的row
|
||||||
});
|
});
|
||||||
|
const getArticleClassSort = async (row: any) => {
|
||||||
|
const result = await getArticleClassSortApi(row);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
useMsg("success", result?.msg);
|
||||||
|
getArticleClassList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//排序input框失焦
|
||||||
|
const handleBlur = (row: any) => {
|
||||||
|
getArticleClassSort(row);
|
||||||
|
};
|
||||||
|
//
|
||||||
|
const handleInput = (row: any) => {
|
||||||
|
row.sort = integerRexg(row.sort);
|
||||||
|
};
|
||||||
|
|
||||||
|
const search = () => {
|
||||||
|
getArticleClassList();
|
||||||
|
};
|
||||||
|
const reset = () => {
|
||||||
|
for (let key in dataStore.ruleForm) {
|
||||||
|
dataStore.ruleForm[key] = "";
|
||||||
|
}
|
||||||
|
getArticleClassList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSelectChangeEmits = (params: any) => {
|
||||||
|
const { id } = params;
|
||||||
|
dataStore.editRuleForm.pid = id;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getArticleClass = async () => {
|
||||||
|
const result = await getArticleClassApi();
|
||||||
|
if (result?.code === 0) {
|
||||||
|
dataStore.editFormData[3].options = addLabelValue(result?.data);
|
||||||
|
dataStore.editFormData[3].options.unshift({ value: 0, label: "无" });
|
||||||
|
console.log(result?.data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getArticleClass();
|
||||||
|
const getArticleClassList = async () => {
|
||||||
|
const result = await getArticleClassListApi(dataStore.ruleForm);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
dataStore.tableData = result?.data;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getArticleClassList();
|
||||||
//新增文章接口
|
//新增文章接口
|
||||||
const getArticleClassAddSave = async () => {
|
const getArticleClassAddSave = async () => {
|
||||||
const result = await getArticleClassAddSaveApi(dataStore.editRuleForm);
|
const result = await getArticleClassAddSaveApi(dataStore.editRuleForm);
|
||||||
@@ -96,18 +169,20 @@ const getArticleClassAddSave = async () => {
|
|||||||
useMsg("success", msg);
|
useMsg("success", msg);
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
proTableRef?.value?.getTableList();
|
getArticleClassList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//文章编辑
|
//文章编辑
|
||||||
const getArticleClassUpEdit = async () => {
|
const getArticleClassUpEdit = async () => {
|
||||||
|
console.log("编辑");
|
||||||
const result = await getArticleClassEditUpApi(dataStore.editRuleForm);
|
const result = await getArticleClassEditUpApi(dataStore.editRuleForm);
|
||||||
const { msg, code } = result;
|
const { msg, code } = result;
|
||||||
|
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
useMsg("success", msg);
|
useMsg("success", msg);
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
proTableRef?.value?.getTableList();
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
|
getArticleClassList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//删除文章
|
//删除文章
|
||||||
@@ -117,7 +192,7 @@ const getArticleClassDel = (row: any) => {
|
|||||||
const { msg, code } = result;
|
const { msg, code } = result;
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
useMsg("success", msg);
|
useMsg("success", msg);
|
||||||
proTableRef?.value?.getTableList();
|
getArticleClassList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -141,12 +216,16 @@ const resetFields = () => {
|
|||||||
};
|
};
|
||||||
//抽屉重置
|
//抽屉重置
|
||||||
const handleResetClick = () => {
|
const handleResetClick = () => {
|
||||||
resetFields();
|
if (dataStore.title == "添加文章分类") {
|
||||||
getArticleClassDetails(dataStore.selectRow);
|
resetFields();
|
||||||
|
} else {
|
||||||
|
getArticleClassDetails(dataStore.selectRow);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//添加
|
//添加
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
|
dataStore.title = "添加文章分类";
|
||||||
dataStore.visible = true;
|
dataStore.visible = true;
|
||||||
};
|
};
|
||||||
//弹窗关闭钩子
|
//弹窗关闭钩子
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "category_id1",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "treeSelect",
|
type: "treeSelect",
|
||||||
label: "文章分类: ",
|
label: "文章分类: ",
|
||||||
@@ -55,6 +55,22 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: "is_show1",
|
||||||
|
// placeholder: "",
|
||||||
|
// type: "radio",
|
||||||
|
// label: "是否启用: ",
|
||||||
|
// options: [
|
||||||
|
// {
|
||||||
|
// label: "是",
|
||||||
|
// value: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: "否",
|
||||||
|
// value: 0
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: "link",
|
prop: "link",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const RULES = {
|
export const RULES = {
|
||||||
title: [{ required: true, message: "文章名称不能为空 ! ", trigger: "blur" }],
|
title: [{ required: true, message: "文章名称不能为空 ! ", trigger: "blur" }],
|
||||||
category_id: [{ required: true, message: "文章分类不能为空 ! ", trigger: "change" }],
|
category_id1: [{ required: true, message: "文章分类不能为空 ! ", trigger: "change" }],
|
||||||
sort: [{ required: true, message: "文章排序不能为空 ! ", trigger: "blur" }]
|
sort: [{ required: true, message: "文章排序不能为空 ! ", trigger: "blur" }]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
interface FormItem {
|
interface FormItem {
|
||||||
prop: string;
|
prop: string;
|
||||||
|
prop1?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -25,7 +26,8 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "treeIds",
|
||||||
|
prop1: "category_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "treeSelect",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
@@ -38,7 +40,7 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
options: [],
|
options: [],
|
||||||
startPlaceholder: "开始日期",
|
startPlaceholder: "开始日期",
|
||||||
endPlaceholder: "结束日期",
|
endPlaceholder: "结束日期",
|
||||||
startDate: "created_at",
|
startDate: "release_time",
|
||||||
// endDate: "createEndDate",
|
// endDate: "createEndDate",
|
||||||
label: "发布时间: "
|
label: "发布时间: "
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
//import { RenderScope } from "@/components/ProTable/interface";
|
import { RenderScope } from "@/components/ProTable/interface";
|
||||||
|
const YES_OR_NO: any = {
|
||||||
|
1: "✔️",
|
||||||
|
0: "❌"
|
||||||
|
};
|
||||||
export const COLUMNS = [
|
export const COLUMNS = [
|
||||||
{
|
{
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -32,7 +36,10 @@ export const COLUMNS = [
|
|||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "首页推荐",
|
label: "首页推荐",
|
||||||
prop: "recommend"
|
prop: "recommend",
|
||||||
|
render: (scope: RenderScope<any>): VNode | string | any => {
|
||||||
|
return YES_OR_NO[scope.row.recommend];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -42,12 +49,12 @@ export const COLUMNS = [
|
|||||||
width: 160
|
width: 160
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
align: "center",
|
// align: "center",
|
||||||
label: "状态",
|
// label: "状态",
|
||||||
prop: "enabled",
|
// prop: "enabled",
|
||||||
width: 80
|
// width: 80
|
||||||
},
|
// },
|
||||||
|
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -14,12 +14,13 @@
|
|||||||
:formData="dataStore.editFormData"
|
:formData="dataStore.editFormData"
|
||||||
:rules="dataStore.rules"
|
:rules="dataStore.rules"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
|
@handleSelectChangeEmits="handleSelectChangeEmits"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="详细内容" name="third">
|
<el-tab-pane label="详细内容" name="third">
|
||||||
<div style="width: 1280px; margin: 0 auto">
|
<div style="width: 1280px; margin: 0 auto">
|
||||||
<WangEditor v-model:value="dataStore.editRuleForm.content" />
|
<Editor v-model:content="dataStore.editRuleForm.content"></Editor>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -29,19 +30,18 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="articleEditIndex">
|
<script setup lang="ts" name="articleEditIndex">
|
||||||
import rulesForm from "@/components/rulesForm/index.vue";
|
import rulesForm from "@/components/rulesForm/index.vue";
|
||||||
|
import Editor from "@/components/Editor/index.vue";
|
||||||
import {
|
import {
|
||||||
getArticleClassDataApi,
|
getArticleClassDataApi,
|
||||||
getArticleListAddSaveApi,
|
getArticleListAddSaveApi,
|
||||||
getArticleListDetailsApi,
|
getArticleListDetailsApi,
|
||||||
getArticleListUpApi
|
getArticleListUpApi
|
||||||
} from "@/api/modules/articleList";
|
} from "@/api/modules/articleList";
|
||||||
// /handleSubmit,
|
import { recursiveCompare } from "@/utils/recursiveCompare";
|
||||||
import { EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
|
import { EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
|
||||||
import { useSearchInfoArray } from "@/hooks/useSearch";
|
|
||||||
import { ref, reactive } from "vue";
|
|
||||||
import WangEditor from "@/components/WangEditor/index.vue";
|
|
||||||
// import rulesForm from "@/components/rulesForm/index.vue";
|
|
||||||
|
|
||||||
|
import { ref, reactive } from "vue";
|
||||||
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
const formRef = ref<any>(null);
|
const formRef = ref<any>(null);
|
||||||
@@ -54,20 +54,13 @@ const dataStore = reactive<any>({
|
|||||||
editRuleForm: cloneDeep(EDIT_RULE_FORM),
|
editRuleForm: cloneDeep(EDIT_RULE_FORM),
|
||||||
editFormData: cloneDeep(EDIT_FORM_DATA) //抽屉表单配置项
|
editFormData: cloneDeep(EDIT_FORM_DATA) //抽屉表单配置项
|
||||||
});
|
});
|
||||||
//新增
|
|
||||||
const getArticleListAddSave = async () => {
|
|
||||||
const result = await getArticleListAddSaveApi(dataStore.editRuleForm);
|
|
||||||
if (result.code === 0) {
|
|
||||||
const { msg } = result;
|
|
||||||
useMsg("success", msg);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//文章分类
|
//文章分类
|
||||||
const getArticleClassData = async () => {
|
const getArticleClassData = async () => {
|
||||||
const result = await getArticleClassDataApi();
|
const result = await getArticleClassDataApi({ is_show: 1 });
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
dataStore.editFormData[1].options = useSearchInfoArray(data);
|
dataStore.editFormData[1].options = addLabelValue(data);
|
||||||
//如果有category_id就代表是从文章分类跳转过来的
|
//如果有category_id就代表是从文章分类跳转过来的
|
||||||
if ($route.query.category_id) {
|
if ($route.query.category_id) {
|
||||||
dataStore.editRuleForm.category_id = Number($route.query.category_id);
|
dataStore.editRuleForm.category_id = Number($route.query.category_id);
|
||||||
@@ -86,11 +79,49 @@ const getArticleListDetails = async () => {
|
|||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
dataStore.editRuleForm = data;
|
dataStore.editRuleForm = data;
|
||||||
console.log(data);
|
// dataStore.editRuleForm.content = convertSpanToDiv(dataStore.editRuleForm.content);
|
||||||
|
let is = dataStore.editFormData[1].options.some((item: any) =>
|
||||||
|
recursiveCompare(item, dataStore.editRuleForm.category_id)
|
||||||
|
);
|
||||||
|
dataStore.editRuleForm.category_id1 = is ? dataStore.editRuleForm.category_id : dataStore.editRuleForm.category_name;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleSelectChangeEmits = (value: any) => {
|
||||||
|
if (value?.prop === "category_id1") {
|
||||||
|
dataStore.editRuleForm.category_id = value.id;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const convertDateFormat = (dateString: any) => {
|
||||||
|
const date = new Date(dateString);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||||
|
const day = String(date.getDate()).padStart(2, "0");
|
||||||
|
const hours = String(date.getHours()).padStart(2, "0");
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, "0");
|
||||||
|
const seconds = String(date.getSeconds()).padStart(2, "0");
|
||||||
|
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
|
};
|
||||||
|
//新增
|
||||||
|
const getArticleListAddSave = async () => {
|
||||||
|
if (dataStore.editRuleForm.release_time) {
|
||||||
|
dataStore.editRuleForm.release_time = convertDateFormat(dataStore.editRuleForm.release_time);
|
||||||
|
} else {
|
||||||
|
dataStore.editRuleForm.release_time = null;
|
||||||
|
}
|
||||||
|
const result = await getArticleListAddSaveApi(dataStore.editRuleForm);
|
||||||
|
if (result.code === 0) {
|
||||||
|
const { msg } = result;
|
||||||
|
useMsg("success", msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//更新
|
//更新
|
||||||
const getArticleListUp = async () => {
|
const getArticleListUp = async () => {
|
||||||
|
if (dataStore.editRuleForm.release_time) {
|
||||||
|
dataStore.editRuleForm.release_time = convertDateFormat(dataStore.editRuleForm.release_time);
|
||||||
|
} else {
|
||||||
|
dataStore.editRuleForm.release_time = null;
|
||||||
|
}
|
||||||
const result = await getArticleListUpApi({ id: $route.query.id, ...dataStore.editRuleForm });
|
const result = await getArticleListUpApi({ id: $route.query.id, ...dataStore.editRuleForm });
|
||||||
|
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : '--'" style="width: 60px; height: 60px" />
|
||||||
</template>
|
|
||||||
<template #enabled="scope">
|
|
||||||
<el-tag type="success" effect="dark">{{ scope.row.enabled === 1 ? "启用" : "禁用" }}</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
|
<!-- <template #enabled="scope">
|
||||||
|
<el-tag type="success" effect="dark">{{ scope.row.enabled == 1 ? "启用" : "禁用" }}</el-tag>
|
||||||
|
</template> -->
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button size="small" type="primary" @click="handleBtnClick('edit', scope.row)">编辑</el-button>
|
<el-button size="small" type="primary" @click="handleBtnClick('edit', scope.row)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="handleBtnClick('del', scope.row)">删除</el-button>
|
<el-button size="small" type="danger" @click="handleBtnClick('del', scope.row)">删除</el-button>
|
||||||
@@ -38,13 +38,16 @@ import {
|
|||||||
getArticleListExportApi,
|
getArticleListExportApi,
|
||||||
getArticleListDelApi
|
getArticleListDelApi
|
||||||
} from "@/api/modules/articleList";
|
} from "@/api/modules/articleList";
|
||||||
import { useSearchInfoArray } from "@/hooks/useSearch";
|
// import { useSearchInfoArray } from "@/hooks/useSearch";
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
//表格和搜索條件
|
//表格和搜索條件
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
|
||||||
|
|
||||||
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
//图片地址
|
//图片地址
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTableRef = ref<any>(null);
|
const proTableRef = ref<any>(null);
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
@@ -63,7 +66,8 @@ const getArticleClassData = async () => {
|
|||||||
const result = await getArticleClassDataApi();
|
const result = await getArticleClassDataApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
dataStore.formData[1].options = useSearchInfoArray(data);
|
console.log(data, "============>>>>>");
|
||||||
|
dataStore.formData[1].options = addLabelValue(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getArticleClassData();
|
getArticleClassData();
|
||||||
@@ -80,7 +84,10 @@ const handleAdd = (type: any) => {
|
|||||||
|
|
||||||
//导出接口
|
//导出接口
|
||||||
const getArticleListExport = async () => {
|
const getArticleListExport = async () => {
|
||||||
const result = await getArticleListExportApi(dataStore.ruleForm);
|
const result = await getArticleListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
//导出
|
//导出
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "category_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "文章分类: ",
|
label: "文章分类: ",
|
||||||
options: []
|
options: []
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ export const COLUMNS = [
|
|||||||
width: 160
|
width: 160
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
align: "center",
|
// align: "center",
|
||||||
label: "状态",
|
// label: "状态",
|
||||||
prop: "status",
|
// prop: "status",
|
||||||
width: 80
|
// width: 80
|
||||||
},
|
// },
|
||||||
|
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { useSearchInfoArray } from "@/hooks/useSearch";
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
//列表接口
|
//列表接口
|
||||||
import { getArticleTrashListApi, getArticleTrashDelApi, getArticleTrashRestoreApi } from "@/api/modules/articleRecycle";
|
import { getArticleTrashListApi, getArticleTrashDelApi, getArticleTrashRestoreApi } from "@/api/modules/articleRecycle";
|
||||||
import { getArticleClassDataApi } from "@/api/modules/articleList";
|
import { getArticleClassDataApi } from "@/api/modules/articleList";
|
||||||
@@ -66,12 +66,13 @@ const getArticleTrashDel = (id: any) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//文章分类(搜索条件)
|
//文章分类(搜索条件)
|
||||||
const getArticleClassData = async () => {
|
const getArticleClassData = async () => {
|
||||||
const result = await getArticleClassDataApi();
|
const result = await getArticleClassDataApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
dataStore.formData[1].options = useSearchInfoArray(data);
|
dataStore.formData[1].options = addLabelValue(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getArticleClassData();
|
getArticleClassData();
|
||||||
|
|||||||
@@ -1,136 +0,0 @@
|
|||||||
interface FormItem {
|
|
||||||
prop: string;
|
|
||||||
label?: string;
|
|
||||||
placeholder?: string;
|
|
||||||
type: string;
|
|
||||||
isCopy?: boolean;
|
|
||||||
optionProps?: any;
|
|
||||||
startPlaceholder?: string;
|
|
||||||
endPlaceholder?: string;
|
|
||||||
options?: any;
|
|
||||||
isArray?: boolean;
|
|
||||||
startDate?: string; //开始时间(传入后台需要的参数)
|
|
||||||
endDate?: string; //结束时间(传入后台需要的参数)
|
|
||||||
startProp?: string;
|
|
||||||
endProp?: string;
|
|
||||||
isInteger?: boolean;
|
|
||||||
disabled?: boolean;
|
|
||||||
fileList?: any;
|
|
||||||
prompt?: any;
|
|
||||||
}
|
|
||||||
export const EDIT_FORM_DATA: FormItem[] = [
|
|
||||||
{
|
|
||||||
prop: "videoName",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "下载名称: "
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
prop: "videoType",
|
|
||||||
placeholder: "请选择",
|
|
||||||
type: "treeSelect",
|
|
||||||
label: "下载分类: ",
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
value: "1",
|
|
||||||
label: "Level one 1",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
value: "1-1",
|
|
||||||
label: "Level two 1-1",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
value: "1-1-1",
|
|
||||||
label: "Level three 1-1-1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "videoSort",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "下载排序: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "recommend",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "radio",
|
|
||||||
label: "首页推荐: ",
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: "是",
|
|
||||||
value: "是"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "否",
|
|
||||||
value: "否"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "imgUrl",
|
|
||||||
type: "upImg",
|
|
||||||
label: "下载图片: ",
|
|
||||||
prompt: "图片尺寸320x320"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "table",
|
|
||||||
type: "table",
|
|
||||||
label: "下载文件: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "videoDescribe",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "适合型号: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "videoDescribe",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "支持系统: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "videoDescribe",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "文件格式: "
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
prop: "SEOTitle",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "SEO标题: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "SEOKeywords",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "SEO关键词: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "SEODescribe",
|
|
||||||
placeholder: "请输入",
|
|
||||||
type: "input",
|
|
||||||
label: "SEO描述: "
|
|
||||||
}
|
|
||||||
];
|
|
||||||
export const EDIT_RULE_FORM = {
|
|
||||||
videoName: "",
|
|
||||||
videoType: "",
|
|
||||||
videoSort: 1,
|
|
||||||
recommend: "",
|
|
||||||
videoDescribe: "",
|
|
||||||
link: "",
|
|
||||||
SEOTitle: "",
|
|
||||||
SEOKeywords: "",
|
|
||||||
SEODescribe: ""
|
|
||||||
};
|
|
||||||
// editRuleForm: {},
|
|
||||||
//editFormData: [],
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import { FORM_DATA, RULE_FORM } from "./search";
|
import { FORM_DATA, RULE_FORM } from "./search";
|
||||||
import { COLUMNS } from "./table";
|
import { COLUMNS } from "./table";
|
||||||
import { RULES } from "./rules";
|
import { RULES } from "./rules";
|
||||||
import { EDIT_FORM_DATA, EDIT_RULE_FORM } from "./edit";
|
export { FORM_DATA, RULE_FORM, COLUMNS, RULES };
|
||||||
export { FORM_DATA, RULE_FORM, COLUMNS, EDIT_FORM_DATA, EDIT_RULE_FORM, RULES };
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
:request-api="getArticleRemarkListApi"
|
:request-api="getArticleRemarkListApi"
|
||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<!-- <template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template> -->
|
||||||
<template #is_audited="scope">
|
<template #is_audited="scope">
|
||||||
<el-tag :type="scope.row.is_audited ? 'success' : 'danger'" effect="dark">{{
|
<el-tag :type="scope.row.is_audited ? 'success' : 'danger'" effect="dark">{{
|
||||||
scope.row.is_audited ? "已审核" : "待审核"
|
scope.row.is_audited ? "已审核" : "待审核"
|
||||||
@@ -34,7 +34,7 @@ import ProTable from "@/components/ProTable/index.vue";
|
|||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { useExport } from "@/hooks/useExport";
|
import { useExport } from "@/hooks/useExport";
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
// import { h } from "@/utils/url";
|
||||||
//列表接口
|
//列表接口
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -61,7 +61,10 @@ const dataStore = reactive<any>({
|
|||||||
});
|
});
|
||||||
//导出
|
//导出
|
||||||
const getArticleRemarkExport = async () => {
|
const getArticleRemarkExport = async () => {
|
||||||
const result = await getArticleRemarkExportApi(dataStore.ruleForm);
|
const result = await getArticleRemarkExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>
|
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
ref="formRef"
|
ref="formRef"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- @handleRadioGroupEmits="handleRadioGroupEmits" -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div style="flex: auto">
|
<div style="flex: auto">
|
||||||
<el-button @click="handleResetClick">重置</el-button>
|
<el-button @click="handleResetClick">重置</el-button>
|
||||||
@@ -57,7 +58,7 @@ import ProTable from "@/components/ProTable/index.vue";
|
|||||||
import rulesForm from "@/components/rulesForm/index.vue";
|
import rulesForm from "@/components/rulesForm/index.vue";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
//列表接口
|
//列表接口
|
||||||
import {
|
import {
|
||||||
getBannerClassListApi,
|
getBannerClassListApi,
|
||||||
@@ -99,6 +100,18 @@ const handleConfirmClick = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// const handleRadioGroupEmits = (value: any) => {
|
||||||
|
// // if (value === "image") {
|
||||||
|
// // dataStore.editFormData = EDIT_FORM_DATA;
|
||||||
|
// // dataStore.rules = RULES;
|
||||||
|
// // } else {
|
||||||
|
// // dataStore.editFormData = EDIT_FORM_DATA1;
|
||||||
|
// // dataStore.rules = RULES1;
|
||||||
|
// // }
|
||||||
|
// console.log(value, "=========value============");
|
||||||
|
// };
|
||||||
|
|
||||||
//重置验证状态
|
//重置验证状态
|
||||||
const resetFields = () => {
|
const resetFields = () => {
|
||||||
if (!formRef.value!.ruleFormRef) return;
|
if (!formRef.value!.ruleFormRef) return;
|
||||||
|
|||||||
@@ -49,24 +49,47 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: "status",
|
||||||
|
placeholder: "",
|
||||||
|
type: "radio",
|
||||||
|
label: "是否启用: ",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "是",
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "否",
|
||||||
|
value: -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: "image",
|
prop: "image",
|
||||||
type: "upImg",
|
type: "upImg",
|
||||||
label: "Banner图片: "
|
label: "Banner图片: "
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: "extra_image",
|
||||||
|
type: "upImg",
|
||||||
|
label: "悬浮图: "
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: "banner_id",
|
prop: "banner_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
label: "Banner分类: ",
|
label: "Banner分类: ",
|
||||||
options: [
|
options: []
|
||||||
{
|
|
||||||
value: "1",
|
|
||||||
label: "Level one 1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: "rel_prod_cate_id",
|
||||||
|
placeholder: "请选择",
|
||||||
|
type: "treeSelect",
|
||||||
|
label: "相关分类: ",
|
||||||
|
options: []
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "sort",
|
prop: "sort",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
@@ -86,7 +109,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
{
|
{
|
||||||
prop: "desc",
|
prop: "desc",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
type: "textarea",
|
type: "WangEditor",
|
||||||
label: "Banner描述: "
|
label: "Banner描述: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -126,23 +149,38 @@ export const EDIT_FORM_DATA1: FormItem[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: "status",
|
||||||
|
placeholder: "",
|
||||||
|
type: "radio",
|
||||||
|
label: "是否启用: ",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "是",
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "否",
|
||||||
|
value: -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: "image",
|
prop: "image",
|
||||||
type: "upImg",
|
type: "upImg",
|
||||||
label: "Banner图片: "
|
label: "Banner图片: "
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: "image1",
|
||||||
|
// type: "upImg",
|
||||||
|
// label: "Banner图片1: "
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: "banner_id",
|
prop: "banner_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
label: "Banner分类: ",
|
label: "Banner分类: ",
|
||||||
options: [
|
options: []
|
||||||
{
|
|
||||||
value: "1",
|
|
||||||
label: "Level one 1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "sort",
|
prop: "sort",
|
||||||
@@ -150,15 +188,15 @@ export const EDIT_FORM_DATA1: FormItem[] = [
|
|||||||
type: "inputNumber",
|
type: "inputNumber",
|
||||||
label: "Banner排序: "
|
label: "Banner排序: "
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: "link",
|
// prop: "link",
|
||||||
placeholder: "请输入",
|
// placeholder: "请输入",
|
||||||
type: "inputSelect",
|
// type: "inputSelect",
|
||||||
label: "链接地址: ",
|
// label: "链接地址: ",
|
||||||
placeholder1: "请选择",
|
// placeholder1: "请选择",
|
||||||
prop1: "link_type",
|
// prop1: "link_type",
|
||||||
options: []
|
// options: []
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: "video",
|
prop: "video",
|
||||||
type: "video",
|
type: "video",
|
||||||
@@ -181,7 +219,8 @@ export const EDIT_FORM_DATA1: FormItem[] = [
|
|||||||
|
|
||||||
export const EDIT_RULE_FORM = {
|
export const EDIT_RULE_FORM = {
|
||||||
type: "image",
|
type: "image",
|
||||||
sort: 1
|
sort: 1,
|
||||||
|
status: 1
|
||||||
};
|
};
|
||||||
// editRuleForm: {},
|
// editRuleForm: {},
|
||||||
//editFormData: [],
|
//editFormData: [],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const RULES = {
|
export const RULES = {
|
||||||
title: [{ required: true, message: "Banner名称不能为空 ! ", trigger: "blur" }],
|
title: [{ required: true, message: "Banner名称不能为空 ! ", trigger: "blur" }],
|
||||||
type: [{ required: true, message: "前台显示不能为空 ! ", trigger: "change" }],
|
type: [{ required: true, message: "前台显示不能为空 ! ", trigger: "change" }],
|
||||||
image: [{ required: true, message: "Banner图片不能为空 ! ", trigger: "change" }],
|
// image: [{ required: true, message: "Banner图片不能为空 ! ", trigger: "change" }],
|
||||||
banner_id: [{ required: true, message: "Banner分类不能为空 ! ", trigger: "change" }],
|
banner_id: [{ required: true, message: "Banner分类不能为空 ! ", trigger: "change" }],
|
||||||
sort: [{ required: true, message: "排序不能为空 ! ", trigger: "change" }]
|
sort: [{ required: true, message: "排序不能为空 ! ", trigger: "change" }]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
interface FormItem {
|
interface FormItem {
|
||||||
prop: string;
|
prop: string;
|
||||||
|
prop1?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -25,9 +26,10 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "banner_id",
|
prop: "treeIds",
|
||||||
|
prop1: "banner_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "Banner分类: ",
|
label: "Banner分类: ",
|
||||||
options: []
|
options: []
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ export const COLUMNS = [
|
|||||||
label: "添加时间",
|
label: "添加时间",
|
||||||
prop: "created_at"
|
prop: "created_at"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: "center",
|
||||||
|
label: "状态",
|
||||||
|
prop: "status",
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -12,11 +12,16 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
<template #sort="scope">
|
<template #sort="scope">
|
||||||
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>
|
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
|
<template #status="scope">
|
||||||
|
<el-tag :type="scope.row.status == 1 ? 'success' : 'danger'" effect="dark">{{
|
||||||
|
scope.row.status == 1 ? "启用" : "禁用"
|
||||||
|
}}</el-tag>
|
||||||
|
</template>
|
||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button size="small" type="primary" @click="getBannerRead(scope.row.id)">编辑</el-button>
|
<el-button size="small" type="primary" @click="getBannerRead(scope.row.id)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="getBannerDel(scope.row.id)">删除</el-button>
|
<el-button size="small" type="danger" @click="getBannerDel(scope.row.id)">删除</el-button>
|
||||||
@@ -25,7 +30,7 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="dataStore.visible"
|
v-model="dataStore.visible"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
:size="640"
|
:size="980"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:before-close="handleBeforeClone"
|
:before-close="handleBeforeClone"
|
||||||
@@ -42,7 +47,7 @@
|
|||||||
ref="formRef"
|
ref="formRef"
|
||||||
@handleRadioGroupEmits="handleRadioGroupEmits"
|
@handleRadioGroupEmits="handleRadioGroupEmits"
|
||||||
>
|
>
|
||||||
<el-input v-model.trim="dataStore.editRuleForm.link" clearable style="width: 440px">
|
<el-input v-model="dataStore.editRuleForm.link" clearable style="width: 440px">
|
||||||
<template #append>
|
<template #append>
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
lazy
|
lazy
|
||||||
@@ -57,7 +62,6 @@
|
|||||||
@check="handleCheck"
|
@check="handleCheck"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
style="padding: 0"
|
style="padding: 0"
|
||||||
@visible-change="visibleChange"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@@ -80,8 +84,10 @@ import { messageBox } from "@/utils/messageBox";
|
|||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { useExport } from "@/hooks/useExport";
|
import { useExport } from "@/hooks/useExport";
|
||||||
import { integerRexg } from "@/utils/regexp/index";
|
import { integerRexg } from "@/utils/regexp/index";
|
||||||
|
import { getProductCategoryListApi } from "@/api/modules/productList";
|
||||||
|
// import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
// 图片地址
|
// 图片地址
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
// 列表接口
|
// 列表接口
|
||||||
import {
|
import {
|
||||||
getBannerListApi,
|
getBannerListApi,
|
||||||
@@ -90,9 +96,11 @@ import {
|
|||||||
getBannerListSortApi,
|
getBannerListSortApi,
|
||||||
getBannerUpApi,
|
getBannerUpApi,
|
||||||
getBannerListSaveApi,
|
getBannerListSaveApi,
|
||||||
getBannerListExportApi
|
getBannerListExportApi,
|
||||||
|
getBannerClassListApi
|
||||||
} from "@/api/modules/banner";
|
} from "@/api/modules/banner";
|
||||||
import { getBannerClassListApi } from "@/api/modules/bannerClass";
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
import { getSystemUrlsApi } from "@/api/modules/home";
|
import { getSystemUrlsApi } from "@/api/modules/home";
|
||||||
// 深拷贝方法
|
// 深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
@@ -113,10 +121,10 @@ const dataStore = reactive<any>({
|
|||||||
formData: FORM_DATA, // 搜索配置项 dataStore.formData
|
formData: FORM_DATA, // 搜索配置项 dataStore.formData
|
||||||
visible: false,
|
visible: false,
|
||||||
data: [],
|
data: [],
|
||||||
is: false
|
isFirstRequest: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectedNodes = ref(null);
|
const selectedNodes = ref<any>(null);
|
||||||
|
|
||||||
const treeRef = ref(null);
|
const treeRef = ref(null);
|
||||||
|
|
||||||
@@ -126,11 +134,16 @@ const treeProps = {
|
|||||||
label: "label",
|
label: "label",
|
||||||
value: "value"
|
value: "value"
|
||||||
};
|
};
|
||||||
const visibleChange = (is: any) => {
|
|
||||||
dataStore.is = is;
|
//产品分类(后端大佬说直接掉列表接口)
|
||||||
if (dataStore.is) {
|
const getProductCategoryList = async () => {
|
||||||
|
const result = await getProductCategoryListApi();
|
||||||
|
if (result?.code === 0) {
|
||||||
|
let dataClone: any = cloneDeep(result?.data);
|
||||||
|
dataStore.editFormData[7].options = addLabelValue(dataClone);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const buildTree = (data: any, outerLinkTo: any = "") => {
|
const buildTree = (data: any, outerLinkTo: any = "") => {
|
||||||
return data.map((item: any) => {
|
return data.map((item: any) => {
|
||||||
const { name, id, url, data: childData = [], children: nestedChildren = [] } = item;
|
const { name, id, url, data: childData = [], children: nestedChildren = [] } = item;
|
||||||
@@ -149,22 +162,37 @@ const buildTree = (data: any, outerLinkTo: any = "") => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
let isFirstRequest = true;
|
// let isFirstRequest = true;
|
||||||
|
const handleRadioGroupEmits = (value: any) => {
|
||||||
|
if (value === "video") {
|
||||||
|
dataStore.editFormData = EDIT_FORM_DATA1;
|
||||||
|
dataStore.rules = RULES1;
|
||||||
|
getBannerClassEditList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value === "image") {
|
||||||
|
dataStore.isFirstRequest = true;
|
||||||
|
dataStore.editFormData = EDIT_FORM_DATA;
|
||||||
|
dataStore.rules = RULES;
|
||||||
|
getBannerClassEditList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const getSystemUrls = async (node: any, resolve: any) => {
|
const getSystemUrls = async (node: any, resolve: any) => {
|
||||||
//第一次请求
|
//第一次请求
|
||||||
if (isFirstRequest) {
|
if (dataStore.isFirstRequest) {
|
||||||
const result = await getSystemUrlsApi();
|
const result = await getSystemUrlsApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const children = buildTree(result?.data);
|
const children = buildTree(result?.data);
|
||||||
resolve(children);
|
resolve(children);
|
||||||
isFirstRequest = false;
|
dataStore.isFirstRequest = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//第二次请求
|
//第二次请求
|
||||||
if (node.data.children) {
|
if (node?.data?.children) {
|
||||||
resolve(node.data.children);
|
resolve(node?.data?.children);
|
||||||
}
|
}
|
||||||
if (!node.data.children.length && !node.data.url && node.level > 1) {
|
if (!node?.data?.children?.length && !node?.data?.url && node?.level > 1) {
|
||||||
const [link_to, id] = node?.data?.value?.split("/");
|
const [link_to, id] = node?.data?.value?.split("/");
|
||||||
const result = await getSystemUrlsApi({ link_to, id });
|
const result = await getSystemUrlsApi({ link_to, id });
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
@@ -176,27 +204,47 @@ const getSystemUrls = async (node: any, resolve: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const setImgOrVideo = (result: any) => {
|
||||||
|
if (result?.data?.type === "image") {
|
||||||
|
dataStore.editFormData = cloneDeep(EDIT_FORM_DATA);
|
||||||
|
}
|
||||||
|
if (result?.data?.type === "video") {
|
||||||
|
dataStore.editFormData = cloneDeep(EDIT_FORM_DATA1);
|
||||||
|
}
|
||||||
|
|
||||||
|
getBannerClassEditList();
|
||||||
|
};
|
||||||
// 详情
|
// 详情
|
||||||
const getBannerRead = async (id: any) => {
|
const getBannerRead = async (id: any) => {
|
||||||
|
selectedNodes.value = "";
|
||||||
|
dataStore.data = [];
|
||||||
dataStore.title = "编辑Banner";
|
dataStore.title = "编辑Banner";
|
||||||
dataStore.visible = true;
|
dataStore.visible = true;
|
||||||
const result = await getBannerReadApi(id);
|
const result = await getBannerReadApi(id);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
dataStore.editRuleForm = result?.data;
|
setImgOrVideo(result);
|
||||||
if (dataStore.editRuleForm.link && dataStore.editRuleForm.link_to) {
|
getProductCategoryList();
|
||||||
let { id, name, link } = dataStore.editRuleForm.link_echo_data;
|
nextTick(() => {
|
||||||
let obj: any = {
|
dataStore.editRuleForm = result?.data;
|
||||||
label: name, // 确保这里的name是你想要显示的文本
|
if (dataStore.editRuleForm.link && dataStore.editRuleForm.link_to) {
|
||||||
value: `${dataStore.editRuleForm.link_to}` + "/" + `${id}` + "/" + `${name}`,
|
let { id, name, link } = dataStore.editRuleForm.link_echo_data;
|
||||||
url: link,
|
if (!id || !name || !link) {
|
||||||
link_to: dataStore.editRuleForm.link_to,
|
return;
|
||||||
children: []
|
}
|
||||||
};
|
console.log("1232323");
|
||||||
let data: any = [];
|
let obj: any = {
|
||||||
data.push(obj);
|
label: name, // 确保这里的name是你想要显示的文本
|
||||||
selectedNodes.value = obj.value;
|
value: `${dataStore.editRuleForm.link_to}` + "/" + `${id}` + "/" + `${name}`,
|
||||||
dataStore.data = data;
|
url: link,
|
||||||
}
|
link_to: dataStore.editRuleForm.link_to,
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
let data: any = [];
|
||||||
|
data.push(obj);
|
||||||
|
selectedNodes.value = obj.value;
|
||||||
|
dataStore.data = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleCheck = (checkedNodes: any, values: any) => {
|
const handleCheck = (checkedNodes: any, values: any) => {
|
||||||
@@ -212,42 +260,54 @@ const handleCheck = (checkedNodes: any, values: any) => {
|
|||||||
|
|
||||||
// 更新
|
// 更新
|
||||||
const getBannerUp = async () => {
|
const getBannerUp = async () => {
|
||||||
|
if (dataStore.editRuleForm.type === "video") {
|
||||||
|
dataStore.editRuleForm.link_to = "";
|
||||||
|
dataStore.editRuleForm.link = "";
|
||||||
|
}
|
||||||
|
if (dataStore.editRuleForm.type === "image") {
|
||||||
|
dataStore.editRuleForm.video = "";
|
||||||
|
}
|
||||||
const result = await getBannerUpApi(dataStore.editRuleForm);
|
const result = await getBannerUpApi(dataStore.editRuleForm);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
formRef!.value!.ruleFormRef.resetFields();
|
formRef!.value!.ruleFormRef.resetFields();
|
||||||
proTableRef?.value?.getTableList();
|
proTableRef?.value?.getTableList();
|
||||||
|
dataStore.isFirstRequest = true;
|
||||||
|
useMsg("success", result?.msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//详情里的分类
|
||||||
// 分类
|
const getBannerClassEditList = async () => {
|
||||||
const getBannerClassList = async () => {
|
const result = await getBannerClassListApi();
|
||||||
const result = await getBannerClassListApi({ page: 1, size: 500 });
|
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let arr: any = [];
|
dataStore.formData[1].options = addLabelValue(result?.data);
|
||||||
result?.data?.data?.forEach((item: any) => {
|
dataStore.editFormData.forEach((item: any) => {
|
||||||
arr.push({ value: item.id, label: item.name });
|
if (item.prop === "banner_id") {
|
||||||
|
item.options = addLabelValue(result?.data);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
dataStore.formData[1].options = arr;
|
|
||||||
dataStore.editFormData[4].options = arr;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getBannerClassList();
|
getBannerClassEditList();
|
||||||
// 新增 getBannerListSave
|
// 新增
|
||||||
const getBannerListSave = async () => {
|
const getBannerListSave = async () => {
|
||||||
const result = await getBannerListSaveApi(dataStore.editRuleForm);
|
const result = await getBannerListSaveApi(dataStore.editRuleForm);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
|
dataStore.isFirstRequest = true;
|
||||||
formRef!.value!.ruleFormRef.resetFields();
|
formRef!.value!.ruleFormRef.resetFields();
|
||||||
proTableRef?.value?.getTableList();
|
proTableRef?.value?.getTableList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 导出接口
|
// 导出接口
|
||||||
const getArticleListExport = async () => {
|
const getArticleListExport = async () => {
|
||||||
const result = await getBannerListExportApi(dataStore.ruleForm);
|
const result = await getBannerListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
// 导出
|
// 导出
|
||||||
@@ -284,23 +344,22 @@ const handleResetClick = () => {
|
|||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
dataStore.title = "添加Banner";
|
dataStore.title = "添加Banner";
|
||||||
dataStore.visible = true;
|
dataStore.visible = true;
|
||||||
|
selectedNodes.value = "";
|
||||||
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
|
(dataStore.editFormData = cloneDeep(EDIT_FORM_DATA)), // 抽屉表单配置项
|
||||||
|
getBannerClassEditList();
|
||||||
|
// getBannerClassList();
|
||||||
|
getProductCategoryList();
|
||||||
};
|
};
|
||||||
// 抽屉关闭前的钩子
|
// 抽屉关闭前的钩子
|
||||||
const handleBeforeClone = () => {
|
const handleBeforeClone = () => {
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
resetFields();
|
(dataStore.editFormData = cloneDeep(EDIT_FORM_DATA)), // 抽屉表单配置项
|
||||||
|
resetFields();
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
|
dataStore.isFirstRequest = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRadioGroupEmits = (value: any) => {
|
|
||||||
if (value === "image") {
|
|
||||||
dataStore.editFormData = EDIT_FORM_DATA;
|
|
||||||
dataStore.rules = RULES;
|
|
||||||
} else {
|
|
||||||
dataStore.editFormData = EDIT_FORM_DATA1;
|
|
||||||
dataStore.rules = RULES1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// 删除
|
// 删除
|
||||||
const getBannerDel = async (id: any) => {
|
const getBannerDel = async (id: any) => {
|
||||||
messageBox("你确定要删除?", async () => {
|
messageBox("你确定要删除?", async () => {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
prop: "name",
|
prop: "name",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
type: "input",
|
type: "input",
|
||||||
label: "文章分类名称: "
|
label: "下载分类名称: "
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -46,6 +46,13 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
value: 0
|
value: 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "pid",
|
||||||
|
placeholder: "请选择",
|
||||||
|
type: "treeSelect",
|
||||||
|
label: "所属分类: ",
|
||||||
|
options: []
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
export const EDIT_RULE_FORM = {
|
export const EDIT_RULE_FORM = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export const RULES = {
|
export const RULES = {
|
||||||
name: [{ required: true, message: "文章分类名称不能为空 ! ", trigger: "blur" }],
|
name: [{ required: true, message: "文章分类名称不能为空 ! ", trigger: "blur" }],
|
||||||
sort: [{ required: true, message: "下载分类排序不能为空 ! ", trigger: "blur" }]
|
sort: [{ required: true, message: "下载分类排序不能为空 ! ", trigger: "blur" }],
|
||||||
|
pid: [{ required: true, message: "所属分类不能为空 ! ", trigger: "change" }]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,65 +4,72 @@
|
|||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
<el-button type="primary" @click="handleAdd"> 添加分类 </el-button>
|
<el-button type="primary" @click="handleAdd"> 添加分类 </el-button>
|
||||||
</div>
|
</div>
|
||||||
<ProTable
|
|
||||||
ref="proTableRef"
|
<div class="card table-main">
|
||||||
:formData="dataStore.formData"
|
<SearchForm :search="search" :reset="reset" :formData="dataStore.formData" :search-param="dataStore.ruleForm" />
|
||||||
:columns="dataStore.columns"
|
<el-table :data="dataStore.tableData" style="width: 100%; margin-bottom: 20px; font-size: 14px" row-key="id" border>
|
||||||
:request-api="getCategoryListApi"
|
<el-table-column prop="id" label="id" />
|
||||||
:init-param="dataStore.initParam"
|
<el-table-column prop="name" label="下载分类名称" />
|
||||||
>
|
<el-table-column prop="sort" label="下载分类排序">
|
||||||
<template #image="scope">
|
<template #default="{ row }">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<div @click.stop="">
|
||||||
</template>
|
<el-input v-model="row.sort" @blur="handleBlur(row)" @input="handleInput(row)" />
|
||||||
<template #status="scope">
|
</div>
|
||||||
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
<template #sort="scope">
|
<el-table-column prop="is_show" label="是否显示">
|
||||||
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>
|
<template #default="{ row }">
|
||||||
</template>
|
{{ row.is_show == 1 ? "✔️" : "❌" }}
|
||||||
<template #operation="scope">
|
</template>
|
||||||
<el-button size="small" type="primary" @click="handleBtnClick('编辑', scope.row)">编辑</el-button>
|
</el-table-column>
|
||||||
<el-button size="small" type="primary" @click="handleBtnClick('添加', scope.row)">添加下载</el-button>
|
<el-table-column label="操作" :width="350">
|
||||||
<el-button size="small" type="danger" @click="handleBtnClick('删除', scope.row)">删除</el-button>
|
<template #default="scope">
|
||||||
</template>
|
<el-button size="small" type="primary" @click="handleBtnClick('编辑', scope.row)">编辑</el-button>
|
||||||
</ProTable>
|
<el-button size="small" type="primary" @click="handleBtnClick('添加', scope.row)">添加下载</el-button>
|
||||||
<el-drawer
|
<el-button size="small" type="danger" @click="handleBtnClick('删除', scope.row)">删除</el-button>
|
||||||
v-model="dataStore.visible"
|
</template>
|
||||||
:show-close="true"
|
</el-table-column>
|
||||||
:size="600"
|
</el-table>
|
||||||
:close-on-click-modal="false"
|
|
||||||
:close-on-press-escape="false"
|
<el-drawer
|
||||||
:before-close="handleBeforeClone"
|
v-model="dataStore.visible"
|
||||||
destroy-on-close
|
:show-close="true"
|
||||||
>
|
:size="600"
|
||||||
<template #header="{ titleId, titleClass }">
|
:close-on-click-modal="false"
|
||||||
<h4 :id="titleId" :class="titleClass">{{ dataStore.title }}</h4>
|
:close-on-press-escape="false"
|
||||||
</template>
|
:before-close="handleBeforeClone"
|
||||||
<div>
|
destroy-on-close
|
||||||
<rulesForm
|
>
|
||||||
:ruleForm="dataStore.editRuleForm"
|
<template #header="{ titleId, titleClass }">
|
||||||
:formData="dataStore.editFormData"
|
<h4 :id="titleId" :class="titleClass">{{ dataStore.title }}</h4>
|
||||||
:rules="dataStore.rules"
|
</template>
|
||||||
ref="formRef"
|
<div>
|
||||||
/>
|
<rulesForm
|
||||||
</div>
|
:ruleForm="dataStore.editRuleForm"
|
||||||
<template #footer>
|
:formData="dataStore.editFormData"
|
||||||
<div style="flex: auto">
|
:rules="dataStore.rules"
|
||||||
<el-button @click="handleResetClick">重置</el-button>
|
ref="formRef"
|
||||||
<el-button type="primary" @click="handleConfirmClick">确认</el-button>
|
@handleSelectChangeEmits="handleSelectChangeEmits"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<template #footer>
|
||||||
</el-drawer>
|
<div style="flex: auto">
|
||||||
|
<el-button @click="handleResetClick">重置</el-button>
|
||||||
|
<el-button type="primary" @click="handleConfirmClick">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="downloadClassListIndex">
|
<script setup lang="ts" name="downloadClassListIndex">
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
// import ProTable from "@/components/ProTable/index.vue";
|
||||||
import rulesForm from "@/components/rulesForm/index.vue";
|
import rulesForm from "@/components/rulesForm/index.vue";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { integerRexg } from "@/utils/regexp/index";
|
import { integerRexg } from "@/utils/regexp/index";
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
// import { h } from "@/utils/url";
|
||||||
//列表接口
|
//列表接口
|
||||||
import {
|
import {
|
||||||
getCategoryListApi,
|
getCategoryListApi,
|
||||||
@@ -70,14 +77,16 @@ import {
|
|||||||
getCategorySortApi,
|
getCategorySortApi,
|
||||||
getCategorySaveApi,
|
getCategorySaveApi,
|
||||||
getCategoryReadApi,
|
getCategoryReadApi,
|
||||||
getCategoryUpdateApi
|
getCategoryUpdateApi,
|
||||||
|
getCategorysApi
|
||||||
} from "@/api/modules/downloadClass";
|
} from "@/api/modules/downloadClass";
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
//表格和搜索條件
|
//表格和搜索條件
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
|
||||||
const proTableRef = ref<any>(null);
|
|
||||||
const formRef: any = ref(null);
|
const formRef: any = ref(null);
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
// 数据源
|
// 数据源
|
||||||
@@ -89,11 +98,43 @@ const dataStore = reactive<any>({
|
|||||||
editFormData: cloneDeep(EDIT_FORM_DATA), //抽屉表单配置项
|
editFormData: cloneDeep(EDIT_FORM_DATA), //抽屉表单配置项
|
||||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
||||||
formData: FORM_DATA, //搜索配置项
|
formData: FORM_DATA, //搜索配置项 ruleForm formData
|
||||||
visible: false,
|
visible: false,
|
||||||
|
tableData: [],
|
||||||
selectRow: {} //当前选择的row
|
selectRow: {} //当前选择的row
|
||||||
});
|
});
|
||||||
|
const getCategoryList = async () => {
|
||||||
|
const result = await getCategoryListApi(dataStore.ruleForm);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
dataStore.tableData = result?.data;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getCategoryList();
|
||||||
|
//search reset
|
||||||
|
const search = () => {
|
||||||
|
getCategoryList();
|
||||||
|
};
|
||||||
|
const reset = () => {
|
||||||
|
for (let key in dataStore.ruleForm) {
|
||||||
|
dataStore.ruleForm[key] = "";
|
||||||
|
}
|
||||||
|
getCategoryList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSelectChangeEmits = (params: any) => {
|
||||||
|
const { id } = params;
|
||||||
|
dataStore.editRuleForm.pid = id;
|
||||||
|
};
|
||||||
|
|
||||||
|
//分类下拉
|
||||||
|
const getCategorys = async () => {
|
||||||
|
const result = await getCategorysApi();
|
||||||
|
if (result?.code === 0) {
|
||||||
|
dataStore.editFormData[3].options = addLabelValue(result?.data);
|
||||||
|
dataStore.editFormData[3].options.unshift({ value: 0, label: "无" });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getCategorys();
|
||||||
//抽屉确认
|
//抽屉确认
|
||||||
const handleConfirmClick = () => {
|
const handleConfirmClick = () => {
|
||||||
if (!formRef.value!.ruleFormRef) return;
|
if (!formRef.value!.ruleFormRef) return;
|
||||||
@@ -156,7 +197,7 @@ const getCategoryUpdate = async () => {
|
|||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
proTableRef?.value?.getTableList();
|
getCategoryList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//详情
|
//详情
|
||||||
@@ -173,7 +214,7 @@ const getCategorySave = async () => {
|
|||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
proTableRef?.value?.getTableList();
|
getCategoryList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//删除
|
//删除
|
||||||
@@ -183,7 +224,7 @@ const getCategoryDel = (id: any) => {
|
|||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { msg } = result;
|
const { msg } = result;
|
||||||
useMsg("success", msg);
|
useMsg("success", msg);
|
||||||
proTableRef?.value?.getTableList();
|
getCategoryList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -200,7 +241,7 @@ const getCategorySort = async (row: any) => {
|
|||||||
const result = await getCategorySortApi({ id: row.id, sort: row.sort });
|
const result = await getCategorySortApi({ id: row.id, sort: row.sort });
|
||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
proTableRef?.value?.getTableList();
|
getCategoryList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "category_id1",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
label: "下载分类: ",
|
label: "下载分类: ",
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
@@ -55,6 +55,22 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: "is_show1",
|
||||||
|
// placeholder: "",
|
||||||
|
// type: "radio",
|
||||||
|
// label: "是否启动: ",
|
||||||
|
// options: [
|
||||||
|
// {
|
||||||
|
// label: "是",
|
||||||
|
// value: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: "否",
|
||||||
|
// value: 0
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: "image",
|
prop: "image",
|
||||||
type: "upImg",
|
type: "upImg",
|
||||||
@@ -106,6 +122,8 @@ export const EDIT_TABLE_DATA = [
|
|||||||
file_ext: "" //文件格式
|
file_ext: "" //文件格式
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
export const EDIT_RULE_FORM = {};
|
export const EDIT_RULE_FORM = {
|
||||||
|
sort: 1
|
||||||
|
};
|
||||||
// editRuleForm: {},
|
// editRuleForm: {},
|
||||||
//editFormData: [],
|
//editFormData: [],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const RULES = {
|
export const RULES = {
|
||||||
name: [{ required: true, message: "下载名称不能为空 ! ", trigger: "blur" }],
|
name: [{ required: true, message: "下载名称不能为空 ! ", trigger: "blur" }],
|
||||||
category_id: [{ required: true, message: "下载分类不能为空 ! ", trigger: "blur" }],
|
category_id1: [{ required: true, message: "下载分类不能为空 ! ", trigger: "blur" }],
|
||||||
sort: [{ required: true, message: "下载排序不能为空 ! ", trigger: "blur" }]
|
sort: [{ required: true, message: "下载排序不能为空 ! ", trigger: "blur" }]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
interface FormItem {
|
interface FormItem {
|
||||||
prop: string;
|
prop: string;
|
||||||
|
prop1?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -25,9 +26,10 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "treeIds",
|
||||||
|
prop1: "category_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "下载分类: ",
|
label: "下载分类: ",
|
||||||
options: []
|
options: []
|
||||||
|
|||||||
@@ -48,12 +48,12 @@ export const COLUMNS = [
|
|||||||
prop: "created_at"
|
prop: "created_at"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
align: "center",
|
// align: "center",
|
||||||
label: "状态",
|
// label: "状态",
|
||||||
prop: "status",
|
// prop: "status",
|
||||||
width: 80
|
// width: 80
|
||||||
},
|
// },
|
||||||
|
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
:formData="dataStore.editFormData"
|
:formData="dataStore.editFormData"
|
||||||
:rules="dataStore.rules"
|
:rules="dataStore.rules"
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
|
@handleSelectChangeEmits="handleSelectChangeEmits"
|
||||||
>
|
>
|
||||||
<el-button type="primary" size="small" style="margin-bottom: 10px" @click="handleEditAdd">添加行</el-button>
|
<el-button type="primary" size="small" style="margin-bottom: 10px" @click="handleEditAdd">添加行</el-button>
|
||||||
<FormTable :columns="dataStore.editColumns" :tableData="dataStore.editTableData" :height="200">
|
<FormTable :columns="dataStore.editColumns" :tableData="dataStore.editTableData" :height="200">
|
||||||
@@ -58,6 +59,9 @@ import { useMsg } from "@/hooks/useMsg";
|
|||||||
import { Delete } from "@element-plus/icons-vue";
|
import { Delete } from "@element-plus/icons-vue";
|
||||||
const $route = useRoute();
|
const $route = useRoute();
|
||||||
import { getCategorysApi } from "@/api/modules/downloadClass";
|
import { getCategorysApi } from "@/api/modules/downloadClass";
|
||||||
|
import { recursiveCompare } from "@/utils/recursiveCompare";
|
||||||
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import {
|
import {
|
||||||
@@ -218,6 +222,7 @@ const handleEditAdd = () => {
|
|||||||
file_ext: "" //文件格式
|
file_ext: "" //文件格式
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//详情
|
//详情
|
||||||
const getAttachmentRead = async () => {
|
const getAttachmentRead = async () => {
|
||||||
let id = $route.query.id;
|
let id = $route.query.id;
|
||||||
@@ -228,24 +233,32 @@ const getAttachmentRead = async () => {
|
|||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
dataStore.editRuleForm = result?.data;
|
dataStore.editRuleForm = result?.data;
|
||||||
dataStore.editTableData = result?.data.attach;
|
dataStore.editTableData = result?.data.attach;
|
||||||
|
//recursiveCompare
|
||||||
|
let is = dataStore.editFormData[1].options.some((item: any) =>
|
||||||
|
recursiveCompare(item, dataStore.editRuleForm.category_id)
|
||||||
|
);
|
||||||
|
console.log(is, "========is==========");
|
||||||
|
// let is = dataStore.editFormData[1].options.some((item: any) => {
|
||||||
|
// console.log(item.id);
|
||||||
|
// console.log(dataStore.editRuleForm.category_id);
|
||||||
|
// return item.value == dataStore.editRuleForm.category_id;
|
||||||
|
// });
|
||||||
|
dataStore.editRuleForm.category_id1 = is ? dataStore.editRuleForm.category_id : dataStore.editRuleForm.category_name;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getAttachmentRead();
|
getAttachmentRead();
|
||||||
|
const handleSelectChangeEmits = (value: any) => {
|
||||||
|
if (value.prop === "category_id1") {
|
||||||
|
dataStore.editRuleForm.category_id = value.id;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//分类
|
//分类
|
||||||
const getCategorys = async () => {
|
const getCategorys = async () => {
|
||||||
const result = await getCategorysApi();
|
const result = await getCategorysApi({ is_show: 1 });
|
||||||
|
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let arr: any[] = [];
|
dataStore.editFormData[1].options = addLabelValue(result?.data);
|
||||||
result?.data?.forEach((item: any) => {
|
|
||||||
let obj = {
|
|
||||||
value: item.id,
|
|
||||||
label: item.name
|
|
||||||
};
|
|
||||||
arr.push(obj);
|
|
||||||
});
|
|
||||||
dataStore.editFormData[1].options = arr;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getCategorys();
|
getCategorys();
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
<el-tag :type="scope.row.status === 1 ? 'success' : 'danger'" effect="dark">{{
|
<el-tag :type="scope.row.status == 1 ? 'success' : 'danger'" effect="dark">{{
|
||||||
scope.row.status === 1 ? "启用" : "禁用"
|
scope.row.status == 1 ? "启用" : "禁用"
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #sort="scope">
|
<template #sort="scope">
|
||||||
@@ -40,6 +40,8 @@ import { getCategorysApi } from "@/api/modules/downloadClass";
|
|||||||
import { integerRexg } from "@/utils/regexp/index";
|
import { integerRexg } from "@/utils/regexp/index";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
//表格和搜索條件 FORM_DATA
|
//表格和搜索條件 FORM_DATA
|
||||||
@@ -49,7 +51,7 @@ const proTableRef = ref<any>(null);
|
|||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
|
|
||||||
//图片地址
|
//图片地址
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
editTableData: cloneDeep(EDIT_TABLE_DATA), //添加|编辑里的表格数据
|
editTableData: cloneDeep(EDIT_TABLE_DATA), //添加|编辑里的表格数据
|
||||||
@@ -150,20 +152,21 @@ const handleBlur = (row: any) => {
|
|||||||
const handleInput = (row: any) => {
|
const handleInput = (row: any) => {
|
||||||
row.sort = integerRexg(row.sort);
|
row.sort = integerRexg(row.sort);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCategorys = async () => {
|
const getCategorys = async () => {
|
||||||
const result = await getCategorysApi();
|
const result = await getCategorysApi();
|
||||||
|
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let arr: any[] = [];
|
// let arr: any[] = [];
|
||||||
result?.data?.forEach((item: any) => {
|
// result?.data?.forEach((item: any) => {
|
||||||
let obj = {
|
// let obj = {
|
||||||
value: item.id,
|
// value: item.id,
|
||||||
label: item.name
|
// label: item.name
|
||||||
};
|
// };
|
||||||
arr.push(obj);
|
// arr.push(obj);
|
||||||
});
|
// });
|
||||||
|
|
||||||
dataStore.formData[1].options = arr;
|
dataStore.formData[1].options = addLabelValue(result?.data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getCategorys();
|
getCategorys();
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ export const COLUMNS = [
|
|||||||
prop: "created_at"
|
prop: "created_at"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
align: "center",
|
// align: "center",
|
||||||
label: "状态",
|
// label: "状态",
|
||||||
prop: "status",
|
// prop: "status",
|
||||||
width: 80
|
// width: 80
|
||||||
},
|
// },
|
||||||
|
|
||||||
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #image="scope">
|
<template #image="scope">
|
||||||
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
<el-tag type="danger" effect="dark">{{ scope.row.status ? "删除" : "删除" }}</el-tag>
|
<el-tag type="danger" effect="dark">{{ scope.row.status ? "删除" : "删除" }}</el-tag>
|
||||||
@@ -37,7 +37,7 @@ import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
|
|||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTableRef = ref<any>(null);
|
const proTableRef = ref<any>(null);
|
||||||
//图片地址
|
//图片地址
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
columns: COLUMNS, //列表配置项
|
columns: COLUMNS, //列表配置项
|
||||||
@@ -47,7 +47,7 @@ const dataStore = reactive<any>({
|
|||||||
});
|
});
|
||||||
//分类列表
|
//分类列表
|
||||||
const getCategorys = async () => {
|
const getCategorys = async () => {
|
||||||
const result = await getCategorysApi();
|
const result = await getCategorysApi({ is_show: 0 });
|
||||||
|
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let arr: any[] = [];
|
let arr: any[] = [];
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ const handleExport = () => {
|
|||||||
};
|
};
|
||||||
//导出
|
//导出
|
||||||
const getMenusLisExport = async () => {
|
const getMenusLisExport = async () => {
|
||||||
const result = await getAgentListExportApi(dataStore.ruleForm);
|
const result = await getAgentListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
const getAgentTypesList = async () => {
|
const getAgentTypesList = async () => {
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ const handleExport = () => {
|
|||||||
};
|
};
|
||||||
//导出
|
//导出
|
||||||
const getMenusLisExport = async () => {
|
const getMenusLisExport = async () => {
|
||||||
const result = await getLeaveMsgListExportApi(dataStore.ruleForm);
|
const result = await getLeaveMsgListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="feedbackProductIndex">
|
<script setup lang="ts" name="feedbackProductIndex">
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
|
// const $router = useRouter();
|
||||||
//列表接口
|
//列表接口
|
||||||
import { getProductListApi } from "@/api/modules/product";
|
import { getProductListApi } from "@/api/modules/product";
|
||||||
// import { getCountryListApi } from "@/api/modules/global";
|
|
||||||
// import { useUserStore } from "@/stores/modules/user";
|
// import { useUserStore } from "@/stores/modules/user";
|
||||||
// const userStore: any = useUserStore();
|
// const userStore: any = useUserStore();
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
@@ -32,36 +32,15 @@ const dataStore = reactive<any>({
|
|||||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
||||||
formData: FORM_DATA //搜索配置项
|
formData: FORM_DATA //搜索配置项
|
||||||
// ZH: [],
|
|
||||||
// EN: []
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// const getCountryList = async () => {
|
|
||||||
// const result = await getCountryListApi();
|
|
||||||
|
|
||||||
// if (result?.code === 0) {
|
|
||||||
// dataStore.ZH = [];
|
|
||||||
// dataStore.EN = [];
|
|
||||||
// result?.data.forEach((item: any) => {
|
|
||||||
// dataStore.ZH.push({
|
|
||||||
// label: item.name,
|
|
||||||
// value: item.id
|
|
||||||
// });
|
|
||||||
// dataStore.EN.push({
|
|
||||||
// label: item.name,
|
|
||||||
// value: item.id
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// dataStore.formData[1].options = userStore.languageType === 1 ? dataStore.ZH : dataStore.EN;
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// getCountryList();
|
|
||||||
// watch(
|
// watch(
|
||||||
// () => userStore.languageType,
|
// () => userStore.languageType,
|
||||||
// (newVal: any) => {
|
// (newVal: any) => {
|
||||||
// dataStore.formData[1].options = newVal === 1 ? dataStore.ZH : dataStore.EN;
|
// console.log(newVal, "=======newVal=======");
|
||||||
// },
|
// // window.location.reload();
|
||||||
// { deep: true, immediate: true }
|
// $router.go(0);
|
||||||
|
// }
|
||||||
// );
|
// );
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
<script setup lang="ts" name="feedbackContactIndex">
|
<script setup lang="ts" name="feedbackContactIndex">
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import { useExport } from "@/hooks/useExport";
|
import { useExport } from "@/hooks/useExport";
|
||||||
|
// import { useUserStore } from "@/stores/modules/user";
|
||||||
|
// const userStore: any = useUserStore();
|
||||||
//列表接口
|
//列表接口
|
||||||
import { getBPListExportApi, getBPListApi, getBPInterestedListApi } from "@/api/modules/purchase";
|
import { getBPListExportApi, getBPListApi, getBPInterestedListApi } from "@/api/modules/purchase";
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
@@ -40,7 +42,10 @@ const handleExport = () => {
|
|||||||
};
|
};
|
||||||
//导出
|
//导出
|
||||||
const getBPListExport = async () => {
|
const getBPListExport = async () => {
|
||||||
const result = await getBPListExportApi(dataStore.ruleForm);
|
const result = await getBPListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
@@ -55,10 +60,18 @@ const getBPInterestedList = async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
dataStore.formData[1].options = arr;
|
dataStore.formData[1].options = arr;
|
||||||
console.log(result?.data, "=======data========");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getBPInterestedList();
|
getBPInterestedList();
|
||||||
|
// watch(
|
||||||
|
// () => userStore.languageType,
|
||||||
|
// (newVal: any) => {
|
||||||
|
// console.log(newVal);
|
||||||
|
|
||||||
|
// getBPInterestedList();
|
||||||
|
// },
|
||||||
|
// { deep: true, immediate: true }
|
||||||
|
// );
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ const setUserData = (data: any) => {
|
|||||||
const { username, uid, token, avatar } = data;
|
const { username, uid, token, avatar } = data;
|
||||||
console.log();
|
console.log();
|
||||||
// 设置token
|
// 设置token
|
||||||
userStore.setToken(token);
|
userStore.setToken("Bearer" + " " + token);
|
||||||
userStore.setUid(uid);
|
userStore.setUid(uid);
|
||||||
userStore.setNickname(username);
|
userStore.setNickname(username);
|
||||||
userStore.setAvatar(avatar);
|
userStore.setAvatar(avatar);
|
||||||
|
|||||||
@@ -105,6 +105,10 @@ const getProductAttrUp = async () => {
|
|||||||
if (obj.prop_name) {
|
if (obj.prop_name) {
|
||||||
dataStore.editRuleForm.props.push(obj);
|
dataStore.editRuleForm.props.push(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let dataClone = cloneDeep(dataStore.editRuleForm.props);
|
||||||
|
let props = JSON.stringify([...dataClone]);
|
||||||
|
dataStore.editRuleForm.props = props;
|
||||||
const result = await getProductAttrUpApi(dataStore.editRuleForm);
|
const result = await getProductAttrUpApi(dataStore.editRuleForm);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
useMsg("success", result?.msg);
|
useMsg("success", result?.msg);
|
||||||
|
|||||||
@@ -8,13 +8,8 @@
|
|||||||
:formData="dataStore.searchFormData"
|
:formData="dataStore.searchFormData"
|
||||||
:search-param="dataStore.searchParam"
|
:search-param="dataStore.searchParam"
|
||||||
/>
|
/>
|
||||||
<el-table
|
<!-- default-expand-all -->
|
||||||
:data="dataStore.tableData"
|
<el-table :data="dataStore.tableData" style="width: 100%; margin-bottom: 20px; font-size: 14px" row-key="id" border>
|
||||||
style="width: 100%; margin-bottom: 20px; font-size: 14px"
|
|
||||||
row-key="id"
|
|
||||||
border
|
|
||||||
default-expand-all
|
|
||||||
>
|
|
||||||
<el-table-column prop="id" label="id" />
|
<el-table-column prop="id" label="id" />
|
||||||
<el-table-column prop="name" label="分类名称" />
|
<el-table-column prop="name" label="分类名称" />
|
||||||
<el-table-column prop="sort" label="分类排序">
|
<el-table-column prop="sort" label="分类排序">
|
||||||
@@ -26,7 +21,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="is_show" label="是否显示">
|
<el-table-column prop="is_show" label="是否显示">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ row.is_show === 1 ? "✔️" : "❌" }}
|
{{ row.is_show == 1 ? "✔️" : "❌" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" :width="350">
|
<el-table-column label="操作" :width="350">
|
||||||
@@ -100,7 +95,7 @@ import {
|
|||||||
getArticleCategorySortApi,
|
getArticleCategorySortApi,
|
||||||
getProductClassTcoTreeApi
|
getProductClassTcoTreeApi
|
||||||
} from "@/api/modules/productClass";
|
} from "@/api/modules/productClass";
|
||||||
import { addLabelValue } from "../list/utils/common/addLabelValue";
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
|
|
||||||
@@ -154,7 +149,9 @@ const getArticleCategorySave = async (params: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSelectChangeEmits = (value: any) => {
|
const handleSelectChangeEmits = (value: any) => {
|
||||||
dataStore.ruleForm.pid = value.id;
|
if (value.prop === "pid") {
|
||||||
|
dataStore.ruleForm.pid = value.id;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const handleTreesSelectChangeEmits = (value: any) => {
|
const handleTreesSelectChangeEmits = (value: any) => {
|
||||||
console.log(value, "=========value=========");
|
console.log(value, "=========value=========");
|
||||||
@@ -204,12 +201,12 @@ const reset = () => {
|
|||||||
};
|
};
|
||||||
//重置表单配置
|
//重置表单配置
|
||||||
const resetFrom = () => {
|
const resetFrom = () => {
|
||||||
if (dataStore.selectLevel === 1 || dataStore.selectLevel === 2) {
|
if (dataStore.selectLevel == 1 || dataStore.selectLevel == 2) {
|
||||||
dataStore.ruleForm = cloneDeep(RULE_FORM_LV1);
|
dataStore.ruleForm = cloneDeep(RULE_FORM_LV1);
|
||||||
dataStore.formData = cloneDeep(FORM_DATA_LV1);
|
dataStore.formData = cloneDeep(FORM_DATA_LV1);
|
||||||
dataStore.rules = RULES_LV1;
|
dataStore.rules = RULES_LV1;
|
||||||
}
|
}
|
||||||
if (dataStore.selectLevel === 3) {
|
if (dataStore.selectLevel == 3) {
|
||||||
dataStore.ruleForm = cloneDeep(RULE_FORM_LV2);
|
dataStore.ruleForm = cloneDeep(RULE_FORM_LV2);
|
||||||
dataStore.formData = cloneDeep(FORM_DATA_LV2);
|
dataStore.formData = cloneDeep(FORM_DATA_LV2);
|
||||||
dataStore.rules = RULES_LV2;
|
dataStore.rules = RULES_LV2;
|
||||||
|
|||||||
@@ -14,9 +14,6 @@
|
|||||||
:request-api="getProductBuypassListApi"
|
:request-api="getProductBuypassListApi"
|
||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #imgUrl="scope">
|
|
||||||
<el-image :src="scope.row.imgUrl" style="width: 60px; height: 60px" />
|
|
||||||
</template>
|
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>
|
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
@@ -63,6 +60,7 @@ import { useUserStore } from "@/stores/modules/user";
|
|||||||
//列表接口
|
//列表接口
|
||||||
// getProductBuypassListImportApi
|
// getProductBuypassListImportApi
|
||||||
import {
|
import {
|
||||||
|
getProductBuypassListSaveApi,
|
||||||
getProductBuypassListApi,
|
getProductBuypassListApi,
|
||||||
getProductPlatformsListApi,
|
getProductPlatformsListApi,
|
||||||
getProductBuypassListExportApi,
|
getProductBuypassListExportApi,
|
||||||
@@ -92,53 +90,24 @@ const dataStore = reactive<any>({
|
|||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
ruleForm: cloneDeep(RULE_FORM), // 搜索參數
|
||||||
formData: FORM_DATA //搜索配置项
|
formData: FORM_DATA //搜索配置项
|
||||||
});
|
});
|
||||||
|
//添加
|
||||||
|
const getProductBuypassListSave = async (params: any) => {
|
||||||
|
const result = await getProductBuypassListSaveApi(params);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
useMsg("success", result?.msg);
|
||||||
|
// proTableRef?.value?.getTableList();
|
||||||
|
// console.log(result?.data);
|
||||||
|
}
|
||||||
|
};
|
||||||
//更新
|
//更新
|
||||||
const getProductBuypassUpdate = async (params: any) => {
|
const getProductBuypassUpdate = async (params: any) => {
|
||||||
const result = await getProductBuypassUpdateApi(params);
|
const result = await getProductBuypassUpdateApi(params);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
console.log(result?.data);
|
useMsg("success", result?.msg);
|
||||||
} else {
|
// console.log(result?.data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// const handleChange=()=>{
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const up=(it: any, scope: any, itIndex: any)=>{
|
|
||||||
// const { link, platform_name, link_id } = it;
|
|
||||||
// let is = scope.row.rowspan.some((item: any, index: number) => {
|
|
||||||
// if (index !== itIndex && item.platform_name === platform_name) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// if (is) {
|
|
||||||
// useMsg("warning", "同型号平台不能重复 !");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (!platform_name) {
|
|
||||||
// useMsg("warning", "平台不能为空 !");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (!link) {
|
|
||||||
// useMsg("warning", "链接不能为空 !");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// //获取ID
|
|
||||||
// let platform_id: any = null;
|
|
||||||
// dataStore.options.forEach((item: any) => {
|
|
||||||
// if (item.platform === platform_name) {
|
|
||||||
// platform_id = item.id;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// getProductBuypassUpdate({
|
|
||||||
// id: link_id,
|
|
||||||
// param: {
|
|
||||||
// platform_id,
|
|
||||||
// link
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//输入框失焦
|
//输入框失焦
|
||||||
const handleInputOrChange = (it: any, scope: any, itIndex: any) => {
|
const handleInputOrChange = (it: any, scope: any, itIndex: any) => {
|
||||||
const { link, platform_name, link_id } = it;
|
const { link, platform_name, link_id } = it;
|
||||||
@@ -166,13 +135,24 @@ const handleInputOrChange = (it: any, scope: any, itIndex: any) => {
|
|||||||
platform_id = item.id;
|
platform_id = item.id;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getProductBuypassUpdate({
|
|
||||||
id: link_id,
|
//添加
|
||||||
param: {
|
if (!link_id) {
|
||||||
|
getProductBuypassListSave({
|
||||||
|
product_id: scope.row.id,
|
||||||
platform_id,
|
platform_id,
|
||||||
link
|
link
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
|
// 更新
|
||||||
|
getProductBuypassUpdate({
|
||||||
|
id: link_id,
|
||||||
|
param: {
|
||||||
|
platform_id,
|
||||||
|
link
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
//平台
|
//平台
|
||||||
const getProductPlatformsList = async () => {
|
const getProductPlatformsList = async () => {
|
||||||
@@ -195,7 +175,10 @@ const handleExport = () => {
|
|||||||
|
|
||||||
//导出接口
|
//导出接口
|
||||||
const getProductBuypassListExport = async () => {
|
const getProductBuypassListExport = async () => {
|
||||||
const result = await getProductBuypassListExportApi(dataStore.ruleForm);
|
const result = await getProductBuypassListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,23 +9,29 @@
|
|||||||
<el-input v-model="_ruleFormParam.short_name" style="width: 440px" />
|
<el-input v-model="_ruleFormParam.short_name" style="width: 440px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="型号" required>
|
<el-form-item label="型号" required>
|
||||||
<el-input v-model="_ruleFormParam.spu" style="width: 440px" />
|
<el-input v-model="_ruleFormParam.spu" style="width: 440px" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品分类" style="width: 440px" required>
|
<el-form-item label="产品分类" style="width: 440px" required>
|
||||||
<!-- <el-input v-model="_ruleFormParam.category_id" /> -->
|
<!-- <el-input v-model="_ruleFormParam.category_id" /> -->
|
||||||
|
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
clearable
|
clearable
|
||||||
v-model="_ruleFormParam.category_id"
|
v-model="_ruleFormParam.category_id1"
|
||||||
:data="options"
|
:data="options"
|
||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
check-strictly
|
check-strictly
|
||||||
|
@change="handleTreeChange()"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="产品参数">
|
<el-form-item label="产品参数">
|
||||||
<el-input v-model="_ruleFormParam.params" style="width: 440px" />
|
<el-input
|
||||||
|
v-model="_ruleFormParam.params"
|
||||||
|
style="width: 440px"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 10, maxRows: 20 }"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="产品排序" style="width: 440px" required>
|
<el-form-item label="产品排序" style="width: 440px" required>
|
||||||
@@ -35,7 +41,7 @@
|
|||||||
:min="1"
|
:min="1"
|
||||||
:max="9999"
|
:max="9999"
|
||||||
:controls="true"
|
:controls="true"
|
||||||
v-model.trim="_ruleFormParam.sort"
|
v-model="_ruleFormParam.sort"
|
||||||
step-strictly
|
step-strictly
|
||||||
:step="1"
|
:step="1"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@@ -53,17 +59,22 @@
|
|||||||
<el-radio :value="0" :label="0">否</el-radio>
|
<el-radio :value="0" :label="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否推荐" style="width: 440px">
|
<el-form-item label="热门" style="width: 440px">
|
||||||
<el-radio-group v-model="_ruleFormParam.is_hot">
|
<el-radio-group v-model="_ruleFormParam.is_hot">
|
||||||
<el-radio :value="1" :label="1">是</el-radio>
|
<el-radio :value="1" :label="1">是</el-radio>
|
||||||
<el-radio :value="0" :label="0">否</el-radio>
|
<el-radio :value="0" :label="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否启用" style="width: 440px">
|
||||||
|
<el-radio-group v-model="_ruleFormParam.status">
|
||||||
|
<el-radio :value="1" :label="1">是</el-radio>
|
||||||
|
<el-radio :value="0" :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item> -->
|
||||||
<el-form-item label="SEO标题">
|
<el-form-item label="SEO标题">
|
||||||
<el-input v-model="_ruleFormParam.seo_title" style="width: 440px" />
|
<el-input v-model="_ruleFormParam.seo_title" style="width: 440px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="SEO关键字">
|
<el-form-item label="SEO关键词">
|
||||||
<el-input v-model="_ruleFormParam.seo_keywords" style="width: 440px" />
|
<el-input v-model="_ruleFormParam.seo_keywords" style="width: 440px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="SEO描述">
|
<el-form-item label="SEO描述">
|
||||||
@@ -90,6 +101,11 @@ const reset = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let _ruleFormParam: any = computed(() => props.data);
|
let _ruleFormParam: any = computed(() => props.data);
|
||||||
|
|
||||||
|
const handleTreeChange = () => {
|
||||||
|
_ruleFormParam.value.category_id = _ruleFormParam.value.category_id1;
|
||||||
|
};
|
||||||
|
|
||||||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||||
defineExpose({
|
defineExpose({
|
||||||
ruleForm: _ruleFormParam,
|
ruleForm: _ruleFormParam,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<el-table-column v-for="attrId in selectedAttrIds" :key="attrId" :label="findAttrById(attrId)?.attr_name">
|
<el-table-column v-for="attrId in selectedAttrIds" :key="attrId" :label="findAttrById(attrId)?.attr_name">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-form :model="row">
|
<el-form :model="row">
|
||||||
<el-form-item v-if="findAttrById(attrId)?.attr_type === 1" style="margin: 0">
|
<el-form-item v-if="findAttrById(attrId)?.attr_type == 1" style="margin: 0">
|
||||||
<el-select v-model="findAttrObjInRow(row, attrId).attr_value" placeholder="请选择">
|
<el-select v-model="findAttrObjInRow(row, attrId).attr_value" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="prop in findAttrById(attrId)?.props"
|
v-for="prop in findAttrById(attrId)?.props"
|
||||||
|
|||||||
@@ -108,6 +108,24 @@ export const BASIC_INFO_FORM_DATA: FormItem[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// {
|
||||||
|
// prop: "is_show1",
|
||||||
|
// placeholder: "",
|
||||||
|
// type: "radio",
|
||||||
|
// label: "是否启用: ",
|
||||||
|
// options: [
|
||||||
|
// {
|
||||||
|
// label: "是",
|
||||||
|
// value: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: "否",
|
||||||
|
// value: -1
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "seo_title",
|
prop: "seo_title",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
@@ -118,7 +136,7 @@ export const BASIC_INFO_FORM_DATA: FormItem[] = [
|
|||||||
prop: "seo_keyword",
|
prop: "seo_keyword",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
type: "input",
|
type: "input",
|
||||||
label: "SEO关键字: "
|
label: "SEO关键词: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "seo_desc",
|
prop: "seo_desc",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
interface FormItem {
|
interface FormItem {
|
||||||
prop: string;
|
prop: string;
|
||||||
|
prop1?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -31,7 +32,8 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
label: "型号: "
|
label: "型号: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "treeIds",
|
||||||
|
prop1: "category_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "treeSelect",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
<el-tab-pane label="图片信息" name="imgInfo">
|
<el-tab-pane label="图片信息" name="imgInfo">
|
||||||
<imgInfo :imgInfoData="dataStore.imgInfoData" ref="imgInfoRef" :attrList="dataStore.attrList" />
|
<imgInfo :imgInfoData="dataStore.imgInfoData" ref="imgInfoRef" :attrList="dataStore.attrList" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="详细内容" name="third">
|
<el-tab-pane label="产品详情" name="third">
|
||||||
<div style="width: 1280px; margin: 0 auto">
|
<div style="width: 1280px; margin: 0 auto">
|
||||||
<WangEditor v-model:value="dataStore.detail" />
|
<Editor v-model:content="dataStore.detail" />
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="相关信息及下载" name="related">
|
<el-tab-pane label="相关信息" name="related">
|
||||||
<!-- <related ref="relatedRef" :data="dataStore.related" /> -->
|
<!-- <related ref="relatedRef" :data="dataStore.related" /> -->
|
||||||
<div style="margin-bottom: 16px">
|
<div style="margin-bottom: 16px">
|
||||||
<el-button type="primary" size="small" @click="handleRelatedAdd()">添加行</el-button>
|
<el-button type="primary" size="small" @click="handleRelatedAdd()">添加行</el-button>
|
||||||
@@ -42,20 +42,26 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="productEditIndex">
|
<script setup lang="ts" name="productEditIndex">
|
||||||
import { ref, reactive } from "vue";
|
import { ref, reactive } from "vue";
|
||||||
//getProductAttrsApi
|
import Editor from "@/components/Editor/index.vue";
|
||||||
import { getProductDetailsApi, getProductListApi, getProductAttrsListApi } from "@/api/modules/productList";
|
import {
|
||||||
import { getProductCategoryListApi } from "@/api/modules/productClass";
|
getProductDetailsApi,
|
||||||
|
getProductListApi,
|
||||||
|
getProductAttrsListApi,
|
||||||
|
getProductCategoryListApi
|
||||||
|
} from "@/api/modules/productList";
|
||||||
|
// import { getProductCategoryListApi } from "@/api/modules/productClass";
|
||||||
import { RELATED_INFO_COLUMNS } from "./constant/related";
|
import { RELATED_INFO_COLUMNS } from "./constant/related";
|
||||||
import { cloneDeep, debounce } from "lodash-es";
|
import { cloneDeep, debounce } from "lodash-es";
|
||||||
import { messageBox } from "@/utils/messageBox";
|
import { messageBox } from "@/utils/messageBox";
|
||||||
|
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { handleSubmit, handleReset, initDetailParams } from "./utils/edit/index";
|
import { handleSubmit, handleReset, initDetailParams } from "./utils/edit/index";
|
||||||
import { addLabelValue } from "./utils/common/addLabelValue";
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
//组件引入
|
//组件引入
|
||||||
import basicInfo from "./components/basicInfo.vue";
|
import basicInfo from "./components/basicInfo.vue";
|
||||||
import imgInfo from "./components/imgInfo.vue";
|
import imgInfo from "./components/imgInfo.vue";
|
||||||
import WangEditor from "@/components/WangEditor/index.vue";
|
//import WangEditor from "@/components/WangEditor/index.vue";
|
||||||
import FormTable from "@/components/FormTable/index.vue";
|
import FormTable from "@/components/FormTable/index.vue";
|
||||||
|
|
||||||
const $route = useRoute();
|
const $route = useRoute();
|
||||||
@@ -104,6 +110,7 @@ getProductAttrsList();
|
|||||||
const getProductList = async (query: any) => {
|
const getProductList = async (query: any) => {
|
||||||
const result: any = await getProductListApi({
|
const result: any = await getProductListApi({
|
||||||
spu: query,
|
spu: query,
|
||||||
|
is_show: 1,
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 1000
|
size: 1000
|
||||||
});
|
});
|
||||||
@@ -123,7 +130,7 @@ const getProductList = async (query: any) => {
|
|||||||
|
|
||||||
//产品分类(后端大佬说直接掉列表接口)
|
//产品分类(后端大佬说直接掉列表接口)
|
||||||
const getProductCategoryList = async () => {
|
const getProductCategoryList = async () => {
|
||||||
const result = await getProductCategoryListApi({ page: 1, size: 500 });
|
const result = await getProductCategoryListApi({ is_show: 1 });
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let dataClone: any = cloneDeep(result?.data);
|
let dataClone: any = cloneDeep(result?.data);
|
||||||
dataStore.options = addLabelValue(dataClone);
|
dataStore.options = addLabelValue(dataClone);
|
||||||
@@ -159,6 +166,7 @@ const handleRelatedAdd = () => {
|
|||||||
};
|
};
|
||||||
//相关信息及下载远程搜索
|
//相关信息及下载远程搜索
|
||||||
const handleRemote = debounce((params: any) => {
|
const handleRemote = debounce((params: any) => {
|
||||||
|
console.log(params, "============>>>>");
|
||||||
getProductList(params.query);
|
getProductList(params.query);
|
||||||
}, 800);
|
}, 800);
|
||||||
//产品属性接口
|
//产品属性接口
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
>
|
>
|
||||||
<template #cover_image="scope">
|
<template #cover_image="scope">
|
||||||
<el-image :src="h + scope.row.cover_image" style="width: 60px; height: 60px" />
|
<el-image :src="scope.row.cover_image ? h + scope.row.cover_image : ''" style="width: 60px; height: 60px" />
|
||||||
</template>
|
</template>
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
<el-tag effect="dark" :type="scope.row.status === 1 ? 'success' : 'danger'">{{
|
<el-tag effect="dark" :type="scope.row.status == 1 ? 'success' : 'danger'">{{
|
||||||
scope.row.status === 1 ? "启用" : "禁用"
|
scope.row.status == 1 ? "启用" : "禁用"
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #is_show="scope">
|
<template #is_show="scope">
|
||||||
<el-tag :type="scope.row.is_show === 1 ? 'success' : 'danger'" effect="dark">{{
|
<el-tag :type="scope.row.is_show == 1 ? 'success' : 'danger'" effect="dark">{{
|
||||||
scope.row.is_show === 1 ? "已上架" : "未上架"
|
scope.row.is_show == 1 ? "已上架" : "未上架"
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<!-- sort -->
|
<!-- sort -->
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
<template #operation="scope">
|
<template #operation="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
:type="scope.row.is_show === 1 ? 'danger' : 'primary'"
|
:type="scope.row.is_show == 1 ? 'danger' : 'primary'"
|
||||||
@click="handleBtnClick('上下架', scope.row)"
|
@click="handleBtnClick('上下架', scope.row)"
|
||||||
>{{ scope.row.is_show === 1 ? "下架" : "上架" }}</el-button
|
>{{ scope.row.is_show == 1 ? "下架" : "上架" }}</el-button
|
||||||
>
|
>
|
||||||
<el-button size="small" type="info" style="cursor: not-allowed" @click="handleBtnClick('添加SKU', scope.row)"
|
<el-button size="small" type="info" style="cursor: not-allowed" @click="handleBtnClick('添加SKU', scope.row)"
|
||||||
>添加SKU</el-button
|
>添加SKU</el-button
|
||||||
@@ -52,17 +52,18 @@ import ProTable from "@/components/ProTable/index.vue";
|
|||||||
import { integerRexg } from "@/utils/regexp/index";
|
import { integerRexg } from "@/utils/regexp/index";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { useExport } from "@/hooks/useExport";
|
import { useExport } from "@/hooks/useExport";
|
||||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
import { h } from "@/utils/url";
|
||||||
//列表接口
|
//列表接口
|
||||||
//getProductDelApi
|
//getProductDelApi
|
||||||
import {
|
import {
|
||||||
getProductListApi,
|
getProductListApi,
|
||||||
getProductUpOrShelvesApi,
|
getProductUpOrShelvesApi,
|
||||||
getProductListSortApi,
|
getProductListSortApi,
|
||||||
getProductListExportApi
|
getProductListExportApi,
|
||||||
|
getProductCategoryListApi
|
||||||
} from "@/api/modules/productList";
|
} from "@/api/modules/productList";
|
||||||
import { getProductCategoryListApi } from "@/api/modules/productClass";
|
// import { getProductCategoryListApi } from "@/api/modules/productClass";
|
||||||
import { addLabelValue } from "./utils/common/addLabelValue";
|
import { addLabelValue } from "@/utils/addLabelValue";
|
||||||
|
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
@@ -85,7 +86,10 @@ const handleExport = () => {
|
|||||||
};
|
};
|
||||||
//导出接口
|
//导出接口
|
||||||
const getProductListExport = async () => {
|
const getProductListExport = async () => {
|
||||||
const result = await getProductListExportApi(dataStore.ruleForm);
|
const result = await getProductListExportApi({
|
||||||
|
...proTableRef?.value?.searchParam,
|
||||||
|
...proTableRef?.value?.pageable
|
||||||
|
});
|
||||||
await useExport(result);
|
await useExport(result);
|
||||||
};
|
};
|
||||||
//上下架
|
//上下架
|
||||||
@@ -109,7 +113,7 @@ const getProductListSort = async (row: any) => {
|
|||||||
|
|
||||||
//产品分类(后端大佬说直接掉列表接口)
|
//产品分类(后端大佬说直接掉列表接口)
|
||||||
const getProductCategoryList = async () => {
|
const getProductCategoryList = async () => {
|
||||||
const result = await getProductCategoryListApi({ page: 1, size: 500 });
|
const result = await getProductCategoryListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let dataClone: any = cloneDeep(result?.data);
|
let dataClone: any = cloneDeep(result?.data);
|
||||||
dataStore.formData[2].options = addLabelValue(dataClone);
|
dataStore.formData[2].options = addLabelValue(dataClone);
|
||||||
@@ -128,9 +132,6 @@ const handleInput = (row: any) => {
|
|||||||
|
|
||||||
//按钮点击事件
|
//按钮点击事件
|
||||||
const handleBtnClick = (type: any, row: any) => {
|
const handleBtnClick = (type: any, row: any) => {
|
||||||
// if (type === "删除") {
|
|
||||||
// // getProductDel(row.id);
|
|
||||||
// }
|
|
||||||
//添加SUK和删除暂时无法操作
|
//添加SUK和删除暂时无法操作
|
||||||
if (type == "添加SUK" || type === "删除") {
|
if (type == "添加SUK" || type === "删除") {
|
||||||
return false;
|
return false;
|
||||||
@@ -152,4 +153,3 @@ const handleBtnClick = (type: any, row: any) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
./utils/common/addLabelValue
|
|
||||||
|
|||||||
@@ -1,13 +1,33 @@
|
|||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
|
// import { convertSpanToDiv } from "@/utils/convertSpanToDiv";
|
||||||
|
const hasIdRecursive = (data: any, targetId: any) => {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
const item = data[i];
|
||||||
|
if (item.id === targetId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
if (hasIdRecursive(item.children, targetId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
//将参数分离
|
//将参数分离
|
||||||
export const initDetailParams = (dataStore: any, data: any) => {
|
export const initDetailParams = (dataStore: any, data: any) => {
|
||||||
|
let is = hasIdRecursive(dataStore.options, data.category_id);
|
||||||
//基本信息
|
//基本信息
|
||||||
dataStore.basicInfoRuleForm = cloneDeep({
|
dataStore.basicInfoRuleForm = cloneDeep({
|
||||||
name: data.name,
|
name: data.name,
|
||||||
short_name: data.short_name,
|
short_name: data.short_name,
|
||||||
spu: data.spu,
|
spu: data.spu,
|
||||||
|
is: is,
|
||||||
|
category_id1: is ? data.category_id : data.category_name,
|
||||||
category_id: data.category_id,
|
category_id: data.category_id,
|
||||||
params: data.category_id,
|
category_name: data.category_name,
|
||||||
|
params: data.params,
|
||||||
sort: data.sort,
|
sort: data.sort,
|
||||||
is_show: data.is_show,
|
is_show: data.is_show,
|
||||||
is_new: data.is_new,
|
is_new: data.is_new,
|
||||||
@@ -22,6 +42,7 @@ export const initDetailParams = (dataStore: any, data: any) => {
|
|||||||
});
|
});
|
||||||
//详情
|
//详情
|
||||||
dataStore.detail = cloneDeep(data.detail);
|
dataStore.detail = cloneDeep(data.detail);
|
||||||
|
//dataStore.detail = convertSpanToDiv(dataStore.detail);
|
||||||
//图片
|
//图片
|
||||||
dataStore.imgInfoData.cover_image = data.cover_image;
|
dataStore.imgInfoData.cover_image = data.cover_image;
|
||||||
dataStore.imgInfoData.video_url = data.video_url;
|
dataStore.imgInfoData.video_url = data.video_url;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export const handleSubmit = async (infoRef: any, imgInfoRef: any, dataStore: any
|
|||||||
video_url,
|
video_url,
|
||||||
video_img,
|
video_img,
|
||||||
skus: skusCloneStr,
|
skus: skusCloneStr,
|
||||||
detail: dataStore.details,
|
detail: dataStore.detail,
|
||||||
related: JSON.stringify(relatedData) || []
|
related: JSON.stringify(relatedData) || []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
interface FormItem {
|
interface FormItem {
|
||||||
prop: string;
|
prop: string;
|
||||||
|
prop1?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -31,7 +32,8 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
label: "型号: "
|
label: "型号: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "treeIds",
|
||||||
|
prop1: "category_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "treeSelect",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user