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 { ...@@ -78,7 +78,7 @@ public class SysUserController extends BaseController {
SysUserExportVo vo = listVo.get(i); SysUserExportVo vo = listVo.get(i);
if (ObjectUtil.isNotEmpty(dept)) { if (ObjectUtil.isNotEmpty(dept)) {
vo.setDeptName(dept.getDeptName()); vo.setDeptName(dept.getDeptName());
vo.setLeader(dept.getLeader()); //vo.setLeader(dept.getLeader());
} }
} }
ExcelUtil.exportExcel(listVo, "用户数据", SysUserExportVo.class, response); ExcelUtil.exportExcel(listVo, "用户数据", SysUserExportVo.class, response);
......
...@@ -316,7 +316,7 @@ ...@@ -316,7 +316,7 @@
</delete> </delete>
<delete id="deleteBusinessInfoByIds" parameterType="Long"> <delete id="deleteBusinessInfoByIds" parameterType="Long">
delete i,b,co,f,l,r,u delete i,b,f,l,r,u
from business_info i from business_info i
left join business_backlog b on b.business_id = i.id left join business_backlog b on b.business_id = i.id
left join business_follow_record f on f.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 let dom = window
if (parentId) { // 默认页面可以滚动 if (parentId) { // 默认页面可以滚动
dom = document.getElementById(parentId) dom = document.getElementById(parentId)
...@@ -22,7 +22,12 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state: ...@@ -22,7 +22,12 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
// 动态设置iFrame高度 // 动态设置iFrame高度
if (data.height) { if (data.height) {
document.getElementById(iframeId).style.height = data.height + 'px' 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) { if (data.scrollHeight) {
...@@ -48,23 +53,35 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state: ...@@ -48,23 +53,35 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
} }
}) })
dom.addEventListener('scroll', (event) => { dom.addEventListener('scroll', (event) => {
scrolling(iframeId, navigation, parentId) scrolling(iframeId, navigation, footHeight, parentId)
}) })
} else { } else {
dom.removeEventListener('scroll', (event) => { 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 let scrollTop = parentId ? document.getElementById(parentId).scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
// 将滚动距离传入子组件 // 将滚动距离传入子组件
const ifa = document.getElementById(iframeId) const ifa = document.getElementById(iframeId)
scrollTop = scrollTop + navigation.totalHeight scrollTop = scrollTop + navigation.totalHeight
const bodyHeight = document.body.clientHeight - navigation.totalHeight let rippleHeight = 0 //插件筛选条件浮动层距离底部距离
ifa.contentWindow.postMessage({ 'scrollTop': scrollTop, 'navHeight': navigation.totalHeight, 'bodyHeight': bodyHeight }, '*') 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 { export {
......
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
</template> </template>
<script> <script>
import { steerScroll } from '@/assets/js/jskplug' import { steerScroll } from '@/assets/js/jskplug'
export default { import { dskAccessToken } from '@/api/common'
export default {
name: 'Company', name: 'Company',
components: { components: {
...@@ -18,29 +20,17 @@ export default { ...@@ -18,29 +20,17 @@ export default {
iframeHight: window.innerHeight, // iframe高度-当前页控制 iframeHight: window.innerHeight, // iframe高度-当前页控制
navigation: {isFixed: true, fixedHeight: 56, totalHeight: 68}, // iframe之外页面顶部对象,ifFixed:是否浮动;fixedHeight:浮动对象高度;totalHeight:顶部整体高度 navigation: {isFixed: true, fixedHeight: 56, totalHeight: 68}, // iframe之外页面顶部对象,ifFixed:是否浮动;fixedHeight:浮动对象高度;totalHeight:顶部整体高度
src: '', //iframe嵌套页面地址 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', // 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() { created() {
if (this.$route.params.id) { // 获取companyId this.gettokens()
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}`
}
}
}, },
mounted() { mounted() {
this.iframeLoading() // 判断iframe页面是否加载完成-当前页控制 this.iframeLoading() // 判断iframe页面是否加载完成-当前页控制
...@@ -49,8 +39,53 @@ export default { ...@@ -49,8 +39,53 @@ export default {
beforeDestroy() { beforeDestroy() {
clearInterval(this.iframeTimer) // -当前页控制 clearInterval(this.iframeTimer) // -当前页控制
steerScroll('companyIframe', this.navigation) // 销毁滚动 steerScroll('companyIframe', this.navigation) // 销毁滚动
clearInterval(this.tokentimer)
}, },
methods: { 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页面是否加载完成-当前页控制 //判断iframe页面是否加载完成-当前页控制
iframeLoading() { iframeLoading() {
let iframeHeight = document.getElementById("companyIframe").clientHeight, number = 0 let iframeHeight = document.getElementById("companyIframe").clientHeight, number = 0
......
...@@ -5,10 +5,9 @@ import com.dsk.common.annotation.Sensitive; ...@@ -5,10 +5,9 @@ import com.dsk.common.annotation.Sensitive;
import com.dsk.common.constant.UserConstants; import com.dsk.common.constant.UserConstants;
import com.dsk.common.enums.SensitiveStrategy; import com.dsk.common.enums.SensitiveStrategy;
import com.dsk.common.tenant.core.TenantEntity; import com.dsk.common.tenant.core.TenantEntity;
import com.dsk.common.xss.Xss;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.dsk.common.core.domain.BaseEntity;
import com.dsk.common.xss.Xss;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -129,6 +128,11 @@ public class SysUser extends TenantEntity { ...@@ -129,6 +128,11 @@ public class SysUser extends TenantEntity {
*/ */
private String remark; private String remark;
/**
* 创建时间
*/
private Date createTime;
/** /**
* 部门对象 * 部门对象
*/ */
...@@ -159,6 +163,7 @@ public class SysUser extends TenantEntity { ...@@ -159,6 +163,7 @@ public class SysUser extends TenantEntity {
@TableField(exist = false) @TableField(exist = false)
private Long roleId; private Long roleId;
public SysUser(Long userId) { public SysUser(Long userId) {
this.userId = userId; this.userId = userId;
} }
......
package com.dsk.system.domain.vo; package com.dsk.system.domain.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.dsk.common.annotation.ExcelDictFormat; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.dsk.common.convert.ExcelDictConvert;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -20,29 +19,29 @@ import java.util.Date; ...@@ -20,29 +19,29 @@ import java.util.Date;
public class SysUserExportVo implements Serializable { public class SysUserExportVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** ///**
* 用户ID // * 用户ID
*/ // */
@ExcelProperty(value = "用户序号") //@ExcelProperty(value = "用户序号")
private Long userId; //private Long userId;
//
/** ///**
* 用户账号 // * 用户账号
*/ // */
@ExcelProperty(value = "登录名称") //@ExcelProperty(value = "登录名称")
private String userName; //private String userName;
/** /**
* 用户昵称 * 用户昵称
*/ */
@ExcelProperty(value = "用户称") @ExcelProperty(value = "用户称")
private String nickName; private String nickName;
/** ///**
* 用户邮箱 // * 用户邮箱
*/ // */
@ExcelProperty(value = "用户邮箱") //@ExcelProperty(value = "用户邮箱")
private String email; //private String email;
/** /**
* 手机号码 * 手机号码
...@@ -50,42 +49,50 @@ public class SysUserExportVo implements Serializable { ...@@ -50,42 +49,50 @@ public class SysUserExportVo implements Serializable {
@ExcelProperty(value = "手机号码") @ExcelProperty(value = "手机号码")
private String phonenumber; private String phonenumber;
/** ///**
* 用户性别 // * 用户性别
*/ // */
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class) //@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_user_sex") //@ExcelDictFormat(dictType = "sys_user_sex")
private String sex; //private String sex;
//
/** ///**
* 帐号状态(0正常 1停用) // * 帐号状态(0正常 1停用)
*/ // */
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class) //@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_normal_disable") //@ExcelDictFormat(dictType = "sys_normal_disable")
private String status; //private String status;
//
/** ///**
* 最后登录IP // * 最后登录IP
*/ // */
@ExcelProperty(value = "最后登录IP") //@ExcelProperty(value = "最后登录IP")
private String loginIp; //private String loginIp;
//
/** ///**
* 最后登录时间 // * 最后登录时间
*/ // */
@ExcelProperty(value = "最后登录时间") //@ExcelProperty(value = "最后登录时间")
private Date loginDate; //private Date loginDate;
/** /**
* 部门名称 * 部门名称
*/ */
@ExcelProperty(value = "部门名称") @ExcelProperty(value = "组织名称")
private String deptName; private String deptName;
///**
// * 负责人
// */
//@ExcelProperty(value = "部门负责人")
//private String leader;
/** /**
* 负责人 * 创建时间
*/ */
@ExcelProperty(value = "部门负责人") @ExcelProperty(value = "创建时间")
private String leader; @ColumnWidth(value = 25) // 列宽
private Date createTime;
} }
...@@ -231,7 +231,9 @@ public class ISysTenantServiceImpl implements ISysTenantService { ...@@ -231,7 +231,9 @@ public class ISysTenantServiceImpl implements ISysTenantService {
dictDataMapper.insertBatch(dictDataList); dictDataMapper.insertBatch(dictDataList);
List<SysConfig> sysConfigList = configMapper.selectList( 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) { for (SysConfig config : sysConfigList) {
config.setConfigId(null); config.setConfigId(null);
config.setTenantId(tenantId); config.setTenantId(tenantId);
...@@ -249,7 +251,7 @@ public class ISysTenantServiceImpl implements ISysTenantService { ...@@ -249,7 +251,7 @@ public class ISysTenantServiceImpl implements ISysTenantService {
//租户新增成功,发送短信通知租户 //租户新增成功,发送短信通知租户
LinkedHashMap<String, String> map = new LinkedHashMap<>(1); LinkedHashMap<String, String> map = new LinkedHashMap<>(1);
map.put("company", bo.getContactUserName()); map.put("company", bo.getContactUserName());
map.put("pwd",password); map.put("pwd", password);
SmsBlend smsBlend = SmsFactory.createSmsBlend(SupplierType.ALIBABA); SmsBlend smsBlend = SmsFactory.createSmsBlend(SupplierType.ALIBABA);
SmsResponse smsResponse = smsBlend.sendMessage(bo.getContactPhone(), "SMS_463175230", map); SmsResponse smsResponse = smsBlend.sendMessage(bo.getContactPhone(), "SMS_463175230", map);
if (!"OK".equals(smsResponse.getCode())) { 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