From 1b33ffc25b3ac5b42a90c1366dec9232fd5bf3de Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期五, 16 六月 2023 16:53:04 +0800
Subject: [PATCH] fjl

---
 Source/UBCS-WEB/src/components/Divider/index.vue              |   26 ++++++++
 Source/UBCS-WEB/src/api/batchImport/index.js                  |   10 +++
 Source/UBCS-WEB/src/components/BatchImport/index.vue          |  112 +++++++++++++++++++++++++++++++++++++
 Source/UBCS-WEB/src/main.js                                   |    2 
 Source/UBCS-WEB/vue.config.js                                 |    2 
 Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue |    4 +
 6 files changed, 154 insertions(+), 2 deletions(-)

diff --git a/Source/UBCS-WEB/src/api/batchImport/index.js b/Source/UBCS-WEB/src/api/batchImport/index.js
new file mode 100644
index 0000000..33fb8bd
--- /dev/null
+++ b/Source/UBCS-WEB/src/api/batchImport/index.js
@@ -0,0 +1,10 @@
+
+import request from '@/router/axios';
+
+export const downloadTemplate = (params) => {
+  return request({
+    url: '/api/ubcs-code/mdmEngineController/downloadTopImportExcel ',
+    method: 'get',
+    params
+  })
+}
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
new file mode 100644
index 0000000..cb6d21f
--- /dev/null
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -0,0 +1,112 @@
+<template>
+  <el-dialog :title="title" :visible="visible" append-to-body>
+    <Divider text="瀵煎叆鎻愮ず" left="30px"></Divider>
+    <ul>
+      <li v-for="(item, index) in tipInfo" :key="index">
+        {{ item }}
+      </li>
+    </ul>
+    <div class="radio_box">
+      <span>鍒嗙被鐨勮矾寰勪娇鐢ㄧ殑灞炴��:</span>
+      <el-radio-group v-model="classifyAttr">
+        <el-radio label="id">鍒嗙被缂栧彿</el-radio>
+        <el-radio label="name">鍒嗙被鍚嶇О</el-radio>
+      </el-radio-group>
+    </div>
+    <Divider text="excel鏂囦欢锛岄�夋嫨鏂囦欢鍚庝細鑷姩涓婁紶" left="30px"></Divider>
+    <el-upload
+      class="upload"
+      :accept="accept"
+      :action="action"
+      :before-upload="beforeUpload"
+      :on-exceed="handleExceed"
+    >
+      <el-button size="small" type="primary"><i class="el-icon-upload"></i> 鐐瑰嚮涓婁紶</el-button>
+    </el-upload>
+    <template #footer>
+      <el-button type="primary" size="small" @click="downloadTemplateFun">涓嬭浇瀵煎叆妯℃澘</el-button>
+      <el-button size="small">鍏抽棴</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { downloadTemplate } from '../../api/batchImport/index'
+export default {
+  name: "",
+  props: {
+    title: {
+      type: String,
+      default: "鎵归噺鐢宠缂栫爜",
+    },
+    tipInfo: {
+      type: Array,
+      default: () => [],
+    },
+    visible: {
+      type: Boolean,
+      default: false,
+    },
+    accept: {
+      type: String,
+      default: '.xlsx, .xls'
+    },
+    codeClassifyOid: {
+      type: String,
+      default: ''
+    },
+    downloadTemplateFun: {
+      type: Function
+    }
+  },
+  data() {
+    return {
+      classType: "classCode",
+    };
+  },
+  computed: {
+    action() {
+      console.log(process, 'process');
+      return '/api/ubcs-code/mdmEngineController/mdmEngineController/batchTopImportCode'
+    }
+  },
+  methods: {
+    beforeUpload(file) {
+      const fileType = file.name.split('.').pop()
+      if (fileType !== 'xlsx' && fileType !== 'xls') {
+        // 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼�
+        this.$message.error('鍙厑璁镐笂浼爔lsx銆亁ls鏍煎紡鐨勬枃浠�');
+        return false;
+      }
+      return true;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+ul {
+  color: rgb(188, 188, 188);
+  margin: 20px 0 0 0;
+  padding: 0;
+  padding-left: 30px;
+  list-style: none;
+  li {
+    margin-bottom: 5px;
+    font-size: 12px;
+  }
+}
+.radio_box {
+  padding-left: 30px;
+  margin: 20px 0 25px 0;
+  display: flex;
+  align-items: center;
+  span {
+    margin-right: 20px;
+  }
+}
+.upload {
+  padding-left: 30px;
+  margin-top: 30px;
+}
+</style>
diff --git a/Source/UBCS-WEB/src/components/Divider/index.vue b/Source/UBCS-WEB/src/components/Divider/index.vue
new file mode 100644
index 0000000..78cdc4f
--- /dev/null
+++ b/Source/UBCS-WEB/src/components/Divider/index.vue
@@ -0,0 +1,26 @@
+<!-- 鍑芥暟寮忕粍浠跺皝瑁呭垎鍓茬嚎 -->
+<template functional>
+  
+  <div class="divider" :style="{backgroundColor: props.bgkColor, color: props.color}">
+    <span :style="{left: props.left}">{{ props.text }}</span>{{ $props }}
+  </div>
+</template>
+<style lang="scss" scoped>
+.divider {
+  margin: 10px 0;
+  position: relative;
+  width: 100%;
+  height: 1px;
+  background-color: rgb(196, 196, 196);
+  color:  rgb(164, 164, 164);
+  span {
+    padding: 0 10px;
+    position: absolute;
+    top: 50%;
+    left: 10%;
+    transform: translateY(-50%);
+    z-index: 999;
+    background-color: #fff;
+  }
+}
+</style>
diff --git a/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue b/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue
index 9b6c62e..22c03ce 100644
--- a/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue
+++ b/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue
@@ -1,3 +1,5 @@
+<!-- eslint-disable vue/valid-v-for -->
+<!-- eslint-disable vue/require-v-for-key -->
 <template>
   <vue-flowchart-editor class="vue-flowchart-editor" ref="flowChart">
     <div class="vfe-chart">
@@ -15,7 +17,7 @@
           <flow :data="flowChartData" :onAfterChange="onAfterChange" />
           <div class="tooltip">
             <template v-for="item in tooltipData">
-              <p :key="item.name">{{ item.name }}: {{ item.value }}</p>
+              <p>{{ item.name }}: {{ item.value }}</p>
             </template>
           </div>
         </div>
diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js
index c87fec9..3f3b231 100644
--- a/Source/UBCS-WEB/src/main.js
+++ b/Source/UBCS-WEB/src/main.js
@@ -23,6 +23,7 @@
 import avueUeditor from 'avue-plugin-ueditor';
 import website from '@/config/website';
 import crudCommon from '@/mixins/crud';
+import Divider from './components/Divider';
 // 涓氬姟缁勪欢
 import tenantPackage from './views/system/tenantpackage';
 import enupackage from "@/views/modeling/enupackage";
@@ -102,6 +103,7 @@
 Vue.component('MasterTree',MasterTree)
 Vue.component('FlowPath',FlowPath)
 Vue.component('Stage',Stage)
+Vue.component('Divider', Divider)
 
 // 鍔犺浇鐩稿叧url鍦板潃
 Object.keys(urls).forEach(key => {
diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js
index 95d7151..81cc09c 100644
--- a/Source/UBCS-WEB/vue.config.js
+++ b/Source/UBCS-WEB/vue.config.js
@@ -31,7 +31,7 @@
         // target: 'http://192.168.1.46:37000',
         // target: 'http://dev.vci-tech.com:37000',
         // target: 'http://192.168.1.51:37000/',
-          target: 'http://192.168.1.104:37000',
+          // target: 'http://192.168.1.104:37000',
         // target: 'http://192.168.1.63:37000',
         //target: 'http://192.168.3.7:37000',
         target: 'http://dev.vci-tech.com:37000',

--
Gitblit v1.9.3