@@ -3666,6 +3666,7 @@ button:focus { | |||||
bottom: 10px; | bottom: 10px; | ||||
font-size: 12px; | font-size: 12px; | ||||
background-color: #fff; | background-color: #fff; | ||||
color: #000; | |||||
} | } | ||||
.listUpdateBtn .webuploader-pick{ | .listUpdateBtn .webuploader-pick{ | ||||
width: 80px; | width: 80px; | ||||
@@ -0,0 +1,25 @@ | |||||
import { fetchApi , wrapErrorHint} from '@/utils/request'; | |||||
/** | |||||
* 用户拥有的项目 | |||||
* @param {string} id | |||||
*/ | |||||
export async function queryProjectsByUserId(userId){ | |||||
const res = await fetchApi('project/queryProjectListByUserId',{userId:userId}) | |||||
return wrapErrorHint(res); | |||||
} | |||||
/** | |||||
* 项目详情 | |||||
*/ | |||||
export async function QueryProjectInfoByProjId(projId){ | |||||
const res = await fetchApi('project/QueryProjectInfoByProjId',{projId:projId}) | |||||
return wrapErrorHint(res); | |||||
} | |||||
/** | |||||
* 编辑项目 | |||||
*/ | |||||
export async function EditProject(proj){ | |||||
const res = await fetchApi('project/EditProject',proj) | |||||
return wrapErrorHint(res); | |||||
} |
@@ -88,7 +88,7 @@ export default axios; | |||||
function mapApiPathToFullPath(path) { | function mapApiPathToFullPath(path) { | ||||
const [service] = path.split('/'); | const [service] = path.split('/'); | ||||
const fullpath = `api/${service === 'template' ? 'pms' : 'cms'}/${service === 'authentication' ? '' : 'v1/'}${path}`; | |||||
const fullpath = `api/${(service === 'template' || service ==='project') ? 'pms' : 'cms'}/${service === 'authentication' ? '' : 'v1/'}${path}`; | |||||
let method = 'GET'; | let method = 'GET'; | ||||
switch (path) { | switch (path) { | ||||
@@ -109,6 +109,7 @@ function mapApiPathToFullPath(path) { | |||||
case 'template/addTemplateNodeModelFile': | case 'template/addTemplateNodeModelFile': | ||||
case 'template/createNestedRelevance': | case 'template/createNestedRelevance': | ||||
case 'template/deleteNestedRelevance': | case 'template/deleteNestedRelevance': | ||||
case 'project/EditProject': | |||||
// case 'template/deleteTemplateNodeModelFile': | // case 'template/deleteTemplateNodeModelFile': | ||||
method = 'POST'; | method = 'POST'; | ||||
break; | break; | ||||
@@ -108,19 +108,6 @@ | |||||
<div class="yiyun_col-6"> | <div class="yiyun_col-6"> | ||||
<div class="pageImgBox"> | <div class="pageImgBox"> | ||||
<img :src="coverSrc | resolveAvator" alt="" /> | <img :src="coverSrc | resolveAvator" alt="" /> | ||||
<!-- <file-Uploader | |||||
:mutiple="false" | |||||
:label="uploadLabel" | |||||
:auto="true" | |||||
accept="image" | |||||
ref="webUploadlist" | |||||
:btn-id="filePicker" | |||||
:companyId="uploadCompId" | |||||
:typeId="uploadTypeCover" | |||||
@upload-success="coverUploadSuccess" | |||||
:url="chunkUploadUrl" class="listUpdateBtn"> | |||||
</file-Uploader> --> | |||||
<file-uploader | <file-uploader | ||||
:on-success="coverUploadSuccess" | :on-success="coverUploadSuccess" | ||||
class="listUpdateBtn editCoverBtn" | class="listUpdateBtn editCoverBtn" | ||||
@@ -577,16 +564,7 @@ | |||||
default: false | default: false | ||||
} | } | ||||
}, | }, | ||||
filters:{ | |||||
resolveCover(imgSrc){ | |||||
if(this.imgList.includes(imgSrc)){ | |||||
return imgSrc | |||||
} | |||||
const imgsrc=getFileUrl(imgSrc); | |||||
return imgsrc | |||||
} | |||||
}, | |||||
data() { | data() { | ||||
return { | return { | ||||
imgSrc: process.env.API_HOST + 'archives/cover?path=', | imgSrc: process.env.API_HOST + 'archives/cover?path=', | ||||
@@ -626,18 +604,6 @@ | |||||
"listProjProp": [], | "listProjProp": [], | ||||
"userId": "", | "userId": "", | ||||
}, // 新建项目 | }, // 新建项目 | ||||
imgList:[ | |||||
'static\img\faceImg\face01.png', | |||||
'static\img\faceImg\face02.png', | |||||
'static\img\faceImg\face03.png', | |||||
'static\img\faceImg\face04.png', | |||||
'static\img\faceImg\face05.png', | |||||
'static\img\faceImg\face06.png', | |||||
'static\img\faceImg\face07.png', | |||||
'static\img\faceImg\face08.png', | |||||
'static\img\faceImg\face09.png', | |||||
'static\img\faceImg\face10.png', | |||||
], | |||||
listTempProp: [], | listTempProp: [], | ||||
listProjProp: [], | listProjProp: [], | ||||
checked: false, | checked: false, | ||||
@@ -704,7 +670,6 @@ | |||||
created: function() { | created: function() { | ||||
}, | }, | ||||
mounted: function() { | mounted: function() { | ||||
this.listDeptUsers(); | this.listDeptUsers(); | ||||
this.getSelectTemplateData(); | this.getSelectTemplateData(); | ||||
@@ -1326,30 +1291,6 @@ | |||||
console.log(error); | console.log(error); | ||||
}); | }); | ||||
}, | |||||
/** | |||||
* 设置系统封面 | |||||
*/ | |||||
setSystemCover: function() { | |||||
// this.coverSrc = "static\\img\\faceImg\\face" + this.srcIndex + ".png"; | |||||
// this.newProjData.projectData.showImgUrl = this.srcIndex; | |||||
// if (this.srcIndex < 9) { | |||||
// this.srcIndex = this.srcIndex + 1; | |||||
// } else { | |||||
// this.srcIndex = 1; | |||||
// } | |||||
// setSystemCover: function() { | |||||
// this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | |||||
// this.newProjData.projectData.showImgUrl = this.srcIndex; | |||||
// if (this.srcIndex < 9) { | |||||
// this.srcIndex = this.srcIndex + 1; | |||||
// } else { | |||||
// this.srcIndex = 1; | |||||
// } | |||||
// }, | |||||
}, | }, | ||||
/** | /** | ||||
* 设置随机封面 | * 设置随机封面 | ||||
@@ -1368,7 +1309,6 @@ | |||||
this.newProjData.projectData.showImgUrl = this.srcIndex; | this.newProjData.projectData.showImgUrl = this.srcIndex; | ||||
}, | }, | ||||
/** | /** | ||||
* 封面上传成功时 | * 封面上传成功时 | ||||
*/ | */ | ||||
@@ -162,32 +162,37 @@ | |||||
<div class="yiyun_col-6 fl"> | <div class="yiyun_col-6 fl"> | ||||
<div class="bianju_item_fr"> | <div class="bianju_item_fr"> | ||||
<el-form-item label="项目负责人:"> | <el-form-item label="项目负责人:"> | ||||
<span>{{ nowProject.userCnName }}</span> | |||||
<span>{{nowProject.ProjCreateUserName}}</span> | |||||
</el-form-item> | </el-form-item> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="yiyun_col-6 fl"> | <div class="yiyun_col-6 fl"> | ||||
<div class="bianju_item_fr"> | <div class="bianju_item_fr"> | ||||
<el-form-item label="创建时间:"> | <el-form-item label="创建时间:"> | ||||
<span>{{ nowProject.strCreateTime }}</span> | |||||
<span>{{ nowProject.ProjCreateTime }}</span> | |||||
</el-form-item> | </el-form-item> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="yiyun_col-12 fl" v-for="prop in listProjProp" :key="prop.projPropID"> | |||||
<div class="yiyun_col-12 fl" v-for="prop in listProjProp" :key="prop.TempPropId"> | |||||
<div class="bianju_item_fr"> | <div class="bianju_item_fr"> | ||||
<el-form-item :label='prop.propName+":"'> | |||||
<el-input v-model="prop.propValue" placeholder="输入" class="labelinputbefore" v-if="isShowInfoEdit"></el-input> | |||||
<span v-if="!isShowInfoEdit">{{ prop.propValue }}</span> | |||||
<el-form-item :label='prop.PropertyName+":"'> | |||||
<el-input v-model="prop.PropValue" placeholder="输入" class="labelinputbefore" v-if="isShowInfoEdit"></el-input> | |||||
<span v-if="!isShowInfoEdit">{{ prop.PropValue }}</span> | |||||
</el-form-item> | </el-form-item> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="yiyun_col-12 fl mt-10"> | <div class="yiyun_col-12 fl mt-10"> | ||||
<div class="clear"></div> | <div class="clear"></div> | ||||
<div class="yiyun_col-6"> | <div class="yiyun_col-6"> | ||||
<div class="pageImgBox ml-110"> | |||||
<img v-lazy="coverSrc" alt="" /> | |||||
<file-Uploader v-show="isShowSaveAllBtn" :mutiple="false" label="编辑封面" :auto="true" accept="image" ref="webUploadlist" :btn-id="filePicker" :companyId="uploadCompId" :typeId="uploadTypeCover" @upload-success="coverUploadSuccess" :url="chunkUploadUrl" class="listUpdateBtn"> | |||||
</file-Uploader> | |||||
<div class="pageImgBox"> | |||||
<img :src="coverSrc | resolveAvator" alt="" /> | |||||
<file-uploader | |||||
v-show="isShowSaveAllBtn" | |||||
:on-success="coverUploadSuccess" | |||||
class="listUpdateBtn editCoverBtn" | |||||
> | |||||
<span>编辑</span> | |||||
</file-uploader> | |||||
<span class="faceBtn" v-show="isShowSaveAllBtn" @click="setSystemCover">使用随机封面</span> | <span class="faceBtn" v-show="isShowSaveAllBtn" @click="setSystemCover">使用随机封面</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -518,7 +523,14 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import * as prjService from '@/services/project' | |||||
import { wrapOssProtocol} from "@/services/oss"; | |||||
import FileUploader from "@/components/file-uploader"; | |||||
import dayjs from 'dayjs' | |||||
export default { | export default { | ||||
components:{ | |||||
FileUploader | |||||
}, | |||||
props: { | props: { | ||||
isProjManager: { | isProjManager: { | ||||
type: Boolean, | type: Boolean, | ||||
@@ -531,6 +543,10 @@ | |||||
projId:{ | projId:{ | ||||
type:String, | type:String, | ||||
default:'' | default:'' | ||||
}, | |||||
createUserId:{ | |||||
type:String, | |||||
default:'' | |||||
} | } | ||||
}, | }, | ||||
data() { | data() { | ||||
@@ -579,7 +595,7 @@ | |||||
isShowSetUsers: false, // 分配工作人员面板 | isShowSetUsers: false, // 分配工作人员面板 | ||||
isShowProjInfo: true, // 项目概况 | isShowProjInfo: true, // 项目概况 | ||||
isShowInfoEdit: false, // 项目概况编辑 | isShowInfoEdit: false, // 项目概况编辑 | ||||
isShowEditProjBtn: false, // 编辑项目概况按钮 | |||||
isShowEditProjBtn: true, // 编辑项目概况按钮 | |||||
isShowSaveAllBtn: false, // 保存全部信息按钮 | isShowSaveAllBtn: false, // 保存全部信息按钮 | ||||
currWorkName: "", // 分配人员时工作名称 | currWorkName: "", // 分配人员时工作名称 | ||||
currentProjId:"", | currentProjId:"", | ||||
@@ -587,8 +603,7 @@ | |||||
}; | }; | ||||
}, | }, | ||||
mounted: function () { | mounted: function () { | ||||
this.listProjFolder(); | |||||
this.listDeptUsers(); | |||||
//this.listDeptUsers(); | |||||
}, | }, | ||||
computed: { | computed: { | ||||
/** | /** | ||||
@@ -684,48 +699,72 @@ | |||||
/** | /** | ||||
* 保存项目概况 | * 保存项目概况 | ||||
*/ | */ | ||||
saveProjectInfo: function () { | |||||
async saveProjectInfo(){ | |||||
var CustomProps=[]; | |||||
this.listProjProp.forEach(item=>{ | |||||
var prop = {}; | |||||
prop.Id=item.ProjPropId; | |||||
prop.PropValue=item.PropValue; | |||||
CustomProps.push(prop); | |||||
}) | |||||
var updateData = { | |||||
ProjId: this.currentProjId, | |||||
ImgeUrl:this.nowProject.ShowImgUrl, | |||||
Projprops: CustomProps, | |||||
}; | |||||
console.log(updateData) | |||||
const res=await prjService.EditProject(updateData); | |||||
this.projInfo(this.currentProjId); | |||||
this.isShowSaveAllBtn = false; | this.isShowSaveAllBtn = false; | ||||
this.isShowInfoEdit = false; | this.isShowInfoEdit = false; | ||||
this.isShowEditProjBtn = true; | |||||
// 提交到数据库进行保存数据 | |||||
var thisApp = this; | |||||
var updateData = { | |||||
listProjProp: this.listProjProp, | |||||
projId: this.currentProjId, | |||||
showImageUrl:this.nowProject.showImgUrl, | |||||
userId: sessionStorage.userId | |||||
}; | |||||
thisApp | |||||
.$axios({ | |||||
method: "put", | |||||
url: encodeURI(process.env.API_HOST + "projects/prop"), | |||||
data: updateData | |||||
}) | |||||
.then(response => { | |||||
if (response.data.state == 1) { | |||||
thisApp.$notify({ | |||||
title: "恭喜您", | |||||
message: response.data.message, | |||||
type: "success", | |||||
offset: 100, | |||||
duration: 2500 | |||||
}); | |||||
thisApp.$emit("editSuccess"); | |||||
} else { | |||||
thisApp.$notify({ | |||||
title: "温馨提示", | |||||
message: response.data.message, | |||||
type: "success", | |||||
offset: 100, | |||||
duration: 5000 | |||||
}); | |||||
} | |||||
}) | |||||
.catch(error => { | |||||
console.log(error); | |||||
}); | |||||
this.isShowEditProjBtn = true; | |||||
}, | }, | ||||
// saveProjectInfo: function () { | |||||
// this.isShowSaveAllBtn = false; | |||||
// this.isShowInfoEdit = false; | |||||
// this.isShowEditProjBtn = true; | |||||
// // 提交到数据库进行保存数据 | |||||
// var thisApp = this; | |||||
// var updateData = { | |||||
// listProjProp: this.listProjProp, | |||||
// projId: this.currentProjId, | |||||
// showImageUrl:this.nowProject.showImgUrl, | |||||
// userId: sessionStorage.userId | |||||
// }; | |||||
// thisApp | |||||
// .$axios({ | |||||
// method: "put", | |||||
// url: encodeURI(process.env.API_HOST + "projects/prop"), | |||||
// data: updateData | |||||
// }) | |||||
// .then(response => { | |||||
// if (response.data.state == 1) { | |||||
// thisApp.$notify({ | |||||
// title: "恭喜您", | |||||
// message: response.data.message, | |||||
// type: "success", | |||||
// offset: 100, | |||||
// duration: 2500 | |||||
// }); | |||||
// thisApp.$emit("editSuccess"); | |||||
// } else { | |||||
// thisApp.$notify({ | |||||
// title: "温馨提示", | |||||
// message: response.data.message, | |||||
// type: "success", | |||||
// offset: 100, | |||||
// duration: 5000 | |||||
// }); | |||||
// } | |||||
// }) | |||||
// .catch(error => { | |||||
// console.log(error); | |||||
// }); | |||||
// }, | |||||
/** | /** | ||||
* 初始底部弹框 | * 初始底部弹框 | ||||
*/ | */ | ||||
@@ -1058,26 +1097,40 @@ | |||||
* 加载需要分配的文件夹 | * 加载需要分配的文件夹 | ||||
*/ | */ | ||||
listProjFolder: function () { | listProjFolder: function () { | ||||
var thisApp = this; | |||||
thisApp | |||||
.$axios({ | |||||
method: "get", | |||||
url: encodeURI( | |||||
process.env.API_HOST + "projects/info/" + this.currentProjId | |||||
) | |||||
}) | |||||
.then(response => { | |||||
if (response.data != '') | |||||
{ | |||||
thisApp.nowProject = response.data.data.projectData; | |||||
thisApp.listNewFolder = response.data.data.listFolder; | |||||
thisApp.listProjProp = response.data.data.listProjProp; | |||||
thisApp.coverSrc=thisApp.imgSrc+ thisApp.nowProject.showImgUrl; | |||||
} | |||||
}) | |||||
.catch(error => { | |||||
console.log(error); | |||||
}); | |||||
// var thisApp = this; | |||||
// thisApp | |||||
// .$axios({ | |||||
// method: "get", | |||||
// url: encodeURI( | |||||
// process.env.API_HOST + "projects/info/" + this.currentProjId | |||||
// ) | |||||
// }) | |||||
// .then(response => { | |||||
// if (response.data != '') | |||||
// { | |||||
// thisApp.nowProject = response.data.data.projectData; | |||||
// thisApp.listNewFolder = response.data.data.listFolder; | |||||
// thisApp.listProjProp = response.data.data.listProjProp; | |||||
// thisApp.coverSrc=thisApp.imgSrc+ thisApp.nowProject.showImgUrl; | |||||
// } | |||||
// }) | |||||
// .catch(error => { | |||||
// console.log(error); | |||||
// }); | |||||
}, | |||||
/** | |||||
* 加载项目信息 | |||||
*/ | |||||
async projInfo(id){ | |||||
const projectInfoRes= await prjService.QueryProjectInfoByProjId(id); | |||||
this.nowProject=projectInfoRes.Data; | |||||
this.nowProject.ProjCreateTime=dayjs(this.nowProject.ProjCreateTime).format('YYYY-MM-DD HH:mm:ss') | |||||
this.listProjProp=projectInfoRes.Data.CustomProps; | |||||
this.coverSrc=projectInfoRes.Data.ShowImgUrl; | |||||
}, | }, | ||||
/** | /** | ||||
* 获取全部的Dept数据 | * 获取全部的Dept数据 | ||||
@@ -1134,16 +1187,19 @@ | |||||
console.log(error); | console.log(error); | ||||
}); | }); | ||||
}, | }, | ||||
/** | /** | ||||
* 封面上传成功时 | * 封面上传成功时 | ||||
*/ | */ | ||||
coverUploadSuccess: function (file) { | coverUploadSuccess: function (file) { | ||||
this.nowProject.showImgUrl = file.filePath; | |||||
this.coverSrc = this.imgSrc + file.filePath; | |||||
const filePath = wrapOssProtocol(file.ossUrl); | |||||
this.coverSrc = filePath; | |||||
this.nowProject.ShowImgUrl=filePath; | |||||
}, | }, | ||||
/** | /** | ||||
* 设置系统封面 | * 设置系统封面 | ||||
*/ | */ | ||||
setSystemCover: function () { | setSystemCover: function () { | ||||
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | ||||
this.nowProject.showImgUrl = this.srcIndex; | this.nowProject.showImgUrl = this.srcIndex; | ||||
@@ -1156,6 +1212,20 @@ | |||||
this.srcIndex = 1; | this.srcIndex = 1; | ||||
} | } | ||||
}, | }, | ||||
}, | |||||
setSystemCoverRandom: function() { | |||||
var temp=Math.ceil(Math.random()*10); | |||||
while(this.srcIndex ===temp){ | |||||
temp=Math.ceil(Math.random()*10); | |||||
} | |||||
this.srcIndex=temp; | |||||
if(this.srcIndex===10){ | |||||
this.coverSrc = "static\\img\\faceImg\\face" + this.srcIndex + ".png"; | |||||
}else{ | |||||
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | |||||
} | |||||
this.nowProjData.ShowImgUrl = this.srcIndex; | |||||
}, | }, | ||||
watch: { | watch: { | ||||
isProjManager(val) { | isProjManager(val) { | ||||
@@ -1171,10 +1241,10 @@ | |||||
} | } | ||||
}, | }, | ||||
projId(val){ | projId(val){ | ||||
//console.log(val); | |||||
this.currentProjId=val; | this.currentProjId=val; | ||||
this.listProjFolder(); | |||||
this.listDeptUsers(); | |||||
this.projInfo(val);} | |||||
//this.listDeptUsers(); | |||||
} | } | ||||
} | |||||
}; | }; | ||||
</script> | </script> |
@@ -35,14 +35,6 @@ | |||||
<div class="yiyun-rows mt-20" id="new"> | <div class="yiyun-rows mt-20" id="new"> | ||||
<div class="yiyun-col-4"> | <div class="yiyun-col-4"> | ||||
<div class="yiyun_row" style="width: 95%;"> | <div class="yiyun_row" style="width: 95%;"> | ||||
<!-- 系统时间 --> | |||||
<!-- <div class="section_item fl section_item_aside_fl"> | |||||
<h1>{{ nowTime }}</h1> | |||||
<div> | |||||
<span class="nowshijian">{{ nowDate }}</span> | |||||
<span class="nowshijian">{{ welcome }}</span> | |||||
</div> | |||||
</div> --> | |||||
<timer :cnName="cnName"></timer> | <timer :cnName="cnName"></timer> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -107,7 +99,7 @@ | |||||
</span> | </span> | ||||
</span> | </span> | ||||
<el-dropdown-menu slot="dropdown"> | <el-dropdown-menu slot="dropdown"> | ||||
<el-dropdown-item @click.native="projectEdit(projItem)"> | |||||
<el-dropdown-item @click.native="openPrjInfo(projItem)"> | |||||
<span>项目概况</span> | <span>项目概况</span> | ||||
</el-dropdown-item> | </el-dropdown-item> | ||||
<el-dropdown-item | <el-dropdown-item | ||||
@@ -207,7 +199,9 @@ | |||||
> | > | ||||
<ProjSetting | <ProjSetting | ||||
:isProjManager="isProjectManager" | :isProjManager="isProjectManager" | ||||
:createUserId="createUserId" | |||||
:projId="currProjId" | :projId="currProjId" | ||||
:nowprj="nowProj" | |||||
:isSetFolder="isEditProjFolder" | :isSetFolder="isEditProjFolder" | ||||
@offDialog="closeProjSet" | @offDialog="closeProjSet" | ||||
@editSuccess="projEditSuccess" | @editSuccess="projEditSuccess" | ||||
@@ -225,6 +219,7 @@ import DistWork from "@/views/components_web/distWork/distWork"; | |||||
import NewProj from "@/views/components_web/newProj/newProj"; | import NewProj from "@/views/components_web/newProj/newProj"; | ||||
import ProjSetting from "@/views/components_web/projSetting/projSetting"; | import ProjSetting from "@/views/components_web/projSetting/projSetting"; | ||||
import { haveAccess, AccessCode } from '@/utils/access'; | import { haveAccess, AccessCode } from '@/utils/access'; | ||||
import * as prjService from '@/services/project' | |||||
import Timer from '@/views/main_web/time' | import Timer from '@/views/main_web/time' | ||||
const BMap = window.BMap; | const BMap = window.BMap; | ||||
const Velocity = window.Velocity; | const Velocity = window.Velocity; | ||||
@@ -248,8 +243,10 @@ export default { | |||||
currProjId: "", | currProjId: "", | ||||
feedbackdesc: "", | feedbackdesc: "", | ||||
projList: [], // 项目列表 | projList: [], // 项目列表 | ||||
nowProj:"", | |||||
projPageList: [], // 分页项目数据 | projPageList: [], // 分页项目数据 | ||||
isEmpty: false, | isEmpty: false, | ||||
createUserId:'', | |||||
newProjData: { | newProjData: { | ||||
projectData: { | projectData: { | ||||
projID: "", | projID: "", | ||||
@@ -386,25 +383,30 @@ export default { | |||||
/** | /** | ||||
* 获取项目数据 | * 获取项目数据 | ||||
*/ | */ | ||||
listProjects: function () { | |||||
var thisApp = this; | |||||
this.$axios({ | |||||
method: "get", | |||||
url: encodeURI( | |||||
process.env.API_HOST + "projects/" + sessionStorage.userId | |||||
), | |||||
}) | |||||
.then(function (response) { | |||||
thisApp.projList = response.data; | |||||
if (sessionStorage.login === "login") { | |||||
thisApp.projectsWithPage(); | |||||
} else { | |||||
thisApp.projectsWithPage(); | |||||
} | |||||
}) | |||||
.catch(function (error) { | |||||
console.log(error); | |||||
}); | |||||
// listProjects: function () { | |||||
// var thisApp = this; | |||||
// this.$axios({ | |||||
// method: "get", | |||||
// url: encodeURI( | |||||
// process.env.API_HOST + "projects/" + sessionStorage.userId | |||||
// ), | |||||
// }) | |||||
// .then(function (response) { | |||||
// thisApp.projList = response.data; | |||||
// if (sessionStorage.login === "login") { | |||||
// thisApp.projectsWithPage(); | |||||
// } else { | |||||
// thisApp.projectsWithPage(); | |||||
// } | |||||
// }) | |||||
// .catch(function (error) { | |||||
// console.log(error); | |||||
// }); | |||||
// }, | |||||
async listProjects(){ | |||||
const projectListRes = await prjService.queryProjectsByUserId(this.$store.state.accountId); | |||||
this.projList=projectListRes.Data; | |||||
this.projectsWithPage(); | |||||
}, | }, | ||||
/** | /** | ||||
* 设置分页项目数据 | * 设置分页项目数据 | ||||
@@ -627,6 +629,18 @@ export default { | |||||
console.log(error); | console.log(error); | ||||
}); | }); | ||||
}, | }, | ||||
/** | |||||
* 打开项目概况 | |||||
*/ | |||||
openPrjInfo(proj){ | |||||
//const projectInfoRes= await prjService.QueryProjectInfoByProjId(proj.Id); | |||||
//this.isProjectManager = projectInfoRes.Data.Status; | |||||
this.currProjId = proj.Id; | |||||
this.isShowProjSetting = true; | |||||
this.isEditProjFolder = false; | |||||
//this.nowProj=projectInfoRes.Data; | |||||
//console.log(this.nowProj.Status) | |||||
}, | |||||
/** | /** | ||||
* @description: 编辑项目概况回调 | * @description: 编辑项目概况回调 | ||||
* @param {type} | * @param {type} | ||||