From d7e5728e207bf0ac67d3a9f6684e60dff31e21a5 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 05 Sep 2025 17:43:24 +0800
Subject: [PATCH] refactor(ai): 优化产品要点页面布局和代码结构
---
src/main/resources/templates/febs/views/modules/ai/product/list.html | 53 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/src/main/resources/templates/febs/views/modules/ai/product/list.html b/src/main/resources/templates/febs/views/modules/ai/product/list.html
index 581d9df..a41f5f6 100644
--- a/src/main/resources/templates/febs/views/modules/ai/product/list.html
+++ b/src/main/resources/templates/febs/views/modules/ai/product/list.html
@@ -51,13 +51,16 @@
<script type="text/html" id="productToolbar">
<div class="layui-btn-container">
- <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain" type="button" shiro:hasPermission="categoryList:add" lay-event="productAdd">新增</button>
+ <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain" shiro:hasPermission="productList:add" lay-event="productAdd">新增</button>
+ <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain" shiro:hasPermission="productList:pointSet" lay-event="pointSet">知识点配置</button>
+ <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain" shiro:hasPermission="productList:productRoleSet" lay-event="productRoleSet">AI陪练配置</button>
+ <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain" shiro:hasPermission="productList:productQuestionSet" lay-event="productQuestionSet">AI题目配置</button>
</div>
</script>
<script type="text/html" id="productOption">
- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="categoryList:info" lay-event="productInfoEvent">编辑</button>
- <button class="layui-btn layui-btn-danger layui-btn-sm" type="button" shiro:hasPermission="categoryList:info" lay-event="productDeleteEvent">删除</button>
+ <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="productList:info" lay-event="productInfoEvent">编辑</button>
+ <button class="layui-btn layui-btn-danger layui-btn-sm" type="button" shiro:hasPermission="productList:info" lay-event="productDeleteEvent">删除</button>
</script>
@@ -245,17 +248,53 @@
});
}
- if (layEvent === 'productSet') {
+ if (layEvent === 'pointSet') {
var checkData = table.checkStatus('productTable').data;
if (checkData.length > 1 || checkData.length === 0) {
febs.alert.warn('每次操作只能操作一行数据');
return;
}
- febs.modal.open('工艺配置', 'modules/clothesType/productSet/' + checkData[0].id, {
+ febs.modal.open('知识点配置', 'modules/ai/product/pointSet/' + checkData[0].id, {
btn: ['提交', '取消'],
area:['100%','100%'],
yes: function (index, layero) {
- $('#art-set').find('#submit').trigger('click');
+ $('#point-set').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
+ }
+ });
+ }
+
+ if (layEvent === 'productRoleSet') {
+ var checkData = table.checkStatus('productTable').data;
+ if (checkData.length > 1 || checkData.length === 0) {
+ febs.alert.warn('每次操作只能操作一行数据');
+ return;
+ }
+ febs.modal.open('AI陪练配置', 'modules/ai/product/productRoleSet/' + checkData[0].id, {
+ btn: ['提交', '取消'],
+ area:['100%','100%'],
+ yes: function (index, layero) {
+ $('#productRole-set').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
+ }
+ });
+ }
+
+ if (layEvent === 'productQuestionSet') {
+ var checkData = table.checkStatus('productTable').data;
+ if (checkData.length > 1 || checkData.length === 0) {
+ febs.alert.warn('每次操作只能操作一行数据');
+ return;
+ }
+ febs.modal.open('AI题目配置', 'modules/ai/product/productQuestionSet/' + checkData[0].id, {
+ btn: ['提交', '取消'],
+ area:['100%','100%'],
+ yes: function (index, layero) {
+ $('#productQuestion-set').find('#submit').trigger('click');
},
btn2: function () {
layer.closeAll();
@@ -316,7 +355,7 @@
category.setValue(categoryList);
$searchForm[0].reset();
sortObject.type = 'null';
- tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
+ tableIns.reload({where: null, page: {curr: 1}, initSort: sortObject});
});
// 获取查询参数
function getQueryParams() {
--
Gitblit v1.9.1