|
@@ -39,37 +39,77 @@
|
|
|
|
|
|
<!--审批流-->
|
|
|
<el-timeline>
|
|
|
- <el-timeline-item timestamp="2018/4/12" placement="top">
|
|
|
- <el-card>
|
|
|
- <h4>Update Github template</h4>
|
|
|
- <p>Tom committed 2018/4/12 20:46</p>
|
|
|
- </el-card>
|
|
|
+ <el-timeline-item timestamp="提交" placement="top" type="success" :icon="Check">
|
|
|
+ <!-- 审批完成 -->
|
|
|
+ <div class="timeline-box flex-1">
|
|
|
+ <div class="flex flex-align-center">
|
|
|
+ <div class="timeline-box-user flex-1">
|
|
|
+ <span class="name">爱丽丝</span>
|
|
|
+ <div v-if="false" class="comment">
|
|
|
+ <div class="comment-content">同意</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span class="timeline-box-date">2018/4/12 20:46</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-timeline-item>
|
|
|
- <el-timeline-item timestamp="2018/4/3" placement="top">
|
|
|
- <el-card>
|
|
|
- <h4>Update Github template</h4>
|
|
|
- <p>Tom committed 2018/4/3 20:46</p>
|
|
|
- </el-card>
|
|
|
+
|
|
|
+ <el-timeline-item timestamp="审批" placement="top" type="success" :icon="Check">
|
|
|
+ <div class="timeline-box flex-1">
|
|
|
+ <div class="flex flex-align-center">
|
|
|
+ <div class="timeline-box-user flex-1">
|
|
|
+ <span class="name">罗小胖</span>
|
|
|
+ <div class="comment">
|
|
|
+ <div class="comment-content">同意</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span class="timeline-box-date">2018/4/12 20:46</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-timeline-item>
|
|
|
- <el-timeline-item timestamp="2018/4/2" placement="top">
|
|
|
- <el-card>
|
|
|
- <h4>Update Github template</h4>
|
|
|
- <p>Tom committed 2018/4/2 20:46</p>
|
|
|
- </el-card>
|
|
|
+
|
|
|
+ <el-timeline-item timestamp="抄送" placement="top" type="success" :icon="Check">
|
|
|
+ <div class="timeline-box flex-1">
|
|
|
+ <div class="flex flex-align-center">
|
|
|
+ <div v-if="false" class="timeline-box-user flex-1">
|
|
|
+ <span class="name">罗小胖</span>
|
|
|
+ <div class="comment">
|
|
|
+ <div class="comment-content">同意</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-space wrap>
|
|
|
+ <el-avatar> 路飞 </el-avatar>
|
|
|
+ <el-avatar> 红发 </el-avatar>
|
|
|
+ <el-avatar> 娜美 </el-avatar>
|
|
|
+ </el-space>
|
|
|
+
|
|
|
+ <span class="timeline-box-date">2018/4/12 20:46</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
-
|
|
|
</div>
|
|
|
<div class="flow-actions">
|
|
|
- <el-button :icon="ChatLineSquare">评论</el-button>
|
|
|
+ <el-button :icon="ChatLineSquare" @click="openComment">评论</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <LeFormConfigDialog
|
|
|
+ v-if="visible"
|
|
|
+ ref="dialogCommentRef"
|
|
|
+ v-model="visible"
|
|
|
+ title="评论审批"
|
|
|
+ width="600px"
|
|
|
+ :form-data="activeData"
|
|
|
+ :form-options="formOptions"
|
|
|
+ @submit="submitHandler"
|
|
|
+ />
|
|
|
</el-drawer>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { computed, ref } from 'vue'
|
|
|
-import { ChatLineSquare } from '@element-plus/icons-vue'
|
|
|
+import { ChatLineSquare, Check } from '@element-plus/icons-vue'
|
|
|
|
|
|
const direction = ref('rtl')
|
|
|
const myProps = defineProps({
|
|
@@ -83,6 +123,9 @@ const myProps = defineProps({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+const visible = ref(false) // 弹窗显示隐藏
|
|
|
+const activeData = ref({})
|
|
|
+
|
|
|
// 同步值
|
|
|
const $myEmit = defineEmits(['update:modelValue', 'successFn'])
|
|
|
|
|
@@ -104,6 +147,34 @@ const visibleDialog = computed({
|
|
|
$myEmit('update:modelValue', val)
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+const formsDialog = [
|
|
|
+ {
|
|
|
+ prop: 'username',
|
|
|
+ label: '评论',
|
|
|
+ itemType: 'input',
|
|
|
+ placeholder: '请输入评论',
|
|
|
+ rules: [{ required: true, message: '请输入评论', trigger: 'blur' }]
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const formOptions = computed(() => {
|
|
|
+ return {
|
|
|
+ forms: formsDialog,
|
|
|
+ labelWidth: 120,
|
|
|
+ span: 30,
|
|
|
+ formConfig: {
|
|
|
+ showCancelBtn: true,
|
|
|
+ submitLoading: false
|
|
|
+ }
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const submitHandler = () => {}
|
|
|
+
|
|
|
+const openComment = () => {
|
|
|
+ visible.value = !visible.value
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -192,4 +263,41 @@ const visibleDialog = computed({
|
|
|
border-top: 1px solid rgba(229, 230, 235, 1);
|
|
|
padding: 0 20px;
|
|
|
}
|
|
|
+
|
|
|
+// 时间线样式
|
|
|
+.timeline-box {
|
|
|
+ &-user {
|
|
|
+ .name {
|
|
|
+ color: #1d2129;
|
|
|
+ font-weight: 400;
|
|
|
+ }
|
|
|
+ .comment {
|
|
|
+ width: 100%;
|
|
|
+ -webkit-user-select: none;
|
|
|
+ user-select: none;
|
|
|
+ margin: 4px 0 16px;
|
|
|
+ padding: 8px 16px;
|
|
|
+ border-radius: 4px;
|
|
|
+ background-color: #f8f8fa;
|
|
|
+ .comment-content {
|
|
|
+ font-weight: 500;
|
|
|
+ color: #1d2129;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-date {
|
|
|
+ margin-left: 10px;
|
|
|
+ left: 0;
|
|
|
+ padding-right: 16px;
|
|
|
+ text-align: right;
|
|
|
+ transform: translate(-100%);
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ max-width: 100px;
|
|
|
+ color: #86909c;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 1.667;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|