1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
| <template> <div class="task"> <div class="com-name">XXXXXXXXX有限公司</div> <van-collapse accordion v-model="active"> <van-collapse-item v-for="(item,index) in 10" :name="index" :key="index" class="card-box"> <div slot="title"> <div class="name">任务{{index+1}} 名称</div> <div class="desc"> <span class="state text-success" v-if="index==3">已完成</span> <span class="state text-blue" v-else-if="index==2">进行中</span> <span class="state text-orange" v-else>未开始</span> <span class="time">耗时:5分12秒</span> </div> </div> <div> <div v-for="(j,cidx) in 4" :key="cidx"> <van-row class="m-bottom10 leaf-line"> <van-col span="3" style="color: #0DCA7C;">——</van-col> <van-col span="17" class=""> <div class="cname">子任务{{ cidx +1 }} 测试</div> <div class="state text-success" v-if="cidx==3">已完成</div> <div class="state text-blue " v-else-if="cidx==2">进行中</div> <div class="state text-orange" v-else>未开始</div> </van-col> <van-col span="4"> <van-button @click="open(cidx)" plain hairline type="info" size="mini"> 填写</van-button> </van-col> </van-row> </div> </div> </van-collapse-item> </van-collapse> <div style="height: 20px"></div> </div> </template>
<script> export default { data(){ return { active: 0 } }, created() {
}, methods: { open(cidx) {
} } } </script>
<style lang="less"> .task { background: linear-gradient(180deg, #3E82F7 0%, #F2F1F4 40%, #F3F5F7 60%); height: calc(100vh - 42px); overflow-y: auto; padding-left: 14px; padding-right: 14px; .m-bottom10 { margin-bottom:10px; } .com-name { color: #fff; font-size: 18px; font-weight: bold; padding-top: 23px; margin-bottom: 15px; margin-left: 10px; } .card-box { background-color: #fff; border-radius: 8px; padding: 5px 0; margin-bottom: 10px; .name { font-size: 15px; color: #333333; font-weight: bold; margin-left: 16px; &::before { content: ''; position: absolute; width: 6px; height: 20px; background: #10CFBB; border-radius: 8px; left: 14px; } } .desc { font-weight: 400; margin-left: 14px; .state { margin-right: 10px; font-size: 12px; } .time { color: #666666; font-size: 12px; } } .leaf-line{ .cname { font-weight: bold; position: relative; &::before { content: ''; position: absolute; width: 6px; height: 6px; background: #10CFBB; border-radius: 10px; top: 8px; left: -12px; } } .state { font-size: 12px; } &:before{ content: ""; position: absolute; width: 1px; height: calc(100% - 69px); left: 16px; top: 15px; border-width: 1px; border-left: 1px solid #10CFBB; z-index: 0; } } .van-collapse-item__content { color: #333; } .van-cell__left-icon, .van-cell__right-icon{ color: #333; border: 2px solid #D9D9D9; border-radius: 50%; padding: 0 2px; height: 18px; font-size: 14px; line-height: 18px; } .van-button--mini { padding: 0 10px; } .text-orange { color: #FD993E; } .text-blue { color: #1678ff; } .text-success { color: #0DCA7C; } } } </style>
|