panhui 4 năm trước cách đây
mục cha
commit
13a99004f4

+ 6 - 0
src/main/vue/src/components/PackageEdit2.vue

@@ -47,9 +47,12 @@
                 <el-button @click="$router.go(-1)">取消</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
             </el-form-item>
             </el-form-item>
         </el-form>
         </el-form>
+
+        <package-preview :workFlow="list"></package-preview>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
+import PackagePreview from './PackagePreview.vue';
 export default {
 export default {
     name: 'PackageEdit',
     name: 'PackageEdit',
     created() {
     created() {
@@ -300,6 +303,9 @@ export default {
         delItem(i) {
         delItem(i) {
             this.list.splice(i, 1);
             this.list.splice(i, 1);
         }
         }
+    },
+    components: {
+        PackagePreview
     }
     }
 };
 };
 </script>
 </script>

+ 115 - 0
src/main/vue/src/components/PackagePreview.vue

@@ -0,0 +1,115 @@
+<template>
+    <div class="preview-phone">
+        <div class="title">流程信息</div>
+        <div class="list">
+            <div class="workflow" v-for="(item, index) in workFlow" :key="index">
+                <div class="text">
+                    <div>{{ item.name }}</div>
+                    <div>{{ item.desc }}</div>
+                </div>
+
+                <img :src="getImg(item.img)" alt="" />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'packagePrivew',
+    props: {
+        workFlow: {
+            type: Array,
+            default: () => {
+                return [];
+            }
+        }
+    },
+    methods: {
+        getImg(img) {
+            if (img instanceof Array) {
+                return img[0];
+            } else {
+                return img.split(',')[0];
+            }
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.title {
+    height: 44px;
+    text-align: center;
+    background-color: #fff;
+    color: #000;
+    font-size: 14px;
+    line-height: 44px;
+    border-bottom: 1px solid #ccc;
+}
+.preview-phone {
+    display: flex;
+    flex-direction: column;
+    width: 375px;
+    height: 700px;
+    position: absolute;
+    right: 0px;
+    top: 20px;
+    border: 1px solid #ccc;
+    border-radius: 10px;
+    overflow: hidden;
+    z-index: 20;
+    background-color: #fff;
+}
+
+.list {
+    overflow: auto;
+    flex-grow: 1;
+    padding: 40px;
+}
+
+.workflow {
+    padding: 15px 0;
+    position: relative;
+    .text {
+        font-size: 16px;
+        font-weight: bold;
+        color: #000000;
+        line-height: 26px;
+    }
+    img {
+        width: 100%;
+        display: block;
+        height: auto;
+        border-radius: 6px;
+        margin-top: 10px;
+    }
+
+    &::before {
+        content: '';
+        width: 10px;
+        height: 10px;
+        background: #ff7f1f;
+        position: absolute;
+        left: -22px;
+        top: 23px;
+        border-radius: 10px;
+    }
+
+    &::after {
+        content: '';
+        position: absolute;
+        width: 1px;
+        background-color: #ff7f1f;
+        height: 100%;
+        left: -18px;
+        top: 30px;
+    }
+
+    &:last-child {
+        &::after {
+            content: none;
+        }
+    }
+}
+</style>