Ver Fonte

bug fix

Wang Zi Wen há 2 anos atrás
pai
commit
b30e7ee160

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -53,6 +53,16 @@ public class SysUserController extends BaseController
     @Autowired
     private ISysPostService postService;
 
+    /**
+     * 获取用户列表(不分页)
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/listNoPage")
+    public AjaxResult listNoPage(SysUser user)
+    {
+        return AjaxResult.success(userService.selectUserList(user));
+    }
+
     /**
      * 获取用户列表
      */

+ 1 - 1
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<!--AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')-->
 		<!--</if>-->
 		<if test="deptId != null and deptId != 0">
-			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) <![CDATA[ <> ]]> 0 )))
+			and u.dept_id = #{deptId}
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}

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

@@ -1,6 +1,15 @@
 import request from '@/utils/request'
 import { parseStrEmpty } from "@/utils/ruoyi";
 
+// 查询用户列表(不分页)
+export function listUserNoPage(query) {
+  return request({
+    url: '/system/user/listNoPage',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询用户列表
 export function listUser(query) {
   return request({

+ 3 - 3
ruoyi-ui/src/views/branch/jlkp/assess/index.vue

@@ -253,7 +253,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { listDept } from "@/api/system/dept";
-import { listUser} from "@/api/system/user";
+import { listUserNoPage } from "@/api/system/user";
 import {delFile, listFile} from "../../../../api/branch/file";
 
 export default {
@@ -406,8 +406,8 @@ export default {
     },
     /** 查询用户列表 */
     getUserList() {
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/xxyd/study/index.vue

@@ -302,7 +302,7 @@ import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import {listUser} from "@/api/system/user";
+import {listUserNoPage} from "@/api/system/user";
 import {delFile, listFile} from "../../../../api/branch/file";
 
 export default {
@@ -425,8 +425,8 @@ export default {
     },
     /** 查询用户列表 */
     getUserList() {
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for (let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {
@@ -466,8 +466,8 @@ export default {
     /** 查询支部党课学习列表 */
     getList() {
       this.loading = true;
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for (let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 3 - 3
ruoyi-ui/src/views/branch/zbfc/activitynotice/index.vue

@@ -267,7 +267,7 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { listUser} from "@/api/system/user";
+import { listUserNoPage } from "@/api/system/user";
 import { listDept } from "@/api/system/dept";
 
 export default {
@@ -408,8 +408,8 @@ export default {
     /** 查询支部活动预告列表 */
     getList() {
       this.loading = true;
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 117 - 0
ruoyi-ui/src/views/branch/zbfc/demeanor/index.vue

@@ -94,6 +94,17 @@
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="封面图片" align="center" prop="filesId" width="100">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="openFileDialog(scope.row)"
+          >查看图片
+          </el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" fixed="right" width="240" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -209,6 +220,55 @@
         </el-row>
       </el-form>
     </el-dialog>
+    <!-- 附件详情对话框 -->
+    <el-dialog title="附件详情" :visible.sync="file.open" width="60%" append-to-body>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-upload
+            ref="doc"
+            :headers="doc.headers"
+            :action="doc.url+'?tableName=branchDemeanor&tableId=' + doc.tableId"
+            :disabled="doc.isUploading"
+            :on-progress="handleFileDocProgress"
+            :on-success="handleFileDocSuccess"
+            :auto-upload="true"
+            :file-list="file.fileList"
+          >
+            <el-button type="primary"><i class="el-icon-upload"></i> 点击上传</el-button>
+          </el-upload>
+        </el-col>
+      </el-row>
+      <el-table :data="file.dataList">
+        <el-table-column label="附件名称" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-document"
+              @click="handleSee(scope.row.url)">
+              {{ scope.row.name }}
+            </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="上传人" align="center" prop="creater"/>
+        <el-table-column label="上传时间" align="center" prop="createdate">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteFile(scope.row.id)"
+            >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
@@ -219,6 +279,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor';
+import {delFile, listFile} from "../../../../api/branch/file";
 
 export default {
   name: "Demeanor",
@@ -226,6 +287,26 @@ export default {
   // components: { Editor },
   data() {
     return {
+      file: {
+        id: null,
+        open: false,
+        fileList: [],
+        dataList: [],
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        tableId: 0,
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/branch/file/uploadFile",
+      },
       checkView: false,
       check: false,
       // 遮罩层
@@ -302,6 +383,42 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      console.log(response.data, '-----', this.file.id);
+      this.$modal.msgSuccess("上传成功");
+      this.getFileList();
+    },
+    handleSee(url) {
+      window.open(process.env.VUE_APP_BASE_API + url);
+    },
+    openFileDialog(row) {
+      console.log(row)
+      this.file.open = true;
+      this.doc.tableId = row.demeanorId;
+      this.getFileList();
+    },
+    getFileList() {
+      listFile({tableId: this.doc.tableId, tableName: 'branchDemeanor'}).then(res => {
+        this.file.dataList = res.data
+      })
+    },
+    handleDeleteFile(id) {
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delFile(id);
+      }).then(() => {
+        this.getFileList();
+        this.msgSuccess("删除成功");
+      })
+    },
     /** 查看 **/
     handleSelect(row) {
       this.reset();

+ 117 - 0
ruoyi-ui/src/views/branch/zbfc/publicize/index.vue

@@ -94,6 +94,17 @@
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="封面图片" align="center" prop="filesId" width="100">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="openFileDialog(scope.row)"
+          >查看图片
+          </el-button>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" fixed="right" width="240" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -209,6 +220,55 @@
         </el-row>
       </el-form>
     </el-dialog>
+    <!-- 附件详情对话框 -->
+    <el-dialog title="附件详情" :visible.sync="file.open" width="60%" append-to-body>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-upload
+            ref="doc"
+            :headers="doc.headers"
+            :action="doc.url+'?tableName=branchPublicize&tableId=' + doc.tableId"
+            :disabled="doc.isUploading"
+            :on-progress="handleFileDocProgress"
+            :on-success="handleFileDocSuccess"
+            :auto-upload="true"
+            :file-list="file.fileList"
+          >
+            <el-button type="primary"><i class="el-icon-upload"></i> 点击上传</el-button>
+          </el-upload>
+        </el-col>
+      </el-row>
+      <el-table :data="file.dataList">
+        <el-table-column label="附件名称" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-document"
+              @click="handleSee(scope.row.url)">
+              {{ scope.row.name }}
+            </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="上传人" align="center" prop="creater"/>
+        <el-table-column label="上传时间" align="center" prop="createdate">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteFile(scope.row.id)"
+            >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
@@ -219,6 +279,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor';
+import {delFile, listFile} from "../../../../api/branch/file";
 
 export default {
   name: "Publicize",
@@ -226,6 +287,26 @@ export default {
   // components: { Editor },
   data() {
     return {
+      file: {
+        id: null,
+        open: false,
+        fileList: [],
+        dataList: [],
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        tableId: 0,
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/branch/file/uploadFile",
+      },
       checkView: false,
       check: false,
       // 遮罩层
@@ -302,6 +383,42 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      console.log(response.data, '-----', this.file.id);
+      this.$modal.msgSuccess("上传成功");
+      this.getFileList();
+    },
+    handleSee(url) {
+      window.open(process.env.VUE_APP_BASE_API + url);
+    },
+    openFileDialog(row) {
+      console.log(row)
+      this.file.open = true;
+      this.doc.tableId = row.publicizeId;
+      this.getFileList();
+    },
+    getFileList() {
+      listFile({tableId: this.doc.tableId, tableName: 'branchPublicize'}).then(res => {
+        this.file.dataList = res.data
+      })
+    },
+    handleDeleteFile(id) {
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delFile(id);
+      }).then(() => {
+        this.getFileList();
+        this.msgSuccess("删除成功");
+      })
+    },
     /** 处理置顶 */
     handlePin(row) {
       let publicize = row;

+ 3 - 3
ruoyi-ui/src/views/branch/zbjs/democratic/index.vue

@@ -255,7 +255,7 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { listUser} from "@/api/system/user";
+import { listUserNoPage } from "@/api/system/user";
 
 export default {
   name: "Democratic",
@@ -348,8 +348,8 @@ export default {
     /** 查询民主生活会列表 */
     getList() {
       this.loading = true;
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/zbjs/dymc/index.vue

@@ -330,7 +330,7 @@
   import { getToken } from "@/utils/auth";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-  import { listUser} from "@/api/system/user";
+  import { listUserNoPage} from "@/api/system/user";
   import { listDept } from "@/api/system/dept";
 
   export default {
@@ -436,6 +436,8 @@
       }
     },
     created() {
+      this.getUserList();
+      this.getDeptList();
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
         this.clientHeight = document.body.clientHeight -250
@@ -454,8 +456,6 @@
       this.getDicts("member_ethnic").then(response => {
         this.memberEthnicOptions = response.data;
       });
-      this.getUserList();
-      this.getDeptList();
     },
     methods: {
       /** 查询部门列表 */
@@ -472,8 +472,8 @@
       },
       /** 查询用户列表 */
       getUserList() {
-        listUser().then(response => {
-          let rows = response.rows;
+        listUserNoPage().then(response => {
+          let rows = response.data;
           let userList = [];
           for(let i = 0; i < rows.length; i++) {
             if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/zbjs/meeting/index.vue

@@ -241,7 +241,7 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { listUser} from "@/api/system/user";
+import { listUserNoPage } from "@/api/system/user";
 
 export default {
   name: "Meeting",
@@ -329,8 +329,8 @@ export default {
   methods: {
     /** 查询用户列表 */
     getUserList() {
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {
@@ -354,8 +354,8 @@ export default {
     /** 查询支部会议管理列表 */
     getList() {
       this.loading = true;
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/zbjs/plan/index.vue

@@ -293,7 +293,7 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { listUser} from "@/api/system/user";
+import { listUserNoPage } from "@/api/system/user";
 
 export default {
   name: "Planitem",
@@ -411,8 +411,8 @@ export default {
     },
     /** 查询用户列表 */
     getUserList() {
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {
@@ -465,8 +465,8 @@ export default {
     /** 查询支部年度工作计划条目列表 */
     getList() {
       this.loading = true;
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/zbjs/sqrjjfzmc/index.vue

@@ -455,7 +455,7 @@
   import { getToken } from "@/utils/auth";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-  import { listUser } from "@/api/system/user";
+  import { listUserNoPage } from "@/api/system/user";
   import { listDept } from "@/api/system/dept";
 
   export default {
@@ -561,6 +561,8 @@
       }
     },
     created() {
+      this.getUserList();
+      this.getDeptList();
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
         this.clientHeight = document.body.clientHeight -250
@@ -579,8 +581,6 @@
       this.getDicts("member_ethnic").then(response => {
         this.memberEthnicOptions = response.data;
       });
-      this.getUserList();
-      this.getDeptList();
     },
     methods: {
       /** 查询部门列表 */
@@ -597,8 +597,8 @@
       },
       /** 查询用户列表 */
       getUserList() {
-        listUser().then(response => {
-          let rows = response.rows;
+        listUserNoPage().then(response => {
+          let rows = response.data;
           let userList = [];
           for(let i = 0; i < rows.length; i++) {
             if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/zbjs/transfer/index.vue

@@ -225,7 +225,7 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { listUser } from "@/api/system/user";
+import { listUserNoPage } from "@/api/system/user";
 import { listDept } from "@/api/system/dept";
 
 export default {
@@ -338,14 +338,14 @@ export default {
         }
    },
   created() {
+    this.getUserList();
+    this.getDeptList();
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
           this.clientHeight = document.body.clientHeight -250
       })
     this.getList();
     this.getTreeselect();
-    this.getUserList();
-    this.getDeptList();
   },
   methods: {
     /** 查询部门列表 */
@@ -362,8 +362,8 @@ export default {
     },
     /** 查询用户列表 */
     getUserList() {
-      listUser().then(response => {
-        let rows = response.rows;
+      listUserNoPage().then(response => {
+        let rows = response.data;
         let userList = [];
         for(let i = 0; i < rows.length; i++) {
           if (rows[i].userName != "admin") {

+ 5 - 5
ruoyi-ui/src/views/branch/zbjs/wyhmc/index.vue

@@ -331,7 +331,7 @@
   import { getToken } from "@/utils/auth";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-  import { listUser} from "@/api/system/user";
+  import { listUserNoPage } from "@/api/system/user";
   import { listDept } from "@/api/system/dept";
 
   export default {
@@ -438,6 +438,8 @@
       }
     },
     created() {
+      this.getUserList();
+      this.getDeptList();
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
         this.clientHeight = document.body.clientHeight -250
@@ -456,8 +458,6 @@
       this.getDicts("member_ethnic").then(response => {
         this.memberEthnicOptions = response.data;
       });
-      this.getUserList()
-      this.getDeptList();
     },
     methods: {
       /** 查询部门列表 */
@@ -474,8 +474,8 @@
       },
       /** 查询用户列表 */
       getUserList() {
-        listUser().then(response => {
-          let rows = response.rows;
+        listUserNoPage().then(response => {
+          let rows = response.data;
           let userList = [];
           for(let i = 0; i < rows.length; i++) {
             if (rows[i].userName != "admin") {