|
@@ -382,32 +382,38 @@ export default {
|
|
|
},
|
|
|
|
|
|
fetch (params = {}) {
|
|
|
- this.loading = true
|
|
|
- if (this.queryParams.timeRange) {
|
|
|
- this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
|
|
|
- this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
|
|
|
- }
|
|
|
+ this.loading = true
|
|
|
+ if (this.queryParams.timeRange) {
|
|
|
+ this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
|
|
|
+ this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
|
|
|
+ }
|
|
|
|
|
|
- this.queryParams.current = params.current ? params.current : this.queryParams.current
|
|
|
- this.queryParams.size = params.size ? params.size : this.queryParams.size
|
|
|
- // 根据订单的id,查询数据
|
|
|
- this.queryParams.planId = this.tenant.id || '1499333016156110848';
|
|
|
+ this.queryParams.current = params.current ? params.current : this.queryParams.current
|
|
|
+ this.queryParams.size = params.size ? params.size : this.queryParams.size
|
|
|
+ // 参数
|
|
|
+ if(this.type == 'view'){
|
|
|
+ // 根据订单的id,查询数据
|
|
|
+ this.queryParams.planId = this.tenant.id;
|
|
|
+ }else{
|
|
|
+ // 最新需求
|
|
|
+ this.queryParams.planIds = this.orderData.planIds;
|
|
|
+ }
|
|
|
|
|
|
- planMgrApi.scheduleTaskByResource(this.queryParams).then(response => {
|
|
|
- const res = response.data
|
|
|
- if (res.isSuccess) {
|
|
|
- /*if(res.data.data && res.data.data.length > 0) {
|
|
|
- res.data.data.forEach(item => {
|
|
|
- item.id = 'wks'+ Math.random();
|
|
|
- });
|
|
|
- }*/
|
|
|
- this.tableData = res.data;
|
|
|
- // console.log("生产资源的数据-表头1245678:",this.tableData);
|
|
|
- // this.tableData.data = [{},{},{},{},{},{},{},{},{},{}];
|
|
|
- // this.titleData = res.data.titleList;
|
|
|
- }
|
|
|
- // eslint-disable-next-line no-return-assign
|
|
|
- }).finally(() => this.loading = false)
|
|
|
+ planMgrApi.scheduleTaskByResource(this.queryParams).then(response => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ /*if(res.data.data && res.data.data.length > 0) {
|
|
|
+ res.data.data.forEach(item => {
|
|
|
+ item.id = 'wks'+ Math.random();
|
|
|
+ });
|
|
|
+ }*/
|
|
|
+ this.tableData = res.data;
|
|
|
+ // console.log("生产资源的数据-表头1245678:",this.tableData);
|
|
|
+ // this.tableData.data = [{},{},{},{},{},{},{},{},{},{}];
|
|
|
+ // this.titleData = res.data.titleList;
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line no-return-assign
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
|
|
|
}
|
|
|
}
|