-

+
+
+

+
+
AJ-Report
+
+
+

@@ -109,6 +126,29 @@
:img-size="{ width: '400px', height: '200px' }"
@success="verifylogin"
/>
+
+
+
+
+ 个人/商业使用须遵循Apache2.0开源协议。
+ 禁止将AJ-Report产品用于违法违规业务。
+
+
+
@@ -142,7 +182,8 @@ export default {
loading: false,
redirect: undefined,
otherQuery: {},
- needCaptcha: false
+ needCaptcha: false,
+ centerDialogVisible: false
};
},
watch: {
@@ -314,10 +355,47 @@ export default {
height: 60px;
padding: 10px 60px;
display: flex;
+ justify-content: space-between;
align-items: center;
- img {
- width: 10%;
- display: block;
+ .left {
+ display: flex;
+ flex-direction: row;
+ .box {
+ width: 40px;
+ height: 40px;
+ margin-top: 6px;
+ img {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .name {
+ font-size: 20px;
+ font-weight: bold;
+ padding-bottom: 5px;
+ margin-left: 10px;
+ border-left: 1px solid #ccc;
+ padding-top: 14px;
+ padding-left: 10px;
+ }
+ .box1 {
+ width: 100px;
+ margin-left: 40px;
+ cursor: pointer;
+ img {
+ width: 100%;
+ margin-top: 10px;
+ margin-left: 10px;
+ }
+ }
+ }
+ .right {
+ display: flex;
+ flex-direction: row;
+ .item {
+ margin-right: 60px;
+ cursor: pointer;
+ }
}
}
.login_contant {
diff --git a/report-ui/src/views/reportManage/components/share.vue b/report-ui/src/views/reportManage/components/share.vue
index 04bf6166..e9825940 100644
--- a/report-ui/src/views/reportManage/components/share.vue
+++ b/report-ui/src/views/reportManage/components/share.vue
@@ -114,6 +114,13 @@ export default {
default: () => {
return "";
}
+ },
+ reportType: {
+ required: true,
+ type: String,
+ default:() =>{
+ return "";
+ }
}
},
data() {
@@ -124,6 +131,7 @@ export default {
dialogForm: {
shareValidType: 0,
reportCode: "",
+ reportType: "",
shareUrl: "",
shareCode: "",
sharePassword: "",
@@ -164,12 +172,11 @@ export default {
this.dialogForm.sharePassword = "";
},
async createShare() {
+ this.dialogForm.reportType = this.reportType;
this.dialogForm.reportCode = this.reportCode;
this.dialogForm.shareUrl = window.location.href;
- // console.log(this.dialogForm)
const { code, data } = await reportShareAdd(this.dialogForm);
if (code != "200") return;
- // console.log(data)
this.shareLinkFlag1 = false;
this.$message({
message: "创建链接成功!",
diff --git a/report-ui/src/views/reportManage/index.vue b/report-ui/src/views/reportManage/index.vue
index a07f047e..c9ca2033 100644
--- a/report-ui/src/views/reportManage/index.vue
+++ b/report-ui/src/views/reportManage/index.vue
@@ -13,6 +13,7 @@
:visib="visibleForShareDialog"
:reportCode="reportCodeForShareDialog"
:reportName="reportNameForShareDialog"
+ :reportType="reportTypeForShareDialog"
@handleClose="visibleForShareDialog = false"
/>
@@ -45,6 +46,7 @@ export default {
visibleForShareDialog: false,
reportCodeForShareDialog: "",
reportNameForShareDialog: "",
+ reportTypeForShareDialog: "",
crudOption: {
// 使用菜单做为页面标题
title: "报表管理",
@@ -354,13 +356,9 @@ export default {
},
//分享
shareReport(val) {
- if (val.reportType == "report_excel") {
- //excel暂不支持
- this.$message.warning("暂不支持excel报表分享");
- return;
- }
this.reportCodeForShareDialog = val.reportCode;
this.reportNameForShareDialog = val.reportName;
+ this.reportTypeForShareDialog = val.reportType;
this.visibleForShareDialog = true;
},
//复制
diff --git a/report-ui/src/views/reportShare/index.vue b/report-ui/src/views/reportShare/index.vue
new file mode 100644
index 00000000..da330391
--- /dev/null
+++ b/report-ui/src/views/reportShare/index.vue
@@ -0,0 +1,259 @@
+
+
+
+
+
+
+
+
diff --git a/report-ui/src/views/screenDesigner/components/contentMenu.vue b/report-ui/src/views/screenDesigner/components/contentMenu.vue
index 15562b1c..67a9a8ad 100644
--- a/report-ui/src/views/screenDesigner/components/contentMenu.vue
+++ b/report-ui/src/views/screenDesigner/components/contentMenu.vue
@@ -24,7 +24,9 @@
export default {
props: {
styleObj: Object,
- visible: Boolean
+ visible: Boolean,
+ widgets: Array,
+ rightClickIndex: Number
},
data() {
return {};
@@ -49,7 +51,8 @@ export default {
type: "warning"
})
.then(() => {
- this.$emit("deletelayer");
+ console.log(this.rightClickIndex);
+ this.widgets.splice(this.rightClickIndex, 1);
this.$message({
type: "success",
message: "删除成功!"
@@ -63,19 +66,41 @@ export default {
});
},
copyLayer() {
- this.$emit("copylayer");
+ const obj = this.deepClone(this.widgets[this.rightClickIndex]);
+ this.widgets.splice(this.widgets.length, 0, obj);
},
istopLayer() {
- this.$emit("istopLayer");
+ if (this.rightClickIndex + 1 < this.widgets.length) {
+ const temp = this.widgets.splice(this.rightClickIndex, 1)[0];
+ this.widgets.push(temp);
+ }
},
setlowLayer() {
- this.$emit("setlowLayer");
+ if (this.rightClickIndex != 0) {
+ this.widgets.unshift(this.widgets.splice(this.rightClickIndex, 1)[0]);
+ }
},
moveupLayer() {
- this.$emit("moveupLayer");
+ if (this.rightClickIndex != 0) {
+ this.widgets[this.rightClickIndex] = this.widgets.splice(
+ this.rightClickIndex - 1,
+ 1,
+ this.widgets[this.rightClickIndex]
+ )[0];
+ } else {
+ this.widgets.push(this.widgets.shift());
+ }
},
movedownLayer() {
- this.$emit("movedownLayer");
+ if (this.rightClickIndex != this.widgets.length - 1) {
+ this.widgets[this.rightClickIndex] = this.widgets.splice(
+ this.rightClickIndex + 1,
+ 1,
+ this.widgets[this.rightClickIndex]
+ )[0];
+ } else {
+ this.widgets.unshift(this.widgets.splice(this.rightClickIndex, 1)[0]);
+ }
}
}
};
diff --git a/report-ui/src/views/screenDesigner/config/configs.js b/report-ui/src/views/screenDesigner/config/configs.js
index 0fd70315..4d9e5c8e 100644
--- a/report-ui/src/views/screenDesigner/config/configs.js
+++ b/report-ui/src/views/screenDesigner/config/configs.js
@@ -12,6 +12,7 @@
* 词云图:{type: 'wordCloud',tabName: '词云图'}
* **/
+import { screenConfig } from './texts/screenConfig'
import {widgetHref} from "./texts/widget-href"
import {widgetIframe} from "./texts/widget-iframe"
import {widgetImage} from "./texts/widget-image"
@@ -43,6 +44,7 @@ import {widgetHeatmap} from "./heatmap/widget-heatmap";
export const widgetTool = [
+ screenConfig,
widgetHref,
widgetIframe,
widgetImage,
diff --git a/report-ui/src/views/screenDesigner/config/index.js b/report-ui/src/views/screenDesigner/config/index.js
index 54f3eebf..fdd99ca4 100644
--- a/report-ui/src/views/screenDesigner/config/index.js
+++ b/report-ui/src/views/screenDesigner/config/index.js
@@ -1,3 +1,11 @@
+/*
+ * @Descripttion:
+ * @version:
+ * @Author: qianlishi
+ * @Date: 2022-03-14 14:05:15
+ * @LastEditors: qianlishi
+ * @LastEditTime: 2022-06-17 17:24:33
+ */
import {converArr} from '../util/common'
import { widgetTool } from "./configs"
diff --git a/report-ui/src/views/screenDesigner/index.vue b/report-ui/src/views/screenDesigner/index.vue
index f4e4747d..ba283f0d 100644
--- a/report-ui/src/views/screenDesigner/index.vue
+++ b/report-ui/src/views/screenDesigner/index.vue
@@ -1,218 +1,48 @@
-
-
-
- 保存
-
-
- 预览
-
-
- 撤销
-
-
- 恢复
-
-
-
-
-
- 导入
-
-
-
-
-
- 导出
-
-
- 导出(包含数据集)
- 导出(不包含数据集)
-
-
-
-
-
-
-
-
- 工具栏
-
-
-
- widgetOnDragged(evt, it.code)"
- >
-
-
-
-
- {{ it.label }}
-
-
-
-
-
-
-
- 图层
-
-
-
-
- {{ item.label }}
-
-
-
-
-
+
+
+
+
-
-
-
-
- widgetValueChanged('setup', val)"
- />
-
-
- widgetValueChanged('data', val)"
- />
-
-
- widgetValueChanged('position', val)"
- />
-
-
+
+
+
+
-
-
+
diff --git a/report-ui/src/views/screenDesigner/layout/leftMenu.vue b/report-ui/src/views/screenDesigner/layout/leftMenu.vue
new file mode 100644
index 00000000..3f1fbe46
--- /dev/null
+++ b/report-ui/src/views/screenDesigner/layout/leftMenu.vue
@@ -0,0 +1,144 @@
+
+
+
+
+ 工具栏
+
+
+
+ widgetOnDragged(evt, it.code)"
+ >
+
+
+
+
+ {{ it.label }}
+
+
+
+
+
+
+
+ 图层
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
diff --git a/report-ui/src/views/screenDesigner/layout/middleScreen.vue b/report-ui/src/views/screenDesigner/layout/middleScreen.vue
new file mode 100644
index 00000000..6ee0430a
--- /dev/null
+++ b/report-ui/src/views/screenDesigner/layout/middleScreen.vue
@@ -0,0 +1,260 @@
+
+
+
+
+
+
diff --git a/report-ui/src/views/screenDesigner/layout/rightConfig.vue b/report-ui/src/views/screenDesigner/layout/rightConfig.vue
new file mode 100644
index 00000000..29d2622b
--- /dev/null
+++ b/report-ui/src/views/screenDesigner/layout/rightConfig.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ widgetValueChanged('setup', val)"
+ />
+
+
+ widgetValueChanged('data', val)"
+ />
+
+
+ widgetValueChanged('position', val)"
+ />
+
+
+
+
+
diff --git a/report-ui/src/views/screenDesigner/layout/topBar.vue b/report-ui/src/views/screenDesigner/layout/topBar.vue
new file mode 100644
index 00000000..a9ebbd58
--- /dev/null
+++ b/report-ui/src/views/screenDesigner/layout/topBar.vue
@@ -0,0 +1,229 @@
+
+
+
+
+
+ 保存
+
+
+ 预览
+
+
+ 撤销
+
+
+ 恢复
+
+
+
+
+
+ 导入
+
+
+
+
+
+ 导出
+
+
+ 导出(包含数据集)
+ 导出(不包含数据集)
+
+
+
+
+
+
+
diff --git a/report-ui/src/views/screenDesigner/node.md b/report-ui/src/views/screenDesigner/node.md
index 2e20709c..141ddb24 100644
--- a/report-ui/src/views/screenDesigner/node.md
+++ b/report-ui/src/views/screenDesigner/node.md
@@ -13,6 +13,10 @@
│ │ ├── pieCharts(文件夹) (饼图)
│ │ ├── texts(文件夹) (文本、滚动文本、超链接、当前时间、图片、视频、表格、内联框架)
│ │ ├── wordcloudCharts(文件夹) (词云图)
+│ ├── layout(文件夹)
+│ │ ├── left.vue 大屏左侧工具栏
+│ │ ├── middle.vue 大屏中间配置
+│ │ ├── right.vue 大屏右侧配置
│ ├── util(文件夹) 公共 js
│ ├── widget(文件夹) 图表组件
│ │ ├── barCharts(文件夹) (柱状图)
diff --git a/report-ui/src/views/screenDesigner/util/revoke.js b/report-ui/src/views/screenDesigner/util/revoke.js
new file mode 100644
index 00000000..8cb590c1
--- /dev/null
+++ b/report-ui/src/views/screenDesigner/util/revoke.js
@@ -0,0 +1,92 @@
+export class Revoke {
+ // 历史记录
+ recordList = [];
+
+ // 撤销记录,用于重做
+ redoList = [];
+
+ // 当前记录用currentRecord变量暂时存储,当用户修改时,再存放到recordList
+ currentRecord = null;
+
+ // 上次插入数据时间
+ time = 0;
+
+ /**
+ * @description: 插入历史记录
+ * @param {object}record
+ * @return {boolean}
+ */
+ push(record) {
+ const nowTime = Date.now();
+ // 防止添加重复的时间,当添加间隔小于100ms时,则替换当前记录并取消执行添加
+ if (this.time + 100 > nowTime) {
+ this.currentRecord = JSON.stringify(record);
+ return false;
+ }
+
+ this.time = nowTime;
+ // 判断之前是否已经存在currentRecord记录,有则存储到recordList
+ if (this.currentRecord) {
+ this.recordList.push(this.currentRecord);
+ //(清空记录)增加记录后则应该清空重做记录
+ //splice() 方法向/从数组添加/删除项目,并返回删除的项目。
+ this.redoList.splice(0, this.redoList.length);
+ }
+ // 将json转成字符串存储
+ this.currentRecord = JSON.stringify(record);
+
+ // 最多存储2000条记录,超过2000条记录则删除之前的记录
+ if (this.length > 2000) {
+ //unshift() 方法将新项添加到数组的开头,并返回新的长度。
+ this.recordList.unshift();
+ }
+
+ return true;
+ }
+
+ /**
+ * @description: 撤销操作
+ * @param {*}
+ * @return {object}
+ */
+ undo() {
+ // 没有记录时,返回false
+ // 新建的recordList里面,不知为什么会存在一条记录,未找到原因,所以就判断长度为1时就不能撤销了。
+ if (this.recordList.length === 1 ) {
+ return false;
+ }
+ //pop(): 方法用于删除并返回数组的最后一个元素。
+ const record = this.recordList.pop();
+
+ // 将当前记录添加到重做记录里面
+ if (this.currentRecord) {
+ this.redoList.push(this.currentRecord);
+ }
+ // 丢弃当前记录,防止重复添加
+ this.currentRecord = null;
+ //返回撤销的记录
+ return JSON.parse(record);
+ }
+
+ /**
+ * @description: 重做操作
+ * @param {*}
+ * @return {*}
+ */
+ redo() {
+ // 没有重做记录时,返回false
+ if (this.redoList.length === 0) {
+ return false;
+ }
+ //pop(): 方法用于删除并返回数组的最后一个元素。
+ const record = this.redoList.pop();
+ // 添加到重做记录里面
+ if (this.currentRecord) {
+ this.recordList.push(this.currentRecord);
+ }
+ // 丢弃当前记录,防止重复添加
+ this.currentRecord = null;
+
+ return JSON.parse(record);
+ }
+}
diff --git a/report-ui/src/views/screenDesigner/util/screen.js b/report-ui/src/views/screenDesigner/util/screen.js
index 6a7622cc..01196cb1 100644
--- a/report-ui/src/views/screenDesigner/util/screen.js
+++ b/report-ui/src/views/screenDesigner/util/screen.js
@@ -15,6 +15,7 @@ export const handlerLayerWidget = (val, getToolByCode) => {
}
export const handleBigScreen = (data, getToolByCode, callBcak) => {
+ console.log('aa', getToolByCode("screen"))
const optionScreen = getToolByCode("screen").options;
const setup = optionScreen.setup;
for (const key in data) {