15143018065 vor 4 Tagen
Ursprung
Commit
a47c32ea18

+ 100 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/controller/GljtTzggController.java

@@ -0,0 +1,100 @@
+package com.ruoyi.gljt.controller;
+
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.gljt.domain.GljtTzgg;
+import com.ruoyi.gljt.service.IGljtTzggService;
+import com.ruoyi.system.validate.group.AddGroup;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 高龄津贴_通知公告信息Controller
+ *
+ * @author sun
+ * @date 2025-02-18
+ */
+@RestController
+@RequestMapping("/tzgg")
+public class GljtTzggController extends BaseController
+{
+    @Autowired
+    private IGljtTzggService gljtTzggService;
+
+    /**
+     * 查询高龄津贴_通知公告信息列表
+     */
+//    @RequiresPermissions("gljt:tzgg:list")
+    @GetMapping("/list")
+    public TableDataInfo list(GljtTzgg gljtTzgg)
+    {
+        startPage();
+        List<GljtTzgg> list = gljtTzggService.selectGljtTzggList(gljtTzgg);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出高龄津贴_通知公告信息列表
+     */
+//    @RequiresPermissions("gljt:tzgg:export")
+    @Log(title = "高龄津贴_通知公告信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, GljtTzgg gljtTzgg)
+    {
+        List<GljtTzgg> list = gljtTzggService.selectGljtTzggList(gljtTzgg);
+        ExcelUtil<GljtTzgg> util = new ExcelUtil<GljtTzgg>(GljtTzgg.class);
+        util.exportExcel(response, list, "高龄津贴_通知公告信息数据");
+    }
+
+    /**
+     * 获取高龄津贴_通知公告信息详细信息
+     */
+//    @RequiresPermissions("gljt:tzgg:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(gljtTzggService.selectGljtTzggById(id));
+    }
+
+    /**
+     * 新增高龄津贴_通知公告信息
+     */
+//    @RequiresPermissions("gljt:tzgg:add")
+    @Log(title = "高龄津贴_通知公告信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated({AddGroup.class}) @RequestBody GljtTzgg gljtTzgg)
+    {
+        return toAjax(gljtTzggService.insertGljtTzgg(gljtTzgg),gljtTzgg.getId());
+    }
+
+    /**
+     * 修改高龄津贴_通知公告信息
+     */
+//    @RequiresPermissions("gljt:tzgg:edit")
+    @Log(title = "高龄津贴_通知公告信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult edit(@Validated @RequestBody GljtTzgg gljtTzgg)
+    {
+        return toAjax(gljtTzggService.updateGljtTzgg(gljtTzgg));
+    }
+
+    /**
+     * 删除高龄津贴_通知公告信息
+     */
+    @RequiresPermissions("gljt:tzgg:remove")
+    @Log(title = "高龄津贴_通知公告信息", businessType = BusinessType.DELETE)
+	@GetMapping("/remove/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(gljtTzggService.deleteGljtTzggByIds(ids));
+    }
+}

+ 142 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/domain/GljtTzgg.java

@@ -0,0 +1,142 @@
+package com.ruoyi.gljt.domain;
+
+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.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import com.ruoyi.system.validate.group.AddGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+/**
+ * 高龄津贴_通知公告信息对象 gljt_tzgg
+ *
+ * @author sun
+ * @date 2025-02-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@TableName("gljt_tzgg")
+@ApiModel("高龄津贴_通知公告信息")
+public class GljtTzgg extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @Excel(name = "主键")
+    @TableId(value = "id",type = IdType.ASSIGN_UUID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+
+    /** 所属区划 */
+    @Excel(name = "所属区划")
+    @ApiModelProperty(value = "所属区划", required = true)
+//    @NotBlank(message = "{所属区划}",groups = AddGroup.class)
+//    @Size(min = 1, max = 12, message = "{所属区划}")
+    private String xzqh;
+
+    /** 通知标题 */
+    @Excel(name = "通知标题")
+    @ApiModelProperty(value = "通知标题")
+    @Size(max = 50, message = "{通知标题}")
+    private String tzbt;
+
+    /** 标题图片 */
+    @Excel(name = "标题图片")
+    @ApiModelProperty(value = "标题图片")
+    @Size(max = 200, message = "{标题图片}")
+    private String bttp;
+
+    /** 通知类型 */
+    @Excel(name = "通知类型")
+    @ApiModelProperty(value = "通知类型")
+    @Size(max = 200, message = "{通知类型}")
+    private String tzlx;
+
+    /** 通知内容 */
+    @Excel(name = "通知内容")
+    @ApiModelProperty(value = "通知内容")
+    private String tznr;
+
+    /** 观看次数 */
+    @Excel(name = "观看次数")
+    @ApiModelProperty(value = "观看次数", required = true)
+    @NotBlank(message = "{观看次数}",groups = AddGroup.class)
+    @Size(min = 1, max = 20, message = "{观看次数}")
+    private String gkcs;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    @ApiModelProperty(value = "创建时间")
+    @Size(max = 20, message = "{创建时间}")
+    private String tzsj;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 20, message = "{扩展字段}")
+    private String kz1;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 20, message = "{扩展字段}")
+    private String kz2;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 20, message = "{扩展字段}")
+    private String kz3;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 20, message = "{扩展字段}")
+    private String kz4;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 20, message = "{扩展字段}")
+    private String kz5;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 500, message = "{扩展字段}")
+    private String kz6;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 500, message = "{扩展字段}")
+    private String kz7;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 500, message = "{扩展字段}")
+    private String kz8;
+
+    /** 扩展字段 */
+    @Excel(name = "扩展字段")
+    @ApiModelProperty(value = "扩展字段")
+    @Size(max = 500, message = "{扩展字段}")
+    private String kz9;
+
+    @TableField(exist = false)
+    private String xzqhName;
+
+    @TableField(exist = false)
+    private String xzqhCode;
+}

+ 15 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/mapper/GljtTzggMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.gljt.mapper;
+
+import java.util.List;
+import com.ruoyi.gljt.domain.GljtTzgg;
+import com.ruoyi.common.datascope.utils.BaseMapperPlus;
+
+/**
+ * 高龄津贴_通知公告信息Mapper接口
+ * 
+ * @author sun
+ * @date 2025-02-18
+ */
+public interface GljtTzggMapper extends BaseMapperPlus<GljtTzgg> {
+
+}

+ 54 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/service/IGljtTzggService.java

@@ -0,0 +1,54 @@
+package com.ruoyi.gljt.service;
+
+import java.util.List;
+import com.ruoyi.gljt.domain.GljtTzgg;
+
+/**
+ * 高龄津贴_通知公告信息Service接口
+ * 
+ * @author sun
+ * @date 2025-02-18
+ */
+public interface IGljtTzggService 
+{
+    /**
+     * 查询高龄津贴_通知公告信息
+     * 
+     * @param id 高龄津贴_通知公告信息主键
+     * @return 高龄津贴_通知公告信息
+     */
+    public GljtTzgg selectGljtTzggById(String id);
+
+    /**
+     * 查询高龄津贴_通知公告信息列表
+     * 
+     * @param gljtTzgg 高龄津贴_通知公告信息
+     * @return 高龄津贴_通知公告信息集合
+     */
+    public List<GljtTzgg> selectGljtTzggList(GljtTzgg gljtTzgg);
+
+    /**
+     * 新增高龄津贴_通知公告信息
+     * 
+     * @param gljtTzgg 高龄津贴_通知公告信息
+     * @return 结果
+     */
+    public int insertGljtTzgg(GljtTzgg gljtTzgg);
+
+    /**
+     * 修改高龄津贴_通知公告信息
+     * 
+     * @param gljtTzgg 高龄津贴_通知公告信息
+     * @return 结果
+     */
+    public int updateGljtTzgg(GljtTzgg gljtTzgg);
+
+    /**
+     * 批量删除高龄津贴_通知公告信息
+     * 
+     * @param ids 需要删除的高龄津贴_通知公告信息主键集合
+     * @return 结果
+     */
+    public int deleteGljtTzggByIds(String[] ids);
+
+}

+ 106 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/service/impl/GljtTzggServiceImpl.java

@@ -0,0 +1,106 @@
+package com.ruoyi.gljt.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.gljt.domain.GljtTzgg;
+import com.ruoyi.gljt.mapper.GljtTzggMapper;
+import com.ruoyi.gljt.service.IGljtTzggService;
+import com.ruoyi.system.mapper.SysDeptJlMapper;
+import com.ruoyi.system.utils.SubCodeUtil;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 高龄津贴_通知公告信息Service业务层处理
+ *
+ * @author sun
+ * @date 2025-02-18
+ */
+@Service
+public class GljtTzggServiceImpl implements IGljtTzggService
+{
+    @Autowired
+    private GljtTzggMapper gljtTzggMapper;
+
+    @Autowired
+    private SysDeptJlMapper sysDeptJlMapper;
+
+    /**
+     * 查询高龄津贴_通知公告信息
+     *
+     * @param id 高龄津贴_通知公告信息主键
+     * @return 高龄津贴_通知公告信息
+     */
+    @Override
+    public GljtTzgg selectGljtTzggById(String id)
+    {
+        GljtTzgg res = gljtTzggMapper.selectById(id);
+        if (ObjectUtils.isNotEmpty(res)) {
+            res.setXzqhCode(sysDeptJlMapper.getXzqhCodes(res.getXzqh()));
+            res.setXzqhName(sysDeptJlMapper.getXzqhNames(res.getXzqh()));
+        }
+        return res;
+    }
+
+    /**
+     * 查询高龄津贴_通知公告信息列表
+     *
+     * @param gljtTzgg 高龄津贴_通知公告信息
+     * @return 高龄津贴_通知公告信息
+     */
+    @Override
+    public List<GljtTzgg> selectGljtTzggList(GljtTzgg gljtTzgg)
+    {
+        List<GljtTzgg> res = gljtTzggMapper.selectList(new LambdaQueryWrapper<>(gljtTzgg)
+                .likeRight(GljtTzgg::getXzqh, SubCodeUtil.code2Short(SecurityUtils.getAreaCode())));
+        res.forEach(r -> {
+            r.setXzqhCode(sysDeptJlMapper.getXzqhCodes(r.getXzqh()));
+            r.setXzqhName(sysDeptJlMapper.getXzqhNames(r.getXzqh()));
+        });
+        return res;
+    }
+
+    /**
+     * 新增高龄津贴_通知公告信息
+     *
+     * @param gljtTzgg 高龄津贴_通知公告信息
+     * @return 结果
+     */
+    @Override
+    public int insertGljtTzgg(GljtTzgg gljtTzgg)
+    {
+        gljtTzgg.setTzsj(DateUtils.dateTimeNow());
+        gljtTzgg.setXzqh(SecurityUtils.getAreaCode());
+        return gljtTzggMapper.insert(gljtTzgg);
+    }
+
+    /**
+     * 修改高龄津贴_通知公告信息
+     *
+     * @param gljtTzgg 高龄津贴_通知公告信息
+     * @return 结果
+     */
+    @Override
+    public int updateGljtTzgg(GljtTzgg gljtTzgg)
+    {
+        return gljtTzggMapper.updateById(gljtTzgg);
+    }
+
+    /**
+     * 批量删除高龄津贴_通知公告信息
+     *
+     * @param ids 需要删除的高龄津贴_通知公告信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteGljtTzggByIds(String[] ids)
+    {
+        return gljtTzggMapper.deleteBatchIds(Arrays.asList(ids));
+    }
+
+}

+ 43 - 0
ruoyi-modules/mz-gljt/src/main/resources/mapper/gljt/GljtTzggMapper.xml

@@ -0,0 +1,43 @@
+<?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="com.ruoyi.gljt.mapper.GljtTzggMapper">
+    
+    <resultMap type="GljtTzgg" id="GljtTzggResult">
+        <result property="id"    column="id"    />
+        <result property="xzqh"    column="xzqh"    />
+        <result property="tzbt"    column="tzbt"    />
+        <result property="bttp"    column="bttp"    />
+        <result property="tzlx"    column="tzlx"    />
+        <result property="tznr"    column="tznr"    />
+        <result property="gkcs"    column="gkcs"    />
+        <result property="tzsj"    column="tzsj"    />
+        <result property="kz1"    column="kz1"    />
+        <result property="kz2"    column="kz2"    />
+        <result property="kz3"    column="kz3"    />
+        <result property="kz4"    column="kz4"    />
+        <result property="kz5"    column="kz5"    />
+        <result property="kz6"    column="kz6"    />
+        <result property="kz7"    column="kz7"    />
+        <result property="kz8"    column="kz8"    />
+        <result property="kz9"    column="kz9"    />
+        <result property="createTimeStr"    column="create_time_str"    />
+        <result property="createUserId"    column="create_user_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createUserType"    column="create_user_type"    />
+        <result property="createUnit"    column="create_unit"    />
+        <result property="createTounit"    column="create_tounit"    />
+        <result property="createBmjsc"    column="create_bmjsc"    />
+        <result property="createQhjsc"    column="create_qhjsc"    />
+        <result property="createUnitName"    column="create_unit_name"    />
+        <result property="createAreaCode"    column="create_area_code"    />
+        <result property="updateTimeStr"    column="update_time_str"    />
+        <result property="updateUserId"    column="update_user_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateUnit"    column="update_unit"    />
+        <result property="updateUnitName"    column="update_unit_name"    />
+        <result property="state"    column="state"    />
+    </resultMap>
+
+</mapper>

+ 44 - 0
ruoyi-ui-gljt/src/api/gljt/tzgg.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询高龄津贴_通知公告信息列表
+export function listTzgg(query) {
+  return request({
+    url: '/gljt/tzgg/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询高龄津贴_通知公告信息详细
+export function getTzgg(id) {
+  return request({
+    url: '/gljt/tzgg/' + id,
+    method: 'get'
+  })
+}
+
+// 新增高龄津贴_通知公告信息
+export function addTzgg(data) {
+  return request({
+    url: '/gljt/tzgg',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改高龄津贴_通知公告信息
+export function updateTzgg(data) {
+  return request({
+    url: '/gljt/tzgg/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除高龄津贴_通知公告信息
+export function delTzgg(id) {
+  return request({
+    url: '/gljt/tzgg/remove/' + id,
+    method: 'get'
+  })
+}

+ 322 - 0
ruoyi-ui-gljt/src/views/gljt/tzgg/index.vue

@@ -0,0 +1,322 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="通知标题" prop="tzbt">
+        <el-input
+          v-model="queryParams.tzbt"
+          placeholder="请输入通知标题"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['gljt:tzgg:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['gljt:tzgg:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="tzggList" >
+      <el-table-column label="序号" align="center">
+        <template slot-scope="scope">
+          {{(queryParams.pageNum-1)*queryParams.pageSize + scope.$index + 1}}
+        </template>
+      </el-table-column>
+      <el-table-column label="所属区划" align="center" prop="xzqh" />
+      <el-table-column label="通知标题" align="center" prop="tzbt" />
+      <el-table-column label="标题图片" align="center" prop="bttp" />
+      <el-table-column label="通知类型" align="center" prop="tzlx" />
+      <el-table-column label="创建时间" align="center" prop="tzsj" width="180">
+        <template slot-scope="scope">
+            <span>{{ special(scope.row.tzsj,'time') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['gljt:tzgg:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row,scope.$index)"
+            v-hasPermi="['gljt:tzgg:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改高龄津贴_通知公告信息对话框 -->
+    <el-dialog v-dialog-drag :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+
+        <el-form-item label="通知标题" prop="tzbt">
+          <el-input v-model="form.tzbt" placeholder="请输入通知标题" />
+        </el-form-item>
+
+        <el-form-item label="标题图片" prop="bttp">
+          <el-input v-model="form.bttp" type="textarea" maxlength="200" show-word-limit placeholder="请输入标题图片" />
+        </el-form-item>
+
+        <el-form-item label="通知类型" prop="tzlx">
+          <el-input v-model="form.tzlx" type="textarea" maxlength="200" show-word-limit placeholder="请输入通知类型" />
+        </el-form-item>
+
+        <el-form-item label="通知内容" prop="tznr">
+          <el-input v-model="form.tznr" type="textarea" maxlength="200" show-word-limit placeholder="请输入通知内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm" :loading="submitFormLoading">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {addTzgg, delTzgg, getTzgg, listTzgg, updateTzgg} from "@/api/gljt/tzgg";
+  import {chineseOne, idCard, Regular} from '@/utils/regular'
+
+  export default {
+  name: "Tzgg",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      submitFormLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 高龄津贴_通知公告信息表格数据
+      tzggList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        xzqh: [
+          { required: true, message: "所属区划不能为空", trigger: "blur" },
+          { max: 12, message: '所属区划不能超过12个字符', trigger: 'blur'},
+        ],
+        tzbt: [
+          { max: 50, message: '通知标题不能超过50个字符', trigger: 'blur'},
+        ],
+        gkcs: [
+          { required: true, message: "观看次数不能为空", trigger: "blur" },
+          { max: 20, message: '观看次数不能超过20个字符', trigger: 'blur'},
+        ],
+        kz1: [
+          { max: 20, message: '扩展字段不能超过20个字符', trigger: 'blur'},
+        ],
+        kz2: [
+          { max: 20, message: '扩展字段不能超过20个字符', trigger: 'blur'},
+        ],
+        kz3: [
+          { max: 20, message: '扩展字段不能超过20个字符', trigger: 'blur'},
+        ],
+        kz4: [
+          { max: 20, message: '扩展字段不能超过20个字符', trigger: 'blur'},
+        ],
+        kz5: [
+          { max: 20, message: '扩展字段不能超过20个字符', trigger: 'blur'},
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询高龄津贴_通知公告信息列表 */
+    getList() {
+      this.loading = true;
+      listTzgg(this.queryParams).then(response => {
+        this.tzggList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.submitFormLoading =false;
+      this.form = {
+        id: null,
+        xzqh: null,
+        tzbt: null,
+        bttp: null,
+        tzlx: null,
+        tznr: null,
+        gkcs: null,
+        tzsj: null,
+        kz1: null,
+        kz2: null,
+        kz3: null,
+        kz4: null,
+        kz5: null,
+        kz6: null,
+        kz7: null,
+        kz8: null,
+        kz9: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加高龄津贴_通知公告信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getTzgg(id).then(response => {
+        this.form = response.data;
+        /****** sks 需要改动的地方 start ******/
+        // this.copyForm=this.deepCopy(response.data)
+        /****** sks 需要改动的地方 end ******/
+        this.open = true;
+        this.title = "修改高龄津贴_通知公告信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.submitFormLoading = true;
+          if (this.form.id != null) {
+            /****** sks 需要改动的地方 start ******/
+            // let formData=this.comparisonObject(this.form,this.copyForm);
+            // if(formData) {
+              updateTzgg(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                // this.tzggList=this.dataReplacement(this.tzggList,this.form.id,formData);
+                this.getList();
+              }).finally(()=>this.submitFormLoading =false);
+            // }else{
+            //   this.$modal.msgSuccess("修改成功");
+            //   this.open = false;
+            //   this.submitFormLoading = false;
+            // }
+            /****** sks 需要改动的地方 end ******/
+          } else {
+            addTzgg(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+              /****** sks 需要改动的地方 start ******/
+              // if (this.queryParams.pageSize===this.tzggList.length)
+              // {
+              //   this.tzggList.pop();
+              // }
+              // this.tzggList.unshift({...this.form,id:response.data});
+              // this.total++;
+              /****** sks 需要改动的地方 end ******/
+            }).finally(()=>this.submitFormLoading =false);
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row,index) {
+      const ids = row.id || this.ids;
+      const xh = (this.queryParams.pageNum-1)*this.queryParams.pageSize + index + 1;
+      this.$modal.confirm('确认删除' + this.changeDelData(row,'id','ID值',xh) + '的记录?').then(function() {
+        return delTzgg(ids);
+      }).then(() => {
+        this.getList();
+        /****** sks 需要改动的地方 ind参数需要传进来 start ******/
+        // this.tzggList.splice(index,1);
+        // if(this.tzggList.length===0)
+        // {
+        //   this.getList();
+        // }else {
+        //   this.total--;
+        // }
+        this.$modal.msgSuccess("删除成功");
+        /****** sks 需要改动的地方 end ******/
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('gljt/tzgg/export', {
+        ...this.queryParams
+      }, `tzgg_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>