|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
<div class="left-laowang" style="flex: 0 0 180px; overflow: hidden;">
|
|
|
<div class="left-laowangText">
|
|
|
- {{ currentDepartmentText }}
|
|
|
+ {{ currentDepartmentText && currentDepartmentText.text }}
|
|
|
</div>
|
|
|
<div class="left-laowangTree">
|
|
|
<el-tree :data="departmentList" @node-click="treeChange" :props="defaultProps" :draggable="adjustPosition"
|
|
@@ -359,7 +359,10 @@ export default {
|
|
|
{ required: true, message: "分类名称", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
- currentDepartmentText: ''
|
|
|
+ currentDepartmentText: {
|
|
|
+ id: '',
|
|
|
+ text: ''
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -433,7 +436,7 @@ export default {
|
|
|
this.departmentList = this.changeArr(dptlist);
|
|
|
if(this.departmentList[0]) {
|
|
|
const { value, label } = this.departmentList[0]
|
|
|
- this.currentDepartmentText = label
|
|
|
+ this.currentDepartmentText = { id: value, text: label }
|
|
|
this.getTableData(value)
|
|
|
}
|
|
|
} else {
|
|
@@ -453,7 +456,7 @@ export default {
|
|
|
},
|
|
|
treeChange(item) {
|
|
|
const { value, label } = item
|
|
|
- this.currentDepartmentText = label
|
|
|
+ this.currentDepartmentText = { id: value, text: label }
|
|
|
this.getTableData(value)
|
|
|
},
|
|
|
changeArr(arr) {
|
|
@@ -574,12 +577,12 @@ export default {
|
|
|
},
|
|
|
// 获取车间数据
|
|
|
getTableData(departmentId) {
|
|
|
- console.log(this.planDate);
|
|
|
+ console.log(this.planDate, departmentId);
|
|
|
this.tableDataLoading = true;
|
|
|
this.http.post(
|
|
|
"/plan/list",
|
|
|
{
|
|
|
- deptId: departmentId,
|
|
|
+ deptId: departmentId || this.currentDepartmentText.id,
|
|
|
planType: this.planType,
|
|
|
date: this.planDate,
|
|
|
steelStampNumber: this.steelStampNumber,
|