Jelajahi Sumber

修改报表列表

Administrator 3 tahun lalu
induk
melakukan
b4e77a1d0b

File diff ditekan karena terlalu besar
+ 17566 - 1
ruoyi-ui/package-lock.json


+ 9 - 0
ruoyi-ui/src/api/system/tatementsetr.js

@@ -9,6 +9,15 @@ export function tistDept(query) {
   })
 }
 
+// 查询报表列表
+export function reportList(query) {
+  return request({
+    url: '/boman-report/statistic/report/list',
+    method: 'post',
+    params: query
+  })
+}
+
 // 查询部门列表(排除节点)
 export function listDeptExcludeChild(id) {
   return request({

+ 102 - 40
ruoyi-ui/src/views/system/tatementsetr/index.vue

@@ -1,17 +1,53 @@
 <template>
   <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >添加报表</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-      <el-form-item label="部门名称" prop="deptName">
+      <el-form-item label="报表标题" prop="reportName">
         <el-input
-          v-model="queryParams.deptName"
-          placeholder="请输入部门名称"
+          v-model="queryParams.reportName"
+          placeholder="请输入报表标题"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="开始时间:" prop="startTime">
+        <el-date-picker
+          v-model="queryParams.startTime"
+          type="date"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="截止时间:" prop="endTime">
+        <el-date-picker
+          v-model="queryParams.endTime"
+          type="date"
+          placeholder="选择日期">
+        </el-date-picker>
+      </el-form-item>
       <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small">
+        <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
           <el-option
             v-for="dict in statusOptions"
             :key="dict.dictValue"
@@ -26,35 +62,27 @@
       </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="['sys_dept:A']"
-        >新增</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
     <el-table
       v-loading="loading"
-      :data="deptList"
+      :data="reportList"
       row-key="id"
       default-expand-all
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
-      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
-      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
-      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="100"></el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime" width="200">
+      <el-table-column prop="id" label="序号" width="260"></el-table-column>
+      <el-table-column prop="reportName" label="标题" width="200"></el-table-column>
+      <el-table-column label="开始时间" align="center" prop="startTime" width="200">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.startTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="截止时间" align="center" prop="endTime" width="200">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
+          <span>{{ parseTime(scope.row.endTime) }}</span>
         </template>
       </el-table-column>
+      //走字典
+      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="100"></el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -63,14 +91,21 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['sys_dept:M']"
-          >修改</el-button>
+          >编辑</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            @click="handleAdd(scope.row)"
+            v-hasPermi="['sys_dept:A']"
+          >查看</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-plus"
             @click="handleAdd(scope.row)"
             v-hasPermi="['sys_dept:A']"
-          >新增</el-button>
+          >上传</el-button>
           <el-button
             v-if="scope.row.id != 0"
             size="mini"
@@ -82,6 +117,13 @@
         </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 :close-on-click-modal="false" :title="title" :visible.sync="open" width="900px" append-to-body >
@@ -224,7 +266,7 @@
 
 <script>
 import { listDept, getDept, delDept,  updateDept, listDeptExcludeChild } from "@/api/system/dept";
-import { tistDept,addDeptiu } from "@/api/system/tatementsetr";
+import { tistDept,addDeptiu,reportList } from "@/api/system/tatementsetr";
 import { listRoles,listIndex,   delRole, addRole,addbjectSave, updateRole, exportRole, dataScope, changeRoleStatus, buent,issdanelist,issdaneid,weiduhegw,addbjectSawen } from "@/api/system/isses";
 import { treeselect } from "@/api/system/dept";
   import Treeselect from "@riophae/vue-treeselect";
@@ -244,8 +286,10 @@ export default {
       // 显示搜索条件
       showSearch: true,
       // 表格树数据
-      deptList: [],
+      reportList: [],
       deptOptionstwofr:[],
+      // 总条数
+      total: 0,
       // 部门树选项
       deptOptions: [],
       // 角色
@@ -253,21 +297,23 @@ export default {
       deptOptionsthre:[],
       configtwo: [],
       // 弹出层标题
-      title: "",
+      title: "添加报表",
       process: process.env.VUE_APP_BASE_API,
       // 是否显示弹出层
       open: false,
       // 状态数据字典
       statusOptions: [],
-      // 部门名称
-      deptName: undefined,
       // 查询参数
       queryParams: {
-        deptName: undefined,
-        status: undefined
+        pageNum: 1,
+        pageSize: 10,
+        reportName: "",
+        startTime: "",
+        endTime: "",
+        status: ""
       },
       queryParamsjuegt:{
-       pageNo:1,
+       pageNum:1,
        pageSize:1000,
        reportType:'datainfo'
       },
@@ -277,7 +323,7 @@ export default {
            deptId: 0,
            deptName: "",
            userId: 0,
-            userName: ""
+           userName: ""
         }]
       },
       activeName:'first',
@@ -312,7 +358,8 @@ export default {
     };
   },
   created() {
-    this.getList();
+    //this.getList();
+    this.getReportList();
     this.getDicts("sys_normal_disable").then(response => {
       this.statusOptions = response.data;
     });
@@ -327,6 +374,16 @@ export default {
         this.loading = false;
       });
     },
+
+    /** 查询报表列表 */
+    getReportList() {
+      this.loading = true;
+      reportList().then(response => {
+        this.reportList = response.rows
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
     /** 转换部门数据结构 */
     /** 转换角色数据结构 */
     normalizer(node) {
@@ -367,14 +424,16 @@ export default {
            deptId: 0,
            deptName: "",
            userId: 0,
-            userName: ""
+           userName: ""
         }]
       };
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.getList();
+      this.getReportList();
+
+     // this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
@@ -431,7 +490,9 @@ export default {
           addDeptiu(this.form).then(response => {
             this.msgSuccess("新增成功");
             this.open = false;
-            this.getList();
+            this.getReportList();
+
+           // this.getList();
           });
         // if (valid) {
         //   if (this.form.id != undefined) {
@@ -459,7 +520,8 @@ export default {
         }).then(function() {
           return delDept(row.id);
         }).then(() => {
-          this.getList();
+        this.getReportList();
+        //this.getList();
           this.msgSuccess("删除成功");
         })
     },

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini