forked from github/dataease
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
7cec3fd64e
@ -0,0 +1,26 @@
|
||||
package io.dataease.controller.ai;
|
||||
|
||||
import io.dataease.service.ai.AiBaseService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author : WangJiaHao
|
||||
* @date : 2024/3/27 09:44
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("aiBase")
|
||||
public class AiComponentController {
|
||||
@Resource
|
||||
private AiBaseService aiBaseService;
|
||||
|
||||
@GetMapping("findTargetUrl")
|
||||
Map<String, String> findTargetUrl(){
|
||||
return aiBaseService.findTargetUrl();
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package io.dataease.service.ai;
|
||||
|
||||
import io.dataease.service.system.SystemParameterService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author : WangJiaHao
|
||||
* @date : 2024/3/27 09:47
|
||||
*/
|
||||
@Service
|
||||
public class AiBaseService {
|
||||
@Resource
|
||||
private SystemParameterService parameterService;
|
||||
|
||||
public Map<String, String> findTargetUrl() {
|
||||
String baseUrl = parameterService.getValue("ai.baseUrl");
|
||||
Map<String,String> result = new HashMap<>();
|
||||
|
||||
if(StringUtils.isNotEmpty(baseUrl)){
|
||||
result.put("ai.baseUrl",baseUrl);
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1039,6 +1039,18 @@ public class ChartViewService {
|
||||
|| StringUtils.containsIgnoreCase(view.getType(), "table-pivot")) {
|
||||
// 动态阈值
|
||||
dynamicAssistFields = getDynamicThresholdFields(view);
|
||||
// 明细表非数据列字段要加进来
|
||||
if (StringUtils.containsIgnoreCase(view.getType(), "table-info")) {
|
||||
Set<String> fieldIds = xAxis.stream().map(ChartViewFieldDTO::getId).collect(Collectors.toSet());
|
||||
List<ChartViewFieldDTO> finalXAxis = xAxis;
|
||||
dynamicAssistFields.forEach(i -> {
|
||||
if (!fieldIds.contains(i.getFieldId())) {
|
||||
ChartViewFieldDTO fieldDTO = new ChartViewFieldDTO();
|
||||
BeanUtils.copyBean(fieldDTO, i.getCurField());
|
||||
finalXAxis.add(fieldDTO);
|
||||
}
|
||||
});
|
||||
}
|
||||
assistFields = getAssistFields(dynamicAssistFields, yAxis, xAxis);
|
||||
}
|
||||
|
||||
@ -1289,6 +1301,9 @@ public class ChartViewService {
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(assistFields)) {
|
||||
if (StringUtils.equalsIgnoreCase("table-info", view.getType())) {
|
||||
datasourceRequest.setQuery(querySql);
|
||||
}
|
||||
datasourceAssistRequest.setQuery(assistSQL(datasourceRequest.getQuery(), assistFields, ds));
|
||||
logger.info(datasourceAssistRequest.getQuery());
|
||||
assistData = datasourceProvider.getData(datasourceAssistRequest);
|
||||
@ -2407,7 +2422,7 @@ public class ChartViewService {
|
||||
List<ChartSeniorThresholdDTO> conditions = gson.fromJson(itemConditions.toJSONString(), new TypeToken<List<ChartSeniorThresholdDTO>>() {
|
||||
}.getType());
|
||||
for (ChartSeniorThresholdDTO condition : conditions) {
|
||||
if (StringUtils.equalsIgnoreCase(condition.getField(), "0")) {
|
||||
if (StringUtils.equalsAnyIgnoreCase(condition.getField(), "0", "2")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -16,3 +16,5 @@ CREATE TABLE `panel_link_ticket`
|
||||
|
||||
ALTER TABLE `panel_link_mapping`
|
||||
ADD COLUMN `require_ticket` tinyint(1) NOT NULL DEFAULT 0 AFTER `uuid`;
|
||||
|
||||
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('ai.baseUrl', 'https://maxkb.fit2cloud.com/ui/chat/5baa787163381fa2', 'text', 100);
|
10
core/frontend/src/api/ai/aiComponent.js
Normal file
10
core/frontend/src/api/ai/aiComponent.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export async function findBaseParams() {
|
||||
return request({
|
||||
url: '/aiBase/findTargetUrl',
|
||||
method: 'get',
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
@ -354,6 +354,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unReadyList: [],
|
||||
dialogLoading: false,
|
||||
imageDownloading: false,
|
||||
innerRefreshTimer: null,
|
||||
@ -653,6 +654,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('tab-canvas-change', this.tabSwitch)
|
||||
bus.$on('resolve-wait-condition', this.resolveWaitCondition)
|
||||
this.bindPluginEvent()
|
||||
},
|
||||
|
||||
@ -674,15 +676,16 @@ export default {
|
||||
bus.$off('onThemeAttrChange', this.optFromBatchSingleProp)
|
||||
bus.$off('clear_panel_linkage', this.clearPanelLinkage)
|
||||
bus.$off('tab-canvas-change', this.tabSwitch)
|
||||
bus.$off('resolve-wait-condition', this.resolveWaitCondition)
|
||||
},
|
||||
created() {
|
||||
this.refId = uuid.v1
|
||||
if (this.element && this.element.propValue && this.element.propValue.viewId) {
|
||||
const group = this.groupFilter(this.filters)
|
||||
const unReadyList = group.unReady
|
||||
this.unReadyList = group.unReady
|
||||
const readyList = group.ready
|
||||
if (unReadyList.length) {
|
||||
Promise.all(this.filters.filter(f => f instanceof Promise)).then(fList => {
|
||||
if (this.unReadyList.length) {
|
||||
Promise.all(this.unReadyList.filter(f => f instanceof Promise)).then(fList => {
|
||||
this.filter.filter = readyList.concat(fList)
|
||||
this.getData(this.element.propValue.viewId, false)
|
||||
})
|
||||
@ -692,6 +695,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resolveWaitCondition(p) {
|
||||
this.unReadyList.filter(f => f instanceof Promise && f.componentId === p.componentId).map(f => {
|
||||
f.cacheObj.cb(p)
|
||||
})
|
||||
},
|
||||
groupFilter(filters) {
|
||||
const result = {
|
||||
ready: [],
|
||||
|
@ -67,8 +67,8 @@
|
||||
<script>
|
||||
import { ApplicationContext } from '@/utils/ApplicationContext'
|
||||
import { timeSection } from '@/utils'
|
||||
import dayjs from "dayjs";
|
||||
import { getThisStart, getLastStart, getAround } from "@/views/panel/filter/filterMain/time-format-dayjs.js";
|
||||
import dayjs from 'dayjs'
|
||||
import { getThisStart, getLastStart, getAround } from '@/views/panel/filter/filterMain/time-format-dayjs.js'
|
||||
import bus from '@/utils/bus'
|
||||
import customInput from '@/components/widget/deWidget/customInput'
|
||||
import { dateMap, years, seconds } from '@/components/widget/deWidget/serviceNameFn'
|
||||
@ -312,7 +312,7 @@ export default {
|
||||
},
|
||||
onPick: ({ minDate }) => {
|
||||
this.startWindowTime = +new Date(minDate)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
@ -352,7 +352,7 @@ export default {
|
||||
},
|
||||
'defaultoptions': function(val, old) {
|
||||
if (!this.element.options.attrs.default.isDynamic) {
|
||||
this.values = this.fillValueDerfault()
|
||||
this.values = this.fillValueDerfault(false)
|
||||
this.dateChange(this.values)
|
||||
return
|
||||
}
|
||||
@ -471,10 +471,10 @@ export default {
|
||||
},
|
||||
loadInit() {
|
||||
this.clearTime()
|
||||
if (this.refreshHandler()) {
|
||||
return
|
||||
}
|
||||
const existLastValidFilters = this.$store.state.lastValidFilters && this.$store.state.lastValidFilters[this.element.id]
|
||||
if (this.element.options.attrs.default?.isDynamic && !existLastValidFilters) {
|
||||
return this.refreshHandler()
|
||||
}
|
||||
if (this.element.options.value || existLastValidFilters) {
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
@ -623,9 +623,9 @@ export default {
|
||||
return timeSection(parseFloat(value), this.componentType || this.element.options.attrs.type, this.labelFormat)
|
||||
}
|
||||
},
|
||||
fillValueDerfault() {
|
||||
fillValueDerfault(useLastFilter = true) {
|
||||
let defaultV = this.element.options.value === null ? '' : this.element.options.value.toString()
|
||||
if (this.inDraw) {
|
||||
if (this.inDraw && useLastFilter) {
|
||||
let lastFilters = null
|
||||
if (this.$store.state.lastValidFilters) {
|
||||
lastFilters = this.$store.state.lastValidFilters[this.element.id]
|
||||
|
@ -2,9 +2,9 @@
|
||||
<component
|
||||
:is="mode"
|
||||
v-if="element.options!== null && element.options.attrs!==null && show "
|
||||
:id="element.id"
|
||||
ref="deSelect"
|
||||
v-model="value"
|
||||
:id="element.id"
|
||||
:class-id="'visual-' + element.id + '-' + inDraw + '-' + inScreen"
|
||||
:collapse-tags="showNumber"
|
||||
:clearable="(inDraw || !selectFirst)"
|
||||
@ -22,7 +22,7 @@
|
||||
:flag="flag"
|
||||
:is-config="isConfig"
|
||||
:custom-style="customStyle"
|
||||
:radioStyle="element.style"
|
||||
:radio-style="element.style"
|
||||
@resetKeyWords="filterMethod"
|
||||
@change="changeValue"
|
||||
@focus="setOptionWidth"
|
||||
@ -319,7 +319,7 @@ export default {
|
||||
this.$refs.deSelect && this.$refs.deSelect.resetSelectAll && this.$refs.deSelect.resetSelectAll()
|
||||
},
|
||||
|
||||
searchWithKey: _.debounce(function () {
|
||||
searchWithKey: _.debounce(function() {
|
||||
this.refreshOptions()
|
||||
}, 1000),
|
||||
filterMethod(key) {
|
||||
|
15
core/frontend/src/icons/svg/dv-ai.svg
Normal file
15
core/frontend/src/icons/svg/dv-ai.svg
Normal file
@ -0,0 +1,15 @@
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="24" height="24" rx="12" fill="url(#paint0_linear_12894_282181)"/>
|
||||
<path d="M12.9473 16.7067H10.6493L9.7976 17.5584C9.74771 17.6083 9.71373 17.6719 9.69997 17.7411C9.68621 17.8103 9.69327 17.882 9.72027 17.9472C9.74727 18.0124 9.793 18.0681 9.85167 18.1073C9.91033 18.1465 9.97931 18.1675 10.0499 18.1675H13.5468C13.6173 18.1674 13.6863 18.1465 13.745 18.1073C13.8036 18.0681 13.8494 18.0124 13.8764 17.9472C13.9034 17.882 13.9104 17.8103 13.8967 17.7411C13.8829 17.6719 13.8489 17.6083 13.799 17.5584L12.9473 16.7067Z" fill="white"/>
|
||||
<path d="M19.2622 10.024H18.8092V13.2107H19.2622C19.3537 13.2107 19.4414 13.1744 19.5061 13.1097C19.5708 13.0451 19.6071 12.9573 19.6071 12.8659V10.3689C19.6071 10.2775 19.5708 10.1897 19.5061 10.1251C19.4414 10.0604 19.3537 10.024 19.2622 10.024Z" fill="white"/>
|
||||
<path d="M5.19074 10.024H4.73772C4.64625 10.024 4.55852 10.0604 4.49384 10.1251C4.42916 10.1897 4.39282 10.2775 4.39282 10.3689V12.8659C4.39282 12.9573 4.42916 13.0451 4.49384 13.1097C4.55852 13.1744 4.64625 13.2107 4.73772 13.2107H5.19074V10.024Z" fill="white"/>
|
||||
<path d="M13.7492 10.4459C13.5781 10.4459 13.414 10.5138 13.2931 10.6348C13.1721 10.7558 13.1041 10.9198 13.1041 11.0909V11.5534C13.1041 11.7245 13.1721 11.8886 13.2931 12.0096C13.414 12.1306 13.5781 12.1985 13.7492 12.1985C13.9203 12.1985 14.0844 12.1306 14.2054 12.0096C14.3263 11.8886 14.3943 11.7245 14.3943 11.5534V11.0909C14.3943 11.0062 14.3776 10.9223 14.3452 10.8441C14.3128 10.7658 14.2653 10.6947 14.2054 10.6348C14.1455 10.5749 14.0743 10.5274 13.9961 10.4949C13.9178 10.4625 13.8339 10.4459 13.7492 10.4459Z" fill="white"/>
|
||||
<path d="M10.3848 10.4459C10.2137 10.4459 10.0497 10.5138 9.92868 10.6348C9.80771 10.7558 9.73975 10.9198 9.73975 11.0909V11.5534C9.73975 11.7245 9.80771 11.8886 9.92869 12.0096C10.0497 12.1306 10.2138 12.1985 10.3848 12.1985C10.5559 12.1985 10.72 12.1306 10.841 12.0096C10.962 11.8886 11.0299 11.7245 11.0299 11.5534V11.0909C11.0299 11.0062 11.0132 10.9223 10.9808 10.8441C10.9484 10.7658 10.9009 10.6947 10.841 10.6348C10.7811 10.5749 10.71 10.5274 10.6317 10.4949C10.5534 10.4625 10.4695 10.4459 10.3848 10.4459Z" fill="white"/>
|
||||
<path d="M15.9194 6.78653H8.08045C7.38822 6.78731 6.72456 7.06264 6.23508 7.55212C5.7456 8.0416 5.47026 8.70526 5.46948 9.39749V13.8169C5.47026 14.5092 5.74559 15.1728 6.23507 15.6623C6.72455 16.1518 7.38821 16.4271 8.08045 16.4279H15.9194C16.6117 16.4272 17.2754 16.1518 17.7648 15.6623C18.2543 15.1728 18.5297 14.5092 18.5304 13.8169V9.39749C18.5297 8.70526 18.2543 8.0416 17.7648 7.55212C17.2753 7.06263 16.6117 6.7873 15.9194 6.78653ZM16.1387 13.7906C16.1387 13.9153 16.0891 14.0349 16.0009 14.1231C15.9127 14.2113 15.7931 14.2609 15.6684 14.2609H11.8448C11.2663 14.2609 10.6974 14.4095 10.1929 14.6926L8.91016 15.4124V14.2609H8.33154C8.2068 14.2609 8.08718 14.2113 7.99898 14.1231C7.91078 14.0349 7.86123 13.9153 7.86123 13.7906V9.10552C7.86123 8.98078 7.91078 8.86116 7.99898 8.77296C8.08718 8.68476 8.2068 8.63521 8.33154 8.63521H15.6684C15.7931 8.63521 15.9127 8.68476 16.0009 8.77296C16.0891 8.86116 16.1387 8.98079 16.1387 9.10552V13.7906Z" fill="white"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_12894_282181" x1="24" y1="13" x2="4.55702e-07" y2="13" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#9258F7"/>
|
||||
<stop offset="1" stop-color="#3370FF"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 3.3 KiB |
79
core/frontend/src/layout/components/AiComponent.vue
Normal file
79
core/frontend/src/layout/components/AiComponent.vue
Normal file
@ -0,0 +1,79 @@
|
||||
<script>
|
||||
import bus from '@/utils/bus'
|
||||
export default {
|
||||
name: 'AiComponent',
|
||||
props: {
|
||||
baseUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
aiDialogShow: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('aiComponentChange', this.showChange)
|
||||
},
|
||||
methods: {
|
||||
showChange() {
|
||||
this.aiDialogShow = !this.aiDialogShow
|
||||
},
|
||||
closeAi() {
|
||||
this.aiDialogShow = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
class="ai-main"
|
||||
:class="{ 'ai-main-active': aiDialogShow }"
|
||||
>
|
||||
<div class="ai-content">
|
||||
<div class="close"><i @click="closeAi" class="el-icon-close" /></div>
|
||||
<iframe
|
||||
:src="baseUrl"
|
||||
style="width: 100%; height: 100%"
|
||||
frameborder="0"
|
||||
allow="microphone"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.ai-main {
|
||||
position: fixed;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
bottom: 48px;
|
||||
right: 36px;
|
||||
height: 0;
|
||||
width: 25%;
|
||||
min-width: 350px;
|
||||
max-width: 420px;
|
||||
transition: 0.2s;
|
||||
z-index: 10;
|
||||
.ai-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 12px;
|
||||
font-size: 24px;
|
||||
color: #1a1a1a;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ai-main-active {
|
||||
border: 1px solid #d9d9d9;
|
||||
height: 50%;
|
||||
min-height: 450px;
|
||||
max-height: 600px;
|
||||
}
|
||||
</style>
|
@ -45,6 +45,18 @@
|
||||
class="right-menu"
|
||||
style="color: var(--TopTextColor)"
|
||||
>
|
||||
<div
|
||||
v-if="aiBaseUrl"
|
||||
style="height: 100%;padding: 0 8px;"
|
||||
class="right-menu-item hover-effect"
|
||||
>
|
||||
<a style="font-size:24px;display: flex;height: 100%;width: 100%;justify-content: center;align-items: center;">
|
||||
<svg-icon
|
||||
icon-class="dv-ai"
|
||||
@click="handleAiClick"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<notification class="right-menu-item hover-effect" />
|
||||
<lang-select class="right-menu-item hover-effect" />
|
||||
<div
|
||||
@ -105,6 +117,7 @@
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<ai-component v-if="aiBaseUrl" :base-url="aiBaseUrl"/>
|
||||
|
||||
<!--模板市场全屏显示框-->
|
||||
<el-dialog
|
||||
@ -137,9 +150,12 @@ import { pluginLoaded } from '@/api/user'
|
||||
import { initTheme } from '@/utils/ThemeUtil'
|
||||
import TemplateMarket from '@/views/panel/templateMarket'
|
||||
import { changeFavicon, inOtherPlatform } from '@/utils/index'
|
||||
import AiComponent from '@/layout/components/AiComponent'
|
||||
import { findBaseParams } from '@/api/ai/aiComponent'
|
||||
export default {
|
||||
name: 'Topbar',
|
||||
components: {
|
||||
AiComponent,
|
||||
TemplateMarket,
|
||||
AppLink,
|
||||
Notification,
|
||||
@ -154,6 +170,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
aiBaseUrl: null,
|
||||
uiInfo: null,
|
||||
logoUrl: null,
|
||||
axiosFinished: false,
|
||||
@ -252,6 +269,7 @@ export default {
|
||||
const drop = this.$refs['my-drop']
|
||||
drop && drop.show && drop.show()
|
||||
})
|
||||
this.initAiBase()
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('beforeunload', (e) => this.beforeunloadHandler(e))
|
||||
@ -275,6 +293,17 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async initAiBase() {
|
||||
await findBaseParams().then(rsp => {
|
||||
const params = rsp.data
|
||||
if (params && params['ai.baseUrl']) {
|
||||
this.aiBaseUrl = params['ai.baseUrl']
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAiClick() {
|
||||
bus.$emit('aiComponentChange')
|
||||
},
|
||||
beforeunloadHandler() {
|
||||
this.beforeUnload_time = new Date().getTime()
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Condition } from '@/components/widget/bean/Condition'
|
||||
import { ApplicationContext } from '@/utils/ApplicationContext'
|
||||
import store from '@/store'
|
||||
|
||||
import bus from '@/utils/bus'
|
||||
/**
|
||||
* 判断两个conditions数组是否相同
|
||||
* @param {*} conditions1
|
||||
@ -167,6 +167,7 @@ export const buildAfterFilterLoaded = (originMap, p) => {
|
||||
if (conditions?.length) {
|
||||
conditions.forEach(condition => {
|
||||
if (condition instanceof Promise && condition.componentId === componentId && condition.cacheObj?.cb) {
|
||||
bus.$emit('resolve-wait-condition', p)
|
||||
condition.cacheObj.cb(p)
|
||||
}
|
||||
})
|
||||
|
@ -119,7 +119,7 @@ export function baseTableInfo(container, chart, action, tableData, pageInfo, vue
|
||||
}
|
||||
fields.forEach(ele => {
|
||||
const f = nameMap[ele.dataeaseName]
|
||||
if (f.hidden === true) {
|
||||
if (!f || f.hidden === true) {
|
||||
return
|
||||
}
|
||||
columns.push(ele.dataeaseName)
|
||||
|
@ -407,6 +407,7 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
inject: ['filedList'],
|
||||
data() {
|
||||
return {
|
||||
thresholdArr: [],
|
||||
@ -637,7 +638,8 @@ export default {
|
||||
}
|
||||
|
||||
// 区分文本、数值、日期字段
|
||||
this.fields.forEach(ele => {
|
||||
const compareFields = this.chart.type === 'table-info' ? this.filedList() : this.fields
|
||||
compareFields.forEach(ele => {
|
||||
// 视图字段和计数字段不可用
|
||||
if (ele.chartId || ele.id === 'count') {
|
||||
return
|
||||
@ -725,7 +727,8 @@ export default {
|
||||
if (!id) {
|
||||
return {}
|
||||
}
|
||||
const fields = this.fields.filter(ele => {
|
||||
const compareFields = this.chart.type === 'table-info' ? this.filedList() : this.fields
|
||||
const fields = compareFields.filter(ele => {
|
||||
return ele.id === id
|
||||
})
|
||||
if (fields.length === 0) {
|
||||
|
@ -15,7 +15,10 @@
|
||||
</el-col>
|
||||
</el-header>
|
||||
<de-container>
|
||||
<de-aside-container close class="ms-aside-container">
|
||||
<de-aside-container
|
||||
close
|
||||
class="ms-aside-container"
|
||||
>
|
||||
<div
|
||||
v-show="showAside"
|
||||
style="width: 60px; left: 0px; top: 0px; bottom: 0px; position: absolute"
|
||||
@ -1363,7 +1366,7 @@ export default {
|
||||
const { value, attrs } = this.currentFilterCom.options
|
||||
if (!!value && attrs.setTimeRange) {
|
||||
const [startWindowTime, timeStamp] = attrs.default.isDynamic ? ApplicationContext.getService('timeDateRangeWidget').dynamicDateFormNow(this.currentFilterCom) : value.split(',')
|
||||
if(this.isInRange(attrs, +startWindowTime, dayjs(+timeStamp)
|
||||
if (this.isInRange(attrs, +startWindowTime, dayjs(+timeStamp)
|
||||
.startOf('day')
|
||||
.valueOf())) {
|
||||
this.openMessageSuccess(this.$t('time.filter_range'), 'error')
|
||||
|
Loading…
Reference in New Issue
Block a user