Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
6b24b82c
Commit
6b24b82c
authored
Sep 05, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zuhuduan' of
http://192.168.60.201/root/dsk-operate-sys
into zuhuduan
parents
c95537b5
1b4ab874
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
83 additions
and
100 deletions
+83
-100
CaptchaController.java
...java/com/dsk/web/controller/common/CaptchaController.java
+9
-6
SysUserController.java
...java/com/dsk/web/controller/system/SysUserController.java
+1
-1
application-prod.yml
dsk-admin/src/main/resources/application-prod.yml
+4
-4
application-test.yml
dsk-admin/src/main/resources/application-test.yml
+3
-3
application.yml
dsk-admin/src/main/resources/application.yml
+2
-2
userImportTemplate.xlsx
dsk-admin/src/main/resources/excel/userImportTemplate.xlsx
+0
-0
pom.xml
dsk-module/dsk-biz-api/pom.xml
+2
-2
MarketAnalysisController.java
...a/com/dsk/search/controller/MarketAnalysisController.java
+0
-31
index.vue
dsk-operate-ui/src/components/Editor/index.vue
+3
-3
index.vue
dsk-operate-ui/src/components/FileUpload/index.vue
+26
-14
index.vue
dsk-operate-ui/src/components/ImagePreview/index.vue
+2
-9
index.vue
dsk-operate-ui/src/components/ImageUpload/index.vue
+24
-19
SysUserImportVo.java
...c/main/java/com/dsk/system/domain/vo/SysUserImportVo.java
+5
-3
ISysTenantServiceImpl.java
...va/com/dsk/system/service/impl/ISysTenantServiceImpl.java
+1
-2
SysUserServiceImpl.java
.../java/com/dsk/system/service/impl/SysUserServiceImpl.java
+1
-1
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/common/CaptchaController.java
View file @
6b24b82c
...
@@ -13,6 +13,7 @@ import com.dsk.common.enums.CaptchaType;
...
@@ -13,6 +13,7 @@ import com.dsk.common.enums.CaptchaType;
import
com.dsk.common.exception.user.CaptchaException
;
import
com.dsk.common.exception.user.CaptchaException
;
import
com.dsk.common.exception.user.CaptchaExpireException
;
import
com.dsk.common.exception.user.CaptchaExpireException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.MessageUtils
;
import
com.dsk.common.utils.MessageUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.email.MailUtils
;
import
com.dsk.common.utils.email.MailUtils
;
...
@@ -81,12 +82,14 @@ public class CaptchaController {
...
@@ -81,12 +82,14 @@ public class CaptchaController {
// 验证码模板id 自行处理 (查数据库或写死均可)
// 验证码模板id 自行处理 (查数据库或写死均可)
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"code"
,
code
);
map
.
put
(
"code"
,
code
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
// SmsBlend smsBlend = SmsFactory.createSmsBlend(SupplierType.ALIBABA);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
phonenumber
,
templateId
,
map
);
// SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, templateId, map);
if
(!
"OK"
.
equals
(
smsResponse
.
getCode
()))
{
// if (!"OK".equals(smsResponse.getCode())) {
log
.
error
(
"验证码短信发送异常 => {}"
,
smsResponse
);
// log.error("验证码短信发送异常 => {}", smsResponse);
return
R
.
fail
(
smsResponse
.
getMessage
());
// return R.fail(smsResponse.getMessage());
}
// }
DingTalkUtil
.
sendDingTalkMsg
(
"短信通知:"
+
phonenumber
+
"登录验证码:"
+
code
+
",请尽快输入验证码完成验证,勿将验证码透露给他人,如非本人操作,请忽略本条短信。"
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
dsk-admin/src/main/java/com/dsk/web/controller/system/SysUserController.java
View file @
6b24b82c
...
@@ -111,7 +111,7 @@ public class SysUserController extends BaseController {
...
@@ -111,7 +111,7 @@ public class SysUserController extends BaseController {
public
R
<
List
<
SysUserImportVo
>>
importData
(
@RequestPart
(
"file"
)
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
public
R
<
List
<
SysUserImportVo
>>
importData
(
@RequestPart
(
"file"
)
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
ExcelResult
<
SysUserImportVo
>
result
=
ExcelUtil
.
importExcel
(
file
.
getInputStream
(),
SysUserImportVo
.
class
,
new
SysUserImportListener
(
updateSupport
));
ExcelResult
<
SysUserImportVo
>
result
=
ExcelUtil
.
importExcel
(
file
.
getInputStream
(),
SysUserImportVo
.
class
,
new
SysUserImportListener
(
updateSupport
));
List
<
SysUserImportVo
>
resultList
=
result
.
getList
();
List
<
SysUserImportVo
>
resultList
=
result
.
getList
();
if
(
ObjectUtil
.
isNotNull
(
resultList
))
{
if
(
!
resultList
.
isEmpty
(
))
{
String
key
=
GlobalConstants
.
BATCH_IMPORT_FAIL_USERS
+
LoginHelper
.
getUserId
();
String
key
=
GlobalConstants
.
BATCH_IMPORT_FAIL_USERS
+
LoginHelper
.
getUserId
();
RedisUtils
.
setCacheList
(
key
,
resultList
);
RedisUtils
.
setCacheList
(
key
,
resultList
);
return
R
.
fail
(
resultList
);
return
R
.
fail
(
resultList
);
...
...
dsk-admin/src/main/resources/application-prod.yml
View file @
6b24b82c
...
@@ -14,7 +14,7 @@ spring.boot.admin.client:
...
@@ -14,7 +14,7 @@ spring.boot.admin.client:
---
# xxl-job 配置
---
# xxl-job 配置
xxl.job
:
xxl.job
:
# 执行器开关
# 执行器开关
enabled
:
tru
e
enabled
:
fals
e
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
admin-addresses
:
http://localhost:9100/xxl-job-admin
admin-addresses
:
http://localhost:9100/xxl-job-admin
# 执行器通讯TOKEN:非空时启用
# 执行器通讯TOKEN:非空时启用
...
@@ -169,11 +169,11 @@ sms:
...
@@ -169,11 +169,11 @@ sms:
#请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
#请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
requestUrl
:
dysmsapi.aliyuncs.com
requestUrl
:
dysmsapi.aliyuncs.com
#阿里云的accessKey
#阿里云的accessKey
accessKeyId
:
xxxxxxx
accessKeyId
:
LTAIC4Pb2jJZbUmD
#阿里云的accessKeySecret
#阿里云的accessKeySecret
accessKeySecret
:
xxxxxxx
accessKeySecret
:
L7VANFwqaTludkczLsg9jhvidk0e28
#短信签名
#短信签名
signature
:
测试
signature
:
大司空信息科技
tencent
:
tencent
:
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
requestUrl
:
sms.tencentcloudapi.com
requestUrl
:
sms.tencentcloudapi.com
...
...
dsk-admin/src/main/resources/application-test.yml
View file @
6b24b82c
...
@@ -167,11 +167,11 @@ sms:
...
@@ -167,11 +167,11 @@ sms:
#请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
#请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
requestUrl
:
dysmsapi.aliyuncs.com
requestUrl
:
dysmsapi.aliyuncs.com
#阿里云的accessKey
#阿里云的accessKey
accessKeyId
:
xxxxxxx
accessKeyId
:
LTAIC4Pb2jJZbUmD
#阿里云的accessKeySecret
#阿里云的accessKeySecret
accessKeySecret
:
xxxxxxx
accessKeySecret
:
L7VANFwqaTludkczLsg9jhvidk0e28
#短信签名
#短信签名
signature
:
测试
signature
:
大司空信息科技
tencent
:
tencent
:
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
requestUrl
:
sms.tencentcloudapi.com
requestUrl
:
sms.tencentcloudapi.com
...
...
dsk-admin/src/main/resources/application.yml
View file @
6b24b82c
...
@@ -107,10 +107,10 @@ sa-token:
...
@@ -107,10 +107,10 @@ sa-token:
# token名称 (同时也是cookie名称)
# token名称 (同时也是cookie名称)
token-name
:
Authorization
token-name
:
Authorization
# token有效期 设为一天 (必定过期) 单位: 秒
# token有效期 设为一天 (必定过期) 单位: 秒
timeout
:
864
00
timeout
:
180
00
# 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
# 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
# token最低活跃时间 (指定时间无操作就过期) 单位: 秒
# token最低活跃时间 (指定时间无操作就过期) 单位: 秒
active-timeout
:
1800
active-timeout
:
1800
0
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent
:
true
is-concurrent
:
true
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
...
...
dsk-admin/src/main/resources/excel/userImportTemplate.xlsx
View file @
6b24b82c
No preview for this file type
dsk-module/dsk-biz-api/pom.xml
View file @
6b24b82c
...
@@ -46,11 +46,11 @@
...
@@ -46,11 +46,11 @@
<artifactId>
fastjson2
</artifactId>
<artifactId>
fastjson2
</artifactId>
<version>
2.0.25
</version>
<version>
2.0.25
</version>
</dependency>
</dependency>
<dependency>
<!--
<dependency>
<groupId>com.github.pagehelper</groupId>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<artifactId>pagehelper</artifactId>
<version>5.3.2</version>
<version>5.3.2</version>
</dependency>
</dependency>
-->
<!-- <dependency>-->
<!-- <dependency>-->
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/controller/MarketAnalysisController.java
View file @
6b24b82c
package
com
.
dsk
.
search
.
controller
;
package
com
.
dsk
.
search
.
controller
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.search.service.MarketAnalysisService
;
import
com.dsk.search.service.MarketAnalysisService
;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.List
;
/**
/**
...
@@ -162,18 +156,6 @@ public class MarketAnalysisController extends BaseController {
...
@@ -162,18 +156,6 @@ public class MarketAnalysisController extends BaseController {
return
marketAnalysisService
.
countGroupByProvince
(
object
);
return
marketAnalysisService
.
countGroupByProvince
(
object
);
}
}
@RequestMapping
(
"/getYear"
)
public
TableDataInfo
getYear
(){
List
<
Integer
>
list
=
new
ArrayList
<>();
Calendar
calendar
=
Calendar
.
getInstance
();
int
nowYear
=
calendar
.
get
(
Calendar
.
YEAR
);
list
.
add
(
nowYear
);
for
(
int
i
=
1
;
i
<
5
;
i
++)
{
list
.
add
(
nowYear
-
i
);
}
return
getDataTable
(
list
);
}
/*
/*
* 中标数量按月份分组
* 中标数量按月份分组
*/
*/
...
@@ -181,17 +163,4 @@ public class MarketAnalysisController extends BaseController {
...
@@ -181,17 +163,4 @@ public class MarketAnalysisController extends BaseController {
public
AjaxResult
countGroupByMonth
(
@RequestBody
JSONObject
object
)
{
public
AjaxResult
countGroupByMonth
(
@RequestBody
JSONObject
object
)
{
return
marketAnalysisService
.
countGroupByMonth
(
object
);
return
marketAnalysisService
.
countGroupByMonth
(
object
);
}
}
/**
* 响应请求分页数据
*/
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
protected
TableDataInfo
getDataTable
(
List
<?>
list
)
{
TableDataInfo
rspData
=
new
TableDataInfo
();
rspData
.
setCode
(
HttpStatus
.
SUCCESS
);
rspData
.
setMsg
(
"查询成功"
);
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
list
).
getTotal
());
return
rspData
;
}
}
}
dsk-operate-ui/src/components/Editor/index.vue
View file @
6b24b82c
...
@@ -60,7 +60,7 @@ export default {
...
@@ -60,7 +60,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/
common
/upload"
,
// 上传的图片服务器地址
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/
system/oss
/upload"
,
// 上传的图片服务器地址
headers
:
{
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
Authorization
:
"Bearer "
+
getToken
()
},
},
...
@@ -176,11 +176,11 @@ export default {
...
@@ -176,11 +176,11 @@ export default {
// 获取光标所在位置
// 获取光标所在位置
let
length
=
quill
.
getSelection
().
index
;
let
length
=
quill
.
getSelection
().
index
;
// 插入图片 res.url为服务器返回的图片地址
// 插入图片 res.url为服务器返回的图片地址
quill
.
insertEmbed
(
length
,
"image"
,
process
.
env
.
VUE_APP_BASE_API
+
res
.
fileName
);
quill
.
insertEmbed
(
length
,
"image"
,
res
.
data
.
url
);
// 调整光标到最后
// 调整光标到最后
quill
.
setSelection
(
length
+
1
);
quill
.
setSelection
(
length
+
1
);
}
else
{
}
else
{
this
.
$message
.
error
(
"图片插入失败"
);
this
.
$message
.
error
(
res
.
msg
);
}
}
},
},
handleUploadError
()
{
handleUploadError
()
{
...
...
dsk-operate-ui/src/components/FileUpload/index.vue
View file @
6b24b82c
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- 文件列表 -->
<!-- 文件列表 -->
<transition-group
class=
"upload-file-list el-upload-list el-upload-list--text"
name=
"el-fade-in-linear"
tag=
"ul"
>
<transition-group
class=
"upload-file-list el-upload-list el-upload-list--text"
name=
"el-fade-in-linear"
tag=
"ul"
>
<li
:key=
"file.url"
class=
"el-upload-list__item ele-upload-list__item-content"
v-for=
"(file, index) in fileList"
>
<li
:key=
"file.url"
class=
"el-upload-list__item ele-upload-list__item-content"
v-for=
"(file, index) in fileList"
>
<el-link
:href=
"`${
baseUrl}${
file.url}`"
:underline=
"false"
target=
"_blank"
>
<el-link
:href=
"`${file.url}`"
:underline=
"false"
target=
"_blank"
>
<span
class=
"el-icon-document"
>
{{ getFileName(file.name) }}
</span>
<span
class=
"el-icon-document"
>
{{ getFileName(file.name) }}
</span>
</el-link>
</el-link>
<div
class=
"ele-upload-list__item-content-action"
>
<div
class=
"ele-upload-list__item-content-action"
>
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
<
script
>
<
script
>
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
listByIds
,
delOss
}
from
"@/api/system/oss"
;
export
default
{
export
default
{
name
:
"FileUpload"
,
name
:
"FileUpload"
,
...
@@ -73,7 +74,7 @@ export default {
...
@@ -73,7 +74,7 @@ export default {
number
:
0
,
number
:
0
,
uploadList
:
[],
uploadList
:
[],
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
uploadFileUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/
common
/upload"
,
// 上传文件服务器地址
uploadFileUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/
system/oss
/upload"
,
// 上传文件服务器地址
headers
:
{
headers
:
{
Authorization
:
"Bearer "
+
getToken
(),
Authorization
:
"Bearer "
+
getToken
(),
},
},
...
@@ -82,16 +83,24 @@ export default {
...
@@ -82,16 +83,24 @@ export default {
},
},
watch
:
{
watch
:
{
value
:
{
value
:
{
handler
(
val
)
{
async
handler
(
val
)
{
if
(
val
)
{
if
(
val
)
{
let
temp
=
1
;
let
temp
=
1
;
// 首先将值转为数组
// 首先将值转为数组
const
list
=
Array
.
isArray
(
val
)
?
val
:
this
.
value
.
split
(
','
);
let
list
;
if
(
Array
.
isArray
(
val
))
{
list
=
val
;
}
else
{
await
listByIds
(
val
).
then
(
res
=>
{
list
=
res
.
data
.
map
(
oss
=>
{
oss
=
{
name
:
oss
.
originalName
,
url
:
oss
.
url
,
ossId
:
oss
.
ossId
};
return
oss
;
});
})
}
// 然后将数组转为对象数组
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
(
item
=>
{
this
.
fileList
=
list
.
map
(
item
=>
{
if
(
typeof
item
===
"string"
)
{
item
=
{
name
:
item
.
name
,
url
:
item
.
url
,
ossId
:
item
.
ossId
};
item
=
{
name
:
item
,
url
:
item
};
}
item
.
uid
=
item
.
uid
||
new
Date
().
getTime
()
+
temp
++
;
item
.
uid
=
item
.
uid
||
new
Date
().
getTime
()
+
temp
++
;
return
item
;
return
item
;
});
});
...
@@ -142,12 +151,12 @@ export default {
...
@@ -142,12 +151,12 @@ export default {
// 上传失败
// 上传失败
handleUploadError
(
err
)
{
handleUploadError
(
err
)
{
this
.
$modal
.
msgError
(
"上传文件失败,请重试"
);
this
.
$modal
.
msgError
(
"上传文件失败,请重试"
);
this
.
$modal
.
closeLoading
()
this
.
$modal
.
closeLoading
()
;
},
},
// 上传成功回调
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
handleUploadSuccess
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
fileName
});
this
.
uploadList
.
push
({
name
:
res
.
data
.
fileName
,
url
:
res
.
data
.
url
,
ossId
:
res
.
data
.
ossId
});
this
.
uploadedSuccessfully
();
this
.
uploadedSuccessfully
();
}
else
{
}
else
{
this
.
number
--
;
this
.
number
--
;
...
@@ -159,6 +168,8 @@ export default {
...
@@ -159,6 +168,8 @@ export default {
},
},
// 删除文件
// 删除文件
handleDelete
(
index
)
{
handleDelete
(
index
)
{
let
ossId
=
this
.
fileList
[
index
].
ossId
;
delOss
(
ossId
);
this
.
fileList
.
splice
(
index
,
1
);
this
.
fileList
.
splice
(
index
,
1
);
this
.
$emit
(
"input"
,
this
.
listToString
(
this
.
fileList
));
this
.
$emit
(
"input"
,
this
.
listToString
(
this
.
fileList
));
},
},
...
@@ -174,10 +185,11 @@ export default {
...
@@ -174,10 +185,11 @@ export default {
},
},
// 获取文件名称
// 获取文件名称
getFileName
(
name
)
{
getFileName
(
name
)
{
// 如果是url那么取最后的名字 如果不是直接返回
if
(
name
.
lastIndexOf
(
"/"
)
>
-
1
)
{
if
(
name
.
lastIndexOf
(
"/"
)
>
-
1
)
{
return
name
.
slice
(
name
.
lastIndexOf
(
"/"
)
+
1
);
return
name
.
slice
(
name
.
lastIndexOf
(
"/"
)
+
1
);
}
else
{
}
else
{
return
""
;
return
name
;
}
}
},
},
// 对象转成指定字符串分隔
// 对象转成指定字符串分隔
...
@@ -185,11 +197,11 @@ export default {
...
@@ -185,11 +197,11 @@ export default {
let
strs
=
""
;
let
strs
=
""
;
separator
=
separator
||
","
;
separator
=
separator
||
","
;
for
(
let
i
in
list
)
{
for
(
let
i
in
list
)
{
strs
+=
list
[
i
].
url
+
separator
;
strs
+=
list
[
i
].
ossId
+
separator
;
}
}
return
strs
!=
''
?
strs
.
substr
(
0
,
strs
.
length
-
1
)
:
''
;
return
strs
!=
""
?
strs
.
substr
(
0
,
strs
.
length
-
1
)
:
""
;
}
}
,
}
}
,
};
};
</
script
>
</
script
>
...
...
dsk-operate-ui/src/components/ImagePreview/index.vue
View file @
6b24b82c
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
isExternal
}
from
"@/utils/validate"
;
export
default
{
export
default
{
name
:
"ImagePreview"
,
name
:
"ImagePreview"
,
...
@@ -36,10 +35,7 @@ export default {
...
@@ -36,10 +35,7 @@ export default {
return
;
return
;
}
}
let
real_src
=
this
.
src
.
split
(
","
)[
0
];
let
real_src
=
this
.
src
.
split
(
","
)[
0
];
if
(
isExternal
(
real_src
))
{
return
real_src
;
return
real_src
;
}
return
process
.
env
.
VUE_APP_BASE_API
+
real_src
;
},
},
realSrcList
()
{
realSrcList
()
{
if
(
!
this
.
src
)
{
if
(
!
this
.
src
)
{
...
@@ -48,10 +44,7 @@ export default {
...
@@ -48,10 +44,7 @@ export default {
let
real_src_list
=
this
.
src
.
split
(
","
);
let
real_src_list
=
this
.
src
.
split
(
","
);
let
srcList
=
[];
let
srcList
=
[];
real_src_list
.
forEach
(
item
=>
{
real_src_list
.
forEach
(
item
=>
{
if
(
isExternal
(
item
))
{
return
srcList
.
push
(
item
);
return
srcList
.
push
(
item
);
}
return
srcList
.
push
(
process
.
env
.
VUE_APP_BASE_API
+
item
);
});
});
return
srcList
;
return
srcList
;
},
},
...
...
dsk-operate-ui/src/components/ImageUpload/index.vue
View file @
6b24b82c
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
>
>
<i
class=
"el-icon-plus"
></i>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-upload>
<!-- 上传提示 -->
<!-- 上传提示 -->
<div
class=
"el-upload__tip"
slot=
"tip"
v-if=
"showTip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
v-if=
"showTip"
>
请上传
请上传
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
<
script
>
<
script
>
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
listByIds
,
delOss
}
from
"@/api/system/oss"
;
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -77,7 +78,7 @@ export default {
...
@@ -77,7 +78,7 @@ export default {
dialogVisible
:
false
,
dialogVisible
:
false
,
hideUpload
:
false
,
hideUpload
:
false
,
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/
common
/upload"
,
// 上传的图片服务器地址
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/
system/oss
/upload"
,
// 上传的图片服务器地址
headers
:
{
headers
:
{
Authorization
:
"Bearer "
+
getToken
(),
Authorization
:
"Bearer "
+
getToken
(),
},
},
...
@@ -86,19 +87,21 @@ export default {
...
@@ -86,19 +87,21 @@ export default {
},
},
watch
:
{
watch
:
{
value
:
{
value
:
{
handler
(
val
)
{
async
handler
(
val
)
{
if
(
val
)
{
if
(
val
)
{
// 首先将值转为数组
// 首先将值转为数组
const
list
=
Array
.
isArray
(
val
)
?
val
:
this
.
value
.
split
(
','
);
let
list
;
if
(
Array
.
isArray
(
val
))
{
list
=
val
;
}
else
{
await
listByIds
(
val
).
then
(
res
=>
{
list
=
res
.
data
;
})
}
// 然后将数组转为对象数组
// 然后将数组转为对象数组
this
.
fileList
=
list
.
map
(
item
=>
{
this
.
fileList
=
list
.
map
(
item
=>
{
if
(
typeof
item
===
"string"
)
{
// 此处name使用ossId 防止删除出现重名
if
(
item
.
indexOf
(
this
.
baseUrl
)
===
-
1
)
{
item
=
{
name
:
item
.
ossId
,
url
:
item
.
url
,
ossId
:
item
.
ossId
};
item
=
{
name
:
this
.
baseUrl
+
item
,
url
:
this
.
baseUrl
+
item
};
}
else
{
item
=
{
name
:
item
,
url
:
item
};
}
}
return
item
;
return
item
;
});
});
}
else
{
}
else
{
...
@@ -125,7 +128,7 @@ export default {
...
@@ -125,7 +128,7 @@ export default {
if
(
file
.
name
.
lastIndexOf
(
"."
)
>
-
1
)
{
if
(
file
.
name
.
lastIndexOf
(
"."
)
>
-
1
)
{
fileExtension
=
file
.
name
.
slice
(
file
.
name
.
lastIndexOf
(
"."
)
+
1
);
fileExtension
=
file
.
name
.
slice
(
file
.
name
.
lastIndexOf
(
"."
)
+
1
);
}
}
isImg
=
this
.
fileType
.
some
(
type
=>
{
isImg
=
this
.
fileType
.
some
(
(
type
)
=>
{
if
(
file
.
type
.
indexOf
(
type
)
>
-
1
)
return
true
;
if
(
file
.
type
.
indexOf
(
type
)
>
-
1
)
return
true
;
if
(
fileExtension
&&
fileExtension
.
indexOf
(
type
)
>
-
1
)
return
true
;
if
(
fileExtension
&&
fileExtension
.
indexOf
(
type
)
>
-
1
)
return
true
;
return
false
;
return
false
;
...
@@ -155,7 +158,7 @@ export default {
...
@@ -155,7 +158,7 @@ export default {
// 上传成功回调
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
handleUploadSuccess
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
fileName
});
this
.
uploadList
.
push
({
name
:
res
.
data
.
fileName
,
url
:
res
.
data
.
url
,
ossId
:
res
.
data
.
ossId
});
this
.
uploadedSuccessfully
();
this
.
uploadedSuccessfully
();
}
else
{
}
else
{
this
.
number
--
;
this
.
number
--
;
...
@@ -169,12 +172,14 @@ export default {
...
@@ -169,12 +172,14 @@ export default {
handleDelete
(
file
)
{
handleDelete
(
file
)
{
const
findex
=
this
.
fileList
.
map
(
f
=>
f
.
name
).
indexOf
(
file
.
name
);
const
findex
=
this
.
fileList
.
map
(
f
=>
f
.
name
).
indexOf
(
file
.
name
);
if
(
findex
>
-
1
)
{
if
(
findex
>
-
1
)
{
let
ossId
=
this
.
fileList
[
findex
].
ossId
;
delOss
(
ossId
);
this
.
fileList
.
splice
(
findex
,
1
);
this
.
fileList
.
splice
(
findex
,
1
);
this
.
$emit
(
"input"
,
this
.
listToString
(
this
.
fileList
));
this
.
$emit
(
"input"
,
this
.
listToString
(
this
.
fileList
));
}
}
},
},
// 上传失败
// 上传失败
handleUploadError
()
{
handleUploadError
(
res
)
{
this
.
$modal
.
msgError
(
"上传图片失败,请重试"
);
this
.
$modal
.
msgError
(
"上传图片失败,请重试"
);
this
.
$modal
.
closeLoading
();
this
.
$modal
.
closeLoading
();
},
},
...
@@ -198,11 +203,11 @@ export default {
...
@@ -198,11 +203,11 @@ export default {
let
strs
=
""
;
let
strs
=
""
;
separator
=
separator
||
","
;
separator
=
separator
||
","
;
for
(
let
i
in
list
)
{
for
(
let
i
in
list
)
{
if
(
list
[
i
].
url
)
{
if
(
list
[
i
].
ossId
)
{
strs
+=
list
[
i
].
url
.
replace
(
this
.
baseUrl
,
""
)
+
separator
;
strs
+=
list
[
i
].
ossId
+
separator
;
}
}
}
}
return
strs
!=
''
?
strs
.
substr
(
0
,
strs
.
length
-
1
)
:
''
;
return
strs
!=
""
?
strs
.
substr
(
0
,
strs
.
length
-
1
)
:
""
;
}
}
}
}
};
};
...
@@ -219,8 +224,8 @@ export default {
...
@@ -219,8 +224,8 @@ export default {
}
}
::v-deep
.el-list-enter
,
.el-list-leave-active
{
::v-deep
.el-list-enter
,
.el-list-leave-active
{
opacity
:
0
;
opacity
:
0
;
transform
:
translateY
(
0
);
transform
:
translateY
(
0
);
}
}
</
style
>
</
style
>
dsk-system/src/main/java/com/dsk/system/domain/vo/SysUserImportVo.java
View file @
6b24b82c
...
@@ -23,30 +23,32 @@ public class SysUserImportVo implements Serializable {
...
@@ -23,30 +23,32 @@ public class SysUserImportVo implements Serializable {
/**
/**
* 所属部门
* 所属部门
*/
*/
@ExcelProperty
(
value
=
"*所属部门"
)
private
String
deptName
;
private
String
deptName
;
/**
/**
* 用户昵称
* 用户昵称
*/
*/
@ExcelProperty
(
value
=
"用户昵称"
)
@ExcelProperty
(
value
=
"
*
用户昵称"
)
private
String
nickName
;
private
String
nickName
;
/**
/**
* 手机号码
* 手机号码
*/
*/
@ExcelProperty
(
value
=
"手机号码"
)
@ExcelProperty
(
value
=
"
*
手机号码"
)
private
String
phonenumber
;
private
String
phonenumber
;
/**
/**
* 用户角色
* 用户角色
*/
*/
@ExcelProperty
(
value
=
"用户角色"
)
@ExcelProperty
(
value
=
"
*
用户角色"
)
private
String
roleName
;
private
String
roleName
;
/**
/**
* 失败原因
* 失败原因
* 该字段无需同步到模板中
* 该字段无需同步到模板中
*/
*/
@ExcelProperty
(
value
=
"失败原因"
)
private
String
failReason
;
private
String
failReason
;
public
SysUserImportVo
(
String
deptName
,
String
nickName
,
String
phonenumber
,
String
roleName
)
{
public
SysUserImportVo
(
String
deptName
,
String
nickName
,
String
phonenumber
,
String
roleName
)
{
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/ISysTenantServiceImpl.java
View file @
6b24b82c
...
@@ -229,12 +229,11 @@ public class ISysTenantServiceImpl implements ISysTenantService {
...
@@ -229,12 +229,11 @@ public class ISysTenantServiceImpl implements ISysTenantService {
//租户新增成功,发送短信通知租户
//租户新增成功,发送短信通知租户
//此处暂用钉钉机器人模拟发送短信
//此处暂用钉钉机器人模拟发送短信
String
content
=
"【央企数字经营管理系统通知】:"
String
content
=
"【央企数字经营管理系统通知】:"
+
bo
.
getCo
mpany
Name
()
+
bo
.
getCo
ntactUser
Name
()
+
"您好,您已经成功注册央企数字经营管理系统,请使用手机号码登录,初始密码为"
+
"您好,您已经成功注册央企数字经营管理系统,请使用手机号码登录,初始密码为"
+
password
+
password
+
"。友情提示:为了您的账号安全,请勿泄露密码。若需要修改密码,请联系管理员。"
;
+
"。友情提示:为了您的账号安全,请勿泄露密码。若需要修改密码,请联系管理员。"
;
DingTalkUtil
.
sendDingTalkMsg
(
content
);
DingTalkUtil
.
sendDingTalkMsg
(
content
);
System
.
out
.
println
(
"👉🏻:"
+
content
);
return
true
;
return
true
;
}
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysUserServiceImpl.java
View file @
6b24b82c
...
@@ -275,7 +275,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
...
@@ -275,7 +275,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
if
(
rows
>
0
)
{
if
(
rows
>
0
)
{
//租户新增成功,发送短信通知租户
//租户新增成功,发送短信通知租户
//此处暂用钉钉机器人模拟发送短信
//此处暂用钉钉机器人模拟发送短信
String
content
=
user
.
getNickName
()
String
content
=
"短信通知:"
+
user
.
getNickName
()
+
"您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
+
"您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
+
password
+
password
+
"。友情提示:为了您的账号安全,请勿泄露密码。"
;
+
"。友情提示:为了您的账号安全,请勿泄露密码。"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment