123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <template>
- <view class="morning-item global_card_content" @click="isGoDetalisOfDlgHandler(list)">
- <block v-if="list.Source == 'meetingreviewchapt'">
- <view class="item-title" v-if="list.IndustryName">
- <mp-html :content="richTextClamp(3) + `【${list.IndustryName}】晨会精华 ` + '</div>'" />
- </view>
- <view class="item-rich-text">
- <mp-html :content="richTextClamp(10) + list.Content + '</div>'" />
- </view>
- <view class="item-time">
- <text>{{ list.PublishTime }}</text>
- </view>
- </block>
- <block v-else>
- <view class="item-title" v-if="list.Title">
- <mp-html :content="richTextClamp(3) + list.Title + '</div>'" />
- </view>
- <view class="item-rich-text" v-if="list.Source == 'productinterior'">
- <mp-html :content="richTextClamp(10) + list.Body + '</div>'" />
- </view>
- <view class="item-rich-text" v-else>
- <mp-html :content="richTextClamp(10) + list.Abstract + '</div>'" />
- </view>
- <view class="item-time">
- <text>{{ list.Source == "productinterior" ? list.PublishTime : list.PublishDate }}</text>
- </view>
- </block>
- </view>
- </template>
- <script>
- /*
- Source 字段的分别代表
- researchsummary 本周研究汇总
- minutessummary 上周纪要汇总
- meetingreviewchapt 晨会精华
- productnterior 产品内测
- */
- export default {
- name: "",
- props: {
- list: {
- type: Object,
- default: {},
- required: true,
- },
- },
- methods: {
- // 判断是跳转本周||上周||晨会弹框
- isGoDetalisOfDlgHandler(item) {
- // 判断是晨会文章、弹出弹框 通过传统方式进行操控兄弟之间传值
- if (item.Source == "meetingreviewchapt") {
- this.$emit("showMorningDialog", item);
- } else if (item.Source == "productinterior") {
- // 跳转产品内测详情
- uni.navigateTo({
- url: "/reportPages/internalDetials/internalDetials?id=" + item.ProductInteriorId,
- });
- } else {
- let isType = item.Source == "researchsummary" ? 2 : 3;
- this.$store.dispatch("checkHandle", "/reportPages/reportSecretDetail/reportSecretDetail?type=" + isType + "&id=" + item.ArticleId);
- }
- },
- // 对返回的文本进行处理 多少行进行省略
- richTextClamp(val) {
- return `<div style="${
- val >= 7 ? "min-height: 50px;" : ""
- }line-clamp: ${val};-webkit-line-clamp: ${val};text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-wrap: break-word;word-break: break-all;">`;
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .morning-item {
- width: 100%;
- background: #ffffff;
- box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
- border-radius: 8rpx;
- padding: 20rpx;
- margin-bottom: 20rpx;
- overflow: hidden;
- .item-title {
- position: relative;
- font-size: 32rpx;
- font-weight: 500;
- color: #333333;
- line-height: 38rpx;
- text-indent: 0.5em;
- &::before {
- content: "";
- position: absolute;
- top: 5rpx;
- left: 0;
- width: 6rpx;
- height: 31rpx;
- background-color: #376cbb;
- }
- }
- .item-rich-text {
- margin: 10rpx 0;
- }
- .item-time {
- display: flex;
- align-items: center;
- color: #acacac;
- font-size: 24rpx;
- line-height: 28rpx;
- }
- }
- </style>
|