Unverified 提交 16127de3 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #2350 from dataease/dev

Dev
...@@ -759,7 +759,7 @@ export default { ...@@ -759,7 +759,7 @@ export default {
elementMouseDown(e) { elementMouseDown(e) {
// private 设置当前组件数据及状态 // private 设置当前组件数据及状态
this.$store.commit('setClickComponentStatus', true) 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() e.preventDefault()
} }
// 阻止冒泡事件 // 阻止冒泡事件
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<el-row ref="mainPlayer" style="width: 100%;height: 100%"> <el-row ref="mainPlayer" style="width: 100%;height: 100%">
<div v-if="element.streamMediaLinks[element.streamMediaLinks.videoType].url" class="video-container"> <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 /> <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"> <div v-if="mobileLayoutStatus" class="stream-mask">
<span style="opacity: 0.7;"> <span style="opacity: 0.7;">
<span style="color: lightgray;">{{ $t('panel.stream_mobile_tips') }}</span> <span style="color: lightgray;">{{ $t('panel.stream_mobile_tips') }}</span>
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
justify-content: center; justify-content: center;
} }
.edit-mask{ .edit-mask-stream{
opacity: 0; opacity: 0;
} }
......
...@@ -501,13 +501,17 @@ export default { ...@@ -501,13 +501,17 @@ export default {
const customStyleChart = JSON.parse(this.chart.customStyle) const customStyleChart = JSON.parse(this.chart.customStyle)
const customAttrPanel = JSON.parse(this.canvasStyleData.chart.customAttr) const customAttrPanel = JSON.parse(this.canvasStyleData.chart.customAttr)
const customStylePanel = JSON.parse(this.canvasStyleData.chart.customStyle) const customStylePanel = JSON.parse(this.canvasStyleData.chart.customStyle)
// 组件样式-背景设置 if (customStyleChart.background) {
customStyleChart.background = customStylePanel.background // 组件样式-背景设置
customStyleChart.background = customStylePanel.background
}
// 图形属性-颜色设置 // 图形属性-颜色设置
if (this.chart.type.includes('table')) { if (this.chart.type.includes('table')) {
customAttrChart.color = customAttrPanel.tableColor customAttrChart.color = customAttrPanel.tableColor
} else { } 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 = {
...this.chart, ...this.chart,
...@@ -854,6 +858,9 @@ export default { ...@@ -854,6 +858,9 @@ export default {
this.chart.stylePriority = param.viewInfo.stylePriority this.chart.stylePriority = param.viewInfo.stylePriority
this.sourceCustomAttrStr = this.chart.customAttr this.sourceCustomAttrStr = this.chart.customAttr
this.sourceCustomStyleStr = this.chart.customStyle this.sourceCustomStyleStr = this.chart.customStyle
if (this.componentViewsData[this.chart.id]) {
this.componentViewsData[this.chart.id]['title'] = this.chart.title
}
this.mergeScale() this.mergeScale()
} }
} }
......
...@@ -148,7 +148,7 @@ export function checkViewTitle(opt, id, tile) { ...@@ -148,7 +148,7 @@ export function checkViewTitle(opt, id, tile) {
const curPanelViewsData = store.state.componentViewsData const curPanelViewsData = store.state.componentViewsData
const curComponentViewNames = [] const curComponentViewNames = []
store.state.componentData.forEach(item => { 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不加入比较 // 更新时自己的title不加入比较
if ((opt === 'update' && id !== item.propValue.viewId) || opt === 'new') { if ((opt === 'update' && id !== item.propValue.viewId) || opt === 'new') {
curComponentViewNames.push(curPanelViewsData[item.propValue.viewId].title) curComponentViewNames.push(curPanelViewsData[item.propValue.viewId].title)
......
...@@ -117,11 +117,11 @@ export default { ...@@ -117,11 +117,11 @@ export default {
// console.log('aaaaaa') // console.log('aaaaaa')
const { horizontal, vertical } = this.element.style const { horizontal, vertical } = this.element.style
this.$set(this.element.style, 'horizontal', horizontal || 'left') 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: { methods: {
handlerPositionChange(val) { handlerPositionChange(val) {
const { horizontal = 'left', vertical = 'top' } = val const { horizontal = 'left', vertical = 'center' } = val
this.titleStyle = { this.titleStyle = {
width: '100%', width: '100%',
textAlign: horizontal textAlign: horizontal
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
<el-form-item :label="$t('chart.text_h_position')" class="form-item"> <el-form-item :label="$t('chart.text_h_position')" class="form-item">
<el-radio-group v-model="styleInfo.horizontal" size="mini"> <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="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-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="showVertical" :label="$t('chart.text_v_position')" class="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-group v-model="styleInfo.vertical" size="mini">
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button> <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-radio-group>
</el-form-item> </el-form-item>
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
<div> <div>
<span v-for="channel in msg_channels" :key="channel.msgChannelId" class="auth-span"> <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-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)" /> <el-checkbox v-else v-model="data.check_map[channel.msgChannelId]" @change="childBoxChange(node, channel)" />
...@@ -150,17 +148,7 @@ export default { ...@@ -150,17 +148,7 @@ export default {
const nodeId = node.id const nodeId = node.id
return this.setting_data[nodeId] && this.setting_data[nodeId].some(item => item.channelId === channel.msgChannelId && item.enable) 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) { nodeClick(data, node) {
}, },
getAllKidId(node, ids) { getAllKidId(node, ids) {
...@@ -190,7 +178,7 @@ export default { ...@@ -190,7 +178,7 @@ export default {
enable enable
} }
batchUpdate(param).then(res => { batchUpdate(param).then(res => {
this.loadSettingData() this.loadSettingData(this.loadTreeData)
}) })
}, },
childBoxChange(node, channel) { childBoxChange(node, channel) {
...@@ -224,7 +212,7 @@ export default { ...@@ -224,7 +212,7 @@ export default {
channelId: channelId channelId: channelId
} }
updateSetting(param).then(res => { updateSetting(param).then(res => {
this.loadSettingData() this.loadSettingData(this.loadTreeData)
}) })
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
width="400" width="400"
trigger="click" 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-button slot="reference" size="mini" class="shape-item">{{ $t('chart.color') }}<i class="el-icon-setting el-icon--right" /></el-button>
</el-popover> </el-popover>
</div> </div>
...@@ -29,6 +29,14 @@ export default { ...@@ -29,6 +29,14 @@ export default {
required: false required: false
} }
}, },
data() {
return {
propertyInner: [
'value',
'alpha'
]
}
},
methods: { methods: {
onColorChange(colorForm) { onColorChange(colorForm) {
this.$emit('onColorChange', colorForm) this.$emit('onColorChange', colorForm)
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
}, },
chartBackground() { chartBackground() {
let style = {} let style = {}
if (this.subjectItemDetails) { if (this.subjectItemDetails && this.subjectItemDetails.chart.customStyle.background) {
style = { style = {
background: this.subjectItemDetails.chart.customStyle.background.color, background: this.subjectItemDetails.chart.customStyle.background.color,
opacity: this.subjectItemDetails.chart.customStyle.background.alpha / 100 opacity: this.subjectItemDetails.chart.customStyle.background.alpha / 100
......
...@@ -274,6 +274,7 @@ ...@@ -274,6 +274,7 @@
<Preview <Preview
v-if="previewVisible" v-if="previewVisible"
:in-screen="!previewVisible" :in-screen="!previewVisible"
:panel-info="panelInfo"
:show-type="canvasStyleData.selfAdaption?'full':'width'" :show-type="canvasStyleData.selfAdaption?'full':'width'"
:canvas-style-data="canvasStyleData" :canvas-style-data="canvasStyleData"
:component-data="componentData" :component-data="componentData"
......
<template> <template>
<layout-content> <layout-content>
<template v-slot:header> <template v-slot:header>
<el-icon name="back" class="back-button" @click.native="backToList"/> <el-icon name="back" class="back-button" @click.native="backToList" />
{{ {{
params && params.id && params.showModel && params.showModel === 'show' && !canEdit ? $t('driver.show_info') : $t('driver.modify') params && params.id && params.showModel && params.showModel === 'show' && !canEdit ? $t('driver.show_info') : $t('driver.modify')
}} }}
<el-button v-if="canEdit" size="mini" style="float: right;"type="primary" @click="save">{{ $t('commons.save') }} <el-button v-if="canEdit" size="mini" style="float: right;"type="primary" @click="save">{{ $t('commons.save') }}
</el-button> </el-button>
<el-button v-else size="mini" style="float: right;" type="primary" @click="changeEdit">{{ $t('commons.edit') }} <el-button v-else size="mini" style="float: right;" type="primary" @click="changeEdit">{{ $t('commons.edit') }}
</el-button> </el-button>
</template> </template>
<div> <div>
...@@ -24,16 +23,17 @@ ...@@ -24,16 +23,17 @@
label-position="right" label-position="right"
> >
<el-form-item :label="$t('commons.name')" prop="name"> <el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="driverForm.name" autocomplete="off"/> <el-input v-model="driverForm.name" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.description')"> <el-form-item :label="$t('commons.description')">
<el-input v-model="driverForm.desc" autocomplete="off"/> <el-input v-model="driverForm.desc" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('datasource.type')" prop="type"> <el-form-item :label="$t('datasource.type')" prop="type">
<el-select <el-select
v-model="driverForm.type" v-model="driverForm.type"
:placeholder="$t('datasource.please_choose_type')" :placeholder="$t('datasource.please_choose_type')"
class="select-width" class="select-width"
style="width: 100%"
disabled disabled
filterable filterable
> >
...@@ -46,27 +46,26 @@ ...@@ -46,27 +46,26 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="$t('driver.driver')" >--> <!-- <el-form-item :label="$t('driver.driver')" >-->
<!-- <el-select--> <!-- <el-select-->
<!-- v-model="driverForm.driverClass"--> <!-- v-model="driverForm.driverClass"-->
<!-- :placeholder="$t('driver.please_choose_driver')"--> <!-- :placeholder="$t('driver.please_choose_driver')"-->
<!-- class="select-width"--> <!-- class="select-width"-->
<!-- filterable--> <!-- filterable-->
<!-- >--> <!-- >-->
<!-- <el-option--> <!-- <el-option-->
<!-- v-for="item in driverClassList"--> <!-- v-for="item in driverClassList"-->
<!-- :key="item"--> <!-- :key="item"-->
<!-- :label="item"--> <!-- :label="item"-->
<!-- :value="item"--> <!-- :value="item"-->
<!-- />--> <!-- />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item :label="$t('driver.driver')" prop="driverClass"> <el-form-item :label="$t('driver.driver')" prop="driverClass">
<el-input v-model="driverForm.driverClass" autocomplete="off"/> <el-input v-model="driverForm.driverClass" autocomplete="off" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-upload <el-upload
...@@ -83,16 +82,16 @@ ...@@ -83,16 +82,16 @@
:headers="headers" :headers="headers"
style="float: right;" style="float: right;"
> >
<el-button size="mini" type="primary" style="float: right;" :disabled="uploading"> <el-button size="mini" type="primary" style="float: right;" :disabled="uploading">
<span v-if="!uploading" style="font-size: 12px;">{{ $t('dataset.upload_file') }}</span> <span v-if="!uploading" style="font-size: 12px;">{{ $t('dataset.upload_file') }}</span>
<span v-if="uploading" style="font-size: 12px;"><i class="el-icon-loading" /> {{ $t('dataset.uploading') }}</span> <span v-if="uploading" style="font-size: 12px;"><i class="el-icon-loading" /> {{ $t('dataset.uploading') }}</span>
</el-button> </el-button>
</el-upload> </el-upload>
<fu-table :data="driverFiles"> <fu-table :data="driverFiles">
<el-table-column prop="fileName" :label="$t('driver.file_name')"/> <el-table-column prop="fileName" :label="$t('driver.file_name')" />
<!-- <el-table-column prop="version" :label="$t('driver.version')"/>--> <!-- <el-table-column prop="version" :label="$t('driver.version')"/>-->
<fu-table-operations :buttons="buttons" :label="$t('commons.operating')" fix/> <fu-table-operations :buttons="buttons" :label="$t('commons.operating')" fix />
</fu-table> </fu-table>
</div> </div>
</layout-content> </layout-content>
...@@ -102,13 +101,13 @@ ...@@ -102,13 +101,13 @@
import LayoutContent from '@/components/business/LayoutContent' import LayoutContent from '@/components/business/LayoutContent'
import i18n from '@/lang/index' import i18n from '@/lang/index'
import ApiHttpRequestForm from '@/views/system/datasource/ApiHttpRequestForm' 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 PluginCom from '@/views/system/plugin/PluginCom'
import {deleteDriverFile, listDriverDetails, updateDriver} from "@/api/system/datasource"; import { deleteDriverFile, listDriverDetails, updateDriver } from '@/api/system/datasource'
import {delUser} from "@/api/system/user"; import { delUser } from '@/api/system/user'
import {$alert} from "@/utils/message"; import { $alert } from '@/utils/message'
import store from "@/store"; import store from '@/store'
import {getToken} from "@/utils/auth"; import { getToken } from '@/utils/auth'
const token = getToken() const token = getToken()
...@@ -138,7 +137,7 @@ export default { ...@@ -138,7 +137,7 @@ export default {
return { return {
disabled: false, disabled: false,
driverForm: { driverForm: {
id:'', id: '',
name: '', name: '',
desc: '', desc: '',
type: '', type: '',
...@@ -147,12 +146,12 @@ export default { ...@@ -147,12 +146,12 @@ export default {
datasourceType: {}, datasourceType: {},
driverClassList: [], driverClassList: [],
rule: { rule: {
name: [{required: true, message: i18n.t('datasource.input_name'), trigger: 'blur'}, name: [{ required: true, message: i18n.t('datasource.input_name'), trigger: 'blur' },
{min: 2, max: 50, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur'}], { min: 2, max: 50, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur' }],
desc: [{required: true, message: i18n.t('datasource.input_name'), trigger: 'blur'}, desc: [{ required: true, message: i18n.t('datasource.input_name'), trigger: 'blur' },
{min: 2, max: 200, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur'}], { min: 2, max: 200, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur' }],
type: [{required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'blur'}], type: [{ required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'blur' }],
driverClass: [{required: true, message: i18n.t('driver.please_set_driverClass'), trigger: 'blur'}] driverClass: [{ required: true, message: i18n.t('driver.please_set_driverClass'), trigger: 'blur' }]
}, },
canEdit: false, canEdit: false,
driverFiles: [], driverFiles: [],
...@@ -179,7 +178,6 @@ export default { ...@@ -179,7 +178,6 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
beforeUpload(file) { beforeUpload(file) {
this.uploading = true this.uploading = true
...@@ -191,7 +189,7 @@ export default { ...@@ -191,7 +189,7 @@ export default {
uploadFail(response, file, fileList) { uploadFail(response, file, fileList) {
let myError = response.toString() let myError = response.toString()
myError = myError.replace('Error: ', '') myError = myError.replace('Error: ', '')
if(myError.indexOf('AuthenticationException') >= 0){ if (myError.indexOf('AuthenticationException') >= 0) {
const message = i18n.t('login.tokenError') const message = i18n.t('login.tokenError')
$alert(message, () => { $alert(message, () => {
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
...@@ -211,13 +209,13 @@ export default { ...@@ -211,13 +209,13 @@ export default {
showClose: true showClose: true
}) })
}, },
deleteDriverFile(row){ deleteDriverFile(row) {
deleteDriverFile(row).then(res => { deleteDriverFile(row).then(res => {
this.$success(this.$t('commons.delete_success')) this.$success(this.$t('commons.delete_success'))
this.listDriverDetails() this.listDriverDetails()
}) })
}, },
listDriverDetails(){ listDriverDetails() {
listDriverDetails(this.driverForm.id).then(res => { listDriverDetails(this.driverForm.id).then(res => {
this.driverFiles = res.data this.driverFiles = res.data
this.driverClassList = [] this.driverClassList = []
...@@ -231,11 +229,11 @@ export default { ...@@ -231,11 +229,11 @@ export default {
this.formType = 'modify' this.formType = 'modify'
this.disabled = this.params && this.params.id && this.params.showModel && this.params.showModel === 'show' && !this.canEdit this.disabled = this.params && this.params.id && this.params.showModel && this.params.showModel === 'show' && !this.canEdit
}, },
save(){ save() {
this.$refs.driverForm.validate(valid => { this.$refs.driverForm.validate(valid => {
if (!valid) { if (!valid) {
return false return false
} }
updateDriver(this.driverForm).then(res => { updateDriver(this.driverForm).then(res => {
this.$success(i18n.t('commons.success')) this.$success(i18n.t('commons.success'))
this.canEdit = false this.canEdit = false
...@@ -256,13 +254,13 @@ export default { ...@@ -256,13 +254,13 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.el-input { /* .el-input {
width: 300px; width: 300px;
} }
.el-select { .el-select {
width: 300px; width: 300px;
} } */
.ms-http-input { .ms-http-input {
width: 500px; width: 500px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论