diff --git a/src/App.vue b/src/App.vue index 7bcc919..9af76c8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,4 +13,5 @@ export default { diff --git a/src/api/intelligent-agent/list.js b/src/api/intelligent-agent/list.js new file mode 100644 index 0000000..5ead945 --- /dev/null +++ b/src/api/intelligent-agent/list.js @@ -0,0 +1,81 @@ +import request from '@/assets/js/utils/request' +import getUrl from '@/assets/js/utils/get-url' + +/** + * 获取智能体列表 + * @param {Object} data - 请求参数, 默认为空对象 + * @returns {Promise} - 返回 Promise 对象 + */ +const agentList = (data = {}) => { + return request({ + url: getUrl('/ebiz/intelligentAgent/list'), + method: 'post', + data + }) +} + +/** + * 查看智能体详情 + * @param {string} id - 请求 ID + */ +function agentDetail(id) { + return request({ + url: getUrl('/ebiz/intelligentAgent/query'), + method: 'get', + params: { id } + }) +} + +/** + * 增加智能体 + * @param {Object} data - 请求参数, 默认为空对象 + * @returns {Promise} - 返回 Promise 对象 + */ +const agentAdd = data => { + if (!data) { + console.warn('need data', data) + return + } + return request({ + url: getUrl('/ebiz/intelligentAgent/create'), + method: 'post', + data + }) +} + +/** + * 删除智能体 + * @param {Array} data - 请求参数, 默认为空对象 + * @returns {Promise} - 返回 Promise 对象 + */ +const agentDelete = data => { + if (!data || !data.length) { + console.warn('need data', data) + return + } + return request({ + url: getUrl('/ebiz/intelligentAgent/delete'), + method: 'post', + data + }) +} + +/** + * 编辑智能体 + * @param {Object} data - 请求参数, 默认为空对象 + * @returns {Promise} - 返回 Promise 对象 + */ +const agentEdit = data => { + if (!data || !data.id) { + console.warn('need data', data) + return + } + + return request({ + url: getUrl('/ebiz/intelligentAgent/update'), + method: 'post', + data + }) +} + +export { agentList, agentEdit, agentDelete, agentAdd, agentDetail } diff --git a/src/assets/images/active.png b/src/assets/images/active.png index 7d1e905..75078e6 100644 Binary files a/src/assets/images/active.png and b/src/assets/images/active.png differ diff --git a/src/assets/images/logo.png b/src/assets/images/logo.png new file mode 100644 index 0000000..ed859c9 Binary files /dev/null and b/src/assets/images/logo.png differ diff --git a/src/assets/sass/common.css b/src/assets/sass/common.css index 15d8495..683989a 100644 --- a/src/assets/sass/common.css +++ b/src/assets/sass/common.css @@ -349,7 +349,9 @@ h3 { #app .sidebar-container { transition: width 0.28s; width: 210px !important; - background-color: #304156; + background-color: #f0f4fa; + border: none; + padding: 10px; height: 100%; position: fixed; font-size: 0px; diff --git a/src/assets/sass/public.scss b/src/assets/sass/public.scss index 99347e8..e69de29 100644 --- a/src/assets/sass/public.scss +++ b/src/assets/sass/public.scss @@ -1,419 +0,0 @@ -.el-input__suffix { - height: unset; -} -.el-collapse { - border: none; -} - -[class*='el-col-'] { - min-height: 1px; -} -#RenderTable-container { - margin-bottom: 20px; -} -#RenderTable-container, -.el-table { - .el-button--mini { - padding: 5px; - color: #409eff; - border-color: transparent !important; - background: transparent !important; - //padding-left: 0; - //padding-right: 0; - } - .el-button--danger.el-button--mini { - color: #f56c6c; - } - .el-button--primary.el-button--mini:focus, - .el-button--primary.el-button--mini:hover { - color: #b3d8ff; - } - .el-button--danger.el-button--mini:focus, - .el-button--danger.el-button--mini:hover { - color: #fbc4c4; - } - .el-button--primary.el-button--mini.is-disabled, - .el-button--primary.el-button--mini.is-disabled:active, - .el-button--primary.el-button--mini.is-disabled:focus, - .el-button--primary.el-button--mini.is-disabled:hover { - color: #ccc; - } - .el-button--danger.el-button--mini.is-disabled, - .el-button--danger.el-button--mini.is-disabled:active, - .el-button--danger.el-button--mini.is-disabled:focus, - .el-button--danger.el-button--mini.is-disabled:hover { - color: #ccc; - } -} - -.el-button--medium { - padding: 8px 15px; - margin-top: 3px; -} -.el-button--danger { - //color:#F56C6C!important; -} -.el-upload__input { - display: none; -} -.el-dialog { - //.el-input{ - // width: 100%!important; - // max-width: 100%; - //} -} -.footer { - position: fixed; - bottom: 0; - left: 0; - width: 100%; - background: white; - padding: 15px 30px; - z-index: 10; - border-top: 1px solid #f0f0f0; - .flex { - display: flex; - justify-content: flex-end; - button { - margin-left: 20px; - } - } -} -.is-fullscreen { - .el-dialog__header { - //padding: unset; - } - .el-dialog__body { - padding: unset; - width: 95vw; - margin: auto; - max-height: 100%; - overflow: hidden; - } -} -//.el-dialog__body { -// padding: 30px 15px; -// width: 96%; -// margin: auto; -// max-height: 55vh; -// overflow: auto; -//} -//.el-dialog__footer { -// text-align: right; -//} -//.el-dialog__header { -// font-weight: 600; -// .el-dialog__title { -// font-size: 20px; -// color: #0096fd; -// line-height: 28px; -// } -//} - -.el-collapse-item__header.is-active { - border-bottom: 1px solid #ebeef5; -} -// to fixed https://github.com/ElemeFE/element/issues/2461 -.el-dialog { - border-radius: 10px; - transform: none; - left: 0; - position: relative; - margin: 0 auto; -} -.table-container { - padding-top: 15px; -} -.container-title { - height: 30px; - //border-bottom: 2px solid #0096FD; - //margin-bottom: 20px; -} -.container-title .title { - padding: 8px 15px; - font-weight: 500; - color: #fff; - background: #0096fd; - border-radius: 0 15px 0 0; -} -//[class*=" el-icon-"], [class^=el-icon-]{ -// line-height: unset; -//} -.lineH35 { - line-height: 35px; -} -.lineH25 { - line-height: 25px; -} -.lineH40 { - line-height: 40px; -} -.search_btn_s .el-button { - padding: 5px 8px; - margin-top: 6px; -} -.el-date-editor.el-input, -.el-input, -.el-select, -.el-cascader { - width: 100%; - //max-width: 350px; -} -/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ -::-webkit-scrollbar { - width: 7px; - height: 7px; -} - -/*定义滚动条轨道 内阴影+圆角*/ -::-webkit-scrollbar-track { - border-radius: 10px; -} - -/*定义滑块 内阴影+圆角*/ -::-webkit-scrollbar-thumb { - border-radius: 10px; - box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); - background-color: #c8c8c8; -} -.el-tooltip__popper { - max-width: 500px; -} -body .el-collapse-item__wrap { - padding-top: 30px !important; -} -.AdditionalInsurance .cell { - color: #409eff; -} -.cellClassNo .cell { - color: #f56c6c; -} -.cellClassYes .cell { - color: #409eff; -} -.mainInsurance .cell { - color: #67c23a; -} -.el-form-item__label { - width: 120px; - display: flex !important; - align-items: center; - height: 40px; - justify-content: flex-end; - line-height: 20px; -} -.el-select__tags { - white-space: nowrap !important; - overflow: hidden !important; - // text-overflow: ellipsis!important; - display: inline-block !important; -} -.el-loading-mask { - z-index: 9999; -} - -.toolBox { - display: inline-flex; -} -.ellipsis { - display: inline; - /*margin: auto;*/ - max-width: 215px; - height: 24px; - font-size: 14px; - overflow: hidden; - text-overflow: ellipsis; -} -.el-table th { - background: #ecf5ff; -} -//.el-form-item__content { -// line-height: 1.7692; -//} -.el-table th > .cell { - display: block; -} -.el-table th.el-table__cell { - background: #ecf5ff; -} - -.el-card { - border-radius: 10px; -} - -.danger { - color: #f56c6c !important; - & :disabled { - color: rgba(0, 0, 0, 0.25); - } - & :hover { - color: #dd6161; - } - & :focus { - color: #dd6161; - } - & :active { - color: #dd6161; - } -} -.default { - color: #000 !important; - background: #f1f3f5 !important; - border-color: #f1f3f5 !important; - & :disabled { - color: rgba(0, 0, 0, 0.25); - } - & :hover { - color: #000; - } - & :focus { - color: #000; - } - & :active { - color: #000; - } -} -.cursor-pointer { - cursor: pointer; -} -.view-body { - text-align: left; - font-size: 14px; - padding: 10px; - - div { - outline: unset; - } - - /* 添加一些基本的样式以美化 Markdown 内容 */ - - p { - font-size: 16px; - line-height: 1.6; - margin-bottom: 16px; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - margin-top: 24px; - margin-bottom: 12px; - border-bottom: 1px dashed #cecece; - padding: 5px; - } - - ul, - ol { - margin: 16px 0; - padding-left: 32px; - } - - li { - margin-bottom: 8px; - } - - a { - color: #007bff; - text-decoration: none; - } - - a:hover { - text-decoration: underline; - } - - code { - background-color: #f1f1f1; - padding: 4px 8px; - border-radius: 4px; - font-family: 'Courier New', Courier, monospace; - } - - img { - max-width: 100%; - } - - pre { - background-color: #f1f1f1; - padding: 16px; - border-radius: 4px; - overflow-x: auto; - font-family: 'Courier New', Courier, monospace; - } - - pre code { - background-color: transparent; - padding: 0; - } - - table { - border: 1px solid #f9f9f9; - position: relative; - width: 100%; - margin: 5px; - border-collapse: collapse; - background: linear-gradient(to bottom, #ffffff, #f9f9f9); - } - - th, - td { - border: 1px solid #ccc; - padding: 8px; - text-align: left; - } - - th { - background-color: #f2f2f2; - } - - // 添加斑马条纹效果 - tr:nth-child(even) { - background-color: #f9fafc; - } -} - -.m-view { - position: relative; - padding: 10px; - // 离开后还原 - &:after { - content: ''; - position: absolute; - width: calc(100% + 10px); - height: calc(100% + 10px); - top: -5px; - left: -5px; - background: rgba(201, 203, 255, 0.3); - transition: all 0.3s ease-in-out; - opacity: 0; // 初始状态下透明 - border: 2px solid rgb(201, 203, 255); - border-radius: 5px; - overflow: hidden; - } - - &:hover:after { - opacity: 1; // 悬停时显示 - } -} - -.editor-button { - position: relative; -} - -.public-icon { - font-size: 14px; - cursor: pointer; -} - -.public-icon + .public-icon { - margin-left: 10px; -} - -//去除滚动条 -.view-body::-webkit-scrollbar { - width: 0px; - height: 0px; -} diff --git a/src/assets/sass/renderSass/button.scss b/src/assets/sass/renderSass/button.scss index 529ac50..4641b53 100644 --- a/src/assets/sass/renderSass/button.scss +++ b/src/assets/sass/renderSass/button.scss @@ -23,6 +23,40 @@ background: transparent; color: var(--color-primary); } + &.normal-button { + padding: 5px; + background: unset; + border: unset; + color: $--color-primary-desc-text; + &:hover { + background: $--color-primary-table-button-hover; + border-color: #ebeef2; + } + &:focus { + background: $--color-primary-table-button-hover; + border-color: #ebeef2; + } + &:active { + background: $--color-primary-table-button-hover; + border-color: #ebeef2; + } + &.popver-button { + padding: 13px 5px; + text-align: left; + font-size: 14px; + font-family: PingFangSC, PingFang SC; + &:hover { + background: $--color-primary-table-button-hover; + color: rgba(79, 71, 245, 1); + } + & i { + color: #000; + } + } + &.popver-button + .popver-button { + margin: 0; + } + } } .el-button--text { diff --git a/src/assets/sass/renderSass/table.scss b/src/assets/sass/renderSass/table.scss new file mode 100644 index 0000000..46dec45 --- /dev/null +++ b/src/assets/sass/renderSass/table.scss @@ -0,0 +1,38 @@ +.el-table--small { + td, + th { + padding: 17px 0; + } +} + +.el-table__header-wrapper { + .el-table__header { + th { + padding: 17px 0; + } + } +} +.el-table--enable-row-hover { + .el-table__body { + tr:hover { + td { + background-color: $--color-primary-table-hover; + } + } + } +} + +.el-table { + .el-button + .el-button { + margin-left: 5px; + } +} + +.table-popver { + display: inline-flex; + flex-wrap: wrap; + flex-direction: column; + margin-left: 5px; + border-radius: 5px; + padding: 5px; +} diff --git a/src/assets/sass/renderSass/theme.scss b/src/assets/sass/renderSass/theme.scss index 740b714..741a05f 100644 --- a/src/assets/sass/renderSass/theme.scss +++ b/src/assets/sass/renderSass/theme.scss @@ -7,6 +7,9 @@ $--color-primary-danger-light: lighten($--color-primary-danger, 5%); //高亮颜 $--color-primary-danger-disabled: #ff000024; $--color-primary-desc-text: #51525d; $--color-primary-desc-text-drank: #999; +$--color-primary-table-hover: #eff0f8; +$--color-primary-table-button-hover: #e3e5f1; + :root { --swiper-theme-color: #0a6dff; --color-primary: #0a6dff; diff --git a/src/assets/sass/renderUi.scss b/src/assets/sass/renderUi.scss index bc44fcd..09f48d8 100644 --- a/src/assets/sass/renderUi.scss +++ b/src/assets/sass/renderUi.scss @@ -2,6 +2,7 @@ @import 'renderSass/button'; @import 'renderSass/dialog'; @import 'renderSass/input'; +@import 'renderSass/table'; html, body, @@ -9,8 +10,185 @@ body, .app-main { background: rgba(240, 244, 250, 1); } +.cursor-pointer { + cursor: pointer; +} + +.danger { + color: #f56c6c !important; + & :disabled { + color: rgba(0, 0, 0, 0.25); + } + & :hover { + color: #dd6161; + } + & :focus { + color: #dd6161; + } + & :active { + color: #dd6161; + } +} +.default { + color: #000 !important; + background: #f1f3f5 !important; + border-color: #f1f3f5 !important; + & :disabled { + color: rgba(0, 0, 0, 0.25); + } + & :hover { + color: #000; + } + & :focus { + color: #000; + } + & :active { + color: #000; + } +} .container { - padding: 20px; + padding: 20px 10px; //background-image: url('../images/backimage.png'); } + +.view-body { + text-align: left; + font-size: 14px; + padding: 10px; + + div { + outline: unset; + } + + /* 添加一些基本的样式以美化 Markdown 内容 */ + + p { + font-size: 16px; + line-height: 1.6; + margin-bottom: 16px; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + margin-top: 24px; + margin-bottom: 12px; + border-bottom: 1px dashed #cecece; + padding: 5px; + } + + ul, + ol { + margin: 16px 0; + padding-left: 32px; + } + + li { + margin-bottom: 8px; + } + + a { + color: #007bff; + text-decoration: none; + } + + a:hover { + text-decoration: underline; + } + + code { + background-color: #f1f1f1; + padding: 4px 8px; + border-radius: 4px; + font-family: 'Courier New', Courier, monospace; + } + + img { + max-width: 100%; + } + + pre { + background-color: #f1f1f1; + padding: 16px; + border-radius: 4px; + overflow-x: auto; + font-family: 'Courier New', Courier, monospace; + } + + pre code { + background-color: transparent; + padding: 0; + } + + table { + border: 1px solid #f9f9f9; + position: relative; + width: 100%; + margin: 5px; + border-collapse: collapse; + background: linear-gradient(to bottom, #ffffff, #f9f9f9); + } + + th, + td { + border: 1px solid #ccc; + padding: 8px; + text-align: left; + } + + th { + background-color: #f2f2f2; + } + + // 添加斑马条纹效果 + tr:nth-child(even) { + background-color: #f9fafc; + } +} + +.m-view { + position: relative; + padding: 10px; + // 离开后还原 + &:after { + content: ''; + position: absolute; + width: calc(100% + 10px); + height: calc(100% + 10px); + top: -5px; + left: -5px; + background: rgba(201, 203, 255, 0.3); + transition: all 0.3s ease-in-out; + opacity: 0; // 初始状态下透明 + border: 2px solid rgb(201, 203, 255); + border-radius: 5px; + overflow: hidden; + } + + &:hover:after { + opacity: 1; // 悬停时显示 + } +} + +.editor-button { + position: relative; +} + +.public-icon { + font-size: 14px; + cursor: pointer; +} + +.public-icon + .public-icon { + margin-left: 10px; +} + +//去除滚动条 +.view-body::-webkit-scrollbar { + width: 0px; + height: 0px; +} diff --git a/src/assets/sass/sidebar.scss b/src/assets/sass/sidebar.scss index 56dc4b1..8e82ff7 100644 --- a/src/assets/sass/sidebar.scss +++ b/src/assets/sass/sidebar.scss @@ -9,10 +9,12 @@ .sidebar-container { transition: width 0.28s; width: $sideBarWidth !important; - background-color: $menuBg; + background-color: #f0f4fa; + border: none; + padding: 10px; height: 100%; position: fixed; - font-size: 0px; + font-size: 12px; top: 0; bottom: 0; left: 0; diff --git a/src/assets/sass/utils.scss b/src/assets/sass/utils.scss index 176ca79..aca2bc2 100644 --- a/src/assets/sass/utils.scss +++ b/src/assets/sass/utils.scss @@ -142,7 +142,6 @@ h3 { margin-bottom: 10px; text-align: right; } - .el-select { width: 100%; } diff --git a/src/assets/sass/variables.scss b/src/assets/sass/variables.scss index 126000c..07acc26 100644 --- a/src/assets/sass/variables.scss +++ b/src/assets/sass/variables.scss @@ -37,7 +37,7 @@ $menuHover: #263445; $subMenuBg: #1f2d3d; $subMenuHover: #001528; -$sideBarWidth: 210px; +$sideBarWidth: 270px; // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass diff --git a/src/components/RenderMinerU/index.vue b/src/components/RenderMinerU/index.vue index f2678d8..032eda7 100644 --- a/src/components/RenderMinerU/index.vue +++ b/src/components/RenderMinerU/index.vue @@ -64,6 +64,7 @@ export default { name: 'index', data() { return { + endEmit: false, tab: '0', mdPges: 0, tableIdCounter: 0, @@ -171,6 +172,10 @@ export default { } }, props: { + visible: { + type: Boolean, + default: false + }, documentId: { type: String, default: '1361351897324294144' @@ -563,6 +568,7 @@ ${text}` }, // 重试方法 retryMiner() { + this.endEmit = true minerURetry({ documentId: this.documentId }) .then(res => { this.$message({ diff --git a/src/components/RenderTable/component/bodySlot/index.vue b/src/components/RenderTable/component/bodySlot/index.vue index 717f2b6..c5b141d 100644 --- a/src/components/RenderTable/component/bodySlot/index.vue +++ b/src/components/RenderTable/component/bodySlot/index.vue @@ -12,12 +12,88 @@ const RenderSlot = { } }, render: (h, data) => { + const renderTooltip = first => { + return h( + 'el-tooltip', + { + props: { + placement: 'bottom-end', + content: first[0].data.props.title + // effect: 'light' + } + }, + first + ) + } + const renderPopver = other => { + return h( + 'el-popover', + { + props: { + placement: 'bottom-end', + width: '100', + trigger: 'hover', + popperClass: 'table-popver' + }, + class: 'table-popver', + scopedSlots: { + reference: () => + h('el-button', { + props: { + size: 'mini', + type: 'text', + icon: 'el-icon-more' + }, + class: 'normal-button' + }) + } + }, + other + ) + } const params = { row: data.props.row, index: data.props.index } - if (data.props.column) params.column = data.props.column - return data.props.render(h, params) + if (data.props.column) { + params.column = data.props.column + } + if (params.column.isRedraw) { + let content = data.props.render(h, params) + let contentDiv = content.children + if (contentDiv.length > 2) { + console.log(content) + // 切割掉第一个div + const first = contentDiv.splice(0, 1) + const other = contentDiv.splice(0, contentDiv.length) + first[0].data.class = 'normal-button' + first[0].data.props.type = null + first[0].data.props.size = null + other.forEach(item => { + item.data.class = 'normal-button popver-button' + }) + + content.children = [renderTooltip(first), renderPopver(other)] + return content + } else { + // const first = contentDiv.splice(0, contentDiv) + + contentDiv = contentDiv.map(item => { + console.log(item) + item.data.class = 'normal-button' + item.data.props.type = null + item.data.props.size = null + return renderTooltip([item]) + }) + content.children = contentDiv + return content + } + // let div = + } else { + return data.props.render(h, params) + } + + // return data.props.render(h, params) } } export default { diff --git a/src/components/RenderTable/index.vue b/src/components/RenderTable/index.vue index 6cf1770..86ba9a2 100644 --- a/src/components/RenderTable/index.vue +++ b/src/components/RenderTable/index.vue @@ -44,8 +44,8 @@
- 编辑 - 删除 + +
@@ -193,7 +193,7 @@ export default { //表格边框 border border: { type: Boolean, - default: true + default: false }, // 是否剧中 align align: { diff --git a/src/fonts/demo.css b/src/fonts/demo.css new file mode 100644 index 0000000..a42a51f --- /dev/null +++ b/src/fonts/demo.css @@ -0,0 +1,536 @@ +/* Logo 字体 */ +@font-face { + font-family: 'iconfont logo'; + src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); + src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), + url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); +} + +.logo { + font-family: 'iconfont logo'; + font-size: 160px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* tabs */ +.nav-tabs { + position: relative; +} + +.nav-tabs .nav-more { + position: absolute; + right: 0; + bottom: 0; + height: 42px; + line-height: 42px; + color: #666; +} + +#tabs { + border-bottom: 1px solid #eee; +} + +#tabs li { + cursor: pointer; + width: 100px; + height: 40px; + line-height: 40px; + text-align: center; + font-size: 16px; + border-bottom: 2px solid transparent; + position: relative; + z-index: 1; + margin-bottom: -1px; + color: #666; +} + +#tabs .active { + border-bottom-color: #f00; + color: #222; +} + +.tab-container .content { + display: none; +} + +/* 页面布局 */ +.main { + padding: 30px 100px; + width: 960px; + margin: 0 auto; +} + +.main .logo { + color: #333; + text-align: left; + margin-bottom: 30px; + line-height: 1; + height: 110px; + margin-top: -50px; + overflow: hidden; + *zoom: 1; +} + +.main .logo a { + font-size: 160px; + color: #333; +} + +.helps { + margin-top: 40px; +} + +.helps pre { + padding: 20px; + margin: 10px 0; + border: solid 1px #e7e1cd; + background-color: #fffdef; + overflow: auto; +} + +.icon_lists { + width: 100% !important; + overflow: hidden; + *zoom: 1; +} + +.icon_lists li { + width: 100px; + margin-bottom: 10px; + margin-right: 20px; + text-align: center; + list-style: none !important; + cursor: default; +} + +.icon_lists li .code-name { + line-height: 1.2; +} + +.icon_lists .icon { + display: block; + height: 100px; + line-height: 100px; + font-size: 42px; + margin: 10px auto; + color: #333; + -webkit-transition: font-size 0.25s linear, width 0.25s linear; + -moz-transition: font-size 0.25s linear, width 0.25s linear; + transition: font-size 0.25s linear, width 0.25s linear; +} + +.icon_lists .icon:hover { + font-size: 100px; +} + +.icon_lists .svg-icon { + /* 通过设置 font-size 来改变图标大小 */ + width: 1em; + /* 图标和文字相邻时,垂直对齐 */ + vertical-align: -0.15em; + /* 通过设置 color 来改变 SVG 的颜色/fill */ + fill: currentColor; + /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 + normalize.css 中也包含这行 */ + overflow: hidden; +} + +.icon_lists li .name, +.icon_lists li .code-name { + color: #666; +} + +/* markdown 样式 */ +.markdown { + color: #666; + font-size: 14px; + line-height: 1.8; +} + +.highlight { + line-height: 1.5; +} + +.markdown img { + vertical-align: middle; + max-width: 100%; +} + +.markdown h1 { + color: #404040; + font-weight: 500; + line-height: 40px; + margin-bottom: 24px; +} + +.markdown h2, +.markdown h3, +.markdown h4, +.markdown h5, +.markdown h6 { + color: #404040; + margin: 1.6em 0 0.6em 0; + font-weight: 500; + clear: both; +} + +.markdown h1 { + font-size: 28px; +} + +.markdown h2 { + font-size: 22px; +} + +.markdown h3 { + font-size: 16px; +} + +.markdown h4 { + font-size: 14px; +} + +.markdown h5 { + font-size: 12px; +} + +.markdown h6 { + font-size: 12px; +} + +.markdown hr { + height: 1px; + border: 0; + background: #e9e9e9; + margin: 16px 0; + clear: both; +} + +.markdown p { + margin: 1em 0; +} + +.markdown > p, +.markdown > blockquote, +.markdown > .highlight, +.markdown > ol, +.markdown > ul { + width: 80%; +} + +.markdown ul > li { + list-style: circle; +} + +.markdown > ul li, +.markdown blockquote ul > li { + margin-left: 20px; + padding-left: 4px; +} + +.markdown > ul li p, +.markdown > ol li p { + margin: 0.6em 0; +} + +.markdown ol > li { + list-style: decimal; +} + +.markdown > ol li, +.markdown blockquote ol > li { + margin-left: 20px; + padding-left: 4px; +} + +.markdown code { + margin: 0 3px; + padding: 0 5px; + background: #eee; + border-radius: 3px; +} + +.markdown strong, +.markdown b { + font-weight: 600; +} + +.markdown > table { + border-collapse: collapse; + border-spacing: 0px; + empty-cells: show; + border: 1px solid #e9e9e9; + width: 95%; + margin-bottom: 24px; +} + +.markdown > table th { + white-space: nowrap; + color: #333; + font-weight: 600; +} + +.markdown > table th, +.markdown > table td { + border: 1px solid #e9e9e9; + padding: 8px 16px; + text-align: left; +} + +.markdown > table th { + background: #f7f7f7; +} + +.markdown blockquote { + font-size: 90%; + color: #999; + border-left: 4px solid #e9e9e9; + padding-left: 0.8em; + margin: 1em 0; +} + +.markdown blockquote p { + margin: 0; +} + +.markdown .anchor { + opacity: 0; + transition: opacity 0.3s ease; + margin-left: 8px; +} + +.markdown .waiting { + color: #ccc; +} + +.markdown h1:hover .anchor, +.markdown h2:hover .anchor, +.markdown h3:hover .anchor, +.markdown h4:hover .anchor, +.markdown h5:hover .anchor, +.markdown h6:hover .anchor { + opacity: 1; + display: inline-block; +} + +.markdown > br, +.markdown > p > br { + clear: both; +} + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #a71d5d; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +/* 代码高亮 */ +/* PrismJS 1.15.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +code[class*='language-'], +pre[class*='language-'] { + color: black; + background: none; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*='language-']::-moz-selection, +pre[class*='language-'] ::-moz-selection, +code[class*='language-']::-moz-selection, +code[class*='language-'] ::-moz-selection { + text-shadow: none; + background: #b3d4fc; +} + +pre[class*='language-']::selection, +pre[class*='language-'] ::selection, +code[class*='language-']::selection, +code[class*='language-'] ::selection { + text-shadow: none; + background: #b3d4fc; +} + +@media print { + code[class*='language-'], + pre[class*='language-'] { + text-shadow: none; + } +} + +/* Code blocks */ +pre[class*='language-'] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +:not(pre) > code[class*='language-'], +pre[class*='language-'] { + background: #f5f2f0; +} + +/* Inline code */ +:not(pre) > code[class*='language-'] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: 0.7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; + background: hsla(0, 0%, 100%, 0.5); +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + +.token.function, +.token.class-name { + color: #dd4a68; +} + +.token.regex, +.token.important, +.token.variable { + color: #e90; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} diff --git a/src/fonts/demo_index.html b/src/fonts/demo_index.html new file mode 100644 index 0000000..f3e7c31 --- /dev/null +++ b/src/fonts/demo_index.html @@ -0,0 +1,320 @@ + + + + + iconfont Demo + + + + + + + + + + + + + +
+

+ + + +

+ +
+
+
    +
  • + +
    主页
    +
    
    +
  • + +
  • + +
    定位
    +
    
    +
  • + +
  • + +
    技术支持
    +
    
    +
  • + +
  • + +
    灯泡
    +
    
    +
  • + +
  • + +
    规则设置
    +
    
    +
  • + +
  • + +
    笔记本电脑
    +
    
    +
  • +
+
+

Unicode 引用

+
+ +

Unicode 是字体在网页端最原始的应用方式,特点是:

+
    +
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • +
  • 默认情况下不支持多色,直接添加多色图标会自动去色。
  • +
+
+

+ 注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol + 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。) +

+
+

Unicode 使用步骤如下:

+

第一步:拷贝项目下面生成的 @font-face

+
@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.woff2?t=1745388823017') format('woff2'),
+       url('iconfont.woff?t=1745388823017') format('woff'),
+       url('iconfont.ttf?t=1745388823017') format('truetype');
+}
+
+

第二步:定义使用 iconfont 的样式

+
.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+

第三步:挑选相应图标并获取字体编码,应用于页面

+
+<span class="iconfont">&#x33;</span>
+
+
+

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    +
  • + +
    + 主页 +
    +
    .icon-zhuye
    +
  • + +
  • + +
    + 定位 +
    +
    .icon-dingwei
    +
  • + +
  • + +
    + 技术支持 +
    +
    .icon-dengpao
    +
  • + +
  • + +
    + 灯泡 +
    +
    .icon-dengpao1
    +
  • + +
  • + +
    + 规则设置 +
    +
    .icon-guizeshezhi
    +
  • + +
  • + +
    + 笔记本电脑 +
    +
    .icon-notebook
    +
  • +
+
+

font-class 引用

+
+ +

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

+

与 Unicode 使用方式相比,具有如下特点:

+
    +
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • +
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 fontclass 代码:

+
<link rel="stylesheet" href="./iconfont.css">
+
+

第二步:挑选相应图标并获取类名,应用于页面:

+
<span class="iconfont icon-xxx"></span>
+
+
+

" iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    +
  • + +
    主页
    +
    #icon-zhuye
    +
  • + +
  • + +
    定位
    +
    #icon-dingwei
    +
  • + +
  • + +
    技术支持
    +
    #icon-dengpao
    +
  • + +
  • + +
    灯泡
    +
    #icon-dengpao1
    +
  • + +
  • + +
    规则设置
    +
    #icon-guizeshezhi
    +
  • + +
  • + +
    笔记本电脑
    +
    #icon-notebook
    +
  • +
+
+

Symbol 引用

+
+ +

+ 这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 这种用法其实是做了一个 SVG + 的集合,与另外两种相比具有如下特点: +

+
    +
  • 支持多色图标了,不再受单色限制。
  • +
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • +
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • +
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 symbol 代码:

+
<script src="./iconfont.js"></script>
+
+

第二步:加入通用 CSS 代码(引入一次就行):

+
<style>
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+</style>
+
+

第三步:挑选相应图标并获取类名,应用于页面:

+
<svg class="icon" aria-hidden="true">
+  <use xlink:href="#icon-xxx"></use>
+</svg>
+
+
+
+
+
+ + + diff --git a/src/fonts/iconfont.css b/src/fonts/iconfont.css new file mode 100644 index 0000000..6f36aa4 --- /dev/null +++ b/src/fonts/iconfont.css @@ -0,0 +1,37 @@ +@font-face { + font-family: 'iconfont'; /* Project id 4902894 */ + src: url('iconfont.woff2?t=1742281383675') format('woff2'), url('iconfont.woff?t=1742281383675') format('woff'), + url('iconfont.ttf?t=1742281383675') format('truetype'); +} + +.iconfont { + font-family: 'iconfont' !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-zhuye:before { + content: '\e65e'; +} + +.icon-dingwei:before { + content: '\e629'; +} + +.icon-dengpao:before { + content: '\e69c'; +} + +.icon-dengpao1:before { + content: '\e67f'; +} + +.icon-guizeshezhi:before { + content: '\e6dc'; +} + +.icon-notebook:before { + content: '\e923'; +} diff --git a/src/fonts/iconfont.js b/src/fonts/iconfont.js new file mode 100644 index 0000000..56689c7 --- /dev/null +++ b/src/fonts/iconfont.js @@ -0,0 +1,63 @@ +;(window._iconfont_svg_string_4902894 = + ''), + (e => { + var c = (t = (t = document.getElementsByTagName('script'))[t.length - 1]).getAttribute('data-injectcss'), + t = t.getAttribute('data-disable-injectsvg') + if (!t) { + var l, + i, + o, + n, + a, + h = function(c, t) { + t.parentNode.insertBefore(c, t) + } + if (c && !e.__iconfont__svg__cssinject__) { + e.__iconfont__svg__cssinject__ = !0 + try { + document.write('') + } catch (c) { + console && console.log(c) + } + } + ;(l = function() { + var c, + t = document.createElement('div') + ;(t.innerHTML = e._iconfont_svg_string_4902894), + (t = t.getElementsByTagName('svg')[0]) && + (t.setAttribute('aria-hidden', 'true'), + (t.style.position = 'absolute'), + (t.style.width = 0), + (t.style.height = 0), + (t.style.overflow = 'hidden'), + (t = t), + (c = document.body).firstChild ? h(t, c.firstChild) : c.appendChild(t)) + }), + document.addEventListener + ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) + ? setTimeout(l, 0) + : ((i = function() { + document.removeEventListener('DOMContentLoaded', i, !1), l() + }), + document.addEventListener('DOMContentLoaded', i, !1)) + : document.attachEvent && + ((o = l), + (n = e.document), + (a = !1), + d(), + (n.onreadystatechange = function() { + 'complete' == n.readyState && ((n.onreadystatechange = null), s()) + })) + } + function s() { + a || ((a = !0), o()) + } + function d() { + try { + n.documentElement.doScroll('left') + } catch (c) { + return void setTimeout(d, 50) + } + s() + } + })(window) diff --git a/src/fonts/iconfont.json b/src/fonts/iconfont.json new file mode 100644 index 0000000..34fd659 --- /dev/null +++ b/src/fonts/iconfont.json @@ -0,0 +1,51 @@ +{ + "id": "4902894", + "name": "knowledge", + "font_family": "iconfont", + "css_prefix_text": "icon-", + "description": "", + "glyphs": [ + { + "icon_id": "4320362", + "name": "主页", + "font_class": "zhuye", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "8765144", + "name": "定位", + "font_class": "dingwei", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "9652678", + "name": "技术支持", + "font_class": "dengpao", + "unicode": "e69c", + "unicode_decimal": 59036 + }, + { + "icon_id": "13277451", + "name": "灯泡", + "font_class": "dengpao1", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "13584358", + "name": "规则设置", + "font_class": "guizeshezhi", + "unicode": "e6dc", + "unicode_decimal": 59100 + }, + { + "icon_id": "18169542", + "name": "笔记本电脑", + "font_class": "notebook", + "unicode": "e923", + "unicode_decimal": 59683 + } + ] +} diff --git a/src/fonts/iconfont.ttf b/src/fonts/iconfont.ttf new file mode 100644 index 0000000..128c524 Binary files /dev/null and b/src/fonts/iconfont.ttf differ diff --git a/src/fonts/iconfont.woff b/src/fonts/iconfont.woff new file mode 100644 index 0000000..6075e81 Binary files /dev/null and b/src/fonts/iconfont.woff differ diff --git a/src/fonts/iconfont.woff2 b/src/fonts/iconfont.woff2 new file mode 100644 index 0000000..9858cdb Binary files /dev/null and b/src/fonts/iconfont.woff2 differ diff --git a/src/router/app/index.js b/src/router/app/index.js index bb47335..72de415 100644 --- a/src/router/app/index.js +++ b/src/router/app/index.js @@ -42,18 +42,18 @@ export default [ hidden: true, children: [{ path: '/404', component: notFound }] }, - { - path: '/', - component: layout, - redirect: '/home', - name: 'home', - hidden: true, - children: [ - { - path: 'home', - component: home - } - ] - }, + // { + // path: '/', + // component: layout, + // redirect: '/home', + // name: 'home', + // hidden: true, + // children: [ + // { + // path: 'home', + // component: home + // } + // ] + // }, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/generatedRouter/index.js b/src/router/generatedRouter/index.js index d2d66ee..8db2e43 100644 --- a/src/router/generatedRouter/index.js +++ b/src/router/generatedRouter/index.js @@ -1,7 +1,30 @@ -import layout from '@/views/app/layout/index.vue' +import layout from '@/views/app/layout/layout.vue' import redirect from '@/views/app/redirect/index.vue' +const home = () => import('@/views/app/Home') export default [ + { + path: '/', + component: layout, + redirect: '/home', + name: 'home', + meta: { + title: '主页', + icon: 'icon-zhuye', + affix: true + }, + children: [ + { + path: '/home', + name: 'home-page', + component: home, + meta: { + title: '主页', + icon: 'icon-zhuye' + } + } + ] + }, { path: '/knowledge', name: 'knowledge', @@ -20,7 +43,7 @@ export default [ // redirect: '/knowledge/list', meta: { title: '知识库', - icon: 'el-icon-s-home', + icon: 'icon-dengpao1', affix: true }, children: [ @@ -95,7 +118,7 @@ export default [ redirect: '/knowledge/track', meta: { title: '任务轨迹', - icon: 'el-icon-s-home', + icon: 'icon-dingwei', affix: true }, children: [ @@ -107,7 +130,7 @@ export default [ meta: { breadcrumb: false, title: '任务轨迹', - icon: 'el-icon-s-home' + icon: 'icon-dingwei' } }, { @@ -130,7 +153,7 @@ export default [ redirect: '/knowledge/rule', meta: { title: '规则管理', - icon: 'el-icon-s-home', + icon: 'icon-guizeshezhi', affix: true }, children: [ @@ -154,7 +177,7 @@ export default [ redirect: '/dify/workflow', meta: { title: 'Dify', - icon: 'el-icon-home', + icon: 'icon-notebook', affix: true }, children: [ @@ -164,7 +187,7 @@ export default [ component: () => import('@/views/dify/views/workflow/index.vue'), meta: { title: 'Dify', - icon: 'el-icon-home' + icon: 'icon-notebook' } } ] @@ -208,5 +231,27 @@ export default [ } } ] + }, + { + path: '/intelligentAgent', + name: 'intelligentAgent', + component: layout, + redirect: '/intelligentAgent/list', + meta: { + title: '智能体', + icon: 'el-icon-home', + affix: true + }, + children: [ + { + path: '/intelligentAgent/list', + name: 'intelligentAgent-list', + component: () => import('@/views/intelligent-agent/index.vue'), + meta: { + title: '智能体', + icon: 'el-icon-home' + } + } + ] } ] diff --git a/src/views/app/layout/components/AppMain.vue b/src/views/app/layout/components/AppMain.vue index 42e3608..778a814 100644 --- a/src/views/app/layout/components/AppMain.vue +++ b/src/views/app/layout/components/AppMain.vue @@ -20,13 +20,13 @@ export default { diff --git a/src/views/app/layout/components/Sidebar/Logo.vue b/src/views/app/layout/components/Sidebar/Logo.vue index 1e5cf84..f78bf07 100644 --- a/src/views/app/layout/components/Sidebar/Logo.vue +++ b/src/views/app/layout/components/Sidebar/Logo.vue @@ -14,7 +14,7 @@ + diff --git a/src/views/app/layout/components/Sidebar/personal.vue b/src/views/app/layout/components/Sidebar/personal.vue new file mode 100644 index 0000000..072b3c3 --- /dev/null +++ b/src/views/app/layout/components/Sidebar/personal.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/views/app/layout/components/index.js b/src/views/app/layout/components/index.js index 97ee3cd..38c357c 100644 --- a/src/views/app/layout/components/index.js +++ b/src/views/app/layout/components/index.js @@ -1,3 +1,3 @@ export { default as Navbar } from './Navbar' -export { default as Sidebar } from './Sidebar' +export { default as Sidebar } from './Sidebar/Sidebar' export { default as AppMain } from './AppMain' diff --git a/src/views/app/layout/layout.vue b/src/views/app/layout/layout.vue new file mode 100644 index 0000000..383205b --- /dev/null +++ b/src/views/app/layout/layout.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/views/intelligent-agent/components/info/index.vue b/src/views/intelligent-agent/components/info/index.vue new file mode 100644 index 0000000..773ef48 --- /dev/null +++ b/src/views/intelligent-agent/components/info/index.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/views/intelligent-agent/index.vue b/src/views/intelligent-agent/index.vue new file mode 100644 index 0000000..c72bd3c --- /dev/null +++ b/src/views/intelligent-agent/index.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/views/knowledge/detail/components/split/CustomSplitDialog.vue b/src/views/knowledge/detail/components/split/CustomSplitDialog.vue index 3a0f842..20d74b0 100644 --- a/src/views/knowledge/detail/components/split/CustomSplitDialog.vue +++ b/src/views/knowledge/detail/components/split/CustomSplitDialog.vue @@ -112,36 +112,33 @@ export default { prop: 'knowledgeDesc', width: '150px', align: 'center', + isRedraw: true, render: (h, params) => { return h('span', {}, [ - h( - 'el-button', - { - class: 'floatSpan', - props: { - type: 'primary', - size: 'medium' - }, - on: { - click: () => this.handleEdit(params.row) - } + h('el-button', { + class: 'floatSpan', + props: { + type: 'primary', + size: 'medium', + title: '修改', + icon: 'el-icon-edit-outline' }, - '修改' - ), - h( - 'el-button', - { - class: 'floatSpan', - props: { - type: 'primary', - size: 'medium' - }, - on: { - click: () => this.handlePreview(params.row) - } + on: { + click: () => this.handleEdit(params.row) + } + }), + h('el-button', { + class: 'floatSpan', + props: { + type: 'primary', + size: 'medium', + title: '预览', + icon: 'el-icon-view' }, - '预览' - ) + on: { + click: () => this.handlePreview(params.row) + } + }) ]) } } diff --git a/src/views/knowledge/detail/components/words/CustomWords.vue b/src/views/knowledge/detail/components/words/CustomWords.vue index e57e44b..968b029 100644 --- a/src/views/knowledge/detail/components/words/CustomWords.vue +++ b/src/views/knowledge/detail/components/words/CustomWords.vue @@ -118,36 +118,33 @@ export default { prop: 'knowledgeDesc', width: '150px', align: 'center', + isRedraw: true, render: (h, params) => { return h('span', {}, [ - h( - 'el-button', - { - class: 'floatSpan', - props: { - type: 'primary', - size: 'medium' - }, - on: { - click: () => this.handleEdit(params.row) - } + h('el-button', { + class: 'floatSpan', + props: { + type: 'primary', + size: 'medium', + title: '修改', + icon: 'el-icon-edit-outline' }, - '修改' - ), - h( - 'el-button', - { - class: 'floatSpan', - props: { - type: 'primary', - size: 'medium' - }, - on: { - click: () => this.handlePreview(params.row) - } + on: { + click: () => this.handleEdit(params.row) + } + }), + h('el-button', { + class: 'floatSpan', + props: { + type: 'primary', + size: 'medium', + title: '预览', + icon: 'el-icon-view' }, - '预览' - ) + on: { + click: () => this.handlePreview(params.row) + } + }) ]) } } diff --git a/src/views/knowledge/detail/create.vue b/src/views/knowledge/detail/create.vue index 6c771fb..b8176b1 100644 --- a/src/views/knowledge/detail/create.vue +++ b/src/views/knowledge/detail/create.vue @@ -37,9 +37,9 @@ - +
- +
diff --git a/src/views/knowledge/detail/index.vue b/src/views/knowledge/detail/index.vue index e65263f..1370174 100644 --- a/src/views/knowledge/detail/index.vue +++ b/src/views/knowledge/detail/index.vue @@ -381,28 +381,28 @@ export default { key: '操作', prop: 'knowledgeDesc', width: '200px', + isRedraw: true, render: (h, params) => { return h('div', [ - h( - 'el-button', - { - class: 'floatSpan', - props: { - type: 'primary', - size: 'mini', - disabled: true - }, - on: {} + h('el-button', { + class: 'normal-button', + props: { + type: 'primary', + size: 'mini', + disabled: true, + icon: 'el-icon-edit-outline', + title: '编辑' }, - '修改(暂不支持)' - ), + on: {} + }), h( 'el-button', { class: 'floatSpan', props: { type: 'danger', - size: 'mini' + size: 'mini', + icon: 'el-icon-delete' }, on: { click: () => this.deleteKnowledge(params.row) @@ -416,7 +416,8 @@ export default { class: 'floatSpan', props: { type: 'primary', - size: 'mini' + size: 'mini', + icon: 'el-icon-tickets' }, on: { click: () => this.viewDocumentDetail(params.row) diff --git a/src/views/knowledge/index.vue b/src/views/knowledge/index.vue index 755023e..31ac158 100644 --- a/src/views/knowledge/index.vue +++ b/src/views/knowledge/index.vue @@ -2,7 +2,7 @@
- + diff --git a/src/views/track/Index.vue b/src/views/track/Index.vue index cd81095..4f7c08c 100644 --- a/src/views/track/Index.vue +++ b/src/views/track/Index.vue @@ -47,16 +47,14 @@ export default { { prop: 'createdDate', key: '上传时间', width: '200' }, { key: '操作', + isRedraw: true, render: (h, params) => { return h('div', [ - h( - 'el-button', - { - props: { type: 'text', size: 'mini' }, - on: { click: () => this.handleActiveInfo(params) } - }, - '查看详情' - ) + h('el-button', { + props: { icon: 'el-icon-tickets', title: '查看详情' }, + class: 'normal-button', + on: { click: () => this.handleActiveInfo(params) } + }) ]) } }