diff --git a/.beagle.yml b/.beagle.yml index 535d2360056014946b26f2a660628b63e98206c8..7c0840f276cf11355575fb7c36694499a9faec6f 100644 --- a/.beagle.yml +++ b/.beagle.yml @@ -1,10 +1,10 @@ # platform: # runner: 10.11.92.37 kind: pipeline -name: dev +name: dev0602 trigger: branch: - - dev + - dev0602 clone: disable: true @@ -65,7 +65,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5 # 基础镜像,根据项目需求进行使用,如果第三方登录改成ui-base dockerfile: .beagle/dockerfile repo: wod/apaas-system-ui # 生成镜像的 分组/名称 - version: "5.0.15" # 版本号 + version: "5.0.16" # 版本号 channel: amd64 args: "TARGETOS=linux,TARGETARCH=amd64" # 不同架构的构建参数 registry: registry.cn-qingdao.aliyuncs.com # 私有仓库地址 @@ -77,10 +77,10 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 - name: deploy-amd64 image: registry.cn-qingdao.aliyuncs.com/wod/devops-kubernetes:1.0 settings: - namespace: apaas-v5-demo + namespace: apaas-v5 deployment: apaas-manage-ui container: apaas-manage-ui - image: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15-amd64 + image: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16-amd64 environment: KUBERNETES_SERVER: from_secret: KUBERNETES_SERVER @@ -96,7 +96,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5-arm64 dockerfile: .beagle/dockerfile repo: wod/apaas-system-ui - version: "5.0.15" + version: "5.0.16" channel: arm64 args: "TARGETOS=linux,TARGETARCH=arm64" registry: registry.cn-qingdao.aliyuncs.com @@ -114,7 +114,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5-ppc64le dockerfile: .beagle/dockerfile repo: wod/apaas-system-ui - version: "5.0.15" + version: "5.0.16" channel: ppc64le args: "TARGETOS=linux,TARGETARCH=ppc64le" registry: registry.cn-qingdao.aliyuncs.com @@ -132,7 +132,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5-mips64le dockerfile: .beagle/dockerfile repo: wod/apaas-system-ui - version: "5.0.15" + version: "5.0.16" channel: mips64le args: "TARGETOS=linux,TARGETARCH=mips64le" registry: registry.cn-qingdao.aliyuncs.com @@ -145,8 +145,8 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-manifest:1.0 settings: platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/mips64le - template: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15-ARCH - target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15 + template: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16-ARCH + target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16 username: from_secret: REGISTRY_USER_ALIYUN password: @@ -181,7 +181,7 @@ steps: REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD_ALIYUN settings: - source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15-amd64 + source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16-amd64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0-amd64 registry: registry.cn-qingdao.aliyuncs.com @@ -199,7 +199,7 @@ steps: REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD_ALIYUN settings: - source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15-arm64 + source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0-arm64 registry: registry.cn-qingdao.aliyuncs.com @@ -217,7 +217,7 @@ steps: REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD_ALIYUN settings: - source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15-ppc64le + source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16-ppc64le target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0-ppc64le registry: registry.cn-qingdao.aliyuncs.com @@ -235,7 +235,7 @@ steps: REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD_ALIYUN settings: - source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.15-mips64le + source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.16-mips64le target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0-mips64le ##--------------对于需要保密的信息隐藏,减少账户信息的泄密⬇-----------------## --- diff --git a/package.json b/package.json index 1e7903bbe44af23e7f8de79ec703e40656ebc72c..a94d3ff2a973a558263a0359ecc2aba6c35d8f5c 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "github-markdown-css": "^5.1.0", "html2canvas": "^1.4.1", "markdown-it": "^13.0.1", + "mavon-editor": "^3.0.0", "sass": "^1.35.1", "uuid": "^8.3.2", "vue": "^3.2.31", diff --git a/src/App.vue b/src/App.vue index ed65799fb85e1d6361f0329ab4df8c9a7a4415df..4c2723f47e279262b066ee158b9c51116189d2c0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -115,7 +115,7 @@ export default { // this.initMsg() }, mounted() { - this.getSysOptions(); + // this.getSysOptions(); }, methods: { /** @@ -123,54 +123,54 @@ export default { * limit:用户无操作时常限制(分钟) */ - exitSystemAfterLimit(limit) { - window.lastOperateTime = new Date(); - window.onload = this.addOperateListener; - this.setTimer(limit); - }, + // exitSystemAfterLimit(limit) { + // window.lastOperateTime = new Date(); + // window.onload = this.addOperateListener; + // this.setTimer(limit); + // }, //绑定用户操作事件 - addOperateListener() { - document.addEventListener("mousemove", this.resetStartTime); - document.addEventListener("keydown", this.resetStartTime); - document.addEventListener("scroll", this.resetStartTime); - document.addEventListener("touchstart", this.resetStartTime); - }, + // addOperateListener() { + // document.addEventListener("mousemove", this.resetStartTime); + // document.addEventListener("keydown", this.resetStartTime); + // document.addEventListener("scroll", this.resetStartTime); + // document.addEventListener("touchstart", this.resetStartTime); + // }, //重置起始时间 - resetStartTime() { - window.lastOperateTime = new Date(); - }, + // resetStartTime() { + // window.lastOperateTime = new Date(); + // }, //设置定时器 - setTimer(limit) { - window.logTimer = setInterval(() => { - var currentTime = new Date(); - var timeDiff = currentTime.getTime() - lastOperateTime.getTime(); - if (timeDiff > limit * 60 * 1000) { - clearInterval(window.logTimer); - this.$axios.post(`/apaas/system/v5/user/logout`).then((res) => { - if (res.data.code == "200") { - window.location.href = `/apaas/manage/ui/#/login`; - this.$store.commit("setUserInfo", null); - clearCookie("bgToken"); - this.$message.success("退出成功"); - resetRouter(); - } else { - this.$message.error("退出失败"); - } - }); - } - }, 1000); - }, + // setTimer(limit) { + // window.logTimer = setInterval(() => { + // var currentTime = new Date(); + // var timeDiff = currentTime.getTime() - lastOperateTime.getTime(); + // if (timeDiff > limit * 60 * 1000) { + // clearInterval(window.logTimer); + // this.$axios.post(`/apaas/system/v5/user/logout`).then((res) => { + // if (res.data.code == "200") { + // window.location.href = `/apaas/manage/ui/#/login`; + // this.$store.commit("setUserInfo", null); + // clearCookie("bgToken"); + // this.$message.success("退出成功"); + // resetRouter(); + // } else { + // this.$message.error("退出失败"); + // } + // }); + // } + // }, 1000); + // }, - getSysOptions() { - this.$axios.get(`/apaas/system/v5/sysOptions`).then((res) => { - if (res.data.code == 200) { - const result = res.data.data || {}; - if (result.session_validity) this.exitSystemAfterLimit(result.session_validity); - } else { - this.$message.error(res.data.data); - } - }); - }, + // getSysOptions() { + // this.$axios.get(`/apaas/system/v5/sysOptions`).then((res) => { + // if (res.data.code == 200) { + // const result = res.data.data || {}; + // if (result.session_validity) this.exitSystemAfterLimit(result.session_validity); + // } else { + // this.$message.error(res.data.data); + // } + // }); + // }, openMsg(data) { this.readFlag = !this.readFlag; diff --git a/src/main.js b/src/main.js index d9a7ff207eee8f5ae5fc18606f08545216d00a2b..087fedd16853d5ca1dc1877f68a4bf93cdb75e21 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,9 @@ import { createApp } from "vue"; import ElementPlus from "element-plus"; import "element-plus/dist/index.css"; + +import mavonEditor from "mavon-editor"; +import "mavon-editor/dist/css/index.css"; import locale from "element-plus/lib/locale/lang/zh-cn"; import * as ElementPlusIconsVue from "@element-plus/icons-vue"; @@ -101,7 +104,13 @@ Promise.all([getUser(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")]) console.error(e); }) .finally(() => { - createVue.use(ElementPlus, { locale }).use(store).use(router).use(i18n).use(bgui); + createVue + .use(ElementPlus, { locale }) + .use(store) + .use(router) + .use(i18n) + .use(bgui) + .use(mavonEditor); createVue.mount("#app"); }); diff --git a/src/page/main/qa-manage/answer-list/index.vue b/src/page/main/qa-manage/answer-list/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..32b57decea6c42c5aaf5a9f50024c37e31e72a63 --- /dev/null +++ b/src/page/main/qa-manage/answer-list/index.vue @@ -0,0 +1,466 @@ + + + + + diff --git a/src/page/main/qa-manage/question-list/index.vue b/src/page/main/qa-manage/question-list/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..9850ae2b3e435f6af7951b14d040ab841541e8aa --- /dev/null +++ b/src/page/main/qa-manage/question-list/index.vue @@ -0,0 +1,462 @@ + + + + + diff --git a/src/page/main/support/document-type/index.vue b/src/page/main/support/document-type/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..b18d48c9145b44498da883d1a817e0639ad9d44e --- /dev/null +++ b/src/page/main/support/document-type/index.vue @@ -0,0 +1,599 @@ + + + + + diff --git a/src/page/main/support/document/add/index.vue b/src/page/main/support/document/add/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..9818c2929dd97b7661301d4839988f22e7a0da4b --- /dev/null +++ b/src/page/main/support/document/add/index.vue @@ -0,0 +1,164 @@ + + + + + + diff --git a/src/page/main/support/document/edit/index.vue b/src/page/main/support/document/edit/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..8c728e8fa6c5b1476d6759edc8bc6f3eb6e3bea0 --- /dev/null +++ b/src/page/main/support/document/edit/index.vue @@ -0,0 +1,179 @@ + + + + + + diff --git a/src/page/main/support/document/index.vue b/src/page/main/support/document/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..008f048eeeac8503cd4cc124cdfbb78d2e95eff8 --- /dev/null +++ b/src/page/main/support/document/index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/page/main/support/helper.js b/src/page/main/support/helper.js new file mode 100644 index 0000000000000000000000000000000000000000..d678d518d9f9dc34a6ccce0607e963dc90c8a737 --- /dev/null +++ b/src/page/main/support/helper.js @@ -0,0 +1,17 @@ +import $axios from "@/request/http"; + +export const topId = "00000000-0000-0000-0000-000000000000"; + +export const $imgAdd = function (args, editorRef) { + const [pos, $file] = args; + const formdata = new FormData(); + formdata.append("file", $file); + formdata.append("directory", "image"); + $axios + .post("/apaas/common/image/upload", formdata, { + headers: { "Content-Type": "multipart/form-data" }, + }) + .then(({ data }) => { + editorRef.$img2Url(pos, data.data); + }); +}; diff --git a/vite.config.js b/vite.config.js index 88bdd87eb5abe2613c3631cbacaa8793c4066d57..47d2e4fa36e4be592b39fb13d1502600330a7c93 100644 --- a/vite.config.js +++ b/vite.config.js @@ -56,6 +56,15 @@ export default { changeOrigin: true, secure: false, }, + "/apaas/knowledge/v5": { + target: "https://apaas5.wodcloud.com/apaas/knowledge/v5", // 所要代理的目标地址 + rewrite: (path) => { + console.log("path", path); + return path.replace(/^\/apaas\/knowledge\/v5/, ""); + }, // 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的) + changeOrigin: true, // true/false, Default: false - changes the origin of the host header to the target URL + secure: false, //解决证书缺失问题 + }, }, }, build: { diff --git a/yarn.lock b/yarn.lock index d7b392d62f5e8335dbf2923a628721cd6fe5e514..fe67ec5f561eb7ad34b25f955d9f5a93d00dc523 100644 --- a/yarn.lock +++ b/yarn.lock @@ -438,6 +438,11 @@ clipboard@^2.0.11: select "^1.1.2" tiny-emitter "^2.0.0" +commander@^2.20.3: + version "2.20.3" + resolved "https://mirrors.cloud.tencent.com/npm/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + compute-scroll-into-view@^1.0.20: version "1.0.20" resolved "https://registry.npmmirror.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz" @@ -455,6 +460,11 @@ css-line-break@^2.1.0: dependencies: utrie "^1.0.2" +cssfilter@0.0.10: + version "0.0.10" + resolved "https://mirrors.cloud.tencent.com/npm/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" + integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= + csstype@^2.6.8: version "2.6.20" resolved "https://registry.npmmirror.com/csstype/-/csstype-2.6.20.tgz" @@ -744,6 +754,16 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +highlight.js-async-webpack@^1.0.4: + version "1.0.4" + resolved "https://mirrors.cloud.tencent.com/npm/highlight.js-async-webpack/-/highlight.js-async-webpack-1.0.4.tgz#c06b67bf99f049045d62b756e5855b0912ec616c" + integrity sha1-wGtnv5nwSQRdYrdW5YVbCRLsYWw= + +highlight.js@^9.11.0: + version "9.18.5" + resolved "https://mirrors.cloud.tencent.com/npm/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" + integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== + html-void-elements@^2.0.0: version "2.0.1" resolved "https://registry.npmmirror.com/html-void-elements/-/html-void-elements-2.0.1.tgz" @@ -895,6 +915,15 @@ markdown-it@^13.0.1: mdurl "^1.0.1" uc.micro "^1.0.5" +mavon-editor@^3.0.0: + version "3.0.0" + resolved "https://mirrors.cloud.tencent.com/npm/mavon-editor/-/mavon-editor-3.0.0.tgz#232a34a8ceb2d9d1dfc7822103d09d1ffcf779ba" + integrity sha512-7TrZz4Z8+UUbQmVyQ688m50A9XBs2gZrOw8QaeWCvuo2stifyKukb0rPpmrBIMEeA1FCLPkR5dMf7BEMAc04uw== + dependencies: + highlight.js "^9.11.0" + highlight.js-async-webpack "^1.0.4" + xss "^1.0.6" + mdurl@^1.0.1: version "1.0.1" resolved "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz" @@ -1193,6 +1222,14 @@ wildcard@^1.1.0: resolved "https://registry.npmmirror.com/wildcard/-/wildcard-1.1.2.tgz" integrity sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng== +xss@^1.0.6: + version "1.0.14" + resolved "https://mirrors.cloud.tencent.com/npm/xss/-/xss-1.0.14.tgz#4f3efbde75ad0d82e9921cc3c95e6590dd336694" + integrity sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw== + dependencies: + commander "^2.20.3" + cssfilter "0.0.10" + zrender@5.3.2: version "5.3.2" resolved "https://registry.npmmirror.com/zrender/-/zrender-5.3.2.tgz"