Преглед на файлове

修改织造数为生产数

liling преди 4 месеца
родител
ревизия
6a1d3778f8
променени са 2 файла, в които са добавени 35 реда и са изтрити 7 реда
  1. 34 6
      src/pages/components/In02.vue
  2. 1 1
      src/pages/components/In03.vue

+ 34 - 6
src/pages/components/In02.vue

@@ -12,13 +12,20 @@
                 <div class="item" v-for="item in search_result_list" @click="ShowInfo(item.code)">{{ item.name }}</div>
             </template>
         </div>
-        <div for="IN02"  id="top" class="top top02">
+        <div for="IN02"  id="top" class="top top02" style="padding: 32px 0 0px 0;" @click="switchIndex">
             <!--
             <div ref="func_menu_btn" id="func_menu_btn" title=""
                 @click.stop="showFuncMenuList"
                 style="cursor: pointer;position: absolute;right: 176px;top: 25px;height: 38px;width: 38px;"><img src="../../assets/image/menu1.png"></div>
             -->
-            <div ref="autoplayer_btn" id="autoplayer_btn" title="切换自动漫游" style="cursor: pointer;position: absolute;right: 80px;top: 32px;height: 38px;width: 38px;" @click="switchAutoPlayer">
+            <div title="返回数据消费"
+                style="cursor: pointer;height: 38px;width: 38px;text-align: center;float: right;margin: 0px 49px 0px 10px;"
+                @click.stop="toAdmin"><img src="../../assets/image/toAdmin.png"></div>
+            <div title="返回主视图"
+                style="cursor: pointer;height: 38px;width: 38px;text-align: center;float: right;margin: 0 10px;"
+                @click.stop="backMasterViewBy02"><img src="../../assets/image/view.png"></div>
+            <div ref="autoplayer_btn" id="autoplayer_btn" title="切换自动漫游" 
+                style="cursor: pointer;height: 38px;width: 38px;float: right;margin: 0 10px;" @click.stop="switchAutoPlayer">
                 <img v-if="AutoPlayer" src="../../assets/image/auto3d_start.png">
                 <img v-else src="../../assets/image/auto3d_stop.png">
             </div>
@@ -27,9 +34,8 @@
                 <img  src="../../assets/image/imp_icon.png">
             </div>
             -->
-            <div title="返回主视图"
-                style="cursor: pointer;position: absolute;right: 32px;top: 32px;height: 38px;width: 38px;text-align: center;"
-                @click="backMasterViewBy02"><img src="../../assets/image/view.png"></div>
+            
+            
         </div>
         <div v-if="isShowFuncMenuList" id="func_menulist">
             <div  id="maogao_btn" title="" style="cursor: pointer;" @click="OpenMaoGaoWin">毛高比重</div>
@@ -328,6 +334,7 @@
 <script>
 import { ref,onMounted,onUnmounted,watch } from 'vue';
 import * as echarts from 'echarts';
+import {useRouter} from 'vue-router';
 import api from "@/api/system";
 import Imp01 from "../imp/imp01.vue"
 import Imp02 from "../imp/imp02.vue"
@@ -363,6 +370,8 @@ export default {
         }
     },
     setup(props,{emit}) {
+        const router = useRouter();
+        const showIndexData=ref('');
         let impItemCode=ref('');
         let impItemShowDivXY = ref({top:0,left:0});
         let AutoPlayer=ref(false);
@@ -532,7 +541,12 @@ export default {
             if(newVal){
                 if (!AutoPlayer.value && window.CurrentTargetType=='IN02') switchAutoPlayer(); //开启自动漫游               
             }
-        },{deep:true,immediate:true})        
+        },{deep:true,immediate:true})
+        
+        watch(() => props.userRole, newVal=> {
+            showIndexData.value = newVal;
+        },{deep:true,immediate:true})
+
         let DataFull={
             GetData:function(){
                 if(api==null) return;
@@ -1804,6 +1818,17 @@ export default {
             window.Device_Data = null;
             impItemCode.value='';
         }
+        //切换到数据消费后台
+        function toAdmin(){
+            
+        }
+        function switchIndex(){
+            if(showIndexData.value=='index'){
+                router.push('/datamain');
+            }else{
+                router.push('/main');
+            }
+        }
         onMounted(() => {
             backMasterViewBy02();
             //动态设置停机原因的top
@@ -1832,6 +1857,7 @@ export default {
             isShowFuncMenuList,
             isShowImpItem,
             isshow_search_result,
+            showIndexData,
             backMasterViewBy02,
             ChangeModelAlarmState2,
             switchAutoPlayer,
@@ -1881,6 +1907,8 @@ export default {
             cloasMaogaoWin,
             CloseIframeWin,
             search,
+            switchIndex,
+            toAdmin,
         }
     }
 }

+ 1 - 1
src/pages/components/In03.vue

@@ -92,7 +92,7 @@
                                 <tr style="font-weight:normal;color: #1fc1d7;background-color: #2dbcd436;">
                                     <td style="border:0">班组</td>
                                     <td style="border:0">生产时间(H)</td>
-                                    <td style="border:0">已织造数(米)</td>
+                                    <td style="border:0">已生产数(米)</td>
                                     <td style="border:0">总重量(吨)</td>
                                     <td style="border:0">稼动率(%)</td>
                                 </tr>