|
|
@@ -16,20 +16,26 @@
|
|
|
@error='loading = false'
|
|
|
:loading='loading'
|
|
|
:data='dept'
|
|
|
- action='/api/wutong-parse-file/import-excel/v1/parse-excel'
|
|
|
+ :action='action'
|
|
|
accept=".xlsx"/>
|
|
|
</div>
|
|
|
- <span class='bold ml-10 mr-10'>项目所属机构:</span>
|
|
|
<div>
|
|
|
- <el-autocomplete
|
|
|
- v-model='deptName'
|
|
|
- clearable
|
|
|
- placeholder="快速搜索机构"
|
|
|
- prefix-icon="Search"
|
|
|
- :trigger-on-focus="false"
|
|
|
- :fetch-suggestions="querySearchDept"
|
|
|
- @select="handleSelectDept"
|
|
|
- />
|
|
|
+ <span class='bold ml-10 mr-10'>是否是汇总表</span>
|
|
|
+ <el-switch v-model='gather'/>
|
|
|
+ </div>
|
|
|
+ <div class='flex flex-center' v-if='gather === false'>
|
|
|
+ <span class='bold ml-10 mr-10'>项目所属机构:</span>
|
|
|
+ <div>
|
|
|
+ <el-autocomplete
|
|
|
+ v-model='deptName'
|
|
|
+ clearable
|
|
|
+ placeholder="快速搜索机构"
|
|
|
+ prefix-icon="Search"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ :fetch-suggestions="querySearchDept"
|
|
|
+ @select="handleSelectDept"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="flex flex-justify-start full-width">
|
|
|
@@ -167,6 +173,8 @@ export default {
|
|
|
showImport: false,
|
|
|
showExport: false,
|
|
|
attaches: [],
|
|
|
+ gather: false,
|
|
|
+ action: '/api/wutong-parse-file/import-excel/v1/parse-excel',
|
|
|
keyWords: '',
|
|
|
code: '',
|
|
|
fieldType: [],
|
|
|
@@ -236,9 +244,14 @@ export default {
|
|
|
this.$message.error('请选择要上传的文件')
|
|
|
return
|
|
|
}
|
|
|
- if (this.dept === null) {
|
|
|
- this.$message.error('请选择项目所属机构')
|
|
|
- return
|
|
|
+ if (this.gather) {
|
|
|
+ this.action = '/api//wutong-parse-file/import-excel/v1/parse-summary-excel'
|
|
|
+ } else {
|
|
|
+ if (this.dept === null) {
|
|
|
+ this.$message.error('请选择项目所属机构')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.action = '/api/wutong-parse-file/import-excel/v1/parse-excel'
|
|
|
}
|
|
|
this.loading = true
|
|
|
this.$message.success('正在导入,请稍后...')
|