+
-
-
-
-
- 查询
- 重置
-
-
-
-
-
- 新增
-
-
-
-
-
-
-
-
-
-
+ @* 查询区:按知识库名称查询 *@
+
+
+ @* 表格区域 *@
+
-
+ @* 分页:首页、上一页、下一页、尾页、跳转、每页条数 5/10/15/20/50/100,默认 10 *@
+
+ width="560px"
+ custom-class="kb-form-dialog"
+ class="kb-form-dialog-scope">
-
-
-
-
-
-
-
+ size="small"
+ label-position="top"
+ class="kb-form-dialog__form">
+
+
-
-
-
+
-
+
+
-
+
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/SystemConfig/Index.cshtml b/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/SystemConfig/Index.cshtml
index 7bffb89da..3b12008c0 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/SystemConfig/Index.cshtml
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/SystemConfig/Index.cshtml
@@ -1,4 +1,4 @@
-@page "{handler?}"
+@page "{handler?}"
@addTagHelper *, Senparc.Areas.Admin
@model Senparc.Areas.Admin.Areas.Admin.Pages.SystemConfig_IndexModel
@{
@@ -15,57 +15,57 @@
系统信息
}
-
-
-
+
+
+ @* 工具栏:添加按钮、列筛选 *@
+
-
+
+
+ 查询
+ 重置
+
+
+
@@ -61,94 +70,109 @@
{{formaTableTime(scope.row.addTime)}}
-
+
- 配置
- 向量化
- 编辑
-
- 删除
+ 配置
+ 向量化
+ 编辑
+
+ 删除
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
- 模型与向量库
+
-
@section scripts{
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/XncfModule/Start.cshtml b/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/XncfModule/Start.cshtml
index 8da8bfcd5..7f6e75418 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/XncfModule/Start.cshtml
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/Areas/Admin/Pages/XncfModule/Start.cshtml
@@ -12,7 +12,7 @@
@section Style{
}
-
-
-
-
- {{ scope.row.systemName}}
-
-
-
-
- {{ scope.row.hideModuleManager }}
-
-
-
-
-
+
基础信息
- -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 基础信息
+系统的基础配置,仅管理员可编辑。
+
+ 编辑
-
-
-
- @* *@
-
-
-
- @*
-
-
-
-
-
- 不建议修改用户名!
*@ -
+
+ {{ form.hideModuleManager ? '隐藏模块管理(仅运行已发布模块)' : '显示模块管理(允许管理模块)' }}
+
+
+
+
{{data.xncfModule.menuName}} 模块 {{data.xncfModule.version}}
@@ -102,7 +102,7 @@
-
+
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/AdminUserInfo/AdminUserInfo.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/AdminUserInfo/AdminUserInfo.css
index a491438bd..e292fd3e2 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/AdminUserInfo/AdminUserInfo.css
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/AdminUserInfo/AdminUserInfo.css
@@ -1,7 +1,142 @@
-.admin-user-info .username-tip {
+/* 页面整体 */
+.admin-user-info-page {
+ padding: 20px 24px;
+ background: #f0f2f5;
+ min-height: 100%;
+ box-sizing: border-box;
+}
+
+.admin-user-info-main {
+ background: #fff;
+ border-radius: 8px;
+ padding: 20px 24px;
+ box-shadow: 0 1px 4px rgba(0,0,0,0.06);
+}
+
+/* 查询区 */
+.admin-user-query-section {
+ margin-bottom: 20px;
+ padding: 16px 18px;
+ background: #fafbfc;
+ border: 1px solid #e8eaec;
+ border-radius: 6px;
+}
+
+.admin-user-query-row {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 12px;
+}
+
+.admin-user-query-label {
+ flex: 0 0 auto;
+ font-size: 14px;
+ color: #606266;
+ margin: 0;
+}
+
+.admin-user-query-input {
+ width: 260px;
+}
+
+.admin-user-query-row .el-button {
+ margin-left: 0;
+}
+
+/* 工具栏 */
+.admin-user-toolbar {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-bottom: 16px;
+}
+
+.admin-user-toolbar .el-button {
+ margin: 0;
+}
+
+/* 表格区域 */
+.admin-user-table-wrap {
+ margin-bottom: 16px;
+}
+
+.admin-user-table-wrap .el-table {
+ margin-bottom: 0;
+}
+
+.admin-user-table-wrap .el-table th {
+ background: #f5f7fa;
+ color: #303133;
+ font-weight: 600;
+}
+
+/* 分页区域 */
+.admin-user-pagination-wrap {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: 12px;
+ border-top: 1px solid #ebeef5;
+}
+
+.admin-user-info .username-tip {
padding-left: 100px;
}
+
.el-checkbox.is-bordered {
- margin:20px 0;
- margin-left:10px;
+ margin: 20px 0;
+ margin-left: 10px;
+}
+
+/* 弹框样式:新增/编辑管理员、设置角色 */
+.admin-user-form-dialog .el-dialog__header {
+ padding: 18px 24px 14px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.admin-user-form-dialog .el-dialog__title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #303133;
+}
+
+.admin-user-form-dialog .el-dialog__body {
+ padding: 24px 24px 20px;
+}
+
+.admin-user-dialog-form .admin-user-form-item {
+ margin-bottom: 18px;
+}
+
+.admin-user-dialog-form .el-form-item__label {
+ font-size: 13px;
+ color: #606266;
+ line-height: 1.4;
+ padding-bottom: 6px;
+}
+
+.admin-user-dialog-form .el-form-item__content .el-input,
+.admin-user-dialog-form .el-form-item__content .el-textarea {
+ width: 100%;
+}
+
+.admin-user-dialog-footer {
+ display: flex;
+ justify-content: flex-end;
+ padding: 14px 24px 18px;
+ border-top: 1px solid #ebeef5;
+}
+
+.admin-user-dialog-footer .el-button {
+ min-width: 80px;
+}
+
+.admin-user-dialog-footer .el-button + .el-button {
+ margin-left: 12px;
+}
+
+.admin-user-role-body {
+ max-height: 320px;
+ overflow-y: auto;
+ padding: 8px 4px 0;
}
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Menu/Menu.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Menu/Menu.css
index 358a87bda..18ccfbec3 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Menu/Menu.css
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Menu/Menu.css
@@ -1,4 +1,4 @@
-.menu-icons-grid{
+.menu-icons-grid{
position:relative;
display:grid;
grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
@@ -24,6 +24,141 @@
margin-top: 10px;
}
+/* 页面整体 */
+.menu-index-page {
+ padding: 20px 24px;
+ background: #f0f2f5;
+ min-height: 100%;
+ box-sizing: border-box;
+}
+
+.menu-main {
+ background: #fff;
+ border-radius: 8px;
+ padding: 20px 24px;
+ box-shadow: 0 1px 4px rgba(0,0,0,0.06);
+}
+
+/* 查询区 */
+.menu-query-section {
+ margin-bottom: 20px;
+ padding: 16px 18px;
+ background: #fafbfc;
+ border: 1px solid #e8eaec;
+ border-radius: 6px;
+}
+
+.menu-query-row {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 12px;
+}
+
+.menu-query-label {
+ flex: 0 0 auto;
+ font-size: 14px;
+ color: #606266;
+ margin: 0;
+}
+
+.menu-query-input {
+ width: 260px;
+}
+
+.menu-query-row .el-button {
+ margin-left: 0;
+}
+
+/* 工具栏 */
+.menu-toolbar {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-bottom: 16px;
+}
+
+.menu-toolbar .el-button {
+ margin: 0;
+}
+
+/* 表格区域 */
+.menu-table-wrap {
+ margin-bottom: 16px;
+}
+
+.menu-table-wrap .el-table {
+ margin-bottom: 0;
+}
+
+.menu-table-wrap .el-table th {
+ background: #f5f7fa;
+ color: #303133;
+ font-weight: 600;
+}
+
+/* 分页区域 */
+.menu-pagination-wrap {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: 12px;
+ border-top: 1px solid #ebeef5;
+}
+
+/* 弹框样式:新增/编辑/增加下一级菜单 */
+.menu-form-dialog .el-dialog__header {
+ padding: 18px 24px 14px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.menu-form-dialog .el-dialog__title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #303133;
+}
+
+.menu-form-dialog .el-dialog__body {
+ padding: 24px 24px 20px;
+}
+
+.menu-dialog-form .menu-form-item {
+ margin-bottom: 18px;
+}
+
+.menu-dialog-form .el-form-item__label {
+ font-size: 13px;
+ color: #606266;
+ line-height: 1.4;
+ padding-bottom: 6px;
+}
+
+.menu-dialog-form .el-form-item__content .el-input,
+.menu-dialog-form .el-form-item__content .el-textarea,
+.menu-dialog-form .el-form-item__content .el-cascader {
+ width: 100%;
+}
+
+.menu-dialog-footer {
+ display: flex;
+ justify-content: flex-end;
+ padding: 14px 24px 18px;
+ border-top: 1px solid #ebeef5;
+}
+
+.menu-dialog-footer .el-button {
+ min-width: 80px;
+}
+
+.menu-dialog-footer .el-button + .el-button {
+ margin-left: 12px;
+}
+
+.menu-icon-row {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+}
+
/* 树形菜单固定行样式 */
.sticky-parent {
position: relative;
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Role/Index.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Role/Index.css
new file mode 100644
index 000000000..a1e5e93f8
--- /dev/null
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Role/Index.css
@@ -0,0 +1,134 @@
+/* 页面整体 */
+.role-index-page {
+ padding: 20px 24px;
+ background: #f0f2f5;
+ min-height: 100%;
+ box-sizing: border-box;
+}
+
+.role-main {
+ background: #fff;
+ border-radius: 8px;
+ padding: 20px 24px;
+ box-shadow: 0 1px 4px rgba(0,0,0,0.06);
+}
+
+/* 查询区 */
+.role-query-section {
+ margin-bottom: 20px;
+ padding: 16px 18px;
+ background: #fafbfc;
+ border: 1px solid #e8eaec;
+ border-radius: 6px;
+}
+
+.role-query-row {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 12px;
+}
+
+.role-query-label {
+ flex: 0 0 auto;
+ font-size: 14px;
+ color: #606266;
+ margin: 0;
+}
+
+.role-query-input {
+ width: 260px;
+}
+
+.role-query-row .el-button {
+ margin-left: 0;
+}
+
+/* 工具栏 */
+.role-toolbar {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-bottom: 16px;
+}
+
+.role-toolbar .el-button {
+ margin: 0;
+}
+
+/* 表格区域 */
+.role-table-wrap {
+ margin-bottom: 16px;
+}
+
+.role-table-wrap .el-table {
+ margin-bottom: 0;
+}
+
+.role-table-wrap .el-table th {
+ background: #f5f7fa;
+ color: #303133;
+ font-weight: 600;
+}
+
+/* 分页区域 */
+.role-pagination-wrap {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: 12px;
+ border-top: 1px solid #ebeef5;
+}
+
+/* 弹框样式:新增/编辑角色、权限授权 */
+.role-form-dialog .el-dialog__header {
+ padding: 18px 24px 14px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.role-form-dialog .el-dialog__title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #303133;
+}
+
+.role-form-dialog .el-dialog__body {
+ padding: 24px 24px 20px;
+}
+
+.role-dialog-form .role-form-item {
+ margin-bottom: 18px;
+}
+
+.role-dialog-form .el-form-item__label {
+ font-size: 13px;
+ color: #606266;
+ line-height: 1.4;
+ padding-bottom: 6px;
+}
+
+.role-dialog-form .el-form-item__content .el-input,
+.role-dialog-form .el-form-item__content .el-textarea {
+ width: 100%;
+}
+
+.role-dialog-footer {
+ display: flex;
+ justify-content: flex-end;
+ padding: 14px 24px 18px;
+ border-top: 1px solid #ebeef5;
+}
+
+.role-dialog-footer .el-button {
+ min-width: 80px;
+}
+
+.role-dialog-footer .el-button + .el-button {
+ margin-left: 12px;
+}
+
+.role-permission-body {
+ max-height: 360px;
+ overflow-y: auto;
+ padding: 8px 4px 0;
+}
+
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SenparcTrace/Index.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SenparcTrace/Index.css
new file mode 100644
index 000000000..44370d43f
--- /dev/null
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SenparcTrace/Index.css
@@ -0,0 +1,69 @@
+/* 页面整体 */
+.senparctrace-page {
+ padding: 20px 24px;
+ background: #f0f2f5;
+ min-height: 100%;
+ box-sizing: border-box;
+}
+
+.senparctrace-main {
+ background: #fff;
+ border-radius: 8px;
+ padding: 20px 24px;
+ box-shadow: 0 1px 4px rgba(0,0,0,0.06);
+}
+
+/* 查询区 */
+.senparctrace-query-section {
+ margin-bottom: 20px;
+ padding: 16px 18px;
+ background: #fafbfc;
+ border: 1px solid #e8eaec;
+ border-radius: 6px;
+}
+
+.senparctrace-query-row {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 12px;
+}
+
+.senparctrace-query-label {
+ flex: 0 0 auto;
+ font-size: 14px;
+ color: #606266;
+ margin: 0;
+}
+
+.senparctrace-query-input {
+ width: 260px;
+}
+
+.senparctrace-query-row .el-button {
+ margin-left: 0;
+}
+
+/* 表格区域 */
+.senparctrace-table-wrap {
+ margin-bottom: 16px;
+}
+
+.senparctrace-table-wrap .el-table {
+ margin-bottom: 0;
+}
+
+.senparctrace-table-wrap .el-table th {
+ background: #f5f7fa;
+ color: #303133;
+ font-weight: 600;
+}
+
+/* 分页区域 */
+.senparctrace-pagination-wrap {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: 12px;
+ border-top: 1px solid #ebeef5;
+}
+
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Shared/layout.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Shared/layout.css
index 61b0934a3..43bb2335a 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Shared/layout.css
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/Shared/layout.css
@@ -1,4 +1,4 @@
-
+
[v-cloak] {
display: none;
}
@@ -17,8 +17,10 @@ a {
text-decoration: none;
}
-body {
+html, body {
+ height: 100%;
margin: 0;
+ overflow: hidden;
}
img {
@@ -33,12 +35,55 @@ li {
#app {
height: 100%;
+ overflow: hidden;
}
.app-wrapper {
position: relative;
height: 100%;
width: 100%;
+ overflow: hidden;
+}
+
+/* 最外层不出现横向/纵向滚动条,仅主内容区内部滚动 */
+.app-wrapper .el-container {
+ height: 100vh;
+ overflow: hidden;
+ display: flex;
+}
+
+.app-wrapper .el-container .el-aside {
+ flex-shrink: 0;
+ height: 100vh;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
+.app-wrapper .el-container .el-aside .el-scrollbar {
+ flex: 1;
+ min-height: 0;
+}
+
+.app-wrapper .el-container .el-aside .el-scrollbar .scrollbar-wrapper {
+ height: 100% !important;
+}
+
+.app-wrapper .el-container > .el-container {
+ flex: 1;
+ min-width: 0;
+ min-height: 0;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
+.app-wrapper .el-header {
+ flex-shrink: 0;
+}
+
+.app-wrapper .el-footer {
+ flex-shrink: 0;
}
.footer {
@@ -51,10 +96,18 @@ li {
color: #23527c;
}
-.el-main
-{
- background-color: #e3e3e3;
- height: 730px;
+.app-wrapper .el-main {
+ flex: 1;
+ min-height: 0;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-color: rgba(0,21,41,0.08);
+ -webkit-overflow-scrolling: touch;
+}
+
+.app-wrapper .el-main .ifram-wrapper {
+ min-height: 100%;
+ box-sizing: border-box;
}
/*侧边栏*/
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SystemConfig/Index.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SystemConfig/Index.css
index 179628c4f..01bdadf5e 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SystemConfig/Index.css
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/SystemConfig/Index.css
@@ -1,4 +1,82 @@
-.admin-systemconfig-info h2{
+/* 页面整体 */
+.systemconfig-page {
+ padding: 20px 24px;
+ background: #f0f2f5;
+ min-height: 100%;
+ box-sizing: border-box;
+}
+
+.systemconfig-main {
+ background: #fff;
+ border-radius: 8px;
+ padding: 20px 24px;
+ box-shadow: 0 1px 4px rgba(0,0,0,0.06);
+}
+
+/* 头部区域 */
+.systemconfig-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 16px;
+}
+
+.systemconfig-header-text {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.systemconfig-title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #303133;
+ margin: 0;
+}
+
+.systemconfig-subtitle {
+ font-size: 13px;
+ color: #909399;
+ margin: 0;
+}
+
+.systemconfig-header-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.systemconfig-edit-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+/* 表单区域 */
+.systemconfig-form {
+ margin-top: 8px;
+}
+
+.systemconfig-form .el-form-item__label {
+ font-size: 13px;
+ color: #606266;
+ padding-bottom: 6px;
+}
+
+.systemconfig-form .el-form-item {
+ margin-bottom: 18px;
+}
+
+.systemconfig-form .el-input {
+ width: 100%;
+}
+
+.systemconfig-field-readonly {
+ display: flex;
+ align-items: center;
+}
+
+.admin-systemconfig-info h2{
margin-bottom:22px;
}
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/XncfModule/XncfModule.css b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/XncfModule/XncfModule.css
index 2b6ddc2d1..36a4c9260 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/XncfModule/XncfModule.css
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/css/Admin/XncfModule/XncfModule.css
@@ -217,3 +217,60 @@
margin-bottom:5px;
}
+/* Start.cshtml:主区域占满视口剩余高度;仅右侧卡片列纵向滚动,左侧信息列固定不随卡片滚动 */
+.el-main:has(> .ifram-wrapper .xncf-module-start) {
+ height: auto !important;
+ max-height: calc(100vh - 120px);
+ min-height: 0;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ box-sizing: border-box;
+}
+
+.ifram-wrapper:has(.xncf-module-start) {
+ flex: 1 1 auto;
+ min-height: 0;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
+.xncf-module-start {
+ flex: 1 1 auto;
+ min-height: 0;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
+.xncf-module-start > .el-container {
+ flex: 1 1 auto;
+ min-height: 0;
+ overflow: hidden;
+}
+
+.xncf-module-start > .el-container > .el-container {
+ flex: 1 1 auto;
+ min-height: 0;
+ overflow: hidden;
+}
+
+.xncf-module-start .module-aside.el-aside,
+.xncf-module-start .module-aside {
+ flex-shrink: 0;
+ align-self: stretch;
+ overflow-x: hidden;
+ overflow-y: auto;
+ min-height: 0;
+}
+
+.xncf-module-start .module-main-cards.el-main {
+ flex: 1 1 auto;
+ min-width: 0;
+ min-height: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/AdminUserInfo/Index.js b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/AdminUserInfo/Index.js
index 89ed6d3f9..2116c5621 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/AdminUserInfo/Index.js
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/AdminUserInfo/Index.js
@@ -1,4 +1,4 @@
-var app = new Vue({
+var app = new Vue({
el: "#app",
data() {
//const validatePass = (rule, value, callback) => {
@@ -26,9 +26,10 @@
//分页接口传参
listQuery: {
pageIndex: 1,
- pageSize: 20,
+ pageSize: 10,
adminUserInfoName: ''
},
+ keyword: '',
tableData: [],
dialog: {
title: '新增管理员',
@@ -141,6 +142,20 @@
this.paginationQuery.total = res.data.data.totalCount;
});
},
+ // 查询
+ handleSearch() {
+ this.listQuery.pageIndex = 1;
+ this.listQuery.adminUserInfoName = this.keyword;
+ this.getList();
+ },
+ // 重置
+ resetCondition() {
+ this.keyword = '';
+ this.listQuery.adminUserInfoName = '';
+ this.listQuery.pageIndex = 1;
+ this.listQuery.pageSize = 10;
+ this.getList();
+ },
// 编辑
handleEdit(index, row) {
this.dialog.visible = true;
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Menu/Index.js b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Menu/Index.js
index c91acd34b..3a45fd1ef 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Menu/Index.js
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Menu/Index.js
@@ -1,4 +1,4 @@
-var app = new Vue({
+var app = new Vue({
el: "#app",
data() {
var validateCode = (rule, value, callback) => {
@@ -13,6 +13,17 @@
}
};
return {
+ // 分页参数
+ paginationQuery: {
+ total: 0
+ },
+ // 分页、查询参数
+ listQuery: {
+ pageIndex: 1,
+ pageSize: 10,
+ menuName: ''
+ },
+ keyword: '',
// 表格数据
tableData: [],
dialog: {
@@ -717,19 +728,73 @@
this.au.updateLoading = false;
}
},
- // 获取所有菜单
+ // 获取所有菜单,并根据查询和分页生成当前页数据
async getList() {
const a = await service.get('/Admin/Menu/Edit?handler=Menu');
- const b = a.data.data;
+ const source = a.data.data;
let allMenu = [];
- this.ddd(b, null, allMenu);
- this.tableData = allMenu;
-
+ this.ddd(source, null, allMenu);
+
+ const keyword = (this.keyword || '').trim();
+ let filtered = allMenu;
+ if (keyword) {
+ filtered = this.filterMenuTree(allMenu, keyword);
+ }
+
+ const total = filtered.length;
+ this.paginationQuery.total = total;
+
+ let { pageIndex, pageSize } = this.listQuery;
+ const totalPages = total > 0 ? Math.ceil(total / pageSize) : 1;
+ if (pageIndex > totalPages) {
+ pageIndex = totalPages;
+ this.listQuery.pageIndex = totalPages;
+ }
+ if (pageIndex < 1) {
+ pageIndex = 1;
+ this.listQuery.pageIndex = 1;
+ }
+
+ const start = (pageIndex - 1) * pageSize;
+ const end = start + pageSize;
+ this.tableData = filtered.slice(start, end);
+
// 数据加载完成后初始化固定效果
this.$nextTick(() => {
this.initStickyParents();
});
},
+ // 递归按名称过滤菜单树
+ filterMenuTree(nodes, keyword) {
+ const result = [];
+ nodes.forEach(node => {
+ const matchSelf = node.menuName && node.menuName.indexOf(keyword) !== -1;
+ let children = [];
+ if (node.children && node.children.length) {
+ children = this.filterMenuTree(node.children, keyword);
+ }
+ if (matchSelf || children.length > 0) {
+ const cloned = { ...node };
+ cloned.children = children;
+ result.push(cloned);
+ }
+ });
+ return result;
+ },
+ // 查询
+ handleSearch() {
+ this.listQuery.pageIndex = 1;
+ this.listQuery.menuName = this.keyword;
+ this.getList();
+ },
+ // 重置
+ resetCondition() {
+ this.keyword = '';
+ this.listQuery.menuName = '';
+ this.listQuery.pageIndex = 1;
+ this.listQuery.pageSize = 10;
+ this.getList();
+ },
// 数据处理
ddd(source, parentId, dest) {
var array = source.filter(_ => _.parentId === parentId);
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Role/Index.js b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Role/Index.js
index b69b5dee0..996db735c 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Role/Index.js
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/Role/Index.js
@@ -1,4 +1,4 @@
-var app = new Vue({
+var app = new Vue({
el: "#app",
data() {
return {
@@ -9,10 +9,11 @@
//分页接口传参
listQuery: {
pageIndex: 1,
- pageSize: 20,
+ pageSize: 10,
roleName: '',
orderField: ''
},
+ keyword: '',
tableData: [],
dialog: {
title: '新增角色',
@@ -154,6 +155,20 @@
this.paginationQuery.total = res.data.data.totalCount;
});
},
+ // 查询
+ handleSearch() {
+ this.listQuery.pageIndex = 1;
+ this.listQuery.roleName = this.keyword;
+ this.getList();
+ },
+ // 重置
+ resetCondition() {
+ this.keyword = '';
+ this.listQuery.roleName = '';
+ this.listQuery.pageIndex = 1;
+ this.listQuery.pageSize = 10;
+ this.getList();
+ },
// 编辑
handleEdit(index, row) {
this.dialog.visible = true;
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SenparcTrace/Index.js b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SenparcTrace/Index.js
index a9f9c6c5b..40f7f7cbc 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SenparcTrace/Index.js
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SenparcTrace/Index.js
@@ -1,10 +1,11 @@
-var app = new Vue({
+var app = new Vue({
el: '#app',
data: {
searchData: {
pageIndex: 1,
pageSize: 10,
- total: 0
+ total: 0,
+ keyword: ''
},
tableData: []
},
@@ -15,11 +16,12 @@
},
methods: {
fetchData: function () {
- service.get(`/Admin/SenparcTrace/Index?handler=List&pageIndex=${this.searchData.pageIndex}&pageSize=${this.searchData.pageSize}`).then(res => {
+ const { pageIndex, pageSize, keyword } = this.searchData;
+ service.get(`/Admin/SenparcTrace/Index?handler=List&pageIndex=${pageIndex}&pageSize=${pageSize}&keyword=${encodeURIComponent(keyword || '')}`).then(res => {
var responseData = res.data.data;
const actualData = [];
- var startIndex = (this.searchData.pageIndex - 1) * this.searchData.pageSize;
- responseData.list.forEach(ele => {
+ var startIndex = (pageIndex - 1) * pageSize;
+ (responseData.list || []).forEach(ele => {
startIndex++;
actualData.push({ no: startIndex, text: ele });
});
@@ -27,6 +29,16 @@
this.searchData.total = responseData.count;
console.info(actualData);
});
+ },
+ handleSearch() {
+ this.searchData.pageIndex = 1;
+ this.fetchData();
+ },
+ resetCondition() {
+ this.searchData.keyword = '';
+ this.searchData.pageIndex = 1;
+ this.searchData.pageSize = 10;
+ this.fetchData();
}
}
});
\ No newline at end of file
diff --git a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SystemConfig/Index.js b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SystemConfig/Index.js
index 0f9a4037a..d7afa1a67 100644
--- a/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SystemConfig/Index.js
+++ b/tools/NcfSimulatedSite/Senparc.Areas.Admin/wwwroot/js/Admin/Pages/SystemConfig/Index.js
@@ -1,108 +1,88 @@
-var app = new Vue({
+var app = new Vue({
el: "#app",
data() {
return {
- //分页参数
- paginationQuery: {
- total: 5
+ loading: false,
+ saving: false,
+ isEditing: false,
+ form: {
+ id: 0,
+ systemName: '',
+ hideModuleManager: false
},
- //分页接口传参(只会有一个)
- listQuery: {
- pageIndex: 1,
- pageSize: 20,
- },
- tableData: [],
- tenantData: {},
- dialog: {
- title: '编辑系统信息',
- visible: false,
- data: {
- id: 0,
- systemName: '',
- },
- rules: {
- systemName: [
- { required: true, message: "用户名为必填项", trigger: "blur" }
- ]
- }
- },
- updateLoading: false,
- updateLoadingSet: false, // 确认loading按钮
+ rules: {
+ systemName: [
+ { required: true, message: "系统名称为必填项", trigger: "blur" }
+ ]
+ }
};
},
created: function () {
- this.getList();
- },
- computed: {
- },
- watch: {
- 'dialog.visible': function (val, old) {
- // 关闭dialog,清空
- if (!val) {
- this.dialog.data = {
- id: 0,
- systemName: ''
- };
- this.dialog.updateLoading = false;
- this.$refs['dataForm'].resetFields();
- }
- }
+ this.getConfig();
},
methods: {
- // 获取数据
- getList() {
- let { pageIndex, pageSize } = this.listQuery;
- service.get(`/Admin/SystemConfig/index?handler=List&&pageIndex=${pageIndex}&pageSize=${pageSize}`).then(res => {
- this.tableData = res.data.data.list;
- this.paginationQuery.total = res.data.data.totalCount;
+ // 获取系统配置(仅一条)
+ getConfig() {
+ this.loading = true;
+ service.get(`/Admin/SystemConfig/index?handler=List&pageIndex=1&pageSize=1`).then(res => {
+ const list = res.data.data.list || [];
+ if (list.length > 0) {
+ const row = list[0];
+ this.form = {
+ id: row.id,
+ systemName: row.systemName,
+ hideModuleManager: row.hideModuleManager
+ };
+ }
+ }).finally(() => {
+ this.loading = false;
});
},
- // 编辑
- handleEdit(index, row) {
- this.dialog.visible = true;
- if (row) {
- // 编辑
- let { systemName, id } = row;
- this.dialog.data = {
- systemName, id
- };
- this.dialog = Object.assign({}, this.dialog);
+ // 开始编辑
+ startEdit() {
+ this.isEditing = true;
+ },
+ // 取消编辑,恢复数据
+ cancelEdit() {
+ this.isEditing = false;
+ if (this.$refs.configForm) {
+ this.$refs.configForm.clearValidate();
}
+ this.getConfig();
},
- // 更新新增编辑
- updateData() {
- this.$refs['dataForm'].validate(valid => {
- // 表单校验
- if (valid) {
- this.dialog.updateLoading = true;
- let data = {
- Id: this.dialog.data.id,
- SystemName: this.dialog.data.systemName,
- };
- service.post("/Admin/SystemConfig/Edit?handler=Save", data).then(res => {
- if (res.data.success) {
- this.getList();
- this.$notify({
- title: "Success",
- message: "更新成功!",
- type: "success",
- duration: 2000
- });
- this.dialog.visible = false;
- this.dialog.updateLoading = false;
- } else {
- this.$notify({
- title: "Faild",
- message: "更新失败:" + res.data.msg,
- type: "success",
- duration: 2000
- });
- }
- }).catch(error => {
- this.dialog.updateLoading = false;
- });
+ // 保存配置
+ saveConfig() {
+ this.$refs.configForm.validate(valid => {
+ if (!valid) {
+ return;
}
+ this.saving = true;
+ const data = {
+ Id: this.form.id,
+ SystemName: this.form.systemName
+ };
+ service.post("/Admin/SystemConfig/Edit?handler=Save", data).then(res => {
+ if (res.data.success) {
+ this.$notify({
+ title: "Success",
+ message: "更新成功!",
+ type: "success",
+ duration: 2000
+ });
+ this.isEditing = false;
+ this.getConfig();
+ } else {
+ this.$notify({
+ title: "Failed",
+ message: "更新失败:" + (res.data.msg || ''),
+ type: "error",
+ duration: 2000
+ });
+ }
+ }).finally(() => {
+ this.saving = false;
+ });
});
- },
+ }
}
});