w
This commit is contained in:
commit
4716effcf7
309 files changed
+153369
No files matched your search
@@ -0,0 +1,403 @@
|
||||
<template>
|
||||
<v-container class="flex-col h-100 w-100 projects" fluid>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<!-- -->
|
||||
<filters-bar
|
||||
@sendData="updateData"
|
||||
@clear="clear"
|
||||
class="pa-1 pb-3"
|
||||
|
||||
:header="pagetitle"
|
||||
>
|
||||
<template v-slot:filterslist>
|
||||
<f-input-search
|
||||
|
||||
:field="'name'"
|
||||
title="Название"
|
||||
></f-input-search>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__gte'"
|
||||
title="Срок начала с:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__lte'"
|
||||
title="Срок начала до:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__gte'"
|
||||
title="Срок окончания c:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__lte'"
|
||||
title="Срок окончания до:"
|
||||
|
||||
></f-daterange>
|
||||
|
||||
|
||||
<f-multi-select
|
||||
|
||||
:title="'Статус'"
|
||||
:field="'assignment__status'"
|
||||
:disabled="false"
|
||||
></f-multi-select>
|
||||
<f-input-search
|
||||
|
||||
:field="'responsible__sn'"
|
||||
title="Фамилия Исполнителя"
|
||||
></f-input-search>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
</filters-bar>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row class="mt-0 ">
|
||||
<v-col class="flex-col pa-1">
|
||||
<v-card class="flex-grow-1">
|
||||
|
||||
<div class="mt-3 iconInline">
|
||||
<BtnsOut
|
||||
v-if="pagetitle=='Проекты'"
|
||||
:widthi=140
|
||||
:icon = true
|
||||
title = "Создать проект"
|
||||
|
||||
@click="createproj"
|
||||
color="open_icons"
|
||||
>
|
||||
|
||||
</BtnsOut>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<v-data-table
|
||||
:fixed-header="true"
|
||||
@dblclick:row="clickRow"
|
||||
:disable-pagination="true"
|
||||
hide-default-footer
|
||||
:headers="childHeaders"
|
||||
:items="parentList"
|
||||
class="grow-table"
|
||||
>
|
||||
<!-- <template v-slot:[`item.link`]="{ item }"> -->
|
||||
|
||||
|
||||
<!-- <v-icon v-if="!into_project && item.all>0" @click.stop="toChild(item)">mdi-chevron-right</v-icon> -->
|
||||
<!-- <v-icon v-else-if="into_project" @click.stop="backParent">mdi-chevron-left</v-icon> -->
|
||||
<!-- </template> -->
|
||||
|
||||
<!-- <template v-slot:[`item.user_project`]="{ item }">
|
||||
{{find_rp(item.user_project)}}
|
||||
</template> -->
|
||||
<template v-slot:[`item.id`]="{ item }">
|
||||
{{item.parent.parent.parent.id}}-{{item.parent.parent.id}}-{{item.parent.id}}-{{item.id}}
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-slot:[`item.dateend`]="{ item }">
|
||||
{{timediff(item.dateend) }}
|
||||
</template>
|
||||
<template v-slot:[`item.lastchanged`]="{ item }">
|
||||
{{formatDate(item.lastchanged) }}
|
||||
</template>
|
||||
<template v-slot:[`item.bars`]="{ item }">
|
||||
<div class="d-flex align-center">
|
||||
<template v-if="'completed' in item && item.all>0">
|
||||
<v-progress-linear style="width: 80%;" :value="item.completed/item.all*100" height="10" buffer-value="100"></v-progress-linear>
|
||||
<div class="ps-2">{{`${item.completed}/${item.all}`}}</div>
|
||||
</template>
|
||||
<div class="mx-auto" v-else><v-icon v-if="item.status__id==5" style="color:green">fa-solid fa-square-check</v-icon></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<v-menu offset-x left v-if="superuser">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
|
||||
<div v-bind="attrs"
|
||||
v-on="on"
|
||||
class="ms-2 dots-vertical">
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</div>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item><v-list-item-title>Удалить</v-list-item-title></v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<div v-else style="width: 32px;">
|
||||
|
||||
</div>
|
||||
<div @click.stop="menu" class="ps-2 dots-vertical"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-data-table>
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import moment from "moment"
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import FiltersBar from '../components/UI/FiltersBar.vue';
|
||||
import FInputSearch from '../components/UI/FInputSearch.vue';
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
export default {
|
||||
components: { FiltersBar, FInputSearch },
|
||||
data: () => ({
|
||||
model:'',
|
||||
search: '',
|
||||
ws: null,
|
||||
projectid:null,
|
||||
taskid:null,
|
||||
workid:null,
|
||||
superuser: false,
|
||||
childHeaders:[
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Исполнитель", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
|
||||
],
|
||||
|
||||
pagetitle:'',
|
||||
menu: false,
|
||||
childList:[],
|
||||
|
||||
parentList:[],
|
||||
|
||||
}),
|
||||
|
||||
methods: {
|
||||
...globalstore.mapMutations(['set_assign_id']),
|
||||
...mapMutations(["setFields"]),
|
||||
...mapActions(["clear", "getFilters", "addFilter", "activefilters"]),
|
||||
...globalstore.mapGetters(["getassign_id"]),
|
||||
async createproj(){
|
||||
|
||||
let res = await axiosInstance.post('/createproj')
|
||||
console.log(res);
|
||||
this.$router.push(`/project/${res.data.id}`)
|
||||
},
|
||||
|
||||
|
||||
timediff(dateend) {
|
||||
return moment(dateend).isValid()? moment(dateend).locale('ru').fromNow(): 'Не установлен'
|
||||
},
|
||||
formatDate(date) {
|
||||
return (date && moment(date).isValid())? moment(date).format("DD.MM.YYYY"): ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
build(data) {
|
||||
|
||||
if (data.payload.length>0){
|
||||
|
||||
this.parentList= data.payload
|
||||
}
|
||||
else{
|
||||
this.parentList=[]
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
async updateData(){
|
||||
let payload=await this.activefilters()
|
||||
for (let key of Object.keys(payload))
|
||||
{
|
||||
if ( ['assignment__status__in'].includes(key)) {
|
||||
let arr=[]
|
||||
payload[key].forEach(el => {arr.push(el.id)
|
||||
|
||||
});
|
||||
payload['status__in']=arr
|
||||
delete payload[key]
|
||||
}
|
||||
|
||||
}
|
||||
this.ws.send({"action": "getfilter", payload})
|
||||
// console.log(await this.activefilters());
|
||||
},
|
||||
|
||||
find_rp(arr){
|
||||
const rp = arr.find(el=>el.role.id==2)
|
||||
return rp==undefined?"Не назначен": rp.user.sn
|
||||
},
|
||||
|
||||
|
||||
|
||||
update(){
|
||||
console.log(`UPDATE`)
|
||||
|
||||
},
|
||||
titler(itname=""){
|
||||
|
||||
this.pagetitle="Поручения"
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
clickRow(e, row) {
|
||||
let path = this.$route.path
|
||||
let pusher={
|
||||
'/projects':[{name:"Task",'col':'id'},{name:"Project",'col':'id'} ],
|
||||
'/tasks':[{name:"Work",'col':'id'},{name:"Task",'col':'id'}],
|
||||
'/works':[{name:"Work",'col':'parent'},{name:"Work",'col':'id'}],
|
||||
'/assignments':[{name:"Work",'col':'parent'},{name:"Work",'col':'parent'}]
|
||||
}
|
||||
|
||||
|
||||
// console.log("ssss",{ name: pusher[path][ind].name, params: { tid:row.item[pusher[path][ind].col]}});
|
||||
console.log("новый роут-----",row.item )
|
||||
let params = { id:row.item.id}
|
||||
|
||||
this.set_assign_id(params)
|
||||
this.$router.push({path:`/project/${row.item.parent.parent.parent.id}/task/${row.item.parent.parent.id}/work/${row.item.parent.id}`})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
,
|
||||
wsconnect(){
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(`/reestr${this.$route.path}`);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data, "dataonmess");
|
||||
try{
|
||||
this[data.action](data);
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route(to, from){
|
||||
this.ws.stop()
|
||||
|
||||
|
||||
this.parentList=[]
|
||||
this.titler()
|
||||
this.wsconnect()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
mounted() {
|
||||
this.superuser = this.$store.getters['auth/getSuperUser']
|
||||
this.setFields({
|
||||
assignment__status: { module: "mult" },
|
||||
|
||||
|
||||
// role:{module:"mult"}
|
||||
|
||||
});
|
||||
|
||||
this.getFilters([
|
||||
|
||||
{assignment__status:{name:"assignment__status", sort:"id", related_name: "name"}}], true).then(async (data) => {console.log(data,"data")})
|
||||
|
||||
this.wsconnect()
|
||||
this.titler()
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
this.ws.stop()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
.main-projects {
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
h4 {
|
||||
color: $bg-purple;
|
||||
|
||||
}
|
||||
|
||||
.task-table tbody tr:first-child td {
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
tbody {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table > thead > tr > th {
|
||||
font-weight: 600;
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr .dots-vertical i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr:hover .dots-vertical i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.grow-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.iconInline {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: 1%;
|
||||
top: 93%
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
|
||||
<v-col
|
||||
class="flex-col"
|
||||
>
|
||||
<v-row class="align-self-center entrance">
|
||||
<v-col
|
||||
class="align-self-center flex-col heightvol"
|
||||
>
|
||||
<Form-before
|
||||
v-if="nowView == 'before'"
|
||||
:registr='registrat'
|
||||
:datas='user'
|
||||
@chView="changeView"
|
||||
></Form-before>
|
||||
<Form-login
|
||||
v-else-if="nowView == 'login'"
|
||||
@chView="changeView"
|
||||
@error="error"
|
||||
></Form-login>
|
||||
<Form-registration
|
||||
:registr='registrat'
|
||||
v-else-if="nowView == 'register'"
|
||||
@chView="changeView"
|
||||
></Form-registration>
|
||||
<Form-restore
|
||||
:user='user'
|
||||
:registr='registrat'
|
||||
v-else-if="nowView == 'restore'"
|
||||
@chView="changeView"
|
||||
>
|
||||
</Form-restore>
|
||||
<v-snackbar
|
||||
v-model="errorview"
|
||||
class="pt-15"
|
||||
color="red lighten-1"
|
||||
top
|
||||
multi-line
|
||||
><h4>
|
||||
{{ texterror.header}}
|
||||
</h4>
|
||||
|
||||
|
||||
<h5>
|
||||
{{ texterror.text}}
|
||||
</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<template v-slot:action>
|
||||
<v-btn
|
||||
color="white"
|
||||
text
|
||||
@click="closeit"
|
||||
>
|
||||
Закрыть
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-snackbar>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FormBefore from "@/components/auth/FormBefore.vue";
|
||||
import FormLogin from "@/components/auth/FormLogin.vue";
|
||||
import FormRegistration from "@/components/auth/FormRegistration.vue";
|
||||
import FormRestore from "@/components/auth/FormRestore.vue";
|
||||
|
||||
export default {
|
||||
name: 'AuthView',
|
||||
components: {
|
||||
FormLogin,
|
||||
FormRegistration,
|
||||
FormBefore,
|
||||
FormRestore
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
errorview:false,
|
||||
nowView: "login",
|
||||
statusReg: false,
|
||||
texterror:{text:"",header:""},
|
||||
user:{},
|
||||
registrat: []
|
||||
}),
|
||||
|
||||
|
||||
methods: {
|
||||
closeit(){
|
||||
this.errorview=false
|
||||
this.texterror = {text:"",header:""}
|
||||
},
|
||||
error(val){
|
||||
this.errorview=true
|
||||
this.texterror = val
|
||||
|
||||
},
|
||||
|
||||
changeView({value, status=false, datas={}} = {}, registrat) {
|
||||
this.nowView = value;
|
||||
this.statusReg = status;
|
||||
this.user=datas;
|
||||
this.registrat = registrat
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.entrance {
|
||||
max-width: 550px;
|
||||
min-width: 550px;
|
||||
}
|
||||
|
||||
.heightvol {
|
||||
min-height: 29.5%;
|
||||
}
|
||||
|
||||
.bord {
|
||||
border-bottom: 1px solid var(--v-lines_border-base);
|
||||
font-size: 1.25rem!important;
|
||||
}
|
||||
|
||||
.auchlight {
|
||||
|
||||
background: rgb(2,0,36)!important;
|
||||
background: linear-gradient(333deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)!important;
|
||||
}
|
||||
|
||||
.auchdark {
|
||||
// background: rgb(255,254,133)!important;
|
||||
// background: linear-gradient(143deg, rgba(255,254,133,1) 0%, rgba(119,71,43,1) 50%, rgba(2,0,36,1) 97%)!important;
|
||||
background:rgb(162,88,35)!important;
|
||||
background: linear-gradient(143deg, rgba(162,88,35) 0%, rgba(119,71,43,1) 27%, rgba(2,0,36,1) 97%)!important;
|
||||
}
|
||||
|
||||
.pinks {
|
||||
background: rgb(2,0,36)!important;
|
||||
background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(121,9,103,1) 35%, rgba(0,212,255,1) 100%)!important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col class="bg1">1</v-col>
|
||||
<v-col class="bg8">2</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<script>
|
||||
import messengerMain from '@/components/supogramm/messenger-main.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
messengerMain
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,198 @@
|
||||
<template lang="">
|
||||
<v-row class="ma-0">
|
||||
<v-col class="kitr flex-col align-items-center justify-content-center">
|
||||
<Cards
|
||||
:ma="'ma-2'"
|
||||
class="sizecard"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<v-row class="flex-grow-0 bghead mb-1">
|
||||
<v-col class="body-2 text-nowrap font-weight-medium textcolor">Отчет о выполнненой работе за : 17.07.2023</v-col>
|
||||
<v-col class="pa-0 pt-2">
|
||||
<v-icon small
|
||||
color="white">fa-calendar-days</v-icon>
|
||||
</v-col>
|
||||
<v-col class="text-end textcolor font-weight-medium body-2 text-nowrap">Гришина Ирина Сергеевна</v-col>
|
||||
</v-row>
|
||||
<v-row class="my-1 overflow-y-auto h-0">
|
||||
<v-col class="rounded-sm flex-col" >
|
||||
<v-expansion-panels class="exp" flat focusable accordion
|
||||
active-class="ddd"
|
||||
|
||||
|
||||
|
||||
|
||||
>
|
||||
<v-expansion-panel
|
||||
v-for="(item,i) in blocks"
|
||||
:key="i"
|
||||
class="mb-3 rounded"
|
||||
|
||||
|
||||
>
|
||||
<!-- color="#F1F1F1"
|
||||
class="rounded font-weight-medium caption " -->
|
||||
<v-expansion-panel-header
|
||||
color="#F1F1F1"
|
||||
class="rounded font-weight-medium caption "
|
||||
>
|
||||
|
||||
|
||||
{{item.block_name}}
|
||||
<template #actions>
|
||||
<v-icon color="white">$expand</v-icon>
|
||||
</template>
|
||||
</v-expansion-panel-header>
|
||||
<v-expansion-panel-content
|
||||
class="mt-2"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
|
||||
</v-expansion-panel-content>
|
||||
<v-divider></v-divider>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels>
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="px-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row class="flex-grow-0 mb-0">
|
||||
|
||||
<v-col class="py-0 mr-4 flex-row">
|
||||
<v-btn
|
||||
tile
|
||||
color="error"
|
||||
small
|
||||
min-width=120
|
||||
>
|
||||
<!-- <v-icon left>
|
||||
mdi-pencil
|
||||
</v-icon> -->
|
||||
Выйти
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col class="py-0 flex-row justify-content-end">
|
||||
<v-btn
|
||||
tile
|
||||
color="success"
|
||||
small
|
||||
min-width=120
|
||||
>
|
||||
<!-- <v-icon left>
|
||||
mdi-pencil
|
||||
</v-icon> -->
|
||||
Просмотр
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="px-0 pt-0 pb-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
|
||||
blocks: [{block_name: 'Работа с базой знаний'},
|
||||
{block_name: 'Работа со сценарием'},
|
||||
{block_name: 'Работа с классификатором'},
|
||||
{block_name: 'Мониторинг качества работы чат-бота'},
|
||||
{block_name: 'Иное'},
|
||||
],
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
.sizecard {
|
||||
width: 50vw;
|
||||
max-height: 80vh;
|
||||
}
|
||||
|
||||
.kitr {
|
||||
background-color: #5b894c8f;
|
||||
}
|
||||
|
||||
.exp .v-icon.v-icon {
|
||||
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.bet {
|
||||
justify-content: space-between
|
||||
}
|
||||
|
||||
.bghead {
|
||||
background-color:#6F6F6F!important;
|
||||
min-height: 3%;
|
||||
}
|
||||
|
||||
.textcolor {
|
||||
color:white
|
||||
}
|
||||
|
||||
|
||||
.theme--light.v-expansion-panels.v-expansion-panels--focusable .v-expansion-panel-header--active:hover::before, .theme--light.v-expansion-panels.v-expansion-panels--focusable .v-expansion-panel-header--active::before {
|
||||
opacity: 1.0!important;
|
||||
background-color:#4C3F99;
|
||||
}
|
||||
|
||||
.v-expansion-panel--active > .v-expansion-panel-header, .v-expansion-panel-header {
|
||||
max-height: 30px!important;
|
||||
}
|
||||
|
||||
.v-expansion-panel-header {
|
||||
min-height: 30px!important;
|
||||
}
|
||||
/* .v-expansion-panel--active .ddd{
|
||||
background-color: blue!important;
|
||||
}
|
||||
.mmm{
|
||||
background-color: red !important;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/* .exp .theme--light.v-expansion-panels .v-expansion-panel {
|
||||
background-color: red;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
} */
|
||||
/* .theme--light.v-expansion-panels .v-expansion-panel {
|
||||
background-color: blue!important;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
|
||||
.theme--light.v-expansion-panels.v-expansion-panels--focusable .v-expansion-panel-header--active:hover::before, .theme--light.v-expansion-panels.v-expansion-panels--focusable .v-expansion-panel-header--active::before {
|
||||
|
||||
background: red!important;
|
||||
} */
|
||||
|
||||
|
||||
/*
|
||||
.bgpannel {
|
||||
background:
|
||||
} */
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<template lang="">
|
||||
<div>
|
||||
Доска
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<v-row class="ma-0">
|
||||
<v-col
|
||||
class="bg1 collist"
|
||||
xl="2"
|
||||
lg="2"
|
||||
md="12"
|
||||
sm="12"
|
||||
|
||||
cols="12"
|
||||
>
|
||||
1
|
||||
</v-col>
|
||||
<v-col class="bg10 colblock">2</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
|
||||
@media (max-width: 1264px) {
|
||||
.collist {
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.colblock {
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<v-container class="flex-col h-100 w-100" fluid>
|
||||
<!-- <v-row class="styck">
|
||||
<v-col>
|
||||
<pre>
|
||||
<br>{{breadcrumbs}}
|
||||
</pre>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
<v-row>
|
||||
<v-col class="flex-col">
|
||||
<Cards>
|
||||
<template #cards>
|
||||
<v-row>
|
||||
<v-col
|
||||
class="flex-grow-0"
|
||||
>
|
||||
</v-col>
|
||||
<v-col class="flex-col">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<v-breadcrumbs
|
||||
class="pa-0 justify-end pr-2"
|
||||
:items="breadcrumbs"
|
||||
>
|
||||
<template v-slot:item="{ item }">
|
||||
<v-breadcrumbs-item
|
||||
:href="item.href"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
{{ item.text.toUpperCase() }}
|
||||
</v-breadcrumbs-item>
|
||||
</template>
|
||||
</v-breadcrumbs>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
3
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</Cards>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pt-0">
|
||||
<v-card
|
||||
class="flex-col flex-grow-1 rounded"
|
||||
color="main_theme"
|
||||
outlined
|
||||
>
|
||||
<v-card-text class="flex-col flex-grow-1 pa-0 inyand">
|
||||
<gant-work
|
||||
class="pa-1"
|
||||
:startlevel="'work'"
|
||||
@saver="gantsaver"
|
||||
@changetab="changetab"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</template>
|
||||
<script>
|
||||
import GantWork from '@/components/visual/GantWork.vue'
|
||||
import moment from "moment";
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import {axiosInstance, axiosMp, URL} from '@/utils/api'
|
||||
const assignmentstate = createNamespacedHelpers("assignmentstate");
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
const taskstate = createNamespacedHelpers("taskstate");
|
||||
const workstate = createNamespacedHelpers("workstate");
|
||||
import uf from '@/utils/universal_functions'
|
||||
const { mapGetters } = createNamespacedHelpers("auth");
|
||||
export default {
|
||||
components:{GantWork},
|
||||
mixins:[uf],
|
||||
props:{
|
||||
myid:{
|
||||
type: Number,
|
||||
default:0
|
||||
}
|
||||
},
|
||||
data: () => ({
|
||||
panel: [0, 1],
|
||||
// length: 15,
|
||||
breadcrumbs:[{href:'',disabled:true,text:""}],
|
||||
comment:"",
|
||||
workaccepted:0,
|
||||
level:2,
|
||||
textlevels:[{field:'project',text:"В проекте"},{field:'task',text:"В задаче"},{field:'work',text:"В работе"},{field:'assignment',text: "В поручении"}],
|
||||
files:null,
|
||||
tab: 0,
|
||||
ws:null,
|
||||
work:{name:"", parent:{name:""}, status:{name:""}, comment:[],
|
||||
responsible:{fullname:"", position:{name:""}},
|
||||
work_assignment:[{name:"", status:{name:""},comment:[],
|
||||
author:{fullname:"", position:{name:""}},
|
||||
responsible:{fullname:"", position:{name:""}}}]}
|
||||
}),
|
||||
|
||||
computed: {
|
||||
...mapGetters(["getUser", "getDrawUser"]),
|
||||
},
|
||||
|
||||
|
||||
watch: {
|
||||
tab(val){
|
||||
this.textlevel=val==0?'work':"assignment"
|
||||
this.level=val==0?2:3
|
||||
|
||||
}
|
||||
},
|
||||
// length (val) {
|
||||
// this.tab = val - 1
|
||||
// },
|
||||
// },
|
||||
|
||||
mounted(){
|
||||
moment.locales('ru')
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(this.$route.fullPath);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data);
|
||||
if ("action" in data) {this[data.action](data.payload)}
|
||||
else{console.log(data)}
|
||||
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
beforeDestroy(){
|
||||
console.log("destroy");
|
||||
this.ws.stop()
|
||||
},
|
||||
methods:{
|
||||
...projectstate.mapMutations(["setProject"]),
|
||||
...projectstate.mapGetters(["getProject","getprojectuniqueusers"]),
|
||||
...workstate.mapGetters(['getworks']),
|
||||
...workstate.mapMutations(["setWorks"]),
|
||||
...assignmentstate.mapGetters(['getAssignments','getAssignmentdatestart','getAssignmentdateend']),
|
||||
|
||||
|
||||
momentedtime(val){
|
||||
return moment(val).locale("Ru").format("HH:mm DD MMMM YYYY")
|
||||
},
|
||||
momentedDay(val){
|
||||
return moment(val).locale("Ru").format("DD MMMM YYYY")
|
||||
},
|
||||
assrerady(){
|
||||
let result = false
|
||||
|
||||
return this.work.work_assignment.every(el=>[3,5].includes(el.status.id))
|
||||
},
|
||||
commentsplitter(text){
|
||||
let t = text.split(":")
|
||||
t.shift()
|
||||
return t.join("")
|
||||
},
|
||||
changetab(id){
|
||||
|
||||
this.tab=this.work.work_assignment.findIndex(el=>el.id==id)+1
|
||||
},
|
||||
|
||||
|
||||
gantsaver(val){
|
||||
console.log(val.method, this[`get${val.level}`]());
|
||||
|
||||
this.ws.send({"action":val.method,"payload":this[`get${val.level}`]()})
|
||||
// console.log({"action":val.method,"payload":this[`get${val.level}`]()};
|
||||
},
|
||||
changestatus(val, action){
|
||||
let payload = {id:val.id,status: action, work_status_update:this.work.status.id<2?true:false}
|
||||
let check = this.getProject()
|
||||
|
||||
let task = check.tasks.find(el=>el.id == this.work.parent.id)
|
||||
|
||||
payload['project_status_update']=check.status.id<2?true:false
|
||||
payload['task_status_update']= task.status.id<2?true:false
|
||||
payload['projid']=task.parent.id
|
||||
console.log(payload['work_status_update']);
|
||||
this.ws.send({"action":"assignmentstatus","payload":payload})
|
||||
|
||||
},
|
||||
changestatusParent(val, action){
|
||||
let payload = {id:val.id, status: action,project:this.getProject().id}
|
||||
this.ws.send({"action":"workstatusconfirm","payload":payload})
|
||||
|
||||
},
|
||||
build(payload){
|
||||
if ("project" in payload) this.setProject(payload.project)
|
||||
|
||||
let wc = 0
|
||||
payload.work.work_files.forEach((el,index)=> payload.work.work_files[index].visible =el.visible.split("") )
|
||||
payload.work.work_assignment.forEach(el=> {if(el.status.name=="Завершено") wc+=1})
|
||||
this.workaccepted=wc/payload.work.work_assignment.length*100
|
||||
|
||||
this.setWorks(payload.work)
|
||||
this.work = this.getworks()
|
||||
if (this.myid>0) this.changetab(this.myid)
|
||||
this.breadcrumbs=[
|
||||
{ text: this.getProject().name, disabled: false, href: `/project/${this.getProject().id}` },
|
||||
{ text: this.work.parent.name, disabled: false, href: `/task/${this.work.parent.id}` },
|
||||
{ text: this.work.name, disabled: false, href: `` }, ]
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
confirmation(elm,res, text){
|
||||
|
||||
let ob = [moment().locale("Ru").format("HH:mm DD MMMM YYYY"), text + `${this.comment.length>0? ": " + this.comment:""}`]
|
||||
let payload = {id:elm.id, status:res, commentadd: ob}
|
||||
payload['work_status_update'] = this.work.work_assignment.every(el=>{ if(el.id==elm.id && res==5){return true}
|
||||
else if(el.status.id==5){return true}
|
||||
return false
|
||||
|
||||
})?{"res":true,"project":this.getProject().id}:{'res':false}
|
||||
// console.log(payload['work_status_update'] );
|
||||
this.ws.send({"action":"confirmation","payload":payload})
|
||||
this.comment=""
|
||||
},
|
||||
|
||||
VisSwitcher(file){
|
||||
console.log(file.visible);
|
||||
|
||||
this.ws.send({"action":"updateFile","payload":{id:file.id,visible: file.visible.join("")}})
|
||||
|
||||
},
|
||||
|
||||
|
||||
fileupdated(payload){
|
||||
let ind = this.work.work_files.findIndex(el=>el.id==payload.id)
|
||||
this.work.work_files[ind].visible=payload.visible.split("")
|
||||
|
||||
|
||||
},
|
||||
deletefile(file){
|
||||
this.ws.send({"action":"deletefile","payload":{id:file.id,filepath:file.filepath
|
||||
}})
|
||||
},
|
||||
filerenew(payload){
|
||||
payload.work_files.forEach((el,index)=> payload.work_files[index].visible =el.visible.split("") )
|
||||
this.work.work_files = payload.work_files
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
filedeleted(payload){
|
||||
|
||||
|
||||
let ind = this.work.work_files.findIndex(el=>el.id==payload.id)
|
||||
this.work.work_files.splice(ind,1)
|
||||
|
||||
},
|
||||
assupdate(payload){
|
||||
console.log(payload);
|
||||
if(payload.bigbuild){
|
||||
this.rebuild()
|
||||
|
||||
}
|
||||
let ind = this.work.work_assignment.findIndex(el=>el.id==payload.assignment.id)
|
||||
for (let [key,val] of Object.entries(payload.assignment
|
||||
))
|
||||
{
|
||||
this.work.work_assignment[ind][key]=val
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
rebuild(){
|
||||
this.ws.send({"action":"rebuild","payload": this.work.id})
|
||||
},
|
||||
async uploadfile(ind){
|
||||
|
||||
let formData = new FormData();
|
||||
this.files.forEach(el => {formData.append('file',el)
|
||||
|
||||
});
|
||||
this.files=null
|
||||
let fileinfo = {project:this.getProject().id, work:this.work.id, task:this.work.parent.id, visible: '0010'}
|
||||
if (this.level==3){
|
||||
fileinfo['assignment']=this.work.work_assignment[ind-1].id
|
||||
fileinfo.visible='0001'
|
||||
}
|
||||
formData.append('info', JSON.stringify(fileinfo))
|
||||
let res = await axiosInstance.post( `/main/uploader`, formData,{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
if ("created" in res.data){
|
||||
this.ws.send({"action":"fileuploaded","payload":this.work.id})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.pointer{
|
||||
cursor: pointer;
|
||||
}
|
||||
fieldset {
|
||||
height: 2.5rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,994 @@
|
||||
<template lang="">
|
||||
<v-card class="card-text">
|
||||
<v-stepper v-model="e1">
|
||||
<v-stepper-header>
|
||||
<v-stepper-step
|
||||
:complete="e1 > 1"
|
||||
step="1"
|
||||
>
|
||||
Основные положения
|
||||
</v-stepper-step>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-stepper-step
|
||||
:complete="e1 > 2"
|
||||
step="2"
|
||||
>
|
||||
Персоны
|
||||
</v-stepper-step>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-stepper-step
|
||||
:complete="e1 > 3"
|
||||
step="3"
|
||||
>
|
||||
Идея проекта
|
||||
</v-stepper-step>
|
||||
<v-divider></v-divider>
|
||||
<v-stepper-step
|
||||
:complete="e1 > 4"
|
||||
step="4"
|
||||
>
|
||||
Документация
|
||||
</v-stepper-step>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-stepper-step
|
||||
:complete="e1 > 5"
|
||||
step="5"
|
||||
>
|
||||
Задачи/работы
|
||||
</v-stepper-step>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-stepper-step step="6">
|
||||
Дополнительная информация
|
||||
</v-stepper-step>
|
||||
</v-stepper-header>
|
||||
|
||||
<v-stepper-items>
|
||||
<v-stepper-content step="1">
|
||||
<Cards
|
||||
class='mb-5'
|
||||
:ma="'ma-2'"
|
||||
:min_height=500
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<row-pirow
|
||||
class="long"
|
||||
title="Название:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="longn"
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="mt-0 pt-0 pb-2"
|
||||
flat
|
||||
dense
|
||||
required
|
||||
:error-messages="Logins_Errors"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow
|
||||
class="pt-2"
|
||||
title="Краткое название:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.name"
|
||||
hide-details
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="mt-0 pt-0 pb-2"
|
||||
flat
|
||||
dense
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow
|
||||
class="pt-2"
|
||||
title="Тип:"
|
||||
>
|
||||
<template
|
||||
#leftcol
|
||||
>
|
||||
<v-autocomplete
|
||||
dense
|
||||
class="inputext pointer mt-n1 iconsh font-weight-medium"
|
||||
v-model="newproject.type"
|
||||
:items="$store.getters[`filterslogic/mult/mult_project__type`]"
|
||||
return-object
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
hide-details
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
/>
|
||||
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow
|
||||
class="pt-2"
|
||||
title="Период:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<Datepiker
|
||||
:datestartstore="'Projectdatestart'"
|
||||
:dateendstore="'Projectdateend'"
|
||||
:min="getProject.datestart"
|
||||
:max="getProject.dateend"
|
||||
:minimaxon="[[false, true],[true,false]]"
|
||||
class="mt-0"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="e1 = 2"
|
||||
>
|
||||
Вперед
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@click="dialog_create_project=!dialog_create_project"
|
||||
text
|
||||
>
|
||||
Отмена
|
||||
</v-btn>
|
||||
</v-stepper-content>
|
||||
|
||||
<v-stepper-content step="2">
|
||||
<Cards
|
||||
:min_height=500
|
||||
class='mb-5'
|
||||
:ma="'ma-2'"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<roles-single
|
||||
:show= true
|
||||
/>
|
||||
<roles-many
|
||||
:roles="5"
|
||||
:show="true"
|
||||
|
||||
/>
|
||||
<roles-many
|
||||
:show="true"
|
||||
|
||||
/>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
<v-btn
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
@click="e1 = 1"
|
||||
>
|
||||
Назад
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="e1 = 3"
|
||||
>
|
||||
Вперед
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
@click="dialog_create_project=!dialog_create_project"
|
||||
text
|
||||
>
|
||||
Отмена
|
||||
</v-btn>
|
||||
</v-stepper-content>
|
||||
|
||||
<v-stepper-content step="3">
|
||||
<Cards
|
||||
:min_height=500
|
||||
class='mb-5'
|
||||
:ma="'ma-2'"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<row-pirow
|
||||
title="Основания для инициализации проекта:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.grounds"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
|
||||
|
||||
<rows-addremove
|
||||
v-for="(x,index) in addremrow"
|
||||
:newproject="newproject"
|
||||
:addrem="x"
|
||||
:key="index"
|
||||
@remove="remove"
|
||||
@addRows="addRows"
|
||||
/>
|
||||
|
||||
<row-pirow
|
||||
title="Задачи проекта:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.grounds"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
<v-btn
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
@click="e1 = 2"
|
||||
>
|
||||
Назад
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="e1 = 4"
|
||||
>
|
||||
Вперед
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
@click="dialog_create_project=!dialog_create_project"
|
||||
text
|
||||
>
|
||||
Отмена
|
||||
</v-btn>
|
||||
</v-stepper-content>
|
||||
|
||||
<v-stepper-content step="4">
|
||||
<Cards
|
||||
:min_height=500
|
||||
class='mb-5'
|
||||
:ma="'ma-2'"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
|
||||
<row-pirow
|
||||
class="pt-2"
|
||||
title="Финансовое обеспечение расходных обязательств, связанных с реализацией настоящего приказа:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.financial_support"
|
||||
hide-details
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="mt-0 pt-0 pb-2"
|
||||
flat
|
||||
dense
|
||||
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
<v-btn
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
@click="e1 = 3"
|
||||
>
|
||||
Назад
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="e1 = 5"
|
||||
>
|
||||
Вперед
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
@click="dialog_create_project=!dialog_create_project"
|
||||
text
|
||||
>
|
||||
Отмена
|
||||
</v-btn>
|
||||
</v-stepper-content>
|
||||
<v-stepper-content step="5">
|
||||
<Cards
|
||||
:min_height=500
|
||||
class='mb-5'
|
||||
:ma="'ma-2'"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<v-row >
|
||||
<v-col class="flex-col">
|
||||
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0 mr-1 text-center addnewshapka">
|
||||
<span class="text-subtitle-1 font-weight-medium white--text ">
|
||||
Список задач
|
||||
</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-1">
|
||||
<v-col class="flex-col">
|
||||
{{newtaskwork.name}}
|
||||
<!-- <v-row v-for="(x, key) in newproject.tasks" :key='key' class="flex-col">
|
||||
<v-col >
|
||||
{{key+1}}. {{x.name}}
|
||||
</v-col>
|
||||
<v-col>
|
||||
<MyIco
|
||||
@click="deleteTask(key)"
|
||||
icons = 'mdi-content-save'/>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<v-btn
|
||||
tile
|
||||
color="success"
|
||||
small
|
||||
|
||||
block
|
||||
@click="newTask"
|
||||
>
|
||||
<v-icon left
|
||||
x-small>
|
||||
mdi-plus
|
||||
</v-icon>
|
||||
Новая задача
|
||||
|
||||
</v-btn>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
<v-divider
|
||||
vertical
|
||||
></v-divider>
|
||||
|
||||
|
||||
|
||||
<v-col
|
||||
|
||||
class="flex-col">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0 ml-1 text-center addnewshapka">
|
||||
<span class="text-subtitle-1 font-weight-medium white--text ">
|
||||
Создать задачу
|
||||
</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col>
|
||||
<row-pirow
|
||||
title="Название:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newtaskwork.longname"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
|
||||
</row-pirow>
|
||||
<row-pirow
|
||||
title="Короткое название:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newtaskwork.name"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow
|
||||
title="Описание:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newtaskwork.description"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
|
||||
</row-pirow>
|
||||
<row-pirow
|
||||
title="Период:"
|
||||
>
|
||||
<template #leftcol>
|
||||
|
||||
<v-row class="flex-grow-0 ">
|
||||
<v-col>
|
||||
<v-menu
|
||||
v-model="menudatestart"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field
|
||||
v-model="newtaskwork.datestart"
|
||||
label="дд.мм.гггг"
|
||||
|
||||
readonly
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="newtaskwork.datestart"
|
||||
@input="menudatestart = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-menu
|
||||
v-model="menudateend"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field
|
||||
v-model="newtaskwork.dateend"
|
||||
label="дд.мм.гггг"
|
||||
|
||||
readonly
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="newtaskwork.dateend"
|
||||
@input="menudateend = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
</row-pirow>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<row-pirow
|
||||
title="Ответсвенный:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-autocomplete
|
||||
dense
|
||||
class="inputext pointer mt-n1 iconsh font-weight-medium"
|
||||
v-model="newproject.type"
|
||||
:items="$store.getters[`filterslogic/mult/mult_project__type`]"
|
||||
return-object
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
hide-details
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
|
||||
<v-btn
|
||||
|
||||
color="primary"
|
||||
@click="e1 = 4"
|
||||
>
|
||||
Назад
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@click="dialog_create_project=!dialog_create_project"
|
||||
text
|
||||
>
|
||||
Отмена
|
||||
</v-btn>
|
||||
</v-stepper-content>
|
||||
<v-stepper-content step="6">
|
||||
<Cards
|
||||
:min_height=500
|
||||
class='mb-5'
|
||||
:ma="'ma-2'"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<row-pirow
|
||||
title="Дополнительная информация:"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.influence"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
|
||||
<v-btn
|
||||
|
||||
color="primary"
|
||||
@click="e1 = 4"
|
||||
>
|
||||
Назад
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@click="dialog_create_project=!dialog_create_project"
|
||||
text
|
||||
>
|
||||
Отмена
|
||||
</v-btn>
|
||||
</v-stepper-content>
|
||||
|
||||
</v-stepper-items>
|
||||
</v-stepper>
|
||||
</v-card>
|
||||
</template>
|
||||
<script>
|
||||
import moment from "moment"
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import FiltersBar from '../components/UI/FiltersBar.vue';
|
||||
import FInputSearch from '../components/UI/FInputSearch.vue';
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
import { validationMixin } from "vuelidate";
|
||||
import rowPirow from '@/components/carddetails/pattern/row-pirow.vue';
|
||||
import RolesSingle from '@/components/assignments/UI/roles-single.vue';
|
||||
import rolesMany from '@/components/assignments/UI/roles-many.vue';
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
export default {
|
||||
|
||||
components: { FiltersBar, FInputSearch, rowPirow, RolesSingle, rolesMany },
|
||||
|
||||
mixins: [validationMixin],
|
||||
|
||||
data: () => ({
|
||||
|
||||
nameproj:'',
|
||||
e1: 1,
|
||||
dialog_create_project: false,
|
||||
model:'',
|
||||
search: '',
|
||||
ws: null,
|
||||
projectid:null,
|
||||
superuser: false,
|
||||
childHeaders:[
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Ответственный", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
|
||||
],
|
||||
headers: [
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Руководитель", value:"user_project"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
{text:"Изменено", value: "lastchanged"},
|
||||
{text:"Выполнение", value: "bars"},
|
||||
],
|
||||
into_project: false,
|
||||
pagetitle:'',
|
||||
menu: false,
|
||||
childList:[],
|
||||
|
||||
parentList:[],
|
||||
longn:'',
|
||||
|
||||
}),
|
||||
|
||||
validations: {
|
||||
longn: { required }
|
||||
},
|
||||
|
||||
computed:{
|
||||
...projectstate.mapGetters(["getProject"]),
|
||||
|
||||
Logins_Errors() {
|
||||
const errors = [];
|
||||
if (!this.$v.longn.$dirty) return errors;
|
||||
!this.$v.longn.required &&
|
||||
errors.push("Обязательное поле");
|
||||
|
||||
return errors;
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
...globalstore.mapMutations(['set_assign_id']),
|
||||
...mapMutations(["setFields"]),
|
||||
...mapActions(["clear", "getFilters", "addFilter", "activefilters"]),
|
||||
...globalstore.mapGetters(["getassign_id"]),
|
||||
...projectstate.mapMutations(["setProject","setProjectusers"]),
|
||||
|
||||
addTask() {
|
||||
|
||||
this.newproject.tasks.push(this.newtaskwork)
|
||||
this.newtaskwork = {longname: '', name:"", description: "", datestart: "", dateend: "", responsible: ""}
|
||||
|
||||
},
|
||||
|
||||
deleteTask(key) {
|
||||
this.newproject.tasks.splice(key, 1)
|
||||
},
|
||||
|
||||
|
||||
addRows(row) {
|
||||
this.newproject[row].push('')
|
||||
},
|
||||
|
||||
remove(rem) {
|
||||
this.newproject[rem.field].splice(rem.key, 1)
|
||||
},
|
||||
|
||||
async createproj(){
|
||||
console.log('-----------dialog_create_project');
|
||||
this.dialog_create_project = true
|
||||
// let res = await axiosInstance.post('/createproj')
|
||||
// console.log(res, 'res');
|
||||
// this.$router.push(`/project/${res.data.id}`)
|
||||
},
|
||||
|
||||
timediff(dateend) {
|
||||
return moment(dateend).isValid()? moment(dateend).locale('ru').fromNow(): 'Не установлен'
|
||||
},
|
||||
formatDate(date) {
|
||||
return (date && moment(date).isValid())? moment(date).format("DD.MM.YYYY"): ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
build(data) {
|
||||
|
||||
if (!this.into_project){
|
||||
if (data.payload.length>0){
|
||||
data.payload.forEach(el => {
|
||||
|
||||
el["completed"]= el.project_task.filter(el=>el.status.id==5).length
|
||||
el["all"]=el.project_task.length
|
||||
|
||||
});
|
||||
this.parentList= data.payload
|
||||
}
|
||||
else{
|
||||
this.parentList=[]
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
this.childList = data.child
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async updateData(){
|
||||
let payload=await this.activefilters()
|
||||
for (let key of Object.keys(payload))
|
||||
{
|
||||
if ( ['status__in','user_project__role__in'].includes(key)) {
|
||||
let arr=[]
|
||||
payload[key].forEach(el => {arr.push(el.id)
|
||||
|
||||
});
|
||||
payload[key]=arr
|
||||
}
|
||||
|
||||
}
|
||||
this.ws.send({"action": "getfilter", payload})
|
||||
// console.log(await this.activefilters());
|
||||
},
|
||||
|
||||
find_rp(arr){
|
||||
const rp = arr.find(el=>el.role.id==2)
|
||||
return rp==undefined?"Не назначен": rp.user.sn
|
||||
},
|
||||
|
||||
|
||||
|
||||
update(){
|
||||
console.log(`UPDATE`)
|
||||
|
||||
},
|
||||
titler(itname=""){
|
||||
if(this.$route.path=="/projects") {
|
||||
this.pagetitle= !this.into_project?"Проекты":`${itname}: Задачи`
|
||||
}else if(this.$route.path=="/tasks"){
|
||||
this.pagetitle= !this.into_project?"Задачи":`${itname}: Работы`
|
||||
}
|
||||
else if(this.$route.path=="/works"){
|
||||
this.pagetitle= !this.into_project?"Работы":`${itname}: Поручения`
|
||||
|
||||
}else{
|
||||
|
||||
this.pagetitle="Поручения"
|
||||
}
|
||||
},
|
||||
|
||||
toChild(item) {
|
||||
this.projectid = item.id
|
||||
this.into_project = true;
|
||||
|
||||
this.titler(item.name)
|
||||
this.childList=item.project_task
|
||||
// this.ws.conn.send(JSON.stringify({"action": "getchild","parent__type":this.$route.path.slice(1), "parent__id": item.id}))
|
||||
},
|
||||
|
||||
backParent() {
|
||||
this.into_project = false;
|
||||
this.titler()
|
||||
|
||||
},
|
||||
clickRow(e, row) {
|
||||
let path = this.$route.path
|
||||
let pusher={
|
||||
'/projects':[{name:"Task",'col':'id'},{name:"Project",'col':'id'} ],
|
||||
'/tasks':[{name:"Work",'col':'id'},{name:"Task",'col':'id'}],
|
||||
'/works':[{name:"Work",'col':'parent'},{name:"Work",'col':'id'}],
|
||||
'/assignments':[{name:"Work",'col':'parent'},{name:"Work",'col':'parent'}]
|
||||
}
|
||||
|
||||
let ind = this.into_project? 0:1
|
||||
// console.log("ssss",{ name: pusher[path][ind].name, params: { tid:row.item[pusher[path][ind].col]}});
|
||||
console.log("новый роут-----",row.item )
|
||||
let params = { id:row.item[pusher[path][ind].col]}
|
||||
if ((path=='/assignments' && ind==1) || (ind==0 && path=='/works')){
|
||||
|
||||
this.set_assign_id(row.item.id)
|
||||
// console.log(this.getassign_id());
|
||||
|
||||
this.$router.push({path:`/project/${row.item.project}/task/${row.item.task}/work/${row.item.work}`})
|
||||
}
|
||||
else if((ind==1 && path=='/works')||(ind==0 && path=='/tasks')){
|
||||
|
||||
this.$router.push({path:`/project/${row.item.project}/task/${row.item.task}/work/${row.item.id}`})
|
||||
}
|
||||
|
||||
else if((ind==1 && path=='/tasks')||(ind==0 && path=='/projects')){
|
||||
this.$router.push({path:`/project/${this.projectid}/task/${row.item.id}`})
|
||||
}
|
||||
else{
|
||||
this.$router.push({path:`/project/${row.item.id}`})
|
||||
}
|
||||
|
||||
// this.$router.push({ name: pusher[path][ind].name, params: params})
|
||||
|
||||
},
|
||||
wsconnect(){
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(`/reestr${this.$route.path}`);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data, "dataonmess");
|
||||
try{
|
||||
this[data.action](data);
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route(to, from){
|
||||
this.ws.stop()
|
||||
this.into_project=false
|
||||
this.childList=[]
|
||||
this.parentList=[]
|
||||
this.titler()
|
||||
this.wsconnect()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
mounted() {
|
||||
|
||||
|
||||
|
||||
this.superuser = this.$store.getters['auth/getSuperUser']
|
||||
this.setFields({
|
||||
project__status: { module: "mult" },
|
||||
project__type: { module: "mult" },
|
||||
role:{module:"mult"}
|
||||
|
||||
});
|
||||
|
||||
this.getFilters([
|
||||
{role:{name:"role",sort:"id"}},
|
||||
{project__type:{sort: "id", filters:{},exclude:["projects"]}},
|
||||
{project__status:{name:"project__status", sort:"id", related_name: "name"}}], true).then(async (data) => {console.log(data,"data")})
|
||||
|
||||
this.wsconnect()
|
||||
this.titler()
|
||||
console.log(this.getProject);
|
||||
console.log(this.$store.getters[`filterslogic/mult/mult_project__type`],"------------");
|
||||
},
|
||||
destroyed() {
|
||||
this.ws.stop()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
.main-projects {
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
h4 {
|
||||
color: $bg-purple;
|
||||
|
||||
}
|
||||
|
||||
.task-table tbody tr:first-child td {
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
tbody {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table > thead > tr > th {
|
||||
font-weight: 600;
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr .dots-vertical i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr:hover .dots-vertical i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.grow-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.iconInline {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: 1%;
|
||||
top: 93%
|
||||
}
|
||||
.card-text {
|
||||
font-size: 14px!important;
|
||||
font-weight:400!important
|
||||
}
|
||||
.long div:nth-child(1) {
|
||||
align-self: center;
|
||||
}
|
||||
// tr:first-child
|
||||
// :nth-child(1)
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div style="background: gray;">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
name: 'Main',
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,754 @@
|
||||
|
||||
<template>
|
||||
|
||||
|
||||
<work-task-ass-project
|
||||
:show_info="show_info"
|
||||
:cards="$options.name"
|
||||
:tabProj="tabProj"
|
||||
:chatview="chatview"
|
||||
:show="show"
|
||||
:message="message"
|
||||
@listchangetab="tab='0'"
|
||||
@createnewTask="createnewTask"
|
||||
@allCard="allCard"
|
||||
:title="'Проект ' + project.name"
|
||||
@comm="comm"
|
||||
>
|
||||
<template #spisok>
|
||||
<left-list
|
||||
:level="1"
|
||||
@confirmation="confirmation"
|
||||
@rout="rout"
|
||||
@showuserinfo="showuserinfo"
|
||||
/>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<v-divider/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="k text-end flex-col pa-0">
|
||||
<v-tabs
|
||||
@change="changetabProject"
|
||||
class="flex-grow-1"
|
||||
v-model="tabProj"
|
||||
>
|
||||
<v-tab
|
||||
href="#1"
|
||||
class="pa-0 tabproject"
|
||||
>
|
||||
<MyIco
|
||||
icons = 'mdi-home-map-marker'
|
||||
size="large"
|
||||
/>
|
||||
</v-tab>
|
||||
<v-tab href="#2" class="pa-0 tabproject">
|
||||
<MyIco
|
||||
icons = 'mdi-wallet-travel'
|
||||
size="large"
|
||||
/>
|
||||
</v-tab>
|
||||
<v-tab href="#3" class="pa-0 tabproject">
|
||||
<MyIco
|
||||
icons = 'mdi-timetable '
|
||||
size="large"
|
||||
/>
|
||||
</v-tab>
|
||||
<v-col class="flex-grow-0">
|
||||
<MyIco
|
||||
@click="gantviewer"
|
||||
size="large"
|
||||
icons = 'mdi-chart-gantt'
|
||||
/>
|
||||
</v-col>
|
||||
</v-tabs>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-slide-x-reverse-transition>
|
||||
<v-card
|
||||
v-show="gantview"
|
||||
class="gantPosition"
|
||||
>
|
||||
<Gant
|
||||
ref="gantproject"
|
||||
:tasksOR='project.task'
|
||||
@saver = "addTask"
|
||||
@changegantview="gantview=false"
|
||||
/>
|
||||
</v-card>
|
||||
</v-slide-x-reverse-transition>
|
||||
</template>
|
||||
|
||||
<template #informations>
|
||||
<project-informationorder
|
||||
:show="show"
|
||||
:chat="activedCh"
|
||||
:chatview="chatview"
|
||||
ref="pifo"
|
||||
@saveproject="saveproject"
|
||||
@switch_mode="switch_mode"
|
||||
@chatviewer="chatviewer"
|
||||
@createtabchat="createtabchat"
|
||||
@changestatus="changestatus"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #projdocs>
|
||||
<ProjectDocks
|
||||
ref="projectdoc"
|
||||
:documents="documents"
|
||||
@savedock="savedock"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #chat>
|
||||
<mMessegeListRight
|
||||
class="box2"
|
||||
ref="mychat"
|
||||
:chatplace="'rightchat'"
|
||||
:header= false
|
||||
:chat="activedCh"
|
||||
:waiter="waiter"
|
||||
@waiting="waiter=true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #filess>
|
||||
|
||||
<filelist
|
||||
:statid="statid"
|
||||
:files="project.project_files"
|
||||
:level="1"
|
||||
:status="project.status.id"
|
||||
:currentid="project.id"
|
||||
@uploadfile="uploadfile"
|
||||
@deletefile="deletefile"
|
||||
@VisSwitcher="VisSwitcher"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #graphic>
|
||||
|
||||
<div>
|
||||
<v-dialog
|
||||
v-model="show_change_dialog"
|
||||
width="75vw"
|
||||
>
|
||||
<project-stepper
|
||||
@closes="closes"
|
||||
@newproject='newproject'
|
||||
@showuserinfo='showuserinfo'
|
||||
/>
|
||||
</v-dialog>
|
||||
</div>
|
||||
<work-pie-chart
|
||||
:title="'Статусы задач в проекте'"
|
||||
:data="task_statuses_calc"
|
||||
/>
|
||||
</template>
|
||||
|
||||
</work-task-ass-project>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import LeftList from '@/components/carddetails/pattern/leftList.vue';
|
||||
import { bus } from "@/main";
|
||||
import ProjectDocks from '@/components/projects/ProjectDocks.vue'
|
||||
import Gant from '@/components/visual/Gant.vue'
|
||||
import SelectUserMenu from '@/components/UI/SelectUserMenu.vue'
|
||||
import ColText from '@/components/projects/ColText.vue'
|
||||
import WorkTaskAssProject from './pattern/work-task-ass-project.vue';
|
||||
import workPieChart from '@/components/UI/GRAPHICS/workPieChart.vue';
|
||||
import CardsButtons from '@/components/projects/CardsButtons.vue'
|
||||
import filelist from '@/components/carddetails/files/filelist.vue';
|
||||
import projectInformationorder from '../components/assignments/project-informationorder.vue';
|
||||
import uf from '@/utils/universal_functions'
|
||||
import wtasp from '@/utils/wtasp' //Содержит функции для Project, Task, Work
|
||||
import Datepiker from '@/components/UI/Datepiker.vue'
|
||||
import ProjectStepper from '../components/UI/project-stepper.vue';
|
||||
// import chat from '@/components/chats/chat.vue'
|
||||
|
||||
import Postpone from '@/components/dialog/fill/postpone.vue';
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
const taskstate = createNamespacedHelpers("taskstate");
|
||||
const workstate = createNamespacedHelpers("workstate");
|
||||
const globalstore=createNamespacedHelpers("globalstore");
|
||||
const auth = createNamespacedHelpers('auth')
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
// import getFilters from '@/utils/filterutil'
|
||||
import moment from "moment";
|
||||
import mMessegeListRight from '@/components/supogramm/mess_layouts/m-messege-list-right.vue';
|
||||
|
||||
export default {
|
||||
name: "project",
|
||||
mixins:[ uf, wtasp],
|
||||
components: {
|
||||
LeftList,
|
||||
ProjectDocks,
|
||||
Gant,
|
||||
SelectUserMenu,
|
||||
ColText,
|
||||
CardsButtons,
|
||||
workPieChart,
|
||||
filelist,
|
||||
history,
|
||||
projectInformationorder,
|
||||
Datepiker,
|
||||
mMessegeListRight,
|
||||
WorkTaskAssProject,
|
||||
Postpone,
|
||||
ProjectStepper
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
show_change_dialog:true,
|
||||
statid: [1, 3, 4, 5, 6],
|
||||
message: {mes:"", show: false},
|
||||
comment:"",
|
||||
tabProj: null,
|
||||
test:{test:[{test:'test','test2':'test2'}]},
|
||||
chatview:true,
|
||||
tasksaccepted:0,
|
||||
gantview:false,
|
||||
show:false,
|
||||
tabs: ['Карточка','Документация', 'История'],
|
||||
btns_otchet: ['Приказ', 'План', 'Паспорт', 'Отчет', 'План КС', 'Итоговый отчет', 'Состав РГ', 'Протокол'],
|
||||
menu:null,
|
||||
waiter:false,
|
||||
|
||||
chatview:true,
|
||||
task:{name:"",datestart:"",dateend:"",responsible:{id:""},status:{id:0,name:"",description:""}},
|
||||
activedCh: {},
|
||||
ws: null,
|
||||
position: true,
|
||||
documents:[],
|
||||
project:{
|
||||
id:0,
|
||||
name: "",
|
||||
|
||||
status: {
|
||||
id: 1,
|
||||
|
||||
},
|
||||
|
||||
|
||||
users: [ ],
|
||||
|
||||
ptype: {
|
||||
id: 0
|
||||
},
|
||||
datestart:'',
|
||||
dateenf:'',
|
||||
tasks: [],
|
||||
author: {
|
||||
id: 0
|
||||
},
|
||||
|
||||
},
|
||||
selectdatafields:{},
|
||||
selectfields:{project__type:{name:"Тип",basefield:'ptype'},
|
||||
project__status:{name:"Статус",basefield:'status'}},
|
||||
|
||||
|
||||
|
||||
box: {},
|
||||
|
||||
|
||||
userFields: [
|
||||
{text: 'Директор', icons: 'mdi-account-plus', model: 'director',modelrole:1},
|
||||
{text: 'Руководитель', icons: 'mdi-account-plus', model: 'rp',modelrole:2},
|
||||
{text: 'Секретарь', icons: 'mdi-account-plus', model: 'secretary',modelrole:3},
|
||||
{text: 'Координатор', icons: 'mdi-account-plus', model: 'coordinator',modelrole:4},
|
||||
],
|
||||
|
||||
|
||||
|
||||
chalenge: {'ИСУП': [{name: 'Карточка задания'},
|
||||
|
||||
{name: 'Всплывающее окно'},
|
||||
{name: 'Все дер'}],
|
||||
'УКД': [{name: 'Статистика по пользователем'}] }
|
||||
|
||||
}),
|
||||
|
||||
computed:{
|
||||
...projectstate.mapGetters(["getProject","getProjectwatchers","getProjectusers"]),
|
||||
...auth.mapGetters(["getUser"]),
|
||||
history(){
|
||||
return this.getProject.history
|
||||
|
||||
},
|
||||
checkRP() {
|
||||
let obl = false
|
||||
this.projectPopoject.users.filter(e=> {
|
||||
|
||||
if ([2].includes(e.role.id) && e.user.id == this.getUser.id) {
|
||||
console.log(e, '---------');
|
||||
obl = true
|
||||
}})
|
||||
return obl
|
||||
},
|
||||
|
||||
|
||||
|
||||
task_statuses_calc(){
|
||||
return this.pie_statuses_calc(this.project.tasks)
|
||||
},
|
||||
|
||||
projectPopoject(){
|
||||
let {name, dateend, datestart, status, description, comment, users}={...this.project}
|
||||
return {name, dateend, datestart, status, description, comment, users, type:'Проект:', role: 'Руководитель проекта:'}
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
...projectstate.mapMutations(["setProject","setProjectusers", "clearProject"]),
|
||||
...mapActions(["getFilters"]),
|
||||
...mapMutations(["setFields"]),
|
||||
...taskstate.mapGetters(["gettasks"]),
|
||||
...workstate.mapGetters(["getworks"]),
|
||||
...globalstore.mapGetters(["getLoad"]),
|
||||
...globalstore.mapMutations(["setLoad"]),
|
||||
|
||||
closes() {
|
||||
this.show=!this.show
|
||||
},
|
||||
|
||||
newproject(val) {
|
||||
console.log('nude', val);
|
||||
this.ws.send({"action":"update","payload":val})
|
||||
this.show= false
|
||||
},
|
||||
rout(val) {
|
||||
this.$router.push({ path: `${this.$route.fullPath}/task/${val}` })
|
||||
},
|
||||
|
||||
|
||||
comm(val){
|
||||
this.comment =val
|
||||
},
|
||||
|
||||
showuserinfo(id){
|
||||
this.$refs.pifo.showuserinfo(id)
|
||||
},
|
||||
|
||||
idtonewdock(payload){
|
||||
|
||||
|
||||
this.$refs.projectdoc.idtonewdock(payload)
|
||||
|
||||
},
|
||||
|
||||
|
||||
filerenew(payload){
|
||||
|
||||
payload.forEach((el,index)=> payload[index].visible = el.visible.split("") )
|
||||
this.project.project_files = payload
|
||||
|
||||
},
|
||||
|
||||
|
||||
takeprev(payload){
|
||||
|
||||
// let ind = this.mychats.findIndex(el=>el.id==payload.chat)
|
||||
|
||||
if (this.activedCh.lastmessage.length<20){
|
||||
this.activedCh.lastmessage=payload.res
|
||||
this.activedCh.lastmessage=this.activedCh.lastmessage
|
||||
}
|
||||
else{
|
||||
this.activedCh.lastmessage = payload.res.concat(this.activedCh.lastmessage)
|
||||
}
|
||||
|
||||
|
||||
this.waiter=false
|
||||
|
||||
|
||||
},
|
||||
messagedeleted(payload){
|
||||
try{
|
||||
|
||||
// console.log(this.mychats[ind].lastmessage)
|
||||
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){
|
||||
|
||||
|
||||
let ind = this.project.project_files.findIndex(el=>el.id==payload.id)
|
||||
this.project.project_files.splice(ind,1)
|
||||
|
||||
},
|
||||
|
||||
createnewTask(){
|
||||
console.log('ioi');
|
||||
this.$refs.gantproject.createnewTask()
|
||||
},
|
||||
|
||||
savedock(val){
|
||||
console.log("PROJECT_SAVEDOCK",val);
|
||||
this.ws.send({"action":val[0],"payload":val[1]})
|
||||
},
|
||||
|
||||
// afterEnter(){
|
||||
// console.log("@after-enter=")
|
||||
// },
|
||||
VisSwitcher(file){
|
||||
// console.log(file);
|
||||
this.ws.send({"action":"updateFile","payload":{id:file.id,visible: file.visible.join("")}})
|
||||
|
||||
},
|
||||
|
||||
rebuild(){
|
||||
|
||||
|
||||
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(){
|
||||
|
||||
this.chatview=!this.chatview
|
||||
},
|
||||
createtabchat(){
|
||||
let name = this.getProject.name
|
||||
let level = 1
|
||||
let parent =this.getProject.id
|
||||
let users = new Set()
|
||||
this.getProject.users.forEach((e)=> {if(e.role.id<5) users.add(e.user.id)})
|
||||
|
||||
|
||||
this.chatview=true
|
||||
bus.$emit("supogrammchatcreate",{users:Array.from(users),name, level,parent})
|
||||
|
||||
},
|
||||
|
||||
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))
|
||||
|
||||
let res = await axiosInstance.post( `/main/uploader`, formData,{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
if ("created" in res.data){
|
||||
this.ws.send({"action":"fileuploaded","payload":this.getProject.id})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
changetabProject(value){
|
||||
if (value=="2"){
|
||||
this.ws.send({"action":'getprojectdocks',"payload":""})
|
||||
}
|
||||
|
||||
},
|
||||
console(val){
|
||||
console.log(val);
|
||||
},
|
||||
addTask(val){
|
||||
console.log(val,"!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
delete val.val.history
|
||||
this.ws.send({"action":val.am.method,"payload":val.val})
|
||||
// this.ws.send({"action":val.method,"payload":this[`get${val.level}`]()})
|
||||
},
|
||||
|
||||
|
||||
clickRow(e,row){
|
||||
|
||||
this.$router.push(`${this.$route.path}/task/${row.item.id}`)
|
||||
},
|
||||
build(data){
|
||||
|
||||
data.project_files.forEach((el,index)=> data.project_files[index].visible =el.visible.split("") )
|
||||
this.project=data;
|
||||
console.log(this.project, 'this.project');
|
||||
this.setProject(this.project)
|
||||
|
||||
this.tasksaccepted=this.getProject.tasks.filter(el=>el.status.id==5).length*100/this.getProject.tasks.length
|
||||
this.setLoad(false)
|
||||
// if (this.gantview) this.$refs.gantproject.rebuild()
|
||||
if("datachat" in data){
|
||||
this.activedCh = data.datachat
|
||||
this.chatview = "id" in this.activedCh
|
||||
this.$refs.mychat.scrollbottom(this.activedCh.lastmessage[this.activedCh.lastmessage.length-1].id)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
deluser(id, mod){
|
||||
let users = this.getProject.users
|
||||
let ind = users.findIndex(e=>(e.user.id==id && e.role.id ==mod))
|
||||
users.splice(ind,1)
|
||||
this.setProjectusers(users)
|
||||
},
|
||||
|
||||
editField(field) {
|
||||
|
||||
this.box=field
|
||||
},
|
||||
newmessageincome(payload){
|
||||
this.activedCh.lastmessage.push(payload)
|
||||
|
||||
this.$refs.mychat.scrollbottom(payload.id)
|
||||
},
|
||||
|
||||
saveproject() {
|
||||
console.log(this.getProject, 'сюда');
|
||||
this.ws.send({"action":"update","payload":this.getProject})
|
||||
},
|
||||
|
||||
changestatus(chang){
|
||||
|
||||
let action = "workstatus"
|
||||
|
||||
let payload = {
|
||||
id: chang.val.id,
|
||||
status: chang.action,
|
||||
|
||||
}
|
||||
|
||||
let check = this.getProject
|
||||
|
||||
|
||||
payload['project_status_update'] = check.status.id ==3?true:false
|
||||
payload['task_status_update']= this.task.status.id < 2 ?true:false
|
||||
|
||||
if (this.tab>0){
|
||||
payload['work_status_update']= this.work.status.id < 2 ? true:false
|
||||
action = "assignmentstatus"
|
||||
}
|
||||
this.ws.send({action,payload})
|
||||
},
|
||||
|
||||
switch_mode() {
|
||||
this.show = !this.show
|
||||
},
|
||||
|
||||
async createtask(){
|
||||
let res = await axiosInstance.get(`/createtask/?parent=${this.project.id}`)
|
||||
|
||||
this.$router.push(`/task/${res.data.id}`)
|
||||
},
|
||||
buildDocspage(data){
|
||||
this.documents = data
|
||||
|
||||
},
|
||||
closeDocdialog(data){
|
||||
this.$refs.projectdoc.dialog=false
|
||||
},
|
||||
async opendoc(data){
|
||||
console.log("JOOOOOOOOOOO");
|
||||
await this.$refs.projectdoc.copyrunview(data);
|
||||
},
|
||||
gantviewer(){
|
||||
this.gantview=!this.gantview
|
||||
if (this.gantview) this.$refs.gantproject.rebuild()
|
||||
},
|
||||
|
||||
|
||||
confirmation(payload){
|
||||
|
||||
|
||||
// let n = this.project.tasks.findIndex(el=>el.id==payload.id)
|
||||
|
||||
this.project.tasks.forEach(el=> {
|
||||
// console.log(el, "wttf")
|
||||
el.menu=false
|
||||
el.action_confirm=false})
|
||||
// payload['task_status_update'] = this.project.tasks[n].task_work.every(el=>{ if(el.id==work.elm.id && work.res==5){return true}
|
||||
// else if(el.status.id==5){return true}
|
||||
|
||||
// return false
|
||||
|
||||
// })
|
||||
// ?
|
||||
// {"res":true}:{'res':false}
|
||||
this.ws.send({"action":"confirmation","payload":payload})
|
||||
|
||||
this.comment=""
|
||||
this.comment_up=""
|
||||
},
|
||||
},
|
||||
|
||||
beforeDestroy(){
|
||||
console.log("destroy");
|
||||
this.clearProject()
|
||||
this.ws.stop()
|
||||
},
|
||||
|
||||
|
||||
|
||||
mounted() {
|
||||
this.setLoad(true)
|
||||
this.setFields({role:{module:"mult"},project__type: { module: "mult" } });
|
||||
|
||||
this.getFilters([{"project__type": { "sort": "id", "filters":{},"exclude":["projects"]}},
|
||||
{role:{name:"role",sort:"id"}}
|
||||
])
|
||||
|
||||
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(this.$route.fullPath);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data,"все данные");
|
||||
if ("mess" in data){
|
||||
console.log(data.mess + " - сообщение")
|
||||
this.message.mes=data.mess
|
||||
this.message.show=true
|
||||
}
|
||||
if ("action" in data) {
|
||||
try{
|
||||
this[data.action](data.payload)}
|
||||
catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
.alerts {
|
||||
position: absolute;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
bottom: 5%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
max-width: 20%;
|
||||
}
|
||||
|
||||
|
||||
.project_css .v-window-item--active,.project_css .v-window__container, .project_css .v-window {
|
||||
flex-grow: 1;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.v-menu__content {
|
||||
box-shadow: 0px 5px 5px -3px rgb(0 0 0 / 0%), 0px 8px 10px 1px rgb(0 0 0 / 0%), 0px 3px 14px 2px rgb(0 0 0 / 10%);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.inputext {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.grow-table {
|
||||
|
||||
overflow-y: scroll;
|
||||
.v-list-group :nth-child(1) {
|
||||
color: var(--v-inyand2-base)!important;
|
||||
font-size: 0.8rem;
|
||||
// background: var(--v-scrollbar-base)!important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.inputext {
|
||||
font-size: 0.9rem;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.chat {
|
||||
min-height: 25%;
|
||||
}
|
||||
|
||||
.iconsh
|
||||
.v-icon.v-icon {
|
||||
font-size: 14px!important;
|
||||
}
|
||||
|
||||
.v-tab-item >>> .v-window__container {
|
||||
flex-grow: 1 !important;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.v-input__append-inner{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media (min-width: 1904px) {
|
||||
.maxHi {
|
||||
height: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1264px) and (max-width: 1904px) {
|
||||
.maxHi {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.v-window, .v-window__container {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
|
||||
.theme--light .v-tabs-items, .theme--dark .v-tabs-items {
|
||||
background-color: transparent!important;
|
||||
}
|
||||
|
||||
.v-window-item {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tabproject {
|
||||
min-width: 47px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,568 @@
|
||||
<template>
|
||||
<v-container class="flex-col h-100 w-100 projects" fluid>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<!-- -->
|
||||
<filters-bar
|
||||
@sendData="updateData"
|
||||
@clear="clear"
|
||||
class="pa-1 pb-3"
|
||||
|
||||
:header="pagetitle"
|
||||
>
|
||||
<template v-slot:filterslist>
|
||||
<f-input-search
|
||||
|
||||
:field="'name'"
|
||||
title="Название"
|
||||
></f-input-search>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__gte'"
|
||||
title="Срок начала с:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__lte'"
|
||||
title="Срок начала до:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__gte'"
|
||||
title="Срок окончания c:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__lte'"
|
||||
title="Срок окончания до:"
|
||||
|
||||
></f-daterange>
|
||||
|
||||
|
||||
<f-multi-select
|
||||
|
||||
:title="'Статус проекта'"
|
||||
:field="'status'"
|
||||
:disabled="false"
|
||||
></f-multi-select>
|
||||
<f-input-search
|
||||
|
||||
:field="'user_project__user__sn'"
|
||||
title="Фамилия участника"
|
||||
></f-input-search>
|
||||
|
||||
|
||||
|
||||
|
||||
<f-multi-select
|
||||
|
||||
:title="'Роль'"
|
||||
:field="'user_project__role'"
|
||||
:disabled="false"
|
||||
></f-multi-select>
|
||||
|
||||
</template>
|
||||
</filters-bar>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
|
||||
|
||||
|
||||
<v-row class="mt-0 ">
|
||||
<v-col class="flex-col pa-1">
|
||||
<v-card class="flex-grow-1">
|
||||
|
||||
<div class="mt-3 iconInline">
|
||||
<BtnsOut
|
||||
v-if="pagetitle=='Проекты'"
|
||||
:widthi=140
|
||||
:icon = true
|
||||
title = "Создать проект"
|
||||
@click="createproj"
|
||||
color="open_icons"
|
||||
>
|
||||
|
||||
</BtnsOut>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<v-data-table
|
||||
:fixed-header="true"
|
||||
@dblclick:row="clickRow"
|
||||
:disable-pagination="true"
|
||||
hide-default-footer
|
||||
:headers="!into_project?headers:childHeaders"
|
||||
:items="!into_project?parentList:childList"
|
||||
class="grow-table"
|
||||
>
|
||||
<template v-slot:[`item.link`]="{ item }">
|
||||
|
||||
|
||||
<v-icon v-if="!into_project && item.all>0" @click.stop="toChild(item)">mdi-chevron-right</v-icon>
|
||||
<v-icon v-else-if="into_project" @click.stop="backParent">mdi-chevron-left</v-icon>
|
||||
</template>
|
||||
|
||||
<template v-slot:[`item.user_project`]="{ item }">
|
||||
{{find_rp(item.user_project)}}
|
||||
</template>
|
||||
|
||||
|
||||
<template v-if="into_project" v-slot:[`item.id`]="{ item }">
|
||||
{{projectid}}-{{item.id}}
|
||||
</template>
|
||||
|
||||
<template v-slot:[`item.dateend`]="{ item }">
|
||||
{{timediff(item.dateend) }}
|
||||
</template>
|
||||
<template v-slot:[`item.lastchanged`]="{ item }">
|
||||
{{formatDate(item.lastchanged) }}
|
||||
</template>
|
||||
<template v-slot:[`item.bars`]="{ item }">
|
||||
<div class="d-flex align-center">
|
||||
<template v-if="'completed' in item && item.all>0">
|
||||
<v-progress-linear style="width: 80%;" :value="item.completed/item.all*100" height="10" buffer-value="100"></v-progress-linear>
|
||||
<div class="ps-2">{{`${item.completed}/${item.all}`}}</div>
|
||||
</template>
|
||||
<div class="mx-auto" v-else><v-icon v-if="item.status__id==5" style="color:green">fa-solid fa-square-check</v-icon></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<v-menu offset-x left v-if="superuser">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
|
||||
<div v-bind="attrs"
|
||||
v-on="on"
|
||||
class="ms-2 dots-vertical">
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</div>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item><v-list-item-title>Удалить</v-list-item-title></v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<div v-else style="width: 32px;">
|
||||
|
||||
</div>
|
||||
<div @click.stop="menu" class="ps-2 dots-vertical"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-data-table>
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
|
||||
|
||||
</v-row>
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<v-dialog
|
||||
v-model="dialog_create_project"
|
||||
width="75vw"
|
||||
|
||||
>
|
||||
<!-- <all-info-project></all-info-project> -->
|
||||
<project-stepper
|
||||
@newproject='newproject'
|
||||
@showuserinfo='showuserinfo'
|
||||
@closes="dialog_create_project=!dialog_create_project"
|
||||
/>
|
||||
|
||||
|
||||
</v-dialog>
|
||||
|
||||
<infousercard
|
||||
:dialogdetail="dialogdetail"
|
||||
:person="person"
|
||||
@dialogdetailoff="dialogdetail=false"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import moment from "moment"
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import FiltersBar from '../components/UI/FiltersBar.vue';
|
||||
import FInputSearch from '../components/UI/FInputSearch.vue';
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
import { validationMixin } from "vuelidate";
|
||||
import rowPirow from '@/components/carddetails/pattern/row-pirow.vue';
|
||||
import RolesSingle from '@/components/assignments/UI/roles-single.vue';
|
||||
import rolesMany from '@/components/assignments/UI/roles-many.vue';
|
||||
import RowsAddremove from '@/components/carddetails/pattern/rows-addremove.vue';
|
||||
import ProjectStepper from '@/components/UI/project-stepper.vue';
|
||||
import infousercard from '@/components/UI/infousercard.vue';
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
import uf from '@/utils/universal_functions'
|
||||
|
||||
export default {
|
||||
|
||||
components: {
|
||||
FiltersBar,
|
||||
FInputSearch,
|
||||
rowPirow,
|
||||
RolesSingle,
|
||||
rolesMany,
|
||||
RowsAddremove,
|
||||
infousercard,
|
||||
ProjectStepper,
|
||||
|
||||
},
|
||||
|
||||
mixins: [validationMixin, uf],
|
||||
|
||||
data: () => ({
|
||||
|
||||
nameproj:'',
|
||||
|
||||
dialog_create_project: false,
|
||||
model:'',
|
||||
search: '',
|
||||
ws: null,
|
||||
projectid:null,
|
||||
superuser: false,
|
||||
childHeaders:[
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Ответственный", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
|
||||
],
|
||||
headers: [
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Руководитель", value:"user_project"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
{text:"Изменено", value: "lastchanged"},
|
||||
{text:"Выполнение", value: "bars"},
|
||||
],
|
||||
into_project: false,
|
||||
pagetitle:'',
|
||||
menu: false,
|
||||
childList:[],
|
||||
|
||||
parentList:[],
|
||||
person:{} ,
|
||||
|
||||
dialogdetail: false
|
||||
|
||||
|
||||
|
||||
}),
|
||||
|
||||
|
||||
|
||||
methods: {
|
||||
...globalstore.mapMutations(['set_assign_id']),
|
||||
...mapMutations(["setFields"]),
|
||||
...mapActions(["clear", "getFilters", "addFilter", "activefilters"]),
|
||||
...globalstore.mapGetters(["getassign_id"]),
|
||||
...projectstate.mapMutations(["setProject","setProjectusers"]),
|
||||
|
||||
createproj(){
|
||||
console.log('-----------dialog_create_project');
|
||||
this.dialog_create_project = true
|
||||
|
||||
// console.log(res, 'res');
|
||||
// this.$router.push(`/project/${res.data.id}`)
|
||||
|
||||
|
||||
|
||||
// console.log(`plok`, val);
|
||||
},
|
||||
|
||||
showuserinfo(val){
|
||||
|
||||
this.person = this.searchUser(val, this.getProject.users )
|
||||
this.dialogdetail=true
|
||||
},
|
||||
|
||||
async newproject(val) {
|
||||
|
||||
|
||||
// console.log(val)
|
||||
let res = await axiosInstance.post('/createproj',val)
|
||||
this.$router.push(`/project/${res.data.id}`)
|
||||
|
||||
},
|
||||
|
||||
|
||||
timediff(dateend) {
|
||||
return moment(dateend).isValid()? moment(dateend).locale('ru').fromNow(): 'Не установлен'
|
||||
},
|
||||
formatDate(date) {
|
||||
return (date && moment(date).isValid())? moment(date).format("DD.MM.YYYY"): ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
build(data) {
|
||||
|
||||
if (!this.into_project){
|
||||
if (data.payload.length>0){
|
||||
data.payload.forEach(el => {
|
||||
|
||||
el["completed"]= el.project_task.filter(el=>el.status.id==5).length
|
||||
el["all"]=el.project_task.length
|
||||
|
||||
});
|
||||
this.parentList= data.payload
|
||||
}
|
||||
else{
|
||||
this.parentList=[]
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
this.childList = data.child
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async updateData(){
|
||||
let payload=await this.activefilters()
|
||||
for (let key of Object.keys(payload))
|
||||
{
|
||||
if ( ['status__in','user_project__role__in'].includes(key)) {
|
||||
let arr=[]
|
||||
payload[key].forEach(el => {arr.push(el.id)
|
||||
|
||||
});
|
||||
payload[key]=arr
|
||||
}
|
||||
|
||||
}
|
||||
this.ws.send({"action": "getfilter", payload})
|
||||
// console.log(await this.activefilters());
|
||||
},
|
||||
|
||||
find_rp(arr){
|
||||
const rp = arr.find(el=>el.role.id==2)
|
||||
return rp==undefined?"Не назначен": rp.user.sn
|
||||
},
|
||||
|
||||
|
||||
|
||||
update(){
|
||||
console.log(`UPDATE`)
|
||||
|
||||
},
|
||||
titler(itname=""){
|
||||
if(this.$route.path=="/projects") {
|
||||
this.pagetitle= !this.into_project?"Проекты":`${itname}: Задачи`
|
||||
}else if(this.$route.path=="/tasks"){
|
||||
this.pagetitle= !this.into_project?"Задачи":`${itname}: Работы`
|
||||
}
|
||||
else if(this.$route.path=="/works"){
|
||||
this.pagetitle= !this.into_project?"Работы":`${itname}: Поручения`
|
||||
|
||||
}else{
|
||||
|
||||
this.pagetitle="Поручения"
|
||||
}
|
||||
},
|
||||
|
||||
toChild(item) {
|
||||
this.projectid = item.id
|
||||
this.into_project = true;
|
||||
|
||||
this.titler(item.name)
|
||||
this.childList=item.project_task
|
||||
// this.ws.conn.send(JSON.stringify({"action": "getchild","parent__type":this.$route.path.slice(1), "parent__id": item.id}))
|
||||
},
|
||||
|
||||
backParent() {
|
||||
this.into_project = false;
|
||||
this.titler()
|
||||
|
||||
},
|
||||
clickRow(e, row) {
|
||||
let path = this.$route.path
|
||||
let pusher={
|
||||
'/projects':[{name:"Task",'col':'id'},{name:"Project",'col':'id'} ],
|
||||
'/tasks':[{name:"Work",'col':'id'},{name:"Task",'col':'id'}],
|
||||
'/works':[{name:"Work",'col':'parent'},{name:"Work",'col':'id'}],
|
||||
'/assignments':[{name:"Work",'col':'parent'},{name:"Work",'col':'parent'}]
|
||||
}
|
||||
|
||||
let ind = this.into_project? 0:1
|
||||
// console.log("ssss",{ name: pusher[path][ind].name, params: { tid:row.item[pusher[path][ind].col]}});
|
||||
console.log("новый роут-----",row.item )
|
||||
let params = { id:row.item[pusher[path][ind].col]}
|
||||
if ((path=='/assignments' && ind==1) || (ind==0 && path=='/works')){
|
||||
|
||||
this.set_assign_id(row.item.id)
|
||||
// console.log(this.getassign_id());
|
||||
|
||||
this.$router.push({path:`/project/${row.item.project}/task/${row.item.task}/work/${row.item.work}`})
|
||||
}
|
||||
else if((ind==1 && path=='/works')||(ind==0 && path=='/tasks')){
|
||||
|
||||
this.$router.push({path:`/project/${row.item.project}/task/${row.item.task}/work/${row.item.id}`})
|
||||
}
|
||||
|
||||
else if((ind==1 && path=='/tasks')||(ind==0 && path=='/projects')){
|
||||
this.$router.push({path:`/project/${this.projectid}/task/${row.item.id}`})
|
||||
}
|
||||
else{
|
||||
this.$router.push({path:`/project/${row.item.id}`})
|
||||
}
|
||||
|
||||
// this.$router.push({ name: pusher[path][ind].name, params: params})
|
||||
|
||||
},
|
||||
wsconnect(){
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(`/reestr${this.$route.path}`);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data, "dataonmess");
|
||||
try{
|
||||
this[data.action](data);
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route(to, from){
|
||||
this.ws.stop()
|
||||
this.into_project=false
|
||||
this.childList=[]
|
||||
this.parentList=[]
|
||||
this.titler()
|
||||
this.wsconnect()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
mounted() {
|
||||
|
||||
console.log(`this.newproject`, this.newproject);
|
||||
|
||||
this.superuser = this.$store.getters['auth/getSuperUser']
|
||||
this.setFields({
|
||||
project__status: { module: "mult" },
|
||||
project__type: { module: "mult" },
|
||||
role:{module:"mult"}
|
||||
|
||||
});
|
||||
|
||||
this.getFilters([
|
||||
{role:{name:"role",sort:"id"}},
|
||||
{project__type:{sort: "id", filters:{},exclude:["projects"]}},
|
||||
{project__status:{name:"project__status", sort:"id", related_name: "name"}}], true).then(async (data) => {console.log(data,"data")})
|
||||
|
||||
this.wsconnect()
|
||||
this.titler()
|
||||
console.log(this.getProject);
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
this.ws.stop()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
.main-projects {
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
h4 {
|
||||
color: $bg-purple;
|
||||
|
||||
}
|
||||
|
||||
.task-table tbody tr:first-child td {
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
tbody {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table > thead > tr > th {
|
||||
font-weight: 600;
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr .dots-vertical i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr:hover .dots-vertical i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.grow-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.iconInline {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: 1%;
|
||||
top: 93%
|
||||
}
|
||||
.card-text {
|
||||
font-size: 14px!important;
|
||||
font-weight:400!important
|
||||
}
|
||||
.long div:nth-child(1) {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.cardwight {
|
||||
width: 81vw!important;
|
||||
}
|
||||
// tr:first-child
|
||||
// :nth-child(1)
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
Отчеты
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<template lang="">
|
||||
<div>
|
||||
Стратегии
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,445 @@
|
||||
<template>
|
||||
<work-task-ass-project
|
||||
:show_info="show_info"
|
||||
:cards="$options.name"
|
||||
:chatview="chatview"
|
||||
:show="show"
|
||||
@afterLeave="afterLeave"
|
||||
@afterEnter="afterEnter"
|
||||
@createnewWork="createnewWork"
|
||||
@allCard="allCard"
|
||||
:title="'Задача ' + gettasks.name"
|
||||
:breadcrumbs="breadcrumbs"
|
||||
>
|
||||
<template #spisok>
|
||||
|
||||
|
||||
<left-list
|
||||
:level="2"
|
||||
|
||||
@confirmation="confirmation"
|
||||
@rout="rout"
|
||||
/>
|
||||
<v-row class="flex-grow-0 ">
|
||||
<v-col class="pa-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 justify-end">
|
||||
<v-col class="flex-grow-0">
|
||||
<MyIco
|
||||
@click="gantviewer"
|
||||
size="large"
|
||||
icons = 'mdi-chart-gantt'
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-slide-x-reverse-transition>
|
||||
<v-card
|
||||
v-show="gantview"
|
||||
class="gantPosition"
|
||||
>
|
||||
<gant-task
|
||||
:startlevel="'task'"
|
||||
ref="ganttask"
|
||||
@saver = "addTask"
|
||||
@changegantview="changegantview"
|
||||
/>
|
||||
</v-card>
|
||||
</v-slide-x-reverse-transition>
|
||||
</template>
|
||||
<template #informations>
|
||||
<informationorders
|
||||
:chat="activedCh"
|
||||
:chatview="chatview"
|
||||
:indx="0"
|
||||
:level="2"
|
||||
@chatviewer="chatviewer"
|
||||
@createtabchat="createtabchat"
|
||||
@changestatus="changestatus"
|
||||
@confirmation="confirmation"
|
||||
:breadcrumbs="breadcrumbs"
|
||||
/>
|
||||
</template>
|
||||
<template #chat>
|
||||
<mMessegeListRight
|
||||
class="box2" v-show="Object.keys(activedCh).length>0"
|
||||
ref="mychat"
|
||||
:chatplace="'rightchat'"
|
||||
:header= false
|
||||
:chat="activedCh"
|
||||
:waiter="waiter"
|
||||
@waiting="waiter=true"
|
||||
/>
|
||||
</template>
|
||||
<template #filess>
|
||||
<filelist
|
||||
:files="task.task_files"
|
||||
:level="2"
|
||||
:status="task.status.id"
|
||||
:currentid="task.id"
|
||||
@uploadfile="uploadfile"
|
||||
@deletefile="deletefile"
|
||||
@VisSwitcher="VisSwitcher"
|
||||
/>
|
||||
</template>
|
||||
<template #graphic>
|
||||
<work-pie-chart
|
||||
:title="'Статусы работ в задаче'"
|
||||
:data="task_statuses_calc"
|
||||
/>
|
||||
</template>
|
||||
</work-task-ass-project>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { bus } from "@/main";
|
||||
import Cards from '@/components/UI/Cards.vue'
|
||||
import GantTask from '@/components/visual/GantTask.vue'
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import uf from '@/utils/universal_functions'
|
||||
import wtasp from '@/utils/wtasp' //Содержит функции для Project, Task, Work
|
||||
import filelist from '@/components/carddetails/files/filelist.vue';
|
||||
import informationorders from '../components/assignments/informationorders.vue';
|
||||
import mMessegeListRight from '@/components/supogramm/mess_layouts/m-messege-list-right.vue';
|
||||
import workPieChart from '@/components/UI/GRAPHICS/workPieChart.vue';
|
||||
import WorkTaskAssProject from './pattern/work-task-ass-project.vue';
|
||||
import LeftList from '@/components/carddetails/pattern/leftList.vue';
|
||||
const assignmentstate = createNamespacedHelpers("assignmentstate");
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
const taskstate = createNamespacedHelpers("taskstate");
|
||||
const workstate = createNamespacedHelpers("workstate");
|
||||
|
||||
export default {
|
||||
|
||||
name:"task",
|
||||
|
||||
mixins:[uf, wtasp],
|
||||
|
||||
components:{
|
||||
Cards,
|
||||
GantTask,
|
||||
filelist,
|
||||
informationorders,
|
||||
mMessegeListRight,
|
||||
workPieChart,
|
||||
WorkTaskAssProject,
|
||||
LeftList
|
||||
},
|
||||
|
||||
data(){
|
||||
return{
|
||||
waiter:false,
|
||||
activedCh: {},
|
||||
gantview:false,
|
||||
chatview:true,
|
||||
project:{
|
||||
name:"",
|
||||
status:{id:0,name:""},
|
||||
task:{name:"",datestart:"",dateend:"", responsible:{id:""}},
|
||||
users:[{role: {id: 0}, user:{id: 0}}]
|
||||
},
|
||||
breadcrumbs:[{href:'',disabled:true,text:""}],
|
||||
task:{name:"",task_work:[],datestart:"",dateend:"",responsible:{id:""},status:{id:0,name:""},description:""},
|
||||
show:true,
|
||||
level:2,
|
||||
workaccepted:0,
|
||||
executed: 0
|
||||
|
||||
}},
|
||||
|
||||
async mounted() {
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(this.$route.fullPath);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data, 'data');
|
||||
if ("action" in data) {
|
||||
try{
|
||||
this[data.action](data.payload)
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
else{console.log(data)}
|
||||
})
|
||||
},
|
||||
|
||||
computed:{
|
||||
...workstate.mapGetters(['getworks']),
|
||||
...taskstate.mapGetters(['gettasks']),
|
||||
...assignmentstate.mapGetters(['getAssignments']),
|
||||
...projectstate.mapGetters(["getProject","getprojectuniqueusers"]),
|
||||
|
||||
task_statuses_calc(){
|
||||
return this.pie_statuses_calc(this.task.task_work)
|
||||
},
|
||||
|
||||
// projectPopoject(){
|
||||
|
||||
// // let {name: nameup, dateend: dateendup, datestart: datestartup, users: usersup}={...this.project}
|
||||
// // let {name, dateend, datestart, responsible, status, description, comment}={...this.task}
|
||||
// this.project.responsible = this.project.users.find(e=>e.role.id==2).user
|
||||
// console.log({...this.task,parent:this.project, type:'Проект:', role: 'Руководитель проекта:'},"GHJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ")
|
||||
// return {...this.task,parent:this.project, type:'Проект:', role: 'Руководитель проекта:'}
|
||||
// },
|
||||
|
||||
},
|
||||
|
||||
methods:{
|
||||
...taskstate.mapMutations(["settasks"]),
|
||||
...projectstate.mapMutations(["setProject", "clearProject"]),
|
||||
renew(payload){
|
||||
this.ws.stop()
|
||||
console.log("aaaaad")
|
||||
this.ws.start(this.$route.fullPath);
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
changestatus(chang){
|
||||
let action = "taskstatus"
|
||||
let payload = {
|
||||
id: chang.val.id,
|
||||
status: chang.action,
|
||||
comment: chang.comment,
|
||||
h_action:chang.h_action
|
||||
}
|
||||
|
||||
// let check = this.getProject
|
||||
|
||||
|
||||
// payload['project_status_update'] = check.status.id ==3?true:false
|
||||
// payload['task_status_update']= this.task.status.id < 2 ?true:false
|
||||
|
||||
// if (this.tab>0){
|
||||
// payload['work_status_update']= this.work.status.id < 2 ? true:false
|
||||
// action = "assignmentstatus"
|
||||
// }
|
||||
this.ws.send({action,payload})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
changegantview(){
|
||||
this.gantview=false
|
||||
},
|
||||
|
||||
fileupdated(payload){
|
||||
let ind = this.task.task_files.findIndex(el=>el.id==payload.id)
|
||||
this.task.task_files[ind].visible=payload.visible.split("")
|
||||
|
||||
|
||||
},
|
||||
newmessageincome(payload){
|
||||
this.activedCh.lastmessage.push(payload)
|
||||
|
||||
this.$refs.mychat.scrollbottom(payload.id)
|
||||
},
|
||||
|
||||
rout(val) {
|
||||
this.$router.push({ path: `${this.$route.fullPath}/work/${val}` })
|
||||
},
|
||||
async uploadfile(formData){
|
||||
let fileinfo = {project:this.getProject.id, task:this.task.id, visible: '0100'}
|
||||
|
||||
// // Тут же заделаем потом на другие уровни - задачи и проекты
|
||||
formData.append('info', JSON.stringify(fileinfo))
|
||||
|
||||
let res = await axiosInstance.post( `/main/uploader`, formData,{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
if ("created" in res.data){
|
||||
this.ws.send({"action":"fileuploaded","payload":this.task.id})
|
||||
}
|
||||
|
||||
},
|
||||
filerenew(payload){
|
||||
|
||||
payload.forEach((el,index)=> payload[index].visible = el.visible.split("") )
|
||||
this.task.task_files = payload
|
||||
|
||||
},
|
||||
|
||||
|
||||
build(data){
|
||||
console.log("BUILD" ,data);
|
||||
data.task.task_files.forEach((el,index)=> data.task.task_files[index].visible =el.visible.split("") )
|
||||
|
||||
this.project = data.project
|
||||
this.task = data.task
|
||||
console.log('this.project',this.project);
|
||||
console.log('this.task',this.task);
|
||||
|
||||
this.setProject(this.project)
|
||||
this.breadcrumbs=[
|
||||
{ text: this.getProject.name, disabled: false, href: `/project/${this.getProject.id}` },
|
||||
]
|
||||
let wc = 0
|
||||
this.executed = data.task.task_work.filter(el=>el.status.id==5).length
|
||||
console.log(this.executed, 'this.executed');
|
||||
data.task.task_work.forEach(el=> {if(el.status.id==5) wc+=1} )
|
||||
this.workaccepted=wc/data.task.task_work.length*100
|
||||
this.settasks(data.task)
|
||||
|
||||
if("datachat" in data){
|
||||
this.activedCh = data.datachat
|
||||
this.chatview = "id" in this.activedCh
|
||||
this.$refs.mychat.scrollbottom(this.activedCh.lastmessage[this.activedCh.lastmessage.length-1].id)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
messagedeleted(payload){
|
||||
try{
|
||||
|
||||
// console.log(this.mychats[ind].lastmessage)
|
||||
let ind2=this.activedCh.lastmessage.findIndex(e=>e.id==payload.id)
|
||||
this.activedCh.lastmessage.splice(ind2,1)
|
||||
console.log(this.activedCh.lastmessage, "slice");}
|
||||
catch{
|
||||
|
||||
}
|
||||
|
||||
} ,
|
||||
|
||||
takeprev(payload){
|
||||
|
||||
// let ind = this.mychats.findIndex(el=>el.id==payload.chat)
|
||||
|
||||
if (this.activedCh.lastmessage.length<20){
|
||||
this.activedCh.lastmessage=payload.res
|
||||
this.activedCh.lastmessage=this.activedCh.lastmessage
|
||||
}
|
||||
else{
|
||||
this.activedCh.lastmessage = payload.res.concat(this.activedCh.lastmessage)
|
||||
}
|
||||
|
||||
|
||||
this.waiter=false
|
||||
|
||||
|
||||
},
|
||||
afterEnter(){
|
||||
console.log("@after-enter=")
|
||||
},
|
||||
|
||||
afterLeave(){
|
||||
console.log(`afterLeave`);
|
||||
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
|
||||
},
|
||||
|
||||
VisSwitcher(file){
|
||||
console.log("VisSwitcher", file)
|
||||
this.ws.send({"action":"updateFile","payload":{id:file.id,visible: file.visible.join("")}})
|
||||
},
|
||||
|
||||
rebuild(){
|
||||
this.ws.send({"action":"rebuild","payload": this.task.id})
|
||||
},
|
||||
filedeleted(payload){
|
||||
console.log("pl");
|
||||
let ind = this.task.task_files.findIndex(el=>el.id==payload.id)
|
||||
this.task.task_files.splice(ind,1)
|
||||
},
|
||||
chatviewer(){
|
||||
this.chatview=!this.chatview
|
||||
},
|
||||
|
||||
createtabchat(){
|
||||
let name = this.task.name
|
||||
let level = 2
|
||||
let parent = this.task.id
|
||||
let users = new Set()
|
||||
this.task.task_work.forEach(e=> users.add(e.responsible.id))
|
||||
users.add(this.task.responsible.id)
|
||||
bus.$emit("supogrammchatcreate",{users:Array.from(users),name, level,parent})
|
||||
},
|
||||
|
||||
async uploadfile(formData){
|
||||
let fileinfo = {project:this.getProject.id, task:this.task.id, visible: '0100'}
|
||||
// Тут же заделаем потом на другие уровни - задачи и проекты
|
||||
formData.append('info', JSON.stringify(fileinfo))
|
||||
let res = await axiosInstance.post( `/main/uploader`, formData,{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
if ("created" in res.data){
|
||||
this.ws.send({"action":"fileuploaded","payload":this.task.id})
|
||||
}
|
||||
},
|
||||
|
||||
createnewWork(){
|
||||
this.$refs.ganttask.createnewTask()
|
||||
},
|
||||
|
||||
gantviewer(){
|
||||
this.gantview=!this.gantview
|
||||
if (this.gantview) this.$refs.ganttask.rebuild()
|
||||
},
|
||||
|
||||
addTask(val){
|
||||
console.log(val);
|
||||
delete val.val.history
|
||||
this.ws.send({"action":val.am.method,"payload":val.val})
|
||||
},
|
||||
|
||||
confirmation(payload){
|
||||
this.task.task_work.forEach(el=> {
|
||||
el.menu=false
|
||||
el.action_confirm=false
|
||||
})
|
||||
payload['task_status_update'] = this.task.task_work.every(el=>{
|
||||
if(el.id==payload.id && payload.status==5){return true}
|
||||
else if(el.status.id==5){return true}
|
||||
return false
|
||||
})?
|
||||
{"res":true}:{'res':false}
|
||||
this.ws.send({"action":"confirmation","payload":payload})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearProject()
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.v-window, .v-window__container {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.theme--light .v-tabs-items {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.v-window-item {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,437 @@
|
||||
<template>
|
||||
<v-container class="flex-col h-100 w-100 projects" fluid>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<!-- -->
|
||||
<filters-bar
|
||||
@sendData="updateData"
|
||||
@clear="clear"
|
||||
class="pa-1 pb-3"
|
||||
|
||||
:header="pagetitle"
|
||||
>
|
||||
<template v-slot:filterslist>
|
||||
<f-input-search
|
||||
|
||||
:field="'name'"
|
||||
title="Название"
|
||||
></f-input-search>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__gte'"
|
||||
title="Срок начала с:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__lte'"
|
||||
title="Срок начала до:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__gte'"
|
||||
title="Срок окончания c:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__lte'"
|
||||
title="Срок окончания до:"
|
||||
|
||||
></f-daterange>
|
||||
|
||||
|
||||
<f-multi-select
|
||||
|
||||
:title="'Статус задачи'"
|
||||
:field="'task__status'"
|
||||
:disabled="false"
|
||||
></f-multi-select>
|
||||
<f-input-search
|
||||
|
||||
:field="'responsible'"
|
||||
title="Ответственный"
|
||||
></f-input-search>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
</filters-bar>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row class="mt-0 ">
|
||||
<v-col class="flex-col pa-1">
|
||||
<v-card class="flex-grow-1">
|
||||
|
||||
|
||||
|
||||
<v-data-table
|
||||
:fixed-header="true"
|
||||
@dblclick:row="clickRow"
|
||||
:disable-pagination="true"
|
||||
hide-default-footer
|
||||
:headers="!into_project?headers:childHeaders"
|
||||
:items="!into_project?parentList:childList"
|
||||
class="grow-table"
|
||||
>
|
||||
<template v-slot:[`item.link`]="{ item }">
|
||||
|
||||
|
||||
<v-icon v-if="!into_project && item.all>0" @click.stop="toChild(item)">mdi-chevron-right</v-icon>
|
||||
<v-icon v-else-if="into_project" @click.stop="backParent">mdi-chevron-left</v-icon>
|
||||
</template>
|
||||
|
||||
<!-- <template v-slot:[`item.user_project`]="{ item }">
|
||||
{{find_rp(item.user_project)}}
|
||||
</template> -->
|
||||
|
||||
|
||||
<template v-if="!into_project" v-slot:[`item.id`]="{ item }">
|
||||
{{item.parent.id}}-{{item.id}}
|
||||
</template>
|
||||
<template v-else v-slot:[`item.id`]="{ item }">
|
||||
{{projectid}}-{{taskid}}-{{item.id}}
|
||||
</template>
|
||||
|
||||
<template v-slot:[`item.dateend`]="{ item }">
|
||||
{{timediff(item.dateend) }}
|
||||
</template>
|
||||
<template v-slot:[`item.lastchanged`]="{ item }">
|
||||
{{formatDate(item.lastchanged) }}
|
||||
</template>
|
||||
<template v-slot:[`item.bars`]="{ item }">
|
||||
<div class="d-flex align-center">
|
||||
<template v-if="'completed' in item && item.all>0">
|
||||
<v-progress-linear style="width: 80%;" :value="item.completed/item.all*100" height="10" buffer-value="100"></v-progress-linear>
|
||||
<div class="ps-2">{{`${item.completed}/${item.all}`}}</div>
|
||||
</template>
|
||||
<div class="mx-auto" v-else><v-icon v-if="item.status__id==5" style="color:green">fa-solid fa-square-check</v-icon></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<v-menu offset-x left v-if="superuser">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
|
||||
<div v-bind="attrs"
|
||||
v-on="on"
|
||||
class="ms-2 dots-vertical">
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</div>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item><v-list-item-title>Удалить</v-list-item-title></v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<div v-else style="width: 32px;">
|
||||
|
||||
</div>
|
||||
<div @click.stop="menu" class="ps-2 dots-vertical"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-data-table>
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import moment from "moment"
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import FiltersBar from '../components/UI/FiltersBar.vue';
|
||||
import FInputSearch from '../components/UI/FInputSearch.vue';
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
export default {
|
||||
components: { FiltersBar, FInputSearch },
|
||||
data: () => ({
|
||||
model:'',
|
||||
search: '',
|
||||
ws: null,
|
||||
projectid:null,
|
||||
taskid:null,
|
||||
superuser: false,
|
||||
childHeaders:[
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Ответственный", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
|
||||
],
|
||||
headers: [
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Ответственный", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
{text:"Изменено", value: "lastchanged"},
|
||||
{text:"Выполнение", value: "bars"},
|
||||
],
|
||||
into_project: false,
|
||||
pagetitle:'',
|
||||
menu: false,
|
||||
childList:[],
|
||||
|
||||
parentList:[],
|
||||
|
||||
}),
|
||||
|
||||
methods: {
|
||||
...globalstore.mapMutations(['set_assign_id']),
|
||||
...mapMutations(["setFields"]),
|
||||
...mapActions(["clear", "getFilters", "addFilter", "activefilters"]),
|
||||
...globalstore.mapGetters(["getassign_id"]),
|
||||
// async createproj(){
|
||||
|
||||
// let res = await axiosInstance.post('/createproj')
|
||||
// console.log(res);
|
||||
// this.$router.push(`/project/${res.data.id}`)
|
||||
// },
|
||||
|
||||
|
||||
timediff(dateend) {
|
||||
return moment(dateend).isValid()? moment(dateend).locale('ru').fromNow(): 'Не установлен'
|
||||
},
|
||||
formatDate(date) {
|
||||
return (date && moment(date).isValid())? moment(date).format("DD.MM.YYYY"): ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
build(data) {
|
||||
|
||||
if (!this.into_project){
|
||||
if (data.payload.length>0){
|
||||
data.payload.forEach(el => {
|
||||
|
||||
el["completed"]= el.task_work.filter(el=>el.status.id==5).length
|
||||
el["all"]=el.task_work.length
|
||||
|
||||
});
|
||||
this.parentList= data.payload
|
||||
}
|
||||
else{
|
||||
this.parentList=[]
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
this.childList = data.child
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async updateData(){
|
||||
let payload=await this.activefilters()
|
||||
for (let key of Object.keys(payload))
|
||||
{
|
||||
if ( ['task__status__in'].includes(key)) {
|
||||
let arr=[]
|
||||
payload[key].forEach(el => {arr.push(el.id)
|
||||
|
||||
});
|
||||
payload['status__in']=arr
|
||||
delete payload[key]
|
||||
}
|
||||
|
||||
}
|
||||
this.into_project=false
|
||||
this.ws.send({"action": "getfilter", payload})
|
||||
// console.log(await this.activefilters());
|
||||
},
|
||||
|
||||
find_rp(arr){
|
||||
const rp = arr.find(el=>el.role.id==2)
|
||||
return rp==undefined?"Не назначен": rp.user.sn
|
||||
},
|
||||
|
||||
|
||||
|
||||
update(){
|
||||
console.log(`UPDATE`)
|
||||
|
||||
},
|
||||
titler(itname=""){
|
||||
if(this.$route.path=="/projects") {
|
||||
this.pagetitle= !this.into_project?"Проекты":`${itname}: Задачи`
|
||||
}else if(this.$route.path=="/tasks"){
|
||||
this.pagetitle= !this.into_project?"Задачи":`${itname}: Работы`
|
||||
}
|
||||
else if(this.$route.path=="/works"){
|
||||
this.pagetitle= !this.into_project?"Работы":`${itname}: Поручения`
|
||||
|
||||
}else{
|
||||
|
||||
this.pagetitle="Поручения"
|
||||
}
|
||||
},
|
||||
|
||||
toChild(item) {
|
||||
this.projectid= item.parent.id
|
||||
this.taskid = item.id
|
||||
this.into_project = true;
|
||||
|
||||
this.titler(item.name)
|
||||
this.childList=item.task_work
|
||||
// this.ws.conn.send(JSON.stringify({"action": "getchild","parent__type":this.$route.path.slice(1), "parent__id": item.id}))
|
||||
},
|
||||
|
||||
backParent() {
|
||||
this.into_project = false;
|
||||
this.titler()
|
||||
|
||||
},
|
||||
clickRow(e, row) {
|
||||
let path = this.$route.path
|
||||
let pusher={
|
||||
'/projects':[{name:"Task",'col':'id'},{name:"Project",'col':'id'} ],
|
||||
'/tasks':[{name:"Work",'col':'id'},{name:"Task",'col':'id'}],
|
||||
'/works':[{name:"Work",'col':'parent'},{name:"Work",'col':'id'}],
|
||||
'/assignments':[{name:"Work",'col':'parent'},{name:"Work",'col':'parent'}]
|
||||
}
|
||||
|
||||
let ind = this.into_project? 0:1
|
||||
// console.log("ssss",{ name: pusher[path][ind].name, params: { tid:row.item[pusher[path][ind].col]}});
|
||||
console.log("новый роут-----",row.item )
|
||||
let params = { id:row.item[pusher[path][ind].col]}
|
||||
|
||||
if(ind==0){
|
||||
this.$router.push({path:`/project/${this.projectid}/task/${this.taskid}/work/${row.item.id}`})
|
||||
}
|
||||
|
||||
|
||||
else{
|
||||
this.$router.push({path:`/project/${row.item.parent.id}/task/${row.item.id}`})
|
||||
}
|
||||
|
||||
// this.$router.push({ name: pusher[path][ind].name, params: params})
|
||||
|
||||
},
|
||||
wsconnect(){
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(`/reestr${this.$route.path}`);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data, "dataonmess");
|
||||
try{
|
||||
this[data.action](data);
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route(to, from){
|
||||
this.ws.stop()
|
||||
this.into_project=false
|
||||
this.childList=[]
|
||||
this.parentList=[]
|
||||
this.titler()
|
||||
this.wsconnect()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
mounted() {
|
||||
this.superuser = this.$store.getters['auth/getSuperUser']
|
||||
this.setFields({
|
||||
task__status: { module: "mult" },
|
||||
// role:{module:"mult"}
|
||||
|
||||
});
|
||||
|
||||
this.getFilters([
|
||||
// {role:{name:"role",sort:"id"}},
|
||||
{task__status:{name:"task__status", sort:"id", related_name: "name"}}], true).then(async (data) => {console.log(data,"data")})
|
||||
|
||||
this.wsconnect()
|
||||
this.titler()
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
this.ws.stop()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
.main-projects {
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
h4 {
|
||||
color: $bg-purple;
|
||||
|
||||
}
|
||||
|
||||
.task-table tbody tr:first-child td {
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
tbody {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table > thead > tr > th {
|
||||
font-weight: 600;
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr .dots-vertical i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr:hover .dots-vertical i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.grow-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.iconInline {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: 1%;
|
||||
top: 93%
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,627 @@
|
||||
<template>
|
||||
<work-task-ass-project
|
||||
:show_info="show_info"
|
||||
:cards="$options.name"
|
||||
:chatview="chatview"
|
||||
:show="show"
|
||||
:tabProj="'1'"
|
||||
@afterLeave="afterLeave"
|
||||
@afterEnter="afterEnter"
|
||||
@createnewass="createnewass"
|
||||
:title="work.name"
|
||||
@listchangetab="listchangetab"
|
||||
:breadcrumbs="breadcrumbs"
|
||||
@allCard="allCard"
|
||||
>
|
||||
<template #spisok>
|
||||
<left-list
|
||||
:level="3"
|
||||
@listchangetab="listchangetab"
|
||||
@confirmation="confirmation"
|
||||
/>
|
||||
<!-- :cardname="$options.name"
|
||||
:status="work.status.id"
|
||||
:itemList="work.work_assignment" -->
|
||||
<v-row class="flex-grow-0 ">
|
||||
<v-col class="pa-0">
|
||||
<v-divider/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 justify-end">
|
||||
<v-col class="flex-grow-0">
|
||||
<MyIco
|
||||
@click="gantviewer"
|
||||
icons = 'mdi-chart-gantt'
|
||||
size="large"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<!-- <MyIco
|
||||
@click="hello"
|
||||
icons = 'mdi-chart-gantt'
|
||||
/> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-slide-x-reverse-transition>
|
||||
<v-card
|
||||
v-show="gantview"
|
||||
class="gantPosition"
|
||||
>
|
||||
<gant-work
|
||||
class="pa-1"
|
||||
:startlevel="'work'"
|
||||
ref="gantwork"
|
||||
@saver="gantsaver"
|
||||
@changetab="changetab"
|
||||
@changegantview="changegantview"
|
||||
/>
|
||||
</v-card>
|
||||
</v-slide-x-reverse-transition>
|
||||
</template>
|
||||
|
||||
<template #informations>
|
||||
<informationorders
|
||||
:chat="activedCh"
|
||||
:chatview="chatview"
|
||||
:indx="tab"
|
||||
:level="tab==0?3:4"
|
||||
|
||||
@changetab="changetab"
|
||||
@chatviewer="chatviewer"
|
||||
@createtabchat="createtabchat"
|
||||
@changestatus="changestatus"
|
||||
@listchangetab="listchangetab"
|
||||
:breadcrumbs="breadcrumbs"
|
||||
/>
|
||||
</template>
|
||||
<!-- :levelup="task"
|
||||
:level="fullinfo[tab]" -->
|
||||
<!-- :chat="activedCh"
|
||||
:chatview="chatview"
|
||||
:val="fullinfo[tab]"
|
||||
:task="task"
|
||||
|
||||
:workaccepted="workaccepted"
|
||||
@changestatus="changestatus"
|
||||
@createtabchat="createtabchat"
|
||||
@chatviewer="chatviewer" -->
|
||||
<template #chat>
|
||||
|
||||
<mMessegeListRight
|
||||
class="box2" v-show="Object.keys(activedCh).length>0"
|
||||
ref="mychat"
|
||||
:chatplace="'rightchat'"
|
||||
:header= false
|
||||
:chat="activedCh"
|
||||
:waiter="waiter"
|
||||
@waiting="waiter=true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #filess>
|
||||
<filelist
|
||||
:files="work.work_files"
|
||||
:level="level"
|
||||
:status="work.status.id"
|
||||
:currentid="[work,...work.work_assignment][tab].id"
|
||||
@uploadfile="uploadfile"
|
||||
@deletefile="deletefile"
|
||||
@VisSwitcher="VisSwitcher"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #graphic>
|
||||
<work-pie-chart
|
||||
:title="'Статусы поручений в работе'"
|
||||
:data="ass_statuses_calc"
|
||||
/>
|
||||
|
||||
|
||||
</template>
|
||||
<v-dialog
|
||||
overlay-opacity= ".1"
|
||||
v-model="delete_dialog"
|
||||
max-width="490px"
|
||||
>
|
||||
<DialogNewAssigment
|
||||
text="Удалить поручение"
|
||||
>
|
||||
<template #textarea>
|
||||
<delAssigment/>
|
||||
</template>
|
||||
<template #btn1>
|
||||
<v-btn
|
||||
color="green darken-1"
|
||||
text
|
||||
@click="delete_dialog = false"
|
||||
>
|
||||
Отменить
|
||||
</v-btn>
|
||||
</template>
|
||||
<template #btn2>
|
||||
<v-btn
|
||||
color="green darken-1"
|
||||
text
|
||||
@click="assignment_del_run"
|
||||
>
|
||||
Удалить
|
||||
</v-btn>
|
||||
</template>
|
||||
</DialogNewAssigment>
|
||||
</v-dialog>
|
||||
</work-task-ass-project>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GantWork from '@/components/visual/GantWork.vue'
|
||||
import moment from "moment";
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
import informationorders from '@/components/assignments/informationorders.vue';
|
||||
import filelist from '@/components/carddetails/files/filelist.vue';
|
||||
import assignment from '@/components/assignments/assignment.vue';
|
||||
import { bus } from "@/main";
|
||||
import mMessegeListRight from '@/components/supogramm/mess_layouts/m-messege-list-right.vue';
|
||||
import uf from '@/utils/universal_functions'
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
const assignmentstate = createNamespacedHelpers("assignmentstate");
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
const taskstate = createNamespacedHelpers("taskstate");
|
||||
const workstate = createNamespacedHelpers("workstate");
|
||||
|
||||
const { mapGetters } = createNamespacedHelpers("auth");
|
||||
|
||||
import delAssigment from '@/components/dialog/fill/del-assigment.vue';
|
||||
import Postpone from '../components/dialog/fill/postpone.vue';
|
||||
import workPieChart from '@/components/UI/GRAPHICS/workPieChart.vue';
|
||||
import WorkTaskAssProject from './pattern/work-task-ass-project.vue';
|
||||
import LeftList from '@/components/carddetails/pattern/leftList.vue';
|
||||
import wtasp from '@/utils/wtasp' //Содержит функции для Project, Task, Work
|
||||
|
||||
export default {
|
||||
|
||||
name:"work",
|
||||
|
||||
mixins:[uf, wtasp],
|
||||
|
||||
components:
|
||||
{
|
||||
GantWork,
|
||||
informationorders,
|
||||
assignment,
|
||||
mMessegeListRight,
|
||||
filelist,
|
||||
delAssigment,
|
||||
Postpone,
|
||||
workPieChart,
|
||||
WorkTaskAssProject,
|
||||
LeftList
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
|
||||
myid:null,
|
||||
currentid:0,
|
||||
waiter:false,
|
||||
delete_dialog:false,
|
||||
assign_del_id: null,
|
||||
activedCh: {},
|
||||
chatview:true,
|
||||
gantview: false,
|
||||
breadcrumbs:[{href:'',disabled:true,text:""}],
|
||||
comment:"",
|
||||
// workaccepted:0,
|
||||
level:3,
|
||||
task:{name:"",task_work:[],datestart:"",dateend:"",responsible:{id:""},status:{id:0,name:""},description:""},
|
||||
show:true,
|
||||
tab: 0,
|
||||
nedotab: 0,
|
||||
ws:null,
|
||||
work: {name:"", parent:{name:""}, status:{name:""}, comment:[],
|
||||
responsible:{fullname:"", position:{name:""}},
|
||||
work_assignment:[{name:"", status:{name:""},comment:[],
|
||||
author:{fullname:"", position:{name:""}},
|
||||
responsible:{fullname:"", position:{name:""}}}]
|
||||
}
|
||||
}),
|
||||
|
||||
computed: {
|
||||
...mapGetters(["getUser", "getDrawUser"]),
|
||||
...globalstore.mapGetters(["getassign_id"]),
|
||||
|
||||
fullinfo(){
|
||||
return [this.work,...this.work.work_assignment]
|
||||
},
|
||||
|
||||
ass_statuses_calc(){
|
||||
return this.pie_statuses_calc(this.work.work_assignment)
|
||||
},
|
||||
|
||||
// cardinfo(){
|
||||
// if(this.tab==0){
|
||||
// return {...this.work,parent:this.task, type:'Задача:', role: 'Ответсвенный:'}
|
||||
// } else{
|
||||
// let assignment = this.work.work_assignment.find(t=>t.id == this.currentid)
|
||||
// return {...assignment,parent:this.work, type:'Работа:', role: 'Ответсвенный:'}
|
||||
// }
|
||||
|
||||
// },
|
||||
|
||||
},
|
||||
|
||||
|
||||
mounted(){
|
||||
moment.locales('ru')
|
||||
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(this.$route.fullPath);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
|
||||
if ("action" in data) {
|
||||
try{
|
||||
this[data.action](data.payload)
|
||||
}catch(e){console.log(e)
|
||||
console.log(data.action)
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log(data)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
methods:{
|
||||
...globalstore.mapMutations(['set_assign_id']),
|
||||
...projectstate.mapMutations(["setProject", "clearProject"]),
|
||||
...projectstate.mapGetters(["getProject","getprojectuniqueusers"]),
|
||||
...workstate.mapGetters(['getworks']),
|
||||
...workstate.mapMutations(["setWorks"]),
|
||||
...taskstate.mapMutations(["settasks"]),
|
||||
...assignmentstate.mapGetters(['getAssignments','getAssignmentdatestart','getAssignmentdateend']),
|
||||
|
||||
newmessageincome(payload){
|
||||
console.log(`payload`, payload);
|
||||
let index = this.mychats.findIndex(el=> el.id == payload.chat.id)
|
||||
if (this.mychats[index].lastmessage.length==0 || this.mychats[index].lastmessage[this.mychats[index].lastmessage.length-1].id!=payload.id)
|
||||
{this.mychats[index].lastmessage.push(payload)}
|
||||
this.$refs.mychat.scrollbottom(payload.id)
|
||||
},
|
||||
|
||||
filerenew(payload){
|
||||
payload.forEach((el,index)=> payload[index].visible =el.visible.split("") )
|
||||
this.work.work_files = payload
|
||||
},
|
||||
|
||||
fileupdated(payload){
|
||||
let ind = this.work.work_files.findIndex(el=>el.id==payload.id)
|
||||
this.work.work_files[ind].visible=payload.visible.split("")
|
||||
},
|
||||
|
||||
takeprev(payload){
|
||||
let ind = this.mychats.findIndex(el=>el.id==payload.chat)
|
||||
if (this.mychats[ind].lastmessage.length<20){
|
||||
this.mychats[ind].lastmessage=payload.res
|
||||
this.mychats[ind].lastmessage=this.mychats[ind].lastmessage
|
||||
}
|
||||
else{
|
||||
this.mychats[ind].lastmessage = payload.res.concat(this.mychats[ind].lastmessage)
|
||||
}
|
||||
this.waiter=false
|
||||
},
|
||||
|
||||
messagedeleted(payload){
|
||||
try{
|
||||
let ind = this.mychats.findIndex(e=>e.id==payload.chat)
|
||||
let ind2=this.mychats[ind].lastmessage.findIndex(e=>e.id==payload.id)
|
||||
this.mychats[ind].lastmessage.splice(ind2,1)
|
||||
console.log(this.mychats[ind].lastmessage, "slice");}
|
||||
catch{}
|
||||
} ,
|
||||
|
||||
assupdate(payload){
|
||||
if(payload.bigbuild){
|
||||
this.rebuild()
|
||||
}
|
||||
let ind = this.work.work_assignment.findIndex(el=>el.id==payload.assignment.id)
|
||||
for (let [key,val] of Object.entries(payload.assignment))
|
||||
{
|
||||
this.work.work_assignment[ind][key]=val
|
||||
}
|
||||
},
|
||||
|
||||
tab0update(payload){
|
||||
this.work.status = payload.status
|
||||
},
|
||||
|
||||
renew(payload){
|
||||
this.ws.stop()
|
||||
console.log("aaaaad")
|
||||
this.ws.start(this.$route.fullPath);
|
||||
this.activeChat()
|
||||
},
|
||||
|
||||
filedeleted(payload){
|
||||
console.log("pl");
|
||||
let ind = this.work.work_files.findIndex(el=>el.id==payload.id)
|
||||
this.work.work_files.splice(ind,1)
|
||||
},
|
||||
|
||||
listchangetab(tab){
|
||||
if (this.tab!=Number(tab)) {
|
||||
this.show = false
|
||||
this.nedotab=Number(tab)
|
||||
|
||||
|
||||
|
||||
}
|
||||
this.afterLeave()
|
||||
this.level=this.tab==0?3:4
|
||||
|
||||
},
|
||||
|
||||
|
||||
afterEnter(){
|
||||
console.log("@after-enter=")
|
||||
},
|
||||
afterLeave(){
|
||||
|
||||
this.tab=this.nedotab
|
||||
console.log(`afterLeave`,this.tab, this.work);
|
||||
|
||||
this.currentid = this.tab==0?this.work.id:this.work.work_assignment[this.tab-1].id
|
||||
|
||||
this.activeChat()
|
||||
this.show=true
|
||||
this.breadcrumbsBuildier()
|
||||
},
|
||||
|
||||
createnewass(){
|
||||
this.$refs.gantwork.createAssignment()
|
||||
},
|
||||
|
||||
changegantview(){
|
||||
this.gantview=false
|
||||
},
|
||||
chatviewer(){
|
||||
|
||||
this.chatview=!this.chatview
|
||||
},
|
||||
|
||||
createtabchat(){
|
||||
let name = this.work.name
|
||||
let level = 3
|
||||
let parent = this.work.id
|
||||
let users = new Set()
|
||||
if (this.tab==0){
|
||||
this.work.work_assignment.forEach(e=> users.add(e.responsible.id).add(e.author.id))
|
||||
users.add(this.work.responsible.id)
|
||||
}
|
||||
|
||||
else{
|
||||
level = 4
|
||||
parent=this.fullinfo[this.tab].id
|
||||
users.add(this.fullinfo[this.tab].responsible.id).add(this.fullinfo[this.tab].author.id)
|
||||
name =this.fullinfo[this.tab].name
|
||||
|
||||
}
|
||||
this.chatview=true
|
||||
bus.$emit("supogrammchatcreate",{users:Array.from(users),name, level,parent})
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
gantviewer(){
|
||||
this.gantview=!this.gantview
|
||||
if (this.gantview) this.$refs.gantwork.rebuild()
|
||||
},
|
||||
|
||||
|
||||
changetab(id){
|
||||
let tab=this.work.work_assignment.findIndex(el=>el.id==id)+1
|
||||
this.listchangetab(tab)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
gantsaver(val){
|
||||
delete val.val.history
|
||||
this.ws.send({"action":val.am.method,"payload":val.val})
|
||||
// this.set
|
||||
},
|
||||
|
||||
changestatus(chang){
|
||||
console.log(chang);
|
||||
let action = "workstatus"
|
||||
let payload = {
|
||||
id: chang.val.id,
|
||||
status: chang.action,
|
||||
comment: chang.comment,
|
||||
ididit:chang.ididit,
|
||||
h_action:chang.h_action
|
||||
|
||||
}
|
||||
|
||||
let check = this.getProject()
|
||||
|
||||
|
||||
payload['project_status_update'] = check.status.id ==3?true:false
|
||||
payload['task_status_update']= this.task.status.id < 2 ?true:false
|
||||
|
||||
if (this.tab>0){
|
||||
payload['work_status_update']= this.work.status.id < 2 ? true:false
|
||||
action = "assignmentstatus"
|
||||
}
|
||||
this.ws.send({action,payload})
|
||||
},
|
||||
|
||||
|
||||
|
||||
build(payload){
|
||||
console.log(payload);
|
||||
if ("project" in payload) this.setProject(payload.project)
|
||||
this.myid=null!= this.getassign_id? this.getassign_id.id:null
|
||||
this.set_assign_id(null)
|
||||
|
||||
let wc = 0
|
||||
payload.work.work_files.forEach((el,index)=> payload.work.work_files[index].visible =el.visible.split("") )
|
||||
|
||||
this.setWorks(payload.work)
|
||||
this.work = this.getworks()
|
||||
|
||||
this.task = payload.task
|
||||
this.settasks(payload.task)
|
||||
console.log(`------------------fullinfo`, this.fullinfo, this.tab);
|
||||
|
||||
if (this.myid!=null) this.changetab(this.myid)
|
||||
this.currentid = this.tab==0?this.work.id:this.work.work_assignment[this.tab-1].id
|
||||
this.breadcrumbsBuildier()
|
||||
|
||||
this.mychats = payload["datachat"]
|
||||
this.activeChat()
|
||||
this.level=this.tab==0?3:4
|
||||
|
||||
},
|
||||
|
||||
breadcrumbsBuildier(){
|
||||
this.breadcrumbs=[
|
||||
{ text: this.getProject().name, disabled: false, href: `/project/${this.getProject().id}` },
|
||||
{ text: this.task.name, disabled: false, href: `/project/${this.getProject().id}/task/${this.task.id}` }]
|
||||
if (this.tab>0)this.breadcrumbs.push( { text: this.work.name, disabled: false, href: `` }, )
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
activeChat(){
|
||||
let level = this.tab==0?3:4
|
||||
console.log(this.currentid,"currentid");
|
||||
try{
|
||||
this.activedCh = this.mychats.find(e=> e.parent == this.currentid && e.level ==level)
|
||||
console.log("измененный чат",this.activedCh);
|
||||
if (this.activedCh.lastmessage.length>0)
|
||||
{this.$refs.mychat.scrollbottom(this.activedCh.lastmessage[this.activedCh.lastmessage.length-1].id)}
|
||||
// console.log(this.activedCh,"actived");
|
||||
}
|
||||
catch{
|
||||
this.activedCh ={}
|
||||
}
|
||||
this.chatview="id" in this.activedCh
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
confirmation(payload){
|
||||
|
||||
this.work.work_assignment.forEach(el=> {
|
||||
|
||||
el.menu=false
|
||||
el.action_confirm=false})
|
||||
payload['work_status_update'] = this.work.work_assignment.every(el=>{ if(el.id==payload.id && payload.status==5){return true}
|
||||
else if(el.status.id==5){return true}
|
||||
return false
|
||||
|
||||
})
|
||||
?
|
||||
{"res":true,"project":this.getProject().id}:{'res':false}
|
||||
this.ws.send({"action":"confirmation","payload":payload})
|
||||
|
||||
|
||||
},
|
||||
|
||||
VisSwitcher(file){
|
||||
|
||||
|
||||
this.ws.send({"action":"updateFile","payload":{id:file.id,visible: file.visible.join("")}})
|
||||
|
||||
},
|
||||
|
||||
assignment_del_run(){
|
||||
|
||||
|
||||
this.ws.send({"action":"delasygmnt","payload":this.assign_del_id})
|
||||
this.assign_del_id=null
|
||||
this.delete_dialog=false
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rebuild(){
|
||||
|
||||
|
||||
this.ws.send({"action":"rebuild","payload": this.work.id})
|
||||
},
|
||||
|
||||
|
||||
async uploadfile(formData){
|
||||
let fileinfo = {project:this.getProject().id, work:this.work.id, task:this.work.parent.id, visible: '0010'}
|
||||
if (this.tab>0){
|
||||
fileinfo['assignment']=this.work.work_assignment[this.tab-1].id
|
||||
fileinfo.visible='0001'
|
||||
}
|
||||
// Тут же заделаем потом на другие уровни - задачи и проекты
|
||||
formData.append('info', JSON.stringify(fileinfo))
|
||||
|
||||
let res = await axiosInstance.post( `/main/uploader`, formData,{
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
if ("created" in res.data){
|
||||
this.ws.send({"action":"fileuploaded","payload":this.work.id})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} ,
|
||||
beforeDestroy() {
|
||||
this.clearProject()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
|
||||
.v-window, .v-window__container {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
|
||||
.theme--light .v-tabs-items {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.v-window-item {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,449 @@
|
||||
<template>
|
||||
<v-container class="flex-col h-100 w-100 projects" fluid>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<!-- -->
|
||||
<filters-bar
|
||||
@sendData="updateData"
|
||||
@clear="clear"
|
||||
class="pa-1 pb-3"
|
||||
|
||||
:header="pagetitle"
|
||||
>
|
||||
<template v-slot:filterslist>
|
||||
<f-input-search
|
||||
|
||||
:field="'name'"
|
||||
title="Название"
|
||||
></f-input-search>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__gte'"
|
||||
title="Срок начала с:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'datestart__lte'"
|
||||
title="Срок начала до:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__gte'"
|
||||
title="Срок окончания c:"
|
||||
|
||||
></f-daterange>
|
||||
<f-daterange
|
||||
|
||||
:field="'dateend__lte'"
|
||||
title="Срок окончания до:"
|
||||
|
||||
></f-daterange>
|
||||
|
||||
|
||||
<f-multi-select
|
||||
|
||||
:title="'Статус'"
|
||||
:field="'work__status'"
|
||||
:disabled="false"
|
||||
></f-multi-select>
|
||||
<f-input-search
|
||||
|
||||
:field="'responsible__sn'"
|
||||
title="Фамилия Ответственного"
|
||||
></f-input-search>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
</filters-bar>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row class="mt-0 ">
|
||||
<v-col class="flex-col pa-1">
|
||||
<v-card class="flex-grow-1">
|
||||
|
||||
<div class="mt-3 iconInline">
|
||||
<BtnsOut
|
||||
v-if="pagetitle=='Проекты'"
|
||||
:widthi=140
|
||||
:icon = true
|
||||
title = "Создать проект"
|
||||
|
||||
@click="createproj"
|
||||
color="open_icons"
|
||||
>
|
||||
|
||||
</BtnsOut>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<v-data-table
|
||||
:fixed-header="true"
|
||||
@dblclick:row="clickRow"
|
||||
:disable-pagination="true"
|
||||
hide-default-footer
|
||||
:headers="!into_project?headers:childHeaders"
|
||||
:items="!into_project?parentList:childList"
|
||||
class="grow-table"
|
||||
>
|
||||
<template v-slot:[`item.link`]="{ item }">
|
||||
|
||||
|
||||
<v-icon v-if="!into_project && item.all>0" @click.stop="toChild(item)">mdi-chevron-right</v-icon>
|
||||
<v-icon v-else-if="into_project" @click.stop="backParent">mdi-chevron-left</v-icon>
|
||||
</template>
|
||||
|
||||
<!-- <template v-slot:[`item.user_project`]="{ item }">
|
||||
{{find_rp(item.user_project)}}
|
||||
</template> -->
|
||||
<template v-if="!into_project" v-slot:[`item.id`]="{ item }">
|
||||
{{item.parent.parent.id}}-{{item.parent.id}}-{{item.id}}
|
||||
</template>
|
||||
|
||||
<template v-else v-slot:[`item.id`]="{ item }">
|
||||
{{projectid}}-{{taskid}}-{{workid}}-{{item.id}}
|
||||
</template>
|
||||
|
||||
<template v-slot:[`item.dateend`]="{ item }">
|
||||
{{timediff(item.dateend) }}
|
||||
</template>
|
||||
<template v-slot:[`item.lastchanged`]="{ item }">
|
||||
{{formatDate(item.lastchanged) }}
|
||||
</template>
|
||||
<template v-slot:[`item.bars`]="{ item }">
|
||||
<div class="d-flex align-center">
|
||||
<template v-if="'completed' in item && item.all>0">
|
||||
<v-progress-linear style="width: 80%;" :value="item.completed/item.all*100" height="10" buffer-value="100"></v-progress-linear>
|
||||
<div class="ps-2">{{`${item.completed}/${item.all}`}}</div>
|
||||
</template>
|
||||
<div class="mx-auto" v-else><v-icon v-if="item.status__id==5" style="color:green">fa-solid fa-square-check</v-icon></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<v-menu offset-x left v-if="superuser">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
|
||||
<div v-bind="attrs"
|
||||
v-on="on"
|
||||
class="ms-2 dots-vertical">
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</div>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item><v-list-item-title>Удалить</v-list-item-title></v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<div v-else style="width: 32px;">
|
||||
|
||||
</div>
|
||||
<div @click.stop="menu" class="ps-2 dots-vertical"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-data-table>
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import moment from "moment"
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import FiltersBar from '../components/UI/FiltersBar.vue';
|
||||
import FInputSearch from '../components/UI/FInputSearch.vue';
|
||||
import {axiosInstance} from '@/utils/api'
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
export default {
|
||||
components: { FiltersBar, FInputSearch },
|
||||
data: () => ({
|
||||
model:'',
|
||||
search: '',
|
||||
ws: null,
|
||||
projectid:null,
|
||||
taskid:null,
|
||||
workid:null,
|
||||
superuser: false,
|
||||
childHeaders:[
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Исполнитель", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
|
||||
],
|
||||
headers: [
|
||||
{text: " ", value: "link"},
|
||||
{text:"Код",value:"id"},
|
||||
|
||||
{text:"Название", value: "name"},
|
||||
{text:"Ответственный", value:"responsible.sn"},
|
||||
{text:"Срок", value: "dateend"},
|
||||
{text:"Статус", value: "status.name"},
|
||||
{text:"Изменено", value: "lastchanged"},
|
||||
{text:"Выполнение", value: "bars"},
|
||||
],
|
||||
into_project: false,
|
||||
pagetitle:'',
|
||||
menu: false,
|
||||
childList:[],
|
||||
|
||||
parentList:[],
|
||||
|
||||
}),
|
||||
|
||||
methods: {
|
||||
...globalstore.mapMutations(['set_assign_id']),
|
||||
...mapMutations(["setFields"]),
|
||||
...mapActions(["clear", "getFilters", "addFilter", "activefilters"]),
|
||||
...globalstore.mapGetters(["getassign_id"]),
|
||||
async createproj(){
|
||||
|
||||
let res = await axiosInstance.post('/createproj')
|
||||
console.log(res);
|
||||
this.$router.push(`/project/${res.data.id}`)
|
||||
},
|
||||
|
||||
|
||||
timediff(dateend) {
|
||||
return moment(dateend).isValid()? moment(dateend).locale('ru').fromNow(): 'Не установлен'
|
||||
},
|
||||
formatDate(date) {
|
||||
return (date && moment(date).isValid())? moment(date).format("DD.MM.YYYY"): ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
build(data) {
|
||||
|
||||
if (!this.into_project){
|
||||
if (data.payload.length>0){
|
||||
data.payload.forEach(el => {
|
||||
|
||||
el["completed"]= el.work_assignment.filter(el=>el.status.id==5).length
|
||||
el["all"]=el.work_assignment.length
|
||||
|
||||
});
|
||||
this.parentList= data.payload
|
||||
}
|
||||
else{
|
||||
this.parentList=[]
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
this.childList = data.child
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async updateData(){
|
||||
let payload=await this.activefilters()
|
||||
for (let key of Object.keys(payload))
|
||||
{
|
||||
if ( ['work__status__in'].includes(key)) {
|
||||
let arr=[]
|
||||
payload[key].forEach(el => {arr.push(el.id)
|
||||
|
||||
});
|
||||
payload['status__in']=arr
|
||||
delete payload[key]
|
||||
}
|
||||
|
||||
}
|
||||
this.ws.send({"action": "getfilter", payload})
|
||||
// console.log(await this.activefilters());
|
||||
},
|
||||
|
||||
find_rp(arr){
|
||||
const rp = arr.find(el=>el.role.id==2)
|
||||
return rp==undefined?"Не назначен": rp.user.sn
|
||||
},
|
||||
|
||||
|
||||
|
||||
update(){
|
||||
console.log(`UPDATE`)
|
||||
|
||||
},
|
||||
titler(itname=""){
|
||||
if(this.$route.path=="/projects") {
|
||||
this.pagetitle= !this.into_project?"Проекты":`${itname}: Задачи`
|
||||
}else if(this.$route.path=="/tasks"){
|
||||
this.pagetitle= !this.into_project?"Задачи":`${itname}: Работы`
|
||||
}
|
||||
else if(this.$route.path=="/works"){
|
||||
this.pagetitle= !this.into_project?"Работы":`${itname}: Поручения`
|
||||
|
||||
}else{
|
||||
|
||||
this.pagetitle="Поручения"
|
||||
}
|
||||
},
|
||||
|
||||
toChild(item) {
|
||||
[this.projectid,this.taskid,this.workid]=[item.parent.parent.id,item.parent.id,item.id]
|
||||
this.into_project = true;
|
||||
|
||||
this.titler(item.name)
|
||||
this.childList=item.work_assignment
|
||||
// this.ws.conn.send(JSON.stringify({"action": "getchild","parent__type":this.$route.path.slice(1), "parent__id": item.id}))
|
||||
},
|
||||
|
||||
backParent() {
|
||||
this.into_project = false;
|
||||
this.titler()
|
||||
|
||||
},
|
||||
clickRow(e, row) {
|
||||
let path = this.$route.path
|
||||
let pusher={
|
||||
'/projects':[{name:"Task",'col':'id'},{name:"Project",'col':'id'} ],
|
||||
'/tasks':[{name:"Work",'col':'id'},{name:"Task",'col':'id'}],
|
||||
'/works':[{name:"Work",'col':'parent'},{name:"Work",'col':'id'}],
|
||||
'/assignments':[{name:"Work",'col':'parent'},{name:"Work",'col':'parent'}]
|
||||
}
|
||||
|
||||
let ind = this.into_project? 0:1
|
||||
// console.log("ssss",{ name: pusher[path][ind].name, params: { tid:row.item[pusher[path][ind].col]}});
|
||||
console.log("новый роут-----",row.item )
|
||||
let params = { id:row.item[pusher[path][ind].col]}
|
||||
|
||||
if(ind==1){
|
||||
|
||||
this.$router.push({path:`/project/${row.item.parent.parent.id}/task/${row.item.parent.id}/work/${row.item.id}`})
|
||||
}
|
||||
|
||||
else if(ind==0 ){
|
||||
this.$router.push({path:`/project/${this.projectid}/task/${this.taskid}/work/${row.item.id}`})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
wsconnect(){
|
||||
this.ws = new this.$pws()
|
||||
this.ws.start(`/reestr${this.$route.path}`);
|
||||
this.ws.addEvent('onmessage', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data, "dataonmess");
|
||||
try{
|
||||
this[data.action](data);
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route(to, from){
|
||||
this.ws.stop()
|
||||
this.into_project=false
|
||||
this.childList=[]
|
||||
this.parentList=[]
|
||||
this.titler()
|
||||
this.wsconnect()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
mounted() {
|
||||
|
||||
this.superuser = this.$store.getters['auth/getSuperUser']
|
||||
this.setFields({
|
||||
work__status: { module: "mult" },
|
||||
// role:{module:"mult"}
|
||||
|
||||
});
|
||||
|
||||
this.getFilters([
|
||||
|
||||
{work__status:{name:"work__status", sort:"id", related_name: "name"}}], true).then(async (data) => {console.log(data,"data")})
|
||||
|
||||
this.wsconnect()
|
||||
this.titler()
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
this.ws.stop()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
.main-projects {
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
@import "@/utils/colors.scss";
|
||||
|
||||
h4 {
|
||||
color: $bg-purple;
|
||||
|
||||
}
|
||||
|
||||
.task-table tbody tr:first-child td {
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
tbody {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table > thead > tr > th {
|
||||
font-weight: 600;
|
||||
|
||||
color: $color-main;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr .dots-vertical i {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.main-projects .theme--light.v-data-table > .v-data-table__wrapper > table tr:hover .dots-vertical i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.grow-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.iconInline {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
left: 1%;
|
||||
top: 93%
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<v-card
|
||||
|
||||
>
|
||||
<v-stepper v-model="e1" >
|
||||
<v-row class="ma-0 justify-content-end">
|
||||
<div class="align-self-center positionname flex-col flex-grow-1">
|
||||
<span class="px-0 pb-0 hstep text-center text-subtitle-1 font-weight-medium text-uppercase texthead--text">
|
||||
{{name.length?name:"Новый проект"}}
|
||||
</span>
|
||||
</div>
|
||||
<v-col class="flex-grow-0 ">
|
||||
<MyIco
|
||||
@click="$emit('closes')"
|
||||
icons = 'mdi-close-thick'
|
||||
color="close_icons"
|
||||
size="small"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row class="ma-0">
|
||||
<v-col class="flex-grow-0 text-nowrap pa-0 ">
|
||||
<v-divider />
|
||||
<template v-for="(x, index) in projstep" >
|
||||
<v-stepper-step
|
||||
:complete="e1 > index+1"
|
||||
:step="index+1"
|
||||
:key="x"
|
||||
color="open_icons"
|
||||
editable
|
||||
edit-icon="mdi-reply"
|
||||
>
|
||||
{{x}}
|
||||
|
||||
</v-stepper-step>
|
||||
<v-divider :key="index"/>
|
||||
</template>
|
||||
</v-col>
|
||||
|
||||
|
||||
<v-col class="px-0 pt-0 flex-col">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="px-3 ">
|
||||
<v-divider />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-stepper-items
|
||||
|
||||
:class="!$vuetify.theme.dark?'auchlight':'auchdark'"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<v-stepper-content
|
||||
v-for="(x, index) in projstep"
|
||||
:key="index+1"
|
||||
:step="index+1"
|
||||
class="pa-0"
|
||||
>
|
||||
|
||||
|
||||
<v-card
|
||||
class="ma-1"
|
||||
elevation="2"
|
||||
height='600'
|
||||
style="overflow: auto"
|
||||
>
|
||||
|
||||
|
||||
<slot :name='index+1' />
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
|
||||
|
||||
</v-stepper-content>
|
||||
|
||||
|
||||
</v-stepper-items>
|
||||
<v-row class=" mt-1">
|
||||
<v-col class="pt-1">
|
||||
<MyIco
|
||||
v-if="e1!=1"
|
||||
@click="e1--"
|
||||
icons = 'mdi-menu-left'
|
||||
color="btns"
|
||||
size="32"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0"
|
||||
:class="e1<projstep.length?'pt-1':'pt-2'">
|
||||
<MyIco
|
||||
v-if="e1<projstep.length"
|
||||
@click="e1++"
|
||||
icons = 'mdi-menu-right'
|
||||
color="btns"
|
||||
size="32"
|
||||
/>
|
||||
<MyIco
|
||||
v-else
|
||||
@click="$emit('create_or_update')"
|
||||
icons = 'mdi-check'
|
||||
color='open_icons'
|
||||
:tooltip= true
|
||||
size="25"
|
||||
:text_tool="'Сохранить проект'"
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="pa-0 flex-grow-0 pl-0 rama" >
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-stepper>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "porject_stepper_pattern",
|
||||
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
default: "Новый проект"
|
||||
}
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
e1: 1,
|
||||
projstep: ['Основные положения', 'Персоны', 'Идея проекта', 'Задачи/работы', 'Отчетные даты'],
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.hstep {
|
||||
height: 10%;
|
||||
}
|
||||
|
||||
.bgstep {
|
||||
background: #e3e3e3;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<v-row class="ma-1">
|
||||
<div class="alerts">
|
||||
<v-alert
|
||||
type="success"
|
||||
dismissible
|
||||
v-if="!message.mes==''"
|
||||
>
|
||||
{{message.mes}}
|
||||
</v-alert>
|
||||
</div>
|
||||
<v-col class="flex-col gaps">
|
||||
|
||||
<v-row class="gaps">
|
||||
<v-col
|
||||
class="flex-grow-0 flex-col colblock pa-0"
|
||||
xl="2"
|
||||
lg="2"
|
||||
md="12"
|
||||
sm="12"
|
||||
cols="12"
|
||||
>
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<v-row class="flex-grow-0 ">
|
||||
|
||||
|
||||
<v-col class="flex-grow-0 py-2">
|
||||
<v-icon color="btns" dense>
|
||||
{{cards=='project'?'mdi-calendar-edit-outline':cards=='task'?'mdi-archive-edit':'mdi-account-arrow-left-outline'}}
|
||||
</v-icon>
|
||||
</v-col>
|
||||
<v-divider
|
||||
vertical
|
||||
></v-divider>
|
||||
<v-col class="text-center py-2">
|
||||
<span
|
||||
class="
|
||||
text-xl-subtitle-1
|
||||
text-md-body-2
|
||||
font-weight-medium"
|
||||
>
|
||||
{{cards=='project'?'Задачи':cards=='task'?'Работы':'Поручения'}}
|
||||
</span>
|
||||
</v-col>
|
||||
<v-divider
|
||||
vertical
|
||||
></v-divider>
|
||||
<v-col class="flex-grow-0 py-2">
|
||||
<MyIco
|
||||
@click="$emit(cards=='project'?'createnewTask':cards=='task'?'createnewWork':'createnewass')"
|
||||
icons = 'mdi-plus'
|
||||
size="large"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 ">
|
||||
<v-col class="pa-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<slot name="spisok"/>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
|
||||
|
||||
|
||||
|
||||
<v-tabs-items
|
||||
class="tebs"
|
||||
v-model="tabProj"
|
||||
>
|
||||
<v-tab-item value=1>
|
||||
<transition
|
||||
name="bounce"
|
||||
@after-enter="$emit('afterEnter')"
|
||||
@after-leave="$emit('afterLeave')"
|
||||
>
|
||||
<v-row class="ma-0">
|
||||
<v-col
|
||||
class="flex-col pa-0 informations colblock"
|
||||
:xl="chatview?8:12"
|
||||
:lg="chatview?8:12"
|
||||
md="12"
|
||||
sm="12"
|
||||
cols="12"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<v-row
|
||||
class="ma-0"
|
||||
:class="show_info?'mb-1':''"
|
||||
>
|
||||
<v-col class="flex-col pa-0">
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
:ma="'ma-0'"
|
||||
>
|
||||
<template #cards>
|
||||
<slot name="informations"/>
|
||||
<v-divider/>
|
||||
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="ma-0 flex-grow-0 row_informations " v-show="show_info">
|
||||
<v-col
|
||||
class="flex-col pa-0 colfiles"
|
||||
:xl="!chatview?8:12"
|
||||
:lg="!chatview?8:12"
|
||||
md="12"
|
||||
sm="12"
|
||||
cols="12"
|
||||
>
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<slot name="filess"></slot>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
<v-col class="flex-col pa-0 ml-1" v-if="!chatview">
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
class="overflow-auto overflow-x-hidden h-0"
|
||||
>
|
||||
<template #cards>
|
||||
<slot name="graphic"></slot>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
class="pa-0"
|
||||
:class="chatview?'flex-col':''"
|
||||
v-show="chatview"
|
||||
>
|
||||
<v-row
|
||||
class="ma-0 ml-1 flex-grow-0 row_chat colblock"
|
||||
:style="{ height: height + 'vh' }"
|
||||
>
|
||||
<v-col class="flex-col pa-0">
|
||||
<Cards
|
||||
:ma="'ma-2'"
|
||||
v-show="chatview"
|
||||
>
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
>
|
||||
<template #cards>
|
||||
<slot name="chat"/>
|
||||
<v-row class="flex-grow-0 mt-1 align-self-center">
|
||||
<v-col class="flex-grow-0 pa-1 pt-0"
|
||||
v-for="(value, i) in btnchat"
|
||||
:key="i"
|
||||
>
|
||||
<v-btn
|
||||
x-small
|
||||
color="secondary"
|
||||
outlined
|
||||
@click="startResize(value)"
|
||||
>
|
||||
<v-icon >
|
||||
{{value}}
|
||||
</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="ml-1 mt-1 mb-0 mr-0">
|
||||
<v-col class="flex-col pa-0">
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
color="inyand"
|
||||
:elevation= "0"
|
||||
|
||||
>
|
||||
<template #cards>
|
||||
<slot name="graphic"></slot>
|
||||
</template>
|
||||
</Cards>
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</transition>
|
||||
</v-tab-item>
|
||||
|
||||
<v-tab-item value=2>
|
||||
<transition
|
||||
name="bounce"
|
||||
@after-enter="$emit('afterEnter')"
|
||||
@after-leave="$emit('afterLeave')"
|
||||
>
|
||||
<slot name="projdocs"/>
|
||||
</transition>
|
||||
</v-tab-item>
|
||||
<v-tab-item value=3>
|
||||
<history
|
||||
|
||||
/>
|
||||
|
||||
</v-tab-item>
|
||||
</v-tabs-items>
|
||||
|
||||
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import history from '@/components/history/history.vue'
|
||||
export default {
|
||||
|
||||
name:"work-task-ass-projec",
|
||||
components:{history},
|
||||
data() {
|
||||
return {
|
||||
height: 55.8,
|
||||
btnchat :['mdi-menu-up', 'mdi-menu-down'],
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
props: {
|
||||
breadcrumbs:{
|
||||
type:Array,
|
||||
requiered:true,
|
||||
},
|
||||
chatview: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
show_info: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
tabProj: {
|
||||
type: String,
|
||||
default: '1'
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
cards: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
message: {
|
||||
type: Object,
|
||||
default:()=>{return {mes:"", show: false}}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
startResize(ico) {
|
||||
let ind = 15
|
||||
console.log(`this.height`,this.height );
|
||||
|
||||
if (ico =="mdi-menu-up" && this.height > 19) {
|
||||
this.height -= ind
|
||||
}
|
||||
if (ico =="mdi-menu-down" && this.height < 71) {
|
||||
console.log(`mdi-menu-down`);
|
||||
this.height += ind
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.row_informations {
|
||||
min-height: 38vh;
|
||||
}
|
||||
|
||||
.row_chat {
|
||||
transition: height 0.7s;
|
||||
max-height: 70vh;
|
||||
min-height: 20vh;
|
||||
}
|
||||
|
||||
|
||||
.alerts {
|
||||
position: absolute;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
bottom: 5%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
max-width: 20%;
|
||||
}
|
||||
|
||||
.pointer{
|
||||
cursor: pointer;
|
||||
}
|
||||
fieldset {
|
||||
height: 2.5rem;
|
||||
}
|
||||
|
||||
.arbeiten .v-tab {
|
||||
justify-content: stretch;
|
||||
height: 30px!important;
|
||||
text-align: start!important;
|
||||
margin-top: 8px;
|
||||
|
||||
}
|
||||
|
||||
.h_dna {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.arbeiten .v-tabs-items {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.arbeiten .v-window__container {
|
||||
flex-grow: 1!important;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.arbeiten .v-window-item--active {
|
||||
flex-grow: 1!important;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
.styck {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
max-height: 350px;
|
||||
overflow: auto!important;
|
||||
background: lightpink;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.cook {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
left: 60%;
|
||||
top: 1vh;
|
||||
width: 40%;
|
||||
|
||||
}
|
||||
|
||||
.tebs {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.theme--dark.v-tabs-items {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.blok1 {
|
||||
min-width: 857px;
|
||||
min-height: 633px;
|
||||
}
|
||||
|
||||
.blok2 {
|
||||
min-width: 857px;
|
||||
}
|
||||
|
||||
.c {
|
||||
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.poruz {
|
||||
margin-top: 5px !important;
|
||||
margin-bottom: 12px !important;
|
||||
min-width: 13vw;
|
||||
max-width: 13vw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.bounce-enter-active {
|
||||
animation: bounce-in .5s reverse;
|
||||
}
|
||||
.bounce-leave-active {
|
||||
animation: bounce-in .5s
|
||||
}
|
||||
@keyframes bounce-in {
|
||||
0% {
|
||||
opacity:1
|
||||
|
||||
}
|
||||
100% {
|
||||
transform: translateX(100vw);
|
||||
opacity:0
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.height_informationorders {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.gaps {
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
|
||||
.k .v-slide-group__content {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.textworksize {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.psevdobread {
|
||||
color: rgba(0, 0, 0, 0.38);
|
||||
}
|
||||
|
||||
@media (max-width: 1264px) {
|
||||
|
||||
|
||||
.colblock {
|
||||
min-height: 700px;
|
||||
}
|
||||
|
||||
.colfiles {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in new issue
Block a user