Поиск энд
This commit is contained in:
1 parent
8398990f19
commit
32fcfba07f
7 files changed
+41
-44
No files matched your search
Binary file not shown.
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "front",
|
||||
"version": "0.0.24",
|
||||
"version": "0.0.25",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "front",
|
||||
"version": "0.0.24",
|
||||
"version": "0.0.25",
|
||||
"dependencies": {
|
||||
"@fullcalendar/core": "^6.1.8",
|
||||
"@fullcalendar/daygrid": "^6.1.8",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front",
|
||||
"version": "0.0.24",
|
||||
"version": "0.0.25",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<v-row class="bggrad">
|
||||
<v-col class="text-center text-black_and_white">
|
||||
{{t_dailyRound.position}}
|
||||
{{namepos}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -93,6 +93,10 @@ export default {
|
||||
idpos: {
|
||||
type: Number,
|
||||
default: ''
|
||||
},
|
||||
namepos: {
|
||||
type: Text,
|
||||
default: ''
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +105,7 @@ export default {
|
||||
setup(props, {emit}){
|
||||
|
||||
const t_dailyRound = ref({})
|
||||
const result = ref({})
|
||||
// const result = ref({})
|
||||
const searchname = ref('')
|
||||
|
||||
|
||||
@@ -111,53 +115,37 @@ export default {
|
||||
}
|
||||
|
||||
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 => {
|
||||
let myarr = t_dailyRound.value['daily'][el1].filter((el) =>el.fio.toLowerCase().includes(query.toLowerCase()))
|
||||
|
||||
|
||||
|
||||
const result = computed({
|
||||
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)
|
||||
{
|
||||
result.value[el1] = myarr
|
||||
ob[el1] = myarr
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
watch(()=> searchname.value,(newValue,oldValue)=>{
|
||||
|
||||
if(newValue){
|
||||
filterItems(newValue)
|
||||
|
||||
return ob
|
||||
}
|
||||
else {
|
||||
result.value = JSON.parse(JSON.stringify(t_dailyRound.value['daily']))
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}, {deep:true})
|
||||
|
||||
|
||||
return {
|
||||
onSubmit,
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
{{x.position__name}}
|
||||
</v-card-title>
|
||||
<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"
|
||||
>
|
||||
<!-- <my-helper :pretext="x"/> -->
|
||||
<vue3-autocounter
|
||||
ref='counter'
|
||||
:startAmount='0'
|
||||
@@ -78,6 +79,7 @@
|
||||
>
|
||||
<dialog-search
|
||||
:idpos=idpos
|
||||
:namepos=namepos
|
||||
@searchClose="dialogDetailRound=!dialogDetailRound"
|
||||
/>
|
||||
<!-- <v-card class="bg-white pa-3 px-0" width="550"
|
||||
@@ -196,6 +198,7 @@ export default {
|
||||
const t_baseCriteria = ref([])
|
||||
const t_daily = ref('')
|
||||
const idpos = ref('')
|
||||
const namepos = ref('')
|
||||
const dialogDetailRound = ref(false)
|
||||
const t_dailyRound = ref({})
|
||||
const dailyfiles = ref([])
|
||||
@@ -211,8 +214,9 @@ export default {
|
||||
iduser.value = idus
|
||||
}
|
||||
|
||||
const detailRound = (pos) => {
|
||||
const detailRound = (pos, name) => {
|
||||
idpos.value=pos
|
||||
namepos.value=name
|
||||
dialogDetailRound.value=!dialogDetailRound.value
|
||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => {
|
||||
t_dailyRound.value = data.data
|
||||
@@ -301,7 +305,8 @@ export default {
|
||||
iduser,
|
||||
getcard,
|
||||
result,
|
||||
idpos
|
||||
idpos,
|
||||
namepos
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<v-col cols="1" class="px-0 pt-5">
|
||||
|
||||
<my-helper :pretext="info.mess"/>
|
||||
|
||||
<v-icon icon="mdi-file-excel"
|
||||
|
||||
color="green-darken-3"
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
:value="child.name"
|
||||
:title="!rail?child.name:menuTruncated(child.name)"
|
||||
:to="child.path"
|
||||
:target="child.link?'_blank':''"
|
||||
>
|
||||
<v-tooltip
|
||||
v-if="rail"
|
||||
@@ -173,7 +174,10 @@
|
||||
:key="x.name"
|
||||
:title="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>
|
||||
<v-icon
|
||||
:icon="x.imagecode" />
|
||||
|
||||
Reference in new issue
Block a user