Przeglądaj źródła

Merge branch 'dev' of http://39.106.8.246:3003/web/ibms into dev

shaun-sheep 5 lat temu
rodzic
commit
f9895a2696

+ 2 - 1
config/dev.env.js

@@ -5,7 +5,8 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
     BASE_URL: '"http://192.168.20.236"', //测试iframe地址
-    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    SSO_SERVER: '"http://192.168.20.102:8080"', //测试环境
+    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址

+ 2 - 1
config/prod.env.js

@@ -2,7 +2,8 @@
 module.exports = {
     NODE_ENV: '"production"',
     BASE_URL: '"http://192.168.20.236"', //测试iframe地址
-    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    SSO_SERVER: '"http://192.168.20.102:8080"', //测试环境
+    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境

+ 9 - 1
src/components/globaluploader/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-11-28 10:05:28
  * @Info: 
- * @LastEditTime : 2019-12-25 17:48:31
+ * @LastEditTime : 2020-01-03 15:31:04
  -->
 <template>
   <div id="global-uploader">
@@ -11,6 +11,7 @@
     <uploader
         ref="uploader"
         :options="options"
+        :fileStatusText="fileStatusText"
         :autoStart="false"
         @file-added="onFileAdded"
         @file-success="onFileSuccess"
@@ -69,6 +70,13 @@ import { mapGetters, mapMutations } from 'vuex'
 export default {
   data() {
     return {
+      fileStatusText: {
+        success: '成功',
+        error: '失败',
+        uploading: '上传中',
+        paused: '暂停',
+        waiting: '等待'
+      },
       options: {
         target: '/image-service/common/multipart_upload',
         chunkSize: 1*1024*1024,

+ 2 - 1
src/components/model/file/addFolder.vue

@@ -5,12 +5,13 @@
         <el-form
           :model="ruleForm"
           :rules="rules"
+          @submit.native.prevent
           ref="addFolderModel"
           label-width="100px"
           class="demo-ruleForm"
         >
           <el-form-item label="文件夹名称" prop="name">
-            <el-input v-model="ruleForm.name" focus></el-input>
+            <el-input v-model="ruleForm.name"  @keyup.enter.native="addFolder" focus></el-input>
           </el-form-item>
         </el-form>
       </div>

+ 9 - 6
src/components/model/file/floorTable.vue

@@ -21,25 +21,29 @@
       <el-table-column prop="UserName" label="上传人"></el-table-column>
       <el-table-column prop="address" align="center" label="操作" width="240">
         <template slot-scope="scope">
-          <div class="operate" v-show="!scope.row.isDown">
+          <div class="operate" v-show="scope.row.Status == 4">
             <el-button type="primary" size="mini" class="iconfont icon-download" @click="downloadModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-replace" @click="repliaceModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-Log" @click="queryModelLog(scope.row)"></el-button>
           </div>
           <div
             :class="['upLoad-loading']"
-            v-show="scope.row.isDown">
+            v-show="scope.row.Status != 4">
             <div class="progress">
               <el-progress
                 :text-inside="false"
                 :stroke-width="20" :percentage="100"
-                :color="scope.row.Status == 1 || scope.row.Status == 10 || scope.row.Status == 11?'#909399':'#67C23A'"></el-progress>
+                :color="scope.row.Status?'#909399':'#67C23A'"></el-progress>
             </div>
             <div class="progress-right">
-              <span v-show="!scope.row.Status">上传中</span>
+              <span v-if="!scope.row.Status">上传中...</span>
               <span v-show="scope.row.Status == 1">等待检查...</span>
-              <span v-show="scope.row.Status == 10">模型检查中</span>
+              <span v-show="scope.row.Status == 10">模型检查中...</span>
               <span v-show="scope.row.Status == 11">未通过检查</span>
+              <span v-show="scope.row.Status == 2">等待数据导出...</span>
+              <span v-show="scope.row.Status == 21">模型数据导出失败</span>
+              <span v-show="scope.row.Status == 3">处理导出数据中...</span>
+              <span v-show="scope.row.Status == 31">同步到数据中心失败</span>
             </div>
           </div>
         </template>
@@ -102,7 +106,6 @@ export default {
             } else if (precent == 101) {
               // 如过precent == 101 则返回结果为suceess 不能关闭进度条,
               item.precent = 100;
-              item.isDown = false;
               this.$emit("percentFinish");
             }
             return;

+ 2 - 2
src/framework/components/messagesever/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-08-26 15:22:13
  * @Info: 
- * @LastEditTime : 2020-01-03 10:59:36
+ * @LastEditTime : 2020-01-03 11:38:57
  -->
 <template>
   <div class="notification-box" v-clickOutside="handleClose" @click="handleClickRead">
@@ -152,7 +152,7 @@ export default {
     connect() {
       this.client = Stomp.client(MQTT_SERVICE)
       this.client.reconnect_delay = 5000
-      var clientid = `sagaMQ-${this.userInfo.userName}`
+      var clientid = `sagaMQ-${this.userInfo.userName}-${new Date().getTime()}`
       var headers = {
         'login': MQTT_USERNAME,
         'passcode': MQTT_PASSWORD,

+ 1 - 1
src/framework/layout/layout-store.js

@@ -104,7 +104,7 @@ export default {
       return new Promise((resolve, reject) => {
         frameworkApi.loadUserInfo().then(resp => {
           console.log(resp)
-          if (resp.Result == 'success') {
+          if (resp.Result == 'success' && resp.UserId) {
             state.userInfo = {userName: resp.Username, userId: resp.UserId}
             state.userId = resp.UserId
             storage.set('user_name', resp.Username)

+ 2 - 2
src/utils/handsontable/notShow.js

@@ -1002,7 +1002,7 @@ const showTools = {
         ) {
             return {
                 data: item.Path,
-                renderer: text.picType(...{},onlyRead),
+                renderer: text.picType,
                 readOnly: onlyRead
             }
         }
@@ -1097,7 +1097,7 @@ const showTools = {
         ) {
             return {
                 data: item.Path,
-                renderer: text.picType(...{},onlyRead),
+                renderer: text.picType,
                 readOnly: !item.Editable
             }
         }

+ 4 - 5
src/views/model/file/index.vue

@@ -231,13 +231,13 @@ export default {
                * 4: 正常(所有用户可操作:下载、替换、查看历史)
                */
               if (item.Status == 2 || item.Status == 20 || item.Status == 21 || item.Status == 3 || item.Status == 31 || item.Status == 4) {
-                Object.assign(item, { isDown: false, precent: 0 });
+                Object.assign(item, { precent: 0 });
               } else {
-                Object.assign(item, { isDown: true, precent: 100 });
+                Object.assign(item, { precent: 100 });
                 if (this.persentList.length != 0) {
                   this.persentList.forEach(pItem => {
                     if (item.Id == pItem.Id) {
-                      Object.assign(item, { isDown: true, precent: pItem.precent ? pItem.precent : 0 });
+                      Object.assign(item, { precent: pItem.precent ? pItem.precent : 0 });
                     }
                   });
                 }
@@ -303,10 +303,9 @@ export default {
           Id: data.replaceModelItem.Id,
           precent: 0
         });
-        // 修改isdown得值
+        // 修改precent得值
         this.tableData.map(item => {
           if (item.Id == data.replaceModelItem.Id) {
-            item.isDown = true;
             item.precent = 0;
           }
         });