|
@@ -37,12 +37,14 @@
|
|
|
<!-- 查询区域-END -->
|
|
|
|
|
|
<!-- 操作按钮区域 -->
|
|
|
- <!-- <div class="table-operator">
|
|
|
- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('科目编号')">导出</a-button>
|
|
|
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
|
+ <div class="table-operator">
|
|
|
+ <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
|
|
|
+ <!-- <a-button type="primary" icon="download" @click="handleExportXls('科目编号')">导出</a-button> -->
|
|
|
+ <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" :data="{'biz':'temp'}" @change="handleImportExcel">
|
|
|
<a-button type="primary" icon="import">导入</a-button>
|
|
|
- </a-upload> -->
|
|
|
+ </a-upload>
|
|
|
+ <!-- <a-button @click="handleImport" type="primary" icon="plus">导入</a-button> -->
|
|
|
+ <!-- <a-button @click="handleAdd" type="primary" icon="plus">导入</a-button> -->
|
|
|
<!-- 高级查询区域 -->
|
|
|
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
@@ -50,8 +52,8 @@
|
|
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
|
|
</a-menu>
|
|
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
|
|
- </a-dropdown>
|
|
|
- </div> -->
|
|
|
+ </a-dropdown> -->
|
|
|
+ </div>
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
|
<div>
|
|
@@ -120,11 +122,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
import '@/assets/less/TableExpand.less'
|
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import KzksProjectKmbhModal from './modules/KzksProjectKmbhModal'
|
|
|
+ import { httpAction } from '@/api/manage'
|
|
|
+ import { importJX } from '@/api/api'
|
|
|
|
|
|
export default {
|
|
|
name: 'KzksProjectKmbhList',
|
|
@@ -176,11 +179,17 @@
|
|
|
delete: "/projectKmbh/kzksProjectKmbh/delete",
|
|
|
deleteBatch: "/projectKmbh/kzksProjectKmbh/deleteBatch",
|
|
|
exportXlsUrl: "/projectKmbh/kzksProjectKmbh/exportXls",
|
|
|
- importExcelUrl: "projectKmbh/kzksProjectKmbh/importExcel",
|
|
|
+ importExcelUrl: "/projectImportList/projectImportList/add",
|
|
|
|
|
|
},
|
|
|
dictOptions:{},
|
|
|
superFieldList:[],
|
|
|
+ importYsInfo: {
|
|
|
+ file: '',
|
|
|
+ fileAddress: '',
|
|
|
+ fileName: '',
|
|
|
+ fileType: 3
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -188,10 +197,38 @@
|
|
|
},
|
|
|
computed: {
|
|
|
importExcelUrl: function(){
|
|
|
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
|
+ return `${window._CONFIG['domianURL']}/sys/common/upload`;
|
|
|
+ // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleImportExcel(info){
|
|
|
+ if(info.file.status==='done'){
|
|
|
+ if(info.file.response.success){
|
|
|
+ this.importYsInfo = {
|
|
|
+ fileAddress: info.file.response.message,
|
|
|
+ fileName: info.file.name,
|
|
|
+ fileType: '3'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ httpAction(this.url.importExcelUrl, this.importYsInfo,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ this.$message.success(res.message);
|
|
|
+ importJX(this.importYsInfo).then((res) =>{
|
|
|
+ this.$emit('ok');
|
|
|
+ //this.$message.success(`${info.file.name} 上传成功!`);
|
|
|
+ this.loadData()
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ // this.confirmLoading = false;
|
|
|
+ })
|
|
|
+ }else if (info.file.status === 'error') {
|
|
|
+ this.$message.error(`${info.file.name} 上传失败.`);
|
|
|
+ }
|
|
|
+ },
|
|
|
initDictConfig(){
|
|
|
},
|
|
|
getSuperFieldList(){
|