Commit d48ef950 by qinjianhui

fix: 工单优化

parent 107e38fa
......@@ -11,10 +11,10 @@
<el-tree
:data="treeData"
:props="defaultProps"
ref="tree"
highlight-current
:node-key="'statusCode'"
:expand-on-click-node="false"
current-node-key="PRE_HANDLING"
default-expand-all
@node-click="handleNodeClick"
>
......@@ -751,7 +751,6 @@ export default {
this.centerPageOptions.currentPage = currentPage
this.getlist()
},
operation() {},
async getSystemUserList() {
try {
const res = await getSystemUserList()
......@@ -789,6 +788,9 @@ export default {
if (res.code === 200) {
this.treeData = [res.data]
}
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.statusCode)
})
} catch (e) {
console.error(e)
}
......@@ -825,16 +827,21 @@ export default {
)
if (res.code === 200) {
this.assignVisible = false
this.getlist()
this.getOrderTree()
this.getlist()
}
} catch (e) {
console.error(e)
}
},
handleNodeClick(data) {
if (data.statusCode === 'IN_PROGRESS') {
this.$set(this.searchForm, 'leaders', [
this.userInfo.id,
])
}
if (data.statusCode !== 'IN_PROGRESS') {
this.searchForm.leaders = ''
this.searchForm.leaders = []
}
this.statusCode = data.statusCode
this.getlist()
......@@ -856,8 +863,11 @@ export default {
this.searchForm.leaders.join(','),
})
.then((res) => {
if (res.code !== 200) return
this.sourceData = res.data.records
this.centerPageOptions.total = res.data.total
})
.finally(() => {
this.loading = false
})
},
......@@ -966,17 +976,6 @@ export default {
this.textarea = ''
},
},
watch: {
statusCode(val) {
if (val === 'IN_PROGRESS') {
this.$set(this.searchForm, 'leaders', [
this.userInfo.id,
])
} else {
this.$set(this.searchForm, 'leaders', [])
}
},
},
}
</script>
<style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment