123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <template>
- <div class="project-box" style="display: none;">
- <el-row style="padding-bottom: 16px">
- <el-input placeholder="请输入关键字" style="width: 240px" clearable @keyup.enter.native="ChangeKeyWord(keyWord)" v-model="keyWord">
- <i slot="prefix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="ChangeKeyWord(keyWord)"></i>
- </el-input>
- <el-button style="float: right" @click="addProject">添加项目</el-button>
- </el-row>
- <div class="saga-brand-group">
- <el-row :gutter="16">
- <el-col :span="6" v-for="item in projectList" :key="item.id">
- <el-card shadow="always" class="project-card" :body-style="{ padding: '0px' }">
- <el-image style="width: 100%; height: 187px" :src="item.url">
- <div slot="error" class="image-slot">
- <i class="iconfont icon-wandajituan"></i>
- </div>
- </el-image>
- <div style="padding: 16px">
- <span class="project-name" :title="item.name">{{ item.name }}</span>
- <span class="iconfont icon-shanchu"></span>
- <span class="iconfont icon-bianji"></span>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </div>
- </div>
- </template>
- <script lang="ts">
- import { Component, Vue } from "vue-property-decorator";
- import { UserModule } from "../../store/modules/user";
- @Component({
- name: "index",
- })
- export default class extends Vue {
- private keyWord = "";
- private projectList: any = [
- {
- id: "1",
- name: "龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达龙岗万达",
- logo: "",
- },
- {
- id: "2",
- name: "龙岗万达",
- logo: "",
- },
- {
- id: "3",
- name: "龙岗万达",
- logo: "",
- },
- {
- id: "4",
- name: "龙岗万达",
- logo: "",
- },
- {
- id: "5",
- name: "龙岗万达",
- logo: "",
- },
- {
- id: "6",
- name: "龙岗万达",
- logo: "",
- },
- ];
- get projectId() {
- return UserModule.projectId;
- }
- /**
- * 检索项目
- * @param 检索关键字
- */
- private ChangeKeyWord(keyWord: string) {
- console.log(keyWord);
- }
- /**
- * 添加项目
- */
- private addProject() {
- console.log("添加项目");
- }
- }
- </script>
- <style lang="scss" scoped>
- .project-box {
- height: 100%;
- padding: 0 16px;
- .saga-brand-group {
- height: calc(100% - 48px);
- overflow-y: auto;
- overflow-x: hidden;
- ::v-deep .el-col {
- margin-bottom: 16px;
- }
- .project-card {
- ::v-deep .image-slot {
- display: flex;
- width: 100%;
- height: 100%;
- background-color: #075fa9;
- }
- .project-name {
- display: inline-block;
- width: calc(100% - 50px);
- cursor: text;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .icon-bianji {
- display: none;
- float: right;
- cursor: pointer;
- margin-right: 12px;
- }
- .icon-shanchu {
- display: none;
- float: right;
- cursor: pointer;
- }
- }
- .project-card:hover {
- .icon-bianji {
- display: block;
- }
- .icon-shanchu {
- display: block;
- }
- }
- .saga-brand-list {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: space-between;
- .saga-brand-item {
- width: 380px;
- height: 247px;
- // margin-right: 17px;
- margin-bottom: 16px;
- cursor: pointer;
- box-sizing: border-box;
- background-color: #fff;
- border-radius: 4px;
- border: 1px solid #e4e5e7;
- transition: all 0.1s linear 0.01s;
- .saga-brand-name {
- display: inline-block;
- width: 133px;
- height: 100%;
- margin-right: 5px;
- font-size: 14px;
- line-height: 22px;
- .saga-brand-zhName {
- height: 44px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- .saga-brand-enName {
- color: #8d9399;
- margin-top: 4px;
- height: 22px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .saga-brand-logo {
- width: 52px;
- height: 52px;
- display: inline-block;
- vertical-align: top;
- ::v-deep .image-slot {
- font-size: 30px;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- height: 100%;
- background: #f5f7fa;
- color: #909399;
- }
- }
- }
- .pick {
- width: 380px;
- height: 1px;
- }
- .saga-brand-item.brand-new {
- border: 1px solid rgba(58, 141, 222, 0.6);
- }
- .saga-brand-item:hover {
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- transform: translate(0, -5px);
- }
- .saga-brand-item:nth-child(4n) {
- margin-right: 0;
- }
- }
- }
- }
- ::v-deep .icon-wandajituan {
- font-size: 60px;
- margin: auto;
- color: #ffffff;
- }
- @media screen and (max-width: 1000px) {
- ::v-deep .icon-wandajituan {
- font-size: 30px;
- }
- }
- </style>
|