<template>
  <!--  灾情源设置collapseaside-->
  <div class="l_Dialog bbb tablebk ">
    <!--火灾左侧栏-->
    <div class="common-layout" style="margin: 0" v-show="sour.collfire">
      <el-aside width="2.125rem" class="L_aside L_aside1 asideg asidegbg leftbgimg1">
        <div class="demo-collapse">
          <el-collapse v-model="coolactiveName1" accordion @change="handleChangecollapse ">
            <el-collapse-item name="1" class="imgneon">
              <template #title>
                <el-icon class="iconimg Frame3" fit="contain"></el-icon>
                火灾灾害源设置
              </template>
              <div class="asides_content">
                <div class="jc_content tablecolor">
                  <div class="jc_padding">
                    <div class="xian btncolor tablefocus">
                      <el-table
                        :data="tableDatay"
                        @row-click="handleDelete($event)"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0)' }"
                      :highlight-current-row="currentrow" 
                        style="width: 100%"
                        :max-height="tableHeight"
                        :row-class-name="tableRowClassName"
                      >
                        <el-table-column prop="pname" label="选择巷道" />
                        <el-table-column prop="site" label="位置" />
                        <el-table-column label="操作" >
                          <template #default="scope">
                            <el-button
                              size="small"
                              type="success"
                              @click="handledetection(scope.$index, scope.row)"
                              >查看</el-button
                            >
                          </template>
                        </el-table-column>
                      </el-table>
                      <div class="asdis_btn">
                        <div
                          class="flex_a"
                          @click="
                            newtable($event);
                            sdialog.dianadddialog = true;
                          "
                        >
                          <div class="btns" ><span class="spantext">添加</span></div>
                        </div>
                        <div class="flex_a" @click="xiugaitable()">
                          <div class="btns"><span class="spantext">修改</span></div>
                        </div>
                        <div
                          class="flex_a"
                          @click="
                            shanchu('1');
                          "
                        >
                          <div class="btns"><span class="spantext">删除</span></div>
                        </div>
                      </div>
                    </div>
                    <!--火灾灾害源表  -->
                    <div
                      class="xian tablefocus zaiyuanbiao"
                      style="margin-top: 20px"
                      v-show="sdialog.isDisasterfire"
                    >
                      <div class="header_l header_z  headerimg">
                        <el-image :src="icon" fit="contain"></el-image>
                        <h4 class="tianjia">灾害源表</h4>
                        <div class="closeimg" @click="sdialog.isDisasterfire = false">
                          <el-image :src="closeimg" fit="contain"></el-image>
                        </div>
                      </div>
                      <el-table
                        :data="tableDatafir"
                        style="width: 100%"
                        :row-class-name="tableRowClassName"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0.96) ' }"
                        :max-height="tableHeight"
                        @row-click="handleDelete2($event)"
                        :highlight-current-row="currentrow1" 
                      >
                        <el-table-column prop="timeline" label="时间"  />
                        <el-table-column prop="val1" label="温度℃" />
                        <el-table-column prop="val2" label="二氧化碳"  />
                        <el-table-column prop="val3" label="二氧化硫"  />
                      </el-table>
                      <div class="asdis_btn">
                        <div
                          class="flex_a"
                          @click="
                            firinit();
                            sdialog.adddialog = true;
                            currentrow1=false;
                          "
                        >
                          <div class="btns"><span class="spantext">添加</span></div>
                        </div>
                        <div class="flex_a" @click="zaiyuxiugai()">
                          <div class="btns"><span class="spantext"> 修改</span></div>
                        </div>
                        <div
                          class="flex_a"
                          @click="
                            shanchu('2');
                            //sdialog.dialogsgdelect = true;
                          "
                        >
                          <div class="btns"><span class="spantext">删除</span></div>
                        </div>
                        <div class="flex_a">
                          <div class="btns" @click="sdialog.isDisasterfire = false">
                            <span class="spantext">确定</span>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </el-collapse-item>
          </el-collapse>
        </div>
      </el-aside>
    </div>
    <!-- 突水 -->
    <div class="common-layout collapseaside" style="margin: 0" v-show="sour.collwater">
      <el-aside width="1.6667rem" class="L_aside L_aside1 asideg asidegbg leftbgimg1">
        <div class="demo-collapse">
          <!-- 突水 sour.collwater-->
          <el-collapse v-model="coolactiveName1" accordion>
            <el-collapse-item name="1" class="imgneon">
              <template #title>
                <el-icon class="iconimg Frame3" fit="contain"></el-icon>
                突水灾害源设置
              </template>
              <div class="asides_content">
                <div class="jc_content tablecolor">
                  <div class="jc_padding">
                    <div class="xian btncolor tablefocus">
                      <el-table
                        :data="tableDatawat"
                        style="width: 100%"
                        :row-class-name="tableRowClassName"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0) ' }"
                        @row-click="handleDelete($event)"
                        :max-height="tableHeight"
                        :highlight-current-row="currentrow" 
                      >
                        <el-table-column prop="pname" label="选择巷道"  />
                        <el-table-column prop="site" label="位置"  />
                        <el-table-column label="操作" >
                          <template #default="scope">
                            <el-button
                              size="small"
                              type="success"
                              @click="handledetection2(scope.$index, scope.row)"
                              >查看</el-button
                            >
                          </template>
                        </el-table-column>
                      </el-table>
                      <div class="asdis_btn">
                        <div
                          class="flex_a"
                          @click="
                            newtable($event);
                            sdialog.dianadddialog = true;
                          "
                        >
                          <div class="btns" :class="{tabactive: isActive === 1}" @click="changeClass(1)"><span class="spantext">添加</span></div>
                        </div>
                        <div class="flex_a" @click="xiugaitable()">
                          <div class="btns" :class="{tabactive: isActive === 2}" @click="changeClass(2)"><span class="spantext">修改</span></div>
                        </div>
                        <div
                          class="flex_a"
                          @click="
                            shanchu('1');
                        
                          "
                        >
                          <div class="btns"  :class="{tabactive: isActive === 3}" @click="changeClass(3)"><span class="spantext">删除</span></div>
                        </div>
                        <!-- <div class="flex_a">
                          <div class="btns"><span class="spantext">确定</span></div>
                        </div> -->
                      </div>
                    </div>
                    <!-- 灾害源表 -->
                    <div
                      class="xian tablefocus"
                      style="margin-top: 20px"
                      v-show="sdialog.disDisasterwter"
                    >
                      <div class="header_l header_z headerimg">
                        <el-image :src="icon" fit="contain"></el-image>
                        <h4 class="tianjia">灾害源表</h4>
                        <div class="closeimg" @click="sdialog.disDisasterwter = false">
                          <el-image :src="closeimg" fit="contain"></el-image>
                        </div>
                      </div>
                      <el-table
                        :data="tableData4"
                        style="width: 100%"
                        :max-height="tableHeight"
                        :row-class-name="tableRowClassName"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0.96) ' }"
                        @row-click="handleDelete3($event)"
                        :highlight-current-row="currentrow1" 
                      >
                        <el-table-column prop="timeline" label="时间/s" />
                        <el-table-column prop="val1" label="突水量（m³/s）" />
                      </el-table>
                      <div class="asdis_btn">
                        <div
                          class="flex_a"
                          @click="
                            firinit();
                            sdialog.adddwater = true;
                          "
                        >
                          <div class="btns" :class="{tabactive: isActive === 4}" @click="changeClass(4)"><span class="spantext">添加</span></div>
                        </div>
                        <div class="flex_a" @click="zaiyuxiugai()">
                          <div class="btns" :class="{tabactive: isActive === 5}" @click="changeClass(5)"><span class="spantext"> 修改</span></div>
                        </div>
                        <div
                          class="flex_a"
                          @click="
                            shanchu('2');
                          "
                        >
                          <div class="btns" :class="{tabactive: isActive === 6}" @click="changeClass(6)"><span class="spantext">删除</span></div>
                        </div>
                        <div class="flex_a" @click="sdialog.disDisasterwter = false">
                          <div class="btns"><span class="spantext">确定</span></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </el-collapse-item>
            <!-- <el-collapse-item name="2">
              <div style="position: relative;">是的
              <info-boundary :classradio="classradio" /></div>
            </el-collapse-item> -->
          </el-collapse>
        
        </div>
      </el-aside>
    </div>
    <!-- 瓦斯爆炸 -->
     <!--火灾左侧栏-->
     <div class="common-layout " style="margin: 0" v-show="sour.Gass">
      <el-aside     width="2.125rem" class="L_aside L_aside1 asideg asidegbg leftbgimg1">
        <div class="demo-collapse">
          <el-collapse v-model="coolactiveName1" accordion>
            <el-collapse-item name="1" class="imgneon">
              <template #title>
                <el-icon class="iconimg Frame3" fit="contain"></el-icon>
                瓦斯<el-icon class="header-icon"> </el-icon>
              </template>
              <div class="asides_content">
                <div class="jc_content tablecolor">
                  <div class="jc_padding">
                    <div class="xian btncolor tablefocus">
                      <el-table
                        :data="tableDataws"
                        style="width: 100%"
                        :row-class-name="tableRowClassName"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0) ' }"
                        @row-click="handlews($event)"
                        max-height="350px"
                        :highlight-current-row="currentrow" 
                      >
                      <el-table-column type="index" label="序号" width="100"/>
                        <el-table-column prop="gfname" label="网格文件"  />
                        <el-table-column prop="bfname" label="边界文件"  />
                        <el-table-column label="操作" >
                          <template #default="scope">
                            <el-button
                              size="small"
                              type="success"
                              @click="handlook(scope.$index, scope.row)"
                              >查看</el-button
                            >
                          </template>
                        </el-table-column>
                      </el-table>
                      <div class="asdis_btn">
                        <div
                          class="flex_a"
                          @click="
                            wanewadd();
                          "
                        >
                          <div class="btns" :class="{tabactive: isActive === 4}" @click="changeClass(4)"><span class="spantext">添加</span></div>
                        </div>
                        <!-- <div class="flex_a" @click="wsxiugai()">
                          <div class="btns" :class="{tabactive: isActive === 5}" @click="changeClass(5)"><span class="spantext">修改</span></div>
                        </div> -->
                        <div
                          class="flex_a"
                          @click="wsdelete()
                        
                          "
                        >
                          <div class="btns" :class="{tabactive: isActive === 6}" @click="changeClass(6)"><span class="spantext">删除</span></div>
                        </div>
                      
                      </div>
                    </div>
                 
               <!-- 瓦斯爆炸区域 -->
               <div 
                      class="xian tablefocus wstable"
                     v-show="Gassdialog.blast"
                    >
                      <div class="header_l header_z">
                        <el-image :src="icon" fit="contain"></el-image>
                        <h4 class="tianjia">瓦斯爆炸区域</h4>
                        <div class="closeimg" @click="Gassdialog.blast = false">
                          <el-image :src="closeimg" fit="contain"></el-image>
                        </div>
                      </div>
                      <el-table
                        :data="gtableData"
                        style="width:100%"
                        :max-height="tableHeight"
                        :row-class-name="tableRowClassName"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0) ' }"
                        @row-click="handleblastxg($event)"
                        :highlight-current-row="currentrow1" 
                      >
                        <el-table-column prop="pname" label="巷道" />
                        <el-table-column prop="ssite" label="开始位置" />
                        <el-table-column prop="esite" label="结束位置" />>
                      </el-table>
                      <div class="asdis_btn">
                        <!-- <div class="btnpading"> -->
                        <div
                          class="flex_as"
                          @click="
                            wsaddblast();
                          "
                        >
                          <div class="btns"><span class="spantext">添加</span></div>
                        </div>
                        <div class="flex_as" @click="wsxiugai2()">
                          <div class="btns"><span class="spantext"> 修改</span></div>
                        </div>
                        <div
                          class="flex_as"
                          @click="
                           wsblastdelete();
                          "
                        >
                          <div class="btns"><span class="spantext">删除</span></div>
                        </div>
                        <div class="flex_as" @click="sdialog.disDisasterwter = false">
                          <div class="btns"><span class="spantext" @click="Gassdialog.blast = false" >确定</span></div>
                        </div>
                      <!-- </div> -->
                      </div>
                    </div>
                  <!-- 积聚区 -->
               <div 
                      class="xian tablefocus wstable"
                      v-show="Gassdialog.gather"
                    >
                      <div class="header_l header_z">
                        <el-image :src="icon" fit="contain"></el-image>
                        <h4 class="tianjia">积聚区</h4>
                        <div class="closeimg" @click="Gassdialog.gather= false">
                          <el-image :src="closeimg" fit="contain"></el-image>
                        </div>
                      </div>
                      <el-table
                        :data="gjtableData"
                        style="width: 100%"
                        :max-height="tableHeight"
                        :row-class-name="tableRowClassName"
                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0) ' }"
                        @row-click="handlegather($event)"
                        :highlight-current-row="currentrow2" 
                      >
                        <el-table-column prop="name" label="区域名" />
                       
                        <el-table-column
                          label="类型"
                          prop="type"
                          align="center"
                          width="80px"
                        >
                          <template #default="scope">
                            <span  v-if="scope.row.type === '0'">空白区</span>
                            <span   v-else-if="scope.row.type === '1'">积聚区</span>
                            <span  v-else>点火区</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="gasdensity" label="瓦斯浓度" />>
                      </el-table>
                      <div class="asdis_btn">
                        <!-- <div class="btnpading"> -->
                        <!-- <div
                          class="flex_as"
                          @click="
                            firinit();
                            sdialog.adddwater = true;
                          "
                        >
                          <div class="btns"><span class="spantext">添加</span></div>
                        </div> -->
                        <div class="flex_as" @click="gatheruxiugai()">
                          <div class="btns"><span class="spantext"> 修改</span></div>
                        </div>
                        <!-- <div
                          class="flex_as"
                          @click="
                            shanchu('2');
                          "
                        >
                          <div class="btns"><span class="spantext">删除</span></div>
                        </div> -->
                        <div class="flex_as" @click="Gassdialog.gather= false">
                          <div class="btns"><span class="spantext">确定</span></div>
                        </div>
                      <!-- </div> -->
                      </div>
                    </div>
                  </div>

                  <!-- <div style="height: 200px"></div> -->
                </div>
              </div>
            </el-collapse-item>
          </el-collapse>
        </div>
      </el-aside>
    </div>
    <!--  瓦斯的添加-->
    <el-dialog
      v-model="Gassdialog.wsaddshow"
      width="400"
      align-center
      :modal="false"
      :close-on-click-modal="false"
      :append-to-body="true"
      draggable
      :fullscreen="false"
      :modal-append-to-body="false"
      modal-class="summary-dlg"
      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">{{zhtext}}</h4>
        </div>
      </template>
      <div class="demo-input-suffix firsttitle magintop">
        <el-form-item label="巷道名称" :label-width="formLabelWidth5">
          <el-input
            v-model="selectstr"
            disabled
            class="w-50 m-2"
            placeholder="巷道名称"
          />
        </el-form-item>
        <div class="btn2">
          <el-button
            type="primary"
            @click="
              fireclick();
              sdialog.dialogVisiblenode = true;
            "
            >选择巷道</el-button
          >
        </div>
        <div class="btn2" style="padding-left: 10px">
          <el-button type="primary" @click="Dclick()">3D巷道选择</el-button>
        </div>
      </div>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="Gassdialog.wsaddshow=false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
             @click="Gassadd();"
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 瓦斯爆炸区域的添加 -->
    <el-dialog
      v-model="Gassdialog.wsaddarea"
      width="400"
      align-center
      :modal="false"
      :close-on-click-modal="false"
      :append-to-body="true"
      draggable
      :fullscreen="false"
      :modal-append-to-body="false"
      modal-class="summary-dlg"
      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">{{zhtext}} </h4>
        </div>
      </template>
         <!-- <div class=" btncolor tablefocus">
                
               
        </div> -->
        <div class="demo-input-suffix firsttitle magintop">
        <el-form-item label="巷道名称" :label-width="formLabelWidth5">
          <el-input
            v-model="selectstr"
            disabled
            class="w-50 m-2"
            placeholder="巷道名称"
          />
        </el-form-item>
        <div class="btn2">
          <el-button
            type="primary"
            @click="
              fireclick();
              sdialog.dialogVisiblenode = true;
            "
            >选择巷道</el-button
          >
        </div>
        <div class="btn2" style="padding-left: 10px">
          <el-button type="primary" @click="Dclick()">3D巷道选择</el-button>
        </div>
      </div>
      <div class="input">
        <el-form-item label="开始位置" :label-width="formLabelWidth5">
          <el-input-number
            v-model="wasi.ssite"
            :min="0"
            :max="10000"
            :step="100"
            controls-position="right"
            class="w-50 m-2"
            placeholder="位置"
          />
        </el-form-item>
        <el-form-item label="结束位置" :label-width="formLabelWidth5">
          <el-input-number
            v-model="wasi.esite"
            :min="0"
            :max="10000"
            :step="100"
            controls-position="right"
            class="w-50 m-2"
            placeholder="位置"
          />
        </el-form-item>
      </div>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="Gassdialog.wsaddarea= false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="
               wsbalastadd();
             
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 积聚的修改 -->
    <el-dialog
      v-model="Gassdialog.wsaddgather"
      width="400"
      align-center
      :modal="false"
      :close-on-click-modal="false"
      :append-to-body="true"
      draggable
      :fullscreen="false"
      :modal-append-to-body="false"
      modal-class="summary-dlg"
      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">{{zhtext}} </h4>
        </div>
      </template>
      <el-form-item label="类型" :label-width="formLabelWidth2">
                <el-select v-model="wasi.type" placeholder="请选择">
                  <el-option
                    v-for="item in wasi.options"
                    :key="item.id"
                    :label="item.name"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </el-form-item>
      <div class="input">
        <el-form-item label="瓦斯浓度" :label-width="formLabelWidth2">
                <el-input
                  v-model="wasi.gasdensity"
                  class="w-50 m-2"
                  placeholder="请输入"
                  oninput ="value=value.replace(/[^0-9.]/g,'')" 
                />
              </el-form-item>
       
      </div>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="Gassdialog.wsaddgather= false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="
               wsgatheradd();
             
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 突水灾害点源数据的添加      draggable-->
    <el-dialog
      v-model="sdialog.dianadddialog"
      width="400"
      align-center
      :modal="false"
      :append-to-body="true"
      :z-index='1000'
      :close-on-click-modal="false"

      :fullscreen="false"
      :modal-append-to-body="false"
      modal-class="summary-dlg"
      class="dialog_class bgcolor tianjia"
      draggable
 
    >
      <template #header="{ titleId, titleClass }">
        <div class="my-header">
          <el-image :src="icon" fit="contain"></el-image>
          <h4 :id="titleId" :class="titleClass">{{ zhtext }}</h4>
        </div>
      </template>
      <div class="demo-input-suffix firsttitle magintop">
        <el-form-item label="巷道名称" :label-width="formLabelWidth5">
          <el-input
            v-model="selectstr"
            disabled
            class="w-50 m-2"
            placeholder="巷道名称"
          />
        </el-form-item>
        <div class="btn2">
          <el-button
            type="primary"
            @click="
              fireclick();
              sdialog.dialogVisiblenode = true;
            "
            >选择巷道</el-button
          >
        </div>
        <div class="btn2" style="padding-left: 10px">
          <el-button type="primary" @click="Dclick()">3D巷道选择</el-button>
        </div>
      </div>
      <div class="input">
        <el-form-item label="位置" :label-width="formLabelWidth5">
          <el-input-number
            v-model="source.site"
            :min="0"
            :max="1"
            :precision="2"
            :step="0.1"
            controls-position="right"
            class="w-50 m-2"
            placeholder="位置"
          />
        </el-form-item>
      </div>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="sdialog.dianadddialog = false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="
                handleEditfire();
                sdialog.dianadddialog = false;
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 选择巷道 -->
    <el-dialog
      v-model="sdialog.dialogVisiblenode"
      width="50%"
      :append-to-body="true"
      align-center 
      class="dialog_class bgcolor tianjia asideg asidegbg leftbgimg"
    >
      <template #header="{ titleId, titleClass }">
        <div class="my-header">
          <el-image :src="icon" fit="contain"></el-image>
          <h4 :id="titleId" :class="titleClass">选择巷道</h4>
        </div>
      </template>
      <div class="demo-input-suffix firsttitle leftbgimg2">
        <div class="guand_1">
          <el-form-item label="节点选择" :label-width="formLabelWidth5">
            <el-input
              v-model="searchtaggd"
              class="w-50 m-2"
              placeholder="巷道名称"
            />
          </el-form-item>
          <div class="asdis_btn">
            <div class="flex_a">
              <div class="btns" @click="searchgd"><span class="spantext">搜索</span></div>
            </div>
          </div>
        </div>
  
        <el-table
          :row-class-name="tableRowClassName"
          :max-height="tableHeight"
          ref="multipleTableRef"
          :data="tableData2"
          style="width: 100%"
          @select="projectsSelectionSelect"
          :header-cell-style="{ background: 'rgba(13, 22, 57, 0) ' }"
        >
          <el-table-column type="selection" width="55" />
          <el-table-column property="snId" label="开始节点" />
          <el-table-column property="enId" label="结束节点" />
          <el-table-column property="id" label="编号" width="70" />
          <el-table-column property="name" label="名称" width="70" />
          <el-table-column property="sectionType" label="截面类型" width="120" />
          <el-table-column property="roughCoe" label="粗糙系数" />
          <el-table-column property="sectionPara1" label="截面参数1" width="90" />
          <el-table-column property="sectionPara2" label="截面参数2" width="90" />
          <el-table-column property="sectionPara3" label="截面参数3" width="90" />
          <el-table-column property="sectionPara4" label="截面参数4" width="90" />
          <el-table-column property="sectionPara5" label="截面参数5" width="90" />
        </el-table>
        <div class="demo-pagination-block" style="margin-top: 20px">
          <el-config-provider :locale="zhCn">
          <el-pagination
            v-model:current-page="currentPage4"
            v-model:page-size="pageSize4"
            small
            background
            layout="prev, total,pager, next, jumpe,"
            :total="parseInt(total)"
            class="mt-4"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </el-config-provider>
        </div>
        <div class="dialog-footer footer_div l_btn">
          <div class="footerbtn flex1">
            <div class="borderimg">
              <el-button @click="sdialog.dialogVisiblenode = false">取消</el-button>
            </div>
          </div>
          <div class="footerbtn flex1">
            <div class="borderimg">
              <el-button
                @click="
                  queding();
                  sdialog.dialogVisiblenode = false;
                "
              >
                确定
              </el-button>
            </div>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 灾害火灾源检测数据的添加-->
    <el-dialog
      v-model="sdialog.adddialog"
      width="400"
      align-center
      :modal="false"
      :append-to-body="true"
      :close-on-click-modal="false"
      draggable
      :fullscreen="false"
      :modal-append-to-body="false"
      modal-class="summary-dlg"
      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">{{ zhtext }}</h4>
        </div>
      </template>
      <div>
        <el-form>
          <el-form-item label="时间/s"  :label-width="formLabelWidth6">
            <el-input
              v-model.Number="Disastersource.timeline"
              class="w-50 m-2"
              placeholder="请输入时间秒"
              maxlength="12"
              step="0.01"
              oninput ="value=value.replace(/[^0-9]/g,'')"
            />
          </el-form-item>
          <el-form-item label="温度℃" :label-width="formLabelWidth6">
            <el-input
              v-model.Number="Disastersource.val1"
              class="w-50 m-2"
              placeholder="请输入"
              maxlength="10"
              step="0.01"
              oninput ="value=value.replace(/[^0-9.]/g,'')"
            />
          </el-form-item>
          <el-form-item label="二氧化碳" :label-width="formLabelWidth6">
            <el-input
              v-model="Disastersource.val2"
              class="w-50 m-2"
              placeholder="请输入"
              maxlength="10"
              step="0.01"
              oninput ="value=value.replace(/[^0-9.]/g,'')"
            />
          </el-form-item>
          <el-form-item label="二氧化硫" :label-width="formLabelWidth6">
            <el-input
              v-model.Number="Disastersource.val3"
              class="w-50 m-2"
              placeholder="请输入"
              maxlength="10"
              oninput ="value=value.replace(/[^0-9.]/g,'')"
            />
          </el-form-item>
        </el-form>
      </div>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="sdialog.adddialog = false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="
                addjiancf();
                sdialog.adddialog = false;
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 灾害源突水检测数据的添加-->
    <el-dialog
      v-model="sdialog.adddwater"
      :append-to-body="true"
      width="400"
      align-center
      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>
        </div>
      </template>
      <div>
        <el-form class="demo-form-inline inputnuber">
          <el-form-item label="时间/s" :label-width="formLabelWidth6">
            <el-input-number
            :min="0"
              v-model="Disastersource.timeline"
              class="w-50 m-2"
              maxlength="15" 
              :precision="0"
              placeholder="请输入时间秒"
              oninput ="value=value.replace(/[^0-9]/g,'')" 
            />
          </el-form-item>
          <el-form-item label="突水量（m³/s）"   :label-width="formLabelWidth6">
            <el-input-number
              v-model="Disastersource.val1"
              class="w-50 m-2"
              placeholder="请输入"
              :min="0"
              maxlength="15"  
              :precision="0"
              oninput ="value=value.replace(/[^0-9]/g,'')" 
             
              
            />
          </el-form-item>
        </el-form>
      </div>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="sdialog.adddwater = false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="
                addjiancf();
                sdialog.adddwater = false;
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 删除 -->
    <el-dialog
      v-model="sdialog.dialogsgdelect"
      :append-to-body="true"
      width="300"
      align-center
      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>
        </div>
      </template>
      <h4 class="delecttitle">
        是否确认删除 <span class="spanclad">{{ zqname }}</span>
      </h4>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="sdialog.dialogsgdelect = false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="fundeledata();
                sdialog.dialogsgdelect = false;
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 瓦斯的删除 -->
    <el-dialog
      v-model="Gassdialog.wsdelete"
      align-center
      :append-to-body="true"
      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>
        </div>
      </template>
      <h4 class="delecttitle">
        <!-- //{{ zqname }} -->
        是否确认删除 <span class="spanclad"></span>
      </h4>
      <div class="dialog-footer footer_div l_btn">
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button @click="Gassdialog.wsdelete = false">取消</el-button>
          </div>
        </div>
        <div class="footerbtn flex1">
          <div class="borderimg">
            <el-button
              @click="wsdeledata();
                Gassdialog.wsdelete = false;
              "
            >
              确定
            </el-button>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
  <selfdialogs ref="dialogtrue" @Dtext="Dtext"></selfdialogs>
  <!-- <filesload
      ref="filesload"
      :fileurls="fileurls"
      @fileLoadeState="fileLoadeState($event)"
    ></filesload> -->
</template>
<script setup>
import { computed, ref, onMounted, reactive, toRef } from "vue";
import { request, uploadFile } from "@/utils/request";
import icon from "@/assets/img/icon.png";
import icon1 from "@/assets/img/Group27.png";
import closeimg from "@/assets/img/colse.png";
import {
  ElMessage,
  ElButton,
  ElDialog,
  ElSelect,
  DROPDOWN_COLLECTION_INJECTION_KEY,
  ElConfigProvider
} from "element-plus";
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { Calendar, Search } from "@element-plus/icons-vue";

import InfoBoundary from "./InfoBoundary.vue";
import { c } from "@kitware/vtk.js/macros2";
import { vtkmodel } from "@/control/vtkModel.js";;
import selfdialogs from "./SetPipe.vue";
import vueUploader from "./fileuploads.vue";
import { NULL } from "sass";
// import filesload from "./filesloads.vue";

let isActive=ref(0)
const  changeClass= (i)=>  {
 isActive.value = i;
}
const changeModel= ()=>  {
  vtkmodel.clearJgAddMode();
  vtkmodel.renderWindow.render();
}
let styX=ref({left: ""})
let vueupshow=ref(false);
const gfx=ref();
const inp=ref();
let gid=ref("");
let wsid=ref("");
let gfid=ref("");
let bfid=ref("");
let tableDataws=ref([]);
let currentrow = ref(false);
let currentrow1 = ref(false);
let currentrow2 = ref(false);
let formLabelWidth2=ref(80);
let wasi=ref({
  ssite:0.0,
  esite:0.0,
  gbid:Number,
  pid:Number,
  gdname:'',
  pid:Number,
  gid:Number,
  blastdata:{},
  gatherdata:{},
  options:[{ name:"空白区" ,value:'0'},{ name:"积聚区" ,value:'1'},{ name:"点火区" ,value:'2'}],
  type:'0',
  gasdensity:0,
})
let gtableData=ref([]);
let gjtableData=ref([]);
const props = defineProps({
  classradio: {
    type: String,
  },
  // aid: {
  //   type: String,
  // },
});
let fileurls=ref([]);
let zaihai = ref({
  addEied: "",
});
let gfname=ref("");
let bfname=ref("");
let dialogtrue = ref();
let zhtext = ref("");
const Gassdialog=ref({
  wsaddflie:false,
  wsaddflie:false,
  wsaddarea:false,
  wsdelete:false,
  blast:false,
  gather:false,
  wsaddgather:false,
})
const sdialog = ref({
  adddialog: false,
  dialogsgdelect: false,
  dianadddialog: false,
  dialogVisiblenode: false,
  isDisasterfire: false,
  isDisasterwter: false,
  adddwater: false,
});
let selectstr = ref("");
const currentPage4 = ref(1);
const pageSize4 = ref(5);
const tableDatawat = ref([]);
const tableDatafir = ref([]);
const dialogVisible = ref(true);
const sour = ref({
  collfire: false,
  collwater: false,
  Gass:false,
});
let jiancobj = ref({});
let firepid = ref("");
let svid = ref("");
let firesid = ref("");
let searchtaggd = ref("");
let total = ref(1);
let gdadd = ref("0");
let jcadd = ref();
let tableHeight = ref(150);
const multipleTableRef = ref();
const multipleSelection = ref([]);
const formLabelWidth5 = ref(77);
const formLabelWidth6 = ref(120);
let source = reactive({ pname: "", site: 0.1 });
let Disastersource = ref({
  svid: 0,
  timeline:Number,
  val1:Number,
  val2: Number,
  val3:Number,
  val4:Number,
});
let tableobj = ref({});

const tableData2 = ref([]);
let aid = ref();
let biaoid = ref();
let coolactiveName1 = ref(["1", "2"]);
let zqname = ref("");
const tableRowClassName = ({ row, rowIndex }) => {
  if (rowIndex % 2 != 0) {
    return "evenRow";
  }
  return "oddRow";
};
const tableData = ref([]);
const tableDatay = ref([]);
const tableData4 = ref([]);

const accident3 = (key) => {
  console.log(key);
  if (key == "1"||key == "2"||key == "3") {
    console.log(props.classradio )
    if (props.classradio == "Fire") {
      sour.value.collfire = true;
      sour.value.collwater = false;
      sour.value.Gass = false;
    } else if (props.classradio == "Water") {
     
      sour.value.collwater = true;
      sour.value.collfire = false;
      sour.value.Gass = false;
      console.log(sour.value.collwater );
      console.log(222333)
   
    }else if(props.classradio == "Gass"){
      sour.value.collwater = false;
      sour.value.collfire = false;
      sour.value.Gass = true;
    }
  } else {
    sour.value.collwater = false;
    sour.value.collfire = false;
    sour.value.Gass = false;
  }
};
// 3D数据显示
const Dtext=(val)=>{
  console.log(val);
  selectstr.value=val.name;
  firepid.value=val.id;
}
// 3D弹屏
const Dclick = () => {
  dialogtrue.value.dialoglog = true;
  vtkmodel.clearJgAddMode() ;
  vtkmodel.selectPipes();
  dialogtrue.value.jgSelect();
  console.log(dialogtrue.value.dialoglog);
};
//灾情源查询列表
const handledisaster = (aidval) => {
  aid.value = aidval;
  const params = {
    transCode: "D00005",
    aid: aid.value,
  };
  request(params)
    .then((res) => {
      if (props.classradio == "Fire") {
        tableDatay.value = res.rows;
      } else {
        tableDatawat.value = res.rows;
      }
       tableobj.value={};
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
};
// 灾情源添加
const fireadd = () => {
  currentrow.value = false;
  tableobj.value={};
  if(firepid.value==null||firepid.value==""){
    ElMessage.error("巷道不能为空")
  }else{
  const params = {
    transCode: "D00004",
    pid: firepid.value,
    aid: aid.value,
    stype: props.classradio,
    site: source.site,
  };
  request(params)
    .then((res) => {
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
      handledisaster(aid.value);
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
  }
};
//下拉跳转
const handleChangecollapse = (val) => {
  
  coolactiveName1.value=val;
  
}

//添加保存
const handleEditfire = () => {
  if (gdadd.value == "1") {
    fireadd();
    sdialog.value.dianadddialog = false;
  } else if (gdadd.value == "2") {
    if (props.classradio == "Fire") {
      sdialog.value.dianadddialog = false;
    }
  } else if ((gdadd.value = "3")) {
    xiugaiapi();
    //   waaddshow.value=false;
  } else {
  }
  //handledisaster(aid.value);
};
//灾情源删除
const handleDelete = (val) => {
  console.log("我执行了")
  zqname.value = val.pname;
 tableobj.value=val;
  currentrow.value=true;
  shanchu.value = val;
 sdialog.dialogsgdelect = true;
  firesid.value = val.sid;

    // }
};
const shanchu = (val) => {

  biaoid.value = val;
  if(val=='1'){

  if (JSON.stringify(tableobj.value) == "{}") {
 ElMessage.error("你还没有选中删除的项目")
 } else {
    sdialog.value.dialogsgdelect = true;

    }
  }else {
    if (JSON.stringify(jiancobj.value) == "{}") {
      ElMessage.error("你还没有选中删除的项目")
 } else {
  sdialog.value.dialogsgdelect = true;
  //sdialog.value.dialogsgdelect = true;

    }
  //  sdialog.value.dialogsgdelect = true;
  }
};
const fundeledata = () => {
  if (biaoid.value == "1") {
    fundeledata2();
  } else{
    fundeledata3();
  }
};
// 
const fundeledata2 = () => {
  const params = {
    transCode: "D000011",
    sid: firesid.value,
  };
  console.log(params);
  request(params)
    .then((res) => {
      ElMessage({
        message: "删除成功",
        type: "success",
      });
      if(props.classradio == "Fire"){
        sdialog.value.isDisasterfire=false;
      }else{
        sdialog.value.disDisasterwter=false;
      }
      handledisaster(aid.value);
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
};
// 巷道搜索
function searchgd() {
  pipelinedata(searchtaggd.value);
}
// 分页查询
function handleSizeChange(val) {}
const handleCurrentChange = (val) => {
  pipelinedata(searchtaggd.value);
};
//新建fire
const newtable = (e) => {
  var e = e || window.Event;
  styX.value.left = e.clientX + "px";
  console.log(styX.value.left);
  currentrow.value=false;
  tableobj.value={};
  selectstr.value = "";
  firepid.value = "";
  source.site = 0;
  newtable.value = "1";
  gdadd.value = "1";
  zhtext.value = "添加";
};
//  修改
const xiugaitable = () => {
  gdadd.value = "3";
  zhtext.value = "修改";
  if (JSON.stringify(tableobj.value) == "{}") {
    ElMessage.error("你还没有选中修改的项目");
  } else {
    console.log(tableobj.value)
    sdialog.value.dianadddialog = true;
    aid.value = tableobj.value.aid;
    firepid.value = tableobj.value.pid;
    source.site = tableobj.value.site;
    selectstr.value = tableobj.value.pname;
  }
};
// 修改接口
const xiugaiapi = () => {
  const params = {
    transCode: "D000010",
    pid: firepid.value,
    site: source.site,
    sid: tableobj.value.sid,
  };
  request(params)
    .then((res) => {
      handledisaster(aid.value);
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
    })
    .catch((err) => {});
};
// 选择
const fireclick = () => {
  searchtaggd.value='';
  pipelinedata("");
};
const queding = () => {
  selectfun();
};
const selectfun = () => {
  selectstr.value = "";
  currentPage4.value = 1;
  console.log();
  if (multipleSelection.value.length != 0) {
    firepid.value = multipleSelection.value[0].id;
    selectstr.value = multipleSelection.value[0].name;
  } else {
    // selectstr.value='';
  }
};
const projectsSelectionSelect = (selection, row) => {
  if (selection.length > 1) {
    multipleTableRef.value.clearSelection();
    multipleTableRef.value.toggleRowSelection(row, true);
    let arrp=[];
        arrp.push(selection[1])
        multipleSelection.value = arrp;
    return;
  }
  if (selection.length == 1) {
    multipleSelection.value = selection;
  } else if (selection.length == 0) {
  }

  // console.log(row)
};
//巷道数据查询
const pipelinedata = (searchtag) => {
  const params = {
    transCode: "D00001",
    count: pageSize4.value,
    page: currentPage4.value,
    searchtag: searchtag,
  };
  request(params)
    .then((res) => {
      tableData2.value = res.rows;
      total.value = res.total;
    })
    .catch((err) => {});
};
//   灾源检测
const handledetection = (index, row) => {
  sdialog.value.isDisasterfire = true;
  firesid.value = row.sid;
  getinquire();
};
//突水灾源检测
const handledetection2 = (index, row) => {
  sdialog.value.disDisasterwter = true;
  firesid.value = row.sid;
  getinquire();
};
//   灾源检测查询
const getinquire = () => {
  const params = {
    transCode: "D00007",
    sid: firesid.value,
  };
  request(params)
    .then((res) => {
      console.log(res.rows);
      if (props.classradio == "Fire") {
        tableDatafir.value = res.rows;
      } else {
        tableData4.value = res.rows;
      }
      jiancobj.value={};
    })
    .catch((err) => {});
};

// const Disasterclick=(index,row)=>{
//     addjiancf();

//   }
// 灾源火灾检测添加
const addjiancf = () => {
  if (zaihai.value.addEied == "a") {
    const params = {
      transCode: "D00006",
      sid: firesid.value,
      timeline: Disastersource.value.timeline,
      val1: Disastersource.value.val1,
      val2: Disastersource.value.val2,
      val3: Disastersource.value.val3,
      val4: Disastersource.value.val4,
    };
    request(params)
      .then((res) => {
        ElMessage({
          message: res.returnMsg,
          type: "success",
        });
        getinquire();
      })
      .catch((err) => {
        ElMessage.error(err.returnMsg);
      });
  } else {
    zaiyuxiugaiapi();
  }
};
//灾情源添加清空
const firinit = () => {
  zaihai.value.addEied = "a";
  Disastersource.value.timeline = "";
  Disastersource.value.val1 = "";
  Disastersource.value.val2 = "";
  Disastersource.value.val3 = "";
  Disastersource.value.val4 = "";
  zhtext.value = "添加";
  currentrow1.value=false;
  jiancobj.value={};
};
//瓦斯爆炸查询
const Gassgetdata=(aidval)=>{
  aid.value=aidval;
  const params = {
    transCode: "D10020",
    aid:aid.value
  };

  request(params)
    .then((res) => {
      tableDataws.value=res.rows;
      tableobj.value={};
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
}
// 瓦斯爆炸的添加
const wanewadd=()=>{
  Gassdialog.value.wsaddshow= true;
  selectstr.value = "";
  firepid.value = "";
  zhtext.value = "添加";

 currentrow.value=false;
 tableobj.value={};


}
const Gassadd=()=>{
  Gassdialog.value.wsaddshow=false;
  console.log(firepid.value);
  const params = {
    transCode: "D10021",
    gid:gid.value,
    pid:firepid.value,
    aid:aid.value
  };
console.log(params);
  request(params)
    .then((res) => {
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
      Gassdialog.value.wsaddflie= false;
      Gassgetdata(aid.value);
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
}
// 瓦斯选中一行
const handlews=(row)=>{
  console.log(row);
  currentrow.value=true;
  tableobj.value=row;

}
// 瓦斯的修改
const wsxiugai= ()=>{
  if (JSON.stringify(tableobj.value) == "{}") {
    ElMessage.error("你还没有选中修改的项目");
  } else {
  zhtext.value = "修改";
  Gassdialog.value.wsaddshow= true;
  // selectstr.value = "";
  // firepid.value = "";
  }
}
// 瓦斯删除
const wsdelete=()=>{
  wsid.value='0'
  if (JSON.stringify(tableobj.value) == "{}") {
 ElMessage.error("你还没有选中删除的项目")
 } else {
      zqname.value= tableobj.value.bfname+"-"+ tableobj.value.gfname;
      Gassdialog.value.wsdelete=true;
 }
}
const wsdeledata=()=>{
  console.log(wsid.value)
  console.log(1111)
  if(wsid.value=='0'){
     wsdelete2();


  }if(wsid.value=='1'){
    wsblastdelete1();
  }

}
// 瓦斯删除
const wsdelete2=()=>{
  const params = {
    transCode: "D10022",
    gid:tableobj.value.gid
  };

  request(params)
    .then((res) => {
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
      Gassdialog.value.wsdelete=false;
      Gassdialog.value.blast=false;
      Gassdialog.value.gather=false;
      Gassgetdata(aid.value);
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
}
//瓦斯的查看
const handlook=(index,data)=>{
  console.log(data);
  Gassdialog.value.blast =true;
  Gassdialog.value.gather =true;
  wasi.value.gid=data.gid;
  wsblastget();
  gatherget();

}
// // 瓦斯爆炸区域查询
const wsblastget=()=>{
  const params = {
    transCode: "D10023",
    gid: wasi.value.gid,

  };
  request(params)
    .then((res) => {
      gtableData.value=res.rows;
      wasi.value.blastdata={}
    
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
}
// 瓦斯爆炸区域的添加
const wsaddblast=()=>{
  zhtext.value='添加';
  wasi.value.ssite=0.0;
  wasi.value.esite=0.0;
  wasi.value.gbid=0;
  wasi.value.pid='';
  selectstr.value = "";
  firepid.value = "";
  Gassdialog.value.wsaddarea= true;
  currentrow1.value=false;
  wasi.value.blastdata={};
}
const wsbalastadd=()=>{
  wasi.value.pid=firepid.value;
  if( wasi.value.ssite<wasi.value.esite){
  const params = {
    transCode: "D10024",
    gid: wasi.value.gid,
    pid: wasi.value.pid,
    ssite:wasi.value.ssite,
    esite: wasi.value.esite,
    gbid:wasi.value.gbid,
  };
  request(params)
    .then((res) => {
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
      Gassdialog.value.wsaddarea= false;
      wsblastget();

    
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
       
  }else{
    ElMessage.error("结束位置大于开始位置");
  }
}
// 爆炸区域的修改

const wsxiugai2=()=>{
  if (JSON.stringify(wasi.value.blastdata) == "{}") {
    ElMessage.error("你还没有选中修改的项目");

}else{
  zhtext.value='修改';
  wasi.value.ssite=wasi.value.blastdata.ssite;
  wasi.value.esite=wasi.value.blastdata.esite;
  wasi.value.gbid=wasi.value.blastdata.gbid;
  wasi.value.pid=wasi.value.blastdata.pid;
  selectstr.value =wasi.value.blastdata.pname;
  firepid.value =wasi.value.blastdata.pid;
  Gassdialog.value.wsaddarea= true;
}
}
const handleblastxg=(data)=>{
  wasi.value.blastdata=data;
  currentrow1.value=true;

}
// 爆炸区域删除
const wsblastdelete=()=>{
  if (JSON.stringify(wasi.value.blastdata) == "{}") {
    ElMessage.error("你还没有选中修改的项目");

}else{
  wsid.value='1';
  zqname.value= wasi.value.blastdata.pname;
 Gassdialog.value.wsdelete=true;
}
}
const wsblastdelete1=()=>{

  const params = {
    transCode: "D10025",
    gbid:wasi.value.blastdata.gbid,
  };
  request(params)
    .then((res) => {
      ElMessage({
        message:"删除成功",
        type: "success",
      });
      Gassdialog.value.wsaddarea= false;
      wsblastget();
    
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    })   
  }
  // 积聚
  const  gatherget = () => {
    const params = {
    transCode: "D10026",
    gid:wasi.value.gid,
  };
  request(params)
    .then((res) => {
      gjtableData.value=res.rows;
      wasi.value.gatherdata={};
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    })  
  }
  // 积聚的选中
  
  const  handlegather = (data) => {
    console.log(data);
    currentrow2.value=true;
   wasi.value.gatherdata=data;
  }
// 积聚的修改
const  gatheruxiugai = () => {
  zhtext.value = "修改";

  if (JSON.stringify(wasi.value.gatherdata) == "{}") {
    ElMessage.error("你还没有选中修改的项目");
  } else {
    Gassdialog.value.wsaddgather=true;
    wasi.value.gasdensity=wasi.value.gatherdata.gasdensity;
    wasi.value.type=wasi.value.gatherdata.type;
  }
}
// 
const wsgatheradd=()=>{
  const params = {
    transCode: "D10027",
    type:wasi.value.type,
    gasdensity:wasi.value.gasdensity,
    ggid:wasi.value.gatherdata.ggid,
  };
  request(params)
    .then((res) => {
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
      Gassdialog.value.wsaddgather=false;
      gatherget()
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    })  
}
// 灾害源检测的修改
const zaiyuxiugai = () => {
  zaihai.value.addEied = "x";
  zhtext.value = "修改";
  if (JSON.stringify(jiancobj.value) == "{}") {
    ElMessage.error("你还没有选中修改的项目");
  } else {
    if (props.classradio == "Fire") {
      sdialog.value.adddialog = true;
    } else {
      sdialog.value.adddwater = true;
    }

    Disastersource.value.timeline = jiancobj.value.timeline;
    Disastersource.value.val1 = jiancobj.value.val1;
    Disastersource.value.val2 = jiancobj.value.val2;
    Disastersource.value.val3 = jiancobj.value.val3;
    Disastersource.value.val4 = jiancobj.value.val4;
  }
};
// 灾害源的检测表修改接口
const zaiyuxiugaiapi = () => {
  const params = {
    transCode: "D000012",
    svid: jiancobj.value.svid,
    timeline: Disastersource.value.timeline,
    val1: Disastersource.value.val1,
    val2: Disastersource.value.val2,
    val3: Disastersource.value.val3,
    val4: Disastersource.value.val4,
  };
  request(params)
    .then((res) => {
      ElMessage({
        message: res.returnMsg,
        type: "success",
      });
      getinquire();
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
};
// 灾源突水检测添加
//灾情检测删除
const handleDelete2 = (val) => {
  currentrow1.value=true;
  console.log(val);
  jiancobj.value = val;
  firesid.value = val.sid;
  zqname.value = "监测表的一条信息";
  svid.value = val.svid;
};
const handleDelete3 = (val) => {
  currentrow1.value=true;
  jiancobj.value = val;
  firesid.value = val.sid;
  zqname.value = "监测表的一条信息";
  svid.value = val.svid;
};
const fundeledata3 = () => {
  const params = {
    transCode: "D000013",
    svid: svid.value,
  };
  request(params)
    .then((res) => {
      //console.log(res);
      ElMessage({
        message: "删除成功",
        type: "success",
      });
      getinquire();
    })
    .catch((err) => {
      ElMessage.error(err.returnMsg);
    });
};
    const runstatezt=(res)=>{
      //  this.disabledok=res;
    }

     //load状态回调
     const fileLoadeState=(files)=> {
      console.log(files);
      files.forEach((file) => {
        this.loadObjs.forEach((obj) => {
          if (obj.type == 2) {
            if (obj.filename === file.name) {
              obj.percentage = file.percentage;
            }
          }
          if (obj.type == 1) {
            //  obj.message=file.message;
          }
        });
      });
    }
onMounted(() => {
  
});
defineExpose({ sour, accident3, handledisaster,changeModel,Gassgetdata});
</script>


