|
@@ -143,7 +143,7 @@
|
|
|
>
|
|
|
月度
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="fzylyxslistM"
|
|
@@ -191,7 +191,7 @@
|
|
|
>
|
|
|
年度
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="fzylyxslistY"
|
|
@@ -245,7 +245,7 @@
|
|
|
>
|
|
|
月度
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="dlcylistM"
|
|
@@ -279,7 +279,7 @@
|
|
|
>
|
|
|
年度
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="dlcylistY"
|
|
@@ -398,7 +398,7 @@
|
|
|
>
|
|
|
3.五大损失电量分析
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="wdssdlfx"
|
|
@@ -533,7 +533,7 @@
|
|
|
:style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
(4)受累损失电量分析
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div >
|
|
|
<el-table class="toolSty" :data="curve" border
|
|
|
style="width: 100%; margin: 10px 0">
|
|
|
<el-table-column prop="section" align="center" label="月份" />
|
|
@@ -602,7 +602,7 @@
|
|
|
>
|
|
|
4.各风场风机可利用率对比分析
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="fjklyl"
|
|
@@ -666,7 +666,7 @@
|
|
|
>
|
|
|
5.能耗指标分析(风电)
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="nhzbfxlist"
|
|
@@ -721,7 +721,7 @@
|
|
|
>
|
|
|
6.“两个细则”考核情况
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="twoxize"
|
|
@@ -768,7 +768,7 @@
|
|
|
>
|
|
|
1.繁食沟风电场
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="fanshigouXN"
|
|
@@ -814,7 +814,7 @@
|
|
|
>
|
|
|
2.草山梁风电场
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="caoshaniangXN"
|
|
@@ -859,7 +859,7 @@
|
|
|
>
|
|
|
3.吉山梁风电场
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="jishanliangXN"
|
|
@@ -904,7 +904,7 @@
|
|
|
>
|
|
|
4.左庄风电场
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="zuozhuangXN"
|
|
@@ -939,7 +939,7 @@
|
|
|
>
|
|
|
5.新庄风电场
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="xingzhuangXN"
|
|
@@ -979,7 +979,7 @@
|
|
|
>
|
|
|
6.雷家山风场
|
|
|
</h3>
|
|
|
- <div class="warn-table">
|
|
|
+ <div>
|
|
|
<el-table
|
|
|
class="toolSty"
|
|
|
:data="leijiashanXN"
|
|
@@ -1082,162 +1082,158 @@ export default {
|
|
|
httpRequest
|
|
|
.get(`/MeetingReport/Analysisreport?time=${this.reportParamDate}`)
|
|
|
.then((tempRes) => {
|
|
|
- this.exportWORDChange(tempRes)
|
|
|
- }).catch(() => {
|
|
|
- this.exportWORDChange({ data: jsonData.reportData });
|
|
|
- });
|
|
|
+ this.exportWORDChange(tempRes);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.exportWORDChange({ data: jsonData.reportData });
|
|
|
+ });
|
|
|
},
|
|
|
exportWORDChange(tempRes) {
|
|
|
- tempRes.data.titleYear = tempRes.data.title.year;
|
|
|
- tempRes.data.titleMonth = tempRes.data.title.month;
|
|
|
- tempRes.data.titleName = tempRes.data.title.name;
|
|
|
- tempRes.data.dlcylistM = [];
|
|
|
- tempRes.data.dlcylistY = [];
|
|
|
- tempRes.data.wdssBase = [];
|
|
|
- tempRes.data.wdssSum = [];
|
|
|
+ tempRes.data.titleYear = tempRes.data.title.year;
|
|
|
+ tempRes.data.titleMonth = tempRes.data.title.month;
|
|
|
+ tempRes.data.titleName = tempRes.data.title.name;
|
|
|
+ tempRes.data.dlcylistM = [];
|
|
|
+ tempRes.data.dlcylistY = [];
|
|
|
+ tempRes.data.wdssBase = [];
|
|
|
+ tempRes.data.wdssSum = [];
|
|
|
|
|
|
- tempRes.data.dlcylist.forEach((it) => {
|
|
|
- if (it.cycleType === "M") {
|
|
|
- tempRes.data.dlcylistM.push(it);
|
|
|
- } else if (it.cycleType === "Y") {
|
|
|
- tempRes.data.dlcylistY.push(it);
|
|
|
- }
|
|
|
- });
|
|
|
+ tempRes.data.dlcylist.forEach((it) => {
|
|
|
+ if (it.cycleType === "M") {
|
|
|
+ tempRes.data.dlcylistM.push(it);
|
|
|
+ } else if (it.cycleType === "Y") {
|
|
|
+ tempRes.data.dlcylistY.push(it);
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- tempRes.data.wdssdlfx.forEach((ele) => {
|
|
|
- const cycleType = ele.cycleType;
|
|
|
- const wpName = ele.windpowerstationName;
|
|
|
- const findRes = tempRes.data.wdssBase.find((findEle) => {
|
|
|
- return findEle.windpowerstationId === ele.windpowerstationId;
|
|
|
- });
|
|
|
- if (findRes) {
|
|
|
- findRes[`gzssdl${cycleType}`] = ele.gzssdl;
|
|
|
- findRes[`jhssdl${cycleType}`] = ele.jhssdl;
|
|
|
- findRes[`xdssdl${cycleType}`] = ele.xdssdl;
|
|
|
- findRes[`slssdl${cycleType}`] = ele.slssdl;
|
|
|
- findRes[`xnssdl${cycleType}`] = ele.xnssdl;
|
|
|
- findRes[`zhj${cycleType}`] = ele.zhj;
|
|
|
- findRes[`hj${cycleType}`] = ele.hj;
|
|
|
- findRes[`tqgzssdl${cycleType}`] = ele.tqgzssdl;
|
|
|
- findRes[`tqjhssdl${cycleType}`] = ele.tqjhssdl;
|
|
|
- findRes[`tqxdssdl${cycleType}`] = ele.tqxdssdl;
|
|
|
- findRes[`tqslssdl${cycleType}`] = ele.tqslssdl;
|
|
|
- findRes[`tqxnssdl${cycleType}`] = ele.tqxnssdl;
|
|
|
- findRes[`tqzhj${cycleType}`] = ele.tqzhj;
|
|
|
- findRes[`tqhj${cycleType}`] = ele.tqhj;
|
|
|
- } else {
|
|
|
- ele[`gzssdl${wpName === "合计" ? "" : cycleType}`] = ele.gzssdl;
|
|
|
- ele[`jhssdl${wpName === "合计" ? "" : cycleType}`] = ele.jhssdl;
|
|
|
- ele[`xdssdl${wpName === "合计" ? "" : cycleType}`] = ele.xdssdl;
|
|
|
- ele[`slssdl${wpName === "合计" ? "" : cycleType}`] = ele.slssdl;
|
|
|
- ele[`xnssdl${wpName === "合计" ? "" : cycleType}`] = ele.xnssdl;
|
|
|
- ele[`zhj${wpName === "合计" ? "" : cycleType}`] = ele.zhj;
|
|
|
- ele[`hj${wpName === "合计" ? "" : cycleType}`] = ele.hj;
|
|
|
- ele[`tqgzssdl${wpName === "合计" ? "" : cycleType}`] =
|
|
|
- ele.tqgzssdl;
|
|
|
- ele[`tqjhssdl${wpName === "合计" ? "" : cycleType}`] =
|
|
|
- ele.tqjhssdl;
|
|
|
- ele[`tqxdssdl${wpName === "合计" ? "" : cycleType}`] =
|
|
|
- ele.tqxdssdl;
|
|
|
- ele[`tqslssdl${wpName === "合计" ? "" : cycleType}`] =
|
|
|
- ele.tqslssdl;
|
|
|
- ele[`tqxnssdl${wpName === "合计" ? "" : cycleType}`] =
|
|
|
- ele.tqxnssdl;
|
|
|
- ele[`tqzhj${wpName === "合计" ? "" : cycleType}`] = ele.tqzhj;
|
|
|
- ele[`tqhj${wpName === "合计" ? "" : cycleType}`] = ele.tqhj;
|
|
|
- ele.wpName = ele.windpowerstationName;
|
|
|
+ tempRes.data.wdssdlfx.forEach((ele) => {
|
|
|
+ const cycleType = ele.cycleType;
|
|
|
+ const wpName = ele.windpowerstationName;
|
|
|
+ const findRes = tempRes.data.wdssBase.find((findEle) => {
|
|
|
+ return findEle.windpowerstationId === ele.windpowerstationId;
|
|
|
+ });
|
|
|
+ if (findRes) {
|
|
|
+ findRes[`gzssdl${cycleType}`] = ele.gzssdl;
|
|
|
+ findRes[`jhssdl${cycleType}`] = ele.jhssdl;
|
|
|
+ findRes[`xdssdl${cycleType}`] = ele.xdssdl;
|
|
|
+ findRes[`slssdl${cycleType}`] = ele.slssdl;
|
|
|
+ findRes[`xnssdl${cycleType}`] = ele.xnssdl;
|
|
|
+ findRes[`zhj${cycleType}`] = ele.zhj;
|
|
|
+ findRes[`hj${cycleType}`] = ele.hj;
|
|
|
+ findRes[`tqgzssdl${cycleType}`] = ele.tqgzssdl;
|
|
|
+ findRes[`tqjhssdl${cycleType}`] = ele.tqjhssdl;
|
|
|
+ findRes[`tqxdssdl${cycleType}`] = ele.tqxdssdl;
|
|
|
+ findRes[`tqslssdl${cycleType}`] = ele.tqslssdl;
|
|
|
+ findRes[`tqxnssdl${cycleType}`] = ele.tqxnssdl;
|
|
|
+ findRes[`tqzhj${cycleType}`] = ele.tqzhj;
|
|
|
+ findRes[`tqhj${cycleType}`] = ele.tqhj;
|
|
|
+ } else {
|
|
|
+ ele[`gzssdl${wpName === "合计" ? "" : cycleType}`] = ele.gzssdl;
|
|
|
+ ele[`jhssdl${wpName === "合计" ? "" : cycleType}`] = ele.jhssdl;
|
|
|
+ ele[`xdssdl${wpName === "合计" ? "" : cycleType}`] = ele.xdssdl;
|
|
|
+ ele[`slssdl${wpName === "合计" ? "" : cycleType}`] = ele.slssdl;
|
|
|
+ ele[`xnssdl${wpName === "合计" ? "" : cycleType}`] = ele.xnssdl;
|
|
|
+ ele[`zhj${wpName === "合计" ? "" : cycleType}`] = ele.zhj;
|
|
|
+ ele[`hj${wpName === "合计" ? "" : cycleType}`] = ele.hj;
|
|
|
+ ele[`tqgzssdl${wpName === "合计" ? "" : cycleType}`] = ele.tqgzssdl;
|
|
|
+ ele[`tqjhssdl${wpName === "合计" ? "" : cycleType}`] = ele.tqjhssdl;
|
|
|
+ ele[`tqxdssdl${wpName === "合计" ? "" : cycleType}`] = ele.tqxdssdl;
|
|
|
+ ele[`tqslssdl${wpName === "合计" ? "" : cycleType}`] = ele.tqslssdl;
|
|
|
+ ele[`tqxnssdl${wpName === "合计" ? "" : cycleType}`] = ele.tqxnssdl;
|
|
|
+ ele[`tqzhj${wpName === "合计" ? "" : cycleType}`] = ele.tqzhj;
|
|
|
+ ele[`tqhj${wpName === "合计" ? "" : cycleType}`] = ele.tqhj;
|
|
|
+ ele.wpName = ele.windpowerstationName;
|
|
|
|
|
|
- if (ele.windpowerstationName !== "合计") {
|
|
|
- tempRes.data.wdssBase.push(ele);
|
|
|
- } else {
|
|
|
- ele.wpName =
|
|
|
- cycleType === "M" ? `月${ele.wpName}` : `年${ele.wpName}`;
|
|
|
- tempRes.data.wdssSum.push(ele);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ if (ele.windpowerstationName !== "合计") {
|
|
|
+ tempRes.data.wdssBase.push(ele);
|
|
|
+ } else {
|
|
|
+ ele.wpName =
|
|
|
+ cycleType === "M" ? `月${ele.wpName}` : `年${ele.wpName}`;
|
|
|
+ tempRes.data.wdssSum.push(ele);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- const lgxzList = [];
|
|
|
- twoxizeJson?.data?.forEach((ele) => {
|
|
|
- const findRes = lgxzList.find((findEle) => {
|
|
|
- return ele.wpid === findEle.wpid;
|
|
|
- });
|
|
|
- if (findRes) {
|
|
|
- ele.wpid = "";
|
|
|
- findRes.list.push(ele);
|
|
|
- } else {
|
|
|
- lgxzList.push({
|
|
|
- wpid: ele.wpid,
|
|
|
- list: [ele],
|
|
|
- });
|
|
|
- }
|
|
|
+ const lgxzList = [];
|
|
|
+ twoxizeJson?.data?.forEach((ele) => {
|
|
|
+ const findRes = lgxzList.find((findEle) => {
|
|
|
+ return ele.wpid === findEle.wpid;
|
|
|
+ });
|
|
|
+ if (findRes) {
|
|
|
+ ele.wpid = "";
|
|
|
+ findRes.list.push(ele);
|
|
|
+ } else {
|
|
|
+ lgxzList.push({
|
|
|
+ wpid: ele.wpid,
|
|
|
+ list: [ele],
|
|
|
});
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- tempRes.data.twoxize = lgxzList;
|
|
|
+ tempRes.data.twoxize = lgxzList;
|
|
|
|
|
|
- const xnzbdbfx = [];
|
|
|
- let xnzbdbfxIdx = 1;
|
|
|
- for (let wpName in tempRes.data.xnzbdbfx) {
|
|
|
- let xnzb = "";
|
|
|
- if (wpName === "吉山梁风电场") {
|
|
|
- xnzb = tempRes.data.xnzbjsl;
|
|
|
- } else if (wpName === "左庄风电场") {
|
|
|
- xnzb = tempRes.data.xnzbzz;
|
|
|
- } else if (wpName === "新庄风电场") {
|
|
|
- xnzb = tempRes.data.xnzbxz;
|
|
|
- } else if (wpName === "繁食沟风电场") {
|
|
|
- xnzb = tempRes.data.xnzbfsg;
|
|
|
- } else if (wpName === "草山梁风电场") {
|
|
|
- xnzb = tempRes.data.xnzbcsl;
|
|
|
- } else if (wpName === "雷家山风电场") {
|
|
|
- xnzb = tempRes.data.xnzbljs;
|
|
|
- }
|
|
|
- xnzbdbfx.push({
|
|
|
- wpName: `${xnzbdbfxIdx}.${wpName}`,
|
|
|
- list: tempRes.data.xnzbdbfx[wpName],
|
|
|
- xnzb,
|
|
|
- });
|
|
|
- xnzbdbfxIdx++;
|
|
|
- }
|
|
|
+ const xnzbdbfx = [];
|
|
|
+ let xnzbdbfxIdx = 1;
|
|
|
+ for (let wpName in tempRes.data.xnzbdbfx) {
|
|
|
+ let xnzb = "";
|
|
|
+ if (wpName === "吉山梁风电场") {
|
|
|
+ xnzb = tempRes.data.xnzbjsl;
|
|
|
+ } else if (wpName === "左庄风电场") {
|
|
|
+ xnzb = tempRes.data.xnzbzz;
|
|
|
+ } else if (wpName === "新庄风电场") {
|
|
|
+ xnzb = tempRes.data.xnzbxz;
|
|
|
+ } else if (wpName === "繁食沟风电场") {
|
|
|
+ xnzb = tempRes.data.xnzbfsg;
|
|
|
+ } else if (wpName === "草山梁风电场") {
|
|
|
+ xnzb = tempRes.data.xnzbcsl;
|
|
|
+ } else if (wpName === "雷家山风电场") {
|
|
|
+ xnzb = tempRes.data.xnzbljs;
|
|
|
+ }
|
|
|
+ xnzbdbfx.push({
|
|
|
+ wpName: `${xnzbdbfxIdx}.${wpName}`,
|
|
|
+ list: tempRes.data.xnzbdbfx[wpName],
|
|
|
+ xnzb,
|
|
|
+ });
|
|
|
+ xnzbdbfxIdx++;
|
|
|
+ }
|
|
|
|
|
|
- tempRes.data.xnzbdbfxlist = xnzbdbfx;
|
|
|
+ tempRes.data.xnzbdbfxlist = xnzbdbfx;
|
|
|
|
|
|
- // 读取并获得模板文件的二进制内容
|
|
|
- JSZipUtils.getBinaryContent(
|
|
|
- `./static/windReport.docx`,
|
|
|
- (error, content) => {
|
|
|
- // 抛出异常
|
|
|
- if (error) throw error;
|
|
|
- // 创建一个JSZip实例,内容为模板的内容
|
|
|
- let zip = new PizZip(content);
|
|
|
- // 创建并加载docxtemplater实例对象
|
|
|
- let doc = new Docxtemplater();
|
|
|
- doc.loadZip(zip);
|
|
|
- doc.setData(tempRes.data);
|
|
|
- try {
|
|
|
- // 用模板变量的值替换所有模板变量
|
|
|
- doc.render();
|
|
|
- } catch (error) {
|
|
|
- // 抛出异常
|
|
|
- let e = {
|
|
|
- message: error.message,
|
|
|
- name: error.name,
|
|
|
- stack: error.stack,
|
|
|
- properties: error.properties,
|
|
|
- };
|
|
|
- console.log(JSON.stringify({ error: e }));
|
|
|
- throw error;
|
|
|
- }
|
|
|
- // 生成一个代表docxtemplater对象的zip文件(不是一个真实的文件,而是在内存中的表示)
|
|
|
- let out = doc.getZip().generate({
|
|
|
- type: "blob",
|
|
|
- mimeType:
|
|
|
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
- });
|
|
|
- // 将目标文件对象保存为目标类型的文件,并命名
|
|
|
- saveAs(out, `${tempRes.data.title.name}.docx`);
|
|
|
- }
|
|
|
- );
|
|
|
+ // 读取并获得模板文件的二进制内容
|
|
|
+ JSZipUtils.getBinaryContent(
|
|
|
+ `./static/windReport.docx`,
|
|
|
+ (error, content) => {
|
|
|
+ // 抛出异常
|
|
|
+ if (error) throw error;
|
|
|
+ // 创建一个JSZip实例,内容为模板的内容
|
|
|
+ let zip = new PizZip(content);
|
|
|
+ // 创建并加载docxtemplater实例对象
|
|
|
+ let doc = new Docxtemplater();
|
|
|
+ doc.loadZip(zip);
|
|
|
+ doc.setData(tempRes.data);
|
|
|
+ try {
|
|
|
+ // 用模板变量的值替换所有模板变量
|
|
|
+ doc.render();
|
|
|
+ } catch (error) {
|
|
|
+ // 抛出异常
|
|
|
+ let e = {
|
|
|
+ message: error.message,
|
|
|
+ name: error.name,
|
|
|
+ stack: error.stack,
|
|
|
+ properties: error.properties,
|
|
|
+ };
|
|
|
+ console.log(JSON.stringify({ error: e }));
|
|
|
+ throw error;
|
|
|
+ }
|
|
|
+ // 生成一个代表docxtemplater对象的zip文件(不是一个真实的文件,而是在内存中的表示)
|
|
|
+ let out = doc.getZip().generate({
|
|
|
+ type: "blob",
|
|
|
+ mimeType:
|
|
|
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
+ });
|
|
|
+ // 将目标文件对象保存为目标类型的文件,并命名
|
|
|
+ saveAs(out, `${tempRes.data.title.name}.docx`);
|
|
|
+ }
|
|
|
+ );
|
|
|
},
|
|
|
handleReportOp() {
|
|
|
if (this.reportParamDate) {
|