переработка степпера v2
Надо на бэке убрать fakeid
This commit is contained in:
1 parent
94e0b59bd1
commit
70708c0b35
26 files changed
+1084
-2088
No files matched your search
@@ -21,7 +21,7 @@
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="my-0 pt-0 pb-0 textsize"
|
||||
:error-messages="error('newproject','longname')"
|
||||
:rules="newproject_rules.longname"
|
||||
>
|
||||
</v-textarea>
|
||||
</template>
|
||||
@@ -37,27 +37,67 @@
|
||||
class="mt-0 pt-0 pb-0 textsize"
|
||||
flat
|
||||
dense
|
||||
:error-messages="error('newproject','name')"
|
||||
:rules="newproject_rules.name"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Период:"
|
||||
leftcol="pt-5"
|
||||
myclass="pt-3"
|
||||
>
|
||||
<template #leftcol>
|
||||
<div class="mt-n3">
|
||||
<Datepiker
|
||||
:datestartstore="'Projectdatestart'"
|
||||
:dateendstore="'Projectdateend'"
|
||||
:min="getProject.datestart"
|
||||
:max="getProject.dateend"
|
||||
:minimaxon="[[false, true],[true,false]]"
|
||||
class="my-0"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Период:" myclass="pt-3" rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0">
|
||||
|
||||
<v-menu
|
||||
v-model="menu_project_dates[0]"
|
||||
: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
|
||||
:value ='formatDate(newproject.datestart)'
|
||||
:rules="newproject_rules.datestart"
|
||||
|
||||
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="newproject.datestart"
|
||||
@input="menu_project_dates[0] = false"
|
||||
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
<v-col class="py-0">
|
||||
<v-menu
|
||||
v-model="menu_project_dates[1]"
|
||||
: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
|
||||
:value ='formatDate(newproject.dateend)'
|
||||
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="newproject.dateend"
|
||||
@input="menu_project_dates[1] = false"
|
||||
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Сложность проекта:"
|
||||
class="pt-1"
|
||||
>
|
||||
@@ -88,10 +128,11 @@
|
||||
return-object
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
hide-details
|
||||
|
||||
hide-no-data
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
:rules="newproject_rules.ptype"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
@@ -369,7 +410,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field
|
||||
:value ='formatDate(node.dateend)'
|
||||
|
||||
:rules="selection_rules.datestart"
|
||||
readonly
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
@@ -512,7 +553,7 @@
|
||||
cols=6
|
||||
class="caption text-nowrap pa-0"
|
||||
>
|
||||
<v-row class="pa-2 rowmarg align-items-center inyand">
|
||||
<v-row class="pa-2 align-items-center inyand">
|
||||
<v-col class="flex-grow-0 ">
|
||||
|
||||
|
||||
@@ -575,9 +616,9 @@ import rolesMany from '@/components/assignments/UI/roles-many.vue';
|
||||
import RowsAddremove from '@/components/carddetails/pattern/rows-addremove.vue';
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
import uf from '@/utils/universal_functions'
|
||||
import { required, minLength } from "vuelidate/lib/validators";
|
||||
import { validationMixin } from "vuelidate";
|
||||
import PorjectStepperPattern from '../../views/pattern/porject-stepper-pattern.vue';
|
||||
|
||||
|
||||
import PorjectStepperPattern from '@/views/pattern/porject-stepper-pattern.vue';
|
||||
import ExpPanel from '../assignments/UI/exp-panel.vue';
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
|
||||
@@ -586,10 +627,11 @@ export default {
|
||||
|
||||
components: { rowPirow, RolesSingle, rolesMany, RowsAddremove, PorjectStepperPattern, ExpPanel },
|
||||
|
||||
mixins:[uf, validationMixin],
|
||||
mixins:[uf],
|
||||
|
||||
data: () => ({
|
||||
// -----------
|
||||
|
||||
active: [],
|
||||
activework:[],
|
||||
open: [],
|
||||
@@ -608,30 +650,7 @@ data: () => ({
|
||||
indexwork:-1,
|
||||
workon: false,
|
||||
dialogdelete: false,
|
||||
newproject:{
|
||||
longname: '',
|
||||
name: '',
|
||||
difficult:0,
|
||||
datestart: "",
|
||||
dateend: "",
|
||||
ptype: { "id": 2 },
|
||||
project_checkpoint: [],
|
||||
info:{
|
||||
financial_support:"",
|
||||
project_sphere:"",
|
||||
passport_last_date:"",
|
||||
influence: "",
|
||||
grounds: '',
|
||||
target:[],
|
||||
result:[],
|
||||
criteria:[],
|
||||
risks:[],
|
||||
interactions:[],
|
||||
dop_info: ''
|
||||
},
|
||||
|
||||
tasks:[{task_work:[]}]
|
||||
},
|
||||
deletion: {
|
||||
deltasks: [],
|
||||
delworks: []
|
||||
@@ -655,10 +674,31 @@ data: () => ({
|
||||
|
||||
|
||||
},
|
||||
newproject_rules:{
|
||||
name:[ v => !!v || 'Обязательно для заполнения',],
|
||||
longname:[ v => !!v || 'Обязательно для заполнения',
|
||||
v => v.length>4 || 'Полное название должно содержать в себе более 4х символов'
|
||||
],
|
||||
datestart:[ v => !!v || 'Обязательно для заполнения',
|
||||
v => moment(v, "DD.MM.YYYY").isValid() || 'Дата указана неверно',
|
||||
],
|
||||
dateend:[ v => !!v || 'Обязательно для заполнения',
|
||||
v => moment(v, "DD.MM.YYYY").isValid() || 'Дата указана неверно',
|
||||
],
|
||||
ptype:[ v => !!v || 'Обязательно для заполнения',],
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
selectedItem:0,
|
||||
menudatestart: false,
|
||||
menudateend: false,
|
||||
menupassport_last_date: false,
|
||||
|
||||
menuproject_checkpoint: false,
|
||||
alldate: [],
|
||||
menu: false,
|
||||
@@ -673,31 +713,13 @@ data: () => ({
|
||||
]
|
||||
}),
|
||||
|
||||
validations: {
|
||||
newproject:{
|
||||
longname: {
|
||||
required,
|
||||
minLength: minLength(4)
|
||||
},
|
||||
name: {
|
||||
required,
|
||||
},
|
||||
datestart: {
|
||||
required,
|
||||
},
|
||||
dateend: {
|
||||
required,
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
methods: {
|
||||
findMinMaxdate(id,key){
|
||||
if ("task_work" in this.selection[0]){
|
||||
return this.getProject[key]
|
||||
return this.newproject[key]
|
||||
|
||||
}
|
||||
else{
|
||||
@@ -707,18 +729,7 @@ findMinMaxdate(id,key){
|
||||
|
||||
},
|
||||
|
||||
formatDate (date) {
|
||||
try {
|
||||
|
||||
if (!date) return null
|
||||
if (date.split('-').length==3){
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}.${month}.${year}`
|
||||
}
|
||||
}
|
||||
catch{return date}
|
||||
|
||||
},
|
||||
|
||||
closes() {
|
||||
|
||||
this.$emit('closes')
|
||||
@@ -787,9 +798,7 @@ formatDate (date) {
|
||||
this.newproject.info[row].push('')
|
||||
},
|
||||
|
||||
remove(rem) {
|
||||
this.newproject.info[rem.field].splice(rem.key, 1)
|
||||
},
|
||||
|
||||
|
||||
addtask() {
|
||||
if (this.selection && !this.$refs.selection.validate()){
|
||||
@@ -800,7 +809,9 @@ formatDate (date) {
|
||||
},
|
||||
|
||||
addwork() {
|
||||
console.log(this.selection);
|
||||
if (this.selection && !this.$refs.selection.validate()){
|
||||
return
|
||||
}
|
||||
this.selection[0].task_work.push({id: -1*(this.selection[0].task_work.length),parent:this.selection[0].id, longname: "", name:"Новая работа", description: "", datestart: "", dateend: "", responsible: ""})
|
||||
this.selection[0]= this.selection[0].task_work[this.selection[0].task_work.length-1]
|
||||
},
|
||||
@@ -862,122 +873,12 @@ formatDate (date) {
|
||||
// ------------------------
|
||||
|
||||
|
||||
vmodelname: {
|
||||
get () {
|
||||
return this.activework.length > 0 ?this.workselected.name:this.selected.name
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.name = newval
|
||||
}
|
||||
else {
|
||||
this.selected.name = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodellongname: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.workselected.longname:this.selected.longname
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.longname = newval
|
||||
}
|
||||
else {
|
||||
this.selected.longname = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodeldescription: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.workselected.description:this.selected.description
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.description = newval
|
||||
}
|
||||
else {
|
||||
this.selected.description = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodeldatestart: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.workselected.datestart:this.selected.datestart
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.datestart = newval
|
||||
}
|
||||
else {
|
||||
this.selected.datestart = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodeldateend: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.workselected.dateend:this.selected.dateend
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.dateend = newval
|
||||
}
|
||||
else {
|
||||
this.selected.dateend = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodelresponsible: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.workselected.responsible:this.selected.responsible
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.responsible = newval
|
||||
}
|
||||
else {
|
||||
this.selected.responsible = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodeldifficult: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.workselected.difficult:this.selected.difficult
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.workselected.difficult = newval
|
||||
}
|
||||
else {
|
||||
this.selected.difficult = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// this.active.push(10) [0].id==undefined?newproject.tasks = []:newproject.tasks
|
||||
console.log(`----------this.newproject.tasks------`, this.newproject);
|
||||
// this.newproject= this.getProject
|
||||
this.newproject = JSON.parse(JSON.stringify(this.getProject))
|
||||
console.log(`----------this.newproject.tasks 22------`, this.newproject);
|
||||
if (this.newproject.tasks.length<1)
|
||||
{
|
||||
this.newproject.tasks = []
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
<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}}
|
||||
</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"
|
||||
|
||||
edit-icon="mdi-reply"
|
||||
@click="validstep(index+1)"
|
||||
|
||||
>
|
||||
{{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"
|
||||
>
|
||||
<component :is="['step-one','step-two','step-three','step-four','step-five'][index]"
|
||||
ref="childform"
|
||||
:newproject="newproject"
|
||||
@showuserinfo="showuserinfo"
|
||||
></component>
|
||||
<!-- <step-one ref="childform" :newproject="newproject" v-if="index==0"/> -->
|
||||
<!-- <step-two ref="childform" :newproject="newproject" v-if="index==1" @showuserinfo="showuserinfo"/> -->
|
||||
<!-- <step-three ref="childform" :newproject="newproject" v-if="index==2"/> -->
|
||||
<!-- <step-four ref="childform" :newproject="newproject" v-if="index==3"/> -->
|
||||
<!-- <step-five ref="childform" :newproject="newproject" v-if="index==0"/> -->
|
||||
|
||||
</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
|
||||
|
||||
@click="nextstep"
|
||||
:icons ="e1<projstep.length?'mdi-menu-right':'mdi-check'"
|
||||
:color="e1<projstep.length?'btns':'open_icons'"
|
||||
:tooltip="true"
|
||||
:text_tool="e1<projstep.length?'Далее':'Сохранить проект'"
|
||||
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>
|
||||
import stepOne from "@/components/UI/projectsteppersteps/stepOne.vue"
|
||||
import stepTwo from "@/components/UI/projectsteppersteps/stepTwo.vue"
|
||||
import stepThree from "@/components/UI/projectsteppersteps/stepThree.vue"
|
||||
import stepFour from "@/components/UI/projectsteppersteps/stepFour.vue"
|
||||
import stepFive from "@/components/UI/projectsteppersteps/stepFive.vue"
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
export default {
|
||||
|
||||
name: "project_stepper_pattern",
|
||||
components: { stepOne, stepTwo, stepThree,stepFour,stepFive},
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
default: "Новый проект"
|
||||
}
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
e1: 1,
|
||||
projstep: ['Основные положения', 'Персоны', 'Идея проекта', 'Задачи/работы', 'Отчетные даты'],
|
||||
newproject:{
|
||||
longname: '',
|
||||
name: '',
|
||||
difficult:0,
|
||||
datestart: "",
|
||||
dateend: "",
|
||||
ptype: { "id": 2 },
|
||||
project_checkpoint: [],
|
||||
info:{
|
||||
financial_support:"",
|
||||
project_sphere:"",
|
||||
passport_last_date:"",
|
||||
influence: "",
|
||||
grounds: '',
|
||||
target:[],
|
||||
result:[],
|
||||
criteria:[],
|
||||
risks:[],
|
||||
interactions:[],
|
||||
dop_info: ''
|
||||
},
|
||||
|
||||
tasks:[]
|
||||
}
|
||||
|
||||
})
|
||||
,
|
||||
|
||||
methods:{
|
||||
nextstep(){
|
||||
|
||||
if(this.e1<this.projstep.length && this.$refs.childform[0].$refs.form.validate()){
|
||||
this.e1++
|
||||
}
|
||||
else if(this.e1==this.projstep.length){
|
||||
this.create_or_update()
|
||||
}
|
||||
},
|
||||
|
||||
validstep(ind){
|
||||
if(this.$refs.childform[0].$refs.form.validate()){
|
||||
this.e1=ind
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
showuserinfo(id){
|
||||
this.$emit("showuserinfo",id)
|
||||
},
|
||||
|
||||
create_or_update() {
|
||||
this.newproject.users = this.getProject.users
|
||||
this.newproject.datestart = this.getProject.datestart
|
||||
this.newproject.dateend = this.getProject.dateend
|
||||
// console.log(this.deletion,"ddd");
|
||||
let deletion = this.newproject.deletion
|
||||
delete this.newproject.deletion
|
||||
this.$emit('newproject', {project: this.newproject, delete:deletion} )
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
mounted() {
|
||||
this.newproject = JSON.parse(JSON.stringify(this.getProject))
|
||||
console.log(`----------this.newproject.tasks 22------`, this.newproject);
|
||||
if (this.newproject.tasks.length<1)
|
||||
{
|
||||
this.newproject.tasks = []
|
||||
}
|
||||
else{
|
||||
this.newproject.tasks.forEach((e)=>{e.fakeid = `t-${e.id}`;
|
||||
e.task_work.forEach(n=>n.fakeid=`w-${n.id}`)
|
||||
})
|
||||
console.log(this.newproject.tasks,"fake");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
computed:{
|
||||
...projectstate.mapGetters(["getProject", "getprojectuniqueusers",'getprojectuniquePersons']),
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.hstep {
|
||||
height: 10%;
|
||||
}
|
||||
|
||||
.bgstep {
|
||||
background: #e3e3e3;
|
||||
}
|
||||
</style>
|
||||
@@ -1,65 +1,63 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<h3>Даты отчетов о статусе проекта:</h3>
|
||||
<v-divider class="my-3"/>
|
||||
|
||||
<v-row class="justify-content-center" >
|
||||
<v-col
|
||||
cols=4
|
||||
class="flex-col flex-grow-1 ">
|
||||
|
||||
<v-row>
|
||||
<v-col
|
||||
|
||||
>
|
||||
<v-date-picker
|
||||
v-model="newproject.project_checkpoint"
|
||||
multiple
|
||||
no-title
|
||||
:min='getProject.datestart'
|
||||
:max='getProject.dateend'
|
||||
first-day-of-week=1
|
||||
scrollable
|
||||
show-adjacent-months
|
||||
class="chekpoin"
|
||||
|
||||
></v-date-picker>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<template >
|
||||
|
||||
<v-row class="d-flex justify-content-center">
|
||||
<v-col class="flex-col" lg=4>
|
||||
<v-row class="flex-grow-0 ">
|
||||
<v-col class="flex-col mt-4 text-center">
|
||||
<strong>Дата отчета о статусе проекта</strong>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="my-5"/>
|
||||
<v-row>
|
||||
<v-col class=" flex-col align-self-center">
|
||||
<v-date-picker
|
||||
v-model="newproject.project_checkpoint"
|
||||
multiple
|
||||
no-title
|
||||
:min='newproject.datestart'
|
||||
:max='newproject.dateend'
|
||||
first-day-of-week=1
|
||||
scrollable
|
||||
show-adjacent-months
|
||||
class="chekpoin"
|
||||
|
||||
></v-date-picker>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="mt-5"/>
|
||||
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class=" flex-col">
|
||||
<v-col class=" flex-col pa-0">
|
||||
|
||||
|
||||
<v-radio-group
|
||||
v-model="frequency"
|
||||
|
||||
row
|
||||
class="flex-col"
|
||||
>
|
||||
<v-row>
|
||||
<v-col
|
||||
v-for="(x,index) in frequencyf" :key= index+1
|
||||
cols=6
|
||||
class="caption text-nowrap "
|
||||
<v-row class=" inyand">
|
||||
<v-col
|
||||
v-for="x in frequencyf" :key= x.v
|
||||
cols=6
|
||||
class="caption text-nowrap pa-0"
|
||||
>
|
||||
<v-row class="pa-2 rowmarg align-items-center inyand">
|
||||
<v-col class="flex-grow-0 pa-0 ">
|
||||
<v-row class="pa-2 align-items-center inyand">
|
||||
<v-col class="flex-grow-0 ">
|
||||
|
||||
|
||||
|
||||
<v-radio
|
||||
<v-radio
|
||||
class="radios"
|
||||
color="btns"
|
||||
:label="x.name"
|
||||
:value= x.v
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
|
||||
color="btns"
|
||||
:label="x.name"
|
||||
:value= index+1
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -69,9 +67,9 @@
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 my-0 mr-n2">
|
||||
|
||||
<v-col class="flex-col pa-0" v-for="(x, indx) in weeks"
|
||||
<v-row>
|
||||
|
||||
<v-col class="flex-col pa-0" v-for="(x, indx) in weekdays"
|
||||
:key= indx>
|
||||
<v-chip
|
||||
outlined
|
||||
@@ -82,73 +80,54 @@
|
||||
{{x}}
|
||||
</v-chip>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-row>
|
||||
|
||||
|
||||
</v-col>
|
||||
<!-- //! сДЕЛАТЬ ВТОРУЮ КОЛОНКУ НА ПРОСМОТР ВЫБРАННЫХ ДАТ И ВОТ -->
|
||||
<!-- <v-col class="flex-col">
|
||||
<v-divider vertical/>
|
||||
{{newproject.project_checkpoint}}
|
||||
</v-col> -->
|
||||
|
||||
|
||||
|
||||
|
||||
</v-row>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
import { validationMixin } from "vuelidate";
|
||||
import uf from '@/utils/universal_functions'
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
name:"step-five",
|
||||
mixins:[uf, validationMixin],
|
||||
props:{
|
||||
newproject:{
|
||||
type:Object,
|
||||
default:()=>{}
|
||||
},
|
||||
|
||||
props:{
|
||||
newproject:{type:Object,
|
||||
default:()=>{}}
|
||||
},
|
||||
data:()=>{
|
||||
return{
|
||||
selectUpdate: [],
|
||||
frequency: 1,
|
||||
weeks: ['пн', 'вт', 'ср', 'чт', 'пт'],
|
||||
frequencyf: [
|
||||
{name: 'Еженедельно'},
|
||||
{name: 'Раз в две недели'},
|
||||
{name: 'Раз в три недели'},
|
||||
{name: 'Ежемесячно'},
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
computed:{
|
||||
...projectstate.mapGetters(["getProject", "getprojectuniqueusers"]),
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
frequency: 1,
|
||||
selectUpdate: [],
|
||||
weekdays: ['пн', 'вт', 'ср', 'чт', 'пт'],
|
||||
frequencyf: [
|
||||
{name: 'Еженедельно', v: 1},
|
||||
{name: 'Раз в две недели', v: 2},
|
||||
{name: 'Раз в три недели', v: 3},
|
||||
{name: 'Ежемесячно', v: 4},
|
||||
]
|
||||
}),
|
||||
methods:{
|
||||
|
||||
month(indxWeek) {
|
||||
month(indxWeek) {
|
||||
|
||||
let start = new Date(this.getProject.datestart)
|
||||
let end = new Date(this.getProject.dateend)
|
||||
console.log(this.frequency, indxWeek)
|
||||
let dates =[]
|
||||
let start = new Date(this.newproject.datestart)
|
||||
let end = new Date(this.newproject.dateend)
|
||||
|
||||
if (!this.selectUpdate.includes(indxWeek)) {
|
||||
dates= new Set(this.newproject.project_checkpoint)
|
||||
let project_checkpoint = new Set(this.newproject.project_checkpoint)
|
||||
for ( let i = 0; i <7; i ++) {
|
||||
|
||||
if (start.getDay() == indxWeek) {
|
||||
|
||||
dates.add(this.momentext(start,"YYYY-MM-DD"))
|
||||
project_checkpoint.add(moment(start).locale("Ru").format("YYYY-MM-DD"))
|
||||
this.selectUpdate.push(indxWeek)
|
||||
break
|
||||
}
|
||||
@@ -157,28 +136,28 @@ export default {
|
||||
|
||||
}
|
||||
while (start<=end) {
|
||||
dates.add(this.momentext(start,"YYYY-MM-DD"))
|
||||
project_checkpoint.add(moment(start).locale("Ru").format("YYYY-MM-DD"))
|
||||
start.setDate(start.getDate()+(7*this.frequency))
|
||||
|
||||
}
|
||||
|
||||
this.newproject.project_checkpoint = Array.from(dates)
|
||||
this.newproject.project_checkpoint = Array.from(project_checkpoint)
|
||||
|
||||
}
|
||||
else{
|
||||
this.newproject.project_checkpoint= this.newproject.project_checkpoint.filter(e=>new Date(e).getDay()!=indxWeek)
|
||||
this.selectUpdate = this.selectUpdate.filter(e=>e!=indxWeek)
|
||||
}
|
||||
|
||||
console.log(this.newproject.project_checkpoint);
|
||||
else{
|
||||
this.newproject.project_checkpoint= this.newproject.project_checkpoint.filter(e=>new Date(e).getDay()!=indxWeek)
|
||||
this.selectUpdate = this.selectUpdate.filter(e=>e!=indxWeek)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,501 +1,348 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col lg=3 class="flex-col">
|
||||
|
||||
<v-row class="flex-grow-0">
|
||||
|
||||
<v-col >
|
||||
|
||||
<v-btn
|
||||
tile
|
||||
color="btns"
|
||||
small
|
||||
block
|
||||
@click="newTask"
|
||||
outlined
|
||||
>
|
||||
<v-icon
|
||||
left
|
||||
x-small
|
||||
>
|
||||
mdi-plus
|
||||
</v-icon>
|
||||
Добавить задачу
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="overflow-auto h-0 ">
|
||||
<v-col class="py-0 ">
|
||||
|
||||
<v-treeview
|
||||
:active.sync="active"
|
||||
:items="newproject.tasks"
|
||||
class="pointer"
|
||||
activatable
|
||||
color="btns"
|
||||
|
||||
transition
|
||||
return-object
|
||||
|
||||
|
||||
>
|
||||
<template v-slot:prepend="{ item }">
|
||||
<v-icon v-if="!item.children">
|
||||
mdi-calendar-edit-outline
|
||||
</v-icon>
|
||||
</template>
|
||||
</v-treeview>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-divider vertical/>
|
||||
<v-col lg=9 class="flex-col">
|
||||
<v-scroll-y-transition mode="out-in">
|
||||
<v-row v-if="active.length==0">
|
||||
<v-col
|
||||
|
||||
class="text-h6 grey--text text-center align-self-center text--lighten-1 font-weight-light"
|
||||
>
|
||||
Задача не выбрана
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row
|
||||
v-else
|
||||
flat
|
||||
>
|
||||
<v-col lg=4 class="flex-col">
|
||||
<v-row class="flex-grow-0">
|
||||
|
||||
<v-col>
|
||||
<v-btn
|
||||
tile
|
||||
color="btns"
|
||||
small
|
||||
block
|
||||
@click="adddwork"
|
||||
outlined
|
||||
>
|
||||
<v-icon
|
||||
left
|
||||
x-small
|
||||
>
|
||||
mdi-plus
|
||||
</v-icon>
|
||||
Добавить работу
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row >
|
||||
<v-col class="py-0 flex-col">
|
||||
<v-row class="overflow-auto h-0 ">
|
||||
<v-col>
|
||||
|
||||
|
||||
<v-treeview
|
||||
:active.sync="activework"
|
||||
:items="active[0].task_work"
|
||||
class="pointer"
|
||||
activatable
|
||||
color="btns"
|
||||
open-on-click
|
||||
transition
|
||||
return-object
|
||||
>
|
||||
<template v-slot:prepend="{ item }">
|
||||
<v-icon v-if="!item.children">
|
||||
mdi-archive-edit
|
||||
</v-icon>
|
||||
</template>
|
||||
</v-treeview>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-divider vertical></v-divider>
|
||||
<v-col class="flex-col">
|
||||
<v-row class="overflow-auto h-0 ">
|
||||
<v-col class="flex-col">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col>
|
||||
<v-dialog
|
||||
v-model="dialogdelete"
|
||||
persistent
|
||||
max-width="500"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
tile
|
||||
color="btns"
|
||||
small
|
||||
block
|
||||
|
||||
outlined
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
<template>
|
||||
|
||||
<v-form ref="form" lazy-validation class=" d-flex pa-3 pt-0 flex-grow-1 flex-col overflow-auto overflow-x-hidden stepper"
|
||||
style="height:100%"
|
||||
>
|
||||
<v-icon
|
||||
left
|
||||
x-small
|
||||
>
|
||||
mdi-minus
|
||||
</v-icon>
|
||||
{{activework.length?'Удалить работу':'Удалить задачу'}}
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="text-h5">
|
||||
{{activework.length?activework[0].name:active[0].name}}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
Вы уверены что хотите удалить {{activework.length?'работу':'задачу'}}?
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<BtnsOut
|
||||
@click="dialogdelete = false"
|
||||
title = "Отмена"
|
||||
:height= 30
|
||||
:width= 120
|
||||
/>
|
||||
|
||||
<BtnsOut
|
||||
:colora="'red accent-4'"
|
||||
@click="deltasksworks"
|
||||
title = "Удалить"
|
||||
:height= 30
|
||||
:width= 120
|
||||
/>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<row-pirow title="Название:"
|
||||
myclass="pt-3"
|
||||
rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="vmodellongname"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Короткое название:"
|
||||
myclass="pt-2"
|
||||
rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="vmodelname"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Период:" myclass="pt-3" rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0">
|
||||
<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="vmodeldatestart"
|
||||
|
||||
readonly
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="vmodeldatestart"
|
||||
@input="menudatestart = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
<v-col class="py-0">
|
||||
<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="vmodeldateend"
|
||||
|
||||
readonly
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="vmodeldateend"
|
||||
@input="menudateend = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
<v-row class="d-flex flex-grow-1 " style="height:100%">
|
||||
<v-col class="flex-col justify-space-between">
|
||||
<v-treeview
|
||||
:active.sync="selection"
|
||||
:items="newproject.tasks"
|
||||
:selection-type="'leaf'"
|
||||
item-key="fakeid"
|
||||
hoverable
|
||||
activatable
|
||||
return-object
|
||||
item-children="task_work"
|
||||
open-all
|
||||
|
||||
></v-treeview>
|
||||
<v-btn
|
||||
@click="addtask"
|
||||
>Добавить задачу</v-btn>
|
||||
</v-col>
|
||||
<v-divider vertical></v-divider>
|
||||
<v-col
|
||||
class="flex-col flex-grow-1 justify-space-between"
|
||||
style="height:100%"
|
||||
:class="!selection.length?'justify-space-around':'justify-space-between'"
|
||||
cols="6"
|
||||
>
|
||||
<template v-if="!selection.length">
|
||||
<div class="align-self-center "> Ничего не выбрано</div>
|
||||
</template>
|
||||
<template
|
||||
v-else>
|
||||
<div
|
||||
class="d-flex flex-grow-1 flex-col" ref="selection">
|
||||
|
||||
<div class="d-flex flex-grow-1 flex-col"
|
||||
|
||||
<row-pirow title="Сложность проекта:" class="mt-2" rowclass="px-1"
|
||||
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-rating
|
||||
v-model="vmodeldifficult"
|
||||
class=" ml-n3 star"
|
||||
color="warning"
|
||||
empty-icon="mdi-star-outline"
|
||||
full-icon="mdi-star"
|
||||
half-icon="mdi-star-half-full"
|
||||
hover
|
||||
length="5"
|
||||
size="16"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Ответсвенный:" rowclass="px-1"
|
||||
class="pt-2">
|
||||
<template #leftcol>
|
||||
<v-autocomplete
|
||||
dense
|
||||
class="inputext pointer mt-n1 iconsh font-weight-medium"
|
||||
v-model="vmodelresponsible"
|
||||
:items="getprojectuniqueusers"
|
||||
hide-no-data
|
||||
|
||||
item-text="text"
|
||||
item-value="id"
|
||||
hide-details
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Описание:" rowclass="px-1"
|
||||
class="pt-2"
|
||||
myclass="pt-3">
|
||||
v-for="node in selection"
|
||||
:key="node.id"
|
||||
>
|
||||
<row-pirow title="Название:"
|
||||
myclass="pt-3"
|
||||
rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="vmodeldescription"
|
||||
v-model="node.longname"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
|
||||
|
||||
/>
|
||||
|
||||
</template>
|
||||
</row-pirow>
|
||||
</v-col>
|
||||
|
||||
</row-pirow>
|
||||
<row-pirow title="Короткое название:"
|
||||
myclass="pt-2"
|
||||
rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="node.name"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-2"
|
||||
:rules="selection_rules.name"
|
||||
></v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Период:" myclass="pt-3" rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0">
|
||||
|
||||
<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
|
||||
:value ='formatDate(node.datestart)'
|
||||
:rules="selection_rules.datestart"
|
||||
|
||||
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="node.datestart"
|
||||
@input="menudatestart = false"
|
||||
:min="findMinMaxdate(node.id, 'datestart')"
|
||||
:max="findMinMaxdate(node.id,'dateend')"
|
||||
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
<v-col class="py-0">
|
||||
<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
|
||||
:value ='formatDate(node.dateend)'
|
||||
:rules="selection_rules.datestart"
|
||||
readonly
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="node.dateend"
|
||||
@input="menudateend = false"
|
||||
:min="findMinMaxdate(node.id, 'datestart')"
|
||||
:max="findMinMaxdate(node.id,'dateend')"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
<row-pirow title="Сложность:" class="mt-2" rowclass="px-1"
|
||||
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-rating
|
||||
v-model="node.difficult"
|
||||
class=" ml-n3 star"
|
||||
color="warning"
|
||||
empty-icon="mdi-star-outline"
|
||||
full-icon="mdi-star"
|
||||
half-icon="mdi-star-half-full"
|
||||
hover
|
||||
length="5"
|
||||
size="16"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Ответсвенный:" rowclass="px-1"
|
||||
class="pt-2">
|
||||
<template #leftcol>
|
||||
|
||||
<v-autocomplete
|
||||
dense
|
||||
class="inputext pointer mt-n1 iconsh font-weight-medium"
|
||||
v-model="node.responsible"
|
||||
:items="getprojectuniquePersons"
|
||||
return-object
|
||||
item-text="fullname"
|
||||
item-value="id"
|
||||
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
:rules="selection_rules.responsible"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<strong class="px-1">Описание:</strong>
|
||||
|
||||
<v-textarea
|
||||
v-model="node.description"
|
||||
no-resize
|
||||
rows=10
|
||||
solo
|
||||
|
||||
class="mt-0 pt-0 pb-2"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</div>
|
||||
<div class="d-felx flex-grow-0">
|
||||
<div class="d-felx flex-row justify-space-around">
|
||||
<v-btn
|
||||
v-if="'task_work' in selection[0]"
|
||||
@click="addwork"
|
||||
>Добавить работу</v-btn>
|
||||
|
||||
|
||||
<v-btn
|
||||
class="white--text"
|
||||
color="red "
|
||||
@click="deltasksworks"
|
||||
>Удалить {{'task_work' in selection[0]?"Задачу": "Работу" }}</v-btn>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</v-scroll-y-transition>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
import rowPirow from '@/components/carddetails/pattern/row-pirow.vue';
|
||||
import formatDate from '@/utils/datepiker'
|
||||
export default {
|
||||
name:'step-four',
|
||||
components: { rowPirow},
|
||||
name:"step-four",
|
||||
mixins:[formatDate],
|
||||
components: { rowPirow },
|
||||
props:{
|
||||
newproject:{
|
||||
type:Object,
|
||||
default:()=>{}
|
||||
}
|
||||
newproject:{type:Object,
|
||||
default:()=>{}}
|
||||
},
|
||||
data:()=>{
|
||||
return{
|
||||
dialogdelete: false,
|
||||
active: [],
|
||||
activework:[],
|
||||
menudatestart: false,
|
||||
menudateend: false,
|
||||
return{
|
||||
deletion: {
|
||||
deltasks: [],
|
||||
delworks: []
|
||||
},
|
||||
menudatestart: false,
|
||||
menudateend: false,
|
||||
selection:[],
|
||||
selection_rules:{name:[ v => !!v || 'Обязательно для заполнения',],
|
||||
datestart:[ v => !!v || 'Обязательно для заполнения',
|
||||
// v => moment(v,"DD.MM.YYYY").isValid()==true || 'Что-то не то с датой',
|
||||
],
|
||||
responsible:[ v => !!v || 'Обязательно для заполнения',]
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
newTask() {
|
||||
this.newproject.tasks.push({id:-1-this.newproject.tasks.length,longname: "", name:`Новая задача - ${this.newproject.tasks.length+1}`, difficult:3, description: "", datestart: "", dateend: "", responsible: "", status: 1, task_work:[]})
|
||||
},
|
||||
|
||||
|
||||
|
||||
deltasksworks() {
|
||||
// let arr = []
|
||||
// let delarr = []
|
||||
// let selectid = ""
|
||||
if(this.activework.length > 0){
|
||||
this.active[0].task_work.splice(this.active[0].task_work.findIndex(e=>e.id==this.activework[0].id),1)
|
||||
|
||||
}
|
||||
else{
|
||||
this.newproject.tasks.splice(this.newproject.tasks.findIndex(e=>e.id==this.active[0].id),1)
|
||||
this.active[0].task_work=[]
|
||||
}
|
||||
// ?
|
||||
// (
|
||||
// arr = this.selected.task_work,
|
||||
// delarr = this.deletion.delworks,
|
||||
// selectid = this.activework[0]
|
||||
// ) :
|
||||
// (
|
||||
// arr = this.newproject.tasks,
|
||||
// delarr = this.deletion.deltasks,
|
||||
// selectid = this.selected.id
|
||||
// )
|
||||
|
||||
// if (selectid >= 0) {
|
||||
// delarr.push(selectid)
|
||||
// }
|
||||
// let delinx = arr.findIndex(e=>e.id==selectid)
|
||||
// if(arr == this.selected.task_work) {
|
||||
// this.activework = []
|
||||
// }
|
||||
// arr.splice(delinx, 1)
|
||||
this.dialogdelete = false
|
||||
console.log(`this.newproject.tasks`, this.deletion, this.newproject.tasks);
|
||||
},
|
||||
|
||||
|
||||
adddwork() {
|
||||
this.active[0].task_work.push({id: -1-this.active[0].task_work.length, longname: "", name:`Новая работа - ${this.active[0].task_work.length+1}`, description: "", datestart: "", dateend: "", responsible: "", difficult:3})
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
computed:{
|
||||
...projectstate.mapGetters(["getProject", "getprojectuniqueusers"]),
|
||||
getprojectuniquePersons(){
|
||||
let a =[...this.newproject.users]
|
||||
let b = []
|
||||
a.forEach(el=> {if( (el!=undefined && b.findIndex(e=>el.user.id===e.id)==-1))b.push(el.user)})
|
||||
return b
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
addtask() {
|
||||
if (this.selection && !this.$refs.form.validate()){
|
||||
return
|
||||
}
|
||||
let id = -1*(this.newproject.tasks.length)
|
||||
this.newproject.tasks.push({fakeid:`t-${id}` ,id: id, longname: "", name:"Новая задача", description: "", datestart: null, dateend: null, responsible: null, task_work:[]})
|
||||
this.selection= [this.newproject.tasks[this.newproject.tasks.length-1]]
|
||||
},
|
||||
addwork() {
|
||||
if (this.selection && !this.$refs.form.validate()){
|
||||
return
|
||||
}
|
||||
let id=-1*(this.selection[0].task_work.length)
|
||||
this.selection[0].task_work.push({fakeid:`w-${id}` ,id: id,parent:{id:this.selection[0].id}, longname: "", name:"Новая работа", description: "", datestart: "", dateend: "", responsible: ""})
|
||||
// this.selection[0]= this.selection[0].task_work[this.selection[0].task_work.length-1]
|
||||
this.selection=[this.selection[0].task_work[this.selection[0].task_work.length-1] ]
|
||||
},
|
||||
|
||||
vmodelname: {
|
||||
get () {
|
||||
return this.activework.length > 0 ?this.activework[0].name:this.active[0].name
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].name = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].name = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
deltasksworks() {
|
||||
if (this.selection.length>0){
|
||||
if('task_work' in this.selection[0]){
|
||||
if (this.selection[0].id>0)this.deletion.deltasks.push(this.selection[0].id)
|
||||
|
||||
this.selection[0].task_work.forEach(e=>{if(e.id>0)this.deletion.delworks.push(e.id)});
|
||||
this.newproject.tasks.splice(this.newproject.tasks.findIndex(e=>e.id==this.selection[0].id),1)
|
||||
this.selection=[]
|
||||
|
||||
vmodellongname: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.activework[0].longname:this.active[0].longname
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].longname = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].longname = newval
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (this.selection[0].id>0)this.deletion.delworks.push(this.selection[0].id)
|
||||
let taskind = this.newproject.tasks.findIndex(e=>e.id==this.selection[0].parent.id)
|
||||
this.newproject.tasks[taskind].task_work.splice(this.newproject.tasks[taskind].task_work.findIndex(e=>e.id==this.selection[0].id),1)
|
||||
this.selection=[]
|
||||
}
|
||||
},
|
||||
this.newproject.deletion = this.deletion
|
||||
}
|
||||
// if (this.activework.length > 0){
|
||||
// arr = this.selected.task_work,
|
||||
// delarr = this.deletion.delworks,
|
||||
// selectid = this.activework[0]
|
||||
// }
|
||||
// else{
|
||||
// arr = this.newproject.tasks,
|
||||
// delarr = this.deletion.deltasks,
|
||||
// selectid = this.selected.id
|
||||
// this.selected.task_work.forEach(e=>this.deletion.delworks.push(e.id));
|
||||
// }
|
||||
|
||||
// if (selectid >= 0) {
|
||||
// delarr.push(selectid)
|
||||
// }
|
||||
// let delinx = arr.findIndex(e=>e.id==selectid)
|
||||
// if(arr == this.selected.task_work) {
|
||||
// this.activework = []
|
||||
// }
|
||||
// arr.splice(delinx, 1)
|
||||
// this.dialogdelete = false
|
||||
|
||||
// console.log(`this.newproject.tasks`, this.deletion, this.newproject.tasks);
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
findMinMaxdate(id,key){
|
||||
if ("task_work" in this.selection[0]){
|
||||
return this.newproject[key]
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
vmodeldescription: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.activework[0].description:this.active[0].description
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].description = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].description = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
let elm=this.newproject.tasks.find(e=>e.id==this.selection[0].parent.id)
|
||||
return elm[key]
|
||||
}
|
||||
|
||||
vmodeldatestart: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.activework[0].datestart:this.active[0].datestart
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].datestart = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].datestart = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodeldateend: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.activework[0].dateend:this.active[0].dateend
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].dateend = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].dateend = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodelresponsible: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.activework[0].responsible:this.active[0].responsible
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].responsible = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].responsible = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
vmodeldifficult: {
|
||||
get () {
|
||||
return this.activework.length > 0?this.activework[0].difficult:this.active[0].difficult
|
||||
},
|
||||
set (newval) {
|
||||
if (this.activework.length > 0) {
|
||||
this.activework[0].difficult = newval
|
||||
}
|
||||
else {
|
||||
this.active[0].difficult = newval
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +1,99 @@
|
||||
<template>
|
||||
<div class="pa-3 pt-0 flex-grow-1 flex-col h-0 overflow-auto overflow-x-hidden stepper">
|
||||
|
||||
<row-pirow v-for="item in [{title:'Название:',field:'longname'},{title:'Краткое название:',field:'name'}]"
|
||||
:key="item.field"
|
||||
:title="item.title"
|
||||
<v-form ref="form" lazy-validation class="pa-3 pt-0 flex-grow-1 flex-col overflow-auto overflow-x-hidden stepper"
|
||||
|
||||
>
|
||||
<row-pirow title="Название:"
|
||||
class="mt-1 "
|
||||
myclass="pb-2 align-self-center"
|
||||
myclass="pb-4 align-self-center"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject[item.field]"
|
||||
v-model="newproject.longname"
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="my-0 pt-0 pb-0 textsize"
|
||||
:error-messages="error('newproject','name')"
|
||||
:rules="newproject_rules.longname"
|
||||
>
|
||||
</v-textarea>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
<row-pirow title="Период:"
|
||||
myclass="pb-0 align-self-center"
|
||||
|
||||
>
|
||||
<row-pirow title="Краткое название:"
|
||||
myclass="pt-2"
|
||||
>
|
||||
<template #leftcol>
|
||||
|
||||
<Datepiker
|
||||
:datestartstore="'Projectdatestart'"
|
||||
:dateendstore="'Projectdateend'"
|
||||
:min="getProject.datestart"
|
||||
:max="getProject.dateend"
|
||||
:minimaxon="[[false, true],[true,false]]"
|
||||
class="my-0"
|
||||
/>
|
||||
|
||||
<v-textarea
|
||||
v-model="newproject.name"
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="mt-0 pt-0 pb-0 textsize"
|
||||
flat
|
||||
dense
|
||||
:rules="newproject_rules.name"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Период:" myclass="pt-3" rowclass="px-1">
|
||||
<template #leftcol>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0">
|
||||
|
||||
<v-menu
|
||||
v-model="menu_project_dates[0]"
|
||||
: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
|
||||
:value ='formatDate(newproject.datestart)'
|
||||
:rules="newproject_rules.datestart"
|
||||
|
||||
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="newproject.datestart"
|
||||
@input="menu_project_dates[0] = false"
|
||||
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
<v-col class="py-0">
|
||||
<v-menu
|
||||
v-model="menu_project_dates[1]"
|
||||
: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
|
||||
:value ='formatDate(newproject.dateend)'
|
||||
:rules="newproject_rules.dateend"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
v-model="newproject.dateend"
|
||||
@input="menu_project_dates[1] = false"
|
||||
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Сложность проекта:"
|
||||
myclass="pb-2 align-self-end"
|
||||
class="pt-1"
|
||||
>
|
||||
<template #leftcol>
|
||||
<template #leftcol>
|
||||
<div class=" ml-n2">
|
||||
<v-rating
|
||||
v-model="newproject.difficult"
|
||||
color="warning"
|
||||
@@ -50,31 +104,32 @@
|
||||
length="5"
|
||||
size="16"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Тип:"
|
||||
myclass="pb-0 align-self-end"
|
||||
class="py-2"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-autocomplete
|
||||
dense
|
||||
class="inputext pointer iconsh "
|
||||
class="inputext pointer mt-n1 iconsh "
|
||||
v-model="newproject.ptype"
|
||||
:items="$store.getters[`filterslogic/mult/mult_project__type`]"
|
||||
return-object
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
hide-details
|
||||
|
||||
hide-no-data
|
||||
item-color="open_icons"
|
||||
color="primaryicons"
|
||||
:rules="newproject_rules.ptype"
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Сфера организации Проекта:"
|
||||
|
||||
myclass="pb-2 align-self-center"
|
||||
class="pt-6"
|
||||
myclass="pb-5 align-self-center"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
@@ -89,11 +144,11 @@
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Дата утверждения паспорта Проекта:"
|
||||
|
||||
myclass="pb-0 align-self-center"
|
||||
class="pt-3"
|
||||
myclass="pt-0"
|
||||
>
|
||||
<template #leftcol>
|
||||
|
||||
<div class=" mt-n3 ">
|
||||
<v-menu
|
||||
v-model="menupassport_last_date"
|
||||
:close-on-content-click="false"
|
||||
@@ -103,7 +158,7 @@
|
||||
min-width="auto"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
|
||||
<!-- v-model="newproject.info.passport_last_date" -->
|
||||
<v-text-field
|
||||
type="date-local"
|
||||
readonly
|
||||
@@ -122,111 +177,94 @@
|
||||
@input="menupassport_last_date = false"
|
||||
placeholder="дд.мм.гггг"
|
||||
|
||||
:min='getProject.datestart'
|
||||
:max='getProject.dateend'
|
||||
:min='newproject.datestart'
|
||||
:max='newproject.dateend'
|
||||
/>
|
||||
</v-menu>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
<row-pirow v-for="(item,indx) in [{title:'Дополнительная информация:', field:'dop_info'},
|
||||
{title:'Финансовое обеспечение расходных обязательств:',field:'financial_support'},
|
||||
{title:'Основания для инициализации проекта:', field:'grounds'},
|
||||
]"
|
||||
:key="indx"
|
||||
|
||||
:title="item.title"
|
||||
class="mt-1 "
|
||||
myclass="pb-2 align-self-center"
|
||||
<row-pirow title="Дополнительная информация:"
|
||||
myclass="pb-6 align-self-center"
|
||||
class="pt-4"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.info[item.field]"
|
||||
v-model="newproject.info.dop_info"
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="my-0 pt-0 pb-0 textsize"
|
||||
|
||||
>
|
||||
</v-textarea>
|
||||
class="mt-n1 pt-0 pb-2 textsize"
|
||||
flat
|
||||
dense
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
|
||||
|
||||
</div>
|
||||
<row-pirow title="Финансовое обеспечение расходных обязательств, связанных с реализацией настоящего приказа:"
|
||||
myclass="align-self-center pb-4"
|
||||
>
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.info.financial_support"
|
||||
hide-details
|
||||
auto-grow
|
||||
rows="0"
|
||||
class="mt-0 pt-2 pb-0"
|
||||
flat
|
||||
dense
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
<row-pirow title="Основания для инициализации проекта:" class="pt-4" myclass="pb-0 align-self-center">
|
||||
<template #leftcol>
|
||||
<v-textarea
|
||||
v-model="newproject.info.grounds"
|
||||
auto-grow
|
||||
rows=0
|
||||
dense
|
||||
flat
|
||||
class="mt-0 pt-0 pb-0"
|
||||
hide-details
|
||||
/>
|
||||
</template>
|
||||
</row-pirow>
|
||||
</v-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment";
|
||||
import rowPirow from '@/components/carddetails/pattern/row-pirow.vue';
|
||||
import uf from '@/utils/universal_functions';
|
||||
import { required, minLength } from "vuelidate/lib/validators";
|
||||
import { validationMixin } from "vuelidate";
|
||||
import { createNamespacedHelpers } from "vuex";
|
||||
const projectstate = createNamespacedHelpers("projectstate");
|
||||
import formatDate from '@/utils/datepiker'
|
||||
export default {
|
||||
|
||||
name:"step-one",
|
||||
components: { rowPirow },
|
||||
mixins:[formatDate],
|
||||
|
||||
props:{
|
||||
newproject:{
|
||||
type:Object,
|
||||
default:()=>{return{ longname: '',
|
||||
name: '',}}
|
||||
}
|
||||
newproject:{type:Object,
|
||||
default:()=>{}}
|
||||
},
|
||||
components: { rowPirow},
|
||||
mixins:[uf, validationMixin],
|
||||
data:()=>{
|
||||
return{
|
||||
menupassport_last_date: false,
|
||||
errortext: {
|
||||
longname: {
|
||||
required : 'Поле обязательно для заполнения',
|
||||
minLength: 'Минимальная длина 4 символа'
|
||||
},
|
||||
name: {
|
||||
required : 'Поле обязательно для заполнения',
|
||||
},
|
||||
|
||||
},
|
||||
data:()=>({
|
||||
menupassport_last_date: false,
|
||||
menu_project_dates:[false,false],
|
||||
newproject_rules:{
|
||||
name:[ v => !!v || 'Обязательно для заполнения',],
|
||||
longname:[ v => !!v || 'Обязательно для заполнения',
|
||||
v => v.length>4 || 'Полное название должно содержать в себе более 4х символов'
|
||||
],
|
||||
datestart:[ v => !!v || 'Обязательно для заполнения',
|
||||
v => moment(v, "DD.MM.YYYY").isValid() || 'Дата указана неверно',
|
||||
],
|
||||
dateend:[ v => !!v || 'Обязательно для заполнения',
|
||||
v => moment(v, "DD.MM.YYYY").isValid() || 'Дата указана неверно',
|
||||
],
|
||||
ptype:[ v => !!v || 'Обязательно для заполнения',],
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
newproject:{
|
||||
longname: {
|
||||
required,
|
||||
minLength: minLength(4)
|
||||
},
|
||||
name: {
|
||||
required,
|
||||
},
|
||||
datestart: {
|
||||
required,
|
||||
},
|
||||
dateend: {
|
||||
required,
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
...projectstate.mapGetters(["getProject", "getprojectuniqueusers"]),
|
||||
},
|
||||
methods:{
|
||||
formatDate (date) {
|
||||
try {
|
||||
|
||||
if (!date) return null
|
||||
if (date.split('-').length==3){
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}.${month}.${year}`
|
||||
}
|
||||
|
||||
}
|
||||
catch{return date}
|
||||
|
||||
},
|
||||
}
|
||||
),
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<v-form ref="form" class="pa-3 pt-0 flex-grow-1 flex-col overflow-auto overflow-x-hidden stepper"
|
||||
|
||||
>
|
||||
<exp-panel
|
||||
:completion="true"
|
||||
:addremrow="addremrow"
|
||||
:newproject="newproject"
|
||||
@remove="remove"
|
||||
@addRows="addRows"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</v-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ExpPanel from '@/components/assignments/UI/exp-panel.vue';
|
||||
export default {
|
||||
name:"step-three",
|
||||
components: { ExpPanel },
|
||||
props:{
|
||||
newproject:{type:Object,
|
||||
default:()=>{}}
|
||||
},
|
||||
|
||||
data:()=>({
|
||||
addremrow: [{field: 'target', text: "Цель (цели) проекта"},
|
||||
{field: 'result', text: "Результат (результаты) проекта"},
|
||||
{field: 'criteria', text: "Критерии успеха проекта"},
|
||||
{field: 'risks', text: "Риски реализации проекта"},
|
||||
{field: 'interactions', text: "Взаимосвязи с другими проектами и программами"},
|
||||
],
|
||||
}),
|
||||
|
||||
|
||||
methods:{
|
||||
addRows(row) {
|
||||
this.newproject.info[row].push('')
|
||||
},
|
||||
remove(rem) {
|
||||
this.newproject.info[rem.field].splice(rem.key, 1)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
|
||||
|
||||
<v-form ref="form" class="pa-3 pt-0 flex-grow-1 flex-col overflow-x-hidden stepper"
|
||||
|
||||
>
|
||||
<v-row class="mb-2 mt-0 flex-grow-0 font-weight-bold text-overline main_theme">
|
||||
<v-col lg=4 class="py-0" >Роли</v-col>
|
||||
<v-col lg=4 class="py-0">Сотрудники</v-col>
|
||||
<v-col class="py-0">Процент занятости</v-col>
|
||||
<v-col class="text-end py-0">Добавить/удалить</v-col>
|
||||
</v-row>
|
||||
<v-divider class="mb-3 mt-1"/>
|
||||
<roles-single
|
||||
:show= true
|
||||
@showuserinfo="showuserinfo"
|
||||
/>
|
||||
<v-divider class="my-2"/>
|
||||
<roles-many
|
||||
:roles="5"
|
||||
:show="true"
|
||||
@showuserinfo="showuserinfo"
|
||||
/>
|
||||
<v-divider class="mt-5"/>
|
||||
<roles-many
|
||||
:show="true"
|
||||
@showuserinfo="showuserinfo"
|
||||
/>
|
||||
<v-divider class="mt-5"/>
|
||||
|
||||
|
||||
</v-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RolesSingle from '@/components/assignments/UI/roles-single.vue';
|
||||
import rolesMany from '@/components/assignments/UI/roles-many.vue';
|
||||
export default {
|
||||
name:"step-two",
|
||||
components: { RolesSingle, rolesMany},
|
||||
props:{
|
||||
newproject:{type:Object,
|
||||
default:()=>{}}
|
||||
},
|
||||
methods:{
|
||||
showuserinfo(id){
|
||||
this.$emit("showuserinfo",id)
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -82,16 +82,7 @@
|
||||
/>
|
||||
|
||||
<v-divider v-if="!completion && newproject.info[x.field].length>0" :class="key>=1?'my-3':'mb-3'"/>
|
||||
<!-- <v-text-field
|
||||
v-else
|
||||
solo
|
||||
|
||||
flat
|
||||
readonly
|
||||
dense
|
||||
v-model="newproject.info[x.field][key]"
|
||||
hide-details
|
||||
/> -->
|
||||
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="completion" class="pa-0 flex-grow-0 align-self-end">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex-col flex-grow-1">
|
||||
<div class="d-flex flex-col flex-grow-1">
|
||||
<div>
|
||||
<v-app-bar
|
||||
class="flex-grow-0 ma-0 px-4 mx-2"
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
<v-row class="h-0 overflow-auto card-text ma-0 mt-2">
|
||||
|
||||
<v-col class="flex-col pt-2">
|
||||
<v-col class="d-flex flex-col pt-2">
|
||||
<row-pirow
|
||||
|
||||
title="Название:"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class="flex-grow-0"
|
||||
/>
|
||||
</v-card-title>
|
||||
<v-card-actions class="flex-col">
|
||||
<v-card-actions class="flex-col d-flex">
|
||||
<v-form
|
||||
class="flex-row"
|
||||
lazy-validation
|
||||
@@ -96,7 +96,7 @@
|
||||
</v-form>
|
||||
|
||||
<v-col class="pt-4">
|
||||
<v-row class="flex-grow-0 flex-col">
|
||||
<v-row class="flex-grow-0 flex-col d-flex">
|
||||
<v-col
|
||||
class="align-self-center"
|
||||
lg=12
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex-col flex-grow-1">
|
||||
<div class="flex-col d-flex flex-grow-1">
|
||||
<v-row class="flex-grow-0 align-center">
|
||||
<v-col
|
||||
v-if="`${statid}`.includes(status)"
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 sticky px-2">
|
||||
<v-col class="flex-col pa-0">
|
||||
<v-col class="flex-col d-flex pa-0">
|
||||
<v-divider/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -100,10 +100,10 @@
|
||||
</template>
|
||||
<v-card
|
||||
color="inyand"
|
||||
class="flex-col flex-grow-1"
|
||||
class="flex-col d-flex flex-grow-1"
|
||||
elevation-1
|
||||
>
|
||||
<div class="flex-col flex-grow-1">
|
||||
<div class="d-flex flex-col flex-grow-1">
|
||||
<v-row>
|
||||
<v-col v-if="getUser.id==file.sender.id" >
|
||||
<v-list
|
||||
@@ -158,7 +158,7 @@
|
||||
cols=6
|
||||
class="caption pa-0"
|
||||
>
|
||||
<v-row class="pa-2 rowmarg align-items-center inyand">
|
||||
<v-row class="pa-2 align-items-center inyand">
|
||||
<v-col class="flex-grow-0 pa-0 ">
|
||||
|
||||
<v-container
|
||||
@@ -355,9 +355,7 @@ export default {
|
||||
color: var(--v-btns-base);
|
||||
}
|
||||
|
||||
.rowmarg {
|
||||
margin: 1.1px;
|
||||
}
|
||||
|
||||
|
||||
.v-input--selection-controls__ripple {
|
||||
color:var(--v-btns-base)
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
</template>
|
||||
<template #textarea>
|
||||
<v-row class="flex-grow-1 ">
|
||||
<v-col class="flex-col">
|
||||
<v-col class="d-flex flex-col">
|
||||
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0">
|
||||
@@ -137,7 +137,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-0 flex-col">
|
||||
<v-col class="py-0 d-flex flex-col">
|
||||
<!-- <v-card> -->
|
||||
<v-textarea
|
||||
class="py-0 inputext flex-grow-1"
|
||||
@@ -203,7 +203,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="flex-col">
|
||||
<v-col class="flex-col d-flex">
|
||||
<v-row class="flex-grow-1 h-0 overflow-auto overflow-x">
|
||||
|
||||
<v-col>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
mdi-plus
|
||||
</v-icon>
|
||||
</v-col>
|
||||
<v-col class="flex-col pa-0">
|
||||
<v-col class="flex-col pa-0 d-flex">
|
||||
<v-row
|
||||
v-for="(val, key) in newproject.info[addrem.field]"
|
||||
:key="key"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<v-card class="flex-col flex-grow-1 pa-3" color="inyand">
|
||||
<v-row class="flex-col inputcolor mx-0 mt-1 rounded chats flex-nowrap"
|
||||
<v-card class="d-flex flex-col flex-grow-1 pa-3" color="inyand">
|
||||
<v-row class="d-flex flex-col inputcolor mx-0 mt-1 rounded chats flex-nowrap"
|
||||
|
||||
|
||||
>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- :class="pa" -->
|
||||
<v-col
|
||||
|
||||
class="flex-col"
|
||||
class="d-flex flex-col"
|
||||
>
|
||||
<slot name="textarea"></slot>
|
||||
</v-col>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<v-row class="rounded-sm">
|
||||
<v-col class="flex-col main_theme ma-2">
|
||||
<v-col class="flex-col d-flex main_theme ma-2">
|
||||
<v-row class="h-0 overflow-auto">
|
||||
<v-col>
|
||||
<v-card>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-card-text class="text_card--text flex-col px-2" :class='hf'>
|
||||
<v-card-text class="text_card--text d-flex flex-col px-2" :class='hf'>
|
||||
|
||||
<v-row
|
||||
:class='hf'
|
||||
@@ -46,6 +46,7 @@
|
||||
<v-col v-if="!getLoad()"
|
||||
:class="end?'hi':''"
|
||||
class="
|
||||
d-flex
|
||||
flex-col
|
||||
pa-0
|
||||
order-lg-1
|
||||
@@ -67,6 +68,7 @@
|
||||
v-else
|
||||
:class="end?'hi':''"
|
||||
class="
|
||||
d-flex
|
||||
flex-col
|
||||
pa-0
|
||||
order-lg-1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<!-- :class="!$vuetify.theme.dark?'auchlight':'auchdark'" -->
|
||||
<v-col
|
||||
class="pa-0 flex-col fonback"
|
||||
class="pa-0 flex-col d-flex fonback"
|
||||
>
|
||||
<v-tabs
|
||||
class="flex-grow-0 px-1 pl-2 pr-0 pt-2 "
|
||||
@@ -14,7 +14,7 @@
|
||||
v-for="(val,key) in docktype"
|
||||
:key="key"
|
||||
active-class="select_item"
|
||||
class="relax_item mr-2 flex-col"
|
||||
class="relax_item mr-2 flex-col d-flex"
|
||||
:ripple="false"
|
||||
@click="dialogtheme.title=key"
|
||||
>
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</v-tabs>
|
||||
<v-tabs-items
|
||||
class="flex-grow-1 flex-col bgtrans"
|
||||
class="flex-grow-1 flex-col d-flex bgtrans"
|
||||
v-model="tab"
|
||||
>
|
||||
<v-tab-item
|
||||
@@ -52,7 +52,7 @@
|
||||
class="flex-grow-1"
|
||||
>
|
||||
<v-card
|
||||
class="flex-col"
|
||||
class="flex-col d-flex"
|
||||
color="transparent pa-2"
|
||||
flat
|
||||
>
|
||||
@@ -205,7 +205,7 @@
|
||||
fullscreen
|
||||
hide-overlay
|
||||
transition="scale-transition"
|
||||
:content-class="dialog?'flex-col':''"
|
||||
:content-class="dialog?'flex-col d-flex':''"
|
||||
>
|
||||
<Cards
|
||||
:color="!$vuetify.theme.dark?'auchlight':'auchdark'"
|
||||
@@ -214,10 +214,10 @@
|
||||
<v-toolbar
|
||||
dark
|
||||
color="main_theme"
|
||||
class="flex-grow-0 flex-col rounded"
|
||||
class="flex-grow-0 flex-col d-flex rounded"
|
||||
height=35
|
||||
>
|
||||
<v-toolbar-title class="flex-grow-1 flex-col px-2">
|
||||
<v-toolbar-title class="flex-grow-1 flex-col d-flex px-2">
|
||||
<v-row>
|
||||
<v-col
|
||||
class="align-self-center inyand2--text font-weight-light body-2"
|
||||
@@ -410,13 +410,13 @@
|
||||
<template #cards>
|
||||
<v-row>
|
||||
<v-col
|
||||
class=" flex-col"
|
||||
class="d-flex flex-col"
|
||||
xl=10
|
||||
>
|
||||
<v-row class="justify-center">
|
||||
|
||||
<v-col
|
||||
class=" flex-col"
|
||||
class="d-flex flex-col"
|
||||
:xl="pathfile()?12:['План-график', 'Отчет'].includes(dialogtheme.title)?12:5"
|
||||
|
||||
|
||||
@@ -525,13 +525,13 @@
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col
|
||||
class="flex-col"
|
||||
class="d-flex flex-col"
|
||||
xl=2
|
||||
>
|
||||
<Cards>
|
||||
<template #cards>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="flex-col pb-0">
|
||||
<v-col class="d-flex flex-col pb-0">
|
||||
<v-autocomplete
|
||||
v-model="dialogtheme.data.approver"
|
||||
:items="getprojectuniquePersons()"
|
||||
@@ -601,7 +601,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="flex-col py-0">
|
||||
<v-col class="d-flex flex-col py-0">
|
||||
<InputText
|
||||
class="maxHi"
|
||||
>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div v-if="value.month">
|
||||
{{ value.text }}
|
||||
</div>
|
||||
<div class="px-2 pt-1 pb-2 d-flex flex-column h-100" v-else>
|
||||
<div class="px-2 pt-1 pb-2 d-flex flex-col h-100" v-else>
|
||||
<div
|
||||
class="align-self-end flex-grow-0 text-card-calendar pb-1"
|
||||
>
|
||||
|
||||
@@ -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