Поиск энд

This commit is contained in:
iriska-gri committed 2023-11-08 10:46:48 +03:00
1 parent 8398990f19
commit 32fcfba07f
7 files changed
+37 -40

No files matched your search

BIN
View File
Binary file not shown.
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "front", "name": "front",
"version": "0.0.24", "version": "0.0.25",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "front", "name": "front",
"version": "0.0.24", "version": "0.0.25",
"dependencies": { "dependencies": {
"@fullcalendar/core": "^6.1.8", "@fullcalendar/core": "^6.1.8",
"@fullcalendar/daygrid": "^6.1.8", "@fullcalendar/daygrid": "^6.1.8",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "front", "name": "front",
"version": "0.0.24", "version": "0.0.25",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
+20 -32
View File
@@ -15,7 +15,7 @@
<v-row class="bggrad"> <v-row class="bggrad">
<v-col class="text-center text-black_and_white"> <v-col class="text-center text-black_and_white">
{{t_dailyRound.position}} {{namepos}}
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
@@ -93,6 +93,10 @@ export default {
idpos: { idpos: {
type: Number, type: Number,
default: '' default: ''
},
namepos: {
type: Text,
default: ''
} }
@@ -101,7 +105,7 @@ export default {
setup(props, {emit}){ setup(props, {emit}){
const t_dailyRound = ref({}) const t_dailyRound = ref({})
const result = ref({}) // const result = ref({})
const searchname = ref('') const searchname = ref('')
@@ -111,53 +115,37 @@ export default {
} }
onMounted(() => { onMounted(() => {
detailRound(props.idpos) axiosApiInstance.get(`api/general_vacation/dailyload/?id=${props.idpos}`).then(data => {
console.log(data.data);
t_dailyRound.value = data.data.daily
}) })
const detailRound = (pos) => {
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => {
t_dailyRound.value = data.data
result.value=JSON.parse(JSON.stringify(data.data.daily))
}) })
}
const filterItems = (query) => {
console.log(props.idpos, '33333333333333333333333333333');
result.value={}
Object.keys(t_dailyRound.value['daily']).map(el1 => { const result = computed({
let myarr = t_dailyRound.value['daily'][el1].filter((el) =>el.fio.toLowerCase().includes(query.toLowerCase())) get() {
let ob={}
Object.keys(t_dailyRound.value).map(el1 => {
let myarr = t_dailyRound.value[el1].filter((el) =>el.fio.toLowerCase().includes(searchname.value.toLowerCase()))
if(myarr.length>0) if(myarr.length>0)
{ {
result.value[el1] = myarr ob[el1] = myarr
} }
} }
) )
return ob
}
watch(()=> searchname.value,(newValue,oldValue)=>{
if(newValue){
filterItems(newValue)
} }
else { })
result.value = JSON.parse(JSON.stringify(t_dailyRound.value['daily']))
}
}, {deep:true})
return { return {
onSubmit, onSubmit,
+8 -3
View File
@@ -22,9 +22,10 @@
{{x.position__name}} {{x.position__name}}
</v-card-title> </v-card-title>
<v-card-text <v-card-text
@click="detailRound(x.position)" @click="detailRound(x.position, x.position__name)"
class="numstyle mt-2 py-0 font-weight-bold pointer bg-black_and_white" class="numstyle mt-2 py-0 font-weight-bold pointer bg-black_and_white"
> >
<!-- <my-helper :pretext="x"/> -->
<vue3-autocounter <vue3-autocounter
ref='counter' ref='counter'
:startAmount='0' :startAmount='0'
@@ -78,6 +79,7 @@
> >
<dialog-search <dialog-search
:idpos=idpos :idpos=idpos
:namepos=namepos
@searchClose="dialogDetailRound=!dialogDetailRound" @searchClose="dialogDetailRound=!dialogDetailRound"
/> />
<!-- <v-card class="bg-white pa-3 px-0" width="550" <!-- <v-card class="bg-white pa-3 px-0" width="550"
@@ -196,6 +198,7 @@ export default {
const t_baseCriteria = ref([]) const t_baseCriteria = ref([])
const t_daily = ref('') const t_daily = ref('')
const idpos = ref('') const idpos = ref('')
const namepos = ref('')
const dialogDetailRound = ref(false) const dialogDetailRound = ref(false)
const t_dailyRound = ref({}) const t_dailyRound = ref({})
const dailyfiles = ref([]) const dailyfiles = ref([])
@@ -211,8 +214,9 @@ export default {
iduser.value = idus iduser.value = idus
} }
const detailRound = (pos) => { const detailRound = (pos, name) => {
idpos.value=pos idpos.value=pos
namepos.value=name
dialogDetailRound.value=!dialogDetailRound.value dialogDetailRound.value=!dialogDetailRound.value
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => { axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => {
t_dailyRound.value = data.data t_dailyRound.value = data.data
@@ -301,7 +305,8 @@ export default {
iduser, iduser,
getcard, getcard,
result, result,
idpos idpos,
namepos
} }
} }
+1 -1
View File
@@ -5,7 +5,7 @@
<v-col cols="1" class="px-0 pt-5"> <v-col cols="1" class="px-0 pt-5">
<my-helper :pretext="info.mess"/>
<v-icon icon="mdi-file-excel" <v-icon icon="mdi-file-excel"
color="green-darken-3" color="green-darken-3"
@@ -155,6 +155,7 @@
:value="child.name" :value="child.name"
:title="!rail?child.name:menuTruncated(child.name)" :title="!rail?child.name:menuTruncated(child.name)"
:to="child.path" :to="child.path"
:target="child.link?'_blank':''"
> >
<v-tooltip <v-tooltip
v-if="rail" v-if="rail"
@@ -173,7 +174,10 @@
:key="x.name" :key="x.name"
:title="x.name" :title="x.name"
:value="x.name" :value="x.name"
:href="x.link" color="app_bar"> :href="x.link"
color="app_bar"
:target="x.link?'_blank':''"
>
<template v-slot:prepend> <template v-slot:prepend>
<v-icon <v-icon
:icon="x.imagecode" /> :icon="x.imagecode" />