Commit 19fd0a8f authored by 仇晓婷's avatar 仇晓婷

物料

parent e1031f9a
...@@ -4,6 +4,10 @@ export default { ...@@ -4,6 +4,10 @@ export default {
paged(params){ paged(params){
return Api.post(`${systemUrl}/category/paged`,params); return Api.post(`${systemUrl}/category/paged`,params);
}, },
// indexSlecet:`${systemUrl}/coderule/paged`,
pagedSlecet(params){
return Api.post(`${systemUrl}/coderule/paged`,params);
},
listTable(params){ listTable(params){
return Api.post(`${systemUrl}/custompropertydefinition/list`,params); return Api.post(`${systemUrl}/custompropertydefinition/list`,params);
}, },
......
...@@ -4,7 +4,14 @@ ...@@ -4,7 +4,14 @@
<Sider width="300" v-if="showMenu"> <Sider width="300" v-if="showMenu">
<div class="p-list"> <div class="p-list">
<h3> <h3>
<Dictionary code="material.code.type" v-model="type" style="width:130px;float:left;"></Dictionary> <Select
v-model="model8"
clearable
style="width:130px;float:left;margin-top:8px"
@on-change="chnangeClick"
>
<Option v-for="item in cityList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
<div class="fr mr10 mt10"> <div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small"> <ButtonGroup class="fr" size="small">
<Button icon="md-add" title="新增顶级" @click="addNew"></Button> <Button icon="md-add" title="新增顶级" @click="addNew"></Button>
...@@ -83,6 +90,7 @@ export default { ...@@ -83,6 +90,7 @@ export default {
id: 0, id: 0,
ids: [] ids: []
}, },
cityList: [],
keys: "", keys: "",
expand: false, expand: false,
list: [], list: [],
...@@ -100,8 +108,20 @@ export default { ...@@ -100,8 +108,20 @@ export default {
}, },
created() { created() {
this.loadTree(); this.loadTree();
this.listSlecet();
}, },
methods: { methods: {
listSlecet() {
let data = {
conditions: []
};
Api.pagedSlecet(data).then(r => {
this.cityList = r.result.items;
});
},
chnangeClick(val) {
this.loadTree(val);
},
showMenuFn() { showMenuFn() {
//this.$Message.info("展开左侧树") //this.$Message.info("展开左侧树")
this.showMenu = true; this.showMenu = true;
...@@ -224,7 +244,7 @@ export default { ...@@ -224,7 +244,7 @@ export default {
// this.$refs.dataTable.dataColumns = tableData; // this.$refs.dataTable.dataColumns = tableData;
// } // }
}, },
loadTree() { loadTree(id) {
let conditions = []; let conditions = [];
Api.list({ conditions: conditions }).then(r => { Api.list({ conditions: conditions }).then(r => {
var data = this.$u.toTree( var data = this.$u.toTree(
......
...@@ -5,6 +5,9 @@ export default { ...@@ -5,6 +5,9 @@ export default {
paged(params){ paged(params){
return Api.post(`${systemUrl}/material/paged`,params); return Api.post(`${systemUrl}/material/paged`,params);
}, },
pagedSlecet(params){
return Api.post(`${systemUrl}/coderule/paged`,params);
},
list(params){ list(params){
return Api.post(`${systemUrl}/category/list`,params); return Api.post(`${systemUrl}/category/list`,params);
}, },
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
<Sider width="300" v-if="showMenu"> <Sider width="300" v-if="showMenu">
<div class="p-list"> <div class="p-list">
<h3> <h3>
<Dictionary code="material.code.type" v-model="type" style="width:130px;float:left;"></Dictionary> <Select v-model="model8" clearable style="width:130px;float:left;margin-top:8px" @on-change='chnangeClick'>
<Option v-for="item in cityList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</Select>
<div class="fr mr10 mt10"> <div class="fr mr10 mt10">
<ButtonGroup class="fr ddi" size="small"> <ButtonGroup class="fr ddi" size="small">
<!-- <Button icon="md-add" title="新增顶级" @click="addNew"></Button> --> <!-- <Button icon="md-add" title="新增顶级" @click="addNew"></Button> -->
...@@ -52,6 +55,7 @@ export default { ...@@ -52,6 +55,7 @@ export default {
return { return {
type: "", type: "",
keys: "", keys: "",
cityList:[],
expand: false, expand: false,
list: [], list: [],
nodeInfo: { nodeInfo: {
...@@ -72,8 +76,20 @@ export default { ...@@ -72,8 +76,20 @@ export default {
}, },
created() { created() {
this.loadTree(); this.loadTree();
this.listSlecet();
}, },
methods: { methods: {
listSlecet() {
let data = {
conditions: []
};
Api.pagedSlecet(data).then(r => {
this.cityList = r.result.items;
});
},
chnangeClick(val){
this.loadTree(val);
},
showMenuFn() { showMenuFn() {
//this.$Message.info("展开左侧树") //this.$Message.info("展开左侧树")
this.showMenu = true; this.showMenu = true;
...@@ -136,7 +152,7 @@ export default { ...@@ -136,7 +152,7 @@ export default {
this.nodeInfo.rootCategoryId = pid; this.nodeInfo.rootCategoryId = pid;
} }
}, },
loadTree() { loadTree(id) {
let conditions = []; let conditions = [];
Api.list({ conditions: conditions }).then(r => { Api.list({ conditions: conditions }).then(r => {
var data = this.$u.toTree( var data = this.$u.toTree(
...@@ -228,9 +244,7 @@ export default { ...@@ -228,9 +244,7 @@ export default {
background: rgba(245, 246, 250, 1); background: rgba(245, 246, 250, 1);
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
.ddi {
margin-top: 3px;
}
} }
.search { .search {
height: 50px; 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