|
@@ -0,0 +1,87 @@
|
|
|
+<template>
|
|
|
+ <div class="hui-flex hui-dialog batch-form">
|
|
|
+ <div class="hui-flex-box" v-if="templateList.length>0">
|
|
|
+ <div class="hui-flex hui-content">
|
|
|
+ <div class="hui-content-title">
|
|
|
+ <div :class="'hui-title-item' + (index === titleIndex ? ' active':'') "
|
|
|
+ v-for="(item,index) in templateList" :key="index" @click="titleIndex = index">
|
|
|
+ 模板{{index+1}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="hui-flex-box">
|
|
|
+ <batch-template :flowForm="item" v-for="(item,index) in templateList" :key="index"
|
|
|
+ v-show="titleIndex == index">
|
|
|
+ </batch-template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="hui-flex-box hui-content" v-else>
|
|
|
+ <div class="upload-demo">
|
|
|
+ <import-template ref="uploads" @changeFile="changeFile"></import-template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="hui-dialog-submit">
|
|
|
+ <el-button size="medium" @click="$emit('callback')">取 消</el-button>
|
|
|
+ <el-button size="medium" type="primary" @click="submit" :loading="loading">批量保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import importTemplate from '@/components/flow/importTemplate'
|
|
|
+ import batchTemplate from '@/components/flow/batchTemplate'
|
|
|
+ export default {
|
|
|
+ props: ['flowType'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ templateList: [],
|
|
|
+ titleIndex: 0,
|
|
|
+ loading: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.project = this.$store.getters.project;
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeFile(data) {
|
|
|
+ this.$loading.close();
|
|
|
+ console.log(this.templateList);
|
|
|
+ this.templateList = data;
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ // this.loading = true;
|
|
|
+ this.$message.success('功能开发中');
|
|
|
+ },
|
|
|
+ successFunc(res) {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.state) {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.$emit('callback', 'init');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ importTemplate,
|
|
|
+ batchTemplate
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+ .batch-form {
|
|
|
+ .el-upload-dragger {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-upload-dragger {
|
|
|
+ border-color: $--color-border;
|
|
|
+ }
|
|
|
+
|
|
|
+ .upload-demo {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|