mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix(User Management): The variable value is a date, not a range. After selecting a date value, it is necessary to verify whether this value is within the date range set for the variable.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
"Details": "Details"
|
||||
},
|
||||
"variables": {
|
||||
"please_select_date": "Please select a date",
|
||||
"number_variable_error": "Please enter the correct numerical range.",
|
||||
"built_in": "Built-in",
|
||||
"normal_value": "Normal value",
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"return_to_view": "화면으로 돌아가기"
|
||||
},
|
||||
"variables": {
|
||||
"please_select_date": "날짜를 선택하십시오",
|
||||
"number_variable_error": "올바른 숫자 범위를 입력하십시오.",
|
||||
"built_in": "내장형",
|
||||
"normal_value": "정상값",
|
||||
@@ -944,4 +945,4 @@
|
||||
"to_doc": "API 보기",
|
||||
"trigger_limit": "최대 {0}개의 API 키 생성 지원"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
"return_to_view": "返回查看"
|
||||
},
|
||||
"variables": {
|
||||
"please_select_date": "请选择日期",
|
||||
"number_variable_error": "请输入正确的数值范围",
|
||||
"built_in": "已内置",
|
||||
"normal_value": "常规值",
|
||||
|
||||
@@ -452,12 +452,10 @@
|
||||
<el-date-picker
|
||||
v-else
|
||||
v-model="state.form.system_variables[index].variableValues"
|
||||
type="daterange"
|
||||
style="max-width: 236px"
|
||||
type="date"
|
||||
style="width: 236px"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator=""
|
||||
:start-placeholder="$t('variables.start_date')"
|
||||
:end-placeholder="$t('variables.end_date')"
|
||||
:placeholder="$t('variables.please_select_date')"
|
||||
/>
|
||||
<el-tooltip
|
||||
:offset="14"
|
||||
@@ -1099,12 +1097,9 @@ const validateSystemVariables = () => {
|
||||
|
||||
if (obj.var_type === 'datetime') {
|
||||
const [min, max] = obj.value
|
||||
const [minVal, maxVal] = ele.variableValues
|
||||
if (
|
||||
+new Date(minVal) > +new Date(max) ||
|
||||
+new Date(maxVal) < +new Date(min) ||
|
||||
+new Date(maxVal) > +new Date(max) ||
|
||||
+new Date(minVal) < +new Date(min)
|
||||
+new Date(ele.variableValues) > +new Date(max) ||
|
||||
+new Date(ele.variableValues) < +new Date(min)
|
||||
) {
|
||||
ElMessage.error(
|
||||
t('variables.1_to_100_de', {
|
||||
|
||||
Reference in New Issue
Block a user