|
|
@@ -19,7 +19,7 @@
|
|
|
v-for="item in teamList"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
- :value="item.id"
|
|
|
+ :value="item.value"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -316,7 +316,7 @@
|
|
|
<script>
|
|
|
import { component as VueFullscreen } from 'vue-fullscreen';
|
|
|
import { toggleFullscreen } from 'ele-admin';
|
|
|
-import { getTeamProductionDayDataOne, getTeamProductionDayDataThree, getTeamProductionDayDataTwo, queryTeamListByCurrentUserid } from '@/api/vis/productionDailyDashboard';
|
|
|
+import { getTeamProductionDayDataOne, getTeamProductionDayDataThree, getTeamProductionDayDataTwo, queryTeamListAll } from '@/api/vis/productionDailyDashboard';
|
|
|
// 导入图表组件
|
|
|
import ChartCard from './components/ChartCard';
|
|
|
import ProcessPersonnelChart from './components/charts/ProcessPersonnelChart';
|
|
|
@@ -453,21 +453,33 @@ export default {
|
|
|
methods: {
|
|
|
// 查询当前用户所属班组
|
|
|
queryTeamList() {
|
|
|
- queryTeamListByCurrentUserid().then((res) => {
|
|
|
- console.log(res);
|
|
|
+ queryTeamListAll({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1000
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res.list);
|
|
|
// if (res) {
|
|
|
- if (!res ||res.length == 0) {
|
|
|
+ if (!res || res.list.length == 0) {
|
|
|
this.$message({
|
|
|
message: '当前用户没有所属班组',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- this.teamList = res;
|
|
|
- this.teamId = res[0].id;
|
|
|
- this.getTeamProductionDayDataOneData();
|
|
|
- this.getTeamProductionDayDataTwoData();
|
|
|
- this.getTeamProductionDayDataThreeData();
|
|
|
+ this.teamList = res.list.map(item => {
|
|
|
+ return {
|
|
|
+ name: item.name,
|
|
|
+ value: item.id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log('teamList~~~', this.teamList);
|
|
|
+
|
|
|
+ this.teamId = this.teamList[0].value;
|
|
|
+ console.log('teamId~~~', this.teamId);
|
|
|
+ this.changeTeam();
|
|
|
+ // this.getTeamProductionDayDataOneData();
|
|
|
+ // this.getTeamProductionDayDataTwoData();
|
|
|
+ // this.getTeamProductionDayDataThreeData();
|
|
|
}).catch((error) => {
|
|
|
console.error('获取班组列表失败:', error);
|
|
|
});
|