|
|
@ -3,8 +3,8 @@
|
|
|
|
* @version:
|
|
|
|
* @version:
|
|
|
|
* @Author: JC9527
|
|
|
|
* @Author: JC9527
|
|
|
|
* @Date: 2023-09-04 10:20:06
|
|
|
|
* @Date: 2023-09-04 10:20:06
|
|
|
|
* @LastEditors: JC9527
|
|
|
|
* @LastEditors: 张涛
|
|
|
|
* @LastEditTime: 2023-09-27 17:06:02
|
|
|
|
* @LastEditTime: 2023-10-12 13:33:22
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="container-main" ref="main">
|
|
|
|
<div class="container-main" ref="main">
|
|
|
@ -59,21 +59,14 @@
|
|
|
|
<div class="export" style="background: #f71052" @click="deleteItem">
|
|
|
|
<div class="export" style="background: #f71052" @click="deleteItem">
|
|
|
|
<span>删除</span>
|
|
|
|
<span>删除</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
<div
|
|
|
|
action="1"
|
|
|
|
class="export"
|
|
|
|
ref="uploadOver"
|
|
|
|
@click="handleImport"
|
|
|
|
:http-request="exportFile"
|
|
|
|
style="background-color: #28b384"
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
|
|
|
:multiple="false"
|
|
|
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
|
|
|
:limit="1"
|
|
|
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div class="export export1">
|
|
|
|
|
|
|
|
<span>导入</span>
|
|
|
|
<span>导入</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="tables">
|
|
|
|
<div class="tables">
|
|
|
@ -107,8 +100,6 @@
|
|
|
|
header-align="center"
|
|
|
|
header-align="center"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<!-- <el-table-column prop="type" label="企业类别" header-align="center">
|
|
|
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" header-align="center">
|
|
|
|
<el-table-column label="操作" header-align="center">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -187,7 +178,7 @@
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
v-model="form.year"
|
|
|
|
v-model="form.year"
|
|
|
|
type="year"
|
|
|
|
type="year"
|
|
|
|
placeholder="请选择"
|
|
|
|
placeholder="请选择年份"
|
|
|
|
value-format="yyyy"
|
|
|
|
value-format="yyyy"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -195,32 +186,6 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<!-- <el-row>
|
|
|
|
|
|
|
|
<el-col>
|
|
|
|
|
|
|
|
<el-form-item label="企业类别:" prop="type">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.type"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
placeholder="请输入企业类别"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row> -->
|
|
|
|
|
|
|
|
<!-- <el-row>
|
|
|
|
|
|
|
|
<el-col>
|
|
|
|
|
|
|
|
<el-form-item label="行政区划:" prop="type">
|
|
|
|
|
|
|
|
<el-cascader
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
v-model="queryParmsdistrict"
|
|
|
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
|
|
|
:options="xzList"
|
|
|
|
|
|
|
|
:props="props"
|
|
|
|
|
|
|
|
:disabled="isNoneDivision"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-cascader>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row> -->
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col>
|
|
|
|
<el-col>
|
|
|
|
<el-form-item label="备注:" prop="remark">
|
|
|
|
<el-form-item label="备注:" prop="remark">
|
|
|
@ -293,6 +258,44 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 省重点导入对话框 -->
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
:title="upload.title"
|
|
|
|
|
|
|
|
:visible.sync="upload.open"
|
|
|
|
|
|
|
|
width="400px"
|
|
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
ref="upload"
|
|
|
|
|
|
|
|
:limit="1"
|
|
|
|
|
|
|
|
accept=".xlsx, .xls"
|
|
|
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
|
|
|
:disabled="upload.isUploading"
|
|
|
|
|
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
|
|
|
|
|
:on-success="handleFileSuccess"
|
|
|
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
|
|
|
drag
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
|
|
|
<div class="el-upload__tip text-center" slot="tip">
|
|
|
|
|
|
|
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
|
|
|
|
|
<el-link
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
:underline="false"
|
|
|
|
|
|
|
|
style="font-size: 12px; vertical-align: baseline"
|
|
|
|
|
|
|
|
href="/doc/szd_tl.xlsx"
|
|
|
|
|
|
|
|
target="_blank"
|
|
|
|
|
|
|
|
>下载模板</el-link
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="upload.open = false">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -310,6 +313,7 @@ import {
|
|
|
|
// xzTree,
|
|
|
|
// xzTree,
|
|
|
|
} from "@/api/yingji/keyEnterprise.js";
|
|
|
|
} from "@/api/yingji/keyEnterprise.js";
|
|
|
|
// import { mapState } from "vuex";
|
|
|
|
// import { mapState } from "vuex";
|
|
|
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: { myPagination, executive },
|
|
|
|
components: { myPagination, executive },
|
|
|
@ -407,6 +411,23 @@ export default {
|
|
|
|
//总数
|
|
|
|
//总数
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
|
|
|
|
// 省重点导入参数
|
|
|
|
|
|
|
|
upload: {
|
|
|
|
|
|
|
|
// 是否显示弹出层(省重点导入)
|
|
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
// 弹出层标题(省重点导入)
|
|
|
|
|
|
|
|
title: "",
|
|
|
|
|
|
|
|
// 是否禁用上传
|
|
|
|
|
|
|
|
isUploading: false,
|
|
|
|
|
|
|
|
// 是否更新已经存在的用户数据
|
|
|
|
|
|
|
|
updateSupport: 0,
|
|
|
|
|
|
|
|
// 设置上传的请求头部
|
|
|
|
|
|
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
|
|
|
|
|
|
// 上传的地址
|
|
|
|
|
|
|
|
url:
|
|
|
|
|
|
|
|
process.env.VUE_APP_BASE_API +
|
|
|
|
|
|
|
|
"/pharmaceuticals/bKeyEnterprise/common/importExcel",
|
|
|
|
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -420,60 +441,38 @@ export default {
|
|
|
|
// }),
|
|
|
|
// }),
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 匹配行政区划
|
|
|
|
handleImport() {
|
|
|
|
// componendDistrict(district){
|
|
|
|
this.upload.title = "省重点企业导入";
|
|
|
|
// let name
|
|
|
|
this.upload.open = true;
|
|
|
|
// this.options.map((item)=>{
|
|
|
|
},
|
|
|
|
// if(item.value == district) {
|
|
|
|
// 文件上传中处理
|
|
|
|
// name = item.label
|
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
|
// } else {
|
|
|
|
this.upload.isUploading = true;
|
|
|
|
// item.children.map((itemTwo)=>{
|
|
|
|
},
|
|
|
|
// if(itemTwo.value == district) {
|
|
|
|
// 文件上传成功处理
|
|
|
|
// name = item.label + '-' + itemTwo.label
|
|
|
|
handleFileSuccess(response, file, fileList) {
|
|
|
|
// }
|
|
|
|
this.upload.open = false;
|
|
|
|
// })
|
|
|
|
this.upload.isUploading = false;
|
|
|
|
// }
|
|
|
|
this.$refs.upload.clearFiles();
|
|
|
|
// })
|
|
|
|
this.$alert(
|
|
|
|
// return name
|
|
|
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
|
// },
|
|
|
|
response.msg +
|
|
|
|
// 获取行政区划树
|
|
|
|
"</div>",
|
|
|
|
// quhuadizhi(district) {
|
|
|
|
"导入结果",
|
|
|
|
// this.options = district
|
|
|
|
{ dangerouslyUseHTMLString: true }
|
|
|
|
// },
|
|
|
|
);
|
|
|
|
// getTreeList() {
|
|
|
|
this.getList();
|
|
|
|
// xzTree().then((res1) => {
|
|
|
|
},
|
|
|
|
// if (this.dept.parentId == 0) {
|
|
|
|
// 提交上传文件
|
|
|
|
// res1.data.forEach((value, index) => {
|
|
|
|
submitFileForm() {
|
|
|
|
// this.xzList.push({
|
|
|
|
this.$refs.upload.submit();
|
|
|
|
// value: value.county,
|
|
|
|
},
|
|
|
|
// label: value.institutionName,
|
|
|
|
|
|
|
|
// children: [],
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// if (value.children.length > 0) {
|
|
|
|
|
|
|
|
// value.children.forEach((value1, index1) => {
|
|
|
|
|
|
|
|
// this.xzList[index].children.push({
|
|
|
|
|
|
|
|
// value: value1.subdistrict,
|
|
|
|
|
|
|
|
// label: value1.institutionName,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
handleRemove() {},
|
|
|
|
|
|
|
|
// quhua(e) {
|
|
|
|
|
|
|
|
// this.district = e;
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
searchList() {
|
|
|
|
searchList() {
|
|
|
|
this.searchBefore = {
|
|
|
|
this.searchBefore = {
|
|
|
|
pageSize: 10,
|
|
|
|
pageSize: 10,
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.$refs.mypagination.defaultPages();
|
|
|
|
this.$refs.mypagination.defaultPages();
|
|
|
|
// if (this.district) {
|
|
|
|
|
|
|
|
// this.queryParms.district = this.district;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
this.searchBefore = { ...this.searchBefore, ...this.queryParms };
|
|
|
|
this.searchBefore = { ...this.searchBefore, ...this.queryParms };
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -556,18 +555,6 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//保存
|
|
|
|
//保存
|
|
|
|
confirm() {
|
|
|
|
confirm() {
|
|
|
|
// if (this.queryParmsdistrict) {
|
|
|
|
|
|
|
|
// if (this.queryParmsdistrict.length == 1) {
|
|
|
|
|
|
|
|
// this.form.district = this.queryParmsdistrict[0];
|
|
|
|
|
|
|
|
// } else if (
|
|
|
|
|
|
|
|
// this.queryParmsdistrict.length == 2 &&
|
|
|
|
|
|
|
|
// this.queryParmsdistrict[0] == this.queryParmsdistrict[1]
|
|
|
|
|
|
|
|
// ) {
|
|
|
|
|
|
|
|
// this.form.district = this.queryParmsdistrict[0];
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.form.district = this.queryParmsdistrict[1];
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
this.$refs.form1.validate((valid) => {
|
|
|
|
this.$refs.form1.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.id != null) {
|
|
|
|
if (this.form.id != null) {
|
|
|
@ -639,42 +626,9 @@ export default {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleSuccess() {},
|
|
|
|
handleSuccess() {},
|
|
|
|
// 导入
|
|
|
|
|
|
|
|
exportFile(e) {
|
|
|
|
|
|
|
|
let downloadLoadingInstance = Loading.service({
|
|
|
|
|
|
|
|
text: "正在导入数据,请稍候",
|
|
|
|
|
|
|
|
spinner: "el-icon-loading",
|
|
|
|
|
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let a = new FormData();
|
|
|
|
|
|
|
|
a.append("file", e.file);
|
|
|
|
|
|
|
|
exportEnterprise(a)
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
|
|
|
this.queryParms.year = "";
|
|
|
|
|
|
|
|
this.searchBefore = {
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.$refs.mypagination.defaultPages();
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
this.$refs.uploadOver.clearFiles();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
|
|
|
this.$model.msgError("导入失败");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.checkListTwo = this.checkList;
|
|
|
|
this.checkListTwo = this.checkList;
|
|
|
|
// this.$nextTick(()=>{
|
|
|
|
|
|
|
|
// let dom = document.getElementsByClassName('tables');
|
|
|
|
|
|
|
|
// let height = dom[0].getBoundingClientRect();
|
|
|
|
|
|
|
|
// let windowHeight = window.innerHeight;
|
|
|
|
|
|
|
|
// let relativeHeight = windowHeight - height.top
|
|
|
|
|
|
|
|
// this.main.height = relativeHeight - 80
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|