Поиск

This commit is contained in:
iriska-gri committed 2023-10-30 10:35:29 +03:00
1 parent f07fd09ae1
commit df5d962413
5 files changed
+83 -48

No files matched your search

+51 -45
View File
@@ -149,26 +149,42 @@
v-model="dialogDetailRound"
width="500"
>
<v-card class="bg-white pa-3 px-0" width="450"
height="500">
<v-card class="bg-white pa-3 px-0" width="550"
height="600">
<v-card
class="mx-auto overflow-auto mx-0 px-3"
width="450"
height="500"
width="550"
height="600"
flat
>
<!-- -->
<v-card-title class="fixed-bar bg-white">
<v-toolbar class="bg-teal-lighten-2 ">
<!-- <my-helper :pretext="t_dailyRound"/> -->
<v-row class="ma-0">
<v-col class="pa-3 align-self-center">
<v-toolbar-title>{{t_dailyRound.position}}</v-toolbar-title>
</v-col>
<v-col lg=7 class="pa-0"> <v-textarea
v-model="searchname"
append-inner-icon="mdi-magnify"
hide-details
class="mx-2"
label="Поиск"
rows="1"
></v-textarea></v-col>
</v-row>
<!-- <v-toolbar color="cyan-lighten-1">
<v-btn variant="text" icon="mdi-menu"></v-btn>
<v-toolbar-title>Inbox</v-toolbar-title>
<!-- <v-btn variant="text" icon="mdi-magnify"></v-btn> -->
</v-toolbar>
<v-spacer></v-spacer>
</v-card-title>
{{ searchname}}
<v-btn variant="text" icon="mdi-magnify"></v-btn>
</v-toolbar> -->
<div
v-for="(x, key) in t_dailyRound.daily"
@@ -187,44 +203,15 @@
:prepend-avatar="checkremote(`${spravURL}${item.login}.jpg`)"
:title="item.fio"
:subtitle="item.post"
variant="text" @click="getcard"
variant="text"
>
</v-card>
<!-- @click="getcard" -->
</div>
</v-card>
</v-card>
<!-- <v-card class="pa-5">
<v-divider class="my-6"/>
<v-table
v-for="(x, key) in t_dailyRound"
:key="key"
density="compact"
>
<thead>
<tr>
<th class="text-left">
{{key}}
</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in x"
:key="item.name"
>
<td>{{ item.fio }}</td>
</tr>
</tbody>
<v-divider class="my-6"/>
</v-table>
</v-card> -->
@@ -234,7 +221,7 @@
</template>
<script>
import { ref, onMounted } from 'vue'
import { ref, onMounted,watch } from 'vue'
import {useAppStore} from '@/store/app'
import {useAccountStore} from '@/store/AccountStore'
import {pagecounter} from '@/utils/universal_functions'
@@ -262,6 +249,8 @@ import {checkremote} from '@/utils/universal_functions'
const t_daily = ref('')
const t_dailyRound = ref('')
const dialogDetailRound = ref(false)
const searchname = ref('')
const idpos = ref('')
@@ -276,7 +265,15 @@ import {checkremote} from '@/utils/universal_functions'
const model= null
const accountStore = useAccountStore()
watch(()=> searchname.value,(newValue,oldValue)=>{
if(newValue){
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}&searchname=${newValue}`)
.then(data => {
console.log(newValue);
// t_daily.value = data.data.daily
})
}
}, {deep:true})
function proba(){
@@ -297,6 +294,7 @@ import {checkremote} from '@/utils/universal_functions'
}
const detailRound = (pos) => {
idpos.value=pos
dialogDetailRound.value=!dialogDetailRound.value
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`)
.then(data => {
@@ -316,7 +314,8 @@ import {checkremote} from '@/utils/universal_functions'
detailRound,
dialogDetailRound,
checkremote,
spravURL
spravURL,
searchname
}
}
}
@@ -349,5 +348,12 @@ import {checkremote} from '@/utils/universal_functions'
background: url("/src/assets/bg-for-number-carousel.png");
opacity: 0.7;
}
.fixed-bar {
position: sticky;
position: -webkit-sticky; /* for Safari */
top: 0em;
z-index: 2;
}
</style>