Сохранение
This commit is contained in:
1 parent
1bf6c58216
commit
2e7c29c065
4 files changed
+46
-27
No files matched your search
@@ -44,7 +44,7 @@
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-file-input
|
||||
v-bind="props"
|
||||
|
||||
accept=".xlsx"
|
||||
v-model="dailyfiles"
|
||||
variant="underlined"
|
||||
@@ -90,12 +90,12 @@ flat
|
||||
|
||||
<v-row class="bggrad">
|
||||
<v-col class="text-center text-black_and_white">
|
||||
{{t_dailyRound.position}}
|
||||
<!-- {{result[0].pos}} -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="pa-0 mb-3">
|
||||
<!-- <my-helper :pretext="t_dailyRound"/> -->
|
||||
<!-- <my-helper :pretext="t_dailyRound[0]"/> -->
|
||||
<v-textarea
|
||||
v-model="searchname"
|
||||
clearable
|
||||
@@ -115,7 +115,7 @@ flat
|
||||
|
||||
|
||||
<div
|
||||
v-for="(x, key) in t_dailyRound.daily"
|
||||
v-for="(x, key) in result"
|
||||
:key="key"
|
||||
class="px-3" >
|
||||
|
||||
@@ -191,12 +191,14 @@ export default {
|
||||
const t_daily = ref('')
|
||||
const idpos = ref('')
|
||||
const dialogDetailRound = ref(false)
|
||||
const t_dailyRound = ref('')
|
||||
const dailyfiles = ref('')
|
||||
const t_dailyRound = ref({})
|
||||
const dailyfiles = ref([])
|
||||
const info = ref({})
|
||||
const searchname = ref('')
|
||||
const menuGetUserDialog = ref(false)
|
||||
const iduser = ref('')
|
||||
const result = ref({})
|
||||
|
||||
|
||||
const getcard = async (idus) => {
|
||||
menuGetUserDialog.value = true
|
||||
@@ -207,7 +209,11 @@ export default {
|
||||
idpos.value=pos
|
||||
dialogDetailRound.value=!dialogDetailRound.value
|
||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => {
|
||||
|
||||
t_dailyRound.value = data.data
|
||||
|
||||
result.value=JSON.parse(JSON.stringify(data.data))
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -232,27 +238,38 @@ export default {
|
||||
|
||||
axiosApiInstance.get('api/general_vacation/dailyload/')
|
||||
.then(data => {
|
||||
t_daily.value = data.data.daily
|
||||
t_daily.value = data.data
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
watch(()=> searchname.value,(newValue,oldValue)=>{
|
||||
|
||||
if(newValue){
|
||||
const filterItems = (query) => {
|
||||
|
||||
result.value={}
|
||||
Object.keys(t_dailyRound.value).map(el1 => {
|
||||
let myarr = t_dailyRound.value[el1].filter((el) =>el.fio.toLowerCase().includes(query.toLowerCase()))
|
||||
|
||||
if(myarr.length>0)
|
||||
{
|
||||
result.value[el1] = myarr
|
||||
}
|
||||
|
||||
|
||||
|
||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}&searchname=${newValue}`)
|
||||
.then(data => {
|
||||
|
||||
t_dailyRound.value = data.data
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
watch(()=> searchname.value,(newValue,oldValue)=>{
|
||||
|
||||
if(newValue){
|
||||
filterItems(newValue)
|
||||
|
||||
}
|
||||
else {
|
||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}`)
|
||||
.then(data => {
|
||||
|
||||
t_dailyRound.value = data.data
|
||||
})
|
||||
result.value = JSON.parse(JSON.stringify(t_dailyRound.value))
|
||||
|
||||
|
||||
}
|
||||
}, {deep:true})
|
||||
@@ -275,7 +292,8 @@ export default {
|
||||
spravURL,
|
||||
menuGetUserDialog,
|
||||
iduser,
|
||||
getcard
|
||||
getcard,
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user