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

xuhongjie
许宏杰 2 months ago
parent e76d4ea867
commit f7cc4264be

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

@ -1,83 +1,91 @@
import request from '@/utils/request' import request from "@/utils/request";
// 查询在线申报记录列表 // 查询在线申报记录列表
export function listRecords(query) { export function listRecords(query) {
return request({ return request({
url: '/system/declarationRecords/list', url: "/system/declarationRecords/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 查询申报模版列表 // 查询申报模版列表
export function templateList(query) { export function templateList(query) {
return request({ return request({
url: '/system/templateRecord/templateNameList', url: "/system/templateRecord/templateNameList",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 导出 // 导出
export function exportData(data) { export function exportData(data) {
return request({ return request({
url: '/system/declarationRecords/export', url: "/system/declarationRecords/export",
method: 'post', method: "post",
responseType: 'blob', responseType: "blob",
data: data data: data,
}) });
} }
// 新增企业名录 // 新增企业名录
export function addTemplateRecord(data) { export function addTemplateRecord(data) {
return request({ return request({
url: '/system/templateRecord', url: "/system/templateRecord",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 下载需要评定数据 // 下载需要评定数据
export function downloadData(data) { export function downloadData(data) {
return request({ return request({
url: '/system/declarationRecords/exportMunicipalBureauReview', url: "/system/declarationRecords/exportMunicipalBureauReview",
method: 'post', method: "post",
responseType: 'blob', responseType: "blob",
data: data data: data,
}) });
} }
// 上传单个文件 // 上传单个文件
export function uploadFile(data) { export function uploadFile(data) {
return request({ return request({
url: '/common/upload', url: "/common/upload",
method: 'post', method: "post",
data: data, data: data,
// headers: { // headers: {
// 'Content-type': 'multipart/form-data' // 'Content-type': 'multipart/form-data'
// } // }
}) });
} }
// 上传评定数据 // 上传评定数据
export function putMunicipalBureauReview(data) { export function putMunicipalBureauReview(data) {
return request({ return request({
url: '/system/declarationRecords/municipalReviewNew', url: "/system/declarationRecords/municipalReviewNew",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 导出zip压缩包 // 导出zip压缩包
export function exportZip(params) { export function exportZip(params) {
return request({ return request({
url: '/system/declarationRecords/fileList', url: "/system/declarationRecords/fileList",
method: 'get', method: "get",
responseType: 'blob', responseType: "blob",
headers: { headers: {
"content-type": "application/json; charset=utf-8", "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", path: "/login",
// component: () => import("@/views/login"), // 测试环境登录页 component: () => import("@/views/login"), // 测试环境登录页
component: () => import("@/views/login_v1"), // 正式环境登录页 // component: () => import("@/views/login_v1"), // 正式环境登录页
hidden: true, hidden: true,
}, },
{ {

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

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

Loading…
Cancel
Save