linwenling
2023-04-06 489836df6b7f28581e648a2d1c613600521e6fb5
ruoyi-ui/src/views/bignote/index.vue
@@ -1,13 +1,20 @@
<template>
    <div class="app-container">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
    <div class="app-container" style="opacity: 1;">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" >
          <el-form-item label="大事标题" prop="title">
            <el-input
              v-model="queryParams.title"
              placeholder="请输入标题"
              clearable
              style="width: 240px"
              style="
              width: 197px;
              height: 30px;
              background: #FFFFFF;
              border-radius: 14px 14px 14px 14px;
              opacity: 0.5;
              border: 1px solid rgba(0,0,0,0.25);"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
@@ -17,7 +24,12 @@
              v-model="queryParams.people"
              placeholder="请输入人物"
              clearable
              style="width: 240px"
              style="width: 197px;
              height: 30px;
background: #FFFFFF;
border-radius: 14px 14px 14px 14px;
opacity: 0.5;
border: 1px solid rgba(0,0,0,0.25);"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
@@ -26,7 +38,12 @@
              v-model="queryParams.address"
              placeholder="请输入地点"
              clearable
              style="width: 240px"
              style="width: width: 197px;
height: 30px;
background: #FFFFFF;
border-radius: 14px 14px 14px 14px;
opacity: 0.5;
border: 1px solid rgba(0,0,0,0.25);"
              @keyup.enter.native="handleQuery"
            />
     
@@ -34,7 +51,12 @@
        <el-form-item label="时间">
          <el-date-picker
            v-model="dateRange"
            style="width: 240px"
            style="width: width: 197px;
height: 30px;
background: #FFFFFF;
border-radius: 14px 14px 14px 14px;
opacity: 0.5;
border: 1px solid rgba(0,0,0,0.25);"
            value-format="yyyy-MM-dd HH-MM"
            type="daterange"
            range-separator="-"
@@ -47,7 +69,15 @@
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
     <div style="width: 72px;
height: 24px;
font-size: 18px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
color: #000000;
line-height: 21px;
">家大事记</div>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
@@ -70,6 +100,7 @@
            @click="handleDelete"
            v-hasPermi="['system:role:remove']"
          >删除</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button
@@ -85,7 +116,7 @@
      </el-row>
      <!-- 序号、时间、人物、地点、大事标题、电子文件、备注 -->
      <!-- 这里有个familyList数组 是在data()中定义的 -->
      <el-table v-loading="loading" :data="familyList" @selection-change="handleSelectionChange">
      <el-table v-loading="loading"  :data="familyList" @selection-change="handleSelectionChange" >
        <el-table-column type="selection" width="55"  align="center" />
        <el-table-column label="序号" prop="id" sortable width="120" />
@@ -117,7 +148,7 @@
              v-hasPermi="['system:role:remove']"
            >删除</el-button>
            <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
              <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
            <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
  
            </el-dropdown>
          </template>
@@ -142,7 +173,7 @@
          </el-form-item>
          
          <el-form-item label="人物" prop="people">
            <el-input v-model="formDat.holder" placeholder="请输入人物" clearable :style="{width: '100%'}" >
            <el-input v-model="formDat.people" placeholder="请输入人物" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="地点" prop="address">
@@ -226,6 +257,8 @@
    </div>
  </template>
  
  <script>
  import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
  import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
@@ -323,11 +356,11 @@
            message: '请输入地点',
            trigger: 'blur'
          }],
          remark: [{
            required: true,
            message: '请输入备注',
            trigger: 'blur'
          }],
          // remark: [{
          //   required: true,
          //   message: '请输入备注',
          //   trigger: 'blur'
          // }],
          createTime: [{
            required: true,
            message: '请选择日期选择',
@@ -348,6 +381,20 @@
        this.open = false;
        this.reset();
      },
      //隔行变色
      methods: {
      tableRowClassName({row, rowIndex}) {
        if (rowIndex === 1)  //=>这里可以改成 rowIndex%2=== 1,后面直接else即可达到隔行变色效果。
        {
          return 'warning-row';
        } else if (rowIndex === 3) {
          return 'success-row';
        }
        return '';
      }
    },
      /** 查询角色列表 */  
      //列表显示家大事记
@@ -430,7 +477,7 @@
      /** 查看详细信息 */
      handleCheck(row){
        const id = row.id;
        this.$router.push("/family1/bignote1/familyeventInfo/" + id);
        this.$router.push("/family1/bignote/familyeventInfo/" + id);
      },
      /** 修改按钮操作 */
      handleUpdate(row) {
@@ -438,7 +485,7 @@
        let jd = true
  
        this.$router.push({
          path:"/family1/bignote1/familyeventInfo/" + id,
          path:"/family1/bignote/familyeventInfo/" + id,
          query:{
            detail:jd
          }
@@ -500,7 +547,7 @@
        this.$modal.confirm('是否确认删除序号为"' + Ids + '"的数据项?').then(function() {
          return delFamilyevent(Ids);
        }).then(() => {
          this.getList1();
          this.getList();
          this.$modal.msgSuccess("删除成功");
        }).catch(() => {});
      },
@@ -513,4 +560,4 @@
    }
  };
  </script>