forked from github/dataease
Merge branch 'main' of github.com:dataease/dataease into main
This commit is contained in:
commit
72bf2bcf5a
@ -60,10 +60,18 @@ public class F2CRealm extends AuthorizingRealm {
|
||||
CacheUtils.get("lic_info", "lic");
|
||||
}catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
throw new AuthenticationException("lic error");
|
||||
}
|
||||
String token = (String) auth.getCredentials();
|
||||
// 解密获得username,用于和数据库进行对比
|
||||
TokenInfo tokenInfo = JWTUtils.tokenInfoByToken(token);
|
||||
TokenInfo tokenInfo = null;
|
||||
String token = null;
|
||||
try {
|
||||
token = (String) auth.getCredentials();
|
||||
// 解密获得username,用于和数据库进行对比
|
||||
tokenInfo = JWTUtils.tokenInfoByToken(token);
|
||||
}catch (Exception e) {
|
||||
throw new AuthenticationException(e);
|
||||
}
|
||||
|
||||
Long userId = tokenInfo.getUserId();
|
||||
String username = tokenInfo.getUsername();
|
||||
if (username == null) {
|
||||
|
@ -141,7 +141,11 @@ public class PanelGroupService {
|
||||
|
||||
|
||||
public PanelGroupWithBLOBs findOne(String panelId) {
|
||||
return panelGroupMapper.selectByPrimaryKey(panelId);
|
||||
PanelGroupWithBLOBs panelGroupWithBLOBs = panelGroupMapper.selectByPrimaryKey(panelId);
|
||||
if(panelGroupWithBLOBs!=null&& StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())){
|
||||
return panelGroupMapper.selectByPrimaryKey(panelGroupWithBLOBs.getSource());
|
||||
}
|
||||
return panelGroupWithBLOBs;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<de-complex-operator v-model="operator" :label="label" :operators="operators" :size="configSize">
|
||||
<el-input v-model="value" :placeholder="$t('fu.search_bar.please_input')" :size="configSize" v-bind="$attrs" />
|
||||
</de-complex-operator>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ComplexCondition } from 'fit2cloud-ui/src/components/search-bar/model'
|
||||
// import mixins from 'fit2cloud-ui/src/components/search-bar/complex-components/mixins'
|
||||
import DeComplexOperator from './DeComplexOperator.vue'
|
||||
import Cookies from 'js-cookie'
|
||||
export default {
|
||||
name: 'DeComplexInput',
|
||||
components: { DeComplexOperator },
|
||||
// mixins: [mixins],
|
||||
props: {
|
||||
field: String,
|
||||
label: String,
|
||||
defaultOperator: {
|
||||
type: String,
|
||||
default: 'like'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operator: this.defaultOperator,
|
||||
value: '',
|
||||
operators: [{
|
||||
label: 'fu.search_bar.like',
|
||||
value: 'like'
|
||||
}, {
|
||||
label: 'fu.search_bar.eq',
|
||||
value: 'eq'
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
configSize() {
|
||||
return Cookies.get('size') || 'medium'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCondition() {
|
||||
if (!this.value) return
|
||||
const { field, label, operator, operatorLabel, value } = this
|
||||
return new ComplexCondition({ field, label, operator, operatorLabel, value })
|
||||
},
|
||||
init() {
|
||||
this.value = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="fu-operator-component">
|
||||
<div :class="['fu-operator-component__label', 'fu-operator-component__label--' + configSize]">
|
||||
{{ label }}
|
||||
</div>
|
||||
<div class="fu-operator-component__operator">
|
||||
<el-select
|
||||
v-model="value"
|
||||
class="search-operator"
|
||||
:placeholder="$t('fu.search_bar.please_select')"
|
||||
:size="configSize"
|
||||
@change="change"
|
||||
@input="change"
|
||||
>
|
||||
<el-option v-for="o in operators" :key="o.value" :label="$t(o.label)" :value="o.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="fu-operator-component__value">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
export default {
|
||||
name: 'DeComplexOperator',
|
||||
model: {
|
||||
prop: 'operator',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
label: String,
|
||||
operator: String,
|
||||
operators: Array
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: this.operator
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
configSize() {
|
||||
return Cookies.get('size') || 'medium'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
operator: function(v) {
|
||||
this.value = v
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(value) {
|
||||
this.$emit('change', value)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -20,6 +20,7 @@ import widgets from '@/components/widget'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import './utils/dialog'
|
||||
import DeComplexInput from '@/components/business/condition-table/DeComplexInput'
|
||||
|
||||
import '@/components/canvas/custom-component' // 注册自定义组件
|
||||
Vue.config.productionTip = false
|
||||
@ -69,6 +70,7 @@ Vue.use(filter)
|
||||
Vue.use(directives)
|
||||
Vue.use(message)
|
||||
Vue.component('Treeselect', Treeselect)
|
||||
Vue.component('DeComplexInput', DeComplexInput)
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.prototype.hasDataPermission = function(pTarget, pSource) {
|
||||
|
@ -575,9 +575,7 @@ export default {
|
||||
this.activeTree = data.panelType
|
||||
if (data.nodeType === 'panel') {
|
||||
// 加载视图数据
|
||||
// 如果是默认仪表盘 需要查询原仪表板的详细数据
|
||||
const queryPanelId = data.panelType === 'system' ? data.source : data.id
|
||||
findOne(queryPanelId).then(response => {
|
||||
findOne(data.id).then(response => {
|
||||
const componentDatas = JSON.parse(response.data.panelData)
|
||||
componentDatas.forEach(item => {
|
||||
item.filters = (item.filters || [])
|
||||
|
@ -162,7 +162,6 @@
|
||||
<script>
|
||||
import LayoutContent from '@/components/business/LayoutContent'
|
||||
import ComplexTable from '@/components/business/complex-table'
|
||||
|
||||
// import { checkPermission } from '@/utils/permission'
|
||||
import { formatCondition, formatQuickCondition, addOrder, formatOrders } from '@/utils/index'
|
||||
import { PHONE_REGEX } from '@/utils/validate'
|
||||
@ -199,7 +198,7 @@ export default {
|
||||
useComplexSearch: true,
|
||||
quickPlaceholder: '按姓名搜索',
|
||||
components: [
|
||||
{ field: 'nick_name', label: '姓名', component: 'FuComplexInput' },
|
||||
{ field: 'nick_name', label: '姓名', component: 'DeComplexInput' },
|
||||
{
|
||||
field: 'u.enabled',
|
||||
label: '状态',
|
||||
|
Loading…
Reference in New Issue
Block a user