123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203 |
- <template>
- <div class="dashboard-editor-container" ref="prev">
- <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
- <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
- <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
- </div>
- <div :style="{position: 'fixed',height:'55px',top: '90px',zIndex: '999',marginBottom: '50px',background:'#f0f2f5',width: myWidth}">
- <el-radio-group v-model="radio" @change="changeRadio">
- <el-radio :label="1">月</el-radio>
- <el-radio :label="2">日</el-radio>
- </el-radio-group>
- <el-date-picker v-if="radio == 1" v-model="yearDate" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" style="width: 250px;" format="yyyy-MM" value-format="yyyy-MM" :clearable="false" @change="changeTime('1')" />
- <el-date-picker v-else v-model="yearDate" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" style="width: 250px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :clearable="false" @change="changeTime('2')" />
- <el-select v-model="jump" style="width: 140pxmargin-top:5px;;" placeholder="快捷跳转方式" class="filter-item" @visible-change="changeJump($event,jump)">
- <el-option v-for="item in jumpList" :key="item.id" :label="item.name" :value="item.name" />
- </el-select>
- <el-select v-model="pastureId" style="width: 140px;margin-top:5px;" placeholder="全部牧场" class="filter-item" @change="changePasture">
- <el-option v-for="item in findAllPasture" :key="item.name" :label="item.name" :value="item.id" />
- </el-select>
- <el-button class="filter-item" style="" type="success" icon="el-icon-edit" @click="handleDownload">导出</el-button>
- </div>
- <div style="margin-top: 50px;">
- <div v-if="radio == 1">
- <h3 id="equipmentIndexCostTable">设备指标</h3>
- <el-table
- :key="equipmentIndexCostTable.tableKey"
- v-loading="equipmentIndexCostTable.listLoading"
- element-loading-text="给我一点时间"
- :data="equipmentIndexCostTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort1"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickEquipmentIndex(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- <el-table-column label="饲养头日" sortable min-width="80px" align="center" prop="monthBudget" />
- </el-table-column>
- <el-table-column label="总指标(万元)" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <!-- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" /> -->
- <!-- <el-table-column label="迄今内控" sortable min-width="80px" align="center" prop="qmonthBudget" /> -->
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标(元)" align="center">
- <!-- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" /> -->
- <!-- <el-table-column label="单头牛内控" sortable min-width="80px" align="center" prop="oneCowLimit" /> -->
- <!-- <el-table-column label="单头牛迄今内控" sortable min-width="80px" align="center" prop="oneCowQmonthBudget" /> -->
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- <!-- <el-table-column label="单头牛实际节约" sortable min-width="80px" align="center" prop="oneCowAsave" /> -->
- </el-table-column>
- </el-table>
- </div>
- <div>
- <h3 id="repairCostTable">维修费</h3>
- <el-table
- :key="repairCostTable.tableKey"
- v-loading="repairCostTable.listLoading"
- element-loading-text="给我一点时间"
- :data="repairCostTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort2"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickRepairCost(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标(万元)" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <!-- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" /> -->
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标(元)" align="center">
- <!-- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" /> -->
- <!-- <el-table-column label="单头牛内控" sortable min-width="80px" align="center" prop="oneCowLimit" /> -->
- <!-- <el-table-column label="单头牛迄今内控" sortable min-width="80px" align="center" prop="oneCowQmonthBudget" /> -->
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- <!-- <el-table-column label="单头牛实际节约" sortable min-width="80px" align="center" prop="oneCowAsave" /> -->
- </el-table-column>
- </el-table>
- </div>
- <div v-if="radio == 1">
- <h3 id="waterCostTable">水费</h3>
- <el-table
- :key="waterCostTable.tableKey"
- v-loading="waterCostTable.listLoading"
- element-loading-text="给我一点时间"
- :data="waterCostTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort3"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickWaterCost(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标(万元)" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <!-- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" /> -->
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标(元)" align="center">
- <!-- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" /> -->
- <!-- <el-table-column label="单头牛内控" sortable min-width="80px" align="center" prop="oneCowLimit" /> -->
- <!-- <el-table-column label="单头牛迄今内控" sortable min-width="80px" align="center" prop="oneCowQmonthBudget" /> -->
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- <!-- <el-table-column label="单头牛实际节约" sortable min-width="80px" align="center" prop="oneCowAsave" /> -->
- </el-table-column>
- </el-table>
- </div>
- <div v-if="radio == 1">
- <h3 id="elecCostTable">电费</h3>
- <el-table
- :key="elecCostTable.tableKey"
- v-loading="elecCostTable.listLoading"
- element-loading-text="给我一点时间"
- :data="elecCostTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort4"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickElecCost(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标(万元)" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <!-- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" /> -->
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标(元)" align="center">
- <!-- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" /> -->
- <!-- <el-table-column label="单头牛内控" sortable min-width="80px" align="center" prop="oneCowLimit" /> -->
- <!-- <el-table-column label="单头牛迄今内控" sortable min-width="80px" align="center" prop="oneCowQmonthBudget" /> -->
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- <!-- <el-table-column label="单头牛实际节约" sortable min-width="80px" align="center" prop="oneCowAsave" /> -->
- </el-table-column>
- </el-table>
- </div>
- <div v-if="radio == 1">
- <h3 id="gasCostTable">柴油费</h3>
- <el-table
- :key="gasCostTable.tableKey"
- v-loading="gasCostTable.listLoading"
- element-loading-text="给我一点时间"
- :data="gasCostTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort5"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickGasCost(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标(万元)" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <!-- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" /> -->
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标(元)" align="center">
- <!-- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" /> -->
- <!-- <el-table-column label="单头牛内控" sortable min-width="80px" align="center" prop="oneCowLimit" /> -->
- <!-- <el-table-column label="单头牛迄今内控" sortable min-width="80px" align="center" prop="oneCowQmonthBudget" /> -->
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- <!-- <el-table-column label="单头牛实际节约" sortable min-width="80px" align="center" prop="oneCowAsave" /> -->
- </el-table-column>
- </el-table>
- </div>
- <div>
- <h3 id="bioConsumptionTable">燃动费</h3>
- <el-table
- :key="bioConsumptionTable.tableKey"
- v-loading="bioConsumptionTable.listLoading"
- element-loading-text="给我一点时间"
- :data="bioConsumptionTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort8"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickBioConsumption(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标" align="center">
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- </el-table-column>
- </el-table>
- </div>
- <div>
- <h3 id="allConsumptionTable">水电柴油用量</h3>
- <el-table
- :key="allConsumptionTable.tableKey"
- v-loading="allConsumptionTable.listLoading"
- element-loading-text="给我一点时间"
- :data="allConsumptionTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort10"
- >
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickAllConsumption(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- <el-table-column label="水迄今实际(吨)" sortable min-width="80px" align="center" prop="waterSumPrice" />
- <el-table-column label="水单头牛迄今实际(吨)" sortable min-width="80px" align="center" prop="waterOneCowSumPrice" />
- <el-table-column label="电迄今实际(度)" sortable min-width="80px" align="center" prop="electricitySumPrice" />
- <el-table-column label="电单头牛迄今实际(度)" sortable min-width="80px" align="center" prop="electricityOneCowSumPrice" />
- <el-table-column label="柴油迄今实际(升)" sortable min-width="80px" align="center" prop="monthiolSumPrice" />
- <el-table-column label="柴油单头牛迄今实际(升)" sortable min-width="80px" align="center" prop="monthiolOneCowSumPrice" />
- </el-table>
- </div>
- <!-- <div>
- <h3 id="waterConsumptionTable">水量(吨)</h3>
- <el-table
- :key="waterConsumptionTable.tableKey"
- v-loading="waterConsumptionTable.listLoading"
- element-loading-text="给我一点时间"
- :data="waterConsumptionTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort6"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickWaterConsumption(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标" align="center">
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- </el-table-column>
- </el-table>
- </div> -->
- <!-- <div>
- <h3 id="elecConsumptionTable">电量(度)</h3>
- <el-table
- :key="elecConsumptionTable.tableKey"
- v-loading="elecConsumptionTable.listLoading"
- element-loading-text="给我一点时间"
- :data="elecConsumptionTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort7"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickElecConsumption(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" />
- <el-table-column label="迄今内控" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标" align="center">
- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" />
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- </el-table-column>
- </el-table>
- </div> -->
- <!-- <div>
- <h3 id="gasConsumptionTable">柴油用量(L)</h3>
- <el-table
- :key="gasConsumptionTable.tableKey"
- v-loading="gasConsumptionTable.listLoading"
- element-loading-text="给我一点时间"
- :data="gasConsumptionTable.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="tableCellStyle"
- class="elTable"
- height="350"
- @sort-change="tableSort8"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="牧场" min-width="70px" align="center">
- <template slot-scope="{row}">
- <a @click="clickGasConsumption(row)">{{ row.pastureName }}</a>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="总指标" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标" align="center">
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- </el-table-column>
- </el-table>
- </div> -->
-
- </div>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialog.dialogFormVisible" :close-on-click-modal="false">
- <div class="table">
- <el-table
- :key="dialog.tableKey"
- v-loading="dialog.listLoading"
- element-loading-text="给我一点时间"
- :data="dialog.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- :max-height="350"
- @sort-change="tableSort9"
- >
- <el-table-column label="设备指标" align="center">
- <el-table-column label="序号" align="center" type="index" width="50px" />
- <el-table-column label="部门" min-width="70px" align="center" prop="deptname" />
- </el-table-column>
- <el-table-column label="总指标" align="center">
- <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
- <!-- <el-table-column label="内控" sortable min-width="80px" align="center" prop="monthLimit" /> -->
- <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
- <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
- <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
- <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
- </el-table-column>
- <el-table-column label="单头牛指标" align="center">
- <!-- <el-table-column label="单头牛预算" sortable min-width="80px" align="center" prop="oneCowBudget" /> -->
- <!-- <el-table-column label="单头牛内控" sortable min-width="80px" align="center" prop="oneCowLimit" /> -->
- <!-- <el-table-column label="单头牛迄今内控" sortable min-width="80px" align="center" prop="oneCowQmonthBudget" /> -->
- <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
- <!-- <el-table-column label="单头牛实际节约" sortable min-width="80px" align="center" prop="oneCowAsave" /> -->
- </el-table-column>
- </el-table>
- <pagination v-show="dialog.total>=0" :total="dialog.total" :page.sync="dialog.getdataListParm.offset" :limit.sync="dialog.getdataListParm.pagecount" @pagination="get_table_dataDialog" />
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- // 引入
- require('script-loader!file-saver')
- import { GetDataByName,postJson,getMonthFinalDay } from '@/api/common'
- import waves from '@/directive/waves'
- import Pagination from '@/components/Pagination'
- import { parseTime, sortChange, json2excel } from '@/utils/index.js'
- import Cookies from 'js-cookie'
- import axios from 'axios'
- import { getToken } from '@/utils/auth'
- export default {
- name: 'EquipmentIndex',
- components: { Pagination },
- directives: { waves },
- filters: {
- keepTwoNum(value) {
- value = Number(value)
- return value.toFixed(2)
- }
- },
- data() {
- return {
- radio:1,
- jump: '',
- jumpList: [{ name: '设备指标', id: '0' }, { name: '维修费用', id: '4' }, { name: '水费', id: '1' }, { name: '电费', id: '2' }, { name: '柴油费', id: '3' }, { name: '水电柴油用量', id: '5' }],
- // pastureId: Cookies.get('pasturename'),
- pastureId: "现代牧业",
- findAllPasture: [],
- // getPastureParam: { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
- getPastureParam: { name: 'findAllPastureBySbzb', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': '18'}},
- // getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
- getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': '18', 'eId': Cookies.get('employeid') }},
- departmentId: '',
- findAllDept: [],
- yearDate: [],
- // 设备指标
- equipmentIndexCostTable: {
- listLoading: true,
- list: [],
- tableKey: 0,
- getdataListParm: {
- name: 'getChooseEqMonthBudgetListSumAll', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 维修费
- repairCostTable: {
- listLoading: true,
- list: null,
- tableKey: 0,
- getdataListParm: {
- name: 'getChooseMonthWX', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 水费
- waterCostTable: {
- listLoading: true,
- list: null,
- tableKey: 0,
- getdataListParm: {
- name: 'getChooseWaterPrice', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 电费
- elecCostTable: {
- listLoading: true,
- list: null,
- tableKey: 0,
- getdataListParm: {
- name: 'getChooseElectricityPrice', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 燃动费
- gasCostTable: {
- listLoading: true,
- list: null,
- tableKey: 0,
- getdataListParm: {
- name: 'getChooseMonthiolPrice', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 水电柴油用量
- allConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getChooseMonthWater', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 水量
- waterConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getChooseMonthWater', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 电量
- elecConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getChooseMonthElectricity', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 柴油用量
- gasConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getChooseMonthOilT', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 燃动
- bioConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getLgnitionChargePrice', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 汽油
- gaoilConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getChooseGasolinePrice', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- // 煤炭
- coalConsumptionTable: {
- listLoading: true, list: null, tableKey: 0,
- getdataListParm: {
- name: 'getChooseCoalPrice', page: 1, offset: 1, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '', departmentId: '' }
- }
- },
- dialog: {
- dialogFormVisible: false,
- tableKey: 0, listLoading: true, list: null, total: 0,
- getdataListParm: {
- name: '', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
- parammaps: { startTime: '', endTime: '', pastureId: '' }
- }
- },
- dialogStatus: '',
- textMap: {},
- requestParam: { name: '', offset: 0, pagecount: 0, parammaps: {}},
- downloadAll: {},
- isPercentage: false,
- percentage: 1,
- rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
- cellStyle: { padding: 0 + 'px' },
- myWidth:'',
- monthDate:[]
- }
- },
- created() {
- if(this.radio == 1){
- this.yearDate = [parseTime(new Date(), '{y}-{m}'), parseTime(new Date(), '{y}-{m}')]
- this.changeTime('1')
- }else{
- this.yearDate = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')]
- }
- this.getWindowWidth()
- this.getPastureDownList()
- this.getlistEquipmentIndex()
- },
- methods: {
- getWindowWidth() {
- this.$nextTick(()=>{
- this.myWidth = this.$refs.prev.clientWidth -30 +'px'
- console.log(this.myWidth)
- })
- },
- sortMethod(a, b, c) {
- var str = 0
- var str2 = 0
- str2 = parseFloat(a[c].substring(0, a[c].length - 1))
- str = parseFloat(b[c].substring(0, b[c].length - 1))
- return str2 - str
- },
- tableSort1(column) {
- sortChange(column, this.equipmentIndexCostTable.list)
- },
- tableSort2(column) {
- sortChange(column, this.repairCostTable.list)
- },
- tableSort3(column) {
- sortChange(column, this.waterCostTable.list)
- },
- tableSort4(column) {
- sortChange(column, this.elecCostTable.list)
- },
- tableSort5(column) {
- sortChange(column, this.gasCostTable.list)
- },
- tableSort6(column) {
- sortChange(column, this.waterConsumptionTable.list)
- },
- tableSort7(column) {
- sortChange(column, this.elecConsumptionTable.list)
- },
- tableSort8(column) {
- sortChange(column, this.gasConsumptionTable.list)
- },
- tableSort9(column) {
- sortChange(column, this.dialog.list)
- },
- tableSort10(column) {
- sortChange(column, this.allConsumptionTable.list)
- },
- changeJump(callback, jump) {
- if (!callback) {
- if (jump !== '') {
- console.log(jump)
- if (jump == '维修费用') {
- window.scrollTo(0, document.getElementById('repairCostTable').offsetTop - 150)
- // console.log(myHeight1, '11111')
- } else if (jump == '水费') {
- window.scrollTo(0, document.getElementById('waterCostTable').offsetTop - 150)
- } else if (jump == '电费') {
- window.scrollTo(0, document.getElementById('elecCostTable').offsetTop - 150)
- // console.log(myHeight3, '3333')
- } else if (jump == '柴油费') {
- window.scrollTo(0, document.getElementById('gasCostTable').offsetTop - 150)
- } else if (jump == '水量') {
- window.scrollTo(0, document.getElementById('waterConsumptionTable').offsetTop - 150)
- } else if (jump == '电量') {
- window.scrollTo(0, document.getElementById('elecConsumptionTable').offsetTop - 150)
- } else if (jump == '柴油量') {
- window.scrollTo(0, document.getElementById('gasConsumptionTable').offsetTop - 150)
- } else if (jump == '水电柴油用量') {
- window.scrollTo(0, document.getElementById('allConsumptionTable').offsetTop - 150)
- }else {
- window.scrollTo(0, document.getElementById('equipmentIndexCostTable').offsetTop - 150)
- }
- }
- }
- },
- handleDownload() {
- this.$alert('正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
- this.isPercentage = true
- this.percentage = 1
- var timer = setInterval(() => {
- this.percentage += 5
- if (this.percentage > 95) {
- this.percentage = 99
- clearInterval(timer)
- }
- this.percentage = this.percentage
- }, 1000)
- this.requestParam.name = 'DownloadEquipment'
- this.requestParam.offset = 0
- this.requestParam.pagecount = 0
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.startTime = this.yearDate[0]
- this.requestParam.parammaps.endTime = this.yearDate[1]
- if (this.pastureId == "现代牧业") {
- this.requestParam.parammaps.pastureId = ''
- } else {
- this.requestParam.parammaps.pastureId = this.pastureId
- }
- this.requestParam.parammaps.departmentId = this.departmentId
- this.requestParam.parammaps.deptId = this.requestParam.parammaps.departmentId
- console.log(this.requestParam)
- const requestParam = this.requestParam
- const url = process.env.VUE_APP_BASE_API + 'authdata/downloadmailreport'// 请求下载文件的地址
- axios({
- method: 'post', url: url, data: requestParam, headers: { token: getToken(), optname: 'insertcustomdoc' }, responseType: 'blob'
- }).then(res => {
- if (!res) return
- this.percentage = 99
- setTimeout(() => {
- this.isPercentage = false
- }, 2000)
- const blob = new Blob([res.data], {
- type: 'application/octet-stream'
- })
- const url = window.URL.createObjectURL(blob)
- const aLink = document.createElement('a')
- aLink.style.display = 'none'
- aLink.href = url
- const docname = '设备指标.xlsx'
- aLink.setAttribute('download', docname) // 下载的文件
- document.body.appendChild(aLink)
- aLink.click()
- document.body.removeChild(aLink)
- window.URL.revokeObjectURL(url)
- })
- },
- getPastureDownList() {
- GetDataByName(this.getPastureParam).then(response => {
- this.findAllPasture = response.data.list
- this.getDepartDownList()
- })
- },
- getDepartDownList() {
- GetDataByName(this.getDepartParam).then(response => {
- this.findAllDept = response.data.list
- })
- },
- changePasture(item) {
- this.getDepartParam.parammaps.pastureId = item
- this.getDepartDownList()
- this.departmentId = ''
- this.getlistEquipmentIndex()
- },
- changeRadio(item){
- this.yearDate = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')]
- if(item == 1){
- this.jumpList = [{ name: '设备指标', id: '0' }, { name: '维修费用', id: '4' }, { name: '水费', id: '1' }, { name: '电费', id: '2' }, { name: '柴油费', id: '3' }, { name: '水电柴油用量', id: '5' }]
- }else{
- this.jumpList = [{ name: '维修费用', id: '4' }, { name: '水电柴油用量', id: '5' }]
- }
- this.changeTime(item)
- },
- changeTime(item) {
- if(item == 1){
- let year = this.yearDate[1].split('-')[0]
- let month = this.yearDate[1].split('-')[1]
- let lastday = getMonthFinalDay(year,month)
- this.yearDate = [parseTime(this.yearDate[0], '{y}-{m}') + '-01',lastday]
- // if (parseTime(this.yearDate[0], '{y}-{m}') == parseTime(this.yearDate[1], '{y}-{m}') && parseTime(this.yearDate[0], '{y}-{m}') == parseTime(new Date(), '{y}-{m}')) {
- // this.yearDate = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')]
- // } else if (parseTime(this.yearDate[0], '{y}-{m}') !== parseTime(this.yearDate[1], '{y}-{m}') && parseTime(this.yearDate[0], '{y}-{m}') == parseTime(new Date(), '{y}-{m}')) {
- // this.yearDate = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(this.yearDate[1], '{y}-{m}') + '-00']
- // } else if (parseTime(this.yearDate[0], '{y}-{m}') !== parseTime(this.yearDate[1], '{y}-{m}') && parseTime(this.yearDate[1], '{y}-{m}') == parseTime(new Date(), '{y}-{m}')) {
- // this.yearDate = [parseTime(this.yearDate[0], '{y}-{m}') + '-00', parseTime(new Date(), '{y}-{m}-{d}')]
- // } else {
- // this.yearDate = [parseTime(this.yearDate[0], '{y}-{m}') + '-00', parseTime(this.yearDate[1], '{y}-{m}') + '-00']
- // }
- console.log(this.yearDate)
- }
- console.log(item,'===',this.yearDate)
- this.getlistEquipmentIndex()
- },
- // 设备指标
- getlistEquipmentIndex() {
- this.equipmentIndexCostTable.listLoading = true
- this.equipmentIndexCostTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.equipmentIndexCostTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.equipmentIndexCostTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.equipmentIndexCostTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.equipmentIndexCostTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- for (let i = 0; i < response.data.list.length; i++) {
- response.data.list[i].index = i + 1
- }
- this.equipmentIndexCostTable.list = response.data.list
- } else {
- this.equipmentIndexCostTable.list = []
- }
- setTimeout(() => {
- this.equipmentIndexCostTable.listLoading = false
- this.get_table_dataRepair()
- }, 100)
- })
- },
- // 维修费
- get_table_dataRepair() {
- this.repairCostTable.listLoading = true
- this.repairCostTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.repairCostTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.repairCostTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.repairCostTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.repairCostTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.repairCostTable.list = response.data.list
- } else {
- this.repairCostTable.list = []
- }
- setTimeout(() => {
- this.get_table_dataWater()
- this.repairCostTable.listLoading = false
- }, 100)
- })
- },
- // 水费
- get_table_dataWater() {
- this.waterCostTable.listLoading = true
- this.waterCostTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.waterCostTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.waterCostTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.waterCostTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.waterCostTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.waterCostTable.list = response.data.list
- } else {
- this.waterCostTable.list = []
- }
- setTimeout(() => {
- this.waterCostTable.listLoading = false
- this.get_table_dataElec()
- }, 100)
- })
- },
- // 电费
- get_table_dataElec() {
- this.elecCostTable.listLoading = true
- this.elecCostTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.elecCostTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.elecCostTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.elecCostTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.elecCostTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.elecCostTable.list = response.data.list
- } else {
- this.elecCostTable.list = []
- }
- setTimeout(() => {
- this.get_table_dataGas()
- this.elecCostTable.listLoading = false
- }, 100)
- })
- },
- // 燃动费 table
- get_table_dataGas() {
- this.gasCostTable.listLoading = true
- this.gasCostTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.gasCostTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.gasCostTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.gasCostTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.gasCostTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.gasCostTable.list = response.data.list
- } else {
- this.gasCostTable.list = []
- }
- setTimeout(() => {
- this.gasCostTable.listLoading = false
- this.get_table_dataallConsumption()
- this.get_table_dataBioConsumptionTable()
- }, 100)
- })
- },
- get_table_dataallConsumption() {
- this.allConsumptionTable.listLoading = true
- this.allConsumptionTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.allConsumptionTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.allConsumptionTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.allConsumptionTable.getdataListParm.parammaps.departmentId = this.departmentId
- let url = 'authdata/waterandelectricity'
- let data = this.allConsumptionTable.getdataListParm.parammaps
- postJson(url,data).then(response => {
- if (response.data.data !== null) {
- this.allConsumptionTable.list = response.data.data
- } else {
- this.allConsumptionTable.list = []
- }
- setTimeout(() => {
- this.allConsumptionTable.listLoading = false
- }, 100)
- })
- },
- // 水量 table
- get_table_dataWaterConsumption() {
- this.waterConsumptionTable.listLoading = true
- this.waterConsumptionTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.waterConsumptionTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.waterConsumptionTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.waterConsumptionTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.waterConsumptionTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.waterConsumptionTable.list = response.data.list
- } else {
- this.waterConsumptionTable.list = []
- }
- setTimeout(() => {
- this.get_table_dataElecConsumption()
- this.waterConsumptionTable.listLoading = false
- }, 100)
- })
- },
- // 电量 table
- get_table_dataElecConsumption() {
- this.elecConsumptionTable.listLoading = true
- this.elecConsumptionTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.elecConsumptionTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.elecConsumptionTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.elecConsumptionTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.elecConsumptionTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.elecConsumptionTable.list = response.data.list
- } else {
- this.elecConsumptionTable.list = []
- }
- setTimeout(() => {
- this.get_table_dataGasConsumption()
- this.elecConsumptionTable.listLoading = false
- }, 100)
- })
- },
- // 柴油用量 table
- get_table_dataGasConsumption() {
- this.gasConsumptionTable.listLoading = true
- this.gasConsumptionTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.gasConsumptionTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.gasConsumptionTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.gasConsumptionTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.gasConsumptionTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.gasConsumptionTable.list = response.data.list
- } else {
- this.gasConsumptionTable.list = []
- }
- setTimeout(() => {
- this.get_table_dataBioConsumptionTable()
- this.gasConsumptionTable.listLoading = false
- }, 100)
- })
- },
- //生物质
- get_table_dataBioConsumptionTable() {
- this.bioConsumptionTable.listLoading = true
- this.bioConsumptionTable.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.bioConsumptionTable.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.bioConsumptionTable.getdataListParm.parammaps.pastureId = this.pastureId
- this.bioConsumptionTable.getdataListParm.parammaps.departmentId = this.departmentId
- GetDataByName(this.bioConsumptionTable.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.bioConsumptionTable.list = response.data.list
- } else {
- this.bioConsumptionTable.list = []
- }
- setTimeout(() => {
- this.bioConsumptionTable.listLoading = false
- }, 100)
- })
- },
- get_table_dataDialog() {
- this.dialog.listLoading = true
- GetDataByName(this.dialog.getdataListParm).then(response => {
- if (response.data.list == null) {
- this.dialog.list = response.data.list
- this.dialog.pageNum = 0
- this.dialog.pageSize = 0
- this.dialog.total = 0
- } else {
- this.dialog.list = response.data.list
- this.dialog.pageNum = response.data.pageNum
- this.dialog.pageSize = response.data.pageSize
- this.dialog.total = response.data.total
- }
- setTimeout(() => {
- this.dialog.listLoading = false
- }, 100)
- })
- },
- // 设备指标-点击
- clickEquipmentIndex(row) {
- if (row.pastureName !== '现代牧业') {
- console.log(this.yearDate, '0000233')
- console.log(this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')), '0000233')
- this.textMap.equipmentIndex = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '设备指标'
- this.dialogStatus = 'equipmentIndex'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseEqMonthBudgetListSumAllDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 维修费-点击
- clickRepairCost(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.repair = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '维修费'
- this.dialogStatus = 'repair'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthWXDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 水费-点击
- clickWaterCost(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.water = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '水费'
- this.dialogStatus = 'water'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseWaterPriceDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 电费-点击
- clickElecCost(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.elec = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '电费'
- this.dialogStatus = 'elec'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseElectricityPriceDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 柴油费-点击
- clickGasCost(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.gas = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '柴油费'
- this.dialogStatus = 'gas'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthiolPriceDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- clickAllConsumption(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.allConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '水量'
- this.dialogStatus = 'allConsumption'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthWaterDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 水量-点击
- clickWaterConsumption(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.waterConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '水量'
- this.dialogStatus = 'waterConsumption'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthWaterDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 电量-点击
- clickElecConsumption(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.elecConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '电量'
- this.dialogStatus = 'elecConsumption'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthElectricityDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- // 柴油用量-点击
- clickGasConsumption(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.gasConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '柴油用量'
- this.dialogStatus = 'gasConsumption'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthOilTDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- clickBioConsumption(row) {
- if (row.pastureName !== '现代牧业') {
- this.textMap.bioConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '燃动费'
- this.dialogStatus = 'bioConsumption'
- this.dialog.dialogFormVisible = true
- this.dialog.getdataListParm.name = 'getChooseMonthOilTDepartment'
- this.dialog.getdataListParm.parammaps.startTime = this.yearDate[0]
- this.dialog.getdataListParm.parammaps.endTime = this.yearDate[1]
- this.dialog.getdataListParm.parammaps.pastureId = row.pastureId
- this.get_table_dataDialog()
- }
- },
- tableCellStyle({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 1) {
- if (row.pastureName == '现代牧业') {
- return {
- textDecoration: 'none'
- }
- } else {
- return {
- textDecoration: 'underline'
- }
- }
- }
- return {
- textDecoration: 'none'
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .dashboard-editor-container {
- padding: 20px;
- background-color: rgb(240, 242, 245);
- h3{
- background:#fff;line-height:50px;margin-bottom: 0;padding-left:10px;
- }
- }
- </style>
- <style type="text/css">
- .el-date-editor .el-range-separator{width: 10%;}
- </style>
|