|
|
|
@ -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";
|
|
|
|
|
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
|
|
|
|
a.download ="企业库模板.xlsx";
|
|
|
|
|
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
|
|
|
|
a.style.display = "none"; // 障眼法藏起来a标签
|
|
|
|
|
document.body.appendChild(a);
|
|
|
|
|
// 将a标签追加到文档对象中
|
|
|
|
|
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
|
|
|
|
a.remove();
|
|
|
|
|
// 一次性的,用完就删除a标签
|
|
|
|
|
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
|
|
|
|
a.download = "企业库模板.xlsx";
|
|
|
|
|
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
|
|
|
|
a.style.display = "none"; // 障眼法藏起来a标签
|
|
|
|
|
document.body.appendChild(a);
|
|
|
|
|
// 将a标签追加到文档对象中
|
|
|
|
|
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
|
|
|
|
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>
|
|
|
|
|