|
|
@@ -525,7 +525,7 @@
|
|
|
<el-tab-pane label="成本调查表" name="costSurvey">
|
|
|
<el-table
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
- :data="formData.costSurveyData"
|
|
|
+ :data="paginatedCostSurveyData"
|
|
|
border
|
|
|
size="medium"
|
|
|
>
|
|
|
@@ -647,6 +647,17 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ :current-page="costSurveyPagination.currentPage"
|
|
|
+ :page-sizes="[10, 20, 30, 50]"
|
|
|
+ :page-size="costSurveyPagination.pageSize"
|
|
|
+ :total="costSurveyPagination.total"
|
|
|
+ style="margin-top: 20px; text-align: right"
|
|
|
+ @current-change="handleCostSurveyPageChange"
|
|
|
+ @size-change="handleCostSurveySizeChange"
|
|
|
+ />
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<!-- 监审意见 -->
|
|
|
@@ -741,7 +752,7 @@
|
|
|
<el-table
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
border
|
|
|
- :data="formData.auditDocument"
|
|
|
+ :data="formData.messageNoticeData"
|
|
|
>
|
|
|
<el-table-column prop="id" label="序号" width="120" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -749,30 +760,41 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="noticeTitle"
|
|
|
label="消息主题"
|
|
|
width="200"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="province"
|
|
|
+ prop="noticeSource"
|
|
|
label="消息来源"
|
|
|
width="150"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="city"
|
|
|
+ prop="noticeContent"
|
|
|
label="消息内容"
|
|
|
min-width="350"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="address"
|
|
|
+ prop="createTime"
|
|
|
label="发送时间"
|
|
|
width="230"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
</el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ :current-page="messageNoticePagination.currentPage"
|
|
|
+ :page-sizes="[10, 20, 30, 50]"
|
|
|
+ :page-size="messageNoticePagination.pageSize"
|
|
|
+ :total="messageNoticePagination.total"
|
|
|
+ style="margin-top: 20px; text-align: right"
|
|
|
+ @current-change="handleMessageNoticePageChange"
|
|
|
+ @size-change="handleMessageNoticeSizeChange"
|
|
|
+ />
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
@@ -903,6 +925,7 @@
|
|
|
getTaskRequirementList,
|
|
|
addOrUpdateTaskRequirement,
|
|
|
submitTaskRequirement,
|
|
|
+ sendMessage,
|
|
|
} from '@/api/auditTaskProcessing'
|
|
|
import RegionSelector from '@/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/RegionSelector.vue'
|
|
|
import CatalogCascader from '@/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/CatalogCascader.vue'
|
|
|
@@ -954,6 +977,18 @@
|
|
|
isDisabled: false,
|
|
|
tabCheck: '', // 状态判断监审意见是否显示
|
|
|
tabVisiable: true, // 标签页是否显示
|
|
|
+ // 成本调查表分页相关
|
|
|
+ costSurveyPagination: {
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ // 消息通知分页相关
|
|
|
+ messageNoticePagination: {
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
// 所有表单数据聚合
|
|
|
formData: {
|
|
|
basicInfo: {
|
|
|
@@ -1160,6 +1195,7 @@
|
|
|
children: 'children',
|
|
|
label: 'label',
|
|
|
},
|
|
|
+ messageNoticeData: [],
|
|
|
// 补充材料弹窗相关数据
|
|
|
materialDialogVisible: false,
|
|
|
materialForm: {
|
|
|
@@ -1274,6 +1310,14 @@
|
|
|
|
|
|
return result
|
|
|
},
|
|
|
+ // 分页后的成本调查表数据
|
|
|
+ paginatedCostSurveyData() {
|
|
|
+ const start =
|
|
|
+ (this.costSurveyPagination.currentPage - 1) *
|
|
|
+ this.costSurveyPagination.pageSize
|
|
|
+ const end = start + this.costSurveyPagination.pageSize
|
|
|
+ return this.formData.costSurveyData.slice(start, end)
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getAllUnitList()
|
|
|
@@ -1300,6 +1344,8 @@
|
|
|
} else {
|
|
|
this.getProjectInformation()
|
|
|
}
|
|
|
+ // 初始化成本调查表分页总数
|
|
|
+ this.costSurveyPagination.total = this.formData.costSurveyData.length
|
|
|
},
|
|
|
methods: {
|
|
|
getAllUnitList() {
|
|
|
@@ -1399,6 +1445,8 @@
|
|
|
this.getProjectInformation()
|
|
|
} else if (tab.name === 'dataRequirements') {
|
|
|
this.getTaskRequirementPage() // 报送资料要求
|
|
|
+ } else if (tab.name === 'messageNotice') {
|
|
|
+ this.getSendMessage() // 消息通知
|
|
|
}
|
|
|
// 可添加标签页切换时的逻辑
|
|
|
this.pageTitle = tab.label
|
|
|
@@ -1444,6 +1492,30 @@
|
|
|
this.formData.dataRequirements = []
|
|
|
})
|
|
|
},
|
|
|
+ // 消息通知
|
|
|
+ getSendMessage() {
|
|
|
+ const params = {
|
|
|
+ taskId: this.taskId,
|
|
|
+ currentPage: this.messageNoticePagination.currentPage,
|
|
|
+ pageSize: this.messageNoticePagination.pageSize,
|
|
|
+ }
|
|
|
+ sendMessage(params)
|
|
|
+ .then((res) => {
|
|
|
+ console.log('消息通知', res)
|
|
|
+ if (res && res.code === 200 && res.value && res.value.value) {
|
|
|
+ this.formData.messageNoticeData = res.value.value.records || []
|
|
|
+ this.messageNoticePagination.total = res.value.value.total || 0
|
|
|
+ } else {
|
|
|
+ this.formData.messageNoticeData = []
|
|
|
+ this.messageNoticePagination.total = 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error('获取消息通知失败', err)
|
|
|
+ this.formData.messageNoticeData = []
|
|
|
+ this.messageNoticePagination.total = 0
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
// 提交
|
|
|
handleSubmit() {
|
|
|
@@ -1497,10 +1569,31 @@
|
|
|
// 查看文书
|
|
|
handleClick(row) {
|
|
|
console.log(row)
|
|
|
+ if (row.fileUrl) {
|
|
|
+ window.open(row.fileUrl, '_blank')
|
|
|
+ } else {
|
|
|
+ this.$message.warning('暂无文件可查看')
|
|
|
+ }
|
|
|
},
|
|
|
// 下载文书
|
|
|
handleDownload(row) {
|
|
|
console.log(row)
|
|
|
+ if (!row.fileUrl) {
|
|
|
+ this.$message.warning('该文书暂无文件可下载')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 创建隐藏的a标签进行下载
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = row.fileUrl
|
|
|
+ // 设置下载文件名
|
|
|
+ link.download = row.name || '文书文件'
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link)
|
|
|
+
|
|
|
+ this.$message.success('开始下载文件')
|
|
|
},
|
|
|
// 上传附件
|
|
|
handleUpload(row) {
|
|
|
@@ -1511,10 +1604,30 @@
|
|
|
handleFileView(row) {
|
|
|
console.log('查看文件:', row)
|
|
|
// 实际开发中可添加文件预览逻辑(如打开新窗口、弹窗展示等)
|
|
|
+ if (row.fileUrl) {
|
|
|
+ window.open(row.fileUrl, '_blank')
|
|
|
+ } else {
|
|
|
+ this.$message.warning('暂无文件可查看')
|
|
|
+ }
|
|
|
},
|
|
|
handleFileDownload(row) {
|
|
|
console.log('下载文件:', row)
|
|
|
- // 实际开发中可添加文件下载逻辑(如调用后端下载接口)
|
|
|
+ if (!row.fileUrl) {
|
|
|
+ this.$message.warning('该资料暂无文件可下载')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 创建隐藏的a标签进行下载
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = row.fileUrl
|
|
|
+ // 设置下载文件名,优先使用资料名称
|
|
|
+ link.download = row.informationName || '下载文件'
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link)
|
|
|
+
|
|
|
+ this.$message.success('开始下载文件')
|
|
|
},
|
|
|
// 报送资料文件上传
|
|
|
async handleFileUpload(row) {
|
|
|
@@ -1611,7 +1724,21 @@
|
|
|
},
|
|
|
handleTemplateDownload(row) {
|
|
|
console.log('下载预置模版:', row)
|
|
|
- // 实际开发中可添加模版文件下载逻辑
|
|
|
+ if (!row.templateUrl && !row.fileUrl) {
|
|
|
+ this.$message.warning('该模版暂无文件可下载')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ const downloadUrl = row.templateUrl || row.fileUrl
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = downloadUrl
|
|
|
+ link.download = row.name ? `${row.name}_模版` : '模版文件'
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link)
|
|
|
+
|
|
|
+ this.$message.success('开始下载模版')
|
|
|
},
|
|
|
handleDataUpload(row) {
|
|
|
console.log('上传模版数据:', row)
|
|
|
@@ -1652,7 +1779,21 @@
|
|
|
// 数据下载
|
|
|
handleDataDownload(row) {
|
|
|
console.log('数据下载:', row.name)
|
|
|
- // 实际逻辑:调用下载接口
|
|
|
+ if (!row.fileUrl && !row.dataUrl) {
|
|
|
+ this.$message.warning('该数据暂无文件可下载')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ const downloadUrl = row.dataUrl || row.fileUrl
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = downloadUrl
|
|
|
+ link.download = row.name ? `${row.name}_数据` : '数据文件'
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link)
|
|
|
+
|
|
|
+ this.$message.success('开始下载数据')
|
|
|
},
|
|
|
|
|
|
// 补充材料相关方法
|
|
|
@@ -1958,6 +2099,34 @@
|
|
|
this.materialForm.fileList = fileList
|
|
|
this.$message.info(`${file.name} 已移除`)
|
|
|
},
|
|
|
+
|
|
|
+ // 成本调查表分页 - 页码改变
|
|
|
+ handleCostSurveyPageChange(page) {
|
|
|
+ this.costSurveyPagination.currentPage = page
|
|
|
+ // 如果成本调查表数据来自API,可以在这里调用API
|
|
|
+ // this.getCostSurveyData()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 成本调查表分页 - 每页条数改变
|
|
|
+ handleCostSurveySizeChange(size) {
|
|
|
+ this.costSurveyPagination.pageSize = size
|
|
|
+ this.costSurveyPagination.currentPage = 1
|
|
|
+ // 如果成本调查表数据来自API,可以在这里调用API
|
|
|
+ // this.getCostSurveyData()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 消息通知分页 - 页码改变
|
|
|
+ handleMessageNoticePageChange(page) {
|
|
|
+ this.messageNoticePagination.currentPage = page
|
|
|
+ this.getSendMessage()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 消息通知分页 - 每页条数改变
|
|
|
+ handleMessageNoticeSizeChange(size) {
|
|
|
+ this.messageNoticePagination.pageSize = size
|
|
|
+ this.messageNoticePagination.currentPage = 1
|
|
|
+ this.getSendMessage()
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|