Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-purchase
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张冬
web-purchase
Commits
5903a153
Commit
5903a153
authored
Oct 09, 2020
by
张冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
082cc2eb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
182 additions
and
91 deletions
+182
-91
bid.js
src/api/supply/bid.js
+17
-1
bidOpenhal.vue
src/pages/purchaser/bid/bidOpen/bidOpenhal.vue
+0
-1
list.vue
src/pages/purchaser/bid/bidSure/bidResult/list.vue
+2
-2
bidOpenhal.vue
src/pages/supply/bid/joinProject/bidOpen/bidOpenhal.vue
+163
-87
No files found.
src/api/supply/bid.js
View file @
5903a153
...
...
@@ -271,10 +271,11 @@ export function winBookdetail(projectId) {
// 签到解密简略
export
function
openBidsign
(
projectId
)
{
return
request
({
url
:
`
open-bid/sign/
${
projectId
}
`
,
url
:
`
bidder-openBid/signInfo?projectId=
${
projectId
}
`
,
method
:
'get'
,
})
}
// 开标大厅三个截止时间
export
function
opentimeInfo
(
projectId
)
{
return
request
({
...
...
@@ -282,4 +283,19 @@ export function opentimeInfo(projectId) {
method
:
'get'
,
})
}
// 解密
export
function
decode
(
projectId
)
{
return
request
({
url
:
`open-bid/decode?projectId=
${
projectId
}
`
,
method
:
'put'
,
})
}
// 签名
export
function
signature
(
projectId
)
{
return
request
({
url
:
`open-bid/signature?projectId=
${
projectId
}
`
,
method
:
'put'
,
})
}
src/pages/purchaser/bid/bidOpen/bidOpenhal.vue
View file @
5903a153
...
...
@@ -454,7 +454,6 @@
console
.
log
(
"小于"
)
this
.
endbidButton
=
true
}
console
.
log
()
}
}
}
catch
(
e
)
{
...
...
src/pages/purchaser/bid/bidSure/bidResult/list.vue
View file @
5903a153
...
...
@@ -45,7 +45,7 @@ export default {
tableData
:
[],
columns
:
[{
label
:
'投标人'
,
prop
:
'
bidder
'
prop
:
'
companyName
'
},
{
slot
:
'code'
...
...
@@ -56,7 +56,7 @@ export default {
},
{
label
:
'接收人'
,
prop
:
'
receiver
'
prop
:
'
companyName
'
},
{
slot
:
'operate'
...
...
src/pages/supply/bid/joinProject/bidOpen/bidOpenhal.vue
View file @
5903a153
...
...
@@ -10,11 +10,11 @@
<p>
截标倒计时:
</p>
<timeDown
:remain-time=
"remaintime"
@
countDowmEnd=
"remaintimeEnd"
></timeDown>
</div>
<div
class=
"flex"
v-show=
"
decodeTime
"
>
<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
"
>
<p>
签名倒计时:
</p>
<timeDown
:remain-time=
"signatureTime"
@
countDowmEnd=
"signatureTimeEnd"
></timeDown>
</div>
...
...
@@ -22,9 +22,9 @@
<div
class=
"flex"
>
<div
class=
"hal-left"
>
<div>
<h1>
签到
{{
leftmessage
.
signIn
==
0
?
"否"
:
"是"
}}
</h1>
<h1>
解密
{{
leftmessage
.
decode
==
0
?
"否"
:
"是"
}}
</h1>
<h1>
签名
{{
leftmessage
.
signature
==
0
?
"否"
:
"是"
}}
</h1>
<h1>
签到
{{
!
leftmessage
.
signIn
?
"否"
:
"是"
}}
</h1>
<h1>
解密
{{
!
leftmessage
.
decode
?
"否"
:
"是"
}}
</h1>
<h1>
签名
{{
!
leftmessage
.
signature
?
"否"
:
"是"
}}
</h1>
</div>
</div>
<div
class=
"hal-center"
>
...
...
@@ -40,7 +40,7 @@
<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
"
>
解密投标文件
</el-button>
<el-button
:disabled=
"
!isDecode"
v-show=
"openStatus==2&&!leftmessage.decode"
@
click=
"changeDecode"
type=
"primary
"
>
解密投标文件
</el-button>
</div>
<!-- 在线对话 -->
<div
class=
"dialogue"
style=
"margin-top: 30px;"
v-show=
"dialogue"
>
...
...
@@ -85,21 +85,26 @@
</nopageTable>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"isopenInfo=false"
>
关闭
</el-button>
<el-button
:disabled=
"!isSignature"
v-show=
"openStatus==2&&!leftmessage.signature"
@
click=
"changeSignature"
type=
"primary"
>
签名
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
signdetail
}
from
'@api/purchaser/bid'
import
{
openBidsign
,
opentimeInfo
,
openInfolist
openInfolist
,
decode
,
signature
}
from
'@api/supply/bid'
import
{
getTime
}
from
'@utils/time'
openBidsign
import
nopageTable
from
'@components/nopageTable.vue'
import
dataBreadcrumb
from
'@components/dataBreadcrumb.vue'
import
timeDown
from
'@components/timeDown.vue'
...
...
@@ -113,7 +118,9 @@
},
data
()
{
return
{
isDecode
:
true
,
openStatus
:
""
,
isSignature
:
false
,
isDecode
:
false
,
dialogue
:
false
,
isopenInfo
:
false
,
remaintime
:
""
,
...
...
@@ -186,10 +193,10 @@
breads
:
[
'招标管理'
,
'招标项目管理'
,
'工作台'
],
leftmessage
:
""
,
websocket
:
""
,
dialogueList
:[],
halList
:[],
content
:
""
,
myId
:
""
dialogueList
:
[],
halList
:
[],
content
:
""
,
myId
:
""
}
},
mounted
()
{
...
...
@@ -204,55 +211,95 @@
this
.
currentTime
=
currentTime
},
1000
)
this
.
projectName
=
localStorage
.
getItem
(
"projectName"
)
this
.
getopenBidsign
();
this
.
gettimeInfo
();
this
.
getsigndetail
();
this
.
getopenInfo
();
this
.
openBidsign
();
this
.
createWebSocket
()
this
.
myId
=
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
userId
// 长轮训获取
this
.
timer
=
setInterval
(()
=>
{
this
.
getsigndetail
();
},
5000
);
},
methods
:
{
// 解密
async
changeDecode
()
{
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
try
{
const
{
msg
,
code
}
=
await
decode
(
projectId
)
if
(
code
==
200
){
this
.
$message
.
success
(
msg
)
this
.
openBidsign
();
}
else
{
this
.
$message
.
error
(
msg
)
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
},
// 签名
async
changeSignature
()
{
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
try
{
const
{
data
,
code
}
=
await
signature
(
projectId
)
if
(
code
==
200
){
this
.
$message
.
success
(
msg
)
this
.
openBidsign
();
}
else
{
this
.
$message
.
error
(
msg
)
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
},
isdialogue
()
{
this
.
dialogue
=
!
this
.
dialogue
},
// websocket
createWebSocket
()
{
let
token
=
localStorage
.
getItem
(
"token"
)
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
// 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
=>
{
// 后端发送的消息在event.data中
let
data
=
JSON
.
parse
(
event
.
data
);
console
.
log
(
data
)
if
(
data
.
type
==
1
)
{
this
.
content
=
""
this
.
dialogueList
.
push
(
data
)
}
else
{
this
.
halList
.
push
(
data
)
}
}
this
.
websocket
.
onclose
=
function
()
{
console
.
log
(
'关闭了'
)
}
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常
window
.
onbeforeunload
=
function
()
{
this
.
websocket
.
close
()
},
// 路由跳转时结束websocket链接
this
.
$router
.
afterEach
(
function
()
{
this
.
websocket
.
close
()
})
},
send
()
{
let
content
=
this
.
content
;
if
(
content
.
split
(
" "
).
join
(
""
).
length
==
0
)
{
this
.
$message
.
error
(
"请输入内容"
)
}
else
{
this
.
websocket
.
send
(
content
)
}
},
createWebSocket
()
{
let
token
=
localStorage
.
getItem
(
"token"
)
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
// 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
=>
{
// 后端发送的消息在event.data中
let
data
=
JSON
.
parse
(
event
.
data
);
console
.
log
(
data
)
if
(
data
.
type
==
1
)
{
this
.
content
=
""
this
.
dialogueList
.
push
(
data
)
}
else
{
this
.
halList
.
push
(
data
)
}
}
this
.
websocket
.
onclose
=
function
()
{
console
.
log
(
'关闭了'
)
}
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常
window
.
onbeforeunload
=
function
()
{
this
.
websocket
.
close
()
},
// 路由跳转时结束websocket链接
this
.
$router
.
afterEach
(
function
()
{
this
.
websocket
.
close
()
})
},
send
()
{
let
content
=
this
.
content
;
if
(
content
.
split
(
" "
).
join
(
""
).
length
==
0
)
{
this
.
$message
.
error
(
"请输入内容"
)
}
else
{
this
.
websocket
.
send
(
content
)
}
},
back
()
{
this
.
$router
.
go
(
-
1
)
},
...
...
@@ -262,11 +309,11 @@
},
// 解密时间到了
decodeTimeEnd
(
val
)
{
this
.
isDecode
=
false
this
.
isDecode
=
val
},
// 签名时间到了
// 签名时间到了
signatureTimeEnd
(
val
)
{
this
.
isSignature
=
val
},
// 计算分秒倒计时
add
:
function
()
{
...
...
@@ -288,33 +335,59 @@
this
.
openbidButton
=
val
},
// 左边信息栏
async
get
openBidsign
()
{
async
openBidsign
()
{
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
const
{
data
,
code
}
=
await
openBidsign
(
projectId
)
this
.
leftmessage
=
data
},
async
getopenBidsign
()
{
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
const
{
data
,
code
}
=
await
openBidsign
(
projectId
)
this
.
leftmessage
=
data
},
// 时间信息
async
gettimeInfo
()
{
try
{
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
const
{
data
,
code
}
=
await
openBidsign
(
projectId
)
this
.
leftmessage
=
data
}
catch
(
e
)
{
console
.
log
(
e
)
}
},
// 获取时间比较
async
getsigndetail
()
{
try
{
let
projectId
=
localStorage
.
getItem
(
"projectId"
)
var
{
data
,
code
,
msg
}
=
await
opentimeInfo
(
projectId
)
this
.
remaintime
=
Number
(
data
.
remainTime
);
this
.
decodeTime
=
Number
(
data
.
decodeTime
)
this
.
signatureTime
=
Number
(
data
.
signatureTime
)
if
(
code
==
200
)
{
this
.
remaintime
=
Number
(
data
.
remainTime
);
this
.
storagedecodeTime
=
Number
(
data
.
decodeTime
)
this
.
storagesignatureTime
=
Number
(
data
.
signatureTime
)
}
else
{
this
.
$message
.
error
(
msg
)
}
var
{
data
,
code
}
=
await
signdetail
(
projectId
)
if
(
code
==
200
)
{
this
.
openStatus
=
data
.
openStatus
let
localTime
=
new
Date
().
getTime
();
console
.
log
(
this
.
storagedecodeTime
,
".............."
)
let
comparyTime
=
this
.
storagedecodeTime
-
(
localTime
-
data
.
openBidTime
)
/
1000
if
(
comparyTime
>
0
)
{
this
.
decodeTime
=
comparyTime
console
.
log
(
"大于"
)
}
else
{
console
.
log
(
"小于"
)
this
.
isDecode
=
true
}
let
comparyTime1
=
this
.
storagesignatureTime
-
(
localTime
-
data
.
openBidTime
)
/
1000
if
(
comparyTime
>
0
)
{
this
.
signatureTime
=
comparyTime1
console
.
log
(
"大于"
)
}
else
{
console
.
log
(
"小于"
)
this
.
isSignature
=
true
}
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
...
...
@@ -342,13 +415,13 @@
}
},
},
updated
(){
// 聊天定位到底部
let
ele
=
document
.
getElementById
(
'chatRecord'
);
ele
.
scrollTop
=
ele
.
scrollHeight
;
let
ele1
=
document
.
getElementById
(
'chatRecord1'
);
ele1
.
scrollTop
=
ele1
.
scrollHeight
;
},
updated
()
{
// 聊天定位到底部
let
ele
=
document
.
getElementById
(
'chatRecord'
);
ele
.
scrollTop
=
ele
.
scrollHeight
;
let
ele1
=
document
.
getElementById
(
'chatRecord1'
);
ele1
.
scrollTop
=
ele1
.
scrollHeight
;
},
destroyed
()
{
//清除定时器
clearInterval
(
this
.
timer1
);
...
...
@@ -358,14 +431,16 @@
</
script
>
<
style
scoped
>
.flex-left
{
.flex-left
{
display
:
flex
;
justify-content
:
flex-start
;
}
.flex-right
{
.flex-right
{
display
:
flex
;
justify-content
:
flex-end
;
}
.hal
{
position
:
relative
;
}
...
...
@@ -461,10 +536,11 @@
margin-right
:
50px
;
margin-bottom
:
30px
;
}
.dialogue
>
.dialogueList
{
border
:
1px
solid
#DCDFE6
;
width
:
400px
;
height
:
300px
;
/* overflow: auto; */
/* overflow: auto; */
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment