Merge branch 'dev' into pr@dev@feat_login_limit

This commit is contained in:
fit2cloud-chenyw 2022-09-20 16:49:07 +08:00 committed by GitHub
commit 32ad6c7613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 136 additions and 32 deletions

View File

@ -99,9 +99,20 @@ ALTER TABLE `sys_task_email`
ADD COLUMN `reci_users` varchar(255) NULL COMMENT '接收人账号' AFTER `conditions`;
DROP TABLE IF EXISTS `sys_login_limit`;
CREATE TABLE `sys_login_limit` (
`login_type` int(8) NOT NULL,
`username` varchar(255) NOT NULL,
`record_time` bigint(13) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
UPDATE `sys_menu` SET `pid` = 0, `sub_count` = 0, `type` = 1, `title` = '模板市场', `name` = 'template-market', `component` = 'panel/templateMarket/index', `menu_sort` = 5, `icon` = 'dashboard', `path` = '/templateMarket', `i_frame` = 0, `cache` = 0, `hidden` = 0, `permission` = 'template-market:read', `create_by` = NULL, `update_by` = NULL, `create_time` = NULL, `update_time` = 1620444227389 WHERE `menu_id` = 202;
INSERT INTO `sys_auth` (`id`, `auth_source`, `auth_source_type`, `auth_target`, `auth_target_type`, `auth_time`, `auth_details`, `auth_user`, `update_time`, `copy_from`, `copy_id`) VALUES ('e6b2cebf-02d8-4d46-833c-56fb07febb0f', '202', 'menu', '2', 'user', 1663661210626, NULL, 'admin', NULL, NULL, NULL);
INSERT INTO `sys_auth` (`id`, `auth_source`, `auth_source_type`, `auth_target`, `auth_target_type`, `auth_time`, `auth_details`, `auth_user`, `update_time`, `copy_from`, `copy_id`) VALUES ('f4e07708-26f1-4f42-9a4a-8e6dae63353c', '202', 'menu', '2', 'role', 1663661388831, NULL, 'admin', NULL, NULL, NULL);
INSERT INTO `sys_auth_detail` (`id`, `auth_id`, `privilege_name`, `privilege_type`, `privilege_value`, `privilege_extend`, `remark`, `create_user`, `create_time`, `update_time`, `copy_from`, `copy_id`) VALUES ('2e9f56e5-38bb-11ed-8383-0242ac130005', 'e6b2cebf-02d8-4d46-833c-56fb07febb0f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1663661211000, NULL, NULL, NULL);
INSERT INTO `sys_auth_detail` (`id`, `auth_id`, `privilege_name`, `privilege_type`, `privilege_value`, `privilege_extend`, `remark`, `create_user`, `create_time`, `update_time`, `copy_from`, `copy_id`) VALUES ('2e9f5ca1-38bb-11ed-8383-0242ac130005', 'e6b2cebf-02d8-4d46-833c-56fb07febb0f', 'i18n_auth_use', 1, 0, 'use', '基础权限-使用', 'admin', 1663661211000, NULL, NULL, NULL);
INSERT INTO `sys_auth_detail` (`id`, `auth_id`, `privilege_name`, `privilege_type`, `privilege_value`, `privilege_extend`, `remark`, `create_user`, `create_time`, `update_time`, `copy_from`, `copy_id`) VALUES ('98d77463-38bb-11ed-8383-0242ac130005', 'f4e07708-26f1-4f42-9a4a-8e6dae63353c', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1663661389000, NULL, NULL, NULL);
INSERT INTO `sys_auth_detail` (`id`, `auth_id`, `privilege_name`, `privilege_type`, `privilege_value`, `privilege_extend`, `remark`, `create_user`, `create_time`, `update_time`, `copy_from`, `copy_id`) VALUES ('98d77856-38bb-11ed-8383-0242ac130005', 'f4e07708-26f1-4f42-9a4a-8e6dae63353c', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1663661389000, NULL, NULL, NULL);

View File

@ -253,7 +253,7 @@ export default {
},
// componentData mapState
componentDataInfo() {
return this.componentDataShow
return this.componentDataShow||[]
},
...mapState([
'isClickComponent'

View File

@ -130,7 +130,7 @@ export default {
},
paste() {
this.$store.commit('paste', true)
this.$store.commit('paste', false)
this.$store.commit('recordSnapshot', 'paste')
},

View File

@ -109,7 +109,7 @@
@onJumpClick="jumpClick"
/>
<div style="position: absolute;left: 8px;bottom:8px;">
<drill-path :drill-filters="drillFilters" @onDrillJump="drillJump" />
<drill-path :drill-filters="drillFilters" :theme-style="element.commonBackground" @onDrillJump="drillJump" />
</div>
</div>
</template>
@ -137,7 +137,7 @@ import { adaptCurTheme, customAttrTrans, customStyleTrans, recursionTransObj } f
import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
import PluginCom from '@/views/system/plugin/PluginCom'
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
import { viewPropsSave } from '@/api/chart/chart'
import { viewEditSave, viewPropsSave } from '@/api/chart/chart'
import { checkAddHttp } from '@/utils/urlUtils'
import DeRichTextView from '@/components/canvas/custom-component/DeRichTextView'
import Vue from 'vue'
@ -582,6 +582,15 @@ export default {
this.chart['position'] = this.inTab ? 'tab' : 'panel'
//
this.panelViewDetailsInfo[id] = JSON.stringify(this.chart)
if (this.element.needAdaptor) {
const customStyleObj = JSON.parse(this.chart.customStyle)
const customAttrObj = JSON.parse(this.chart.customAttr)
adaptCurTheme(customStyleObj, customAttrObj)
this.chart.customStyle = JSON.stringify(customStyleObj)
this.chart.customAttr = JSON.stringify(customAttrObj)
viewEditSave(this.panelInfo.id, { id: this.chart.id, customStyle: this.chart.customStyle, customAttr: this.chart.customAttr })
this.$store.commit('adaptorStatusDisable', this.element.id)
}
this.sourceCustomAttrStr = this.chart.customAttr
this.sourceCustomStyleStr = this.chart.customStyle
this.chart.drillFields = this.chart.drillFields ? JSON.parse(this.chart.drillFields) : []

View File

@ -4,6 +4,8 @@ import generateID from '@/components/canvas/utils/generateID'
import { deepCopy } from '@/components/canvas/utils/utils'
import { chartBatchCopy, chartCopy } from '@/api/chart/chart'
import { uuid } from 'vue-uuid'
import { adaptCurThemeCommonStyle } from '@/components/canvas/utils/style'
import Vue from "vue";
export default {
state: {
@ -85,7 +87,7 @@ export default {
state.isCut = false
},
paste(state, isMouse) {
paste(state, needAdaptor) {
if (!state.copyData) {
toast('请选择组件')
return
@ -103,12 +105,13 @@ export default {
if (data.type === 'view') {
chartCopy(data.propValue.viewId, state.panel.panelInfo.id).then(res => {
const newView = deepCopy(data)
Vue.set(newView, 'needAdaptor', needAdaptor)
newView.id = uuid.v1()
newView.propValue.viewId = res.data
if (newView.filters && newView.filters.length) {
newView.filters = []
}
needAdaptor && adaptCurThemeCommonStyle(newView)
store.commit('addComponent', { component: newView })
})
} else if (data.type === 'de-tabs') {
@ -120,17 +123,20 @@ export default {
const newViewId = uuid.v1()
sourceAndTargetIds[item.content.propValue.viewId] = newViewId
item.content.propValue.viewId = newViewId
Vue.set(item.content, 'needAdaptor', needAdaptor)
if (item.content.filters && item.content.filters.length) {
item.content.filters = []
}
}
})
chartBatchCopy({ 'sourceAndTargetIds': sourceAndTargetIds }, state.panel.panelInfo.id).then((rsp) => {
needAdaptor && adaptCurThemeCommonStyle(newCop)
store.commit('addComponent', { component: newCop })
})
} else {
const newCop = deepCopy(data)
newCop.id = uuid.v1()
needAdaptor && adaptCurThemeCommonStyle(newCop)
store.commit('addComponent', { component: newCop })
}
if (state.isCut) {

View File

@ -8,7 +8,7 @@
:collapse-tags="showNumber"
:clearable="!element.options.attrs.multiple"
:multiple="element.options.attrs.multiple"
:placeholder="$t(element.options.attrs.placeholder)"
:placeholder="$t(element.options.attrs.placeholder) + placeholderSuffix"
:popper-append-to-body="inScreen"
:size="size"
:filterable="true"
@ -110,6 +110,11 @@ export default {
customStyle() {
const { brColor, wordColor, innerBgColor } = this.element.style
return { brColor, wordColor, innerBgColor }
},
placeholderSuffix() {
const i18nKey = this.element.options.attrs.multiple ? 'panel.multiple_choice' : 'panel.single_choice'
const i18nValue = this.$t(i18nKey)
return '(' + i18nValue + ')'
}
},

View File

@ -132,6 +132,7 @@ export default {
},
commons: {
unlock: 'Unlock',
unlock_success: 'Unlock success',
@ -2344,7 +2345,7 @@ export default {
},
denumberselect: {
label: 'Number selector',
placeholder: 'Please select'
placeholder: 'Please select number'
},
deinputsearch: {
label: 'Text search',
@ -2352,7 +2353,7 @@ export default {
},
detextselect: {
label: 'Text selector',
placeholder: 'Please select'
placeholder: 'Please select text'
},
detextselectTree: {
label: 'Tree selector',
@ -2569,8 +2570,8 @@ export default {
no_apps: 'No apps',
app_group_icon: 'Cover icon',
app_name: 'Application name',
search_by_keyword:'Search by keyword',
apply_logs:'Apply logs',
search_by_keyword: 'Search by keyword',
apply_logs: 'Apply logs',
app_group_delete_tips: 'Are you sure to delete this application category?',
app_group_delete_content: 'After deletion, all application templates in this category will also be deleted.'
}

View File

@ -132,6 +132,7 @@ export default {
},
commons: {
unlock: '解鎖',
unlock_success: '解鎖成功',
@ -2345,7 +2346,7 @@ export default {
},
denumberselect: {
label: '數字下拉',
placeholder: '請選擇'
placeholder: '請選擇數字'
},
deinputsearch: {
label: '文本搜索',
@ -2353,7 +2354,7 @@ export default {
},
detextselect: {
label: '文本下拉',
placeholder: '請選擇'
placeholder: '請選擇文本'
},
detextselectTree: {
label: '下拉樹',
@ -2570,8 +2571,8 @@ export default {
no_apps: '暫無應用',
app_group_icon: '封面圖標',
app_name: '應用名稱',
search_by_keyword:'通過關鍵字搜索',
apply_logs:'應用記錄',
search_by_keyword: '通過關鍵字搜索',
apply_logs: '應用記錄',
app_group_delete_tips: '確定刪除該應用分類嗎?',
app_group_delete_content: '刪除後,該分類中所有的應用模闆也將被刪除。'
}

View File

@ -131,9 +131,11 @@ export default {
default_login: '普通登录'
},
commons: {
unlock: '解锁',
unlock_success: '解锁成功',
uninstall:'卸载',
no_result: '没有找到相关内容',
manage_member: '管理成员',
confirm_remove_cancel: '确定删除该角色吗?',
@ -2343,7 +2345,7 @@ export default {
},
denumberselect: {
label: '数字下拉',
placeholder: '请选择'
placeholder: '请选择数字'
},
deinputsearch: {
label: '文本搜索',
@ -2351,7 +2353,7 @@ export default {
},
detextselect: {
label: '文本下拉',
placeholder: '请选择'
placeholder: '请选择文本'
},
detextselectTree: {
label: '下拉树',
@ -2568,8 +2570,8 @@ export default {
no_apps: '暂无应用',
app_group_icon: '封面图标',
app_name: '应用名称',
search_by_keyword:'通过关键字搜索',
apply_logs:'应用记录',
search_by_keyword: '通过关键字搜索',
apply_logs: '应用记录',
app_group_delete_tips: '确定删除该应用分类吗?',
app_group_delete_content: '删除后,该分类中所有的应用模板也将被删除。'
}

View File

@ -708,6 +708,13 @@ const data = {
},
setInEditorStatus(state, status) {
state.isInEditor = status
},
adaptorStatusDisable(state,componentId) {
state.componentData.forEach(item => {
if(item.id === componentId){
item.needAdaptor = false
}
})
}
},
modules: {

View File

@ -607,14 +607,6 @@ div:focus {
padding-bottom: 0 !important;
}
// .el-collapse-item__header {
// height: 34px !important;
// line-height: 34px !important;
// padding: 0 0 0 6px !important;
// font-size: 12px !important;
// font-weight: 400 !important;
// }
.blackTheme .el-submenu__title {
color: var(--TextPrimary);
}

View File

@ -80,7 +80,7 @@
</el-col>
<el-col :span="20" class="main-row">
<el-row v-for="(value, key) in BackgroundShowMap" :key="key">
<!-- <el-col :span="24"><span>{{ key }}</span> </el-col>-->
<el-col
v-for="item in value"
:key="item.id"
@ -132,7 +132,7 @@
import { queryBackground } from '@/api/background/background'
import BackgroundItem from '@/views/background/BackgroundItem'
import { mapState } from 'vuex'
import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
import { COLOR_PANEL } from '@/views/chart/chart/chart'
import { uploadFileResult } from '@/api/staticResource/staticResource'
import { COMMON_BACKGROUND_NONE } from '@/components/canvas/custom-component/component-list'

View File

@ -220,6 +220,15 @@ export default {
let themeStyle = null
if (this.themeStyle) {
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
if (themeStyle && themeStyle.commonBackground) {
const viewBGColor = themeStyle.commonBackground.color
if (viewBGColor !== '#FFFFFF') {
const reverseValue = reverseColor(viewBGColor)
this.buttonTextColor = reverseValue
} else {
this.buttonTextColor = null
}
}
if (themeStyle && themeStyle.backgroundColorSelect) {
const panelColor = themeStyle.color
if (panelColor !== '#FFFFFF') {
@ -310,6 +319,15 @@ export default {
let themeStyle = null
if (this.themeStyle) {
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
if (themeStyle && themeStyle.commonBackground) {
const viewBGColor = themeStyle.commonBackground.color
if (viewBGColor !== '#FFFFFF') {
const reverseValue = reverseColor(viewBGColor)
this.buttonTextColor = reverseValue
} else {
this.buttonTextColor = null
}
}
if (themeStyle && themeStyle.backgroundColorSelect) {
const panelColor = themeStyle.color
if (panelColor !== '#FFFFFF') {

View File

@ -3247,4 +3247,12 @@ span {
padding-left: 0!important;
}
.view-panel-row ::v-deep .el-collapse-item__header{
height: 34px !important;
line-height: 34px !important;
padding: 0 0 0 6px !important;
font-size: 12px !important;
font-weight: 400 !important;
}
</style>

View File

@ -1,34 +1,78 @@
<template>
<div v-if="drillFilters && drillFilters.length > 0">
<el-breadcrumb separator-class="el-icon-arrow-right" class="drill-style">
<el-breadcrumb-item class="drill-item" @click.native="drillJump(0)">{{ $t('commons.all') }}</el-breadcrumb-item>
<el-breadcrumb-item v-for="(filter,index) in drillFilters" :key="index" class="drill-item" @click.native="drillJump(index + 1)">{{ filter.value[0] }}</el-breadcrumb-item>
<el-breadcrumb-item class="drill-item" @click.native="drillJump(0)">
<span :style="{'color': textColor}">{{ $t('commons.all') }}</span>
</el-breadcrumb-item>
<el-breadcrumb-item v-for="(filter,index) in drillFilters" :key="index" class="drill-item" @click.native="drillJump(index + 1)">
<span :style="{'color': textColor}">{{ filter.value[0] }}</span>
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
<script>
import { reverseColor } from '@/views/chart/chart/common/common'
export default {
name: 'DrillPath',
props: {
drillFilters: {
type: Array,
default: () => []
},
themeStyle: {
type: Object,
required: false,
default: null
}
},
data() {
return {
textColor: null
}
},
watch: {
'themeStyle.commonBackground.color'() {
this.loadThemeStyle()
},
'themeStyle.color'() {
this.loadThemeStyle()
}
},
mounted() {
},
created() {
this.loadThemeStyle()
},
methods: {
drillJump(index) {
if (index < this.drillFilters.length) {
this.$emit('onDrillJump', index)
}
},
loadThemeStyle() {
let themeStyle = null
if (this.themeStyle) {
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
if (themeStyle && themeStyle.commonBackground) {
const viewBGColor = themeStyle.commonBackground.color
if (viewBGColor !== '#FFFFFF') {
const reverseValue = reverseColor(viewBGColor)
this.textColor = reverseValue
} else {
this.textColor = null
}
}
if (themeStyle && themeStyle.backgroundColorSelect) {
const panelColor = themeStyle.color
if (panelColor !== '#FFFFFF') {
const reverseValue = reverseColor(panelColor)
this.textColor = reverseValue
} else {
this.textColor = null
}
}
}
}
}
}