Files
wysite/hc-pos.sqygj.cn/static/js/chunk-02c1a32b.fd5dab6b.js

1 line
25 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-02c1a32b"],{"8e48":function(e,t,r){"use strict";r("b611")},b307e:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flowlayout incomeStatement intelligent-report-page"},[r("el-row",{staticClass:"header-row",attrs:{gutter:24}},[r("el-col",{attrs:{span:8}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handleSceneCardClick(1)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num green"},[e._v(e._s(e.apiSceneCount.smartUrge)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("智能催缴")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiSceneReportNames.smartUrge))])])])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handleSceneCardClick(2)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num purple"},[e._v("\n "+e._s(e.apiSceneCount.smartInspect)+"种\n ")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("智能质检")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v("\n "+e._s(e.apiSceneReportNames.smartInspect)+"\n ")])])])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handleSceneCardClick(3)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num orange"},[e._v(e._s(e.apiSceneCount.smartEnergy)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("智能能源")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v("\n "+e._s(e.apiSceneReportNames.smartEnergy)+"\n ")])])])])],1),e._v(" "),r("el-row",{staticClass:"header-row",attrs:{gutter:24}},[r("el-col",{attrs:{span:4}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handlePeriodCardClick(1)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num green"},[e._v(e._s(e.apiPeriodCount.day)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("日报")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiPeriodReportNames.day))])])])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handlePeriodCardClick(2)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num orange"},[e._v(e._s(e.apiPeriodCount.week)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("周报")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiPeriodReportNames.week))])])])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handlePeriodCardClick(3)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num pink"},[e._v(e._s(e.apiPeriodCount.month)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("月报")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiPeriodReportNames.month))])])])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handlePeriodCardClick(4)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num primary"},[e._v(e._s(e.apiPeriodCount.quarter)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("季报")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiPeriodReportNames.quarter))])])])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handlePeriodCardClick(5)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num purple"},[e._v(e._s(e.apiPeriodCount.halfYear)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("半年报")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiPeriodReportNames.halfYear))])])])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("div",{staticClass:"item header-card",on:{click:function(t){return e.handlePeriodCardClick(6)}}},[r("div",{staticClass:"item-content center-content"},[r("div",{staticClass:"item-num gray"},[e._v(e._s(e.apiPeriodCount.year)+"种")]),e._v(" "),r("div",{staticClass:"item-label"},[e._v("年报")]),e._v(" "),r("div",{staticClass:"item-subtitle"},[e._v(e._s(e.apiPeriodReportNames.year))])])])])],1),e._v(" "),r("div",{staticClass:"incomeHeader"},[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.searchForm}},[r("el-form-item",{attrs:{prop:"type"}},[r("el-select",{staticClass:"selectTable",attrs:{placeholder:"请选择报告场景","popper-class":"selectTablePopper"},model:{value:e.searchForm.reportScene,callback:function(t){e.$set(e.searchForm,"reportScene",t)},expression:"searchForm.reportScene"}},e._l(e.agentServiceReportSceneList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"isDelete"}},[r("el-select",{staticClass:"selectTable",attrs:{placeholder:"请选择报告状态",clearable:!1,"popper-class":"selectTablePopper"},model:{value:e.searchForm.isDelete,callback:function(t){e.$set(e.searchForm,"isDelete",t)},expression:"searchForm.isDelete"}},[r("el-option",{attrs:{value:0,label:"正常"}}),e._v(" "),r("el-option",{attrs:{value:1,label:"作废"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"period"}},[r("el-select",{staticClass:"selectTable",attrs:{placeholder:"请选择报告区间",clearable:!1,"popper-class":"selectTablePopper"},model:{value:e.searchForm.period,callback:function(t){e.$set(e.searchForm,"period",t)},expression:"searchForm.period"}},e._l(e.agentServiceReportPeriodList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"timeRange"}},[r("el-date-picker",{staticClass:"selectTable",attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",clearable:!0,"popper-class":"selectTablePopper","value-format":"yyyy-MM-dd"},model:{value:e.searchForm.timeRange,callback:function(t){e.$set(e.searchForm,"timeRange",t)},expression:"searchForm.timeRange"}})],1),e._v(" "),r("el-form-item",[r("el-button",{on:{click:e.resetForm}},[e._v("重置")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")])],1)],1),e._v(" "),r("div",{staticClass:"summary-text"},[e._v("一共 "+e._s(e.totalCount)+" 份报告")])],1),e._v(" "),r("div",{staticClass:"todayDynamicsbox"},[r("div",{staticClass:"box-container todayDynamicsTable detaPlatformTable"},[r("div",{staticClass:"table-title"},[e._v("智能体报告列表")]),e._v(" "),r("el-table",{attrs:{border:"",data:e.pageReports}},[r("el-table-column",{attrs:{label:"报告级别/期间","min-width":"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v("\n "+e._s((t.row.level||"-")+" / "+e.formatPeriodByEndTime(t.row))+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"reportName",label:"报告名称","min-width":"150",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"type",label:"场景","min-width":"70",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"报告查阅记录","min-width":"190",align:"center"}},[[r("span",[e._v(e._s("-"))])]],2),e._v(" "),r("el-table-column",{attrs:{label:"报告起止时间","min-width":"240",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v("\n "+e._s(e.formatDateOnly(t.row.reportStartTime)+" - "+e.formatDateOnly(t.row.reportEndTime))+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"报告状态","min-width":"50",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v("\n "+e._s(0===Number(t.row.isDelete)?"正常":1===Number(t.row.isDelete)?"作废":"-")+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作人","min-width":"70",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.updaterName||"-"))])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"updateTime",label:"更新时间","min-width":"170",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"操作","min-width":"130",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(r){return e.handleViewReport(t.row)}}},[e._v("\n 查看报告\n ")]),e._v(" "),0===Number(t.row.isDelete)?r("el-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"danger",size:"mini"},on:{click:function(r){return e.handleInvalidateReport(t.row)}}},[e._v("\n 作废\n ")]):e._e()]}}])})],1),e._v(" "),r("div",{staticClass:"paginations"},[r("el-pagination",{attrs:{background:"","current-page":e.searchForm.pageNumber,"page-sizes":[10,20,50,100],"page-size":e.searchForm.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},on:{"update:currentPage":function(t){return e.$set(e.searchForm,"pageNumber",t)},"update:current-page":function(t){return e.$set(e.searchForm,"pageNumber",t)},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)]),e._v(" "),r("el-dialog",{attrs:{visible:e.moreDialogVisible,width:"720px",title:e.moreDialogTitle,"close-on-click-modal":!1},on:{"update:visible":function(t){e.moreDialogVisible=t}}},[r("div",{staticClass:"more-dialog-summary"},[e._v("共 "+e._s(e.moreDialogCount)+" 个报告")]),e._v(" "),r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.moreDialogNames,border:"",size:"mini"}},[r("el-table-column",{attrs:{prop:"name",label:"报告名称"}})],1)],1),e._v(" "),r("el-dialog",{attrs:{visible:e.reportDialogVisible,title:e.reportDialogTitle,width:"75%","close-on-click-modal":!1},on:{"update:visible":function(t){e.reportDialogVisible=t}}},[r("div",{staticClass:"report-dialog-body"},[e.reportDialogContent?r("MarkdownRenderer",{attrs:{textColor:"#000",mdContent:e.reportDialogContent}}):r("div",[e._v("暂无报告内容")])],1)])],1)},i=[],a=r("caa2"),o=r("dce5"),s=r("3a3b");function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return u(c,"_invoke",function(r,n,i){var a,s,l,c=0,u=i||[],p=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,l=e,m.n=r,o}};function d(r,n){for(s=r,l=n,t=0;!p&&c&&!i&&t<u.length;t++){var i,a=u[t],d=m.p,v=a[2];r>3?(i=v===n)&&(l=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,m.v=n,m.n=a[1]):d<v&&(i=r<3||a[0]>n||n>v)&&(a[4]=r,a[5]=n,m.n=v,s=0))}if(i||r>1)return o;throw p=!0,n}return function(i,u,v){if(c>1)throw TypeError("Generator is already running");for(p&&1===u&&d(u,v),s=u,l=v;(t=s<2?e:l)||!p;){a||(s?s<3?(s>1&&(m.n=-1),d(s,l)):m.n=l:m.v=l);try{if(c=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(p=m.n<0)?l:r.call(n,m))!==o)break}catch(t){a=e,s=1,l=t}finally{c=1}}return{value:t,done:p}}}(r,i,a),!0),c}var o={};function s(){}function l(){}function p(){}t=Object.getPrototypeOf;var m=[][n]?t(t([][n]())):(u(t={},n,(function(){return this})),t),d=p.prototype=s.prototype=Object.create(m);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,u(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=p,u(d,"constructor",p),u(p,"constructor",l),l.displayName="GeneratorFunction",u(p,i,"GeneratorFunction"),u(d),u(d,i,"Generator"),u(d,n,(function(){return this})),u(d,"toString",(function(){return"[object Generator]"})),(c=function(){return{w:a,m:v}})()}function u(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}u=function(e,t,r,n){function a(t,r){u(e,t,(function(e){return this._invoke(t,r,e)}))}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},u(e,t,r,n)}function p(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){p(a,n,i,o,s,"next",e)}function s(e){p(a,n,i,o,s,"throw",e)}o(void 0)}))}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=g(e,"string");return"symbol"==l(t)?t:t+""}function g(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){return w(e)||C(e)||_(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e,t){if(e){if("string"==typeof e)return P(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(e){if(Array.isArray(e))return P(e)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var S={name:"IntelligentReport",components:{MarkdownRenderer:s["a"]},data:function(){return{projectUuid:"",agentServiceReportPeriodList:o["j"],agentServiceReportSceneList:o["k"],searchForm:{level:"项目",reportScene:1,period:3,isDelete:0,timeRange:[],pageNumber:1,pageSize:10},typePageListResult:null,reports:[],totalCount:0,tableLoading:!1,moreDialogVisible:!1,moreDialogTitle:"",moreDialogCount:0,moreDialogNames:[],reportDialogVisible:!1,reportDialogTitle:"查看报告",reportDialogContent:""}},computed:{typePageListRecords:function(){var e,t=null===(e=this.typePageListResult)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.records;return Array.isArray(t)?t:[]},apiSceneCount:function(){var e=this.typePageListRecords,t=e.filter((function(e){return 1===Number(e.reportScene)})).length,r=e.filter((function(e){return 2===Number(e.reportScene)})).length,n=e.filter((function(e){return 3===Number(e.reportScene)})).length;return{smartUrge:t,smartInspect:r,smartEnergy:n}},apiPeriodCount:function(){var e=this.typePageListRecords;return{day:e.filter((function(e){return 1===Number(e.reportPeriod)})).length,week:e.filter((function(e){return 2===Number(e.reportPeriod)})).length,month:e.filter((function(e){return 3===Number(e.reportPeriod)})).length,quarter:e.filter((function(e){return 4===Number(e.reportPeriod)})).length,halfYear:e.filter((function(e){return 5===Number(e.reportPeriod)})).length,year:e.filter((function(e){return 6===Number(e.reportPeriod)})).length}},apiSceneReportNames:function(){var e=this.typePageListRecords,t=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=e.filter((function(e){return Number(e.reportScene)===t&&e.reportName})).map((function(e){return e.reportName})),i=b(new Set(n)),a=i.slice(0,r),o=i.length-a.length;return a.length?o>0?"".concat(a.join("、"),"等"):a.join("、"):"-"};return{smartUrge:t(1),smartInspect:t(2),smartEnergy:t(3)}},apiPeriodReportNames:function(){var e=this.typePageListRecords,t=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=e.filter((function(e){return Number(e.reportPeriod)===t&&e.reportName})).map((function(e){return e.reportName})),i=b(new Set(n)),a=i.slice(0,r),o=i.length-a.length;return a.length?o>0?"".concat(a.join("、"),"等"):a.join("、"):"-"};return{day:t(1),week:t(2),month:t(3),quarter:t(4),halfYear:t(5),year:t(6)}},pageReports:function(){return this.reports}},methods:{normalizeReportRecord:function(e){var t,r,n,i,a,o,s,l,c,u,p,m,d,h,f,g,b,y,_,C=function(e){if(null!==e&&void 0!==e&&""!==e){var t=Number(e);return Number.isNaN(t)?void 0:t}},w={1:"企业",2:"项目",3:"待定"},P={1:"智能催缴",2:"智能质检",3:"智能能源"},S={1:"日",2:"周",3:"月",4:"季",5:"半年",6:"年"},N={1:"指定发送对象",2:"群发"},R=null!==(t=null!==(r=e.receiverType)&&void 0!==r?r:e.receiverTypeName)&&void 0!==t?t:e.sendScope,k=C(R),T=k?N[k]:R,D=null!==(n=e.period)&&void 0!==n?n:e.reportPeriod,F=C(D),j=void 0!==F?S[F]||"":e.period||"",O=null!==(i=e.type)&&void 0!==i?i:e.reportScene,L=C(O),$=void 0!==L?P[L]||"":e.type||"",x=null!==(a=e.level)&&void 0!==a?a:e.reportLevel,z=C(x),E=void 0!==z?w[z]||"":e.level||"";return v(v({},e),{},{level:E,period:j,type:$,title:null!==(o=null!==(s=null!==(l=e.title)&&void 0!==l?l:e.reportName)&&void 0!==s?s:e.reportTitle)&&void 0!==o?o:"",receiver:null!==(c=null!==(u=e.receiver)&&void 0!==u?u:e.receiverName)&&void 0!==c?c:"",receiverType:null!==T&&void 0!==T?T:"",updateTime:null!==(p=null!==(m=null!==(d=e.updateTime)&&void 0!==d?d:e.updateTimeStr)&&void 0!==m?m:e.update_time)&&void 0!==p?p:"",readTime:null!==(h=null!==(f=e.readTime)&&void 0!==f?f:e.readTimeStr)&&void 0!==h?h:"-",reportContent:null!==(g=null!==(b=null!==(y=null!==(_=e.reportContent)&&void 0!==_?_:e.report_content)&&void 0!==y?y:e.content)&&void 0!==b?b:e.reportBody)&&void 0!==g?g:""})},formatDateOnly:function(e){if(!e)return"-";var t=String(e);return t.length>=10?t.slice(0,10):t},formatPeriodByEndTime:function(e){var t;if(!e)return"-";var r=this.formatDateOnly(e.reportEndTime);if(!r||"-"===r)return"-";var n=null!==(t=e.reportPeriod)&&void 0!==t?t:e.period,i={1:"日",2:"周",3:"月",4:"季",5:"半年",6:"年"},a="number"===typeof n?i[n]:i[Number(n)]||n,o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(!o)return"-";var s=Number(o[1]),l=o[2],c=o[3];if("年"===a)return"".concat(s,"年");if("月"===a)return"".concat(s,"-").concat(l,"月");if("日"===a)return"".concat(s,"-").concat(l,"-").concat(c,"日");if("周"===a){var u=new Date("".concat(o[1],"-").concat(l,"-").concat(c,"T00:00:00"));if(Number.isNaN(u.getTime()))return"-";var p=new Date(s,0,1),m=Math.floor((u-p)/864e5)+1,d=Math.ceil(m/7);return"".concat(s,"年第").concat(d,"周")}return"-"},fetchReportPageList:function(){var e=m(c().m((function e(){var t,r,n,i,o,s,l=this;return c().w((function(e){while(1)switch(e.p=e.n){case 0:return this.tableLoading=!0,e.p=1,t={projectUuid:this.projectUuid,pageSize:this.searchForm.pageSize,pageNumber:this.searchForm.pageNumber,reportScene:this.searchForm.reportScene,reportPeriod:this.searchForm.period,isDelete:this.searchForm.isDelete,reportLevel:2,startTime:"",endTime:""},Array.isArray(this.searchForm.timeRange)&&2===this.searchForm.timeRange.length&&(this.searchForm.timeRange[0]&&(t.startTime="".concat(this.searchForm.timeRange[0]," 00:00:00")),this.searchForm.timeRange[1]&&(t.endTime="".concat(this.searchForm.timeRange[1]," 23:59:59"))),e.n=2,Object(a["b"])(t);case 2:r=e.v,r&&0===r.code&&r.data?(s=Array.isArray(r.data.records)?r.data.records:[],this.reports=s.map((function(e){return l.normalizeReportRecord(e)})),this.totalCount=null!==(n=null!==(i=null!==(o=r.data.rowsCount)&&void 0!==o?o:r.data.totalCount)&&void 0!==i?i:r.data.total)&&void 0!==n?n:s.length):(this.reports=[],this.totalCount=0),e.n=4;break;case 3:e.p=3,e.v,this.reports=[],this.totalCount=0;case 4:return e.p=4,this.tableLoading=!1,e.f(4);case 5:return e.a(2)}}),e,this,[[1,3,4,5]])})));function t(){return e.apply(this,arguments)}return t}(),fetchTypePageList:function(){var e=m(c().m((function e(){var t,r;return c().w((function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,t={reportLevel:2,pageSize:-1,pageNumber:-1,isDelete:this.searchForm.isDelete,startTime:"",endTime:""},Array.isArray(this.searchForm.timeRange)&&2===this.searchForm.timeRange.length&&(this.searchForm.timeRange[0]&&(t.startTime="".concat(this.searchForm.timeRange[0]," 00:00:00")),this.searchForm.timeRange[1]&&(t.endTime="".concat(this.searchForm.timeRange[1]," 23:59:59"))),e.n=1,Object(a["d"])(t);case 1:r=e.v,this.typePageListResult=r,e.n=3;break;case 2:e.p=2,e.v,this.typePageListResult=null;case 3:return e.a(2)}}),e,this,[[0,2]])})));function t(){return e.apply(this,arguments)}return t}(),getUniqueReportNames:function(e){var t=this.typePageListRecords,r=t.filter(e).map((function(e){return e.reportName})).filter(Boolean);return b(new Set(r))},handleSceneCardClick:function(e){var t=this.getUniqueReportNames((function(t){return Number(t.reportScene)===e}));if(!(t.length<=2)){var r={1:"智能催缴",2:"智能质检",3:"智能能源"};this.moreDialogTitle="".concat(r[e]||"场景"," 报告列表"),this.moreDialogCount=t.length,this.moreDialogNames=t.map((function(e){return{name:e}})),this.moreDialogVisible=!0}},handlePeriodCardClick:function(e){var t=this.getUniqueReportNames((function(t){return Number(t.reportPeriod)===e}));if(!(t.length<=2)){var r={1:"日报",2:"周报",3:"月报",4:"季报",5:"半年报",6:"年报"};this.moreDialogTitle="".concat(r[e]||"期间"," 报告列表"),this.moreDialogCount=t.length,this.moreDialogNames=t.map((function(e){return{name:e}})),this.moreDialogVisible=!0}},search:function(){var e=m(c().m((function e(){return c().w((function(e){while(1)switch(e.n){case 0:return this.searchForm.pageNumber=1,e.n=1,this.fetchTypePageList();case 1:this.fetchReportPageList();case 2:return e.a(2)}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),resetForm:function(){var e=m(c().m((function e(){return c().w((function(e){while(1)switch(e.n){case 0:return this.searchForm={level:"项目",type:"",period:3,isDelete:0,timeRange:[],pageNumber:1,pageSize:10},e.n=1,this.fetchTypePageList();case 1:this.fetchReportPageList();case 2:return e.a(2)}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleSizeChange:function(e){this.searchForm.pageSize=e,this.searchForm.pageNumber=1,this.fetchReportPageList()},handleCurrentChange:function(e){this.searchForm.pageNumber=e,this.fetchReportPageList()},handleViewReport:function(e){e&&(this.reportDialogTitle=e.title||e.reportName||"查看报告",this.reportDialogContent=e.reportContent||"",this.reportDialogVisible=!0)},handleInvalidateReport:function(){var e=m(c().m((function e(t){var r,n,i,o=this;return c().w((function(e){while(1)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:if(n=t.id,n){e.n=2;break}return this.$message.warning("未获取到报告id无法作废"),e.a(2);case 2:if(i=null===(r=this.$store)||void 0===r||null===(r=r.state)||void 0===r||null===(r=r.user)||void 0===r||null===(r=r.userInfo)||void 0===r?void 0:r.memberName,i){e.n=3;break}return this.$message.warning("未获取到当前操作人,无法作废"),e.a(2);case 3:this.$confirm("确定要作废该报告吗?","作废确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(m(c().m((function e(){var t;return c().w((function(e){while(1)switch(e.p=e.n){case 0:return o.tableLoading=!0,e.p=1,e.n=2,Object(a["c"])({id:n,updaterName:i});case 2:if(t=e.v,!t||0!==t.code){e.n=5;break}return o.$message.success("作废成功"),e.n=3,o.fetchTypePageList();case 3:return e.n=4,o.fetchReportPageList();case 4:e.n=6;break;case 5:o.$message.error((null===t||void 0===t?void 0:t.msg)||"作废失败");case 6:e.n=8;break;case 7:e.p=7,e.v,o.$message.error("作废失败");case 8:return e.p=8,o.tableLoading=!1,e.f(8);case 9:return e.a(2)}}),e,null,[[1,7,8,9]])})))).catch((function(){}));case 4:return e.a(2)}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},mounted:function(){this.$route.query.code?this.projectUuid=this.$route.query.code:this.projectUuid=this.$store.state.community_uuid,this.fetchTypePageList(),this.fetchReportPageList()}},N=S,R=(r("8e48"),r("829d")),k=Object(R["a"])(N,n,i,!1,null,"0c5a24b0",null);t["default"]=k.exports},b611:function(e,t,r){}}]);