项目库文件展示样式、增加打包下载功能(接口还没)、新增申报企业模板时选择所有或部分企业、去除评价结果

prod
吕天方 9 months ago
parent 11b3581377
commit 0b33daee96

@ -67,3 +67,17 @@ export function putMunicipalBureauReview(data) {
data: data
})
}
// 导出zip压缩包
export function exportZip(params) {
return request({
url: '/system/declarationRecords/exportZip',
method: 'get',
responseType: 'blob',
headers: {
"content-type": "application/json; charset=utf-8",
},
params
})
}

@ -1886,6 +1886,7 @@ export default {
},
async mounted(){
let { templateId, templateRecordId, pageType, detailId, enterpriseId} = this.$route.query;
console.log(this.$route.query,"this.$route.query");
this.templateId = templateId
this.templateRecordId = templateRecordId
this.detailId = detailId
@ -1910,9 +1911,8 @@ export default {
this.uploadLabel = '证明材料'
break;
}
console.log('this.templateInfo: ', this.templateInfo);
// getBasicInfo({enterpriseId: this.$store.state.user.enterpriseId}).then((response) => {
getBasicInfo({enterpriseId: this.enterpriseId}).then((response) => {
getBasicInfo({enterpriseId:this.enterpriseId}).then((response) => {
this.baseInfo = response.data
})
getOpenInterface({templateRecordId: templateRecordId}).then((response) => {

@ -179,12 +179,16 @@
</el-col>
<el-col :span="24">
<el-form-item label="企业名录维护方式" label-width="150px" prop="isFrame">
<el-radio-group v-model="form.isFrame">
<!-- <el-radio-group v-model="form.isFrame">
<el-radio label="0">Excel批量导入</el-radio>
</el-radio-group> -->
<el-radio-group v-model="form.isFrame">
<el-radio label="0">所有企业</el-radio>
<el-radio label="1">部分企业</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="14">
<el-col :span="14" v-if="form.isFrame == 1">
<el-form-item label="excel导入企业名录" label-width="150px" prop="fileList">
<el-upload
class="upload-demo"
@ -203,7 +207,7 @@
</div>
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="10" v-if="form.isFrame == 1">
<el-form-item label-width="0" prop="path">
<el-button plain @click="frontDownload" v-if="fileList.length<= 0" style="background-color: #f1d78c; border: none;"></el-button>
</el-form-item>
@ -527,54 +531,54 @@ export default {
},
readFile(file) {
return new Promise(resolve => {
let reader = new FileReader();
reader.readAsBinaryString(file);
reader.onload = ev => {
resolve(ev.target.result);
}
})
},
return new Promise(resolve => {
let reader = new FileReader();
reader.readAsBinaryString(file);
reader.onload = ev => {
resolve(ev.target.result);
}
})
},
// excel
async handle(ev) {
let character = {
enterpriseName: {
text: '企业名字',
type: 'string'
text: '企业名字',
type: 'string'
},
creditCode: {
text: '企业统一信用代码',
type: 'string'
text: '企业统一信用代码',
type: 'string'
}
}
let file = ev.file;
if (!file) return;
// file(json)
let data = await this.readFile(file); //
let workbook = XLSX.read(data, {type: 'binary'}); // xlsx.read(),excel/
let worksheet = workbook.Sheets[workbook.SheetNames[0]];
// json
data = XLSX.utils.sheet_to_json(worksheet);
let arr = []
data.forEach(item => {
let obj = {enterpriseName: item['企业名字'], creditCode: item['企业统一信用代码']};
// for(let key in character) {
// if (!character.hasOwnproperty(key)) break;
// let v = character[key], //
// text = v.text,
// type = v.type;
// v = item[text] || ''; //
// type === 'string' ? (v = String(v)) : null;
// ype === 'number' ? (v = Number(v)) : null;
// obj[key] = v;
// }
arr.push(obj);
this.form.enterpriseDirectoryList = arr
// file(json)
let data = await this.readFile(file); //
let workbook = XLSX.read(data, {type: 'binary'}); // xlsx.read(),excel/
let worksheet = workbook.Sheets[workbook.SheetNames[0]];
// json
data = XLSX.utils.sheet_to_json(worksheet);
let arr = []
data.forEach(item => {
let obj = {enterpriseName: item['企业名字'], creditCode: item['企业统一信用代码']};
// for(let key in character) {
// if (!character.hasOwnproperty(key)) break;
// let v = character[key], //
// text = v.text,
// type = v.type;
// v = item[text] || ''; //
// type === 'string' ? (v = String(v)) : null;
// ype === 'number' ? (v = Number(v)) : null;
// obj[key] = v;
// }
arr.push(obj);
this.form.enterpriseDirectoryList = arr
}); // , excel,
}
}
}
};
</script>
<style lang="scss" scoped>

@ -79,14 +79,24 @@
</el-col>
</el-row>
<el-row id="I-rowTwo" class="radio_btn" v-if="userType == '02'">
<el-radio-group v-model="radio" @change="toggleOptions">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1,8">初审</el-radio-button>
<el-radio-button label="2,7">复审</el-radio-button>
<el-radio-button label="3,6">专家评审</el-radio-button>
<el-radio-button label="4">市级评审</el-radio-button>
<el-radio-button label="5">评定通过</el-radio-button>
</el-radio-group>
<el-col :span="22">
<el-radio-group v-model="radio" @change="toggleOptions">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1,8">初审</el-radio-button>
<el-radio-button label="2,7">复审</el-radio-button>
<el-radio-button label="3,6">专家评审</el-radio-button>
<el-radio-button label="4">市级评审</el-radio-button>
<el-radio-button label="5">评定通过</el-radio-button>
</el-radio-group>
</el-col>
<el-col :span="2" class="zipImport">
<el-button
type="primary"
plain
:disabled="multipleSelection.length > 0 ? false : true"
@click="zipDowmload"
>打包下载</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="info"
@ -143,8 +153,11 @@
v-loading="loading"
:data="menuList"
:height="tabHeader"
row-key="id"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" align="center" width="50" fixed>
<el-table-column type="selection" align="center" width="50" reserve-selection fixed />
<el-table-column label="序号" align="center" width="50">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
@ -188,8 +201,8 @@
<span v-if="scope.row.status == 1" class="approval_status1"></span>
<span v-if="scope.row.status == 0" class="approval_status0">稿</span>
<span v-if="scope.row.status == 8" class="approval_status8">-</span>
<span v-if="scope.row.status == 7" class="approval_status9">-</span>
<span v-if="scope.row.status == 6" class="approval_status9">-</span>
<!-- <span v-if="scope.row.status == 7" class="approval_status9">-</span> -->
<!-- <span v-if="scope.row.status == 6" class="approval_status9">-</span> -->
<span v-if="scope.row.status == 9" class="approval_status9"></span>
</template>
</el-table-column>
@ -204,24 +217,26 @@
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="140" fixed="right">
<!-- 0: 草稿 8初审拒绝 7复审拒绝 6专家评审拒绝 9评定不通过 -->
<!-- v-if="userType == '01' && (scope.row.status == 0 || scope.row.status == 8||scope.row.status == 7||scope.row.status == 6||scope.row.status == 9)" -->
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleEdit(scope.row)"
v-if="userType == '01' && (scope.row.status == 0 || scope.row.status == 8||scope.row.status == 7||scope.row.status == 6||scope.row.status == 9)"
v-if="userType == '01' && (scope.row.status == 0 || scope.row.status == 8)"
>编辑</el-button>
<el-button
size="mini"
type="text"
@click="handleDetail(scope.row)"
>查看详情</el-button>
<el-button
<!-- <el-button
size="mini"
type="text"
v-if="userType == '02' && scope.row.status == 4 && deptId == '104'"
@click="handleOpenCity(scope.row)"
>评价结果</el-button>
>评价结果</el-button> -->
</template>
</el-table-column>
</el-table>
@ -313,7 +328,7 @@
</template>
<script>
import { listRecords, exportData, templateList, downloadData, uploadFile, putMunicipalBureauReview } from "@/api/onlineDeclartion/records"
import { listRecords, exportData, templateList, downloadData, uploadFile, putMunicipalBureauReview, exportZip } from "@/api/onlineDeclartion/records"
import * as XLSX from 'xlsx'
export default {
name: "Records",
@ -347,6 +362,7 @@ export default {
},
enterpriseId: '',
templateDataList: [],
multipleSelection: [],
//
form: {},
//
@ -403,6 +419,9 @@ export default {
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
routerGo() {
this.$router.push({ name: 'supplementaryNew' }).catch(()=>{});
},
@ -456,6 +475,26 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 打包下载 */
zipDowmload() {
// this.multipleSelection
this.multipleSelection.map((item)=>{
})
exportZip().then((response) => {
let blob = new Blob([response.data], { type: "application/zip" });
let url = window.URL.createObjectURL(blob);
const link = document.createElement("a"); // a
link.href = url;
link.download = "模板下载"; //
link.click();
URL.revokeObjectURL(url); //
this.checkList = [];
})
.catch((error) => {
console.log(error.data);
});
},
/** 切换审批项 */
toggleOptions(value1,value2) {
let arr = value1.split(',');
@ -526,6 +565,7 @@ export default {
templateRecordId: row.templateRecordId,
pageType: "edit",
detailId: row.id,
enterpriseId: row.enterpriseId
}})
},
/** 导出按钮操作 */
@ -646,6 +686,12 @@ export default {
margin-bottom: 16px;
}
.radio_btn {
display: flex;
justify-content: flex-end;
.zipImport {
display: flex;
justify-content: flex-end;
}
::v-deep .el-radio-button__inner {
// width: 100px;
// height: 36px;

@ -1,11 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2024-03-25 09:07:08
* @LastEditors: JC9527
* @LastEditTime: 2024-04-18 09:24:20
-->
<template>
<div class="L-public-main" id="L-size-main">
<div class="L-main">

@ -1,11 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2024-03-25 15:37:35
* @LastEditors: JC9527
* @LastEditTime: 2024-04-18 18:24:39
-->
<template>
<div class="project-info-box">
<div class="project-info-title">项目详细信息</div>
@ -19,7 +11,7 @@
{{ item.value }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top-file" :column="3" size="medium" v-loading="loading">
<!-- <el-descriptions class="margin-top-file" :column="3" size="medium" v-loading="loading">
<el-descriptions-item labelClassName="tabOneFileLabel" contentClassName="tabOneFileContent"
v-for="(item,index) in fileInfo"
:key="index"
@ -29,7 +21,20 @@
{{ item.value }}
</a>
</el-descriptions-item>
</el-descriptions>
</el-descriptions> -->
<div class="project-info-title" style="margin-top: 20px;">上传材料</div>
<el-row v-for="(item,index) in fileInfo" :key="index" style="margin-top: 20px;">
<el-col :span="3">
<span>{{ item.key }}</span>
</el-col>
<el-col :span="21">
<span class="file-link" style="border: 1px solid #dcdfe6;padding: 5px;display: flex; align-items: center; width: 50%;">
<img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="" style="width: 20px; margin-right: 10px;">
<a :href="item.url" target="_blank">{{ item.value }}</a>
</span>
</el-col>
</el-row>
</el-row>
</div>
</template>
<script>
@ -130,7 +135,7 @@ export default {
let url = newFile[key] ? newFile[key].split("/") : null;
let obj = {};
obj["key"] = key;
obj["uel"] = newFile[key] ? newFile[key] : '';
obj["url"] = newFile[key] ? newFile[key] : '';
obj["value"] = url ? url[url.length - 1] : '';
arr.push(obj)
}

@ -1,8 +1,8 @@
<template>
<div class="L-public-main projectInfo">
<div class="L-public-main projectInfo" id="L-size-main">
<el-row :gutter="10">
<el-col :span="18">
<div class="left-info">
<div class="left-info" id="L-header">
<div class="project-info-title">{{ info.projectName }}</div>
<el-descriptions class="margin-top" :column="2" size="medium" border v-loading="loading">
<el-descriptions-item label="项目分类" contentClassName="info-link"><a class="a-primary" @click="goback(info.projectClassify)"><dict-tag :options="dict.type.jjh_project_type" :value="info.projectClassify"/></a></el-descriptions-item>
@ -12,10 +12,10 @@
</el-descriptions>
</div>
<div class="left-tabs">
<div class="tabs-top">
<div class="tabs-top" id="L-pagination">
<div v-for="(item,index) in tabs" :key="index" class="tabs-top-item" :class="active == index ? 'active-item' : ''" @click="active = index">{{ item.name }}</div>
</div>
<div class="tabs-bottom">
<div class="tabs-bottom" :style="tabStyle">
<tab-one v-if="active == 0" :detailedInfo="detailedInfo" :fileJson="fileJson"></tab-one>
<tab-two v-if="active == 1" :info="info"></tab-two>
<tab-three v-if="active == 2"></tab-three>
@ -59,10 +59,19 @@ export default {
detailedInfo:{},
fileJson:{},
loading:false,
tabStyle:{
height:undefined,
overflow: 'auto'
}
}
},
mounted(){
this.getInfo(this.$route.query.userId)
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
getInfo(id){
@ -87,6 +96,16 @@ export default {
query: { projectId: 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.tabStyle.height = (elementHeight - headerHeight - paginationtHeight - 20) + 'px';
}
},
}
</script>

Loading…
Cancel
Save