发布申报任务新增一个自选企业模块,短信内容模块

xuhongjie
许宏杰 2 weeks ago
parent e76d4ea867
commit f7cc4264be

@ -5,7 +5,7 @@ VUE_APP_TITLE = 金鸡湖现代服务业品牌管理系统
ENV = 'development'
# 金鸡湖现代服务业品牌管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.115:9040'
VUE_APP_BASE_API = 'http://192.168.0.122:9040'
# 测试环境数据库
# VUE_APP_BASE_API = 'http://39.101.188.84:9040'
# 脱敏三方测试用数据库
@ -20,7 +20,7 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
#0.脱敏环境已关闭
#1.本地运行地址http://localhost/#/login。
#2.项目中存在不同环境的下载路径,全局搜素"/demo/JinJiHu",对应位置有各个环境下载路径代码注释。
#3.测试与正式环境的登录页不同需要到router.js对应的登录页组件位置根据环境不同注释掉对应组件。
#3.测试与正式环境的登录页不同需要到router.js对应的登录页组件位置根据环境不同注释掉对应组件。W
#4.部署环境
# 堡垒机地址https://58.209.81.144:9443/  用户名admin47   密码Jinjihu@123456
# 登录后选择IP地址为192.114.0.197:22  用户名root   密码Cloud@1234

@ -7,9 +7,9 @@ ENV = 'production'
# 金鸡湖现代服务业品牌管理系统/生产环境
# VUE_APP_BASE_API = '/prod-api'
# 测试环境数据库
# VUE_APP_BASE_API = 'http://39.101.188.84:9040'
VUE_APP_BASE_API = 'http://39.101.188.84:9040'
# 脱敏三方测试用数据库
# VUE_APP_BASE_API = 'http://39.101.188.84:9031'
# VUE_APP_BASE_API = 'http://192.114.0.197/api'
# 正式环境数据库
VUE_APP_BASE_API = 'https://idp.sipac.gov.cn/api'
# VUE_APP_BASE_API = 'https://idp.sipac.gov.cn/api'

@ -1,6 +1,6 @@
{
"name": "ruoyi",
"version": "1.0.202502050928",
"version": "1.0.202502101437",
"description": "金鸡湖现代服务业品牌管理系统",
"author": "若依",
"license": "MIT",

@ -1,83 +1,91 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 查询在线申报记录列表
export function listRecords(query) {
return request({
url: '/system/declarationRecords/list',
method: 'get',
params: query
})
url: "/system/declarationRecords/list",
method: "get",
params: query,
});
}
// 查询申报模版列表
export function templateList(query) {
return request({
url: '/system/templateRecord/templateNameList',
method: 'get',
params: query
})
url: "/system/templateRecord/templateNameList",
method: "get",
params: query,
});
}
// 导出
export function exportData(data) {
return request({
url: '/system/declarationRecords/export',
method: 'post',
responseType: 'blob',
data: data
})
url: "/system/declarationRecords/export",
method: "post",
responseType: "blob",
data: data,
});
}
// 新增企业名录
export function addTemplateRecord(data) {
return request({
url: '/system/templateRecord',
method: 'post',
data: data
})
url: "/system/templateRecord",
method: "post",
data: data,
});
}
// 下载需要评定数据
export function downloadData(data) {
return request({
url: '/system/declarationRecords/exportMunicipalBureauReview',
method: 'post',
responseType: 'blob',
data: data
})
url: "/system/declarationRecords/exportMunicipalBureauReview",
method: "post",
responseType: "blob",
data: data,
});
}
// 上传单个文件
export function uploadFile(data) {
return request({
url: '/common/upload',
method: 'post',
url: "/common/upload",
method: "post",
data: data,
// headers: {
// 'Content-type': 'multipart/form-data'
// }
})
});
}
// 上传评定数据
export function putMunicipalBureauReview(data) {
return request({
url: '/system/declarationRecords/municipalReviewNew',
method: 'post',
data: data
})
url: "/system/declarationRecords/municipalReviewNew",
method: "post",
data: data,
});
}
// 导出zip压缩包
export function exportZip(params) {
return request({
url: '/system/declarationRecords/fileList',
method: 'get',
responseType: 'blob',
url: "/system/declarationRecords/fileList",
method: "get",
responseType: "blob",
headers: {
"content-type": "application/json; charset=utf-8",
},
params
})
}
params,
});
}
export function exportXlsx(query) {
return request({
url: "/jjh/jPolicyFile/getYtb",
method: "get",
params: query,
responseType: "blob",
});
}

@ -43,8 +43,8 @@ export const constantRoutes = [
},
{
path: "/login",
// component: () => import("@/views/login"), // 测试环境登录页
component: () => import("@/views/login_v1"), // 正式环境登录页
component: () => import("@/views/login"), // 测试环境登录页
// component: () => import("@/views/login_v1"), // 正式环境登录页
hidden: true,
},
{

@ -2,45 +2,34 @@
<div class="L-public-main" id="L-size-main">
<div class="L-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" ref="queryFrom">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
ref="queryFrom"
>
<el-col :span="20">
<el-form-item label="企业名称:" prop="qymc">
<el-input v-model.trim="formInline.qymc" placeholder="请输入内容"></el-input>
<el-input
v-model.trim="formInline.qymc"
placeholder="请输入内容"
></el-input>
</el-form-item>
<el-form-item label="企业规模:" prop="type">
<el-select class="ignoreElement" v-model="formInline.type" placeholder="请选择">
<el-option
label="全部"
value="">
</el-option>
<el-option
label="规上服务业"
value="1">
</el-option>
<el-option
label="规上工业"
value="3">
</el-option>
<el-option
label="总部企业"
value="4">
</el-option>
<el-option
label="生产性服务业"
value="5">
</el-option>
<el-option
label="限上批零住餐"
value="6">
</el-option>
<el-option
label="生活性服务业"
value="7">
</el-option>
<el-option
label="其他"
value="2">
</el-option>
<el-select
class="ignoreElement"
v-model="formInline.type"
placeholder="请选择"
>
<el-option label="全部" value=""> </el-option>
<el-option label="规上服务业" value="1"> </el-option>
<el-option label="规上工业" value="3"> </el-option>
<el-option label="总部企业" value="4"> </el-option>
<el-option label="生产性服务业" value="5"> </el-option>
<el-option label="限上批零住餐" value="6"> </el-option>
<el-option label="生活性服务业" value="7"> </el-option>
<el-option label="其他" value="2"> </el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="统一社会信用代码:" prop="enterUnit">
@ -59,20 +48,48 @@
</el-select>
</el-form-item> -->
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-col>
<el-col :span="4">
<div class="btnss">
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" v-if="roles.includes('other-gov')" @click="importBtn"></el-button>
<el-button type="primary" class="import-btn import-btn-export" size="mini" @click="deriveBtn" :loading="exportLoading">导出</el-button>
<el-button
type="primary"
class="import-btn"
icon="icon iconfont icon-jc-daoru"
size="mini"
v-if="roles.includes('other-gov')"
@click="importBtn"
>导入企业</el-button
>
<el-button
type="primary"
class="import-btn import-btn-export"
size="mini"
@click="deriveBtn"
:loading="exportLoading"
>导出</el-button
>
</div>
</el-col>
</el-form>
</header>
<section>
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" :height="tabHeader" :max-height="tabHeader">
<el-table
v-loading="loading"
:data="tableData"
:row-class-name="tableRowClassName"
:height="tabHeader"
:max-height="tabHeader"
>
<el-table-column label="企业名称" prop="qymc" />
<el-table-column label="统一社会信用代码" prop="tyshxydm" />
<!-- <el-table-column label="法定代表人" prop="policyLevel" />
@ -85,12 +102,18 @@
<el-table-column label="行业名称" prop="hymc" />
<el-table-column label="企业规模" prop="cylx">
<template slot-scope="scope">
<span>{{ scope.row.type == 1 ? "规上服务业" : scope.row.type == 2 ? "其他" : ""}}</span>
<span>{{
scope.row.type == 1
? "规上服务业"
: scope.row.type == 2
? "其他"
: ""
}}</span>
</template>
</el-table-column>
<el-table-column label="成立日期" prop="clrq" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.clrq,"{y}-{m}-{d}") }}</span>
<span>{{ parseTime(scope.row.clrq, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="组织机构代码" prop="createTime" />
@ -99,7 +122,12 @@
<el-table-column label="注册地址" prop="createTime" />
<el-table-column label="注册类型" prop="createTime" />
<el-table-column label="经营范围" prop="createTime" /> -->
<el-table-column label="操作" prop="userId" class-name="table-operation" width="120">
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
width="120"
>
<template slot-scope="scope">
<span class="look-info" @click="goInfo(scope.row)"></span>
<!-- <span class="edit-info" @click="editInfo(scope.row)"></span>
@ -107,22 +135,36 @@
</template>
</el-table-column>
</el-table>
<my-pagination
<my-pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></my-pagination>
</section>
</div>
<!-- :rules="rules" -->
<my-dialog :title="title" @close="importClose" @confirm="confirm" ref="importProject" closeText="关闭" :myclass="true">
<my-dialog
:title="title"
@close="importClose"
@confirm="confirm"
ref="importProject"
closeText="关闭"
:myclass="true"
>
<el-row>
<el-col :span="12">
<div class="btnsFlex">
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" @click="importExcel"></el-button>
<el-button
type="primary"
class="import-btn"
icon="icon iconfont icon-jc-daoru"
size="mini"
@click="importExcel"
>导入企业</el-button
>
<el-upload
ref="upload"
:limit="1"
@ -140,7 +182,14 @@
<i class="icon iconfont icon-jc-daoru"></i>
导入新项目
</div> -->
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" ref="uploadRef">导入企业</el-button>
<el-button
type="primary"
class="import-btn"
icon="icon iconfont icon-jc-daoru"
size="mini"
ref="uploadRef"
>导入企业</el-button
>
</template>
</el-upload>
</div>
@ -166,56 +215,62 @@
</div>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
import myDialog from "@/views/components/myDialog/index.vue"
import { getEnterList, enterpriseBasicInfoNew, enterpriseBasicInfoChange, enterpriseBasicInfoId, enterpriseBasicInfoDel } from "@/api/jin_ji_hu/enterList"
import myPagination from "@/views/components/Pagination/index.vue";
import myDialog from "@/views/components/myDialog/index.vue";
import {
getEnterList,
enterpriseBasicInfoNew,
enterpriseBasicInfoChange,
enterpriseBasicInfoId,
enterpriseBasicInfoDel,
} from "@/api/jin_ji_hu/enterList";
import { getToken } from "@/utils/auth";
export default {
components:{myPagination, myDialog},
dicts: ['jjh_project_type'],
components: { myPagination, myDialog },
dicts: ["jjh_project_type"],
data() {
return {
userType: this.$store.state.user.userType,
roles: this.$store.state.user.roles,
deptId: this.$store.state.user.deptId,
total:0,
total: 0,
pagination: {
current:1,
size:10,
current: 1,
size: 10,
},
loading:false,
loading: false,
formInline: {
qymc: '',
qymc: "",
type: null,
},
tableData:[],
tableData: [],
tabHeader: undefined,
addFrom: {
name:"",
joinProject:"",
enterUnit:"",
policyLevel:"",
enterTime:"",
name: "",
joinProject: "",
enterUnit: "",
policyLevel: "",
enterTime: "",
},
rules:{
name:[
{ required: true, message: '请填写政策文件名称', trigger: 'blur' }
rules: {
name: [
{ required: true, message: "请填写政策文件名称", trigger: "blur" },
],
joinProject:[
{ required: true, message: '请填写政策等级', trigger: 'blur' }
joinProject: [
{ required: true, message: "请填写政策等级", trigger: "blur" },
],
enterUnit:[
{ required: true, message: '请填写发文单位', trigger: 'blur' }
enterUnit: [
{ required: true, message: "请填写发文单位", trigger: "blur" },
],
policyLevel:[
{ required: true, message: '请选择发文时间', trigger: 'change' }
policyLevel: [
{ required: true, message: "请选择发文时间", trigger: "change" },
],
enterTime:[
{ required: true, message: '请选择关联项目', trigger: 'change' }
enterTime: [
{ required: true, message: "请选择关联项目", trigger: "change" },
],
},
title:"导入企业",
infoVisible:false,
title: "导入企业",
infoVisible: false,
baseUrl: process.env.VUE_APP_BASE_API,
//
upload: {
@ -226,36 +281,38 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/system/enterpriseBasicInfo/importEnterprise"
url:
process.env.VUE_APP_BASE_API +
"/system/enterpriseBasicInfo/importEnterprise",
},
fileList: [],
number: 0,
uploadList: [],
//
exportLoading: false,
}
};
},
mounted() {
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
if(this.$route.params.enterpriseName) {
window.addEventListener("resize", this.cancalDebounce);
if (this.$route.params.enterpriseName) {
this.formInline.qymc = this.$route.params.enterpriseName;
this.pagination = { ...this.pagination,...this.formInline };
this.pagination = { ...this.pagination, ...this.formInline };
}
this.getList();
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
//
getList(){
getList() {
this.loading = true;
getEnterList(this.pagination).then(res=>{
getEnterList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
});
},
//
getPagination(pages) {
@ -267,41 +324,40 @@ export default {
handleQuery() {
this.pagination = {
current: 1,
size: 10
}
this.pagination = { ...this.pagination,...this.formInline };
size: 10,
};
this.pagination = { ...this.pagination, ...this.formInline };
// console.log(this.pagination);
// console.log(this.formInline);
this.getList();
},
//
resetQuery(formName){
resetQuery(formName) {
this.$refs[formName].resetFields();
this.pagination = {
current: 1,
size: 10
}
size: 10,
};
this.getList();
},
// table
tableRowClassName({row, rowIndex}){
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
return "evenNumber-row";
}
return '';
return "";
},
//
goInfo(row){
goInfo(row) {
this.$router.push({
name: 'enterpriselibraryInfo',
query: { userId: row.id, creditCode: row.tyshxydm }
})
name: "enterpriselibraryInfo",
query: { userId: row.id, creditCode: row.tyshxydm },
});
},
//
editInfo(row){
},
editInfo(row) {},
//
deriveBtn(){
deriveBtn() {
this.$confirm("是否确认导出企业库数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -312,31 +368,31 @@ export default {
this.download(
"/system/enterpriseBasicInfo/export",
{
...this.formInline
...this.formInline,
},
"企业库数据" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => { });
.catch(() => {});
},
//
importBtn(){
importBtn() {
this.$refs.importProject.open();
},
//
importExcel(){
this.$refs['upload'].$refs['upload-inner'].handleClick()
importExcel() {
this.$refs["upload"].$refs["upload-inner"].handleClick();
},
//
handleBeforeUpload(file) {
this.$modal.loading("正在上传文件,请稍候...");
return true;
},
handleFileUploadProgress(){},
handleFileUploadProgress() {},
//
handleFileSuccess(response, file, fileList) {
if(response.code === 200) {
if (response.code === 200) {
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
@ -363,18 +419,18 @@ export default {
// a.href = "/test/JinJiHuTest/static/.xlsx";
//
a.href = "./static/企业库数据模板.xlsx";
//ahref .
a.download ="企业库模板.xlsx";
//.xlsxpdf.fpd
a.style.display = "none"; // a
document.body.appendChild(a);
// a
a.click(); //aahref
a.remove();
// a
//ahref .
a.download = "企业库模板.xlsx";
//.xlsxpdf.fpd
a.style.display = "none"; // a
document.body.appendChild(a);
// a
a.click(); //aahref
a.remove();
// a
},
//
importClose(){
importClose() {
this.$refs.importProject.close();
},
//
@ -392,19 +448,15 @@ export default {
}
},
//
confirm(){
},
confirm() {},
//
delInfo(row){
delInfo(row) {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
})
.then(() => {})
.catch(() => {
this.$message({
type: "info",
@ -413,15 +465,15 @@ export default {
});
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 140;
}
},
},
}
};
</script>

@ -0,0 +1,418 @@
<template>
<div class="L-public-main" id="L-size-main">
<div class="L-main" style="padding: 0">
<header id="L-header">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
ref="queryFrom"
>
<el-col :span="20">
<el-form-item label="企业名称:" prop="qymc">
<el-input
v-model.trim="formInline.qymc"
placeholder="请输入内容"
></el-input>
</el-form-item>
<el-form-item label="企业规模:" prop="type">
<el-select
class="ignoreElement"
v-model="formInline.type"
placeholder="请选择"
>
<el-option label="全部" value=""> </el-option>
<el-option label="规上服务业" value="1"> </el-option>
<el-option label="规上工业" value="3"> </el-option>
<el-option label="总部企业" value="4"> </el-option>
<el-option label="生产性服务业" value="5"> </el-option>
<el-option label="限上批零住餐" value="6"> </el-option>
<el-option label="生活性服务业" value="7"> </el-option>
<el-option label="其他" value="2"> </el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-col>
</el-form>
</header>
<section>
<el-table
ref="multipleTable"
v-loading="loading"
:data="tableData"
:row-class-name="tableRowClassName"
:height="tabHeader"
:max-height="tabHeader"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" align="center" width="50" />
<el-table-column label="企业名称" prop="qymc" />
<el-table-column label="统一社会信用代码" prop="tyshxydm" />
<!-- <el-table-column label="法定代表人" prop="policyLevel" />
<el-table-column label="经营状态" prop="enterTime" />
<el-table-column label="成立日期" prop="createBy" />
<el-table-column label="注册资本" prop="createTime" /> -->
<!-- <el-table-column label="经济类型" prop="jjlxmc" /> -->
<!-- <el-table-column label="登记注册统计类别" prop="statisticalCategories" /> -->
<el-table-column label="企业类型" prop="qylxmc" />
<!-- <el-table-column label="行业名称" prop="hymc" /> -->
<el-table-column label="成立日期" prop="clrq" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.clrq, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
</el-table>
<my-pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
@pagination="getPagination"
:current-page.sync="pagination.current"
></my-pagination>
</section>
</div>
</div>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue";
import {
getEnterList,
enterpriseBasicInfoNew,
enterpriseBasicInfoChange,
enterpriseBasicInfoId,
enterpriseBasicInfoDel,
} from "@/api/jin_ji_hu/enterList";
import { getToken } from "@/utils/auth";
export default {
components: { myPagination },
dicts: ["jjh_project_type"],
props: {
value: [Array],
},
data() {
return {
rowList: [],
userType: this.$store.state.user.userType,
roles: this.$store.state.user.roles,
deptId: this.$store.state.user.deptId,
total: 0,
pagination: {
current: 1,
size: 10,
},
loading: false,
formInline: {
qymc: "",
type: null,
},
tableData: [],
tabHeader: undefined,
addFrom: {
name: "",
joinProject: "",
enterUnit: "",
policyLevel: "",
enterTime: "",
},
rules: {
name: [
{ required: true, message: "请填写政策文件名称", trigger: "blur" },
],
joinProject: [
{ required: true, message: "请填写政策等级", trigger: "blur" },
],
enterUnit: [
{ required: true, message: "请填写发文单位", trigger: "blur" },
],
policyLevel: [
{ required: true, message: "请选择发文时间", trigger: "change" },
],
enterTime: [
{ required: true, message: "请选择关联项目", trigger: "change" },
],
},
title: "导入企业",
infoVisible: false,
baseUrl: process.env.VUE_APP_BASE_API,
//
upload: {
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url:
process.env.VUE_APP_BASE_API +
"/system/enterpriseBasicInfo/importEnterprise",
},
fileList: [],
number: 0,
uploadList: [],
//
exportLoading: false,
};
},
watch: {
value: {
handler(val) {
console.log("监听", val.length);
if (val) {
this.rowList = val;
}
},
deep: true,
immediate: true,
},
},
mounted() {
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
if (this.$route.params.enterpriseName) {
this.formInline.qymc = this.$route.params.enterpriseName;
this.pagination = { ...this.pagination, ...this.formInline };
}
this.getList();
},
destroyed() {
window.removeEventListener("resize", this.cancalDebounce);
},
methods: {
// //
toggleSelection() {
if (this.rowList.length > 0) {
this.rowList.map((row) => {
const newItem = this.tableData.filter(
(item) => item.tyshxydm == row.creditCode
);
if (newItem.length > 0) {
this.$refs.multipleTable.toggleRowSelection(newItem[0]);
}
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
// /**
// *
// */
handleSelectionChange(val) {
const combinedArray = [
...val,
...this.rowList.map((item) => ({
qymc: item.enterpriseName,
tyshxydm: item.creditCode,
})),
];
const uniqueArray = Array.from(
combinedArray
.reduce((map, item) => {
if (!map.has(item.tyshxydm)) {
map.set(item.tyshxydm, item);
}
return map;
}, new Map())
.values()
);
const list = uniqueArray.map((item) => {
return {
enterpriseName: item.qymc,
creditCode: item.tyshxydm,
};
});
this.$emit("input", list);
},
//
getList() {
this.loading = true;
getEnterList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
this.$nextTick(() => {
this.toggleSelection();
});
});
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.getList();
},
//
handleQuery() {
this.pagination = {
current: 1,
size: 10,
};
this.pagination = { ...this.pagination, ...this.formInline };
// console.log(this.pagination);
// console.log(this.formInline);
this.getList();
},
//
resetQuery(formName) {
this.$refs[formName].resetFields();
this.pagination = {
current: 1,
size: 10,
};
this.getList();
},
// table
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return "evenNumber-row";
}
return "";
},
//
goInfo(row) {
this.$router.push({
name: "enterpriselibraryInfo",
query: { userId: row.id, creditCode: row.tyshxydm },
});
},
//
editInfo(row) {},
//
deriveBtn() {
this.$confirm("是否确认导出企业库数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.exportLoading = true;
this.download(
"/system/enterpriseBasicInfo/export",
{
...this.formInline,
},
"企业库数据" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
//
importBtn() {
this.$refs.importProject.open();
},
//
importExcel() {
this.$refs["upload"].$refs["upload-inner"].handleClick();
},
//
handleBeforeUpload(file) {
this.$modal.loading("正在上传文件,请稍候...");
return true;
},
handleFileUploadProgress() {},
//
handleFileSuccess(response, file, fileList) {
if (response.code === 200) {
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.importClose();
this.$refs.importProject.close();
this.$modal.closeLoading();
this.getList();
} else {
this.$modal.closeLoading();
this.$modal.msgError(response.msg);
}
},
//
frontDownload() {
var a = document.createElement("a"); //<a></a>
//
// a.href = "/demo/JinJiHu/static/.xlsx";
//
// a.href = "/test/JinJiHuTest/static/.xlsx";
//
a.href = "./static/企业库数据模板.xlsx";
//ahref .
a.download = "企业库模板.xlsx";
//.xlsxpdf.fpd
a.style.display = "none"; // a
document.body.appendChild(a);
// a
a.click(); //aahref
a.remove();
// a
},
//
importClose() {
this.$refs.importProject.close();
},
//
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", this.listToString(this.fileList));
},
//
getFileName(name) {
// url
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1);
} else {
return name;
}
},
//
confirm() {},
//
delInfo(row) {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
cancalDebounce() {
// const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = 500;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 140;
},
},
};
</script>

File diff suppressed because it is too large Load Diff

@ -116,9 +116,17 @@
plain
:disabled="multipleSelection.length > 0 ? false : true"
@click="zipDowmload"
>打包下载</el-button
>文件下载</el-button
>
<el-button
type="primary"
plain
:disabled="multipleSelection.length > 0 ? false : true"
@click="uploadXlsx"
>数据统计</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="info"
@ -516,6 +524,7 @@ import {
uploadFile,
putMunicipalBureauReview,
exportZip,
exportXlsx,
} from "@/api/onlineDeclartion/records";
import updataChange from "./components/index.vue";
import * as XLSX from "xlsx";
@ -605,6 +614,51 @@ export default {
window.removeEventListener("resize", this.cancalDebounce);
},
methods: {
//xlsx
async uploadXlsx() {
let downloadLoadingInstance = Loading.service({
text: "正在下载数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
let id = [];
this.multipleSelection.map((item) => {
id.push(Number(item.id));
});
const res = await exportXlsx({ list: id.join(",") });
try {
this.downloadXLSXFile(res, "数据导出");
downloadLoadingInstance.close();
} catch {
Message.error("下载文件出现错误,请联系管理员!");
}
},
downloadXLSXFile(data, filename) {
// BlobMIMEapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
const blob = new Blob([data], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
// BlobURL
const url = window.URL.createObjectURL(blob);
// <a>
const a = document.createElement("a");
a.href = url;
a.download = filename || "download.xlsx"; //
document.body.appendChild(a);
//
a.click();
// <a>
document.body.removeChild(a);
// BlobURL
URL.revokeObjectURL(url);
},
//
cancalDebounce() {
const element = document.getElementById("app-container"); // ID
@ -692,7 +746,7 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 打包下载 */
/** 文件下载 */
zipDowmload() {
// this.multipleSelection
// this.exportLoading = true;
@ -713,6 +767,7 @@ export default {
.then((response) => {
let blob = new Blob([response], { type: "application/zip" });
let url = window.URL.createObjectURL(blob);
const link = document.createElement("a"); // a
link.href = url;
if (this.multipleSelection.length == 1) {

@ -75,10 +75,13 @@ module.exports = {
],
},
chainWebpack(config) {
const VersionPlugin = require('./src/versionPlugin')
config.plugin('version').use(VersionPlugin).tap(args => {
return args
})
const VersionPlugin = require("./src/versionPlugin");
config
.plugin("version")
.use(VersionPlugin)
.tap((args) => {
return args;
});
config.plugins.delete("preload"); // TODO: need test
config.plugins.delete("prefetch"); // TODO: need test

Loading…
Cancel
Save