mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-06 17:36:48 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -13,4 +13,5 @@ export default {
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import 'src/assets/sass/common.scss';
|
||||
@import 'fonts/iconfont.css';
|
||||
</style>
|
||||
|
||||
81
src/api/intelligent-agent/list.js
Normal file
81
src/api/intelligent-agent/list.js
Normal file
@@ -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 }
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 717 B |
BIN
src/assets/images/logo.png
Normal file
BIN
src/assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
38
src/assets/sass/renderSass/table.scss
Normal file
38
src/assets/sass/renderSass/table.scss
Normal file
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -142,7 +142,6 @@ h3 {
|
||||
margin-bottom: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
<!--</el-form>-->
|
||||
<!--自带的btn 不能有prop 属性-->
|
||||
<div v-if="!item.selfBtn && !item.prop && !item.type && !item.render" :fixed="item.fixed ? item.fixed : fixed">
|
||||
<el-button type="primary" size="mini" plain :disabled="disabled" @click="edit(scope.row, scope.$index)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" plain :disabled="disabled" @click="del(scope.row, scope.$index)">删除</el-button>
|
||||
<el-button class="normal-button" :disabled="disabled" icon="el-icon-delete" @click="del(scope.row, scope.$index)"></el-button>
|
||||
<el-button class="normal-button" icon="el-icon-edit-outline" :disabled="disabled" @click="edit(scope.row, scope.$index)"></el-button>
|
||||
</div>
|
||||
<!--如果渲染的是selfBtn-->
|
||||
<div v-if="item.selfBtn && !item.render">
|
||||
@@ -193,7 +193,7 @@ export default {
|
||||
//表格边框 border
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: false
|
||||
},
|
||||
// 是否剧中 align
|
||||
align: {
|
||||
|
||||
536
src/fonts/demo.css
Normal file
536
src/fonts/demo.css
Normal file
@@ -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;
|
||||
}
|
||||
320
src/fonts/demo_index.html
Normal file
320
src/fonts/demo_index.html
Normal file
@@ -0,0 +1,320 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>iconfont Demo</title>
|
||||
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon" />
|
||||
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" />
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css" />
|
||||
<link rel="stylesheet" href="demo.css" />
|
||||
<link rel="stylesheet" href="iconfont.css" />
|
||||
<script src="iconfont.js"></script>
|
||||
<!-- jQuery -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
|
||||
<!-- 代码高亮 -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
|
||||
<style>
|
||||
.main .logo {
|
||||
margin-top: 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main .logo .sub-title {
|
||||
margin-left: 0.5em;
|
||||
font-size: 22px;
|
||||
color: #fff;
|
||||
background: linear-gradient(-45deg, #3967ff, #b500fe);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1 class="logo">
|
||||
<a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
|
||||
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg" />
|
||||
</a>
|
||||
</h1>
|
||||
<div class="nav-tabs">
|
||||
<ul id="tabs" class="dib-box">
|
||||
<li class="dib active"><span>Unicode</span></li>
|
||||
<li class="dib"><span>Font class</span></li>
|
||||
<li class="dib"><span>Symbol</span></li>
|
||||
</ul>
|
||||
|
||||
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4902894" target="_blank" class="nav-more">查看项目</a>
|
||||
</div>
|
||||
<div class="tab-container">
|
||||
<div class="content unicode" style="display: block;">
|
||||
<ul class="icon_lists dib-box">
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">主页</div>
|
||||
<div class="code-name">&#xe65e;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">定位</div>
|
||||
<div class="code-name">&#xe629;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">技术支持</div>
|
||||
<div class="code-name">&#xe69c;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">灯泡</div>
|
||||
<div class="code-name">&#xe67f;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">规则设置</div>
|
||||
<div class="code-name">&#xe6dc;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">笔记本电脑</div>
|
||||
<div class="code-name">&#xe923;</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="unicode-">Unicode 引用</h2>
|
||||
<hr />
|
||||
|
||||
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
|
||||
<ul>
|
||||
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
|
||||
<li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>
|
||||
注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol
|
||||
引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>Unicode 使用步骤如下:</p>
|
||||
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
|
||||
<pre><code class="language-css"
|
||||
>@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');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
<pre><code class="language-css"
|
||||
>.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
|
||||
<pre>
|
||||
<code class="language-html"
|
||||
><span class="iconfont">&#x33;</span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content font-class">
|
||||
<ul class="icon_lists dib-box">
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-zhuye"></span>
|
||||
<div class="name">
|
||||
主页
|
||||
</div>
|
||||
<div class="code-name">.icon-zhuye</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-dingwei"></span>
|
||||
<div class="name">
|
||||
定位
|
||||
</div>
|
||||
<div class="code-name">.icon-dingwei</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-dengpao"></span>
|
||||
<div class="name">
|
||||
技术支持
|
||||
</div>
|
||||
<div class="code-name">.icon-dengpao</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-dengpao1"></span>
|
||||
<div class="name">
|
||||
灯泡
|
||||
</div>
|
||||
<div class="code-name">.icon-dengpao1</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-guizeshezhi"></span>
|
||||
<div class="name">
|
||||
规则设置
|
||||
</div>
|
||||
<div class="code-name">.icon-guizeshezhi</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-notebook"></span>
|
||||
<div class="name">
|
||||
笔记本电脑
|
||||
</div>
|
||||
<div class="code-name">.icon-notebook</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="font-class-">font-class 引用</h2>
|
||||
<hr />
|
||||
|
||||
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
|
||||
<p>与 Unicode 使用方式相比,具有如下特点:</p>
|
||||
<ul>
|
||||
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
|
||||
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
|
||||
<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css">
|
||||
</code></pre>
|
||||
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="language-html"><span class="iconfont icon-xxx"></span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>" iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content symbol">
|
||||
<ul class="icon_lists dib-box">
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-zhuye"></use>
|
||||
</svg>
|
||||
<div class="name">主页</div>
|
||||
<div class="code-name">#icon-zhuye</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-dingwei"></use>
|
||||
</svg>
|
||||
<div class="name">定位</div>
|
||||
<div class="code-name">#icon-dingwei</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-dengpao"></use>
|
||||
</svg>
|
||||
<div class="name">技术支持</div>
|
||||
<div class="code-name">#icon-dengpao</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-dengpao1"></use>
|
||||
</svg>
|
||||
<div class="name">灯泡</div>
|
||||
<div class="code-name">#icon-dengpao1</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-guizeshezhi"></use>
|
||||
</svg>
|
||||
<div class="name">规则设置</div>
|
||||
<div class="code-name">#icon-guizeshezhi</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-notebook"></use>
|
||||
</svg>
|
||||
<div class="name">笔记本电脑</div>
|
||||
<div class="code-name">#icon-notebook</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="symbol-">Symbol 引用</h2>
|
||||
<hr />
|
||||
|
||||
<p>
|
||||
这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a> 这种用法其实是做了一个 SVG
|
||||
的集合,与另外两种相比具有如下特点:
|
||||
</p>
|
||||
<ul>
|
||||
<li>支持多色图标了,不再受单色限制。</li>
|
||||
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
|
||||
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
|
||||
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
|
||||
<pre><code class="language-html"><script src="./iconfont.js"></script>
|
||||
</code></pre>
|
||||
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
|
||||
<pre><code class="language-html"><style>
|
||||
.icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="language-html"><svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-xxx"></use>
|
||||
</svg>
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.tab-container .content:first').show()
|
||||
|
||||
$('#tabs li').click(function(e) {
|
||||
var tabContent = $('.tab-container .content')
|
||||
var index = $(this).index()
|
||||
|
||||
if ($(this).hasClass('active')) {
|
||||
return
|
||||
} else {
|
||||
$('#tabs li').removeClass('active')
|
||||
$(this).addClass('active')
|
||||
|
||||
tabContent
|
||||
.hide()
|
||||
.eq(index)
|
||||
.fadeIn()
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
37
src/fonts/iconfont.css
Normal file
37
src/fonts/iconfont.css
Normal file
@@ -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';
|
||||
}
|
||||
63
src/fonts/iconfont.js
Normal file
63
src/fonts/iconfont.js
Normal file
File diff suppressed because one or more lines are too long
51
src/fonts/iconfont.json
Normal file
51
src/fonts/iconfont.json
Normal file
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
src/fonts/iconfont.ttf
Normal file
BIN
src/fonts/iconfont.ttf
Normal file
Binary file not shown.
BIN
src/fonts/iconfont.woff
Normal file
BIN
src/fonts/iconfont.woff
Normal file
Binary file not shown.
BIN
src/fonts/iconfont.woff2
Normal file
BIN
src/fonts/iconfont.woff2
Normal file
Binary file not shown.
@@ -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 }
|
||||
]
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -20,13 +20,13 @@ export default {
|
||||
<style scoped>
|
||||
.app-main {
|
||||
/*50 = navbar */
|
||||
min-height: calc(100vh - 50px);
|
||||
min-height: calc(100vh - 250px);
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.fixed-header + .app-main {
|
||||
padding-top: 50px;
|
||||
//padding-top: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import u3 from '@/assets/images/icon/u3.png'
|
||||
import logo from '@/assets/images/logo.png'
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
@@ -26,7 +26,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Vue Admin Template',
|
||||
logo: u3
|
||||
logo
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,8 +44,7 @@ export default {
|
||||
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
line-height: 50px;
|
||||
/*background: #2b2f3a;*/
|
||||
text-align: center;
|
||||
@@ -56,8 +55,8 @@ export default {
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 160px;
|
||||
height: 65px;
|
||||
width: 35px;
|
||||
//height: 65px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
330
src/views/app/layout/components/Sidebar/Sidebar.vue
Normal file
330
src/views/app/layout/components/Sidebar/Sidebar.vue
Normal file
@@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<div :class="{ 'has-logo': showLogo }" class="sidebar-container">
|
||||
<div class="sidebar-layout">
|
||||
<!-- Left side - Primary menu -->
|
||||
<div class="primary-menu">
|
||||
<div>
|
||||
<logo class="logo" v-if="showLogo" :collapse="isCollapse" />
|
||||
<div
|
||||
v-for="route in menuList"
|
||||
:key="route.path"
|
||||
class="primary-menu-item"
|
||||
:class="{ active: activeParent === route.path }"
|
||||
@click="selectParentMenu(route)"
|
||||
>
|
||||
<i v-if="route.meta && route.meta.icon" class="iconfont fs22" :class="route.meta.icon"></i>
|
||||
<span class="menu-title">{{ route.meta ? route.meta.title : '' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<personal />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right side - Submenu -->
|
||||
<div class="submenu-container" v-if="activeParent && currentSubmenu.length">
|
||||
<!-- <div class="submenu-header">-->
|
||||
<!-- <span>{{ currentParentTitle }}</span>-->
|
||||
<!-- </div>-->
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div class="submenu-list">
|
||||
<pre style="font-size: 12px; padding: 10px; display: none;">{{ JSON.stringify(currentSubmenu, null, 2) }}</pre>
|
||||
<div
|
||||
v-for="subItem in currentSubmenu"
|
||||
:key="subItem.path"
|
||||
class="submenu-item"
|
||||
:class="{ active: activeMenu === subItem.path }"
|
||||
@click="navigateTo(subItem.path)"
|
||||
>
|
||||
<i v-if="subItem.meta && subItem.meta.icon" class="iconfont mr10" :class="subItem.meta.icon" />
|
||||
<span>{{ subItem.meta ? subItem.meta.title : subItem.name || 'Unnamed Item' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import variables from '@/assets/sass/variables.scss'
|
||||
import Personal from '@/views/app/layout/components/Sidebar/personal.vue'
|
||||
|
||||
export default {
|
||||
components: { Personal, Logo },
|
||||
computed: {
|
||||
...mapGetters(['sidebar', 'sidebarList']),
|
||||
routes() {
|
||||
return this.$router.options.routes
|
||||
},
|
||||
activeMenu() {
|
||||
const route = this.$route
|
||||
const { meta, path } = route
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu
|
||||
}
|
||||
return path
|
||||
},
|
||||
showLogo() {
|
||||
return this.$store.state.settings.sidebarLogo
|
||||
},
|
||||
variables() {
|
||||
return variables
|
||||
},
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened
|
||||
},
|
||||
currentSubmenu() {
|
||||
if (!this.activeParent) return []
|
||||
const parent = this.menuList.find(item => item.path === this.activeParent)
|
||||
console.log('Parent found:', parent)
|
||||
console.log('Children:', parent ? parent.children : 'No children')
|
||||
return parent ? parent.children || [] : []
|
||||
},
|
||||
currentParentTitle() {
|
||||
if (!this.activeParent) return ''
|
||||
const parent = this.menuList.find(item => item.path === this.activeParent)
|
||||
return parent && parent.meta ? parent.meta.title : ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuList: [],
|
||||
activeParent: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
setSidebarList: 'app/setSidebarList'
|
||||
}),
|
||||
formatList(menu, state, parentPath = null) {
|
||||
menu.map(item => {
|
||||
if (parentPath) {
|
||||
item.path = '/' + parentPath + '/' + item.url
|
||||
} else {
|
||||
item.path = item.url
|
||||
}
|
||||
if (item.otherInfo1 == 0) {
|
||||
item.name = item.menuName
|
||||
item.alwaysShow = state
|
||||
item.meta = {
|
||||
title: item.menuName,
|
||||
icon: item.img
|
||||
}
|
||||
if (item.children != null) {
|
||||
this.formatList(item.children, undefined, item.path)
|
||||
} else {
|
||||
item.children = []
|
||||
}
|
||||
} else {
|
||||
item.children = []
|
||||
}
|
||||
})
|
||||
return menu
|
||||
},
|
||||
selectParentMenu(route) {
|
||||
this.activeParent = route.path
|
||||
|
||||
// If this parent has children, don't navigate
|
||||
if (route.children && route.children.length > 0) {
|
||||
// Optionally navigate to the first child
|
||||
// this.navigateTo(route.children[0].path)
|
||||
} else {
|
||||
// If no children, navigate to the parent route
|
||||
this.navigateTo(route.path)
|
||||
}
|
||||
},
|
||||
navigateTo(path) {
|
||||
if (path && path !== this.$route.path) {
|
||||
this.$router.push(path)
|
||||
}
|
||||
},
|
||||
findParentForCurrentRoute() {
|
||||
const currentPath = this.$route.path
|
||||
|
||||
// Try to find the parent menu that contains the current route
|
||||
for (const parent of this.menuList) {
|
||||
// Check if current route is the parent itself
|
||||
if (parent.path === currentPath) {
|
||||
this.activeParent = parent.path
|
||||
return
|
||||
}
|
||||
|
||||
// Check if current route is one of the children
|
||||
if (parent.children && parent.children.length) {
|
||||
const childMatch = parent.children.find(child => child.path === currentPath || currentPath.startsWith(child.path + '/'))
|
||||
|
||||
if (childMatch) {
|
||||
this.activeParent = parent.path
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no match found, default to first menu item if available
|
||||
if (this.menuList.length > 0 && !this.activeParent) {
|
||||
this.activeParent = this.menuList[0].path
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (sessionStorage.token !== 'MockToken') {
|
||||
// 获取路由数据
|
||||
let data = this.$store.state.app.sidebarList
|
||||
|
||||
// 通过检查路由结构来确定顶级菜单
|
||||
const topLevelRoutes = data.filter(route => {
|
||||
// 如果路由有 meta 和 children,则认为它是顶级菜单
|
||||
return route.meta && route.path && !route.hidden
|
||||
})
|
||||
|
||||
this.menuList = topLevelRoutes
|
||||
} else {
|
||||
// 从路由配置中获取顶级路由
|
||||
const topLevelRoutes = this.routes.filter(route => {
|
||||
// 只显示有 meta 和 children 的路由,并且不是隐藏的
|
||||
return route.meta && route.children && !route.hidden
|
||||
})
|
||||
|
||||
this.menuList = topLevelRoutes
|
||||
}
|
||||
|
||||
// 根据当前路由设置活动的父菜单
|
||||
this.$nextTick(() => {
|
||||
this.findParentForCurrentRoute()
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
// Update active parent when route changes
|
||||
this.findParentForCurrentRoute()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.sidebar-container {
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar-layout {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.primary-menu {
|
||||
width: 95px;
|
||||
height: 100%;
|
||||
border-right: 1px solid #ebeef2;
|
||||
overflow-y: auto;
|
||||
background-color: #fff;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 16px;
|
||||
.logo {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.primary-menu-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 58px;
|
||||
width: 68px;
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
color: #606266;
|
||||
margin-top: 10px;
|
||||
|
||||
&:hover,
|
||||
&.active {
|
||||
color: #4d64ff;
|
||||
background-color: #f8f8fa;
|
||||
}
|
||||
&.active span {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
font-size: 24px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.submenu-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
padding: 23px 10px;
|
||||
}
|
||||
|
||||
.submenu-header {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 20px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.submenu-list {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.submenu-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
cursor: pointer;
|
||||
color: #000;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover,
|
||||
&.active {
|
||||
color: #4d64ff;
|
||||
background-color: #f8f8fa;
|
||||
}
|
||||
&.active span {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.scrollbar-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
138
src/views/app/layout/components/Sidebar/personal.vue
Normal file
138
src/views/app/layout/components/Sidebar/personal.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<div class="right-menu" v-if="$store.state.settings.sidebarLogo">
|
||||
<el-dropdown class="avatar-container" trigger="click" placement="top-start">
|
||||
<div class="avatar-wrapper">
|
||||
<el-avatar :size="size" :src="circleUrl" class="user-avatar" />
|
||||
<!-- <i class="el-icon-caret-bottom" />-->
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||
<router-link to="/">
|
||||
<el-dropdown-item>
|
||||
首页
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<a target="_blank" href="http://www.ebiz-interactive.com/">
|
||||
<el-dropdown-item>关于</el-dropdown-item>
|
||||
</a>
|
||||
<el-dropdown-item divided>
|
||||
<span style="display:block;" @click="logout">退出</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import url from '@/assets/images/active.png'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
circleUrl: url,
|
||||
size: 40
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sidebar', 'avatar'])
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
//margin-right: 30px;
|
||||
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-avatar {
|
||||
background: none;
|
||||
}
|
||||
.el-dropdown-menu__item {
|
||||
&:hover {
|
||||
color: var(--color-primary);
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -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'
|
||||
|
||||
97
src/views/app/layout/layout.vue
Normal file
97
src/views/app/layout/layout.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||
<sidebar class="sidebar-container" />
|
||||
<div class="main-container">
|
||||
<app-main />
|
||||
</div>
|
||||
<!--<app-main v-else />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { AppMain } from './components'
|
||||
import Sidebar from './components/Sidebar/Sidebar.vue'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
|
||||
export default {
|
||||
name: 'Layout',
|
||||
components: {
|
||||
// Navbar,
|
||||
Sidebar,
|
||||
AppMain
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: process.env.VUE_APP_FLAG
|
||||
}
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
sidebar() {
|
||||
return this.$store.state.app.sidebar
|
||||
},
|
||||
device() {
|
||||
return this.$store.state.app.device
|
||||
},
|
||||
fixedHeader() {
|
||||
return this.$store.state.settings.fixedHeader
|
||||
},
|
||||
classObj() {
|
||||
return {
|
||||
hideSidebar: !this.sidebar.opened,
|
||||
openSidebar: this.sidebar.opened,
|
||||
withoutAnimation: this.sidebar.withoutAnimation,
|
||||
mobile: this.device === 'mobile'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/sass/mixin.scss';
|
||||
@import '~@/assets/sass/variables.scss';
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
&.mobile.openSidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
.drawer-bg {
|
||||
background: #000;
|
||||
opacity: 0.3;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 9;
|
||||
width: calc(100% - #{$sideBarWidth});
|
||||
transition: width 0.28s;
|
||||
}
|
||||
|
||||
.hideSidebar .fixed-header {
|
||||
width: calc(100% - 54px);
|
||||
}
|
||||
|
||||
.mobile .fixed-header {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
50
src/views/intelligent-agent/components/info/index.vue
Normal file
50
src/views/intelligent-agent/components/info/index.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<script>
|
||||
import { agentEdit, agentAdd } from '@/api/intelligent-agent/list'
|
||||
|
||||
export default {
|
||||
name: 'info',
|
||||
inject: ['dialog', 'fetchAgentList'],
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入智能体名称', trigger: 'blur' }],
|
||||
description: [{ required: false, message: '请输入智能体描述', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 提交表单
|
||||
*/
|
||||
async handleSubmit() {
|
||||
// 更新表单之后重新获取列表,然后退出 dialog
|
||||
;(await this.dialog.type) === 'edit' ? agentEdit(this.dialog.agent) : agentAdd(this.dialog.agent)
|
||||
this.fetchAgentList()
|
||||
this.dialog.visible = false
|
||||
},
|
||||
validateForm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) this.handleSubmit()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dialog.agent" :rules="rules" ref="form">
|
||||
<el-form-item label="名称" prop="name" label-width="100px">
|
||||
<el-input v-model="dialog.agent.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description" label-width="100px">
|
||||
<el-input type="textarea" :rows="8" v-model="dialog.agent.description" />
|
||||
</el-form-item>
|
||||
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" @click="validateForm">保存</el-button>
|
||||
<el-button type="default" @click="dialog.visible = false">取消</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
178
src/views/intelligent-agent/index.vue
Normal file
178
src/views/intelligent-agent/index.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<script>
|
||||
import { agentList, agentDelete, agentDetail } from '@/api/intelligent-agent/list'
|
||||
import Info from '@/views/intelligent-agent/components/info'
|
||||
|
||||
export default {
|
||||
name: 'intelligent-agent',
|
||||
components: {
|
||||
Info
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchOption: {
|
||||
nameLike: '',
|
||||
handleSearch: async () => {
|
||||
this.fetchAgentList({ nameLike: this.searchOption.nameLike })
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @type {{name: string, url: string, id: string}[]}
|
||||
*/
|
||||
list: [],
|
||||
dialog: {
|
||||
visible: false,
|
||||
title: '',
|
||||
agent: void 0,
|
||||
component: 'info',
|
||||
type: 'edit'
|
||||
}
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
dialog: this.dialog,
|
||||
fetchAgentList: this.fetchAgentList
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取所有的智能体列表
|
||||
*/
|
||||
async fetchAgentList(params = {}) {
|
||||
const { content } = await agentList(params)
|
||||
this.list = content.content
|
||||
},
|
||||
/**
|
||||
* 编辑智能体
|
||||
*/
|
||||
async handleEditAgent(id) {
|
||||
const { content } = await agentDetail(id)
|
||||
this.dialog.agent = content.content
|
||||
this.dialog.type = 'edit'
|
||||
this.dialog.title = '编辑智能体'
|
||||
// 获取数据之后打开内容详情
|
||||
this.dialog.visible = true
|
||||
},
|
||||
/**
|
||||
* 删除智能体
|
||||
*/
|
||||
async handleDeleteAgent(id) {
|
||||
// 删除之后重新获取内容
|
||||
await agentDelete([id])
|
||||
this.fetchAgentList()
|
||||
},
|
||||
/**
|
||||
* 创建智能体
|
||||
*/
|
||||
async createdIntelligentAgent() {
|
||||
this.dialog.type = 'add'
|
||||
// 重置状态,防止其他状态影响导致表单内容异常
|
||||
this.dialog.agent = { name: '', description: '' }
|
||||
this.dialog.title = '创建智能体'
|
||||
this.dialog.visible = true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchAgentList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- header 头部 -->
|
||||
<nav v-if="true">
|
||||
<div class="flex align-items-c justify-content-b">
|
||||
<el-input
|
||||
placeholder="输入智能体名称"
|
||||
clearable
|
||||
v-model="searchOption.nameLike"
|
||||
size="medium"
|
||||
class="underBorder"
|
||||
@keydown.enter.native="searchOption.handleSearch"
|
||||
>
|
||||
<template slot="prepend">
|
||||
<el-button slot="append" icon="el-icon-search"></el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button class="render-button line-button pv8 ph10" icon="el-icon-plus" @click="createdIntelligentAgent()">创建智能体</el-button>
|
||||
</div>
|
||||
<h3>智能体</h3>
|
||||
</nav>
|
||||
|
||||
<!-- 智能体的列表 -->
|
||||
<article>
|
||||
<el-row class="agent-item" :gutter="10">
|
||||
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" v-for="listItem in list" :key="listItem.id">
|
||||
<el-card>
|
||||
<section class="agent-item__info">
|
||||
<el-avatar shape="square" :src="listItem.url">{{ listItem.name[0] }}</el-avatar>
|
||||
<span>
|
||||
<h4>{{ listItem.name }}</h4>
|
||||
<p class="dataset-desc">{{ listItem.description }}</p>
|
||||
</span>
|
||||
</section>
|
||||
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button class="default render-button" size="small" icon="el-icon-delete" @click.stop="handleDeleteAgent(listItem.id)">删除</el-button>
|
||||
<el-button class="render-button line-button" size="small" icon="el-icon-edit" @click.stop="handleEditAgent(listItem.id)" type="primary"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</article>
|
||||
|
||||
<!-- dialog 内容。 现在主要是编辑 -->
|
||||
<el-dialog :visible.sync="dialog.visible" :title="dialog.title" :close-on-click-modal="false">
|
||||
<component :is="dialog.component" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
|
||||
* {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
}
|
||||
|
||||
.agent-item {
|
||||
& > .el-col {
|
||||
margin: 7px auto;
|
||||
}
|
||||
|
||||
&__info {
|
||||
display: flex;
|
||||
|
||||
& > span:nth-child(2) {
|
||||
margin-left: 15px;
|
||||
|
||||
& > p {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dataset-desc {
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #666666;
|
||||
line-height: 18px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
height: 35px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 添加预处理结果预览对话框 -->
|
||||
<el-drawer :visible.sync="visible" size="80%" title="预处理结果预览">
|
||||
<el-drawer :visible.sync="visible" size="80%" title="预处理结果预览" :wrapperClosable="false" :destroy-on-close="true">
|
||||
<div style="height:calc(100% - 55px);">
|
||||
<r-miner-u :documentId="documentId" @saveMarkDown="saveMarkDown"></r-miner-u>
|
||||
<r-miner-u :documentId="documentId" @saveMarkDown="saveMarkDown" :visible="visible"></r-miner-u>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="index-container" class="container index-container">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-input placeholder="输入知识库名称" clearable v-model="nameLike" size="medium" class="underBorder">
|
||||
<el-input placeholder="输入知识库名称" clearable v-model="nameLike" size="medium" class="underBorder" @keydown.enter.native="getList">
|
||||
<template slot="prepend">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList"></el-button>
|
||||
</template>
|
||||
|
||||
@@ -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) }
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user