Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
c5fc275c77
@ -36,7 +36,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
|
||||
|
||||
- 环境地址:<https://demo.dataease.io/>
|
||||
- 用户名:demo
|
||||
- 密码:P@ssw0rd123..
|
||||
- 密码:dataease
|
||||
|
||||
## 快速开始
|
||||
|
||||
@ -50,11 +50,11 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
|
||||
```
|
||||
|
||||
- [在线文档](https://dataease.io/docs/)
|
||||
- [演示视频](https://dataease.oss-cn-hangzhou.aliyuncs.com/video/de-v1-demo.mp4)
|
||||
- [演示视频](https://www.bilibili.com/video/BV1UB4y1K7jA)
|
||||
|
||||
## 微信群
|
||||
|
||||

|
||||
<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;
|
||||
@Service
|
||||
public class PanelLinkService {
|
||||
|
||||
@Value("${public-link-url:http://localhost:9528/link.html?link=}")
|
||||
private String baseUrl;
|
||||
private static final String baseUrl = "/link.html?link=";
|
||||
|
||||
@Value("${public-link-salt:DataEaseLinkSalt}")
|
||||
private String salt;
|
||||
|
||||
@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@ -117,6 +118,7 @@ public class SysUserService {
|
||||
user.setUpdateTime(now);
|
||||
deleteUserRoles(user.getUserId());//先删除用户角色关联
|
||||
saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联
|
||||
if (ObjectUtils.isEmpty(user.getDeptId())) user.setDeptId(0L);
|
||||
return sysUserMapper.updateByPrimaryKeySelective(user);
|
||||
}
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ export default {
|
||||
const { meta, path } = route
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu
|
||||
// return meta.activeMenu
|
||||
}
|
||||
// 如果是首页,首页高亮
|
||||
if (path === '/panel') {
|
||||
|
||||
@ -9,27 +9,29 @@
|
||||
</el-row>
|
||||
<el-divider />
|
||||
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-form>-->
|
||||
<!-- <el-form-item class="form-item">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="search"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :placeholder="$t('dataset.search')"-->
|
||||
<!-- prefix-icon="el-icon-search"-->
|
||||
<!-- clearable-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row>
|
||||
<el-form>
|
||||
<el-form-item class="form-item">
|
||||
<el-input
|
||||
v-model="filterText"
|
||||
size="mini"
|
||||
:placeholder="$t('dataset.search')"
|
||||
prefix-icon="el-icon-search"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-col class="custom-tree-container">
|
||||
<div class="block" :style="treeStyle">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:default-expanded-keys="expandedArray"
|
||||
:data="data"
|
||||
node-key="id"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
@node-click="nodeClick"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
@ -76,30 +78,35 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-tree
|
||||
:data="tableData"
|
||||
node-key="id"
|
||||
:expand-on-click-node="true"
|
||||
class="tree-list"
|
||||
highlight-current
|
||||
@node-click="sceneClick"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node-list">
|
||||
<span :id="data.id" style="display: flex;flex: 1;width: 0;">
|
||||
<span>
|
||||
<svg-icon v-if="data.type === 'db'" icon-class="ds-db" class="ds-icon-db" />
|
||||
<svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" />
|
||||
<svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" />
|
||||
<svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" />
|
||||
|
||||
<el-col class="custom-tree-container">
|
||||
<div class="block" :style="treeStyle">
|
||||
<el-tree
|
||||
:data="tableData"
|
||||
node-key="id"
|
||||
:expand-on-click-node="true"
|
||||
class="tree-list"
|
||||
highlight-current
|
||||
@node-click="sceneClick"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node-list">
|
||||
<span :id="data.id" style="display: flex;flex: 1;width: 0;">
|
||||
<span>
|
||||
<svg-icon v-if="data.type === 'db'" icon-class="ds-db" class="ds-icon-db" />
|
||||
<svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" />
|
||||
<svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" />
|
||||
<svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" />
|
||||
</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 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>
|
||||
</el-tree>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</template>
|
||||
@ -172,7 +179,8 @@ export default {
|
||||
treeStyle: this.fixHeight ? {
|
||||
height: '200px',
|
||||
overflow: 'auto'
|
||||
} : {}
|
||||
} : {},
|
||||
filterText: ''
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
@ -198,6 +206,9 @@ export default {
|
||||
} else {
|
||||
this.tableData = JSON.parse(JSON.stringify(this.tables))
|
||||
}
|
||||
},
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -208,6 +219,10 @@ export default {
|
||||
this.kettleState()
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
kettleState() {
|
||||
isKettleRunning(false).then(res => {
|
||||
this.kettleRunning = res.data
|
||||
@ -270,6 +285,7 @@ export default {
|
||||
|
||||
nodeClick(data, node) {
|
||||
// if (data.type === 'scene') {
|
||||
this.filterText = ''
|
||||
this.sceneMode = true
|
||||
this.currGroup = data
|
||||
this.tableTree()
|
||||
|
||||
@ -113,7 +113,7 @@
|
||||
import { isKettleRunning, post } from '@/api/dataset/dataset'
|
||||
|
||||
export default {
|
||||
name: 'DatasetGroupSelector',
|
||||
name: 'DatasetGroupSelectorTree',
|
||||
props: {
|
||||
customType: {
|
||||
type: Array,
|
||||
|
||||
@ -66,6 +66,11 @@ export default {
|
||||
defaultForm: { enablePwd: false, pwd: null, uri: null }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
origin() {
|
||||
return window.location.origin
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form = this.defaultForm
|
||||
this.currentGenerate()
|
||||
@ -76,7 +81,7 @@ export default {
|
||||
const { valid, enablePwd, pwd, uri } = res.data
|
||||
this.valid = valid
|
||||
this.form.enablePwd = enablePwd
|
||||
this.form.uri = uri
|
||||
this.form.uri = uri ? (this.origin + uri) : uri
|
||||
// 返回的密码是共钥加密后的 所以展示需要私钥解密一波
|
||||
pwd && (this.form.pwd = decrypt(pwd))
|
||||
})
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
|
||||
<div class="span-header">
|
||||
<div class="bi-text">
|
||||
{{ $t('pblink.key_pwd') }}
|
||||
<span style="text-align: center;">{{ $t('pblink.key_pwd') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -90,8 +90,7 @@ export default {
|
||||
'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' }]
|
||||
},
|
||||
allTypes: [{ name: 'mysql', label: 'MySQL', type: 'jdbc' },
|
||||
{ name: 'sqlServer', label: 'SQL Server', type: 'jdbc' }],
|
||||
allTypes: [{ name: 'mysql', label: 'MySQL', type: 'jdbc' }],
|
||||
canEdit: false
|
||||
}
|
||||
},
|
||||
|
||||
@ -288,7 +288,7 @@ export default {
|
||||
save() {
|
||||
this.$refs.createUserForm.validate(valid => {
|
||||
if (valid) {
|
||||
!this.form.deptId && (this.form.deptId = 0)
|
||||
// !this.form.deptId && (this.form.deptId = 0)
|
||||
const method = this.formType === 'add' ? addUser : editUser
|
||||
method(this.form).then(res => {
|
||||
this.$success(this.$t('commons.save_success'))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user