Commit 5a19e780 authored by danfuman's avatar danfuman

Merge branch 'zuhuduan' of http://192.168.60.201/root/dsk-operate-sys into zuhuduan

parents d91fc459 cff32831
......@@ -39,7 +39,8 @@ public class SysMenuController extends BaseController {
@SaCheckPermission("system:menu:list")
@GetMapping("/list")
public R<List<SysMenu>> list(SysMenu menu) {
List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
List<SysMenu> menus = menuService.selectAllMenu(menu,getUserId());
//List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
return R.ok(menus);
}
......
......@@ -125,7 +125,7 @@ public class SysUserController extends BaseController {
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) {
List<Object> list = new ArrayList<>();
list.add(new SysUserImportVo("测试部门", "测试用户昵称", "18888888888", "测试角色"));
list.add(new SysUserImportVo("测试组织", "测试用户昵称", "18888888888", "测试角色"));
ExcelUtil.exportTemplate(list, "用户数据", "excel/userImportTemplate.xlsx", response);
}
......
......@@ -23,7 +23,7 @@ public class TenantTimerTask {
/**
* 每6小时扫描并禁用已过期租户账号
*/
@Scheduled(cron = "0 0 0/6 * * *")
@Scheduled(cron = "0 0 0/6 * * ?")
public void updateExpiredTenantStatus() {
log.info("执行定时禁用已过期租户账号(6h/次)");
TenantHelper.ignore(tenantService::handleExpiredTenant);
......
......@@ -77,5 +77,10 @@ public interface Constants {
*/
Long TOP_PARENT_ID = 0L;
String SUFFIX_XLSX = ".xlsx";
String CONTENT_TYPE_XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
}
......@@ -48,6 +48,8 @@ public class TableDataInfo<T> implements Serializable {
public TableDataInfo(List<T> list, long total) {
this.rows = list;
this.total = total;
this.code = HttpStatus.HTTP_OK;
this.msg = "查询成功";
}
public static <T> TableDataInfo<T> build(IPage<T> page) {
......
......@@ -28,6 +28,16 @@
<artifactId>dsk-sms</artifactId>
</dependency>
<dependency>
<groupId>com.dsk</groupId>
<artifactId>dsk-oss</artifactId>
</dependency>
<dependency>
<groupId>com.dsk</groupId>
<artifactId>dsk-system</artifactId>
</dependency>
<!-- 短信 用哪个导入哪个依赖 -->
<!-- <dependency>-->
<!-- <groupId>com.aliyun</groupId>-->
......
......@@ -310,6 +310,21 @@ public class ExcelUtils<T> {
exportExcel(response);
}
public ByteArrayOutputStream exportExcel( List<T> list, String sheetName, String title, boolean dateStatus) {
ByteArrayOutputStream ba= new ByteArrayOutputStream();
this.init(list, sheetName, title, Excel.Type.EXPORT, dateStatus);
try {
writeSheet();
wb.write(ba);
} catch (Exception e) {
log.error("导出Excel异常{}", e.getMessage());
} finally {
IOUtils.closeQuietly(wb);
}
return ba;
}
private static final String FILE_PATH = "D://";
/**
......
......@@ -2,16 +2,23 @@ package com.dsk.jsk.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.dsk.biz.utils.ExcelUtils;
import com.dsk.common.constant.Constants;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.core.service.OssService;
import com.dsk.jsk.domain.JskCombineBidPageDto;
import com.dsk.jsk.domain.JskCombineCertificateDto;
import com.dsk.jsk.domain.JskCombineSearchDto;
import com.dsk.jsk.domain.vo.JskCombineBidProjectExportVo;
import com.dsk.jsk.domain.vo.JskCombineWinBidProjectExportVo;
import com.dsk.jsk.service.JskCombineInfoService;
import com.dsk.oss.core.OssClient;
import com.dsk.oss.entity.UploadResult;
import com.dsk.oss.factory.OssFactory;
import com.dsk.system.domain.vo.SysOssVo;
import com.dsk.system.service.ISysOssService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -20,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Map;
......@@ -36,6 +45,8 @@ public class JskCombineInfoController extends BaseController {
@Autowired
private JskCombineInfoService baseService;
@Autowired
private ISysOssService ossService;
/**
* 集团成员列表
......@@ -89,7 +100,7 @@ public class JskCombineInfoController extends BaseController {
* 集团户搜索
*/
@PostMapping("/index")
public AjaxResult index(@RequestBody Map<String,Object> object) {
public AjaxResult index(@RequestBody Map<String, Object> object) {
return baseService.index(object);
}
......@@ -113,7 +124,7 @@ public class JskCombineInfoController extends BaseController {
* 查央企子公司 翻页
*/
@PostMapping("/centralEnterprse/child/page")
public AjaxResult centralEnterprseChildPage(@RequestBody Map<String,Object> object) {
public AjaxResult centralEnterprseChildPage(@RequestBody Map<String, Object> object) {
return baseService.centralEnterprseChildPage(object);
}
......@@ -121,7 +132,7 @@ public class JskCombineInfoController extends BaseController {
* 查地方国企
*/
@PostMapping("/centralEnterprse/local")
public AjaxResult centralEnterprseLocal(@RequestBody Map<String,Object> object) {
public AjaxResult centralEnterprseLocal(@RequestBody Map<String, Object> object) {
return baseService.centralEnterprseLocal(object);
}
......@@ -129,7 +140,7 @@ public class JskCombineInfoController extends BaseController {
* 查地方国企 翻页
*/
@PostMapping("/centralEnterprse/local/page")
public AjaxResult centralEnterprseLocalPage(@RequestBody Map<String,Object> object) {
public AjaxResult centralEnterprseLocalPage(@RequestBody Map<String, Object> object) {
return baseService.centralEnterprseLocalPage(object);
}
......@@ -145,7 +156,7 @@ public class JskCombineInfoController extends BaseController {
* 民营企业 翻页
*/
@PostMapping("/centralEnterprse/social/page")
public AjaxResult centralEnterprseSocialPage(@RequestBody Map<String,Object> object) {
public AjaxResult centralEnterprseSocialPage(@RequestBody Map<String, Object> object) {
return baseService.centralEnterprseSocialPage(object);
}
......@@ -175,10 +186,28 @@ public class JskCombineInfoController extends BaseController {
/**
* 集团招标分页列表
* 集团招标分页列表
*/
@PostMapping("/bidPage")
public TableDataInfo bidPage(@RequestBody JskCombineBidPageDto dto) throws Exception {
return baseService.bidPage(dto);
}
/**
* 导出上传oss测试
*/
@PostMapping("/export/upload")
public R<SysOssVo> exportuUpload(@RequestBody JskCombineSearchDto dto) {
List<JskCombineWinBidProjectExportVo> list = baseService.exportWinBid(dto);
String title = dto.getCombineName().concat("中标业绩清单");
ExcelUtils<JskCombineWinBidProjectExportVo> util = new ExcelUtils<>(JskCombineWinBidProjectExportVo.class);
ByteArrayOutputStream ba = util.exportExcel(list, "集团中标", title, true);
ByteArrayInputStream bio = new ByteArrayInputStream(ba.toByteArray());
OssClient client = OssFactory.instance();
UploadResult uploadResult = client.uploadSuffix(bio, Constants.SUFFIX_XLSX, Constants.CONTENT_TYPE_XLSX);
//总文件记录
SysOssVo sysOssVo = ossService.buildResultEntity(title.concat(Constants.SUFFIX_XLSX), Constants.SUFFIX_XLSX, client.getConfigKey(), uploadResult);
return R.ok(sysOssVo);
}
}
......@@ -45,6 +45,7 @@
"element-resize-detector": "^1.2.4",
"element-ui": "2.15.12",
"file-saver": "2.0.5",
"flatted": "^3.2.7",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"jquery": "^3.7.0",
......
......@@ -118,7 +118,8 @@
top: 0;
width: 51%;
height: 100%;
background: #7171C6;
/*background: #7171C6;*/
background: #46A5FF;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
......@@ -197,12 +198,12 @@
</head>
<body>
<div id="app">
<!-- <div id="loader-wrapper">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>-->
<div class="load_title">正在加载央企数字化经营管理系统</div>
</div>
</div>
</body>
</html>
<template>
<div id="tags-view-container" class="tags-view-container">
<div class="alltags" v-if="visitedViews.length > 0">
<div class="imgs" @click="closeall">
<img src="@/assets/images/all.png" v-if="!showall"/>
<img src="@/assets/images/all_on.png" v-if="showall"/>
<!--<i class="el-icon-arrow-down" v-if="!showall"></i> <i class="el-icon-arrow-up" v-if="showall"></i>-->
<div id="getviews">
<div class="alltags" v-if="visitedViews.length > 0">
<div class="imgs" @click="closeall">
<img src="@/assets/images/all.png" v-if="!showall"/>
<img src="@/assets/images/all_on.png" v-if="showall"/>
<!--<i class="el-icon-arrow-down" v-if="!showall"></i> <i class="el-icon-arrow-up" v-if="showall"></i>-->
</div>
<el-collapse-transition>
<div class="tagslist" v-if="showall">
<draggable v-model="visitedViews" :options="dragOptions" @end="end">
<router-link
v-for="(tag, index) in visitedViews"
ref="tag"
:key="tag.path"
:class="isActive(tag)?'active':''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span"
class="tags-view-item"
@contextmenu.prevent.native="openMenu(tag,$event)"
>
<div @click="changetags">
<i class="el-icon-check"></i>
<span :id="isActive(tag)?'tagTitle':''">{{ tag.title }}</span>
</div>
</router-link>
<div class="clasall" @click="closeAllTag(selectedTag)">关闭全部标签</div>
</draggable>
</div>
<div class="tagslist" v-if="showall">
</el-collapse-transition>
</div>
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
<draggable v-model="visitedViews" :options="dragOptions" @end="end">
<router-link
v-for="(tag, index) in visitedViews"
......@@ -16,41 +41,19 @@
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span"
class="tags-view-item"
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
@contextmenu.prevent.native="openMenu(tag,$event)"
>
<div @click="changetags">
<i class="el-icon-check"></i>
<span :id="isActive(tag)?'tagTitle':''">{{ tag.title }}</span>
</div>
<svg :class="isActive(tag)?'tags-icon tags-icon-active':'tags-icon'" aria-hidden="true">
<use :xlink:href="iconName(tag)" />
</svg>
<span :id="isActive(tag)?'tagTitle':''">{{ tag.title }}</span>
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
<i :class="index!=visitedViews.length-1 && index != isActiveIndex() && index != isActiveIndex()-1?'tags-item-line':'tags-item-line item-color'" />
</router-link>
<div class="clasall" @click="closeAllTag(selectedTag)">关闭全部标签</div>
</draggable>
</div>
</div>
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
<draggable v-model="visitedViews" :options="dragOptions" @end="end">
<router-link
v-for="(tag, index) in visitedViews"
ref="tag"
:key="tag.path"
:class="isActive(tag)?'active':''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span"
class="tags-view-item"
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
@contextmenu.prevent.native="openMenu(tag,$event)"
>
<svg :class="isActive(tag)?'tags-icon tags-icon-active':'tags-icon'" aria-hidden="true">
<use :xlink:href="iconName(tag)" />
</svg>
<span :id="isActive(tag)?'tagTitle':''">{{ tag.title }}</span>
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
<i :class="index!=visitedViews.length-1 && index != isActiveIndex() && index != isActiveIndex()-1?'tags-item-line':'tags-item-line item-color'" />
</router-link>
</draggable>
</scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
</scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> 刷新页面</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> 关闭当前</li>
<li @click="closeOthersTags"><i class="el-icon-circle-close"></i> 关闭其他</li>
......@@ -58,6 +61,7 @@
<li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> 关闭右侧</li>
<li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> 全部关闭</li>
</ul>
</div>
</div>
</template>
......@@ -118,6 +122,7 @@ export default {
$route() {
this.addTags()
this.moveToCurrentTag()
this.getviews()
},
visible(value) {
if (value) {
......@@ -130,8 +135,27 @@ export default {
mounted() {
this.initTags()
this.addTags()
// this.getviews()
},
methods: {
getviews(){
let viewlist = []
let views = this.$store.state.tagsView.visitedViews
views.forEach(view =>{
let li = {}
li.fullPath = view.fullPath
li.hash = view.hash
li.meta = view.meta
li.name = view.name
li.params = view.params
li.path = view.path
li.query = view.query
li.title = view.title
// li.matched = view.matched //此条数据放出会报错
viewlist.push(li)
})
localStorage.setItem("views",JSON.stringify(viewlist))
},
changetags(){
this.showall = false
},
......
......@@ -21,6 +21,7 @@ import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
import variables from '@/assets/styles/variables.scss'
import elementResizeDetectorMaker from "element-resize-detector"
import { parse,stringify } from 'flatted';
export default {
name: 'Layout',
components: {
......@@ -62,7 +63,13 @@ export default {
mounted(){
this.$nextTick(() => {
this.listenSider()
})
})
// console.log(9999)
let views = localStorage.getItem('views')
if(views!=null){
this.$store.state.tagsView.visitedViews = JSON.parse(views)
localStorage.removeItem('views')
}
},
methods: {
handleClickOutside() {
......
import { parse,stringify } from 'flatted';
const state = {
visitedViews: [],
cachedViews: [],
......@@ -20,6 +22,28 @@ const mutations = {
title: view.meta.title || 'no-name'
})
)
// console.log(state.visitedViews)
// try {
// stringify(view)
// }catch(e)
// {
//
// }
// console.log(
// localStorage.removeItem('views')
// let views =view
// let viewlist = localStorage.getItem("views")==null?[]:JSON.parse(localStorage.getItem("views"))
// let li = {}
// li.fullPath = view.fullPath
// li.hash = view.hash
// li.meta = view.meta
// li.name = view.name
// li.params = view.params
// li.path = view.path
// li.query = view.query
// viewlist.push(li)
// viewlist.push(parse(stringify(view)))
// localStorage.setItem("views",stringify(viewlist))
},
ADD_CACHED_VIEW: (state, view) => {
if (state.cachedViews.includes(view.name)) return
......@@ -31,6 +55,8 @@ const mutations = {
for (const [i, v] of state.visitedViews.entries()) {
if (v.path === view.path) {
state.visitedViews.splice(i, 1)
let visitedViews = JSON.parse(JSON.stringify(state.visitedViews))
localStorage.setItem("views",JSON.stringify(visitedViews))
break
}
}
......
......@@ -38,7 +38,7 @@
<template v-if="activeIndex==0">
<span class="count">{{ total+otherTotal }}</span><el-popover style="margin-left:8px;position: relative;top: 2px;color:#515a6e;" trigger="hover" content="央企集团数据包含国资委及财政部公示的央企名录。" placement="right"><i slot="reference" class="el-icon-warning-outline"></i></el-popover>
<div >
<h3 style="margin-top:10px;"><b>央企 {{ total }}</b></h3>
<div style="margin-top:10px;" class="count1" >央企<span> {{ total }}</span></div>
<div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)" :key="index">
<img v-if="item.logoUrl" :src="item.logoUrl" alt="" >
<div v-else class="logo" :style="{background:colors[index%5]}">{{ item.combineMemberName.slice(0,4) }}</div>
......@@ -50,7 +50,7 @@
</div>
</div>
<div >
<h3 style="margin-top:10px;"><b>其他央企 {{ otherTotal }}</b></h3>
<div style="margin-top:10px;" class="count1" >其他央企<span> {{ otherTotal }}</span></div>
<div class="infinite-list-item" v-for="(item,index) in otherCompanData" @click="selCompany(item)" :key="index">
<img v-if="item.logoUrl" :src="item.logoUrl" alt="" >
<div v-else class="logo" :style="{background:colors[index%5]}">{{ item.combineMemberName.slice(0,4) }}</div>
......
......@@ -514,7 +514,6 @@
expandTrigger: "hover",
value: "id",
},
pageSize: 20,
dialogVisible2:false,
jskBidQueryDto: {
provinceIds: [],
......@@ -578,7 +577,7 @@
tableData:[],
total:0,
pageNum:1,
pageSize:20
pageSize:50
};
},
computed: {
......@@ -908,7 +907,7 @@
this.pageNum = 1;
}
if (!pageSize) {
this.pageSize = 20;
this.pageSize = 50;
}
if (!pageNum && !pageSize) {
this.reloadPage();
......@@ -967,13 +966,9 @@
}
this.isSkeleton = true;
api.uipSerach(params).then(res=>{
this.isSkeleton = false
// console.log(res)
if (res.code==200) {
this.tableData=res.rows;
this.total=res.total;
}
this.isSkeleton = false
this.tableData=res.rows;
this.total=res.total;
}).catch(error=>{
});
......
......@@ -187,7 +187,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="企业规模" prop="accountCount">
<el-input onkeyup="this.value=this.value.replace(/[^1-9]/g,'')" :disabled="disabled" v-model="form.accountCount" placeholder="请输入企业规模"/>
<el-input onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" :disabled="disabled" v-model="form.accountCount" placeholder="请输入企业规模"/>
</el-form-item>
</el-col>
</el-row>
......
......@@ -96,6 +96,13 @@
@click="handleLook(scope.row)"
v-hasPermi="['system:role:edit']"
>查看</el-button>
<!--<el-button-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-upload"-->
<!--@click="handleSave(scope.row.packageId)"-->
<!--v-hasPermi="['system:role:edit']"-->
<!--&gt;同步</el-button>-->
</template>
</el-table-column>
</el-table>
......
......@@ -145,6 +145,7 @@
a.setAttribute("download", "批量导入模版.xlsx");
document.body.appendChild(a);
a.click();
a.remove();
},
// 批量导入
importConfirmClick() {
......
......@@ -171,14 +171,14 @@
</li>
</ul>
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="limit"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -488,8 +488,13 @@ export default {
});
},
handleCurrentChange(page) {
this.page = page;
this.search(page, this.limit);
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
}
},
handleSizeChange(limit) {
this.limit = limit;
......
......@@ -286,14 +286,14 @@
</li>
</ul>
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="limit"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -611,8 +611,13 @@ export default {
});
},
handleCurrentChange(page) {
this.page = page;
this.search(page, this.limit);
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
}
},
handleSizeChange(limit) {
this.limit = limit;
......
......@@ -253,14 +253,14 @@
</li>
</ul>
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="limit"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -593,8 +593,14 @@
});
},
handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
},
fieldCommand(command) {
this.field = command;
......
......@@ -291,14 +291,14 @@
</div>
</li>
</ul>
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="pageSize"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -640,8 +640,14 @@
});
},
handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
},
handleSizeChange(limit) {
this.limit = limit;
......
......@@ -222,14 +222,14 @@
</div>
</li>
</ul>
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="limit"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -494,8 +494,13 @@ export default {
});
},
handleCurrentChange(page) {
this.page = page;
this.search(page, this.limit);
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
}
},
handleSizeChange(limit) {
this.limit = limit;
......
......@@ -270,14 +270,14 @@
</div>
</li>
</ul>
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="limit"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -839,8 +839,14 @@
});
},
handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
},
handleSizeChange(limit) {
this.limit = limit;
......
......@@ -468,14 +468,14 @@
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="pageSize"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
......@@ -1522,10 +1522,15 @@
this.selectedHeights = this.selectedHeights ? false : true
},
handleCurrentChange(e){
this.page = e;
this.jump1();
this.search(e, this.limit);
handleCurrentChange(page) {
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
},
handleSizeChange(e){
this.limit = e;
......
......@@ -165,14 +165,14 @@
</li>
</ul>
<template v-if="pageFlag">
<div class="pagination clearfix" v-show="total>0">
<div class="pagination clearfix" v-if="total>0&&pageFlag">
<el-pagination
background
:page-size="pageSize"
:current-page="page"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total">
:total="total>limit*500?501*limit:total">
</el-pagination>
</div>
</template>
......@@ -446,8 +446,14 @@
});
},
handleCurrentChange(page) {
this.page = page;
this.search(page, this.limit);
if(page>500){
this.$message.warning(`对不起,最多只能访问500页`);
this.reloadPage()
}else{
this.page = page;
this.search(page, this.limit);
this.jump1();
}
},
search(page, limit,exportFlag) {
if (!page) {
......
......@@ -134,15 +134,29 @@
@click="handleDelete(scope.row)"
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">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"
v-hasPermi="['system:role:edit']">数据权限</el-dropdown-item>
<el-dropdown-item command="handleAuthUser" icon="el-icon-user"
v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handleDataScope(scope.row)"
v-hasPermi="['system:role:edit']"
>数据权限</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-user"
@click="handleAuthUser(scope.row)"
v-hasPermi="['system:role:edit']"
>分配用户</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">更多</el-button>-->
<!--<el-dropdown-menu slot="dropdown">-->
<!--<el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"-->
<!--v-hasPermi="['system:role:edit']">数据权限</el-dropdown-item>-->
<!--<el-dropdown-item command="handleAuthUser" icon="el-icon-user"-->
<!--v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item>-->
<!--</el-dropdown-menu>-->
<!--</el-dropdown>-->
</template>
</el-table-column>
</el-table>
......@@ -298,11 +312,11 @@ export default {
},
{
value: "3",
label: "本部门数据权限"
label: "本组织数据权限"
},
{
value: "4",
label: "本部门及以下数据权限"
label: "本组织及以下数据权限"
},
{
value: "5",
......@@ -311,7 +325,7 @@ export default {
],
// 菜单列表
menuOptions: [],
// 部门列表
// 组织列表
deptOptions: [],
// 查询参数
queryParams: {
......@@ -370,11 +384,11 @@ export default {
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
// 所有部门节点数据
// 所有组织节点数据
getDeptAllCheckedKeys() {
// 目前被选中的部门节点
// 目前被选中的组织节点
let checkedKeys = this.$refs.dept.getCheckedKeys();
// 半选中的部门节点
// 半选中的组织节点
let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
......@@ -382,11 +396,11 @@ export default {
/** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect(roleId) {
return roleMenuTreeselect(roleId).then(response => {
this.menuOptions = response.menus;
return response;
this.menuOptions = response.data.menus;
return response.data;
});
},
/** 根据角色ID查询部门树结构 */
/** 根据角色ID查询组织树结构 */
getDeptTree(roleId) {
return deptTreeSelect(roleId).then(response => {
this.deptOptions = response.depts;
......
<template>
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<!--组织数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
placeholder="请输入组织名称"
clearable
size="small"
prefix-icon="el-icon-search"
......@@ -152,7 +152,7 @@
<el-table-column label="用户编号" align="center" :key='mathkey+1' prop="userId" v-if="columns[0].visible" />
<!--<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />-->
<el-table-column label="用户昵称" align="center" :key='mathkey+2' prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" :key='mathkey+3' prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="组织" align="center" :key='mathkey+3' prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" :key='mathkey+4' prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="状态" align="center" :key='mathkey+5' v-if="columns[5].visible">
<template slot-scope="scope">
......@@ -172,7 +172,7 @@
<el-table-column :key='mathkey+7'
label="操作"
align="center"
width="160"
width="260"
class-name="small-padding fixed-width"
fixed="right"
>
......@@ -191,15 +191,22 @@
@click="handleDelete(scope.row)"
v-hasPermi="['system:user:remove']"
>删除</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleResetPwd" icon="el-icon-key"
v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>
<el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
size="mini"
type="text"
icon="el-icon-key"
@click="handleResetPwd(scope.row)"
v-hasPermi="['system:user:resetPwd']"
>重置密码</el-button>
<!--<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
<!--<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
<!--<el-dropdown-menu slot="dropdown">-->
<!--<el-dropdown-item command="handleResetPwd" icon="el-icon-key"-->
<!--v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>-->
<!--<el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"-->
<!--v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>-->
<!--</el-dropdown-menu>-->
<!--</el-dropdown>-->
</template>
</el-table-column>
</el-table>
......@@ -224,8 +231,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归属部门" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
<el-form-item label="归属组织" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属组织" />
</el-form-item>
</el-col>
</el-row>
......@@ -392,6 +399,7 @@
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { getToken ,getTenantid} from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import {Base64} from 'js-base64'
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
......@@ -420,11 +428,11 @@ export default {
userList: null,
// 弹出层标题
title: "",
// 部门树选项
// 组织树选项
deptOptions: undefined,
// 是否显示弹出层
open: false,
// 部门名称
// 组织名称
deptName: undefined,
// 默认密码
initPassword: undefined,
......@@ -469,7 +477,7 @@ export default {
{ key: 0, label: `用户编号`, visible: true },
{ key: 1, label: `用户名称`, visible: true },
{ key: 2, label: `用户昵称`, visible: true },
{ key: 3, label: `部门`, visible: true },
{ key: 3, label: `组织`, visible: true },
{ key: 4, label: `手机号码`, visible: true },
{ key: 5, label: `状态`, visible: true },
{ key: 6, label: `创建时间`, visible: true }
......@@ -480,7 +488,7 @@ export default {
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "部门不能为空", trigger: "blur" }
{ required: true, message: "组织不能为空", trigger: "blur" }
],
roleIds: [
{ required: true, message: "角色不能为空", trigger: "blur" }
......@@ -500,7 +508,7 @@ export default {
};
},
watch: {
// 根据名称筛选部门
// 根据名称筛选组织
deptName(val) {
this.$refs.tree.filter(val);
},
......@@ -529,7 +537,7 @@ export default {
}
);
},
/** 查询部门下拉树结构 */
/** 查询组织下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
......@@ -646,8 +654,9 @@ export default {
inputPattern: /^.{5,20}$/,
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
}).then(({ value }) => {
resetUserPwd(row.userId, value).then(response => {
this.$modal.msgSuccess("修改成功,新密码是:" + value);
resetUserPwd(row.userId, Base64.encode(value)).then(response => {
// this.$modal.msgSuccess("修改成功,新密码是:" + value);
this.$modal.msgSuccess("修改成功!");
});
}).catch(() => {});
},
......
......@@ -24,7 +24,7 @@
<div class="pull-right">{{ user.email }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree" />所属部门
<svg-icon icon-class="tree" />所属组织
<div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>
</li>
<li class="list-group-item">
......
......@@ -21,9 +21,9 @@ public class SysUserImportVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 所属部门
* 所属组织
*/
@ExcelProperty(value = "*所属部门")
@ExcelProperty(value = "*所属组织")
private String deptName;
/**
......
......@@ -13,6 +13,13 @@ import java.util.Set;
* @author Lion Li
*/
public interface ISysMenuService {
/**
* 根据用户查询全部系统菜单列表
*
* @param userId 用户ID
* @return 菜单列表
*/
List<SysMenu> selectAllMenu(SysMenu menu, Long userId);
/**
* 根据用户查询系统菜单列表
......
package com.dsk.system.service;
import com.dsk.oss.entity.UploadResult;
import com.dsk.system.domain.bo.SysOssBo;
import com.dsk.system.domain.vo.SysOssVo;
import com.dsk.common.core.domain.PageQuery;
......@@ -29,6 +30,8 @@ public interface ISysOssService {
SysOssVo upload(File file);
SysOssVo buildResultEntity(String originalfileName, String suffix, String configKey, UploadResult uploadResult);
void download(Long ossId, HttpServletResponse response) throws IOException;
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
......
......@@ -151,7 +151,7 @@ public class ISysTenantPackageServiceImpl implements ISysTenantPackageService {
private void checkPackageIsUsed(List<Long> ids) {
boolean exists = tenantMapper.exists(new LambdaQueryWrapper<SysTenant>().in(SysTenant::getPackageId, ids));
if (exists) {
throw new ServiceException("租户套餐已被使用");
throw new ServiceException("企业方案已被使用");
}
}
......
......@@ -59,7 +59,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
.eq(ObjectUtil.isNotNull(dept.getDeptId()), SysDept::getDeptId, dept.getDeptId())
.eq(ObjectUtil.isNotNull(dept.getParentId()), SysDept::getParentId, dept.getParentId())
.like(StringUtils.isNotBlank(dept.getDeptName()), SysDept::getDeptName, dept.getDeptName())
.eq(StringUtils.isNotBlank(dept.getStatus()), SysDept::getStatus, dept.getStatus())
.eq(SysDept::getStatus, 0)
.orderByAsc(SysDept::getParentId)
.orderByAsc(SysDept::getOrderNum);
return baseMapper.selectDeptList(lqw);
......
......@@ -40,6 +40,25 @@ public class SysMenuServiceImpl implements ISysMenuService {
private final SysTenantMapper tenantMapper;
private final SysTenantPackageMapper tenantPackageMapper;
/**
* 根据用户查询全部系统菜单列表
*
* @param userId 用户ID
* @return 菜单列表
*/
@Override
public List<SysMenu> selectAllMenu(SysMenu menu, Long userId) {
List<SysMenu> menuList = null;
// 管理员显示所有菜单信息
if (LoginHelper.isSuperAdmin(userId)) {
menuList = baseMapper.selectList(new LambdaQueryWrapper<SysMenu>()
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
.orderByAsc(SysMenu::getParentId)
.orderByAsc(SysMenu::getOrderNum));
}
return menuList;
}
/**
* 根据用户查询系统菜单列表
*
......@@ -64,16 +83,16 @@ public class SysMenuServiceImpl implements ISysMenuService {
if (LoginHelper.isSuperAdmin(userId)) {
menuList = baseMapper.selectList(new LambdaQueryWrapper<SysMenu>()
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
.eq(SysMenu::getVisible, 0)
.eq(SysMenu::getStatus, 0)
.orderByAsc(SysMenu::getParentId)
.orderByAsc(SysMenu::getOrderNum));
} else {
QueryWrapper<SysMenu> wrapper = Wrappers.query();
wrapper.eq("sur.user_id", userId)
.like(StringUtils.isNotBlank(menu.getMenuName()), "m.menu_name", menu.getMenuName())
.eq(StringUtils.isNotBlank(menu.getVisible()), "m.visible", menu.getVisible())
.eq(StringUtils.isNotBlank(menu.getStatus()), "m.status", menu.getStatus())
.eq("m.visible", 0)
.eq("m.status", 0)
.orderByAsc("m.parent_id")
.orderByAsc("m.order_num");
menuList = baseMapper.selectMenuListByUserId(wrapper);
......@@ -153,7 +172,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
if (LoginHelper.isSuperAdmin(userId)) {
//Sass超管
menus = baseMapper.selectMenuTreeAll();
}else {
} else {
//租户下的员工
menus = baseMapper.selectMenuTreeByUserId(userId);
}
......
......@@ -147,7 +147,8 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
return buildResultEntity(originalfileName, suffix, storage.getConfigKey(), uploadResult);
}
private SysOssVo buildResultEntity(String originalfileName, String suffix, String configKey, UploadResult uploadResult) {
@Override
public SysOssVo buildResultEntity(String originalfileName, String suffix, String configKey, UploadResult uploadResult) {
SysOss oss = new SysOss();
oss.setUrl(uploadResult.getUrl());
oss.setFileSuffix(suffix);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment