Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
232ac571
Commit
232ac571
authored
Sep 04, 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
50073e07
439e3a4c
Changes
41
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
944 additions
and
687 deletions
+944
-687
CaptchaController.java
...java/com/dsk/web/controller/common/CaptchaController.java
+23
-2
SysLoginController.java
...ava/com/dsk/web/controller/system/SysLoginController.java
+39
-6
SysProfileController.java
...a/com/dsk/web/controller/system/SysProfileController.java
+4
-1
SysUserController.java
...java/com/dsk/web/controller/system/SysUserController.java
+25
-5
application-dev.yml
dsk-admin/src/main/resources/application-dev.yml
+3
-3
userImportTemplate.xlsx
dsk-admin/src/main/resources/excel/userImportTemplate.xlsx
+0
-0
GlobalConstants.java
...rc/main/java/com/dsk/common/constant/GlobalConstants.java
+5
-0
hgscfx.png
dsk-operate-ui/src/assets/images/BI/hgscfx.png
+0
-0
lxsj.png
dsk-operate-ui/src/assets/images/BI/lxsj.png
+0
-0
zbgg.png
dsk-operate-ui/src/assets/images/BI/zbgg.png
+0
-0
zxz.png
dsk-operate-ui/src/assets/images/BI/zxz.png
+0
-0
index.js
dsk-operate-ui/src/router/index.js
+14
-0
region.vue
dsk-operate-ui/src/views/macro/component/region.vue
+22
-3
industrialStructure.vue
...c/views/macro/economies/component/industrialStructure.vue
+1
-1
localEconomy.vue
...e-ui/src/views/macro/economies/component/localEconomy.vue
+4
-4
regionalEconomy.vue
...i/src/views/macro/economies/component/regionalEconomy.vue
+4
-14
index.vue
dsk-operate-ui/src/views/macro/economies/index.vue
+7
-1
index.vue
dsk-operate-ui/src/views/macro/enterprises/index.vue
+30
-20
index.vue
dsk-operate-ui/src/views/macro/financing/index.vue
+0
-1
index.vue
dsk-operate-ui/src/views/macro/firstParty/index.vue
+0
-23
index.vue
dsk-operate-ui/src/views/macro/list/index.vue
+0
-23
BI.vue
...ate-ui/src/views/macro/nationalEconomies/component/BI.vue
+59
-0
jzqyfx.vue
...ui/src/views/macro/nationalEconomies/component/jzqyfx.vue
+303
-285
qgjjdq.vue
...ui/src/views/macro/nationalEconomies/component/qgjjdq.vue
+50
-30
tdjy.vue
...e-ui/src/views/macro/nationalEconomies/component/tdjy.vue
+27
-31
zhongbiao.vue
...src/views/macro/nationalEconomies/component/zhongbiao.vue
+37
-30
index.vue
dsk-operate-ui/src/views/macro/nationalEconomies/index.vue
+4
-1
index.vue
dsk-operate-ui/src/views/macro/rmation/index.vue
+0
-23
index.vue
dsk-operate-ui/src/views/macro/urban/index.vue
+52
-44
vue.config.js
dsk-operate-ui/vue.config.js
+2
-2
SysDeptVo.java
...tem/src/main/java/com/dsk/system/domain/vo/SysDeptVo.java
+7
-12
SysTenantPackageSelectVo.java
...va/com/dsk/system/domain/vo/SysTenantPackageSelectVo.java
+6
-1
SysUserImportVo.java
...c/main/java/com/dsk/system/domain/vo/SysUserImportVo.java
+17
-32
SysUserImportListener.java
...n/java/com/dsk/system/listener/SysUserImportListener.java
+37
-7
ISysDeptService.java
...src/main/java/com/dsk/system/service/ISysDeptService.java
+9
-0
ISysRoleService.java
...src/main/java/com/dsk/system/service/ISysRoleService.java
+9
-0
SysLoginService.java
...src/main/java/com/dsk/system/service/SysLoginService.java
+53
-8
ISysTenantPackageServiceImpl.java
...dsk/system/service/impl/ISysTenantPackageServiceImpl.java
+1
-3
SysDeptServiceImpl.java
.../java/com/dsk/system/service/impl/SysDeptServiceImpl.java
+13
-0
SysRoleServiceImpl.java
.../java/com/dsk/system/service/impl/SysRoleServiceImpl.java
+32
-19
SysUserServiceImpl.java
.../java/com/dsk/system/service/impl/SysUserServiceImpl.java
+45
-52
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/common/CaptchaController.java
View file @
232ac571
...
...
@@ -10,6 +10,7 @@ import com.dsk.common.constant.Constants;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.enums.CaptchaType
;
import
com.dsk.common.exception.user.CaptchaException
;
import
com.dsk.common.exception.user.CaptchaExpireException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.MessageUtils
;
...
...
@@ -29,6 +30,7 @@ import org.dromara.sms4j.api.SmsBlend;
import
org.dromara.sms4j.api.entity.SmsResponse
;
import
org.dromara.sms4j.core.factory.SmsFactory
;
import
org.dromara.sms4j.provider.enumerate.SupplierType
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.expression.Expression
;
import
org.springframework.expression.ExpressionParser
;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
...
...
@@ -60,18 +62,23 @@ public class CaptchaController {
private
final
MailProperties
mailProperties
;
private
final
SysUserMapper
userMapper
;
@Value
(
"${captcha.enable}"
)
private
boolean
captchaEnabled
;
/**
* 发送短信验证码
*
* @param phonenumber 用户手机号
*/
@GetMapping
(
"/captchaSms"
)
public
R
<
Void
>
smsCaptcha
(
@NotBlank
(
message
=
"{user.phonenumber.not.blank}"
)
String
phonenumber
)
{
public
R
<
Void
>
smsCaptcha
(
@NotBlank
(
message
=
"{user.phonenumber.not.blank}"
)
String
phonenumber
,
String
uid
,
String
captchaCode
,
String
templateId
)
{
String
key
=
GlobalConstants
.
CAPTCHA_CODE_KEY
+
phonenumber
;
// 验证码开关
if
(
captchaEnabled
)
{
validateCaptcha
(
phonenumber
,
captchaCode
,
uid
);
}
String
code
=
RandomUtil
.
randomNumbers
(
6
);
RedisUtils
.
setCacheObject
(
key
,
code
,
Duration
.
ofMinutes
(
Constants
.
CAPTCHA_EXPIRATION
));
// 验证码模板id 自行处理 (查数据库或写死均可)
String
templateId
=
""
;
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"code"
,
code
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
...
...
@@ -83,6 +90,20 @@ public class CaptchaController {
return
R
.
ok
();
}
private
void
validateCaptcha
(
String
phonenumber
,
String
captchaCode
,
String
uuid
)
{
String
verifyKey
=
GlobalConstants
.
CAPTCHA_CODE_KEY
+
StringUtils
.
defaultString
(
uuid
,
""
);
String
captcha
=
RedisUtils
.
getCacheObject
(
verifyKey
);
RedisUtils
.
deleteObject
(
verifyKey
);
if
(
captcha
==
null
)
{
// recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
throw
new
CaptchaExpireException
();
}
if
(!
captchaCode
.
equalsIgnoreCase
(
captcha
))
{
// recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"));
throw
new
CaptchaException
();
}
}
/**
* 开发需要,临时发送短信验证码
*/
...
...
dsk-admin/src/main/java/com/dsk/web/controller/system/SysLoginController.java
View file @
232ac571
...
...
@@ -5,6 +5,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
import
cn.dev33.satoken.stp.StpUtil
;
import
cn.hutool.core.lang.Assert
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.dsk.common.constant.Constants
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.core.domain.R
;
...
...
@@ -24,6 +25,10 @@ import com.dsk.system.service.ISysMenuService;
import
com.dsk.system.service.ISysUserService
;
import
com.dsk.system.service.SysLoginService
;
import
lombok.RequiredArgsConstructor
;
import
org.dromara.sms4j.api.SmsBlend
;
import
org.dromara.sms4j.api.entity.SmsResponse
;
import
org.dromara.sms4j.core.factory.SmsFactory
;
import
org.dromara.sms4j.provider.enumerate.SupplierType
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -32,6 +37,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.validation.constraints.NotBlank
;
import
java.time.Duration
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -116,6 +122,36 @@ public class SysLoginController {
}
/**
* 获取当前用户默认租户
* @return
*/
@SaIgnore
@PostMapping
(
"/user/default/tenant/phone"
)
public
R
<
Map
>
userDefaultTenant
(
String
phone
)
{
// LoginUser loginUser = LoginHelper.getLoginUser();
// Assert.notNull(loginUser,"用户信息不存在!");
String
defaultTenantKey
=
GlobalConstants
.
PHONE_DEFAULT_TENANT
+
phone
;
String
defaultTenant
=
RedisUtils
.
getCacheObject
(
defaultTenantKey
);
return
R
.
ok
(
MapUtil
.
of
(
"tenantId"
,
defaultTenant
));
}
/**
* 发送短信验证码
*
* @param phones 电话号
* @param templateId 模板ID
*/
@SaIgnore
@GetMapping
(
"/send/sms/code"
)
public
R
<
Object
>
sendAliyun
(
String
phones
,
String
templateId
)
{
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"code"
,
RandomUtil
.
randomNumbers
(
4
));
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
phones
,
templateId
,
map
);
return
R
.
ok
(
smsResponse
);
}
/**
* 短信登录
*
...
...
@@ -124,14 +160,11 @@ public class SysLoginController {
*/
@SaIgnore
@PostMapping
(
"/smsLogin"
)
public
R
<
Map
<
String
,
Object
>>
smsLogin
(
@Validated
@RequestBody
SmsLoginBody
smsLoginBody
)
{
Map
<
String
,
Object
>
ajax
=
new
HashMap
<>();
public
R
<
LoginVo
>
smsLogin
(
@Validated
@RequestBody
SmsLoginBody
smsLoginBody
)
{
// 生成令牌
String
token
=
loginService
.
smsLogin
(
smsLoginBody
.
getPhonenumber
(),
smsLoginBody
.
getSmsCode
());
ajax
.
put
(
Constants
.
TOKEN
,
token
);
return
R
.
ok
(
ajax
);
LoginVo
loginVo
=
loginService
.
smsLogin
(
smsLoginBody
.
getPhonenumber
(),
smsLoginBody
.
getSmsCode
());
return
R
.
ok
(
loginVo
);
}
/**
* 邮件登录
*
...
...
dsk-admin/src/main/java/com/dsk/web/controller/system/SysProfileController.java
View file @
232ac571
...
...
@@ -5,11 +5,11 @@ import cn.hutool.core.io.FileUtil;
import
com.dsk.common.annotation.Log
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.system.domain.SysUser
;
import
com.dsk.common.enums.BusinessType
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.file.MimeTypeUtils
;
import
com.dsk.system.domain.SysUser
;
import
com.dsk.system.domain.vo.SysOssVo
;
import
com.dsk.system.service.ISysOssService
;
import
com.dsk.system.service.ISysUserService
;
...
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.Base64
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -82,6 +83,8 @@ public class SysProfileController extends BaseController {
@Log
(
title
=
"个人信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/updatePwd"
)
public
R
<
Void
>
updatePwd
(
String
oldPassword
,
String
newPassword
)
{
oldPassword
=
new
String
(
Base64
.
getDecoder
().
decode
(
oldPassword
));
newPassword
=
new
String
(
Base64
.
getDecoder
().
decode
(
newPassword
));
SysUser
user
=
userService
.
selectUserById
(
LoginHelper
.
getUserId
());
String
userName
=
user
.
getUserName
();
String
password
=
user
.
getPassword
();
...
...
dsk-admin/src/main/java/com/dsk/web/controller/system/SysUserController.java
View file @
232ac571
...
...
@@ -7,6 +7,7 @@ import cn.hutool.core.lang.tree.Tree;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.dsk.common.annotation.Log
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.common.core.domain.R
;
...
...
@@ -17,6 +18,7 @@ import com.dsk.common.helper.LoginHelper;
import
com.dsk.common.utils.StreamUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.poi.ExcelUtil
;
import
com.dsk.common.utils.redis.RedisUtils
;
import
com.dsk.system.domain.SysDept
;
import
com.dsk.system.domain.SysRole
;
import
com.dsk.system.domain.SysUser
;
...
...
@@ -84,6 +86,18 @@ public class SysUserController extends BaseController {
ExcelUtil
.
exportExcel
(
listVo
,
"用户数据"
,
SysUserExportVo
.
class
,
response
);
}
/**
* 获取批量导入用户失败列表
*/
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
EXPORT
)
@SaCheckPermission
(
"system:user:export"
)
@PostMapping
(
"/exportFailUsers"
)
public
void
exportFailUsers
(
HttpServletResponse
response
)
{
String
key
=
GlobalConstants
.
BATCH_IMPORT_FAIL_USERS
+
LoginHelper
.
getUserId
();
ExcelUtil
.
exportExcel
(
RedisUtils
.
getCacheList
(
key
),
"用户数据"
,
SysUserImportVo
.
class
,
response
);
RedisUtils
.
deleteObject
(
key
);
}
/**
* 导入数据
*
...
...
@@ -93,8 +107,14 @@ public class SysUserController extends BaseController {
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
IMPORT
)
@SaCheckPermission
(
"system:user:import"
)
@PostMapping
(
value
=
"/importData"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
public
R
<
Void
>
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
));
List
<
SysUserImportVo
>
resultList
=
result
.
getList
();
if
(
ObjectUtil
.
isNotNull
(
resultList
))
{
String
key
=
GlobalConstants
.
BATCH_IMPORT_FAIL_USERS
+
LoginHelper
.
getUserId
();
RedisUtils
.
setCacheList
(
key
,
resultList
);
return
R
.
fail
(
resultList
);
}
return
R
.
ok
(
result
.
getAnalysis
());
}
...
...
@@ -103,7 +123,9 @@ public class SysUserController extends BaseController {
*/
@PostMapping
(
"/importTemplate"
)
public
void
importTemplate
(
HttpServletResponse
response
)
{
ExcelUtil
.
exportExcel
(
new
ArrayList
<>(),
"用户数据"
,
SysUserImportVo
.
class
,
response
);
List
<
Object
>
list
=
new
ArrayList
<>();
list
.
add
(
new
SysUserImportVo
(
"测试部门"
,
"测试用户昵称"
,
"18888888888"
,
"测试角色"
));
ExcelUtil
.
exportTemplate
(
list
,
"用户数据"
,
"excel/userImportTemplate.xlsx"
,
response
);
}
/**
...
...
@@ -135,9 +157,7 @@ public class SysUserController extends BaseController {
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
R
<
Void
>
add
(
@Validated
@RequestBody
SysUser
user
)
{
if
(!
userService
.
checkUserNameUnique
(
user
))
{
return
R
.
fail
(
"新增用户'"
+
user
.
getUserName
()
+
"'失败,登录账号已存在"
);
}
else
if
(
StringUtils
.
isNotEmpty
(
user
.
getPhonenumber
())
&&
!
userService
.
checkPhoneUnique
(
user
))
{
if
(
StringUtils
.
isNotEmpty
(
user
.
getPhonenumber
())
&&
!
userService
.
checkPhoneUnique
(
user
))
{
return
R
.
fail
(
"新增用户'"
+
user
.
getUserName
()
+
"'失败,手机号码已存在"
);
}
else
if
(
StringUtils
.
isNotEmpty
(
user
.
getEmail
())
&&
!
userService
.
checkEmailUnique
(
user
))
{
return
R
.
fail
(
"新增用户'"
+
user
.
getUserName
()
+
"'失败,邮箱账号已存在"
);
...
...
dsk-admin/src/main/resources/application-dev.yml
View file @
232ac571
...
...
@@ -167,11 +167,11 @@ sms:
#请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
requestUrl
:
dysmsapi.aliyuncs.com
#阿里云的accessKey
accessKeyId
:
xxxxxxx
accessKeyId
:
LTAIC4Pb2jJZbUmD
#阿里云的accessKeySecret
accessKeySecret
:
xxxxxxx
accessKeySecret
:
L7VANFwqaTludkczLsg9jhvidk0e28
#短信签名
signature
:
测试
signature
:
大司空信息科技
tencent
:
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
requestUrl
:
sms.tencentcloudapi.com
...
...
dsk-admin/src/main/resources/excel/userImportTemplate.xlsx
0 → 100644
View file @
232ac571
File added
dsk-common/src/main/java/com/dsk/common/constant/GlobalConstants.java
View file @
232ac571
...
...
@@ -43,4 +43,9 @@ public interface GlobalConstants {
*/
String
PHONE_DEFAULT_TENANT
=
GLOBAL_REDIS_KEY
+
"phone_default_tenant:"
;
/**
* 批量导入用户失败集合
*/
String
BATCH_IMPORT_FAIL_USERS
=
GLOBAL_REDIS_KEY
+
"batch_import_fail_users"
;
}
dsk-operate-ui/src/assets/images/BI/hgscfx.png
0 → 100644
View file @
232ac571
3.63 MB
dsk-operate-ui/src/assets/images/BI/lxsj.png
0 → 100644
View file @
232ac571
2.1 MB
dsk-operate-ui/src/assets/images/BI/zbgg.png
0 → 100644
View file @
232ac571
2.74 MB
dsk-operate-ui/src/assets/images/BI/zxz.png
0 → 100644
View file @
232ac571
3.23 MB
dsk-operate-ui/src/router/index.js
View file @
232ac571
...
...
@@ -368,6 +368,20 @@ export const dynamicRoutes = [
}
]
},
{
path
:
'/system/oss-config'
,
component
:
Layout
,
hidden
:
true
,
permissions
:
[
'system:oss:list'
],
children
:
[
{
path
:
'index'
,
component
:
()
=>
import
(
'@/views/system/oss/config'
),
name
:
'OssConfig'
,
meta
:
{
title
:
'配置管理'
,
activeMenu
:
'/system/oss'
}
}
]
},
{
path
:
'/tool/gen-edit'
,
component
:
Layout
,
...
...
dsk-operate-ui/src/views/macro/component/region.vue
View file @
232ac571
...
...
@@ -5,7 +5,11 @@
<span
class=
"province"
>
{{
province
}}
</span>
<span
class=
"icon"
>
<i
class=
"el-icon-location"
></i>
切换
<el-cascader
ref=
"address"
class=
"cascader-region"
popper-class=
'cascader-region-addd'
<el-select
v-if=
"key =='5'"
v-model=
"address"
class=
"cascader-region"
@
change=
"addressListbtn1"
>
<el-option
v-for=
"(item,index) in addressList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
></el-option>
</el-select>
<el-cascader
v-else
ref=
"address"
class=
"cascader-region"
popper-class=
'cascader-region-addd'
@
change=
"addressListbtn"
v-model=
"address"
:options=
"addressList"
:props=
"props"
collapse-tags
></el-cascader>
</span>
</div>
...
...
@@ -17,7 +21,7 @@
import
dataRegion
from
'@/assets/json/dataRegion'
export
default
{
name
:
'region'
,
props
:[
'province'
,
'dataQuery'
],
props
:[
'province'
,
'dataQuery'
,
'type'
],
data
(){
return
{
props
:
{
...
...
@@ -28,7 +32,8 @@
addressList
:
[],
address
:
''
,
provinceId
:[],
location
:
''
location
:
''
,
key
:
''
,
}
},
watch
:
{
...
...
@@ -39,10 +44,12 @@
created
(){
this
.
dataRegion
()
this
.
location
=
this
.
province
this
.
key
=
this
.
type
;
},
methods
:{
addressListbtn
()
{
let
nodesObj
=
this
.
$refs
.
address
.
getCheckedNodes
()[
0
];
this
.
location
=
nodesObj
.
pathLabels
[
nodesObj
.
pathLabels
.
length
-
1
];
this
.
provinceId
=
nodesObj
.
path
;
let
data
=
{}
...
...
@@ -52,6 +59,18 @@
this
.
$parent
.
addressListbtn
(
data
)
localStorage
.
setItem
(
'location'
,
true
)
},
addressListbtn1
()
{
let
obj
=
this
.
addressList
.
find
((
option
)
=>
option
.
id
===
this
.
address
);
this
.
location
=
obj
.
label
;
this
.
provinceId
=
[
obj
.
id
];
let
data
=
{}
data
.
province
=
this
.
location
data
.
provinceId
=
this
.
provinceId
data
.
provinces
=
[
this
.
location
]
console
.
log
(
data
,
"|||||||"
)
this
.
$parent
.
addressListbtn
(
data
)
localStorage
.
setItem
(
'location'
,
true
)
},
//地区
async
dataRegion
()
{
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, {
...
...
dsk-operate-ui/src/views/macro/economies/component/industrialStructure.vue
View file @
232ac571
...
...
@@ -376,7 +376,7 @@ export default {
top
:
46px
;
}
th
{
font-size
:
1
2
px
!
important
;
font-size
:
1
3
px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/src/views/macro/economies/component/localEconomy.vue
View file @
232ac571
...
...
@@ -22,6 +22,7 @@
v-loading=
"tableLoading"
:data=
"tableData"
border
v-horizontal-scroll=
"'hover'"
highlight-current-row
@
sort-change=
"sortChange"
:default-sort =
"
{prop: 'gdp', order: 'descending'}"
...
...
@@ -36,7 +37,7 @@
</el-table-column>
<el-table-column
prop=
"gdp"
label=
"GDP(亿元)"
sortable
width=
"120"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gdpGrowth"
label=
"GDP增速(%)"
sortable
width=
"1
2
0"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gdpGrowth"
label=
"GDP增速(%)"
sortable
width=
"1
3
0"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gdpPerCapita"
label=
"人均GDP(元)"
sortable
width=
"130"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"population"
label=
"人口(万人)"
sortable
width=
"120"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"fixedInvestment"
label=
"固定资产投资 (亿元) "
sortable
width=
"200"
:formatter=
"formatStatus"
/>
...
...
@@ -111,10 +112,10 @@ export default {
params
.
provinceIds
=
[
this
.
provinceId
[
0
]]
}
if
(
this
.
provinceId
.
length
>
1
){
params
.
cityId
=
[
this
.
provinceId
[
1
]]
params
.
cityId
s
=
[
this
.
provinceId
[
1
]]
}
if
(
this
.
provinceId
.
length
>
2
){
params
.
areaId
=
[
this
.
provinceId
[
2
]]
params
.
areaId
s
=
[
this
.
provinceId
[
2
]]
}
// params.provinceIds=[this.dataQuery.provinceId]
// this.isSkeleton = true
...
...
@@ -226,7 +227,6 @@ export default {
overflow-y
:
clip
;
}
th
{
font-size
:
12px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/src/views/macro/economies/component/regionalEconomy.vue
View file @
232ac571
...
...
@@ -333,9 +333,9 @@ export default {
getData
(){
this
.
isSkeleton
=
true
let
params
=
{}
if
(
this
.
dataQuery
.
id
){
params
.
id
=
this
.
dataQuery
.
id
}
//
if(this.dataQuery.id){
//
params.id=this.dataQuery.id
//
}
if
(
this
.
provinceId
.
length
>=
0
){
params
.
provinceId
=
this
.
provinceId
[
0
]
}
...
...
@@ -732,16 +732,6 @@ export default {
this
.
$parent
.
handleClick
(
'second'
,
data
);
break
;
case
2
:
// this.$router.push({
// path: '/macro/urban',
// query:{
// provinceId:this.dataQuery.provinceId,
// province:this.dataQuery.province,
// }
// })
console
.
log
(
this
.
dataQuery
.
provinceId
)
console
.
log
(
this
.
dataQuery
.
province
)
// return
this
.
$router
.
push
({
name
:
'Urban'
,
params
:
{
provinceId
:
this
.
dataQuery
.
provinceId
,
...
...
@@ -883,7 +873,7 @@ export default {
::v-deep
.el-table
{
overflow
:visible
;
th
{
font-size
:
1
2
px
!
important
;
font-size
:
1
3
px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/src/views/macro/economies/index.vue
View file @
232ac571
...
...
@@ -76,7 +76,13 @@ export default {
if
(
Array
.
isArray
(
this
.
dataQuery
.
provinceId
)){
this
.
provinceId
=
this
.
dataQuery
.
provinceId
}
else
{
this
.
provinceId
.
push
(
this
.
dataQuery
.
provinceId
)
if
(
this
.
dataQuery
.
cityId
){
this
.
provinceId
=
[
this
.
dataQuery
.
provinceId
,
this
.
dataQuery
.
cityId
,
this
.
dataQuery
.
areaId
]
}
else
if
(
this
.
dataQuery
.
cityId
){
this
.
provinceId
=
[
this
.
dataQuery
.
provinceId
,
this
.
dataQuery
.
cityId
]
}
else
{
this
.
provinceId
=
[
this
.
dataQuery
.
provinceId
]
}
}
}
else
{
location
({}).
then
(
res
=>
{
...
...
dsk-operate-ui/src/views/macro/enterprises/index.vue
View file @
232ac571
<
template
>
<div
class=
"app-container enterprises"
>
<Region
v-if=
"province"
:province=
"province"
:dataQuery=
"dataQuery"
@
addressListbtn=
"addressListbtn"
></Region>
<Region
v-if=
"province"
:province=
"province"
:dataQuery=
"dataQuery"
@
addressListbtn=
"addressListbtn"
:type=
"5"
></Region>
<div
class=
"flex-box eco-header"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"本地企业"
name=
"first"
></el-tab-pane>
...
...
@@ -20,6 +20,7 @@
collapse-tags
clearable
></el-cascader>
<el-input
placeholder=
"输入关键词查询"
v-model=
"queryParams.ename"
clearable
@
clear=
"handleSearch()"
>
<i
slot=
"prefix"
class=
"el-icon-search"
></i>
<el-button
slot=
"append"
@
click=
"handleSearch()"
>
搜索
</el-button>
</el-input>
<span
class=
"total"
>
共
{{
tableDataTotal
}}
条
</span>
...
...
@@ -31,7 +32,7 @@
v-loading=
"tableLoading"
border
fit
max-height=
"640
"
v-horizontal-scroll=
"'hover'
"
@
sort-change=
"sortChange"
highlight-current-row
v-if=
"tableDataTotal > 0 && !isSkeleton"
...
...
@@ -291,17 +292,8 @@ export default {
this
.
dataQuery
.
province
=
data
.
provinces
;
let
params
=
{}
if
(
data
){
if
(
this
.
provinceId
.
length
>
0
){
params
.
provinceId
=
this
.
provinceId
[
0
]
}
if
(
this
.
provinceId
.
length
>
1
){
params
.
cityId
=
this
.
provinceId
[
1
]
}
if
(
this
.
provinceId
.
length
>
2
){
params
.
areaId
=
this
.
provinceId
[
2
]
}
params
.
provinceId
=
this
.
provinceId
}
this
.
querySubmit
()
location
(
params
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
...
...
@@ -362,11 +354,13 @@ export default {
width
:
180px
;
margin-right
:
12px
;
height
:
32px
;
line-height
:
32px
!
important
;
.el-input
{
width
:
100%
;
height
:
32px
;
.el-input__inner
{
height
:
32px
!
important
;
line-height
:
32px
!
important
;
}
}
.el-cascader__tags
{
...
...
@@ -379,16 +373,29 @@ export default {
}
::v-deep
.el-input.el-input-group
{
width
:
240px
;
height
:
32px
;
height
:
30px
;
border
:
1px
solid
#e0e0e0
;
.el-input__inner
{
height
:
3
2
px
;
border
-right
:
0
;
height
:
3
0
px
;
border
:
0
;
}
.el-input__suffix
{
margin-top
:
-1px
;
}
.el-icon-search
{
font-size
:
14px
;
line-height
:
32px
;
color
:
#0081FF
;
margin-left
:
6px
;
margin-right
:
4px
;
}
.el-input__inner
:focus
{
border-color
:
#e0e0e0
;
/*border-color: #0081FF;*/
}
.el-input__inner
:focus
~
.el-input-group__append
{
/*border: 1px solid #0081FF;*/
color
:
#ffffff
;
background
:
#0081FF
;
}
.el-input-group__append
{
width
:
60px
;
...
...
@@ -396,9 +403,12 @@ export default {
text-align
:
center
;
background
:
#F5F5F5
;
color
:
#0081FF
;
border-left
:
0
;
border-radius
:
0
;
border-right
:
0
;
border-radius
:
0
2px
2px
0
;
border
:
0
;
&
:hover
{
color
:
#ffffff
;
background
:
#0081FF
;
}
}
}
.total
{
...
...
@@ -448,7 +458,7 @@ export default {
overflow-y
:
clip
;
}
th
{
font-size
:
1
2
px
!
important
;
font-size
:
1
3
px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/src/views/macro/financing/index.vue
View file @
232ac571
...
...
@@ -437,7 +437,6 @@ export default {
.content
{
background
:
#ffffff
;
padding
:
16px
;
margin-bottom
:
16px
;
border-radius
:
4px
;
}
.common-title
{
...
...
dsk-operate-ui/src/views/macro/firstParty/index.vue
deleted
100644 → 0
View file @
50073e07
<
template
>
<div
class=
"app-container"
>
大型甲方
</div>
</
template
>
<
script
>
export
default
{
name
:
'FirstParty'
,
data
()
{
return
{
}
},
created
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
dsk-operate-ui/src/views/macro/list/index.vue
deleted
100644 → 0
View file @
50073e07
<
template
>
<div
class=
"app-container"
>
地区榜单
</div>
</
template
>
<
script
>
export
default
{
name
:
'List'
,
data
()
{
return
{
}
},
created
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
dsk-operate-ui/src/views/macro/nationalEconomies/component/BI.vue
0 → 100644
View file @
232ac571
<
template
>
<div
class=
"BIfx"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"宏观市场分析"
name=
"first"
>
<img
class=
"img"
src=
"@/assets/images/BI/hgscfx.png"
/>
</el-tab-pane>
<el-tab-pane
label=
"立项设计"
name=
"second"
>
<img
class=
"img"
src=
"@/assets/images/BI/lxsj.png"
/>
</el-tab-pane>
<el-tab-pane
label=
"专项债项目"
name=
"third"
>
<img
class=
"img"
src=
"@/assets/images/BI/zxz.png"
/>
</el-tab-pane>
<el-tab-pane
label=
"中标公告"
name=
"fourth"
>
<img
class=
"img"
src=
"@/assets/images/BI/zbgg.png"
/>
</el-tab-pane>
</el-tabs>
</div>
</
template
>
<
script
>
export
default
{
name
:
'BI'
,
data
()
{
return
{
activeName
:
'first'
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.BIfx
{
background
:
#ffffff
;
padding
:
16px
;
margin-top
:
12px
;
::v-deep
.el-tabs
{
.
el-tabs__nav-wrap
:
:
after
{
position
:
static
!
important
;
}
.el-tabs__header
{
margin
:
0
;
.el-tabs__item
{
padding
:
0
16px
;
font-size
:
16px
;
}
.is-active
{
font-weight
:
bold
;
}
}
.el-tabs__content
{
width
:
100%
;
}
}
.img
{
width
:
100%
;
margin-top
:
30px
;
}
}
</
style
>
dsk-operate-ui/src/views/macro/nationalEconomies/component/jzqyfx.vue
View file @
232ac571
...
...
@@ -225,10 +225,7 @@
}
},
created
()
{
setTimeout
(()
=>
{
this
.
isSkeleton
=
false
;
this
.
getData
()
},
1000
);
this
.
getAreaGroupByProvince
()
var
date
=
new
Date
()
var
year
=
date
.
getFullYear
()
var
month
=
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
...
...
@@ -274,9 +271,13 @@
total
=
total
+
this
.
jzglData
[
i
].
count
}
this
.
total
=
total
;
this
.
$nextTick
(()
=>
{
this
.
initChart
()
})
this
.
initChart
()
})
},
getCertGroupByMajorProvinceLevel
(){
certGroupByMajorProvinceLevel
().
then
(
res
=>
{
this
.
dqData
=
res
.
data
;
let
data
=
this
.
dqData
[
0
].
province
;
...
...
@@ -305,9 +306,15 @@
list
.
push
(
item
)
}
this
.
jzdqData
=
list
this
.
initChart1
()
this
.
$nextTick
(()
=>
{
this
.
initChart1
()
})
})
},
getAreaGroupByProvince
(){
areaGroupByProvince
().
then
(
res
=>
{
this
.
isSkeleton
=
false
;
this
.
zbData
=
res
.
data
;
//定义一个变量 保存数据 因为sort方法排序会改变原数组 使用JSON方法深拷贝 将原数值暂存
// let dataArr = JSON.parse(JSON.stringify(res.data))
...
...
@@ -321,300 +328,311 @@
this
.
rankList
=
data
;
//将原数组数据赋值回去 保持数据不变
// this.zbData = JSON.parse(JSON.stringify(dataArr))
this
.
initChart2
()
this
.
$nextTick
(()
=>
{
this
.
initChart2
()
})
this
.
getData
()
this
.
getCertGroupByMajorProvinceLevel
()
})
},
initChart
()
{
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"gl-echarts"
))
let
option
=
{
tooltip
:
{
// show:false
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
jzglData
.
map
(
item
=>
item
.
levelValue
),
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
40
,
left
:
70
,
right
:
40
,
bottom
:
40
,
},
series
:
[
{
data
:
this
.
jzglData
.
map
(
item
=>
item
.
count
),
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
1
,
color
:
"#0081FF"
,
},
itemStyle
:{
color
:
"#4E8EFF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.2
,
color
:
"#DFEAFF"
,
},
{
offset
:
1
,
color
:
"#5895FF"
,
},
]),
},
}
]
}
myChart
.
clear
();
//图表清除
myChart
.
setOption
(
option
);
window
.
addEventListener
(
"resize"
,
function
()
{
myChart
.
resize
();
//图表跟随页面大小变化宽度
});
this
.
$nextTick
(()
=>
{
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"gl-echarts"
))
let
option
=
{
tooltip
:
{
// show:false
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
jzglData
.
map
(
item
=>
item
.
levelValue
),
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
40
,
left
:
70
,
right
:
40
,
bottom
:
40
,
},
series
:
[
{
data
:
this
.
jzglData
.
map
(
item
=>
item
.
count
),
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
1
,
color
:
"#0081FF"
,
},
itemStyle
:{
color
:
"#4E8EFF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.2
,
color
:
"#DFEAFF"
,
},
{
offset
:
1
,
color
:
"#5895FF"
,
},
]),
},
}
]
}
myChart
.
clear
();
//图表清除
myChart
.
setOption
(
option
);
window
.
addEventListener
(
"resize"
,
function
()
{
myChart
.
resize
();
//图表跟随页面大小变化宽度
});
})
},
initChart1
()
{
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"jzqy-echarts"
))
let
option
=
{
legend
:
{
x
:
'right'
,
padding
:[
0
,
30
,
0
,
0
],
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'line'
,
label
:
{
backgroundColor
:
'#FFFFFF'
this
.
$nextTick
(()
=>
{
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"jzqy-echarts"
))
let
option
=
{
legend
:
{
x
:
'right'
,
padding
:[
0
,
30
,
0
,
0
],
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'line'
,
label
:
{
backgroundColor
:
'#FFFFFF'
}
}
}
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
province
),
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
35
,
left
:
60
,
right
:
30
,
bottom
:
20
,
},
series
:
[
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
tjCount
),
name
:
'特级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#0081FF"
,
},
itemStyle
:{
color
:
"#4E8EFF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.2
,
color
:
"#DFEAFF"
,
},
{
offset
:
1
,
color
:
"#5895FF"
,
},
]),
},
},
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
oneCount
),
name
:
'一级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#FA6C6C"
,
},
itemStyle
:{
color
:
"#FA6C6C"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.1
,
color
:
"#FDF8F5"
,
},
{
offset
:
1
,
color
:
"#FCD7C8"
,
},
]),
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
province
),
},
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
twoCount
),
name
:
'二级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#8077F2"
,
},
itemStyle
:{
color
:
"#8077F2"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.1
,
color
:
"#ECE8FF"
,
},
{
offset
:
1
,
color
:
"#BCC0FF"
,
},
]),
},
yAxis
:
{
type
:
'value'
,
},
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
threeCount
),
name
:
'三级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
grid
:
{
top
:
35
,
left
:
60
,
right
:
30
,
bottom
:
20
,
},
series
:
[
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
tjCount
),
name
:
'特级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#0081FF"
,
},
itemStyle
:{
color
:
"#4E8EFF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.2
,
color
:
"#DFEAFF"
,
},
{
offset
:
1
,
color
:
"#5895FF"
,
},
]),
},
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#FA936C"
,
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
oneCount
),
name
:
'一级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#FA6C6C"
,
},
itemStyle
:{
color
:
"#FA6C6C"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.1
,
color
:
"#FDF8F5"
,
},
{
offset
:
1
,
color
:
"#FCD7C8"
,
},
]),
},
},
itemStyle
:{
color
:
"#FA936C"
,
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
twoCount
),
name
:
'二级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#8077F2"
,
},
itemStyle
:{
color
:
"#8077F2"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.1
,
color
:
"#ECE8FF"
,
},
{
offset
:
1
,
color
:
"#BCC0FF"
,
},
]),
},
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.1
,
color
:
"#FEFBFA"
,
},
{
offset
:
1
,
color
:
"#FCD7C8"
,
},
]),
{
data
:
this
.
jzdqData
.
map
(
item
=>
item
.
threeCount
),
name
:
'三级'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#FA936C"
,
},
itemStyle
:{
color
:
"#FA936C"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
opacity
:
0.8
,
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.1
,
color
:
"#FEFBFA"
,
},
{
offset
:
1
,
color
:
"#FCD7C8"
,
},
]),
},
},
},
]
}
myChart
.
clear
();
myChart
.
setOption
(
option
);
window
.
addEventListener
(
"resize"
,
function
()
{
myChart
.
resize
();
//图表跟随页面大小变化宽度
});
]
}
myChart
.
clear
();
myChart
.
setOption
(
option
);
window
.
addEventListener
(
"resize"
,
function
()
{
myChart
.
resize
();
//图表跟随页面大小变化宽度
});
})
},
initChart2
()
{
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"ba-echarts"
))
let
option
=
{
tooltip
:
{
// show:false
},
legend
:{},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
zbData
.
map
(
item
=>
item
.
province
),
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
20
,
left
:
65
,
right
:
50
,
bottom
:
20
,
},
series
:
[
{
data
:
this
.
zbData
.
map
(
item
=>
item
.
count
),
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
1
,
color
:
"#FFAB44"
,
},
itemStyle
:{
color
:
"#FFAB44"
,
normal
:
{
label
:
{
show
:
true
},
color
:
"#FFAB44"
,
lineStyle
:
{
color
:
"#FFAB44"
this
.
$nextTick
(()
=>
{
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"ba-echarts"
))
let
option
=
{
tooltip
:
{
// show:false
},
legend
:{},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
zbData
.
map
(
item
=>
item
.
province
),
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
20
,
left
:
65
,
right
:
50
,
bottom
:
20
,
},
series
:
[
{
data
:
this
.
zbData
.
map
(
item
=>
item
.
count
),
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
1
,
color
:
"#FFAB44"
,
},
itemStyle
:{
color
:
"#FFAB44"
,
normal
:
{
label
:
{
show
:
true
},
color
:
"#FFAB44"
,
lineStyle
:
{
color
:
"#FFAB44"
}
}
}
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.2
,
color
:
"#FFEDD0"
,
},
{
offset
:
1
,
color
:
"#FFC671"
,
}
,
])
,
}
,
}
]
}
myChart
.
setOption
(
option
);
window
.
addEventListener
(
"resize"
,
function
()
{
myChart
.
resize
();
//图表跟随页面大小变化宽度
})
;
}
,
//设置面积区域为渐变效果
areaStyle
:
{
color
:
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0.2
,
color
:
"#FFEDD0"
,
}
,
{
offset
:
1
,
color
:
"#FFC671"
,
}
,
])
,
}
,
}
]
}
myChart
.
setOption
(
option
);
window
.
addEventListener
(
"resize"
,
function
()
{
myChart
.
resize
();
//图表跟随页面大小变化宽度
});
})
},
handleClick
(
type
,
index
){
if
(
type
===
1
){
...
...
@@ -848,7 +866,7 @@
}
}
th
{
font-size
:
1
2
px
!
important
;
font-size
:
1
3
px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/src/views/macro/nationalEconomies/component/qgjjdq.vue
View file @
232ac571
...
...
@@ -35,8 +35,8 @@
:data=
"tableData"
element-loading-text=
"Loading"
@
sort-change=
"sortChange"
v-horizontal-scroll=
"'hover'"
border
max-height=
"640"
highlight-current-row
v-if=
"tableDataTotal > 0 && !isSkeleton"
:default-sort =
"
{prop: 'gdp', order: 'descending'}"
...
...
@@ -44,9 +44,9 @@
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
fixed
>
<template
slot-scope=
"scope"
>
{{
pageIndex
*
pageSize
-
pageSize
+
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"地区"
min-
width=
"150"
align=
"left"
fixed
>
<el-table-column
label=
"地区"
width=
"150"
align=
"left"
fixed
>
<
template
slot-scope=
"scope"
>
<
router-link
:to=
"
{path:'/macro/economies',query:{id:scope.row.id,provinceId:scope.row.provinceId,province:scope.row.province}}" tag="a" class="a-link">
{{
scope
.
row
.
province
}}{{
scope
.
row
.
city
?
'-'
:
''
}}{{
scope
.
row
.
city
}}{{
scope
.
row
.
area
?
'-'
:
''
}}{{
scope
.
row
.
area
}}
</router-link
>
<
span
@
click=
"clickTo(scope.row)"
style=
"cursor: pointer;"
class=
"a-link"
>
{{
scope
.
row
.
province
}}{{
scope
.
row
.
city
?
'-'
:
''
}}{{
scope
.
row
.
city
}}{{
scope
.
row
.
area
?
'-'
:
''
}}{{
scope
.
row
.
area
}}
</span
>
</
template
>
</el-table-column>
<el-table-column
label=
"年度明细"
prop=
"id"
width=
"90"
align=
"center"
fixed
>
...
...
@@ -54,26 +54,26 @@
<img
src=
"@/assets/images/icon_detailed.png"
class=
"icon-detailed"
@
click=
"handleDetail(scope.row)"
>
</
template
>
</el-table-column>
<el-table-column
label=
"GDP(亿元)"
prop=
"gdp"
:formatter=
"formatStatus"
sortable=
"custom"
min-width=
"115
"
align=
"right"
></el-table-column>
<el-table-column
label=
"GDP增速(%)"
prop=
"gdpGrowth"
:formatter=
"formatStatus"
sortable=
"custom"
min-width=
"12
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"人均GDP(元)"
prop=
"gdpPerCapita"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"1
25
"
align=
"right"
></el-table-column>
<el-table-column
label=
"GDP(亿元)"
prop=
"gdp"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"120
"
align=
"right"
></el-table-column>
<el-table-column
label=
"GDP增速(%)"
prop=
"gdpGrowth"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"13
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"人均GDP(元)"
prop=
"gdpPerCapita"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"1
30
"
align=
"right"
></el-table-column>
<el-table-column
label=
"人口(万人)"
prop=
"population"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"120"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算收入(亿元)"
prop=
"gbr"
sortable=
"custom"
:formatter=
"formatStatus"
width=
"
180
"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算收入增速(%)"
prop=
"gbrGrowth"
:formatter=
"formatStatus"
sortable=
"custom"
min-width=
"150
"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算收入:税收收入(亿元)"
prop=
"taxIncome"
:formatter=
"formatStatus"
sortable=
"custom"
min-width=
"15
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算支出(亿元)"
prop=
"gbe"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"1
40
"
align=
"right"
></el-table-column>
<el-table-column
label=
"政府性基金收入(亿元)"
width=
"1
4
0"
prop=
"govFundIncome"
:formatter=
"formatStatus"
sortable=
"custom"
align=
"right"
></el-table-column>
<el-table-column
label=
"政府性基金收入:土地出让收入(亿元)"
prop=
"landTransferIncome"
sortable=
"custom"
:formatter=
"formatStatus"
width=
"
150
"
align=
"right"
></el-table-column>
<el-table-column
label=
"政府性基金支出(亿元)"
prop=
"govFundExpenditure"
:formatter=
"formatStatus"
width=
"1
7
0"
sortable=
"custom"
align=
"right"
></el-table-column>
<el-table-column
label=
"国有资本经营收入(亿元)"
prop=
"soecoi"
width=
"1
6
0"
:formatter=
"formatStatus"
align=
"right"
></el-table-column>
<el-table-column
label=
"国有资本经营支出(亿元)"
prop=
"soecoe"
width=
"1
6
0"
:formatter=
"formatStatus"
align=
"right"
></el-table-column>
<el-table-column
label=
"固定资产投资(亿元)"
prop=
"fixedInvestment"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算收入(亿元)"
prop=
"gbr"
sortable=
"custom"
:formatter=
"formatStatus"
width=
"
205
"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算收入增速(%)"
prop=
"gbrGrowth"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"205
"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算收入:税收收入(亿元)"
prop=
"taxIncome"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"26
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般公共预算支出(亿元)"
prop=
"gbe"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"1
95
"
align=
"right"
></el-table-column>
<el-table-column
label=
"政府性基金收入(亿元)"
width=
"1
8
0"
prop=
"govFundIncome"
:formatter=
"formatStatus"
sortable=
"custom"
align=
"right"
></el-table-column>
<el-table-column
label=
"政府性基金收入:土地出让收入(亿元)"
prop=
"landTransferIncome"
sortable=
"custom"
:formatter=
"formatStatus"
width=
"
275
"
align=
"right"
></el-table-column>
<el-table-column
label=
"政府性基金支出(亿元)"
prop=
"govFundExpenditure"
:formatter=
"formatStatus"
width=
"1
8
0"
sortable=
"custom"
align=
"right"
></el-table-column>
<el-table-column
label=
"国有资本经营收入(亿元)"
prop=
"soecoi"
width=
"1
9
0"
:formatter=
"formatStatus"
align=
"right"
></el-table-column>
<el-table-column
label=
"国有资本经营支出(亿元)"
prop=
"soecoe"
width=
"1
9
0"
:formatter=
"formatStatus"
align=
"right"
></el-table-column>
<el-table-column
label=
"固定资产投资(亿元)"
prop=
"fixedInvestment"
:formatter=
"formatStatus"
width=
"1
9
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"财政自给率(%)"
prop=
"fiscalSelfSufficiencyRate"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"地方政府债务余额(亿元)"
prop=
"govDebtBalance"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"地方政府债务余额(亿元)"
prop=
"govDebtBalance"
:formatter=
"formatStatus"
width=
"1
9
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"一般债余额(亿元)"
prop=
"generalDebtBalance"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"专项债余额(亿元)"
prop=
"specialDebtBalance"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"地方政府债务限额(亿元)"
prop=
"govDebtLimit"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"城投平台有息债务(亿元)"
prop=
"uipInterestBearingDebt"
:formatter=
"formatStatus"
width=
"
16
0"
align=
"right"
>
<el-table-column
label=
"专项债余额(亿元)"
prop=
"specialDebtBalance"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"地方政府债务限额(亿元)"
prop=
"govDebtLimit"
:formatter=
"formatStatus"
width=
"1
9
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"城投平台有息债务(亿元)"
prop=
"uipInterestBearingDebt"
:formatter=
"formatStatus"
width=
"
20
0"
align=
"right"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
<span>
城投平台有息债务(亿元)
<el-tooltip
popper-class=
"tips"
effect=
"light"
content=
"城投平台有息债务是该地区行政区划下所有的城投公司的短期债务与长期债务合计。其中,短期债务=短期借款+一年内到期的非流动负债+应付短期债券,长期债务=长期借款+应付长期债券。"
placement=
"top"
>
...
...
@@ -83,19 +83,19 @@
</
template
>
</el-table-column>
<el-table-column
label=
"负债率(%)"
prop=
"govDebtToGdpRate"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"负债率(宽口径)(%)"
prop=
"govDebtToGdpRateWild"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"负债率(宽口径)(%)"
prop=
"govDebtToGdpRateWild"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"债务率(%)"
prop=
"govDebtRate"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"债务率(宽口径)(%)"
prop=
"govDebtRateWild"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"债务率(宽口径)(%)"
prop=
"govDebtRateWild"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
></el-table-column>
<!--<el-table-column label="金融机构存款余额(本外币)(亿元)" prop="cgfs" width="160" align="left" />-->
<!--<el-table-column label="金融机构贷款余额(本外币)(亿元)" prop="cgfs" width="160" align="left" />-->
<el-table-column
label=
"第一产业增加值(亿元)"
prop=
"piAddValue"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"第二产业增加值(亿元)"
prop=
"siAddValue"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"第三产业增加值(亿元)"
prop=
"tiAddValue"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"第一产业增加值(亿元)"
prop=
"piAddValue"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"第二产业增加值(亿元)"
prop=
"siAddValue"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"第三产业增加值(亿元)"
prop=
"tiAddValue"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"工业增加值(亿元)"
prop=
"industryAddValue"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"工业总产值(亿元)"
prop=
"industryTotalValue"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"进出口总额(亿美元)"
prop=
"eximTotalValue"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
></el-table-column>
<el-table-column
label=
"社会消费品零售总额(亿元)"
prop=
"trscg"
:formatter=
"formatStatus"
width=
"
16
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"城镇居民人均可支配收入(元)"
prop=
"urbanPcdi"
:formatter=
"formatStatus"
width=
"
16
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"社会消费品零售总额(亿元)"
prop=
"trscg"
:formatter=
"formatStatus"
width=
"
20
0"
align=
"right"
></el-table-column>
<el-table-column
label=
"城镇居民人均可支配收入(元)"
prop=
"urbanPcdi"
:formatter=
"formatStatus"
width=
"
21
0"
align=
"right"
></el-table-column>
</el-table>
<div
class=
"empty"
v-if=
"tableDataTotal === 0 && !isSkeleton"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
...
...
@@ -324,6 +324,26 @@
message
:
'功能正在开发中'
,
type
:
'warning'
});
},
clickTo
(
item
){
let
params
=
{
// id:item.id,
province
:
item
.
area
?
item
.
area
:
item
.
city
?
item
.
city
:
item
.
province
,
}
if
(
item
.
areaId
){
params
.
provinceId
=
item
.
provinceId
params
.
cityId
=
item
.
cityId
params
.
areaId
=
item
.
areaId
}
else
if
(
item
.
cityId
!=
0
){
params
.
provinceId
=
item
.
provinceId
params
.
cityId
=
item
.
cityId
}
else
{
params
.
provinceId
=
item
.
provinceId
}
this
.
$router
.
push
({
path
:
'/macro/economies'
,
query
:
params
})
}
}
}
...
...
@@ -345,7 +365,7 @@
width
:
110px
;
}
::v-deep
.el-cascader
{
width
:
2
2
0px
;
width
:
2
0
0px
;
.el-cascader__tags
{
flex-wrap
:
inherit
;
.el-tag
{
...
...
@@ -356,13 +376,14 @@
}
}
::v-deep
.el-select-dropdown
{
left
:
0
!
important
;
.el-select-dropdown__item.hover
{
color
:
#0081FF
;
}
}
.content
{
background
:
#ffffff
;
padding
:
16px
;
padding
:
16px
16px
0
;
margin-top
:
12px
;
/*height: calc(100vh - 300px);*/
.table-item
{
...
...
@@ -405,7 +426,6 @@
overflow-y
:
clip
;
}
th
{
font-size
:
12px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/src/views/macro/nationalEconomies/component/tdjy.vue
View file @
232ac571
...
...
@@ -11,7 +11,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"gyf
lState
"
>
<div
class=
"content_box"
v-if=
"gyf
sList.length > 0 && !isSkeleton
"
>
<div
class=
"box-left"
>
<div
id=
"echarts1"
style=
"height: 280px"
></div>
</div>
...
...
@@ -36,12 +36,12 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"
!gyflState
"
>
<div
class=
"empty"
v-if=
"
gyfsList.length === 0 && !isSkeleton
"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
tdytState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目土地用途
</span>
...
...
@@ -50,7 +50,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"tdytState"
>
<div
class=
"content_box"
v-if=
"tdyt
List.length > 0 && !tdyt
State"
>
<div
class=
"box-left"
>
<div
id=
"echarts2"
style=
"height: 280px"
></div>
</div>
...
...
@@ -75,12 +75,12 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"!tdytState"
>
<div
class=
"empty"
v-if=
"
tdytList.length === 0 &&
!tdytState"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
topState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目地区Top10
</span>
...
...
@@ -92,7 +92,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"topList.length > 0 && !
isSkeleton
"
>
<div
class=
"content_box"
v-if=
"topList.length > 0 && !
topState
"
>
<div
class=
"box-left"
style=
"width: 60%;"
>
<div
id=
"echarts3"
style=
"height: 300px"
></div>
</div>
...
...
@@ -117,18 +117,18 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"topList.length === 0 && !
isSkeleton
"
>
<div
class=
"empty"
v-if=
"topList.length === 0 && !
topState
"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
nftjState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目年份统计
</span>
</div>
</div>
<div
class=
"content_box"
>
<div
class=
"content_box"
v-if=
"nftjList.length > 0 && !nftjState"
>
<div
class=
"box-left"
style=
"width: 60%;"
>
<div
id=
"echarts4"
style=
"height: 300px"
></div>
</div>
...
...
@@ -187,6 +187,7 @@ export default {
gyflState
:
true
,
tdytState
:
true
,
topState
:
true
,
nftjState
:
true
,
// typeName:['住宅用地','工业用地','城镇住宅用地','其他商服用地','公共设施用地','公路用地','城镇村道路用地','公园与绿地',
// '工矿仓储用地','零售商业用地','科研用地','街巷用地','机关团体用地','商服用地','商务金融用地']
}
...
...
@@ -194,15 +195,16 @@ export default {
created
()
{
this
.
dataRegion
()
this
.
yearsData
()
setTimeout
(()
=>
{
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
getCountLandMarketByType
()
this
.
getCountLandMarketByTypeTd
()
this
.
getCountLandMarketByProvince
()
this
.
getCountLandMarketByYear
()
this
.
isSkeleton
=
false
;
},
1500
);
},
mounted
()
{
})
},
beforeDestroy
(){
...
...
@@ -211,7 +213,8 @@ export default {
getCountLandMarketByType
(){
// this.isSkeleton = true
countLandMarketByType
({
type
:
'供应方式'
,
yearStr
:
this
.
years
.
join
(
","
)}).
then
(
res
=>
{
// this.isSkeleton = false
this
.
isSkeleton
=
false
this
.
gyflState
=
false
this
.
gyfsList
=
res
.
data
.
provinceDate
;
var
list
=
[];
for
(
var
i
=
0
;
i
<
res
.
data
.
provinceDate
.
length
;
i
++
){
...
...
@@ -222,12 +225,9 @@ export default {
list
.
push
(
obj
)
}
if
(
list
.
length
>
0
){
this
.
gyflState
=
true
this
.
$nextTick
(()
=>
{
this
.
initChart1
(
list
)
})
}
else
{
this
.
gyflState
=
false
;
}
})
},
...
...
@@ -235,9 +235,9 @@ export default {
// this.isSkeleton = true
countLandMarketByType
({
type
:
'土地用途'
,
yearStr
:
this
.
years1
.
join
(
","
)}).
then
(
res
=>
{
// this.isSkeleton = false
this
.
tdytState
=
false
;
this
.
tdytList
=
res
.
data
.
provinceDate
;
if
(
res
.
data
.
provinceDate
.
length
>
0
){
this
.
tdytState
=
true
var
list
=
[];
for
(
var
i
=
0
;
i
<
10
;
i
++
){
var
obj
=
{};
...
...
@@ -251,10 +251,7 @@ export default {
this
.
initChart2
(
list
)
})
}
}
else
{
this
.
tdytState
=
false
;
}
})
},
getCountLandMarketByProvince
(){
...
...
@@ -264,9 +261,8 @@ export default {
if
(
this
.
address
.
length
>
0
){
params
.
provinceId
=
this
.
address
.
join
(
","
)
}
// this.isSkeleton = true
countLandMarketByProvince
(
params
).
then
(
res
=>
{
// this.isSkeleton
= false
this
.
topState
=
false
this
.
topList
=
res
.
data
.
provinceDate
;
var
list
=
[];
if
(
res
.
data
.
provinceDate
){
...
...
@@ -288,10 +284,10 @@ export default {
},
getCountLandMarketByYear
(){
countLandMarketByYear
().
then
(
res
=>
{
this
.
nftjState
=
false
;
this
.
nftjList
=
res
.
data
.
yearDate
;
var
list
=
[];
if
(
res
.
data
.
yearDate
){
this
.
topState
=
true
for
(
var
i
=
0
;
i
<
res
.
data
.
yearDate
.
length
;
i
++
){
var
obj
=
{};
obj
.
type
=
res
.
data
.
yearDate
[
i
].
type
;
...
...
@@ -300,11 +296,11 @@ export default {
obj
.
typeList
=
res
.
data
.
yearDate
[
i
].
typeList
list
.
push
(
obj
)
}
this
.
$nextTick
(()
=>
{
this
.
initChart4
(
list
)
}
)
}
else
{
this
.
topState
=
false
;
if
(
list
.
length
>
0
)
{
this
.
$nextTick
(()
=>
{
this
.
initChart4
(
list
)
})
}
}
})
},
...
...
dsk-operate-ui/src/views/macro/nationalEconomies/component/zhongbiao.vue
View file @
232ac571
...
...
@@ -11,7 +11,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"
gyflState
"
>
<div
class=
"content_box"
v-if=
"
xmtjList.length > 0 && !isSkeleton
"
>
<div
class=
"box-left"
>
<div
id=
"echarts1"
style=
"height: 280px"
></div>
</div>
...
...
@@ -38,12 +38,12 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"
!gyflState
"
>
<div
class=
"empty"
v-if=
"
xmtjList.length === 0 && !isSkeleton
"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
zbtjState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国各地区中标统计TOP10
</span>
...
...
@@ -52,7 +52,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"t
dyt
State"
>
<div
class=
"content_box"
v-if=
"t
opList.length > 0 && !zbtj
State"
>
<div
class=
"box-left"
>
<div
id=
"echarts2"
style=
"height: 280px"
></div>
</div>
...
...
@@ -79,12 +79,12 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"
!tdyt
State"
>
<div
class=
"empty"
v-if=
"
topList.length === 0 && !zbtj
State"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
jefxState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国中标金额分析
</span>
...
...
@@ -93,7 +93,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"
tdyt
State"
>
<div
class=
"content_box"
v-if=
"
zbjeList.length > 0 && !jefx
State"
>
<div
class=
"box-left"
>
<div
id=
"echarts3"
style=
"height: 280px"
></div>
</div>
...
...
@@ -118,18 +118,18 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"
!tdyt
State"
>
<div
class=
"empty"
v-if=
"
zbjeList.length === 0 && !jefx
State"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
qsfxState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国中标趋势分析
</span>
</div>
</div>
<div
class=
"content_box"
>
<div
class=
"content_box"
v-if=
"zbqsList.length > 0 && !qsfxState"
>
<div
class=
"box-left"
>
<div
id=
"echarts4"
style=
"height: 300px"
></div>
</div>
...
...
@@ -154,8 +154,12 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"zbqsList.length === 0 && !qsfxState"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
xflState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国中标下浮率分析
</span>
...
...
@@ -164,7 +168,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"
tdyt
State"
>
<div
class=
"content_box"
v-if=
"
xflList.length > 0 && !xfl
State"
>
<div
class=
"box-left"
>
<div
id=
"echarts5"
style=
"height: 280px"
></div>
</div>
...
...
@@ -189,17 +193,17 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"
!tdyt
State"
>
<div
class=
"empty"
v-if=
"
xflList.length === 0 && !xfl
State"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
</div>
<div
v-if=
"!
isSkeleton
"
class=
"td_content"
>
<div
v-if=
"!
xmlxState
"
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国中标业绩项目类型下浮率
</span>
<el-select
@
change=
"handleYears(6)"
style=
"margin-right: 8px"
v-model=
"address"
collapse-tags
filterable
class=
"form-content-width"
placeholder=
"地区筛选"
:popper-append-to-body=
'false'
size=
"small"
>
<el-select
@
change=
"handleYears(6)"
style=
"margin-right: 8px"
v-model=
"address"
c
learable
c
ollapse-tags
filterable
class=
"form-content-width"
placeholder=
"地区筛选"
:popper-append-to-body=
'false'
size=
"small"
>
<el-option
v-for=
"(item, index) in addressList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
<el-select
v-model=
"years4"
@
change=
"handleYears(6)"
collapse-tags
filterable
class=
"form-content-width"
placeholder=
"请选择"
:popper-append-to-body=
'false'
size=
"small"
>
...
...
@@ -207,7 +211,7 @@
</el-select>
</div>
</div>
<div
class=
"content_box"
v-if=
"
top
List.length > 0 && !isSkeleton"
>
<div
class=
"content_box"
v-if=
"
xmxfl
List.length > 0 && !isSkeleton"
>
<div
class=
"box-left"
>
<div
id=
"echarts6"
style=
"height: 300px"
></div>
</div>
...
...
@@ -233,7 +237,7 @@
</el-table>
</div>
</div>
<div
class=
"empty"
v-if=
"
topList.length === 0 && !isSkeleton
"
>
<div
class=
"empty"
v-if=
"
xmxflList.length === 0 && !xmlxState
"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,暂无数据展示
</div>
</div>
...
...
@@ -269,24 +273,24 @@
xflList
:[],
xmxflList
:[],
isSkeleton
:
true
,
gyflState
:
true
,
tdytState
:
true
,
topState
:
true
,
zbtjState
:
true
,
jefxState
:
true
,
qsfxState
:
true
,
xflState
:
true
,
xmlxState
:
true
,
}
},
created
()
{
this
.
dataRegion
()
this
.
yearsData
()
this
.
getCountBidByType
()
this
.
$nextTick
(()
=>
{
})
this
.
getCountBidGroupByProvince
()
this
.
getRangeBidMoney
()
this
.
getRangeBidFiveYears
()
this
.
getLowerRateByYear
()
this
.
getLowerRangeTenderType
()
setTimeout
(()
=>
{
this
.
getCountBidGroupByProvince
()
this
.
getRangeBidMoney
()
this
.
getRangeBidFiveYears
()
this
.
getLowerRateByYear
()
this
.
getLowerRangeTenderType
()
},
1000
);
},
mounted
()
{
...
...
@@ -322,6 +326,7 @@
yearStr
:
this
.
years1
.
join
(
","
)
}
countBidGroupByProvince
(
params
).
then
(
res
=>
{
this
.
zbtjState
=
false
;
this
.
topList
=
res
.
data
;
if
(
res
.
data
){
this
.
$nextTick
(()
=>
{
...
...
@@ -335,6 +340,7 @@
yearStr
:
this
.
years2
.
join
(
","
)
}
rangeBidMoney
(
params
).
then
(
res
=>
{
this
.
jefxState
=
false
;
this
.
zbjeList
=
res
.
data
;
var
list
=
[];
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
){
...
...
@@ -353,6 +359,7 @@
},
getRangeBidFiveYears
(){
rangeBidFiveYears
().
then
(
res
=>
{
this
.
qsfxState
=
false
;
this
.
zbqsList
=
res
.
data
;
if
(
res
.
data
){
this
.
$nextTick
(()
=>
{
...
...
@@ -366,6 +373,7 @@
yearStr
:
this
.
years3
}
lowerRateByYear
(
params
).
then
(
res
=>
{
this
.
xflState
=
false
;
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
){
res
.
data
[
i
].
rate
=
res
.
data
[
i
].
rate
.
toFixed
(
2
)
}
...
...
@@ -385,7 +393,7 @@
params
.
provinceId
=
this
.
address
}
lowerRangeTenderType
(
params
).
then
(
res
=>
{
this
.
xmlxState
=
false
;
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
res
.
data
[
i
].
typeList
.
length
;
j
++
){
if
(
res
.
data
[
i
].
typeList
[
j
].
tenderType
===
'施工'
){
...
...
@@ -526,7 +534,6 @@
},
initChart2
(
data
)
{
this
.
$nextTick
(()
=>
{
// console.log(typeList)
let
myChart
=
echarts
.
init
(
document
.
getElementById
(
"echarts2"
))
let
seriesData
=
[]
let
color
=
[
'#FCD68A'
,
'#67B3FD'
,
'#FFB8AD'
,
'#FFD7AD'
,
'#A9F1E5'
,
'#D0FAB7'
,
'#ADC0FF'
,
'#BEECFF'
,
'#81D5BC'
,
'#FFE48A'
];
...
...
dsk-operate-ui/src/views/macro/nationalEconomies/index.vue
View file @
232ac571
...
...
@@ -6,6 +6,7 @@
<el-tab-pane
label=
"全国商机项目分析"
name=
"second"
></el-tab-pane>
<el-tab-pane
label=
"全国中标市场分析"
name=
"third"
></el-tab-pane>
<el-tab-pane
label=
"全国建筑企业分析"
name=
"fourth"
></el-tab-pane>
<el-tab-pane
label=
"BI统计分析"
name=
"five"
></el-tab-pane>
</el-tabs>
</div>
...
...
@@ -13,6 +14,7 @@
<Sjxmfx
v-if=
"activeName === 'second'"
></Sjxmfx>
<Zhongbiao
v-if=
"activeName === 'third'"
></Zhongbiao>
<Jzqyfx
v-if=
"activeName === 'fourth'"
></Jzqyfx>
<BI
v-if=
"activeName === 'five'"
></BI>
</div>
</
template
>
...
...
@@ -21,10 +23,11 @@
import
Sjxmfx
from
'./component/sjxmfx'
import
Jzqyfx
from
'./component/jzqyfx'
import
Zhongbiao
from
'./component/zhongbiao'
import
BI
from
'./component/BI'
export
default
{
name
:
'NationalEconomies'
,
components
:
{
Economic
,
Sjxmfx
,
Jzqyfx
,
Zhongbiao
Economic
,
Sjxmfx
,
Jzqyfx
,
Zhongbiao
,
BI
},
data
()
{
return
{
...
...
dsk-operate-ui/src/views/macro/rmation/index.vue
deleted
100644 → 0
View file @
50073e07
<
template
>
<div
class=
"app-container"
>
区域资讯
</div>
</
template
>
<
script
>
export
default
{
name
:
'Rmation'
,
data
()
{
return
{
}
},
created
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
dsk-operate-ui/src/views/macro/urban/index.vue
View file @
232ac571
...
...
@@ -92,8 +92,8 @@
</div>
</div>
<el-input
class=
"search-input"
placeholder=
"输入企业名称查询"
v-model=
"queryParams.keyword"
clearable
@
clear=
"handleKeyword()"
>
<
template
slot=
"prepend"
><i
class=
"el-icon-search"
></i></
template
>
<el-button
slot=
"append"
@
click=
"handleKeyword"
>
搜索
</el-button>
<
i
slot=
"prefix"
class=
"el-icon-search"
></i
>
<el-button
slot=
"append"
@
click=
"handleKeyword
()
"
>
搜索
</el-button>
</el-input>
</div>
<div
class=
"list-box"
>
...
...
@@ -152,7 +152,7 @@
element-loading-text=
"Loading"
@
sort-change=
"sortChange"
border
max-height=
"640
"
v-horizontal-scroll=
"'hover'
"
fit
highlight-current-row
>
...
...
@@ -202,34 +202,34 @@
<el-table-column
prop=
"restrictedAssets"
label=
"受限资产(亿元)"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"150"
align=
"right"
/>
<el-table-column
prop=
"accountsReceivable"
label=
"应收账款(亿元)"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"150"
align=
"right"
/>
<el-table-column
prop=
"otherReceivable"
label=
"其他应收款(亿元)"
:formatter=
"formatStatus"
sortable=
"custom"
width=
"160"
align=
"right"
/>
<el-table-column
prop=
"econData001"
label=
"公益性&准公益性主营占比(%)"
:formatter=
"formatStatus"
width=
"
16
0"
align=
"right"
/>
<el-table-column
prop=
"receivableFromGovRatio"
label=
"应收类款项来自政府占比(%)"
:formatter=
"formatStatus"
width=
"
16
0"
align=
"right"
/>
<el-table-column
prop=
"econData001"
label=
"公益性&准公益性主营占比(%)"
:formatter=
"formatStatus"
width=
"
22
0"
align=
"right"
/>
<el-table-column
prop=
"receivableFromGovRatio"
label=
"应收类款项来自政府占比(%)"
:formatter=
"formatStatus"
width=
"
22
0"
align=
"right"
/>
<el-table-column
prop=
"govSubsidy"
label=
"政府补助(亿元)"
:formatter=
"formatStatus"
width=
"130"
align=
"right"
/>
<el-table-column
prop=
"specialPayable"
label=
"专项应付款(亿元)"
:formatter=
"formatStatus"
width=
"1
4
0"
align=
"right"
/>
<el-table-column
prop=
"specialPayable"
label=
"专项应付款(亿元)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"operatingIncome"
label=
"营业收入(亿元)"
:formatter=
"formatStatus"
width=
"130"
align=
"right"
/>
<el-table-column
prop=
"belongNetProfit"
label=
"归母净利润(亿元)"
:formatter=
"formatStatus"
width=
"1
4
0"
align=
"right"
/>
<el-table-column
prop=
"roe"
label=
"净资产收益率(%)"
:formatter=
"formatStatus"
width=
"1
4
0"
align=
"right"
/>
<el-table-column
prop=
"netOperatingCashFlow"
label=
"经营现金流量净额(亿元)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"netFinancingCashFlow"
label=
"筹资现金流量净额(亿元)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"netInvestmentCashFlow"
label=
"投资现金流量净额(亿元)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"belongNetProfit"
label=
"归母净利润(亿元)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"roe"
label=
"净资产收益率(%)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"netOperatingCashFlow"
label=
"经营现金流量净额(亿元)"
:formatter=
"formatStatus"
width=
"1
9
0"
align=
"right"
/>
<el-table-column
prop=
"netFinancingCashFlow"
label=
"筹资现金流量净额(亿元)"
:formatter=
"formatStatus"
width=
"1
9
0"
align=
"right"
/>
<el-table-column
prop=
"netInvestmentCashFlow"
label=
"投资现金流量净额(亿元)"
:formatter=
"formatStatus"
width=
"1
9
0"
align=
"right"
/>
<el-table-column
prop=
"totalLiabilities"
label=
"总负债(亿元)"
:formatter=
"formatStatus"
width=
"120"
align=
"right"
/>
<el-table-column
prop=
"uipInterestBearingDebt"
label=
"有息债务(亿元)"
:formatter=
"formatStatus"
width=
"140"
align=
"right"
/>
<el-table-column
prop=
"econData002"
label=
"有息债务/总负债(%)"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
/>
<el-table-column
prop=
"tdr"
label=
"资产负债率(%)"
:formatter=
"formatStatus"
width=
"140"
align=
"right"
/>
<el-table-column
prop=
"ofcb"
label=
"综合融资成本(%)"
:formatter=
"formatStatus"
width=
"150"
align=
"right"
/>
<el-table-column
prop=
"cashRatio"
label=
"现金比率
"
:formatter=
"formatStatus"
width=
"11
0"
align=
"right"
/>
<el-table-column
prop=
"cashFlowRatio"
label=
"现金流量比率
"
:formatter=
"formatStatus"
width=
"12
0"
align=
"right"
/>
<el-table-column
prop=
"cashDebtRatio"
label=
"现金到期债务比
"
:formatter=
"formatStatus"
width=
"12
0"
align=
"right"
/>
<el-table-column
prop=
"cashRatio"
label=
"现金比率
(%)"
:formatter=
"formatStatus"
width=
"14
0"
align=
"right"
/>
<el-table-column
prop=
"cashFlowRatio"
label=
"现金流量比率
(%)"
:formatter=
"formatStatus"
width=
"16
0"
align=
"right"
/>
<el-table-column
prop=
"cashDebtRatio"
label=
"现金到期债务比
(%)"
:formatter=
"formatStatus"
width=
"16
0"
align=
"right"
/>
<el-table-column
prop=
"creditBalance"
label=
"授信余额(亿元)"
:formatter=
"formatStatus"
width=
"130"
align=
"right"
/>
<el-table-column
prop=
"econData003"
label=
"授信余额/全部债务(%)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"econData003"
label=
"授信余额/全部债务(%)"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
/>
<el-table-column
prop=
"ebitdaIcr"
label=
"EBITDA保障倍数"
:formatter=
"formatStatus"
width=
"150"
align=
"right"
/>
<el-table-column
prop=
"ppnBalanceProp"
label=
"私募债余额占比(%)"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
/>
<el-table-column
prop=
"econData004"
label=
"一年内到期债权占比(%)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"econData005"
label=
"债券余额/有息债务(%)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"econData004"
label=
"一年内到期债权占比(%)"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
/>
<el-table-column
prop=
"econData005"
label=
"债券余额/有息债务(%)"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
/>
<el-table-column
prop=
"loan"
label=
"借款余额(亿元)"
:formatter=
"formatStatus"
width=
"140"
align=
"right"
/>
<el-table-column
prop=
"econData006"
label=
"借款/有息债务(%)"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
/>
<el-table-column
prop=
"nonStandardBalance"
label=
"非标余额(亿元)"
:formatter=
"formatStatus"
width=
"140"
align=
"right"
/>
<el-table-column
prop=
"nonStandardRatio"
label=
"非标余额/有息债务(%)"
:formatter=
"formatStatus"
width=
"1
6
0"
align=
"right"
/>
<el-table-column
prop=
"nonStandardRatio"
label=
"非标余额/有息债务(%)"
:formatter=
"formatStatus"
width=
"1
8
0"
align=
"right"
/>
<el-table-column
prop=
"guaranteeAmount"
label=
"对外担保金额(亿元)"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
/>
<el-table-column
prop=
"guaranteeRatio"
label=
"对外担保比例(%)"
:formatter=
"formatStatus"
width=
"160"
align=
"right"
/>
<el-table-column
prop=
"developmentZone"
label=
"所属开发区"
:formatter=
"formatStatus"
width=
"160"
/>
...
...
@@ -430,6 +430,7 @@ export default {
methods
:
{
scrolling
()
{
let
el
=
document
.
getElementsByClassName
(
"el-table__fixed-header-wrapper"
)[
0
]
// let scrollTop =window.pageYOffset ||document.documentElement.scrollTop ||document.body.scrollTop;
// if (scrollTop>368){
// let top = scrollTop-368
...
...
@@ -830,7 +831,6 @@ export default {
.content
{
background
:
#ffffff
;
padding
:
16px
;
margin-bottom
:
16px
;
border-radius
:
4px
;
.search
{
margin-top
:
22px
;
...
...
@@ -859,8 +859,8 @@ export default {
left
:
0
;
z-index
:
999
;
.item
{
margin-bottom
:
5px
;
/*display: flex;*/
/*margin-bottom: 5px;*/
display
:
flex
;
/*align-items: center;*/
font-size
:
14px
;
.wrap_label
{
...
...
@@ -868,12 +868,16 @@ export default {
margin-right
:
12px
;
line-height
:
30px
;
float
:
left
;
width
:
85px
;
text-align
:
right
;
}
.item_ckquery
{
position
:
relative
;
width
:
700px
;
span
{
color
:
#232323
;
padding
:
5px
12px
;
padding
:
2px
10px
;
margin-bottom
:
4px
;
display
:
inline-block
;
cursor
:
pointer
;
margin-right
:
8px
;
...
...
@@ -906,39 +910,44 @@ export default {
::v-deep
.search-input
{
/*::v-deep .el-input{*/
width
:
235px
;
height
:
32px
;
.el-input__inner
:focus
{
border-color
:
#e0e0e0
;
}
.el-input-group__prepend
:first-child
{
padding
:
0
;
background-color
:
#ffffff
;
border-right
:
0
;
padding-left
:
8px
;
i
{
color
:
#0081FF
;
}
}
height
:
30px
;
border
:
1px
solid
#e0e0e0
;
.el-input__inner
{
border-left
:
0
;
height
:
32px
;
line-height
:
32px
;
height
:
30px
;
line-height
:
30px
;
font-size
:
12px
;
padding-left
:
8px
;
border-right
:
0
;
border
:
0
;
}
.el-input__suffix
{
margin-top
:
-1px
;
}
.el-icon-search
{
font-size
:
14px
;
line-height
:
32px
;
color
:
#0081FF
;
margin-left
:
6px
;
margin-right
:
4px
;
}
.el-input__inner
:focus
{
/*border-color: #0081FF;*/
}
.el-input__inner
:focus
~
.el-input-group__append
{
/*border: 1px solid #0081FF;*/
color
:
#ffffff
;
background
:
#0081FF
;
}
.el-input-group__append
:last-child
{
width
:
60px
;
padding
:
0
;
text-align
:
center
;
background
:
#F5F5F5
;
color
:
#0081FF
;
border-left
:
0
;
border-radius
:
0
;
border-right
:
0
;
border-radius
:
0
2px
2px
0
;
border
:
0
;
&
:hover
{
color
:
#ffffff
;
background
:
#0081FF
;
}
}
/*}*/
}
...
...
@@ -984,7 +993,6 @@ export default {
overflow-y
:
clip
;
}
th
{
font-size
:
12px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
...
...
dsk-operate-ui/vue.config.js
View file @
232ac571
...
...
@@ -35,9 +35,9 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: `http://47.104.91.229:9099/prod-api`,
target
:
`http://192.168.0.165:9098`
,
//施
//
target: `http://192.168.0.165:9098`,//施
// target: `http://192.168.60.6:9098`,//谭
// target: `http://139.9.157.49:9099
`,//测试
target
:
`http://139.9.157.49:9099/prod-api
`
,
//测试
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/SysDeptVo.java
View file @
232ac571
...
...
@@ -2,25 +2,14 @@ package com.dsk.system.domain.vo;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.dsk.common.annotation.ExcelDictFormat
;
import
com.dsk.common.convert.ExcelDictConvert
;
import
com.dsk.common.tenant.core.TenantEntity
;
import
com.dsk.system.domain.SysDept
;
import
com.dsk.system.domain.SysTenantPackage
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
io.github.linpeilie.annotations.AutoMapper
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.Email
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 部门表 sys_dept
...
...
@@ -105,4 +94,10 @@ public class SysDeptVo implements Serializable {
@ExcelProperty
(
value
=
"该部门是否存在用户"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
readConverterExp
=
"true=存在,false=删除"
)
private
Boolean
existUsers
;
/**
* 创建时间
*/
@ExcelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
}
dsk-system/src/main/java/com/dsk/system/domain/vo/SysTenantPackageSelectVo.java
View file @
232ac571
...
...
@@ -9,7 +9,6 @@ import io.github.linpeilie.annotations.AutoMapper;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author sxk
...
...
@@ -35,4 +34,10 @@ public class SysTenantPackageSelectVo implements Serializable {
@ExcelProperty
(
value
=
"套餐名称"
)
private
String
packageName
;
/**
* 状态(0正常 1停用)
*/
@ExcelProperty
(
value
=
"状态"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
}
dsk-system/src/main/java/com/dsk/system/domain/vo/SysUserImportVo.java
View file @
232ac571
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
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -18,38 +16,21 @@ import java.io.Serializable;
@NoArgsConstructor
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
public
class
SysUserImportVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 用户ID
*/
@ExcelProperty
(
value
=
"用户序号"
)
private
Long
userId
;
/**
* 部门ID
*/
@ExcelProperty
(
value
=
"部门编号"
)
private
Long
deptId
;
//如需修改以下字段,需同步修改
private
static
final
long
serialVersionUID
=
1L
;
/**
*
用户账号
*
所属部门
*/
@ExcelProperty
(
value
=
"登录名称"
)
private
String
userName
;
private
String
deptName
;
/**
* 用户昵称
*/
@ExcelProperty
(
value
=
"用户
名
称"
)
@ExcelProperty
(
value
=
"用户
昵
称"
)
private
String
nickName
;
/**
* 用户邮箱
*/
@ExcelProperty
(
value
=
"用户邮箱"
)
private
String
email
;
/**
* 手机号码
*/
...
...
@@ -57,17 +38,21 @@ public class SysUserImportVo implements Serializable {
private
String
phonenumber
;
/**
* 用户
性别
* 用户
角色
*/
@ExcelProperty
(
value
=
"用户性别"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
dictType
=
"sys_user_sex"
)
private
String
sex
;
@ExcelProperty
(
value
=
"用户角色"
)
private
String
roleName
;
/**
* 帐号状态(0正常 1停用)
* 失败原因
* 该字段无需同步到模板中
*/
@ExcelProperty
(
value
=
"帐号状态"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
dictType
=
"sys_normal_disable"
)
private
String
status
;
private
String
failReason
;
public
SysUserImportVo
(
String
deptName
,
String
nickName
,
String
phonenumber
,
String
roleName
)
{
this
.
deptName
=
deptName
.
replace
(
" "
,
""
);
this
.
nickName
=
nickName
.
replace
(
" "
,
""
);
this
.
phonenumber
=
phonenumber
;
this
.
roleName
=
roleName
.
replace
(
" "
,
""
);
}
}
dsk-system/src/main/java/com/dsk/system/listener/SysUserImportListener.java
View file @
232ac571
...
...
@@ -5,18 +5,23 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.dsk.system.domain.vo.SysUserImportVo
;
import
com.dsk.system.domain.SysUser
;
import
com.dsk.common.excel.ExcelListener
;
import
com.dsk.common.excel.ExcelResult
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.ValidatorUtils
;
import
com.dsk.common.utils.spring.SpringUtils
;
import
com.dsk.system.domain.SysDept
;
import
com.dsk.system.domain.SysRole
;
import
com.dsk.system.domain.SysUser
;
import
com.dsk.system.domain.vo.SysUserImportVo
;
import
com.dsk.system.service.ISysConfigService
;
import
com.dsk.system.service.ISysDeptService
;
import
com.dsk.system.service.ISysRoleService
;
import
com.dsk.system.service.ISysUserService
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -28,13 +33,15 @@ import java.util.List;
public
class
SysUserImportListener
extends
AnalysisEventListener
<
SysUserImportVo
>
implements
ExcelListener
<
SysUserImportVo
>
{
private
final
ISysUserService
userService
;
private
final
ISysDeptService
deptService
;
private
final
ISysRoleService
roleService
;
private
final
String
password
;
private
final
Boolean
isUpdateSupport
;
private
final
String
operName
;
private
ArrayList
<
SysUserImportVo
>
resultList
=
new
ArrayList
<>();
private
int
successNum
=
0
;
private
int
failureNum
=
0
;
private
final
StringBuilder
successMsg
=
new
StringBuilder
();
...
...
@@ -43,6 +50,8 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
public
SysUserImportListener
(
Boolean
isUpdateSupport
)
{
String
initPassword
=
SpringUtils
.
getBean
(
ISysConfigService
.
class
).
selectConfigByKey
(
"sys.user.initPassword"
);
this
.
userService
=
SpringUtils
.
getBean
(
ISysUserService
.
class
);
this
.
deptService
=
SpringUtils
.
getBean
(
ISysDeptService
.
class
);
this
.
roleService
=
SpringUtils
.
getBean
(
ISysRoleService
.
class
);
this
.
password
=
BCrypt
.
hashpw
(
initPassword
);
this
.
isUpdateSupport
=
isUpdateSupport
;
this
.
operName
=
LoginHelper
.
getUsername
();
...
...
@@ -50,13 +59,25 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
@Override
public
void
invoke
(
SysUserImportVo
userVo
,
AnalysisContext
context
)
{
SysUser
user
=
this
.
userService
.
selectUserByUserName
(
userVo
.
getUserName
());
SysUser
user
=
this
.
userService
.
selectUserByPhonenumber
(
userVo
.
getPhonenumber
());
SysDept
dept
=
this
.
deptService
.
selectDeptByDeptName
(
userVo
.
getDeptName
());
SysRole
role
=
this
.
roleService
.
selectRoleByRoleName
(
userVo
.
getRoleName
());
try
{
if
(
ObjectUtil
.
isNull
(
dept
))
{
throw
new
ServiceException
(
"部门不存在"
);
}
if
(
ObjectUtil
.
isNull
(
role
))
{
throw
new
ServiceException
(
"角色不存在"
);
}
// 验证是否存在这个用户
if
(
ObjectUtil
.
isNull
(
user
))
{
user
=
BeanUtil
.
toBean
(
userVo
,
SysUser
.
class
);
user
.
setUserName
(
userVo
.
getPhonenumber
());
user
.
setDeptId
(
dept
.
getDeptId
());
user
.
setDept
(
dept
);
user
.
setRoleId
(
role
.
getRoleId
());
user
.
setRoleIds
(
new
Long
[]{
role
.
getRoleId
()});
ValidatorUtils
.
validate
(
user
);
user
.
setPassword
(
password
);
user
.
setCreateBy
(
operName
);
userService
.
insertUser
(
user
);
successNum
++;
...
...
@@ -65,6 +86,11 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
Long
userId
=
user
.
getUserId
();
user
=
BeanUtil
.
toBean
(
userVo
,
SysUser
.
class
);
user
.
setUserId
(
userId
);
user
.
setUserName
(
userVo
.
getPhonenumber
());
user
.
setDeptId
(
dept
.
getDeptId
());
user
.
setDept
(
dept
);
user
.
setRoleId
(
role
.
getRoleId
());
user
.
setRoleIds
(
new
Long
[]{
role
.
getRoleId
()});
ValidatorUtils
.
validate
(
user
);
userService
.
checkUserAllowed
(
user
);
userService
.
checkUserDataScope
(
user
.
getUserId
());
...
...
@@ -75,11 +101,15 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
}
else
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
).
append
(
failureNum
).
append
(
"、账号 "
).
append
(
user
.
getUserName
()).
append
(
" 已存在"
);
userVo
.
setFailReason
(
"手机号已存在"
);
resultList
.
add
(
userVo
);
}
}
catch
(
Exception
e
)
{
failureNum
++;
String
msg
=
"<br/>"
+
failureNum
+
"、账号 "
+
user
.
getUserName
()
+
" 导入失败:"
;
String
msg
=
"<br/>"
+
failureNum
+
"、账号 "
+
user
Vo
.
getPhonenumber
()
+
" 导入失败:"
;
failureMsg
.
append
(
msg
).
append
(
e
.
getMessage
());
userVo
.
setFailReason
(
e
.
getMessage
());
resultList
.
add
(
userVo
);
log
.
error
(
msg
,
e
);
}
}
...
...
@@ -106,7 +136,7 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
@Override
public
List
<
SysUserImportVo
>
getList
()
{
return
null
;
return
resultList
;
}
@Override
...
...
dsk-system/src/main/java/com/dsk/system/service/ISysDeptService.java
View file @
232ac571
...
...
@@ -51,6 +51,14 @@ public interface ISysDeptService {
*/
SysDept
selectDeptById
(
Long
deptId
);
/**
* 根据部门名称查询部门
*
* @param deptName 部门名称
* @return 部门
*/
SysDept
selectDeptByDeptName
(
String
deptName
);
/**
* 根据ID查询所有子部门数(正常状态)
*
...
...
@@ -113,4 +121,5 @@ public interface ISysDeptService {
* @return 结果
*/
int
deleteDeptById
(
Long
deptId
);
}
dsk-system/src/main/java/com/dsk/system/service/ISysRoleService.java
View file @
232ac571
...
...
@@ -42,6 +42,14 @@ public interface ISysRoleService {
*/
Set
<
String
>
selectRolePermissionByUserId
(
Long
userId
);
/**
* 根据角色名称查询角色
*
* @param roleName 角色名称
* @return 角色
*/
SysRole
selectRoleByRoleName
(
String
roleName
);
/**
* 查询所有角色
*
...
...
@@ -178,4 +186,5 @@ public interface ISysRoleService {
int
insertAuthUsers
(
Long
roleId
,
Long
[]
userIds
);
void
cleanOnlineUserByRole
(
Long
roleId
);
}
dsk-system/src/main/java/com/dsk/system/service/SysLoginService.java
View file @
232ac571
...
...
@@ -187,19 +187,64 @@ public class SysLoginService {
return
StpUtil
.
getTokenValue
();
}
public
String
smsLogin
(
String
phonenumber
,
String
smsCode
)
{
// 通过手机号查找用户
SysUser
user
=
loadUserByPhonenumber
(
phonenumber
);
public
LoginVo
smsLogin
(
String
username
,
String
smsCode
)
{
String
tenantId
=
null
;
// if(ReUtil.isMatch(RegexPool.MOBILE, username)) {
// String defaultTenantId = RedisUtils.getCacheObject(GlobalConstants.PHONE_DEFAULT_TENANT + username);
// log.info("登录用户:{} 获取缓存默认租户:"+tenantId, username);
// if(StrUtil.isNotBlank(defaultTenantId)){
// tenantId=defaultTenantId;
// }
// }
checkLogin
(
LoginType
.
SMS
,
user
.
getUserName
(),
()
->
!
validateSmsCode
(
phonenumber
,
smsCode
));
//查询手机号绑定的所有用户
if
(
StrUtil
.
isEmpty
(
tenantId
))
{
List
<
SysUser
>
sysUsers
=
queryListByPhone
(
username
);
if
(
CollectionUtil
.
isEmpty
(
sysUsers
))
{
log
.
info
(
"登录用户:{} 不存在."
,
username
);
throw
new
UserException
(
"user.not.exists"
,
username
);
}
else
if
(
sysUsers
.
size
()
>
1
)
{
//处理存在多个用户的情况,取一个最新租户
SysUser
sysUser
=
sysUsers
.
get
(
0
);
if
(
ObjectUtil
.
isEmpty
(
sysUser
))
{
log
.
info
(
"登录用户:{} 不存在."
,
username
);
throw
new
UserException
(
"user.not.exists"
,
username
);
}
tenantId
=
sysUser
.
getTenantId
();
}
else
{
SysUser
sysUser
=
sysUsers
.
get
(
0
);
tenantId
=
sysUser
.
getTenantId
();
}
}
// 校验租户
if
(
tenantId
!=
null
)
{
checkTenant
(
tenantId
);
}
if
(
tenantId
==
null
||
""
.
equals
(
tenantId
))
{
tenantId
=
TenantConstants
.
DEFAULT_TENANT_ID
;
}
TenantHelper
.
setTenantId
(
tenantId
);
// 框架登录不限制从什么表查询 只要最终构建出 LoginUser 即可
// SysUser user = loadUserByUsername(username);
// return TenantBroker.applyAs(tenantId, (id -> {
// 框架登录不限制从什么表查询 只要最终构建出 LoginUser 即可
SysUser
user
=
loadUserByUsername
(
username
);
checkLogin
(
LoginType
.
PASSWORD
,
username
,
()
->
!
validateSmsCode
(
username
,
smsCode
));
// 此处可根据登录用户的数据不同 自行创建 loginUser 属性不够用继承扩展就行了
LoginUser
loginUser
=
buildLoginUser
(
user
);
// 生成token
LoginHelper
.
loginByDevice
(
loginUser
,
DeviceType
.
APP
);
LoginHelper
.
loginByDevice
(
loginUser
,
DeviceType
.
PC
);
recordLogininfor
(
user
.
getUserName
(),
Constants
.
LOGIN_SUCCESS
,
MessageUtils
.
message
(
"user.login.success"
));
recordLoginInfo
(
user
.
getUserId
(),
user
.
getUserName
());
return
StpUtil
.
getTokenValue
();
recordLogininfor
(
username
,
Constants
.
LOGIN_SUCCESS
,
MessageUtils
.
message
(
"user.login.success"
));
recordLoginInfo
(
user
.
getUserId
(),
username
);
LoginVo
loginVo
=
new
LoginVo
();
loginVo
.
setTenantId
(
TenantHelper
.
getTenantId
());
loginVo
.
setAccessToken
(
StpUtil
.
getTokenValue
());
loginVo
.
setExpireIn
(
StpUtil
.
getTokenTimeout
());
return
loginVo
;
}
public
String
emailLogin
(
String
email
,
String
emailCode
)
{
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/ISysTenantPackageServiceImpl.java
View file @
232ac571
...
...
@@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollUtil;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.dsk.common.constant.TenantConstants
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.common.exception.ServiceException
;
...
...
@@ -57,8 +56,7 @@ public class ISysTenantPackageServiceImpl implements ISysTenantPackageService {
*/
@Override
public
List
<
SysTenantPackageSelectVo
>
selectList
()
{
List
<
SysTenantPackageVo
>
tenantPackageVo
=
baseMapper
.
selectVoList
(
new
LambdaQueryWrapper
<
SysTenantPackage
>()
.
eq
(
SysTenantPackage:
:
getStatus
,
TenantConstants
.
NORMAL
));
List
<
SysTenantPackageVo
>
tenantPackageVo
=
baseMapper
.
selectVoList
(
null
);
return
BeanUtil
.
copyToList
(
tenantPackageVo
,
SysTenantPackageSelectVo
.
class
);
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysDeptServiceImpl.java
View file @
232ac571
...
...
@@ -126,6 +126,19 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
return
dept
;
}
/**
* 根据部门名称查询部门
*
* @param deptName 部门名称
* @return 部门
*/
@Override
public
SysDept
selectDeptByDeptName
(
String
deptName
)
{
LambdaQueryWrapper
<
SysDept
>
wrapper
=
new
LambdaQueryWrapper
<
SysDept
>()
.
eq
(
SysDept:
:
getDeptName
,
deptName
);
return
baseMapper
.
selectOne
(
wrapper
);
}
/**
* 通过部门ID查询部门名称
*
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysRoleServiceImpl.java
View file @
232ac571
...
...
@@ -68,13 +68,13 @@ public class SysRoleServiceImpl implements ISysRoleService {
Map
<
String
,
Object
>
params
=
role
.
getParams
();
QueryWrapper
<
SysRole
>
wrapper
=
Wrappers
.
query
();
wrapper
.
eq
(
"r.del_flag"
,
UserConstants
.
ROLE_NORMAL
)
.
eq
(
ObjectUtil
.
isNotNull
(
role
.
getRoleId
()),
"r.role_id"
,
role
.
getRoleId
())
.
like
(
StringUtils
.
isNotBlank
(
role
.
getRoleName
()),
"r.role_name"
,
role
.
getRoleName
())
.
eq
(
StringUtils
.
isNotBlank
(
role
.
getStatus
()),
"r.status"
,
role
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
role
.
getRoleKey
()),
"r.role_key"
,
role
.
getRoleKey
())
.
between
(
params
.
get
(
"beginTime"
)
!=
null
&&
params
.
get
(
"endTime"
)
!=
null
,
"r.create_time"
,
params
.
get
(
"beginTime"
),
params
.
get
(
"endTime"
))
.
orderByAsc
(
"r.role_sort"
).
orderByAsc
(
"r.create_time"
);
.
eq
(
ObjectUtil
.
isNotNull
(
role
.
getRoleId
()),
"r.role_id"
,
role
.
getRoleId
())
.
like
(
StringUtils
.
isNotBlank
(
role
.
getRoleName
()),
"r.role_name"
,
role
.
getRoleName
())
.
eq
(
StringUtils
.
isNotBlank
(
role
.
getStatus
()),
"r.status"
,
role
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
role
.
getRoleKey
()),
"r.role_key"
,
role
.
getRoleKey
())
.
between
(
params
.
get
(
"beginTime"
)
!=
null
&&
params
.
get
(
"endTime"
)
!=
null
,
"r.create_time"
,
params
.
get
(
"beginTime"
),
params
.
get
(
"endTime"
))
.
orderByAsc
(
"r.role_sort"
).
orderByAsc
(
"r.create_time"
);
return
wrapper
;
}
...
...
@@ -117,6 +117,19 @@ public class SysRoleServiceImpl implements ISysRoleService {
return
permsSet
;
}
/**
* 根据角色名称查询角色
*
* @param roleName 角色名称
* @return 角色
*/
@Override
public
SysRole
selectRoleByRoleName
(
String
roleName
)
{
LambdaQueryWrapper
<
SysRole
>
wrapper
=
new
LambdaQueryWrapper
<
SysRole
>()
.
eq
(
SysRole:
:
getRoleName
,
roleName
);
return
baseMapper
.
selectOne
(
wrapper
);
}
/**
* 查询所有角色
*
...
...
@@ -158,8 +171,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
@Override
public
boolean
checkRoleNameUnique
(
SysRole
role
)
{
boolean
exist
=
baseMapper
.
exists
(
new
LambdaQueryWrapper
<
SysRole
>()
.
eq
(
SysRole:
:
getRoleName
,
role
.
getRoleName
())
.
ne
(
ObjectUtil
.
isNotNull
(
role
.
getRoleId
()),
SysRole:
:
getRoleId
,
role
.
getRoleId
()));
.
eq
(
SysRole:
:
getRoleName
,
role
.
getRoleName
())
.
ne
(
ObjectUtil
.
isNotNull
(
role
.
getRoleId
()),
SysRole:
:
getRoleId
,
role
.
getRoleId
()));
return
!
exist
;
}
...
...
@@ -172,8 +185,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
@Override
public
boolean
checkRoleKeyUnique
(
SysRole
role
)
{
boolean
exist
=
baseMapper
.
exists
(
new
LambdaQueryWrapper
<
SysRole
>()
.
eq
(
SysRole:
:
getRoleKey
,
role
.
getRoleKey
())
.
ne
(
ObjectUtil
.
isNotNull
(
role
.
getRoleId
()),
SysRole:
:
getRoleId
,
role
.
getRoleId
()));
.
eq
(
SysRole:
:
getRoleKey
,
role
.
getRoleKey
())
.
ne
(
ObjectUtil
.
isNotNull
(
role
.
getRoleId
()),
SysRole:
:
getRoleId
,
role
.
getRoleId
()));
return
!
exist
;
}
...
...
@@ -189,8 +202,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
}
// 新增不允许使用 管理员标识符
if
(
ObjectUtil
.
isNull
(
role
.
getRoleId
())
&&
StringUtils
.
equalsAny
(
role
.
getRoleKey
(),
TenantConstants
.
SUPER_ADMIN_ROLE_KEY
,
TenantConstants
.
TENANT_ADMIN_ROLE_KEY
))
{
&&
StringUtils
.
equalsAny
(
role
.
getRoleKey
(),
TenantConstants
.
SUPER_ADMIN_ROLE_KEY
,
TenantConstants
.
TENANT_ADMIN_ROLE_KEY
))
{
throw
new
ServiceException
(
"不允许使用系统内置管理员角色标识符!"
);
}
// 修改不允许修改 管理员标识符
...
...
@@ -198,8 +211,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
SysRole
sysRole
=
baseMapper
.
selectById
(
role
.
getRoleId
());
// 如果标识符不相等 判断为修改了管理员标识符
if
(!
StringUtils
.
equals
(
sysRole
.
getRoleKey
(),
role
.
getRoleKey
())
&&
StringUtils
.
equalsAny
(
sysRole
.
getRoleKey
(),
TenantConstants
.
SUPER_ADMIN_ROLE_KEY
,
TenantConstants
.
TENANT_ADMIN_ROLE_KEY
))
{
&&
StringUtils
.
equalsAny
(
sysRole
.
getRoleKey
(),
TenantConstants
.
SUPER_ADMIN_ROLE_KEY
,
TenantConstants
.
TENANT_ADMIN_ROLE_KEY
))
{
throw
new
ServiceException
(
"不允许修改系统内置管理员角色标识符!"
);
}
}
...
...
@@ -395,8 +408,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
@Override
public
int
deleteAuthUser
(
SysUserRole
userRole
)
{
int
rows
=
userRoleMapper
.
delete
(
new
LambdaQueryWrapper
<
SysUserRole
>()
.
eq
(
SysUserRole:
:
getRoleId
,
userRole
.
getRoleId
())
.
eq
(
SysUserRole:
:
getUserId
,
userRole
.
getUserId
()));
.
eq
(
SysUserRole:
:
getRoleId
,
userRole
.
getRoleId
())
.
eq
(
SysUserRole:
:
getUserId
,
userRole
.
getUserId
()));
if
(
rows
>
0
)
{
cleanOnlineUserByRole
(
userRole
.
getRoleId
());
}
...
...
@@ -413,8 +426,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
@Override
public
int
deleteAuthUsers
(
Long
roleId
,
Long
[]
userIds
)
{
int
rows
=
userRoleMapper
.
delete
(
new
LambdaQueryWrapper
<
SysUserRole
>()
.
eq
(
SysUserRole:
:
getRoleId
,
roleId
)
.
in
(
SysUserRole:
:
getUserId
,
Arrays
.
asList
(
userIds
)));
.
eq
(
SysUserRole:
:
getRoleId
,
roleId
)
.
in
(
SysUserRole:
:
getUserId
,
Arrays
.
asList
(
userIds
)));
if
(
rows
>
0
)
{
cleanOnlineUserByRole
(
roleId
);
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysUserServiceImpl.java
View file @
232ac571
...
...
@@ -10,26 +10,21 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.PasswordUtils
;
import
com.dsk.system.mapper.*
;
import
com.dsk.system.service.ISysUserService
;
import
com.dsk.common.constant.CacheNames
;
import
com.dsk.common.constant.UserConstants
;
import
com.dsk.common.core.domain.PageQuery
;
import
com.dsk.system.domain.SysDept
;
import
com.dsk.system.domain.SysRole
;
import
com.dsk.system.domain.SysUser
;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.common.core.service.UserService
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.helper.DataBaseHelper
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.PasswordUtils
;
import
com.dsk.common.utils.StreamUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.system.domain.
SysPost
;
import
com.dsk.system.
domain.SysUserPost
;
import
com.dsk.system.
domain.SysUserRol
e
;
import
com.dsk.system.domain.
*
;
import
com.dsk.system.
mapper.*
;
import
com.dsk.system.
service.ISysUserServic
e
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cache.annotation.Cacheable
;
...
...
@@ -78,20 +73,20 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
Map
<
String
,
Object
>
params
=
user
.
getParams
();
QueryWrapper
<
SysUser
>
wrapper
=
Wrappers
.
query
();
wrapper
.
eq
(
"u.del_flag"
,
UserConstants
.
USER_NORMAL
)
.
eq
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
"u.user_id"
,
user
.
getUserId
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getUserName
()),
"u.user_name"
,
user
.
getUserName
())
.
eq
(
StringUtils
.
isNotBlank
(
user
.
getStatus
()),
"u.status"
,
user
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getPhonenumber
()),
"u.phonenumber"
,
user
.
getPhonenumber
())
.
between
(
params
.
get
(
"beginTime"
)
!=
null
&&
params
.
get
(
"endTime"
)
!=
null
,
"u.create_time"
,
params
.
get
(
"beginTime"
),
params
.
get
(
"endTime"
))
.
and
(
ObjectUtil
.
isNotNull
(
user
.
getDeptId
()),
w
->
{
List
<
SysDept
>
deptList
=
deptMapper
.
selectList
(
new
LambdaQueryWrapper
<
SysDept
>()
.
select
(
SysDept:
:
getDeptId
)
.
apply
(
DataBaseHelper
.
findInSet
(
user
.
getDeptId
(),
"ancestors"
)));
List
<
Long
>
ids
=
StreamUtils
.
toList
(
deptList
,
SysDept:
:
getDeptId
);
ids
.
add
(
user
.
getDeptId
());
w
.
in
(
"u.dept_id"
,
ids
);
}).
orderByDesc
(
"u.create_time"
);
.
eq
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
"u.user_id"
,
user
.
getUserId
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getUserName
()),
"u.user_name"
,
user
.
getUserName
())
.
eq
(
StringUtils
.
isNotBlank
(
user
.
getStatus
()),
"u.status"
,
user
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getPhonenumber
()),
"u.phonenumber"
,
user
.
getPhonenumber
())
.
between
(
params
.
get
(
"beginTime"
)
!=
null
&&
params
.
get
(
"endTime"
)
!=
null
,
"u.create_time"
,
params
.
get
(
"beginTime"
),
params
.
get
(
"endTime"
))
.
and
(
ObjectUtil
.
isNotNull
(
user
.
getDeptId
()),
w
->
{
List
<
SysDept
>
deptList
=
deptMapper
.
selectList
(
new
LambdaQueryWrapper
<
SysDept
>()
.
select
(
SysDept:
:
getDeptId
)
.
apply
(
DataBaseHelper
.
findInSet
(
user
.
getDeptId
(),
"ancestors"
)));
List
<
Long
>
ids
=
StreamUtils
.
toList
(
deptList
,
SysDept:
:
getDeptId
);
ids
.
add
(
user
.
getDeptId
());
w
.
in
(
"u.dept_id"
,
ids
);
}).
orderByDesc
(
"u.create_time"
);
return
wrapper
;
}
...
...
@@ -105,10 +100,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
public
TableDataInfo
<
SysUser
>
selectAllocatedList
(
SysUser
user
,
PageQuery
pageQuery
)
{
QueryWrapper
<
SysUser
>
wrapper
=
Wrappers
.
query
();
wrapper
.
eq
(
"u.del_flag"
,
UserConstants
.
USER_NORMAL
)
.
eq
(
ObjectUtil
.
isNotNull
(
user
.
getRoleId
()),
"r.role_id"
,
user
.
getRoleId
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getUserName
()),
"u.user_name"
,
user
.
getUserName
())
.
eq
(
StringUtils
.
isNotBlank
(
user
.
getStatus
()),
"u.status"
,
user
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getPhonenumber
()),
"u.phonenumber"
,
user
.
getPhonenumber
());
.
eq
(
ObjectUtil
.
isNotNull
(
user
.
getRoleId
()),
"r.role_id"
,
user
.
getRoleId
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getUserName
()),
"u.user_name"
,
user
.
getUserName
())
.
eq
(
StringUtils
.
isNotBlank
(
user
.
getStatus
()),
"u.status"
,
user
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getPhonenumber
()),
"u.phonenumber"
,
user
.
getPhonenumber
());
Page
<
SysUser
>
page
=
baseMapper
.
selectAllocatedList
(
pageQuery
.
build
(),
wrapper
);
return
TableDataInfo
.
build
(
page
);
}
...
...
@@ -124,10 +119,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
List
<
Long
>
userIds
=
userRoleMapper
.
selectUserIdsByRoleId
(
user
.
getRoleId
());
QueryWrapper
<
SysUser
>
wrapper
=
Wrappers
.
query
();
wrapper
.
eq
(
"u.del_flag"
,
UserConstants
.
USER_NORMAL
)
.
and
(
w
->
w
.
ne
(
"r.role_id"
,
user
.
getRoleId
()).
or
().
isNull
(
"r.role_id"
))
.
notIn
(
CollUtil
.
isNotEmpty
(
userIds
),
"u.user_id"
,
userIds
)
.
like
(
StringUtils
.
isNotBlank
(
user
.
getUserName
()),
"u.user_name"
,
user
.
getUserName
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getPhonenumber
()),
"u.phonenumber"
,
user
.
getPhonenumber
());
.
and
(
w
->
w
.
ne
(
"r.role_id"
,
user
.
getRoleId
()).
or
().
isNull
(
"r.role_id"
))
.
notIn
(
CollUtil
.
isNotEmpty
(
userIds
),
"u.user_id"
,
userIds
)
.
like
(
StringUtils
.
isNotBlank
(
user
.
getUserName
()),
"u.user_name"
,
user
.
getUserName
())
.
like
(
StringUtils
.
isNotBlank
(
user
.
getPhonenumber
()),
"u.phonenumber"
,
user
.
getPhonenumber
());
Page
<
SysUser
>
page
=
baseMapper
.
selectUnallocatedList
(
pageQuery
.
build
(),
wrapper
);
return
TableDataInfo
.
build
(
page
);
}
...
...
@@ -204,8 +199,8 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public
boolean
checkUserNameUnique
(
SysUser
user
)
{
boolean
exist
=
baseMapper
.
exists
(
new
LambdaQueryWrapper
<
SysUser
>()
.
eq
(
SysUser:
:
getUserName
,
user
.
getUserName
())
.
ne
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
SysUser:
:
getUserId
,
user
.
getUserId
()));
.
eq
(
SysUser:
:
getUserName
,
user
.
getUserName
())
.
ne
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
SysUser:
:
getUserId
,
user
.
getUserId
()));
return
!
exist
;
}
...
...
@@ -217,8 +212,8 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public
boolean
checkPhoneUnique
(
SysUser
user
)
{
boolean
exist
=
baseMapper
.
exists
(
new
LambdaQueryWrapper
<
SysUser
>()
.
eq
(
SysUser:
:
getPhonenumber
,
user
.
getPhonenumber
())
.
ne
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
SysUser:
:
getUserId
,
user
.
getUserId
()));
.
eq
(
SysUser:
:
getPhonenumber
,
user
.
getPhonenumber
())
.
ne
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
SysUser:
:
getUserId
,
user
.
getUserId
()));
return
!
exist
;
}
...
...
@@ -230,8 +225,8 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public
boolean
checkEmailUnique
(
SysUser
user
)
{
boolean
exist
=
baseMapper
.
exists
(
new
LambdaQueryWrapper
<
SysUser
>()
.
eq
(
SysUser:
:
getEmail
,
user
.
getEmail
())
.
ne
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
SysUser:
:
getUserId
,
user
.
getUserId
()));
.
eq
(
SysUser:
:
getEmail
,
user
.
getEmail
())
.
ne
(
ObjectUtil
.
isNotNull
(
user
.
getUserId
()),
SysUser:
:
getUserId
,
user
.
getUserId
()));
return
!
exist
;
}
...
...
@@ -277,16 +272,14 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
user
.
setPassword
(
BCrypt
.
hashpw
(
password
));
// 新增用户信息
int
rows
=
baseMapper
.
insert
(
user
);
if
(
rows
>
0
)
{
if
(
rows
>
0
)
{
//租户新增成功,发送短信通知租户
//此处暂用钉钉机器人模拟发送短信
String
content
=
"【央企数字经营管理系统通知】:"
+
user
.
getNickName
()
+
"您好,您已经成功注册央企数字经营管理系统,请使用手机号码登录,初始密码为"
String
content
=
user
.
getNickName
()
+
"您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
+
password
+
"。友情提示:为了您的账号安全,请
立即前往【个人中心】修改
密码。"
;
+
"。友情提示:为了您的账号安全,请
勿泄露
密码。"
;
DingTalkUtil
.
sendDingTalkMsg
(
content
);
System
.
out
.
println
(
"👉🏻:"
+
content
);
}
// 新增用户岗位关联
insertUserPost
(
user
);
...
...
@@ -339,7 +332,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
insertUserAuth
(
Long
userId
,
Long
[]
roleIds
)
{
userRoleMapper
.
delete
(
new
LambdaQueryWrapper
<
SysUserRole
>()
.
eq
(
SysUserRole:
:
getUserId
,
userId
));
.
eq
(
SysUserRole:
:
getUserId
,
userId
));
insertUserRole
(
userId
,
roleIds
);
}
...
...
@@ -375,9 +368,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public
boolean
updateUserAvatar
(
String
userName
,
String
avatar
)
{
return
baseMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
SysUser
>()
.
set
(
SysUser:
:
getAvatar
,
avatar
)
.
eq
(
SysUser:
:
getUserName
,
userName
))
>
0
;
new
LambdaUpdateWrapper
<
SysUser
>()
.
set
(
SysUser:
:
getAvatar
,
avatar
)
.
eq
(
SysUser:
:
getUserName
,
userName
))
>
0
;
}
/**
...
...
@@ -401,9 +394,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public
int
resetUserPwd
(
String
userName
,
String
password
)
{
return
baseMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
SysUser
>()
.
set
(
SysUser:
:
getPassword
,
password
)
.
eq
(
SysUser:
:
getUserName
,
userName
));
new
LambdaUpdateWrapper
<
SysUser
>()
.
set
(
SysUser:
:
getPassword
,
password
)
.
eq
(
SysUser:
:
getUserName
,
userName
));
}
/**
...
...
@@ -494,7 +487,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public
String
selectUserNameById
(
Long
userId
)
{
SysUser
sysUser
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
SysUser
>()
.
select
(
SysUser:
:
getUserName
).
eq
(
SysUser:
:
getUserId
,
userId
));
.
select
(
SysUser:
:
getUserName
).
eq
(
SysUser:
:
getUserId
,
userId
));
return
ObjectUtil
.
isNull
(
sysUser
)
?
null
:
sysUser
.
getUserName
();
}
...
...
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