|
|
@@ -196,17 +196,21 @@
|
|
|
<el-button @click="handleCancel">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- isDetail -->
|
|
|
+ <!-- 任务详情弹窗(子项“查看”) -->
|
|
|
+ <task-detail
|
|
|
+ ref="taskDetail"
|
|
|
+ :visible.sync="taskDetailVisible"
|
|
|
+ :is-view="isView"
|
|
|
+ />
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="查看子任务"
|
|
|
- :visible.sync="isView"
|
|
|
- width="80%"
|
|
|
- @close="handleViewDialogClose"
|
|
|
- >
|
|
|
- <!-- todo -->
|
|
|
- 详情内容
|
|
|
- </el-dialog>
|
|
|
+ <!-- 成本监审任务制定弹窗(母项“详情”) -->
|
|
|
+ <task-customized-release-dialog
|
|
|
+ :visible.sync="taskReleaseDialogVisible"
|
|
|
+ :project="project"
|
|
|
+ :is-view="true"
|
|
|
+ @backToList="taskReleaseDialogVisible = false"
|
|
|
+ @close="taskReleaseDialogVisible = false"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -215,11 +219,16 @@
|
|
|
import { dictMixin } from '@/mixins/useDict'
|
|
|
import UploadComponent from '@/components/costAudit/UploadComponent.vue'
|
|
|
import { updateSuperviseTask } from '@/api/audit/supervise'
|
|
|
+ import TaskDetail from '@/components/task/taskDetail.vue'
|
|
|
+ import TaskCustomizedReleaseDialog from '@/components/task/TaskCustomizedReleaseDialog.vue'
|
|
|
+ import { getCostProjectDetail } from '@/api/taskCustomizedRelease.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'TaskSupervision',
|
|
|
components: {
|
|
|
UploadComponent,
|
|
|
+ TaskDetail,
|
|
|
+ TaskCustomizedReleaseDialog,
|
|
|
},
|
|
|
mixins: [dictMixin],
|
|
|
data() {
|
|
|
@@ -243,7 +252,12 @@
|
|
|
currentTask: null,
|
|
|
activeTab: '0',
|
|
|
isReport: false,
|
|
|
- isView: false,
|
|
|
+ isView: true,
|
|
|
+ // 任务详情弹窗(子项)
|
|
|
+ taskDetailVisible: false,
|
|
|
+ // 成本监审任务制定弹窗(母项)
|
|
|
+ taskReleaseDialogVisible: false,
|
|
|
+ project: {},
|
|
|
isDetail: false,
|
|
|
}
|
|
|
},
|
|
|
@@ -330,12 +344,37 @@
|
|
|
return v
|
|
|
},
|
|
|
handleView(row) {
|
|
|
- console.log('查看子任务:', row)
|
|
|
+ // 子项查看:打开任务详情弹窗
|
|
|
this.isView = true
|
|
|
+ this.taskDetailVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.taskDetail && this.$refs.taskDetail.open(row, 'chengben')
|
|
|
+ })
|
|
|
},
|
|
|
handleDetails(row) {
|
|
|
- this.isDetail = true
|
|
|
- console.log('查看详情:', row)
|
|
|
+ // 母项详情:打开成本监审任务制定弹窗(只读)
|
|
|
+ this.openTaskReleaseDialog(row)
|
|
|
+ },
|
|
|
+ openTaskReleaseDialog(row) {
|
|
|
+ if (!row) return
|
|
|
+ const projectId =
|
|
|
+ row.projectId || row.projectID || row.id || row.taskId || ''
|
|
|
+ if (!projectId) {
|
|
|
+ this.$message &&
|
|
|
+ this.$message.warning &&
|
|
|
+ this.$message.warning('缺少项目ID,无法查看详情')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isView = true
|
|
|
+ getCostProjectDetail({ id: projectId })
|
|
|
+ .then((res) => {
|
|
|
+ this.project = (res && res.value) || {}
|
|
|
+ this.taskReleaseDialogVisible = true
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.project = row || {}
|
|
|
+ this.taskReleaseDialogVisible = true
|
|
|
+ })
|
|
|
},
|
|
|
handleReport(row) {
|
|
|
this.currentTask = row
|
|
|
@@ -431,7 +470,7 @@
|
|
|
this.isDetail = false
|
|
|
},
|
|
|
handleViewDialogClose() {
|
|
|
- this.isView = false
|
|
|
+ this.taskDetailVisible = false
|
|
|
},
|
|
|
},
|
|
|
}
|