|
@@ -44,12 +44,14 @@
|
|
|
</div>
|
|
|
|
|
|
<select-project v-model="chartProjectId" :size="'small'" :placeholder="'请选择项目'" clearable
|
|
|
- v-if="singleChoiceType == '项目' || singleChoiceType == '设备' || singleChoiceType == namess"></select-project>
|
|
|
- <select-personnel v-model="chartUserId" v-if="singleChoiceType == '人员'"></select-personnel>
|
|
|
+ v-if="singleChoiceType == '项目' || singleChoiceType == '设备' || singleChoiceType == namess"
|
|
|
+ @change="filterConditionSwitching"></select-project>
|
|
|
+ <select-personnel v-model="chartUserId" v-if="singleChoiceType == '人员'"
|
|
|
+ @change="filterPersonnel"></select-personnel>
|
|
|
</el-col>
|
|
|
<el-col :span="2" style="display: flex;justify-content: flex-end;">
|
|
|
- <el-button @click="exportTheCustomListFlg" size="small"
|
|
|
- :loading="theCustomListFlgBtnLoading" v-if="theCustomListFlg">报表导</el-button>
|
|
|
+ <el-button @click="exportTheCustomListFlg" size="small" :loading="theCustomListFlgBtnLoading"
|
|
|
+ v-if="theCustomListFlg">报表导</el-button>
|
|
|
<el-button @click="showExportDialog" size="small" v-else>报表导出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -92,7 +94,7 @@ import selectProject from "../../components/selectProject.vue";
|
|
|
import selectPersonnel from "../../components/selectPersonnel.vue";
|
|
|
import EchartsEchar from "../../components/echartsEchar.vue"
|
|
|
import costReportExport from "./costReportExport.vue";
|
|
|
-import { barChartOptions } from "./costData";
|
|
|
+import { barChartOptions } from "./project";
|
|
|
export default {
|
|
|
components: {
|
|
|
selectProject,
|
|
@@ -143,6 +145,24 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ filterPersonnel(id, name) {
|
|
|
+ this.pageIndex = 1
|
|
|
+ if (this.chartUserId) {
|
|
|
+ let arrList = JSON.parse(JSON.stringify(this.personnelAllPlly))
|
|
|
+ const arr = arrList.list.filter(item => item.name == name)
|
|
|
+ arrList.list = arr
|
|
|
+ this.allListData = arrList
|
|
|
+ if (this.user.userNameNeedTranslate === 1) {
|
|
|
+ const dealWithList = arr.map(item => ({
|
|
|
+ type: item.type,
|
|
|
+ id: item.name
|
|
|
+ }));
|
|
|
+ this.dealWithTranslationPlone(dealWithList);
|
|
|
+ } else {
|
|
|
+ this.initialChartData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async exportTheCustomListFlg() {
|
|
|
this.theCustomListFlgBtnLoading = true;
|
|
|
try {
|
|
@@ -959,7 +979,7 @@ export default {
|
|
|
|
|
|
const { query } = this.$route;
|
|
|
const today = this.dayjs();
|
|
|
-
|
|
|
+
|
|
|
if (fixMonthcost === 0) {
|
|
|
this.chartDate = query.startDate
|
|
|
? [query.startDate, query.endDate]
|