|
|
|
@ -3,21 +3,15 @@
|
|
|
|
|
<div class="L-main">
|
|
|
|
|
<header id="L-header">
|
|
|
|
|
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" ref="queryFrom">
|
|
|
|
|
<el-col :span="22">
|
|
|
|
|
<el-form-item label="企业名称:" prop="name">
|
|
|
|
|
<el-input v-model.trim="formInline.name" placeholder="请输入内容"></el-input>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-form-item label="企业名称:" prop="enterpriseName">
|
|
|
|
|
<el-input v-model.trim="formInline.enterpriseName" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="统一社会信用代码:" prop="enterUnit">
|
|
|
|
|
<!-- <el-form-item label="统一社会信用代码:" prop="enterUnit">
|
|
|
|
|
<el-input v-model.trim="formInline.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="经营状态:" prop="policyLevel">
|
|
|
|
|
<el-select class="ignoreElement" v-model="formInline.policyLevel" placeholder="请选择">
|
|
|
|
|
<!-- <el-option
|
|
|
|
|
v-for="dict in dict.type.jjh_project_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value">
|
|
|
|
|
</el-option> -->
|
|
|
|
|
<el-option
|
|
|
|
|
label="省级"
|
|
|
|
|
value="0">
|
|
|
|
@ -27,33 +21,41 @@
|
|
|
|
|
value="1">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</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-col :span="2">
|
|
|
|
|
<el-button v-if="userType !== '01'" type="primary" class="import-btn" icon="el-icon-plus" size="mini" @click="importBtn">新增发文</el-button>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<div class="btnss">
|
|
|
|
|
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" @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-column label="企业名称" prop="name" />
|
|
|
|
|
<el-table-column label="统一社会信用代码" prop="enterUnit" width="140px" />
|
|
|
|
|
<el-table-column label="法定代表人" prop="policyLevel" />
|
|
|
|
|
<el-table-column label="企业名称" prop="enterpriseName" />
|
|
|
|
|
<el-table-column label="统一社会信用代码" prop="creditCode" />
|
|
|
|
|
<!-- <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="createTime" />
|
|
|
|
|
<el-table-column label="所属行业" prop="createTime" />
|
|
|
|
|
<el-table-column label="组织机构代码" prop="createTime" />
|
|
|
|
|
<el-table-column label="注册资本" prop="createTime" /> -->
|
|
|
|
|
<el-table-column label="企业类型" prop="" />
|
|
|
|
|
<el-table-column label="所属行业" prop="" />
|
|
|
|
|
<el-table-column label="成立日期" prop="createTime">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d}") }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <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="createTime" /> -->
|
|
|
|
|
<el-table-column label="操作" prop="userId" class-name="table-operation">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span class="look-info" @click="goInfo(scope.row)">查看详情</span>
|
|
|
|
@ -74,99 +76,57 @@
|
|
|
|
|
</div>
|
|
|
|
|
<!-- :rules="rules" -->
|
|
|
|
|
<my-dialog :title="title" @close="importClose" @confirm="confirm" ref="importProject" closeText="关闭" :myclass="true">
|
|
|
|
|
<el-form :model="addFrom" size="small" ref="importFrom" label-width="120px" class="newArticle" disabled>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="企业名称:" class="importFormItem" prop="name">
|
|
|
|
|
<el-input v-model.trim="addFrom.name" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="统一社会信用代码:" class="importFormItem" prop="policyLevel">
|
|
|
|
|
<el-input v-model.trim="addFrom.policyLevel" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="法定代表人:" class="importFormItem" prop="enterUnit">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="经营状态:" class="importFormItem" prop="enterTime">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="成立日期:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="注册资本:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="企业类型:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="所属行业:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="组织机构代码:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="参保人数:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="曾用名:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="注册地址:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="注册类型:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="经营范围:" class="importFormItem" prop="joinProject">
|
|
|
|
|
<el-input v-model.trim="addFrom.enterUnit" placeholder="请输入内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<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-upload
|
|
|
|
|
ref="upload"
|
|
|
|
|
:limit="1"
|
|
|
|
|
v-show="false"
|
|
|
|
|
accept=".xlsx, .xls"
|
|
|
|
|
:before-upload="handleBeforeUpload"
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
:disabled="upload.isUploading"
|
|
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
|
|
:on-success="handleFileSuccess"
|
|
|
|
|
>
|
|
|
|
|
<template slot="trigger">
|
|
|
|
|
<!-- <div ref="uploadRef">
|
|
|
|
|
<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>
|
|
|
|
|
</template>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-button type="text">下载模板</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="12">
|
|
|
|
|
文件列表
|
|
|
|
|
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
|
|
|
|
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
|
|
|
|
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
|
|
|
|
|
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
|
|
|
|
</el-link>
|
|
|
|
|
<div class="ele-upload-list__item-content-action">
|
|
|
|
|
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</transition-group>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
</el-row>
|
|
|
|
|
</my-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/Pagination/index.vue"
|
|
|
|
|
import myDialog from "@/views/components/myDialog/index.vue"
|
|
|
|
|
import { getJPolicyFile, jPolicyFileNew, jPolicyFileChange, jPolicyFileId, jPolicyFileDel } from "@/api/jin_ji_hu/policyDocument"
|
|
|
|
|
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'],
|
|
|
|
@ -181,21 +141,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
loading:false,
|
|
|
|
|
formInline: {
|
|
|
|
|
name: '',
|
|
|
|
|
enterUnit:"",
|
|
|
|
|
policyLevel:"",
|
|
|
|
|
enterpriseName: '',
|
|
|
|
|
},
|
|
|
|
|
tableData:[
|
|
|
|
|
// {
|
|
|
|
|
// projectName:"苏财建[2021]101号 关于下达2021年江苏省级现代服务业发展 专项资金(现代服务业项目)的通知",
|
|
|
|
|
// project:"全方位生物大分子药定制研发生产(CDMO)服务平台",
|
|
|
|
|
// unit:"苏财政",
|
|
|
|
|
// grade:"市级",
|
|
|
|
|
// issueTime:"2023-03-19",
|
|
|
|
|
// user:"张珊",
|
|
|
|
|
// uploadingTime:"2023-05-11 14:00",
|
|
|
|
|
// }
|
|
|
|
|
],
|
|
|
|
|
tableData:[],
|
|
|
|
|
tabHeader: undefined,
|
|
|
|
|
addFrom: {
|
|
|
|
|
name:"",
|
|
|
|
@ -221,15 +169,32 @@ export default {
|
|
|
|
|
{ required: true, message: '请选择关联项目', trigger: 'change' }
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
title:"新增发文",
|
|
|
|
|
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,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.cancalDebounce();
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
|
|
|
|
|
|
// this.getList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
@ -238,17 +203,17 @@ export default {
|
|
|
|
|
// 列表获取
|
|
|
|
|
getList(){
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getJPolicyFile(this.pagination).then(res=>{
|
|
|
|
|
getEnterList(this.pagination).then(res=>{
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
this.tableData = res.data.records;
|
|
|
|
|
this.total = res.total;
|
|
|
|
|
this.tableData = res.rows;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取页码
|
|
|
|
|
getPagination(pages) {
|
|
|
|
|
this.pagination.current = pages.page;
|
|
|
|
|
this.pagination.size = pages.limit;
|
|
|
|
|
// this.getList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
// 查询
|
|
|
|
|
handleQuery() {
|
|
|
|
@ -259,7 +224,7 @@ export default {
|
|
|
|
|
this.pagination = { ...this.pagination,...this.formInline };
|
|
|
|
|
// console.log(this.pagination);
|
|
|
|
|
// console.log(this.formInline);
|
|
|
|
|
// this.getList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
// 重置
|
|
|
|
|
resetQuery(formName){
|
|
|
|
@ -268,7 +233,7 @@ export default {
|
|
|
|
|
current: 1,
|
|
|
|
|
size: 10
|
|
|
|
|
}
|
|
|
|
|
// this.getList();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
// 修改table背景色
|
|
|
|
|
tableRowClassName({row, rowIndex}){
|
|
|
|
@ -277,84 +242,91 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
return '';
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
goInfo(rwo){
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'enterInfo',
|
|
|
|
|
query: { userId: rwo.id }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 编辑
|
|
|
|
|
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.title = "新增发文";
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
|
},
|
|
|
|
|
// 关闭事件触发
|
|
|
|
|
importClose(){
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.$refs.importFrom.resetFields();
|
|
|
|
|
// 导入事件触发
|
|
|
|
|
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.addFrom = {
|
|
|
|
|
name:"",
|
|
|
|
|
joinProject:"",
|
|
|
|
|
enterUnit:"",
|
|
|
|
|
policyLevel:"",
|
|
|
|
|
enterTime:"",
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.$modal.closeLoading();
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.closeLoading();
|
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 关闭详情
|
|
|
|
|
infoClose(){
|
|
|
|
|
this.addFrom = {}
|
|
|
|
|
this.infoVisible = false;
|
|
|
|
|
// 导入弹框的关闭事件触发
|
|
|
|
|
importClose(){
|
|
|
|
|
this.$refs.importProject.close();
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
goInfo(row){
|
|
|
|
|
this.title = "企业详情"
|
|
|
|
|
jPolicyFileId(row.id).then((res=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.addFrom = res.data;
|
|
|
|
|
this.addFrom.joinProject = this.addFrom.joinProject + ''
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
|
}
|
|
|
|
|
}))
|
|
|
|
|
// 删除文件
|
|
|
|
|
handleDelete(index) {
|
|
|
|
|
this.fileList.splice(index, 1);
|
|
|
|
|
this.$emit("input", this.listToString(this.fileList));
|
|
|
|
|
},
|
|
|
|
|
// 编辑
|
|
|
|
|
editInfo(row){
|
|
|
|
|
this.title = "修改发文"
|
|
|
|
|
jPolicyFileId(row.id).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.addFrom = res.data;
|
|
|
|
|
this.$refs.importProject.open();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// 获取文件名称
|
|
|
|
|
getFileName(name) {
|
|
|
|
|
// 如果是url那么取最后的名字 如果不是直接返回
|
|
|
|
|
if (name.lastIndexOf("/") > -1) {
|
|
|
|
|
return name.slice(name.lastIndexOf("/") + 1);
|
|
|
|
|
} else {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 新增发文
|
|
|
|
|
// 导入弹框的确认按钮
|
|
|
|
|
confirm(){
|
|
|
|
|
this.$refs.importFrom.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// console.log(this.addFrom);
|
|
|
|
|
let id = this.addFrom.id ? this.addFrom.id : null;
|
|
|
|
|
if(id) {
|
|
|
|
|
jPolicyFileChange(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
jPolicyFileNew(this.addFrom).then((res)=>{
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.importClose();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "新增成功!",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 删除
|
|
|
|
|
delInfo(row){
|
|
|
|
@ -364,13 +336,7 @@ export default {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
jPolicyFileDel({ id: row.id }).then((res) => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "删除成功!",
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
@ -379,17 +345,6 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 去往项目库搜索
|
|
|
|
|
goToProject(id){
|
|
|
|
|
// this.$router.push({
|
|
|
|
|
// path: '/project/index',
|
|
|
|
|
// params: { projectId: id }
|
|
|
|
|
// })
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'ProjectList',
|
|
|
|
|
params: { projectId: id }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 屏幕尺寸变化
|
|
|
|
|
cancalDebounce(){
|
|
|
|
|
const element = document.getElementById('L-size-main'); // 通过元素的 ID 获取元素
|
|
|
|
|