|
|
@@ -344,7 +344,8 @@
|
|
|
dispatchType: 1,
|
|
|
time_calc_code: '0', // 是否进行时间赋值 0 否 1 是
|
|
|
validDate,
|
|
|
- userTeamList: []
|
|
|
+ userTeamList: [],
|
|
|
+ isTask: true
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -566,6 +567,7 @@
|
|
|
|
|
|
if (userData.centerList.length != 0) {
|
|
|
this.form.workCenterId = userData.centerList[0].centerId;
|
|
|
+ this.form.workCenterName = userData.centerList[0].centerName;
|
|
|
this.workCenterList = userData.centerList;
|
|
|
this.userTeamList = userData.teamList;
|
|
|
this.changeWork(userData.centerList[0].centerId);
|
|
|
@@ -724,6 +726,8 @@
|
|
|
item.workCenterIds.includes(e)
|
|
|
);
|
|
|
|
|
|
+ this.changeDispatch();
|
|
|
+
|
|
|
this.teamList = data || [];
|
|
|
if (this.teamList.length != 0) {
|
|
|
this.form.teamId = this.teamList[0].teamId;
|
|
|
@@ -741,7 +745,7 @@
|
|
|
// 选择班组 查询人员的数据
|
|
|
async changeGroups(e) {
|
|
|
let data = this.teamList.find((item) => item.teamId == e);
|
|
|
- this.form.teamName = data.name;
|
|
|
+ this.form.teamName = data.teamName;
|
|
|
try {
|
|
|
const res = await listUserByIds([e]);
|
|
|
this.crewList = res || [];
|
|
|
@@ -769,11 +773,26 @@
|
|
|
this.productionList = res || [];
|
|
|
},
|
|
|
// 查询工位数据
|
|
|
- FirstTaskIdFn() {
|
|
|
- listByFirstTaskId(this.current.taskInstanceId)
|
|
|
+ async FirstTaskIdFn(id) {
|
|
|
+ // if (id) {
|
|
|
+ // listByFirstTaskId(id)
|
|
|
+ // .then((res) => {
|
|
|
+ // this.stationList = res;
|
|
|
+ // if (this.isTask) {
|
|
|
+ // this.changeDispatch();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // this.stationList = [];
|
|
|
+ // this.$message.error(err.message);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ await listByFirstTaskId(id ? id : this.current.taskInstanceId)
|
|
|
.then((res) => {
|
|
|
this.stationList = res;
|
|
|
- this.changeDispatch();
|
|
|
+ if (this.isTask) {
|
|
|
+ this.changeDispatch();
|
|
|
+ }
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.stationList = [];
|
|
|
@@ -932,6 +951,8 @@
|
|
|
async handleClick(tab) {
|
|
|
let id = tab.name;
|
|
|
this.processId = id;
|
|
|
+ this.isTask = false;
|
|
|
+ await this.FirstTaskIdFn(id);
|
|
|
let data = this.processList.find((item) => item.id == this.processId);
|
|
|
await this.changeRadio(data.assignType, data.index);
|
|
|
},
|
|
|
@@ -956,6 +977,8 @@
|
|
|
async getAssignData(index, arr) {
|
|
|
let list = JSON.parse(JSON.stringify(arr));
|
|
|
let dataRow = this.processList[index];
|
|
|
+
|
|
|
+ // return;
|
|
|
// 不存在 班组数据的话 就不调用这个方法
|
|
|
if (!this.form.teamId) {
|
|
|
return;
|