Commit 8bbe81be authored by 仇晓婷's avatar 仇晓婷

任务o'kok

parent a744d2d4
...@@ -25,7 +25,11 @@ ...@@ -25,7 +25,11 @@
@click="toggle" @click="toggle"
title="展开/合并" title="展开/合并"
></Button> ></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree"></Button> <Button
icon="md-refresh"
title="刷新"
@click="loadTree(curId)"
></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button> <Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup> </ButtonGroup>
</div> </div>
...@@ -56,6 +60,7 @@ export default { ...@@ -56,6 +60,7 @@ export default {
list: [], list: [],
downName: "", downName: "",
projectList: [], projectList: [],
curdId: this.curId,
}; };
}, },
props: { props: {
...@@ -71,13 +76,13 @@ export default { ...@@ -71,13 +76,13 @@ export default {
methods: { methods: {
clickItem(val) { clickItem(val) {
console.log(val); console.log(val);
this.projectList.forEach((e) => { this.projectList.forEach((e) => {
if (val == e.id) { if (val == e.id) {
this.downName = e.title; this.downName = e.title;
} }
}); });
this.loadTree(val); this.curdId = val;
this.loadTree();
}, },
listSlecet() { listSlecet() {
let data = { let data = {
...@@ -89,17 +94,17 @@ export default { ...@@ -89,17 +94,17 @@ export default {
if (r.result) { if (r.result) {
this.projectList = r.result; this.projectList = r.result;
this.downName = this.projectList[0].title; this.downName = this.projectList[0].title;
// this.curId = this.projectList[0].id; this.curdId = this.projectList[0].id;
this.loadTree(this.projectList[0].id); this.loadTree(this.projectList[0].id);
} }
}); });
}, },
loadTree(v) { loadTree() {
let params = { let params = {
conditions: [ conditions: [
{ {
fieldName: "projectId", fieldName: "projectId",
fieldValue: v, fieldValue: this.curdId,
conditionalType: "Equal", conditionalType: "Equal",
}, },
], ],
...@@ -129,7 +134,7 @@ export default { ...@@ -129,7 +134,7 @@ export default {
var item = items.filter((u) => { var item = items.filter((u) => {
return u.code == data.status; return u.code == data.status;
})[0]; })[0];
console.warn("jjjjjj", items, item); // console.warn("jjjjjj", items, item);
var color = item.color || "black"; var color = item.color || "black";
return h("div", [ return h("div", [
h("state", { h("state", {
...@@ -207,7 +212,8 @@ export default { ...@@ -207,7 +212,8 @@ export default {
watch: { watch: {
curId(v) { curId(v) {
if (v) { if (v) {
this.loadTree(v); this.curdId = v;
this.loadTree();
} }
}, },
}, },
......
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