mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
commit
16127de38a
@ -759,7 +759,7 @@ export default {
|
||||
elementMouseDown(e) {
|
||||
// private 设置当前组件数据及状态
|
||||
this.$store.commit('setClickComponentStatus', true)
|
||||
if (this.element.component !== 'v-text' && this.element.component !== 'de-rich-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range' && this.element.component !== 'de-date') {
|
||||
if (this.element.component !== 'de-frame' && this.element.component !== 'v-text' && this.element.component !== 'de-rich-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range' && this.element.component !== 'de-date') {
|
||||
e.preventDefault()
|
||||
}
|
||||
// 阻止冒泡事件
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-row ref="mainPlayer" style="width: 100%;height: 100%">
|
||||
<div v-if="element.streamMediaLinks[element.streamMediaLinks.videoType].url" class="video-container">
|
||||
<video :ref="'player-'+element.id" class="centered-video" name="centeredVideo" :loop="pOption.loop" :controls="inScreen" muted />
|
||||
<div v-if="editMode==='edit'" class="stream-mask edit-mask" />
|
||||
<div v-if="editMode==='edit'" class="stream-mask edit-mask-stream" />
|
||||
<div v-if="mobileLayoutStatus" class="stream-mask">
|
||||
<span style="opacity: 0.7;">
|
||||
<span style="color: lightgray;">{{ $t('panel.stream_mobile_tips') }}</span>
|
||||
@ -177,7 +177,7 @@ export default {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.edit-mask{
|
||||
.edit-mask-stream{
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
@ -501,13 +501,17 @@ export default {
|
||||
const customStyleChart = JSON.parse(this.chart.customStyle)
|
||||
const customAttrPanel = JSON.parse(this.canvasStyleData.chart.customAttr)
|
||||
const customStylePanel = JSON.parse(this.canvasStyleData.chart.customStyle)
|
||||
if (customStyleChart.background) {
|
||||
// 组件样式-背景设置
|
||||
customStyleChart.background = customStylePanel.background
|
||||
}
|
||||
// 图形属性-颜色设置
|
||||
if (this.chart.type.includes('table')) {
|
||||
customAttrChart.color = customAttrPanel.tableColor
|
||||
} else {
|
||||
customAttrChart.color = customAttrPanel.color
|
||||
customAttrChart.color['value'] = customAttrPanel.color['value']
|
||||
customAttrChart.color['colors'] = customAttrPanel.color['colors']
|
||||
customAttrChart.color['alpha'] = customAttrPanel.color['alpha']
|
||||
}
|
||||
this.chart = {
|
||||
...this.chart,
|
||||
@ -854,6 +858,9 @@ export default {
|
||||
this.chart.stylePriority = param.viewInfo.stylePriority
|
||||
this.sourceCustomAttrStr = this.chart.customAttr
|
||||
this.sourceCustomStyleStr = this.chart.customStyle
|
||||
if (this.componentViewsData[this.chart.id]) {
|
||||
this.componentViewsData[this.chart.id]['title'] = this.chart.title
|
||||
}
|
||||
this.mergeScale()
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ export function checkViewTitle(opt, id, tile) {
|
||||
const curPanelViewsData = store.state.componentViewsData
|
||||
const curComponentViewNames = []
|
||||
store.state.componentData.forEach(item => {
|
||||
if (item.type === 'view' && item.propValue && item.propValue.viewId) {
|
||||
if (item.type === 'view' && item.propValue && item.propValue.viewId && curPanelViewsData[item.propValue.viewId]) {
|
||||
// 更新时自己的title不加入比较
|
||||
if ((opt === 'update' && id !== item.propValue.viewId) || opt === 'new') {
|
||||
curComponentViewNames.push(curPanelViewsData[item.propValue.viewId].title)
|
||||
|
@ -117,11 +117,11 @@ export default {
|
||||
// console.log('aaaaaa')
|
||||
const { horizontal, vertical } = this.element.style
|
||||
this.$set(this.element.style, 'horizontal', horizontal || 'left')
|
||||
this.$set(this.element.style, 'vertical', vertical || 'top')
|
||||
this.$set(this.element.style, 'vertical', vertical || 'center')
|
||||
},
|
||||
methods: {
|
||||
handlerPositionChange(val) {
|
||||
const { horizontal = 'left', vertical = 'top' } = val
|
||||
const { horizontal = 'left', vertical = 'center' } = val
|
||||
this.titleStyle = {
|
||||
width: '100%',
|
||||
textAlign: horizontal
|
||||
|
@ -9,14 +9,14 @@
|
||||
<el-form-item :label="$t('chart.text_h_position')" class="form-item">
|
||||
<el-radio-group v-model="styleInfo.horizontal" size="mini">
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
<el-radio-button label="center">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
<el-radio-button :disabled="styleInfo.vertical === 'center'" label="center">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showVertical" :label="$t('chart.text_v_position')" class="form-item">
|
||||
<el-radio-group v-model="styleInfo.vertical" size="mini">
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
<el-radio-button label="center">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
<el-radio-button :disabled="styleInfo.horizontal === 'center'" label="center">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -24,9 +24,7 @@
|
||||
|
||||
<div>
|
||||
<span v-for="channel in msg_channels" :key="channel.msgChannelId" class="auth-span">
|
||||
<!-- <a href="javascript:;" @click="clickAuth(node,channel)">
|
||||
<svg-icon style="width: 25px;height: 25px" :icon-class="checkBoxStatus(node, channel)?'lock_open':'lock_closed'" />
|
||||
</a> -->
|
||||
|
||||
<el-checkbox v-if="data.children && data.children.length > 0" v-model="data.check_all_map[channel.msgChannelId]" :indeterminate="data.indeterminate_map[channel.msgChannelId]" @change="parentBoxChange(node, channel)" />
|
||||
<el-checkbox v-else v-model="data.check_map[channel.msgChannelId]" @change="childBoxChange(node, channel)" />
|
||||
|
||||
@ -150,17 +148,7 @@ export default {
|
||||
const nodeId = node.id
|
||||
return this.setting_data[nodeId] && this.setting_data[nodeId].some(item => item.channelId === channel.msgChannelId && item.enable)
|
||||
},
|
||||
clickAuth(node, channel) {
|
||||
// const status = this.checkBoxStatus(nodeId, channel)
|
||||
const param = {
|
||||
typeId: node.data.id,
|
||||
channelId: channel.msgChannelId
|
||||
}
|
||||
updateSetting(param).then(res => {
|
||||
this.loadSettingData()
|
||||
// node.checked = true
|
||||
})
|
||||
},
|
||||
|
||||
nodeClick(data, node) {
|
||||
},
|
||||
getAllKidId(node, ids) {
|
||||
@ -190,7 +178,7 @@ export default {
|
||||
enable
|
||||
}
|
||||
batchUpdate(param).then(res => {
|
||||
this.loadSettingData()
|
||||
this.loadSettingData(this.loadTreeData)
|
||||
})
|
||||
},
|
||||
childBoxChange(node, channel) {
|
||||
@ -224,7 +212,7 @@ export default {
|
||||
channelId: channelId
|
||||
}
|
||||
updateSetting(param).then(res => {
|
||||
this.loadSettingData()
|
||||
this.loadSettingData(this.loadTreeData)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<color-selector :source-type="sourceType" :chart="chart" @onColorChange="onColorChange" />
|
||||
<color-selector :chart="chart" :property-inner="propertyInner" @onColorChange="onColorChange" />
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.color') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
@ -29,6 +29,14 @@ export default {
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
propertyInner: [
|
||||
'value',
|
||||
'alpha'
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onColorChange(colorForm) {
|
||||
this.$emit('onColorChange', colorForm)
|
||||
|
@ -158,7 +158,7 @@ export default {
|
||||
},
|
||||
chartBackground() {
|
||||
let style = {}
|
||||
if (this.subjectItemDetails) {
|
||||
if (this.subjectItemDetails && this.subjectItemDetails.chart.customStyle.background) {
|
||||
style = {
|
||||
background: this.subjectItemDetails.chart.customStyle.background.color,
|
||||
opacity: this.subjectItemDetails.chart.customStyle.background.alpha / 100
|
||||
|
@ -274,6 +274,7 @@
|
||||
<Preview
|
||||
v-if="previewVisible"
|
||||
:in-screen="!previewVisible"
|
||||
:panel-info="panelInfo"
|
||||
:show-type="canvasStyleData.selfAdaption?'full':'width'"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
:component-data="componentData"
|
||||
|
@ -10,7 +10,6 @@
|
||||
<el-button v-else size="mini" style="float: right;" type="primary" @click="changeEdit">{{ $t('commons.edit') }}
|
||||
</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
<div>
|
||||
|
||||
@ -34,6 +33,7 @@
|
||||
v-model="driverForm.type"
|
||||
:placeholder="$t('datasource.please_choose_type')"
|
||||
class="select-width"
|
||||
style="width: 100%"
|
||||
disabled
|
||||
filterable
|
||||
>
|
||||
@ -66,7 +66,6 @@
|
||||
<el-input v-model="driverForm.driverClass" autocomplete="off" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-upload
|
||||
@ -102,13 +101,13 @@
|
||||
import LayoutContent from '@/components/business/LayoutContent'
|
||||
import i18n from '@/lang/index'
|
||||
import ApiHttpRequestForm from '@/views/system/datasource/ApiHttpRequestForm'
|
||||
import DsConfiguration from "@/views/system/datasource/DsConfiguration";
|
||||
import DsConfiguration from '@/views/system/datasource/DsConfiguration'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
import {deleteDriverFile, listDriverDetails, updateDriver} from "@/api/system/datasource";
|
||||
import {delUser} from "@/api/system/user";
|
||||
import {$alert} from "@/utils/message";
|
||||
import store from "@/store";
|
||||
import {getToken} from "@/utils/auth";
|
||||
import { deleteDriverFile, listDriverDetails, updateDriver } from '@/api/system/datasource'
|
||||
import { delUser } from '@/api/system/user'
|
||||
import { $alert } from '@/utils/message'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
const token = getToken()
|
||||
|
||||
@ -179,7 +178,6 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
beforeUpload(file) {
|
||||
this.uploading = true
|
||||
@ -256,13 +254,13 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-input {
|
||||
/* .el-input {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 300px;
|
||||
}
|
||||
} */
|
||||
|
||||
.ms-http-input {
|
||||
width: 500px;
|
||||
|
@ -28,9 +28,10 @@
|
||||
v-model="form.type"
|
||||
:placeholder="$t('datasource.please_choose_type')"
|
||||
class="select-width"
|
||||
style="width: 100%"
|
||||
:disabled="formType=='modify' || (formType==='add' && params && !!params.type)"
|
||||
@change="changeType()"
|
||||
filterable
|
||||
@change="changeType()"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dsTypes"
|
||||
@ -46,6 +47,7 @@
|
||||
v-model="form.configuration.customDriver"
|
||||
:placeholder="$t('driver.please_choose_driver')"
|
||||
class="select-width"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
@ -58,27 +60,35 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<ds-configuration ref="dsConfig" v-if="!datasourceType.isPlugin" :datasource-type='datasourceType' :form="form" :disabled="params && params.id && params.showModel && params.showModel === 'show' && !canEdit"></ds-configuration>
|
||||
<plugin-com ref="pluginDsConfig" v-if="datasourceType.isPlugin" :component-name="datasourceType.type" :obj="{form, disabled }" />
|
||||
|
||||
<ds-configuration v-if="!datasourceType.isPlugin" ref="dsConfig" :datasource-type="datasourceType" :form="form" :disabled="params && params.id && params.showModel && params.showModel === 'show' && !canEdit" />
|
||||
<plugin-com v-if="datasourceType.isPlugin" ref="pluginDsConfig" :component-name="datasourceType.type" :obj="{form, disabled }" />
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<div v-if="canEdit" slot="footer" class="dialog-footer">
|
||||
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)"
|
||||
@click="validaDatasource">{{ $t('commons.validate') }}
|
||||
<el-button
|
||||
v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)"
|
||||
@click="validaDatasource"
|
||||
>{{ $t('commons.validate') }}
|
||||
</el-button>
|
||||
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)" type="primary"
|
||||
@click="save">{{ $t('commons.save') }}
|
||||
<el-button
|
||||
v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)"
|
||||
type="primary"
|
||||
@click="save"
|
||||
>{{ $t('commons.save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-else slot="footer" class="dialog-footer">
|
||||
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)"
|
||||
@click="validaDatasource">{{ $t('commons.validate') }}
|
||||
<el-button
|
||||
v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)"
|
||||
@click="validaDatasource"
|
||||
>{{ $t('commons.validate') }}
|
||||
</el-button>
|
||||
<el-button v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)" type="primary"
|
||||
@click="changeEdit">{{ $t('commons.edit') }}
|
||||
<el-button
|
||||
v-if="formType==='add'?true: hasDataPermission('manage',params.privileges)"
|
||||
type="primary"
|
||||
@click="changeEdit"
|
||||
>{{ $t('commons.edit') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -99,7 +109,7 @@ import {
|
||||
import { $confirm } from '@/utils/message'
|
||||
import i18n from '@/lang/index'
|
||||
import ApiHttpRequestForm from '@/views/system/datasource/ApiHttpRequestForm'
|
||||
import DsConfiguration from "@/views/system/datasource/DsConfiguration";
|
||||
import DsConfiguration from '@/views/system/datasource/DsConfiguration'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
|
||||
export default {
|
||||
@ -216,9 +226,9 @@ export default {
|
||||
request: {
|
||||
headers: [{}],
|
||||
body: {
|
||||
"type": "",
|
||||
"raw": "",
|
||||
"kvs": []
|
||||
'type': '',
|
||||
'raw': '',
|
||||
'kvs': []
|
||||
}
|
||||
},
|
||||
fields: []
|
||||
@ -232,9 +242,9 @@ export default {
|
||||
request: {
|
||||
headers: [],
|
||||
body: {
|
||||
"type": "",
|
||||
"raw": "",
|
||||
"kvs": []
|
||||
'type': '',
|
||||
'raw': '',
|
||||
'kvs': []
|
||||
},
|
||||
authManager: {}
|
||||
},
|
||||
@ -288,7 +298,6 @@ export default {
|
||||
connectTimeout: 5,
|
||||
customDriver: 'default'
|
||||
}
|
||||
|
||||
},
|
||||
changeEdit() {
|
||||
this.canEdit = true
|
||||
@ -328,14 +337,14 @@ export default {
|
||||
return
|
||||
}
|
||||
let repeat = false
|
||||
let repeatDsName = []
|
||||
const repeatDsName = []
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
let configuration = JSON.parse(child.configuration)
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
@ -378,7 +387,7 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
let status = null;
|
||||
let status = null
|
||||
if (this.datasourceType.isPlugin) {
|
||||
status = this.$refs['pluginDsConfig'].callPluginInner({ methodName: 'validate' })
|
||||
} else {
|
||||
@ -387,7 +396,7 @@ export default {
|
||||
})
|
||||
}
|
||||
if (!status) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
this.$refs.dsForm.validate(valid => {
|
||||
@ -462,7 +471,7 @@ export default {
|
||||
this.$message.error(i18n.t('datasource.port_no_less_then_0'))
|
||||
return
|
||||
}
|
||||
let status = null;
|
||||
let status = null
|
||||
if (this.datasourceType.isPlugin) {
|
||||
status = this.$refs['pluginDsConfig'].callPluginInner({ methodName: 'validate' })
|
||||
} else {
|
||||
@ -474,7 +483,7 @@ export default {
|
||||
})
|
||||
}
|
||||
if (!status) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
this.$refs.dsForm.validate(valid => {
|
||||
if (valid) {
|
||||
@ -554,7 +563,7 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let index = this.form.apiConfiguration.indexOf(this.apiItem)
|
||||
const index = this.form.apiConfiguration.indexOf(this.apiItem)
|
||||
for (let i = 0; i < this.form.apiConfiguration.length; i++) {
|
||||
if (i !== index && this.form.apiConfiguration[i].name === this.apiItem.name) {
|
||||
hasRepeatName = true
|
||||
@ -652,13 +661,13 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-input {
|
||||
/* .el-input {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 300px;
|
||||
}
|
||||
} */
|
||||
|
||||
.ms-http-input {
|
||||
width: 500px;
|
||||
|
Loading…
Reference in New Issue
Block a user