переработка степпера v2
Надо на бэке убрать fakeid
This commit is contained in:
1 parent
94e0b59bd1
commit
70708c0b35
26 files changed
+1084
-2088
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-container class="flex-col h-100 w-100 projects" fluid>
|
||||
<v-container class="d-flex flex-col h-100 w-100 projects" fluid>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pa-0">
|
||||
<!-- -->
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
</v-row>
|
||||
<v-row class="mt-0 ">
|
||||
<v-col class="flex-col pa-1">
|
||||
<v-col class="d-flex flex-col pa-1">
|
||||
<v-card class="flex-grow-1">
|
||||
|
||||
<div class="mt-3 iconInline">
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
|
||||
<v-col
|
||||
class="flex-col"
|
||||
class="d-flex flex-col"
|
||||
>
|
||||
<v-row class="align-self-center entrance">
|
||||
<v-col
|
||||
class="align-self-center flex-col heightvol"
|
||||
class="align-self-center d-flex flex-col heightvol"
|
||||
>
|
||||
<Form-before
|
||||
v-if="nowView == 'before'"
|
||||
|
||||
@@ -1,994 +1,15 @@
|
||||
<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>
|
||||
<div>
|
||||
Пока ничего
|
||||
</div>
|
||||
</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>
|
||||
|
||||
</style>
|
||||
@@ -98,7 +98,7 @@
|
||||
v-model="show_change_dialog"
|
||||
width="75vw"
|
||||
>
|
||||
<project-stepper
|
||||
<project-stepper-pattern
|
||||
@closes="show_change_dialog=!show_change_dialog"
|
||||
@newproject='newproject'
|
||||
@showuserinfo='showuserinfo'
|
||||
@@ -170,7 +170,7 @@ import projectInformationorder from '../components/assignments/project-informati
|
||||
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 projectStepperPattern from '@/components/UI/projectsteppersteps/projectStepperPattern.vue';
|
||||
// import chat from '@/components/chats/chat.vue'
|
||||
|
||||
import Postpone from '@/components/dialog/fill/postpone.vue';
|
||||
@@ -204,8 +204,8 @@ export default {
|
||||
mMessegeListRight,
|
||||
WorkTaskAssProject,
|
||||
Postpone,
|
||||
ProjectStepper
|
||||
|
||||
// ProjectStepper
|
||||
projectStepperPattern
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
>
|
||||
<!-- <all-info-project></all-info-project> -->
|
||||
<project-stepper
|
||||
<project-stepper-pattern
|
||||
@newproject='newproject'
|
||||
@showuserinfo='showuserinfo'
|
||||
@closes="dialog_create_project=!dialog_create_project"
|
||||
@@ -212,7 +212,7 @@ 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 ProjectStepperPattern from '@/components/UI/projectsteppersteps/projectStepperPattern.vue';
|
||||
import infousercard from '@/components/UI/infousercard.vue';
|
||||
const { mapMutations, mapActions } = createNamespacedHelpers("filterslogic");
|
||||
const globalstore = createNamespacedHelpers("globalstore");
|
||||
@@ -229,7 +229,7 @@ export default {
|
||||
rolesMany,
|
||||
RowsAddremove,
|
||||
infousercard,
|
||||
ProjectStepper,
|
||||
ProjectStepperPattern,
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
<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>
|
||||
@@ -9,11 +9,11 @@
|
||||
{{message.mes}}
|
||||
</v-alert>
|
||||
</div>
|
||||
<v-col class="flex-col gaps">
|
||||
<v-col class="d-flex flex-col gaps">
|
||||
|
||||
<v-row class="gaps">
|
||||
<v-col
|
||||
class="flex-grow-0 flex-col colblock pa-0"
|
||||
class="flex-grow-0 d-flex flex-col colblock pa-0"
|
||||
xl="2"
|
||||
lg="2"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<template #cards>
|
||||
|
||||
<v-app-bar
|
||||
class="flex-grow-0 flex-col ma-0 px-2 mx-2 mb-4"
|
||||
class="flex-grow-0 d-flex d-flex flex-col ma-0 px-2 mx-2 mb-4"
|
||||
dense
|
||||
elevation="1"
|
||||
color="inyand"
|
||||
@@ -73,7 +73,7 @@
|
||||
>
|
||||
<v-row class="ma-0">
|
||||
<v-col
|
||||
class="flex-col pa-0 informations colblock"
|
||||
class="flex-col d-flex pa-0 informations colblock"
|
||||
:xl="chatview?8:12"
|
||||
:lg="chatview?8:12"
|
||||
md="12"
|
||||
@@ -88,7 +88,7 @@
|
||||
class="ma-0"
|
||||
:class="'mb-1'"
|
||||
>
|
||||
<v-col class="flex-col pa-0">
|
||||
<v-col class="flex-col d-flex pa-0">
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
@@ -108,7 +108,7 @@
|
||||
</v-row>
|
||||
<v-row class="ma-0 flex-grow-0 row_informations ">
|
||||
<v-col
|
||||
class="flex-col pa-0 colfiles"
|
||||
class="flex-col d-flex pa-0 colfiles"
|
||||
:xl="!chatview?8:12"
|
||||
:lg="!chatview?8:12"
|
||||
md="12"
|
||||
@@ -128,7 +128,7 @@
|
||||
</template>
|
||||
</Cards>
|
||||
</v-col>
|
||||
<v-col class="flex-col pa-0 ml-1" v-if="!chatview">
|
||||
<v-col class="flex-col d-flex pa-0 ml-1" v-if="!chatview">
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
@@ -149,14 +149,14 @@
|
||||
|
||||
<v-col
|
||||
class="pa-0"
|
||||
:class="chatview?'flex-col':''"
|
||||
:class="chatview?'flex-col d-flex':''"
|
||||
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">
|
||||
<v-col class="flex-col d-flex pa-0">
|
||||
<Cards
|
||||
:ma="'ma-2'"
|
||||
v-show="chatview"
|
||||
@@ -192,7 +192,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="ml-1 mt-1 mb-0 mr-0">
|
||||
<v-col class="flex-col pa-0">
|
||||
<v-col class="flex-col d-flex pa-0">
|
||||
<Cards :ma="'ma-2'">
|
||||
<template #cards>
|
||||
<Cards
|
||||
|
||||
Reference in new issue
Block a user