liuqiao 1 ano atrás
pai
commit
c2f65778d7
3 arquivos alterados com 57 adições e 8 exclusões
  1. 5 2
      src/view/InfoDialoges.vue
  2. 13 6
      src/view/result.vue
  3. 39 0
      src/view/result/resultLeft.vue

+ 5 - 2
src/view/InfoDialoges.vue

@@ -45,6 +45,7 @@
             </template>
             <div class="my_content1 bgcolor  tablefocus scoperadio ">
                 <el-table :data="tableData" style="width: 100%" v-loading="loading" element-loading-text="Loading..."
+                :highlight-current-row="currentrow"
                     element-loading-background="rgba(0, 10, 0, 0.1)" :row-class-name="tableRowClassName"
                     :header-cell-style="{ 'background': ' #375A88' }" @select="projectsSelectionSelect">
                     <el-table-column width="50">
@@ -74,7 +75,7 @@
                             </el-button></div>
                     </div>
                     <div class="footerbtn flex1">
-                        <div class="borderimg"><el-button @click="dialog.dialogsgdelect = true">
+                        <div class="borderimg"><el-button @click="dialog.dialogsgdelect = true; dialog.dialogForm = false;">
                                 删除
                             </el-button></div>
                     </div>
@@ -325,6 +326,7 @@ const changeModel= ()=>  {
   vtkmodel.clearJgAddMode();
   vtkmodel.renderWindow.render();
 }
+let currentrow=ref(false);
 let placeholder=ref('某次某事件火灾事故');
 let emit = defineEmits(['headerclick', 'childfun', 'moxingclick','handleSelect'])
 const props = defineProps({
@@ -552,7 +554,7 @@ const sgadd = () => {
 }
 // 事故列表的选择
 const getRadioRow = (val) => {
-
+    currentrow.value=true;
     sgdata.value = (val);
     console.log(tableobj.value)
     formull.value.name = val.name;
@@ -567,6 +569,7 @@ function handleCurrentChange2(val) {
 // 事故添加按钮
 const addsg = (val) => {
     if (val == '1') {
+        currentrow.value=false;
         shigtext.value = '事故添加';
         aid.value = 0;
         formull.value.name = '';

+ 13 - 6
src/view/result.vue

@@ -9,21 +9,21 @@
         </div>
  
         <div class="result_left results">
-          <!-- <resultLeft/> -->
             <router-view name="goods">
-                <!-- <resultLeft/> -->
+                <resultLeft/>
             </router-view>
-        <router-view name="orderinfo">
-	 </router-view> 
+    
     </div>
     <div class="result_right results">
-     
+      <router-view name="orderinfo">
+          <resultRight/>
+	 </router-view> 
  
     </div>
     </div>
   </template>
   <script setup>
-    import { ref, onMounted,defineProps, reactive, } from "vue";
+    import { ref, onMounted,onUnmounted, reactive, } from "vue";
     import {RouterView,RouterLink } from "vue-router"
     import { request, uploadFile } from "@/utils/request";
     import resultLeft from "./result/resultLeft.vue";
@@ -49,6 +49,13 @@ const newtime=()=>{
 onMounted(() => {
   newtime()
 });
+  // 卸载时的操作
+  onUnmounted(() => {
+      // 清除定时器
+      if ( timing.value ) {
+        clearInterval( timing.value);
+      }
+    });
 defineExpose({accident6});
 </script>
 <style scoped>

+ 39 - 0
src/view/result/resultLeft.vue

@@ -2,9 +2,48 @@
     <!--结果对比 -->
     <div  class="result_left">
     <h1>我是Left组件</h1>
+    <div id="myEcharts" class="bie" style="width: 400px; height: 400px;"></div>
     </div>
   </template>
+  
   <script setup>
+
+import { onMounted, ref } from 'vue';
+import * as echarts from 'echarts';
+const echartInit = () =>{
+  console.log(111122222);
+       	var myChart = echarts.init(document.getElementById('myEcharts'));
+        // 指定图表的配置项和数据
+        var option = {
+	        title: {
+	            text: 'ECharts 入门示例'
+	        },
+	        tooltip: {},
+	        legend: {
+	            data:['销量']
+	        },
+	        xAxis: {
+	            data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
+	        },
+	        yAxis: {},
+	        series: [{
+	            name: '销量',
+	            type: 'bar',
+	            data: [5, 20, 36, 10, 10, 20]
+	        }]
+	  };
+	  // 使用刚指定的配置项和数据显示图表。
+	  myChart.setOption(option);
+    window.onresize = () => {
+      myChart.resize()
+            }
+
+   	}
+  
+onMounted(() => {
+ // echartInit();
+});
 </script>
 <style scoped>
+
 </style>