Commit d48ef950 by qinjianhui

fix: 工单优化

parent 107e38fa
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
<el-tree <el-tree
:data="treeData" :data="treeData"
:props="defaultProps" :props="defaultProps"
ref="tree"
highlight-current highlight-current
:node-key="'statusCode'" :node-key="'statusCode'"
:expand-on-click-node="false" :expand-on-click-node="false"
current-node-key="PRE_HANDLING"
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
> >
...@@ -751,7 +751,6 @@ export default { ...@@ -751,7 +751,6 @@ export default {
this.centerPageOptions.currentPage = currentPage this.centerPageOptions.currentPage = currentPage
this.getlist() this.getlist()
}, },
operation() {},
async getSystemUserList() { async getSystemUserList() {
try { try {
const res = await getSystemUserList() const res = await getSystemUserList()
...@@ -789,6 +788,9 @@ export default { ...@@ -789,6 +788,9 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.treeData = [res.data] this.treeData = [res.data]
} }
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.statusCode)
})
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
...@@ -825,16 +827,21 @@ export default { ...@@ -825,16 +827,21 @@ export default {
) )
if (res.code === 200) { if (res.code === 200) {
this.assignVisible = false this.assignVisible = false
this.getlist()
this.getOrderTree() this.getOrderTree()
this.getlist()
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
}, },
handleNodeClick(data) { handleNodeClick(data) {
if (data.statusCode === 'IN_PROGRESS') {
this.$set(this.searchForm, 'leaders', [
this.userInfo.id,
])
}
if (data.statusCode !== 'IN_PROGRESS') { if (data.statusCode !== 'IN_PROGRESS') {
this.searchForm.leaders = '' this.searchForm.leaders = []
} }
this.statusCode = data.statusCode this.statusCode = data.statusCode
this.getlist() this.getlist()
...@@ -856,8 +863,11 @@ export default { ...@@ -856,8 +863,11 @@ export default {
this.searchForm.leaders.join(','), this.searchForm.leaders.join(','),
}) })
.then((res) => { .then((res) => {
if (res.code !== 200) return
this.sourceData = res.data.records this.sourceData = res.data.records
this.centerPageOptions.total = res.data.total this.centerPageOptions.total = res.data.total
})
.finally(() => {
this.loading = false this.loading = false
}) })
}, },
...@@ -966,17 +976,6 @@ export default { ...@@ -966,17 +976,6 @@ export default {
this.textarea = '' this.textarea = ''
}, },
}, },
watch: {
statusCode(val) {
if (val === 'IN_PROGRESS') {
this.$set(this.searchForm, 'leaders', [
this.userInfo.id,
])
} else {
this.$set(this.searchForm, 'leaders', [])
}
},
},
} }
</script> </script>
<style lang="scss" scoped> <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