Commit aceef140 authored by danfuman's avatar danfuman

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

parents 5ad10a4f 197d4a8d
......@@ -78,7 +78,7 @@ public class SysUserController extends BaseController {
SysUserExportVo vo = listVo.get(i);
if (ObjectUtil.isNotEmpty(dept)) {
vo.setDeptName(dept.getDeptName());
vo.setLeader(dept.getLeader());
//vo.setLeader(dept.getLeader());
}
}
ExcelUtil.exportExcel(listVo, "用户数据", SysUserExportVo.class, response);
......
......@@ -316,7 +316,7 @@
</delete>
<delete id="deleteBusinessInfoByIds" parameterType="Long">
delete i,b,co,f,l,r,u
delete i,b,f,l,r,u
from business_info i
left join business_backlog b on b.business_id = i.id
left join business_follow_record f on f.business_id = i.id
......
/*
*
* 1、url地址,如企业详情:https://pre-plug.jiansheku.com/enterprise?ak=aec7b3ff2y2q8x6t49a7e2c463ce21912&uid=a704fb35bca54707b9b5f8c9bba57815(ak:平台唯一标识;uid:用户标识)
* 1、url地址,如正式环境企业详情:https://plug.jiansheku.com/enterprise/56546856314e567a69?ak=bc8e534da5ea40639b2f084919280a82&initTime=1694507179060&uid=4a3b4bfdfbca4bff9d9bd7c8fd42f533(ak:接口获得的accesToken;initTime:获得accesToken时的时间戳;uid:用户标识)
*
* */
const steerScroll = function(iframeId, navigation, state, parentId) { // state:监听or移除监听;navigation:页面排除iframe后剩下高度;iframeId: iframe的id
const steerScroll = function(iframeId, navigation, footHeight, state, parentId, _this) { // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
let dom = window
if (parentId) { // 默认页面可以滚动
dom = document.getElementById(parentId)
......@@ -22,7 +22,12 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
// 动态设置iFrame高度
if (data.height) {
document.getElementById(iframeId).style.height = data.height + 'px'
scrolling(iframeId, navigation, parentId) // 初始加载获取滚动条距离顶部高度
scrolling(iframeId, navigation, footHeight, parentId) // 初始加载获取滚动条距离顶部高度
}
// 插件当前路由
if (_this && data.currentPath) {
_this.currentRoute = data
_this.searchFlag = data.currentName.includes('search-') ? true : false
}
// 点击企业详情页 栏目名动态设置滚动高度
if (data.scrollHeight) {
......@@ -48,23 +53,35 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
}
})
dom.addEventListener('scroll', (event) => {
scrolling(iframeId, navigation, parentId)
scrolling(iframeId, navigation, footHeight, parentId)
})
} else {
dom.removeEventListener('scroll', (event) => {
scrolling(iframeId, navigation, parentId)
scrolling(iframeId, navigation, footHeight, parentId)
})
}
}
const scrolling = function(iframeId, navigation, parentId) {
const scrolling = function(iframeId, navigation, footHeight, parentId) {
// 滚动条距文档顶部的距离
let scrollTop = parentId ? document.getElementById(parentId).scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
// 将滚动距离传入子组件
const ifa = document.getElementById(iframeId)
scrollTop = scrollTop + navigation.totalHeight
const bodyHeight = document.body.clientHeight - navigation.totalHeight
ifa.contentWindow.postMessage({ 'scrollTop': scrollTop, 'navHeight': navigation.totalHeight, 'bodyHeight': bodyHeight }, '*')
let rippleHeight = 0 //插件筛选条件浮动层距离底部距离
let scrollGap = parentId ? document.getElementById(parentId).scrollTop : window.scrollTop || document.body.scrollTop || document.documentElement.scrollTop
let scrollHeight = parentId ? document.getElementById(parentId).offsetHeight : window.scrollHeight || document.body.scrollHeight || document.documentElement.scrollHeight
let domHeight = parentId ? document.getElementById(parentId).clientHeight : window.clientHeight || document.body.clientHeight || document.documentElement.clientHeight
if(parentId){ //网页内部嵌套时
rippleHeight = scrollHeight-scrollGap-domHeight
}else{ //
if(scrollHeight-scrollGap-domHeight <= footHeight){
rippleHeight = 0
}else{
rippleHeight = scrollHeight-scrollGap-domHeight - footHeight
}
}
ifa.contentWindow.postMessage({ 'scrollTop': scrollTop, 'navHeight': navigation.totalHeight, 'rippleHeight': rippleHeight }, '*')
}
export {
......
......@@ -5,8 +5,10 @@
</template>
<script>
import { steerScroll } from '@/assets/js/jskplug'
export default {
import { steerScroll } from '@/assets/js/jskplug'
import { dskAccessToken } from '@/api/common'
export default {
name: 'Company',
components: {
......@@ -18,29 +20,17 @@ export default {
iframeHight: window.innerHeight, // iframe高度-当前页控制
navigation: {isFixed: true, fixedHeight: 56, totalHeight: 68}, // iframe之外页面顶部对象,ifFixed:是否浮动;fixedHeight:浮动对象高度;totalHeight:顶部整体高度
src: '', //iframe嵌套页面地址
domain: 'https://pre-plug.jiansheku.com',
domain: 'https://plug.jiansheku.com', // 插件地址
// domain: 'http://192.168.60.19:3400',
// domain: 'http://192.168.60.30:3300',
ak: 'aec7b3ff2y2q8x6t49a7e2c463ce21912' // 需要携带的sdkId
ak: 'aec7b3ff2y2q8x6t49a7e2c463ce21912', // 需要携带的sdkId
uid: this.$store.state.user.userId, // 需要携带的uid
timelongs:7200,//刷新token时间
tokentimer:null,
}
},
created() {
if (this.$route.params.id) { // 获取companyId
this.loading = true
if(this.$route.name=='Company'){ //企业详情
if(this.$route.query.html){
if(this.$route.query.type){
this.src = `${this.domain}/enterprise/${this.$route.params.id}/${this.$route.query.html}?flag=true&type=${this.$route.query.type}&ak=${this.ak}`
}else{
this.src = `${this.domain}/enterprise/${this.$route.params.id}/${this.$route.query.html}?ak=${this.ak}`
}
}else{
this.src = `${this.domain}/enterprise/${this.$route.params.id}?ak=${this.ak}`
}
}
if(this.$route.name=='Personnel'){ //人员详情
this.src = `${this.domain}/personnel/${this.$route.params.id}.html?ak=${this.ak}`
}
}
this.gettokens()
},
mounted() {
this.iframeLoading() // 判断iframe页面是否加载完成-当前页控制
......@@ -49,8 +39,53 @@ export default {
beforeDestroy() {
clearInterval(this.iframeTimer) // -当前页控制
steerScroll('companyIframe', this.navigation) // 销毁滚动
clearInterval(this.tokentimer)
},
methods: {
gettokens(){
dskAccessToken().then(res=>{
if(res.code == 200){
this.timelongs = res.data.expire
this.ak = res.data.accessToken
if (this.$route.params.id) { // 获取companyId
this.loading = true
if(this.$route.name=='Company'){ //企业详情
if(this.$route.query.html){
if(this.$route.query.type){
this.src = `${this.domain}/enterprise/${this.$route.params.id}/${this.$route.query.html}?flag=true&type=${this.$route.query.type}&ak=${this.ak}&initTime=${new Date().getTime()}&uid=${this.ak}`
}else{
this.src = `${this.domain}/enterprise/${this.$route.params.id}/${this.$route.query.html}?ak=${this.ak}&initTime=${new Date().getTime()}&uid=${this.ak}`
}
}else{
this.src = `${this.domain}/enterprise/${this.$route.params.id}?ak=${this.ak}&initTime=${new Date().getTime()}&uid=${this.ak}`
}
}
if(this.$route.name=='Personnel'){ //人员详情
this.src = `${this.domain}/personnel/${this.$route.params.id}.html?ak=${this.ak}&initTime=${new Date().getTime()}&uid=${this.ak}`
}
}
this.refreshtoken()
}else{
clearTimeout(this.tokentimer)
}
})
},
refreshtoken(){
this.tokentimer = setTimeout(()=>{
dskAccessToken().then(res => {
if (res.code == 200) {
this.timelongs = res.data.expire
this.ak = res.data.accessToken
let ifam = document.getElementById('companyIframe') //iframe的id
let akObj = res.data.expire //accessToken接口的返回值
let initTime = new Date().getTime() //accessToken接口返回后的当前时间戳
ifam.contentWindow.postMessage({ 'accessToken': akObj.accessToken, 'initTime': initTime }, '*')
}else{
clearTimeout(this.tokentimer)
}
})
}, this.timelongs*1000)
},
//判断iframe页面是否加载完成-当前页控制
iframeLoading() {
let iframeHeight = document.getElementById("companyIframe").clientHeight, number = 0
......
......@@ -5,10 +5,9 @@ import com.dsk.common.annotation.Sensitive;
import com.dsk.common.constant.UserConstants;
import com.dsk.common.enums.SensitiveStrategy;
import com.dsk.common.tenant.core.TenantEntity;
import com.dsk.common.xss.Xss;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.xss.Xss;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
......@@ -129,6 +128,11 @@ public class SysUser extends TenantEntity {
*/
private String remark;
/**
* 创建时间
*/
private Date createTime;
/**
* 部门对象
*/
......@@ -159,6 +163,7 @@ public class SysUser extends TenantEntity {
@TableField(exist = false)
private Long roleId;
public SysUser(Long userId) {
this.userId = userId;
}
......
package com.dsk.system.domain.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.dsk.common.annotation.ExcelDictFormat;
import com.dsk.common.convert.ExcelDictConvert;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -20,29 +19,29 @@ import java.util.Date;
public class SysUserExportVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
@ExcelProperty(value = "用户序号")
private Long userId;
/**
* 用户账号
*/
@ExcelProperty(value = "登录名称")
private String userName;
///**
// * 用户ID
// */
//@ExcelProperty(value = "用户序号")
//private Long userId;
//
///**
// * 用户账号
// */
//@ExcelProperty(value = "登录名称")
//private String userName;
/**
* 用户昵称
*/
@ExcelProperty(value = "用户称")
@ExcelProperty(value = "用户称")
private String nickName;
/**
* 用户邮箱
*/
@ExcelProperty(value = "用户邮箱")
private String email;
///**
// * 用户邮箱
// */
//@ExcelProperty(value = "用户邮箱")
//private String email;
/**
* 手机号码
......@@ -50,42 +49,50 @@ public class SysUserExportVo implements Serializable {
@ExcelProperty(value = "手机号码")
private String phonenumber;
/**
* 用户性别
*/
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_user_sex")
private String sex;
/**
* 帐号状态(0正常 1停用)
*/
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_normal_disable")
private String status;
/**
* 最后登录IP
*/
@ExcelProperty(value = "最后登录IP")
private String loginIp;
/**
* 最后登录时间
*/
@ExcelProperty(value = "最后登录时间")
private Date loginDate;
///**
// * 用户性别
// */
//@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
//@ExcelDictFormat(dictType = "sys_user_sex")
//private String sex;
//
///**
// * 帐号状态(0正常 1停用)
// */
//@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
//@ExcelDictFormat(dictType = "sys_normal_disable")
//private String status;
//
///**
// * 最后登录IP
// */
//@ExcelProperty(value = "最后登录IP")
//private String loginIp;
//
///**
// * 最后登录时间
// */
//@ExcelProperty(value = "最后登录时间")
//private Date loginDate;
/**
* 部门名称
*/
@ExcelProperty(value = "部门名称")
@ExcelProperty(value = "组织名称")
private String deptName;
///**
// * 负责人
// */
//@ExcelProperty(value = "部门负责人")
//private String leader;
/**
* 负责人
* 创建时间
*/
@ExcelProperty(value = "部门负责人")
private String leader;
@ExcelProperty(value = "创建时间")
@ColumnWidth(value = 25) // 列宽
private Date createTime;
}
......@@ -231,7 +231,9 @@ public class ISysTenantServiceImpl implements ISysTenantService {
dictDataMapper.insertBatch(dictDataList);
List<SysConfig> sysConfigList = configMapper.selectList(
new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getTenantId, defaultTenantId));
new LambdaQueryWrapper<SysConfig>()
.eq(SysConfig::getTenantId, defaultTenantId)
.eq(SysConfig::getConfigType, "Y"));
for (SysConfig config : sysConfigList) {
config.setConfigId(null);
config.setTenantId(tenantId);
......@@ -249,7 +251,7 @@ public class ISysTenantServiceImpl implements ISysTenantService {
//租户新增成功,发送短信通知租户
LinkedHashMap<String, String> map = new LinkedHashMap<>(1);
map.put("company", bo.getContactUserName());
map.put("pwd",password);
map.put("pwd", password);
SmsBlend smsBlend = SmsFactory.createSmsBlend(SupplierType.ALIBABA);
SmsResponse smsResponse = smsBlend.sendMessage(bo.getContactPhone(), "SMS_463175230", map);
if (!"OK".equals(smsResponse.getCode())) {
......
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