Merge branch 'v1.13' of github.com:dataease/dataease into v1.13
This commit is contained in:
commit
efa2c059dd
@ -168,12 +168,15 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
contentStr = new String(content, "UTF-8");
|
||||
}
|
||||
|
||||
List<File> files = null;
|
||||
String viewIds = emailTemplateDTO.getViewIds();
|
||||
List<String> viewIdList = Arrays.asList(viewIds.split(",")).stream().map(s -> (s.trim())).collect(Collectors.toList());
|
||||
|
||||
PermissionProxy proxy = new PermissionProxy();
|
||||
proxy.setUserId(user.getUserId());
|
||||
List<File> files = viewExportExcel.export(panelId, viewIdList, proxy);
|
||||
if (StringUtils.isNotBlank(viewIds)) {
|
||||
List<String> viewIdList = Arrays.asList(viewIds.split(",")).stream().filter(StringUtils::isNotBlank).map(s -> (s.trim())).collect(Collectors.toList());
|
||||
PermissionProxy proxy = new PermissionProxy();
|
||||
proxy.setUserId(user.getUserId());
|
||||
files = viewExportExcel.export(panelId, viewIdList, proxy);
|
||||
}
|
||||
|
||||
emailService.sendWithImageAndFiles(recipients, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
|
||||
success(taskInstance);
|
||||
|
||||
@ -517,6 +517,7 @@ public class ChartViewService {
|
||||
// 仪表板有参数不使用缓存
|
||||
if (!cache || CollectionUtils.isNotEmpty(requestList.getFilter())
|
||||
|| CollectionUtils.isNotEmpty(requestList.getLinkageFilters())
|
||||
|| CollectionUtils.isNotEmpty(requestList.getOuterParamsFilters())
|
||||
|| CollectionUtils.isNotEmpty(requestList.getDrill()) || CollectionUtils.isNotEmpty(rowPermissionsTree) || fields.size() != columnPermissionFields.size()) {
|
||||
data = datasourceProvider.getData(datasourceRequest);
|
||||
} else {
|
||||
@ -911,6 +912,7 @@ public class ChartViewService {
|
||||
// 仪表板有参数不使用缓存
|
||||
if (!cache || CollectionUtils.isNotEmpty(requestList.getFilter())
|
||||
|| CollectionUtils.isNotEmpty(requestList.getLinkageFilters())
|
||||
|| CollectionUtils.isNotEmpty(requestList.getOuterParamsFilters())
|
||||
|| CollectionUtils.isNotEmpty(requestList.getDrill()) || CollectionUtils.isNotEmpty(rowPermissionsTree) || fields.size() != columnPermissionFields.size()) {
|
||||
data = datasourceProvider.getData(datasourceRequest);
|
||||
} else {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package io.dataease.service.chart;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -39,6 +40,9 @@ public class ViewExportExcel {
|
||||
|
||||
@DePermissionProxy(paramIndex = 2)
|
||||
public List<File> export(String panelId, List<String> viewIds, PermissionProxy proxy) throws Exception {
|
||||
if (CollectionUtils.isEmpty(viewIds)) {
|
||||
return null;
|
||||
}
|
||||
PanelGroupService panelGroupService = SpringContextUtil.getBean(PanelGroupService.class);
|
||||
|
||||
PanelGroupDTO panelDto = panelGroupService.findOne(panelId);
|
||||
|
||||
@ -881,9 +881,9 @@ public class ChartDataBuild {
|
||||
// 上面乱序了
|
||||
List<ChartViewFieldDTO> fields = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(fieldMap.get("xAxis")))fields.addAll(fieldMap.get("xAxis"));
|
||||
if (CollectionUtils.isNotEmpty(fieldMap.get("yAxis")))fields.addAll(fieldMap.get("yAxis"));
|
||||
if (CollectionUtils.isNotEmpty(fieldMap.get("labelAxis")))fields.addAll(fieldMap.get("labelAxis"));
|
||||
if (CollectionUtils.isNotEmpty(fieldMap.get("tooltipAxis")))fields.addAll(fieldMap.get("tooltipAxis"));
|
||||
if (CollectionUtils.isNotEmpty(fieldMap.get("yAxis")))fields.addAll(fieldMap.get("yAxis"));
|
||||
return transTableNormal(fields, view, data, desensitizationList);
|
||||
}
|
||||
|
||||
|
||||
@ -132,15 +132,16 @@ public class EmailService {
|
||||
}
|
||||
|
||||
private MimeMultipart addFiles(MimeMultipart multipart, List<File> files) throws Exception{
|
||||
|
||||
for (int i = 0; i < files.size(); i++) {
|
||||
File file = files.get(i);
|
||||
MimeBodyPart attach = new MimeBodyPart();
|
||||
FileDataSource fileDataSource = new FileDataSource(file);
|
||||
attach.setDataHandler(new DataHandler(fileDataSource));
|
||||
attach.setFileName(MimeUtility.encodeText(file.getName()));
|
||||
attach.setFileName(MimeUtility.encodeText(file.getName(), "gb2312", null));
|
||||
multipart.addBodyPart(attach);
|
||||
}
|
||||
System.getProperties().setProperty("mail.mime.splitlongparameters", "false");
|
||||
|
||||
multipart.setSubType("related");
|
||||
return multipart;
|
||||
}
|
||||
@ -170,6 +171,7 @@ public class EmailService {
|
||||
}
|
||||
|
||||
public MailInfo mailInfo() {
|
||||
System.getProperties().setProperty("mail.mime.splitlongparameters", "false");
|
||||
String type = ParamConstants.Classify.MAIL.getValue();
|
||||
List<SystemParameter> paramList = getParamList(type);
|
||||
MailInfo mailInfo = new MailInfo();
|
||||
|
||||
@ -92,11 +92,6 @@ SET
|
||||
`permission` = 'datasource:read'
|
||||
WHERE
|
||||
`menu_id` = 39;
|
||||
UPDATE `sys_menu`
|
||||
SET
|
||||
`permission` = 'user:editPwd'
|
||||
WHERE
|
||||
`menu_id` = 51;
|
||||
|
||||
|
||||
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.openMarketPage', 'true', 'boolean', 14);
|
||||
|
||||
@ -595,14 +595,14 @@ export default {
|
||||
return (this.canvasStyleData.panel.gap === 'yes' && this.element.auxiliaryMatrix) ? this.componentGap : 0
|
||||
},
|
||||
miniWidth() {
|
||||
return this.element.auxiliaryMatrix ? this.curCanvasScale.matrixStyleWidth * 4 : 0
|
||||
return this.element.auxiliaryMatrix ? this.curCanvasScale.matrixStyleWidth * (this.mobileLayoutStatus ? 1 : 4) : 0
|
||||
},
|
||||
miniHeight() {
|
||||
if (this.element.auxiliaryMatrix) {
|
||||
if (this.element.component === 'de-number-range') {
|
||||
return this.element.auxiliaryMatrix ? this.curCanvasScale.matrixStyleHeight * 4 : 0
|
||||
return this.element.auxiliaryMatrix ? this.curCanvasScale.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 4) : 0
|
||||
} else {
|
||||
return this.element.auxiliaryMatrix ? this.curCanvasScale.matrixStyleHeight * 4 : 0
|
||||
return this.element.auxiliaryMatrix ? this.curCanvasScale.matrixStyleHeight * (this.mobileLayoutStatus ? 1 : 4) : 0
|
||||
}
|
||||
} else {
|
||||
return 0
|
||||
|
||||
@ -19,16 +19,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-dialog
|
||||
:visible="dialogShow"
|
||||
:show-close="false"
|
||||
class="dialog-css"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<div ref="contaninerDiv" :style="{'height': panelHeight + 'px'}" v-if="dialogShow && viewLoaded">
|
||||
<div v-if="dialogShow && viewLoaded" ref="contaninerDiv" :style="{'height': panelHeight + 'px'}">
|
||||
<Preview
|
||||
:component-data="componentData"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
@ -36,13 +33,13 @@
|
||||
:show-position="showPosition"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div slot="title" class="dialog-footer title-text">
|
||||
<span style="font-size: 14px;">
|
||||
选择视图
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<el-button type="primary" size="mini" @click="closeDialog()">{{ $t('commons.confirm') }}</el-button>
|
||||
<el-button type="primary" size="mini" @click="sureDialog()">{{ $t('commons.confirm') }}</el-button>
|
||||
<el-button size="mini" @click="cancelDialog()">{{ $t('commons.cancel') }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
@ -124,11 +121,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this._updateH()
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
this._selectClearFun()
|
||||
|
||||
},
|
||||
created() {
|
||||
this.loadView()
|
||||
@ -168,11 +163,10 @@ export default {
|
||||
},
|
||||
_updateH() {
|
||||
this.$nextTick(() => {
|
||||
if(this.$refs.contaninerDiv) {
|
||||
if (this.$refs.contaninerDiv) {
|
||||
this.width = this.$refs.contaninerDiv.clientWidth
|
||||
this.panelHeight = this.width * 9 / 16
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
_popoverShowFun(val) {
|
||||
@ -180,10 +174,9 @@ export default {
|
||||
this._updateH()
|
||||
this.$emit('onFoucs')
|
||||
},
|
||||
|
||||
|
||||
|
||||
_selectRemoveTag(viewId) {
|
||||
this.selectedViews.forEach(item => {
|
||||
this.$store.getters.panelViews[this.panelId].forEach(item => {
|
||||
if (item === viewId) {
|
||||
this.$store.dispatch('task/delView', { 'panelId': this.panelId, 'viewId': item })
|
||||
}
|
||||
@ -200,13 +193,17 @@ export default {
|
||||
},
|
||||
openDialog() {
|
||||
if (this.value && this.value.length) {
|
||||
this.idsBeforeOpen = JSON.parse(JSON.stringify(this.value))
|
||||
this.idsBeforeOpen = JSON.parse(JSON.stringify(this.value))
|
||||
}
|
||||
this.dialogShow = true
|
||||
},
|
||||
closeDialog() {
|
||||
this.dialogShow = false
|
||||
},
|
||||
sureDialog() {
|
||||
this.innerValues = JSON.parse(JSON.stringify(this.$store.getters.panelViews[this.panelId]))
|
||||
this.closeDialog()
|
||||
},
|
||||
cancelDialog() {
|
||||
this.innerValues = JSON.parse(JSON.stringify(this.idsBeforeOpen))
|
||||
const viewIds = JSON.parse(JSON.stringify(this.innerValues))
|
||||
|
||||
@ -48,7 +48,7 @@ export default {
|
||||
padding-left: 3px;
|
||||
padding-right: 0px;
|
||||
cursor:pointer!important;
|
||||
background-color: #0a7be0;
|
||||
background-color: #3370ff;
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
@click="handleClick"
|
||||
@mousedown="elementMouseDown"
|
||||
>
|
||||
<edit-bar v-if="componentActiveFlag" :source-element="sourceConfig" :element="config" :show-position="showPosition" @showViewDetails="showViewDetails" />
|
||||
<edit-bar v-if="componentActiveFlag" :source-element="sourceConfig" :terminal="terminal" :element="config" :show-position="showPosition" @showViewDetails="showViewDetails" />
|
||||
<div :id="componentCanvasId" :style="commonStyle" class="main_view">
|
||||
<close-bar v-if="previewVisible" @closePreview="closePreview" />
|
||||
<de-out-widget
|
||||
|
||||
@ -12,11 +12,6 @@
|
||||
<el-checkbox size="medium" @change="batchOptChange" />
|
||||
</div>
|
||||
<div v-if="normalAreaShow">
|
||||
<setting-menu v-if="activeModel==='edit'" style="float: right;height: 24px!important;" @amRemoveItem="amRemoveItem" @linkJumpSet="linkJumpSet" @boardSet="boardSet">
|
||||
<span slot="icon" :title="$t('panel.setting')">
|
||||
<i class="icon iconfont icon-shezhi" style="margin-top:2px" />
|
||||
</span>
|
||||
</setting-menu>
|
||||
<span :title="$t('panel.edit')">
|
||||
<i v-if="activeModel==='edit'&&curComponent&&editFilter.includes(curComponent.type)" class="icon iconfont icon-edit" @click.stop="edit" />
|
||||
</span>
|
||||
@ -26,12 +21,17 @@
|
||||
<span :title="$t('panel.suspension')">
|
||||
<i v-if="activeModel==='edit'&&!curComponent.auxiliaryMatrix" class="icon iconfont icon-xuanfuanniu" @click.stop="auxiliaryMatrixChange" />
|
||||
</span>
|
||||
<span :title="$t('panel.details')">
|
||||
<i v-if="curComponent.type==='view'" class="icon iconfont icon-chakan" @click.stop="showViewDetails('details')" />
|
||||
</span>
|
||||
<span :title="$t('panel.enlarge')">
|
||||
<i v-if="curComponent.type==='view'" class="icon iconfont icon-fangda" @click.stop="showViewDetails('enlarge')" />
|
||||
</span>
|
||||
<span :title="$t('panel.details')">
|
||||
<i v-if="curComponent.type==='view' && terminal==='pc'" class="icon iconfont icon-chakan" @click.stop="showViewDetails('details')" />
|
||||
</span>
|
||||
<setting-menu v-if="activeModel==='edit'" style="float: right;height: 24px!important;" @amRemoveItem="amRemoveItem" @linkJumpSet="linkJumpSet" @boardSet="boardSet">
|
||||
<span slot="icon" :title="$t('panel.setting')">
|
||||
<i class="icon iconfont icon-shezhi" style="margin-top:2px" />
|
||||
</span>
|
||||
</setting-menu>
|
||||
<span :title="$t('panel.cancel_linkage')">
|
||||
<i v-if="curComponent.type==='view'&&existLinkage" class="icon iconfont icon-quxiaoliandong" @click.stop="clearLinkage" />
|
||||
</span>
|
||||
@ -58,6 +58,10 @@ export default {
|
||||
components: { SettingMenu, LinkageField },
|
||||
|
||||
props: {
|
||||
terminal: {
|
||||
type: String,
|
||||
default: 'pc'
|
||||
},
|
||||
sourceElement: {
|
||||
type: Object,
|
||||
required: true
|
||||
@ -151,14 +155,10 @@ export default {
|
||||
return this.targetLinkageInfo[this.element.propValue.viewId]
|
||||
},
|
||||
miniHeight() {
|
||||
let miniHeight = 4
|
||||
if (this.element.component === 'de-number-range') {
|
||||
miniHeight = 4
|
||||
}
|
||||
return miniHeight
|
||||
return this.mobileLayoutStatus ? 1 : 4
|
||||
},
|
||||
miniWidth() {
|
||||
return 4
|
||||
return this.mobileLayoutStatus ? 1 : 4
|
||||
},
|
||||
...mapState([
|
||||
'menuTop',
|
||||
@ -172,6 +172,7 @@ export default {
|
||||
'curLinkageView',
|
||||
'curCanvasScale',
|
||||
'batchOptStatus',
|
||||
'mobileLayoutStatus',
|
||||
'curBatchOptComponents'
|
||||
])
|
||||
},
|
||||
@ -315,7 +316,7 @@ export default {
|
||||
padding-left: 3px;
|
||||
padding-right: 0px;
|
||||
cursor:pointer!important;
|
||||
background-color: rgba(10,123,224, 1);
|
||||
background-color: #3370ff;
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
padding-left: 3px!important;
|
||||
padding-right: 0px!important;
|
||||
cursor:pointer!important;
|
||||
background-color: #0a7be0;
|
||||
background-color: #3370ff;
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
padding-right: 1px;
|
||||
cursor:pointer!important;
|
||||
text-align: center;
|
||||
background-color: #0a7be0;
|
||||
background-color: #3370ff;
|
||||
}
|
||||
.bar-main i{
|
||||
color: white;
|
||||
|
||||
@ -561,23 +561,23 @@ export default {
|
||||
color: #9ea6b2;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__title {
|
||||
.dialog-css ::v-deep .el-dialog__title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__header {
|
||||
padding: 20px 20px 0;
|
||||
.dialog-css ::v-deep .el-dialog__header {
|
||||
padding: 40px 20px 0;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__body {
|
||||
.dialog-css ::v-deep .el-dialog__body {
|
||||
padding: 10px 20px 20px;
|
||||
}
|
||||
|
||||
.mobile-dialog-css > > > .el-dialog__headerbtn {
|
||||
.mobile-dialog-css ::v-deep .el-dialog__headerbtn {
|
||||
top: 7px
|
||||
}
|
||||
|
||||
.mobile-dialog-css > > > .el-dialog__body {
|
||||
.mobile-dialog-css ::v-deep .el-dialog__body {
|
||||
padding: 0px;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
|
||||
@ -285,15 +285,15 @@ export default {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__title {
|
||||
.dialog-css ::v-deep .el-dialog__title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__header {
|
||||
padding: 20px 20px 0;
|
||||
.dialog-css ::v-deep .el-dialog__header {
|
||||
padding: 40px 20px 0;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__body {
|
||||
.dialog-css ::v-deep .el-dialog__body {
|
||||
padding: 10px 20px 20px;
|
||||
}
|
||||
|
||||
|
||||
@ -1843,15 +1843,15 @@ export default {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__title {
|
||||
.dialog-css ::v-deep .el-dialog__title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__header {
|
||||
padding: 20px 20px 0;
|
||||
.dialog-css ::v-deep .el-dialog__header {
|
||||
padding: 40px 20px 0;
|
||||
}
|
||||
|
||||
.dialog-css > > > .el-dialog__body {
|
||||
.dialog-css ::v-deep .el-dialog__body {
|
||||
padding: 10px 20px 20px;
|
||||
}
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.my-container {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
overflow: auto !important;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
|
||||
@ -566,7 +566,7 @@ export default {
|
||||
filter: 'screen',
|
||||
list: 'List item',
|
||||
list_info: 'Please select the information to be displayed in the list',
|
||||
sure_delete: 'Are you sure to delete this user?',
|
||||
sure_delete: 'Are you sure to delete this user?'
|
||||
},
|
||||
ldap: {
|
||||
url: 'LDAP url',
|
||||
@ -1567,6 +1567,7 @@ export default {
|
||||
sure_bt: 'Confirm'
|
||||
},
|
||||
panel: {
|
||||
template_name_tips: "Panel\'s name should not be null",
|
||||
panel_background_item: 'Customize panel background',
|
||||
panel_background_image_tips: 'Currently.Jpeg,.Jpg,.Png,.Gif files are supported, and the size should not exceed 15m',
|
||||
reUpload: 'reUpload',
|
||||
|
||||
@ -567,7 +567,7 @@ export default {
|
||||
filter: '篩選',
|
||||
list: '列表項',
|
||||
list_info: '請選擇列表中要展示的信息',
|
||||
sure_delete: '確定刪除該用戶嗎?',
|
||||
sure_delete: '確定刪除該用戶嗎?'
|
||||
},
|
||||
ldap: {
|
||||
url: 'LDAP地址',
|
||||
@ -1567,6 +1567,7 @@ export default {
|
||||
sure_bt: '確定'
|
||||
},
|
||||
panel: {
|
||||
template_name_tips: '仪表板名称必填',
|
||||
panel_background_item: '自定义仪表板背景',
|
||||
panel_background_image_tips: '当前支持.jpeg,.jpg,.png,.gif文件,大小不要超过15M',
|
||||
reUpload: '重新上传',
|
||||
|
||||
@ -1575,6 +1575,7 @@ export default {
|
||||
sure_bt: '确定'
|
||||
},
|
||||
panel: {
|
||||
template_name_tips: '仪表板名称必填',
|
||||
panel_background_item: '自定义仪表板背景',
|
||||
panel_background_image_tips: '当前支持.jpeg,.jpg,.png,.gif文件,大小不要超过15M',
|
||||
reUpload: '重新上传',
|
||||
|
||||
@ -123,6 +123,7 @@ export default {
|
||||
},
|
||||
'keyWord': {
|
||||
handler: function() {
|
||||
this.currentPage = 1
|
||||
this.buildGridList()
|
||||
}
|
||||
},
|
||||
|
||||
@ -12,11 +12,12 @@
|
||||
<el-input
|
||||
v-model="searchText"
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
class="title-name-search"
|
||||
:placeholder="$t('panel.enter_template_name_tips')"
|
||||
clearable="true"
|
||||
/>
|
||||
<span class="icon iconfont icon-icon-filter insert icon20 filter-icon-span" :class="extFilterActive?'filter-icon-active':''" @click="extFilterActiveChange()" />
|
||||
<span class="icon iconfont icon-icon-filter insert-filter filter-icon-span" :class="extFilterActive?'filter-icon-active':''" @click="extFilterActiveChange()" />
|
||||
</el-row>
|
||||
<el-row v-show="extFilterActive">
|
||||
<el-select v-model="marketActiveTab" class="margin-top16" size="small" placeholder="请选择">
|
||||
@ -64,8 +65,7 @@
|
||||
|
||||
<script>
|
||||
import { searchMarket, getCategories } from '@/api/templateMarket'
|
||||
import { groupTree, panelSave } from '@/api/panel/panel'
|
||||
import bus from '@/utils/bus'
|
||||
import { groupTree } from '@/api/panel/panel'
|
||||
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
|
||||
import TemplateMarketPreviewItem from '@/views/panel/templateMarket/component/TemplateMarketPreviewItem'
|
||||
|
||||
@ -134,6 +134,7 @@ export default {
|
||||
searchMarket({}).then(rsp => {
|
||||
this.baseUrl = rsp.data.baseUrl
|
||||
this.currentMarketTemplateShowList = rsp.data.contents
|
||||
this.hasResult = true
|
||||
}).catch(() => {
|
||||
this.networkStatus = false
|
||||
})
|
||||
@ -207,6 +208,7 @@ export default {
|
||||
},
|
||||
extFilterActiveChange() {
|
||||
this.extFilterActive = !this.extFilterActive
|
||||
this.marketActiveTab = this.marketTabs[0]
|
||||
},
|
||||
closePreview() {
|
||||
this.$emit('closePreview')
|
||||
@ -337,7 +339,7 @@ export default {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.insert {
|
||||
.insert-filter {
|
||||
display: inline-block;
|
||||
font-weight: 400 !important;
|
||||
font-family: PingFang SC;
|
||||
@ -366,6 +368,35 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.insert {
|
||||
display: inline-block;
|
||||
font-weight: 400 !important;
|
||||
font-family: PingFang SC;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
color: #646A73;
|
||||
-webkit-appearance: none;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
outline: 0;
|
||||
margin: 0;
|
||||
transition: .1s;
|
||||
border-radius: 3px;
|
||||
|
||||
&:active {
|
||||
color: #000;
|
||||
border-color: #3a8ee6;
|
||||
background-color: red;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(31, 35, 41, 0.1);
|
||||
color: #3a8ee6;
|
||||
}
|
||||
}
|
||||
|
||||
.template-title{
|
||||
float: left;
|
||||
font-weight: 500;
|
||||
@ -406,7 +437,7 @@ export default {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
padding: 5px;
|
||||
padding: 7px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
@ -415,6 +446,11 @@ export default {
|
||||
color: #3370FF;
|
||||
}
|
||||
|
||||
.filter-icon-active{
|
||||
border: 1px solid #3370FF;
|
||||
color: #3370FF;
|
||||
}
|
||||
|
||||
.search-area{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="testcase-template">
|
||||
<el-row class="template-img" :style="classBackground" />
|
||||
<div class="template-img" :style="classBackground" @click.stop="templatePreview" />
|
||||
<el-row class="bottom-area">
|
||||
<el-row>
|
||||
<span class="demonstration">{{ template.title }}</span>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<span class="title-left">{{ $t('panel.template_market') }}</span>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-input v-model="searchText" size="small" class="title-right" :placeholder="$t('panel.enter_template_name_tips')" clearable="true" />
|
||||
<el-input v-model="searchText" prefix-icon="el-icon-search" size="small" class="title-right" :placeholder="$t('panel.enter_template_name_tips')" clearable="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -48,16 +48,16 @@
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
:title="$t('panel.apply_template')"
|
||||
:visible.sync="folderSelectShow"
|
||||
width="500px"
|
||||
class="dialog-css"
|
||||
width="600px"
|
||||
class="market-dialog-css"
|
||||
append-to-body="true"
|
||||
:destroy-on-close="true"
|
||||
>
|
||||
<el-form ref="panelForm" :model="panelForm" label-width="80px">
|
||||
<el-form-item :label="$t('panel.name')">
|
||||
<el-input v-model="panelForm.name" :placeholder="$t('panel.enter_name_tips')" />
|
||||
<el-form ref="panelForm" :model="panelForm" :rules="rule" label-width="80px">
|
||||
<el-form-item :label="$t('panel.name')" prop="name">
|
||||
<el-input v-model="panelForm.name" :clearable="true" :placeholder="$t('panel.enter_name_tips')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.folder')">
|
||||
<el-form-item :label="$t('commons.folder')" prop="pid">
|
||||
<treeselect
|
||||
v-model="panelForm.pid"
|
||||
:clearable="false"
|
||||
@ -85,6 +85,7 @@ import { groupTree, panelSave } from '@/api/panel/panel'
|
||||
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
|
||||
import MarketPreview from '@/views/panel/templateMarket/component/MarketPreview'
|
||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||
import { PHONE_REGEX } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'TemplateMarket',
|
||||
@ -92,7 +93,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
hasResult: true,
|
||||
templateMiniWidth: 350,
|
||||
templateMiniWidth: 330,
|
||||
templateSpan: '25%',
|
||||
previewModel: false,
|
||||
previewVisible: false,
|
||||
@ -115,7 +116,23 @@ export default {
|
||||
folderSelectShow: false,
|
||||
baseUrl: 'https://dataease.io/templates',
|
||||
currentMarketTemplateShowList: [],
|
||||
networkStatus: true
|
||||
networkStatus: true,
|
||||
rule: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('panel.template_name_tips'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
pid: [
|
||||
{
|
||||
required: true,
|
||||
message: '',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -263,7 +280,7 @@ export default {
|
||||
width: 320px;
|
||||
}
|
||||
.dialog-footer-self{
|
||||
text-align: center;
|
||||
text-align: right;
|
||||
}
|
||||
.search-button-self{
|
||||
text-align: left;
|
||||
@ -306,4 +323,33 @@ export default {
|
||||
background: #f5f6f7;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -1,22 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-empty v-if="status === 'empty'" description="请在左侧选择区域" />
|
||||
|
||||
<el-descriptions v-else-if="status === 'read-only'" title="区域信息" :column="1">
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.area_code')">{{ nodeInfo.code }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.area_name')">{{ nodeInfo.name }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.parent_name')">{{ nodeInfo.pname }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.geo_json')">
|
||||
<json-view :data="json" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<!--基础配置表单-->
|
||||
<el-form
|
||||
v-else
|
||||
v-if="status !== 'empty' && status !== 'read-only'"
|
||||
ref="formInline"
|
||||
v-loading="loading"
|
||||
:model="formInline"
|
||||
@ -34,7 +21,8 @@
|
||||
v-if="treeShow"
|
||||
ref="deSelectTree"
|
||||
v-model="formInline.pCode"
|
||||
popover-class="test-class-wrap"
|
||||
:popper-append-to-body="true"
|
||||
popover-class="map-class-wrap"
|
||||
:data="treeDatas"
|
||||
:select-params="selectParams"
|
||||
:tree-params="treeParams"
|
||||
@ -108,6 +96,20 @@
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-descriptions v-else-if="status === 'read-only'" title="区域信息" :column="1">
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.area_code')">{{ nodeInfo.code }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.area_name')">{{ nodeInfo.name }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.parent_name')">{{ nodeInfo.pname }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :label="$t('map_setting.geo_json')">
|
||||
<json-view :data="json" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-empty v-else-if="status === 'empty'" description="请在左侧选择区域" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -345,5 +347,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.map-class-wrap{
|
||||
top: 65px !important;
|
||||
left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -361,7 +361,7 @@ export default {
|
||||
this.create();
|
||||
return;
|
||||
}
|
||||
const { deptId:id, deptName:label } = row.dept;
|
||||
const { deptId:id, deptName:label } = (row.dept || {});
|
||||
this.selectDepts = [{id, label}]
|
||||
this.formType = "modify";
|
||||
this.dialogVisible = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user