{{ t('dynamic_time.relative') }}
-
+
{
:min="0"
controls-position="right"
/>
-
+
{
:value="item.value"
/>
-
+
{
step-strictly
controls-position="right"
/>
-
+
{
:value="item.value"
/>
-
+
{
const width = ref(wsCache.get(type) || 280)
const getCoordinates = () => {
- document.querySelector('.sidebar-move-line').className = 'sidebar-move-line dragging'
+ if (document.querySelector('.sidebar-move-line')) {
+ document.querySelector('.sidebar-move-line').className = 'sidebar-move-line dragging'
+ }
document.addEventListener('mousemove', setCoordinates)
document.addEventListener('mouseup', cancelEvent)
document.querySelector('body').style['user-select'] = 'none'
@@ -26,7 +28,9 @@ export const useMoveLine = (type: Sidebar) => {
}
const cancelEvent = () => {
- document.querySelector('.sidebar-move-line').className = 'sidebar-move-line'
+ if (document.querySelector('.sidebar-move-line')) {
+ document.querySelector('.sidebar-move-line').className = 'sidebar-move-line'
+ }
document.querySelector('body').style['user-select'] = 'auto'
wsCache.set(type, width.value)
document.removeEventListener('mousemove', setCoordinates)
diff --git a/core/core-frontend/src/layout/components/Header.vue b/core/core-frontend/src/layout/components/Header.vue
index 3412a13be5..95619db5d3 100644
--- a/core/core-frontend/src/layout/components/Header.vue
+++ b/core/core-frontend/src/layout/components/Header.vue
@@ -11,7 +11,6 @@ import { formatRoute } from '@/router/establish'
import HeaderMenuItem from './HeaderMenuItem.vue'
import { useEmitt } from '@/hooks/web/useEmitt'
import { Icon } from '@/components/icon-custom'
-import { ElHeader, ElMenu } from 'element-plus-secondary'
import SystemCfg from './SystemCfg.vue'
import ToolboxCfg from './ToolboxCfg.vue'
import { useRouter, useRoute } from 'vue-router'
@@ -30,6 +29,7 @@ const { push } = useRouter()
const route = useRoute()
import { useCache } from '@/hooks/web/useCache'
import { useI18n } from '@/hooks/web/useI18n'
+import { msgCountApi } from '@/api/msg'
const { wsCache } = useCache('localStorage')
const aiBaseUrl = ref('https://maxkb.fit2cloud.com/ui/chat/2ddd8b594ce09dbb?mode=embed')
const handleIconClick = () => {
@@ -119,12 +119,17 @@ const copilotConfirm = () => {
wsCache.set('DE-COPILOT-TIPS-CHECK', 'CHECKED')
showOverlayCopilot.value = false
}
+const badgeCount = ref(0)
onMounted(() => {
initShowSystem()
initShowToolbox()
initAiBase()
initCopilotBase()
+
+ msgCountApi().then(res => {
+ badgeCount.value = res?.data || 0
+ })
})
@@ -184,15 +189,17 @@ onMounted(() => {
-
-
-
+
+
+
+
+
diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts
index 66f2f802a6..1fc7656859 100644
--- a/core/core-frontend/src/locales/tw.ts
+++ b/core/core-frontend/src/locales/tw.ts
@@ -1231,6 +1231,7 @@ export default {
quick_calc: '快速計算',
show_name_set: '編輯顯示名稱',
show_name: '顯示名稱',
+ backdrop_blur: '背景模糊',
color: '顏色',
color_case: '配色方案',
pls_slc_color_case: '請選擇配色方案',
diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts
index 4f783fe544..0428582f99 100644
--- a/core/core-frontend/src/locales/zh-CN.ts
+++ b/core/core-frontend/src/locales/zh-CN.ts
@@ -1244,6 +1244,7 @@ export default {
quick_calc: '快速计算',
show_name_set: '编辑显示名称',
show_name: '显示名称',
+ backdrop_blur: '背景模糊',
color: '颜色',
color_case: '配色方案',
pls_slc_color_case: '请选择配色方案',
diff --git a/core/core-frontend/src/models/chart/chart-senior.d.ts b/core/core-frontend/src/models/chart/chart-senior.d.ts
index 2a56510acd..3feab92888 100644
--- a/core/core-frontend/src/models/chart/chart-senior.d.ts
+++ b/core/core-frontend/src/models/chart/chart-senior.d.ts
@@ -147,6 +147,10 @@ declare interface ChartThreshold {
* 文本卡阈值
*/
textLabelThreshold: Threshold[]
+ /**
+ * 折线阈值
+ */
+ lineThreshold: TableThreshold[]
}
declare interface TableThreshold {
/**
diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts
index 9924511f20..561688a741 100644
--- a/core/core-frontend/src/utils/canvasUtils.ts
+++ b/core/core-frontend/src/utils/canvasUtils.ts
@@ -35,7 +35,9 @@ const { inMobile, dvInfo, canvasStyleData, componentData, canvasViewInfo, appDat
storeToRefs(dvMainStore)
const snapshotStore = snapshotStoreWithOut()
import { useI18n } from '@/hooks/web/useI18n'
+import { useAppearanceStoreWithOut } from '@/store/modules/appearance'
const { t } = useI18n()
+const appearanceStore = useAppearanceStoreWithOut()
export function chartTransStr2Object(targetIn, copy) {
const target = copy === 'Y' ? cloneDeep(targetIn) : targetIn
@@ -223,6 +225,7 @@ export function historyAdaptor(
canvasVersion
) {
//历史字段适配
+ canvasStyleResult['fontFamily'] = canvasStyleResult['fontFamily'] || 'PingFang'
canvasStyleResult.dashboard['showGrid'] = canvasStyleResult.dashboard['showGrid'] || false
canvasStyleResult.dashboard['matrixBase'] = canvasStyleResult.dashboard['matrixBase'] || 4
canvasStyleResult.component['seniorStyleSetting'] =
@@ -345,6 +348,7 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) {
dvInfo.type === 'dashboard' && canvasStyleResult['dashboard'].gap === 'yes'
? canvasStyleResult['dashboard'].gapSize
: 0
+ appearanceStore.setCurrentFont(canvasStyleData.fontFamily)
callBack({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview, curPreviewGap })
})
}
diff --git a/core/core-frontend/src/utils/style.ts b/core/core-frontend/src/utils/style.ts
index 3ab87550b5..e5ac8589fa 100644
--- a/core/core-frontend/src/utils/style.ts
+++ b/core/core-frontend/src/utils/style.ts
@@ -200,7 +200,8 @@ export function getCanvasStyle(canvasStyleData, canvasId = 'canvas-main') {
backgroundColor,
backgroundImageEnable,
fontSize,
- mobileSetting
+ mobileSetting,
+ fontFamily
} = canvasStyleData
const style = { fontSize: fontSize + 'px', color: canvasStyleData.color }
if (isMainCanvas(canvasId)) {
@@ -225,6 +226,7 @@ export function getCanvasStyle(canvasStyleData, canvasId = 'canvas-main') {
style['background'] = `url(${imgUrlTrans(background)}) no-repeat`
}
}
+ style['font-family'] = fontFamily + '!important'
}
return style
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue
index f2992ad646..af9d0c18b3 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue
@@ -7,6 +7,7 @@ import { DEFAULT_THRESHOLD } from '@/views/chart/components/editor/util/chart'
import TableThresholdEdit from '@/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue'
import TextLabelThresholdEdit from '@/views/chart/components/editor/editor-senior/components/dialog/TextLabelThresholdEdit.vue'
import TextThresholdEdit from '@/views/chart/components/editor/editor-senior/components/dialog/TextThresholdEdit.vue'
+import LineThresholdEdit from '@/views/chart/components/editor/editor-senior/components/dialog/LineThresholdEdit.vue'
import { fieldType } from '@/utils/attr'
import { defaultsDeep } from 'lodash-es'
import { iconFieldMap } from '@/components/icon-group/field-list'
@@ -50,7 +51,9 @@ const state = reactive({
editLabelThresholdDialog: false,
thresholdArr: [],
editTableThresholdDialog: false,
- tableThresholdArr: []
+ tableThresholdArr: [],
+ editLineThresholdDialog: false,
+ lineThresholdArr: []
})
const init = () => {
@@ -63,6 +66,7 @@ const init = () => {
state.textThresholdArr = JSON.parse(JSON.stringify(state.thresholdForm.textLabelThreshold))
state.thresholdArr = JSON.parse(JSON.stringify(state.thresholdForm.labelThreshold))
state.tableThresholdArr = JSON.parse(JSON.stringify(state.thresholdForm.tableThreshold))
+ state.lineThresholdArr = JSON.parse(JSON.stringify(state.thresholdForm.lineThreshold ?? []))
}
}
const changeThreshold = () => {
@@ -257,6 +261,77 @@ const changeTableThreshold = () => {
changeThreshold()
closeTableThreshold()
}
+
+const lineThresholdChange = val => {
+ state.lineThresholdArr = val
+}
+const editLineThreshold = () => {
+ state.editLineThresholdDialog = true
+}
+const closeLineThreshold = () => {
+ state.editLineThresholdDialog = false
+}
+const changeLineThreshold = () => {
+ // check line config
+ for (let i = 0; i < state.lineThresholdArr?.length; i++) {
+ const field = state.lineThresholdArr[i]
+ if (!field.fieldId) {
+ ElMessage.error(t('chart.field_can_not_empty'))
+ return
+ }
+ if (!field.conditions || field.conditions.length === 0) {
+ ElMessage.error(t('chart.conditions_can_not_empty'))
+ return
+ }
+ for (let j = 0; j < field.conditions.length; j++) {
+ const ele = field.conditions[j]
+ if (!ele.term || ele.term === '') {
+ ElMessage.error(t('chart.exp_can_not_empty'))
+ return
+ }
+ if (ele.term === 'between') {
+ if (
+ !ele.term.includes('null') &&
+ !ele.term.includes('empty') &&
+ (ele.min === '' || ele.max === '')
+ ) {
+ ElMessage.error(t('chart.value_can_not_empty'))
+ return
+ }
+ if (
+ (field.field.deType === 2 || field.field.deType === 3 || field.field.deType === 4) &&
+ (parseFloat(ele.min).toString() === 'NaN' || parseFloat(ele.max).toString() === 'NaN')
+ ) {
+ ElMessage.error(t('chart.value_error'))
+ return
+ }
+ if (
+ (field.field.deType === 2 || field.field.deType === 3 || field.field.deType === 4) &&
+ parseFloat(ele.min) > parseFloat(ele.max)
+ ) {
+ ElMessage.error(t('chart.value_min_max_invalid'))
+ return
+ }
+ } else {
+ if (!ele.term.includes('null') && !ele.term.includes('empty') && ele.value === '') {
+ ElMessage.error(t('chart.value_can_not_empty'))
+ return
+ }
+ if (
+ (field.field.deType === 2 || field.field.deType === 3 || field.field.deType === 4) &&
+ parseFloat(ele.value).toString() === 'NaN'
+ ) {
+ ElMessage.error(t('chart.value_error'))
+ return
+ }
+ }
+ }
+ }
+ state.thresholdForm.lineThreshold = JSON.parse(JSON.stringify(state.lineThresholdArr ?? []))
+ changeThreshold()
+ closeLineThreshold()
+}
+
const getFieldName = field => (field.chartShowName ? field.chartShowName : field.name)
const getDynamicStyleLabel = (item, fieldObj) => {
@@ -713,6 +788,129 @@ init()
+
+
+
+
+ 条件样式设置
+
+
+ 已设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ fieldItem.field.name
+ }}
+
+
+
+
+ {{ t('chart.filter_lt') }}
+
+
+ {{ t('chart.filter_gt') }}
+
+
+ {{ t('chart.filter_le') }}
+
+
+ {{ t('chart.filter_ge') }}
+
+
+ {{ t('chart.filter_between') }}
+
+ 默认
+
+
+
+ {{ t('chart.fix') }}
+
+
+
+
+ {{ t('chart.dynamic') }}
+
+
+
+ {{ item.value }}
+
+ {{ item.min }} ≤{{ t('chart.drag_block_label_value') }}≤ {{ item.max }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/LineThresholdEdit.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/LineThresholdEdit.vue
new file mode 100644
index 0000000000..029b7d1f90
--- /dev/null
+++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/LineThresholdEdit.vue
@@ -0,0 +1,499 @@
+
+
+