Files
ISUP/front/dist/js/400.2243b9dc.js
T
2023-09-22 13:05:37 +03:00

2 lines
6.9 KiB
JavaScript

"use strict";(self["webpackChunkfront"]=self["webpackChunkfront"]||[]).push([[400],{54634:function(t,e,s){s.d(e,{Z:function(){return f}});var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-col",{staticClass:"pb-3 pt-1 px-1"},[s("layout-label",{staticClass:"text-nowrap ",attrs:{title:t.title,disabled:t.disabled}},[s("v-text-field",{attrs:{"background-color":"inputcolor","single-line":"",solo:"",dense:"",clearable:"","clear-icon":"mdi-close","hide-details":"true","append-outer-icon":t.appendouter,type:t.type,disabled:t.disabled},on:{input:function(e){return t.$emit("filterreestr")}},model:{value:t.filt,callback:function(e){t.filt=e},expression:"filt"}})],1)],1)},a=[],l={name:"f-input-search",props:{field:{type:[String,Number]},type:{type:String,default:"text"},title:{type:String},appendouter:{type:String,default:""},disabled:{type:Boolean,default:!1}},computed:{filt:{get(){return this.$store.getters[`filterslogic/input/${this.field}`]},set(t){this.$store.dispatch("filterslogic/input/addFilter",{key:this.field,value:t})}}},beforeDestroy(){this.$store.dispatch("filterslogic/input/addFilter",{key:this.field,value:""})}},r=l,n=s(43736),o=s(43453),d=s.n(o),c=s(60266),u=s(17808),p=(0,n.Z)(r,i,a,!1,null,"33e3ee79",null),f=p.exports;d()(p,{VCol:c.Z,VTextField:u.Z})},14400:function(t,e,s){s.r(e),s.d(e,{default:function(){return L}});var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-container",{staticClass:"d-flex flex-col h-100 w-100 projects",attrs:{fluid:""}},[s("v-row",{staticClass:"flex-grow-0"},[s("v-col",{staticClass:"pa-0"},[s("filters-bar",{staticClass:"pa-1 pb-3",attrs:{header:t.pagetitle},on:{sendData:t.updateData,clear:t.clear},scopedSlots:t._u([{key:"filterslist",fn:function(){return[s("f-input-search",{attrs:{field:"name",title:"Название"}}),s("f-daterange",{attrs:{field:"datestart__gte",title:"Срок начала с:"}}),s("f-daterange",{attrs:{field:"datestart__lte",title:"Срок начала до:"}}),s("f-daterange",{attrs:{field:"dateend__gte",title:"Срок окончания c:"}}),s("f-daterange",{attrs:{field:"dateend__lte",title:"Срок окончания до:"}}),s("f-multi-select",{attrs:{title:"Статус",field:"assignment__status",disabled:!1}}),s("f-input-search",{attrs:{field:"responsible__sn",title:"Фамилия Исполнителя"}})]},proxy:!0}])})],1)],1),s("v-row",{staticClass:"mt-0 "},[s("v-col",{staticClass:"d-flex flex-col pa-1"},[s("v-card",{staticClass:"flex-grow-1"},[s("div",{staticClass:"mt-3 iconInline"},["Проекты"==t.pagetitle?s("BtnsOut",{attrs:{widthi:140,icon:!0,title:"Создать проект",color:"open_icons"},on:{click:t.createproj}}):t._e()],1),s("v-data-table",{staticClass:"grow-table",attrs:{"fixed-header":!0,"disable-pagination":!0,"hide-default-footer":"",headers:t.childHeaders,items:t.parentList},on:{"dblclick:row":t.clickRow},scopedSlots:t._u([{key:"item.id",fn:function(e){var s=e.item;return[t._v(" "+t._s(s.parent.parent.parent.id)+"-"+t._s(s.parent.parent.id)+"-"+t._s(s.parent.id)+"-"+t._s(s.id)+" ")]}},{key:"item.dateend",fn:function(e){var s=e.item;return[t._v(" "+t._s(t.timediff(s.dateend))+" ")]}},{key:"item.lastchanged",fn:function(e){var s=e.item;return[t._v(" "+t._s(t.formatDate(s.lastchanged))+" ")]}},{key:"item.bars",fn:function(e){var i=e.item;return[s("div",{staticClass:"d-flex align-center"},["completed"in i&&i.all>0?[s("v-progress-linear",{staticStyle:{width:"80%"},attrs:{value:i.completed/i.all*100,height:"10","buffer-value":"100"}}),s("div",{staticClass:"ps-2"},[t._v(t._s(i.completed+"/"+i.all))])]:s("div",{staticClass:"mx-auto"},[5==i.status__id?s("v-icon",{staticStyle:{color:"green"}},[t._v("fa-solid fa-square-check")]):t._e()],1),t.superuser?s("v-menu",{attrs:{"offset-x":"",left:""},scopedSlots:t._u([{key:"activator",fn:function(e){var i=e.on,a=e.attrs;return[s("div",t._g(t._b({staticClass:"ms-2 dots-vertical"},"div",a,!1),i),[s("v-icon",[t._v("mdi-dots-vertical")])],1)]}}],null,!0)},[s("v-list",[s("v-list-item",[s("v-list-item-title",[t._v("Удалить")])],1)],1)],1):s("div",{staticStyle:{width:"32px"}}),s("div",{staticClass:"ps-2 dots-vertical",on:{click:function(e){return e.stopPropagation(),t.menu.apply(null,arguments)}}})],2)]}}],null,!0)})],1)],1)],1)],1)},a=[],l=s(30381),r=s.n(l),n=s(20629),o=s(43958),d=s(54634),c=s(45296);const{mapMutations:u,mapActions:p}=(0,n._p)("filterslogic"),f=(0,n._p)("globalstore");var h={components:{FiltersBar:o.Z,FInputSearch:d.Z},data:()=>({model:"",search:"",ws:null,projectid:null,taskid:null,workid:null,superuser:!1,childHeaders:[{text:"Код",value:"id"},{text:"Название",value:"name"},{text:"Исполнитель",value:"responsible.sn"},{text:"Срок",value:"dateend"},{text:"Статус",value:"status.name"}],pagetitle:"",menu:!1,childList:[],parentList:[]}),methods:{...f.mapMutations(["set_assign_id"]),...u(["setFields"]),...p(["clear","getFilters","addFilter","activefilters"]),...f.mapGetters(["getassign_id"]),async createproj(){let t=await c.be.post("/createproj");console.log(t),this.$router.push(`/project/${t.data.id}`)},timediff(t){return r()(t).isValid()?r()(t).locale("ru").fromNow():"Не установлен"},formatDate(t){return t&&r()(t).isValid()?r()(t).format("DD.MM.YYYY"):""},build(t){t.payload.length>0?this.parentList=t.payload:this.parentList=[]},async updateData(){let t=await this.activefilters();for(let e of Object.keys(t))if(["assignment__status__in"].includes(e)){let s=[];t[e].forEach((t=>{s.push(t.id)})),t["status__in"]=s,delete t[e]}this.ws.send({action:"getfilter",payload:t})},find_rp(t){const e=t.find((t=>2==t.role.id));return void 0==e?"Не назначен":e.user.sn},update(){console.log("UPDATE")},titler(t=""){this.pagetitle="Поручения"},clickRow(t,e){this.$route.path;console.log("новый роут-----",e.item);let s={id:e.item.id};this.set_assign_id(s),this.$router.push({path:`/project/${e.item.parent.parent.parent.id}/task/${e.item.parent.parent.id}/work/${e.item.parent.id}`})},wsconnect(){this.ws=new this.$pws,this.ws.start(`/reestr${this.$route.path}`),this.ws.addEvent("onmessage",(t=>{const e=JSON.parse(t.data);console.log(e,"dataonmess");try{this[e.action](e)}catch(s){console.log(s)}}))}},watch:{$route(t,e){this.ws.stop(),this.parentList=[],this.titler(),this.wsconnect()}},mounted(){this.superuser=this.$store.getters["auth/getSuperUser"],this.setFields({assignment__status:{module:"mult"}}),this.getFilters([{assignment__status:{name:"assignment__status",sort:"id",related_name:"name"}}],!0).then((async t=>{console.log(t,"data")})),this.wsconnect(),this.titler()},destroyed(){this.ws.stop()}},m=h,_=s(43736),v=s(43453),g=s.n(v),w=s(34145),y=s(60266),b=s(82118),k=s(50629),x=s(4324),C=s(65808),$=s(54525),Z=s(79500),V=s(44568),S=s(29592),D=s(11713),F=(0,_.Z)(m,i,a,!1,null,"4817ef73",null),L=F.exports;g()(F,{VCard:w.Z,VCol:y.Z,VContainer:b.Z,VDataTable:k.Z,VIcon:x.Z,VList:C.Z,VListItem:$.Z,VListItemTitle:Z.V9,VMenu:V.Z,VProgressLinear:S.Z,VRow:D.Z})}}]);
//# sourceMappingURL=400.2243b9dc.js.map