Ver código fonte

Merge remote-tracking branch 'origin/master'

sh4wmoo 2 anos atrás
pai
commit
a5181cf260

+ 1 - 1
src/components/business/select-magnifier/select-magnifier.vue

@@ -462,7 +462,7 @@ export default {
       }
       // 只要有值就不打开
       if (!this.selectedValue) {
-        this.magnifierClick();
+        // this.magnifierClick();
       }
     },
     /**

+ 12 - 0
src/config/index.js

@@ -4,6 +4,18 @@ export default {
    */
   title: '东科MES系统',
   /**
+   * @desc   : 登录界面的副标题
+   * @author : 周兴
+   * @date   : 2023/7/17 17:08
+   */
+  loginSubTitle:'东科智能业务运行支撑系统·厂商云',
+  /**
+   * @desc   : 权限
+   * @author : 周兴
+   * @date   : 2023/7/17 17:09
+   */
+  loginDkRight:'©2021 东科软件 All rights reserved',
+  /**
    * @description token在Cookie中存储的天数,默认1天
    */
   cookieExpires: 1,

+ 1 - 0
src/locale/lang/zh-CN.js

@@ -1306,6 +1306,7 @@ export const messages = {
   W_179: '当前存在开摸损数据,请替换后重新操作',
   W_180: '未选择产品型号或模具条码',
   W_181: '操作失败,原因:{param}',
+  W_182: '暂无触屏工控机功能权限,请联系管理员',
   E_001: '系统出现异常,请联系管理员。',
   Q_001: '当前页面的数据有过更改,请确认需要保存吗?',
   Q_002: '确定要进行{param}操作吗?',

+ 0 - 11
src/main.js

@@ -36,17 +36,6 @@ if (fontSize === '14') {
 } else {
   import  ('./font-less/font-12.less')
 }
-//手机端的字体的样式全局文件
-let fontAppSize = localRead('fontAppSize');
-// console.log('fontAppSize',fontAppSize)
-// 根据字体读取不同的字体样式文件
-if (fontAppSize === 'large') {
-  import  ('./font-less/font-large.less')
-} else if(fontAppSize === 'middle'){
-  import  ('./font-less/font-middle.less')
-}  else {
-  import ('./font-less/font-normal.less')
-}
 // 实际打包时应该不引入mock
 /* eslint-disable */
 //iview 4.0

+ 13 - 4
src/view/login/login-form.vue

@@ -24,7 +24,7 @@
       </Input>
     </FormItem>
     <Checkbox v-model="rememberMe">&nbsp;&nbsp;记住工厂/用户名</Checkbox>
-    <FormItem style="padding-top: 8px">
+    <FormItem style="padding-top: 4px;margin-bottom: 10px !important;">
       <Button class="login-class" @click="handleSubmit" size="large" type="primary" long :disabled="loading">
         <span v-if="!loading">{{ $t('login') }}</span>
         <span v-else>loading...</span>
@@ -195,9 +195,9 @@ export default {
 
 
 /deep/ .ivu-input {
-  border: 1px solid #1B365D;
-  border-radius: 8px !important;
-  font-size: 15px !important;
+  border-radius: 4px !important;
+  height: 32px !important;
+  font-size: 14px !important;
   color: #1B365D !important;
 }
 
@@ -213,4 +213,13 @@ export default {
   line-height: 40px;
 }
 
+/deep/.ivu-form-item-error-tip{
+  padding-top: 4px !important;
+}
+
+/deep/.ivu-input-wrapper-large .ivu-input-prefix i{
+  font-size: 16px;
+  line-height: 32px;
+}
+
 </style>

+ 101 - 101
src/view/login/login.less

@@ -7,113 +7,113 @@
   float: left;
 }
 .login{
-    width: 100%;
-    height: 100%;
-    background: #f0f2f5;
-    position: fixed;
-    min-height: 100%;
-    background-image: url('../../assets/images/background.png') ;
-    background-repeat: no-repeat;
-    //background-size: cover;
-    background-size: 100% 100%;
-    background-position: center;
-    min-width: 1220px;
-    &-con{
+  width: 100%;
+  height: 100%;
+  background: #f0f2f5;
+  position: fixed;
+  min-height: 100%;
+  background-image: url('../../assets/images/background.png') ;
+  background-repeat: no-repeat;
+  //background-size: cover;
+  background-size: 100% 100%;
+  background-position: center;
+  min-width: 1220px;
+  &-con{
 
-        &-header{
-            font-size: 16px;
-            font-weight: 300;
-            text-align: center;
-            padding: 30px 0;
-        }
-        .form-con{
-          position: absolute;
-          //top: 23vh;
-          //left: 57vw;
-          //width: 32vw;
-          //height: 62vh;
-          //top: 20%;
-          //left: 38%;
-          //width: 30%;
-          //height: 55%;
-          top:50%;
-          left: 50%;
-          width: 500px;
-          height: 480px;
-          margin-top: -250px;
-          margin-left: -230px;
-          //min-width: 460px;
-          //min-height: 480px;
-          background: linear-gradient(181.51deg, rgba(255, 255, 255, 0.5) -0.89%, rgba(255, 255, 255, 0.5) 41.59%);
-          mix-blend-mode: normal;
-          backdrop-filter: blur(50px);
-          /* Note: backdrop-filter has minimal browser support */
-          border-radius: 15px;
-
-          .hj-logo{
-            padding-top: 30px;
-            display: flex;
-            justify-content: center;
-          }
-          .tab-class{
-            width: 60%;
-            margin-left: 20%;
-            padding-top: 15px;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
+    &-header{
+      font-size: 16px;
+      font-weight: 300;
+      text-align: center;
+      padding: 30px 0;
+    }
+    .form-con{
+      position: absolute;
+      //top: 23vh;
+      //left: 57vw;
+      //width: 32vw;
+      //height: 62vh;
+      //top: 20%;
+      //left: 38%;
+      //width: 30%;
+      //height: 55%;
+      top:50%;
+      left: 50%;
+      width: 400px;
+      height: 380px;
+      margin-top: -250px;
+      margin-left: -230px;
+      //min-width: 460px;
+      //min-height: 480px;
+      background: linear-gradient(181.51deg, rgba(255, 255, 255, 0.5) -0.89%, rgba(255, 255, 255, 0.5) 41.59%);
+      mix-blend-mode: normal;
+      backdrop-filter: blur(50px);
+      /* Note: backdrop-filter has minimal browser support */
+      border-radius: 5px;
 
-            .btn-class{
-              cursor: pointer;
-              font-weight: 500;
-              font-size: 26px;
-              line-height: 40px;
-              display: flex;
-              align-items: center;
-              color: #1B365D;
-            }
-            .btn-active-class{
-              cursor: pointer;
-              font-weight: 500;
-              text-decoration: underline;
-              text-underline-offset: 10px;
-              font-size: 26px;
-              line-height: 40px;
-              display: flex;
-              align-items: center;
-              color: #1B365D;
-            }
-          }
-          .content{
-            padding-top: 18px;
-            width: 66%;
-            margin-left: 17%;
-            justify-content: center;
-            align-items: center;
-          }
-          .scan{
-            //padding-top: 6%;
-            width: 70%;
-            height: 296px;
-            margin-left: 15%;
-            justify-content: center;
-            align-items: center;
-            display: flex;
+      .hj-logo{
+        padding-top: 20px;
+        display: flex;
+        justify-content: center;
+      }
+      .tab-class{
+        width: 60%;
+        margin-left: 20%;
+        padding-top: 15px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
 
-            .scan-image{
-              width: 150px;
-              height: 150px;
-              border: 1px solid #1B365D;
-              border-radius: 8px;
-            }
-          }
+        .btn-class{
+          cursor: pointer;
+          font-weight: 500;
+          font-size: 20px;
+          line-height: 40px;
+          display: flex;
+          align-items: center;
+          color: #1B365D;
         }
-        .login-tip{
-            font-size: 16px;
-            text-align: center;
-            color: #c3c3c3;
+        .btn-active-class{
+          cursor: pointer;
+          font-weight: 500;
+          text-decoration: underline;
+          text-underline-offset: 10px;
+          font-size: 20px;
+          line-height: 40px;
+          display: flex;
+          align-items: center;
+          color: #1B365D;
         }
+      }
+      .content{
+        padding-top: 25px;
+        width: 66%;
+        margin-left: 17%;
+        justify-content: center;
+        align-items: center;
+      }
+      .scan{
+        //padding-top: 6%;
+        width: 70%;
+        height: 296px;
+        margin-left: 15%;
+        justify-content: center;
+        align-items: center;
+        display: flex;
+
+        .scan-image{
+          width: 150px;
+          height: 150px;
+          border: 1px solid #1B365D;
+          border-radius: 8px;
+        }
+      }
+    }
+    .login-tip{
+      font-size: 16px;
+      text-align: center;
+      color: #c3c3c3;
     }
+  }
 }
 
 //.title{

+ 19 - 8
src/view/login/login.vue

@@ -35,12 +35,12 @@
           </div>
         </div>
         <div style="width: 90%;display: flex;justify-content: end">
-          东科智能业务运行支撑系统·厂商云
-        </div>
-        <div class="tab-class">
-          <div :class="active == 0? 'btn-active-class':'btn-class' " id="user" @click="changeMode">密码登录</div>
-          <div :class="active == 1? 'btn-active-class':'btn-class' " id="scan" @click="changeMode">扫码登录</div>
+          {{$t('loginSubTitle') }}
         </div>
+<!--        <div class="tab-class">-->
+<!--          <div :class="active == 0? 'btn-active-class':'btn-class' " id="user" @click="changeMode">密码登录</div>-->
+<!--          <div :class="active == 1? 'btn-active-class':'btn-class' " id="scan" @click="changeMode">扫码登录</div>-->
+<!--        </div>-->
         <div v-show="active == 0" class="content">
           <login-form @on-success-valid="handleSubmit" :loading="loading"></login-form>
         </div>
@@ -50,7 +50,7 @@
           <!--          <div style="padding-top: 5px"><b>只支持集团企微扫描登录</b></div>-->
         </div>
 
-        <div style="display: flex;justify-content: end;width: 98%">
+        <div style="display: flex !important;justify-content: end;width: 98%">
           ©2021 东科软件 All rights reserved
         </div>
         <!--                <Card>-->
@@ -104,7 +104,8 @@ export default {
   methods: {
     ...mapActions([
       'handleLogin',
-      'afterLogin'
+      'afterLogin',
+      'handleLogOut'
     ]),
     /**
      * @desc   : 切换登录页签
@@ -138,7 +139,11 @@ export default {
       this.handleLogin({ftyCode, userCode, userPwd, appCode}).then(res => {
         this.$Message.destroy()
         if (res.code === 200) {
-          if (res.data) {
+          if (!res.data.menu || !res.data.menu.length) {
+            //没有权限
+            this.$Message.warning(this.$t('W_182'))
+            this.handleLogOut()
+          } else if (res.data) {
             this.afterLogin(res.data)
           }
           this.$router.push({
@@ -229,5 +234,11 @@ export default {
   bottom: 50px;
 }
 
+/deep/.ivu-btn-primary{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
 
 </style>

+ 32 - 3
src/view/pdm/data-collection/check-touch-add.vue

@@ -335,11 +335,11 @@
 
           <!--画布-->
           <DkPanel id="name3" prop="productGraph">
-            <DkRow slot="content" style="width:100%;height: 500px;overflow: auto">
+            <DkRow slot="content" style="width:1500px;height: 500px;overflow: auto;margin-left: calc(50% - 750px);">
               <Layout>
                 <!--   中间流程图  -->
                 <Content>
-                  <div id="container" ref="container" style="width:100%;height:100%"/>
+                  <div id="container" ref="container" style="width:1500px;height:500px"/>
                 </Content>
               </Layout>
             </DkRow>
@@ -564,6 +564,8 @@ export default {
      * @date   : 2023/6/7 15:42
      */
     saveData() {
+      //保存时清除位置视图选中数据
+      this.currentImageRow = []
       return this.excute(this.$service.collectService, '/', this.params);
     },
     /**
@@ -1172,6 +1174,34 @@ export default {
           }
         }
         this.imageColumnList = this.fileList[0].productViewPlaceVOList
+
+        // 直接点出选中节点 模拟鼠标点击不好使
+        // let _this = this
+        // //找到节点并点击
+        // setTimeout(()=>{
+        //   // console.log(document.getElementsByTagName('g'))
+        //   // [3].dataset.cellId
+        //   // data-cell-id="5837fa06-c5f0-4c6e-ba64-86f0cfaf7101"
+        //   for (let it of document.getElementsByTagName('g')) {
+        //     // console.log(it, it.dataset?.cellId)
+        //     if (it.dataset?.cellId) {
+        //       // it.click()
+        //
+        //     }
+        //   }
+        //
+        //   //store.data.position
+        //   if (this.nowNode) {
+        //     console.log(this.nowNode)
+        //     var evt = document.createEvent("MouseEvents");
+        //     evt.initMouseEvent("click", true, true, window, 0, 0, 0,
+        //       900, 500, false, false, false, false, 0, null);
+        //     console.log(evt)
+        //     document.body.dispatchEvent(evt);
+        //     document.getElementById('container').dispatchEvent(evt);
+        //     //document.getElementById('container') 900 500 _this.nowNode.store.data.position.x, _this.nowNode.store.data.position.y,
+        //   }
+        // }, 1000)
       }
     },
     /**
@@ -1279,7 +1309,6 @@ export default {
       this.formData_Defect.pdtPlaceId = this.viewPlaceId
       this.formData_Defect.pdtPlaceCodeName = this.viewPlaceName
       this.viewModal = false
-      this.currentImageRow = []
     },
     /**
      * @desc   : 全屏

+ 17 - 10
src/view/pdm/data-collection/mixin/check.js

@@ -230,6 +230,10 @@ export const checkMixin = {
     onBarCode() {
       setTimeout(()=>{
         if (this.formData.barCode) {
+          if (this.loading) {
+            return
+          }
+          this.loading = true
           //触屏,清除缺陷部分
           if (this.clearBlameAllList) {
             this.clearBlameAllList()
@@ -264,6 +268,7 @@ export const checkMixin = {
             }
             // 重写表格高度
             this.resizeTable();
+            this.loading = false
           })
         }
       },200)
@@ -841,17 +846,19 @@ export const checkMixin = {
      *   @author : 寇珊珊
      */
     getDefectPlace() {
-      let params = {
-        modelId: this.modelId,
-        ftyId: this.formData.ftyId,
-      }
-      this.excute(this.$service.collectService, this.$service.collectService.placeListBy, params).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.defectPlaceList = res.data
-        } else {
-          this.$Message.warning(res.message)
+      if (this.modelId && !this.defectPlaceList.length) {
+        let params = {
+          modelId: this.modelId,
+          ftyId: this.formData.ftyId,
         }
-      })
+        this.excute(this.$service.collectService, this.$service.collectService.placeListBy, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.defectPlaceList = res.data
+          } else {
+            this.$Message.warning(res.message)
+          }
+        })
+      }
     },
     /**
      *   @desc   : 保存缺陷位置