Merge branch 'master' of github.com:gcpaas/DataRoom

main
zhu.yawen 1 year ago
commit 79698cc18c

@ -3,6 +3,8 @@ package com.gccloud.dataroom.core.module.file.dto;
import com.gccloud.common.dto.SearchDTO; import com.gccloud.common.dto.SearchDTO;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class FileSearchDTO extends SearchDTO { public class FileSearchDTO extends SearchDTO {
@ -17,4 +19,10 @@ public class FileSearchDTO extends SearchDTO {
private String extension; private String extension;
/**
*
*/
private List<String> extensionList;
} }

@ -31,6 +31,9 @@ public class DataRoomFileServiceImpl extends ServiceImpl<DataRoomFileDao, DataRo
LambdaQueryWrapper<DataRoomFileEntity> queryWrapper = QueryWrapperUtils.wrapperLike(new LambdaQueryWrapper(), searchDTO.getSearchKey(), DataRoomFileEntity::getOriginalName); LambdaQueryWrapper<DataRoomFileEntity> queryWrapper = QueryWrapperUtils.wrapperLike(new LambdaQueryWrapper(), searchDTO.getSearchKey(), DataRoomFileEntity::getOriginalName);
queryWrapper.eq(StringUtils.isNotBlank(searchDTO.getModule()), DataRoomFileEntity::getModule, searchDTO.getModule()); queryWrapper.eq(StringUtils.isNotBlank(searchDTO.getModule()), DataRoomFileEntity::getModule, searchDTO.getModule());
queryWrapper.eq(StringUtils.isNotBlank(searchDTO.getExtension()), DataRoomFileEntity::getExtension, searchDTO.getExtension()); queryWrapper.eq(StringUtils.isNotBlank(searchDTO.getExtension()), DataRoomFileEntity::getExtension, searchDTO.getExtension());
if (searchDTO.getExtensionList() != null && searchDTO.getExtensionList().size() > 0) {
queryWrapper.in(DataRoomFileEntity::getExtension, searchDTO.getExtensionList());
}
queryWrapper.orderByDesc(DataRoomFileEntity::getCreateDate); queryWrapper.orderByDesc(DataRoomFileEntity::getCreateDate);
return page(searchDTO, queryWrapper); return page(searchDTO, queryWrapper);
} }

@ -1,6 +1,6 @@
{ {
"name": "@gcpaas/data-room-ui", "name": "@gcpaas/data-room-ui",
"version": "1.0.1-2023101101-Alpha", "version": "1.0.1-2023101301-Alpha",
"description": "自定义大屏", "description": "自定义大屏",
"author": "gcpaas", "author": "gcpaas",
"license": "MIT", "license": "MIT",

@ -71,15 +71,6 @@
<SettingTitle>位置</SettingTitle> <SettingTitle>位置</SettingTitle>
<div class="lc-field-body"> <div class="lc-field-body">
<PosWhSetting :config="config" /> <PosWhSetting :config="config" />
</div>
<SettingTitle v-if="config.border"></SettingTitle>
<div class="lc-field-body">
<BorderSetting
v-if="config.border"
label-width="100px"
:config="config.border"
:bigTitle='config.title'
/>
</div> </div>
<SettingTitle>旋转</SettingTitle> <SettingTitle>旋转</SettingTitle>
<div class="lc-field-body"> <div class="lc-field-body">

@ -51,12 +51,12 @@
<SettingTitle>基础</SettingTitle> <SettingTitle>基础</SettingTitle>
<div class="lc-field-body"> <div class="lc-field-body">
<el-form-item <el-form-item
label="标题字体大小" label="数字大小"
label-width="100px" label-width="100px"
> >
<el-input <el-input
v-model="config.customize.fontSize" v-model="config.customize.fontSize"
placeholder="请输入标题字体大小" placeholder="请输入数字大小"
clearable clearable
> >
<template slot="append"> <template slot="append">
@ -65,17 +65,17 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="标题字体权重" label="数字权重"
label-width="100px" label-width="100px"
> >
<el-input-number <el-input-number
v-model="config.customize.fontWeight" v-model="config.customize.fontWeight"
class="bs-el-input-number" class="bs-el-input-number"
placeholder="请输入标题字体权重" placeholder="请输入数字权重"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="标题字体类型" label="数字类型"
label-width="100px" label-width="100px"
> >
<el-select <el-select
@ -91,7 +91,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<TextGradient v-model="config.customize.color" /> <TextGradient
v-model="config.customize.color"
label="数字"
/>
</div> </div>
</el-form> </el-form>
</div> </div>

@ -51,7 +51,7 @@ const customConfig = {
perspective: 0 perspective: 0
}, },
customize: { customize: {
title: '数字标签占位符', title: '1234',
fontSize: 20, fontSize: 20,
fontWeight: 700, fontWeight: 700,
fontFamily: '', // 字体类型 fontFamily: '', // 字体类型

@ -51,12 +51,12 @@
<SettingTitle>基础</SettingTitle> <SettingTitle>基础</SettingTitle>
<div class="lc-field-body"> <div class="lc-field-body">
<el-form-item <el-form-item
label="标题字体大小" label="文字大小"
label-width="100px" label-width="100px"
> >
<el-input <el-input
v-model="config.customize.fontSize" v-model="config.customize.fontSize"
placeholder="请输入标题字体大小" placeholder="请输入文字大小"
clearable clearable
> >
<template slot="append"> <template slot="append">
@ -65,17 +65,17 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="标题字体权重" label="文字权重"
label-width="100px" label-width="100px"
> >
<el-input-number <el-input-number
v-model="config.customize.fontWeight" v-model="config.customize.fontWeight"
class="bs-el-input-number" class="bs-el-input-number"
placeholder="请输入标题字体权重" placeholder="请输入文字权重"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="标题字体类型" label="文字类型"
label-width="100px" label-width="100px"
> >
<el-select <el-select

@ -13,13 +13,33 @@
ref="tree" ref="tree"
:data="treeData" :data="treeData"
:indent="0" :indent="0"
:props="{ label: 'label', children: 'children' }" :props="defaultProps"
:default-expand-all="true" :default-expand-all="true"
:highlight-current="true" :highlight-current="true"
:expand-on-click-node="false" :expand-on-click-node="false"
class="bs-el-tree tree-box" class="bs-el-tree tree-box"
@node-click="handleNodeClick" @node-click="handleNodeClick"
>
<template #default="{ node, data }">
<!-- Check if the node is a top-level node -->
<span
v-if="node.level === 1"
:class="{ 'disabled': node.disabled}"
>
<i
class="el-icon-folder"
/> />
{{ data.label }}
</span>
<span
v-else
:class="{ 'disabled': node.disabled}"
style="padding-left: 20px"
>
{{ data.label }}
</span>
</template>
</el-tree>
</div> </div>
<div class="right-box"> <div class="right-box">
<div class="codemirror-wrap"> <div class="codemirror-wrap">
@ -96,7 +116,8 @@ export default {
hintOptions: { hintOptions: {
completeSingle: true completeSingle: true
} }
} },
defaultProps: { label: 'label', children: 'children' }
} }
}, },
computed: { computed: {
@ -113,13 +134,15 @@ export default {
return { return {
label: field, label: field,
code: item, code: item,
value: `dataset.${item}[0].${field}` value: `dataset.${item}[0].${field}`,
disabled: item.includes(this.config.code)
} }
}) })
list.push({ list.push({
label: item, label: item,
code: item, code: item,
value: `dataset.${item}`, value: `dataset.${item}`,
disabled: item.includes(this.config.code),
children children
}) })
} }
@ -127,7 +150,8 @@ export default {
list.push({ list.push({
label: item, label: item,
code: item, code: item,
value: `computedDatas.${item}` value: `computedDatas.${item}`,
disabled: item.includes(this.config.code)
}) })
} }
return list return list
@ -154,9 +178,9 @@ export default {
}, },
// //
handleNodeClick (node, data, nodeObj) { handleNodeClick (node, data, nodeObj) {
console.log(node, data, nodeObj)
const str = node.value const str = node.value
const code = node.code const code = node.code
if (node.disabled) return
this.$refs.codemirrorRef.codemirror.setValue(this.currentConfig.expression + ' + ' + str) this.$refs.codemirrorRef.codemirror.setValue(this.currentConfig.expression + ' + ' + str)
// expressionCodes // expressionCodes
if (this.currentConfig.expressionCodes && Array.isArray(this.currentConfig.expressionCodes)) { if (this.currentConfig.expressionCodes && Array.isArray(this.currentConfig.expressionCodes)) {
@ -217,5 +241,8 @@ export default {
} }
} }
} }
.disabled{
cursor: not-allowed;
color: #666666;
}
</style> </style>

@ -2,7 +2,7 @@
<template> <template>
<div class="bs-gradual-wrap"> <div class="bs-gradual-wrap">
<el-form-item <el-form-item
label="文字渐变方向" :label="`${customLabel}渐变方向`"
label-width="100px" label-width="100px"
> >
<el-radio-group <el-radio-group
@ -18,7 +18,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="文字渐变颜色" :label="`${customLabel}渐变颜色`"
label-width="100px" label-width="100px"
> >
<div class="color-picker-box"> <div class="color-picker-box">
@ -51,6 +51,10 @@ export default {
colors: { colors: {
type: String, type: String,
default: '' default: ''
},
label: {
type: String,
default: ''
} }
}, },
data () { data () {
@ -65,6 +69,9 @@ export default {
computed: { computed: {
newColors () { newColors () {
return cloneDeep(this.colors) return cloneDeep(this.colors)
},
customLabel () {
return this.label || '文字'
} }
}, },
watch: { watch: {

@ -25,7 +25,7 @@
v-model="code" v-model="code"
class="bs-el-select" class="bs-el-select"
popper-class="bs-el-select" popper-class="bs-el-select"
placeholder="请选择类型" placeholder="请选择分组"
clearable clearable
@change="reSearch" @change="reSearch"
> >
@ -71,7 +71,7 @@
> >
<div class="big-screen-card-img"> <div class="big-screen-card-img">
<el-image <el-image
:src="screen.url" :src="getCoverPicture(screen.url)"
fit="contain" fit="contain"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
> >
@ -147,8 +147,9 @@
</template> </template>
<script> <script>
import { pageMixins } from 'data-room-ui/js/mixins/page' import { pageMixins } from 'data-room-ui/js/mixins/page'
// import _ from 'lodash'
import cloneDeep from 'lodash/cloneDeep' import cloneDeep from 'lodash/cloneDeep'
import { getFileUrl } from 'data-room-ui/js/utils/file'
export default { export default {
name: 'SourceDialog', name: 'SourceDialog',
mixins: [pageMixins], mixins: [pageMixins],
@ -161,7 +162,8 @@ export default {
code: '', code: '',
focus: -1, focus: -1,
list: [], list: [],
searchKey: '' searchKey: '',
imgExtends: ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'ico']
} }
}, },
computed: { computed: {
@ -200,7 +202,8 @@ export default {
module: this.code, module: this.code,
current: this.current, current: this.current,
size: this.size, size: this.size,
extension: '', //
extensionList: this.imgExtends,
searchKey: this.searchKey searchKey: this.searchKey
}) })
.then((data) => { .then((data) => {
@ -218,7 +221,15 @@ export default {
this.options = data this.options = data
}) })
.catch(() => { }) .catch(() => { })
} },
/**
* 获取文件访问地址,如果是相对路径则拼接上文件访问前缀地址
* @param url
* @returns {*}
*/
getCoverPicture (url) {
return getFileUrl(url)
},
} }
} }
</script> </script>

Loading…
Cancel
Save