|
|
@@ -478,12 +478,12 @@ export const taskMixin = {
|
|
|
.catch(() => {})
|
|
|
},
|
|
|
getBasicInfo() {
|
|
|
- if (!this.project.projectId) {
|
|
|
- return
|
|
|
- }
|
|
|
- getCostProjectDetail({
|
|
|
- id: this.project.projectId,
|
|
|
- })
|
|
|
+ const pid =
|
|
|
+ (this.project && (this.project.projectId || this.project.id)) ||
|
|
|
+ (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
|
|
|
+ ''
|
|
|
+ if (!pid) return
|
|
|
+ getCostProjectDetail({ id: pid })
|
|
|
.then((res) => {
|
|
|
this.formData.basicInfo = {
|
|
|
...this.project,
|
|
|
@@ -496,9 +496,12 @@ export const taskMixin = {
|
|
|
},
|
|
|
// 获取监审工作方案数据
|
|
|
getScenarioData() {
|
|
|
- getCostProjectScenarioDetail({
|
|
|
- projectId: this.project.projectId,
|
|
|
- }).then((res) => {
|
|
|
+ const pid =
|
|
|
+ (this.project && (this.project.projectId || this.project.id)) ||
|
|
|
+ (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
|
|
|
+ ''
|
|
|
+ if (!pid) return
|
|
|
+ getCostProjectScenarioDetail({ projectId: pid }).then((res) => {
|
|
|
if (res.value) {
|
|
|
this.formData.workPlan = res.value
|
|
|
this.formData.workPlan.attachmentIds = res.value.attachmentIds
|
|
|
@@ -511,10 +514,15 @@ export const taskMixin = {
|
|
|
},
|
|
|
// 报送资料要求数据
|
|
|
getMaterialData() {
|
|
|
+ const pid =
|
|
|
+ (this.project && (this.project.projectId || this.project.id)) ||
|
|
|
+ (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
|
|
|
+ ''
|
|
|
+ if (!pid) return
|
|
|
getCostProjectMaterialPageList({
|
|
|
pageNum: this.materialData.pagination.currentPage,
|
|
|
pageSize: this.materialData.pagination.pageSize,
|
|
|
- projectId: this.project.projectId,
|
|
|
+ projectId: pid,
|
|
|
}).then((res) => {
|
|
|
if (res.value.code == 200) {
|
|
|
this.materialData.list = res.value.value.records || []
|
|
|
@@ -538,10 +546,15 @@ export const taskMixin = {
|
|
|
},
|
|
|
// 获取监审通知数据
|
|
|
async getDocumentData(data) {
|
|
|
+ const pid =
|
|
|
+ (this.project && (this.project.projectId || this.project.id)) ||
|
|
|
+ (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
|
|
|
+ ''
|
|
|
+ if (!pid) return
|
|
|
getCostProjectDocumentPageList({
|
|
|
pageNum: this.documentData.pagination.currentPage,
|
|
|
pageSize: this.documentData.pagination.pageSize,
|
|
|
- projectId: this.project.projectId,
|
|
|
+ projectId: pid,
|
|
|
documentName: data ? data.documentName : '',
|
|
|
}).then((res) => {
|
|
|
this.documentData.list = res.value.value.records
|
|
|
@@ -550,9 +563,12 @@ export const taskMixin = {
|
|
|
},
|
|
|
// 获取流程数据
|
|
|
getWorkflow() {
|
|
|
- getCostProjectNodeTmpleteGetDetail({
|
|
|
- projectId: this.project.projectId,
|
|
|
- }).then((res) => {
|
|
|
+ const pid =
|
|
|
+ (this.project && (this.project.projectId || this.project.id)) ||
|
|
|
+ (this.taskData && (this.taskData.projectId || this.taskData.id)) ||
|
|
|
+ ''
|
|
|
+ if (!pid) return
|
|
|
+ getCostProjectNodeTmpleteGetDetail({ projectId: pid }).then((res) => {
|
|
|
this.workflowData.list = res.value.nodeList || []
|
|
|
this.workflowData.detailInfo = res.value
|
|
|
this.formData.workflow.plannedAuditStartDate =
|