|
@@ -95,6 +95,7 @@ const queryDeptParams = ref({
|
|
/** 查询车间管理列表 */
|
|
/** 查询车间管理列表 */
|
|
function getList() {
|
|
function getList() {
|
|
loading.value = true
|
|
loading.value = true
|
|
|
|
+ currentWorkshop.value = {}
|
|
listWorkshop(queryParams.value).then((res) => {
|
|
listWorkshop(queryParams.value).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
workshopList.value = res.rows
|
|
workshopList.value = res.rows
|
|
@@ -102,12 +103,10 @@ function getList() {
|
|
console.log(workshopList.value.length)
|
|
console.log(workshopList.value.length)
|
|
if (workshopList.value.length >0) {
|
|
if (workshopList.value.length >0) {
|
|
currentWorkshop.value = workshopList.value[0]
|
|
currentWorkshop.value = workshopList.value[0]
|
|
- getdeptList()
|
|
|
|
|
|
+ proxy.$refs.workshopTable.setCurrentRow(workshopList.value[0])
|
|
} else {
|
|
} else {
|
|
- console.log("888")
|
|
|
|
deptList.value = []
|
|
deptList.value = []
|
|
total.value = 0
|
|
total.value = 0
|
|
- console.log(deptList.value.length)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -179,14 +178,16 @@ function getdeptList() {
|
|
deptLoading.value = true
|
|
deptLoading.value = true
|
|
queryDeptParams.value.workshopId = currentWorkshop.value.id
|
|
queryDeptParams.value.workshopId = currentWorkshop.value.id
|
|
console.log(total.value)
|
|
console.log(total.value)
|
|
|
|
+ if(currentWorkshop.value.id) {
|
|
listDept(queryDeptParams.value).then((res) => {
|
|
listDept(queryDeptParams.value).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
deptList.value = res.rows
|
|
deptList.value = res.rows
|
|
total.value = res.total
|
|
total.value = res.total
|
|
- deptLoading.value = false
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+deptLoading.value = false
|
|
|
|
+}
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
function handleDeleteWorkshop(row) {
|
|
function handleDeleteWorkshop(row) {
|