Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
e9634aba
提交
e9634aba
authored
12月 30, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev' into feat-mobile-reset
上级
ba3c3fd1
ae56b13b
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
122 行增加
和
80 行删除
+122
-80
ShiroServiceImpl.java
.../java/io/dataease/auth/service/impl/ShiroServiceImpl.java
+1
-0
Db2QueryProvider.java
...java/io/dataease/provider/query/db2/Db2QueryProvider.java
+7
-1
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+0
-4
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+3
-4
EmailService.java
...rc/main/java/io/dataease/service/system/EmailService.java
+6
-9
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+3
-4
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+3
-4
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+6
-6
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+2
-5
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+1
-3
Group.vue
frontend/src/views/chart/group/Group.vue
+1
-0
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+1
-1
Group.vue
frontend/src/views/dataset/group/Group.vue
+2
-0
index.vue
frontend/src/views/link/generate/index.vue
+86
-39
没有找到文件。
backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java
浏览文件 @
e9634aba
...
...
@@ -50,6 +50,7 @@ public class ShiroServiceImpl implements ShiroService {
filterChainDefinitionMap
.
put
(
"/api/link/validate**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/map/areaEntitys/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/dataset/field/fieldValues/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/dataset/field/multFieldValues"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/linkJump/queryPanelJumpInfo/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/tempMobileLink/**"
,
ANON
);
...
...
backend/src/main/java/io/dataease/provider/query/db2/Db2QueryProvider.java
浏览文件 @
e9634aba
...
...
@@ -76,7 +76,7 @@ public class Db2QueryProvider extends QueryProvider {
@Override
public
String
createSQLPreview
(
String
sql
,
String
orderBy
)
{
return
sqlFix
(
sql
)
+
" fetch first 1000 rows only;"
;
return
"SELECT * FROM ("
+
sqlFix
(
sql
)
+
") DE_TMP "
+
" fetch first 1000 rows only;"
;
}
@Override
...
...
@@ -140,6 +140,12 @@ public class Db2QueryProvider extends QueryProvider {
st_sql
.
add
(
"isGroup"
,
isGroup
);
if
(
CollectionUtils
.
isNotEmpty
(
xFields
))
st_sql
.
add
(
"groups"
,
xFields
);
if
(
ObjectUtils
.
isNotEmpty
(
tableObj
))
st_sql
.
add
(
"table"
,
tableObj
);
String
customWheres
=
transCustomFilterList
(
tableObj
,
fieldCustomFilter
);
List
<
String
>
wheres
=
new
ArrayList
<>();
if
(
customWheres
!=
null
)
wheres
.
add
(
customWheres
);
if
(
CollectionUtils
.
isNotEmpty
(
wheres
))
st_sql
.
add
(
"filters"
,
wheres
);
return
st_sql
.
render
();
}
...
...
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
e9634aba
...
...
@@ -8,7 +8,6 @@ import io.dataease.base.mapper.ext.ExtChartGroupMapper;
import
io.dataease.base.mapper.ext.ExtChartViewMapper
;
import
io.dataease.commons.constants.CommonConstants
;
import
io.dataease.commons.constants.JdbcConstants
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.CommonBeanFactory
;
...
...
@@ -304,9 +303,6 @@ public class ChartViewService {
if
(
StringUtils
.
equalsIgnoreCase
(
dto
.
getId
(),
chartViewFieldDTO
.
getId
()))
{
isDrill
=
true
;
DatasetTableField
datasetTableField
=
dataSetTableFieldsService
.
get
(
dto
.
getId
());
if
(
ObjectUtils
.
isEmpty
(
datasetTableField
))
{
DEException
.
throwException
(
Translator
.
get
(
"i18n_drill_field_not_exist"
));
}
ChartViewFieldDTO
d
=
new
ChartViewFieldDTO
();
BeanUtils
.
copyBean
(
d
,
datasetTableField
);
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
e9634aba
...
...
@@ -887,7 +887,9 @@ public class DataSetTableService {
List
<
String
[]>
data
=
result
.
get
(
"dataList"
);
List
<
TableFiled
>
fields
=
result
.
get
(
"fieldList"
);
String
[]
fieldArray
=
fields
.
stream
().
map
(
TableFiled:
:
getFieldName
).
toArray
(
String
[]::
new
);
if
(
checkIsRepeat
(
fieldArray
))
{
DataEaseException
.
throwException
(
Translator
.
get
(
"i18n_excel_field_repeat"
));
}
List
<
Map
<
String
,
Object
>>
jsonArray
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
data
))
{
jsonArray
=
data
.
stream
().
map
(
ele
->
{
...
...
@@ -1548,11 +1550,8 @@ public class DataSetTableService {
List
<
String
>
originNameList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
fields
.
size
();
i
++)
{
TableFiled
filed
=
fields
.
get
(
i
);
System
.
out
.
println
(
new
Gson
().
toJson
(
filed
));
originNameList
.
add
(
filed
.
getFieldName
());
DatasetTableField
datasetTableField
=
DatasetTableField
.
builder
().
build
();
// 物理字段名设定为唯一,查询当前数据集下是否已存在该字段,存在则update,不存在则insert
DatasetTableFieldExample
datasetTableFieldExample
=
new
DatasetTableFieldExample
();
// 字段名一致,认为字段没有改变
...
...
backend/src/main/java/io/dataease/service/system/EmailService.java
浏览文件 @
e9634aba
...
...
@@ -29,7 +29,6 @@ import java.util.List;
import
java.util.Properties
;
import
java.util.UUID
;
@Service
public
class
EmailService
{
...
...
@@ -47,7 +46,6 @@ public class EmailService {
private
static
final
String
SMTP_CONNECTIONTIMEOUT_VAL
=
"5000"
;
@Resource
private
SystemParameterMapper
systemParameterMapper
;
...
...
@@ -57,7 +55,8 @@ public class EmailService {
* @param content 内容
*/
public
void
send
(
String
to
,
String
title
,
String
content
)
{
if
(
StringUtils
.
isBlank
(
to
))
return
;
if
(
StringUtils
.
isBlank
(
to
))
return
;
MailInfo
mailInfo
=
proxy
().
mailInfo
();
JavaMailSenderImpl
driver
=
driver
(
mailInfo
);
...
...
@@ -77,7 +76,8 @@ public class EmailService {
}
public
void
sendWithImage
(
String
to
,
String
title
,
String
content
,
byte
[]
bytes
)
{
if
(
StringUtils
.
isBlank
(
to
))
return
;
if
(
StringUtils
.
isBlank
(
to
))
return
;
MailInfo
mailInfo
=
proxy
().
mailInfo
();
JavaMailSenderImpl
driver
=
driver
(
mailInfo
);
MimeMessage
mimeMessage
=
driver
.
createMimeMessage
();
...
...
@@ -89,7 +89,8 @@ public class EmailService {
MimeBodyPart
text
=
new
MimeBodyPart
();
try
{
text
.
setContent
(
"<h2>"
+
content
+
"</h2>"
+
"<br/><img src='cid:"
+
uuid
+
"' />"
,
"text/html; charset=gb2312"
);
text
.
setContent
(
content
+
"<br/><img style='width: 60%;' src='cid:"
+
uuid
+
"' />"
,
"text/html; charset=gb2312"
);
image
.
setDataHandler
(
png
);
image
.
setContentID
(
uuid
);
MimeMultipart
multipart
=
new
MimeMultipart
();
...
...
@@ -131,7 +132,6 @@ public class EmailService {
return
CommonBeanFactory
.
getBean
(
EmailService
.
class
);
}
public
MailInfo
mailInfo
()
{
String
type
=
ParamConstants
.
Classify
.
MAIL
.
getValue
();
List
<
SystemParameter
>
paramList
=
getParamList
(
type
);
...
...
@@ -159,14 +159,12 @@ public class EmailService {
return
mailInfo
;
}
public
List
<
SystemParameter
>
getParamList
(
String
type
)
{
SystemParameterExample
example
=
new
SystemParameterExample
();
example
.
createCriteria
().
andParamKeyLike
(
type
+
"%"
);
return
systemParameterMapper
.
selectByExample
(
example
);
}
public
void
editMail
(
List
<
SystemParameter
>
parameters
)
{
parameters
.
forEach
(
parameter
->
{
SystemParameterExample
example
=
new
SystemParameterExample
();
...
...
@@ -227,6 +225,5 @@ public class EmailService {
}
}
}
}
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
e9634aba
...
...
@@ -265,7 +265,7 @@ i18n_sql_add_not_matching=The data column of incremental SQL does not match the
i18n_sql_delete_not_matching
=
The data column of incremental delete SQL does not match the dataset,
i18n_cst_ds_tb_or_field_deleted
=
Custom dataset union data is deleted or field changed,can not display
i18n_no_all_delete_privilege_folder
=
This folder have sources which have no manage or view privilege,Can Not Be Deleted.
i18n_excel_field_repeat
=
Ex
cel exists repeat field,please fix and upload again
.
i18n_excel_field_repeat
=
Ex
ists repeat field,please fix and retry
.
i18n_schema_is_empty
=
Database schema is empty
站内消息=Internal
Messages
所有消息=All
Messages
...
...
@@ -297,5 +297,4 @@ i18n_invalid_ds=Invalid Datasource
任务管理=Task
Manager
数据同步=Data
Sync
定时报告=Regular
report
i18n_rp_exist
=
Row permission of the same type already exists
i18n_drill_field_not_exist
=
Drill field changed,please delete and add again
\ No newline at end of file
i18n_rp_exist
=
Row permission of the same type already exists
\ No newline at end of file
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
e9634aba
...
...
@@ -264,7 +264,7 @@ i18n_sql_add_not_matching=增量添加 SQL 的数据列与数据集不匹配,
i18n_sql_delete_not_matching
=
增量删除 SQL 的数据列与数据集不匹配,
i18n_cst_ds_tb_or_field_deleted
=
自定义数据集所关联数据被删除或字段发生变化,无法正常显示
i18n_no_all_delete_privilege_folder
=
该目录下存在没有管理权限或查看权限的资源,无法删除
i18n_excel_field_repeat
=
Excel存在重复字段,请修改后重新上传
i18n_excel_field_repeat
=
存在重复字段,请修改后重试
i18n_schema_is_empty
=
数据库 Schema 为空
站内消息=站内消息
所有消息=所有消息
...
...
@@ -296,5 +296,4 @@ i18n_invalid_ds=无效数据源
任务管理=任务管理
数据同步=数据同步
定时报告=定时报告
i18n_rp_exist
=
已有同类型的行权限存在
i18n_drill_field_not_exist
=
下钻字段发生变更,请删除字段重新添加
\ No newline at end of file
i18n_rp_exist
=
已有同类型的行权限存在
\ No newline at end of file
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
e9634aba
...
...
@@ -160,6 +160,7 @@ license_valid_license_error=授權驗證失敗
license_valid_license_code
=
授權碼已經存在
import_xmind_count_error
=
思維導圖導入用例數量不能超過 500 條
import_xmind_not_found
=
未找到測試用例
test_review_task_notice
=
測試評審任務通知
test_track.length_less_than
=
標題過長,字數必須小於
# check owner
...
...
@@ -236,7 +237,7 @@ i18n_chart_count=記錄數*
i18n_excel_have_merge_region
=
Excel存在合並單元格
i18n_cron_expression_error
=
Cron表達式校驗錯誤
i18n_same_folder_can_not_repeat
=
同一目錄下該名稱已被使用
i18n_select_diff_folder
=
请选择不同的目录
i18n_select_diff_folder
=
请选择不同的目录
i18n_default_panel
=
默認儀表板
i18n_panel_list
=
儀表板
i18n_processing_data
=
正在處理數據,稍後刷新
...
...
@@ -252,7 +253,7 @@ i18n_sync_job_exists=已經有同步任務在運行,稍後重試
i18n_datasource_check_fail
=
校驗失敗,請檢查配置信息
i18n_not_find_user
=
未找到用戶
i18n_sql_not_empty
=
SQL 不能為空
i18n_datasource_not_allow_delete_msg
=
個數據集正在使用此數據源,無法刪除
i18n_datasource_not_allow_delete_msg
=
個數據集正在使用此數據源,無法刪除
i18n_task_name_repeat
=
同一數據集下任務名稱已被使用
i18n_id_or_pwd_error
=
無效的ID或密碼
i18n_datasource_delete
=
當前用到的數據源已被刪除
...
...
@@ -266,7 +267,7 @@ i18n_sql_add_not_matching=增量添加 sql 的數據列與數據集不匹配,
i18n_sql_delete_not_matching
=
增量刪除 sql 的數據列與數據集不匹配,
i18n_cst_ds_tb_or_field_deleted
=
自定義數據集所關聯數據被刪除或字段發生變化,無法正常顯示
i18n_no_all_delete_privilege_folder
=
該目錄下存在沒有管理權限或查看權限的資源,無法刪除
i18n_excel_field_repeat
=
Excel存在重復字段,請修改後重新上傳
i18n_excel_field_repeat
=
存在重復字段,請修改後重试
i18n_schema_is_empty
=
數據庫 Schema 為空
站内消息=站內消息
所有消息=所有消息
...
...
@@ -298,5 +299,4 @@ i18n_invalid_ds=無效數據源
任务管理=任務管理
数据同步=數據同步
定时报告=定時報告
i18n_rp_exist
=
已有同類型餓行權限存在
i18n_drill_field_not_exist
=
下鉆字段發生變更,請刪除字段重新添加
\ No newline at end of file
i18n_rp_exist
=
已有同類型餓行權限存在
\ No newline at end of file
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
e9634aba
...
...
@@ -40,6 +40,7 @@
<!--手机视图详情-->
<el-dialog
:title=
"'['+showChartInfo.name+']'+$t('chart.chart_details')"
:visible
.
sync=
"mobileChartDetailsVisible"
:fullscreen=
"true"
class=
"mobile-dialog-css"
...
...
@@ -162,7 +163,7 @@ export default {
}
if
(
this
.
backScreenShot
)
{
style
.
height
=
this
.
mainHeight
}
else
if
(
this
.
terminal
===
'pc'
)
{
}
else
{
style
.
padding
=
'5px'
}
return
style
...
...
@@ -294,7 +295,6 @@ export default {
openChartDetailsDialog
(
chartInfo
)
{
this
.
showChartInfo
=
chartInfo
.
chart
this
.
showChartTableInfo
=
chartInfo
.
tableChart
// this.mobileChartDetailsVisible = true
if
(
this
.
terminal
===
'pc'
)
{
this
.
chartDetailsVisible
=
true
}
else
{
...
...
@@ -372,8 +372,5 @@ export default {
::v-deep
.el-tabs__nav
{
z-index
:
0
;
}
.
mobile-dialog-css
:
:
v-deep
.
el-dialog__headerbtn
{
top
:
5px
;
}
</
style
>
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
e9634aba
...
...
@@ -213,9 +213,7 @@ export default {
jumpCount
++
}
})
if
(
this
.
scaleCoefficientType
===
'pc'
)
{
jumpCount
&&
trackMenuInfo
.
push
(
'jump'
)
}
jumpCount
&&
trackMenuInfo
.
push
(
'jump'
)
linkageCount
&&
trackMenuInfo
.
push
(
'linkage'
)
this
.
drillFields
.
length
&&
trackMenuInfo
.
push
(
'drill'
)
return
trackMenuInfo
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
e9634aba
...
...
@@ -580,6 +580,7 @@ export default {
showClose
:
true
})
this
.
treeNode
()
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
})
}).
catch
(()
=>
{
})
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
e9634aba
...
...
@@ -56,7 +56,7 @@
<el-tab-pane
v-if=
"table.mode === 1 && (table.type === 'excel' || table.type === 'db' || table.type === 'sql')"
:label=
"$t('dataset.update_info')"
name=
"updateInfo"
>
<update-info
v-if=
"tabActive=='updateInfo'"
:param=
"param"
:table=
"table"
/>
</el-tab-pane>
<el-tab-pane
v-if=
"isPluginLoaded"
:lazy=
"true"
:label=
"$t('dataset.row_permissions')"
name=
"rowPermissions"
>
<el-tab-pane
v-if=
"isPluginLoaded
&& hasDataPermission('manage',param.privileges)
"
:lazy=
"true"
:label=
"$t('dataset.row_permissions')"
name=
"rowPermissions"
>
<plugin-com
v-if=
"isPluginLoaded && tabActive=='rowPermissions'"
ref=
"RowPermissions"
component-name=
"RowPermissions"
:obj=
"table"
/>
</el-tab-pane>
</el-tabs>
...
...
frontend/src/views/dataset/group/Group.vue
浏览文件 @
e9634aba
...
...
@@ -457,6 +457,7 @@ export default {
showClose
:
true
})
this
.
treeNode
()
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
})
}).
catch
(()
=>
{
})
...
...
@@ -475,6 +476,7 @@ export default {
showClose
:
true
})
this
.
treeNode
()
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
this
.
$store
.
dispatch
(
'dataset/setTable'
,
new
Date
().
getTime
())
})
}).
catch
(()
=>
{
...
...
frontend/src/views/link/generate/index.vue
浏览文件 @
e9634aba
...
...
@@ -15,11 +15,7 @@
<el-link
class=
"de-link"
style=
"width: 370px;"
disabled
>
{{
$t
(
'panel.link_share_desc'
)
}}
</el-link>
</el-form-item>
<el-form-item
v-if=
"valid"
:label=
"$t('panel.link')"
>
<el-input
v-model
.
number=
"form.uri"
disabled
style=
"width: 370px;"
/>
<el-input
v-model
.
number=
"form.uri"
disabled
style=
"width: 370px;"
/>
</el-form-item>
<el-form-item
v-if=
"valid"
:label=
"$t('panel.over_time')"
prop=
"overTime"
>
...
...
@@ -37,17 +33,34 @@
</el-form-item>
<el-form-item
v-if=
"valid"
label=
" "
>
<el-checkbox
v-model=
"form.enablePwd"
@
change=
"resetEnablePwd"
>
{{
$t
(
'panel.passwd_protect'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"form.enablePwd"
@
change=
"resetEnablePwd"
>
{{
$t
(
'panel.passwd_protect'
)
}}
</el-checkbox>
<span
v-if=
"form.enablePwd"
class=
"de-span"
>
{{
form
.
pwd
}}
</span>
<span
v-if=
"form.enablePwd"
class=
"de-span"
@
click=
"resetPwd"
><el-link
:underline=
"false"
type=
"primary"
>
{{
$t
(
'commons.reset'
)
}}
</el-link></span>
<span
v-if=
"form.enablePwd"
class=
"de-span"
@
click=
"resetPwd"
>
<el-link
:underline=
"false"
type=
"primary"
>
{{
$t
(
'commons.reset'
)
}}
</el-link>
</span>
</el-form-item>
<div
v-if=
"valid"
class=
"auth-root-class"
>
<span
slot=
"footer"
>
<el-button
v-if=
"!form.enablePwd"
v-clipboard:copy=
"form.uri"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
size=
"mini"
type=
"primary"
>
{{
$t
(
'panel.copy_link'
)
}}
</el-button>
<el-button
v-if=
"form.enablePwd"
v-clipboard:copy=
"form.uri + ' Password: '+ form.pwd"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
size=
"mini"
type=
"primary"
>
{{
$t
(
'panel.copy_link_passwd'
)
}}
</el-button>
<el-button
v-if=
"!form.enablePwd"
v-clipboard:copy=
"form.uri"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
size=
"mini"
type=
"primary"
>
{{
$t
(
'panel.copy_link'
)
}}
</el-button>
<el-button
v-if=
"form.enablePwd"
v-clipboard:copy=
"form.uri + ' Password: '+ form.pwd"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
size=
"mini"
type=
"primary"
>
{{
$t
(
'panel.copy_link_passwd'
)
}}
</el-button>
</span>
</div>
...
...
@@ -56,8 +69,14 @@
</div>
</
template
>
<
script
>
import
{
loadGenerate
,
setPwd
,
switchValid
,
switchEnablePwd
,
shortUrl
,
setOverTime
}
from
'@/api/link'
import
{
loadGenerate
,
setPwd
,
switchValid
,
switchEnablePwd
,
shortUrl
,
setOverTime
}
from
'@/api/link'
export
default
{
name
:
'LinkGenerate'
,
...
...
@@ -75,7 +94,11 @@ export default {
pwdNums
:
4
,
valid
:
false
,
form
:
{},
defaultForm
:
{
enablePwd
:
false
,
pwd
:
null
,
uri
:
null
},
defaultForm
:
{
enablePwd
:
false
,
pwd
:
null
,
uri
:
null
},
pickerOptions
:
{
disabledDate
:
time
=>
{
return
time
.
getTime
()
<
(
Date
.
now
()
-
8.64e7
)
...
...
@@ -103,9 +126,11 @@ export default {
minTime
:
'15:51'
},
rules
:
{
overTime
:
[
{
required
:
false
,
validator
:
this
.
validateMin
,
trigger
:
'blur'
}
]
overTime
:
[{
required
:
false
,
validator
:
this
.
validateMin
,
trigger
:
'blur'
}]
}
}
},
...
...
@@ -122,7 +147,13 @@ export default {
currentGenerate
()
{
loadGenerate
(
this
.
resourceId
).
then
(
res
=>
{
const
{
valid
,
enablePwd
,
pwd
,
uri
,
overTime
}
=
res
.
data
const
{
valid
,
enablePwd
,
pwd
,
uri
,
overTime
}
=
res
.
data
this
.
valid
=
valid
this
.
form
.
enablePwd
=
enablePwd
this
.
form
.
uri
=
uri
?
(
this
.
origin
+
uri
)
:
uri
...
...
@@ -183,7 +214,7 @@ export default {
overTime
:
value
}
setOverTime
(
param
).
then
(
res
=>
{
// this.form.overTime = value
// this.form.overTime = value
this
.
$forceUpdate
()
})
})
...
...
@@ -192,8 +223,7 @@ export default {
onCopy
(
e
)
{
this
.
$success
(
this
.
$t
(
'commons.copy_success'
))
},
onError
(
e
)
{
},
onError
(
e
)
{},
onChange
(
value
)
{
const
param
=
{
resourceId
:
this
.
resourceId
,
...
...
@@ -207,7 +237,9 @@ export default {
const
url
=
this
.
form
.
uri
if
(
!
url
)
return
shortUrl
({
resourceId
:
this
.
resourceId
}).
then
(
res
=>
{
shortUrl
({
resourceId
:
this
.
resourceId
}).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
form
.
uri
=
this
.
origin
+
res
.
data
}
...
...
@@ -228,15 +260,19 @@ export default {
return
new
Date
(
tom
.
format
(
'yyyy-MM-dd'
)
+
' 23:59:59'
)
}
if
(
type
===
'month'
)
{
const
result
=
new
Date
()
const
curMonth
=
now
.
getMonth
()
+
1
if
(
curMonth
===
12
)
{
result
.
setYear
(
now
.
getYear
()
+
1
)
result
.
setMonth
(
0
)
}
else
{
result
.
setMonth
(
curMonth
)
}
return
new
Date
(
result
.
format
(
'yyyy-MM-dd'
)
+
' 23:59:59'
)
const
nowMonth
=
now
.
getMonth
()
const
nowYear
=
now
.
getFullYear
()
let
nowDate
=
now
.
getDate
()
const
tarYear
=
nowYear
const
deffMonth
=
nowMonth
+
1
const
diffYear
=
deffMonth
/
12
const
targetMonth
=
deffMonth
%
12
const
days
=
this
.
getMonthDays
(
targetMonth
)
nowDate
=
nowDate
>
days
?
days
:
nowDate
return
new
Date
(
tarYear
+
diffYear
,
deffMonth
%
12
,
nowDate
,
23
,
59
,
59
)
}
return
null
},
...
...
@@ -247,21 +283,32 @@ export default {
return
callback
(
new
Error
(
'不能小于当前时间'
))
}
return
callback
()
},
getMonthDays
(
nowMonth
)
{
var
now
=
new
Date
()
var
monthStartDate
=
new
Date
(
now
.
getFullYear
(),
nowMonth
,
1
)
var
monthEndDate
=
new
Date
(
now
.
getFullYear
(),
nowMonth
+
1
,
1
)
var
days
=
(
monthEndDate
-
monthStartDate
)
/
(
1000
*
60
*
60
*
24
)
return
days
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.de-link
{
justify-content
:
left
!
important
;
}
.de-span
{
margin
:
0
15px
;
}
.auth-root-class
{
margin
:
15px
0px
5px
;
text-align
:
right
;
}
.de-link
{
justify-content
:
left
!
important
;
}
.de-span
{
margin
:
0
15px
;
}
.auth-root-class
{
margin
:
15px
0px
5px
;
text-align
:
right
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论