|
@@ -41,7 +41,8 @@
|
|
<!-- <el-button v-if="hasPermission('sys:post:edit')" type="warning" size="small" icon="el-icon-edit-outline" @click="edit()" :disabled="$refs.projectTable && $refs.projectTable.getCheckboxRecords().length !== 1" plain>修改</el-button>-->
|
|
<!-- <el-button v-if="hasPermission('sys:post:edit')" type="warning" size="small" icon="el-icon-edit-outline" @click="edit()" :disabled="$refs.projectTable && $refs.projectTable.getCheckboxRecords().length !== 1" plain>修改</el-button>-->
|
|
<el-button v-if="hasPermission('sys:project:del')" type="danger" size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.projectTable && $refs.projectTable.getCheckboxRecords().length === 0" plain>删除</el-button>
|
|
<el-button v-if="hasPermission('sys:project:del')" type="danger" size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.projectTable && $refs.projectTable.getCheckboxRecords().length === 0" plain>删除</el-button>
|
|
<el-button v-if="hasPermission('sys:project:import')" type="default" @click="downloadTpl()" size="small">下载模板</el-button>
|
|
<el-button v-if="hasPermission('sys:project:import')" type="default" @click="downloadTpl()" size="small">下载模板</el-button>
|
|
-
|
|
|
|
|
|
+ <el-button v-if="hasPermission('sys:project:exportFile')" type="default" @click="downloadFile()" size="small">下载</el-button>
|
|
|
|
+ <span style="margin-left:20px">文件上传比例 {{proport}}</span>
|
|
</template>
|
|
</template>
|
|
</vxe-toolbar>
|
|
</vxe-toolbar>
|
|
<div style="height: calc(100% - 80px);">
|
|
<div style="height: calc(100% - 80px);">
|
|
@@ -110,7 +111,11 @@
|
|
{{ $dictUtils.getDictLabel("project_status", scope.row.status, '-') }}
|
|
{{ $dictUtils.getDictLabel("project_status", scope.row.status, '-') }}
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
-
|
|
|
|
|
|
+ <vxe-column width="80px" title="上传状态" field="fileUploadType" >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ $dictUtils.getDictLabel("file_upload_type", scope.row.fileUploadType, '-') }}
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
|
|
|
|
|
|
<!--<vxe-column title="是否可用" field="status" sortable>
|
|
<!--<vxe-column title="是否可用" field="status" sortable>
|
|
@@ -167,7 +172,8 @@
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
orders: []
|
|
orders: []
|
|
},
|
|
},
|
|
- loading: false
|
|
|
|
|
|
+ loading: false,
|
|
|
|
+ proport: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
projectService: null,
|
|
projectService: null,
|
|
@@ -186,6 +192,12 @@
|
|
// 获取数据列表
|
|
// 获取数据列表
|
|
refreshList () {
|
|
refreshList () {
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
+ this.projectService.proportion({
|
|
|
|
+ 'itemType': '2',
|
|
|
|
+ ...this.searchForm
|
|
|
|
+ }).then(({data}) => {
|
|
|
|
+ this.proport = data
|
|
|
|
+ })
|
|
this.projectService.list({
|
|
this.projectService.list({
|
|
'current': this.tablePage.currentPage,
|
|
'current': this.tablePage.currentPage,
|
|
'size': this.tablePage.pageSize,
|
|
'size': this.tablePage.pageSize,
|
|
@@ -277,6 +289,23 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 下载文档
|
|
|
|
+ downloadFile () {
|
|
|
|
+ this.loading = true
|
|
|
|
+ this.projectService.fileUploadList({
|
|
|
|
+ 'itemType': '2',
|
|
|
|
+ ...this.searchForm
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
|
+ this.$utils.downloadExcel(res.data, '咨询项目上传比例报告')
|
|
|
|
+ this.loading = false
|
|
|
|
+ }).catch(function (err) {
|
|
|
|
+ this.loading = false
|
|
|
|
+ if (err.response) {
|
|
|
|
+ console.log(err.response)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 自定义服务端导出
|
|
// 自定义服务端导出
|
|
exportMethod ({ options }) {
|
|
exportMethod ({ options }) {
|
|
// 传给服务端的参数
|
|
// 传给服务端的参数
|