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

# Conflicts:
#	backend/src/main/resources/db/migration/V44__1.17.sql
This commit is contained in:
junjun 2022-11-28 16:04:28 +08:00
commit a86e93ef4e
7 changed files with 130 additions and 111 deletions

View File

@ -41,9 +41,14 @@ ALTER TABLE `panel_group`
ADD COLUMN `panel_sort` bigint(13) NULL COMMENT '排序' AFTER `watermark_open`; ADD COLUMN `panel_sort` bigint(13) NULL COMMENT '排序' AFTER `watermark_open`;
ALTER TABLE `sys_task_email` ALTER TABLE `sys_task_email`
CHANGE COLUMN `content` `content` MEDIUMBLOB NULL DEFAULT NULL COMMENT '内容' ; CHANGE COLUMN `content` `content` MEDIUMBLOB NULL DEFAULT NULL COMMENT '内容';
ALTER TABLE `dataset_table_field` ALTER TABLE `dataset_table_field`
ADD COLUMN `date_format_type` VARCHAR(255) NULL COMMENT '时间格式类型' AFTER `date_format`; ADD COLUMN `date_format_type` VARCHAR(255) NULL COMMENT '时间格式类型' AFTER `date_format`;
update panel_app_template
set name ='JumpServer 运维安全审计大屏'
where id = '3986ba4c-5a8e-11ed-bc5b-cf4a43b3b40c';
update `my_plugin` set `name` = '气泡地图插件' where `plugin_id` = 2; update `my_plugin` set `name` = '气泡地图插件' where `plugin_id` = 2;

View File

@ -807,6 +807,7 @@ export default {
edite_organization: 'Edit organization' edite_organization: 'Edit organization'
}, },
system_parameter_setting: { system_parameter_setting: {
edit_success: 'Edit success',
mailbox_service_settings: 'Mail Setting', mailbox_service_settings: 'Mail Setting',
test_connection: 'Test connection', test_connection: 'Test connection',
SMTP_host: 'SMTP Host', SMTP_host: 'SMTP Host',

View File

@ -807,6 +807,7 @@ export default {
edite_organization: '編輯組織' edite_organization: '編輯組織'
}, },
system_parameter_setting: { system_parameter_setting: {
edit_success: '編輯成功',
mailbox_service_settings: '郵件設置', mailbox_service_settings: '郵件設置',
test_connection: '測試連接', test_connection: '測試連接',
SMTP_host: 'SMTP主機', SMTP_host: 'SMTP主機',

View File

@ -806,6 +806,7 @@ export default {
edite_organization: '编辑组织' edite_organization: '编辑组织'
}, },
system_parameter_setting: { system_parameter_setting: {
edit_success: '编辑成功',
mailbox_service_settings: '邮件设置', mailbox_service_settings: '邮件设置',
test_connection: '测试连接', test_connection: '测试连接',
SMTP_host: 'SMTP主机', SMTP_host: 'SMTP主机',

View File

@ -77,7 +77,7 @@
:label="dialogTitleLabel" :label="dialogTitleLabel"
prop="name" prop="name"
> >
<el-input v-model="templateEditForm.name" /> <el-input v-model="templateEditForm.name"/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('app_template.app_group_icon')" :label="$t('app_template.app_group_icon')"
@ -95,7 +95,7 @@
:http-request="upload" :http-request="upload"
:file-list="fileList" :file-list="fileList"
> >
<i class="el-icon-plus" /> <i class="el-icon-plus"/>
</el-upload> </el-upload>
<el-dialog <el-dialog
top="25vh" top="25vh"
@ -154,7 +154,7 @@
import TemplateList from './component/TemplateList' import TemplateList from './component/TemplateList'
import TemplateItem from './component/TemplateItem' import TemplateItem from './component/TemplateItem'
import TemplateImport from './component/TemplateImport' import TemplateImport from './component/TemplateImport'
import { save, update, templateDelete, find } from '@/api/system/appTemplate' import { find, save, templateDelete, update } from '@/api/system/appTemplate'
import elementResizeDetectorMaker from 'element-resize-detector' import elementResizeDetectorMaker from 'element-resize-detector'
import msgCfm from '@/components/msgCfm/index' import msgCfm from '@/components/msgCfm/index'
import { uploadFileResult } from '@/api/staticResource/staticResource' import { uploadFileResult } from '@/api/staticResource/staticResource'
@ -364,7 +364,7 @@ export default {
: 'edit_template' : 'edit_template'
}` }`
) )
this.originName = this.templateEditForm.label this.originName = this.templateEditForm.name
} else { } else {
this.fileList = [] this.fileList = []
this.dialogTitle = this.$t('panel.add_app_category') this.dialogTitle = this.$t('panel.add_app_category')
@ -398,7 +398,7 @@ export default {
this.openMessageSuccess( this.openMessageSuccess(
`system_parameter_setting.${ `system_parameter_setting.${
this.templateEditForm.id this.templateEditForm.id
? 'rename_succeeded' ? 'edit_success'
: 'added_successfully' : 'added_successfully'
}` }`
) )

View File

@ -43,7 +43,7 @@
v-if="marketActiveTab==='apply_logs'" v-if="marketActiveTab==='apply_logs'"
class="main-log-area template-main" class="main-log-area template-main"
> >
<app-template-log class="log-area" /> <app-template-log class="log-area"/>
</el-row> </el-row>
</el-row> </el-row>
@ -186,13 +186,15 @@ export default {
const erd = elementResizeDetectorMaker() const erd = elementResizeDetectorMaker()
const templateMainDom = document.getElementById('template-main') const templateMainDom = document.getElementById('template-main')
// div // div
erd.listenTo(templateMainDom, element => { if (templateMainDom) {
_this.$nextTick(() => { erd.listenTo(templateMainDom, element => {
const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth) _this.$nextTick(() => {
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%' const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33 _this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33
})
}) })
}) }
}, },
methods: { methods: {
applyNew(item) { applyNew(item) {

View File

@ -130,20 +130,22 @@
<el-button <el-button
size="mini" size="mini"
@click="folderSelectShow=false" @click="folderSelectShow=false"
>{{ $t('commons.cancel') }}</el-button> >{{ $t('commons.cancel') }}
</el-button>
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
:disabled="!panelForm.name || !panelForm.pid" :disabled="!panelForm.name || !panelForm.pid"
@click="apply" @click="apply"
>{{ $t('commons.confirm') }}</el-button> >{{ $t('commons.confirm') }}
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-row> </el-row>
</template> </template>
<script> <script>
import { searchMarket, getCategories } from '@/api/templateMarket' import { getCategories, searchMarket } from '@/api/templateMarket'
import TemplateMarketItem from '@/views/panel/templateMarket/component/TemplateMarketItem' import TemplateMarketItem from '@/views/panel/templateMarket/component/TemplateMarketItem'
import { groupTree, panelSave } from '@/api/panel/panel' import { groupTree, panelSave } from '@/api/panel/panel'
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel' import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
@ -199,9 +201,7 @@ export default {
} }
} }
}, },
computed: { computed: {},
},
watch: { watch: {
marketActiveTab() { marketActiveTab() {
this.initTemplateShow() this.initTemplateShow()
@ -217,13 +217,15 @@ export default {
const erd = elementResizeDetectorMaker() const erd = elementResizeDetectorMaker()
const templateMainDom = document.getElementById('template-main') const templateMainDom = document.getElementById('template-main')
// div // div
erd.listenTo(templateMainDom, element => { if (templateMainDom) {
_this.$nextTick(() => { erd.listenTo(templateMainDom, element => {
const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth) _this.$nextTick(() => {
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%' const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33 _this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33
})
}) })
}) }
}, },
methods: { methods: {
initMarketTemplate() { initMarketTemplate() {
@ -322,100 +324,107 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.template-main{ .template-main {
text-align: center; text-align: center;
border-radius: 4px; border-radius: 4px;
padding: 0 12px 24px 12px; padding: 0 12px 24px 12px;
height: calc(100vh - 190px)!important; height: calc(100vh - 190px) !important;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
background-color: var(--ContentBG,#ffffff); background-color: var(--ContentBG, #ffffff);
} }
.market-main{
padding:24px
}
.title-left{
float: left;
font-size: 20px;
font-weight: 500;
line-height: 28px;
color: var(--TextPrimary, #1F2329);
}
.title-right{
float: right;
width: 320px;
}
.dialog-footer-self{
text-align: right;
}
.search-button-self{
text-align: left;
padding-left: 10px;
}
.topbar-icon-active { .market-main {
cursor: pointer; padding: 24px
transition: .1s; }
border-radius: 3px;
font-size: 22px; .title-left {
background-color: rgb(245, 245, 245); float: left;
font-size: 20px;
font-weight: 500;
line-height: 28px;
color: var(--TextPrimary, #1F2329);
}
.title-right {
float: right;
width: 320px;
}
.dialog-footer-self {
text-align: right;
}
.search-button-self {
text-align: left;
padding-left: 10px;
}
.topbar-icon-active {
cursor: pointer;
transition: .1s;
border-radius: 3px;
font-size: 22px;
background-color: rgb(245, 245, 245);
&:active { &:active {
color: #000; color: #000;
border-color: #3a8ee6; border-color: #3a8ee6;
background-color: red; background-color: red;
outline: 0; outline: 0;
} }
&:hover { &:hover {
background-color: rgba(31, 35, 41, 0.1); background-color: rgba(31, 35, 41, 0.1);
color: #3a8ee6; color: #3a8ee6;
}
} }
.custom-position { }
height: 80vh;
flex: 1; .custom-position {
display: flex; height: 80vh;
align-items: center; flex: 1;
justify-content: space-between; display: flex;
font-size: 14px; align-items: center;
flex-flow: row nowrap; justify-content: space-between;
color: #646A73; font-size: 14px;
font-weight: 400; flex-flow: row nowrap;
} color: #646A73;
.outer-body{ font-weight: 400;
width: 100%; }
height: calc(100vh - 56px);
background-color: var(--MainBG,#f5f6f7); .outer-body {
width: 100%;
height: calc(100vh - 56px);
background-color: var(--MainBG, #f5f6f7);
}
.market-dialog-css {
::v-deep .el-form-item__label {
width: 100% !important;
text-align: left;
} }
.market-dialog-css{ ::v-deep
::v-deep .el-form-item__label { .el-form-item.is-required:not(.is-no-asterisk)
width: 100% !important; > .el-form-item__label:before {
text-align: left; display: none;
}
::v-deep
.el-form-item.is-required:not(.is-no-asterisk)
> .el-form-item__label:before {
display: none;
}
::v-deep
.el-form-item.is-required:not(.is-no-asterisk)
> .el-form-item__label::after {
content: "*";
color: #f54a45;
margin-left: 2px;
}
::v-deep .el-form-item__content {
margin-left: 0 !important;
}
::v-deep .vue-treeselect__input{
vertical-align:middle;
}
} }
::v-deep
.el-form-item.is-required:not(.is-no-asterisk)
> .el-form-item__label::after {
content: "*";
color: #f54a45;
margin-left: 2px;
}
::v-deep .el-form-item__content {
margin-left: 0 !important;
}
::v-deep .vue-treeselect__input {
vertical-align: middle;
}
}
</style> </style>