Петрович
This commit is contained in:
1 parent
d9864d86b6
commit
3f9d9185ad
7 files changed
+59
-347
No files matched your search
@@ -121,14 +121,11 @@ class ProjectGet(BaseCreateProjectTask):
|
||||
project_task:Optional[list[Task.get_pydantic(include={"id"})]]
|
||||
ptype:Optional[ProjectType.get_pydantic(include={"id","name"})]
|
||||
author: Optional[User.get_pydantic(include={"id"})]
|
||||
# director:Optional[User.get_pydantic(include={"id"})]
|
||||
# secretary:Optional[User.get_pydantic(include={"id"})]
|
||||
# rp: Optional[User.get_pydantic(include={"id"})]
|
||||
|
||||
users: Optional[list]
|
||||
difficult: Optional[int]
|
||||
info:Optional[dict]
|
||||
# watchers:Optional[list]
|
||||
# coordinator:Optional[User.get_pydantic(include={"id"})]
|
||||
|
||||
|
||||
class ProjectUserSchema(BaseModel):
|
||||
role:Projectrole.get_pydantic(include={"id","name"})
|
||||
@@ -151,8 +148,7 @@ class ProjectReestrSchema(BaseModel):
|
||||
status:ProjectStatus.get_pydantic(include={"id","name"})
|
||||
user_project: Optional[list[ProjectReestrUserSchema]]
|
||||
project_task:Optional[list[Task.get_pydantic(include={"id","name","status__id","dateend","status__name","responsible","responsible__sn"})]]
|
||||
# role:Projectrole.get_pydantic(include={"id","name"})
|
||||
# user:User.get_pydantic(include={"id",'name'})
|
||||
|
||||
|
||||
class TaskReestrSchema(BaseModel):
|
||||
id: int
|
||||
|
||||
@@ -44,11 +44,10 @@ async def create_projects(data:dict, user:dict = Depends(AD.protect_claim)):
|
||||
|
||||
project = data['project']
|
||||
prc = exclude_keys(project,['tasks','project_checkpoint','id','users','status','history'])
|
||||
prc= foreignkeytoint(prc,['ptype'])
|
||||
print(prc)
|
||||
prc= foreignkeytoint(prc,['ptype'])
|
||||
|
||||
projusers = project['users']
|
||||
# del prc['users']
|
||||
|
||||
pr = await Project.objects.create(**prc, author=user['id'], status=1 )
|
||||
for p_user in projusers:
|
||||
if p_user['role']['id']>0:
|
||||
@@ -86,8 +85,7 @@ async def getpreviousdock(type:str,lastdatetype:str,pid:int):
|
||||
print(lastdatetype,type,pid)
|
||||
res = await Documentation.objects.select_related(related).filter(approved=3,approvedtime__isnull=False, doctype__name=type, project=pid).order_by('-approvedtime').all()
|
||||
|
||||
# ldt = await Documentation.objects.filter(approved=3,doctype__name=lastdatetype,project=pid).max("approvedtime")
|
||||
# return {'prevdock':querytoPydantic(ProjectDockInfo, res[0])if len(res)>0 else None, 'ldt':ldt}
|
||||
|
||||
return {'prevdock':querytoPydantic(ProjectDockInfo, res[0])if len(res)>0 else None}
|
||||
|
||||
@router.get("/getdock/{item_id}", response_model=ProjectDockInfo)
|
||||
@@ -132,7 +130,7 @@ async def get_project(item_id: int):
|
||||
nudeproj['tasks']=tasks
|
||||
nudeproj['project_files']= await FileListGetter.files_in_project(item_id)
|
||||
# print(nudeproj['project_files'])
|
||||
history = await ProjectHistory.objects.select_related(["author",'action']).filter(project=item_id, assignment__isnull=True).order_by("-id").all()
|
||||
history = await ProjectHistory.objects.prefetch_related(["author",'action']).filter(project=item_id, assignment__isnull=True).order_by("-id").all()
|
||||
nudeproj['history'] = [querytoPydantic(History4Status,x) for x in history]
|
||||
# print(await ProjectCheckpoint.objects.filter(project = nudeproj['id']).all())
|
||||
nudeproj['project_checkpoint']= [x.checkpoint for x in await ProjectCheckpoint.objects.filter(project = nudeproj['id']).all()]
|
||||
@@ -208,15 +206,14 @@ async def update_project(data, user):
|
||||
|
||||
await REdSetter.arr_key_del(f"data:assignments/", asgnments)
|
||||
|
||||
chats=await Chat.objects.filter(parent__in = asgnments, level=4).all()
|
||||
print("work",x.id)
|
||||
# await REdSetter.arr_key_del(f"data:chatroom/", [ch.id for ch in chats])
|
||||
chats=await Chat.objects.filter(parent__in = asgnments, level=4).all()
|
||||
|
||||
|
||||
chats= chats+await Chat.objects.filter(parent = x.id, level=3).all()
|
||||
|
||||
|
||||
await REdSetter.arr_key_del(f"data:chatroom/", [ch.id for ch in chats])
|
||||
# await chats.delete()
|
||||
|
||||
[await ch.delete() for ch in chats]
|
||||
|
||||
await x.delete()
|
||||
@@ -286,11 +283,10 @@ async def main(docid:int, confirmationmod:bool):
|
||||
res=""
|
||||
if confirmationmod==True:
|
||||
related = ['project','doc_user','doctype']+ QH.appendForntoQ(['doc_user__user'],'position')+QH.appendForntoQ(['approver'],'position')
|
||||
print(related, docid)
|
||||
# related=['project']
|
||||
|
||||
doc = await Documentation.objects.select_related(related).get(id=docid)
|
||||
print("-----------------------------------------------------------------")
|
||||
print(doc)
|
||||
|
||||
|
||||
res=DC.confirmer(doc)
|
||||
else:
|
||||
@@ -298,7 +294,7 @@ async def main(docid:int, confirmationmod:bool):
|
||||
related = ['project','approver','doctype','doc_user']+ QH.appendForntoQ(['doc_user__user'],'position')+QH.appendForntoQ(['approver'],'position')
|
||||
|
||||
doc = await Documentation.objects.select_related(related).get(id=docid)
|
||||
print(doc)
|
||||
|
||||
|
||||
res=DC.docChooser(doc)
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ import time
|
||||
import os
|
||||
from io import BytesIO
|
||||
from.helper import get_date_from_str, findrole
|
||||
|
||||
from petrovich.main import Petrovich
|
||||
from petrovich.enums import Case, Gender
|
||||
|
||||
parent_dict={'Приказ':{"rp":"приказа","head":"Приказ","func":"order"},
|
||||
"Распоряжение":{"head":"Распоряжение","func": "disposition"},
|
||||
@@ -193,6 +194,8 @@ class DocxCreator:
|
||||
|
||||
def order(data):
|
||||
|
||||
|
||||
pet = Petrovich()
|
||||
document = DocxCreator.createDocumentWithHeader()
|
||||
p = document.add_paragraph("ПРИКАЗ")
|
||||
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
@@ -204,17 +207,19 @@ class DocxCreator:
|
||||
p.alignment=WD_ALIGN_PARAGRAPH.RIGHT
|
||||
p = document.add_paragraph(f'Об организации проекта {data.vrersion["longname"]}' )
|
||||
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
p = document.add_paragraph(f'В целях контроля реализации направлений деятельности ФНС России в сфере ${data.vrersion["info"]["project_sphere"]}, приказываю:' )
|
||||
p = document.add_paragraph(f'В целях контроля реализации направлений деятельности ФНС России в сфере {data.vrersion["info"]["project_sphere"]}, приказываю:' )
|
||||
p = document.add_paragraph(f'Провести Проект {data.vrersion["longname"]}', style='List Number' )
|
||||
p = document.add_paragraph(f'Установить период проведения Проекта с {get_date_from_str(data.vrersion["datestart"])} по {get_date_from_str(data.vrersion["dateend"])}', style='List Number' )
|
||||
user = findrole(data.vrersion["users"],1)
|
||||
p = document.add_paragraph(f'Назначить директором Проекта {user["user"]["fullname"]}', style='List Number' )
|
||||
p = document.add_paragraph(f'Назначить директором Проекта {pet.lastname(user["user"]["sn"], Case.GENITIVE,None)} {pet.firstname(user["user"]["givenName"].split(" ")[0], Case.GENITIVE, None)} {pet.middlename(user["user"]["givenName"].split(" ")[1], Case.GENITIVE, None)}',style='List Number' )
|
||||
|
||||
|
||||
user = findrole(data.vrersion["users"],2)
|
||||
coord = findrole(data.vrersion["users"],4)
|
||||
p = document.add_paragraph(f'Назначить руководителем Проекта {user["user"]["fullname"]}, координатором Проекта {coord["user"]["fullname"]}', style='List Number' )
|
||||
p = document.add_paragraph(f'Назначить руководителем Проекта {pet.lastname(user["user"]["sn"], Case.GENITIVE,None)} {pet.firstname(user["user"]["givenName"].split(" ")[0], Case.GENITIVE, None)} {pet.middlename(user["user"]["givenName"].split(" ")[1], Case.GENITIVE, None)}, координатором Проекта {pet.lastname(coord["user"]["sn"], Case.GENITIVE,None)} {pet.firstname(coord["user"]["givenName"].split(" ")[0], Case.GENITIVE, None)} {pet.middlename(coord["user"]["givenName"].split(" ")[1], Case.GENITIVE, None)}', style='List Number' )
|
||||
p = document.add_paragraph(f'Директору проекта утвердить паспорт проекта в срок не позднее {get_date_from_str(data.vrersion["info"]["passport_last_date"])}', style='List Number' )
|
||||
p = document.add_paragraph(f'Финансовое обеспечение расходных обязательств, связанных с реализацией настоящего приказа, осуществляется {data.vrersion["info"]["financial_support"]}', style='List Number' )
|
||||
p = document.add_paragraph(f'Контроль за исполнением настоящего приказа возложить на {data.vrersion["info"]["controller"]["fullname"]}', style='List Number' )
|
||||
p = document.add_paragraph(f'Контроль за исполнением настоящего приказа возложить на {pet.lastname(data.vrersion["info"]["controller"]["sn"], Case.GENITIVE,None)} {pet.firstname(data.vrersion["info"]["controller"]["givenName"].split(" ")[0], Case.GENITIVE, None)} {pet.middlename(data.vrersion["info"]["controller"]["givenName"].split(" ")[1], Case.GENITIVE, None)}', style='List Number' )
|
||||
footer_section = document.sections[0]
|
||||
footer = footer_section.footer
|
||||
|
||||
|
||||
@@ -4,23 +4,12 @@
|
||||
@click="toggleTheme"
|
||||
icons = ' mdi-lightbulb-outline'/>
|
||||
|
||||
<!-- <v-btn
|
||||
icon
|
||||
@click="toggleTheme"
|
||||
>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
color="icons"
|
||||
>
|
||||
mdi-lightbulb-outline
|
||||
</v-icon>
|
||||
</v-btn> -->
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ToggleTheme",
|
||||
name: "toggle-theme",
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -190,17 +190,7 @@
|
||||
title="Краткое название:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<!-- <v-textarea v-if="show"
|
||||
@input="setpn"
|
||||
v-model="todo.name"
|
||||
hide-details
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="mt-0 pt-0 pb-2"
|
||||
flat
|
||||
dense
|
||||
height=15
|
||||
/> -->
|
||||
|
||||
<span>{{getProject.name}}</span>
|
||||
</template>
|
||||
</row-pirow>
|
||||
@@ -211,15 +201,7 @@
|
||||
>
|
||||
<template #leftcol>
|
||||
{{`${momentedDay(getProject.datestart) } - ${momentedDay(getProject.dateend)}/(${timediff(getProject.dateend)})`}}
|
||||
|
||||
<!-- <Datepiker v-if="show"
|
||||
:datestartstore="'Projectdatestart'"
|
||||
:dateendstore="'Projectdateend'"
|
||||
:min="getProject.datestart"
|
||||
:max="getProject.dateend"
|
||||
:minimaxon="[[false, true],[true,false]]"
|
||||
class="mt-0"
|
||||
/> -->
|
||||
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
@@ -299,18 +281,7 @@
|
||||
|
||||
#leftcol
|
||||
>
|
||||
<!-- <v-autocomplete v-if="show"
|
||||
dense
|
||||
class="inputext pointer mt-n1 iconsh font-weight-medium"
|
||||
v-model="status1"
|
||||
:items="selectdatafields.project__status"
|
||||
return-object
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
hide-details
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
/> -->
|
||||
|
||||
<span>{{getProject.status.name}}</span>
|
||||
</template>
|
||||
</row-pirow>
|
||||
@@ -318,18 +289,7 @@
|
||||
title="Тип:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<!-- <v-autocomplete v-if="show"
|
||||
dense
|
||||
class="inputext pointer mt-n1 iconsh font-weight-medium"
|
||||
v-model="type1"
|
||||
:items="selectdatafields.project__type"
|
||||
return-object
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
hide-details
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
/> -->
|
||||
|
||||
<span>{{getProject.ptype.name}}</span>
|
||||
</template>
|
||||
</row-pirow>
|
||||
@@ -408,58 +368,7 @@
|
||||
|
||||
/>
|
||||
|
||||
<!-- <v-expansion-panels
|
||||
|
||||
hover
|
||||
>
|
||||
<v-expansion-panel
|
||||
|
||||
v-for="(item,i) in info_helper"
|
||||
:key="i"
|
||||
>
|
||||
<v-expansion-panel-header>
|
||||
{{info_helper[i].text}}
|
||||
</v-expansion-panel-header>
|
||||
<v-expansion-panel-content v-if="!item.typearr">
|
||||
{{getProject.info[i]}}
|
||||
</v-expansion-panel-content>
|
||||
<v-expansion-panel-content v-else>
|
||||
<p v-for="x in getProject.info[i]" :key="x">{{x}}</p>
|
||||
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels> -->
|
||||
|
||||
|
||||
<!-- <v-divider class="mb-1 mt-3"/> -->
|
||||
<!-- {{getProject.description}} -->
|
||||
<!-- <row-pirow
|
||||
title="Описание:"
|
||||
|
||||
>
|
||||
<template #leftcol>{{getProject.description?getProject.description:'Описание отсутсвует'}}</template>
|
||||
</row-pirow> -->
|
||||
<!-- <v-row
|
||||
class="flex-grow-0 mt-0"
|
||||
v-show="todo.description"
|
||||
>
|
||||
<v-col class="pa-0">
|
||||
<v-textarea
|
||||
id="description"
|
||||
class="unip"
|
||||
background-color= "inyand"
|
||||
readonly
|
||||
hide-details
|
||||
auto-grow
|
||||
rows="0"
|
||||
solo
|
||||
flat
|
||||
:value="todo.description"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
<!-- <v-divider class="mb-1 mt-4"/> -->
|
||||
<!-- -------------------------------------------------------- Я не знаю как я его сломала -->
|
||||
<history-min-card
|
||||
:level="1"
|
||||
:indx='0'
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
class="main_theme flex-grow-0"
|
||||
>
|
||||
|
||||
<v-app-bar
|
||||
<!-- <v-app-bar
|
||||
dense
|
||||
flat
|
||||
:collapse="calendar"
|
||||
class="main_theme"
|
||||
>
|
||||
> -->
|
||||
<v-col
|
||||
v-if="calendar"
|
||||
class="px-0"
|
||||
@@ -83,12 +83,12 @@
|
||||
/>
|
||||
</v-col>
|
||||
<v-divider vertical/>
|
||||
</v-app-bar>
|
||||
<!-- </v-app-bar> -->
|
||||
|
||||
<div class="infobar flex-row flex-grow-1 pa-0">
|
||||
<div class=" flex-row flex-grow-1 pa-0">
|
||||
|
||||
<v-col class="flex-grow-0 pa-0 px-1 align-self-center">
|
||||
<ToggleTheme class="flex-grow-0"/>
|
||||
<toggle-theme class="flex-grow-0"/>
|
||||
</v-col>
|
||||
<v-divider vertical/>
|
||||
<v-col class="flex-grow-1 flex-col">
|
||||
@@ -143,74 +143,7 @@
|
||||
</v-col>
|
||||
<v-divider vertical class="mr-1"/>
|
||||
</div>
|
||||
<!-- <v-col
|
||||
class="bg8"
|
||||
:xl="calendar?'':'4'"
|
||||
>q</v-col> -->
|
||||
|
||||
<!-- <v-row class="main_theme row-main">
|
||||
<v-app-bar>
|
||||
<template>
|
||||
<v-col
|
||||
class="primary py-0 main_theme"
|
||||
>
|
||||
<v-row no-gutters class="primary main_theme">
|
||||
<v-divider vertical class="divider-calendar-before"></v-divider>
|
||||
<template v-for="(value, i) in dateCalendar" >
|
||||
<month
|
||||
:key="i"
|
||||
:class="{ 'month-calendar': value.month }"
|
||||
:value="value"
|
||||
/>
|
||||
<v-divider v-if="i<dateCalendar.length-1"
|
||||
:key="'div' + i"
|
||||
vertical
|
||||
inset
|
||||
class="divider-calendar"
|
||||
></v-divider>
|
||||
</template>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
<v-col
|
||||
class="main_theme pa-2"
|
||||
|
||||
>
|
||||
<div class="main_theme flex-grow-1 pl-3 d-flex">
|
||||
<v-avatar size="50">
|
||||
<img
|
||||
:alt="user.initial"
|
||||
:src="'photo'in user?user.photo:`http://${serverurl}/static/default/avatardef.png`"
|
||||
>
|
||||
</v-avatar>
|
||||
|
||||
<div class="ps-2 d-flex flex-column">
|
||||
<span class="initial-user k">{{ user.initial }} </span>
|
||||
<span>{{ user.otdel }} </span>
|
||||
|
||||
</div>
|
||||
<ToggleTheme
|
||||
class="flex-grow-0"
|
||||
/>
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
<v-col class="flex-grow-0 flex-col py-0 mr-4 iconsbox align-self-center">
|
||||
<v-icon small color="btns">mdi-information-outline</v-icon>
|
||||
<v-icon small color="btns">mdi-cog-outline</v-icon>
|
||||
<div class="pointer" @click="logout">
|
||||
<v-icon
|
||||
color="btns"
|
||||
small
|
||||
>
|
||||
mdi-logout-variant
|
||||
</v-icon>
|
||||
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
|
||||
|
||||
|
||||
|
||||
</v-app-bar>
|
||||
@@ -242,7 +175,7 @@
|
||||
<script>
|
||||
import moment from "moment";
|
||||
import messengerMain from "@/components/supogramm/messenger-main.vue";
|
||||
import ToggleTheme from '../components/UI/ToggleTheme.vue';
|
||||
import ToggleTheme from '@/components/UI/ToggleTheme.vue';
|
||||
import { syncUpdateToken, logout, URL } from "@/utils/api";
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
|
||||
@@ -396,54 +329,7 @@ $top_diff: 75px;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
}
|
||||
// ----------отображение версии. убрать в финале
|
||||
// .hiddened {
|
||||
// opacity: 0;
|
||||
// }
|
||||
// .v-main__wrap {
|
||||
// display: flex !important;
|
||||
// flex-direction: column;
|
||||
// }
|
||||
// // ----------------------------------------------
|
||||
|
||||
// .v-application--is-ltr .v-list-item__action:first-child, .v-application--is-ltr .v-list-item__icon:first-child {
|
||||
// margin-right: 23px!important;
|
||||
// }
|
||||
// .v-list-group .v-list-group__header .v-list-item__icon.v-list-group__header__append-icon {
|
||||
// min-width: 20px!important;
|
||||
// }
|
||||
// .v-list-group :nth-child(1) {
|
||||
// color: var(--v-btns-base)!important;
|
||||
// // background: var(--v-main_theme-base)!important;
|
||||
// }
|
||||
// .displaynone {
|
||||
// display: none!important;
|
||||
// }
|
||||
// .v-list-item:not(.v-list-item--active):not(.v-list-item--disabled) {
|
||||
// color: var(--v-btns-lighten1) !important;
|
||||
// }
|
||||
// .v-list-item--active {
|
||||
// color: var(--v-btns-base)!important;
|
||||
// }
|
||||
// .v-list-item--active:hover::before, .v-list-item--active::before {
|
||||
// opacity: 0.1!important;
|
||||
// }
|
||||
// .main_themeubheader {
|
||||
|
||||
// white-space: nowrap;
|
||||
|
||||
// .v-list-item__title {color: rgb(255, 255, 255);
|
||||
// text-transform: uppercase;
|
||||
// font-size: 0.8rem;
|
||||
// }
|
||||
// .hov :hover {
|
||||
// color: var(--v-btns-base)!important;
|
||||
// }
|
||||
// &.hidden {
|
||||
// opacity: 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
.allitems {
|
||||
border-left: 3px solid transparent;
|
||||
@@ -516,26 +402,17 @@ font-size: 1em;
|
||||
// text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
}
|
||||
// color-main:
|
||||
.subgroup{
|
||||
background: var(--v-main_theme-base)!important;
|
||||
}
|
||||
|
||||
|
||||
.nl_whatsup {
|
||||
background: var(--v-chat-base)!important;
|
||||
}
|
||||
// .groupmenu {
|
||||
// background: $color-maindarken
|
||||
// }
|
||||
|
||||
|
||||
.hidden{
|
||||
opacity: 0;
|
||||
}
|
||||
// @media (max-width: 1650px) {
|
||||
// .m-disabled {
|
||||
// display: none;
|
||||
// }
|
||||
// }
|
||||
|
||||
.v-toolbar__content {
|
||||
padding: 0!important;
|
||||
}
|
||||
@@ -548,45 +425,6 @@ margin: 0!important;
|
||||
min-width: 25vw;
|
||||
}
|
||||
|
||||
// @media (min-width: 1904px) {
|
||||
// .nl_whatsup {
|
||||
// min-width: 50vw;
|
||||
// min-height: 88vh;
|
||||
// }
|
||||
|
||||
// }
|
||||
// @media (max-width: 1903px) {
|
||||
// .nl_whatsup {
|
||||
// min-width: 80vw;
|
||||
// min-height: 80vh;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// @media (max-width: 1264px) {
|
||||
// .nl_whatsup {
|
||||
// min-width: 75vw;
|
||||
// min-height: 75vh;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// @media (max-width: 960px) {
|
||||
// .nl_whatsup {
|
||||
// min-width: 70vw;
|
||||
// min-height: 70vh;
|
||||
// }
|
||||
// }
|
||||
|
||||
// @media (max-width: 600px) {
|
||||
// .nl_whatsup {
|
||||
// min-width: 65vw;
|
||||
// min-height: 65vh;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
+21
-42
@@ -217,13 +217,13 @@ export default {
|
||||
message: {mes:"", show: false},
|
||||
comment:"",
|
||||
tabProj: null,
|
||||
test:{test:[{test:'test','test2':'test2'}]},
|
||||
chatview:true,
|
||||
tasksaccepted:0,
|
||||
gantview:false,
|
||||
|
||||
|
||||
tasksaccepted:0,
|
||||
gantview:false,
|
||||
show:false,
|
||||
tabs: ['Карточка','Документация', 'История'],
|
||||
btns_otchet: ['Приказ', 'План', 'Паспорт', 'Отчет', 'План КС', 'Итоговый отчет', 'Состав РГ', 'Протокол'],
|
||||
|
||||
|
||||
menu:null,
|
||||
waiter:false,
|
||||
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
task:{name:"",datestart:"",dateend:"",responsible:{id:""},status:{id:0,name:"",description:""}},
|
||||
activedCh: {},
|
||||
ws: null,
|
||||
position: true,
|
||||
|
||||
documents:[],
|
||||
project:{
|
||||
id:0,
|
||||
@@ -249,7 +249,7 @@ export default {
|
||||
id: 0
|
||||
},
|
||||
datestart:'',
|
||||
dateenf:'',
|
||||
|
||||
tasks: [],
|
||||
author: {
|
||||
id: 0
|
||||
@@ -262,7 +262,7 @@ export default {
|
||||
|
||||
|
||||
|
||||
box: {},
|
||||
|
||||
|
||||
|
||||
userFields: [
|
||||
@@ -374,19 +374,16 @@ takeprev(payload){
|
||||
|
||||
},
|
||||
messagedeleted(payload){
|
||||
try{
|
||||
|
||||
// console.log(this.mychats[ind].lastmessage)
|
||||
try{
|
||||
let ind2=this.activedCh.lastmessage.findIndex(e=>e.id==payload.id)
|
||||
this.activedCh.lastmessage.splice(ind2,1)
|
||||
console.log(this.activedCh.lastmessage, "slice");}
|
||||
}
|
||||
catch{
|
||||
|
||||
}
|
||||
|
||||
} ,
|
||||
filedeleted(payload){
|
||||
|
||||
filedeleted(payload){
|
||||
|
||||
let ind = this.project.project_files.findIndex(el=>el.id==payload.id)
|
||||
this.project.project_files.splice(ind,1)
|
||||
@@ -394,7 +391,7 @@ takeprev(payload){
|
||||
},
|
||||
|
||||
createnewTask(){
|
||||
console.log('ioi');
|
||||
|
||||
this.$refs.gantproject.createnewTask()
|
||||
},
|
||||
|
||||
@@ -407,12 +404,9 @@ takeprev(payload){
|
||||
|
||||
|
||||
|
||||
|
||||
// afterEnter(){
|
||||
// console.log("@after-enter=")
|
||||
// },
|
||||
|
||||
VisSwitcher(file){
|
||||
// console.log(file);
|
||||
|
||||
this.ws.send({"action":"updateFile","payload":{id:file.id,visible: file.visible.join("")}})
|
||||
|
||||
},
|
||||
@@ -422,19 +416,12 @@ takeprev(payload){
|
||||
this.ws.send({"action":"rebuild","payload": this.project.id})
|
||||
},
|
||||
|
||||
// afterLeave(){
|
||||
// console.log(`jjjjjjj`);
|
||||
// this.tab=this.nedotab
|
||||
// // this.currentid = this.tab==0?this.work.id:this.work.work_assignment[this.tab-1].id
|
||||
// this.activeChat()
|
||||
// this.show=true
|
||||
// },
|
||||
|
||||
chatviewer(){
|
||||
|
||||
chatviewer(){
|
||||
this.chatview=!this.chatview
|
||||
},
|
||||
createtabchat(){
|
||||
|
||||
createtabchat(){
|
||||
let name = this.getProject.name
|
||||
let level = 1
|
||||
let parent =this.getProject.id
|
||||
@@ -449,10 +436,7 @@ takeprev(payload){
|
||||
|
||||
async uploadfile(formData){
|
||||
let fileinfo = {project:this.getProject.id, visible: '1000'}
|
||||
// if (this.level==3){
|
||||
// fileinfo['assignment']=this.work.work_assignment[this.tab-1].id
|
||||
// fileinfo.visible='0001'
|
||||
// }
|
||||
|
||||
// // Тут же заделаем потом на другие уровни - задачи и проекты
|
||||
formData.append('info', JSON.stringify(fileinfo))
|
||||
|
||||
@@ -473,9 +457,7 @@ takeprev(payload){
|
||||
}
|
||||
|
||||
},
|
||||
console(val){
|
||||
console.log(val);
|
||||
},
|
||||
|
||||
addTask(val){
|
||||
console.log(val,"!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
delete val.val.history
|
||||
@@ -515,10 +497,7 @@ takeprev(payload){
|
||||
this.setProjectusers(users)
|
||||
},
|
||||
|
||||
editField(field) {
|
||||
|
||||
this.box=field
|
||||
},
|
||||
|
||||
newmessageincome(payload){
|
||||
this.activedCh.lastmessage.push(payload)
|
||||
|
||||
|
||||
Reference in new issue
Block a user