huangxiao 1 ay önce
ebeveyn
işleme
76fff726bd

+ 211 - 0
src/main/java/net/mingsoft/tf/action/BrowseAction.java

@@ -0,0 +1,211 @@
+package net.mingsoft.tf.action;
+
+import java.util.List;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import cn.hutool.core.util.ObjectUtil;
+import java.util.*;
+
+import net.mingsoft.base.entity.ResultData;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import java.util.stream.Collectors;
+
+import org.springframework.web.bind.annotation.*;
+import net.mingsoft.tf.biz.IBrowseBiz;
+import net.mingsoft.tf.entity.BrowseEntity;
+import net.mingsoft.base.entity.BaseEntity;
+import net.mingsoft.basic.util.BasicUtil;
+import net.mingsoft.basic.util.StringUtil;
+import net.mingsoft.basic.bean.EUListBean;
+import net.mingsoft.basic.annotation.LogAnn;
+import net.mingsoft.basic.constant.e.BusinessTypeEnum;
+import org.apache.commons.lang3.StringUtils;
+
+
+
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Hidden;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+
+/**
+* 浏览量管理控制层
+* @author 阿白
+* 创建日期:2025年12月31日 下午5:45:57<br/>
+* 历史修订:<br/>
+*/
+@Tag(name = "后台-浏览量接口")
+@Controller("tfBrowseAction")
+@RequestMapping("/${ms.manager.path}/tf/browse")
+public class BrowseAction extends net.mingsoft.tf.action.BaseAction{
+
+
+    /**
+    * 注入浏览量业务层
+    */
+    @Autowired
+    private IBrowseBiz browseBiz;
+
+    /**
+    * 返回主界面index
+    */
+    @Hidden
+    @GetMapping("/index")
+    public String index() {
+        return "/tf/browse/index";
+    }
+
+
+    /**
+    * 返回编辑界面browse的form
+    */
+    @Hidden
+    @GetMapping("/form")
+    public String form() {
+        return "/tf/browse/form";
+    }
+
+
+    /**
+    * 查询浏览量列表
+    * @param browse 浏览量实体
+    */
+    @Operation(summary = "查询浏览量列表接口")
+    @Parameters({
+        @Parameter(name = "browseData", description = "日期", in = ParameterIn.QUERY),
+        @Parameter(name = "browseVisits", description = "访问量", in = ParameterIn.QUERY),
+    })
+    @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST})
+    @ResponseBody
+    @RequiresPermissions("tf:browse:view")
+    public ResultData list(@ModelAttribute @Parameter(hidden = true) BrowseEntity browse) {
+        BasicUtil.startPage();
+        List browseList = null;
+        if ( browse.getSqlWhere() != null){
+            browseList = browseBiz.query(browse);
+        } else {
+            LambdaQueryWrapper<BrowseEntity> wrapper = new LambdaQueryWrapper<>(browse).orderByDesc(BrowseEntity::getCreateDate);
+            browseList = browseBiz.list(wrapper);
+        }
+        return ResultData.build().success(new EUListBean(browseList,(int)BasicUtil.endPage(browseList).getTotal()));
+    }
+
+
+    /**
+    * 获取浏览量
+    * @param browse 浏览量实体
+    */
+    @Operation(summary = "获取浏览量列表接口")
+    @Parameter(name = "id", description = "主键ID", required =true,in = ParameterIn.QUERY)
+    @GetMapping("/get")
+    @ResponseBody
+    @RequiresPermissions("tf:browse:view")
+    public ResultData get(@ModelAttribute @Parameter(hidden = true) BrowseEntity browse) {
+        if (StringUtils.isBlank(browse.getId())) {
+            return ResultData.build().error(getResString("err.error",this.getResString("id")));
+        }
+        BrowseEntity _browse = (BrowseEntity)browseBiz.getById(browse.getId());
+        return ResultData.build().success(_browse);
+    }
+
+
+    /**
+    * 保存浏览量
+    * @param browse 浏览量实体
+    */
+    @Operation(summary = "保存浏览量列表接口")
+    @Parameters({
+        @Parameter(name = "browseData", description = "日期", required = false, in = ParameterIn.QUERY),
+        @Parameter(name = "browseVisits", description = "访问量", required = false, in = ParameterIn.QUERY),
+    })
+    @PostMapping("/save")
+    @ResponseBody
+    @LogAnn(title = "保存浏览量", businessType = BusinessTypeEnum.INSERT)
+    @RequiresPermissions("tf:browse:save")
+    public ResultData save(@ModelAttribute @Parameter(hidden = true) BrowseEntity browse) {
+
+        if (!StringUtil.checkLength(browse.getBrowseVisits()+"", 0, 11)) {
+          return ResultData.build().error(getResString("err.length", this.getResString("browse.visits"), "0", "11"));
+        }
+        browseBiz.save(browse);
+        return ResultData.build().success(browse);
+    }
+
+    /**
+    *  删除浏览量
+    *
+    * @param browses 浏览量实体
+    */
+    @Operation(summary = "批量删除浏览量列表接口")
+    @PostMapping("/delete")
+    @ResponseBody
+    @LogAnn(title = "删除浏览量", businessType = BusinessTypeEnum.DELETE)
+    @RequiresPermissions("tf:browse:del")
+    public ResultData delete(@RequestBody List<BrowseEntity> browses) {
+        List<String> ids = (List)browses.stream().map((p) -> {return p.getId();}).collect(Collectors.toList());
+        return this.browseBiz.removeByIds(ids) ? ResultData.build().success() : ResultData.build().error(this.getResString("err.error", new String[]{this.getResString("id")}));
+    }
+
+    /**
+    *	更新浏览量列表
+    *
+    * @param browse 浏览量实体
+    */
+    @Operation(summary = "更新浏览量列表接口")
+    @Parameters({
+        @Parameter(name = "id", description = "主键ID", required =true,in = ParameterIn.QUERY),
+        @Parameter(name = "browseData", description = "日期", required = false, in = ParameterIn.QUERY),
+        @Parameter(name = "browseVisits", description = "访问量", required = false, in = ParameterIn.QUERY),
+    })
+    @PostMapping("/update")
+    @ResponseBody
+    @LogAnn(title = "更新浏览量", businessType = BusinessTypeEnum.UPDATE)
+    @RequiresPermissions("tf:browse:update")
+    public ResultData update(@ModelAttribute @Parameter(hidden = true) BrowseEntity browse) {
+        //先查询数据是否存在
+        BrowseEntity _browse = (BrowseEntity)browseBiz.getById(browse.getId());
+        if(_browse == null) {
+            return ResultData.build().error(getResString("err.not.exist",browse.getId() ));
+        }
+
+        if (!StringUtil.checkLength(browse.getBrowseVisits()+"", 0, 11)) {
+          return ResultData.build().error(getResString("err.length", this.getResString("browse.visits"), "0", "11"));
+        }
+        browseBiz.updateById(browse);
+        return ResultData.build().success(browse);
+    }
+
+    @GetMapping("verify")
+    @ResponseBody
+    public ResultData verify(String fieldName, String fieldValue, String id,String idName) {
+        boolean verify = false;
+        if (StringUtils.isBlank(id)) {
+            verify = super.validated("BROWSE",fieldName,fieldValue);
+        } else {
+            verify = super.validated("BROWSE",fieldName,fieldValue,id,idName);
+        }
+        if (verify) {
+            return ResultData.build().success(false);
+        }else {
+            return ResultData.build().success(true);
+        }
+    }
+
+}

+ 16 - 0
src/main/java/net/mingsoft/tf/biz/IBrowseBiz.java

@@ -0,0 +1,16 @@
+package net.mingsoft.tf.biz;
+
+import net.mingsoft.base.biz.IBaseBiz;
+import net.mingsoft.tf.entity.BrowseEntity;
+
+
+/**
+ * 浏览量业务
+ * @author 阿白
+ * 创建日期:2025年12月31日 下午5:45:57<br/>
+ * 历史修订:<br/>
+ */
+public interface IBrowseBiz extends IBaseBiz<BrowseEntity> {
+
+
+}

+ 34 - 0
src/main/java/net/mingsoft/tf/biz/impl/BrowseBizImpl.java

@@ -0,0 +1,34 @@
+package net.mingsoft.tf.biz.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import net.mingsoft.base.biz.impl.BaseBizImpl;
+import net.mingsoft.base.dao.IBaseDao;
+import java.util.*;
+import net.mingsoft.tf.entity.BrowseEntity;
+import net.mingsoft.tf.biz.IBrowseBiz;
+import net.mingsoft.tf.dao.IBrowseDao;
+
+/**
+* 浏览量管理持久化层
+* @author 阿白
+* 创建日期:2025年12月31日 下午5:45:57<br/>
+* 历史修订:<br/>
+*/
+@Service("tfbrowseBizImpl")
+public class BrowseBizImpl extends BaseBizImpl<IBrowseDao,BrowseEntity> implements IBrowseBiz {
+
+
+    @Autowired
+    private IBrowseDao browseDao;
+
+
+    @Override
+    protected IBaseDao getDao() {
+        // TODO Auto-generated method stub
+        return browseDao;
+    }
+
+
+
+}

+ 14 - 0
src/main/java/net/mingsoft/tf/dao/IBrowseDao.java

@@ -0,0 +1,14 @@
+package net.mingsoft.tf.dao;
+
+import net.mingsoft.base.dao.IBaseDao;
+import java.util.*;
+import net.mingsoft.tf.entity.BrowseEntity;
+
+/**
+ * 浏览量持久层
+ * @author 阿白
+ * 创建日期:2025年12月31日 下午5:45:57<br/>
+ * 历史修订:<br/>
+ */
+public interface IBrowseDao extends IBaseDao<BrowseEntity> {
+}

+ 19 - 0
src/main/java/net/mingsoft/tf/dao/IBrowseDao.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="net.mingsoft.tf.dao.IBrowseDao">
+
+	<resultMap id="resultMap" type="net.mingsoft.tf.entity.BrowseEntity">
+				<result column="BROWSE_DATA" property="browseData" /><!--日期 -->
+				<result column="BROWSE_VISITS" property="browseVisits" /><!--访问量 -->
+	</resultMap>
+
+	<select id="query" resultMap="resultMap">
+		SELECT * FROM MDIY_FORM_BROWSE
+		<where>
+			DEL=0
+			<include refid="net.mingsoft.base.dao.IBaseDao.sqlWhere"></include>
+		</where>
+		 ORDER BY ID DESC
+	</select>
+
+</mapper>

+ 70 - 0
src/main/java/net/mingsoft/tf/entity/BrowseEntity.java

@@ -0,0 +1,70 @@
+package net.mingsoft.tf.entity;
+
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import net.mingsoft.base.entity.BaseEntity;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.SqlCondition;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+
+import java.util.Date;
+/**
+* 浏览量实体
+* @author 阿白
+* 创建日期:2025年12月31日 下午5:45:57<br/>
+* 历史修订:<br/>
+*/
+@TableName("MDIY_FORM_BROWSE")
+public class BrowseEntity extends BaseEntity {
+
+private static final long serialVersionUID = 1767174357606L;
+
+    /**
+    * 日期
+    */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    
+    private Date browseData;
+    /**
+    * 访问量
+    */
+    
+    private Integer browseVisits;
+
+
+    /**
+    * 设置日期
+    */
+    public void setBrowseData(Date browseData) {
+        this.browseData = browseData;
+    }
+
+    /**
+    * 获取日期
+    */
+    public Date getBrowseData() {
+        return this.browseData;
+    }
+    /**
+    * 设置访问量
+    */
+    public void setBrowseVisits(Integer browseVisits) {
+        this.browseVisits = browseVisits;
+    }
+
+    /**
+    * 获取访问量
+    */
+    public Integer getBrowseVisits() {
+        return this.browseVisits;
+    }
+
+
+}

+ 2 - 0
src/main/java/net/mingsoft/tf/resources/resources_en_US.properties

@@ -94,3 +94,5 @@ design.works=design works
 business.name=business name
 business.info=business info
 business.img=business img
+browse.data=browse data
+browse.visits=browse visits

+ 2 - 0
src/main/java/net/mingsoft/tf/resources/resources_zh_CN.properties

@@ -94,3 +94,5 @@ design.works=\u4f5c\u54c1
 business.name=\u540d\u79f0
 business.info=\u4ecb\u7ecd
 business.img=\u4e8c\u7ef4\u7801
+browse.data=\u65e5\u671f
+browse.visits=\u8bbf\u95ee\u91cf

+ 170 - 0
src/main/webapp/WEB-INF/manager/tf/browse/form.ftl

@@ -0,0 +1,170 @@
+    <!DOCTYPE html>
+    <html>
+
+    <head>
+        <title>浏览量</title>
+            <#include "../../include/head-file.ftl">
+
+    </head>
+
+    <body>
+    <div id="form" v-cloak>
+        <el-header class="ms-header ms-tr" height="50px">
+            <el-button type="primary" class="iconfont icon-baocun" size="default" @click="save()" :loading="saveDisabled">保存</el-button>
+            <el-button size="default" class="iconfont icon-fanhui" plain @click="back()">返回</el-button>
+        </el-header>
+        <el-main class="ms-container" v-loading="loading">
+            <el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="right" size="default">
+
+                        <el-row
+                                :gutter="0"
+                                justify="start" align="top">
+                                <el-col :span=12>
+        <!--日期-->
+    
+        <el-form-item  label="日期" prop="browseData">
+               <el-date-picker
+                     v-model="form.browseData"
+placeholder="请选择日期"                    :readonly="false"
+                    :disabled="false"
+                    :editable="true"
+                    :clearable="true"
+                  value-format="YYYY-MM-DD"
+                    :style="{width:'100%'}"
+                    type="date">
+            </el-date-picker>
+        </el-form-item>
+                                </el-col>
+                                <el-col :span=12>
+            <!--访问量-->
+
+	        <el-form-item  label="访问量" prop="browseVisits">
+	            <el-input
+                        v-model.number="form.browseVisits"
+                         :disabled="false"
+                          :readonly="false"
+                          :style="{width:  '100%'}"
+                          :clearable="true"
+                        placeholder="请输入访问量">
+                </el-input>
+	        </el-form-item>   
+                                </el-col>
+                        </el-row>
+            </el-form>
+        </el-main>
+    </div>
+    </body>
+
+    </html>
+
+<script>
+    var formVue = new _Vue({
+        el: '#form',
+
+        data:function() {
+            return {
+                loading:false,
+                saveDisabled: false,
+                //表单数据
+                form: {
+                    //日期
+                   browseData:"",
+                    // 访问量
+                    browseVisits:'',
+
+                },
+                rules:{
+                        // 访问量
+                        browseVisits: [{"type":"number","message":"访问量格式不正确"}],
+
+                },
+
+            }
+        },
+        watch:{
+               
+        },
+        components:{
+        },
+        computed:{
+        },
+        methods: {
+
+            back: function (){
+                ms.util.openSystemUrl("/tf/browse/index.do",true);
+            },
+
+            save:function() {
+                var that = this;
+                var url = ms.manager + "/tf/browse/save.do"
+                if (that.form.id > 0) {
+                    url = ms.manager + "/tf/browse/update.do";
+                }
+
+                this.$refs.form.validate(function(valid) {
+                    if (valid) {
+                        that.saveDisabled = true;
+                        var form = JSON.parse(JSON.stringify(that.form));
+	 				
+                        ms.http.post(url, form).then(function (res) {
+                            if (res.result) {
+                                that.$notify({
+                                    title: "成功",
+                                    message: "保存成功",
+                                    type: 'success'
+                                });
+                                ms.util.openSystemUrl("/tf/browse/index.do",that.form.id > 0);
+                            } else {
+                                that.$notify({
+                                    title: "错误",
+                                    message: res.msg,
+                                    type: 'warning'
+                                });
+                            }
+
+                            that.saveDisabled = false;
+                        }).catch(function (err) {
+                            console.log(err);
+                            that.saveDisabled = false;
+                        });
+                    } else {
+                        return false;
+                    }
+                })
+            },
+
+            //获取当前浏览量
+            get:function(id) {
+                var that = this;
+                this.loading = true
+                ms.http.get(ms.manager + "/tf/browse/get.do", {"id":id}).then(function (res) {
+                    that.loading = false
+                    if(res.result&&res.data) {
+                   
+                   // 自定义模型需要根据控件配置转换
+                     if(res.data.browseVisits){
+                     	res.data.browseVisits=String(res.data.browseVisits);
+                     }
+
+                        that.form = res.data;
+                    }
+                });
+            },
+           //日期日期格式化
+           browseDataFormat:function(row, column, cellValue, index){                
+                return ms.util.date.fmt(new Date(row.BROWSE_DATA),'YYYY-MM-DD');                
+            },
+        },
+        created:function() {
+            var that = this;
+
+            this.form.id = ms.util.getParameter("id");
+            if (this.form.id) {
+                this.get(this.form.id);
+            }
+        }
+    });
+
+</script>
+    <style scoped>
+    </style>

+ 273 - 0
src/main/webapp/WEB-INF/manager/tf/browse/index.ftl

@@ -0,0 +1,273 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>浏览量</title>
+        <#include "../../include/head-file.ftl">
+</head>
+<body>
+<div id="index" class="ms-index" v-cloak>
+        <el-header class="ms-header" height="50px">
+        <el-col :span=12>
+            <@shiro.hasPermission name="tf:browse:save">
+                <el-button type="primary" class="el-icon-plus" size="default" @click="save()">新增</el-button>
+
+            </@shiro.hasPermission>
+            <@shiro.hasPermission name="tf:browse:del">
+                <el-button type="danger" class="el-icon-delete" size="default" @click="del(selectionList)"  :disabled="!selectionList.length">删除</el-button>
+            </@shiro.hasPermission>
+        </el-col>
+        </el-header>
+        <div class="ms-search">
+            <el-row>
+                <el-form :model="form"  ref="searchForm"  label-width="120px" size="default">
+                        <el-row>
+                                <el-col :span=24 style="display: flex;justify-content: end;padding-right: 10px;">
+                                    
+                                    <el-button @click="rest" class="el-icon-refresh" size="default">重置</el-button>
+                                    <ms-search ref="search" @search="search" :search-json="searchJson" :search-key="historyKey"></ms-search>
+                                </el-col>
+                        </el-row>
+                </el-form>
+            </el-row>
+        </div>
+    <el-main class="ms-container">
+        <el-table class="ms-table-pagination" v-loading="loading" ref="multipleTable" border :data="dataList" tooltip-effect="dark" @selection-change="handleSelectionChange">
+                <template #empty>
+                    {{emptyText}}
+                </template>
+                    <el-table-column type="selection" width="40" :selectable="isChecked"></el-table-column>
+                <el-table-column label="日期"   min-width="200" align="center" prop="browseData" >
+                    </el-table-column>
+                            <el-table-column label="访问量"   align="right" prop="browseVisits">
+                            </el-table-column>
+                    <el-table-column  min-width="180" align="center" label="创建时间" prop="createDate"></el-table-column>
+                    <el-table-column label="操作"  width="180" align="center" fixed="right">
+                            <template #default="scope">
+                                <@shiro.hasPermission name="tf:browse:update">
+                                    <el-link type="primary" :underline="false" @click="save(scope.row.id)">编辑</el-link>
+                                </@shiro.hasPermission>
+                            <@shiro.hasPermission name="tf:browse:del">
+                                <el-link type="primary" :underline="false" @click="del([scope.row])" v-if="scope.row.del!=3">删除</el-link>
+                            </@shiro.hasPermission>
+                </template>
+                </el-table-column>
+            </el-table>
+                <el-pagination
+                        background
+                        :page-sizes="[10,20,30,40,50,100]"
+                        layout="total, sizes, prev, pager, next, jumper"
+                        :current-page="currentPage"
+                        :page-size="pageSize"
+                        :total="total"
+                        class="ms-pagination"
+                        @current-change='currentChange'
+                        @size-change="sizeChange">
+                </el-pagination>
+    </el-main>
+</div>
+
+</body>
+
+</html>
+<script>
+    var indexVue = new _Vue({
+        el: '#index',
+		provide() {
+			return {
+				searchParent: this //筛选使用
+			};
+		},
+        data:function() {
+            return {
+				        searchJson:[
+    {
+    "action": "and",
+    "field": "BROWSE_DATA",
+    "model": "browseData",
+    "el": "gt",
+    "fmt": "YYYY-MM-DD",
+    "name": "日期",
+    "type": "date"
+    },
+
+    {
+    "isSearch": "",
+    "action": "and",
+    "field": "BROWSE_VISITS",
+    "el": "eq",
+    "model": "browseVisits",
+    "name": "访问量",
+    "type": "number"
+    },
+                ],
+                dataList: [], //浏览量列表
+                selectionList:[],//浏览量列表选中
+                total: 0, //总记录数量
+                pageSize: 10, //页面数量
+                currentPage:1, //初始页
+                manager: ms.manager,
+                loading: true,//加载状态
+                emptyText:'',//提示文字
+                //搜索表单
+                form:{
+                    sqlWhere:null
+                },
+                //历史记录参数
+                historyKey: "tf_browse_history"
+            }
+        },
+        watch:{
+               
+        },
+        methods:{
+            isChecked: function(row) {
+                if(row.del == 3) {
+                    return false;
+                }
+                return true;
+            },
+            //查询列表
+            list: function(isSearch) {
+                var that = this;
+                var data = {}; //搜索参数
+                that.loading = true;
+                var page={
+                    pageNo: that.currentPage,
+                    pageSize : that.pageSize
+                }
+                var form = JSON.parse(JSON.stringify(that.form))
+
+
+                if(isSearch) {
+                    //删除空字符串
+                    for (var key in form){
+                        if(form[key] === undefined || form[key] === null){
+                            delete  form[key]
+                        }
+                    }
+                    form.sqlWhere ? data = Object.assign({}, {sqlWhere: form.sqlWhere}, page) : data = Object.assign({}, form, page)
+                } else {
+                    data = page;
+                }
+                sessionStorage.setItem(that.historyKey,JSON.stringify({form: form, page: page}));
+                ms.http.post(ms.manager+"/tf/browse/list.do",data).then(
+                    function(res) {
+                        if (!res.result||res.data.total <= 0) {
+                            that.emptyText ="暂无数据"
+                            that.dataList = [];
+                            that.total = 0;
+                        } else {
+                            that.emptyText = '';
+                            that.total = res.data.total;
+                            that.dataList = res.data.rows;
+                        }
+                        that.loading = false;
+                    }).catch(function(err) {
+                    that.loading = false;
+                    console.log(err);
+                });
+
+            },
+            //浏览量列表选中
+            handleSelectionChange:function(val){
+                this.selectionList = val;
+            },
+            //删除
+            del: function(row){
+                var that = this;
+                that.$confirm("此操作将永久删除所选内容, 是否继续", "提示", {
+                    confirmButtonText: "确认",
+                    cancelButtonText: "取消",
+                    type: 'warning'
+                }).then(function() {
+                    ms.http.post(ms.manager+"/tf/browse/delete.do", row.length?row:[row],{
+                        headers: {
+                            'Content-Type': 'application/json'
+                        }
+                    }).then(
+                        function(res){
+                            if (res.result) {
+                                that.$notify({
+                                    title:'成功',
+                                    type: 'success',
+                                    message:"删除成功"
+                                });
+                                //删除成功,刷新列表
+                                that.list();
+                            }else {
+                                that.$notify({
+                                    title: "错误",
+                                    message: res.msg,
+                                    type: 'warning'
+                                });
+                            }
+                        });
+                }).catch(function(err) {
+                    //删除如果用户取消会抛出异常,所以需要catch一下
+                    console.log(err)
+                });
+            },
+            //新增
+            save:function(id){
+                if(id){
+                    ms.util.openSystemUrl("/tf/browse/form.do?id="+id);
+                }else {
+                    ms.util.openSystemUrl("/tf/browse/form.do");
+                }
+            },
+
+            //pageSize改变时会触发
+            sizeChange:function(pagesize) {
+                this.loading = true;
+                this.pageSize = pagesize;
+                this.list(true);
+            },
+            //currentPage改变时会触发
+            currentChange:function(currentPage) {
+                this.loading = true;
+                this.currentPage = currentPage;
+                this.list(true);
+            },
+            search:function(data){
+                this.form.sqlWhere = JSON.stringify(data);
+                this.list(true);
+            },
+            //重置表单
+            rest:function(){
+                this.currentPage = 1;
+                this.form = {
+                    sqlWhere:null
+                };
+                this.$refs.searchForm.resetFields();
+                this.list(true);
+            },
+           //日期日期格式化
+           browseDataFormat:function(row, column, cellValue, index){                
+                return ms.util.date.fmt(new Date(row.BROWSE_DATA),'YYYY-MM-DD');                
+            },
+
+        },
+        mounted:function(){
+            var that = this;
+
+            //如果存在历史参数,恢复页面结果
+            if(sessionStorage.getItem(this.historyKey) && ms.util.getParameter("isBack") == 'true') {
+                var _history = JSON.parse(sessionStorage.getItem(this.historyKey))
+                this.form = _history.form;
+                this.total = parseInt(_history.total);
+                this.currentPage = parseInt(_history.page.pageNo);
+                this.pageSize = parseInt(_history.page.pageSize);
+            }
+
+            this.list(true);
+        },
+		created:function(){
+			var that = this;
+        }
+    })
+</script>
+    <style scoped>
+        #index .ms-container {
+            height: calc(100vh - 141px);
+        }
+    </style>

+ 9 - 0
src/main/webapp/static/locale/lang/browse/en_US.js

@@ -0,0 +1,9 @@
+var en_US ={
+    form:{
+                gridZhylq:{
+            text:'栅格布局',
+            placeholder:'',
+            help:'',
+        },
+    }
+}

+ 10 - 0
src/main/webapp/static/locale/lang/browse/zh_CN.js

@@ -0,0 +1,10 @@
+
+var zh_CN ={
+    form:{
+                gridZhylq:{
+            text:'栅格布局',
+            placeholder:'',
+            help:'',
+        },
+    }
+}