Merge pull request #916 from dataease/dev

Dev
This commit is contained in:
王嘉豪 2021-10-12 19:22:42 +08:00 committed by GitHub
commit 3c5d05f344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 156 additions and 81 deletions

View File

@ -161,6 +161,7 @@ SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for area_mapping
-- ----------------------------
DROP TABLE IF EXISTS `area_mapping`;
CREATE TABLE `area_mapping` (
`id` bigint(20) NOT NULL COMMENT 'id',
`province_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省名称',

View File

@ -234,7 +234,7 @@ export default {
right: 178px;
top: 8px;
background: red;
color: var(--TextActive);
color: var(--TextActive, #fff);
border-radius: 17px;
padding: 4px 7px;
font-size: 16px;

View File

@ -296,7 +296,7 @@ function fillPositionBox(maxY) {
function removeItemFromPositionBox(item) {
const pb = positionBox
// console.log('removeItem=>x:' + item.x + ';y:' + item.y + ';sizex:' + item.sizex + ';sizey:' + item.sizey)
if (item.x <= 0 || item.y <= 0) return
if (!item || item.x <= 0 || item.y <= 0) return
for (let i = item.x - 1; i < item.x - 1 + item.sizex; i++) {
for (let j = item.y - 1; j < item.y - 1 + item.sizey; j++) {
if (pb[j][i]) {
@ -1682,7 +1682,7 @@ export default {
}
},
startMoveIn() {
if (this.dragComponentInfo.auxiliaryMatrix) {
if (this.$store.state.dragComponentInfo.auxiliaryMatrix) {
const moveInItemInfo = this.$store.state.dragComponentInfo
this.addItemBox(moveInItemInfo)
// console.log('startMoveIn:')

View File

@ -12,8 +12,8 @@
</span>
</div>
<div v-else class="toolbar">
<!-- <el-tooltip :content="$t('panel.new_element_distribution')">-->
<!-- <div class="canvas-config" style="margin-right: 10px">-->
<!-- <span>{{ $t('panel.new_element_distribution') }}:</span>-->
<!-- <el-switch-->
<!-- v-model="canvasStyleData.auxiliaryMatrix"-->
<!-- :width="35"-->
@ -22,19 +22,33 @@
<!-- :active-text="$t('panel.matrix')"-->
<!-- :inactive-text="$t('panel.suspension')"-->
<!-- />-->
<!-- </el-tooltip>-->
<div class="canvas-config" style="margin-right: 10px">
<el-switch v-model="canvasStyleData.auxiliaryMatrix" :width="35" name="auxiliaryMatrix" />
<span>{{ $t('panel.matrix_design') }}</span>
</div>
<!-- </div>-->
<!-- <div class="canvas-config" style="margin-right: 10px" @click.stop="auxiliaryMatrixChange">-->
<!-- <span>{{ $t('panel.new_element_distribution.matrix_design') }}:</span>-->
<!-- <span v-if="curComponent.auxiliaryMatrix">-->
<!-- <i class="icon iconfont icon-shujujuzhen" />-->
<!-- {{ $t('panel.matrix_design') }}-->
<!-- </span>-->
<!-- <span v-if="!curComponent.auxiliaryMatrix">-->
<!-- <i class="icon iconfont icon-xuanfuanniu" />-->
<!-- {{ $t('panel.suspension') }}-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="canvas-config" style="margin-right: 10px">-->
<!-- <span> {{ $t('panel.canvas_scale') }} </span>-->
<!-- <input v-model="scale" @input="handleScaleChange"> %-->
<!-- </div>-->
<el-tooltip v-if="!canvasStyleData.auxiliaryMatrix" :content="$t('panel.new_element_distribution')+':'+$t('panel.suspension')">
<el-button class="icon iconfont-tb icon-xuanfuanniu" size="mini" circle @click="auxiliaryMatrixChange" />
</el-tooltip>
<el-tooltip v-if="canvasStyleData.auxiliaryMatrix" :content="$t('panel.new_element_distribution')+':'+$t('panel.matrix')">
<el-button class="icon iconfont-tb icon-shujujuzhen" size="mini" circle @click="auxiliaryMatrixChange" />
</el-tooltip>
<el-tooltip :content="$t('panel.style')">
<el-button :class="styleButtonActive?'button-show':'button-closed'" class="el-icon-magic-stick" size="mini" circle @click="showPanel" />
<el-button class="el-icon-magic-stick" size="mini" circle @click="showPanel" />
<!-- <el-button :class="styleButtonActive?'button-show':'button-closed'" class="el-icon-magic-stick" size="mini" circle @click="showPanel" />-->
</el-tooltip>
<!-- <el-tooltip v-if="!aidedButtonActive" :content="$t('panel.open_aided_design') ">-->
@ -372,6 +386,9 @@ export default {
},
cancelLinkageSettingStatus() {
this.$store.commit('clearLinkageSettingInfo')
},
auxiliaryMatrixChange() {
this.canvasStyleData.auxiliaryMatrix = !this.canvasStyleData.auxiliaryMatrix
}
}
}
@ -382,7 +399,7 @@ export default {
float: right;
height: 35px;
line-height: 35px;
min-width: 500px;
min-width: 400px;
/*background: #fff;*/
/*border-bottom: 1px solid #ddd;*/
@ -390,7 +407,6 @@ export default {
display: inline-block;
margin-left: 10px;
font-size: 14px;
color: #606266;
input {
width: 50px;
@ -398,7 +414,6 @@ export default {
outline: none;
padding: 0 5px;
border: 1px solid #ddd;
color: #606266;
}
span {
@ -413,7 +428,7 @@ export default {
cursor: pointer;
background: #FFF;
border: 1px solid #DCDFE6;
color: #606266;
color: var(--TextPrimary, #606266);
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
@ -460,4 +475,12 @@ export default {
margin-bottom: 2px;
}
.iconfont-tb {
font-family: "iconfont" !important;
font-size: 12px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>

View File

@ -55,7 +55,7 @@ export default {
created() {
this.restore()
//
listenGlobalKeyDown()
// listenGlobalKeyDown()
},
methods: {
restore() {

View File

@ -34,7 +34,7 @@
</el-dropdown>
</span>
<div class="de-tab-content">
<div v-if="activeTabName === item.name" class="de-tab-content">
<user-view v-if="item.content" :ref="item.name" :element="item.content" :out-style="outStyle" />
</div>
@ -75,7 +75,7 @@
center
>
<div style="width: 100%;min-height: 250px; max-height: 300px; overflow-y: auto;">
<view-select ref="viewSelect" :select-model="true" />
<view-select v-if="viewDialogVisible" ref="viewSelect" :select-model="true" />
</div>
<span slot="footer" class="dialog-footer">
@ -161,6 +161,10 @@ export default {
},
sureViewSelector() {
const nodes = this.$refs.viewSelect.getCurrentSelected()
if (!nodes || nodes.length === 0) {
this.viewDialogVisible = false
return
}
const node = nodes[0]
let component
@ -250,23 +254,8 @@ export default {
}
.de-tabs {
height: 100%;
>>>div.el-tabs__content {
height: calc(100% - 55px);
.el-tab-pane {
height: 100%;
}
}
}
/* .de-tab-i {
transition: 0.1s;
opacity: 0;
transform: translateY(100%);
}
.de-tab-drop:hover .de-tab-i {
opacity: 1;
transform: translateY(0);
} */
.de-tab-content {
width: 100%;
height: 100%;

View File

@ -1320,7 +1320,7 @@ export default {
no_drill_field: '缺少關聯字段',
matrix: '矩阵',
suspension: '悬浮',
new_element_distribution: '新元素分布方式',
new_element_distribution: '当前元素移入分布方式',
subject_no_edit: '系统主题不能修改',
subject_name_not_null: '主题名称需要1~20字符'
},

View File

@ -1325,7 +1325,7 @@ export default {
no_drill_field: '缺少关联字段',
matrix: '矩阵',
suspension: '悬浮',
new_element_distribution: '新元素分布方式',
new_element_distribution: '当前元素移入分布方式',
subject_no_edit: '系统主题不能修改',
subject_name_not_null: '主题名称需要1~20字符'
},

View File

@ -43,9 +43,6 @@ html {
box-sizing: border-box;
}
#app {
//height: $contentHeight;
}
*,
*:before,
@ -151,6 +148,18 @@ div:focus {
}
}
.de-tabs {
.el-tabs__header {
margin: 0 0 0 0 !important;
}
.el-tabs__content {
height: calc(100% - 55px) !important;
.el-tab-pane {
height: 100% !important;
}
}
}
.de-search-header {
.el-tabs__header {
display: none !important;;
@ -418,6 +427,10 @@ div:focus {
border: none !important;
}
.blackTheme .el-picker-panel__footer {
background-color: var(--MainBG) !important;
}
.el-pagination {
button:disabled {
@ -602,6 +615,10 @@ div:focus {
background-color: #000000 ;
}
.blackTheme .CodeMirror-line {
background-color: #000000 !important;
}
.blackTheme .el-radio-button__inner {
background-color: var(--TableBG);
color: var(--TableColor);
@ -616,5 +633,38 @@ div:focus {
background: #38393a !important;
}
.blackTheme .el-message-box__content {
color:#F2F6FC;
}
.blackTheme .el-message-box__btns {
.el-button--default:not(.el-button--primary) {
background-color: #171b22 ;
color: #2681ff;
}
.el-button--primary {
color: #21333b;
background-color: #2681ff;
border-color: #2681ff;
}
}
.blackTheme .vue-treeselect__menu {
border: 1px solid var(--TableBorderColor, #cfcfcf);
background: var(--MainBG, #fff);
}
.blackTheme .vue-treeselect__option:not(.vue-treeselect__option--highlight) {
color: #606266;
}
.blackTheme .vue-treeselect__option--highlight {
color: #2681ff;
background-color: #000000;
}
.blackTheme .el-table__body tr.current-row > td {
background-color: #324f62;
}

View File

@ -613,7 +613,7 @@
:fullscreen="true"
>
<field-edit :param="table" />
<div slot="title" class="dialog-footer">
<div slot="title" class="dialog-footer title-text">
<span style="font-size: 14px;">
{{ $t('dataset.field_manage') }}
<span v-if="table">[{{ table.name }}]</span>

View File

@ -96,7 +96,7 @@
append-to-body
>
<el-col>
<el-form :form="taskForm" :model="taskForm" label-width="100px" size="mini" ref="taskForm" :rules="taskFormRules">
<el-form ref="taskForm" :form="taskForm" :model="taskForm" label-width="100px" size="mini" :rules="taskFormRules">
<el-form-item :label="$t('dataset.task_name')" prop="name">
<el-input
v-model="taskForm.name"
@ -143,12 +143,12 @@
<el-form-item v-if="taskForm.rate === 'SIMPLE_CRON'" label="">
<el-form :inline="true">
<el-form-item :label="$t('cron.every')" >
<el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" />
<el-form-item :label="$t('cron.every')">
<el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" />
</el-form-item>
<el-form-item class="form-item">
<el-select v-model="taskForm.extraData.simple_cron_type" filterable size="mini" @change="onSimpleCronChange()" >
<el-select v-model="taskForm.extraData.simple_cron_type" filterable size="mini" @change="onSimpleCronChange()">
<el-option :label="$t('cron.minute_default')" value="minute" />
<el-option :label="$t('cron.hour_default')" value="hour" />
<el-option :label="$t('cron.day_default')" value="day" />
@ -189,7 +189,7 @@
</el-form>
</el-col>
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="closeTask">{{ $t('dataset.cancel') }}</el-button>
<el-button class="dialog_cancel_button" size="mini" @click="closeTask">{{ $t('dataset.cancel') }}</el-button>
<el-button type="primary" size="mini" @click="saveTask(taskForm)">{{ $t('dataset.confirm') }}</el-button>
</div>
</el-dialog>
@ -222,19 +222,19 @@
</el-table-column>
<el-table-column prop="status" :label="$t('dataset.task.task_status')">
<template slot-scope="scope">
<span v-if="scope.row.status === 'Underway'" style="color: green">
<el-link type="success" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.underway') }}</el-link>
</span>
<span v-if="scope.row.status === 'Underway'" style="color: green">
<el-link type="success" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.underway') }}</el-link>
</span>
<span v-if="scope.row.status === 'Stopped'" style="color: red">
<div type="danger" style="font-size: 12px">{{ $t('dataset.task.stopped') }}</div>
</span>
<div type="danger" style="font-size: 12px">{{ $t('dataset.task.stopped') }}</div>
</span>
<span v-if="scope.row.status === 'Pending'" style="color: blue">
<el-link type="primary" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.pending') }}</el-link>
</span>
<el-link type="primary" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.pending') }}</el-link>
</span>
<span v-if="scope.row.status === 'Exec'" style="color: blue">
<i class="el-icon-loading" />
{{ $t('dataset.underway') }}
</span>
<i class="el-icon-loading" />
{{ $t('dataset.underway') }}
</span>
</template>
</el-table-column>
<el-table-column
@ -432,7 +432,7 @@ export default {
created() {
this.timer = setInterval(() => {
this.listTaskLog(false)
}, 5000);
}, 5000)
this.taskTimer = setInterval(() => {
this.listTask(false)
}, 5000)
@ -574,10 +574,9 @@ export default {
this.listTask()
this.listTaskLog()
})
}else {
} else {
return false
}
})
},
changeTaskStatus(task) {
@ -617,27 +616,27 @@ export default {
},
onSimpleCronChange() {
if (this.taskForm.extraData.simple_cron_type === 'minute') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 59){
this.$message({message: this.$t('cron.minute_limit'), type: 'warning', showClose: true})
if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 59) {
this.$message({ message: this.$t('cron.minute_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 59
}
this.taskForm.cron = '0 0/'+ this.taskForm.extraData.simple_cron_value + ' * * * ? *'
this.taskForm.cron = '0 0/' + this.taskForm.extraData.simple_cron_value + ' * * * ? *'
return
}
if (this.taskForm.extraData.simple_cron_type === 'hour') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 23){
this.$message({message: this.$t('cron.hour_limit'), type: 'warning', showClose: true})
if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 23) {
this.$message({ message: this.$t('cron.hour_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 23
}
this.taskForm.cron = '0 0 0/'+ this.taskForm.extraData.simple_cron_value + ' * * ? *'
this.taskForm.cron = '0 0 0/' + this.taskForm.extraData.simple_cron_value + ' * * ? *'
return
}
if (this.taskForm.extraData.simple_cron_type === 'day') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 31){
this.$message({message: this.$t('cron.day_limit'), type: 'warning', showClose: true})
if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 31) {
this.$message({ message: this.$t('cron.day_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 31
}
this.taskForm.cron = '0 0 0 1/'+ this.taskForm.extraData.simple_cron_value + ' * ? *'
this.taskForm.cron = '0 0 0 1/' + this.taskForm.extraData.simple_cron_value + ' * ? *'
return
}
},
@ -647,16 +646,16 @@ export default {
this.taskForm.endTime = ''
this.taskForm.cron = ''
}
if (this.taskForm.rate === 'SIMPLE_CRON'){
if (this.taskForm.rate === 'SIMPLE_CRON') {
this.taskForm.cron = '0 0 0/1 * * ? *'
}
if (this.taskForm.rate === 'CRON'){
if (this.taskForm.rate === 'CRON') {
this.taskForm.cron = '00 00 * ? * * *'
}
},
listTaskLog(loading = true) {
const params = {"conditions":[{"field":"dataset_table_task_log.table_id","operator":"eq","value": this.table.id}],"orders":[]}
post('/dataset/taskLog/list/' + this.table.type + '/' + this.page.currentPage + '/' + this.page.pageSize, params, loading).then(response => {
const params = { 'conditions': [{ 'field': 'dataset_table_task_log.table_id', 'operator': 'eq', 'value': this.table.id }], 'orders': [] }
post('/dataset/taskLog/list/' + this.table.type + '/' + this.page.currentPage + '/' + this.page.pageSize, params, loading).then(response => {
this.taskLogData = response.data.listObject
this.page.total = response.data.itemCount
})
@ -754,6 +753,11 @@ export default {
overflow: hidden ;
}
.blackTheme .dialog_cancel_button {
background-color: #171b22 !important;
color: #2681ff !important;
}
.span{
font-size: 12px;
}

View File

@ -2,7 +2,7 @@
<div>
<el-button v-show="!showSearchInput" class="de-icon" icon="el-icon-search" circle size="mini" @click="showSearchWidget" />
<div v-show="showSearchInput" class="de-input">
<el-input v-model="key">
<el-input v-model="key" class="main-area-input">
<el-button slot="append" icon="el-icon-close" @click="closeSearchWidget" />
</el-input>
</div>

View File

@ -12,7 +12,7 @@
<el-col :span="20">
<el-row id="slider">
<div class="window">
<ul class="container" :style="containerStyle">
<ul v-if="!slidersLoading" class="container" :style="containerStyle">
<li>
<div style="width:240px; height: 208px;overflow: hidden">
<subject-template-item
@ -156,6 +156,7 @@ export default {
querySubjectWithGroup() {
this.slidersLoading = true
querySubjectWithGroup({}).then(response => {
this.sliders = []
this.sliders = response.data
this.slidersLoading = false
}).catch(() => {

View File

@ -104,7 +104,7 @@
@mousedown="handleMouseDown"
@mouseup="deselectCurComponent"
>
<Editor ref="canvasEditor" v-if="!previewVisible" :out-style="outStyle" @canvasScroll="canvasScroll" />
<Editor v-if="!previewVisible" ref="canvasEditor" :out-style="outStyle" @canvasScroll="canvasScroll" />
</div>
</de-main-container>
<!-- <de-aside-container v-if="aidedButtonActive" :class="aidedButtonActive ? 'show' : 'hidden'" class="style-aside">-->
@ -455,7 +455,9 @@ export default {
const self = evt.target.closest('.el-drawer__wrapper')
//
const stick = evt.target.closest('.el-icon-magic-stick')
if (!parent && !self && !stick) {
const xuanfuanniu = evt.target.closest('.icon-xuanfuanniu')
const shujujuzhen = evt.target.closest('.icon-shujujuzhen')
if (!parent && !self && !stick && !xuanfuanniu && !shujujuzhen) {
this.show = false
window.removeEventListener('click', this.closeSidebar)
this.showIndex = -1

View File

@ -166,7 +166,8 @@
group="dimension"
animation="300"
:move="onMove"
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;background-color: white;"
class="theme-drag"
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;"
@end="end2"
>
<transition-group class="list-group" :data-value="$t('panel.drag_here')">
@ -715,7 +716,7 @@ export default {
padding: 8px;
height: 100%;
border-right: none;
border: 1px solid #E6E6E6;
border: 1px solid var(--TableBorderColor, #E6E6E6);;
.field-content-text {
box-sizing: border-box;
overflow: hidden;
@ -727,7 +728,7 @@ export default {
.field-content-right {
border-left: none;
color: #9ea6b2;
border: 1px solid #E6E6E6;
border: 1px solid var(--TableBorderColor, #E6E6E6);
width: 0%;
max-width: 0%;
position: relative;
@ -764,7 +765,7 @@ export default {
}
.filter-dialog-tabs {
border: 1px solid #E6E6E6;
border: 1px solid var(--TableBorderColor, #E6E6E6);
padding: 10px;
height: 100%;
>>> div.el-tabs__content {
@ -867,4 +868,8 @@ export default {
content: attr(data-value);
}
.blackTheme .theme-drag {
background-color: var(--MainBG, #fff);
}
</style>

View File

@ -798,11 +798,11 @@ export default {
}
</script>
<style scoped>
<style lang='scss' scoped>
.header-title {
font-size: 14px;
flex: 1;
color: #606266;
color: var(--TextPrimary, #606266);
font-weight: bold;
display: block;
height: 100%;