Commit d2733daa authored by yht15023815643's avatar yht15023815643

评标助手

parent 3c3ed822
import request from '@/utils/request'
export function zjyjAptitude (data) {
return request({
url: '/enterprise/zjyjAptitude',
method: 'post',
data
})
}
export function enterpriseAptitude (data) {
return request({
url: '/enterprise/zjyj/enterpriseAptitude',
method: 'post',
data
})
}
export function importTemplate (data) {
return request({
url: '/export/aptitude/importTemplate',
method: 'post',
responseType: "blob",
data
})
}
export function list (data) {
return request({
url: '/user/file/record/list',
method: 'get',
params:data
})
}
//资质标准
export function standard (data) {
return request({
url: '/enterprise/zjyj/cert/standard',
method: 'post',
data
})
}
This diff is collapsed.
<template>
<div v-loading="loading" class="market-container">
<iframe id="companyIframe" class="market-iframe" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" width="100%" :src="src" />
<div v-loading="loading" class="advisoryOrgan-container">
<iframe id="companyIframe" class="advisoryOrgan-iframe" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" width="100%" :src="src" />
</div>
</template>
......@@ -81,7 +81,7 @@ export default {
async iframeObserver() {
try {
await this.$nextTick();
this.iframeIns = document.querySelector(".market-iframe");
this.iframeIns = document.querySelector(".advisoryOrgan-iframe");
} catch (error) {
console.log(error);
}
......@@ -101,7 +101,7 @@ export default {
if (res.code == 200) {
this.timelongs = res.data.expire;
this.ak = res.data.accessToken;
this.src = `${this.domain}/search/market?ak=${this.ak}&initTime=${new Date().getTime()}&uid=${this.ak}&origin=${window.location.origin}`;
this.src = `${this.domain}/search/advisoryOrgan?ak=${this.ak}&initTime=${new Date().getTime()}&uid=${this.ak}&origin=${window.location.origin}`;
this.refreshtoken();
} else {
clearTimeout(this.tokentimer);
......@@ -140,7 +140,7 @@ export default {
</script>
<style lang="scss" scoped>
.market-container {
.advisoryOrgan-container {
width: 100%;
height: 100%;
padding: 16px 24px;
......@@ -150,7 +150,7 @@ export default {
left: 0;
top: 0;
.market-iframe {
.advisoryOrgan-iframe {
width: 100%;
height: 100%;
}
......
......@@ -7,7 +7,7 @@
<el-tab-pane label="历史批量查询结果" name="third"></el-tab-pane>
</el-tabs>
</div>
<SearchAptitude v-if="activeName === 'first'"></SearchAptitude>
<SearchAptitude @changeActiveName="activeName = 'third'" v-if="activeName === 'first'"></SearchAptitude>
<AptitudeStandard v-if="activeName === 'second'"></AptitudeStandard>
<SearchResult v-if="activeName === 'third'"></SearchResult>
......
<template>
<div>
<div class="apt_stan_header">
<span v-for="(item,index) in list" class="apt_stan_header_span" :class="activeIndex==index?'active_span':''" :key="index" @click="activeIndex=index">{{item}}</span>
<span v-for="(item,index) in list" class="apt_stan_header_span" :class="activeIndex==index?'active_span':''" :key="index" @click="changeActiveIndex(index)">{{item.name}}</span>
</div>
<div class="apt_stan_content">
<div class="apt_stan_content_header">
<el-select v-model="value" placeholder="请选择">
<el-select v-model="value" value-key="id" @change="selectChange" placeholder="请选择">
<el-option
v-for="item in list[activeIndex].list"
:key="item.id"
:label="item.name"
:value="item">
</el-option>
</el-select>
<el-select v-model="value1" @change="selectChange1" v-if="options.length>0" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<div style="padding:16px;">
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" v-horizontal-scroll="'hover'"
<el-table :data="info.list" :span-method="objectSpanMethod" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" v-horizontal-scroll="'hover'"
class="table-item1 fixed-table" border highlight-current-row>
<el-table-column label="资质名称" fixed >
<template slot-scope="scope">
{{scope.row.province}}
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column label="等级" width="274">
<template slot-scope="scope">
{{scope.row.biddingCount||"--"}}
{{scope.row.level||"--"}}
</template>
</el-table-column>
<el-table-column label="经营范围" >
<template slot-scope="scope">
{{scope.row.landInfoCount||"--"}}
{{scope.row.contractScope||"--"}}
</template>
</el-table-column>
</el-table>
<div class="apt_stan_content_text_box">·建筑工程是指各类结构形式的民用建筑工程、工业建筑工程、构筑物工程以及相配套的道路、通信、管网管线等设施工程。工程内容包括地基与基础、主体结构、建筑屋面、装修装饰、建筑幕墙、附建人防工程以及给水排水及供暖、通风与空调、电气、消防、智能化、防雷等配套工程;</div>
<div class="apt_stan_content_text_box" v-html="info.remark||'--'"></div>
</div>
</div>
......@@ -44,33 +52,75 @@
</template>
<script>
import list from "@/assets/json/certs.json"
import {standard} from '@/api/supplier/assistant.js';
export default {
data(){
return{
tableData:[],
list,
activeIndex:0,
list:['建筑业企业资质','工程监理','工程设计','工程勘察','工程造价咨询'],
options: [
{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}
],
value: ''
options: [],
value: '',
value1: '',
info:"",
}
},
methods:{
flitterData(arr) {
let spanOneArr = [];
let concatOne = 0;
arr.forEach((item, index) => {
if (index === 0) {
spanOneArr.push(1);
} else {
if (item.name === arr[index - 1].name) {
spanOneArr[concatOne] += 1;
spanOneArr.push(0);
} else {
spanOneArr.push(1);
concatOne = index;
}
}
});
return {
one: spanOneArr,
};
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const _row = this.flitterData(this.info.list).one[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
},
selectChange(){
if(this.value.list&&this.value.list.length>0){
this.options = this.value.list;
this.value1 = ""
}else{
this.options = []
standard({id:this.value.id}).then(res=>{
this.info = res.data
})
}
},
selectChange1(){
standard({id:this.value1}).then(res=>{
this.info = res.data
})
},
changeActiveIndex(index){
this.activeIndex=index;
this.value = '';
this.options = []
},
}
}
</script>
......
<template>
<el-dialog title="批量查资质" custom-class="batch_import_dialog" :visible.sync="visible">
<div class="upload" v-if="addfile==false">
<div class="upload" >
<div class="up_title">导入Excel文件,高效查询或导出企业信息;查询成功后可使用筛选项二次筛选</div>
<div>
<div class="step_box" v-for="(item,index) in list" :key="index">
......@@ -34,28 +34,14 @@
<div class="btn btn_default fr" @click="importCancel">取消</div>
</div>
</div>
<div class="success" v-if="addfile==true">
<div v-if="addsuccess==false">
<img class="img" src="@/assets/images/project/clock.png">
<div class="p1">查询客户中...</div>
<div class="p2">请耐心等待,过程大概30秒</div>
</div>
<div v-if="addsuccess == true">
<div class="p3">
<img src="@/assets/images/project/success.png">查询成功
</div>
<div class="p2">{{messages}}</div>
<div class="btns">
<div class="btn btn_primary h32" @click="getmsg">查看</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import { getToken } from "@/utils/auth";
import "@/assets/styles/project.scss"
import {importTemplate} from '@/api/supplier/assistant.js';
import {importData} from '@/api/custom/custom'
export default {
name: 'batchImport',
......@@ -67,7 +53,6 @@
list:['下载模版','按要求在模板内填写企业全称名录','上传文件','查询结果'],
visible:false,
isUpload:false,//有上传的文件
addfile:false,//已上传文件
addsuccess:false,//已成功加入数据
//批量导入
action:"",
......@@ -76,19 +61,11 @@
Authorization: "Bearer " + getToken(),
},
downloadhref:'',//样例地址
successCount:0,//成功条数
messages:'',
}
},
created(){
if(this.importtype == 'project'){//项目管理
this.downloadhref = '/file/projectTemplate.xlsx'
this.action = process.env.VUE_APP_BASE_API + '/business/info/upload'
}
if(this.importtype == 'custom'){//客户管理
this.downloadhref = '/file/Template.xlsx'
this.action = process.env.VUE_APP_BASE_API + "/customer/importData"
}
this.downloadhref = importTemplate
this.action = process.env.VUE_APP_BASE_API + '/export/aptitude/file'
},
methods:{
getmsg(){
......@@ -122,17 +99,10 @@
},
onSuccess(res, file, fileList) {
if (res.code == 200) {
this.successCount = res.successCount
if(this.importtype == 'project'){//项目管理
this.messages = res.msg
}
if(this.importtype == 'custom'){//客户管理
let num = res.data?res.data.length:0
let str = '成功导入客户条数'+res.successCount+',客户去重条数'+ num
this.messages = str
}
this.addsuccess = true
this.addsuccess = true;
this.$emit("loadingFn",true);
this.$refs["upload"].clearFiles();
this.isUpload = false;
}else {
this.importCancel()
this.$message.error({ message: res.msg, showClose: true })
......@@ -140,24 +110,25 @@
},
downloadClick() {
let a = document.createElement("a");
a.setAttribute("href", this.downloadhref);
a.setAttribute("download", "批量导入模版.xlsx");
document.body.appendChild(a);
a.click();
a.remove();
importTemplate().then(res=>{
const link = document.createElement('a')
const blob = new Blob([res])
link.href = window.URL.createObjectURL(blob)
link.download = '批量导入模版.xlsx'
link.click()
})
},
// 批量导入
importConfirmClick() {
if (this.fileList.length > 0) {
this.$refs["upload"].submit();
this.addfile = true
this.visible = false
this.$emit("loadingFn")
} else {
this.$message("请先选择文件");
}
},
importCancel(){
this.addfile = false
this.isUpload = false
this.addsuccess = false
this.fileList = []
......
......@@ -9,41 +9,61 @@
</el-table-column>
<el-table-column label="表格名称" >
<template slot-scope="scope">
{{scope.row.biddingCount||"--"}}
{{scope.row.fileName||"--"}}
</template>
</el-table-column>
<el-table-column label="查询时间" width="189">
<template slot-scope="scope">
{{scope.row.landInfoCount||"--"}}
{{scope.row.createTime||"--"}}
</template>
</el-table-column>
<el-table-column label="操作" width="154">
<template slot-scope="scope">
{{scope.row.bondBalance||"--"}}
<a class="download_span" :href="scope.row.url" v-if="scope.row.url">下载</a>
<span v-else >--</span>
</template>
</el-table-column>
</el-table>
<el-pagination background :current-page="pageNum" @current-change="handleCurrentChange" layout="prev, pager, next"
<el-pagination background v-if="total>0" :current-page="pageNum" @current-change="handleCurrentChange" layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</template>
<script>
import {list} from '@/api/supplier/assistant.js';
export default {
data(){
return{
tableData:[],
total: 0,
pageNum: 1,
pageSize:10,
}
},
created(){
this.getList()
},
methods:{
handleCurrentChange(pageNum) {
this.pageNum = pageNum;
this.getList()
},
getList(){
let params = {
pageNum:this.pageNum,
pageSize:this.pageSize,
}
list(params).then(res=>{
if(res.code==200){
this.tableData = res.rows
this.total = res.total
}
})
},
}
}
......@@ -60,6 +80,10 @@ export default {
margin-right: -5px;
margin-top: 16px;
}
.download_span{
color: #0081FF;
cursor: pointer;
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment