|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<el-card class="square-card">
|
|
|
- <div class="card-title" >
|
|
|
+ <div class="card-title">
|
|
|
{{card.name ? card.name :card.title}}
|
|
|
</div>
|
|
|
<div class="card-content">
|
|
@@ -11,7 +11,7 @@
|
|
|
<el-col :lg="6" :md="24">
|
|
|
<span class="card-detail-money" v-if="card.quotedPrice||card.quotedPrice === 0">¥{{card.quotedPrice > 10000 ? Math.floor(card.quotedPrice/10000) + 'w+' : card.quotedPrice}}</span>
|
|
|
<span class="card-detail-money" v-else>¥{{card.quotePrice > 10000 ? Math.floor(card.quotePrice/10000)+'w+' : card.quotePrice}}</span>
|
|
|
-<!-- <span class="card-detail-money">¥{{(card.quotedPrice||card.quotedPrice === 0) ? card.quotedPrice : card.quotePrice}}</span>-->
|
|
|
+ <!-- <span class="card-detail-money">¥{{(card.quotedPrice||card.quotedPrice === 0) ? card.quotedPrice : card.quotePrice}}</span>-->
|
|
|
</el-col>
|
|
|
<el-col :lg="18" :md="24">
|
|
|
<span class="card-detail-info pull-right">{{card.time_interval}}/{{card.joinCount > 10000 ? Math.floor(card.joinCount/10000)+'w+': card.joinCount}}人参与</span>
|
|
@@ -21,10 +21,15 @@
|
|
|
<div class="card-footer">
|
|
|
<el-row class="card-footer-row">
|
|
|
<el-col :span="12" class="pull-left">
|
|
|
- {{card.platform || card.serviceType}}
|
|
|
+ {{card.applicationType || card.serviceType}}
|
|
|
</el-col>
|
|
|
<el-col :span="12" class=" test-btn">
|
|
|
- <el-button type="primary" round size="mini" class="pull-right">我要众测</el-button>
|
|
|
+ <el-button type="primary" round size="mini" class="pull-right" v-if="card.applicationType"
|
|
|
+ @click="goToProjectDetail(card.code)">我要众测
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" round size="mini" class="pull-right" v-else
|
|
|
+ @click="goToTaskDetail(card.projectId, card.code)">我要众测
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -32,76 +37,114 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- export default {
|
|
|
- name: 'SquareCard',
|
|
|
- props: ['card'],
|
|
|
- mounted() {
|
|
|
+ import {notify} from "../../constants";
|
|
|
+ import {storageGet} from '@/js/index.js'
|
|
|
|
|
|
+ export default {
|
|
|
+ name: 'SquareCard',
|
|
|
+ props: ['card'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isLogin: false,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onload() {
|
|
|
+ if (storageGet('user') != null) {
|
|
|
+ this.isLogin = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goToProjectDetail(id) {
|
|
|
+ if (!this.isLogin) {
|
|
|
+ console.log("请登录后访问");
|
|
|
+ notify('warning', '请登录后访问');
|
|
|
+ } else {
|
|
|
+ console.log("已登录");
|
|
|
+ this.$router.push({name: 'Project', params: {projectId: id}})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goToTaskDetail(projectId, taskId) {
|
|
|
+ if (!this.isLogin) {
|
|
|
+ console.log("请登录后访问");
|
|
|
+ notify('warning', '请登录后访问');
|
|
|
+ } else {
|
|
|
+ console.log("已登录");
|
|
|
+ this.$router.push({
|
|
|
+ name: 'Task',
|
|
|
+ params: {projectId: projectId, taskId: taskId}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.onload();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
- .square-card .el-card__body{
|
|
|
+ .square-card .el-card__body {
|
|
|
padding: 0 !important;
|
|
|
}
|
|
|
|
|
|
.square-card {
|
|
|
.card-title {
|
|
|
- font-size:16px;
|
|
|
- font-family:Source Han Sans CN;
|
|
|
- font-weight:500;
|
|
|
- color:rgba(0,0,0,1);
|
|
|
- line-height:30px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ line-height: 30px;
|
|
|
margin: 10px 0;
|
|
|
- overflow:hidden; //超出的文本隐藏
|
|
|
- text-overflow:ellipsis; //溢出用省略号显示
|
|
|
- white-space:nowrap; //溢出不换行
|
|
|
+ overflow: hidden; //超出的文本隐藏
|
|
|
+ text-overflow: ellipsis; //溢出用省略号显示
|
|
|
+ white-space: nowrap; //溢出不换行
|
|
|
}
|
|
|
|
|
|
.card-content {
|
|
|
- font-size:14px;
|
|
|
- font-family:Source Han Sans CN;
|
|
|
- font-weight:400;
|
|
|
- color:rgba(0,0,0,1);
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
height: 70px;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
- display:-webkit-box; //作为弹性伸缩盒子模型显示。
|
|
|
- -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
|
|
|
- -webkit-line-clamp:3; //显示的行
|
|
|
+ display: -webkit-box; //作为弹性伸缩盒子模型显示。
|
|
|
+ -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
|
|
|
+ -webkit-line-clamp: 3; //显示的行
|
|
|
}
|
|
|
|
|
|
.card-detail {
|
|
|
margin: 10px 0;
|
|
|
- .card-detail-money{
|
|
|
- font-size:14px;
|
|
|
- font-family:Source Han Sans CN;
|
|
|
- font-weight:bold;
|
|
|
- color:rgba(0,117,203,1);
|
|
|
+
|
|
|
+ .card-detail-money {
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgba(0, 117, 203, 1);
|
|
|
}
|
|
|
+
|
|
|
.card-detail-info {
|
|
|
- font-size:14px;
|
|
|
- font-family:Roboto;
|
|
|
- font-weight:400;
|
|
|
- color:rgba(153,153,153,1);
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Roboto;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(153, 153, 153, 1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-title,.card-content,.card-detail{
|
|
|
+ .card-title, .card-content, .card-detail {
|
|
|
padding: 0 10px !important;
|
|
|
}
|
|
|
|
|
|
.card-footer {
|
|
|
- background:rgba(233,239,249,1);
|
|
|
+ background: rgba(233, 239, 249, 1);
|
|
|
/*height: 40px;*/
|
|
|
|
|
|
.card-footer-row {
|
|
|
padding: 15px 10px;
|
|
|
- font-size:14px;
|
|
|
- font-family:Source Han Sans CN;
|
|
|
- font-weight:bold;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
|