diff --git a/frontend/src/api/authModel/authModel.js b/frontend/src/api/authModel/authModel.js index 33ba79f0a2..9f72a1b128 100644 --- a/frontend/src/api/authModel/authModel.js +++ b/frontend/src/api/authModel/authModel.js @@ -1,11 +1,11 @@ import request from '@/utils/request' -export function queryAuthModel(data) { +export function queryAuthModel(data, loading = true, timeout = 30000) { return request({ url: 'authModel/queryAuthModel', method: 'post', - loading: true, - timeout: 30000, + loading: loading, + timeout: timeout, data }) } diff --git a/frontend/src/api/chart/chart.js b/frontend/src/api/chart/chart.js index f966b426d1..8bb9a0c4df 100644 --- a/frontend/src/api/chart/chart.js +++ b/frontend/src/api/chart/chart.js @@ -40,7 +40,7 @@ export function chartGroupTree(data) { return request({ url: '/chart/group/tree', method: 'post', - loading: true, + loading: false, data }) } diff --git a/frontend/src/api/panel/panel.js b/frontend/src/api/panel/panel.js index c745ced6e9..702302a4c5 100644 --- a/frontend/src/api/panel/panel.js +++ b/frontend/src/api/panel/panel.js @@ -36,20 +36,22 @@ export function querySubjectWithGroup(data) { }) } -export function defaultTree(data) { +export function defaultTree(data, loading = true, timeout = 30000) { return request({ url: '/panel/group/defaultTree', method: 'post', - loading: true, + loading: loading, + timeout: timeout, data }) } -export function groupTree(data) { +export function groupTree(data, loading = true, timeout = 30000) { return request({ url: '/panel/group/tree', method: 'post', - loading: true, + loading: loading, + timeout: timeout, data }) } diff --git a/frontend/src/components/widget/DeWidget/TimeSimple.vue b/frontend/src/components/widget/DeWidget/TimeSimple.vue index 260d6a25bc..badb0ecd83 100644 --- a/frontend/src/components/widget/DeWidget/TimeSimple.vue +++ b/frontend/src/components/widget/DeWidget/TimeSimple.vue @@ -7,10 +7,9 @@ :width="canvas_width" :height="canvas_height" /> -
-

+

@@ -119,7 +118,7 @@ export default { } const nowWeek = this.week[time.getDay()] var fullTime = showWeek ? (nowDate + ' ' + nowWeek) : nowDate - var fullDoc = document.getElementById('fulltime') + var fullDoc = document.getElementById(this.element.id + '_fulltime') fullDoc.innerHTML = fullTime const draw = draws @@ -140,8 +139,6 @@ export default { draw.beginPath() draw.moveTo(0, side_length / 2 - 0) - /* draw.moveTo(0, side_length / 2 - 70) - draw.lineTo(0, side_length / 2 - 50) */ draw.lineTo(0, side_length / 2 - 20) draw.closePath() draw.stroke() @@ -157,8 +154,6 @@ export default { draw.beginPath() draw.moveTo(0, side_length / 2 - 0) - // draw.lineTo(0, side_length / 2 - 50) - // draw.lineTo(0, side_length / 2 - 60) draw.lineTo(0, side_length / 2 - 10) draw.closePath() draw.stroke() @@ -169,21 +164,18 @@ export default { // 画时阵 draw.save() draw.strokeStyle = this.element.style.color - // draw.translate(250, 250) draw.translate(canvas_w / 2, canvas_h / 2) const hourzs = h + min / 60// 获取浮点类型的小时 draw.rotate(hourzs * 30 * Math.PI / 180) draw.lineWidth = 6 draw.beginPath() draw.moveTo(0, 0) - /* draw.lineTo(0, -(side_length / 2 - 60) / 3) */ draw.lineTo(0, -(side_length / 2) * 0.5) draw.closePath() draw.stroke() draw.restore() // 画分针 draw.save() - // draw.translate(250, 250) draw.translate(canvas_w / 2, canvas_h / 2) draw.rotate(min * 6 * Math.PI / 180) @@ -192,13 +184,11 @@ export default { draw.beginPath() draw.moveTo(0, 0) draw.lineTo(0, -(side_length / 2) * 0.7) - /* draw.lineTo(0, -(side_length / 2 - 60) * 3 / 5) */ draw.closePath() draw.stroke() draw.restore() // 画秒针 draw.save() - // draw.translate(250, 250) draw.translate(canvas_w / 2, canvas_h / 2) draw.rotate(s * 6 * Math.PI / 180) draw.strokeStyle = this.element.style.color @@ -206,16 +196,13 @@ export default { draw.beginPath() draw.moveTo(0, 15) draw.lineTo(0, -(side_length / 2) * 0.9) - /* draw.lineTo(0, -(side_length / 2 - 60)) */ draw.closePath() draw.stroke() draw.restore() // 画中心原点 - // draw.fillStyle = 'rgba(255,255,255,1)' draw.lineWidth = 2 draw.beginPath() - // draw.arc(250, 250, 4, 0, 360, false) draw.arc(canvas_w / 2, canvas_h / 2, 4, 0, 360, false) draw.closePath() draw.fill() diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index d8716d7c7d..1287b31817 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1157,7 +1157,11 @@ export default { union_data: 'Union Dataset', add_union_table: 'Add Union Dataset', edit_union: 'Edit Union Dataset', - union: 'Union' + union: 'Union', + edit_union_relation: 'Edit Union Relation', + add_union_relation: 'Add Union Relation', + field_select: 'Select Field', + add_union_field: 'Add Union Field' }, datasource: { datasource: 'Data Source', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index a504aec63c..88c26ca89b 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1158,7 +1158,11 @@ export default { union_data: '關聯數據集', add_union_table: '添加關聯數據集', edit_union: '編輯關聯數據集', - union: '關聯' + union: '關聯', + edit_union_relation: '編輯關聯關系', + add_union_relation: '新建關聯關系', + field_select: '字段選擇', + add_union_field: '添加關聯字段' }, datasource: { datasource: '數據源', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 50219af647..5ac145263c 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1160,7 +1160,11 @@ export default { union_data: '关联数据集', add_union_table: '添加关联数据集', edit_union: '编辑关联数据集', - union: '关联' + union: '关联', + edit_union_relation: '编辑关联关系', + add_union_relation: '新建关联关系', + field_select: '字段选择', + add_union_field: '添加关联字段' }, datasource: { datasource: '数据源', diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 6bb7d1124f..d6393f38a5 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -693,39 +693,38 @@ div:focus { .rate-date-class > .el-picker-panel__footer > .el-button--text:first-child{ + display: none; +} +.rate-date-class > .el-picker-panel__body-wrapper > .el-picker-panel__body { + >.el-date-picker__header { display: none; } - .rate-date-class > .el-picker-panel__body-wrapper > .el-picker-panel__body { - >.el-date-picker__header { - display: none; - } - >.el-picker-panel__content{ - >table > tbody { - >tr:first-child { - display: none; - } - >tr >td.prev-month,td.next-month { - display: none; - } - } - } - } - .rate-day-class > .el-picker-panel__footer > .el-button--text:first-child{ - display: none; - } - .rate-day-class > .el-picker-panel__body-wrapper > .el-picker-panel__body { - >.el-date-picker__header { + >.el-picker-panel__content{ + >table > tbody { + >tr:first-child { display: none; - } - >.el-picker-panel__content{ - >table > tbody { - >tr:not(:nth-child(3)) { - display: none; - } - - } + } + >tr >td.prev-month,td.next-month { + display: none; + } } } +} +.rate-day-class > .el-picker-panel__footer > .el-button--text:first-child{ + display: none; +} +.rate-day-class > .el-picker-panel__body-wrapper > .el-picker-panel__body { + >.el-date-picker__header { + display: none; + } + >.el-picker-panel__content{ + >table > tbody { + >tr:not(:nth-child(3)) { + display: none; + } + } + } +} .chart-type .el-radio__input{ display: none!important; @@ -735,10 +734,22 @@ div:focus { padding-left: 0!important; } +.chart-type .radio-row .radio-style{ + width: 80px; + height: 60px; + padding: 0; +} + .el-color-predefine__color-selector{ border: 1px solid #999999!important; margin: 0 0 6px 6px!important; } - +.de-checkbox { + width: 100%; + margin-left: 0px !important; + .el-checkbox__input { + padding: 0 0 8px 0 !important; + } +} diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index 9b77490991..68a651f93f 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -337,6 +337,11 @@ export default { type: String, required: false, default: null + }, + mountedInit: { + type: Boolean, + required: false, + default: true } }, data() { @@ -440,10 +445,11 @@ export default { }, mounted() { - this.treeNode(this.groupForm) - this.refresh() - // this.chartTree() - this.getChartGroupTree() + if (this.mountedInit) { + this.treeNode(true) + this.refresh() + this.getChartGroupTree() + } }, methods: { clickAdd(param) { @@ -620,9 +626,17 @@ export default { }) }, - treeNode(group) { - queryAuthModel({ modelType: 'chart' }).then(res => { - this.tData = res.data + treeNode(cache = false) { + const modelInfo = localStorage.getItem('chart-tree') + const userCache = (modelInfo && cache) + if (userCache) { + this.tData = JSON.parse(modelInfo) + } + queryAuthModel({ modelType: 'chart' }, !userCache).then(res => { + localStorage.setItem('chart-tree', JSON.stringify(res.data)) + if (!userCache) { + this.tData = res.data + } }) }, diff --git a/frontend/src/views/chart/view/ChartType.vue b/frontend/src/views/chart/view/ChartType.vue index c37ef0346a..546ea41fe5 100644 --- a/frontend/src/views/chart/view/ChartType.vue +++ b/frontend/src/views/chart/view/ChartType.vue @@ -487,10 +487,4 @@ export default { white-space: pre; font-size: 12px; } - -.radio-style{ - width: 80px; - height: 60px; - padding: 0; -} diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue index 48148cb84a..07c09f10df 100644 --- a/frontend/src/views/dataset/add/AddUnion.vue +++ b/frontend/src/views/dataset/add/AddUnion.vue @@ -28,22 +28,44 @@
- +
- +
- + + + + + + @@ -51,9 +73,10 @@ import UnionNode from '@/views/dataset/add/union/UnionNode' import NodeItem from '@/views/dataset/add/union/NodeItem' import DatasetGroupSelectorTree from '@/views/dataset/common/DatasetGroupSelectorTree' +import UnionEdit from '@/views/dataset/add/union/UnionEdit' export default { name: 'AddUnion', - components: { DatasetGroupSelectorTree, NodeItem, UnionNode }, + components: { UnionEdit, DatasetGroupSelectorTree, NodeItem, UnionNode }, props: { param: { type: Object, @@ -72,7 +95,7 @@ export default { currentDsField: [], childrenDs: [], unionToParent: { - unionType: '', // left join,right join,inner join + unionType: 'left', // left join,right join,inner join unionFields: [ { parentField: {}, @@ -94,7 +117,7 @@ export default { currentDsField: [], childrenDs: [], unionToParent: { - unionType: '', + unionType: 'left', unionFields: [] }, allChildCount: 0 @@ -103,7 +126,9 @@ export default { customType: ['db', 'sql', 'excel'], selectDsDialog: false, // 弹框临时选中的数据集 - tempDs: {} + tempDs: {}, + editUnion: false, + unionParam: {} } }, mounted() { @@ -154,6 +179,22 @@ export default { } } } + }, + + unionConfig(param) { + this.unionParam = param + this.editUnion = true + }, + closeEditUnion() { + this.editUnion = false + // 添加关联的时候,如果关闭关联关系设置的界面,则删除子节点,同时向父级传递消息 + if (this.unionParam.type === 'add') { + this.dataset[0].childrenDs.pop() + this.calc({ type: 'delete', grandParentAdd: true, grandParentSub: true, subCount: 0 }) + } + }, + confirmEditUnion() { + this.editUnion = false } } } diff --git a/frontend/src/views/dataset/add/union/NodeItem.vue b/frontend/src/views/dataset/add/union/NodeItem.vue index ecc4d80ba4..5dc218cfc5 100644 --- a/frontend/src/views/dataset/add/union/NodeItem.vue +++ b/frontend/src/views/dataset/add/union/NodeItem.vue @@ -1,9 +1,9 @@