This commit is contained in:
2020-04-08 18:45:25 +00:00
parent 7d02547e4a
commit 9eef64ef34

View File

@@ -45,53 +45,25 @@
<template v-for="(item, i) in results"> <template v-for="(item, i) in results">
<v-subheader :key="i" v-if="item.subheader" <v-subheader :key="i" v-if="item.subheader"
><v-icon x-large>{{ item.icon }}</v-icon ><v-icon large class="mr-1">{{ item.icon }}</v-icon
>{{ item.subheader }}</v-subheader ><span class="title">{{ item.subheader }}</span></v-subheader
> >
<template>
<v-list-item link :key="i">
<!-- <v-list-item-avatar>
</v-list-item-avatar> --> <v-list-item link :key="i">
<v-list-item-content>
<v-list-item-content> <v-list-item-title
<v-list-item-title @click="openItem"
@click="openItem" v-text="item.name"
v-text="item.name" ></v-list-item-title>
></v-list-item-title> </v-list-item-content>
</v-list-item-content> <v-list-item-action>
<v-btn icon @click="getExcerpt">
<v-list-item-action> <v-icon color="grey lighten-1" large
<v-btn icon @click="getExcerpt"> >fa-info-circle</v-icon
<v-icon color="grey lighten-1" large >
>fa-info-circle</v-icon </v-btn>
> </v-list-item-action>
</v-btn> </v-list-item>
</v-list-item-action>
</v-list-item>
</template>
<!-- <template v-else> v-if="$vuetify.breakpoint.smAndUp"
<v-list-item link :key="i">
<v-list-item-avatar>
<v-icon>{{ item.icon }}</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title
@click="openItem"
v-text="item.name"
></v-list-item-title>
</v-list-item-content>
<v-list-item-action>
<v-btn icon @click="getExcerpt">
<v-icon color="grey lighten-1" large
>fa-info-circle</v-icon
>
</v-btn>
</v-list-item-action>
</v-list-item>
</template> -->
</template> </template>
</v-list> </v-list>
</v-card> </v-card>
@@ -229,15 +201,27 @@ export default {
let lastType = -1; let lastType = -1;
for (let i = 0; i < res.data.searchResults.length; i++) { for (let i = 0; i < res.data.searchResults.length; i++) {
let item = res.data.searchResults[i]; let item = res.data.searchResults[i];
if (item.type != lastType) { if (item.type != lastType) {
//change of type, set subheader props //change of type, set subheader props
item["subheader"] = item.type; let tsub = window.$gz._.find(vm.selectLists.objectTypes, [
"id",
item.type
]);
if (tsub != null) {
item["subheader"] = tsub.name;
} else {
item["subheader"] = "TYPE " + item.type;
}
item["icon"] = window.$gz.util.iconForCoreType(item.type); item["icon"] = window.$gz.util.iconForCoreType(item.type);
lastType = item.type; lastType = item.type;
} }
newResults.push(item); newResults.push(item);
} }
console.log(newResults);
vm.results = newResults; vm.results = newResults;
//Update the form status //Update the form status