forked from github/dataease
Merge branch 'dev' into pr@dev_memory_component
This commit is contained in:
commit
6b5bc5fedd
@ -121,6 +121,8 @@ public class ChartViewService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChartViewService.class);
|
||||
|
||||
private static final String START_END_SEPARATOR = "_START_END_SPLIT";
|
||||
|
||||
|
||||
//默认使用非公平
|
||||
private ReentrantLock lock = new ReentrantLock();
|
||||
@ -705,6 +707,9 @@ public class ChartViewService {
|
||||
List<SqlVariableDetails> sqlVariables = new Gson().fromJson(table.getSqlVariableDetails(), new TypeToken<List<SqlVariableDetails>>() {
|
||||
}.getType());
|
||||
for (String parameter : Optional.ofNullable(request.getParameters()).orElse(new ArrayList<>())) {
|
||||
if (StringUtils.endsWith(parameter, START_END_SEPARATOR)) {
|
||||
parameter = parameter.split(START_END_SEPARATOR)[0];
|
||||
}
|
||||
if (sqlVariables.stream().map(SqlVariableDetails::getVariableName).collect(Collectors.toList()).contains(parameter)) {
|
||||
hasParameters = true;
|
||||
}
|
||||
@ -1707,8 +1712,8 @@ public class ChartViewService {
|
||||
String paramName = null;
|
||||
if (parameterArray.length > 1) {
|
||||
paramName = parameterArray[1];
|
||||
if (paramName.contains("_START_END_SPLIT")) {
|
||||
String[] paramNameArray = paramName.split("_START_END_SPLIT");
|
||||
if (paramName.contains(START_END_SEPARATOR)) {
|
||||
String[] paramNameArray = paramName.split(START_END_SEPARATOR);
|
||||
paramName = paramNameArray[0];
|
||||
isEndParam = true;
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ public class ChartDataBuild {
|
||||
switch (columnPermissionItem.getDesensitizationRule().getCustomBuiltInRule()) {
|
||||
case RetainBeforeMAndAfterN:
|
||||
if (StringUtils.isEmpty(originStr) || originStr.length() < columnPermissionItem.getDesensitizationRule().getM() + columnPermissionItem.getDesensitizationRule().getN() + 1) {
|
||||
desensitizationStr = String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getM(), "X")) + "***" + Collections.nCopies(columnPermissionItem.getDesensitizationRule().getN(), "X");
|
||||
desensitizationStr = String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getM(), "X")) + "***" + String.join("", Collections.nCopies(columnPermissionItem.getDesensitizationRule().getN(), "X"));
|
||||
} else {
|
||||
desensitizationStr = StringUtils.substring(originStr, 0, columnPermissionItem.getDesensitizationRule().getM() - 1) + "***" + StringUtils.substring(originStr, originStr.length() - columnPermissionItem.getDesensitizationRule().getN(), originStr.length() - 1);
|
||||
}
|
||||
@ -1030,7 +1030,7 @@ public class ChartDataBuild {
|
||||
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, columnPermissionItem.getDesensitizationRule().getN()) + "***";
|
||||
break;
|
||||
}
|
||||
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getN() && originStr.length() < columnPermissionItem.getDesensitizationRule().getN()) {
|
||||
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getM() && originStr.length() < columnPermissionItem.getDesensitizationRule().getN()) {
|
||||
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, originStr.length());
|
||||
}
|
||||
break;
|
||||
|
@ -41,7 +41,14 @@ ALTER TABLE `panel_group`
|
||||
ADD COLUMN `panel_sort` bigint(13) NULL COMMENT '排序' AFTER `watermark_open`;
|
||||
|
||||
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`
|
||||
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;
|
||||
|
@ -653,7 +653,12 @@ export default {
|
||||
},
|
||||
clearPanelLinkage(param) {
|
||||
if (param.viewId === 'all' || param.viewId === this.element.propValue.viewId) {
|
||||
this.$refs[this.element.propValue.id].reDrawView()
|
||||
try {
|
||||
this.$refs[this.element.propValue.id].reDrawView()
|
||||
} catch (e) {
|
||||
console.error('reDrawView-error:', this.element.propValue.id)
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
bindPluginEvent() {
|
||||
|
@ -651,6 +651,7 @@ export default {
|
||||
input_password: 'Please input a password',
|
||||
input_phone: 'Please enter the phone number',
|
||||
input_roles: 'Please select role',
|
||||
user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter!',
|
||||
special_characters_are_not_supported: 'Special characters are not supported',
|
||||
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number',
|
||||
email_format_is_incorrect: 'The mailbox format is incorrect',
|
||||
@ -806,6 +807,7 @@ export default {
|
||||
edite_organization: 'Edit organization'
|
||||
},
|
||||
system_parameter_setting: {
|
||||
edit_success: 'Edit success',
|
||||
mailbox_service_settings: 'Mail Setting',
|
||||
test_connection: 'Test connection',
|
||||
SMTP_host: 'SMTP Host',
|
||||
|
@ -652,6 +652,7 @@ export default {
|
||||
input_roles: '請選擇角色',
|
||||
select_users: '請選擇用戶',
|
||||
select_gender: '請選擇性別',
|
||||
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!',
|
||||
special_characters_are_not_supported: '不支持特殊字符',
|
||||
mobile_number_format_is_incorrect: '手機號碼格式不正確',
|
||||
email_format_is_incorrect: '郵箱格式不正確',
|
||||
@ -806,6 +807,7 @@ export default {
|
||||
edite_organization: '編輯組織'
|
||||
},
|
||||
system_parameter_setting: {
|
||||
edit_success: '編輯成功',
|
||||
mailbox_service_settings: '郵件設置',
|
||||
test_connection: '測試連接',
|
||||
SMTP_host: 'SMTP主機',
|
||||
|
@ -651,6 +651,7 @@ export default {
|
||||
input_roles: '请选择角色',
|
||||
select_users: '请选择用户',
|
||||
select_gender: '请选择性别',
|
||||
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!',
|
||||
special_characters_are_not_supported: '不支持特殊字符',
|
||||
mobile_number_format_is_incorrect: '手机号码格式不正确',
|
||||
email_format_is_incorrect: '邮箱格式不正确',
|
||||
@ -805,6 +806,7 @@ export default {
|
||||
edite_organization: '编辑组织'
|
||||
},
|
||||
system_parameter_setting: {
|
||||
edit_success: '编辑成功',
|
||||
mailbox_service_settings: '邮件设置',
|
||||
test_connection: '测试连接',
|
||||
SMTP_host: 'SMTP主机',
|
||||
|
@ -57,6 +57,7 @@ import { reverseColor } from '../chart/common/common'
|
||||
import MapController from './map/MapController.vue'
|
||||
import { mapState } from 'vuex'
|
||||
import bus from '@/utils/bus'
|
||||
|
||||
export default {
|
||||
name: 'ChartComponent',
|
||||
components: {
|
||||
@ -180,16 +181,18 @@ export default {
|
||||
this.currentSeriesId = seriesId
|
||||
},
|
||||
reDrawView() {
|
||||
this.myChart.dispatchAction({
|
||||
type: 'unselect',
|
||||
seriesIndex: this.linkageActiveParam.seriesIndex,
|
||||
name: this.linkageActiveParam.name
|
||||
})
|
||||
this.myChart.dispatchAction({
|
||||
type: 'downplay',
|
||||
seriesIndex: this.linkageActiveParam.seriesIndex,
|
||||
name: this.linkageActiveParam.name
|
||||
})
|
||||
if (this.linkageActiveParam) {
|
||||
this.myChart.dispatchAction({
|
||||
type: 'unselect',
|
||||
seriesIndex: this.linkageActiveParam.seriesIndex,
|
||||
name: this.linkageActiveParam.name
|
||||
})
|
||||
this.myChart.dispatchAction({
|
||||
type: 'downplay',
|
||||
seriesIndex: this.linkageActiveParam.seriesIndex,
|
||||
name: this.linkageActiveParam.name
|
||||
})
|
||||
}
|
||||
this.linkageActiveParam = null
|
||||
},
|
||||
linkageActive() {
|
||||
|
@ -13,7 +13,10 @@
|
||||
style="margin-left: 4px;cursor: pointer;font-size: 14px;"
|
||||
/>
|
||||
<div>
|
||||
<ul class="de-ul">
|
||||
<ul
|
||||
class="de-ul"
|
||||
style="padding: 0px !important;"
|
||||
>
|
||||
<li
|
||||
v-for="(node, i) in layerOption"
|
||||
:key="node.id"
|
||||
|
@ -830,8 +830,9 @@ export default {
|
||||
this.quotaChange()
|
||||
})
|
||||
dateformats(this.param.id).then((response) => {
|
||||
const children = (response?.data || []).map(ele => ({ label: ele.dateformat, value: ele.dateformat }))
|
||||
children.push({ label: '自定义', value: 'custom' })
|
||||
|
||||
const children = (response?.data || []).map(ele => ({ label: ele.dateformat + ( ele.desc !== null ? ('(' + ele.desc) + ')' : ""), value: ele.dateformat }))
|
||||
children.push({ label: this.$t('commons.custom'), value: 'custom' })
|
||||
this.dateformats = children
|
||||
})
|
||||
},
|
||||
|
@ -77,7 +77,7 @@
|
||||
:label="dialogTitleLabel"
|
||||
prop="name"
|
||||
>
|
||||
<el-input v-model="templateEditForm.name" />
|
||||
<el-input v-model="templateEditForm.name"/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('app_template.app_group_icon')"
|
||||
@ -95,7 +95,7 @@
|
||||
:http-request="upload"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<i class="el-icon-plus" />
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
<el-dialog
|
||||
top="25vh"
|
||||
@ -154,7 +154,7 @@
|
||||
import TemplateList from './component/TemplateList'
|
||||
import TemplateItem from './component/TemplateItem'
|
||||
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 msgCfm from '@/components/msgCfm/index'
|
||||
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
||||
@ -364,7 +364,7 @@ export default {
|
||||
: 'edit_template'
|
||||
}`
|
||||
)
|
||||
this.originName = this.templateEditForm.label
|
||||
this.originName = this.templateEditForm.name
|
||||
} else {
|
||||
this.fileList = []
|
||||
this.dialogTitle = this.$t('panel.add_app_category')
|
||||
@ -398,7 +398,7 @@ export default {
|
||||
this.openMessageSuccess(
|
||||
`system_parameter_setting.${
|
||||
this.templateEditForm.id
|
||||
? 'rename_succeeded'
|
||||
? 'edit_success'
|
||||
: 'added_successfully'
|
||||
}`
|
||||
)
|
||||
|
@ -43,7 +43,7 @@
|
||||
v-if="marketActiveTab==='apply_logs'"
|
||||
class="main-log-area template-main"
|
||||
>
|
||||
<app-template-log class="log-area" />
|
||||
<app-template-log class="log-area"/>
|
||||
</el-row>
|
||||
</el-row>
|
||||
|
||||
@ -186,13 +186,15 @@ export default {
|
||||
const erd = elementResizeDetectorMaker()
|
||||
const templateMainDom = document.getElementById('template-main')
|
||||
// 监听div变动事件
|
||||
erd.listenTo(templateMainDom, element => {
|
||||
_this.$nextTick(() => {
|
||||
const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
|
||||
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
|
||||
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33
|
||||
if (templateMainDom) {
|
||||
erd.listenTo(templateMainDom, element => {
|
||||
_this.$nextTick(() => {
|
||||
const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
|
||||
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
|
||||
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
applyNew(item) {
|
||||
|
@ -284,11 +284,16 @@
|
||||
@click="changeRightDrawOpen(false)"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<span style="font-weight: bold;font-size: 14px;margin-left: 40px;line-height:40px"
|
||||
<span v-if="curComponent&&!curComponent.auxiliaryMatrix"
|
||||
style="font-weight: bold;font-size: 14px;margin-left: 40px;line-height:40px"
|
||||
>{{ $t('panel.position_adjust') }}</span>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<position-adjust v-if="curComponent&&!curComponent.auxiliaryMatrix"/>
|
||||
<div v-else class="view-selected-message-class">
|
||||
<span style="font-size: 14px;margin-left: 10px;font-weight: bold;line-height: 20px"
|
||||
>{{ $t('panel.select_view') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -174,7 +174,7 @@
|
||||
/>
|
||||
</span>
|
||||
<span v-if="data.nodeType === 'folder'">
|
||||
<svg-icon icon-class="scene" />
|
||||
<svg-icon icon-class="scene"/>
|
||||
</span>
|
||||
<span
|
||||
:class="data.status"
|
||||
@ -211,7 +211,7 @@
|
||||
<el-dropdown-item
|
||||
:command="beforeClickEdit('folder', 'new', data, node)"
|
||||
>
|
||||
<svg-icon icon-class="scene" />
|
||||
<svg-icon icon-class="scene"/>
|
||||
<span style="margin-left: 5px">{{ $t('panel.groupAdd') }}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
@ -334,7 +334,7 @@
|
||||
:label="$t('commons.name')"
|
||||
prop="name"
|
||||
>
|
||||
<el-input v-model="groupForm.name" />
|
||||
<el-input v-model="groupForm.name"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div
|
||||
@ -345,8 +345,8 @@
|
||||
size="mini"
|
||||
@click="close()"
|
||||
>{{
|
||||
$t('panel.cancel')
|
||||
}}
|
||||
$t('panel.cancel')
|
||||
}}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -422,8 +422,8 @@
|
||||
size="mini"
|
||||
@click="closeMoveGroup()"
|
||||
>{{
|
||||
$t('dataset.cancel')
|
||||
}}
|
||||
$t('dataset.cancel')
|
||||
}}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="groupMoveConfirmDisabled"
|
||||
@ -729,6 +729,7 @@ export default {
|
||||
optType: 'rename',
|
||||
titlePre: this.$t('commons.edit'),
|
||||
panelInfo: {
|
||||
pid: param.data.pid,
|
||||
id: param.data.id,
|
||||
name: param.data.name,
|
||||
nodeType: param.type
|
||||
|
@ -130,20 +130,22 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="folderSelectShow=false"
|
||||
>{{ $t('commons.cancel') }}</el-button>
|
||||
>{{ $t('commons.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
:disabled="!panelForm.name || !panelForm.pid"
|
||||
@click="apply"
|
||||
>{{ $t('commons.confirm') }}</el-button>
|
||||
>{{ $t('commons.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchMarket, getCategories } from '@/api/templateMarket'
|
||||
import { getCategories, searchMarket } from '@/api/templateMarket'
|
||||
import TemplateMarketItem from '@/views/panel/templateMarket/component/TemplateMarketItem'
|
||||
import { groupTree, panelSave } from '@/api/panel/panel'
|
||||
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
|
||||
@ -199,9 +201,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
marketActiveTab() {
|
||||
this.initTemplateShow()
|
||||
@ -217,13 +217,15 @@ export default {
|
||||
const erd = elementResizeDetectorMaker()
|
||||
const templateMainDom = document.getElementById('template-main')
|
||||
// 监听div变动事件
|
||||
erd.listenTo(templateMainDom, element => {
|
||||
_this.$nextTick(() => {
|
||||
const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
|
||||
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
|
||||
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33
|
||||
if (templateMainDom) {
|
||||
erd.listenTo(templateMainDom, element => {
|
||||
_this.$nextTick(() => {
|
||||
const curSeparator = Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)
|
||||
_this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%'
|
||||
_this.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMarketTemplate() {
|
||||
@ -322,100 +324,107 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.template-main{
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 0 12px 24px 12px;
|
||||
height: calc(100vh - 190px)!important;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
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;
|
||||
}
|
||||
.template-main {
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 0 12px 24px 12px;
|
||||
height: calc(100vh - 190px) !important;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-color: var(--ContentBG, #ffffff);
|
||||
}
|
||||
|
||||
.topbar-icon-active {
|
||||
cursor: pointer;
|
||||
transition: .1s;
|
||||
border-radius: 3px;
|
||||
font-size: 22px;
|
||||
background-color: rgb(245, 245, 245);
|
||||
.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 {
|
||||
cursor: pointer;
|
||||
transition: .1s;
|
||||
border-radius: 3px;
|
||||
font-size: 22px;
|
||||
background-color: rgb(245, 245, 245);
|
||||
|
||||
&:active {
|
||||
color: #000;
|
||||
border-color: #3a8ee6;
|
||||
background-color: red;
|
||||
outline: 0;
|
||||
}
|
||||
color: #000;
|
||||
border-color: #3a8ee6;
|
||||
background-color: red;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(31, 35, 41, 0.1);
|
||||
color: #3a8ee6;
|
||||
}
|
||||
background-color: rgba(31, 35, 41, 0.1);
|
||||
color: #3a8ee6;
|
||||
}
|
||||
.custom-position {
|
||||
height: 80vh;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
flex-flow: row nowrap;
|
||||
color: #646A73;
|
||||
font-weight: 400;
|
||||
}
|
||||
.outer-body{
|
||||
width: 100%;
|
||||
height: calc(100vh - 56px);
|
||||
background-color: var(--MainBG,#f5f6f7);
|
||||
}
|
||||
|
||||
.custom-position {
|
||||
height: 80vh;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
flex-flow: row nowrap;
|
||||
color: #646A73;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.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 .el-form-item__label {
|
||||
width: 100% !important;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
::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: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;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -63,14 +63,14 @@
|
||||
<img :src="imgDefault">
|
||||
</div>
|
||||
</el-image>
|
||||
<p class="title">{{ ele.descript }}</p>
|
||||
<p class="title">{{ ele.name }}</p>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="ele.descript"
|
||||
placement="top"
|
||||
>
|
||||
<p class="tips">{{ ele.name }}</p>
|
||||
<p class="tips">{{ ele.descript }}</p>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="info-left">
|
||||
|
@ -264,8 +264,8 @@ export default {
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
pattern: '^[^\u4e00-\u9fa5]+$',
|
||||
message: this.$t('user.special_characters_are_not_supported'),
|
||||
pattern: '^[a-zA-Z][a-zA-Z0-9\._-]*$',
|
||||
message: this.$t('user.user_name_pattern_error'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
@ -281,11 +281,8 @@ export default {
|
||||
message: this.$t('commons.input_limit', [2, 50]),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('user.special_characters_are_not_supported'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
{ required: true, validator: this.validateNickname, trigger: 'blur' }
|
||||
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
@ -411,6 +408,17 @@ export default {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
validateNickname(rule, value, callback) {
|
||||
const pattern = "[\\u00A0\\s\"`~!@#$%^&*()+=|{}':;',\\[\\]<>/?~!@#¥%……&*()——+|{}【】‘;:”“'。,、?]"
|
||||
const regep = new RegExp(pattern)
|
||||
|
||||
if (regep.test(value)) {
|
||||
const msg = this.$t('user.special_characters_are_not_supported')
|
||||
callback(new Error(msg))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.formType = 'add'
|
||||
this.form = Object.assign({}, JSON.parse(JSON.stringify(this.defaultForm)))
|
||||
|
Loading…
Reference in New Issue
Block a user