diff --git a/.collaboration b/.collaboration
index bc4abc5b..8c6598ac 100644
--- a/.collaboration
+++ b/.collaboration
@@ -2290,17 +2290,7 @@
},
{
"ModuleName": "PCPage/工作台首页",
- "State": 1,
- "LockedBy": {
- "UserName": "cuckooent",
- "Email": "phoben@qq.com"
- },
- "LockDateTime": "2024-09-19T21:30:29.1602091+08:00",
- "ModuleType": 1,
- "ToRemoveFiles": [
- "Pages\\工作台\\工作台首页.json",
- "Pages\\工作台\\工作台首页.rd"
- ]
+ "ModuleType": 1
},
{
"ModuleName": "PCPage/项目负荷 (2)",
diff --git a/Pages/工作台/工作台首页.json b/Pages/工作台/工作台首页.json
index 6ecb4ab4..8638ab22 100644
--- a/Pages/工作台/工作台首页.json
+++ b/Pages/工作台/工作台首页.json
@@ -40,7 +40,7 @@
},
"7": {
"GridRowColumnDefinition": {
- "DesignLengthInPixel": 254.0
+ "DesignLengthInPixel": 383.0
}
},
"8": {
@@ -375,7 +375,72 @@
],
"JSONDataSources": [],
"ImageDataSource": [],
- "Config": "{\"option\":\"console.log(Context[\\\"工时表\\\"]);\\nconst {\\n \\\"日期\\\": xAxisData,\\n \\\"总工时\\\": yAxisData\\n} = ForguncyEchartsHelper.splitDataSource(Context[\\\"工时表\\\"]);\\n\\nfunction getDateFormat (value) {\\n // Excel 日期格式的起始日期是 1899-12-30 \\n const excelEpoch = new Date(Date.UTC(1899, 11, 30));\\n // 将整数日期转换为毫秒数 \\n const date = new Date(excelEpoch.getTime() + value * 24 * 60 * 60 * 1000);\\n const year = date.getUTCFullYear();\\n const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');\\n const day = date.getUTCDate().toString().padStart(2, '0');\\n return `${year}-${month}-${day}`;\\n }\\n\\noption = {\\n backgroundColor: 'rgba(0, 0, 0, 0)',\\n title: {\\n text: '报工趋势图', // 设置标题文本 \\n left: 'center', // 标题居中 \\n top: 24, // 标题距离上方24px \\n textStyle: {\\n fontSize: 16, // 标题字体大小 \\n fontWeight: 'bold' // 标题字体加粗 \\n }\\n },\\n grid: {\\n top: 72,\\n left: '24px', // 让图表撑满宽度 \\n right: '24px', // 让图表撑满宽度 \\n bottom: '24px',\\n containLabel: true\\n },\\n xAxis: {\\n type: 'category',\\n data: xAxisData,\\n axisLabel: {\\n formatter: getDateFormat,\\n color: '#abacac' //设置x轴线文本颜色\\n },\\n axisLine: {\\n lineStyle: {\\n color: '#f5f6f6' // 设置 x 轴线条为浅灰色 \\n }\\n },\\n axisTick: {\\n lineStyle: {\\n color: '#f5f6f6' // 设置 x 轴刻度线为浅灰色 \\n }\\n },\\n },\\n yAxis: {\\n type: 'value',\\n axisLabel: {\\n color: '#abacac' // 设置 y 轴刻度文本为浅灰色 \\n },\\n axisLine: {\\n\\n lineStyle: {\\n color: '#f5f6f6' // 设置 y 轴线条为浅灰色 \\n }\\n },\\n axisTick: {\\n\\n lineStyle: {\\n color: '#f5f6f6' // 设置 y 轴刻度线为浅灰色 \\n }\\n },\\n splitLine: {\\n show: true,\\n lineStyle: {\\n color: '#f8fafc'\\n }\\n }\\n },\\n tooltip: {\\n trigger: 'axis',\\n formatter: function (params) {\\n const dateString = getDateFormat(params[0].name);\\n const value = Math.round(params[0].value,1);\\n return `日期:${dateString}
工时:${value}小时`;\\n },\\n backgroundColor: '#FFFFFF',\\n textStyle:{\\n color:'#000000'\\n }\\n },\\n series: [\\n {\\n data: yAxisData,\\n type: 'line',\\n lineStyle: {\\n width: 3, // 折线宽度设置为3 \\n shadowColor: 'rgba(0, 0, 0, 0.1)', // 阴影颜色 \\n shadowBlur: 10, // 阴影模糊尺寸 \\n shadowOffsetX: 0, // 阴影水平偏移 \\n shadowOffsetY: 4 // 阴影垂直偏移 \\n },\\n smooth: true, // 设置为平滑线 \\n symbolSize: 8, // 数据点大小设置为5 \\n symbol: 'none', // 数据点形状设置为圆形 \\n itemStyle: {\\n color: '#2196f3' // 数据点颜色(折线渐变颜色下限) \\n },\\n areaStyle: {\\n // 设置折线下方的渐变 \\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [\\n {\\n offset: 0,\\n color: 'rgba(33,150,243,0.3)' // 渐变色开始,半透明蓝色 \\n },\\n {\\n offset: 1,\\n color: 'rgba(33,150,243,0)' // 渐变色结束,完全透明 \\n }\\n ])\\n }\\n }\\n ]\\n};\",\"graphTheme\":null,\"displayMode\":\"canvas\",\"jsCode\":\"\\n async ({Context,JSONContext,ImageContext,echarts,myChart,dat,Forguncy,d3,setInterval,setTimeout,ForguncyEchartsHelper,PublicResource})=>{\\n var datGUI=undefined;\\n var option={};\\n console.log(Context[\\\"工时表\\\"]);\\nconst { \\\"日期\\\": xAxisData, \\\"总工时\\\": yAxisData } = ForguncyEchartsHelper.splitDataSource(Context[\\\"工时表\\\"]);\\nfunction getDateFormat(value) {\\n // Excel 日期格式的起始日期是 1899-12-30 \\n const excelEpoch = new Date(Date.UTC(1899, 11, 30));\\n // 将整数日期转换为毫秒数 \\n const date = new Date(excelEpoch.getTime() + value * 24 * 60 * 60 * 1000);\\n const year = date.getUTCFullYear();\\n const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');\\n const day = date.getUTCDate().toString().padStart(2, '0');\\n return `${year}-${month}-${day}`;\\n}\\noption = {\\n backgroundColor: 'rgba(0, 0, 0, 0)',\\n title: {\\n text: '报工趋势图',\\n left: 'center',\\n top: 24,\\n textStyle: {\\n fontSize: 16,\\n fontWeight: 'bold' // 标题字体加粗 \\n }\\n },\\n grid: {\\n top: 72,\\n left: '24px',\\n right: '24px',\\n bottom: '24px',\\n containLabel: true\\n },\\n xAxis: {\\n type: 'category',\\n data: xAxisData,\\n axisLabel: {\\n formatter: getDateFormat,\\n color: '#abacac' //设置x轴线文本颜色\\n },\\n axisLine: {\\n lineStyle: {\\n color: '#f5f6f6' // 设置 x 轴线条为浅灰色 \\n }\\n },\\n axisTick: {\\n lineStyle: {\\n color: '#f5f6f6' // 设置 x 轴刻度线为浅灰色 \\n }\\n },\\n },\\n yAxis: {\\n type: 'value',\\n axisLabel: {\\n color: '#abacac' // 设置 y 轴刻度文本为浅灰色 \\n },\\n axisLine: {\\n lineStyle: {\\n color: '#f5f6f6' // 设置 y 轴线条为浅灰色 \\n }\\n },\\n axisTick: {\\n lineStyle: {\\n color: '#f5f6f6' // 设置 y 轴刻度线为浅灰色 \\n }\\n },\\n splitLine: {\\n show: true,\\n lineStyle: {\\n color: '#f8fafc'\\n }\\n }\\n },\\n tooltip: {\\n trigger: 'axis',\\n formatter: function (params) {\\n const dateString = getDateFormat(params[0].name);\\n const value = Math.round(params[0].value, 1);\\n return `日期:${dateString}
工时:${value}小时`;\\n },\\n backgroundColor: '#FFFFFF',\\n textStyle: {\\n color: '#000000'\\n }\\n },\\n series: [\\n {\\n data: yAxisData,\\n type: 'line',\\n lineStyle: {\\n width: 3,\\n shadowColor: 'rgba(0, 0, 0, 0.1)',\\n shadowBlur: 10,\\n shadowOffsetX: 0,\\n shadowOffsetY: 4 // 阴影垂直偏移 \\n },\\n smooth: true,\\n symbolSize: 8,\\n symbol: 'none',\\n itemStyle: {\\n color: '#2196f3' // 数据点颜色(折线渐变颜色下限) \\n },\\n areaStyle: {\\n // 设置折线下方的渐变 \\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [\\n {\\n offset: 0,\\n color: 'rgba(33,150,243,0.3)' // 渐变色开始,半透明蓝色 \\n },\\n {\\n offset: 1,\\n color: 'rgba(33,150,243,0)' // 渐变色结束,完全透明 \\n }\\n ])\\n }\\n }\\n ]\\n};\\n\\n return {\\n option,\\n datGUI,\\n };\\n }\\n \"}"
+ "Config": "{\"option\":\"let completeXAxisData = [];\\nlet completeYAxisData = []\\n\\n// 打印数据源以进行检查\\nconsole.log(\\\"Context['工时表']:\\\", Context[\\\"工时表\\\"]);\\n\\n// 拆分数据源\\nconst splitData = ForguncyEchartsHelper.splitDataSource(Context[\\\"工时表\\\"]);\\nconsole.log(\\\"拆分后的数据:\\\", splitData);\\n\\n// 使用正确的键名\\nconst { \\\"日期\\\": xData, \\\"总工时\\\": yAxisData } = splitData;\\nconsole.log(\\\"xData:\\\", xData);\\nconsole.log(\\\"yAxisData:\\\", yAxisData);\\n\\n// 生成完整的日期范围\\nfunction getDateRange(startDate, endDate) {\\n const dateList = [];\\n let currentDate = new Date(startDate);\\n\\n while (currentDate <= endDate) {\\n const year = currentDate.getFullYear();\\n const month = (\\\"0\\\" + (currentDate.getMonth() + 1)).slice(-2);\\n const day = (\\\"0\\\" + currentDate.getDate()).slice(-2);\\n\\n dateList.push(`${year}-${month}-${day}`);\\n\\n currentDate.setDate(currentDate.getDate() + 1);\\n }\\n return dateList;\\n}\\n\\n// 转换 Excel 日期数字为日期字符串\\nfunction getDateFormat(value) {\\n // 检查是否为数字类型\\n if (typeof value === \\\"number\\\") {\\n // Excel 日期格式的起始日期是 1899-12-30\\n const excelEpoch = new Date(Date.UTC(1899, 11, 30));\\n // 将整数日期转换为毫秒数\\n const date = new Date(\\n excelEpoch.getTime() + value * 24 * 60 * 60 * 1000,\\n );\\n const year = date.getUTCFullYear();\\n const month = (date.getUTCMonth() + 1).toString().padStart(2, \\\"0\\\");\\n const day = date.getUTCDate().toString().padStart(2, \\\"0\\\");\\n return `${year}-${month}-${day}`;\\n } else if (typeof value === \\\"string\\\") {\\n // 如果已经是字符串,则直接返回\\n return value;\\n } else {\\n // 其他情况返回空字符串\\n return \\\"\\\";\\n }\\n}\\n\\n// 检查 xData 和 yAxisData 是否存在并且是数组\\nif (Array.isArray(xData) && Array.isArray(yAxisData)) {\\n\\n // 批量处理日期\\n const xAxisData = xData.map((item) => getDateFormat(item));\\n\\n // 将日期字符串转换为 Date 对象\\n const dateObjects = xAxisData.map((dateStr) => new Date(dateStr));\\n\\n // 检查是否成功转换为有效的日期对象\\n if (dateObjects.some((date) => isNaN(date))) {\\n console.error(\\\"日期格式不正确,请检查日期数据。\\\");\\n return;\\n }\\n\\n // 获取最小和最大日期\\n const timestamps = dateObjects.map((date) => date.getTime());\\n const minTimestamp = Math.min(...timestamps);\\n const maxTimestamp = Math.max(...timestamps);\\n const minDate = new Date(minTimestamp);\\n const maxDate = new Date(maxTimestamp);\\n\\n // 生成完整的日期范围\\n const completeDateRange = getDateRange(minDate, maxDate);\\n\\n // 将原始数据映射为日期和值的键值对\\n const dataMap = {};\\n xAxisData.forEach((date, index) => {\\n dataMap[date] = yAxisData[index];\\n });\\n\\n // 补全缺失的数据\\n completeYAxisData = completeDateRange.map((date) => {\\n return dataMap[date] !== undefined ? dataMap[date] : 0;\\n });\\n\\n // 更新图表的数据\\n completeXAxisData = completeDateRange;\\n} else {\\n console.error(\\\"数据格式不正确,请检查数据源。\\\");\\n}\\n\\n// 配置 Echarts 图表\\noption = {\\n backgroundColor: \\\"rgba(0, 0, 0, 0)\\\",\\n title: {\\n text: \\\"报工趋势图\\\",\\n left: \\\"center\\\",\\n top: 24,\\n textStyle: {\\n fontSize: 16,\\n fontWeight: \\\"bold\\\",\\n },\\n },\\n grid: {\\n top: 72,\\n left: \\\"24px\\\",\\n right: \\\"24px\\\",\\n bottom: \\\"24px\\\",\\n containLabel: true,\\n },\\n xAxis: {\\n type: \\\"category\\\",\\n data: completeXAxisData,\\n axisLabel: {\\n color: \\\"#abacac\\\",\\n },\\n axisLine: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n axisTick: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n },\\n yAxis: {\\n type: \\\"value\\\",\\n axisLabel: {\\n color: \\\"#abacac\\\",\\n },\\n axisLine: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n axisTick: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n splitLine: {\\n show: true,\\n lineStyle: {\\n color: \\\"#f8fafc\\\",\\n },\\n },\\n },\\n tooltip: {\\n trigger: \\\"axis\\\",\\n backgroundColor: \\\"#FFFFFF\\\",\\n textStyle: {\\n color: \\\"#000000\\\",\\n },\\n },\\n series: [\\n {\\n data: completeYAxisData,\\n type: \\\"line\\\",\\n lineStyle: {\\n width: 3,\\n shadowColor: \\\"rgba(0, 0, 0, 0.1)\\\",\\n shadowBlur: 10,\\n shadowOffsetX: 0,\\n shadowOffsetY: 4,\\n },\\n smooth: true,\\n symbolSize: 8,\\n symbol: \\\"none\\\",\\n itemStyle: {\\n color: \\\"#2196f3\\\",\\n },\\n areaStyle: {\\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [\\n {\\n offset: 0,\\n color: \\\"rgba(33,150,243,0.3)\\\",\\n },\\n {\\n offset: 1,\\n color: \\\"rgba(33,150,243,0)\\\",\\n },\\n ]),\\n },\\n },\\n ],\\n};\\n\",\"graphTheme\":null,\"displayMode\":\"canvas\",\"jsCode\":\"\\n async ({Context,JSONContext,ImageContext,echarts,myChart,dat,Forguncy,d3,setInterval,setTimeout,ForguncyEchartsHelper,PublicResource})=>{\\n var datGUI=undefined;\\n var option={};\\n let completeXAxisData = [];\\nlet completeYAxisData = [];\\n// 打印数据源以进行检查\\nconsole.log(\\\"Context['工时表']:\\\", Context[\\\"工时表\\\"]);\\n// 拆分数据源\\nconst splitData = ForguncyEchartsHelper.splitDataSource(Context[\\\"工时表\\\"]);\\nconsole.log(\\\"拆分后的数据:\\\", splitData);\\n// 使用正确的键名\\nconst { \\\"日期\\\": xData, \\\"总工时\\\": yAxisData } = splitData;\\nconsole.log(\\\"xData:\\\", xData);\\nconsole.log(\\\"yAxisData:\\\", yAxisData);\\n// 生成完整的日期范围\\nfunction getDateRange(startDate, endDate) {\\n const dateList = [];\\n let currentDate = new Date(startDate);\\n while (currentDate <= endDate) {\\n const year = currentDate.getFullYear();\\n const month = (\\\"0\\\" + (currentDate.getMonth() + 1)).slice(-2);\\n const day = (\\\"0\\\" + currentDate.getDate()).slice(-2);\\n dateList.push(`${year}-${month}-${day}`);\\n currentDate.setDate(currentDate.getDate() + 1);\\n }\\n return dateList;\\n}\\n// 转换 Excel 日期数字为日期字符串\\nfunction getDateFormat(value) {\\n // 检查是否为数字类型\\n if (typeof value === \\\"number\\\") {\\n // Excel 日期格式的起始日期是 1899-12-30\\n const excelEpoch = new Date(Date.UTC(1899, 11, 30));\\n // 将整数日期转换为毫秒数\\n const date = new Date(excelEpoch.getTime() + value * 24 * 60 * 60 * 1000);\\n const year = date.getUTCFullYear();\\n const month = (date.getUTCMonth() + 1).toString().padStart(2, \\\"0\\\");\\n const day = date.getUTCDate().toString().padStart(2, \\\"0\\\");\\n return `${year}-${month}-${day}`;\\n }\\n else if (typeof value === \\\"string\\\") {\\n // 如果已经是字符串,则直接返回\\n return value;\\n }\\n else {\\n // 其他情况返回空字符串\\n return \\\"\\\";\\n }\\n}\\n// 检查 xData 和 yAxisData 是否存在并且是数组\\nif (Array.isArray(xData) && Array.isArray(yAxisData)) {\\n // 批量处理日期\\n const xAxisData = xData.map((item) => getDateFormat(item));\\n // 将日期字符串转换为 Date 对象\\n const dateObjects = xAxisData.map((dateStr) => new Date(dateStr));\\n // 检查是否成功转换为有效的日期对象\\n if (dateObjects.some((date) => isNaN(date))) {\\n console.error(\\\"日期格式不正确,请检查日期数据。\\\");\\n return;\\n }\\n // 获取最小和最大日期\\n const timestamps = dateObjects.map((date) => date.getTime());\\n const minTimestamp = Math.min(...timestamps);\\n const maxTimestamp = Math.max(...timestamps);\\n const minDate = new Date(minTimestamp);\\n const maxDate = new Date(maxTimestamp);\\n // 生成完整的日期范围\\n const completeDateRange = getDateRange(minDate, maxDate);\\n // 将原始数据映射为日期和值的键值对\\n const dataMap = {};\\n xAxisData.forEach((date, index) => {\\n dataMap[date] = yAxisData[index];\\n });\\n // 补全缺失的数据\\n completeYAxisData = completeDateRange.map((date) => {\\n return dataMap[date] !== undefined ? dataMap[date] : 0;\\n });\\n // 更新图表的数据\\n completeXAxisData = completeDateRange;\\n}\\nelse {\\n console.error(\\\"数据格式不正确,请检查数据源。\\\");\\n}\\n// 配置 Echarts 图表\\noption = {\\n backgroundColor: \\\"rgba(0, 0, 0, 0)\\\",\\n title: {\\n text: \\\"报工趋势图\\\",\\n left: \\\"center\\\",\\n top: 24,\\n textStyle: {\\n fontSize: 16,\\n fontWeight: \\\"bold\\\",\\n },\\n },\\n grid: {\\n top: 72,\\n left: \\\"24px\\\",\\n right: \\\"24px\\\",\\n bottom: \\\"24px\\\",\\n containLabel: true,\\n },\\n xAxis: {\\n type: \\\"category\\\",\\n data: completeXAxisData,\\n axisLabel: {\\n color: \\\"#abacac\\\",\\n },\\n axisLine: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n axisTick: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n },\\n yAxis: {\\n type: \\\"value\\\",\\n axisLabel: {\\n color: \\\"#abacac\\\",\\n },\\n axisLine: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n axisTick: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n },\\n splitLine: {\\n show: true,\\n lineStyle: {\\n color: \\\"#f8fafc\\\",\\n },\\n },\\n },\\n tooltip: {\\n trigger: \\\"axis\\\",\\n backgroundColor: \\\"#FFFFFF\\\",\\n textStyle: {\\n color: \\\"#000000\\\",\\n },\\n },\\n series: [\\n {\\n data: completeYAxisData,\\n type: \\\"line\\\",\\n lineStyle: {\\n width: 3,\\n shadowColor: \\\"rgba(0, 0, 0, 0.1)\\\",\\n shadowBlur: 10,\\n shadowOffsetX: 0,\\n shadowOffsetY: 4,\\n },\\n smooth: true,\\n symbolSize: 8,\\n symbol: \\\"none\\\",\\n itemStyle: {\\n color: \\\"#2196f3\\\",\\n },\\n areaStyle: {\\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [\\n {\\n offset: 0,\\n color: \\\"rgba(33,150,243,0.3)\\\",\\n },\\n {\\n offset: 1,\\n color: \\\"rgba(33,150,243,0)\\\",\\n },\\n ]),\\n },\\n },\\n ],\\n};\\n\\n return {\\n option,\\n datGUI,\\n };\\n }\\n \"}"
+ }
+ },
+ "7,1": {
+ "CellType": {
+ "$type": "EchartsCustomCellType.EchartsCustomCellTypeCellType, EchartsCustomCellType",
+ "EChartTitle": "工时排行榜",
+ "DataSourceBinding": "DataSources",
+ "DataSources": [
+ {
+ "Name": "工时统计",
+ "BindingTableOptions": {
+ "$type": "ServerDesignerCommon.Model.BindingDataSourceModel, ServerDesignerCommon",
+ "TableName": "人员工时统计视图",
+ "BindingInfos": [
+ {
+ "GUID": "8b699743-3aa9-4d92-9903-befbec0b7e5a",
+ "BindingInfo": {
+ "TableName": "人员工时统计视图",
+ "ColumnName": "执行人",
+ "GUID": "49a350f1-88a5-4b57-98c5-e44bfde1da05",
+ "AttachType": {
+ "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
+ "UserColumnAttachType": 1
+ }
+ },
+ "ColumnName": "执行人"
+ },
+ {
+ "GUID": "b5a5da98-fe34-4196-a0c4-f8aaf698b575",
+ "BindingInfo": {
+ "TableName": "人员工时统计视图",
+ "ColumnName": "总上报工时",
+ "GUID": "0b45d04d-ee59-47c1-8dea-3794517e6f8f"
+ },
+ "ColumnName": "总上报工时"
+ },
+ {
+ "GUID": "7ca1cd9f-08c4-4384-93e5-176c41214704",
+ "BindingInfo": {
+ "TableName": "人员工时统计视图",
+ "ColumnName": "总核定工时",
+ "GUID": "1658227e-885b-4186-8624-4357b8d11b58"
+ },
+ "ColumnName": "总核定工时"
+ }
+ ],
+ "OrderBySqlCondition": {
+ "OrderByColumns": [
+ {
+ "ColumnBindingInfo": {
+ "TableName": "人员工时统计视图",
+ "ColumnName": "总上报工时",
+ "GUID": "68e4253e-8c7e-44c0-95e7-a3bd293eee65"
+ },
+ "Order": 1
+ }
+ ]
+ },
+ "CustomColumns": []
+ }
+ }
+ ],
+ "JSONDataSources": [],
+ "ImageDataSource": [],
+ "Config": "{\"option\":\"// 获取数据源并拆分数据 \\nvar sourceData = Context[\\\"工时统计\\\"];\\nvar splitData = ForguncyEchartsHelper.splitDataSource(sourceData);\\n\\n// 将数据保留到1位小数 \\nfor (var key in splitData) {\\n if (key !== \\\"执行人\\\") {\\n splitData[key] = splitData[key].map(function (value) {\\n return parseFloat(value.toFixed(1));\\n });\\n }\\n}\\n\\n// 将数据按照「总上报工时」降序序 \\nvar indices = splitData[\\\"总上报工时\\\"]\\n .map(function (value, index) { return index; })\\n .sort(function (a, b) { return splitData[\\\"总上报工时\\\"][b] - splitData[\\\"总上报工时\\\"][a]; });\\n\\n// 根据排序后的索引重组数据 \\nvar xData = indices.map(function (index) { return splitData[\\\"执行人\\\"][index]; });\\nvar totalReported = indices.map(function (index) { return splitData[\\\"总上报工时\\\"][index]; });\\nvar totalApproved = indices.map(function (index) { return splitData[\\\"总核定工时\\\"][index]; });\\nvar difference = totalReported.map(function (value, index) {\\n return parseFloat((value - totalApproved[index]).toFixed(1));\\n});\\n\\n// 配置 Echarts 的 option \\noption = {\\n backgroundColor: \\\"rgba(0, 0, 0, 0)\\\",\\n title: {\\n text: \\\"工时排行榜\\\",\\n left: \\\"center\\\",\\n top: 24,\\n textStyle: {\\n fontSize: 16,\\n fontWeight: \\\"bold\\\",\\n },\\n },\\n grid: {\\n top: 72,\\n left: \\\"24px\\\",\\n right: \\\"24px\\\",\\n bottom: \\\"24px\\\",\\n containLabel: true,\\n },\\n tooltip: {\\n trigger: 'axis',\\n axisPointer: { type: 'shadow' },\\n formatter: function (params) {\\n return params[0].name + '
' + params[0].seriesName + ':' + params[0].value + '小时' + '
' + params[1].seriesName + ':' + params[1].value;\\n }\\n },\\n legend: {\\n show: false\\n },\\n xAxis: {\\n type: 'category',\\n data: xData,\\n },\\n yAxis: {\\n type: 'value',\\n axisLine: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n }\\n },\\n series: [\\n {\\n name: '总核定工时',\\n type: 'bar',\\n stack: '总量',\\n data: totalApproved,\\n itemStyle: {\\n color: '#63b5f6',\\n borderRadius:\\\"8px\\\"\\n },\\n label: {\\n show: true,\\n position: 'inside',\\n formatter: '{c}小时',\\n color: '#fff',\\n fontSize: 16\\n }\\n },\\n {\\n name: '未核定工时',\\n type: 'bar',\\n stack: '总量',\\n data: difference,\\n itemStyle: {\\n color: '#2196f3',\\n borderRadius:\\\"8px\\\"\\n },\\n label: {\\n show: true,\\n position: 'inside',\\n formatter: function (params) {\\n if (params.value > 0) {\\n return params.value + '小时';\\n } else {\\n return '';\\n }\\n },\\n color: '#fff',\\n fontSize: 16\\n }\\n }\\n ]\\n}; \",\"graphTheme\":null,\"displayMode\":\"canvas\",\"jsCode\":\"\\n async ({Context,JSONContext,ImageContext,echarts,myChart,dat,Forguncy,d3,setInterval,setTimeout,ForguncyEchartsHelper,PublicResource})=>{\\n var datGUI=undefined;\\n var option={};\\n // 获取数据源并拆分数据 \\nvar sourceData = Context[\\\"工时统计\\\"];\\nvar splitData = ForguncyEchartsHelper.splitDataSource(sourceData);\\n// 将数据保留到1位小数 \\nfor (var key in splitData) {\\n if (key !== \\\"执行人\\\") {\\n splitData[key] = splitData[key].map(function (value) {\\n return parseFloat(value.toFixed(1));\\n });\\n }\\n}\\n// 将数据按照「总上报工时」降序序 \\nvar indices = splitData[\\\"总上报工时\\\"]\\n .map(function (value, index) { return index; })\\n .sort(function (a, b) { return splitData[\\\"总上报工时\\\"][b] - splitData[\\\"总上报工时\\\"][a]; });\\n// 根据排序后的索引重组数据 \\nvar xData = indices.map(function (index) { return splitData[\\\"执行人\\\"][index]; });\\nvar totalReported = indices.map(function (index) { return splitData[\\\"总上报工时\\\"][index]; });\\nvar totalApproved = indices.map(function (index) { return splitData[\\\"总核定工时\\\"][index]; });\\nvar difference = totalReported.map(function (value, index) {\\n return parseFloat((value - totalApproved[index]).toFixed(1));\\n});\\n// 配置 Echarts 的 option \\noption = {\\n backgroundColor: \\\"rgba(0, 0, 0, 0)\\\",\\n title: {\\n text: \\\"工时排行榜\\\",\\n left: \\\"center\\\",\\n top: 24,\\n textStyle: {\\n fontSize: 16,\\n fontWeight: \\\"bold\\\",\\n },\\n },\\n grid: {\\n top: 72,\\n left: \\\"24px\\\",\\n right: \\\"24px\\\",\\n bottom: \\\"24px\\\",\\n containLabel: true,\\n },\\n tooltip: {\\n trigger: 'axis',\\n axisPointer: { type: 'shadow' },\\n formatter: function (params) {\\n return params[0].name + '
' + params[0].seriesName + ':' + params[0].value + '小时' + '
' + params[1].seriesName + ':' + params[1].value;\\n }\\n },\\n legend: {\\n show: false\\n },\\n xAxis: {\\n type: 'category',\\n data: xData,\\n },\\n yAxis: {\\n type: 'value',\\n axisLine: {\\n lineStyle: {\\n color: \\\"#f5f6f6\\\",\\n },\\n }\\n },\\n series: [\\n {\\n name: '总核定工时',\\n type: 'bar',\\n stack: '总量',\\n data: totalApproved,\\n itemStyle: {\\n color: '#63b5f6',\\n borderRadius: \\\"8px\\\"\\n },\\n label: {\\n show: true,\\n position: 'inside',\\n formatter: '{c}小时',\\n color: '#fff',\\n fontSize: 16\\n }\\n },\\n {\\n name: '未核定工时',\\n type: 'bar',\\n stack: '总量',\\n data: difference,\\n itemStyle: {\\n color: '#2196f3',\\n borderRadius: \\\"8px\\\"\\n },\\n label: {\\n show: true,\\n position: 'inside',\\n formatter: function (params) {\\n if (params.value > 0) {\\n return params.value + '小时';\\n }\\n else {\\n return '';\\n }\\n },\\n color: '#fff',\\n fontSize: 16\\n }\\n }\\n ]\\n};\\n\\n return {\\n option,\\n datGUI,\\n };\\n }\\n \"}"
}
}
},
@@ -406,12 +471,12 @@
},
"Spans": [
"1,38,3,1",
- "7,1,1,36",
"9,1,1,36",
"5,38,5,1",
"1,1,1,36",
"3,1,1,36",
- "5,1,1,36"
+ "5,1,1,36",
+ "7,1,1,36"
],
"PageInfo": {
"$type": "Forguncy.Model.Pages.NormalPage, ServerDesignerCommon",
@@ -455,7 +520,7 @@
"Fill": "Background 2 0"
},
"IsAutomaticFill": false,
- "Size": "1530,1095"
+ "Size": "1530,1224"
},
{
"Name": "0f5baa2c-2dec-44c7-8a3f-45868371fe7b.png",
@@ -488,7 +553,7 @@
},
"IsAutomaticFill": false,
"Location": "1186,220",
- "Size": "320,828"
+ "Size": "320,957"
},
{
"Name": "9585c733-c922-4ba2-8923-e5c50a4f429c.png",
@@ -499,7 +564,7 @@
},
"IsAutomaticFill": false,
"Location": "24,530",
- "Size": "1152,254"
+ "Size": "1152,383"
},
{
"Name": "cc656816-79e5-4f40-957c-c72753c75e5d.png",
@@ -509,8 +574,8 @@
"Fill": "Background 1 0"
},
"IsAutomaticFill": false,
- "Location": "24,794",
+ "Location": "24,923",
"Size": "1152,254"
}
]
-}//SqAWmRo82JPc+EC/YSqdzJC4TID/EXZuy7hGnIY0j9HkU4sjZCujrnm3+C6xjZk2MIScP/4yneBGB54zldvnFGkVxWidozM+KEmk/APrU06cXYCNfJAmfkHuKCVNQ0nbfHc50OnjyNOGgCFFVbJrN8iJr4ppoTUBWeS6uNRgazj8D/k30MimDW62s4qIxXcCoGgYcjJrDWdraCzzQcxwnpqyvuRZ4VTuyLE2oEsCzZlTBJfyRy0AbH8t8CAzXbGW1jvdYJEQJdcT27mvKFtCnd9XdzdzwMeJSnd5xi1UmSGRlS0b3+mcU4hWwRFoTyeY5szqEXwYo2mXBhZ6DWZoTuPYxEtyCBKCsZjwOJ0O5A8HFREZQuKiHKYjwjG9h+ysoLgKA/8G6uzhMYsxzEH/4GN8lU5VRGbsK2FDOsgsGKQmYAfFCmRtUzUrmvuNjvQ2z76eO6ypvMX6jUjRZzt/xx5UBS4Wj9RYiIW8Hbc+ibSs6dkWX4fCmREtRyfZOwFgYPfUMiEZAXwKuaiyL7rW2o6rZvEpH05AuaqmdSpVisU7h68YktRyX3bsUJNsWAJ8iKAECA1R+m0NWHYeWMGYQJ2/fjhHdwh2NCrAOYJMa701GLwPywV4fW2+2+DXGLmmTIj+jQFCjOihE1Wvy7VB63LVasSzuNcDSdV/dGN0QBWyP4w3xe9E/W+vk6quni84gj7W1MoLEBf+mJvXDgoOnTVWY/tBHmzgzCPHTMMzURtpRN45AsL7hniRBIaWSvdv0e0r3u+YR93cpuOmfdCgHomyq3YnIcxTk4gvoWV1a2AGSH9EiHpxNJL2i+pJYiK3hf4vzuXWSU8n+aYZwU7OxdG9UPQum5FoYbSw8xi+ojyfLcdHBoUtgF1veO0xGBdU635c1+pbQPUI4JcgEWT9Tg==|920
\ No newline at end of file
+}//jJtbpG5bi3OhfmXS4IuMz/f6kCI1nPw8t73urZvhGRL5Id2pNSvVG5sy11pD0I+m+VP1IlGrGzY723aLHZPL29PaLODtXkdA2+kCX5yPNnrUfdqlXMDzIvra5Qzy9/SHoNEwD6VJk7D377aX6xmIHeG+nOBBvcMkd3JclviEZAilHLLyIARYOIWPPILVHnX1UmxWVYwrplZQKsz+3OhFGnEb16N95/Bx466jpdFY7IV0fdSw8gaJgEPDZjtpb+m4dp69Djdp+KGOw/2JivuNTKET49ALbsWW+f53jBIKHSlhxhi8dEvf/DT13lZXfjHZVI47bDz5Z8MPPG3f3V+cKGe9XAe8V2oaJRMV0al4anN9jrTkH9GxbLZ4kxLD9OMHvWHgpPyThshxn+IPNE/8ud4Csqj+48FEY6udSK2LmseaB/7fB7gchUBNa7NLy8pmkz1urunIpsB4PPVPGkzHcECdWMjkjHpA8pFV7uyRU58ZZ2/sNk/kYLaiONDmJRpeVn4743RT5vpnNeYOW60GsYLpR9ZYK0/QI52xMhzJ1BjSsylWG/GpzL0ujbWedFPAmWi5V9G/lZZQcc8ADcHt8Ic1/c5zK/PXzreEPeZsHbI6/KpxAwfoeLQ0byhO7BZOKb+ztOxT2jgobWY+aDHRKPb4B4OzaDf0M+nq4fpNavLgON3zC42ePtmpsUc4yM40g3Wya6J6fdmoQKIOY9SwVJBnJAIFG4HRH6J12mMHcTDpYxjI5HVooGgM4oHzn3aHKvJEnulUL6ccA9UGcr3nWnsjoeruZtC+IWcPCYuAWhxsHZYm9GPiU1qgrjXdTWSXxSwlG56cMgvcI6YKF7YKcXtbVdzPTjRdjQugVhMUwGdOyU++5/2zlCmGWkKmBrRpMjZMqP+UmXabZGE+LGshBQ==|920
\ No newline at end of file