diff --git a/f/web-kboss/src - 快捷方式.lnk b/f/web-kboss/src - 快捷方式.lnk deleted file mode 100644 index a0203e4..0000000 Binary files a/f/web-kboss/src - 快捷方式.lnk and /dev/null differ diff --git a/f/web-kboss/src/api/productsServices/index.js b/f/web-kboss/src/api/productsServices/index.js new file mode 100644 index 0000000..074df41 --- /dev/null +++ b/f/web-kboss/src/api/productsServices/index.js @@ -0,0 +1,117 @@ +import request from "@/utils/request"; + +// 菜单添加 +export function addProductMenuAPI(params) { + return request({ + url: `/product/home_page_product_menu_add.dspy`, + method: 'post', + data: params, + }) +} + +// 菜单更新 +export function updateProductMenuAPI(params) { + return request({ + url: `/product/home_page_product_menu_update.dspy`, + method: 'post', + data: params, + }) +} + +// 菜单查找 +export function findProductMenuAPI(params) { + return request({ + url: `/product/home_page_product_menu_search.dspy`, + method: 'get', + data: params, + }) +} + +// 菜单删除 +export function deleteProductMenuAPI(params) { + return request({ + url: `/product/home_page_product_menu_delete.dspy`, + method: 'post', + data: params, + }) +} + +// 产品添加 +export function addProductThreeMenuAPI(params) { + return request({ + url: `/product/home_page_product_add.dspy`, + method: 'post', + data: params, + }) +} + +// 产品列表 +export function findProductThreeMenuAPI(params) { + return request({ + url: `/product/home_page_product_search.dspy`, + method: 'post', + data: params, + }) +} + +// 三级产品更新 +export function updateProductThreeMenuAPI(params) { + return request({ + url: `/product/home_page_product_update.dspy`, + method: 'post', + data: params, + }) +} + +// 三级产品删除 +export function deleteProductThreeMenuAPI(params) { + return request({ + url: `/product/home_page_product_delete.dspy`, + method: 'post', + data: params, + }) +} + +//产品介绍页数据添加 +export function addProductIntroAPI(params) { + return request({ + url: `/product/home_page_content_add.dspy`, + method: 'post', + data: params, + }) +} +// 产品介绍页数据删除 +export function deleteProductIntroAPI(params) { + return request({ + url: `/product/home_page_content_delete.dspy`, + method: 'get', + data: params, + }) +} + +// 产品介绍页数据更新 +export function updateProductIntroAPI(params) { + return request({ + url: `/product/home_page_content_update.dspy`, + method: 'post', + data: params, + }) +} + +// 产品介绍页数据树 +export function findProductIntroAPI(params) { + return request({ + url: `/product/home_page_content_get_tree.dspy`, + method: 'post', + data: params, + }) +} + +// 产品介绍页数据查找 +export function findProductIntroTreeAPI(params) { + return request({ + url: `/product/home_page_content_search.dspy`, + method: 'get', + data: params, + }) +} diff --git a/f/web-kboss/src/router/index.js b/f/web-kboss/src/router/index.js index 214d047..e699bc4 100644 --- a/f/web-kboss/src/router/index.js +++ b/f/web-kboss/src/router/index.js @@ -21,7 +21,7 @@ import CreateEip from "@/views/product/productHome/capitalOnline/Net/Eip/createE import { getHomePath } from '@/views/setting/tools' Vue.use(Router); - + /** * Note: sub-menu only appear when route children.length >= 1 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html @@ -1156,8 +1156,17 @@ export const asyncRoutes = [ path: "index", component: () => import("@/views/operation/menuMangement/index.vue"), name: "menuMangement", - meta: { title: "菜单管理", fullPath: "/menuMangement/index" }, + meta: { title: "ncmatch菜单管理", fullPath: "/menuMangement/index" }, }, + { + path: "productsServices", + component: () => import("@/views/operation/productsServices/index.vue"), + name: "productsServices", + meta: { + title: "产品与服务管理", + fullPath: "/operation/productsServices" + } + } ] }, diff --git a/f/web-kboss/src/store/modules/permission.js b/f/web-kboss/src/store/modules/permission.js index dbbe047..9b9188d 100644 --- a/f/web-kboss/src/store/modules/permission.js +++ b/f/web-kboss/src/store/modules/permission.js @@ -145,6 +145,22 @@ const mutations = { }; const actions = { + /** + * 生成动态路由 + * + * 根据用户类型、组织类型和权限列表生成对应的动态路由配置 + * 包含管理员和普通用户的不同路由生成逻辑 + * + * @param {Object} context - Vuex上下文对象 + * @param {Function} context.commit - 提交mutation的方法 + * @param {Object} context.rootState - 根模块的状态 + * @param {Object} params - 参数对象 + * @param {string} [params.userType] - 用户类型 + * @param {number} [params.orgType] - 组织类型 + * @param {Array} [params.auths] - 权限列表 + * @param {Object} [params.user] - 用户信息对象 + * @returns {Promise} 解析后的动态路由数组 + */ generateRoutes({ commit, rootState }, params) { console.log("ACTION generateRoutes - params:", params); return new Promise((resolve) => { diff --git a/f/web-kboss/src/views/homePage/ncmatch/index.vue b/f/web-kboss/src/views/homePage/ncmatch/index.vue index ff3a69f..4511b31 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/index.vue @@ -353,7 +353,7 @@ export default Vue.extend({ color: #1b5bff; } } -/deep/.el-pagination{ +/deep/.el-pagination{ text-align: center !important; } diff --git a/f/web-kboss/src/views/homePage/ncmatch/mainPage/menuAside/index.vue b/f/web-kboss/src/views/homePage/ncmatch/mainPage/menuAside/index.vue index 961e204..2bb30b4 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/mainPage/menuAside/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/mainPage/menuAside/index.vue @@ -38,7 +38,7 @@ @mouseenter="selectSecondary(secondary)" @click="handleSecondaryClick(secondary)"> {{ secondary.second_level_name }} - + diff --git a/f/web-kboss/src/views/homePage/ncmatch/supplyAndDemandSquare/index.vue b/f/web-kboss/src/views/homePage/ncmatch/supplyAndDemandSquare/index.vue index f0c76d8..18ddf8f 100644 --- a/f/web-kboss/src/views/homePage/ncmatch/supplyAndDemandSquare/index.vue +++ b/f/web-kboss/src/views/homePage/ncmatch/supplyAndDemandSquare/index.vue @@ -341,10 +341,10 @@ export default { align-items: center; } .banner-box { - height: 700px!important; + height: 600px!important; background: url('./img/tt-banner.png') no-repeat ; width: 100%; - padding-bottom: 200px; + // padding-bottom: 10px; .conter { width: 700px; diff --git a/f/web-kboss/src/views/operation/productsServices/index.vue b/f/web-kboss/src/views/operation/productsServices/index.vue new file mode 100644 index 0000000..fb1f81e --- /dev/null +++ b/f/web-kboss/src/views/operation/productsServices/index.vue @@ -0,0 +1,1963 @@ + + + + diff --git a/f/web-kboss/src/views/operation/productsServices/less/index.css b/f/web-kboss/src/views/operation/productsServices/less/index.css new file mode 100644 index 0000000..4099553 --- /dev/null +++ b/f/web-kboss/src/views/operation/productsServices/less/index.css @@ -0,0 +1,687 @@ +.mianBox { + display: flex; + justify-content: space-between; + min-height: 100vh; + gap: 16px; + padding-bottom: 20px; + padding-bottom: 40px; +} +.left { + width: 30%; + min-width: 320px; + height: 100vh; +} +.left-card { + display: flex; + flex-direction: column; + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); +} +.left-card /deep/ .el-card__body { + padding: 20px; + flex: 1; + height: 100%; +} +.right { + flex: 1; + min-width: 0; +} +.toptit { + font-size: 16px; + font-weight: 600; + color: #303133; + margin-bottom: 20px; + padding-bottom: 12px; + border-bottom: 1px solid #e4e7ed; +} +.search { + margin-bottom: 20px; +} +.search /deep/ .el-input-group__append { + background-color: #409eff; + border-color: #409eff; +} +.search /deep/ .el-input-group__append .el-button { + color: white; +} +.search /deep/ .el-input-group__append .el-button:hover { + background-color: #66b1ff; +} +.custom-tree-node { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + padding: 6px 8px; + border-radius: 4px; + transition: background-color 0.2s; +} +.custom-tree-node:hover { + background-color: #f5f7fa; +} +.custom-tree-node .el-button { + padding: 4px; + margin-left: 4px; +} +.custom-tree-node .el-button i { + font-size: 12px; +} +.custom-tree-node .el-button:hover { + background-color: rgba(64, 158, 255, 0.1); + border-radius: 50%; +} +.tree-container { + overflow-y: auto; + border: 1px solid #e4e7ed; + border-radius: 6px; + padding: 12px; + background-color: #fafafa; +} +.tree-container /deep/ .el-tree .el-tree-node .el-tree-node__content { + height: 36px; +} +.tree-container /deep/ .el-tree .el-tree-node .el-tree-node__content:hover { + background-color: #f0f7ff; +} +.tree-container /deep/ .el-tree .el-tree-node.is-current > .el-tree-node__content { + background-color: #ecf5ff; + color: #409eff; + font-weight: 500; +} +.add-menu-box { + display: flex; + align-items: center; + justify-content: center; + border: 2px dashed #c0c4cc; + border-radius: 6px; + padding: 12px; + text-align: center; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + margin-top: 20px; + background-color: #fafafa; + color: #606266; +} +.add-menu-box:hover { + border-color: #409eff; + background-color: #f0f7ff; + color: #409eff; + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(64, 158, 255, 0.1); +} +.add-menu-box .add-icon { + font-size: 20px; + font-weight: 600; + margin-right: 8px; + line-height: 1; +} +.add-menu-box div { + font-size: 14px; + font-weight: 500; +} +.product-card { + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); + margin-bottom: 20px; +} +.product-card /deep/ .el-card__body { + padding: 24px; +} +.rigtop { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 24px; + flex-wrap: wrap; + gap: 16px; +} +.rigtop-left { + flex: 1; + min-width: 0; +} +.breadcrumb { + margin-top: 8px; +} +.breadcrumb /deep/ .el-breadcrumb__inner { + color: #909399; + font-size: 13px; +} +.breadcrumb /deep/ .el-breadcrumb__inner:hover { + color: #409eff; +} +.breadcrumb /deep/ .el-breadcrumb__separator { + color: #c0c4cc; +} +.current-menu { + font-size: 20px; + font-weight: 600; + color: #303133; + line-height: 1.4; +} +.add-product-btn .el-button { + border-radius: 6px; + padding: 10px 20px; + font-weight: 500; +} +.add-product-btn .el-button i { + margin-right: 4px; +} +.product-table { + margin-bottom: 24px; +} +.product-table /deep/ .el-table { + border-radius: 6px; + overflow: hidden; + border: 1px solid #ebeef5; +} +.product-table /deep/ .el-table th { + background-color: #f5f7fa; + color: #303133; + font-weight: 600; + height: 48px; +} +.product-table /deep/ .el-table td { + padding: 16px 0; +} +.product-table /deep/ .el-table .el-table__row { + cursor: pointer; + transition: background-color 0.2s; +} +.product-table /deep/ .el-table .el-table__row:hover { + background-color: #f5f7fa; +} +.product-table /deep/ .el-table .el-table__row.current-row { + background-color: #ecf5ff; +} +.product-info .product-name { + font-size: 14px; + font-weight: 600; + color: #303133; + margin-bottom: 6px; + line-height: 1.4; +} +.product-info .product-desc { + font-size: 12px; + color: #909399; + line-height: 1.5; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} +.product-tags { + display: flex; + flex-wrap: wrap; + gap: 4px; +} +.product-tags .el-tag { + border-radius: 4px; + padding: 0 8px; + height: 24px; + line-height: 22px; + font-size: 12px; +} +.product-tags .el-tag--info { + background-color: #f4f4f5; + border-color: #e9e9eb; + color: #909399; +} +.action-buttons { + display: flex; + gap: 8px; +} +.action-buttons .el-button { + min-width: 60px; + padding: 7px 15px; + border-radius: 4px; + font-size: 12px; +} +.action-buttons .el-button--danger { + background-color: #fef0f0; + border-color: #fbc4c4; + color: #f56c6c; +} +.action-buttons .el-button--danger:hover { + background-color: #f56c6c; + color: white; +} +.pagination { + display: flex; + justify-content: flex-end; + margin-top: 24px; + padding-top: 24px; + border-top: 1px solid #ebeef5; +} +.pagination /deep/ .el-pagination .el-pagination__sizes, +.pagination /deep/ .el-pagination .el-pagination__jump { + margin-left: 16px; +} +.pagination /deep/ .el-pagination .btn-prev, +.pagination /deep/ .el-pagination .btn-next { + border-radius: 4px; + border: 1px solid #d8dce5; +} +.pagination /deep/ .el-pagination .el-pager li { + border-radius: 4px; + border: 1px solid #d8dce5; + margin: 0 4px; +} +.pagination /deep/ .el-pagination .el-pager li.active { + background-color: #409eff; + color: white; + border-color: #409eff; +} +.card-top { + display: flex; + justify-content: space-between; + align-items: center; + padding-bottom: 16px; + border-bottom: 1px solid #e4e7ed; + margin-bottom: 24px; +} +.card-top .top-tit span:first-child { + font-size: 18px; + font-weight: 600; + color: #303133; + display: block; + margin-bottom: 4px; +} +.card-top .top-tit span:last-child { + font-size: 13px; + color: #909399; +} +.card-top .top-btn .el-button { + border-radius: 6px; + padding: 10px 24px; + font-weight: 500; +} +.card-content { + width: 100%; +} +.card-content .content-tab { + width: 100%; +} +.card-content .content-tab .tab-top { + font-size: 15px; + font-weight: 600; + color: #303133; + margin-bottom: 16px; +} +.card-content .content-tab .tab-content { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin-bottom: 24px; +} +.card-content .content-tab .tab-content .tab-item { + padding: 10px 24px; + border-radius: 20px; + background-color: #f5f7fa; + color: #606266; + font-size: 14px; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + border: 1px solid transparent; +} +.card-content .content-tab .tab-content .tab-item:hover { + background-color: #e4e7ed; + transform: translateY(-1px); +} +.card-content .content-tab .tab-content .tab-item.active { + background-color: #409eff; + color: white; + font-weight: 500; + border-color: #409eff; + box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3); +} +.product-detail-card { + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); +} +.product-detail-card /deep/ .el-card__body { + padding: 24px; +} +.product-detail-card .product-basic-info { + padding: 20px; + background-color: #fafafa; + border-radius: 6px; + border: 1px solid #ebeef5; +} +.product-detail-card .product-basic-info /deep/ .el-form-item { + margin-bottom: 20px; +} +.product-detail-card .product-basic-info /deep/ .el-form-item:last-child { + margin-bottom: 0; +} +.product-detail-card .product-basic-info /deep/ .el-form-item .el-form-item__label { + color: #606266; + font-weight: 500; +} +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input .el-input__inner, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-textarea .el-input__inner, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input .el-textarea__inner, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-textarea .el-textarea__inner { + border-radius: 4px; +} +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input .el-input__inner:focus, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-textarea .el-input__inner:focus, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input .el-textarea__inner:focus, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-textarea .el-textarea__inner:focus { + border-color: #409eff; +} +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input-number .el-input-number__decrease, +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input-number .el-input-number__increase { + border-radius: 4px 0 0 4px; +} +.product-detail-card .product-basic-info /deep/ .el-form-item .el-input-number .el-input__inner { + border-radius: 0 4px 4px 0; +} +.product-detail-card .product-detail-content { + margin-top: 16px; +} +.product-detail-card .product-detail-content .editor-container /deep/ .el-textarea .el-textarea__inner { + border-radius: 6px; + font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-size: 14px; + line-height: 1.6; + padding: 16px; + border: 1px solid #dcdfe6; +} +.product-detail-card .product-detail-content .editor-container /deep/ .el-textarea .el-textarea__inner:focus { + border-color: #409eff; + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); +} +.product-detail-card .product-detail-content .editor-container /deep/ .el-textarea .el-textarea__inner::placeholder { + color: #c0c4cc; +} +.empty-detail { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 80px 40px; + text-align: center; +} +.empty-detail .empty-icon { + font-size: 64px; + margin-bottom: 24px; + opacity: 0.3; + animation: float 3s ease-in-out infinite; +} +.empty-detail .empty-text { + color: #909399; + font-size: 16px; + line-height: 1.6; + max-width: 300px; +} + /deep/ .el-dialog { + border-radius: 8px; +} + /deep/ .el-dialog .el-dialog__header { + padding: 20px 24px 10px; + border-bottom: 1px solid #e4e7ed; +} + /deep/ .el-dialog .el-dialog__header .el-dialog__title { + font-size: 18px; + font-weight: 600; + color: #303133; +} + /deep/ .el-dialog .el-dialog__body { + padding: 20px 24px; +} + /deep/ .el-dialog .el-dialog__body .el-form-item { + margin-bottom: 20px; +} + /deep/ .el-dialog .el-dialog__body .el-form-item:last-child { + margin-bottom: 0; +} + /deep/ .el-dialog .el-dialog__footer { + padding: 10px 24px 20px; + border-top: 1px solid #e4e7ed; +} + /deep/ .el-dialog .el-dialog__footer .dialog-footer .el-button { + border-radius: 6px; + padding: 10px 20px; + min-width: 80px; +} + /deep/ .el-dialog .el-dialog__footer .dialog-footer .el-button--primary { + font-weight: 500; +} +@keyframes float { + 0%, + 100% { + transform: translateY(0); + } + 50% { + transform: translateY(-10px); + } +} +@media (max-width: 1200px) { + .mianBox { + flex-direction: column; + } + .left, + .right { + width: 100%; + } + .left { + margin-bottom: 16px; + } + .tree-container { + height: 300px; + } +} +.pagination-controls { + width: 100%; + display: flex; + justify-content: center; +} +@media (max-width: 768px) { + .rigtop { + flex-direction: column; + align-items: stretch; + } + .add-product-btn { + align-self: flex-start; + } + .tab-content { + flex-direction: column; + } + .tab-content .tab-item { + width: 100%; + text-align: center; + } + .action-buttons { + flex-direction: column; + gap: 4px; + } +} +.content-form { + padding: 20px; +} +.content-form .el-form-item { + margin-bottom: 20px; +} +.section-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 10px; + border-bottom: 1px solid #ebeef5; +} +.section-header h3 { + margin: 0; + font-size: 18px; + color: #303133; +} +.form-list { + margin-top: 20px; +} +.form-item { + padding: 20px; + margin-bottom: 20px; + border: 1px solid #ebeef5; + border-radius: 4px; + background-color: #fafafa; +} +.form-item.main-form-item { + background-color: #f5f7fa; +} +.form-title { + font-size: 16px; + font-weight: bold; + margin-bottom: 15px; + padding-bottom: 10px; + border-bottom: 1px dashed #ebeef5; + color: #409eff; +} +.form-actions { + text-align: right; + margin-top: 10px; + padding-top: 10px; + border-top: 1px dashed #ebeef5; +} +.form-actions .el-button { + padding: 0 10px; +} +.saved-list { + margin-bottom: 30px; +} +.list-item { + padding: 15px; + margin-bottom: 15px; + border: 1px solid #e4e7ed; + border-radius: 4px; + background-color: #fff; +} +.list-item.main-item { + background-color: #f8f9fa; +} +.list-item .item-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #f0f0f0; +} +.list-item .item-header .item-title { + font-weight: bold; + color: #606266; +} +.list-item .item-content { + display: flex; + align-items: flex-start; +} +.list-item .item-content .item-image { + margin-right: 15px; + flex-shrink: 0; +} +.list-item .item-content .item-details { + flex: 1; +} +.list-item .item-content .item-details div { + margin-bottom: 5px; +} +.list-item .item-content .item-details div strong { + color: #606266; + margin-right: 5px; +} +.detail-section { + margin-top: 15px; + padding-top: 15px; + border-top: 1px dashed #e4e7ed; +} +.detail-list .detail-item { + padding: 10px; + margin-bottom: 10px; + background-color: #fff; + border: 1px solid #f0f0f0; + border-radius: 4px; +} +.detail-list .detail-item .detail-title { + font-weight: bold; + margin-bottom: 8px; + color: #67c23a; +} +.detail-list .detail-item .detail-content { + margin-bottom: 8px; +} +.detail-list .detail-item .detail-content div { + margin-bottom: 3px; +} +.detail-list .detail-item .detail-content div strong { + color: #909399; + margin-right: 5px; +} +.detail-list .detail-item .detail-actions { + text-align: right; +} +.detail-form-section { + margin-top: 15px; + padding: 15px; + background-color: #f9f9f9; + border-radius: 4px; + border: 1px dashed #dcdfe6; +} +.detail-form-item { + margin-bottom: 15px; + padding: 15px; + background-color: #fff; + border-radius: 4px; + border: 1px solid #ebeef5; +} +.add-detail-btn { + text-align: center; + margin-top: 10px; +} +.main-product-form { + padding: 20px; + margin-bottom: 30px; + border: 1px solid #ebeef5; + border-radius: 4px; + background-color: #fafafa; +} +.card-top { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 15px; + border-bottom: 1px solid #ebeef5; +} +.card-top .top-tit { + display: flex; + flex-direction: column; +} +.card-top .top-tit span:first-child { + font-size: 18px; + font-weight: bold; + margin-bottom: 5px; +} +.card-top .top-tit span:last-child { + font-size: 14px; + color: #409eff; +} +.no-product-selected { + padding: 80px 20px; + text-align: center; +} +.no-product-selected .empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 200px; +} +.product-table /deep/ .el-table__row { + cursor: pointer; +} +.product-table /deep/ .el-table__row:hover { + background-color: #f5f7fa; +} +.product-table /deep/ .el-table__row.current-row { + background-color: #ecf5ff; +} diff --git a/f/web-kboss/src/views/operation/productsServices/less/index.less b/f/web-kboss/src/views/operation/productsServices/less/index.less new file mode 100644 index 0000000..8ba1c6d --- /dev/null +++ b/f/web-kboss/src/views/operation/productsServices/less/index.less @@ -0,0 +1,868 @@ +.mianBox { + display: flex; + justify-content: space-between; + min-height: 100vh; + // min-height: 600px; + gap: 16px; + padding-bottom: 20px; + padding-bottom: 40px; + // box-sizing: border-box +} + +.left { + width: 30%; + min-width: 320px; + height: 100vh; +} + +.left-card { + // height: 100%; + display: flex; + flex-direction: column; + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); + + /deep/ .el-card__body { + padding: 20px; + flex: 1; + height: 100%; + } +} + +.right { + flex: 1; + min-width: 0; // 防止flex溢出 +} + +.toptit { + font-size: 16px; + font-weight: 600; + color: #303133; + margin-bottom: 20px; + padding-bottom: 12px; + border-bottom: 1px solid #e4e7ed; +} + +.search { + margin-bottom: 20px; + + /deep/ .el-input-group__append { + background-color: #409eff; + border-color: #409eff; + + .el-button { + color: white; + + &:hover { + background-color: #66b1ff; + } + } + } +} + +.custom-tree-node { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + padding: 6px 8px; + border-radius: 4px; + transition: background-color 0.2s; + + &:hover { + background-color: #f5f7fa; + } + + .el-button { + padding: 4px; + margin-left: 4px; + + i { + font-size: 12px; + } + + &:hover { + background-color: rgba(64, 158, 255, 0.1); + border-radius: 50%; + } + } +} + +.tree-container { + // height: 400px; + overflow-y: auto; + border: 1px solid #e4e7ed; + border-radius: 6px; + padding: 12px; + background-color: #fafafa; + + /deep/ .el-tree { + .el-tree-node { + .el-tree-node__content { + height: 36px; + + &:hover { + background-color: #f0f7ff; + } + } + + &.is-current { + > .el-tree-node__content { + background-color: #ecf5ff; + color: #409eff; + font-weight: 500; + } + } + } + } +} + +.add-menu-box { + display: flex; + align-items: center; + justify-content: center; + border: 2px dashed #c0c4cc; + border-radius: 6px; + padding: 12px; + text-align: center; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + margin-top: 20px; + background-color: #fafafa; + color: #606266; + + &:hover { + border-color: #409eff; + background-color: #f0f7ff; + color: #409eff; + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(64, 158, 255, 0.1); + } + + .add-icon { + font-size: 20px; + font-weight: 600; + margin-right: 8px; + line-height: 1; + } + + div { + font-size: 14px; + font-weight: 500; + } +} + +// 右侧产品卡片样式 +.product-card { + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); + margin-bottom: 20px; + + /deep/ .el-card__body { + padding: 24px; + } +} + +.rigtop { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 24px; + flex-wrap: wrap; + gap: 16px; +} + +.rigtop-left { + flex: 1; + min-width: 0; +} + +.breadcrumb { + margin-top: 8px; + + /deep/ .el-breadcrumb__inner { + color: #909399; + font-size: 13px; + + &:hover { + color: #409eff; + } + } + + /deep/ .el-breadcrumb__separator { + color: #c0c4cc; + } +} + +.current-menu { + font-size: 20px; + font-weight: 600; + color: #303133; + line-height: 1.4; +} + +.add-product-btn { + .el-button { + border-radius: 6px; + padding: 10px 20px; + font-weight: 500; + + i { + margin-right: 4px; + } + } +} + +// 产品表格样式 +.product-table { + margin-bottom: 24px; + + /deep/ .el-table { + border-radius: 6px; + overflow: hidden; + border: 1px solid #ebeef5; + + th { + background-color: #f5f7fa; + color: #303133; + font-weight: 600; + height: 48px; + } + + td { + padding: 16px 0; + } + + .el-table__row { + cursor: pointer; + transition: background-color 0.2s; + + &:hover { + background-color: #f5f7fa; + } + + &.current-row { + background-color: #ecf5ff; + } + } + } +} + +.product-info { + .product-name { + font-size: 14px; + font-weight: 600; + color: #303133; + margin-bottom: 6px; + line-height: 1.4; + } + + .product-desc { + font-size: 12px; + color: #909399; + line-height: 1.5; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + } +} + +.product-tags { + display: flex; + flex-wrap: wrap; + gap: 4px; + + .el-tag { + border-radius: 4px; + padding: 0 8px; + height: 24px; + line-height: 22px; + font-size: 12px; + + &--info { + background-color: #f4f4f5; + border-color: #e9e9eb; + color: #909399; + } + } +} + +// 操作按钮样式 +.action-buttons { + display: flex; + gap: 8px; + + .el-button { + min-width: 60px; + padding: 7px 15px; + border-radius: 4px; + font-size: 12px; + + &--danger { + background-color: #fef0f0; + border-color: #fbc4c4; + color: #f56c6c; + + &:hover { + background-color: #f56c6c; + color: white; + } + } + } +} + +// 分页样式 +.pagination { + display: flex; + justify-content: flex-end; + margin-top: 24px; + padding-top: 24px; + border-top: 1px solid #ebeef5; + + /deep/ .el-pagination { + .el-pagination__sizes, + .el-pagination__jump { + margin-left: 16px; + } + + .btn-prev, + .btn-next { + border-radius: 4px; + border: 1px solid #d8dce5; + } + + .el-pager { + li { + border-radius: 4px; + border: 1px solid #d8dce5; + margin: 0 4px; + + &.active { + background-color: #409eff; + color: white; + border-color: #409eff; + } + } + } + } +} + +.card-top { + display: flex; + justify-content: space-between; + align-items: center; + padding-bottom: 16px; + border-bottom: 1px solid #e4e7ed; + margin-bottom: 24px; + + .top-tit { + span:first-child { + font-size: 18px; + font-weight: 600; + color: #303133; + display: block; + margin-bottom: 4px; + } + + span:last-child { + font-size: 13px; + color: #909399; + } + } + + .top-btn { + .el-button { + border-radius: 6px; + padding: 10px 24px; + font-weight: 500; + } + } +} + +.card-content { + width: 100%; + + .content-tab { + width: 100%; + + .tab-top { + font-size: 15px; + font-weight: 600; + color: #303133; + margin-bottom: 16px; + } + + .tab-content { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin-bottom: 24px; + + .tab-item { + padding: 10px 24px; + border-radius: 20px; + background-color: #f5f7fa; + color: #606266; + font-size: 14px; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + border: 1px solid transparent; + + &:hover { + background-color: #e4e7ed; + transform: translateY(-1px); + } + + &.active { + background-color: #409eff; + color: white; + font-weight: 500; + border-color: #409eff; + box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3); + } + } + } + } +} + +// 产品详情卡片样式 +.product-detail-card { + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); + + /deep/ .el-card__body { + padding: 24px; + } + + .product-basic-info { + padding: 20px; + background-color: #fafafa; + border-radius: 6px; + border: 1px solid #ebeef5; + + /deep/ .el-form-item { + margin-bottom: 20px; + + &:last-child { + margin-bottom: 0; + } + + .el-form-item__label { + color: #606266; + font-weight: 500; + } + + .el-input, + .el-textarea { + .el-input__inner, + .el-textarea__inner { + border-radius: 4px; + + &:focus { + border-color: #409eff; + } + } + } + + .el-input-number { + .el-input-number__decrease, + .el-input-number__increase { + border-radius: 4px 0 0 4px; + } + + .el-input__inner { + border-radius: 0 4px 4px 0; + } + } + } + } + + .product-detail-content { + margin-top: 16px; + + .editor-container { + /deep/ .el-textarea { + .el-textarea__inner { + border-radius: 6px; + font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-size: 14px; + line-height: 1.6; + padding: 16px; + border: 1px solid #dcdfe6; + + &:focus { + border-color: #409eff; + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); + } + + &::placeholder { + color: #c0c4cc; + } + } + } + } + } +} + +.empty-detail { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 80px 40px; + text-align: center; + + .empty-icon { + font-size: 64px; + margin-bottom: 24px; + opacity: 0.3; + animation: float 3s ease-in-out infinite; + } + + .empty-text { + color: #909399; + font-size: 16px; + line-height: 1.6; + max-width: 300px; + } +} + +// 对话框样式优化 +/deep/ .el-dialog { + border-radius: 8px; + + .el-dialog__header { + padding: 20px 24px 10px; + border-bottom: 1px solid #e4e7ed; + + .el-dialog__title { + font-size: 18px; + font-weight: 600; + color: #303133; + } + } + + .el-dialog__body { + padding: 20px 24px; + + .el-form-item { + margin-bottom: 20px; + + &:last-child { + margin-bottom: 0; + } + } + } + + .el-dialog__footer { + padding: 10px 24px 20px; + border-top: 1px solid #e4e7ed; + + .dialog-footer { + .el-button { + border-radius: 6px; + padding: 10px 20px; + min-width: 80px; + + &--primary { + font-weight: 500; + } + } + } + } +} + +// 添加动画效果 +@keyframes float { + 0%, 100% { + transform: translateY(0); + } + 50% { + transform: translateY(-10px); + } +} + +// 响应式调整 +@media (max-width: 1200px) { + .mianBox { + flex-direction: column; + } + + .left, + .right { + width: 100%; + } + + .left { + margin-bottom: 16px; + } + + .tree-container { + height: 300px; + } +} + +.pagination-controls{ + width: 100%; + display: flex; + justify-content: center; +} + +@media (max-width: 768px) { + .rigtop { + flex-direction: column; + align-items: stretch; + } + + .add-product-btn { + align-self: flex-start; + } + + .tab-content { + flex-direction: column; + + .tab-item { + width: 100%; + text-align: center; + } + } + + .action-buttons { + flex-direction: column; + gap: 4px; + } +} +// 详情:添加样式 +.content-form { + padding: 20px; + .el-form-item { + margin-bottom: 20px; + } +} + +.section-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 10px; + border-bottom: 1px solid #ebeef5; + + h3 { + margin: 0; + font-size: 18px; + color: #303133; + } +} + +.form-list { + margin-top: 20px; +} + +.form-item { + padding: 20px; + margin-bottom: 20px; + border: 1px solid #ebeef5; + border-radius: 4px; + background-color: #fafafa; + + &.main-form-item { + background-color: #f5f7fa; + } +} + +.form-title { + font-size: 16px; + font-weight: bold; + margin-bottom: 15px; + padding-bottom: 10px; + border-bottom: 1px dashed #ebeef5; + color: #409eff; +} + +.form-actions { + text-align: right; + margin-top: 10px; + padding-top: 10px; + border-top: 1px dashed #ebeef5; + + .el-button { + padding: 0 10px; + } +} + +.saved-list { + margin-bottom: 30px; +} + +.list-item { + padding: 15px; + margin-bottom: 15px; + border: 1px solid #e4e7ed; + border-radius: 4px; + background-color: #fff; + + &.main-item { + background-color: #f8f9fa; + } + + .item-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #f0f0f0; + + .item-title { + font-weight: bold; + color: #606266; + } + } + + .item-content { + display: flex; + align-items: flex-start; + + .item-image { + margin-right: 15px; + flex-shrink: 0; + } + + .item-details { + flex: 1; + + div { + margin-bottom: 5px; + + strong { + color: #606266; + margin-right: 5px; + } + } + } + } +} + +.detail-section { + margin-top: 15px; + padding-top: 15px; + border-top: 1px dashed #e4e7ed; +} + +.detail-list { + .detail-item { + padding: 10px; + margin-bottom: 10px; + background-color: #fff; + border: 1px solid #f0f0f0; + border-radius: 4px; + + .detail-title { + font-weight: bold; + margin-bottom: 8px; + color: #67c23a; + } + + .detail-content { + margin-bottom: 8px; + + div { + margin-bottom: 3px; + + strong { + color: #909399; + margin-right: 5px; + } + } + } + + .detail-actions { + text-align: right; + } + } +} + +.detail-form-section { + margin-top: 15px; + padding: 15px; + background-color: #f9f9f9; + border-radius: 4px; + border: 1px dashed #dcdfe6; +} + +.detail-form-item { + margin-bottom: 15px; + padding: 15px; + background-color: #fff; + border-radius: 4px; + border: 1px solid #ebeef5; +} + +.add-detail-btn { + text-align: center; + margin-top: 10px; +} + +.main-product-form { + padding: 20px; + margin-bottom: 30px; + border: 1px solid #ebeef5; + border-radius: 4px; + background-color: #fafafa; +} + +.card-top { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 15px; + border-bottom: 1px solid #ebeef5; + + .top-tit { + display: flex; + flex-direction: column; + + span:first-child { + font-size: 18px; + font-weight: bold; + margin-bottom: 5px; + } + + span:last-child { + font-size: 14px; + color: #409eff; + } + } +} + +.no-product-selected { + padding: 80px 20px; + text-align: center; + + .empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 200px; + } +} + +// 详情:为产品表格行添加悬停效果 +.product-table { + /deep/ .el-table__row { + cursor: pointer; + + &:hover { + background-color: #f5f7fa; + } + + &.current-row { + background-color: #ecf5ff; + } + } +} diff --git a/f/web-kboss/src/views/product/allProduct/index.vue b/f/web-kboss/src/views/product/allProduct/index.vue index f4feece..f4f3327 100644 --- a/f/web-kboss/src/views/product/allProduct/index.vue +++ b/f/web-kboss/src/views/product/allProduct/index.vue @@ -81,7 +81,7 @@