chunk-2b37a1b0.9e3b3d2f.js
5.41 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b37a1b0"],{1099:function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"dashboard-container"},[n("div",{staticStyle:{padding:"20px"}},[t._v("欢迎使用绿纤ERP管理系统")])])}],o=n("5530"),r=n("1641"),c=n("f66b"),u=n("c797"),s=n("2f62"),d={name:"dashboard",components:{Setting:c["default"],PortalLayout:u["a"]},data:function(){return{portalId:"",layout:[],ajaxing:!0,loading:!1}},computed:Object(o["a"])({},Object(s["b"])(["userInfo"])),created:function(){this.portalId=this.userInfo.portalId,this.getData()},methods:{getData:function(){var t=this;if(this.loading=!0,this.layout=[],!this.portalId)return this.loading=!1,void(this.ajaxing=!1);Object(r["g"])(this.portalId).then((function(a){if(a.data&&a.data.formData){var n=JSON.parse(a.data.formData);t.layout=n.layout||[]}t.ajaxing=!1,setTimeout((function(){t.loading=!1}),500)})).catch((function(){t.loading=!1,t.ajaxing=!1}))},refresh:function(t){t&&(this.portalId=t,this.getData())}}},l=d,f=(n("33dc"),n("2877")),h=Object(f["a"])(l,e,i,!1,null,"24ccf2e4",null);a["default"]=h.exports},1641:function(t,a,n){"use strict";n.d(a,"i",(function(){return i})),n.d(a,"h",(function(){return o})),n.d(a,"c",(function(){return r})),n.d(a,"e",(function(){return c})),n.d(a,"b",(function(){return u})),n.d(a,"a",(function(){return s})),n.d(a,"f",(function(){return d})),n.d(a,"j",(function(){return l})),n.d(a,"d",(function(){return f})),n.d(a,"g",(function(){return h}));var e=n("b775");function i(t){return Object(e["a"])({url:"/api/visualdev/Portal",method:"get",data:t})}function o(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t),method:"get"})}function r(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t),method:"DELETE"})}function c(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t.id),method:"PUT",data:t})}function u(t){return Object(e["a"])({url:"/api/visualdev/Portal",method:"post",data:t})}function s(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t,"/Actions/Copy"),method:"POST"})}function d(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t,"/Actions/ExportData"),method:"POST"})}function l(t){return Object(e["a"])({url:"/api/visualdev/Portal/Selector",method:"GET",data:{type:t}})}function f(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t,"/Actions/SetDefault"),method:"PUT"})}function h(t){return Object(e["a"])({url:"/api/visualdev/Portal/".concat(t,"/auth"),method:"GET"})}},2476:function(t,a,n){t.exports=n.p+"static/img/portal-nodata.3cf41816.png"},3191:function(t,a,n){"use strict";n.d(a,"e",(function(){return i})),n.d(a,"c",(function(){return o})),n.d(a,"d",(function(){return r})),n.d(a,"b",(function(){return c})),n.d(a,"a",(function(){return u})),n.d(a,"f",(function(){return s}));var e=n("b775");function i(){return Object(e["a"])({url:"/api/visualdev/Dashboard/FlowTodoCount",method:"get"})}function o(){return Object(e["a"])({url:"/api/visualdev/Dashboard/Email",method:"get"})}function r(){return Object(e["a"])({url:"/api/visualdev/Dashboard/FlowTodo",method:"get"})}function c(){return Object(e["a"])({url:"/api/visualdev/Dashboard/CountData",method:"get"})}function u(){return Object(e["a"])({url:"/api/visualdev/Dashboard/Article",method:"get"})}function s(){return Object(e["a"])({url:"/api/visualdev/Dashboard/ProjectMonthLine",method:"get"})}},"33dc":function(t,a,n){"use strict";n("54e0")},"54e0":function(t,a,n){},"9c16":function(t,a,n){},c13c:function(t,a,n){t.exports=n.p+"static/img/dashboard-nodata.fc62cb59.png"},f0af:function(t,a,n){"use strict";n("9c16")},f66b:function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("el-drawer",{staticClass:"NCC-common-drawer board",attrs:{title:"切换门户",visible:t.drawer,direction:"rtl",size:"260px"},on:{"update:visible":function(a){t.drawer=a}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"main",attrs:{"element-loading-text":t.loadingText}},[t.list.length?n("div",t._l(t.list,(function(a,e){return n("div",{key:e,staticClass:"item"},[n("p",{staticClass:"item-title"},[t._v(t._s(a.fullName))]),n("div",{staticClass:"item-list"},t._l(a.children,(function(a,e){return n("div",{key:e,staticClass:"item-list-item",class:{active:t.activeId===a.id},on:{click:function(n){return t.selectItem(a.id)}}},[n("p",[t._v(t._s(a.fullName))]),n("i",{staticClass:"el-icon-success"})])})),0)])})),0):n("p",{staticClass:"noData-txt"},[t._v(t._s(t.$t("common.noData")))])])])},i=[],o=n("1641"),r={name:"Setting",data:function(){return{drawer:!1,list:[],loading:!0,loadingText:"数据加载中",activeId:""}},methods:{init:function(t){this.drawer=!0,this.activeId=t,this.getList()},getList:function(){var t=this;this.loading=!0,this.loadingText="数据加载中",Object(o["j"])(1).then((function(a){t.list=a.data.list,t.loading=!1})).catch((function(){t.loading=!1}))},selectItem:function(t){var a=this;this.activeId!=t&&(this.loading=!0,this.loadingText="切换门户中",Object(o["d"])(t).then((function(n){a.activeId=t,a.$emit("refresh",t),a.loading=!1,a.$store.commit("user/SET_USERINFO_PORTALID",t),a.$message({message:n.msg,type:"success",duration:1e3})})).catch((function(){a.loading=!1})))}}},c=r,u=(n("f0af"),n("2877")),s=Object(u["a"])(c,e,i,!1,null,"1ea89626",null);a["default"]=s.exports}}]);