|
|
@@ -378,6 +378,19 @@
|
|
|
type: [String, Array],
|
|
|
default: null,
|
|
|
},
|
|
|
+ // 以下三个用于与 CostSurveyTab 一致的透传参数
|
|
|
+ uploadId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ surveyTemplateId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ catalogId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -385,6 +398,7 @@
|
|
|
dataUploadAccept: '.xls,.xlsx',
|
|
|
// 模板查看相关
|
|
|
currentTemplateRow: null,
|
|
|
+ currentSurveyRow: null,
|
|
|
singleDialogVisible: false,
|
|
|
fixedDialogVisible: false,
|
|
|
dynamicDialogVisible: false,
|
|
|
@@ -448,6 +462,7 @@
|
|
|
async handleOnlineSubmission(row) {
|
|
|
if (!row) return
|
|
|
this.currentTemplateRow = row
|
|
|
+ this.currentSurveyRow = row
|
|
|
this.surveyDetailData = {}
|
|
|
// 在线填报时使用页面传入的 isViewMode,不强制只读
|
|
|
this.viewModeForDialog = false
|
|
|
@@ -490,6 +505,28 @@
|
|
|
await this.initDynamicTableData()
|
|
|
}
|
|
|
},
|
|
|
+ // 处理固定表保存(与 CostSurveyTab 对齐)
|
|
|
+ handleFixedTableSave(tableData) {
|
|
|
+ this.$emit('handle-fixed-table-save', {
|
|
|
+ row: this.currentSurveyRow || this.currentTemplateRow,
|
|
|
+ tableData,
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 处理刷新(与 CostSurveyTab 对齐)
|
|
|
+ handleRefresh() {
|
|
|
+ this.$emit('handle-survey-form-save', {
|
|
|
+ row: this.currentSurveyRow || this.currentTemplateRow,
|
|
|
+ formData: {},
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 处理动态表保存(与 CostSurveyTab 对齐)
|
|
|
+ handleDynamicTableSave(tableData) {
|
|
|
+ this.$emit('handle-dynamic-table-save', {
|
|
|
+ row: this.currentSurveyRow || this.currentTemplateRow,
|
|
|
+ tableData,
|
|
|
+ })
|
|
|
+ this.handleRefresh()
|
|
|
+ },
|
|
|
// 预览:与 UploadComponent.vue 的 handlePreview 一致
|
|
|
handleFileView(row) {
|
|
|
console.log(row, '这一行数据')
|
|
|
@@ -523,6 +560,7 @@
|
|
|
// 模版查看:与 submitData.vue 的 handleViewTemplate 保持一致
|
|
|
async handleViewTemplate(row) {
|
|
|
this.currentTemplateRow = row || null
|
|
|
+ this.currentSurveyRow = row || null
|
|
|
const t = String(
|
|
|
(row && (row.templateType || row.templatetype)) || ''
|
|
|
).trim()
|