Commit 0d88cc7c authored by 张冬's avatar 张冬

开标大厅样式和上传等待

parent ba1041d5
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -171,6 +171,7 @@ img {
position: absolute;
right: 10px;
bottom: 10px;
width: 400px;
}
.content-head > h3 {
font-weight: bold;
......
<template>
<div class="hello">
<el-upload
  
:on-remove="handleRemove"
:on-success="handleSuccess"
:before-remove="beforeRemove"
......@@ -12,7 +13,7 @@
:http-request="handleUpload"
multiple
>
<el-button size="small" type="primary">点击上传</el-button>
<el-button size="small" type="primary" v-loading.fullscreen.lock="loading">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
{{ tip }}
</div>
......@@ -97,6 +98,7 @@ export default {
this.$emit('input', value);
},
beforeUpload(file) {
this.loading=true
const max = this.max;
const isLt2M = file.size / 1024 / 1024 < max;
if (!isLt2M) {
......@@ -114,6 +116,7 @@ export default {
console.log(res);
this.fileList.push(res);
this.emitInput(this.fileList);
this.loading=false
});
},
handleRemove(file, fileList, index) {
......@@ -121,9 +124,6 @@ export default {
this.fileList = fileList;
this.emitInput(fileList);
},
// handlePreview(file) {
// this.$emit('on-preview', file);
// },
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
......
......@@ -98,4 +98,5 @@ export default {
.sidebar > ul {
height: 100%;
}
.el-menu-item i{color:#AFB0B3}
</style>
<template>
<div>
<div class="content">
<div>
<dataBreadcrumb :breads="breads"></dataBreadcrumb>
<div>中国标准时间:{{ currentTime }}</div>
<div class="back-fff" style="padding: 10px 0 0 10px">中国标准时间:{{ currentTime }}</div>
<div class="hal">
<h2 style="text-align: center;">{{projectName}}项目开标大厅</h2>
<h2 class="back-fff" style="text-align: center">{{ projectName }}项目开标大厅</h2>
<div class="back-fff flex-center time">
<div class="time-message flex-between">
<div class="flex">
<p>截标倒计时:</p>
<timeDown :remain-time="remaintime" @countDowmEnd="remaintimeEnd"></timeDown>
</div>
<!-- <div class="flex" v-show="decodeTime"> -->
<div class="flex" v-show="openStatus==2">
<div class="flex" v-show="openStatus == 2">
<p>解密倒计时:</p>
<timeDown :remain-time="decodeTime" @countDowmEnd="decodeTimeEnd"></timeDown>
</div>
<!-- <div class="flex" v-show="signatureTime"> -->
<div class="flex" v-show="openStatus==2">
<div class="flex" v-show="openStatus == 2">
<p>签名倒计时:</p>
<timeDown :remain-time="signatureTime" @countDowmEnd="signatureTimeEnd"></timeDown>
</div>
</div>
<div class="flex">
<div class="hal-left">
<div>
<h1>签到{{leftmessage.signIn}}</h1>
<h1>解密{{leftmessage.decode}}</h1>
<h1>签名{{leftmessage.signature}}</h1>
</div>
<div @click="isMessge=true">签到解密签名情况</div>
<div class="flex">
<div class="hal-left back-fff flex-colunm">
<h1>签到{{ leftmessage.signIn }}</h1>
<h1>解密{{ leftmessage.decode }}</h1>
<h1>签名{{ leftmessage.signature }}</h1>
<div @click="isMessge = true">签到解密签名情况 ></div>
</div>
<div class="hal-center" v-chat-scroll>
<div class="hal-center back-fff" v-chat-scroll>
<ul>
<li v-for="(item,index) in halList" :key="index" class="flex-item textheight">
<div>{{item.time}}</div>
<div>{{item.name}}</div>
<div>{{item.behavior}}</div>
<li v-for="(item, index) in halList" :key="index" class="flex-item textheight">
<div>{{ item.time }}</div>
<div>{{ item.name }}</div>
<div>{{ item.behavior }}</div>
</li>
</ul>
</div>
<div class="hal-right">
<el-button @click="isdialogue">在线对话<i class="el-icon-chat-dot-round"></i></el-button>
<div class="button-pos">
<el-button v-if="openStatus==1" type="primary" @click="confirm" style="margin-left: 10px;" :disabled="!openbidButton">立即开标</el-button>
<el-button v-if="openStatus==2" type="primary" @click="end" style="margin-top: 10px;" :disabled="!endbidButton">结束开标</el-button>
</div>
<el-button type="primary" @click="isdialogue"><i class="el-icon-chat-dot-round"></i>在线对话</el-button>
<el-button type="primary" @click="openInfo1" :disabled="!endbidButton" v-if="!issueTable">下发开标一览表</el-button>
<el-button type="primary" @click="openInfo" :disabled="!issueTable">查看开标一览表</el-button>
</div>
<!-- 在线对话 -->
<div class="dialogue" style="margin-top: 30px;" v-show="dialogue">
<JwChat :taleList="dialogueList" scrollType="scroll" @enter="bindEnter" v-model="content" :toolConfig="tool" >
<el-button slot="tools" style="float:right" class="abs" @click="dialogue=false">关闭聊天框</el-button>
<div class="dialogue" style="margin-top: 30px" v-show="dialogue">
<JwChat :taleList="dialogueList" scrollType="scroll" @enter="bindEnter" v-model="content" :toolConfig="tool">
<el-button slot="tools" style="float: right" class="abs" @click="dialogue = false">关闭聊天框</el-button>
</JwChat>
</div>
<!--
......@@ -70,25 +69,38 @@
</div> -->
</div>
<!-- 最下面一栏 -->
<div class="flex-between buttons">
<el-button @click="isfailInfo=true" v-if="!isFailed">流标</el-button>
<el-button @click="failDetail" v-else>流标信息</el-button>
<div class="flex-center buttons">
<div>
<el-button type="primary" @click="isfailInfo = true" v-if="!isFailed">流标</el-button>
<el-button type="primary" @click="failDetail" v-else>流标信息</el-button>
</div>
<div>
<el-button type="primary" @click="back">退出大厅</el-button>
</div>
<div>
<!-- <el-button icon="el-icon-refresh" @click="refrsh">刷新</el-button> -->
<el-button @click="openInfo1" :disabled="!endbidButton" v-if="!issueTable">下发开标一览表</el-button>
<el-button @click="openInfo" :disabled="!issueTable">查看开标一览表</el-button>
<el-button
v-if="openStatus == 1"
type="primary"
@click="confirm"
style="margin-left: 10px"
:disabled="!openbidButton"
>立即开标</el-button
>
<el-button v-if="openStatus == 2" type="primary" @click="end" style="margin-top: 10px" :disabled="!endbidButton"
>结束开标</el-button
>
</div>
<el-button @click="back">退出大厅<i class="el-icon-right"></i></el-button>
</div>
</div>
<!--确认开标窗口 -->
<el-dialog :visible.sync="isOpenbid" title="确认开标" width="35%">
<div class="flex bid-message" style="width: 70%;margin:0 auto">
<div>项目编号:{{projectCode}}</div>
<div>项目名称:{{ projectName}}</div>
<div style="margin-right:120px;">投标人数:{{startDetail.bidFileCount}}</div>
<div>缴纳保证金人数:{{startDetail.earnestFeeCount}}</div>
<div>签到人数:{{startDetail.signInCount}}</div>
<div class="flex bid-message" style="width: 70%; margin: 0 auto">
<div>项目编号:{{ projectCode }}</div>
<div>项目名称:{{ projectName }}</div>
<div style="margin-right: 120px">投标人数:{{ startDetail.bidFileCount }}</div>
<div>缴纳保证金人数:{{ startDetail.earnestFeeCount }}</div>
<div>签到人数:{{ startDetail.signInCount }}</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="isOpenbid = false">取消开标</el-button>
......@@ -135,18 +147,16 @@
</el-dialog>
<!-- 开标一览表 -->
<el-dialog :visible.sync="isopenInfo" title="开标一览表">
<nopageTable :tableData="tableData" :columns="nopagecolumns" :margin-top="0" :margin-bottom="0">
</nopageTable>
<nopageTable :tableData="tableData" :columns="nopagecolumns" :margin-top="0" :margin-bottom="0"> </nopageTable>
<div slot="footer" class="dialog-footer">
<el-button @click="isopenInfo=false">关闭 </el-button>
<el-button @click="isopenInfo = false">关闭 </el-button>
</div>
</el-dialog>
<!-- 下发开标一览表 -->
<el-dialog :visible.sync="isopenInfo1" title="下发开标一览表">
<nopageTable :tableData="tableData" :columns="nopagecolumns" :margin-top="0" :margin-bottom="0">
</nopageTable>
<nopageTable :tableData="tableData" :columns="nopagecolumns" :margin-top="0" :margin-bottom="0"> </nopageTable>
<div slot="footer" class="dialog-footer">
<el-button @click="isopenInfo1=false">关闭 </el-button>
<el-button @click="isopenInfo1 = false">关闭 </el-button>
<el-button @click="issue" type="primary">下发 </el-button>
</div>
</el-dialog>
......@@ -154,7 +164,7 @@
<el-dialog :visible.sync="isfailInfo" title="流标">
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-form-item label="操作人">
<div>{{userName}}</div>
<div>{{ userName }}</div>
</el-form-item>
<el-form-item label="流标原因" prop="reason">
<el-input v-model.trim="form.reason" maxlength="300" type="textarea" :rows="2"></el-input>
......@@ -172,17 +182,17 @@
<el-dialog :visible.sync="isfailDetail" title="流标信息">
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-form-item label="操作人">
<div>{{userName}}</div>
<div>{{ userName }}</div>
</el-form-item>
<el-form-item label="流标原因" prop="reason">
<div>{{faildetail.reason}}</div>
<div>{{ faildetail.reason }}</div>
</el-form-item>
<el-form-item label="上传附件" v-if="faildetail.fileName">
<div @click="down(faildetail.fileUrl)">{{faildetail.fileName}}</div>
<div @click="down(faildetail.fileUrl)">{{ faildetail.fileName }}</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="isfailDetail= false">取 消</el-button>
<el-button @click="isfailDetail = false">取 消</el-button>
</div>
</el-dialog>
</div>
......@@ -190,13 +200,9 @@
</template>
<script>
import {
openUrl
} from '@utils/common'
import {
getTime
} from '@utils/time'
import {
import { openUrl } from '@utils/common';
import { getTime } from '@utils/time';
import {
timeInfo,
startInfo,
openInfo,
......@@ -206,13 +212,13 @@
bidFaileddetail,
bidFinish,
issueopenInfo
} from '@api/purchaser/bid'
import dataBreadcrumb from '@components/dataBreadcrumb.vue'
import timeDown from '@components/timeDown.vue'
import dataTable from '@components/dataTable.vue'
import nopageTable from '@components/nopageTable.vue'
import singleUpload from '@components/Upload/Upload.vue'
export default {
} from '@api/purchaser/bid';
import dataBreadcrumb from '@components/dataBreadcrumb.vue';
import timeDown from '@components/timeDown.vue';
import dataTable from '@components/dataTable.vue';
import nopageTable from '@components/nopageTable.vue';
import singleUpload from '@components/Upload/Upload.vue';
export default {
components: {
dataBreadcrumb,
timeDown,
......@@ -225,22 +231,24 @@
tool: {
show: ['11'],
callback: this.toolEvent,
showEmoji: false,
showEmoji: false
},
issueTable: false,
openStatus: '',
faildetail: "",
faildetail: '',
isfailDetail: false,
projectCode: "",
projectName: "",
userName: "",
projectCode: '',
projectName: '',
userName: '',
isFailed: true,
rules: {
reason: [{
reason: [
{
required: true,
message: '请输入',
trigger: 'blur'
}]
}
]
},
form: {
reason: '',
......@@ -251,22 +259,23 @@
tableData: [],
isopenInfo: false,
isopenInfo1: false,
startDetail: "",
startDetail: '',
dialogue: false,
remaintime: "",
storagedecodeTime: "",
storagesignatureTime: "",
decodeTime: "",
signatureTime: "",
remaintime: '',
storagedecodeTime: '',
storagesignatureTime: '',
decodeTime: '',
signatureTime: '',
isMessge: false,
pageObj: {
size: 10,
currentPage: 1,
func: (currentPage) => {
this.pageTurning(currentPage)
this.pageTurning(currentPage);
}
},
nopagecolumns: [{
nopagecolumns: [
{
label: '投标人名称',
prop: 'companyName'
},
......@@ -276,10 +285,11 @@
},
{
label: '是否签名',
prop: 'isSign',
},
prop: 'isSign'
}
], //
columns: [{
columns: [
{
label: '投标公司',
prop: 'companyName'
},
......@@ -304,64 +314,61 @@
currentTime: '',
breads: ['招标管理', '招标项目管理', '工作台'],
websock: null,
content: "",
content: '',
dialogueList: [],
myId: "",
leftmessage: "",
timer: ""
}
myId: '',
leftmessage: '',
timer: ''
};
},
created() {
this.projectCode = localStorage.getItem("projectCode")
this.projectName = localStorage.getItem("projectName")
this.userName = JSON.parse(localStorage.getItem("userInfo")).name
this.projectCode = localStorage.getItem('projectCode');
this.projectName = localStorage.getItem('projectName');
this.userName = JSON.parse(localStorage.getItem('userInfo')).name;
// this.gettimeInfo();
this.getsigndetail();
this.myId = JSON.parse(localStorage.getItem("userInfo")).userId
this.pageObj.companyId = localStorage.getItem("companyId")
this.pageObj.projectId = localStorage.getItem("projectId")
this.myId = JSON.parse(localStorage.getItem('userInfo')).userId;
this.pageObj.companyId = localStorage.getItem('companyId');
this.pageObj.projectId = localStorage.getItem('projectId');
// 中国标准时间
let currentTime = getTime()
this.currentTime = currentTime
let currentTime = getTime();
this.currentTime = currentTime;
this.timer1 = setInterval(() => {
let currentTime = getTime()
this.currentTime = currentTime
}, 1000)
let currentTime = getTime();
this.currentTime = currentTime;
}, 1000);
// websocket
this.createWebSocket()
this.createWebSocket();
// 长轮训获取
this.timer = setInterval(() => {
this.getsigndetail()
this.getsigndetail();
}, 5000);
},
methods: {
openInfo() {
this.isopenInfo = true
this.isopenInfo = true;
this.getopenInfo();
},
openInfo1() {
this.isopenInfo1 = true
this.isopenInfo1 = true;
this.getopenInfo();
},
// 下发
async issue() {
let projectId = localStorage.getItem("projectId")
let projectId = localStorage.getItem('projectId');
try {
const {
msg,
code
} = await issueopenInfo(projectId)
const { msg, code } = await issueopenInfo(projectId);
if (code == 200) {
this.getsigndetail()
this.getsigndetail();
this.$message({
message: msg,
type: 'success',
duration: 1500
})
this.isopenInfo1 = false
});
this.isopenInfo1 = false;
}
} catch (e) {
console.log(e)
console.log(e);
}
},
/* refrsh() {
......@@ -369,72 +376,63 @@
}, */
async end() {
try {
let projectId = localStorage.getItem("projectId")
const {
msg,
code
} = await bidFinish(projectId)
let projectId = localStorage.getItem('projectId');
const { msg, code } = await bidFinish(projectId);
if (code == 200) {
this.$message({
message: msg,
type: 'success',
duration: 1500
})
});
setTimeout(() => {
this.$router.go(-1)
}, 1500)
this.$router.go(-1);
}, 1500);
} else {
this.$message.error(msg)
this.$message.error(msg);
}
} catch (e) {
console.log(e)
console.log(e);
}
},
down(url) {
window.open(url)
window.open(url);
},
// 流标详情
async failDetail() {
this.isfailDetail = true
let projectId = localStorage.getItem("projectId")
const {
data,
code
} = await bidFaileddetail(projectId)
this.isfailDetail = true;
let projectId = localStorage.getItem('projectId');
const { data, code } = await bidFaileddetail(projectId);
if (code == 200) {
this.faildetail = data
this.faildetail = data;
}
},
// 确定流标
async failbid() {
try {
let valid = await this.$refs['form'].validate()
let valid = await this.$refs['form'].validate();
if (valid) {
let form = this.form;
form.projectId = localStorage.getItem("projectId")
const {
code,
msg
} = await openbidFailed(form)
form.projectId = localStorage.getItem('projectId');
const { code, msg } = await openbidFailed(form);
if (code === 200) {
this.$message.success(msg)
this.isfailInfo = false
this.isFailed = false
this.$message.success(msg);
this.isfailInfo = false;
this.isFailed = false;
} else if (code === 500) {
this.$message.error(msg)
this.isfailInfo = false
this.isFailed = false
this.$message.error(msg);
this.isfailInfo = false;
this.isFailed = false;
}
}
} catch (e) {
console.log(e)
console.log(e);
}
},
isdialogue() {
this.dialogue = !this.dialogue
this.dialogue = !this.dialogue;
},
getfile(val) {
this.form.filePOList = val
this.form.filePOList = val;
},
// 时间信息
// async gettimeInfo() {
......@@ -448,98 +446,85 @@
// 开标按钮上三个信息(投标人数,缴纳保证金人数,签到人数)
async getstartInfo() {
try {
let projectId = localStorage.getItem("projectId")
const {
data,
code
} = await startInfo(projectId)
let projectId = localStorage.getItem('projectId');
const { data, code } = await startInfo(projectId);
if (code == 200) {
this.startDetail = data
this.startDetail = data;
}
} catch (e) {
console.log(e)
console.log(e);
}
},
//签到解密略简
async getsigndetail() {
try {
let projectId = localStorage.getItem("projectId")
var {
data,
code,
msg
} = await timeInfo(projectId)
let projectId = localStorage.getItem('projectId');
var { data, code, msg } = await timeInfo(projectId);
if (code == 200) {
let remaintime = Number(data.remainTime);
if (remaintime < 0) {
this.openbidButton = true
this.openbidButton = true;
} else {
this.remaintime = remaintime
this.remaintime = remaintime;
}
this.storagedecodeTime = Number(data.decodeTime)
this.storagesignatureTime = Number(data.signatureTime)
this.storagedecodeTime = Number(data.decodeTime);
this.storagesignatureTime = Number(data.signatureTime);
} else {
this.$message({
message: msg,
type: 'error',
duration: 3000
})
});
setTimeout(() => {
this.$router.go(-1)
}, 3000)
this.$router.go(-1);
}, 3000);
}
var {
data,
code
} = await signdetail(projectId)
var { data, code } = await signdetail(projectId);
if (code == 200) {
this.leftmessage = data
this.openStatus = data.openStatus
this.isFailed = data.isFailed
this.issueTable = data.issueTable
this.leftmessage = data;
this.openStatus = data.openStatus;
this.isFailed = data.isFailed;
this.issueTable = data.issueTable;
if (data.openStatus == 2) {
let localTime = new Date().getTime();
console.log(this.storagedecodeTime, "..............")
let comparyTime = this.storagedecodeTime - (localTime - data.openBidTime) / 1000
console.log(comparyTime)
console.log(this.storagedecodeTime, '..............');
let comparyTime = this.storagedecodeTime - (localTime - data.openBidTime) / 1000;
console.log(comparyTime);
if (comparyTime > 0) {
this.decodeTime = comparyTime
this.signatureTime = this.storagesignatureTime - (localTime - data.openBidTime) / 1000
console.log("大于")
this.decodeTime = comparyTime;
this.signatureTime = this.storagesignatureTime - (localTime - data.openBidTime) / 1000;
console.log('大于');
} else {
console.log("小于")
this.endbidButton = true
console.log('小于');
this.endbidButton = true;
}
}
}
} catch (e) {
console.log(e)
console.log(e);
}
},
// 开标一栏表
async getopenInfo() {
try {
let projectId = localStorage.getItem("projectId")
const {
data,
code
} = await openInfo(projectId)
let projectId = localStorage.getItem('projectId');
const { data, code } = await openInfo(projectId);
if (code == 200) {
for (let item of data) {
if (item.isSign) {
item.isSign = "是"
item.isSign = '是';
} else {
item.isSign = "否"
item.isSign = '否';
}
}
this.tableData = data
this.tableData = data;
}
} catch (e) {
console.log(e)
console.log(e);
}
},
back() {
this.$router.go(-1)
this.$router.go(-1);
},
// 计算分秒倒计时
// add: function() {
......@@ -558,107 +543,104 @@
// },
// 截标时间到了
remaintimeEnd(val) {
this.openbidButton = val
console.log("截标时间到了")
this.openbidButton = val;
console.log('截标时间到了');
},
// 解密时间到了
decodeTimeEnd(val) {
this.endbidButton = val
console.log("解密时间到了")
this.endbidButton = val;
console.log('解密时间到了');
},
// 签名时间到了
signatureTimeEnd(val) {},
// 开标
async openbid() {
try {
let projectId = localStorage.getItem("projectId")
const {
code,
msg
} = await startbid(projectId)
let projectId = localStorage.getItem('projectId');
const { code, msg } = await startbid(projectId);
if (code == 200) {
this.isOpenbid = false
this.openbidButton = false
this.buttonWords = '停止开标'
this.isOpenbid = false;
this.openbidButton = false;
this.buttonWords = '停止开标';
// this.decodeTime = this.storagedecodeTime
// this.signatureTime = this.storagesignatureTime
this.getsigndetail();
this.$message({
message: '开标成功',
type: 'success'
})
});
} else {
this.$message({
message: msg,
type: 'error'
})
});
}
} catch (e) {
console.log(e)
console.log(e);
}
},
// 开标提示
confirm() {
this.$alert('请立即开标', '请立即开标', {
confirmButtonText: '知道了',
callback: action => {
callback: (action) => {
if (action === 'confirm') {
this.isOpenbid = true
this.getstartInfo()
this.isOpenbid = true;
this.getstartInfo();
}
}
})
});
},
// websocket
createWebSocket() {
let token = localStorage.getItem("token")
let projectId = localStorage.getItem("projectId")
this.websocket = new WebSocket(`ws:${openUrl}/webSocket/${projectId}/${token}`)
let token = localStorage.getItem('token');
let projectId = localStorage.getItem('projectId');
this.websocket = new WebSocket(`ws:${openUrl}/webSocket/${projectId}/${token}`);
// this.websocket = new WebSocket('ws://192.168.3.35:8085/webSocket/' + projectId + "/" + token)
// this.websocket = new WebSocket('ws://60.205.251.80:8085/webSocket/' + projectId +"/"+token )
// 连接成功时
this.websocket.onopen = () => {}
this.websocket.onmessage = event => {
this.websocket.onopen = () => {};
this.websocket.onmessage = (event) => {
// 后端发送的消息在event.data中
let data = JSON.parse(event.data);
console.log(data)
console.log(data);
if (data.type == 1) {
if(data.userId==this.myId){
data.mine=true
}else{
data.mine=false
if (data.userId == this.myId) {
data.mine = true;
} else {
data.mine = false;
}
const msgObj = {
"date":data.time ,
"text": {
"text": data.chatContent
},
"mine": data.mine,
"name": data.name,
"img": "http://hsz1997.oss-cn-beijing.aliyuncs.com/img/1603292025286_67c099c6tou.jpg"
}
this.dialogueList.push(msgObj)
date: data.time,
text: {
text: data.chatContent
},
mine: data.mine,
name: data.name,
img: 'http://hsz1997.oss-cn-beijing.aliyuncs.com/img/1603292025286_67c099c6tou.jpg'
};
this.dialogueList.push(msgObj);
} else {
this.halList.push(data)
}
}
this.websocket.onclose = function() {
console.log('关闭了')
this.halList.push(data);
}
};
this.websocket.onclose = function () {
console.log('关闭了');
};
// 路由跳转时结束websocket链接
// this.$router.afterEach(function() {
// this.websocket.close()
// })
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常
window.onbeforeunload = function() {
console.log("窗口关闭")
this.websocket.close()
}
window.onbeforeunload = function () {
console.log('窗口关闭');
this.websocket.close();
};
},
bindEnter() {
const content = this.content
const content = this.content;
if (!content) return;
this.websocket.send(content)
this.websocket.send(content);
}
},
......@@ -666,51 +648,66 @@
//清除定时器
clearInterval(this.timer);
clearInterval(this.timer1);
console.log("定时器关闭")
this.websocket.close()
}
console.log('定时器关闭');
this.websocket.close();
}
};
</script>
<style scoped>
.abs{
.time {
height: 48px;
margin-bottom: 10px;
}
.abs {
position: absolute;
right:100px;
bottom:-91px
}
.flex-left {
right: 100px;
bottom: -91px;
}
.flex-left {
display: flex;
justify-content: flex-start;
}
}
.flex-right {
.flex-right {
display: flex;
justify-content: flex-end;
}
}
.dialogue {
.dialogue {
position: absolute;
top: 10%;
right: 10%;
border:1px solid #CCCCCC;
padding:10px
}
border: 1px solid #cccccc;
padding: 10px;
}
.hal {
.hal {
position: relative;
}
.buttons {
margin: 100px 0;
}
.hal-left {
width: 150px;
}
.hal > h2 {
width: 100%;
height: 55px;
line-height: 55px;
border-bottom: 1px solid #dadada;
}
}
.back-fff {
background: #fff;
}
.buttons {
margin: 100px 0;
}
.buttons>div{
margin-right:20px
}
.hal-left {
width: 198px;
height: 218px;
background: #ffffff;
}
/*
.hal-left>div:first-child {
width: 100%;
height: 300px;
......@@ -727,73 +724,74 @@
text-align: center;
border: 1px solid #000;
margin-top: 50px;
}
} */
.hal-right {
.hal-right {
width: 150px;
height: 500px;
}
}
.hal-right>button{
margin-bottom:16px
}
.hal-center {
.hal-center {
flex: 1;
height: 500px;
border: 1px solid #000;
margin: 0 50px;
margin: 0 14px;
box-sizing: border-box;
padding: 30px;
overflow: auto
}
overflow: auto;
}
.hal-center>ul>li {
.hal-center > ul > li {
margin-bottom: 30px;
}
}
.hal-center>ul>li>div {
.hal-center > ul > li > div {
margin-right: 10px;
font-size: 16px;
}
}
.button-pos {
.button-pos {
margin-top: 50px;
}
}
.time-message {
.time-message {
width: 60%;
margin: 10px auto;
margin: 0px auto;
font-size: 16px;
}
}
.hal-left h1 {
margin-bottom: 50px;
.hal-left h1 {
margin-bottom: 24px;
/* letter-spacing:5px */
font-size: 24px;
}
font-size: 18px;
}
.bid-message {
.bid-message {
flex-wrap: wrap;
font-size: 16px;
}
}
.bid-message>div {
.bid-message > div {
margin-right: 50px;
margin-bottom: 30px;
}
}
.dialogue>.dialogueList {
.dialogue > .dialogueList {
box-sizing: border-box;
padding: 20px;
overflow: auto;
border: 1px solid #DCDFE6;
border: 1px solid #dcdfe6;
width: 400px;
height: 300px;
}
}
.dialogueList>li {
.dialogueList > li {
margin-bottom: 20px;
}
.textheight{
line-height:20.8px;
}
.textheight {
line-height: 20.8px;
display: flex;
justify-content: flex-start;
}
......
......@@ -21,7 +21,7 @@
</div>
<div class="flex" v-else>
<div class="adjustment">上传附件:</div>
<singleUpload :limit="1" tip="支持上传1个附件,不超过20M" @input="getfile"></singleUpload>
<singleUpload :limit="1" tip="支持上传1个附件,不超过20M" :max="20" @input="getfile"></singleUpload>
</div>
</div>
<div class="form">
......
<template>
<div>
<div class="content">
<div>
<dataBreadcrumb :breads="breads"></dataBreadcrumb>
<div>中国标准时间:{{ currentTime }}</div>
<div class="back-fff" style="padding: 10px 0 0 10px">中国标准时间:{{ currentTime }}</div>
<div class="hal">
<h3 style="text-align: center">{{ projectName }}项目开标大厅</h3>
<h2 class="back-fff" style="text-align: center">{{ projectName }}项目开标大厅</h2>
<div class="back-fff flex-center time">
<div class="time-message flex-between">
<div class="flex">
<p>截标倒计时:</p>
......@@ -19,15 +20,14 @@
<timeDown :remain-time="signatureTime" @countDowmEnd="signatureTimeEnd"></timeDown>
</div>
</div>
</div>
<div class="flex">
<div class="hal-left">
<div>
<div class="hal-left back-fff flex-colunm">
<h1>签到 {{ !leftmessage.signIn ? '否' : '是' }}</h1>
<h1>解密 {{ !leftmessage.decode ? '否' : '是' }}</h1>
<h1>签名 {{ !leftmessage.signature ? '否' : '是' }}</h1>
</div>
</div>
<div class="hal-center" v-chat-scroll>
<div class="hal-center back-fff" v-chat-scroll>
<ul>
<li v-for="(item, index) in halList" :key="index" class="flex-item textheight">
<div>{{ item.time }}</div>
......@@ -38,19 +38,13 @@
</ul>
</div>
<div class="hal-right">
<el-button @click="dialogFormVisible = true" style="margin-left: 10px">开标规则说明</el-button>
<el-button @click="isdialogue">在线对话<i class="el-icon-chat-dot-round"></i></el-button>
<el-button
:disabled="!isDecode"
v-show="openStatus == 2 && !leftmessage.decode"
@click="changeDecode"
type="primary"
>解密投标文件</el-button
>
<el-button type="primary" @click="dialogFormVisible = true" >开标规则说明</el-button>
<el-button type="primary" @click="isdialogue">在线对话<i class="el-icon-chat-dot-round"></i></el-button>
<el-button type="primary" @click="openInfo" :disabled="!issueTable">查看开标一览表</el-button>
</div>
<!-- 在线对话 -->
<div class="dialogue" style="margin-top: 30px" v-show="dialogue" id="msg">
<JwChat :taleList="dialogueList" scrollType="scroll" @enter="bindEnter" v-model="content" :toolConfig="tool" >
<JwChat :taleList="dialogueList" scrollType="scroll" @enter="bindEnter" v-model="content" :toolConfig="tool">
<el-button slot="tools" style="float: right" class="abs" @click="dialogue = false">关闭聊天框</el-button>
</JwChat>
</div>
......@@ -73,9 +67,14 @@
</div>
<div class="flex-center buttons">
<div>
<el-button icon="el-icon-refresh" @click="refrsh">刷新</el-button>
<el-button @click="openInfo" :disabled="!issueTable">查看开标一览表</el-button>
<el-button @click="back">退出大厅<i class="el-icon-right"></i></el-button>
<el-button type="primary" @click="back">退出大厅</el-button>
<el-button
:disabled="!isDecode"
v-show="openStatus == 2 && !leftmessage.decode"
@click="changeDecode"
type="primary"
>解密投标文件</el-button
>
</div>
</div>
</div>
......@@ -86,13 +85,15 @@
<h1>开标说明</h1>
<div>1、网上开标共有解密、签名两个环节,投标人根据开标大厅中间滚动提示进行相应操作。</div>
<div>2、截标前当天大厅开放,已上传投标文件的投标人可在解密倒计时结東前进入开标大厅。</div>
<div>3、截标后主持人宣布开标,所有投标人进行解密操作,解密时间共计30分钟投标人须在解密倒计时结束前
完成解密。解密倒计时结東后,因投标人原因造成投标文件未解密的根据《电子招标投标办法其投标文件》视
为撤销。</div>
<div>4、解密倒计时结東或所有投标文件均已解密,投标人可查询所有投标人的开标情况并进行签名,签名时间
共计10分钟。</div>
<div>5.、所有投标人完成签名操作或签名倒计时结束后,项目经理开标结束,投标人可离开开标大厅。开标过程
中,投标人可点击开标大厅右上角在线聊天与主持人沟通。开标结束后视为开标过程无异议。</div>
<div>
3、截标后主持人宣布开标,所有投标人进行解密操作,解密倒计时结束后,因投标人原因造成投标文件未
解密的根据《电子招标投标办法》其投标文件视为撤销。
</div>
<div>4、解密倒计时结束或所有投标文件均已解密,投标人可查询所有投标人的开标情况并进行签名。</div>
<div>
5.、所有投标人完成签名操作或签名倒计时结束后,项目经理开标结束,投标人可离开开标大厅。开标过程
中,投标人可点击开标大厅右上角在线聊天与主持人沟通。开标结束后视为开标过程无异议。
</div>
</div>
<div class="flex-center">
<el-button type="primary" @click="dialogFormVisible = false">关闭</el-button>
......@@ -287,59 +288,58 @@ export default {
},
// websocket
createWebSocket() {
let token = localStorage.getItem("token")
let projectId = localStorage.getItem("projectId")
this.websocket = new WebSocket(`ws:${openUrl}/webSocket/${projectId}/${token}`)
let token = localStorage.getItem('token');
let projectId = localStorage.getItem('projectId');
this.websocket = new WebSocket(`ws:${openUrl}/webSocket/${projectId}/${token}`);
// this.websocket = new WebSocket('ws://192.168.3.35:8085/webSocket/' + projectId + "/" + token)
// this.websocket = new WebSocket('ws://60.205.251.80:8085/webSocket/' + projectId +"/"+token )
// 连接成功时
this.websocket.onopen = () => {}
this.websocket.onmessage = event => {
this.websocket.onopen = () => {};
this.websocket.onmessage = (event) => {
// 后端发送的消息在event.data中
let data = JSON.parse(event.data);
console.log(data)
console.log(data);
if (data.type == 1) {
if(data.userId==this.myId){
data.mine=true
}else{
data.mine=false
if (data.userId == this.myId) {
data.mine = true;
} else {
data.mine = false;
}
const msgObj = {
"date":data.time ,
"text": {
"text": data.chatContent
date: data.time,
text: {
text: data.chatContent
},
"mine": data.mine,
"name": data.name,
"img": "http://hsz1997.oss-cn-beijing.aliyuncs.com/img/1603292025286_67c099c6tou.jpg"
}
this.dialogueList.push(msgObj)
mine: data.mine,
name: data.name,
img: 'http://hsz1997.oss-cn-beijing.aliyuncs.com/img/1603292025286_67c099c6tou.jpg'
};
this.dialogueList.push(msgObj);
} else {
this.halList.push(data)
}
}
this.websocket.onclose = function() {
console.log('关闭了')
this.halList.push(data);
}
};
this.websocket.onclose = function () {
console.log('关闭了');
};
// 路由跳转时结束websocket链接
// this.$router.afterEach(function() {
// this.websocket.close()
// })
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常
window.onbeforeunload = function() {
console.log("窗口关闭")
this.websocket.close()
}
window.onbeforeunload = function () {
console.log('窗口关闭');
this.websocket.close();
};
},
bindEnter() {
const content = this.content;
if (!content) return;
this.websocket.send(content);
this.$nextTick(() => {
let msg = document.getElementsByClassName('dialogue') // 获取对象
msg.scrollTop = msg.scrollHeight // 滚动高度
})
let msg = document.getElementsByClassName('dialogue'); // 获取对象
msg.scrollTop = msg.scrollHeight; // 滚动高度
});
},
back() {
this.$router.go(-1);
......@@ -397,7 +397,7 @@ export default {
message: msg,
type: 'error',
duration: 3000
})
});
/* setTimeout(() => {
this.$router.go(-1)
}, 3000) */
......@@ -466,6 +466,13 @@ export default {
</script>
<style scoped>
.time {
height: 48px;
margin-bottom: 10px;
}
.back-fff {
background: #fff;
}
.abs {
position: absolute;
right: 100px;
......@@ -484,6 +491,12 @@ export default {
.hal {
position: relative;
}
.hal > h2 {
width: 100%;
height: 55px;
line-height: 55px;
border-bottom: 1px solid #dadada;
}
.dialogue {
position: absolute;
......@@ -516,15 +529,16 @@ export default {
}
.hal-left {
width: 200px;
width: 198px;
height: 218px;
background: #ffffff;
}
.hal-left > div {
width: 100%;
height: 300px;
border: 1px solid #000;
box-sizing: border-box;
padding: 40px 20px;
.hal-left h1 {
margin-bottom: 24px;
font-size: 18px;
}
.hal-left > h1:last-child {
margin-bottom: 0px;
}
.hal-right {
......@@ -539,8 +553,7 @@ export default {
.hal-center {
flex: 1;
height: 500px;
border: 1px solid #000;
margin: 0 50px;
margin: 0 14px;
box-sizing: border-box;
padding: 30px;
overflow: auto;
......@@ -565,10 +578,6 @@ export default {
font-size: 16px;
}
.hal-left h1 {
margin-bottom: 50px;
}
.bid-message {
flex-wrap: wrap;
font-size: 16px;
......@@ -578,8 +587,8 @@ export default {
margin-right: 50px;
margin-bottom: 30px;
}
.textheight{
line-height:20.8px;
.textheight {
line-height: 20.8px;
display: flex;
justify-content: flex-start;
}
......
......@@ -126,7 +126,7 @@
duration: 1500
})
setTimeout(() => {
this.$router.go(-1)
this.$router.push("/supply/bid/joinProject/projectList")
}, 1500)
}else if(code==500){
this.$message({
......
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