-
(this._$tips = c)}>
- {$L('请勿在业务高峰时段执行备份')}
-
+ {_backup ? (
+
+
+
+
+ {$L('数据库')}
+ {this.state.db ? {this.state.db}
: {$L('未备份')} }
+
+
+ {$L('数据目录文件')}
+ {this.state.file ? {this.state.file}
: {$L('未备份')} }
+
+
+
+
+ ) : (
+
(this._$tips = c)}>
+ {$L('请勿在业务高峰时段执行备份')}
+
+ )}
(this._$btn = c)} data-spinner>
{$L('开始备份')}
@@ -367,19 +385,15 @@ class DlgBackup extends RbAlert {
}
confirm = () => {
- let type = ($(this._$bkType).find('input:eq(0)').prop('checked') ? 1 : 0) + ($(this._$bkType).find('input:eq(1)').prop('checked') ? 2 : 0)
+ const type = ($(this._$bkType).find('input:eq(0)').prop('checked') ? 1 : 0) + ($(this._$bkType).find('input:eq(1)').prop('checked') ? 2 : 0)
if (type === 0) return
this.disabled(true, true)
const $btn = $(this._$btn).button('loading')
$.post(`systems/backup?type=${type}`, (res) => {
- if (res.error_code === 0) {
- const data = res.data || {}
- const tips = [$L('数据库'), '
', data.db || $L('未备份'), '
', $L('数据目录文件'), '
', data.file || $L('未备份'), '
']
- $(this._$tips).html(tips.join(''))
- } else {
- RbHighbar.error(res.error_msg)
- }
+ if (res.error_code === 0) this.setState({ ...res.data })
+ else RbHighbar.error(res.error_msg)
+
this.disabled(false, false)
$btn.button('reset')
})
diff --git a/src/main/resources/web/assets/js/charts/charts.js b/src/main/resources/web/assets/js/charts/charts.js
index 9c9cb8690c..1a732de0b5 100644
--- a/src/main/resources/web/assets/js/charts/charts.js
+++ b/src/main/resources/web/assets/js/charts/charts.js
@@ -1391,7 +1391,7 @@ class DataList extends BaseChart {
}
const extconfig = this.state.config.extconfig
- extconfig && this.setState({ title: extconfig.title || $L('数据列表') })
+ // extconfig && this.setState({ title: extconfig.title || $L('数据列表') })
const listFields = data.fields
const listData = data.data
diff --git a/src/main/resources/web/assets/js/file-preview.js b/src/main/resources/web/assets/js/file-preview.js
index 87dea0d836..402952e5fe 100644
--- a/src/main/resources/web/assets/js/file-preview.js
+++ b/src/main/resources/web/assets/js/file-preview.js
@@ -210,6 +210,13 @@ class RbPreview extends React.Component {
previewUrl = `${rb.baseUrl}/filex/` + url.split('/filex/')[1]
}
}
+
+ // fix:3.9.1 PC钉钉预览PDF
+ if ($env.isDingTalk()) {
+ window.open(previewUrl)
+ that.hide()
+ return
+ }
}
that.setState({ previewUrl: previewUrl, errorMsg: null })
}
diff --git a/src/main/resources/web/assets/js/general/rb-datalist.common.js b/src/main/resources/web/assets/js/general/rb-datalist.common.js
index 169a347cde..d7fe2914a1 100644
--- a/src/main/resources/web/assets/js/general/rb-datalist.common.js
+++ b/src/main/resources/web/assets/js/general/rb-datalist.common.js
@@ -1739,9 +1739,13 @@ CellRenders.addRender('EMAIL', (v, s, k) => {
return (
)
@@ -1750,9 +1754,13 @@ CellRenders.addRender('PHONE', (v, s, k) => {
return (
)
diff --git a/src/main/resources/web/assets/js/general/rb-forms.js b/src/main/resources/web/assets/js/general/rb-forms.js
index 74a4af4d51..830e6d7836 100644
--- a/src/main/resources/web/assets/js/general/rb-forms.js
+++ b/src/main/resources/web/assets/js/general/rb-forms.js
@@ -712,7 +712,7 @@ class RbForm extends React.Component {
const fieldComp = _refs[key]
let v = fieldComp.getValue()
- if (v && typeof v === 'object') v = v.id
+ if (v && typeof v === 'object') v = v.id || v // array
if (v) data[fieldComp.props.field] = v
}
return data
@@ -1232,9 +1232,13 @@ class RbFormEMail extends RbFormText {
return (
)
}
@@ -1252,9 +1256,13 @@ class RbFormPhone extends RbFormText {
return (
)
}
diff --git a/src/main/resources/web/assets/js/rb-components.js b/src/main/resources/web/assets/js/rb-components.js
index 6d88989336..9bcbccff3c 100644
--- a/src/main/resources/web/assets/js/rb-components.js
+++ b/src/main/resources/web/assets/js/rb-components.js
@@ -990,8 +990,10 @@ class AnyRecordSelector extends RecordSelector {
const iv = this.props.initValue
if (iv) {
$(this._$entity).val(iv.entity).trigger('change')
- const option = new Option(iv.text, iv.id, true, true)
- $(this._$select).append(option)
+ setTimeout(() => {
+ const o = new Option(iv.text, iv.id, true, true)
+ $(this._$select).append(o)
+ }, 200)
}
})
})
diff --git a/src/main/resources/web/assets/js/rb-page.js b/src/main/resources/web/assets/js/rb-page.js
index acb229c5ec..0fb84c5bc8 100644
--- a/src/main/resources/web/assets/js/rb-page.js
+++ b/src/main/resources/web/assets/js/rb-page.js
@@ -209,6 +209,8 @@ $(window).on('load', () => {
if (($(this).attr('href') || '').indexOf('getrebuild.com') > -1) $(this).removeAttr('href')
})
}
+ // vConsole
+ if (window.VConsole) new window.VConsole()
})
// 取消管理中心访问
@@ -387,6 +389,7 @@ var _checkMessage = function () {
}
_showStateMM(res.data.mm)
+ _showStateST(res.data.st)
setTimeout(_checkMessage, rb.env === 'dev' ? 9000 : 2000)
})
}
@@ -446,7 +449,6 @@ var _showNotification = function (state) {
}
var _showStateMM = function (mm) {
if ($.cookie('mm_gritter_cancel')) return
-
if (mm) {
var $mm = $('#mm_gritter')
if ($mm[0]) {
@@ -471,6 +473,25 @@ var _showStateMM = function (mm) {
RbGritter.remove('mm_gritter')
}
}
+var _showStateST = function (st) {
+ if ($.cookie('st_gritter_cancel')) return
+ st = Math.abs(moment().diff(st, 'seconds'))
+ if (st > 60) {
+ if (!$('#gritter-item-st_gritter')[0]) {
+ RbGritter.create($L('本地计算机与服务器时间存在加大差异,建议立即校正。'), {
+ timeout: 60 * 1000,
+ type: 'danger',
+ icon: 'mdi-clock-remove-outline',
+ onCancel: function () {
+ $.cookie('st_gritter_cancel', st, { expires: 1 })
+ },
+ id: 'st_gritter',
+ })
+ }
+ } else {
+ RbGritter.remove('st_gritter')
+ }
+}
// 全局搜索
var _initGlobalSearch = function () {
$('.global-search2>a').on('click', function () {
@@ -1336,3 +1357,15 @@ function $select2OpenTemplateResult(res) {
}
return $span
}
+
+// 环境 @see LoginChannel.java
+var $env = {
+ // 钉钉
+ isDingTalk: function () {
+ return navigator.userAgent.match(/(DINGTALK)/i) || true
+ },
+ // 企微
+ isWxWork: function () {
+ return navigator.userAgent.match(/(WXWORK)/i)
+ },
+}