|
@@ -21,7 +21,11 @@ |
|
|
<div class="newProj_title"> |
|
|
<div class="newProj_title"> |
|
|
输入项目名称 |
|
|
输入项目名称 |
|
|
</div> |
|
|
</div> |
|
|
<el-button type="primary" class="nextbtn" @click.stop="enterTemplateSelect()">下一步</el-button> |
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
class="nextbtn" |
|
|
|
|
|
@click.stop="enterTemplateSelect()" |
|
|
|
|
|
>下一步</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="newProj_content"> |
|
|
<div class="newProj_content"> |
|
|
<div class="upload_img"> |
|
|
<div class="upload_img"> |
|
@@ -68,7 +72,11 @@ |
|
|
:class="{'header-bottom-shadow': isProjDescScroll}" |
|
|
:class="{'header-bottom-shadow': isProjDescScroll}" |
|
|
> |
|
|
> |
|
|
<template #right> |
|
|
<template #right> |
|
|
<el-button @click.stop="enterTemplateImprove()" class="slot_btn" :disabled="!selectTemplate.Id">选定模板</el-button> |
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
@click.stop="enterTemplateImprove()" |
|
|
|
|
|
class="slot_btn" |
|
|
|
|
|
:disabled="!selectTemplate.Id" |
|
|
|
|
|
>选定模板</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</TopHeader> |
|
|
</TopHeader> |
|
|
<div class="template_select_content"> |
|
|
<div class="template_select_content"> |
|
@@ -84,7 +92,10 @@ |
|
|
><i class="el-icon-check"></i></div> |
|
|
><i class="el-icon-check"></i></div> |
|
|
<span class="template_info_name">{{item.TempName}}</span> |
|
|
<span class="template_info_name">{{item.TempName}}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="!templateList.length" class="template_empty">没有可供使用的项目模板,请联系管理员。</div> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
v-if="!templateList.length" |
|
|
|
|
|
class="template_empty" |
|
|
|
|
|
>没有可供使用的项目模板,请联系管理员。</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
@@ -148,7 +159,8 @@ import * as templateService from "@/services/template"; |
|
|
import { fetchAddressBook, getUserListByNode } from "@/services/user.js"; |
|
|
import { fetchAddressBook, getUserListByNode } from "@/services/user.js"; |
|
|
import { wrapOssProtocol, getFileUrl } from "@/services/oss"; |
|
|
import { wrapOssProtocol, getFileUrl } from "@/services/oss"; |
|
|
import FileUploader from "@/components/file-uploader"; |
|
|
import FileUploader from "@/components/file-uploader"; |
|
|
import { fetchApi } from "@/utils/request"; |
|
|
|
|
|
|
|
|
import { fetchApi, wrapErrorHint } from "@/utils/request"; |
|
|
|
|
|
import { notify } from "@/utils/tool"; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
AppHeader, |
|
|
AppHeader, |
|
@@ -157,7 +169,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
props: {}, |
|
|
props: {}, |
|
|
data() { |
|
|
data() { |
|
|
|
|
|
const { parentFolderId } = this.$route.params; |
|
|
|
|
|
console.log("parentFolderId: ", parentFolderId); |
|
|
return { |
|
|
return { |
|
|
|
|
|
parentFolderId, // 互链项目 |
|
|
companyId: sessionStorage.companyId, |
|
|
companyId: sessionStorage.companyId, |
|
|
isProjName: true, |
|
|
isProjName: true, |
|
|
isTemSelect: false, |
|
|
isTemSelect: false, |
|
@@ -290,7 +305,9 @@ export default { |
|
|
temp = Math.ceil(Math.random() * 10); |
|
|
temp = Math.ceil(Math.random() * 10); |
|
|
} |
|
|
} |
|
|
this.srcIndex = temp; |
|
|
this.srcIndex = temp; |
|
|
this.coverSrc = `static/img/faceImg/face${`${100 + this.srcIndex}`.slice(1)}.png` |
|
|
|
|
|
|
|
|
this.coverSrc = `static/img/faceImg/face${`${100 + this.srcIndex}`.slice( |
|
|
|
|
|
1 |
|
|
|
|
|
)}.png`; |
|
|
this.newProjData.projectData.showImgUrl = this.coverSrc; |
|
|
this.newProjData.projectData.showImgUrl = this.coverSrc; |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
@@ -305,7 +322,9 @@ export default { |
|
|
* 获取模板列表数据 |
|
|
* 获取模板列表数据 |
|
|
*/ |
|
|
*/ |
|
|
async getSelectTemplateData() { |
|
|
async getSelectTemplateData() { |
|
|
const templateListRes = await templateService.queryTemplateByCompanyId(this.companyId); |
|
|
|
|
|
|
|
|
const templateListRes = await templateService.queryTemplateByCompanyId( |
|
|
|
|
|
this.companyId |
|
|
|
|
|
); |
|
|
const templateList = templateListRes.Data || []; |
|
|
const templateList = templateListRes.Data || []; |
|
|
this.templateList = templateList; |
|
|
this.templateList = templateList; |
|
|
|
|
|
|
|
@@ -378,37 +397,37 @@ export default { |
|
|
this.selectTemplate.Id |
|
|
this.selectTemplate.Id |
|
|
); |
|
|
); |
|
|
this.checkNewProjData.Node = res.Data; |
|
|
this.checkNewProjData.Node = res.Data; |
|
|
this.$fetchApi("project/createProject", this.checkNewProjData) |
|
|
|
|
|
|
|
|
const iParams = { ...this.checkNewProjData }; |
|
|
|
|
|
if (this.parentFolderId) { |
|
|
|
|
|
iParams.FolderId = this.parentFolderId; |
|
|
|
|
|
} |
|
|
|
|
|
this.$fetchApi("project/createProject", iParams) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
if (res.Code === 0) { |
|
|
|
|
|
thisApp.$notify({ |
|
|
|
|
|
message: "新项目创建成功。", |
|
|
|
|
|
type: ["success"], |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
wrapErrorHint(res); |
|
|
|
|
|
if (res.Code !== 0) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
thisApp.$notify({ |
|
|
|
|
|
message: "新项目创建成功。", |
|
|
|
|
|
type: ["success"], |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
sessionStorage.projId = res.Data; |
|
|
|
|
|
sessionStorage.createUserID = sessionStorage.userId; |
|
|
|
|
|
sessionStorage.templateID = this.selectTemplate.Id; |
|
|
|
|
|
sessionStorage.allocated = 0; |
|
|
|
|
|
|
|
|
sessionStorage.projId = res.Data; |
|
|
|
|
|
sessionStorage.createUserID = sessionStorage.userId; |
|
|
|
|
|
sessionStorage.templateID = this.selectTemplate.Id; |
|
|
|
|
|
sessionStorage.allocated = 0; |
|
|
|
|
|
|
|
|
// 新建项目新建完成后直接到达工作指派页面 |
|
|
|
|
|
this.$router |
|
|
|
|
|
.push({ |
|
|
|
|
|
name: "projdetail", |
|
|
|
|
|
query: { |
|
|
|
|
|
isShowDistworkPage: true, |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
console.log(err); |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
thisApp.$notify.error({ |
|
|
|
|
|
message: `项目创建失败, 请稍后重试。`, |
|
|
|
|
|
offset: 100, |
|
|
|
|
|
duration: 5000, |
|
|
|
|
|
|
|
|
// 新建项目新建完成后直接到达工作指派页面 |
|
|
|
|
|
this.$router |
|
|
|
|
|
.push({ |
|
|
|
|
|
name: "projdetail", |
|
|
|
|
|
query: { |
|
|
|
|
|
isShowDistworkPage: true, |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
console.log(err); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch((err) => console.log(err)); |
|
|
.catch((err) => console.log(err)); |
|
|
const params = { |
|
|
const params = { |
|
@@ -636,7 +655,7 @@ export default { |
|
|
.template_empty { |
|
|
.template_empty { |
|
|
margin-top: 100px; |
|
|
margin-top: 100px; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
color: #C0C4CC; |
|
|
|
|
|
|
|
|
color: #c0c4cc; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.template_info:hover { |
|
|
.template_info:hover { |
|
|