"use strict";(self["webpackChunklin_cms_vue"]=self["webpackChunklin_cms_vue"]||[]).push([[9703,2047,3888],{82047:function(t,e,r){r.r(e);var o=r(91114),a=r(96557);class n{constructor({uPage:t=0,uCount:e=5,lPage:r=0,lCount:a=10,sPage:n=0,sCount:s=10}){(0,o.A)(this,"name",null),(0,o.A)(this,"start",null),(0,o.A)(this,"end",null),(0,o.A)(this,"keyword",null),(0,o.A)(this,"relationId",null),0===t&&(this.uPage=t),e&&(this.uCount=e),0===r&&(this.lPage=r),a&&(this.lCount=a),0===n&&(this.sPage=n),s&&(this.sCount=s)}async increaseUpage(){this.uPage+=1}async increaseLpage(){this.lPage+=1}increaseSpage(){this.sPage+=1}init(){this.lPage=0,this.uPage=0,this.sPage=0}setBaseInfo(t,e,r){this.name=t,this.start=e,this.end=r}setBaseInfo2(t,e,r){this.relationId=t,this.start=e,this.end=r}setKeyword(t){this.keyword=t}async addTestLog(){const t=await(0,a.get)("cms/test/info");return t}async getLoggedUsers({count:t,page:e}){const r=await(0,a.get)("cms/log/users",{count:t||this.uCount,page:e||this.uPage});return r}async getLogs({count:t,page:e,name:r,start:o,end:n,next:s=!1}){s||this.setBaseInfo(r,o,n),0===e&&(this.lPage=0);const i=await(0,a["default"])({url:"cms/log",params:{count:t||this.lCount,page:e||this.lPage,name:r||this.name,start:o||this.start,end:n||this.end},handleError:!0});return i}async searchLogs({count:t,page:e,keyword:r,name:o,start:n,end:s,next:i=!1}){i||(this.setBaseInfo(o,n,s),this.setKeyword(r)),0===e&&(this.sPage=0);try{const i=await(0,a.get)("cms/log/search",{count:t||this.sCount,page:e||this.sPage,keyword:r||this.keyword,name:o||this.name,start:n||this.start,end:s||this.end});return i}catch(c){console.log(c)}}async moreUserPage(){return await this.increaseUpage(),this.getLoggedUsers({})}async moreLogPage(){return await this.increaseLpage(),this.getLogs({next:!0})}async moreSearchPage(){return this.increaseSpage(),this.searchLogs({next:!0})}async relationLogs({count:t,page:e,keyword:r,relationId:o,start:n,end:s,next:i=!1}){i||(this.setBaseInfo2(o,n,s),this.setKeyword(r)),0===e&&(this.sPage=0);try{const i=await(0,a.get)(`cms/log/relation_log/${o}`,{count:t||this.sCount,page:e||this.sPage,keyword:r||this.keyword,relationId:o||this.relationId,start:n||this.start,end:s||this.end});return i}catch(c){console.log(c)}}}e["default"]=new n({})},3888:function(t,e,r){r.r(e);var o=r(96557);class a{async createProjectInfo(t){return(0,o["default"])({method:"post",url:"v1/projectInfo",data:t})}async getProjectInfo(t){const e=await(0,o.get)(`v1/projectInfo/${t}`);return e}async getProjectInfoDetail(t){const e=await(0,o.get)(`v1/projectInfo/detail/${t}`);return e}async editProjectInfo(t,e){const r=await(0,o.put)(`v1/projectInfo/${t}`,e);return r}async deleteProjectInfo(t){const e=await(0,o._delete)(`v1/projectInfo/${t}`);return e}async getProjectInfoList(t){return(0,o["default"])({method:"get",url:"v1/projectInfo/list",params:t,handleError:!0})}async getProjectInfoPage(t){return(0,o["default"])({method:"get",url:"v1/projectInfo/page",params:t,handleError:!0})}async getProjectStatistics(t){return(0,o["default"])({method:"get",url:"v1/projectInfo/hourStatistics",params:t,handleError:!0})}async getProjectStatisticsUnconfirm(t){return(0,o["default"])({method:"get",url:"v1/projectInfo/all/hourStatistics",params:t,handleError:!0})}async editProjectSetUp(t,e){const r=await(0,o.put)(`v1/projectInfo/projectSetUp/${t}`,e);return r}async editProjectInfoStart(t,e){const r=await(0,o.put)(`v1/projectInfo/projectStart/${t}`,e);return r}async editProjectInfoComplete(t,e){const r=await(0,o.put)(`v1/projectInfo/projectComplete/${t}`,e);return r}async editProjectInfoTermination(t,e){const r=await(0,o.put)(`v1/projectInfo/projectTermination/${t}`,e);return r}async editProjectHours(t,e){const r=await(0,o.put)(`v1/projectInfo/projectHours/${t}`,e);return r}getProjectBoard(t){return(0,o["default"])({method:"post",url:"v1/projectInfo/board",data:t,handleError:!0})}editProjectProBusDate(t,e){const r=(0,o.put)(`v1/projectInfo/projectProBusDate/${t}`,e);return r}getProjectBoardByMonth(t){return(0,o["default"])({method:"post",url:"v1/projectInfo/board/month",data:t,handleError:!0})}}e["default"]=new a},69703:function(t,e,r){r.r(e),r.d(e,{default:function(){return d}});var o=r(20641);const a={class:"container"};function n(t,e,r,n,s,i){const c=(0,o.g2)("el-table-column"),u=(0,o.g2)("el-table"),l=(0,o.gN)("loading");return(0,o.bo)(((0,o.uX)(),(0,o.CE)("div",a,[(0,o.bF)(u,{size:"small","show-summary":"",data:n.projectStatistics,stripe:"",style:{width:"100%"}},{default:(0,o.k6)((()=>[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(n.projectStatisticsCloums,(t=>((0,o.uX)(),(0,o.Wv)(c,{key:t.prop,prop:t.prop,label:t.label},null,8,["prop","label"])))),128))])),_:1},8,["data"])])),[[l,t.loading]])}r(82047);var s=r(3888),i=r(50953),c={props:{editId:{type:String,default:null}},setup(t,e){const r=(0,i.KR)(null),a=(0,i.KR)({}),n=(0,i.KR)([]),c=(0,i.KR)(!1),u=(0,i.KR)(""),l=(0,i.KR)([{label:"姓名",prop:"create_user_name"},{label:"计划工时",prop:"estimated_hours"},{label:"实际工时",prop:"actual_hours"},{label:"实际工时百分比",prop:"actual_hours_percent"}]);(0,o.sV)((()=>{d(),h(),p()}));const d=async()=>{t.editId&&(u.value=t.editId)},p=async()=>{t.editId&&(a.value=await s["default"].getProjectInfoDetail(t.editId))},h=async()=>{n.value=[];const e={project_Id:t.editId},r=await s["default"].getProjectStatisticsUnconfirm(e);n.value=r},g=()=>{r.value.resetFields()},f=()=>{e.emit("editClose")};return{back:f,projectStatisticsCloums:l,projectStatistics:n,finished:c,form:r,resetForm:g,project:a}}},u=r(66262);const l=(0,u.A)(c,[["render",n],["__scopeId","data-v-4cff7ac8"]]);var d=l},91114:function(t,e,r){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=o(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function n(t){var e=a(t,"string");return"symbol"==o(e)?e:e+""}function s(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{A:function(){return s}})}}]);
|