Prechádzať zdrojové kódy

单点登录+新增wms入库单

ymy 1 rok pred
rodič
commit
1cc8eadccb

+ 3 - 0
.env.development

@@ -9,3 +9,6 @@ VUE_APP_BASE_API = '/prod-api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 登录地址
+VUE_APP_LOGIN_URL = 'https://sso.benyuntech.com/#/'

+ 3 - 0
.env.production

@@ -6,3 +6,6 @@ ENV = 'production'
 
 # SaaS协同平台/生产环境
 VUE_APP_BASE_API = '/prod-api'
+
+# 登录地址
+VUE_LOGIN_URL = 'https://sso.lzlxylsf.com/#/'

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 916 - 1507
package-lock.json


+ 8 - 1
package.json

@@ -48,6 +48,9 @@
     "xe-utils": "^3.5.7"
   },
   "devDependencies": {
+    "@babel/core": "^7.22.8",
+    "@babel/preset-env": "^7.22.7",
+    "@babel/preset-react": "^7.22.5",
     "@types/file-saver": "^2.0.5",
     "@types/js-cookie": "^3.0.3",
     "@types/lodash": "^4.14.192",
@@ -59,11 +62,15 @@
     "@vue/cli-plugin-typescript": "~5.0.0",
     "@vue/cli-plugin-vuex": "~5.0.0",
     "@vue/cli-service": "~5.0.0",
+    "babel-core": "^6.26.3",
+    "babel-loader": "^9.1.3",
+    "babel-preset-env": "^1.7.0",
     "monaco-editor-esm-webpack-plugin": "^2.1.0",
     "monaco-editor-webpack-plugin": "^7.0.1",
     "sass": "^1.32.7",
     "sass-loader": "^12.0.0",
     "typescript": "~4.5.5",
-    "vue-template-compiler": "^2.6.14"
+    "vue-template-compiler": "^2.6.14",
+    "webpack": "^5.88.1"
   }
 }

+ 17 - 0
src/api/WMSInstoreBill.ts

@@ -0,0 +1,17 @@
+import request from '@/benyun/utils/request'
+//查询数据
+export function query(params:any) {
+	return request({
+		url: '/omsOrder/wmsEntryOrder/page',
+		method: 'get',
+		params:params
+	})
+}
+//查询数据
+export function WMSCreateEntryOrder(params:any) {
+	return request({
+		url: '/omsOrder/WMSwork/WMSCreateEntryOrder',
+		method: 'post',
+		data:params
+	})
+}

+ 13 - 2
src/api/login.ts

@@ -1,5 +1,6 @@
 import request from '@/benyun/utils/request'
 import store from '@/store/index'
+import {getToken} from '@/benyun/utils/auth'
 // 登录方法
 export function login(username : string, password : string, code : string, uuid : string, tenantId : any) {
 	return request({
@@ -41,14 +42,24 @@ export function getInfo() {
 	})
 }
 
+// // 退出方法
+// export function logout() {
+// 	return request({
+// 		url: '/auth/logout',
+// 		method: 'delete'
+// 	})
+// }
+
 // 退出方法
 export function logout() {
 	return request({
-		url: '/auth/logout',
-		method: 'delete'
+		url: '/sso/logout',
+		method: 'post',
+		data:{satoken:getToken()}
 	})
 }
 
+
 // 获取验证码
 export function getCodeImg() {
 	return request({

+ 9 - 2
src/benyun/components/bySelect/bySelect.vue

@@ -156,9 +156,16 @@ export default class BySelect extends VueViews {
     let parame = (this as any).$lodash.cloneDeep(this.requestConfig);
     parame.success = (res:any) => {
       let f = this.attrs.requestFormat?this.attrs.requestFormat:'data'
-      if(res.data && res.data[f]){
-        this.setOptions(res.data[f]);
+      if(this.attrs.requestFormat){
+        if(res.data && res.data[f]){
+          this.setOptions(res.data[f]);
+        }
+      }else{
+        if(res.data){
+          this.setOptions(res.data);
+        }
       }
+      
     }
     parame.fail = (err:any) => {}
     this.requestHandle(parame);

+ 20 - 0
src/benyun/utils/benyuntech.ts

@@ -234,4 +234,24 @@ export async function blobValidate(data:any) {
   } catch (error) {
     return true;
   }
+}
+
+//获取url参数
+export function getQueryString(name:string) {
+  let key = null
+  let value = null
+  let obj:any = {}
+  let str = location.href // 取得整个地址栏
+  let num = str.indexOf('?')
+  str = str.substr(num + 1) // 取得所有参数   stringvar.substr(start [, length ]
+  const arr = str.split('&') // 各个参数放到数组里
+  for (let i = 0; i < arr.length; i++) {
+    num = arr[i].indexOf('=')
+    if (num > 0) {
+      key = arr[i].substring(0, num)
+      value = decodeURIComponent(arr[i].substr(num + 1))
+      obj[key] = value
+    }
+  }
+  return obj[name]
 }

+ 1 - 1
src/benyun/utils/request.ts

@@ -97,7 +97,7 @@ service.interceptors.response.use((res:any) => {
       ).then(() => {
         isRelogin.show = false;
         store.dispatch('LogOut').then(() => {
-          location.href = '/index';
+          // location.href = '/index';
         })
       }).catch(() => {
         isRelogin.show = false;

+ 37 - 1
src/main.ts

@@ -10,6 +10,7 @@ import lodash from 'lodash'
 import plugins from '@/benyun/plugins'
 import directive from './directive' // directive
 import {getDicts} from "@/api/system/dict/data";
+import {getToken} from '@/benyun/utils/auth'
 
 import '@/assets/styles/index.scss' // global css
 import '@/assets/styles/benyuntech.scss' // young css
@@ -19,6 +20,7 @@ import './permission' // permission control
 
 import Element from 'element-ui'
 import './assets/styles/element-variables.scss'
+import { Message } from 'element-ui';
 
 // import VXETable from 'vxe-table'
 import XEUtils from 'xe-utils'
@@ -30,7 +32,7 @@ import zhCN from 'vxe-table/lib/locale/lang/zh-CN'
 VXETable.setup({
   i18n: (key, args) => XEUtils.toFormatString(XEUtils.get(zhCN, key), args)
 })
-import {addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels} from "@/benyun/utils/benyuntech";
+import {addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels, getQueryString} from "@/benyun/utils/benyuntech";
 import {getConfigKey} from "@/api/system/config";
 import gmComponent from './benyun/plugins/componentRegister'
 
@@ -99,6 +101,40 @@ Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
 
+async function myLogin () {
+  if(getToken()) {
+    return
+  }
+  const ticket = getQueryString('ticket')
+  const ssoToken = getQueryString('ssoToken')
+
+  if(ticket || ssoToken) {
+    const url = ticket ? '/sso/doLoginByTicket' : '/sso/doLoginByToken'
+    let data:any = {}
+    if(ticket) {
+      data.ticket = ticket
+    }
+    if(ssoToken) {
+      data.token = ssoToken
+    }
+    store.dispatch('GetToken',{
+      url,data
+    }).then(() => {
+
+      // location.href = '/index';
+    }).catch((err:any) => {
+      if(err && err.msg) {
+        Message.error(err.msg);
+      }
+    })
+
+  }else{
+    const redirect = location.href.replace(/\??ticket=[^&]*&?/g, '')
+    location.href = `${process.env.VUE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
+  }
+} 
+
+// myLogin()
 new Vue({
   router,
   store,

+ 62 - 14
src/permission.ts

@@ -5,20 +5,21 @@ import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
 import {getToken} from '@/benyun/utils/auth'
 import {isRelogin} from '@/benyun/utils/request'
+import {getQueryString} from "@/benyun/utils/benyuntech";
 
 NProgress.configure({ showSpinner: false })
 
-const whiteList = ['/login', '/demo', '/auth-redirect', '/bind', '/register']
+// const whiteList = ['/login', '/demo', '/auth-redirect', '/bind', '/register']
 
 router.beforeEach((to:any, from:any, next:any) => {
   NProgress.start()
   if (getToken()) {
     to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
     /* has token*/
-    if (to.path === '/login') {
-      next({ path: '/' })
-      NProgress.done()
-    } else {
+    // if (to.path === '/login') {
+    //   next({ path: '/' })
+    //   NProgress.done()
+    // } else {
       if (store.getters.roles.length === 0) {
         isRelogin.show = true
         // 判断当前用户是否已拉取完user_info信息
@@ -35,22 +36,69 @@ router.beforeEach((to:any, from:any, next:any) => {
         }).catch(err => {
             store.dispatch('LogOut').then(() => {
               Message.error(err)
-              next({ path: '/' })
+              // next({ path: '/' })
             })
           })
       } else {
         next()
       }
-    }
+    // }
   } else {
-    // 没有token
-    if (whiteList.indexOf(to.path) !== -1) {
-      // 在免登录白名单,直接进入
-      next()
-    } else {
-      next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
-      NProgress.done()
+    const ticket = getQueryString('ticket')
+    const ssoToken = getQueryString('ssoToken')
+
+    if(!ticket && !ssoToken){
+      const redirect = location.href.replace(/\??ticket=[^&]*&?/g, '')
+      location.href = `${process.env.VUE_APP_LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
+    }else{
+      const url = ticket ? '/sso/doLoginByTicket' : '/sso/doLoginByToken'
+      let data:any = {}
+      if(ticket) {
+        data.ticket = ticket
+      }
+      if(ssoToken) {
+        data.token = ssoToken
+      }
+      store.dispatch('GetToken',{
+        url,data
+      }).then(() => {
+        isRelogin.show = true
+        // 判断当前用户是否已拉取完user_info信息
+        store.dispatch('GetInfo').then(() => {
+          isRelogin.show = false
+          store.dispatch('GenerateRoutes').then(accessRoutes => {
+            // 根据roles权限生成可访问的路由表
+            for(const item of accessRoutes){
+              router.addRoute(item)
+            }
+            // router.addRoutes(accessRoutes) // 动态添加可访问路由表
+            next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
+          })
+        }).catch(err => {
+            store.dispatch('LogOut').then(() => {
+              Message.error(err)
+              // next({ path: '/' })
+            })
+          })
+        // location.href = '/index';
+      }).catch((err:any) => {
+        if(err && err.msg) {
+          Message.error(err.msg);
+        }
+      })
+      // next()
     }
+    
+
+    // 没有token
+    // if (whiteList.indexOf(to.path) !== -1) {
+    //   // 在免登录白名单,直接进入
+    //   next()
+    // } else {
+      
+    //   next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+    //   NProgress.done()
+    // }
   }
 })
 

+ 22 - 0
src/store/modules/user.ts

@@ -59,6 +59,26 @@ const user = {
 			})
 		},
 
+		GetToken({commit}:any, params:any) {
+			return new Promise((resolve : any, reject : any) => {
+				request({
+					url: params.url,
+					method:'get',
+					params:params.data
+				}).then((res:any) => {
+					let data = res.data
+					setToken(data.token)
+					commit('SET_TOKEN', data.token)
+					setExpiresIn(720)
+					commit('SET_EXPIRES_IN', 720)
+					resolve()
+				}).catch((error:any) =>{
+					reject(error)
+				})
+				
+			})
+		},
+
 		// 获取用户信息
 		GetInfo({ commit, state } : any) {
 			return new Promise((resolve, reject) => {
@@ -103,6 +123,8 @@ const user = {
 					commit('SET_PERMISSIONS', [])
 					removeToken()
 					resolve()
+					const redirect = location.href.replace(/\??ticket=[^&]*&?/g, '')
+    			location.href = `${process.env.LOGIN_URL}?&redirect=${encodeURIComponent(redirect)}`
 				}).catch((error : any) => {
 					reject(error)
 				})

+ 71 - 0
src/views/oms/WMSProduct/component/ItemSku.vue

@@ -0,0 +1,71 @@
+<template>
+  <div class="items">
+    <div class="tool">
+      <el-button size="small" @click="addSku">新增</el-button>
+    </div>
+    
+    <vxe-table border size="mini" show-header-overflow show-overflow :row-config="{isHover: true}" :data="data">
+      <vxe-column type="seq" title="序号" width="60"></vxe-column>
+      <vxe-column field="skuId" title="编码" width="120"></vxe-column>
+      <vxe-column field="name" title="物料名称"></vxe-column>
+      <vxe-column field="qty" title="数量" width="120">
+        <template #default="{row}">
+          <vxe-input v-model="row.qty" size="mini" min="1" type="integer" @input="qtyChange(row)"></vxe-input>
+        </template>
+      </vxe-column>
+      <vxe-column resizable fixed="right" title="操作" width="120">
+        <template #default="scope">
+          <el-button type="text" @click="del(scope)">删除</el-button>
+        </template>
+      </vxe-column>
+    </vxe-table>
+    <product-sku-modal ref="product" :mulit="true" @confirm="confirmProduct" />
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+@Component({components:{}})
+export default class ItemSku extends Vue {
+  data:Array<any> = []
+  
+  confirmProduct(data:Array<any>){
+    for(const item of data) {
+      let obj:any = {}
+      obj.name = item.skuTitle;
+      obj.skuId = item.id;
+      obj.qty = 1;
+      this.data.push(obj);
+    }
+    this.$emit('onChange',this.data)
+  }
+  del(data:any) {
+    this.data.splice(data.rowIndex,1)
+    this.$emit('onChange',this.data)
+    console.log(this.data)
+  }
+  qtyChange(row:any) {
+    if(Number(row.qty) < 1) {
+      this.$message('数量不能小于0')
+      row.qty = 1
+      this.$forceUpdate()
+    }
+    row.qty = Number(row.qty)
+    this.$emit('onChange',this.data)
+  }
+  addSku(){
+    (this.$refs.product as any).setShow(true)
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.items{
+  width: 100%;
+  .tool{
+    padding-bottom: 8px;
+    display: flex;
+    justify-content: flex-end;
+  }
+}
+</style>

+ 42 - 0
src/views/oms/WMSProduct/component/tagState.vue

@@ -0,0 +1,42 @@
+<template>
+  <el-tag type="success" v-if="value == 'FINISH'" size="mini">订单完成</el-tag>
+  <el-tag type="warning" v-else-if="value == 'CANCEL'" size="mini">订单取消</el-tag>
+  <el-tag type="info" v-else-if="value == 'WAIT_CONFIRM'" size="mini">创建成功,等待入库确认</el-tag>
+  <el-tag type="danger" v-else-if="value == 'FAILURE'" size="mini">订单失败</el-tag>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+@Component
+export default class TagState extends Vue {
+  value:any=null;
+
+  @Prop()
+  propConfig: any
+
+  @Prop()
+  propValue?:any
+
+  @Prop()
+  parentValue:any
+
+  @Watch('propValue')
+  propValueChange(v:any){
+    this.setValue(v);
+  }
+
+  mounted(){
+    if(this.propValue){
+      this.setValue(this.propValue)
+    }
+  }
+
+  setValue(v:any){
+    this.value = v;
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 335 - 0
src/views/oms/WMSProduct/index.vue

@@ -0,0 +1,335 @@
+<template>
+  <div class="wmsProduct">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList" 
+    @resert="queryList" @search="queryList" @clickHandle="clickHandle" @detail="detail" />
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import TagState from "./component/tagState.vue";
+import ItemSku from "./component/ItemSku.vue";
+import {query,WMSCreateEntryOrder} from '@/api/WMSInstoreBill'
+@Component({components:{}})
+export default class WMSProduct extends Vue {
+  load=false;
+  time:any;
+  timeNum = 0;
+  isSearch=false;
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    search:{
+      attr:{
+        size:'small'
+      },
+      columns:[
+        [{
+          label:'入库方式',
+          prop:'sendType',
+          span:8,
+          component:'by-select',
+          compConfig:{
+            attr:{
+              clearable:true,
+              data: [{
+                label:'越库出库',
+                value:'YKCK'
+              },{
+                label:'B2B出库',
+                value:'B2BCK'
+              },{
+                label:'B2C出库',
+                value:'B2CCK'
+              }]
+            }
+          }
+        },
+        {
+          label:'状态',
+          prop:'status',
+          span:8,
+          component:'by-select',
+          compConfig:{
+            attr:{
+              clearable:true,
+              data:[{
+                value:'WAIT_CONFIRM',
+                label:'创建成功,等待入库确认'
+              },{
+                value:'FAILURE',
+                label:'订单失败'
+              },{
+                value:'FINISH',
+                label:'订单完成'
+              },{
+                value:'CANCEL',
+                label:'订单取消'
+              }]
+            }
+          }
+        }],
+      ]
+    },
+    tool:{
+      tools:{
+        // add:true,
+        // delete:true,
+        search:true,
+        refresh:true
+      },
+      customTools:[
+        { name: '商品入库', icon: 'el-icon-plus', event:{
+          click:() => {
+            this.showModal()
+          }
+        }}
+      ]
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        align:'center',
+        // checkbox:true
+      },
+      columns:[{
+        title:'WMS同步单号',
+        field:'syncId'
+      },
+      {
+        title:'WMS仓库编号',
+        field:'warehouseCode'
+      },
+      {
+        title:'入库类型',
+        field:'sendType',
+      },
+      {
+        title:'状态',
+        field:'status',
+        width:150,
+        component:TagState
+      },
+      {
+        title:'是否全部入库',
+        field:'isAllIn',
+        component: 'textChange',
+        compConfig:{
+          attr:{
+            data:[{
+              label:'全部入库',
+              value:1,
+              backgroundColor:'#f0f9eb',
+              color:'#67c23a'
+            },{
+              label:'部分入库',
+              value:0,
+              backgroundColor:'#fef0f0',
+              color:'#f56c6c'
+            }]
+          }
+        }
+      },
+      {
+        title:'订单完成时间',
+        field:'orderConfirmTime',
+        width:150
+      },
+      // {
+      //   title:'操作',
+      //   action:true,
+      //   width:100,
+      //   plugins:[{
+      //     name:'删除',
+      //     event:{
+      //       click:(item:any) => {
+      //         this.del(item);
+      //       }
+      //     }
+      //   }]
+      // }
+    ]
+    },
+    modal:{
+      tool:{
+        tools:{
+          return:true,
+          add:true
+        }
+      },
+      form:{
+        attr:{
+          width:'1000px',
+          size:'small',
+          labelWidth:'130px',
+          rules:{
+            partnerId:[
+              {required: true, message: '请选择货主', trigger: 'change'}
+            ],
+            sendType:[
+              {required: true, message: '请选择所属平台', trigger: 'change'}
+            ],
+            items:[
+              {type: 'array',required: true, message: '请选择物料', trigger: 'change'},
+            ]
+          }
+        },
+        columns:[
+          [{
+            label:'货主',
+            prop:'partnerId',
+            component:'by-select',
+            compConfig:{
+              request:{
+                url:'/omsOrder/omsPartner/queryAll',
+                method:'get'
+              },
+              attr:{
+                clearable:true,
+                defaultIndex:0,
+                label:'wmsMemberName',
+                value:'id'
+              }
+            }
+          },{
+            label:'入库方式',
+            prop:'sendType',
+            component:'by-select',
+            compConfig:{
+              attr:{
+                clearable:true,
+                data: [{
+                  label:'越库出库',
+                  value:'YKCK'
+                },{
+                  label:'B2B出库',
+                  value:'B2BCK'
+                },{
+                  label:'B2C出库',
+                  value:'B2CCK'
+                }]
+              }
+            }
+          }],
+          [{
+            label:'物料',
+            prop:'items',
+            component:ItemSku
+          }],
+          [{
+            label:'备注',
+            prop:'remark',
+            component:'by-input',
+            compConfig:{
+              attr:{
+                type:'textarea'
+              }
+            }
+          }]
+        ]
+      }
+    }
+  }
+  mounted(){
+    this.$nextTick(()=>{
+      this.getList()
+    })
+  }
+  //分页
+  pagination(){
+    if(this.isSearch){
+      this.queryList();
+    }else{
+      this.getList()
+    }
+  }
+  //列表请求(只有分页,不包含搜素条件)
+  getList(){
+    if(!this.$refs.view){
+      if(this.timeNum > 5){
+        return
+      }
+      setTimeout(()=>{
+        this.getList()
+      },500) 
+      this.timeNum ++;
+      return
+    }
+    this.isSearch = false;
+    let data = (this.$refs.view as any).getPage();
+    this.requestList(data);
+  }
+  //列表请求(包含分页和搜素条件)
+  queryList(){
+    this.isSearch = true;
+    let data = (this.$refs.view as any).getQuery();
+    this.requestList(data);
+  }
+  requestList(data:any){
+    this.load = true;
+    query(data).then((res:any) => {
+      this.load = false;
+      (this.$refs.view as any).setTableValue(res.data.records);
+      let page = {
+        pageNo: res.data.current, //当前页
+        pageSize: res.data.size, //每页条数
+        total: res.data.total //总条数
+      };
+      (this.$refs.view as any).setPage(page)
+
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+  //表单工具栏按钮事件
+  modalHandle(n:string){
+    if(n == 'onAdd'){
+      (this.$refs.view as any).getFormValidate(this.addInStore)
+    }
+  }
+  //表格工具栏按钮事件
+  clickHandle(n:string){ 
+    if(n == 'onAdd'){
+      this.config.modal.tool.tools.add = true;
+      delete this.config.modal.tool.tools.save;
+      (this.$refs.view as any).initFormTool();
+    }
+  }
+  showModal() {
+    (this.$refs.view as any).modalShow = true
+  }
+  //添加
+  addInStore(){
+    let value = (this.$refs.view as any).getFormValue();
+    if(value){
+      this.load = true;
+      WMSCreateEntryOrder(value).then((res:any)=>{
+        this.load = false;
+        this.$message({
+          message:res.msg,
+          type:'success'
+        });
+        (this.$refs.view as any).closeModal();
+        this.getList();
+      }).catch(()=>{
+        this.load = false;
+      })
+    }
+  }
+  //点击详情
+  detail(){
+    this.config.modal.tool.tools.save = true;
+    delete this.config.modal.tool.tools.add;
+    (this.$refs.view as any).initFormTool();
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.wmsProduct{
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 0 - 1
src/views/oms/sourceShop/components/tag.vue

@@ -2,7 +2,6 @@
   <el-tag type="success" v-if="value == 'Authorized'" size="mini">已授权</el-tag>
   <el-tag type="danger" v-else-if="value == 'Unauthorized'" size="mini">未授权</el-tag>
   <el-tag type="info" v-else-if="value == 'Expired'" size="mini">已过期</el-tag>
-  <span v-else></span>
 </template>
 
 <script lang="ts">

+ 18 - 15
vue.config.js

@@ -10,10 +10,12 @@ const name = process.env.VUE_APP_TITLE || 'SaaS协同平台' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 
-const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
+// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
 
 module.exports = defineConfig({
-  transpileDependencies: true,
+  transpileDependencies: [ // 转换非es6语法插件
+    '@riophae/vue-treeselect'
+  ],
   // 部署生产环境和开发环境下的URL。
   // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
   // 例如 https://www.benyuntech.com/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.benyuntech.com/admin/,则设置 baseUrl 为 /admin/。
@@ -33,15 +35,16 @@ module.exports = defineConfig({
     open: true,
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
-      [process.env.VUE_APP_BASE_API]: {
+      // [process.env.VUE_APP_BASE_API]: {
+      '/prod-api':{
         ws:false,
-        // target: `http://192.168.1.251:8080`,
-        target: `http://192.168.2.202:8080`,
+        target: `http://192.168.2.32`,
+        // target: `http://192.168.2.202:8080`,
         // target: `http://192.168.1.134:8080`,
         changeOrigin: true,
-        pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
-        }
+        // pathRewrite: {
+        //   ['^' + process.env.VUE_APP_BASE_API]: ''
+        // }
       }
     }
   },
@@ -59,9 +62,9 @@ module.exports = defineConfig({
         '@': resolve('src')
       }
     },
-    entry: {
-      'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js'
-    },
+    // entry: {
+    //   'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js'
+    // },
     plugins: [
       // new CompressionPlugin({
       //   // cache: false,                   // 不启用文件缓存
@@ -71,10 +74,10 @@ module.exports = defineConfig({
       //   minRatio: 0.8                   // 压缩率小于1才会压缩
       // }),
       new NodePolyfillPlugin(),
-      new MonacoWebpackPlugin({
-        languages: ["javascript","css","html","json","java"],
-        features: ["coreCommands", "find", "format", "folding", 'smartSelect', 'snippets', 'suggest', 'hover']
-      }),
+      // new MonacoWebpackPlugin({
+      //   languages: ["javascript","css","html","json","java"],
+      //   features: ["coreCommands", "find", "format", "folding", 'smartSelect', 'snippets', 'suggest', 'hover']
+      // }),
     ],
   },
   chainWebpack(config) {

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov