loulijun2021
2023-04-28 9528fd07344434c99aebd03e386bfe72a57f0c02
1.提交
已添加1个文件
已修改9个文件
224 ■■■■ 文件已修改
src/api/scgl.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/icons/svg/zhkb.svg 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/permission.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kb/ckgl.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kb/zhkb.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kb/zhkbc.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/gd.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/scgl.js
@@ -394,3 +394,10 @@
  })
}
// MES工单新增、获取工单号
export function AddMesOrderCodeSearch() {
  return request({
    url: 'ProductionManagement/AddMesOrderCodeSearch',
    method: 'post'
  })
}
src/icons/svg/zhkb.svg
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682562180452" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2688" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M128 256a42.666667 42.666667 0 0 1 42.666667-42.666667h682.666666a42.666667 42.666667 0 0 1 42.666667 42.666667v469.333333a42.666667 42.666667 0 0 1-42.666667 42.666667H170.666667a42.666667 42.666667 0 0 1-42.666667-42.666667V256z m85.333333 42.666667v384h597.333334V298.666667H213.333333z" fill="#157b7e" p-id="2689"></path><path d="M485.802667 712.981333a42.666667 42.666667 0 0 1 52.394666 0l225.664 175.530667-52.373333 67.370667L512 800.725333l-199.466667 155.157334-52.416-67.370667 225.706667-175.530667zM554.666667 85.333333v170.666667h-85.333334V85.333333h85.333334zM448 256v106.666667a64 64 0 1 0 128 0v-106.666667h85.333333v106.666667a149.333333 149.333333 0 1 1-298.666666 0v-106.666667h85.333333z" fill="#157b7e" p-id="2690"></path></svg>
src/layout/components/Sidebar/index.vue
@@ -1,7 +1,7 @@
<template>
  <div :class="{'has-logo':showLogo}">
    <logo v-if="showLogo" :collapse="isCollapse" />
    <logo v-if="showLogo" :collapse="isCollapse"/>
    <div
      v-if="$store.state.app.sidebar.opened&&!$store.state.settings.menuIsHorizontal"
@@ -74,6 +74,17 @@
    routes() {
      return this.$router.options.routes
    },
    // activeMenu() {
    //   const route = this.$route
    //   const { meta, path } = route
    //   // if set path, the sidebar will highlight the path you set
    //   removeCookie('ruleCode')
    //   setCookie('ruleCode', meta.code)// å°†ç¼–码规则code存到cookie里面
    //   if (meta.activeMenu) {
    //     return meta.activeMenu
    //   }
    //   return path
    // },
    activeMenu() {
      const route = this.$route
      const { meta, path } = route
@@ -83,6 +94,26 @@
      if (meta.activeMenu) {
        return meta.activeMenu
      }
      if (path.indexOf('kanbanManager') !== -1) { // å½“点击智慧看板的时候
        const url = this.$router.resolve({
          path
          // query: { id: 123 }
        })
        const t = url.href.split('/')
        if (t[2] === 'jgcj') {
          window.open('#/zhkbc?code=10101', '_blank')
        } else if (t[2] === 'zscj') {
          window.open('#/zhkbc?code=10102', '_blank')
        } else if (t[2] === 'zpcj') {
          window.open('#/zhkbc?code=10103', '_blank')
        } else {
          window.open('#/' + t[2], '_blank')
        }
      }
      return path
    },
    showLogo() {
src/router/index.js
@@ -651,6 +651,45 @@
        meta: { code: '1061', title: '存货档案', icon: '', keepAlive: true }
      }
    ]
  },
  {
    path: '/kanbanManager',
    component: Layout,
    redirect: '/kanbanManager/zhkb',
    name: '智慧看板',
    code: '2023',
    meta: { title: '智慧看板', icon: 'zhkb' },
    alwaysShow: true,
    children: [
      {
        path: 'zhkb',
        name: 'ZHKBCancel',
        component: () => import('@/views/kb/zhkb'),
        meta: { title: '综合看板', icon: '', keepAlive: true }
      }, {
        path: 'jgcj',
        name: 'cgddCancel',
        component: () => import('@/views/kb/zhkbc'),
        meta: { title: '金工车间', icon: '', keepAlive: true }
      },{
        path: 'zscj',
        name: 'cgddCancel',
        component: () => import('@/views/kb/zhkbc'),
        meta: { title: '注塑车间', icon: '', keepAlive: true }
      },{
        path: 'zpcj',
        name: 'cgddCancel',
        component: () => import('@/views/kb/zhkbc'),
        meta: { title: '装配车间', icon: '', keepAlive: true }
      },
      {
        path: 'ckgl',
        name: 'ckglCancel',
        component: () => import('@/views/kb/ckgl'),
        meta: { title: '仓库管理', icon: '', keepAlive: true }
      }
    ]
  }
  // {
src/store/modules/permission.js
@@ -108,6 +108,7 @@
            return i
          }
        })
        newRoutes.push({ path: '*', redirect: '/404', hidden: true })
      } else {
        newRoutes = getAsyncRoutes(asyncRoutes, menu)
      }
src/views/kb/ckgl.vue
@@ -299,7 +299,7 @@
          <div style="height: 470px;">
            <div class="smallTitle">
              <svg-icon icon-class="ph" class="svg_class" />
              åŠæˆå“ã€äº§å“åº“存量排行Top5
              åŠæˆå“ã€äº§å“åº“存量排行Top3
            </div>
            <div class="lineContent horn" style="height: 435px">
              <div id="bar03" style="width: 100%;height:100%; " />
@@ -309,7 +309,7 @@
          <div style="height: 470px;">
            <div class="smallTitle">
              <svg-icon icon-class="ph" class="svg_class" />
              åŽŸææ–™åº“å­˜é‡æŽ’è¡ŒTop5
              åŽŸææ–™åº“å­˜é‡æŽ’è¡ŒTop3
            </div>
            <div class="lineContent horn" style="height: 435px">
              <div id="bar04" style="width: 100%;height:100%;" />
src/views/kb/zhkb.vue
@@ -151,12 +151,12 @@
                <el-table-column
                  prop="wo_code"
                  label="加工单号"
                  width="190"
                  width="214"
                />
                <el-table-column
                  prop="partname"
                  label="产品名称"
                  width="350"
                  width="330"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
@@ -420,27 +420,54 @@
    },
    // äº§çº¿åŠ å·¥ä»»åŠ¡  å·¦ä¸‹æ•°æ®
    getLeftBottomData() {
      let startValue = 0 // åˆå§‹å€¼
      const scale = 10// åˆ»åº¦
      // let startValue = 0 // åˆå§‹å€¼
      // const scale = 10// åˆ»åº¦
      //
      // LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
      //   this.tableDataLeftBottomTemp = res.data
      //   this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
      //
      //   const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// éœ€è¦å¾ªçŽ¯çš„æ¬¡æ•°
      //   let nowLoop = 0// å½“前循环的次数
      //
      //   const timer = setInterval(() => {
      //     startValue = startValue + scale
      //     this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
      //     if (nowLoop === loop) {
      //       clearInterval(timer)
      //       this.getLeftBottomData()
      //     }
      //
      //     nowLoop++
      //   }, 1000 * 10)
      // })
      LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
        this.tableDataLeftBottomTemp = res.data
        this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
        this.tableDataLeftBottom = res.data
        const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// éœ€è¦å¾ªçŽ¯çš„æ¬¡æ•°
        let nowLoop = 0// å½“前循环的次数
        const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper
        // æ‹¿åˆ°å…ƒç´ åŽï¼Œå¯¹å…ƒç´ è¿›è¡Œå®šæ—¶å¢žåŠ è·ç¦»é¡¶éƒ¨è·ç¦»ï¼Œå®žçŽ°æ»šåŠ¨æ•ˆæžœ(此配置为每100毫秒移动1像素)
        const aaa = setInterval(() => {
          // å…ƒç´ è‡ªå¢žè·ç¦»é¡¶éƒ¨1像素
          divData.scrollTop += 1
          // divData.scrollTop += divData.scrollHeight / this.tableData.length
          // åˆ¤æ–­å…ƒç´ æ˜¯å¦æ»šåŠ¨åˆ°åº•éƒ¨(可视高度+距离顶部=整个高度)
          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
            // é‡ç½®table距离顶部距离
            divData.scrollTop = 0
            LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
              this.tableDataLeftBottom = res.data
        const timer = setInterval(() => {
          startValue = startValue + scale
          this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
          if (nowLoop === loop) {
            clearInterval(timer)
            this.getLeftBottomData()
              if (this.tableDataLeftBottom.length > 10) {
                clearInterval(aaa)
                this.getLeftBottomData()
              }
            })
          }
          nowLoop++
        }, 1000 * 10)
        }, this.tableDataLeftBottom.length <= 10 ? 1000 * 5 : 100)
      })
    },
    getEcharts() {
@@ -622,6 +649,10 @@
  border-radius: 50%;
}
::v-deep .el-table__body-wrapper{
  overflow: hidden !important;
}
</style>
<!--星空-->
src/views/kb/zhkbc.vue
@@ -151,12 +151,12 @@
                <el-table-column
                  prop="wo_code"
                  label="加工单号"
                  width="190"
                  width="280"
                />
                <el-table-column
                  prop="partname"
                  label="产品名称"
                  width="350"
                  width="260"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
@@ -399,27 +399,54 @@
    },
    // äº§çº¿åŠ å·¥ä»»åŠ¡  å·¦ä¸‹æ•°æ®
    getLeftBottomData() {
      let startValue = 0 // åˆå§‹å€¼
      const scale = 10// åˆ»åº¦
      // let startValue = 0 // åˆå§‹å€¼
      // const scale = 10// åˆ»åº¦
      //
      // LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
      //   this.tableDataLeftBottomTemp = res.data
      //   this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
      //
      //   const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// éœ€è¦å¾ªçŽ¯çš„æ¬¡æ•°
      //   let nowLoop = 0// å½“前循环的次数
      //
      //   const timer = setInterval(() => {
      //     startValue = startValue + scale
      //     this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
      //     if (nowLoop === loop) {
      //       clearInterval(timer)
      //       this.getLeftBottomData()
      //     }
      //
      //     nowLoop++
      //   }, 1000 * 10)
      // })
      LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
        this.tableDataLeftBottomTemp = res.data
        this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
        this.tableDataLeftBottom = res.data
        // this.number2 = this.tableData.length
        const loop = Math.floor(this.tableDataLeftBottomTemp.length / scale)// éœ€è¦å¾ªçŽ¯çš„æ¬¡æ•°
        let nowLoop = 0// å½“前循环的次数
        const timer = setInterval(() => {
          startValue = startValue + scale
          this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
          if (nowLoop === loop) {
            clearInterval(timer)
            this.getLeftBottomData()
        const divData = this.$refs.tableDataLeftBottomRef.bodyWrapper
        // æ‹¿åˆ°å…ƒç´ åŽï¼Œå¯¹å…ƒç´ è¿›è¡Œå®šæ—¶å¢žåŠ è·ç¦»é¡¶éƒ¨è·ç¦»ï¼Œå®žçŽ°æ»šåŠ¨æ•ˆæžœ(此配置为每100毫秒移动1像素)
        const aaa = setInterval(() => {
          // å…ƒç´ è‡ªå¢žè·ç¦»é¡¶éƒ¨1像素
          divData.scrollTop += 1
          // divData.scrollTop += divData.scrollHeight / this.tableData.length
          // åˆ¤æ–­å…ƒç´ æ˜¯å¦æ»šåŠ¨åˆ°åº•éƒ¨(可视高度+距离顶部=整个高度)
          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
            // é‡ç½®table距离顶部距离
            divData.scrollTop = 0
            LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
              this.tableDataLeftBottom = res.data
              // this.number2 = this.tableData.length
              if (this.tableDataLeftBottom.length > 10) {
                clearInterval(aaa)
                this.getLeftBottomData()
              }
            })
          }
          nowLoop++
        }, 1000 * 10)
        }, this.tableDataLeftBottom.length <= 10 ? 1000 * 10 : 100)
      })
    },
    getEcharts() {
@@ -601,6 +628,10 @@
  border-radius: 50%;
}
::v-deep .el-table__body-wrapper{
  overflow: hidden !important;
}
</style>
<!--星空-->
src/views/scgl/gd.vue
@@ -496,7 +496,7 @@
        </el-form-item>
        <el-form-item label="工单编号" prop="mesordercode">
          <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px"/>
          <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px"/>
        </el-form-item>
        <div style="display: flex">
          <el-form-item label="工单类型" prop="mesorderstus">
@@ -1766,6 +1766,7 @@
<script>
import Pagination from '@/components/Pagination'
import {
  AddMesOrderCodeSearch,
  AddUpdateMesOrder,
  ClosedMesOrder,
  DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison, MesBadOrderSearch,
@@ -2142,6 +2143,8 @@
    },
    // æ–°å¢žæŒ‰é’®
    async add(operation) {
      const { data: res } = await AddMesOrderCodeSearch()
      this.dialogForm.mesordercode = res
      this.operation = operation
      this.dialogVisible = true
      this.dialogForm.planstartdate = handleDatetime(new Date())
vue.config.js
@@ -54,7 +54,7 @@
      [process.env.VUE_APP_BASE_API]: {
        // target: 'http://121.196.36.24:8013', // è¯·æ±‚的第三⽅接⼝地址       æœ¬åœ°å¼€å‘服务器
        // target: 'http://192.168.188.180:8001', // è¯·æ±‚的第三⽅接⼝地址   ç¦èŽ±æ³°  ï¼ˆæœªä¸Šäº‘)
        target: 'http://xyfhk5.natappfree.cc', // è¯·æ±‚的第三⽅接⼝地址   ç¦èŽ±æ³°  ï¼ˆä¸Šäº‘)
        target: 'http://xnkeij.natappfree.cc', // è¯·æ±‚的第三⽅接⼝地址   ç¦èŽ±æ³°  ï¼ˆä¸Šäº‘)
        changeOrigin: true, // è¯·æ±‚跨域时,需 é…ç½®æ­¤é¡¹
        pathRewrite: { // è·¯å¾„重写,替换target中的请求地址