|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="tag-view">
|
|
|
+ <div class="tag-view" v-show="canShow">
|
|
|
<!-- <div class="tag-view-content" :style="{ height: height + 'px' }"> -->
|
|
|
<div class="tag-view-content">
|
|
|
<header>
|
|
@@ -8,41 +8,8 @@
|
|
|
<i class="iconfont icon-close" @click="onClose"></i>
|
|
|
</header>
|
|
|
<article>
|
|
|
- <div class="aside-item left-item">
|
|
|
- <div class="content-item">
|
|
|
- <div class="item-title">创建时间</div>
|
|
|
- <span class="content-desc">2021-04-25</span>
|
|
|
- </div>
|
|
|
- <div class="content-item">
|
|
|
- <div class="item-title">创建人</div>
|
|
|
- <span class="content-desc">陈工</span>
|
|
|
- </div>
|
|
|
- <div class="content-item">
|
|
|
- <div class="item-title">状态</div>
|
|
|
- <span class="content-desc" v-for="i in data.status">
|
|
|
- <span v-if="i.value == form.status">{{ i.text }}</span></span
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div class="content-item">
|
|
|
- <div class="item-title">涉及的成员</div>
|
|
|
- <span class="content-desc" v-for="(i, index) in form.members"
|
|
|
- ><span>{{ i.text }}</span>
|
|
|
- <span v-if="index < form.members.length - 1">、</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="content-item">
|
|
|
- <div class="item-title">描述</div>
|
|
|
- <span class="content-desc">{{ form.describe }}</span>
|
|
|
- </div>
|
|
|
- <div class="media-box" :class="notify.type == 'image' ? 'zoom-in' : ''">
|
|
|
- <component :is="component" :viewer="viewer"></component>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="aside-item right-item">
|
|
|
- <div class="comment-content">
|
|
|
- <div class="comment-header"><span>评论</span></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <TagMsg @setShow="setShow"></TagMsg>
|
|
|
+ <Comment></Comment>
|
|
|
</article>
|
|
|
<!-- <footer></footer> -->
|
|
|
</div>
|
|
@@ -50,47 +17,13 @@
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import { ref, onMounted, onBeforeUnmount, computed, inject } from 'vue'
|
|
|
-import { http } from '@/utils/request'
|
|
|
-import browser from '@/utils/browser'
|
|
|
-import Image from '@/components/form/medias/Image.vue'
|
|
|
-import Video from '@/components/form/medias/Video.vue'
|
|
|
-import Audio from '@/components/form/medias/Audio.vue'
|
|
|
-import Link from '@/components/form/medias/Link.vue'
|
|
|
-const projectId = browser.valueFromUrl('projectId') || 1
|
|
|
+
|
|
|
+import TagMsg from './content/TagMsg.vue'
|
|
|
+import Comment from './content/Comment.vue'
|
|
|
const notify = inject('notify')
|
|
|
-console.log(notify.value)
|
|
|
-const viewer = ref(true)
|
|
|
-// const props = defineProps(['notify'])
|
|
|
const emits = defineEmits(['action'])
|
|
|
const height = ref(0)
|
|
|
-const form = ref({
|
|
|
- title: '',
|
|
|
- describe: '',
|
|
|
- status: '',
|
|
|
- members: [],
|
|
|
-})
|
|
|
-const data = ref({
|
|
|
- status: [
|
|
|
- { text: '待处理', value: 1 },
|
|
|
- { text: '进行中', value: 2 },
|
|
|
- { text: '未解决', value: 3 },
|
|
|
- { text: '已解决', value: 4 },
|
|
|
- ],
|
|
|
- members: [],
|
|
|
-})
|
|
|
-const media = ref('video')
|
|
|
-const component = computed(() => {
|
|
|
- switch (media.value) {
|
|
|
- case 'image':
|
|
|
- return Image
|
|
|
- case 'video':
|
|
|
- return Video
|
|
|
- case 'audio':
|
|
|
- return Audio
|
|
|
- case 'link':
|
|
|
- return Link
|
|
|
- }
|
|
|
-})
|
|
|
+const canShow = ref(false)
|
|
|
const onResize = () => {
|
|
|
height.value = window.innerHeight - 90
|
|
|
}
|
|
@@ -103,34 +36,10 @@ const onClose = () => {
|
|
|
}
|
|
|
notify.value = null
|
|
|
}
|
|
|
+const setShow = () => {
|
|
|
+ canShow.value = true
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
- http.post(`smart-site/projectTeam/select`, { projectId }).then(response => {
|
|
|
- data.value.members = response.data.map(item => {
|
|
|
- return {
|
|
|
- text: item.nickName,
|
|
|
- value: item.userId,
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- if (notify.value) {
|
|
|
- form.value.status = String(notify.value.status || '')
|
|
|
- form.value.title = notify.value.title || ''
|
|
|
- form.value.describe = notify.value.content || ''
|
|
|
- form.value.members = []
|
|
|
- if (notify.value.members && notify.value.members.length) {
|
|
|
- notify.value.members.forEach(item => {
|
|
|
- let find = data.value.members.find(c => c.value == item)
|
|
|
- if (find) {
|
|
|
- form.value.members.push(find)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- console.log(form.value)
|
|
|
- //初始化markingId
|
|
|
- console.log(notify.value)
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
if (window.kankan) {
|
|
|
window.kankan.TagManager.focusTag(notify.value.sid, {
|
|
|
direction: 'left',
|
|
@@ -155,7 +64,7 @@ onBeforeUnmount(() => {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.aside-item {
|
|
|
- padding: 30px 20px 0;
|
|
|
+ padding: 20px;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 28px;
|
|
|
.content-item {
|
|
@@ -164,37 +73,177 @@ onBeforeUnmount(() => {
|
|
|
// margin-bottom: 0;
|
|
|
// }
|
|
|
}
|
|
|
- &.left-item {
|
|
|
- width: 400px;
|
|
|
- .item-title {
|
|
|
- font-size: 14px;
|
|
|
- color: #999;
|
|
|
- }
|
|
|
- .content-desc {
|
|
|
- font-size: 14px;
|
|
|
- line-height: 28px;
|
|
|
- }
|
|
|
- .media-box {
|
|
|
- width: 360px;
|
|
|
- height: 225px;
|
|
|
- border-radius: 4px 4px 4px 4px;
|
|
|
- opacity: 1;
|
|
|
- border: 1px solid rgba(255, 255, 255, 0.2);
|
|
|
- position: relative;
|
|
|
- margin-bottom: 30px;
|
|
|
- // &.zoom-in {
|
|
|
- // cursor: zoom-in;
|
|
|
- // }
|
|
|
- }
|
|
|
- }
|
|
|
+ // &.left-item {
|
|
|
+ // width: 400px;
|
|
|
+ // .item-title {
|
|
|
+ // font-size: 14px;
|
|
|
+ // color: #999;
|
|
|
+ // }
|
|
|
+ // .content-desc {
|
|
|
+ // font-size: 14px;
|
|
|
+ // line-height: 28px;
|
|
|
+ // }
|
|
|
+ // .media-box {
|
|
|
+ // width: 360px;
|
|
|
+ // height: 225px;
|
|
|
+ // border-radius: 4px 4px 4px 4px;
|
|
|
+ // opacity: 1;
|
|
|
+ // border: 1px solid rgba(255, 255, 255, 0.2);
|
|
|
+ // position: relative;
|
|
|
+ // // margin-bottom: 30px;
|
|
|
+ // // &.zoom-in {
|
|
|
+ // // cursor: zoom-in;
|
|
|
+ // // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
&.right-item {
|
|
|
+ position: relative;
|
|
|
+ .input-content {
|
|
|
+ width: 100%;
|
|
|
+ height: 34px;
|
|
|
+ margin: 20px 0;
|
|
|
+ padding: 0 20px;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ .input-box {
|
|
|
+ width: 226px;
|
|
|
+ height: 34px;
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
+ border-radius: 4px;
|
|
|
+ opacity: 1;
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.2);
|
|
|
+ input {
|
|
|
+ line-height: 34px;
|
|
|
+ padding: 0 10px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .send-btn {
|
|
|
+ width: 60px;
|
|
|
+ height: 34px;
|
|
|
+ background: #0076f6;
|
|
|
+ border-radius: 4px;
|
|
|
+ opacity: 1;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 34px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
.comment-content {
|
|
|
.comment-header {
|
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|
|
|
color: #999;
|
|
|
}
|
|
|
+ .comment-msg {
|
|
|
+ .comment-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin-top: 14px;
|
|
|
+ .avatar-box {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #f2f2f2;
|
|
|
+ margin-right: 6px;
|
|
|
+ }
|
|
|
+ .comment-box {
|
|
|
+ flex: 1;
|
|
|
+ > div {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .view-top {
|
|
|
+ .user-name {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ .iconfont {
|
|
|
+ color: #999;
|
|
|
+ font-size: 1em;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .view-middle {
|
|
|
+ .comment-text {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .view-bottom {
|
|
|
+ font-size: 12px;
|
|
|
+ .comment-time {
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ .reply-btn {
|
|
|
+ color: #0076f6;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .reply-content {
|
|
|
+ .reply-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin-top: 14px;
|
|
|
+ width: 100%;
|
|
|
+ .avatar-box {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #f2f2f2;
|
|
|
+ margin-right: 6px;
|
|
|
+ }
|
|
|
+ .reply-box {
|
|
|
+ flex: 1;
|
|
|
+ > div {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .view-top {
|
|
|
+ .user-name {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ .iconfont {
|
|
|
+ color: #999;
|
|
|
+ font-size: 1em;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .view-middle {
|
|
|
+ .reply-text {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ .reply-tips {
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .view-bottom {
|
|
|
+ font-size: 12px;
|
|
|
+ .reply-time {
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ .reply-btn {
|
|
|
+ color: #0076f6;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|