### Initialize uParse with List Path in Article Publishing Page Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/static/src/main/resources/static/ueditor/1.4/themes/使用说明.txt Include uparse.js and call the uParse function, passing the list path as an option. Ensure the 'liiconpath' uses an absolute path starting with '/'. ```javascript ``` -------------------------------- ### Initialize and Manage TabPage Components Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/test/src/main/resources/views/modules/demo/demoFormTabPage.html Demonstrates how to initialize tab panels and programmatically add tabs to the interface. ```javascript js.initTabPage('tabpanel1', { height: function () { var windowHeight = $(window).height(), headerHeight = $('.box-header').outerHeight() || 0, footerHeight = $('.box-footer').outerHeight() || 0, height = windowHeight - headerHeight - footerHeight - 20; return height < 300 ? 300 : height; } }); // 打开示例页面(不可关闭) var p = '?__layer=true'; // 隐藏标题 js.addTabPage(null, "机构列表", "${ctx}/sys/office/list"+p, false); js.addTabPage(null, "用户列表", "${ctx}/sys/empUser/list"+p, false); // 用于机构保存后的刷新列表页面(示例) window.win = $('#tabpanel1 iframe:first')[0].contentWindow; // 激活第一个页签 $('#tabpanel1 .tabpanel_mover li:first').click(); ``` ```javascript var b = $.extend([], tabPage); b.initTabPage('tabpanel2', { height: function () { var windowHeight = $(window).height(), headerHeight = $('.box-header').outerHeight() || 0, footerHeight = $('.box-footer').outerHeight() || 0, height = windowHeight - headerHeight - footerHeight - 20; return height < 300 ? 300 : height; } }); b.addTabPage(null, "岗位列表", "${ctx}/sys/post/list"+p, false); b.addTabPage(null, "公司列表", "${ctx}/sys/company/list"+p, false); $('#tabpanel2 .tabpanel_mover li:first').click(); ``` -------------------------------- ### Get Selected Text Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/static/src/main/resources/static/ueditor/1.4/index.html Retrieves the currently selected text within the editor. It ensures the range is selected before getting the text. ```javascript function getText() { //当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容 var range = UE.getEditor('editor').selection.getRange(); range.select(); var txt = UE.getEditor('editor').selection.getText(); alert(txt) } ``` -------------------------------- ### GET /js/a/menuTree Source: https://context7.com/thinkgem/jeesite5/llms.txt Retrieves the hierarchical menu structure for the authenticated user. ```APIDOC ## GET /js/a/menuTree ### Description Returns the menu tree data for the user based on the provided parent code. ### Method GET ### Endpoint /js/a/menuTree ### Parameters #### Query Parameters - **parentCode** (string) - Optional - The parent menu code to fetch children for ### Response #### Success Response (200) - **Array** (list) - List of menu objects containing menuCode, menuName, menuHref, and children ### Response Example [ { "menuCode": "sys", "menuName": "系统管理", "menuHref": "", "children": [ { "menuCode": "sys_user", "menuName": "用户管理", "menuHref": "/a/sys/empUser/list" } ] } ] ``` -------------------------------- ### Initialize Layout and Tree Structure Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/cms/src/main/resources/views/modules/cms/tplIndex.html Sets up the page layout and initializes the zTree component to display the template directory structure. ```html <% layout('/layouts/default.html', {title: '站点模版',libs:['dataGrid','layout','zTree']}){ %> ${text('模板目录')} <% } %> ``` ```javascript //# // 初始化布局 $('body').layout({ west__size: 300 }); //# // 主页框架 var win = $("#mainFrame")[0].contentWindow; //# // 树结构初始化加载 var setting = { view: { selectedMulti: false }, data: { key: { title: "title" }, simpleData: { enable: true } }, callback: { onClick: function(event, treeId, treeNode) { tree.expandNode(treeNode); if (!treeNode.isDirectory) { window.open("${ctx}/cms/template/form?name=" + treeNode.id, "mainFrame"); } } } }, tree, loadTree = function() { js.ajaxSubmit("${ctx}/cms/template/treeData?___t=" + new Date().getTime(), function(data) { tree = $.fn.zTree.init($("#tree"), setting, data); var level = -1, nodes; while (++level <= 1) { nodes = tree.getNodesByParam("level", level); if (nodes.length > 10) { break; } for(var i=0; i'+val+''; }}, {header:'${text("参数键名")}', name:'configKey', index:'a.config\_key', width:200}, {header:'${text("参数键值")}', name:'configValue', sortable:false, width:200, classes:"nowrap"}, {header:'${text("系统参数")}', name:'isSys', index:'a.is\_sys', width:80, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel("#{@DictUtils.getDictListJson('sys\_yes\_no')}", val, '未知', true); }}, {header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){ var actions = []; //# if(hasPermi('sys:config:edit')){ actions.push(' '); actions.push(' '); //# } return actions.join(''); }} ], //# ajaxSuccess: function(data){ } }); ``` -------------------------------- ### GET /js/a/authInfo Source: https://context7.com/thinkgem/jeesite5/llms.txt Retrieves the current user's authentication and permission information. ```APIDOC ## GET /js/a/authInfo ### Description Fetches the authentication information for the currently logged-in user. ### Method GET ### Endpoint /js/a/authInfo ### Parameters #### Headers - **x-token** (string) - Required - The session token obtained from login ``` -------------------------------- ### Initialize Layout and zTree Component Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/modules/biz/bizCategoryIndex.html Sets up the page layout and initializes the zTree component with asynchronous data loading and click event callbacks. ```html <% layout('/layouts/default.html', {title: '分类管理', libs: ['layout','zTree']}){ %> ${text('分类导航')} <% } %> ``` ```javascript //# // 初始化布局 $('body').layout({ west__initClosed: $(window).width() <= 767, // 是否默认关闭 west__size: 190 }); //# // 主页框架 var win = $("#mainFrame")[0].contentWindow; //# // 树结构初始化加载 var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}}, async:{enable:true,autoParam:["id=parentCode"],url:"${ctx}/biz/bizCategory/treeData"}, callback:{onClick:function(event, treeId, treeNode){ tree.expandNode(treeNode); //win.$('button[type=reset]').click(); win.$('#categoryCode').val(treeNode.id); win.page(1); }} }, tree, loadTree = function(){ js.ajaxSubmit(setting.async.url+"?___t="+new Date().getTime(), { parentCode:'${parameter.parentCode!}'}, function(data){ tree = $.fn.zTree.init($("#tree"), setting, data); var level = -1, nodes; while (++level <= 1) { nodes = tree.getNodesByParam("level", level); if (nodes.length > 10) { break; } for(var i=0; i 10) { break; } for(var i=0; i 单行文本: <#form:input path="testInput" maxlength="200" class="form-control width-120"/> 多行文本: <#form:input path="testTextarea" maxlength="200" class="form-control width-120"/> 下拉框: <#form:select path="testSelect" dictType="sys\_menu\_type" blankOption="true" class="form-control"/> 下拉多选: <#form:select path="testSelectMultiple" dictType="sys\_menu\_type" multiple="true" blankOption="true" class="form-control"/> 单选框: <#form:radio path="testRadio" dictType="sys\_menu\_type" blankOption="true" class="form-control"/> 复选框: <#form:checkbox path="testCheckbox" dictType="sys\_menu\_type" blankOption="true" class="form-control"/> 日期选择: <#form:input path="testDate\_gte" readonly="true" maxlength="20" class="form-control laydate width-date" dataFormat="date" data-type="date" data-format="yyyy-MM-dd" data-done="testDate\_lte.click()"/>  -  <#form:input path="testDate\_lte" readonly="true" maxlength="20" class="form-control laydate width-date" dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/> 日期时间: <#form:input path="testDatetime\_gte" readonly="true" maxlength="20" class="form-control laydate width-datetime" dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm" data-done="testDatetime\_lte.click()"/>  -  <#form:input path="testDatetime\_lte" readonly="true" maxlength="20" class="form-control laydate width-datetime" dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/> 用户选择: <#form:treeselect id="testUser" title="用户选择" path="testUser.userCode" labelPath="testUser.userName" url="${ctx}/sys/office/treeData?isLoadUser=true" allowClear="true"/> 机构选择: <#form:treeselect id="testOffice" title="机构选择" path="testOffice.officeCode" labelPath="testOffice.officeName" url="${ctx}/sys/office/treeData" allowClear="true"/> 区域选择: <#form:treeselect id="testAreaCode" title="区域选择" path="testAreaCode" labelPath="testAreaName" url="${ctx}/sys/area/treeData" allowClear="true"/> 状态: <#form:select path="status" dictType="sys\_search\_status" blankOption="true" class="form-control isQuick"/> 备注信息: <#form:input path="remarks" maxlength="500" class="form-control width-120"/> ${text('查询')} ${text('重置')} ``` -------------------------------- ### Get Editor Content Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/static/src/main/resources/static/ueditor/1.4/index.html Retrieves the editor's content using the getContent() method. Displays a message indicating the method used and the content itself. ```javascript function getContent() { var arr = []; arr.push("使用editor.getContent()方法可以获得编辑器的内容"); arr.push("内容为:"); arr.push(UE.getEditor('editor').getContent()); alert(arr.join("\n")); } ``` -------------------------------- ### Configure DataGrid and Selection Handlers Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/modules/sys/user/empUserSelect.html Initializes the DataGrid with column definitions and event callbacks for row selection and double-click actions. ```javascript align:"center"}, {header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"}, {header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true); }}, {header:'行数据', name:'rowData', hidden:true, formatter: function(val, obj, row, act){ return JSON.stringify(row); }} ], // autoGridWidthFix: 100, autoGridHeight: function(){ var height = $(window).height() - $('#searchForm').height() - $('#dataGridPage').height() - 78; $('.tags-input').height($('.ui-jqgrid').height() - 10); return height; }, showCheckbox: '${parameter.checkbox}' == 'true', multiboxonly: false, // 单击复选框时再多选 ajaxSuccess: function(data){ $.each(selectData, function(key, value){ dataGrid.dataGrid('setSelectRow', key); }); initSelectTag(); }, onSelectRow: function(id, isSelect, event){ if ('${parameter.checkbox}' == 'true'){ if(isSelect){ selectData[id] = JSON.parse(dataGrid.dataGrid('getRowData', id).rowData); }else{ delete selectData[id]; } }else{ selectData = {}; selectData[id] = JSON.parse(dataGrid.dataGrid('getRowData', id).rowData); } initSelectTag(); }, onSelectAll: function(ids, isSelect){ if ('${parameter.checkbox}' == 'true'){ for (var i=0; i //初始化测试数据子表DataGrid对象 $('#testDataChildDataGrid').dataGrid({ data: "#{toJson(testData.testDataChildList)}", datatype: 'local', // 设置本地数据 autoGridHeight: function(){return 'auto'}, // 设置自动高度 // 设置数据表格列 columnModel: [ {header:'状态', name:'status', editable:true, hidden:true}, {header:'主键', name:'id', editable:true, hidden:true}, {header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits', // 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'", dataInit: function(element){ // $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask() $(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask() // $(element).inputmask(); } }}, {header:'父表主键', name:'testData.id', editable:true, hidden:true}, {header:'单行文本', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}}, {header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}}, {header:'下拉框', name:'testSelect', width:100, editable:true, edittype:'select', editoptions:{'class':'form-control', items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"), itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){ js.select2(element).on("change",function(){$(this).resetValid()}); } } }, {header:'下拉多选', name:'testSelectMultiple', width:100, editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control', items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"), itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){ js.select2(element).on("change",function(){$(this).resetValid()}); } } }, {header:'单选框', name:'testRadio', width:100, editable:true, edittype:'select', editoptions:{'class':'form-control', items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"), itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){ js.select2(element).on("change",function(){$(this).resetValid()}); } } }, {header:'复选框', name:'testCheckbox', width:100, editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control', items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"), itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){ js.select2(element).on("change",function(){$(this).resetValid()}); } } }, {header:'日期选择', name:'testDate', width:150, formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'}, editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true', dataInit: function(element){ laydate.render({elem:element, type:'date', format:'yyyy-MM-dd'}); } } }, {header:'日期时间', name:'testDatetime', width:150, formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'}, editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true', dataInit: function(element){ laydate.render({elem:element, type:'datetime', format:'yyyy-MM-dd HH:mm'}); } } }, {header:'用户选择', name:'testUser', width:150, formatter: function(val, obj, row, act){ return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName'); }, editable: true, edittype: "custom", editoptions: { custom_element: function(val, editOptions) { return js.template('treeselectTpl', { id: 'user_'+editOptions.id, title: '用户选择', name: 'testUser.userCode', value: val.split('|')[0], labelName: 'testUser.userName', labelValue: val.split('|')[1], url: '${ctx}/sys/office/treeData?isLoadUser=true', cssClass: '' }); } } }, {header:'${text("用户列表选择")}', name:'testUser2', width:150, formatter: function(val, obj, row, act){ return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName'); }, editable: true, edittype: "custom", editoptions: { custom_element: function(val, editOptions) { return js.template('listselectTpl', { id: 'user_'+editOptions.id, title: '用户选择', name: 'testUser.userCode', value: val.split('|')[0], labelName: 'testUser.userName', labelValue: val.split('|')[1], url: '${ctx}/sys/empUser/empUserSelect', cssClass: '', itemCode: 'userCode', itemName: 'userName' }); } } }, {header:'机构选择', name:'testOffice', width:150, formatter: function(val, obj, row, act){ return js.val(row, 'testOffice.officeCode')+'|'+js.val(row, 'testOffice.officeName'); }, editable: true, edittype: "custom", editoptions: { custom_element: function(val, editOptions) { return js.template('treeselectTpl', { id: 'office_'+editOptions.id, title: '机构选择', name: 'testOffice.officeCode', value: val.split('|')[0], labelName: 'testOffice.officeName', labelValue: val.split('|')[1], url: '${ctx}/sys/office/treeData?officeTypes=1,2', css ``` -------------------------------- ### AI Chat - Get Conversation History Source: https://context7.com/thinkgem/jeesite5/llms.txt Retrieves the message history for a specific conversation ID. Requires a session ID in the x-token header. ```bash curl -X GET "http://localhost:8980/js/a/cms/chat/message?id=conv_001" \ -H "x-token: {sessionid}" ``` -------------------------------- ### Load and Initialize Role Menu Trees Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/modules/sys/roleForm.html Fetches menu tree data via AJAX and initializes zTree instances with specific configuration settings. ```javascript //# if(op == 'add' || op == 'auth') { //# // 加载数据权限树结构 var setting = { check:{enable:true,nocheckInherit:true,chkboxType:{"Y":"ps","N":"ps"}}, view:{selectedMulti:false,nameIsHTML: true}, data:{simpleData:{enable:true},key:{title:"title"}}, callback:{ beforeClick: function (treeId, treeNode, clickFlag) { var tree = $.fn.zTree.getZTreeObj(treeId); tree.checkNode(treeNode, !treeNode.checked, true, true); return false; }, onCheck: function (event, treeId, treeNode){ } } }, sysCodeDict = "#{@DictUtils.getDictListJson('sys_menu_sys_code')}", menuTrees = {}; $.ajax({ type: 'POST', url: "${ctx}/sys/role/menuTreeData?___t=" + new Date().getTime(), data: {roleCode: '${role.roleCode}'}, dataType: 'json', async: false, error: function(data){ js.showErrorMessage(data.responseText); }, success: function(data, status, xhr){ for (var sysCode in data.menuMap){ var menuMap = data.menuMap[sysCode]; $('#menuTrees').append(js.template('menuTpl', {key: sysCode, label: js.getDictLabel(sysCodeDict, sysCode, '未知', true)})); //# // 初始化树结构 var tree = $.fn.zTree.init($("#menuTree_"+sysCode), setting, menuMap); var level = -1, nodes; while (++level <= 1) { nodes = tree.getNodesByParam("level", level); if (nodes.length > 10) { break; } for(var i=0; i div').show(); return; } $.each(sysCodeDict, function(idx, val){ var code = val['dictValue'], isShow = false; for (var i in sysCodes) { if (sysCodes[i] === code) { isShow = true; break; } } $('#menuDiv_' + code).toggle(isShow); }); }).change(); } }); //# } ``` -------------------------------- ### Get Article Utility in Jeesite5 Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/cms/src/main/resources/views/htmltags/cms/article.html This snippet demonstrates how to retrieve an article object using the CmsUtils.getArticle method. It requires the 'main' identifier for the article. ```JSP <% var p = { // 标签参数 预留功能 id: id!, // 文章的id attribute:attribute! //文章的属性,反向获取文章 }; var article= @com.jeesite.modules.cms.utils.CmsUtils.getArticle("main"); %> ``` -------------------------------- ### Configure and Load Tree Data Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/test/src/main/resources/views/modules/test/testTreeIndex.html Sets up the configuration for a ZTree instance, including data retrieval, asynchronous loading, and click event handling. The tree data is fetched from a specified URL and then initialized. ```javascript var win = $("#mainFrame")[0].contentWindow; var setting = { view: { selectedMulti: false }, data: { key: { title: "title" }, simpleData: { enable: true } }, async: { enable: true, autoParam: ["id=parentCode"], url: "${ctx}/test/testTree/treeData" }, callback: { onClick: function(event, treeId, treeNode) { tree.expandNode(treeNode); //win.$('button[type=reset]').click(); win.$('#treeCode').val(treeNode.id); win.page(1); } } }; var tree, loadTree = function() { js.ajaxSubmit(setting.async.url + "?__t="+new Date().getTime(), { parentCode: '${parameter.parentCode!}' }, function(data) { tree = $.fn.zTree.init($("#tree"), setting, data); var level = -1, nodes; while (++level <= 1) { nodes = tree.getNodesByParam("level", level); if (nodes.length > 10) { break; } for (var i = 0; i < nodes.length; i++) { tree.expandNode(nodes[i], true, false, false); } } }, null, null, js.text('loading.message')); }; loadTree(); ``` -------------------------------- ### Get Local Draft Data Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/static/src/main/resources/static/ueditor/1.4/index.html Retrieves saved draft data from the local storage using the 'getlocaldata' command. Displays the data via an alert. ```javascript function getLocalData () { alert(UE.getEditor('editor').execCommand( "getlocaldata" )); } ``` -------------------------------- ### Initialize Layout and Resize Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/modules/sys/auditUserList.html Initializes the layout of the page and handles window resizing to adjust the layout height. It also sets up the data grid to resize with the layout. ```javascript $(window).resize(function(){ $('#layout').height($(window).height() - $('.nav-tabs').height() - 6); }).resize(); $('#layout').layout({ west__size: 250, onresize_end: function(){ $('#dataGrid').dataGrid('resize'); } }); ``` -------------------------------- ### Get Vue Router Menu Data Source: https://context7.com/thinkgem/jeesite5/llms.txt Use this endpoint to fetch menu routing data for Vue. Requires a session ID in the x-token header. ```bash curl -X GET "http://localhost:8980/js/a/menuRoute?parentCode=" \ -H "x-token: {sessionid}" ``` -------------------------------- ### Initialize DataGrid for Audit Logs Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/modules/sys/auditMenuList.html Configures the DataGrid with search form integration, column definitions, and row selection events. ```javascript //# // 初始化DataGrid对象 $('#dataGrid').dataGrid({ searchForm: $('#searchForm'), autoGridHeight: function(){ return $('.ui-layout-content').height() - $('#searchForm').height() - $('#dataGridPage').height() - 16; }, columnModel: [ {header:'${text("登录账号")}', name:'loginCode', index:'u.login_code', width:80, align:"center"}, {header:'${text("用户昵称")}', name:'userName', index:'u.user_name', width:80, align:"center"}, {header:'${text("归属机构")}', name:'officeName', index:'o.office_name', width:90, align:"center"}, {header:'${text("创建时间")}', name:'createDate', index:'u.create_date', width:100, align:"center"}, {header:'${text("更新时间")}', name:'updateDate', index:'u.update_date', width:100, align:"center"}, {header:'${text("状态")}', name:'status', index:'u.status', width:50, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true); }}, {header:'${text("类型")}', name:'userType', index:'u.user_type', width:50, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel("#{@DictUtils.getDictListJson('sys_user_type')}", val, '无', true); }}, ], onSelectRow: function(id, isSelect, event){ userCode = id; loadTree(); }, //# // 加载成功后执行事件 ajaxSuccess: function(data){ } }); $('#btnAuditType button').click(function(){ $('#btnAuditType button').removeClass('active'); $('#auditType').val($(this).addClass('active').data('type')); $('#searchForm').submit(); }); $('#btnExport').click(function(){ js.ajaxSubmitForm($('#searchForm'), { url: '${ctx}/sys/au ``` -------------------------------- ### Freemarker Form Checkbox Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/modules/sys/switchSkin.html Renders a checkbox input field with a label using Freemarker macros. The 'formLayerModel' and 'tabPageModel' are examples of configurable UI elements. ```html <#form:checkbox name="formLayerModel" label="${text('表单弹窗模式')}" class="form-control"/> <#form:checkbox name="tabPageModel" label="${text('取消页签模式')}" class="form-control"/> ``` -------------------------------- ### Initialize JeeSite 5 Layout and Form Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/test/src/main/resources/views/modules/demo/demoFormTableForm.html Sets up the page layout with required libraries and initializes a horizontal form for data submission. ```html <% layout('/layouts/default.html', {title: '数据管理', libs: ['validate','fileupload','ueditor','dataGrid']}){ %> 表格表单实例 <#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal"> ``` -------------------------------- ### Browser Compatibility Warning Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/core/src/main/resources/views/include/upgrade.html This directive displays a warning for IE9 users and prohibits usage in IE8 and below. It's an example of including a browser upgrade prompt. ```html <%/* Copyright (c) 2013-Now https://jeesite.com All rights reserved. */%> <%/* No deletion without permission, or be held responsible to law. */%> <%/* IE9给予警告提示,IE8及以下禁止使用,调用举例如下: < % include('/include/upgrade.html'){} // 如果客户浏览器版本过低,则显示浏览器升级提示。 */%> ``` -------------------------------- ### Install and Run PGVector Vector Database Source: https://github.com/thinkgem/jeesite5/blob/v5.springboot3/modules/ai/README.md Command to run PGVector as a Docker container, exposing port 5432. It uses default PostgreSQL credentials. ```sh docker run -d --name pgvector -p 5433:5432 -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres pgvector/pgvector:pg17 ```