remove extra data on the table

This commit is contained in:
郑茂强 2018-08-21 10:29:44 +08:00
parent 78d64a2319
commit ada54f7b7b
4 changed files with 10 additions and 7 deletions

View File

@ -1 +0,0 @@
1231

View File

@ -26,9 +26,7 @@ export default {
"邮编", "邮编",
"国家", "国家",
"电话", "电话",
"传真", "传真"
"区域",
"城市"
], ],
info: [ info: [
{ {

View File

@ -17,6 +17,7 @@ export default {
data: function() { data: function() {
return { return {
selectedvaluedown: [], selectedvaluedown: [],
selectedindexdown: 0, selectedindexdown: 0,
formateddata: {} formateddata: {}
}; };
@ -53,12 +54,13 @@ export default {
} }
} }
for (var company of citychild.children) { for (var company of citychild.children) {
var arr = [];
for (var item of this.usersdata.info) { for (var item of this.usersdata.info) {
if ( if (
item.city === company.name[0] && item.city === company.name[0] &&
item.state === citychild.name[0] item.state === citychild.name[0]
) { ) {
var arr = [];
for (var x in item) { for (var x in item) {
if (x != "state" && x != "city") arr.push(item[x]); if (x != "state" && x != "city") arr.push(item[x]);
} }
@ -68,6 +70,7 @@ export default {
} }
} }
this.formateddata = formateddata; this.formateddata = formateddata;
console.log(formateddata)
}, },
//// function below is for swap table header uses. //// function below is for swap table header uses.
getindexvalue: function(index) { getindexvalue: function(index) {

View File

@ -16,7 +16,7 @@ export default {
props: { data: Object }, props: { data: Object },
data: function() { data: function() {
return { return {
open: false open: true
}; };
}, },
methods: { methods: {
@ -37,8 +37,11 @@ export default {
ul { ul {
padding-left: 0px; padding-left: 0px;
} }
td {
width: 10%;
}
table { table {
width: 100%; width: 60%;
} }
</style> </style>