Commit 86183518 authored by 仇晓婷's avatar 仇晓婷

物料

parent e4ee2d50
......@@ -25,7 +25,7 @@
@click="toggle"
title="展开/合并"
></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree"></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree(model8)"></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
......@@ -128,6 +128,7 @@ export default {
this.downName = e.name;
}
});
this.model8 = val;
},
listSlecet() {
let data = {
......
......@@ -7,8 +7,8 @@
<!-- <Select v-model="model8" clearable style="width:130px;float:left;margin-top:8px" @on-change='chnangeClick' placeholder="请选择类型">
<Option v-for="item in cityList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</Select> -->
<Dropdown @on-click="clickItem">
</Select>-->
<Dropdown @on-click="clickItem">
<a href="javascript:void(0)">
{{downName}}
<Icon type="ios-arrow-down"></Icon>
......@@ -29,7 +29,7 @@
@click="toggle"
title="展开/合并"
></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree"></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree(model8)"></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
......@@ -66,10 +66,10 @@ export default {
name: "masterData",
data() {
return {
model8:'',
model8: "",
type: "",
keys: "",
cityList:[],
cityList: [],
expand: false,
list: [],
nodeInfo: {
......@@ -77,14 +77,14 @@ export default {
rootCategoryId: 0,
ids: []
},
downName: "请选择类型",
downName: "请选择类型",
modal: false,
title: "新增",
curId: 0,
detail: null,
showMenu: true,
dataList: [],
codeRuleId:'',
codeRuleId: ""
};
},
async fetch({ store, params }) {
......@@ -92,19 +92,20 @@ export default {
},
created() {
// this.loadTree();
this.listSlecet();
this.listSlecet();
},
methods: {
clickItem(val) {
this.codeRuleId = val;
this.loadTree(this.codeRuleId);
clickItem(val) {
this.codeRuleId = val;
this.model8 = val;
this.loadTree(this.codeRuleId);
this.cityList.forEach(e => {
if (val == e.id) {
this.downName = e.name;
}
});
},
listSlecet() {
listSlecet() {
let data = {
conditions: []
};
......@@ -114,14 +115,14 @@ export default {
},
// chnangeClick(val){
// this.codeRuleId = val;
// this.loadTree(this.codeRuleId);
// this.loadTree(this.codeRuleId);
// },
showMenuFn() {
//this.$Message.info("展开左侧树")
this.showMenu = true;
},
ok(row) {
this.loadTree(this.codeRuleId);
this.loadTree(this.codeRuleId);
// this.modal = false;
// this.curId = 0;
// if (row) {
......@@ -179,7 +180,9 @@ export default {
}
},
loadTree(id) {
let conditions = [];
let conditions = [
{ fieldName: "codeRuleId", fieldValue: id, conditionalType: "Equal" }
];
Api.list({ conditions: conditions }).then(r => {
var data = this.$u.toTree(
r.result,
......@@ -195,12 +198,11 @@ export default {
});
},
toggle() {
if (this.model8) {
this.expand = !this.expand;
if (this.model8) {
this.expand = !this.expand;
} else {
this.$Message.error("请先选择类型");
}
},
change(v, b) {
let ids = [];
......@@ -275,7 +277,6 @@ export default {
background: rgba(245, 246, 250, 1);
opacity: 1;
padding-left: 10px;
}
.search {
height: 50px;
......
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