44323
2023-10-13 cd798f7ed4273559fb5d52c6d9cdf157b505f8d3
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
4个文件已修改
425 ■■■■ 已修改文件
cloud-server-account/src/main/resources/mapper/TStudentMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/TStudentController.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudentEdit.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudent_commite.html 371 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/resources/mapper/TStudentMapper.xml
@@ -81,7 +81,7 @@
    <select id="queryCom" resultType="java.util.Map">
        SELECT
            es.id as id ,tc.name,es.content,es.insertTime
            es.id as id ,tc.name,es.content,es.insertTime,es.imgs as images
        FROM
            t_evaluate_student es
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/TStudentController.java
@@ -2,6 +2,7 @@
import com.dsh.course.dto.*;
import com.dsh.course.entity.EvaluateStudent;
import com.dsh.course.feignClient.account.AppUserClient;
import com.dsh.course.feignClient.account.StudentClient;
import com.dsh.course.feignClient.account.model.TAppUser;
@@ -367,6 +368,55 @@
    }
    @RequestMapping("/addcom")
    @ResponseBody
    public ResultUtil addcom(String content,String image) {
        EvaluateStudent evaluateStudent = new EvaluateStudent();
        evaluateStudent.setContent(content);
        evaluateStudent.setImgs(image);
        evaluateStudent.setInsertTime(new Date());
        evaluateStudentService.save(evaluateStudent);
        return new ResultUtil<>(0,0,"保存成功",null,null);
    }
    @RequestMapping("/updatecom")
    @ResponseBody
    public ResultUtil updatecom(Integer id,String content,String images) {
        EvaluateStudent evaluateStudent = new EvaluateStudent();
        evaluateStudent.setId(id);
        evaluateStudent.setContent(content);
        evaluateStudent.setImgs(images);
        evaluateStudent.setInsertTime(new Date());
        evaluateStudentService.updateById(evaluateStudent);
        return new ResultUtil<>(0,0,"修改成功",null,null);
    }
    @RequestMapping("/comdel/{id}")
    @ResponseBody
    public ResultUtil comdel(@PathVariable("id") Integer id) {
        evaluateStudentService.removeById(id);
        return new ResultUtil<>(0,0,"删除成功",null,null);
    }
    /**
     * 获取列表
     */
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudentEdit.html
@@ -230,7 +230,7 @@
          "uploadType": "fileReceptor",
          "imageClassName": "r w-full",
          "receiver": {
            "url": "/mgr/uploadImg",
            "url": "/mgr/uploadImgAmis",
            "method": "post"
          },
          "accept": ".jpeg, .jpg, .png, .gif",
cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tStudent_commite.html
@@ -1,65 +1,312 @@
@layout("/common/_container.html"){
<div class="row" id = "ttt">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>管理</h5>
            </div>
            <div class="ibox-content">
                <input type="hidden" id="id" value="${id}">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-sm-3">
                                <#NameCon id="province" name="省份" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="city" name="城市" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="name" name="姓名" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="phone" name="联系电话" />
                            </div>
                            <div class="col-sm-3">
                                <#NameCon id="userName" name="所属用户" />
                            </div>
                            <div class="col-sm-3">
                                <#button name="搜索" icon="fa-search" clickFun="TStudent.search()"/>
                            </div>
                        </div>
                        <div class="hidden-xs" id="TStudentTableToolbar" role="group">
                            @if(shiro.hasPermission("/tStudent/add")){
                                <#button name="添加" icon="fa-plus" clickFun="TStudent.openAddTStudent()"/>
                            @}
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <title>amis demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <link rel="stylesheet" href="${ctxPath}/sdk/sdk.css" />
    <link rel="stylesheet" href="${ctxPath}/sdk/helper.css" />
    <link rel="stylesheet" href="${ctxPath}/sdk/iconfont.css" />
    <!-- 这是默认主题所需的,如果是其他主题则不需要 -->
    <!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11,如果要支持 IE11 请引用这个 css,并把前面那个删了 -->
    <!-- <link rel="stylesheet" href="sdk-ie11.css" /> -->
    <!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果,所以可能有细节功能用不了,如果发现请报 issue -->
    <style>
        html,
        body,
        .app-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="${ctxPath}/sdk/sdk.js"></script>
<script type="text/javascript">
    (function () {
        let amis = amisRequire('amis/embed');
        // 通过替换下面这个配置来生成不同页面
        let amisJSON = {
            "type": "page",
            "body": [
                {
                    "type": "crud",
                    "syncLocation": false,
                    "api": {
                        "method": "get",
                        "url": `/tStudent/listcom/+${id}`
                    },
                    "columns": [
                        {
                            "name": "insertTime",
                            "label": "添加时间",
                            "type": "text",
                            "id": "u:235c4112d266"
                        },
                        {
                            "type": "text",
                            "label": "评价老师",
                            "name": "name",
                            "id": "u:960e8575cbee"
                        },
                        {
                            "type": "text",
                            "label": "评语内容",
                            "name": "content",
                            "id": "u:b806e8c662b5"
                        },
                        {
                            "type": "operation",
                            "label": "操作",
                            "buttons": [
                                {
                                    "label": "编辑",
                                    "type": "button",
                                    "actionType": "dialog",
                                    "level": "link",
                                    "dialog": {
                                        "type": "dialog",
                                        "title": "编辑",
                                        "body": [
                                            {
                                                "type": "form",
                                                "api": "post:/tStudent/updatecom",
                                                "body": [
                                                    {
                                                        "name": "id",
                                                        "label": "ID",
                                                        "type": "input-text",
                                                        "id": "u:9e8c632b7c07",
                                                        "hidden": true
                                                    },
                                                    {
                                                        "label": "评语内容",
                                                        "name": "content",
                                                        "type": "textarea",
                                                        "id": "u:ccff8dd96b25",
                                                        "required": true
                                                    },
                                                    {
                                                        "type": "input-image",
                                                        "label": "添加图片(请上传不超过五张):",
                                                        "name": "images",
                                                        "autoUpload": true,
                                                        "proxy": true,
                                                        "uploadType": "fileReceptor",
                                                        "imageClassName": "r w-full",
                                                        "receiver": {
                                                            "url": "object-upload://default",
                                                            "method": "post"
                                                        },
                                                        "id": "u:5a904d4cfcf4",
                                                        "accept": ".jpeg, .jpg, .png, .gif",
                                                        "multiple": true,
                                                        "hideUploadButton": false,
                                                        "fixedSize": false,
                                                        "mode": "normal",
                                                        "joinValues": true,
                                                        "maxLength": 5
                                                    }
                                                ],
                                                "id": "u:ce9bd5c88ea6"
                                            }
                                        ],
                                        "id": "u:9ce57e6272d4",
                                        "showCloseButton": true,
                                        "closeOnEsc": false,
                                        "showErrorMsg": true,
                                        "showLoading": true,
                                        "dataMapSwitch": false,
                                        "size": "lg"
                                    },
                                    "id": "u:a437c47ecdbe"
                                },
                                {
                                    "label": "查看",
                                    "type": "button",
                                    "actionType": "dialog",
                                    "level": "link",
                                    "dialog": {
                                        "type": "dialog",
                                        "title": "查看详情",
                                        "body": [
                                            {
                                                "type": "form",
                                                "api": "xxx/update",
                                                "body": [
                                                    {
                                                        "name": "insertTime",
                                                        "label": "添加时间",
                                                        "type": "static",
                                                        "id": "u:d9a8ee3b4750"
                                                    },
                                                    {
                                                        "label": "评价老师",
                                                        "name": "name",
                                                        "type": "static",
                                                        "id": "u:7ff366a38884"
                                                    },
                                                    {
                                                        "label": "评语内容",
                                                        "name": "content",
                                                        "type": "textarea",
                                                        "id": "u:1d72745e4b0c",
                                                        "static": true
                                                    }
                                                ],
                                                "id": "u:9fecbdbcccac"
                                            },
                                            {
                                                "type": "tpl",
                                                "tpl": "评价图片:",
                                                "inline": true,
                                                "wrapperComponent": "",
                                                "id": "u:41b120c6c723"
                                            },
                                            {
                                                "type": "images",
                                                "id": "u:76216a114f2c",
                                                "name": "images"
                                            }
                                        ],
                                        "id": "u:169bff904243",
                                        "actions": []
                                    },
                                    "id": "u:dec0287f380d"
                                },
                                {
                                    "type": "button",
                                    "label": "删除",
                                    "actionType": "ajax",
                                    "level": "link",
                                    "className": "text-danger",
                                    "confirmText": "确定要删除?",
                                    "api": {
                                        "method": "post",
                                        "url": "/tStudent/comdel/$id"
                                    },
                                    "id": "u:08b4fc554d4e"
                                }
                            ],
                            "id": "u:cd648ea9764d"
                        }
                    ],
                    "bulkActions": [],
                    "itemActions": [],
                    "features": [
                        "create",
                        "filter",
                        "update",
                        "view",
                        "delete"
                    ],
                    "filterColumnCount": 3,
                    "headerToolbar": [
                        {
                            "label": "新增",
                            "type": "button",
                            "actionType": "dialog",
                            "level": "primary",
                            "dialog": {
                                "type": "dialog",
                                "title": "新增",
                                "body": [
                                    {
                                        "type": "form",
                                        "api": {
                                            "method": "post",
                                            "url": "/tStudent/addcom",
                                            "messages": {},
                                            "dataType": "form-data"
                                        },
                                        "body": [
                                            {
                                                "type": "textarea",
                                                "name": "content",
                                                "label": "评语内容",
                                                "id": "u:ecad9c1d555e",
                                                "required": true
                                            },
                                            {
                                                "type": "input-image",
                                                "label": "添加图片(请上传不超过五张):",
                                                "name": "image",
                                                "autoUpload": true,
                                                "proxy": true,
                                                "uploadType": "fileReceptor",
                                                "imageClassName": "r w-full",
                                                "receiver": {
                                                    "url": "/api/upload/oss",
                                                    "method": "post"
                                                },
                                                "id": "u:617faa0f7046",
                                                "accept": ".jpeg, .jpg, .png, .gif",
                                                "multiple": true,
                                                "hideUploadButton": false,
                                                "fixedSize": false,
                                                "joinValues": true,
                                                "maxLength": 5,
                                                "mode": "normal"
                                            }
                                        ],
                                        "id": "u:80cc718d2af1"
                                    }
                                ],
                                "id": "u:8f7d1f838246"
                            },
                            "id": "u:ddd9756567ba"
                        }
                    ],
                    "id": "u:f81e125a78d5",
                    "perPageAvailable": [],
                    "messages": {},
                    "footerToolbar": [
                        {
                            "type": "statistics",
                            "align": "left"
                        },
                        {
                            "type": "pagination",
                            "align": "left"
                        }
                    ],
                    "perPage": 10,
                    "loadDataOnce": true
                }
            ],
            "id": "u:175e8dd3d331",
            "toolbar": [
                {
                    "type": "input-text",
                    "label": "id",
                    "name": "id",
                    "hidden": false,
                    "id": "u:8fbfb3be80ce",
                    "value":`${id}`
                }
            ]
        };
        let amisScoped = amis.embed('#root', amisJSON);
                                <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/>
                            <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/>
                            <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail2()" space="true"/>
                            @if(shiro.hasPermission("/tStudent/delete")){
                                <#button name="删除" icon="fa-remove" clickFun="TStudent.delete()" space="true"/>
                            @}
<!--                            <button id="exportButton">TTTTTTTTTT</button>-->
                        </div>
                        <#table id="TStudentTable"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/modular/system/tStudent/tStudent_commite.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js">
    })();
    function test(){
        console.log("测试成功")
    }
    var myButton = document.getElementById("ttt");
    myButton.addEventListener("click",test);
</script>
<script>
    document.getElementById('exportButton').addEventListener('click', function() {
        console.log("==============>")
        var doc = new jsPDF();
        var content = document.getElementById('ttt').innerHTML;
        doc.text(content, 10, 10);
        doc.save('export.pdf');
    });
</script>
@}
</body>
</html>