Merge branch 'v1.10' of github.com:dataease/dataease into v1.10
This commit is contained in:
commit
6971bd67cd
@ -15,4 +15,10 @@ public class PanelShareRemoveRequest implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty("分享ID")
|
@ApiModelProperty("分享ID")
|
||||||
private String shareId;
|
private String shareId;
|
||||||
|
|
||||||
|
@ApiModelProperty("分享类型{0:用户,1:角色,2:组织}")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("目标ID")
|
||||||
|
private Long targetId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,9 +92,9 @@ public class ShareService {
|
|||||||
} else {
|
} else {
|
||||||
shareNodes = typeSharedMap.get(key);
|
shareNodes = typeSharedMap.get(key);
|
||||||
}
|
}
|
||||||
|
List<Long> value = entry.getValue();
|
||||||
if (null != authURDMap.get(key)) {
|
if (null != value) {
|
||||||
Map<String, Object> dataMap = filterData(authURDMap.get(key), shareNodes);
|
Map<String, Object> dataMap = filterData(value, shareNodes);
|
||||||
List<Long> newIds = (List<Long>) dataMap.get("add");
|
List<Long> newIds = (List<Long>) dataMap.get("add");
|
||||||
for (int i = 0; i < newIds.size(); i++) {
|
for (int i = 0; i < newIds.size(); i++) {
|
||||||
Long id = newIds.get(i);
|
Long id = newIds.get(i);
|
||||||
@ -340,8 +340,29 @@ public class ShareService {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public void removeShares(PanelShareRemoveRequest removeRequest) {
|
public void removeShares(PanelShareRemoveRequest removeRequest) {
|
||||||
|
String panelId = removeRequest.getPanelId();
|
||||||
extPanelShareMapper.removeShares(removeRequest);
|
extPanelShareMapper.removeShares(removeRequest);
|
||||||
|
AuthURD sharedAuthURD = new AuthURD();
|
||||||
|
List<Long> removeIds = new ArrayList<Long>(){{add(removeRequest.getTargetId());}};
|
||||||
|
buildRedAuthURD(removeRequest.getType(), removeIds, sharedAuthURD);
|
||||||
|
CurrentUserDto user = AuthUtils.getUser();
|
||||||
|
Gson gson = new Gson();
|
||||||
|
PanelGroup panel = panelGroupMapper.selectByPrimaryKey(panelId);
|
||||||
|
|
||||||
|
String msg = panel.getName();
|
||||||
|
|
||||||
|
List<String> msgParam = new ArrayList<>();
|
||||||
|
msgParam.add(panelId);
|
||||||
|
Set<Long> redIds = AuthUtils.userIdsByURD(sharedAuthURD);
|
||||||
|
redIds.forEach(userId -> {
|
||||||
|
if (!user.getUserId().equals(userId)) {
|
||||||
|
DeMsgutil.sendMsg(userId, 3L, user.getNickName() + " 取消分享了仪表板【" + msg + "】,请查收!",
|
||||||
|
gson.toJson(msgParam));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,10 +24,14 @@
|
|||||||
<el-radio :label="false">{{ $t('panel.no') }}</el-radio>
|
<el-radio :label="false">{{ $t('panel.no') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive" :label="$t('panel.auto_play')">
|
<!--This button is currently disabled and temporarily masked-->
|
||||||
<el-switch v-model="streamMediaInfoTemp[streamMediaInfoTemp.videoType].autoplay" size="mini" />
|
<!-- <el-form-item v-if="!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive" :label="$t('panel.auto_play')">-->
|
||||||
</el-form-item>
|
<!-- <el-switch v-model="streamMediaInfoTemp[streamMediaInfoTemp.videoType].autoplay" size="mini" />-->
|
||||||
<el-form-item v-if="!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive" :label="$t('panel.play_frequency')">
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item
|
||||||
|
v-if="!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive"
|
||||||
|
:label="$t('panel.play_frequency')"
|
||||||
|
>
|
||||||
<el-radio-group v-model="streamMediaInfoTemp[streamMediaInfoTemp.videoType].loop">
|
<el-radio-group v-model="streamMediaInfoTemp[streamMediaInfoTemp.videoType].loop">
|
||||||
<el-radio :label="false">{{ $t('panel.play_once') }}</el-radio>
|
<el-radio :label="false">{{ $t('panel.play_once') }}</el-radio>
|
||||||
<el-radio :label="true">{{ $t('panel.play_circle') }}</el-radio>
|
<el-radio :label="true">{{ $t('panel.play_circle') }}</el-radio>
|
||||||
@ -123,7 +127,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.slot-class{
|
.slot-class {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,13 +136,14 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.ellip{
|
|
||||||
|
.ellip {
|
||||||
/*width: 100%;*/
|
/*width: 100%;*/
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
overflow: hidden;/*超出部分隐藏*/
|
overflow: hidden; /*超出部分隐藏*/
|
||||||
white-space: nowrap;/*不换行*/
|
white-space: nowrap; /*不换行*/
|
||||||
text-overflow:ellipsis;/*超出部分文字以...显示*/
|
text-overflow: ellipsis; /*超出部分文字以...显示*/
|
||||||
background-color: #f7f8fa;
|
background-color: #f7f8fa;
|
||||||
color: #3d4d66;
|
color: #3d4d66;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -147,20 +152,21 @@ export default {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-filed{
|
.select-filed {
|
||||||
/*width: 100%;*/
|
/*width: 100%;*/
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
overflow: hidden;/*超出部分隐藏*/
|
overflow: hidden; /*超出部分隐藏*/
|
||||||
white-space: nowrap;/*不换行*/
|
white-space: nowrap; /*不换行*/
|
||||||
text-overflow:ellipsis;/*超出部分文字以...显示*/
|
text-overflow: ellipsis; /*超出部分文字以...显示*/
|
||||||
color: #3d4d66;
|
color: #3d4d66;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
>>>.el-popover{
|
|
||||||
|
> > > .el-popover {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -499,19 +499,22 @@ function movePlayer(item, position) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function removeItem(index) {
|
function removeItem(index) {
|
||||||
const vm = this
|
try {
|
||||||
const item = this.yourList[index]
|
const vm = this
|
||||||
removeItemFromPositionBox(item)
|
const item = this.yourList[index]
|
||||||
|
removeItemFromPositionBox(item)
|
||||||
|
|
||||||
const belowItems = findBelowItems.call(this, item)
|
const belowItems = findBelowItems.call(this, item)
|
||||||
_.forEach(belowItems, function(upItem) {
|
_.forEach(belowItems, function(upItem) {
|
||||||
const canGoUpRows = canItemGoUp(upItem)
|
const canGoUpRows = canItemGoUp(upItem)
|
||||||
if (canGoUpRows > 0) {
|
if (canGoUpRows > 0) {
|
||||||
moveItemUp.call(vm, upItem, canGoUpRows)
|
moveItemUp.call(vm, upItem, canGoUpRows)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.yourList.splice(index, 1, {})
|
||||||
this.yourList.splice(index, 1, {})
|
} catch (e) {
|
||||||
|
console.log('removeItem have some ignore error')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 矩阵设计初始化的时候 预占位,防止编辑仪表板页面,初始化和视图编辑返回时出现组件位置变化问题
|
// 矩阵设计初始化的时候 预占位,防止编辑仪表板页面,初始化和视图编辑返回时出现组件位置变化问题
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<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" class="centered-video" name="centeredVideo" :loop="pOption.loop" controls muted />
|
<video :ref="'player-'+element.id" class="centered-video" name="centeredVideo" :loop="pOption.loop" controls muted />
|
||||||
<div v-if="editMode==='edit'" class="stream-mask" />
|
<div v-if="editMode==='edit'" class="stream-mask edit-mask" />
|
||||||
|
<div v-if="mobileLayoutStatus" class="stream-mask mobile-layout-mask">
|
||||||
|
<span style="opacity: 0.7;">
|
||||||
|
<span style="color: lightgray;">{{ $t('panel.stream_mobile_tips') }}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="info-stream-class">
|
<div v-else class="info-stream-class">
|
||||||
{{ $t('panel.stream_media_add_tips') }}
|
{{ $t('panel.stream_media_add_tips') }}
|
||||||
@ -14,6 +19,7 @@
|
|||||||
import flvjs from 'flv.js'
|
import flvjs from 'flv.js'
|
||||||
import '@/custom-theme.css'
|
import '@/custom-theme.css'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@ -56,7 +62,10 @@ export default {
|
|||||||
},
|
},
|
||||||
player() {
|
player() {
|
||||||
return this.$refs.videoPlayer.player
|
return this.$refs.videoPlayer.player
|
||||||
}
|
},
|
||||||
|
...mapState([
|
||||||
|
'mobileLayoutStatus'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
pOption: {
|
pOption: {
|
||||||
@ -71,8 +80,8 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.initOption()
|
this.initOption()
|
||||||
bus.$on('streamMediaLinksChange-' + this.element.id, () => {
|
bus.$on('streamMediaLinksChange-' + this.element.id, () => {
|
||||||
this.pOption = this.element.streamMediaLinks[this.element.streamMediaLinks.videoType],
|
this.pOption = this.element.streamMediaLinks[this.element.streamMediaLinks.videoType]
|
||||||
this.flvPlayer = null,
|
this.flvPlayer = null
|
||||||
this.videoShow = false
|
this.videoShow = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.videoShow = true
|
this.videoShow = true
|
||||||
@ -80,14 +89,24 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.destroyPlayer()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initOption() {
|
initOption() {
|
||||||
if (flvjs.isSupported() && this.pOption.url) {
|
if (flvjs.isSupported() && this.pOption.url) {
|
||||||
const video = this.$refs.player
|
this.destroyPlayer()
|
||||||
|
const video = this.$refs['player-' + this.element.id]
|
||||||
if (video) {
|
if (video) {
|
||||||
this.flvPlayer = flvjs.createPlayer(this.pOption)
|
|
||||||
this.flvPlayer.attachMediaElement(video)
|
|
||||||
try {
|
try {
|
||||||
|
this.flvPlayer = flvjs.createPlayer(this.pOption,
|
||||||
|
{
|
||||||
|
enableWorker: false, // 不启用分离线程
|
||||||
|
enableStashBuffer: false, // 关闭IO隐藏缓冲区
|
||||||
|
isLive: this.pOption.isLive,
|
||||||
|
lazyLoad: false
|
||||||
|
})
|
||||||
|
this.flvPlayer.attachMediaElement(video)
|
||||||
this.flvPlayer.load()
|
this.flvPlayer.load()
|
||||||
this.flvPlayer.play()
|
this.flvPlayer.play()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -95,6 +114,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
destroyPlayer() {
|
||||||
|
// Destroy
|
||||||
|
if (this.flvPlayer) {
|
||||||
|
this.flvPlayer.pause()
|
||||||
|
this.flvPlayer.destroy()
|
||||||
|
this.flvPlayer = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,8 +163,6 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
height: calc(100% - 60px) !important;
|
height: calc(100% - 60px) !important;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
background-color: #5c5e61;
|
|
||||||
opacity: 0;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
@ -146,5 +171,13 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-mask{
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-layout-mask{
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,8 @@ export const STREAMMEDIALINKS = {
|
|||||||
type: 'flv',
|
type: 'flv',
|
||||||
isLive: false,
|
isLive: false,
|
||||||
cors: true, // 允许跨域
|
cors: true, // 允许跨域
|
||||||
loop: true
|
loop: true,
|
||||||
|
autoplay: false
|
||||||
// url: null // 网络动画视频
|
// url: null // 网络动画视频
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
newView.propValue.viewId = res.data
|
newView.propValue.viewId = res.data
|
||||||
store.commit('addComponent', { component: newView })
|
store.commit('addComponent', { component: newView })
|
||||||
})
|
})
|
||||||
} if (data.type === 'de-tabs') {
|
} else if (data.type === 'de-tabs') {
|
||||||
const sourceAndTargetIds = {}
|
const sourceAndTargetIds = {}
|
||||||
const newCop = deepCopy(data)
|
const newCop = deepCopy(data)
|
||||||
newCop.options.tabList.forEach((item) => {
|
newCop.options.tabList.forEach((item) => {
|
||||||
|
|||||||
@ -1430,6 +1430,7 @@ export default {
|
|||||||
no: 'No',
|
no: 'No',
|
||||||
live_tips: 'User Https First',
|
live_tips: 'User Https First',
|
||||||
stream_media_add_tips: 'Please Add Stream Media Info...',
|
stream_media_add_tips: 'Please Add Stream Media Info...',
|
||||||
|
stream_mobile_tips: 'IOS terminal may not display',
|
||||||
json_params_error: 'Third Party Parameters Parsing Failed. Please Check Whether The Parameters Format Is Correct',
|
json_params_error: 'Third Party Parameters Parsing Failed. Please Check Whether The Parameters Format Is Correct',
|
||||||
inner_padding: 'Inner Padding',
|
inner_padding: 'Inner Padding',
|
||||||
board_radio: 'Board Radio',
|
board_radio: 'Board Radio',
|
||||||
|
|||||||
@ -1431,6 +1431,7 @@ export default {
|
|||||||
no: '否',
|
no: '否',
|
||||||
live_tips: '優先HTTPS鏈接',
|
live_tips: '優先HTTPS鏈接',
|
||||||
stream_media_add_tips: '請點擊添加配置流媒體信息...',
|
stream_media_add_tips: '請點擊添加配置流媒體信息...',
|
||||||
|
stream_mobile_tips: 'IOS终端可能无法显示',
|
||||||
json_params_error: '第三方參數解析失敗,請檢查參數格式是否正確',
|
json_params_error: '第三方參數解析失敗,請檢查參數格式是否正確',
|
||||||
inner_padding: '內邊距',
|
inner_padding: '內邊距',
|
||||||
board_radio: '邊框半徑',
|
board_radio: '邊框半徑',
|
||||||
|
|||||||
@ -1438,6 +1438,7 @@ export default {
|
|||||||
no: '否',
|
no: '否',
|
||||||
live_tips: '优先HTTPS链接',
|
live_tips: '优先HTTPS链接',
|
||||||
stream_media_add_tips: '请点击添加配置流媒体信息...',
|
stream_media_add_tips: '请点击添加配置流媒体信息...',
|
||||||
|
stream_mobile_tips: 'IOS终端可能无法显示',
|
||||||
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
||||||
inner_padding: '内边距',
|
inner_padding: '内边距',
|
||||||
board_radio: '边框半径',
|
board_radio: '边框半径',
|
||||||
|
|||||||
@ -2300,7 +2300,7 @@ export default {
|
|||||||
|
|
||||||
closeEditDsField() {
|
closeEditDsField() {
|
||||||
this.editDsField = false
|
this.editDsField = false
|
||||||
this.initTableField()
|
this.initTableField(this.table.id)
|
||||||
},
|
},
|
||||||
|
|
||||||
// drag
|
// drag
|
||||||
|
|||||||
@ -110,7 +110,9 @@ export default {
|
|||||||
if (!tag || !tag.shareId) return
|
if (!tag || !tag.shareId) return
|
||||||
const param = {
|
const param = {
|
||||||
panelId: this.panelInfo.id,
|
panelId: this.panelInfo.id,
|
||||||
shareId: tag.shareId
|
shareId: tag.shareId,
|
||||||
|
targetId: tag.targetId,
|
||||||
|
type: tag.type
|
||||||
}
|
}
|
||||||
removeShares(param).then(res => {
|
removeShares(param).then(res => {
|
||||||
this.initTagDatas()
|
this.initTagDatas()
|
||||||
|
|||||||
@ -13,9 +13,9 @@
|
|||||||
<share-head />
|
<share-head />
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-else class="panel-design-head">
|
<el-row v-else class="panel-design-head" style="border-bottom: 1px solid;border-bottom-color:#E6E6E6;">
|
||||||
<!--仪表板头部区域-->
|
<!--仪表板头部区域-->
|
||||||
<div style="border-bottom: 1px solid #dfe4ed;height: 100%;">
|
<div style="height: 100%;">
|
||||||
<el-col :span="12" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px">
|
<el-col :span="12" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px">
|
||||||
<span>{{ panelInfo.name || '测试仪表板' }}</span>
|
<span>{{ panelInfo.name || '测试仪表板' }}</span>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user