提交 c5fc275c authored 作者: wangjiahao's avatar wangjiahao

Merge remote-tracking branch 'origin/main' into main

...@@ -36,7 +36,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数 ...@@ -36,7 +36,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
- 环境地址:<https://demo.dataease.io/> - 环境地址:<https://demo.dataease.io/>
- 用户名:demo - 用户名:demo
- 密码:P@ssw0rd123.. - 密码:dataease
## 快速开始 ## 快速开始
...@@ -50,11 +50,11 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st ...@@ -50,11 +50,11 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
``` ```
- [在线文档](https://dataease.io/docs/) - [在线文档](https://dataease.io/docs/)
- [演示视频](https://dataease.oss-cn-hangzhou.aliyuncs.com/video/de-v1-demo.mp4) - [演示视频](https://www.bilibili.com/video/BV1UB4y1K7jA)
## 微信群 ## 微信群
![wechat-group](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png) <img src="https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png" width="156" height="156"/>
## 技术栈 ## 技术栈
......
...@@ -24,8 +24,7 @@ import java.util.Map; ...@@ -24,8 +24,7 @@ import java.util.Map;
@Service @Service
public class PanelLinkService { public class PanelLinkService {
@Value("${public-link-url:http://localhost:9528/link.html?link=}") private static final String baseUrl = "/link.html?link=";
private String baseUrl;
@Value("${public-link-salt:DataEaseLinkSalt}") @Value("${public-link-salt:DataEaseLinkSalt}")
private String salt; private String salt;
......
...@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -117,6 +118,7 @@ public class SysUserService { ...@@ -117,6 +118,7 @@ public class SysUserService {
user.setUpdateTime(now); user.setUpdateTime(now);
deleteUserRoles(user.getUserId());//先删除用户角色关联 deleteUserRoles(user.getUserId());//先删除用户角色关联
saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联 saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联
if (ObjectUtils.isEmpty(user.getDeptId())) user.setDeptId(0L);
return sysUserMapper.updateByPrimaryKeySelective(user); return sysUserMapper.updateByPrimaryKeySelective(user);
} }
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
const { meta, path } = route const { meta, path } = route
// if set path, the sidebar will highlight the path you set // if set path, the sidebar will highlight the path you set
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu // return meta.activeMenu
} }
// 如果是首页,首页高亮 // 如果是首页,首页高亮
if (path === '/panel') { if (path === '/panel') {
......
...@@ -9,27 +9,29 @@ ...@@ -9,27 +9,29 @@
</el-row> </el-row>
<el-divider /> <el-divider />
<!-- <el-row>--> <el-row>
<!-- <el-form>--> <el-form>
<!-- <el-form-item class="form-item">--> <el-form-item class="form-item">
<!-- <el-input--> <el-input
<!-- v-model="search"--> v-model="filterText"
<!-- size="mini"--> size="mini"
<!-- :placeholder="$t('dataset.search')"--> :placeholder="$t('dataset.search')"
<!-- prefix-icon="el-icon-search"--> prefix-icon="el-icon-search"
<!-- clearable--> clearable
<!-- />--> />
<!-- </el-form-item>--> </el-form-item>
<!-- </el-form>--> </el-form>
<!-- </el-row>--> </el-row>
<el-col class="custom-tree-container"> <el-col class="custom-tree-container">
<div class="block" :style="treeStyle"> <div class="block" :style="treeStyle">
<el-tree <el-tree
ref="tree"
:default-expanded-keys="expandedArray" :default-expanded-keys="expandedArray"
:data="data" :data="data"
node-key="id" node-key="id"
:expand-on-click-node="false" :expand-on-click-node="false"
:filter-node-method="filterNode"
@node-click="nodeClick" @node-click="nodeClick"
@node-expand="nodeExpand" @node-expand="nodeExpand"
@node-collapse="nodeCollapse" @node-collapse="nodeCollapse"
...@@ -76,30 +78,35 @@ ...@@ -76,30 +78,35 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<el-tree
:data="tableData" <el-col class="custom-tree-container">
node-key="id" <div class="block" :style="treeStyle">
:expand-on-click-node="true" <el-tree
class="tree-list" :data="tableData"
highlight-current node-key="id"
@node-click="sceneClick" :expand-on-click-node="true"
> class="tree-list"
<span slot-scope="{ node, data }" class="custom-tree-node-list"> highlight-current
<span :id="data.id" style="display: flex;flex: 1;width: 0;"> @node-click="sceneClick"
<span> >
<svg-icon v-if="data.type === 'db'" icon-class="ds-db" class="ds-icon-db" /> <span slot-scope="{ node, data }" class="custom-tree-node-list">
<svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" /> <span :id="data.id" style="display: flex;flex: 1;width: 0;">
<svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" /> <span>
<svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" /> <svg-icon v-if="data.type === 'db'" icon-class="ds-db" class="ds-icon-db" />
</span> <svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" />
<span v-if="data.type === 'db' || data.type === 'sql'"> <svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" />
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation" /></span> <svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" />
<span v-if="data.mode === 1" style="margin-left: 6px"><i class="el-icon-alarm-clock" /></span> </span>
<span v-if="data.type === 'db' || data.type === 'sql'">
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation" /></span>
<span v-if="data.mode === 1" style="margin-left: 6px"><i class="el-icon-alarm-clock" /></span>
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>
</span> </span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span> </el-tree>
</span> </div>
</span> </el-col>
</el-tree>
</el-col> </el-col>
</el-col> </el-col>
</template> </template>
...@@ -172,7 +179,8 @@ export default { ...@@ -172,7 +179,8 @@ export default {
treeStyle: this.fixHeight ? { treeStyle: this.fixHeight ? {
height: '200px', height: '200px',
overflow: 'auto' overflow: 'auto'
} : {} } : {},
filterText: ''
} }
}, },
computed: {}, computed: {},
...@@ -198,6 +206,9 @@ export default { ...@@ -198,6 +206,9 @@ export default {
} else { } else {
this.tableData = JSON.parse(JSON.stringify(this.tables)) this.tableData = JSON.parse(JSON.stringify(this.tables))
} }
},
filterText(val) {
this.$refs.tree.filter(val)
} }
}, },
mounted() { mounted() {
...@@ -208,6 +219,10 @@ export default { ...@@ -208,6 +219,10 @@ export default {
this.kettleState() this.kettleState()
}, },
methods: { methods: {
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
kettleState() { kettleState() {
isKettleRunning(false).then(res => { isKettleRunning(false).then(res => {
this.kettleRunning = res.data this.kettleRunning = res.data
...@@ -270,6 +285,7 @@ export default { ...@@ -270,6 +285,7 @@ export default {
nodeClick(data, node) { nodeClick(data, node) {
// if (data.type === 'scene') { // if (data.type === 'scene') {
this.filterText = ''
this.sceneMode = true this.sceneMode = true
this.currGroup = data this.currGroup = data
this.tableTree() this.tableTree()
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
import { isKettleRunning, post } from '@/api/dataset/dataset' import { isKettleRunning, post } from '@/api/dataset/dataset'
export default { export default {
name: 'DatasetGroupSelector', name: 'DatasetGroupSelectorTree',
props: { props: {
customType: { customType: {
type: Array, type: Array,
......
...@@ -66,6 +66,11 @@ export default { ...@@ -66,6 +66,11 @@ export default {
defaultForm: { enablePwd: false, pwd: null, uri: null } defaultForm: { enablePwd: false, pwd: null, uri: null }
} }
}, },
computed: {
origin() {
return window.location.origin
}
},
created() { created() {
this.form = this.defaultForm this.form = this.defaultForm
this.currentGenerate() this.currentGenerate()
...@@ -76,7 +81,7 @@ export default { ...@@ -76,7 +81,7 @@ export default {
const { valid, enablePwd, pwd, uri } = res.data const { valid, enablePwd, pwd, uri } = res.data
this.valid = valid this.valid = valid
this.form.enablePwd = enablePwd this.form.enablePwd = enablePwd
this.form.uri = uri this.form.uri = uri ? (this.origin + uri) : uri
// 返回的密码是共钥加密后的 所以展示需要私钥解密一波 // 返回的密码是共钥加密后的 所以展示需要私钥解密一波
pwd && (this.form.pwd = decrypt(pwd)) pwd && (this.form.pwd = decrypt(pwd))
}) })
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<div class="span-header"> <div class="span-header">
<div class="bi-text"> <div class="bi-text">
{{ $t('pblink.key_pwd') }} <span style="text-align: center;">{{ $t('pblink.key_pwd') }}
</span>
</div> </div>
</div> </div>
......
...@@ -90,8 +90,7 @@ export default { ...@@ -90,8 +90,7 @@ export default {
'configuration.host': [{ required: true, message: this.$t('datasource.please_input_host'), trigger: 'change' }], 'configuration.host': [{ required: true, message: this.$t('datasource.please_input_host'), trigger: 'change' }],
'configuration.port': [{ required: true, message: this.$t('datasource.please_input_port'), trigger: 'change' }] 'configuration.port': [{ required: true, message: this.$t('datasource.please_input_port'), trigger: 'change' }]
}, },
allTypes: [{ name: 'mysql', label: 'MySQL', type: 'jdbc' }, allTypes: [{ name: 'mysql', label: 'MySQL', type: 'jdbc' }],
{ name: 'sqlServer', label: 'SQL Server', type: 'jdbc' }],
canEdit: false canEdit: false
} }
}, },
......
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
save() { save() {
this.$refs.createUserForm.validate(valid => { this.$refs.createUserForm.validate(valid => {
if (valid) { if (valid) {
!this.form.deptId && (this.form.deptId = 0) // !this.form.deptId && (this.form.deptId = 0)
const method = this.formType === 'add' ? addUser : editUser const method = this.formType === 'add' ? addUser : editUser
method(this.form).then(res => { method(this.form).then(res => {
this.$success(this.$t('commons.save_success')) this.$success(this.$t('commons.save_success'))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论