Merge pull request #9326 from dataease/pr@dev@style_code_format
style: code format
This commit is contained in:
commit
1eecb50e3f
@ -289,7 +289,7 @@ export function exportDataset(data) {
|
||||
url: 'dataset/table/exportDataset',
|
||||
method: 'post',
|
||||
data: data,
|
||||
loading: true,
|
||||
loading: true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,6 @@
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import DeEditor from '@/components/canvas/components/editor/DeEditor'
|
||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||
import bus from '@/utils/bus'
|
||||
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||
import { uuid } from 'vue-uuid'
|
||||
|
||||
@ -206,7 +206,7 @@ import { uploadFileResult } from '@/api/staticResource/staticResource'
|
||||
import eventBus from '@/components/canvas/utils/eventBus'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
import { exportExcelDownload } from '@/components/canvas/utils/utils'
|
||||
import { Button } from "element-ui";
|
||||
import { Button } from 'element-ui'
|
||||
|
||||
export default {
|
||||
components: { Background, LinkJumpSet, FieldsList, SettingMenu, LinkageField, MapLayerController },
|
||||
@ -476,70 +476,70 @@ export default {
|
||||
}
|
||||
|
||||
if (val && val.success === false) {
|
||||
this.openMessageSuccess( `${this.chart.title ? this.chart.title : this.chart.name} 导出失败,前往`, 'error',this.exportData);
|
||||
this.openMessageSuccess(`${this.chart.title ? this.chart.title : this.chart.name} 导出失败,前往`, 'error', this.exportData)
|
||||
}
|
||||
},
|
||||
exportData() {
|
||||
bus.$emit('data-export-center')
|
||||
},
|
||||
openMessageLoading(cb) {
|
||||
const h = this.$createElement;
|
||||
const iconClass = `el-icon-loading`;
|
||||
const customClass = `de-message-loading de-message-export`;
|
||||
const h = this.$createElement
|
||||
const iconClass = `el-icon-loading`
|
||||
const customClass = `de-message-loading de-message-export`
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
message: h('p', null, [
|
||||
this.$t('data_export.exporting'),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
type: 'text',
|
||||
size: 'mini'
|
||||
},
|
||||
class: "btn-text",
|
||||
class: 'btn-text',
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
cb()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
this.$t('data_export.export_center'),
|
||||
this.$t('data_export.export_center')
|
||||
),
|
||||
this.$t('data_export.export_info'),
|
||||
this.$t('data_export.export_info')
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
customClass
|
||||
})
|
||||
},
|
||||
openMessageSuccess(text, type, cb) {
|
||||
const h = this.$createElement;
|
||||
const iconClass = `el-icon-${type || "success"}`;
|
||||
const customClass = `de-message-${type || "success"} de-message-export`;
|
||||
const h = this.$createElement
|
||||
const iconClass = `el-icon-${type || 'success'}`
|
||||
const customClass = `de-message-${type || 'success'} de-message-export`
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
h("span", null, text),
|
||||
message: h('p', null, [
|
||||
h('span', null, text),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
type: 'text',
|
||||
size: 'mini'
|
||||
},
|
||||
class: "btn-text",
|
||||
class: 'btn-text',
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
cb()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
this.$t('data_export.export_center'),
|
||||
),
|
||||
this.$t('data_export.export_center')
|
||||
)
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
customClass
|
||||
})
|
||||
},
|
||||
exportExcelDownload() {
|
||||
exportExcelDownload(this.chart, null, null, null, null, this.exportDataCb)
|
||||
|
||||
@ -239,7 +239,7 @@ import ChartComponent from '@/views/chart/components/ChartComponent.vue'
|
||||
import TableNormal from '@/views/chart/components/table/TableNormal'
|
||||
import LabelNormal from '../../../views/chart/components/normal/LabelNormal'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import { Button } from "element-ui";
|
||||
import { Button } from 'element-ui'
|
||||
import bus from '@/utils/bus'
|
||||
import { mapState } from 'vuex'
|
||||
import { isChange } from '@/utils/conditionUtil'
|
||||
@ -760,63 +760,63 @@ export default {
|
||||
bus.$emit('data-export-center')
|
||||
},
|
||||
openMessageLoading(cb) {
|
||||
const h = this.$createElement;
|
||||
const iconClass = `el-icon-loading`;
|
||||
const customClass = `de-message-loading de-message-export`;
|
||||
const h = this.$createElement
|
||||
const iconClass = `el-icon-loading`
|
||||
const customClass = `de-message-loading de-message-export`
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
message: h('p', null, [
|
||||
this.$t('data_export.exporting'),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
type: 'text',
|
||||
size: 'mini'
|
||||
},
|
||||
class: "btn-text",
|
||||
class: 'btn-text',
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
cb()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
this.$t('data_export.export_center'),
|
||||
this.$t('data_export.export_center')
|
||||
),
|
||||
this.$t('data_export.export_info'),
|
||||
this.$t('data_export.export_info')
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
customClass
|
||||
})
|
||||
},
|
||||
openMessageSuccess(text, type, cb) {
|
||||
const h = this.$createElement;
|
||||
const iconClass = `el-icon-${type || "success"}`;
|
||||
const customClass = `de-message-${type || "success"} de-message-export`;
|
||||
const h = this.$createElement
|
||||
const iconClass = `el-icon-${type || 'success'}`
|
||||
const customClass = `de-message-${type || 'success'} de-message-export`
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
h("span", null, text),
|
||||
message: h('p', null, [
|
||||
h('span', null, text),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
type: 'text',
|
||||
size: 'mini'
|
||||
},
|
||||
class: "btn-text",
|
||||
class: 'btn-text',
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
cb()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
this.$t('data_export.export_center'),
|
||||
),
|
||||
this.$t('data_export.export_center')
|
||||
)
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
customClass
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
this.dialogLoading = true
|
||||
@ -826,7 +826,7 @@ export default {
|
||||
}
|
||||
|
||||
if (val && val.success === false) {
|
||||
this.openMessageSuccess( `${this.chart.title ? this.chart.title : this.chart.name} 导出失败,前往`, 'error',this.exportData);
|
||||
this.openMessageSuccess(`${this.chart.title ? this.chart.title : this.chart.name} 导出失败,前往`, 'error', this.exportData)
|
||||
}
|
||||
this.dialogLoading = false
|
||||
})
|
||||
@ -967,11 +967,14 @@ export default {
|
||||
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
|
||||
customAttrChart.label.show = false
|
||||
}
|
||||
const data = this.chart.data
|
||||
delete this.chart.data
|
||||
this.chart = {
|
||||
...this.chart,
|
||||
customAttr: JSON.stringify(customAttrChart),
|
||||
customStyle: JSON.stringify(customStyleChart)
|
||||
}
|
||||
this.chart.data = data
|
||||
},
|
||||
getData(id, cache = true, dataBroadcast = false) {
|
||||
if (this.requestStatus === 'waiting') {
|
||||
@ -1031,8 +1034,12 @@ export default {
|
||||
try {
|
||||
// 将视图传入echart组件
|
||||
if (response.success) {
|
||||
const data = response.data.data
|
||||
delete response.data.data
|
||||
this.chart = response.data
|
||||
this.view = response.data
|
||||
this.chart.data = data
|
||||
this.view.data = data
|
||||
if (this.chart.type.includes('table')) {
|
||||
this.$store.commit('setLastViewRequestInfo', { viewId: id, requestInfo: requestInfo })
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
|
||||
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
|
||||
import html2canvas from 'html2canvasde'
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import {deepCopy, exportExcelDownload, exportImg, exportImgNew, imgUrlTrans} from '@/components/canvas/utils/utils'
|
||||
import { deepCopy, exportExcelDownload, exportImgNew, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
|
||||
|
||||
@ -71,8 +71,8 @@ import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import {activeWatermark} from "@/components/canvas/tools/watermark";
|
||||
import {proxyUserLoginInfo, userLoginInfo} from "@/api/systemInfo/userLogin";
|
||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
export default {
|
||||
name: 'UserViewMobileDialog',
|
||||
components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal, PluginCom },
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div
|
||||
@click="handleClick(false)"
|
||||
v-if="arrowSide && !isInside"
|
||||
class="arrow-side-tree arrow-side-tree-left"
|
||||
@click="handleClick(false)"
|
||||
>
|
||||
<svg-icon
|
||||
icon-class="icon_left_outlined"
|
||||
@ -10,9 +10,9 @@
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@click="handleClick(true)"
|
||||
v-else-if="!arrowSide && isInside"
|
||||
class="arrow-side-tree arrow-side-tree-right"
|
||||
@click="handleClick(true)"
|
||||
>
|
||||
<svg-icon
|
||||
icon-class="icon_right_outlined"
|
||||
@ -29,7 +29,7 @@ export default {
|
||||
isInside: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState('app', [
|
||||
|
||||
@ -1,14 +1,19 @@
|
||||
<template>
|
||||
<el-aside
|
||||
:width="currentWidth"
|
||||
@mouseenter.native="mouseenter"
|
||||
@mouseleave.native="mouseleave"
|
||||
class="ms-aside-container"
|
||||
:class="{ retract: !sideTreeStatus }"
|
||||
:style="{'margin-left': !asideHidden ? 0 : '-' + currentWidth}"
|
||||
@mouseenter.native="mouseenter"
|
||||
@mouseleave.native="mouseleave"
|
||||
>
|
||||
<DeArrowSide v-if="!close" @changeSideTreeStatus="changeSideTreeStatus" :style="sideStyle" :isInside="!sideTreeStatus"></DeArrowSide>
|
||||
<slot/>
|
||||
<DeArrowSide
|
||||
v-if="!close"
|
||||
:style="sideStyle"
|
||||
:is-inside="!sideTreeStatus"
|
||||
@changeSideTreeStatus="changeSideTreeStatus"
|
||||
/>
|
||||
<slot />
|
||||
<de-horizontal-drag-bar
|
||||
v-if="isSystem"
|
||||
:type="type"
|
||||
@ -57,7 +62,7 @@ export default {
|
||||
return {
|
||||
asideHidden: false,
|
||||
currentWidth: '',
|
||||
sideTreeStatus: true,
|
||||
sideTreeStatus: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -65,7 +70,7 @@ export default {
|
||||
// 系统管理不需要拖拽菜单
|
||||
return this.isTemplate || (!this.$route.fullPath.includes('system') && this.showDragBar)
|
||||
},
|
||||
sideStyle () {
|
||||
sideStyle() {
|
||||
return this.sideTreeStatus ? { right: '-12px' } : { left: 0 }
|
||||
}
|
||||
},
|
||||
@ -80,11 +85,11 @@ export default {
|
||||
this.currentWidth = this.isCollapseWidth || this.type && getLayout(this.type) || this.width
|
||||
},
|
||||
mouseenter() {
|
||||
if(!this.sideTreeStatus) return
|
||||
if (!this.sideTreeStatus) return
|
||||
this.$store.dispatch('app/setArrowSide', true)
|
||||
},
|
||||
mouseleave() {
|
||||
if(!this.sideTreeStatus) return
|
||||
if (!this.sideTreeStatus) return
|
||||
this.$store.dispatch('app/setArrowSide', false)
|
||||
},
|
||||
changeSideTreeStatus(val) {
|
||||
|
||||
@ -40,8 +40,7 @@
|
||||
v-model="keywords"
|
||||
size="mini"
|
||||
class="input-with-select mb10"
|
||||
>
|
||||
</el-input>
|
||||
/>
|
||||
<p
|
||||
v-if="selectParams.multiple"
|
||||
class="tree-select-all"
|
||||
|
||||
@ -80,58 +80,58 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ApplicationContext } from "@/utils/ApplicationContext";
|
||||
import { timeSection } from "@/utils";
|
||||
import dayjs from "dayjs";
|
||||
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 bus from "@/utils/bus";
|
||||
import customInput from "@/components/widget/deWidget/customInput";
|
||||
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";
|
||||
import { mapState } from "vuex";
|
||||
import vanPopup from "vant/lib/popup";
|
||||
import vanDatetimePicker from "vant/lib/datetime-picker";
|
||||
import vanPicker from "vant/lib/picker";
|
||||
import "vant/lib/popup/style";
|
||||
import "vant/lib/datetime-picker/style";
|
||||
import "vant/lib/picker/style";
|
||||
seconds
|
||||
} from '@/components/widget/deWidget/serviceNameFn'
|
||||
import { mapState } from 'vuex'
|
||||
import vanPopup from 'vant/lib/popup'
|
||||
import vanDatetimePicker from 'vant/lib/datetime-picker'
|
||||
import vanPicker from 'vant/lib/picker'
|
||||
import 'vant/lib/popup/style'
|
||||
import 'vant/lib/datetime-picker/style'
|
||||
import 'vant/lib/picker/style'
|
||||
export default {
|
||||
components: { vanPopup, vanDatetimePicker, vanPicker },
|
||||
mixins: [customInput],
|
||||
props: {
|
||||
canvasId: {
|
||||
type: String,
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
element: {
|
||||
type: Object,
|
||||
default: null,
|
||||
default: null
|
||||
},
|
||||
inDraw: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: true
|
||||
},
|
||||
inScreen: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
default: true
|
||||
},
|
||||
size: String,
|
||||
isRelation: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
terminal: {
|
||||
type: String,
|
||||
default: "pc",
|
||||
},
|
||||
default: 'pc'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
minDate: new Date(1980, 0, 1),
|
||||
maxDate: new Date(2025, 10, 1),
|
||||
currentDate: new Date(),
|
||||
operator: "between",
|
||||
operator: 'between',
|
||||
defaultIndex: 2,
|
||||
columns: years,
|
||||
values: null,
|
||||
@ -149,197 +149,194 @@ export default {
|
||||
selectSecondInput: false,
|
||||
selectSecond: false,
|
||||
outTimer: null,
|
||||
innerTimer: null,
|
||||
};
|
||||
innerTimer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMobileStatus() {
|
||||
return this.mobileStatus || this.terminal === "mobile";
|
||||
return this.mobileStatus || this.terminal === 'mobile'
|
||||
},
|
||||
isRange() {
|
||||
if (!this.isMobileStatus) return false;
|
||||
return ["datetimerange", "daterange"].includes(this.componentType);
|
||||
if (!this.isMobileStatus) return false
|
||||
return ['datetimerange', 'daterange'].includes(this.componentType)
|
||||
},
|
||||
showdDatetimePicker() {
|
||||
if (!this.isMobileStatus) return false;
|
||||
if (this.showSecond && this.selectSecond) return false;
|
||||
return this.componentTypeVant !== "year";
|
||||
if (!this.isMobileStatus) return false
|
||||
if (this.showSecond && this.selectSecond) return false
|
||||
return this.componentTypeVant !== 'year'
|
||||
},
|
||||
showSecond() {
|
||||
if (!this.isMobileStatus) return false;
|
||||
return this.labelFormat?.endsWith("ss");
|
||||
if (!this.isMobileStatus) return false
|
||||
return this.labelFormat?.endsWith('ss')
|
||||
},
|
||||
componentTypeVant() {
|
||||
if (!this.isMobileStatus) return "";
|
||||
if (!this.isMobileStatus) return ''
|
||||
if (this.showSecond) {
|
||||
return "datetime";
|
||||
return 'datetime'
|
||||
}
|
||||
if (this.labelFormat?.endsWith("mm")) {
|
||||
return "datetime";
|
||||
if (this.labelFormat?.endsWith('mm')) {
|
||||
return 'datetime'
|
||||
}
|
||||
if (this.labelFormat?.endsWith("HH")) {
|
||||
return "datehour";
|
||||
if (this.labelFormat?.endsWith('HH')) {
|
||||
return 'datehour'
|
||||
}
|
||||
return dateMap[this.componentType];
|
||||
return dateMap[this.componentType]
|
||||
},
|
||||
extPoperClass() {
|
||||
if (
|
||||
this.labelFormat &&
|
||||
this.labelFormat.includes("HH") &&
|
||||
!this.labelFormat.includes("HH:mm")
|
||||
this.labelFormat.includes('HH') &&
|
||||
!this.labelFormat.includes('HH:mm')
|
||||
) {
|
||||
return "de-no-minite";
|
||||
return 'de-no-minite'
|
||||
}
|
||||
return "";
|
||||
return ''
|
||||
},
|
||||
defaultoptions() {
|
||||
if (
|
||||
!this.element ||
|
||||
!this.element.options ||
|
||||
!this.element.options.attrs.default
|
||||
)
|
||||
return "";
|
||||
return JSON.stringify(this.element.options.attrs.default);
|
||||
) { return '' }
|
||||
return JSON.stringify(this.element.options.attrs.default)
|
||||
},
|
||||
defaultValueStr() {
|
||||
if (!this.element || !this.element.options || !this.element.options.value)
|
||||
return "";
|
||||
return this.element.options.value.toString();
|
||||
if (!this.element || !this.element.options || !this.element.options.value) { return '' }
|
||||
return this.element.options.value.toString()
|
||||
},
|
||||
viewIds() {
|
||||
if (
|
||||
!this.element ||
|
||||
!this.element.options ||
|
||||
!this.element.options.attrs.viewIds
|
||||
)
|
||||
return "";
|
||||
return this.element.options.attrs.viewIds.toString();
|
||||
) { return '' }
|
||||
return this.element.options.attrs.viewIds.toString()
|
||||
},
|
||||
manualModify() {
|
||||
return !!this.element.options.manualModify;
|
||||
return !!this.element.options.manualModify
|
||||
},
|
||||
isTimeWidget() {
|
||||
const widget = ApplicationContext.getService(this.element.serviceName);
|
||||
return widget.isTimeWidget && widget.isTimeWidget();
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
return widget.isTimeWidget && widget.isTimeWidget()
|
||||
},
|
||||
componentType() {
|
||||
let result = this.element.options.attrs.type || "date";
|
||||
let result = this.element.options.attrs.type || 'date'
|
||||
if (this.isTimeWidget && this.element.options.attrs.showTime) {
|
||||
result =
|
||||
this.element.serviceName === "timeDateWidget"
|
||||
? "datetime"
|
||||
: "datetimerange";
|
||||
this.element.serviceName === 'timeDateWidget'
|
||||
? 'datetime'
|
||||
: 'datetimerange'
|
||||
}
|
||||
return result;
|
||||
return result
|
||||
},
|
||||
labelFormat() {
|
||||
const result = "yyyy-MM-dd";
|
||||
const result = 'yyyy-MM-dd'
|
||||
if (
|
||||
this.isTimeWidget &&
|
||||
this.element.options.attrs.showTime &&
|
||||
this.element.options.attrs.accuracy
|
||||
) {
|
||||
return result + " " + this.element.options.attrs.accuracy;
|
||||
return result + ' ' + this.element.options.attrs.accuracy
|
||||
}
|
||||
return null;
|
||||
return null
|
||||
},
|
||||
pickerOptions() {
|
||||
const widget = ApplicationContext.getService(this.element.serviceName);
|
||||
if (this.element.options.attrs.type === "daterange" && widget.shortcuts) {
|
||||
const cuts = widget.shortcuts();
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
if (this.element.options.attrs.type === 'daterange' && widget.shortcuts) {
|
||||
const cuts = widget.shortcuts()
|
||||
const result = cuts.map((cut) => {
|
||||
return {
|
||||
text: this.$t(cut.text),
|
||||
onClick: (picker) => {
|
||||
const param = cut.callBack();
|
||||
const param = cut.callBack()
|
||||
this.startWindowTime = param[0]
|
||||
const disabled = param.some(ele => {
|
||||
return this.disabledDate(ele - 1000)
|
||||
})
|
||||
this.startWindowTime = 0
|
||||
if (disabled) return
|
||||
picker.$emit("pick", param);
|
||||
},
|
||||
};
|
||||
});
|
||||
picker.$emit('pick', param)
|
||||
}
|
||||
}
|
||||
})
|
||||
return {
|
||||
shortcuts: result,
|
||||
disabledDate: (val) => {
|
||||
return this.disabledDate(val)
|
||||
},
|
||||
onPick: ({ minDate }) => {
|
||||
this.startWindowTime = +new Date(minDate);
|
||||
},
|
||||
};
|
||||
this.startWindowTime = +new Date(minDate)
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
defaultRangeTime() {
|
||||
if (
|
||||
this.element.options.attrs.type === "daterange" &&
|
||||
this.element.options.attrs.type === 'daterange' &&
|
||||
this.element.options.attrs.showTime
|
||||
) {
|
||||
return ["00:00:00", "23:59:59"];
|
||||
return ['00:00:00', '23:59:59']
|
||||
}
|
||||
return null;
|
||||
return null
|
||||
},
|
||||
showRequiredTips() {
|
||||
return (
|
||||
this.inDraw &&
|
||||
this.element.options.attrs.required &&
|
||||
(!this.values || this.values.length === 0)
|
||||
);
|
||||
)
|
||||
},
|
||||
...mapState(["canvasStyleData", "mobileStatus"]),
|
||||
...mapState(['canvasStyleData', 'mobileStatus'])
|
||||
},
|
||||
watch: {
|
||||
values: function (val, old) {
|
||||
values: function(val, old) {
|
||||
if (!this.inDraw) {
|
||||
this.$emit("widget-value-changed", val);
|
||||
this.$emit('widget-value-changed', val)
|
||||
}
|
||||
},
|
||||
viewIds: function (value, old) {
|
||||
if (typeof value === "undefined" || value === old) return;
|
||||
this.setCondition();
|
||||
viewIds: function(value, old) {
|
||||
if (typeof value === 'undefined' || value === old) return
|
||||
this.setCondition()
|
||||
},
|
||||
defaultValueStr: function (value, old) {
|
||||
defaultValueStr: function(value, old) {
|
||||
if (this.element.options.attrs.default.isDynamic) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (value === old) return;
|
||||
this.values = this.fillValueDerfault();
|
||||
this.dateChange(value);
|
||||
if (value === old) return
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(value)
|
||||
},
|
||||
defaultoptions: function (val, old) {
|
||||
defaultoptions: function(val, old) {
|
||||
if (!this.element.options.attrs.default.isDynamic) {
|
||||
this.values = this.fillValueDerfault(false);
|
||||
this.dateChange(this.values);
|
||||
return;
|
||||
this.values = this.fillValueDerfault(false)
|
||||
this.dateChange(this.values)
|
||||
return
|
||||
}
|
||||
if (val === old) return;
|
||||
const widget = ApplicationContext.getService(this.element.serviceName);
|
||||
this.values = widget.dynamicDateFormNow(this.element);
|
||||
this.dateChange(this.values);
|
||||
if (val === old) return
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
this.values = widget.dynamicDateFormNow(this.element)
|
||||
this.dateChange(this.values)
|
||||
},
|
||||
labelFormat: function (val, old) {
|
||||
labelFormat: function(val, old) {
|
||||
if (val !== old) {
|
||||
this.show = false;
|
||||
this.show = false
|
||||
this.$nextTick(() => {
|
||||
this.show = true;
|
||||
});
|
||||
this.show = true
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.loadInit();
|
||||
this.loadInit()
|
||||
this.$nextTick(() => {
|
||||
this.dynamicRefresh();
|
||||
});
|
||||
this.dynamicRefresh()
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
bus.$on("onScroll", this.onScroll);
|
||||
bus.$on('onScroll', this.onScroll)
|
||||
if (this.inDraw) {
|
||||
bus.$on("reset-default-value", this.resetDefaultValue);
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
const _this = this
|
||||
window.addEventListener('message', function(event) {
|
||||
@ -349,15 +346,15 @@ export default {
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearTime();
|
||||
bus.$off("onScroll", this.onScroll);
|
||||
bus.$off("reset-default-value", this.resetDefaultValue);
|
||||
this.clearTime()
|
||||
bus.$off('onScroll', this.onScroll)
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
},
|
||||
methods: {
|
||||
disabledDate(val) {
|
||||
const timeStamp = +new Date(val);
|
||||
const timeStamp = +new Date(val)
|
||||
if (!this.element.options.attrs.setTimeRange) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
const {
|
||||
intervalType,
|
||||
@ -371,264 +368,264 @@ export default {
|
||||
maximumSingleQuery,
|
||||
timeNumRange,
|
||||
relativeToCurrentTypeRange,
|
||||
aroundRange,
|
||||
} = this.element.options.attrs.timeRange || {};
|
||||
let isDynamicWindowTime = false;
|
||||
aroundRange
|
||||
} = this.element.options.attrs.timeRange || {}
|
||||
let isDynamicWindowTime = false
|
||||
if (this.startWindowTime && dynamicWindow) {
|
||||
isDynamicWindowTime =
|
||||
dayjs(this.startWindowTime)
|
||||
.add(maximumSingleQuery, "day")
|
||||
.startOf("day")
|
||||
.add(maximumSingleQuery, 'day')
|
||||
.startOf('day')
|
||||
.valueOf() -
|
||||
1000 <
|
||||
timeStamp;
|
||||
timeStamp
|
||||
}
|
||||
if (intervalType === "none") {
|
||||
if (dynamicWindow) return isDynamicWindowTime;
|
||||
return false;
|
||||
if (intervalType === 'none') {
|
||||
if (dynamicWindow) return isDynamicWindowTime
|
||||
return false
|
||||
}
|
||||
let startTime;
|
||||
if (relativeToCurrent === "custom") {
|
||||
let startTime
|
||||
if (relativeToCurrent === 'custom') {
|
||||
startTime = getAround(
|
||||
relativeToCurrentType,
|
||||
around === "f" ? "subtract" : "add",
|
||||
timeNum,
|
||||
);
|
||||
around === 'f' ? 'subtract' : 'add',
|
||||
timeNum
|
||||
)
|
||||
} else {
|
||||
switch (relativeToCurrent) {
|
||||
case "thisYear":
|
||||
startTime = getThisStart("year");
|
||||
break;
|
||||
case "lastYear":
|
||||
startTime = getLastStart("year");
|
||||
break;
|
||||
case "thisMonth":
|
||||
startTime = getThisStart("month");
|
||||
break;
|
||||
case "lastMonth":
|
||||
startTime = getLastStart("month");
|
||||
break;
|
||||
case "today":
|
||||
startTime = getThisStart("day");
|
||||
break;
|
||||
case "yesterday":
|
||||
startTime = getLastStart("day");
|
||||
break;
|
||||
case "monthBeginning":
|
||||
startTime = getThisStart("month");
|
||||
break;
|
||||
case "yearBeginning":
|
||||
startTime = getThisStart("year");
|
||||
break;
|
||||
case 'thisYear':
|
||||
startTime = getThisStart('year')
|
||||
break
|
||||
case 'lastYear':
|
||||
startTime = getLastStart('year')
|
||||
break
|
||||
case 'thisMonth':
|
||||
startTime = getThisStart('month')
|
||||
break
|
||||
case 'lastMonth':
|
||||
startTime = getLastStart('month')
|
||||
break
|
||||
case 'today':
|
||||
startTime = getThisStart('day')
|
||||
break
|
||||
case 'yesterday':
|
||||
startTime = getLastStart('day')
|
||||
break
|
||||
case 'monthBeginning':
|
||||
startTime = getThisStart('month')
|
||||
break
|
||||
case 'yearBeginning':
|
||||
startTime = getThisStart('year')
|
||||
break
|
||||
|
||||
default:
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
const startValue =
|
||||
regularOrTrends === "fixed" ? regularOrTrendsValue : startTime;
|
||||
regularOrTrends === 'fixed' ? regularOrTrendsValue : startTime
|
||||
|
||||
if (intervalType === "start") {
|
||||
return timeStamp < +new Date(startValue) || isDynamicWindowTime;
|
||||
if (intervalType === 'start') {
|
||||
return timeStamp < +new Date(startValue) || isDynamicWindowTime
|
||||
}
|
||||
|
||||
if (intervalType === "end") {
|
||||
return timeStamp > +new Date(startValue) || isDynamicWindowTime;
|
||||
if (intervalType === 'end') {
|
||||
return timeStamp > +new Date(startValue) || isDynamicWindowTime
|
||||
}
|
||||
|
||||
if (intervalType === "timeInterval") {
|
||||
if (intervalType === 'timeInterval') {
|
||||
const startTime =
|
||||
regularOrTrends === "fixed"
|
||||
regularOrTrends === 'fixed'
|
||||
? regularOrTrendsValue[0]
|
||||
: getAround(
|
||||
relativeToCurrentType,
|
||||
around === "f" ? "subtract" : "add",
|
||||
timeNum,
|
||||
);
|
||||
around === 'f' ? 'subtract' : 'add',
|
||||
timeNum
|
||||
)
|
||||
const endTime =
|
||||
regularOrTrends === "fixed"
|
||||
regularOrTrends === 'fixed'
|
||||
? regularOrTrendsValue[1]
|
||||
: getAround(
|
||||
relativeToCurrentTypeRange,
|
||||
aroundRange === "f" ? "subtract" : "add",
|
||||
timeNumRange,
|
||||
);
|
||||
aroundRange === 'f' ? 'subtract' : 'add',
|
||||
timeNumRange
|
||||
)
|
||||
return (
|
||||
timeStamp < +new Date(startTime) - 1000 ||
|
||||
timeStamp > +new Date(endTime) ||
|
||||
isDynamicWindowTime
|
||||
);
|
||||
)
|
||||
}
|
||||
},
|
||||
showPopupRight() {
|
||||
// eslint-disable-next-line
|
||||
const [_, end] = this.values || [];
|
||||
!!end && (this.currentDate = new Date(end));
|
||||
this.selectSecondInput = true;
|
||||
this.showDate = true;
|
||||
!!end && (this.currentDate = new Date(end))
|
||||
this.selectSecondInput = true
|
||||
this.showDate = true
|
||||
},
|
||||
cancel() {
|
||||
this.showDate = false;
|
||||
this.showDate = false
|
||||
},
|
||||
confirm() {
|
||||
this.setArrValue();
|
||||
this.setArrValue()
|
||||
if (this.showSecond) {
|
||||
this.columns = seconds;
|
||||
this.selectSecond = true;
|
||||
this.columns = seconds
|
||||
this.selectSecond = true
|
||||
}
|
||||
if (this.selectSecond || this.componentTypeVant === "year") {
|
||||
return;
|
||||
if (this.selectSecond || this.componentTypeVant === 'year') {
|
||||
return
|
||||
}
|
||||
this.showDate = false;
|
||||
this.mobileDateChange();
|
||||
this.showDate = false
|
||||
this.mobileDateChange()
|
||||
},
|
||||
onCancel() {
|
||||
this.showDate = false;
|
||||
this.showDate = false
|
||||
if (this.showSecond) {
|
||||
this.selectSecond = false;
|
||||
this.selectSecond = false
|
||||
}
|
||||
},
|
||||
setArrValue(val) {
|
||||
if (!this.isRange) {
|
||||
if (this.selectSecond) {
|
||||
this.values = this.values + val * 1000;
|
||||
return;
|
||||
this.values = this.values + val * 1000
|
||||
return
|
||||
}
|
||||
this.values = val ? +new Date(val) : +new Date(this.currentDate);
|
||||
return;
|
||||
this.values = val ? +new Date(val) : +new Date(this.currentDate)
|
||||
return
|
||||
}
|
||||
const [start, end] = this.values || [];
|
||||
const [start, end] = this.values || []
|
||||
if (this.selectSecond) {
|
||||
if (this.selectSecondInput) {
|
||||
this.values = [start, +new Date(this.currentDate) + val * 1000];
|
||||
this.values = [start, +new Date(this.currentDate) + val * 1000]
|
||||
} else {
|
||||
this.values = [+new Date(this.currentDate) + val * 1000, end];
|
||||
this.values = [+new Date(this.currentDate) + val * 1000, end]
|
||||
}
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (this.selectSecondInput) {
|
||||
this.values = [start, +new Date(this.currentDate)];
|
||||
this.values = [start, +new Date(this.currentDate)]
|
||||
} else {
|
||||
this.values = [+new Date(this.currentDate), end];
|
||||
this.values = [+new Date(this.currentDate), end]
|
||||
}
|
||||
},
|
||||
onConfirm(val) {
|
||||
this.showDate = false;
|
||||
this.setArrValue(val);
|
||||
this.showDate = false
|
||||
this.setArrValue(val)
|
||||
if (this.showSecond) {
|
||||
this.columns = years;
|
||||
this.selectSecond = false;
|
||||
this.columns = years
|
||||
this.selectSecond = false
|
||||
}
|
||||
this.mobileDateChange();
|
||||
this.mobileDateChange()
|
||||
},
|
||||
mobileDateChange() {
|
||||
if (this.isRange) {
|
||||
const [start, end] = this.values || [];
|
||||
if (!start || !end) return;
|
||||
const [start, end] = this.values || []
|
||||
if (!start || !end) return
|
||||
}
|
||||
this.dateChange(this.values);
|
||||
this.dateChange(this.values)
|
||||
},
|
||||
showPopup() {
|
||||
if (this.isRange) {
|
||||
const [start] = this.values || [];
|
||||
!!start && (this.currentDate = new Date(start));
|
||||
const [start] = this.values || []
|
||||
!!start && (this.currentDate = new Date(start))
|
||||
} else {
|
||||
this.currentDate = new Date(this.values);
|
||||
if (this.componentTypeVant === "year") {
|
||||
this.currentDate = new Date(this.values)
|
||||
if (this.componentTypeVant === 'year') {
|
||||
this.defaultIndex = years.findIndex(
|
||||
(ele) => `${this.currentDate.getFullYear()}` === ele,
|
||||
);
|
||||
(ele) => `${this.currentDate.getFullYear()}` === ele
|
||||
)
|
||||
}
|
||||
}
|
||||
this.selectSecondInput = false;
|
||||
this.showDate = true;
|
||||
this.selectSecondInput = false
|
||||
this.showDate = true
|
||||
},
|
||||
loadInit() {
|
||||
this.clearTime();
|
||||
this.clearTime()
|
||||
const existLastValidFilters =
|
||||
this.$store.state.lastValidFilters &&
|
||||
this.$store.state.lastValidFilters[this.element.id];
|
||||
this.$store.state.lastValidFilters[this.element.id]
|
||||
if (
|
||||
this.element.options.attrs.default?.isDynamic &&
|
||||
!existLastValidFilters
|
||||
) {
|
||||
return this.refreshHandler();
|
||||
return this.refreshHandler()
|
||||
}
|
||||
if (this.element.options.value || existLastValidFilters) {
|
||||
this.values = this.fillValueDerfault();
|
||||
this.dateChange(this.values);
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
},
|
||||
refreshHandler() {
|
||||
if (this.element.options.attrs.default?.isDynamic) {
|
||||
const widget = ApplicationContext.getService(this.element.serviceName);
|
||||
this.values = widget.dynamicDateFormNow(this.element);
|
||||
this.dateChange(this.values);
|
||||
return true;
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
this.values = widget.dynamicDateFormNow(this.element)
|
||||
this.dateChange(this.values)
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
return false
|
||||
},
|
||||
clearTime() {
|
||||
if (this.outTimer) {
|
||||
clearTimeout(this.outTimer);
|
||||
this.outTimer = null;
|
||||
clearTimeout(this.outTimer)
|
||||
this.outTimer = null
|
||||
}
|
||||
if (this.innerTimer) {
|
||||
clearInterval(this.innerTimer);
|
||||
this.innerTimer = null;
|
||||
clearInterval(this.innerTimer)
|
||||
this.innerTimer = null
|
||||
}
|
||||
},
|
||||
dynamicRefresh() {
|
||||
if (this.inDraw && this.element.options.attrs.default?.isDynamic) {
|
||||
const nowDate = new Date();
|
||||
const nowTime = nowDate.getTime();
|
||||
const nowDate = new Date()
|
||||
const nowTime = nowDate.getTime()
|
||||
const tomorrow = new Date(
|
||||
`${nowDate.getFullYear()}-${nowDate.getMonth() + 1}-${
|
||||
nowDate.getDate() + 1
|
||||
} 00:00:01`,
|
||||
);
|
||||
const tomorrowTime = tomorrow.getTime();
|
||||
this.clearTime();
|
||||
} 00:00:01`
|
||||
)
|
||||
const tomorrowTime = tomorrow.getTime()
|
||||
this.clearTime()
|
||||
this.outTimer = setTimeout(() => {
|
||||
if (this.inDraw) {
|
||||
this.refreshHandler();
|
||||
this.refreshHandler()
|
||||
}
|
||||
this.innerTimer = setInterval(
|
||||
() => {
|
||||
if (this.inDraw) {
|
||||
this.refreshHandler();
|
||||
this.refreshHandler()
|
||||
}
|
||||
},
|
||||
24 * 3600 * 1000,
|
||||
);
|
||||
}, tomorrowTime - nowTime);
|
||||
24 * 3600 * 1000
|
||||
)
|
||||
}, tomorrowTime - nowTime)
|
||||
}
|
||||
},
|
||||
clearHandler() {
|
||||
this.values = null;
|
||||
this.values = null
|
||||
},
|
||||
onScroll() {
|
||||
if (this.onFocus) {
|
||||
this.$refs.dateRef.hidePicker();
|
||||
this.$refs.dateRef.hidePicker()
|
||||
}
|
||||
},
|
||||
textSame(str1, str2) {
|
||||
if (str1 === null && str2 === null) {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
if (
|
||||
str1 !== null &&
|
||||
str2 !== null &&
|
||||
typeof str1 !== "undefined" &&
|
||||
typeof str2 !== "undefined"
|
||||
typeof str1 !== 'undefined' &&
|
||||
typeof str2 !== 'undefined'
|
||||
) {
|
||||
return str1.toString() === str2.toString();
|
||||
return str1.toString() === str2.toString()
|
||||
}
|
||||
return false;
|
||||
return false
|
||||
},
|
||||
resetDefaultValue(ele) {
|
||||
const id = ele.id;
|
||||
const eleVal = ele.options.value.toString();
|
||||
const id = ele.id
|
||||
const eleVal = ele.options.value.toString()
|
||||
if (
|
||||
this.inDraw &&
|
||||
this.manualModify &&
|
||||
@ -637,141 +634,141 @@ export default {
|
||||
this.textSame(this.defaultValueStr, eleVal)
|
||||
) {
|
||||
if (!this.element.options.attrs.default.isDynamic) {
|
||||
this.values = this.fillValueDerfault();
|
||||
this.dateChange(this.values);
|
||||
return;
|
||||
this.values = this.fillValueDerfault()
|
||||
this.dateChange(this.values)
|
||||
return
|
||||
}
|
||||
const widget = ApplicationContext.getService(this.element.serviceName);
|
||||
this.values = widget.dynamicDateFormNow(this.element);
|
||||
this.dateChange(this.values);
|
||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||
this.values = widget.dynamicDateFormNow(this.element)
|
||||
this.dateChange(this.values)
|
||||
}
|
||||
},
|
||||
onBlur() {
|
||||
this.startWindowTime = 0;
|
||||
this.onFocus = false;
|
||||
this.startWindowTime = 0
|
||||
this.onFocus = false
|
||||
},
|
||||
toFocus() {
|
||||
this.onFocus = true;
|
||||
this.onFocus = true
|
||||
this.$nextTick(() => {
|
||||
this.handleCoustomStyle();
|
||||
});
|
||||
this.handleCoustomStyle()
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.setCondition();
|
||||
this.setCondition()
|
||||
},
|
||||
getCondition() {
|
||||
const param = {
|
||||
canvasId: this.canvasId,
|
||||
component: this.element,
|
||||
value: this.formatFilterValue(),
|
||||
operator: this.operator,
|
||||
};
|
||||
param.value = this.formatValues(param.value);
|
||||
return param;
|
||||
operator: this.operator
|
||||
}
|
||||
param.value = this.formatValues(param.value)
|
||||
return param
|
||||
},
|
||||
setCondition() {
|
||||
if (this.showRequiredTips) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
const param = this.getCondition();
|
||||
const param = this.getCondition()
|
||||
!this.isRelation &&
|
||||
this.inDraw &&
|
||||
this.$store.commit("addViewFilter", param);
|
||||
this.$store.commit('addViewFilter', param)
|
||||
},
|
||||
dateChange(value) {
|
||||
if (!this.inDraw) {
|
||||
if (value === null) {
|
||||
this.element.options.value = "";
|
||||
this.element.options.value = ''
|
||||
} else {
|
||||
this.element.options.value = Array.isArray(value)
|
||||
? value.join()
|
||||
: value.toString();
|
||||
: value.toString()
|
||||
}
|
||||
this.element.options.manualModify = false;
|
||||
this.element.options.manualModify = false
|
||||
} else {
|
||||
this.element.options.manualModify = true;
|
||||
this.element.options.manualModify = true
|
||||
if (!this.showRequiredTips) {
|
||||
this.$store.commit("setLastValidFilters", {
|
||||
this.$store.commit('setLastValidFilters', {
|
||||
componentId: this.element.id,
|
||||
val:
|
||||
this.values && Array.isArray(this.values)
|
||||
? this.values.join(",")
|
||||
: this.values,
|
||||
});
|
||||
? this.values.join(',')
|
||||
: this.values
|
||||
})
|
||||
}
|
||||
}
|
||||
this.setCondition();
|
||||
this.setCondition()
|
||||
},
|
||||
formatFilterValue() {
|
||||
if (this.values === null) return [];
|
||||
if (Array.isArray(this.values)) return this.values;
|
||||
return [this.values];
|
||||
if (this.values === null) return []
|
||||
if (Array.isArray(this.values)) return this.values
|
||||
return [this.values]
|
||||
},
|
||||
formatValues(values) {
|
||||
if (!values || values.length === 0) {
|
||||
return [];
|
||||
return []
|
||||
}
|
||||
if (this.element.options.attrs.type === "daterange") {
|
||||
if (this.element.options.attrs.type === 'daterange') {
|
||||
if (values.length !== 2) {
|
||||
return null;
|
||||
return null
|
||||
}
|
||||
let start = values[0];
|
||||
let end = values[1];
|
||||
start = timeSection(start, "datetime", this.labelFormat)[0];
|
||||
end = timeSection(end, "datetime", this.labelFormat)[1];
|
||||
let start = values[0]
|
||||
let end = values[1]
|
||||
start = timeSection(start, 'datetime', this.labelFormat)[0]
|
||||
end = timeSection(end, 'datetime', this.labelFormat)[1]
|
||||
|
||||
const results = [start, end];
|
||||
return results;
|
||||
const results = [start, end]
|
||||
return results
|
||||
} else {
|
||||
const value = values[0];
|
||||
const value = values[0]
|
||||
return timeSection(
|
||||
parseFloat(value),
|
||||
this.componentType || this.element.options.attrs.type,
|
||||
this.labelFormat,
|
||||
);
|
||||
this.labelFormat
|
||||
)
|
||||
}
|
||||
},
|
||||
fillValueDerfault(useLastFilter = true) {
|
||||
let defaultV =
|
||||
this.element.options.value === null
|
||||
? ""
|
||||
: this.element.options.value.toString();
|
||||
? ''
|
||||
: this.element.options.value.toString()
|
||||
if (this.inDraw && useLastFilter) {
|
||||
let lastFilters = null;
|
||||
let lastFilters = null
|
||||
if (this.$store.state.lastValidFilters) {
|
||||
lastFilters = this.$store.state.lastValidFilters[this.element.id];
|
||||
lastFilters = this.$store.state.lastValidFilters[this.element.id]
|
||||
if (lastFilters) {
|
||||
defaultV =
|
||||
lastFilters.val === null || typeof lastFilters.val === "undefined"
|
||||
? ""
|
||||
: lastFilters.val.toString();
|
||||
lastFilters.val === null || typeof lastFilters.val === 'undefined'
|
||||
? ''
|
||||
: lastFilters.val.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.element.options.attrs.type === "daterange") {
|
||||
if (this.element.options.attrs.type === 'daterange') {
|
||||
if (
|
||||
defaultV === null ||
|
||||
typeof defaultV === "undefined" ||
|
||||
defaultV === "" ||
|
||||
defaultV === "[object Object]"
|
||||
typeof defaultV === 'undefined' ||
|
||||
defaultV === '' ||
|
||||
defaultV === '[object Object]'
|
||||
) {
|
||||
return [];
|
||||
return []
|
||||
}
|
||||
return defaultV.split(",").map((item) => parseFloat(item));
|
||||
return defaultV.split(',').map((item) => parseFloat(item))
|
||||
} else {
|
||||
if (
|
||||
defaultV === null ||
|
||||
typeof defaultV === "undefined" ||
|
||||
defaultV === "" ||
|
||||
defaultV === "[object Object]"
|
||||
typeof defaultV === 'undefined' ||
|
||||
defaultV === '' ||
|
||||
defaultV === '[object Object]'
|
||||
) {
|
||||
return null;
|
||||
return null
|
||||
}
|
||||
return parseFloat(defaultV.split(",")[0]);
|
||||
return parseFloat(defaultV.split(',')[0])
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.show-required-tips {
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
>
|
||||
|
||||
<el-button
|
||||
slot="append"
|
||||
v-if="!isRelation"
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="search"
|
||||
/>
|
||||
|
||||
@ -27,123 +27,123 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uuid } from "vue-uuid";
|
||||
import { uuid } from 'vue-uuid'
|
||||
|
||||
export default {
|
||||
name: "DeRadio",
|
||||
name: 'DeRadio',
|
||||
model: {
|
||||
prop: "value", // 绑定的值,通过父组件传递
|
||||
event: "update", // 自定义名
|
||||
prop: 'value', // 绑定的值,通过父组件传递
|
||||
event: 'update' // 自定义名
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
require: true,
|
||||
default: uuid.v1(),
|
||||
default: uuid.v1()
|
||||
},
|
||||
radioStyle: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => {}
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: "",
|
||||
default: ''
|
||||
},
|
||||
isConfig: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
itemDisabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
newList: [],
|
||||
selectValue: this.value,
|
||||
options: [],
|
||||
defaultFirst: false,
|
||||
};
|
||||
defaultFirst: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
maxLength() {
|
||||
return this.radioStyle.showNum || 5;
|
||||
},
|
||||
return this.radioStyle.showNum || 5
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.selectValue = val;
|
||||
this.selectValue = val
|
||||
},
|
||||
selectValue(val) {
|
||||
this.$emit("update", val);
|
||||
this.$emit('update', val)
|
||||
if (!val) {
|
||||
this.resetList();
|
||||
this.resetList()
|
||||
}
|
||||
},
|
||||
maxLength() {
|
||||
this.resetList();
|
||||
this.resetList()
|
||||
},
|
||||
list() {
|
||||
this.resetList();
|
||||
this.resetList()
|
||||
this.$nextTick(() => {
|
||||
this.init();
|
||||
});
|
||||
this.init()
|
||||
})
|
||||
},
|
||||
radioStyle: {
|
||||
handler() {
|
||||
this.setPlaceholderColor();
|
||||
},
|
||||
deep: true,
|
||||
this.setPlaceholderColor()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.resetList();
|
||||
this.resetList()
|
||||
this.$nextTick(() => {
|
||||
this.init();
|
||||
this.setPlaceholderColor();
|
||||
});
|
||||
this.init()
|
||||
this.setPlaceholderColor()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
let styleEle = document.querySelector(`#radio-style${this.id}`);
|
||||
const styleEle = document.querySelector(`#radio-style${this.id}`)
|
||||
if (styleEle) {
|
||||
styleEle.parentElement.removeChild(styleEle);
|
||||
styleEle.parentElement.removeChild(styleEle)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPlaceholderColor() {
|
||||
let styleEle = document.querySelector(`#radio-style${this.id}`);
|
||||
let styleEle = document.querySelector(`#radio-style${this.id}`)
|
||||
if (!styleEle) {
|
||||
styleEle = document.createElement("style");
|
||||
styleEle.id = `radio-style${this.id}`;
|
||||
document.querySelector("head").appendChild(styleEle);
|
||||
styleEle = document.createElement('style')
|
||||
styleEle.id = `radio-style${this.id}`
|
||||
document.querySelector('head').appendChild(styleEle)
|
||||
}
|
||||
styleEle.innerHTML = `#component${this.id} .el-radio-button:not(.is-active) .el-radio-button__inner {\n color: ${this.radioStyle.wordColor}; \n border-color: ${this.radioStyle.brColor}; \n background-color: ${this.radioStyle.innerBgColor}; \n } #component${this.id} .el-radio:not(.is-check) .el-radio__label {\n color: ${this.radioStyle.wordColor}; \n }`;
|
||||
styleEle.innerHTML = `#component${this.id} .el-radio-button:not(.is-active) .el-radio-button__inner {\n color: ${this.radioStyle.wordColor}; \n border-color: ${this.radioStyle.brColor}; \n background-color: ${this.radioStyle.innerBgColor}; \n } #component${this.id} .el-radio:not(.is-check) .el-radio__label {\n color: ${this.radioStyle.wordColor}; \n }`
|
||||
},
|
||||
resetList(arrays) {
|
||||
if (Array.isArray(arrays)) {
|
||||
this.newList = arrays.slice();
|
||||
this.newList = arrays.slice()
|
||||
} else {
|
||||
this.newList = this.list.slice();
|
||||
this.newList = this.list.slice()
|
||||
}
|
||||
this.options = this.newList.slice(0, this.maxLength);
|
||||
this.options = this.newList.slice(0, this.maxLength)
|
||||
},
|
||||
init() {
|
||||
if (this.defaultFirst && this.list.length > 0) {
|
||||
this.selectValue = this.list[0].value;
|
||||
this.selectValue = this.list[0].value
|
||||
}
|
||||
},
|
||||
visualChange(val) {
|
||||
this.$emit("change", val);
|
||||
},
|
||||
},
|
||||
};
|
||||
this.$emit('change', val)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@ -39,8 +39,8 @@
|
||||
>
|
||||
<template v-for="item in dataWithEmpty">
|
||||
<el-checkbox
|
||||
class="is-tree-select"
|
||||
:key="item.id"
|
||||
class="is-tree-select"
|
||||
:label="item.id"
|
||||
>{{ item.label || item.id }}
|
||||
</el-checkbox>
|
||||
@ -63,7 +63,7 @@
|
||||
:label="item.id"
|
||||
@click.native.prevent="testChange(item)"
|
||||
>
|
||||
<span>{{item.label || item.id }}</span>
|
||||
<span>{{ item.label || item.id }}</span>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@ -132,7 +132,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
dataWithEmpty() {
|
||||
return this.element.options.attrs.showEmpty ? [{ label: '空数据', id: '_empty_$'}, ...this.data] : this.data
|
||||
return this.element.options.attrs.showEmpty ? [{ label: '空数据', id: '_empty_$' }, ...this.data] : this.data
|
||||
},
|
||||
operator() {
|
||||
return this.element.options.attrs.multiple ? 'in' : 'eq'
|
||||
|
||||
@ -492,6 +492,5 @@ export default {
|
||||
border-left: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -14,7 +14,12 @@
|
||||
label="选项卡标题"
|
||||
prop="titleShow"
|
||||
>
|
||||
<el-checkbox v-model="styleInfo.titleHide" @change="styleChange">隐藏</el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="styleInfo.titleHide"
|
||||
@change="styleChange"
|
||||
>
|
||||
隐藏
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<template v-if="!styleInfo.titleHide">
|
||||
<el-form-item
|
||||
|
||||
@ -14,10 +14,10 @@
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
<script>
|
||||
export default {
|
||||
name: 'PwdExpTips',
|
||||
components: {
|
||||
|
||||
@ -47,8 +47,8 @@
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.lic_tips {
|
||||
position: absolute;
|
||||
@ -63,4 +63,3 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -47,8 +47,8 @@
|
||||
>
|
||||
<div class="download-export">
|
||||
<svg-icon
|
||||
@click="downloadClick"
|
||||
icon-class="icon_download_outlined"
|
||||
@click="downloadClick"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -124,9 +124,12 @@
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
<ExportExcel ref="ExportExcelRef"></ExportExcel>
|
||||
<ExportExcel ref="ExportExcelRef" />
|
||||
|
||||
<ai-component v-if="aiBaseUrl" :base-url="aiBaseUrl"/>
|
||||
<ai-component
|
||||
v-if="aiBaseUrl"
|
||||
:base-url="aiBaseUrl"
|
||||
/>
|
||||
|
||||
<!--模板市场全屏显示框-->
|
||||
<el-dialog
|
||||
|
||||
@ -7,7 +7,6 @@ const state = {
|
||||
hide: false
|
||||
},
|
||||
device: 'desktop',
|
||||
|
||||
size: Cookies.get('size') || 'small',
|
||||
arrowSide: false
|
||||
}
|
||||
@ -40,7 +39,7 @@ const mutations = {
|
||||
},
|
||||
SET_ARROW_SIDE: (state, arrowSide) => {
|
||||
state.arrowSide = arrowSide
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
||||
@ -11,7 +11,7 @@ export function timeSection(date, type, labelFormat = 'yyyy-MM-dd') {
|
||||
return null
|
||||
}
|
||||
if (typeof date === 'string') {
|
||||
date = parseInt(date);
|
||||
date = parseInt(date)
|
||||
}
|
||||
if (!(date instanceof Date)) {
|
||||
date = new Date(date)
|
||||
|
||||
@ -236,7 +236,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template v-if="this.curComponent.component === 'de-select' && !this.curComponent.options.attrs.multiple && this.curComponent.options.attrs.required">
|
||||
<template v-if="curComponent.component === 'de-select' && !curComponent.options.attrs.multiple && curComponent.options.attrs.required">
|
||||
<el-row
|
||||
style="height: 40px;overflow: hidden;"
|
||||
>
|
||||
@ -290,7 +290,7 @@
|
||||
:span="3"
|
||||
style="padding-left: 10px;padding-top: 8px"
|
||||
>
|
||||
{{$t('time.number_of_display_options')}}
|
||||
{{ $t('time.number_of_display_options') }}
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="8"
|
||||
@ -400,10 +400,10 @@ export default {
|
||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE)
|
||||
this.backgroundOrigin.style = deepCopy(this.curComponent.style || { brColor: '', innerBgColor: '', wordColor: '' })
|
||||
if (!this.backgroundOrigin.style.showStyle) {
|
||||
this.backgroundOrigin.style = {...this.backgroundOrigin.style, ...{ showStyle: 'single', showMode: 'select', showNum: 5 }}
|
||||
this.backgroundOrigin.style = { ...this.backgroundOrigin.style, ...{ showStyle: 'single', showMode: 'select', showNum: 5 }}
|
||||
}
|
||||
if (!this.curComponent.style.showStyle) {
|
||||
this.curComponent.style = {...this.curComponent.style, ...{ showStyle: 'single', showMode: 'select', showNum: 5 }}
|
||||
this.curComponent.style = { ...this.curComponent.style, ...{ showStyle: 'single', showMode: 'select', showNum: 5 }}
|
||||
}
|
||||
this.queryBackground()
|
||||
},
|
||||
|
||||
@ -444,7 +444,7 @@ export function timeRangeBarOptionAntV(container, chart, action) {
|
||||
|
||||
plot.off('interval:click')
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
@ -535,7 +535,7 @@ export function baseBidirectionalBarOptionAntV(container, chart, action, isGroup
|
||||
const plot = new BidirectionalBar(container, options)
|
||||
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ export const configTopN = (data, chart) => {
|
||||
const initOtherItem = {
|
||||
...cloneDeep(data[0]),
|
||||
name: i18n.t('datasource.other'),
|
||||
value: 0,
|
||||
value: 0
|
||||
}
|
||||
otherItems.reduce((p, n) => {
|
||||
p.value += n.value ?? 0
|
||||
|
||||
@ -1266,7 +1266,7 @@ export const configTopN = (data, chart) => {
|
||||
...data[0],
|
||||
field: i18n.t('datasource.other'),
|
||||
name: i18n.t('datasource.other'),
|
||||
value: 0,
|
||||
value: 0
|
||||
}
|
||||
otherItems.reduce((p, n) => {
|
||||
p.value += n.value ?? 0
|
||||
@ -1351,12 +1351,12 @@ export function configPlotTrendLine(chart, plot) {
|
||||
offsetY: 10
|
||||
})
|
||||
}
|
||||
regLine.axis(false);
|
||||
regLine.data(totalData);
|
||||
regLine.axis(false)
|
||||
regLine.data(totalData)
|
||||
regLine.line()
|
||||
.position('index*value')
|
||||
.color('color', color => color)
|
||||
.style('trendId',trendId => {
|
||||
.style('trendId', trendId => {
|
||||
const trend = trendLineMap[trendId]
|
||||
return {
|
||||
stroke: trend?.color ?? 'grey',
|
||||
@ -1425,7 +1425,7 @@ export function configAxisLabelLengthLimit(chart, plot) {
|
||||
return
|
||||
}
|
||||
const parentNode = e.event.target.parentNode
|
||||
let labelTooltipDom = parentNode.getElementsByClassName('g2-axis-label-tooltip')?.[0]
|
||||
const labelTooltipDom = parentNode.getElementsByClassName('g2-axis-label-tooltip')?.[0]
|
||||
if (labelTooltipDom) {
|
||||
labelTooltipDom.style.visibility = 'hidden'
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ export function getSize(chart) {
|
||||
size.colCfg.width = node => {
|
||||
const width = node.spreadsheet.container.cfg.el.offsetWidth
|
||||
if (!s.tableFieldWidth?.length) {
|
||||
let columnCount = s.showIndex ? chart.data.fields.length + 1 : chart.data.fields.length
|
||||
const columnCount = s.showIndex ? chart.data.fields.length + 1 : chart.data.fields.length
|
||||
return width / columnCount
|
||||
}
|
||||
const baseWidth = width / 100
|
||||
|
||||
@ -26,7 +26,7 @@ export function baseFunnelOptionAntV(container, chart, action) {
|
||||
conversionTag = {
|
||||
formatter: datum => {
|
||||
const rate = ((datum[Funnel.CONVERSATION_FIELD][1] / datum[Funnel.CONVERSATION_FIELD][0]) * 100).toFixed(2)
|
||||
return `${labelAttr.conversionLabel ?? ''}${rate}%`;
|
||||
return `${labelAttr.conversionLabel ?? ''}${rate}%`
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ export function baseFunnelOptionAntV(container, chart, action) {
|
||||
const plot = new Funnel(container, options)
|
||||
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ export function baseLineOptionAntV(container, chart, action) {
|
||||
plot.on('point:click', action)
|
||||
// 趋势线
|
||||
configPlotTrendLine(chart, plot)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
@ -215,7 +215,7 @@ export function baseAreaOptionAntV(container, chart, action, isStack) {
|
||||
const plot = new Area(container, options)
|
||||
|
||||
plot.on('point:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ export async function baseFlowMapOption(chartId, chart) {
|
||||
return mapInstance
|
||||
}
|
||||
|
||||
const getMapKey = async () => {
|
||||
const getMapKey = async() => {
|
||||
const key = 'online-map-key'
|
||||
if (!localStorage.getItem(key)) {
|
||||
await queryMapKey().then(res => localStorage.setItem(key, res.data))
|
||||
|
||||
@ -102,7 +102,7 @@ export function baseMixOptionAntV(container, chart, action) {
|
||||
|
||||
plot.on('point:click', action)
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ export function basePieOptionAntV(container, chart, action) {
|
||||
const plot = new Pie(container, options)
|
||||
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
@ -162,7 +162,7 @@ export function basePieRoseOptionAntV(container, chart, action) {
|
||||
const plot = new Rose(container, options)
|
||||
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ export function baseRadarOptionAntV(container, chart, action) {
|
||||
|
||||
plot.off('point:click')
|
||||
plot.on('point:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -8,8 +8,6 @@ import {
|
||||
getPadding,
|
||||
getSlider,
|
||||
getAnalyse,
|
||||
getTooltipContainer,
|
||||
TOOLTIP_TPL,
|
||||
configPlotTooltipEvent
|
||||
} from '@/views/chart/chart/common/common_antv'
|
||||
|
||||
@ -91,7 +89,7 @@ export function baseScatterOptionAntV(container, chart, action) {
|
||||
|
||||
plot.off('point:click')
|
||||
plot.on('point:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -368,10 +368,6 @@ export function baseTableNormal(container, chart, action, tableData, vueCom, res
|
||||
}
|
||||
|
||||
const customAttr = JSON.parse(chart.customAttr)
|
||||
const sortIconMap = {
|
||||
'asc': 'SortUp',
|
||||
'desc': 'SortDown'
|
||||
}
|
||||
// options
|
||||
const s2Options = {
|
||||
width: containerDom.offsetWidth,
|
||||
@ -645,7 +641,7 @@ export function baseTablePivot(container, chart, action, headerAction, tableData
|
||||
position: 'absolute',
|
||||
padding: '4px 2px'
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// 开始渲染
|
||||
@ -1106,7 +1102,7 @@ function getTooltipPosition(event) {
|
||||
if (!s2Instance) {
|
||||
return result
|
||||
}
|
||||
const { height, width} = s2Instance.getCanvasElement().getBoundingClientRect()
|
||||
const { height, width } = s2Instance.getCanvasElement().getBoundingClientRect()
|
||||
const { offsetHeight, offsetWidth } = s2Instance.tooltip.getContainer()
|
||||
if (offsetWidth > width) {
|
||||
result.x = 0
|
||||
@ -1148,7 +1144,7 @@ function copyContent(s2Instance, event, fieldMeta) {
|
||||
const fieldMap = fieldMeta?.reduce((p, n) => {
|
||||
p[n.field] = n.name
|
||||
return p
|
||||
},{})
|
||||
}, {})
|
||||
if (fieldMap?.[content]) {
|
||||
content = fieldMap[content]
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ export function baseTreemapOptionAntV(container, chart, action) {
|
||||
const plot = new Treemap(container, options)
|
||||
|
||||
plot.on('polygon:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -3953,9 +3953,9 @@ export function adjustPosition(targetDom, parentDom, clickPosition, offset, init
|
||||
x: offsetX ? x + offsetX : x,
|
||||
y: offsetY ? y + offsetY : y
|
||||
}
|
||||
const width = targetWidth ? targetWidth : initSize.width
|
||||
const height = targetHeight ? targetHeight : initSize.height
|
||||
if ( result.x + width > parentWidth ) {
|
||||
const width = targetWidth || initSize.width
|
||||
const height = targetHeight || initSize.height
|
||||
if (result.x + width > parentWidth) {
|
||||
result.x = parentWidth - width
|
||||
}
|
||||
if (result.y + height > parentHeight) {
|
||||
|
||||
@ -104,7 +104,7 @@ export function baseWaterfallOptionAntV(container, chart, action) {
|
||||
const plot = new Waterfall(container, options)
|
||||
|
||||
plot.on('interval:click', action)
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
// 处理 tooltip 被其他视图遮挡
|
||||
configPlotTooltipEvent(chart, plot)
|
||||
return plot
|
||||
}
|
||||
|
||||
@ -385,8 +385,8 @@
|
||||
<el-tooltip
|
||||
v-if="item.enumValues && item.enumValues.length"
|
||||
>
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-slot:content>
|
||||
<i class="el-icon-info" />
|
||||
<template #content>
|
||||
<div style="max-width: 200px">
|
||||
{{ item.enumValues.join(',') }}
|
||||
</div>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<el-col
|
||||
:span="8"
|
||||
>
|
||||
{{ $t(`chart.regression_${item.algoType}`)}}
|
||||
{{ $t(`chart.regression_${item.algoType}`) }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
@ -397,6 +397,7 @@ import { parseJson } from '@/views/chart/chart/util'
|
||||
|
||||
export default {
|
||||
name: 'TableThresholdEdit',
|
||||
inject: ['filedList'],
|
||||
props: {
|
||||
threshold: {
|
||||
type: Array,
|
||||
@ -407,7 +408,6 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
inject: ['filedList'],
|
||||
data() {
|
||||
return {
|
||||
thresholdArr: [],
|
||||
|
||||
@ -172,7 +172,7 @@ export default {
|
||||
{ label: this.$t('chart.regression_log'), value: 'log' },
|
||||
{ label: this.$t('chart.regression_quad'), value: 'quad' },
|
||||
{ label: this.$t('chart.regression_pow'), value: 'pow' },
|
||||
{ label: this.$t('chart.regression_loess'), value: 'loess' },
|
||||
{ label: this.$t('chart.regression_loess'), value: 'loess' }
|
||||
],
|
||||
lineOptions: [
|
||||
{ label: this.$t('chart.line_type_solid'), value: 'solid' },
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<el-checkbox
|
||||
v-model="labelForm.show"
|
||||
@change="changeLabelAttr('show')"
|
||||
></el-checkbox>
|
||||
/>
|
||||
</el-form-item>
|
||||
<div v-show="labelForm.show">
|
||||
<el-form-item
|
||||
@ -148,7 +148,7 @@
|
||||
<el-checkbox
|
||||
v-model="labelForm.showConversion"
|
||||
@change="changeLabelAttr('showConversion')"
|
||||
></el-checkbox>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="labelForm.showConversion && showProperty('conversionLabel')"
|
||||
@ -159,7 +159,7 @@
|
||||
v-model="labelForm.conversionLabel"
|
||||
:maxlength="20"
|
||||
@change="changeLabelAttr('conversionLabel')"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
@ -266,7 +266,10 @@
|
||||
<el-radio label="custom">
|
||||
<span>{{ $t('chart.table_column_fixed') }}</span>
|
||||
</el-radio>
|
||||
<el-radio v-if="equalsAny(chart.type, 'table-info', 'table-normal')" label="field">
|
||||
<el-radio
|
||||
v-if="equalsAny(chart.type, 'table-info', 'table-normal')"
|
||||
label="field"
|
||||
>
|
||||
<span>{{ $t('chart.table_column_custom') }}</span>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
@ -324,7 +327,10 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="2">
|
||||
<el-col
|
||||
:span="12"
|
||||
:offset="2"
|
||||
>
|
||||
<el-input
|
||||
v-model.number="fieldColumnWidth.width"
|
||||
type="number"
|
||||
@ -1885,7 +1891,7 @@ export default {
|
||||
const fieldMap = this.sizeForm.tableFieldWidth.reduce((p, n) => {
|
||||
p[n.fieldId] = n
|
||||
return p
|
||||
},{})
|
||||
}, {})
|
||||
this.sizeForm.tableFieldWidth.splice(0)
|
||||
allAxis.forEach(item => {
|
||||
let width = 10
|
||||
|
||||
@ -33,13 +33,13 @@
|
||||
import rowAuth from '@/views/dataset/data/components/rowAuth.vue'
|
||||
export default {
|
||||
name: 'FilterTree',
|
||||
inject: ['filedList'],
|
||||
components: {
|
||||
rowAuth
|
||||
},
|
||||
inject: ['filedList'],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
trigger="hover"
|
||||
width="300"
|
||||
:append-to-body="!previewVisible"
|
||||
:popper-class="previewVisible && 'remark-pop'"
|
||||
:popper-class="previewVisible ? 'remark-pop' : ''"
|
||||
:visible-arrow="false"
|
||||
>
|
||||
<div
|
||||
|
||||
@ -155,7 +155,6 @@
|
||||
>
|
||||
<template
|
||||
slot="header"
|
||||
slot-scope="scope"
|
||||
>
|
||||
{{ c.label }}
|
||||
<span v-if="c.rangeIndex === 0">({{ $t('data_fill.data.start') }})</span>
|
||||
|
||||
@ -443,7 +443,7 @@ export default {
|
||||
>
|
||||
<transition-group>
|
||||
<div
|
||||
v-for="(item, $index) in componentList1"
|
||||
v-for="(item) in componentList1"
|
||||
:key="item.type"
|
||||
class="m-item base-component-item"
|
||||
@click="addComponentItem(item)"
|
||||
@ -468,7 +468,7 @@ export default {
|
||||
>
|
||||
<transition-group>
|
||||
<div
|
||||
v-for="(item, $index) in componentList2"
|
||||
v-for="(item) in componentList2"
|
||||
:key="item.type"
|
||||
class="m-item base-component-item"
|
||||
@click="addComponentItem(item)"
|
||||
|
||||
@ -467,7 +467,6 @@ export default {
|
||||
<el-table-column>
|
||||
<template
|
||||
slot="header"
|
||||
slot-scope="scope"
|
||||
>
|
||||
{{ $t('data_fill.form.column_name') }}
|
||||
</template>
|
||||
|
||||
@ -426,8 +426,8 @@ export default {
|
||||
const table = this.tables.find(
|
||||
(ele) => ele.name === this.checkTableList[i]
|
||||
)
|
||||
if(table.setKey && table.keys.length === 0 ){
|
||||
this.openMessageSuccess(this.checkTableList[i] + this.$t('dataset.no_set_key') , 'error')
|
||||
if (table.setKey && table.keys.length === 0) {
|
||||
this.openMessageSuccess(this.checkTableList[i] + this.$t('dataset.no_set_key'), 'error')
|
||||
return
|
||||
}
|
||||
tables.push({
|
||||
@ -437,7 +437,7 @@ export default {
|
||||
type: 'api',
|
||||
syncType: syncType,
|
||||
mode: parseInt(mode),
|
||||
info: JSON.stringify({ table: this.checkTableList[i], setKey: table.setKey, keys: table.keys})
|
||||
info: JSON.stringify({ table: this.checkTableList[i], setKey: table.setKey, keys: table.keys })
|
||||
})
|
||||
}
|
||||
post('/dataset/table/batchAdd', tables)
|
||||
|
||||
@ -167,12 +167,15 @@
|
||||
{{ $t('deDataset.already_exists') }}
|
||||
</div>
|
||||
|
||||
<el-checkbox v-if="mode === '1'" v-model="activeTable.setKey">{{ $t('dataset.set_key') }}</el-checkbox>
|
||||
<el-checkbox
|
||||
v-if="mode === '1'"
|
||||
v-model="activeTable.setKey"
|
||||
>{{ $t('dataset.set_key') }}</el-checkbox>
|
||||
|
||||
<el-select
|
||||
size="small"
|
||||
v-model="activeTable.keys"
|
||||
v-if="mode === '1'"
|
||||
v-model="activeTable.keys"
|
||||
size="small"
|
||||
multiple
|
||||
filterable
|
||||
:disabled="!activeTable.setKey"
|
||||
@ -469,8 +472,8 @@ export default {
|
||||
const table = this.tables.find(
|
||||
(ele) => ele.name === this.checkTableList[i]
|
||||
)
|
||||
if(table.setKey && table.keys.length === 0 ){
|
||||
this.openMessageSuccess(this.checkTableList[i] + this.$t('dataset.no_set_key') , 'error')
|
||||
if (table.setKey && table.keys.length === 0) {
|
||||
this.openMessageSuccess(this.checkTableList[i] + this.$t('dataset.no_set_key'), 'error')
|
||||
return
|
||||
}
|
||||
tables.push({
|
||||
@ -480,7 +483,7 @@ export default {
|
||||
type: 'db',
|
||||
syncType: syncType,
|
||||
mode: parseInt(mode),
|
||||
info: JSON.stringify({ table: this.checkTableList[i], setKey: table.setKey, keys: table.keys})
|
||||
info: JSON.stringify({ table: this.checkTableList[i], setKey: table.setKey, keys: table.keys })
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -61,13 +61,17 @@
|
||||
value="sync_latter"
|
||||
/>
|
||||
</el-select>
|
||||
<el-checkbox style="margin-left: 12px" v-if="mode === '1' && engineMode !== 'simple'" v-model="param.setKey">{{ $t('dataset.set_key') }}</el-checkbox>
|
||||
<el-checkbox
|
||||
v-if="mode === '1' && engineMode !== 'simple'"
|
||||
v-model="param.setKey"
|
||||
style="margin-left: 12px"
|
||||
>{{ $t('dataset.set_key') }}</el-checkbox>
|
||||
|
||||
<el-select
|
||||
v-if="mode === '1' && engineMode !== 'simple'"
|
||||
v-model="param.keys"
|
||||
size="small"
|
||||
style="margin-left: 12px;width: 315px"
|
||||
v-model="param.keys"
|
||||
v-if="mode === '1' && engineMode !== 'simple'"
|
||||
multiple
|
||||
filterable
|
||||
:disabled="!param.setKey"
|
||||
@ -966,7 +970,7 @@ export default {
|
||||
table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r')
|
||||
).sql
|
||||
}
|
||||
if (JSON.parse(table.info).hasOwnProperty("setKey")) {
|
||||
if (JSON.parse(table.info).hasOwn('setKey')) {
|
||||
this.$set(this.param, 'setKey', JSON.parse(table.info).setKey)
|
||||
this.param.keys = JSON.parse(table.info).keys
|
||||
}
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<de-container style="height: auto">
|
||||
<de-aside-container close style="height: auto">
|
||||
<de-aside-container
|
||||
close
|
||||
style="height: auto"
|
||||
>
|
||||
<el-button
|
||||
v-show="!showTargetSearchInput"
|
||||
class="de-icon"
|
||||
|
||||
@ -150,7 +150,7 @@
|
||||
:options="getFields(scope.row)"
|
||||
@change="saveEdit(scope.row)"
|
||||
>
|
||||
<template slot-scope="{ node, data }">
|
||||
<template slot-scope="{ data }">
|
||||
<span>
|
||||
<svg-icon
|
||||
v-if="data.value === 0"
|
||||
@ -221,18 +221,22 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="table.mode === 1 && (table.type === 'db' || table.type === 'sql')"
|
||||
property="key"
|
||||
:label="$t('dataset.change_to_key')"
|
||||
v-if="table.mode === 1 && (table.type === 'db' || table.type === 'sql')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.key" @change="saveKey(scope.row)" :disabled="scope.row.extField !== 0">
|
||||
<el-select
|
||||
v-model="scope.row.key"
|
||||
:disabled="scope.row.extField !== 0"
|
||||
@change="saveKey(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in getKeyFields(scope.row)"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -500,7 +504,7 @@
|
||||
:options="getFields(scope.row)"
|
||||
@change="saveEdit(scope.row)"
|
||||
>
|
||||
<template slot-scope="{ node, data }">
|
||||
<template slot-scope="{ data }">
|
||||
<span>
|
||||
<svg-icon
|
||||
v-if="data.value === 0"
|
||||
@ -571,18 +575,22 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="table.mode === 1 && (table.type === 'db' || table.type === 'sql')"
|
||||
property="key"
|
||||
:label="$t('dataset.change_to_key')"
|
||||
v-if="table.mode === 1 && (table.type === 'db' || table.type === 'sql')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.key" @change="saveKey(scope.row)" :disabled="scope.row.extField !== 0">
|
||||
<el-select
|
||||
v-model="scope.row.key"
|
||||
:disabled="scope.row.extField !== 0"
|
||||
@change="saveKey(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in getKeyFields(scope.row)"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -768,7 +776,7 @@ import { batchEdit, dateformats, fieldListDQ, post } from '@/api/dataset/dataset
|
||||
import CalcFieldEdit from './CalcFieldEdit'
|
||||
import { getFieldName } from '@/views/dataset/data/utils'
|
||||
import msgCfm from '@/components/msgCfm/index'
|
||||
import {engineMode} from "@/api/system/engine";
|
||||
import { engineMode } from '@/api/system/engine'
|
||||
|
||||
export default {
|
||||
name: 'FieldEdit',
|
||||
@ -804,7 +812,7 @@ export default {
|
||||
dimensionIndeterminate: false,
|
||||
quotaChecked: false,
|
||||
quotaIndeterminate: false,
|
||||
engineMode: 'local',
|
||||
engineMode: 'local'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -886,7 +894,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
saveKey(item ) {
|
||||
saveKey(item) {
|
||||
post('/dataset/field/saveKey', item)
|
||||
.then((response) => {
|
||||
this.initField()
|
||||
|
||||
@ -259,7 +259,7 @@ import { pluginLoaded } from '@/api/user'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
import UpdateRecords from './UpdateRecords'
|
||||
import rowAuth from './components/rowAuth.vue'
|
||||
import {Button} from "element-ui";
|
||||
import { Button } from 'element-ui'
|
||||
import bus from '@/utils/bus'
|
||||
|
||||
export default {
|
||||
@ -426,7 +426,7 @@ export default {
|
||||
show: 0
|
||||
}
|
||||
this.previewDataSuccess = false
|
||||
if(this.$currentHttpRequestList.some((item, key) => {
|
||||
if (this.$currentHttpRequestList.some((item, key) => {
|
||||
return key.indexOf('dataset/table/getPreviewData') > -1
|
||||
})) return
|
||||
this.tableLoading = false
|
||||
@ -492,34 +492,34 @@ export default {
|
||||
this.showExport = false
|
||||
},
|
||||
openMessageLoading(cb) {
|
||||
const h = this.$createElement;
|
||||
const iconClass = `el-icon-loading`;
|
||||
const customClass = `de-message-loading de-message-export`;
|
||||
const h = this.$createElement
|
||||
const iconClass = `el-icon-loading`
|
||||
const customClass = `de-message-loading de-message-export`
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
message: h('p', null, [
|
||||
this.$t('data_export.exporting'),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
type: 'text',
|
||||
size: 'mini'
|
||||
},
|
||||
class: "btn-text",
|
||||
class: 'btn-text',
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
cb()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
this.$t('data_export.export_center'),
|
||||
this.$t('data_export.export_center')
|
||||
),
|
||||
this.$t('data_export.export_info'),
|
||||
this.$t('data_export.export_info')
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
customClass
|
||||
})
|
||||
},
|
||||
callbackExport() {
|
||||
bus.$emit('data-export-center')
|
||||
|
||||
@ -1,87 +1,153 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
v-loading="drawerLoading"
|
||||
custom-class="de-user-drawer de-export-excel"
|
||||
:title="$t('data_export.export_center')"
|
||||
v-loading="drawerLoading"
|
||||
:visible.sync="drawer"
|
||||
direction="rtl"
|
||||
size="1000px"
|
||||
append-to-body
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
@tab-click="handleClick"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="tab in tabList"
|
||||
:key="tab.name"
|
||||
:label="tab.label"
|
||||
:name="tab.name"
|
||||
></el-tab-pane>
|
||||
/>
|
||||
</el-tabs>
|
||||
<de-btn secondary icon="el-icon-delete" @click="delAll" v-show="multipleSelection.length === 0"
|
||||
<de-btn
|
||||
v-show="multipleSelection.length === 0"
|
||||
secondary
|
||||
icon="el-icon-delete"
|
||||
@click="delAll"
|
||||
>{{ $t("data_export.del_all") }}
|
||||
</de-btn>
|
||||
<de-btn secondary icon="el-icon-delete" @click="delAll" v-show="multipleSelection.length !== 0"
|
||||
<de-btn
|
||||
v-show="multipleSelection.length !== 0"
|
||||
secondary
|
||||
icon="el-icon-delete"
|
||||
@click="delAll"
|
||||
>{{ $t("commons.delete") }}
|
||||
</de-btn>
|
||||
<div class="table-container" :class="!tableData.length && 'hidden-bottom'">
|
||||
<div
|
||||
class="table-container"
|
||||
:class="!tableData.length && 'hidden-bottom'"
|
||||
>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="fileName"
|
||||
:label="$t('driver.file_name')"
|
||||
width="332"
|
||||
>
|
||||
<el-table-column type="selection" width="50"> </el-table-column>
|
||||
<el-table-column prop="fileName" :label="$t('driver.file_name')" width="332">
|
||||
<template slot-scope="scope">
|
||||
<div class="name-excel">
|
||||
<svg-icon style="font-size: 24px;" icon-class="icon_file-excel_colorful"> </svg-icon>
|
||||
<svg-icon
|
||||
style="font-size: 24px;"
|
||||
icon-class="icon_file-excel_colorful"
|
||||
/>
|
||||
<div class="name-content">
|
||||
<div class="fileName">{{ scope.row.fileName }}</div>
|
||||
<div class="failed" v-if="activeName==='FAILED'">{{ $t("data_export.export_failed") }}</div>
|
||||
<div class="success" v-if="scope.row.exportStatus==='SUCCESS'">{{scope.row.fileSize}}{{scope.row.fileSizeUnit}}</div>
|
||||
<div
|
||||
v-if="activeName==='FAILED'"
|
||||
class="failed"
|
||||
>{{ $t("data_export.export_failed") }}</div>
|
||||
<div
|
||||
v-if="scope.row.exportStatus==='SUCCESS'"
|
||||
class="success"
|
||||
>{{ scope.row.fileSize }}{{ scope.row.fileSizeUnit }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="activeName==='FAILED'" class="red-line" />
|
||||
<el-progress v-if="activeName==='IN_PROGRESS'" :percentage="+scope.row.exportPogress"></el-progress>
|
||||
<div
|
||||
v-if="activeName==='FAILED'"
|
||||
class="red-line"
|
||||
/>
|
||||
<el-progress
|
||||
v-if="activeName==='IN_PROGRESS'"
|
||||
:percentage="+scope.row.exportPogress"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exportFromName" :label="$t('data_export.export_obj')" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="exportFromType" width="120" :label="$t('data_export.export_from')">
|
||||
<el-table-column
|
||||
prop="exportFromName"
|
||||
:label="$t('data_export.export_obj')"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="exportFromType"
|
||||
width="120"
|
||||
:label="$t('data_export.export_from')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.exportFromType === 'dataset'">{{ $t("dataset.datalist") }}</span>
|
||||
<span v-if="scope.row.exportFromType === 'chart'">{{ $t("panel.view") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exportTime" width="180" :label="$t('data_export.export_time')">
|
||||
<el-table-column
|
||||
prop="exportTime"
|
||||
width="180"
|
||||
:label="$t('data_export.export_time')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.exportTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" prop="operate" width="80" :label="$t('commons.operating')">
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
prop="operate"
|
||||
width="80"
|
||||
:label="$t('commons.operating')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.exportStatus === 'SUCCESS'" type="text" size="mini" @click="downloadClick(scope.row)">
|
||||
<el-button
|
||||
v-if="scope.row.exportStatus === 'SUCCESS'"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="downloadClick(scope.row)"
|
||||
>
|
||||
<div class="download-export">
|
||||
<svg-icon
|
||||
icon-class="icon_download_outlined"
|
||||
/>
|
||||
</div>
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.exportStatus === 'FAILED'" type="text" size="mini" @click="retry(scope.row)">
|
||||
<el-button
|
||||
v-if="scope.row.exportStatus === 'FAILED'"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="retry(scope.row)"
|
||||
>
|
||||
<div class="download-export">
|
||||
<i class="el-icon-refresh-right"></i>
|
||||
<i class="el-icon-refresh-right" />
|
||||
</div>
|
||||
</el-button>
|
||||
<el-button type="text" size="mini" @click="deleteField(scope.row)">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="deleteField(scope.row)"
|
||||
>
|
||||
<div class="download-export">
|
||||
<i class="el-icon-delete"></i>
|
||||
<i class="el-icon-delete" />
|
||||
</div>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-empty
|
||||
slot="empty"
|
||||
v-if="!tableData.length"
|
||||
slot="empty"
|
||||
style="padding-top: 80px"
|
||||
:image-size="125"
|
||||
:image="errImg"
|
||||
@ -92,46 +158,46 @@
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import msgCfm from "@/components/msgCfm/index";
|
||||
import request from "@/utils/request";
|
||||
import {downloadFile, post} from '@/api/dataset/dataset'
|
||||
import bus from "@/utils/bus";
|
||||
import {Button} from "element-ui";
|
||||
import msgCfm from '@/components/msgCfm/index'
|
||||
import request from '@/utils/request'
|
||||
import { downloadFile, post } from '@/api/dataset/dataset'
|
||||
import bus from '@/utils/bus'
|
||||
import { Button } from 'element-ui'
|
||||
export default {
|
||||
mixins: [msgCfm],
|
||||
data() {
|
||||
return {
|
||||
activeName: "ALL",
|
||||
activeName: 'ALL',
|
||||
multipleSelection: [],
|
||||
errImg: require("@/assets/none-data.png"),
|
||||
tableData: [{ name: "附件名称" }],
|
||||
errImg: require('@/assets/none-data.png'),
|
||||
tableData: [{ name: '附件名称' }],
|
||||
drawer: false,
|
||||
drawerLoading: false,
|
||||
description: this.$t("暂无任务"),
|
||||
description: this.$t('暂无任务'),
|
||||
tabList: [
|
||||
{
|
||||
label: "导出中(0)",
|
||||
name: "IN_PROGRESS",
|
||||
label: '导出中(0)',
|
||||
name: 'IN_PROGRESS'
|
||||
},
|
||||
{
|
||||
label: "成功(0)",
|
||||
name: "SUCCESS",
|
||||
label: '成功(0)',
|
||||
name: 'SUCCESS'
|
||||
},
|
||||
{
|
||||
label: "失败(0)",
|
||||
name: "FAILED",
|
||||
label: '失败(0)',
|
||||
name: 'FAILED'
|
||||
},
|
||||
{
|
||||
label: "等待中(0)",
|
||||
name: "PENDING",
|
||||
label: '等待中(0)',
|
||||
name: 'PENDING'
|
||||
},
|
||||
{
|
||||
label: "全部(0)",
|
||||
name: "ALL",
|
||||
},
|
||||
label: '全部(0)',
|
||||
name: 'ALL'
|
||||
}
|
||||
],
|
||||
loading : false
|
||||
};
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.handleClick()
|
||||
@ -141,80 +207,80 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.drawer = true;
|
||||
this.drawer = true
|
||||
this.handleClick()
|
||||
this.timer = setInterval(() => {
|
||||
if(this.activeName === 'IN_PROGRESS'){
|
||||
if (this.activeName === 'IN_PROGRESS') {
|
||||
post(
|
||||
'/exportCenter/exportTasks/' + this.activeName,{}, true
|
||||
'/exportCenter/exportTasks/' + this.activeName, {}, true
|
||||
).then(
|
||||
(res) => {
|
||||
this.tabList.forEach( item => {
|
||||
if(item.name === 'ALL'){
|
||||
this.tabList.forEach(item => {
|
||||
if (item.name === 'ALL') {
|
||||
item.label = '全部' + '(' + res.data.length + ')'
|
||||
}
|
||||
if(item.name === 'IN_PROGRESS'){
|
||||
if (item.name === 'IN_PROGRESS') {
|
||||
item.label = '导出中' + '(' + res.data.filter(task => task.exportStatus === 'IN_PROGRESS').length + ')'
|
||||
}
|
||||
if(item.name === 'SUCCESS'){
|
||||
if (item.name === 'SUCCESS') {
|
||||
item.label = '成功' + '(' + res.data.filter(task => task.exportStatus === 'SUCCESS').length + ')'
|
||||
}
|
||||
if(item.name === 'FAILED'){
|
||||
if (item.name === 'FAILED') {
|
||||
item.label = '失败' + '(' + res.data.filter(task => task.exportStatus === 'FAILED').length + ')'
|
||||
}
|
||||
if(item.name === 'PENDING'){
|
||||
if (item.name === 'PENDING') {
|
||||
item.label = '等待中' + '(' + res.data.filter(task => task.exportStatus === 'PENDING').length + ')'
|
||||
}
|
||||
})
|
||||
if(this.activeName === 'ALL'){
|
||||
if (this.activeName === 'ALL') {
|
||||
this.tableData = res.data
|
||||
}else {
|
||||
} else {
|
||||
this.tableData = res.data.filter(task => task.exportStatus === this.activeName)
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
}
|
||||
}, 5000);
|
||||
}, 5000)
|
||||
},
|
||||
format(percentage) {
|
||||
return '';
|
||||
return ''
|
||||
},
|
||||
taskExportTopicCall(task){
|
||||
if(JSON.parse(task).exportStatus === 'SUCCESS'){
|
||||
this.openMessageLoading(JSON.parse(task).exportFromName + ' ' + this.$t('excel.export') + this.$t('dataset.completed')+ this.$t('dataset.goto'), 'success', this.callbackExport)
|
||||
taskExportTopicCall(task) {
|
||||
if (JSON.parse(task).exportStatus === 'SUCCESS') {
|
||||
this.openMessageLoading(JSON.parse(task).exportFromName + ' ' + this.$t('excel.export') + this.$t('dataset.completed') + this.$t('dataset.goto'), 'success', this.callbackExport)
|
||||
}
|
||||
if(JSON.parse(task).exportStatus === 'FAILED'){
|
||||
this.openMessageLoading(JSON.parse(task).exportFromName + ' ' + this.$t('excel.export') + this.$t('dataset.error')+ this.$t('dataset.goto'), 'error', this.callbackExport)
|
||||
if (JSON.parse(task).exportStatus === 'FAILED') {
|
||||
this.openMessageLoading(JSON.parse(task).exportFromName + ' ' + this.$t('excel.export') + this.$t('dataset.error') + this.$t('dataset.goto'), 'error', this.callbackExport)
|
||||
}
|
||||
},
|
||||
openMessageLoading(text, type, cb) {
|
||||
const h = this.$createElement;
|
||||
const h = this.$createElement
|
||||
const iconClass = `el-icon-${type || 'success'}`
|
||||
const customClass = `de-message-${type || 'success'} de-message-export`
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
message: h('p', null, [
|
||||
this.$t(text),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
type: 'text',
|
||||
size: 'mini'
|
||||
},
|
||||
class: "btn-text",
|
||||
class: 'btn-text',
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
cb()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
this.$t('data_export.export_center'),
|
||||
this.$t('data_export.export_center')
|
||||
)
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
customClass
|
||||
})
|
||||
},
|
||||
callbackExport() {
|
||||
bus.$emit('data-export-center')
|
||||
@ -223,32 +289,32 @@ export default {
|
||||
this.tableData = []
|
||||
this.drawerLoading = true
|
||||
post(
|
||||
'/exportCenter/exportTasks/' + this.activeName,{}, false
|
||||
'/exportCenter/exportTasks/' + this.activeName, {}, false
|
||||
).then(
|
||||
(res) => {
|
||||
this.tabList.forEach( item => {
|
||||
if(item.name === 'ALL'){
|
||||
this.tabList.forEach(item => {
|
||||
if (item.name === 'ALL') {
|
||||
item.label = '全部' + '(' + res.data.length + ')'
|
||||
}
|
||||
if(item.name === 'IN_PROGRESS'){
|
||||
if (item.name === 'IN_PROGRESS') {
|
||||
item.label = '导出中' + '(' + res.data.filter(task => task.exportStatus === 'IN_PROGRESS').length + ')'
|
||||
}
|
||||
if(item.name === 'SUCCESS'){
|
||||
if (item.name === 'SUCCESS') {
|
||||
item.label = '成功' + '(' + res.data.filter(task => task.exportStatus === 'SUCCESS').length + ')'
|
||||
}
|
||||
if(item.name === 'FAILED'){
|
||||
if (item.name === 'FAILED') {
|
||||
item.label = '失败' + '(' + res.data.filter(task => task.exportStatus === 'FAILED').length + ')'
|
||||
}
|
||||
if(item.name === 'PENDING'){
|
||||
if (item.name === 'PENDING') {
|
||||
item.label = '等待中' + '(' + res.data.filter(task => task.exportStatus === 'PENDING').length + ')'
|
||||
}
|
||||
})
|
||||
if(this.activeName === 'ALL'){
|
||||
if (this.activeName === 'ALL') {
|
||||
this.tableData = res.data
|
||||
}else {
|
||||
} else {
|
||||
this.tableData = res.data.filter(task => task.exportStatus === this.activeName)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
).finally(() => {
|
||||
this.drawerLoading = false
|
||||
@ -271,7 +337,7 @@ export default {
|
||||
|
||||
retry(item) {
|
||||
post(
|
||||
'/exportCenter/retry/' + item.id,{},
|
||||
'/exportCenter/retry/' + item.id, {},
|
||||
true
|
||||
).then(
|
||||
(res) => {
|
||||
@ -288,21 +354,21 @@ export default {
|
||||
this.handleClick()
|
||||
}
|
||||
)
|
||||
this.openMessageSuccess("commons.delete_success");
|
||||
this.openMessageSuccess('commons.delete_success')
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
this.multipleSelection = val
|
||||
},
|
||||
confirmDelete() {
|
||||
const options = {
|
||||
title: "确定删除该任务吗?",
|
||||
type: "primary",
|
||||
cb: this.deleteField,
|
||||
};
|
||||
this.handlerConfirm(options);
|
||||
title: '确定删除该任务吗?',
|
||||
type: 'primary',
|
||||
cb: this.deleteField
|
||||
}
|
||||
this.handlerConfirm(options)
|
||||
},
|
||||
delAll() {
|
||||
if(this.multipleSelection.length === 0 ){
|
||||
if (this.multipleSelection.length === 0) {
|
||||
post(
|
||||
'/exportCenter/deleteAll/' + this.activeName,
|
||||
this.multipleSelection.map((ele) => ele.id),
|
||||
@ -312,7 +378,7 @@ export default {
|
||||
this.handleClick()
|
||||
}
|
||||
)
|
||||
this.openMessageSuccess("commons.delete_success");
|
||||
this.openMessageSuccess('commons.delete_success')
|
||||
return
|
||||
}
|
||||
post(
|
||||
@ -324,15 +390,15 @@ export default {
|
||||
this.handleClick()
|
||||
}
|
||||
)
|
||||
this.openMessageSuccess("commons.delete_success");
|
||||
this.openMessageSuccess('commons.delete_success')
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
},
|
||||
};
|
||||
this.drawer = false
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.de-export-excel {
|
||||
|
||||
@ -122,7 +122,6 @@
|
||||
</div>
|
||||
<div
|
||||
class="login-msg"
|
||||
|
||||
>
|
||||
{{ msg }}
|
||||
</div>
|
||||
|
||||
@ -19,12 +19,11 @@
|
||||
import DeCanvas from '@/components/canvas/DeCanvas'
|
||||
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
||||
import {
|
||||
imgUrlTrans,
|
||||
getNowCanvasComponentData
|
||||
imgUrlTrans
|
||||
} from '@/components/canvas/utils/utils'
|
||||
import { mapState } from 'vuex'
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
components: { DeCanvas, CanvasOptBar },
|
||||
data() {
|
||||
|
||||
@ -659,7 +659,7 @@ export default {
|
||||
if (this.widgetInfo.name.indexOf('numberSelect') !== -1) {
|
||||
type = 'NUM'
|
||||
}
|
||||
if(viewIds && viewIds.length > 0){
|
||||
if (viewIds && viewIds.length > 0) {
|
||||
paramsWithIds(type, viewIds).then(res => {
|
||||
this.childViews.datasetParams = res.data
|
||||
})
|
||||
|
||||
@ -134,33 +134,45 @@
|
||||
<span
|
||||
style="padding-left: 10px;"
|
||||
>
|
||||
<el-popover popper-class="popover-more-parent" :visible-arrow="false" placement="bottom-start" :width="182" trigger="click">
|
||||
<template v-if="showMore" #reference>
|
||||
<el-popover
|
||||
popper-class="popover-more-parent"
|
||||
:visible-arrow="false"
|
||||
placement="bottom-start"
|
||||
:width="182"
|
||||
trigger="click"
|
||||
>
|
||||
<template
|
||||
v-if="showMore"
|
||||
#reference
|
||||
>
|
||||
<div class="more-select-btn icon iconfont icon-icon-more">
|
||||
{{ $t('panel.more') }}
|
||||
</div>
|
||||
</template>
|
||||
<div class="check-item">
|
||||
<el-tooltip
|
||||
v-model="visibleShowEmpty"
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
:content="$t('time.passing_parameters')"
|
||||
placement="top"
|
||||
manual
|
||||
v-model="visibleShowEmpty"
|
||||
>
|
||||
<el-checkbox
|
||||
v-if="widget.name && ['textSelectWidget', 'textSelectGridWidget'].includes(widget.name)"
|
||||
:disabled="attrs.enableParameters"
|
||||
v-model="attrs.showEmpty"
|
||||
><span @mouseenter="handlerVisibleShowEmpty" @mouseleave="handlerVisibleShowEmpty">{{ $t('panel.show_empty') }}</span>
|
||||
:disabled="attrs.enableParameters"
|
||||
><span
|
||||
@mouseenter="handlerVisibleShowEmpty"
|
||||
@mouseleave="handlerVisibleShowEmpty"
|
||||
>{{ $t('panel.show_empty') }}</span>
|
||||
</el-checkbox>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="check-item">
|
||||
<el-checkbox
|
||||
v-model="attrs.showTime"
|
||||
v-if="widget.isTimeWidget && widget.isTimeWidget()"
|
||||
v-model="attrs.showTime"
|
||||
@change="showTimeChange"
|
||||
>
|
||||
<span>{{ $t('panel.show_time') }} </span>
|
||||
@ -189,9 +201,9 @@
|
||||
</div>
|
||||
|
||||
<i
|
||||
v-if="widget.isTimeWidget && widget.isTimeWidget()"
|
||||
slot="reference"
|
||||
:class="{'i-filter-active': attrs.showTime, 'i-filter-inactive': !attrs.showTime}"
|
||||
v-if="widget.isTimeWidget && widget.isTimeWidget()"
|
||||
class="el-icon-setting i-filter"
|
||||
/>
|
||||
</el-popover>
|
||||
@ -202,30 +214,44 @@
|
||||
v-model="attrs.setTimeRange"
|
||||
>{{ $t('time.set_time_filtering_range') }}
|
||||
</el-checkbox>
|
||||
<el-popover :disabled="!attrs.setTimeRange" popper-class="popover-setting-parent" ref="popoverSetting" :visible-arrow="false" placement="bottom-start" :width="452" trigger="click">
|
||||
<RangeFilterTime @changeData="changeData" :timeRangeData="attrs.timeRange" />
|
||||
<el-popover
|
||||
ref="popoverSetting"
|
||||
:disabled="!attrs.setTimeRange"
|
||||
popper-class="popover-setting-parent"
|
||||
:visible-arrow="false"
|
||||
placement="bottom-start"
|
||||
:width="452"
|
||||
trigger="click"
|
||||
>
|
||||
<RangeFilterTime
|
||||
:time-range-data="attrs.timeRange"
|
||||
@changeData="changeData"
|
||||
/>
|
||||
<i
|
||||
v-if="widget.name && ['timeDateRangeWidget'].includes(widget.name)"
|
||||
:class="{'i-filter-active': attrs.setTimeRange, 'i-filter-inactive': !attrs.setTimeRange}"
|
||||
slot="reference"
|
||||
:class="{'i-filter-active': attrs.setTimeRange, 'i-filter-inactive': !attrs.setTimeRange}"
|
||||
class="el-icon-setting i-filter"
|
||||
/>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div class="check-item">
|
||||
<el-tooltip
|
||||
manual
|
||||
v-model="visibleEnableParameters"
|
||||
manual
|
||||
>
|
||||
<template #content>
|
||||
<span>{{ $t('time.not_supported') }}</span>
|
||||
</template>
|
||||
<el-checkbox
|
||||
v-if="showParams"
|
||||
:disabled="attrs.showEmpty"
|
||||
v-model="attrs.enableParameters"
|
||||
:disabled="attrs.showEmpty"
|
||||
@change="enableParametersChange"
|
||||
><span @mouseenter="handlerVisibleEnableParameters" @mouseleave="handlerVisibleEnableParameters">
|
||||
><span
|
||||
@mouseenter="handlerVisibleEnableParameters"
|
||||
@mouseleave="handlerVisibleEnableParameters"
|
||||
>
|
||||
{{ $t('panel.binding_parameters') }} </span>
|
||||
</el-checkbox>
|
||||
</el-tooltip>
|
||||
@ -306,8 +332,8 @@
|
||||
</div>
|
||||
|
||||
<i
|
||||
slot="reference"
|
||||
v-if="showParams"
|
||||
slot="reference"
|
||||
:class="{'i-filter-active': attrs.enableParameters, 'i-filter-inactive': !attrs.enableParameters}"
|
||||
class="el-icon-setting i-filter"
|
||||
/>
|
||||
@ -415,9 +441,9 @@ export default {
|
||||
handler(newName, oldName) {
|
||||
this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams))
|
||||
if (this.datasetParams.length > 0) {
|
||||
for (var j = 0; j < this.datasetParams.length; j++) {
|
||||
var hasParam = false
|
||||
for (var i = 0; i < this.childViews.datasetParams.length; i++) {
|
||||
for (let j = 0; j < this.datasetParams.length; j++) {
|
||||
let hasParam = false
|
||||
for (let i = 0; i < this.childViews.datasetParams.length; i++) {
|
||||
if (this.childViews.datasetParams[i].id === this.datasetParams[j].id) {
|
||||
hasParam = true
|
||||
}
|
||||
@ -435,18 +461,18 @@ export default {
|
||||
this.attrs = this.controlAttrs
|
||||
if (!this.attrs.timeRange) {
|
||||
this.$set(this.attrs, 'timeRange', {
|
||||
intervalType: "none",
|
||||
intervalType: 'none',
|
||||
dynamicWindow: false,
|
||||
maximumSingleQuery: 0,
|
||||
regularOrTrends: "fixed",
|
||||
regularOrTrendsValue: "",
|
||||
relativeToCurrent: "custom",
|
||||
regularOrTrends: 'fixed',
|
||||
regularOrTrendsValue: '',
|
||||
relativeToCurrent: 'custom',
|
||||
timeNum: 0,
|
||||
relativeToCurrentType: "year",
|
||||
around: "f",
|
||||
relativeToCurrentType: 'year',
|
||||
around: 'f',
|
||||
timeNumRange: 0,
|
||||
relativeToCurrentTypeRange: "year",
|
||||
aroundRange: "f",
|
||||
relativeToCurrentTypeRange: 'year',
|
||||
aroundRange: 'f'
|
||||
})
|
||||
}
|
||||
if (this.widget.isTimeWidget) {
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
<template xmlns:el-col="http://www.w3.org/1999/html">
|
||||
<el-col style="padding: 1px 24px 16px 24px">
|
||||
<el-col>
|
||||
<el-row class="sticky-de-search-panel" style="margin-bottom: 10px">
|
||||
<el-row
|
||||
class="sticky-de-search-panel"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
<el-col :span="24">
|
||||
<el-input
|
||||
v-model="filterText"
|
||||
|
||||
@ -19,7 +19,8 @@
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item v-if="showItem(driverForm.id)"
|
||||
<el-form-item
|
||||
v-if="showItem(driverForm.id)"
|
||||
:label="$t('driver.driver')"
|
||||
prop="driverClass"
|
||||
>
|
||||
@ -63,7 +64,10 @@
|
||||
{{ uploading ? $t('dataset.uploading') : $t('dataset.upload_file') }}
|
||||
</deBtn>
|
||||
</el-upload>
|
||||
<p class="tips" v-show="showItem(driverForm.id)">
|
||||
<p
|
||||
v-show="showItem(driverForm.id)"
|
||||
class="tips"
|
||||
>
|
||||
{{ $t('datasource.can_be_uploaded') }}
|
||||
</p>
|
||||
<div class="jar-cont">
|
||||
@ -305,13 +309,13 @@ export default {
|
||||
refreshType(form) {
|
||||
this.$emit('refresh-type', form)
|
||||
},
|
||||
showItem(id){
|
||||
if (id !== '' && id.indexOf("default") !== -1) {
|
||||
showItem(id) {
|
||||
if (id !== '' && id.indexOf('default') !== -1) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -696,7 +696,7 @@ export default {
|
||||
methods: {
|
||||
async cancelEdit() {
|
||||
const params = this.configFromTabs?.id ? this.configFromTabs : this.$route.query
|
||||
let { id, showModel } = params
|
||||
const { id, showModel } = params
|
||||
await this.getDatasourceDetail(id, showModel)
|
||||
this.edit(this.params)
|
||||
this.changeType(true)
|
||||
|
||||
@ -216,8 +216,9 @@
|
||||
:label="$t('datasource.driver_name')"
|
||||
prop="name"
|
||||
>
|
||||
<el-input :disabled="disabledEdit(driverForm.id)"
|
||||
<el-input
|
||||
v-model="driverForm.name"
|
||||
:disabled="disabledEdit(driverForm.id)"
|
||||
:placeholder="$t('fu.search_bar.please_input')"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -458,8 +459,8 @@ export default {
|
||||
handleClick() {
|
||||
document.querySelector(`.${this.tabActive}`).scrollIntoView()
|
||||
},
|
||||
disabledEdit(id){
|
||||
if (id !== '' && id.indexOf("default") !== -1) {
|
||||
disabledEdit(id) {
|
||||
if (id !== '' && id.indexOf('default') !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
||||
@ -344,7 +344,7 @@
|
||||
|
||||
<script>
|
||||
import { columnOptions } from './options'
|
||||
import {addOrder, formatOrders} from '@/utils/index'
|
||||
import { addOrder, formatOrders } from '@/utils/index'
|
||||
import { datasetTaskList, post } from '@/api/dataset/dataset'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
import GridTable from '@/components/gridTable/index.vue'
|
||||
@ -496,13 +496,13 @@ export default {
|
||||
this.search()
|
||||
},
|
||||
sortChange({ column, prop, order }) {
|
||||
this.orderConditions = [];
|
||||
this.orderConditions = []
|
||||
if (!order) {
|
||||
this.search(true);
|
||||
return;
|
||||
this.search(true)
|
||||
return
|
||||
}
|
||||
addOrder({ field: prop, value: order }, this.orderConditions);
|
||||
this.search(true);
|
||||
addOrder({ field: prop, value: order }, this.orderConditions)
|
||||
this.search(true)
|
||||
},
|
||||
handleCurrentChange(currentPage) {
|
||||
this.paginationConfig.currentPage = currentPage
|
||||
|
||||
Loading…
Reference in New Issue
Block a user