fjl
fujunling
2023-06-16 1b33ffc25b3ac5b42a90c1366dec9232fd5bf3de
fjl
已修改3个文件
已添加3个文件
156 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/batchImport/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Divider/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
  })
}
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('只允许上传xlsx、xls格式的文件');
        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>
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>
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>
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 => {
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',