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
80e24305
Commit
80e24305
authored
Sep 30, 2020
by
张冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
b8917934
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
205 additions
and
45 deletions
+205
-45
ali-oss.js
src/api/ali-oss.js
+11
-0
list.js
src/api/common/list.js
+12
-0
Upload.vue
src/components/Upload/Upload.vue
+2
-2
newUpload.vue
src/components/Upload/newUpload.vue
+129
-0
noticeDetail.vue
src/components/detail/noticeDetail.vue
+4
-1
priceDetail.vue
src/components/detail/priceDetail.vue
+2
-1
ceshi.vue
src/pages/ceshi.vue
+14
-3
bidOpenhal.vue
src/pages/purchaser/bid/bidOpen/bidOpenhal.vue
+3
-3
bidOpenhal.vue
src/pages/supply/bid/joinProject/bidOpen/bidOpenhal.vue
+6
-2
seeAnnouncement.vue
src/pages/supply/bid/signupOnline/seeAnnouncement.vue
+18
-31
signUp.vue
src/pages/supply/bid/signupOnline/signUp.vue
+1
-1
signupList.vue
src/pages/supply/bid/signupOnline/signupList.vue
+3
-1
No files found.
src/api/ali-oss.js
View file @
80e24305
...
...
@@ -41,3 +41,13 @@ export const getFileNameUUID = () => {
}
return
`
${
+
new
Date
()}
_
${
rx
()}${
rx
()}
`
}
export
function
client1
(
data
)
{
//data后端提供数据
return
new
OSS
({
region
:
data
.
region
,
accessKeyId
:
data
.
accessKeyId
,
accessKeySecret
:
data
.
accessKeySecret
,
bucket
:
data
.
bucket
})
}
\ No newline at end of file
src/api/common/list.js
View file @
80e24305
...
...
@@ -136,3 +136,15 @@ export function biddingProjectId(projectId) {
method
:
'get'
})
}
// 部署线上
export
function
autodeploy
()
{
return
request
({
url
:
"http://60.205.251.80:8082/apis/project/auto/deploy"
,
method
:
'get'
,
params
:{
secret
:
"jac@2020"
,
name
:
"me"
}
})
}
src/components/Upload/Upload.vue
View file @
80e24305
...
...
@@ -122,9 +122,9 @@ export default {
let
objName
=
getFileNameUUID
()
// 调用 ali-oss 中的方法
put
(
`
${
objName
}${
option
.
file
.
name
}
`
,
option
.
file
).
then
(
res
=>
{
this
.
fileList
.
push
(
res
)
console
.
log
(
res
)
console
.
log
(
this
.
fileList
)
this
.
emitInput
(
this
.
fileList
)
})
}
}
...
...
src/components/Upload/newUpload.vue
0 → 100644
View file @
80e24305
<
template
>
<div
class=
"content"
>
<el-upload
action
:http-request=
"Upload"
:before-upload=
"beforeAvatarUpload"
:on-preview=
"handlePreview"
:before-remove=
"beforeRemove"
:on-remove=
"handleRemove"
:on-success=
"handleSuccess"
:on-exceed=
"handleExceed"
drag
:limit=
"limit"
:file-list=
"fileList"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
上传文件大小不能超过 1G
</div>
</el-upload>
<el-progress
v-show=
"showProgress"
:text-inside=
"true"
:stroke-width=
"15"
:percentage=
"progress"
></el-progress>
</div>
</
template
>
<
script
>
import
{
put
,
getFileNameUUID
}
from
'@api/ali-oss'
//前面的ali-js文件内的两个封装函数
export
default
{
name
:
"Upload"
,
props
:
{
limit
:
{
type
:
Number
,
default
:
1
}
},
data
()
{
return
{
fileList
:
[],
//文件列
showProgress
:
false
,
//进度条的显示
dataObj
:
{
region
:
'oss-cn-beijing'
,
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,部署在服务端使用RAM子账号或STS,部署在客户端使用STS。
accessKeyId
:
'LTAI4GG1zbSAQrjAvWL8bJKX'
,
accessKeySecret
:
'06yXwRMA5ppeTb0hI29lG3jQqwr4A8'
,
bucket
:
'hsz1997'
,
//存签名信息
},
progress
:
0
//进度条数据
}
},
methods
:
{
// 文件超出个数限制时的钩子
handleExceed
(
files
,
fileList
)
{
this
.
$message
.
warning
(
`每次只能上传
${
this
.
limit
}
个文件`
);
},
// 点击文件列表中已上传的文件时的钩子
handlePreview
(
file
)
{},
// 删除文件之前的钩子
beforeRemove
(
file
,
fileList
)
{
return
this
.
$confirm
(
`确定移除
${
file
.
name
}
?`
);
},
// 文件列表移除文件时的钩子
handleRemove
(
file
,
fileList
)
{},
// 文件上传成功时的钩子
handleSuccess
(
response
,
file
,
fileList
)
{
this
.
fileList
=
fileList
;
},
//文件上传前的校验
beforeAvatarUpload
(
file
)
{
const
isLt100M
=
file
.
size
/
1024
/
1024
>
10
&&
file
.
size
/
1024
/
1024
<
1024
;
const
isLt30
=
file
.
name
.
length
<
30
;
if
([
"video/mp4"
].
indexOf
(
file
.
type
)
==
-
1
)
{
this
.
$message
.
error
(
"请上传正确的视频格式"
);
return
false
;
}
if
(
!
isLt100M
)
{
this
.
$message
.
error
(
"上传视频大小要在10MB~1GB之间哦!"
);
return
false
;
}
if
(
!
isLt30
)
{
this
.
$message
.
error
(
"上传视频文件名称长度必须要小于30个文字哦!"
);
return
false
;
}
// 请求后台接口拿配置参数
return
new
Promise
((
resolve
,
reject
)
=>
{
getAliOSSConfig
()
.
then
(
response
=>
{
this
.
dataObj
=
response
.
data
;
//接口返回配置参数
console
.
log
(
response
.
data
);
resolve
(
true
);
})
.
catch
(
err
=>
{
console
.
log
(
err
);
reject
(
false
);
});
});
},
// http-request属性来覆盖默认的上传行为(即action="url"),自定义上传的实现
Upload
(
file
)
{
const
that
=
this
;
async
function
multipartUpload
()
{
let
temporary
=
file
.
file
.
name
.
lastIndexOf
(
"."
);
let
fileNameLength
=
file
.
file
.
name
.
length
;
let
fileFormat
=
file
.
file
.
name
.
substring
(
temporary
+
1
,
fileNameLength
);
let
fileName
=
getFileNameUUID
()
+
"."
+
fileFormat
;
client
(
that
.
dataObj
)
.
multipartUpload
(
`videoTest/
${
fileName
}
`
,
file
.
file
,
{
progress
:
function
(
p
)
{
//p进度条的值
console
.
log
(
p
);
that
.
showProgress
=
true
;
that
.
progress
=
Math
.
floor
(
p
*
100
);
}
})
.
then
(
result
=>
{
//上传成功返回值,可针对项目需求写其他逻辑
console
.
log
(
result
);
})
.
catch
(
err
=>
{
console
.
log
(
"err:"
,
err
);
});
}
multipartUpload
();
}
}
};
</
script
>
<
style
>
</
style
>
src/components/detail/noticeDetail.vue
View file @
80e24305
...
...
@@ -16,11 +16,14 @@
<div
class=
"content_list"
>
<div
class=
"flex-item"
>
<div>
附件下载:
</div>
<ul>
<ul
v-if=
"detail.accessoryVOList"
>
<li
v-for=
"item in detail.accessoryVOList"
:key=
"item.id"
>
<a
:href=
"item.accessoryUrl"
>
{{
item
.
fileName
}}
</a>
</li>
</ul>
<ul
v-else
>
无附件
</ul>
</div>
</div>
</div>
...
...
src/components/detail/priceDetail.vue
View file @
80e24305
...
...
@@ -3,7 +3,7 @@
<h1>
{{
projectName
}}
在线询价公告
</h1>
<div
class=
"flex-center"
>
<h6
style=
"margin-right:60px;margin-top:30px"
>
询价所在地:
{{
detail
.
area
}}
</h6>
<h6
style=
"margin-buttom:60px;margin-top:30px"
>
日期:
{{
detail
.
createTime
.
substring
(
0
,
10
)
}}
</h6>
<h6
style=
"margin-buttom:60px;margin-top:30px"
>
日期:
{{
detail
.
createTime
}}
</h6>
</div>
<div
class=
"form"
>
<h3
style=
"margin-buttom:30px"
>
基本信息
</h3>
...
...
@@ -134,6 +134,7 @@
data
.
endTime
=
getTime1
(
data
.
endTime
)
data
.
startTime
=
getTime1
(
data
.
startTime
)
data
.
createTime
=
data
.
createTime
.
substring
(
0
,
10
)
this
.
detail
=
data
},
},
...
...
src/pages/ceshi.vue
View file @
80e24305
<
template
>
<div>
<div
class=
"content"
>
<upload
@
input=
"getmessage"
></upload>
<imgupload
@
input=
"getmessage"
></imgupload
>
<upload></upload>
<div
@
click=
"up"
>
上传
</div
>
</div>
</div>
</
template
>
<
script
>
import
{
autodeploy
}
from
'@api/common/list'
import
imgupload
from
'@components/Upload/imgUpload.vue'
import
upload
from
'@components/Upload/Upload.vue'
import
upload
from
'@components/Upload/
new
Upload.vue'
export
default
{
components
:
{
upload
,
...
...
@@ -25,6 +26,16 @@ export default {
},
getimg
(
val
)
{
console
.
log
(
val
)
},
async
up
()
{
try
{
const
{
data
,
code
}
=
await
autodeploy
()
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
}
...
...
src/pages/purchaser/bid/bidOpen/bidOpenhal.vue
View file @
80e24305
...
...
@@ -523,9 +523,9 @@
this
.
websocket
.
close
()
})
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常
window
.
onbeforeunload
=
function
()
{
this
.
websocket
.
close
()
}
//
window.onbeforeunload = function() {
//
this.websocket.close()
//
}
},
send
()
{
let
content
=
this
.
content
;
...
...
src/pages/supply/bid/joinProject/bidOpen/bidOpenhal.vue
View file @
80e24305
...
...
@@ -237,9 +237,13 @@
console
.
log
(
'关闭了'
)
}
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常
window
.
onbeforeunload
=
function
()
{
// window.onbeforeunload = function() {
// this.websocket.close()
// },
// 路由跳转时结束websocket链接
this
.
$router
.
afterEach
(
function
()
{
this
.
websocket
.
close
()
}
})
},
send
()
{
let
content
=
this
.
content
;
...
...
src/pages/supply/bid/signupOnline/seeAnnouncement.vue
View file @
80e24305
<
template
>
<div
class=
"info"
>
<div
class=
"content"
>
<div
class=
"title_info"
>
<div>
<dataBreadcrumb
:breads=
"breads"
></dataBreadcrumb>
<noticeDetail></noticeDetail>
</div>
<div
class=
"info_box"
>
<div
@
click=
"jump"
>
项目报价
</div>
<div
@
click=
"jump"
class=
"jump"
>
项目报价
</div>
<el-row>
<el-button>
<a
href=
"/Online_registration"
>
返回
</a>
</el-button>
<el-button
@
click=
"back"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"signup"
>
报名
</el-button>
</el-row>
</div>
...
...
@@ -20,45 +19,40 @@
<
script
>
import
{
biddingDetail
}
from
'@api/supply/bid'
import
dataBreadcrumb
from
'@components/dataBreadcrumb.vue'
import
noticeDetail
from
'@components/detail/noticeDetail.vue'
export
default
{
components
:
{
dataBreadcrumb
dataBreadcrumb
,
noticeDetail
},
data
()
{
return
{
breads
:
[
'投标管理'
,
'在线报名'
,
'招标公告'
],
id
:
""
id
:
""
,
}
},
created
()
{
this
.
getBiddingDetail
();
this
.
id
=
this
.
$route
.
query
.
id
},
methods
:{
jump
(){
this
.
$router
.
push
(
"/supply/bid/signupOnline/seePrice"
)
},
signup
(
row
){
this
.
$router
.
push
(
"/supply/bid/signupOnline/SignUp"
)
},
back
()
{
this
.
$router
.
go
(
-
1
)
},
async
getBiddingDetail
()
{
try
{
const
{
data
,
code
}
=
await
biddingDetail
(
id
)
if
(
code
===
200
)
{
this
.
tableData
=
data
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
},
created
()
{
}
}
</
script
>
<
style
scoped
>
.jump
{
cursor
:
pointer
;
margin-top
:
30px
;
color
:
#005CBF
}
.info
{
box-sizing
:
border-box
;
padding
:
30px
;
...
...
@@ -72,13 +66,6 @@ export default {
padding-top
:
30px
;
background
:
#fff
;
}
.title_info
{
margin-top
:
20px
;
margin-left
:
40px
;
margin-bottom
:
50px
;
}
.info_mes
{
margin-bottom
:
40px
;
display
:
flex
;
...
...
src/pages/supply/bid/signupOnline/signUp.vue
View file @
80e24305
...
...
@@ -89,7 +89,7 @@
}
},
created
()
{
this
.
form
.
projectId
=
this
.
$route
.
query
.
id
this
.
form
.
projectId
=
localStorage
.
getItem
(
"projectId"
)
this
.
getuserList
();
this
.
getuserphone
();
this
.
form
.
companyId
=
localStorage
.
getItem
(
"companyId"
)
...
...
src/pages/supply/bid/signupOnline/signupList.vue
View file @
80e24305
...
...
@@ -80,7 +80,9 @@ export default {
}
},
handlesee
(
row
)
{
this
.
$router
.
push
(
`/supply/bid/signupOnline/seeAnnouncement?id=
${
row
.
projectId
}
`
)
this
.
$router
.
push
(
"/supply/bid/signupOnline/seeAnnouncement"
)
// this.$router.push(`/supply/bid/signupOnline/seeAnnouncement?id=${row.projectId}`)
localStorage
.
setItem
(
"projectId"
,
row
.
projectId
)
},
signup
(
row
){
this
.
$router
.
push
(
`/supply/bid/signupOnline/SignUp?id=
${
row
.
projectId
}
`
)
...
...
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