|
@@ -1,6 +1,7 @@
|
|
-import {showAlertWin, withDateFormatLength} from "@/utils/cqcy";
|
|
|
|
|
|
+import {getNowFormatDate, showAlertWin, withDateFormatLength} from "@/utils/cqcy";
|
|
import { parseString } from "cron-parser";
|
|
import { parseString } from "cron-parser";
|
|
import html2canvas from "html2canvas";
|
|
import html2canvas from "html2canvas";
|
|
|
|
+import {getUsername} from "@/utils/auth";
|
|
|
|
|
|
function setCellSize(l, e, t, o) {
|
|
function setCellSize(l, e, t, o) {
|
|
const {
|
|
const {
|
|
@@ -331,13 +332,13 @@ function calculateMinutes(time1, time2) {
|
|
function changeValStr(str) {
|
|
function changeValStr(str) {
|
|
if (str) {
|
|
if (str) {
|
|
if ((str + "").startsWith("${")) {
|
|
if ((str + "").startsWith("${")) {
|
|
- return "";
|
|
|
|
|
|
+ return changeBaseVal(str + "");
|
|
} else {
|
|
} else {
|
|
if (str.v && str.v.startsWith("${")) {
|
|
if (str.v && str.v.startsWith("${")) {
|
|
- return "";
|
|
|
|
|
|
+ return changeBaseVal(str.v);
|
|
} else {
|
|
} else {
|
|
if (JSON.stringify(str).startsWith("${")) {
|
|
if (JSON.stringify(str).startsWith("${")) {
|
|
- return "";
|
|
|
|
|
|
+ return changeBaseVal(JSON.stringify(str));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -347,6 +348,21 @@ function changeValStr(str) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function changeBaseVal(str) {
|
|
|
|
+ if (str.indexOf('${currDate}') > -1) {
|
|
|
|
+ return getNowFormatDate('yyyy-MM-dd')
|
|
|
|
+ } else if (str.indexOf('${currDateTime}') > -1) {
|
|
|
|
+ console.log(str)
|
|
|
|
+ return getNowFormatDate('yyyy-MM-dd HH:mm:ss')
|
|
|
|
+ } else if (str.indexOf('${userName}') > -1) {
|
|
|
|
+ return getUsername()
|
|
|
|
+ } else if (str.indexOf('${winUserName}') > -1) {
|
|
|
|
+ return process.env.VUE_APP_WINNAME
|
|
|
|
+ } else {
|
|
|
|
+ return ""
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
function getLegendHeight(clazzw, data){
|
|
function getLegendHeight(clazzw, data){
|
|
var height =0;
|
|
var height =0;
|
|
|
|
|