|  | @@ -55,22 +55,22 @@
 | 
	
		
			
				|  |  |          <el-table   
 | 
	
		
			
				|  |  |          :data="tableData"
 | 
	
		
			
				|  |  |          style="width: 100%"
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | -        @current-change= "handleCurrentChange"
 | 
	
		
			
				|  |  | +        v-loading="loading"
 | 
	
		
			
				|  |  | +        @size-change="handleSizeChange"
 | 
	
		
			
				|  |  | +        @row-click="handleSelect1" 
 | 
	
		
			
				|  |  |          :row-class-name="tableRowClassName"
 | 
	
		
			
				|  |  |          :header-cell-style="{'background':' #375A88'}"
 | 
	
		
			
				|  |  | -        @selection-change="handleSelectionChange"
 | 
	
		
			
				|  |  |         @select="projectsSelectionSelect"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  |              <el-table-column>
 | 
	
		
			
				|  |  |              <template #default="scope">
 | 
	
		
			
				|  |  | -                <el-radio v-model="scoperadio" :label="scope.row.id"></el-radio>
 | 
	
		
			
				|  |  | +                <el-radio v-model="scoperadio" :label="scope.row.aid"  @change="getRadioRow(scope.row)"></el-radio>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -    <el-table-column prop="date" label="序号"  />
 | 
	
		
			
				|  |  | +    <el-table-column type="index" label="序号" width="50" />
 | 
	
		
			
				|  |  |      <el-table-column prop="name" label="名称"  />
 | 
	
		
			
				|  |  |      <el-table-column prop="name" label="来源" width="120"/>
 | 
	
		
			
				|  |  | -    <el-table-column prop="address" label="时间" width="180" />
 | 
	
		
			
				|  |  | +    <el-table-column prop="time" label="时间" width="180" />
 | 
	
		
			
				|  |  |    </el-table>
 | 
	
		
			
				|  |  |    <div class="demo-pagination-block pagination">
 | 
	
		
			
				|  |  |      <el-pagination
 | 
	
	
		
			
				|  | @@ -86,8 +86,11 @@
 | 
	
		
			
				|  |  |    />
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |        <div class="dialog-footer footer_div l_btn">
 | 
	
		
			
				|  |  | -        <div class="footerbtn flex1"><div class="borderimg"><el-button @click="dialog.dialogForm=true">添加</el-button></div></div>
 | 
	
		
			
				|  |  | -        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="dialog.dialogVisible_fire">
 | 
	
		
			
				|  |  | +        <div class="footerbtn flex1"><div class="borderimg"><el-button @click="addsg('1');">添加</el-button></div></div>
 | 
	
		
			
				|  |  | +        <!-- <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addsg('2')">
 | 
	
		
			
				|  |  | +       修改
 | 
	
		
			
				|  |  | +        </el-button></div></div> -->
 | 
	
		
			
				|  |  | +        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="dialog.dialogsgdelect=true">
 | 
	
		
			
				|  |  |         删除
 | 
	
		
			
				|  |  |          </el-button></div></div>
 | 
	
		
			
				|  |  |          <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="accident()">
 | 
	
	
		
			
				|  | @@ -121,29 +124,22 @@
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |     </div>
 | 
	
		
			
				|  |  | -   <!-- <el-dialog v-model="dialog.dialogForm" width="400"  class="dialog_class bgcolor tianjia">
 | 
	
		
			
				|  |  | +   <el-dialog v-model="dialog.dialogsgdelect" width="400"  class="dialog_class bgcolor tianjia">
 | 
	
		
			
				|  |  |      <template #header="{titleId, titleClass }">
 | 
	
		
			
				|  |  |        <div class="my-header ">
 | 
	
		
			
				|  |  |          <el-image :src="icon" fit="contain" ></el-image>
 | 
	
		
			
				|  |  | -        <h4 :id="titleId" :class="titleClass"> 事故添加</h4>
 | 
	
		
			
				|  |  | +        <h4 :id="titleId" :class="titleClass">删除</h4>
 | 
	
		
			
				|  |  |         
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </template>
 | 
	
		
			
				|  |  | -    <el-form :model="form">
 | 
	
		
			
				|  |  | -      <el-form-item label="名称" :label-width="formLabelWidth">
 | 
	
		
			
				|  |  | -        <el-input v-model="form.name" autocomplete="off" />
 | 
	
		
			
				|  |  | -      </el-form-item>
 | 
	
		
			
				|  |  | -      <el-form-item label="来源" :label-width="formLabelWidth">
 | 
	
		
			
				|  |  | -        <el-input v-model="form.source" autocomplete="off" />
 | 
	
		
			
				|  |  | -      </el-form-item>
 | 
	
		
			
				|  |  | -    </el-form>
 | 
	
		
			
				|  |  | +        <h4 class="delecttitle"> 是否确认删除</h4>
 | 
	
		
			
				|  |  |      <div class="dialog-footer footer_div l_btn">
 | 
	
		
			
				|  |  | -        <div class="footerbtn flex1"><div class="borderimg"><el-button @click="dialog.dialogForm=false">取消</el-button></div></div>
 | 
	
		
			
				|  |  | -        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="sgadd();dialog.dialogForm=false">
 | 
	
		
			
				|  |  | +        <div class="footerbtn flex1"><div class="borderimg"><el-button @click="dialog.dialogsgdelect=false">取消</el-button></div></div>
 | 
	
		
			
				|  |  | +        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="sgdelect();dialog.dialogsgdelect=false">
 | 
	
		
			
				|  |  |         确定
 | 
	
		
			
				|  |  |          </el-button></div></div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -  </el-dialog> -->
 | 
	
		
			
				|  |  | +  </el-dialog>
 | 
	
		
			
				|  |  |    </el-dialog>
 | 
	
		
			
				|  |  |    <!--火灾左侧栏-->
 | 
	
		
			
				|  |  |    <div class="common-layout" style="margin: 0;"> 
 | 
	
	
		
			
				|  | @@ -362,7 +358,7 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script setup>
 | 
	
		
			
				|  |  | -import { computed,ref,onMounted,reactive } from "vue";
 | 
	
		
			
				|  |  | +import { computed,ref,onMounted,reactive, toRef } from "vue";
 | 
	
		
			
				|  |  |  import { request, uploadFile } from "@/utils/request";
 | 
	
		
			
				|  |  |  import { useStore } from "vuex";
 | 
	
		
			
				|  |  |  import { ElMessage,ElButton, ElDialog,ElSelect } from 'element-plus'
 | 
	
	
		
			
				|  | @@ -375,13 +371,16 @@ import t4 from "@/assets/img/t4.png";
 | 
	
		
			
				|  |  |  import mitts from "@/utils/Bus"
 | 
	
		
			
				|  |  |  import closeimg from "@/assets/img/colse.png";
 | 
	
		
			
				|  |  |  import {timestampToTime} from '@/js/lindex.js'
 | 
	
		
			
				|  |  | +let emit= defineEmits(['headerclick'])
 | 
	
		
			
				|  |  |  const props= defineProps({
 | 
	
		
			
				|  |  |      addselect: {
 | 
	
		
			
				|  |  |          type: Function,
 | 
	
		
			
				|  |  | -        required: true
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        required: true,
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    headerobj:{
 | 
	
		
			
				|  |  | +        type: Object,
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |   });
 | 
	
		
			
				|  |  |   let shiguobj=ref({
 | 
	
	
		
			
				|  | @@ -390,15 +389,22 @@ const props= defineProps({
 | 
	
		
			
				|  |  |          sid:'-1'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |   })
 | 
	
		
			
				|  |  | + let sgdata=ref({});
 | 
	
		
			
				|  |  |   let formull=ref({
 | 
	
		
			
				|  |  |      source:'',
 | 
	
		
			
				|  |  |      name:''
 | 
	
		
			
				|  |  |   })
 | 
	
		
			
				|  |  | + let idobj=ref({
 | 
	
		
			
				|  |  | +    sgaid:"",
 | 
	
		
			
				|  |  | +    name:"",
 | 
	
		
			
				|  |  | +    time:""
 | 
	
		
			
				|  |  | + })
 | 
	
		
			
				|  |  | + let loading=ref(true)
 | 
	
		
			
				|  |  |   let aid=ref("");
 | 
	
		
			
				|  |  |     let firepid=ref("");
 | 
	
		
			
				|  |  |     let firesid=ref("");
 | 
	
		
			
				|  |  |   const currentPage4 = ref(1);
 | 
	
		
			
				|  |  | - const pageSize4 = ref(5)
 | 
	
		
			
				|  |  | + const pageSize4 = ref(3)
 | 
	
		
			
				|  |  |   let total=ref(1);
 | 
	
		
			
				|  |  |  const dialogVisible = ref(true);
 | 
	
		
			
				|  |  |  const classradio = ref();
 | 
	
	
		
			
				|  | @@ -413,6 +419,7 @@ const dialog=ref({
 | 
	
		
			
				|  |  |      jianced:true,
 | 
	
		
			
				|  |  |      monitor:false,
 | 
	
		
			
				|  |  |     dialogForm:false,
 | 
	
		
			
				|  |  | +   dialogsgdelect:false,
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  |  let coolactiveName=ref(["1","2"]);
 | 
	
		
			
				|  |  |  let rizhi=ref({
 | 
	
	
		
			
				|  | @@ -441,7 +448,7 @@ const strResultFormatlist = ref([
 | 
	
		
			
				|  |  |  //       ]);
 | 
	
		
			
				|  |  |     
 | 
	
		
			
				|  |  |  let scoperadio=ref(1);
 | 
	
		
			
				|  |  | -let url=ref("http://localhost:8080/?aid=5")
 | 
	
		
			
				|  |  | +let url=ref("http://localhost:8080/?aid=0")
 | 
	
		
			
				|  |  |  // 推演结果
 | 
	
		
			
				|  |  |  const resultactiveName = ref('first');
 | 
	
		
			
				|  |  |  let newtime=ref("");
 | 
	
	
		
			
				|  | @@ -458,27 +465,7 @@ const tableRowClassName = ({row, rowIndex}) =>{
 | 
	
		
			
				|  |  |      return 'oddRow';
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -const tableData = [
 | 
	
		
			
				|  |  | -  {
 | 
	
		
			
				|  |  | -    id:1,
 | 
	
		
			
				|  |  | -    date: '01',
 | 
	
		
			
				|  |  | -    name: '首次火灾事故',
 | 
	
		
			
				|  |  | -    address: 'No. 189, Grove S',
 | 
	
		
			
				|  |  | -  },
 | 
	
		
			
				|  |  | -  {
 | 
	
		
			
				|  |  | -    id:2,
 | 
	
		
			
				|  |  | -    date: '02',
 | 
	
		
			
				|  |  | -    name: 'T首次火灾事故om',
 | 
	
		
			
				|  |  | -    address: 'No. 189, Grove St',
 | 
	
		
			
				|  |  | -  },
 | 
	
		
			
				|  |  | -  {
 | 
	
		
			
				|  |  | -    id:3,
 | 
	
		
			
				|  |  | -    date: '03',
 | 
	
		
			
				|  |  | -    name: '首次火灾事故',
 | 
	
		
			
				|  |  | -    address: 'No. 189, Grove St ',
 | 
	
		
			
				|  |  | -  },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -]
 | 
	
		
			
				|  |  | +const tableData = ref([]);
 | 
	
		
			
				|  |  |  const tableData2 = [
 | 
	
		
			
				|  |  |    {
 | 
	
		
			
				|  |  |     
 | 
	
	
		
			
				|  | @@ -514,6 +501,7 @@ function init(){
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |  // 类型选择
 | 
	
		
			
				|  |  |  const classclick= () =>{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    dialogVisible.value = false; 
 | 
	
		
			
				|  |  |    dialog.value.dialogVisible_fire = true;
 | 
	
		
			
				|  |  |    classradio.value=classradio1.value;
 | 
	
	
		
			
				|  | @@ -524,6 +512,7 @@ const classclick= () =>{
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 事故确定列表
 | 
	
		
			
				|  |  |  const accident=()=>{
 | 
	
		
			
				|  |  | +    emit('headerclick',idobj.value.name,idobj.value.time);
 | 
	
		
			
				|  |  |      dialog.value.dialogVisible_fire=false;
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -534,31 +523,87 @@ const  accident2=()=>{
 | 
	
		
			
				|  |  |      }else if(classradio.value=="Water"){
 | 
	
		
			
				|  |  |          leftcoll.value.collwater=true;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -//事故添加列表
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +//事故添加列表
 | 
	
		
			
				|  |  |  const sgadd=()=>{
 | 
	
		
			
				|  |  | +   
 | 
	
		
			
				|  |  |      const params = {
 | 
	
		
			
				|  |  |          transCode: 'D00002',
 | 
	
		
			
				|  |  |          source:shiguobj.value.source,
 | 
	
		
			
				|  |  |          type:shiguobj.value.type,
 | 
	
		
			
				|  |  |          name:formull.value.name,
 | 
	
		
			
				|  |  |          stype:classradio.value,
 | 
	
		
			
				|  |  | -        sid:shiguobj.value.sid
 | 
	
		
			
				|  |  | +        sid:shiguobj.value.sid,
 | 
	
		
			
				|  |  | +        aid:aid.value
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          request(params)
 | 
	
		
			
				|  |  |            .then((res) => { 
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  | +            dialog.value.dialogForm=false;
 | 
	
		
			
				|  |  | +            getdata();
 | 
	
		
			
				|  |  |           
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |            .catch((err) => {
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +const handleSelect1=(val)=>{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +//    aid.value=val.aid;
 | 
	
		
			
				|  |  | +//  idobj.value.name=val.name;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +const getRadioRow=(val)=>{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    sgdata.value=(val)
 | 
	
		
			
				|  |  | +aid.value=val.aid;
 | 
	
		
			
				|  |  | +idobj.value.name=val.name;
 | 
	
		
			
				|  |  | +idobj.value.time=val.time;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  function handleSizeChange2(val) {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  function handleCurrentChange2(val){ 
 | 
	
		
			
				|  |  | - // pipelinedata(searchtaggd.value)
 | 
	
		
			
				|  |  | +    currentPage4.value=val;
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    getdata();
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +// 事故添加按钮
 | 
	
		
			
				|  |  | +const addsg=(val)=>{
 | 
	
		
			
				|  |  | +    console.log(val);
 | 
	
		
			
				|  |  | +    if(val=='1'){
 | 
	
		
			
				|  |  | +    aid.value=0;
 | 
	
		
			
				|  |  | +   formull.value.name='';
 | 
	
		
			
				|  |  | +    }else if(val=='2'){
 | 
	
		
			
				|  |  | +        formull.value.name=idobj.value.name
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +dialog.value.dialogForm=true;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +// 事故删除
 | 
	
		
			
				|  |  | +const sgdelect=()=>{
 | 
	
		
			
				|  |  | +    const params = {
 | 
	
		
			
				|  |  | +        transCode: 'D000016',
 | 
	
		
			
				|  |  | +        aid:aid.value,
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        request(params)
 | 
	
		
			
				|  |  | +          .then((res) => { 
 | 
	
		
			
				|  |  | +            getdata();
 | 
	
		
			
				|  |  | +            ElMessage({
 | 
	
		
			
				|  |  | +            message: '删除成功',
 | 
	
		
			
				|  |  | +            type: 'success',
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          .catch((err) => {
 | 
	
		
			
				|  |  | +            loading.value=false;
 | 
	
		
			
				|  |  | +            ElMessage.error(err.returnMsg)
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  //事故获取列表
 | 
	
		
			
				|  |  |  const getdata=()=>{
 | 
	
		
			
				|  |  |      const params = {
 | 
	
	
		
			
				|  | @@ -566,26 +611,19 @@ const getdata=()=>{
 | 
	
		
			
				|  |  |          count:pageSize4.value,
 | 
	
		
			
				|  |  |          page:currentPage4.value,
 | 
	
		
			
				|  |  |          aid:aid.value,
 | 
	
		
			
				|  |  | -        source:shiguobj.value.source,
 | 
	
		
			
				|  |  | -        sid:shiguobj.value.sid,
 | 
	
		
			
				|  |  |          stype:classradio.value,
 | 
	
		
			
				|  |  | -        searchtag:''
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          request(params)
 | 
	
		
			
				|  |  |            .then((res) => { 
 | 
	
		
			
				|  |  | -            console.log(1111)
 | 
	
		
			
				|  |  | -       console.log(res);
 | 
	
		
			
				|  |  | -           // console.log(res)
 | 
	
		
			
				|  |  | -        //    loading.value=false;
 | 
	
		
			
				|  |  | -        //     if(activeName.value=='Fire'){
 | 
	
		
			
				|  |  | -        //       tableData.value=res.rows
 | 
	
		
			
				|  |  | -        //     }else{
 | 
	
		
			
				|  |  | -        //       tableDataw.value=res.rows
 | 
	
		
			
				|  |  | -        //     }
 | 
	
		
			
				|  |  | +            loading.value=false;
 | 
	
		
			
				|  |  | +            tableData.value=res.rows;
 | 
	
		
			
				|  |  | +            total.value=res.total;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |            .catch((err) => {
 | 
	
		
			
				|  |  |              loading.value=false;
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  onMounted(() => {
 | 
	
		
			
				|  |  |      init();
 | 
	
	
		
			
				|  | @@ -1316,4 +1354,9 @@ border-radius: 0px 0px 0px 0px;
 | 
	
		
			
				|  |  |  border: 1px solid;
 | 
	
		
			
				|  |  |  border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +.delecttitle{
 | 
	
		
			
				|  |  | +    font-size:22px;
 | 
	
		
			
				|  |  | +    font-weight: bold;
 | 
	
		
			
				|  |  | +    color: #fff;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 |