<template>
    <!--矿井信息-->
    <div class="l_Dialog bou tablebk">
      <div class="common-layout" style="margin: 0" >
        <el-aside
          width="480px"
          class="L_aside L_aside1 asideg asidegbg leftbgimg1"
          v-show="dialogVisible"
        >
          <div class="demo-collapse">
            <el-collapse v-model="coolactiveName1" accordion>
              <el-collapse-item name="1" class=" btnicon">
                <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 font12">
                      <div class="xian btncolor tablefocus bmar">
                       <!--内容 -->
            <div class="classtab">
                <el-tabs v-model="resultactiveName" type="card" class="demo-tabs" @tab-click="handleClick"
                    :stretch="true">
                    <el-tab-pane label="节点信息" name="first">
                        <div class="asides_content">
                            <div class="jc_content tablecolor jc_content">

                                <div class="font12 my_content1">
                                    <div class=" btncolor tablefocus bmar">

                                        <el-table :data="tableData2" style="width:480px" :max-height="tableHeight"
                                            :highlight-current-row="currentrow" :row-class-name="tableRowClassName"
                                            @row-click="handleDelete($event)"
                                            :header-cell-style="{ 'background': 'rgba(13, 22, 57,0) ' }">
                                            <template v-slot:empty>
                                            <p>暂无数据</p>
                                            </template>
                                            <el-table-column prop="id"  label="序号" width="80px" />
                                            <!-- <el-table-column prop="code" label="节点编号" /> -->
                                            <el-table-column prop="name" label="节点名称" />
                                            <el-table-column prop="x" label="X" >
                                                <template #default="scope">
                                                <span>{{ Number(scope.row.x).toFixed(2)}}</span>
                                                </template>
                                        </el-table-column>
                                            <el-table-column prop="y" label="Y" >
                                                 <template #default="scope">
                                                <span>{{ Number(scope.row.y).toFixed(2)}}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="z" label="Z">
                                            <template #default="scope">
                                                <span>{{ Number(scope.row.z).toFixed(2)}}</span>
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                        <div class="demo-pagination-block pagination" 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" @current-change="handleCurrentChange" />
                                            </el-config-provider>
                                        </div>
                                    </div>
                                </div>
                                <div class="dialog-footer footer_div l_btn">
                                    <div class="footerbtn flex1">
                                        <div class="borderimg"><el-button @click="addsg();">添加</el-button></div>
                                    </div>
                                    <div class="footerbtn flex1">
                                        <div class="borderimg"><el-button @click="nodedelete()">
                                                删除
                                            </el-button></div>
                                    </div>
                                    <div class="footerbtn flex1">
                                        <div class="borderimg"><el-button @click="accident()">
                                                修改
                                            </el-button></div>
                                    </div>
                                   
                                </div>

                            </div>
                        </div>
                    </el-tab-pane>
                    <el-tab-pane label="巷道信息" name="second">
                        <div class="asides_content">
                            <div class="jc_content tablecolor jc_content">

                                <div class="font12 my_content1">
                                    <div class="btncolor tablefocus bmar">
                                        <el-table :row-class-name="tableRowClassName" :max-height="tableHeight"
                                            ref="multipleTableRef" :highlight-current-row="currentrow1"
                                            @row-click="handleDelete2($event)" :data="tableData3" style="width: 100%"
                                            :header-cell-style="{ 'background': 'rgba(13, 22, 57, 0) ' }">
                                            <template v-slot:empty>
                                            <p>暂无数据</p>
                                            </template>
                                                  <el-table-column property="id" label="序号"  />
                                            <!-- <el-table-column property="snId" label="开始节点" />
                                            <el-table-column property="enId" label="结束节点" />
                                            <el-table-column property="code" label="编号" /> -->
                                            <el-table-column property="name" label="名称"/>
                                            <el-table-column property="sectionType" label="截面类型" width="120" />
                                            <el-table-column property="roughCoe" label="粗糙系数" width="120"/>
                                            <!-- <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 pagination" style="margin-top: 20px;">
                                            <el-config-provider :locale="zhCn">
                                            <el-pagination v-model:current-page="gd.currentPage4"
                                                v-model:page-size="gd.pageSize4" small background
                                                layout="prev, total,pager, next, jumpe," :total="parseInt(gd.total)"
                                                class="mt-4" @current-change="handleCurrentChange2" />
                                            </el-config-provider>
                                        </div>
                                    </div>
                                </div>
                                <div class="dialog-footer footer_div l_btn">
                                    <div class="footerbtn flex1">
                                        <div class="borderimg"><el-button @click="guandaoadd();">添加</el-button></div>
                                    </div>
                                    <div class="footerbtn flex1">
                                        <div class="borderimg"><el-button @click="nodedelete2();">
                                                删除
                                            </el-button></div>
                                    </div>
                                    <div class="footerbtn flex1">
                                        <div class="borderimg"><el-button @click="accident2()">
                                                修改
                                            </el-button></div>
                                    </div>
                                   
                                </div>

                            </div>
                        </div>

                    </el-tab-pane>
                    <!-- <el-tab-pane label="设备信息" name="third">

                    </el-tab-pane>
                    <el-tab-pane label="网络信息" name="thirds">

                    </el-tab-pane> -->
                </el-tabs>
            </div>
            <!-- 添加弹窗 -->
            <el-dialog v-model="sdialog.adddialog"     align-center   :append-to-body="true" width="480" 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="编号" :label-width="formLabelWidth6">
            <el-input v-model="nodeobj.code"   maxlength="10" oninput ="value=value.replace(/[^\w\\/]/ig,'')"  class="w-50 m-2" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="名称" :label-width="formLabelWidth6">
            <el-input v-model="nodeobj.name"    maxlength="18" oninput ="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')"  class="w-50 m-2" placeholder="请输入" />
        </el-form-item>
         
        <el-form-item label="X" :label-width="formLabelWidth6">
            <el-input v-model="nodeobj.x"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')" class="w-50 m-2" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="Y" :label-width="formLabelWidth6">
            <el-input v-model="nodeobj.y"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')" class="w-50 m-2" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="Z" :label-width="formLabelWidth6">
            <el-input v-model="nodeobj.z"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')" class="w-50 m-2" placeholder="请输入" />
        </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="nodeconfirm()">
                确定
            </el-button></div>
    </div>
</div>
</el-dialog>
<!-- 删除 -->
<el-dialog v-model="sdialog.dialogsgdelect"  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"> 是否确认删除 <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="nodedeleteapi(); sdialog.dialogsgdelect = false">
                确定
            </el-button></div>
    </div>
</div>
</el-dialog>
<!-- 添加 -->
<el-dialog v-model="sdialog.gdadddialog"  align-center :modal="false" :close-on-click-modal="false"
:append-to-body="true" draggable width="480" 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-item label="编号" :label-width="formLabelWidth7">
            <el-input v-model="guandaoobj.code"    maxlength="10" oninput ="value=value.replace(/[^\w\\/]/ig,'')"   class="w-50 m-2" placeholder="请输入" />
        </el-form-item>
    <el-form-item label="名称" :label-width="formLabelWidth7">
        <el-input v-model="guandaoobj.name"   maxlength="18" class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
    <div class="demo-input-suffix firsttitle magintop guand_1">
        <el-form-item label="开始节点" :label-width="formLabelWidth7">
            <el-input v-model="guandaoobj.snId" disabled  class="w-50 m-2" oninput ="value=value.replace(/[^0-9.]/g,'')"  placeholder="请选择节点" />
        </el-form-item>
        <div class="btn2">
            <el-button type="primary" @click="nodeclick('start');">选择开始节点</el-button>
        </div>
    </div>
    <div class="demo-input-suffix firsttitle magintop guand_1">
        <el-form-item label="结束节点" :label-width="formLabelWidth7">
            <el-input v-model="guandaoobj.enId" disabled="disabled"  oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请选择节点" />
        </el-form-item>
        <div class="btn2">
            <el-button type="primary" @click="nodeclick('end');">选择结束节点</el-button>
        </div>
    </div>
    <!-- <el-form-item label="粗糙系数" :label-width="formLabelWidth7">
        <el-input v-model="guandaoobj.roughCoe" maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />
    </el-form-item>  //@change='seltree($event)'-->  
    <div  class='treeselect'>
    <el-form-item label="阻力系数" :label-width="formLabelWidth7" >
        <el-tree-select
            v-model="guandaoobj.roughCoeName"
            :data="dataselct"
            placeholder="请选择"
            :render-after-expand="false"
            style="width: 240px"
            @node-click="seltree"
        />
    </el-form-item>
</div>
    <div class="demo-input-suffix firsttitle magintop guand_1">
        <el-form-item label="截面类型" :label-width="formLabelWidth7">
            <el-select v-model="guandaoobj.sectionType" placeholder="请选择" @change="changejm">
                <el-option v-for="item in options" :key="item.id"
                    :label="item.label"
                    :value="item.value"> 
                    <!-- -->
                     <!-- <template #prefix> 
                        <el-image :src="item.image" ></el-image>
                     </template>  -->
                     <el-image :src="item.image" ></el-image>
                     <span style="padding-left: 10px;">{{item.label}}</span>
                    </el-option>
            </el-select>
            <div class="btn2">
                <div class="elimg"  v-if="guandaoobj.sectionType=='CIRCULAR'"><el-image :src="y" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='RECTANGLE'" ><el-image :src="j" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='SEMICIRCULAR'" ><el-image :src="m1" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='SEMIELLIPTICAL'" ><el-image :src="m2" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='EGG'" ><el-image :src="m3" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='GOTHIC'" ><el-image :src="m4" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='MODBASKETHANDLE'" ><el-image :src="m5" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='ARCH'" ><el-image :src="m6" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='RECT_ROUND'" ><el-image :src="m7" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='BASKETHANDLE'" ><el-image :src="m8" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='HORSESHOE'" ><el-image :src="m9" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='RECT_TRIANGULAR'" ><el-image :src="m10" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='VERT_ELLIPSE'" ><el-image :src="m11" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='HORZI_ELLIPSE'" ><el-image :src="m12" fit="contain"></el-image></div>
                <div class="elimg"  v-else-if="guandaoobj.sectionType=='CATENARY'" ><el-image :src="m13" fit="contain"></el-image></div>
                <div class="elimg" v-else><el-image :src="g" fit="contain"></el-image></div>
            </div>
        </el-form-item>
    </div>
    <el-form-item   :label="labelobj.v1" :label-width="formLabelWidth7" v-show="labelobj2.isshow1" >
        <el-input v-model="guandaoobj.sectionPara1"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
    <el-form-item  :label="labelobj.v2" :label-width="formLabelWidth7" v-show="labelobj2.isshow2"  >
        <el-input v-model="guandaoobj.sectionPara2"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
    <el-form-item  :label="labelobj.v3" :label-width="formLabelWidth7" v-show="labelobj2.isshow3" >
        <el-input v-model="guandaoobj.sectionPara3" maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
    <el-form-item  :label="labelobj.v4" :label-width="formLabelWidth7" v-show="labelobj2.isshow4" >
        <el-input v-model="guandaoobj.sectionPara4" maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
    <el-form-item  :label="labelobj.v5" :label-width="formLabelWidth7" v-show="labelobj2.isshow5" >
        <el-input v-model="guandaoobj.sectionPara5" maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"   class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
    <div class=" btncolor tablefocus">
                      <vue-uploader
                      ref="gfx"
                      :accept="'.x'"
                      :upId="'1'"
                      :gfname="gfname"
                      :name="'网格文件上传'"
                      @handfiles="handfiles"
                      @Gassaddgfid="Gassaddgfid"
                      @clearFiles="clearFiles"
                      style="margin: 20px 0 0 0"
                    >
                    <el-row>
                </el-row>
                  </vue-uploader>

                  <vue-uploader
                      ref="inp"
                      :accept="'.inp'"
                      :name="'边界文件'"
                      :upId="'2'"
                      :gfname="bfname"
                      @handfiles="handfiles"
                      @Gassaddbfid="Gassaddbfid"
                      @clearFiles="clearFiles"
                      style="margin: 20px 0 0 0"
                    >
                  </vue-uploader>
        
                    </div>
</div>
<div class="dialog-footer footer_div l_btn">
    <div class="footerbtn flex1">
        <div class="borderimg"><el-button @click="fileboolen('cancel');">取消</el-button>
        </div>
    </div>
    <div class="footerbtn flex1">
        <div class="borderimg"><el-button @click="fileboolen('confirm');">
                确定
            </el-button></div>
    </div>
</div>
</el-dialog>
<!-- 删除 -->
<el-dialog v-model="sdialog.guddialogsgdelect"  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"> 是否确认删除 <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.guddialogsgdelect = false">取消</el-button></div>
    </div>
    <div class="footerbtn flex1">
        <div class="borderimg"><el-button @click="gddelete(); sdialog.guddialogsgdelect = false">
                确定
            </el-button></div>
    </div>
</div>
</el-dialog>
<!-- 阻力系数弹窗 毛壁面-->
 <el-dialog v-model="sdialog.resistance" width="600" :append-to-body="true"  :modal="false" :close-on-click-modal="false"
  draggable class="dialog_class bgcolor tablefocus shigutable">
<template #header="{ titleId, titleClass }">
    <div class="my-header ">
        <el-image :src="icon" fit="contain"></el-image>
        <h4 :id="titleId" :class="titleClass">{{zulitext }}</h4>
    </div>
</template>
<div class='maoconent'>
   <div  class='maopading'>
     <el-radio-group v-model="radio1"  class="radio-group" @change="zairadiochage1">
        <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="0" >自定义阻力系数a：</el-radio></div>
        <el-input v-model="zuli.zidiny"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />

</div>
<div class='jisuan'>
    <div class='radio'>
      <el-radio label="1">计算阻力系数a：</el-radio></div>
      <el-form-item >
        <el-input v-model="zuli.jsuan"  maxlength="15" oninput ="value=value.replace(/[^0-9.]/g,'')"  class="w-50 m-2" placeholder="请输入" />
    </el-form-item>
</div>
</el-radio-group>
<!--毛壁面  -->
<div class="divshuzhi">
<div v-if="radio1=='1'">
<div class="xizhi yi" v-if="guandaoobj.roughCoeName=='毛壁面'">
    <el-radio-group v-model="resource" class="ml-4" @change="resourcechange">
    <div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="0" >1.阻力因子ɑ×10⁴:</el-radio></div>
      <el-input-number v-model="jisuanobj.val1" :disabled="resource!='0'" :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">顺走向在煤层里挖的巷道（58.8）</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="1">2.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="jisuanobj.val2" :disabled="resource!='1'" :min="68.6" :max="78.4"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">交叉走向在煤层里挖的巷道（68.6~78.4）</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="2">3.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="jisuanobj.val3" :disabled="resource!='2'" :min="58.8" :max="78.4"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">巷道与地板粗糙度相同的巷道（58.8~78.4）</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="3" >4.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="jisuanobj.val4" :disabled="resource!='3'" :min="98.0" :max="147.0"   :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">巷道与地板粗糙度相同，地面阻塞情况下 （98.0~147.0）</span>
</div>
</el-radio-group>
</div>
<!--砌碹面  -->
<div class="xizhi er" v-if="guandaoobj.roughCoeName=='砌碹面'">
    <el-radio-group v-model="resource" class="ml-4" @change="resourcechange2">
    <div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="0" v-model="qxmradio">1.阻力因子ɑ×10⁴:</el-radio></div>
      <el-input-number v-model="qxmobj.val1"  :disabled="resource!='0'"  :min="29.4" :max="39.2"   :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">混凝土砌碹、外抹灰浆（29.4~39.2）</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="1" v-model="qxmradio">2.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="qxmobj.val2"  :disabled="resource!='1'"  :min="49.0" :max="68.6"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">混凝土砌碹、外抹灰浆（49.0~68.6））</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="2" v-model="qxmradio">3.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="qxmobj.val3" :disabled="resource!='2'"   :min="24.5" :max="29.4"  :precision="1" :step="0.1"  @change="handleChange">
        <template #decrease-icon>
            <el-icon><ArrowLeft /></el-icon>
        </template>
        <template #increase-icon>
            <el-icon><ArrowRight /></el-icon>
        </template>
      </el-input-number>
   
</div>
<span class="text">砖砌碹、外抹灰浆（24.5~29.4））</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="3" v-model="qxmradio">4.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="qxmobj.val4" :disabled="resource!='3'" :min="29.4" :max="39.2"   :precision="1" :step="0.1"  @change="handleChange">
      
      </el-input-number>
   
</div>
<span class="text">砖砌碹、不抹灰浆（29.4~39.2）</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="4" v-model="qxmradio">5.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="qxmobj.val5" :disabled="resource!='4'"  :min="39.2" :max="49.0" :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">料石（39.2~49.0）</span>
</div>
</el-radio-group>
</div>
<!-- 圆木棚式支护3-1 -->
<div v-if="guandaoobj.roughCoeName=='圆木棚式支护'">
<div class="xizhi san_1" >
    <div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>支护间距L（cm）：</div>
      <el-input-number v-model="ympszh.val1"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>支护圆木直径/方木厚度d（cm）：</div>
      <el-input-number v-model="ympszh.val2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>巷道横截面积S（m2）：</div>
      <el-input-number v-model="ympszh.val2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='elimage'>
                <el-image :src="js" fit="contain"></el-image>
            </div>
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext tishi'>∆=L/d</div>
</div>
</div>
</div>
<!-- 工字梁拱形和梯形支护3-2 -->

<div v-if="guandaoobj.roughCoeName=='工字梁拱形和梯形支护'">
<div class="xizhi san_2" >
    <div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>支护间距L（cm）：</div>
      <el-input-number v-model="gzlg.val1"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>支护圆木直径/方木厚度d（cm）：</div>
      <el-input-number v-model="gzlg.val2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>巷道横截面积S（m2）：</div>
      <el-input-number v-model="gzlg.val2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='elimage'>
                <el-image :src="js2" fit="contain"></el-image>
            </div>
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext tishi'>∆=L/d</div>
</div>
</div>
</div>
<div v-if="guandaoobj.roughCoeName=='金属梁与柱支护'">
<div class="xizhi san_3" >
    <div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>支护间距L（cm）：</div>
      <el-input-number v-model="jsl.val1"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>支护圆木直径/方木厚度d（cm）：</div>
      <el-input-number v-model="jsl.val2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext'>巷道横截面积S（m2）：</div>
      <el-input-number v-model="jsl.val2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='elimage'>
                <el-image :src="js3" fit="contain"></el-image>
            </div>
</div>
</div>
<div class="list">
    <div  class='jisuan1'>
            <div class='radiotext tishi'>∆=L/d</div>
</div>
</div>
</div>
<!--其它支护 3-4  -->
<div class="xizhi san_4" v-if="guandaoobj.roughCoeName=='其它支护'">
    <el-radio-group v-model="qitaval" class="ml-4" @change="qtzhobjchange">
    <div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="0" v-model="resource">1.阻力因子ɑ×10⁴:</el-radio></div>
      <el-input-number v-model="qtzhobj.val1" :disabled="resource!='0'"  :min="88.2" :max="168.2"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">钢筋混凝土预制支架巷道（88.2~168.2）</span>
</div>
<div class="list">
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio :label="1" v-model="resource">2.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="qtzhobj.val2" :disabled="resource!='1'" :min="78.4" :max="117.6"  :precision="1" :step="0.1"  @change="handleChange">
      </el-input-number>
   
</div>
<span class="text">锚杆和喷浆巷道（78.4~117.6）</span>
</div>
</el-radio-group>
</div>
<!--工作面4-->
<div class="xizhi san_4" v-if="guandaoobj.roughCoeName=='工作面'">
    <el-radio label="0" v-model="faterradio" @change="handleRadioChange">A.炮开采面因子ɑ×10⁴：</el-radio>
    <!-- <el-radio-group v-model="gzmobj.gzm" :disabled="faterradio!='0'" @change="handleRadioChange">
        <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="0" >摩擦式金属支柱：</el-radio></div>
                        <el-input-number v-model="gzmobj.val1" :disabled="faterradio!='0'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（270~350）</span>
                    </div>
                    <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="1" >采用木支柱：</el-radio></div>
                        <el-input-number v-model="gzmobj.val2" :disabled="faterradio!='0'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（300~350）</span>
                    </div> 
    </el-radio-group> -->
    <el-radio-group v-model="gzmobj.gzm" :disabled="faterradio!='0'" >
        <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="0" > 摩擦式金属支柱：</el-radio></div>
                        <el-input-number v-model="gzmobj1.val1" :disabled="faterradio!='0'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（270~350）</span>
                    </div>
                    <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="1" >采用木支柱：</el-radio></div>
                        <el-input-number v-model="gzmobj1.val2" :disabled="faterradio!='0'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（300~350）</span>
                    </div>
    </el-radio-group>
    <el-radio label="1"  v-model="faterradio" @change="handleRadioChange">B.普通采面阻力因子ɑ×10⁴：</el-radio>
    <el-radio-group v-model="gzmobj1.gzm" :disabled="faterradio!='1'" >
        <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="0" >   采用单体液压支柱：</el-radio></div>
                        <el-input-number v-model="gzmobj1.val1" :disabled="faterradio!='1'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（420~500）</span>
                    </div>
                    <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="1" >采用摩擦式金属支柱：</el-radio></div>
                        <el-input-number v-model="gzmobj1.val2" :disabled="faterradio!='1'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（450~500）</span>
                    </div>
    </el-radio-group>
    <el-radio label="2" v-model="faterradio" @change="handleRadioChange">C.综合采面阻力因子ɑ×10⁴：</el-radio>
    <el-radio-group v-model="gzmobj2.gzm"  :disabled="faterradio!='2'"  >
        <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="0" > 采用支撑式液压支架：</el-radio></div>
                        <el-input-number v-model="gzmobj2.val1" :disabled="faterradio!='2'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（300~420）</span>
                    </div>
                    <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="1" >采用掩护式液压支架：</el-radio></div>
                        <el-input-number v-model="gzmobj2.val2" :disabled="faterradio!='2'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（220~330）</span>
                    </div>
                    <div class="list">
                        <div  class='jisuan'>
                                <div class='radio'>
                        <el-radio label="2" >采用支撑掩护式支架：</el-radio></div>
                        <el-input-number v-model="gzmobj2.val3" :disabled="faterradio!='2'" :precision="1" :step="0.1"  @change="handleChange">
                        </el-input-number>
                    
                    </div>
                    <span class="text">推荐值（320~350）</span>
                    </div>
    </el-radio-group>
</div>
<!-- 巷道有障碍物阻力修正 -->
<el-form-item label=" 巷道有障碍物阻力修正：">
                 <el-radio-group v-model="zairadio"  @change="zairadiochage1">
                  <el-radio label="1">是</el-radio>
                  <el-radio label="0">否</el-radio>
                </el-radio-group> 
              </el-form-item>
<div class="xizhi" v-if="zairadio=='1'">
    <el-radio-group v-model="zaires" class="ml-4" @change="zaireschange">
        <div class="list"  >
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="0" >1.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="zaiobj.val1" :disabled="zaires!='0'" :min="147" :max="196" :precision="1" :step="0.1"  @change="zaihandleChange">
      </el-input-number>
        </div>
        <span class="text">带有带式传送机的巷道(147~196)）</span>
        </div>
        <div class="list" >
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="1" v-model="zaires">2.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="zaiobj.val2" :disabled="zaires!='1'"  :precision="1" :step="0.1"  @change="zaihandleChange">
      </el-input-number>
        </div>
        <span class="text">设有水管、风管、木梯台阶的巷道(98)）</span>
        </div>
        <div class="list" >
    <div  class='jisuan'>
            <div class='radio'>
      <el-radio label="2" v-model="zaires">3.阻力因子ɑ×10⁴：</el-radio></div>
      <el-input-number v-model="zaiobj.val3" :disabled="zaires!='2'" :min="29.4" :max="98"  :precision="1" :step="0.1"  @change="zaihandleChange">
      </el-input-number>
        </div>
        <span class="text">当巷道严重堵塞时(29.4~98)</span>
        </div>
    </el-radio-group>
        </div>
      <!-- </el-radio-group>  -->
    </div>
    </div>
</div>
</div>
<div class="dialog-footer footer_div l_btn">
    <div class="footerbtn flex1">
        <div class="borderimg"><el-button @click="sdialog.resistance = false">取消</el-button></div>
    </div>
    <div class="footerbtn flex1">
        <div class="borderimg"><el-button @click="maoqueding();">
                确定
            </el-button></div>
    </div>
</div>
</el-dialog>
<Node-Select ref="nodeselect" @queding="queding" />
            <!--  -->
                      </div>
                    </div>
                  </div>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
        </el-aside>
      </div>
    </div>
  
  </template>
  <script setup>
  import { computed, ref, onMounted, reactive, toRef } from "vue";
  import { request, uploadFile } from "@/utils/request";
  import { ElMessage, ElButton, ElDialog, ElSelect,ElConfigProvider } from 'element-plus'
  import { ArrowDown, ArrowUp,Crop, Minus, Plus,ArrowRight,ArrowLeft } from '@element-plus/icons-vue'
  import zhCn from 'element-plus/es/locale/lang/zh-cn'
  import icon from "@/assets/img/icon.png";
  import g from "@/assets/img/g.jpg";
  import j from "@/assets/img/j2.png";
  import y from "@/assets/img/y2.png";
  import m1 from "@/assets/img/m1.png";
  import m2 from "@/assets/img/m2.png";
  import m3 from "@/assets/img/m3.png";
  import m4 from "@/assets/img/m4.png";
  import m5 from "@/assets/img/m5.png";
  import m6 from "@/assets/img/m6.png";
  import m7 from "@/assets/img/m7.png";
  import m8 from "@/assets/img/m8.png";
  import m9 from "@/assets/img/m9.png";
  import m10 from "@/assets/img/m10.png";
  import m11 from "@/assets/img/m11.png";
  import m12 from "@/assets/img/m12.png";
  import m13 from "@/assets/img/m13.png";
  import js from "@/assets/img/js.png";
  import js2 from "@/assets/img/js2.png";
  import js3 from "@/assets/img/js3.png";
  import { timestampToTime } from '@/js/lindex.js';
  import NodeSelect from "./NodeLine.vue";
  import vueUploader from "./fileuploads.vue";

//   import Menufile from "./MenuFile.vue"
//   import upFile from "./upfile.vue";
// 
// let labelobj=ref(
//     {v1:"截面信息1"},
//     {v2:"截面信息2",isshow:true},
//     {v3:"截面信息3",},
//     {v4:"截面信息4"},
//     {v5:"截面信息5",isshow:false},
//     // {v3:"截面信息3", v4:"截面信息4", v5:"截面信息5",show:true}
// )
// let labelobj=ref(
//     {v1:"截面信息1"},
//     {v2:"截面信息2"},
//     {v3:"截面信息3"},
//     {v4:"截面信息4"},
//     {v5:"截面信息5"},
// )
let labelobj=ref({v1:"截面信息1",v2:"截面信息2",v3:"截面信息3", v4:"截面信息4", v5:"截面信息5"})
let labelobj2=ref(
    {isshow1:true,isshow2:false,isshow3:false, isshow4:false, isshow5:false}
)
let zuli=ref({
    zidiny:'',
    jsuan:''
})
let jsuanval=ref(58.8);
let zuaival=ref(147.0);
let jisuanobj=ref({
    val1:58.8,
    val2:68.6,
    val3:78.4,
    val4:58.8,
})
let qxmradio=ref("0"); 
let qxmobj=ref({
    val1:29.4,
    val2:49,
    val3:24.5,
    val4:29.4,
    val5:39.2,
})
let qtzhobj=ref({
    val1:88.2,
    val2:78.4,
   
})
let ympszh=ref({
    val1:29.4,
    val2:49.0,
    val3:49.0,
})
let gzlg=ref({
    val1:29.4,
    val2:49.0,
    val3:49.0,
})
let jsl=ref({
    val1:29.4,
    val2:49.0,
    val3:49.0,
})
let zairadio=ref('1');
let zaires=ref("0")
let zaiobj=ref({
    val1:147,
    val2:98,
    val3:29.4,
})
let gzmobj=ref({
    gzm:0,
    val1:98.0,
    val2:47.7
})
let gzmobj1=ref({
    gzm:0,
    val1:98.0,
    val2:47.7
})
let gzmobj2=ref({
    gzm:0,
    val1:98.0,
    val2:47.7,
    val3:47.7
})
let faterradio=ref("0")
// 文件上传参数
const radio1 = ref('0');
const gfx=ref();
const inp=ref();
let gid=ref("");
let wsid=ref("");
let gfid=ref("");
let bfid=ref("");
let gfname=ref("");
let bfname=ref("");
let resource=ref('0')
let qitaval=ref('0')
let num=ref();
const value = ref()
const dataselct = ref([
  {
    value: '毛壁面',
    label: '毛壁面',
  },
  {
    value: '砌碹面',
    label: '砌碹面',
  },
  {
    value: '支护面',
    label: '支护面',
    children: [
      {
        value: '圆木棚式支护',
        label: '圆木棚式支护',
      },
      {
        value: '工字梁拱形和梯形支护',
        label: '工字梁拱形和梯形支护',
      },
      {
        value: '金属梁与柱支护',
        label: '金属梁与柱支护',
      },
      {
        value: '其它支护',
        label: '其它支护',
      },
    ],
  },
  {
    value: '工作面',
    label: '工作面',
  },
])
let zulitext=ref();
let tishi=ref('');
  let nodeselect = ref();
  let dialogVisible = ref(false);
  let tableData2 = ref([]);
  let classradio1 = ref('Fire');
  let coolactiveName1 = ref(["1"]);
  let formLabelWidth6 = ref(70);
  let formLabelWidth7 = ref(100)
  const resultactiveName = ref("first");
  let tableHeight = ref(280);
  let total = ref(1);
  let searchtag = ref("");
  const statusMap = {
  'CIRCULAR': '圆形',
  'RECTANGLE': '矩形',
  'SEMICIRCULAR': '半椭圆形',
  'SEMIELLIPTICAL': '半圆形',
  'EGG': '蛋形',
  'GOTHIC': '哥特形',
  'MODBASKETHANDLE': '更正蓝形',
  'ARCH': '拱形',
  'RECT_ROUND': '弧底矩形',
  'BASKETHANDLE': '蓝形',
  'HORSESHOE': '马蹄形',
  'RECT_TRIANGULAR': '三角底矩形',
  'VERT_ELLIPSE': '竖向椭圆',
  'HORZI_ELLIPSE': '水平椭圆',
  'CATENARY': '悬链式',
};
  let options = ref([
  {
      label: '圆形', value: "CIRCULAR",image:y
  },
  {
      label: '矩形', value: "RECTANGLE",image:j
  },
    {
      label: '半椭圆形', value: "SEMICIRCULAR",image:m1
  },
  {
      label: '半圆形', value: "SEMIELLIPTICAL",image:m2
  },
  {
      label: '蛋形', value: "EGG",image:m3
  },
  {
      label: '哥特形', value: "GOTHIC",image:m4
  },
  {
      label: '更正蓝形', value: "MODBASKETHANDLE",image:m5
  },
  {
      label: '拱形', value: "ARCH",image:m6
  },
  {
      label: '弧底矩形', value: "RECT_ROUND",image:m7
  },
  {
      label: '蓝形', value: "BASKETHANDLE",image:m8
  },
  {
      label: '马蹄形', value: "HORSESHOE",image:m9
  },
  {
      label: '三角底矩形', value: "RECT_TRIANGULAR",image:m10
  },
  {
      label: '竖向椭圆', value: "VERT_ELLIPSE",image:m11
  },
  {
      label: '水平椭圆', value: "HORZI_ELLIPSE",image:m12
  },
  {
      label: '悬链式', value: "CATENARY",image:m13
  },
 
  ])
  const currentPage4 = ref(1);
  const pageSize4 = ref(4)
  let currentrow = ref(false);
  let currentrow1 = ref(false);
  let sdialog = ref({
      adddialog: false,
      dialogsgdelect: false,
      gdadddialog: false,
      guddialogsgdelect: false,
      resistance:false,
  })
  let sideid = ref("");
  let tableData3 = ref();
  let zqname = ref("");
  let zhtext = ref("添加");
  let nodedata = ref({});
  let gddata = ref({});
  let nodeobj = ref({
      name: "",
      x: "",
      y: "",
      z: "",
      code:'',
  })
  let guandaoobj = ref({
      pid: '',
      name: '',
      snId: Number,
      enId:Number ,
      roughCoe: '',
      roughCoeName:'',
      sectionType: 'CIRCULAR',
      sectionPara1: '',
      sectionPara2: '',
      sectionPara3: '',
      sectionPara4: '',
      sectionPara5: '',
      code:'',
  })
  let gd = ref({
      total: 1,
      currentPage4: 1,
      pageSize4: 5,
  })
  const tableRowClassName = ({ row, rowIndex }) => {
      if (rowIndex % 2 != 0) {
          return 'evenRow';
      }
      return 'oddRow';
  
  }
  onMounted(() => {
      pipelinedata()
  })
  // tab选项事件
  const handleClick = (Tab, val) => {
      switch (Tab.props.name) {
          case 'first':
              pipelinedata()
              break;
          case "second":
              guandaodata();
              break;
          case 'third':
              break;
          case 'thirds':
              break;
      }
  }
  //  节点分页查询
  const handleCurrentChange = (val) => {
      pipelinedata();
  }
  // 管道分页查询
  const handleCurrentChange2 = (val) => {
      guandaodata();
  }
  //节点数据查询
  const pipelinedata = () => {
      const params = {
          transCode: 'D00000',
          count: pageSize4.value,
          page: currentPage4.value,
          searchtag: searchtag.value,
      }
      request(params)
          .then((res) => {
              tableData2.value = res.rows;
              total.value = res.total;
              nodedata.value={}
          })
          .catch((err) => {
              ElMessage.error(err.returnMsg)
          })
  }
  //节点的添加
  const addsg = () => {
      zhtext.value = '添加';
      currentrow.value = false;
      sdialog.value.adddialog = true;
      nodeobj.value.name = "";
      nodeobj.value.x = "";
      nodeobj.value.y = "";
      nodeobj.value.z = "";
      nodeobj.value.nid = '';
      nodeobj.value.code = '';
      nodedata.value={};
      tishi.value='保存';
  }
  //节点添加api
  const nodeconfirm = () => {
      if(nodeobj.value.name==null||nodeobj.value.name==''){
      ElMessage.error('名称不能为空')
             
      }else if(nodeobj.value.code==null||nodeobj.value.code==''){
          ElMessage.error('编号不能为空')
      }else if(nodeobj.value.x==null||nodeobj.value.x==''){
          ElMessage.error('X不能为空')
      }else if(nodeobj.value.y==null||nodeobj.value.y==''){
          ElMessage.error('Y不能为空')
      }else if(nodeobj.value.z==null||nodeobj.value.z==''){
          ElMessage.error("Z不能为空")
      } else if(nodeobj.value.name!=''&&nodeobj.value.x!=''&&nodeobj.value.y!=''&&nodeobj.value.z!=''){
      const params = {
          transCode: 'D10000',
          nid: nodeobj.value.nid,
          name: nodeobj.value.name,
          x: nodeobj.value.x,
          y: nodeobj.value.y,
          z: nodeobj.value.z,
          code: nodeobj.value.code,
          desc: "",
          ntype: "mid",
      }
      request(params)
          .then((res) => {
              sdialog.value.adddialog = false;
              pipelinedata();
              ElMessage({
                  message: '节点'+tishi.value+'成功',
                  type: 'success',
              })
  
          })
          .catch((err) => {
              ElMessage.error(err.returnMsg)
          })
      }else{
          ElMessage.error("不能为空")
      }
  
  }
// 界面
const changejm=(val)=>{
console.log(val);
    if(val=='CIRCULAR'){
        labelobj.value.v1='直径';
        labelobj2.value={isshow1:true,isshow2:false,isshow3:false, isshow4:false, isshow5:false}
    }else if(val=='RECTANGLE'){
        labelobj.value.v1='全高';
        labelobj.value.v2='顶宽';
        labelobj2.value={isshow1:true,isshow2:true,isshow3:false, isshow4:false, isshow5:false}
    }else if(val=='SEMICIRCULAR'||val=='BASKETHANDLE'||val=='HORSESHOE'||val=='CATENARY'||val=='SEMIELLIPTICAL'||val=='EGG'||val=='GOTHIC'){
        labelobj.value.v1='全高';
        labelobj2.value={isshow1:true,isshow2:false,isshow3:false, isshow4:false, isshow5:false}
    }else if(val=='MODBASKETHANDLE'){
        labelobj.value.v1='全高';
        labelobj.value.v2='底宽';
        labelobj.value.v3='顶部半径*5';
        console.log()
        labelobj2.value={isshow1:true,isshow2:true,isshow3:true, isshow4:false, isshow5:false}
    }else if(val=='ARCH'){
        labelobj.value.v1='全高';
        labelobj.value.v2='最大宽度';
        labelobj2.value={isshow1:true,isshow2:true,isshow3:false, isshow4:false, isshow5:false}
    }else if(val=='RECT_ROUND'){
        labelobj.value.v1='全高';
        labelobj.value.v2='顶宽';
        labelobj.value.v3='底部半径';
        labelobj2.value={isshow1:true,isshow2:true,isshow3:true, isshow4:false, isshow5:false}
    }else if(val=='RECT_ROUND'){
        labelobj.value.v1='全高';
        labelobj.value.v2='顶宽';
        labelobj.value.v3='底部半径';
        labelobj2.value={isshow1:true,isshow2:true,isshow3:true, isshow4:false, isshow5:false}
    }else if(val=='RECT_TRIANGULAR'){
        labelobj.value.v1='全高';
        labelobj.value.v2='顶宽';
        labelobj.value.v3='三角形高度';
        labelobj2.value={isshow1:true,isshow2:true,isshow3:true, isshow4:false, isshow5:false}
    }else if(val=='VERT_ELLIPSE'||val=='HORZI_ELLIPSE'){
        labelobj.value.v1='全高';
        labelobj.value.v2='最大宽度^3';
        labelobj2.value={isshow1:true,isshow2:true,isshow3:false, isshow4:false, isshow5:false}
    }
}
  //选中node节点的一行
  const handleDelete = (val) => {
      currentrow.value = true;
      nodedata.value = val;
  
  }
  const handleDelete2 = (val) => {
      currentrow1.value = true;
      gddata.value = val;
      gfname.value= gddata.value.gfname;
    bfname.value= gddata.value.bfname;
  
  }
  //node删除
  const nodedelete = () => {
      console.log(nodedata.value);
      if (JSON.stringify(nodedata.value) == '{}') {
          ElMessage.error("你还没有选中删除的项目")
      } else {
          sdialog.value.dialogsgdelect = true;
          zqname.value = nodedata.value.name;
      }
  }
  const nodedeleteapi = () => {
      const params = {
          transCode: 'D10001',
          nid: nodedata.value.id,
      }
      request(params)
          .then((res) => {
              pipelinedata();
              ElMessage({
                  message: '节点删除成功',
                  type: 'success',
              })
  
          })
          .catch((err) => {
              ElMessage.error(err.returnMsg)
          })
  }
  //节点修改
  const accident = () => {
      if (JSON.stringify(nodedata.value) == '{}') {
          ElMessage.error("你还没有选中修改的项目")
      } else {
          zhtext.value = '修改';
          tishi.value= zhtext.value;
          sdialog.value.adddialog = true;
          nodeobj.value.name = nodedata.value.name;
          nodeobj.value.x = nodedata.value.x;
          nodeobj.value.y = nodedata.value.y;
          nodeobj.value.z = nodedata.value.z;
          nodeobj.value.nid = nodedata.value.id;
          nodeobj.value.code = nodedata.value.code;
      }
  }
  //巷道查询
  const guandaodata = () => {
      const params = {
          transCode: 'D00001',
          count: gd.value.pageSize4,
          page: gd.value.currentPage4,
          searchtag: '',
      }
      request(params)
          .then((res) => {
            tableData3.value = res.rows.map(item => {
                    return {
                        ...item,
                        sectionType: statusMap[item.sectionType] || '未知' // 如果状态不存在，默认设置为'未知'
                    };
                    });
         
              gd.value.total = res.total;
          })
          .catch((err) => {
              ElMessage.error(err.returnMsg)
          })
  }
  // 节点选中开始结束
  const nodeclick = (val) => {
      console.log(111);
      nodeselect.value.searchtaggd='';
      nodeselect.value.dialogVisiblenode = true;
      nodeselect.value.pipelinedata("");
      sideid.value = val;
  
  }
  //节点确定的方法
  const queding = (row) => {
      if (sideid.value == 'start') {
          guandaoobj.value.snId = row.id;
      } else {
          guandaoobj.value.enId = row.id;
      }
  
  }
  // 管道的add
  const guandaoadd = () => {
      sdialog.value.gdadddialog = true;
      zhtext.value = '添加';
      tishi.value='保存';
      currentrow1.value = false;
      guandaoobj.value.code = '';
      guandaoobj.value.pid = '';
      guandaoobj.value.name = '';
      guandaoobj.value.snId = '';
      guandaoobj.value.enId = '';
      guandaoobj.value.roughCoe = 1.0;
      guandaoobj.value.sectionType = 'CIRCULAR';
      guandaoobj.value.sectionPara1 = '';
      guandaoobj.value.sectionPara2 = '';
      guandaoobj.value.sectionPara3 = '';
      guandaoobj.value.sectionPara4 = '';
      guandaoobj.value.sectionPara5 = '';
      changejm( guandaoobj.value.sectionType);
      gfname.value="";
     bfname.value="";
     gddata.value={};
     nextTick(()=>{
    gfx.value.files=[];
    inp.value.files=[];
    })

  }
  // 管道增加修改的接口
  const guandaoapi = () => {
      if(guandaoobj.value.snId<guandaoobj.value.enId){
       // console.log(params);
      const params = {
          transCode: 'D10002',
          code: guandaoobj.value.code,
          pid: guandaoobj.value.pid,
          name: guandaoobj.value.name,
          snId: guandaoobj.value.snId,
          enId: guandaoobj.value.enId,
          roughCoe: guandaoobj.value.roughCoe,
          roughCoeName:guandaoobj.value.roughCoeName,
          sectionType: guandaoobj.value.sectionType,
          sectionPara1: guandaoobj.value.sectionPara1,
          sectionPara2: guandaoobj.value.sectionPara2,
          sectionPara3: guandaoobj.value.sectionPara3,
          sectionPara4: guandaoobj.value.sectionPara4,
          sectionPara5: guandaoobj.value.sectionPara5,
          gfid:gfid.value,
         bfid:bfid.value,
      }
      console.log(params);
      request(params)
          .then((res) => {
              sdialog.value.gdadddialog = false;
              ElMessage({
                  message: '巷道信息'+tishi.value+'成功',
                  type: 'success',
              })
              guandaodata();
              nextTick(()=>{
             
              gfx.value.clearFiles();
              inp.value.clearFiles();
            })
            

          })
          .catch((err) => {
           // sdialog.value.gdadddialog = true;
              ElMessage.error(err.returnMsg)
          })
      } else{
       // sdialog.value.gdadddialog = true;
          ElMessage.error("结束节点要大于开始节点")
      }
  }
  // 管道删除
  //node删除
  const nodedelete2 = () => {
      console.log(gddata.value);
      if (JSON.stringify(gddata.value) == '{}') {
          ElMessage.error("你还没有选中删除的项目")
      } else {
          sdialog.value.guddialogsgdelect = true;
          zqname.value = gddata.value.name;
      }
  }
  const gddelete = () => {
      const params = {
          transCode: 'D10003',
          pid: gddata.value.id,
      }
      request(params)
          .then((res) => {
              guandaodata();
              ElMessage({
                  message: '巷道信息删除成功',
                  type: 'success',
              })
              gddata.value={};
          })
          .catch((err) => {
              ElMessage.error(err.returnMsg)
          })
  }
  // 管道修改
  const accident2 = () => {
      if (JSON.stringify(gddata.value) == '{}') {
          ElMessage.error("你还没有选中修改的项目")
      } else {
          zhtext.value = '修改';
          tishi.value=zhtext.value;
          let sectionType=gddata.value.sectionType;
          sdialog.value.gdadddialog = true;
          guandaoobj.value.code = gddata.value.code;
          guandaoobj.value.pid = gddata.value.id;
          guandaoobj.value.name = gddata.value.name;
          guandaoobj.value.snId = gddata.value.snId;
          guandaoobj.value.enId = gddata.value.enId;
          guandaoobj.value.roughCoe = gddata.value.roughCoe;
          zuli.value.zidiny=gddata.value.roughCoe;
          guandaoobj.value.roughCoeName = gddata.value.roughCoeName;
          guandaoobj.value.sectionType = gddata.value.sectionType;
          guandaoobj.value.sectionPara1 = gddata.value.sectionPara1;
          guandaoobj.value.sectionPara2 = gddata.value.sectionPara2;
          guandaoobj.value.sectionPara3 = gddata.value.sectionPara3;
          guandaoobj.value.sectionPara4 = gddata.value.sectionPara4;
          guandaoobj.value.sectionPara5 = gddata.value.sectionPara5;;
          switch (sectionType) {
          case '圆形':
          guandaoobj.value.sectionType='CIRCULAR'
              break;
          case "矩形":
          guandaoobj.value.sectionType='RECTANGLE'
              break;
          case '半椭圆形':
          guandaoobj.value.sectionType='SEMICIRCULAR'
              break;
          case '半圆形':
          guandaoobj.value.sectionType='SEMIELLIPTICAL'
              break;
              case '蛋形':
        guandaoobj.value.sectionType='EGG'
              break;
          case "哥特形":
          guandaoobj.value.sectionType='GOTHIC'
              break;
          case '更正蓝形':
          guandaoobj.value.sectionType='MODBASKETHANDLE'
              break;
          case '拱形':
          guandaoobj.value.sectionType='ARCH'
          break;
          case "弧底矩形":
          guandaoobj.value.sectionType='RECT_ROUND'
              break;
          case '蓝形':
          guandaoobj.value.sectionType='BASKETHANDLE'
              break;
          case '马蹄形':
          guandaoobj.value.sectionType='HORSESHOE'
          break;
          case "三角底矩形":
          guandaoobj.value.sectionType='RECT_TRIANGULAR'
              break;
          case '竖向椭圆':
          guandaoobj.value.sectionType='VERT_ELLIPSE'
              break;
          case '水平椭圆':
          guandaoobj.value.sectionType='HORZI_ELLIPSE'
          break;
          case '悬链式':
          guandaoobj.value.sectionType='CATENARY'
          break;

      }
      changejm(guandaoobj.value.sectionType);
        //   guandaoobj.value.sectionPara4 = gddata.value.sectionPara4;
        //   guandaoobj.value.sectionPara5 = gddata.value.sectionPara5;;
          Gassaddgfid( gddata.value.gfid);
         Gassaddbfid( gddata.value.bfid);
            nextTick(()=>{
            gfx.value.files=[];
            inp.value.files=[];
            })

      }
  
  }
//  //文件上传的方法
const handfiles = (file) => {
      files.value = "";
     files.value = file;
    }
    const Gassaddgfid=(gf)=>{
        gfid.value=gf;
   
   
}

const Gassaddbfid=( bf)=>{
        bfid.value=bf;
        console.log(11222)
   
}
// 清空文件
const clearFiles=()=>{
    console.log(1111888881)
    // inp.upload.clearFiles();
    // gfx.upload.clearFiles();
}
//判断文件是否上传
const fileboolen=(val)=>{
  let msg=gfx.value.msg;
  let msg2=inp.value.msg;
  console.log(msg2);

  if(msg=="上传中"||msg2=="上传中"){
    ElMessage.error("上传中不能关闭");
  }else{
    if(val=='cancel'){
        sdialog.value.gdadddialog=false;
    }else{
    
    }
   // sdialog.value.gdadddialog=false;
    if(val=='confirm'&&msg=="已上传"||val=='confirm'&&msg2=="已上传"||val=='confirm'&&msg==undefined||val=='confirm'&&msg2==undefined){
        //sdialog.value.gdadddialog=false;
        if(guandaoobj.value.code==''){
            ElMessage.error("编号不能为空");
     }else if(guandaoobj.value.name==''){

        ElMessage.error("名称不能为空");
     }
     else{
      
        guandaoapi();
     }

  }
 // guandaoapi();
  }
 
}
// input 点击事件

const handleChange=(val)=>{
    //resourcechange();
  jsuanval.value=val;
  console.log(val);
  if(zairadio.value=='0'){
    falsecalculatefun();
  }else{
    calculatefun();
  }

}
// 阻碍
const zaihandleChange=(val)=>{
    zuaival.value=val;
    calculatefun();
}

// 选中计算
const resourcechange=(val)=>{
    resource.value=val;
switch(resource.value){
    case '0':
    jsuanval.value=jisuanobj.value.val1;
    break;
    case '1':
    jsuanval.value=jisuanobj.value.val2;
    break;
    case '2':
    jsuanval.value=jisuanobj.value.val3;
    break;
    case '3':
    jsuanval.value=jisuanobj.value.val4;
    break;

}
if(zairadio.value=='0'){
    falsecalculatefun();
  }else{
    calculatefun();
  }
}
// 砌碹巷道
const resourcechange2=(val)=>{
    resource.value=val;
switch(resource.value){
    case '0':
    jsuanval.value=qxmobj.value.val1;
    break;
    case '1':
    jsuanval.value=qxmobj.value.val2;
    break;
    case '2':
    jsuanval.value=qxmobj.value.val3;
    break;
    case '3':
    jsuanval.value=qxmobj.value.val4;
    break;
    case '4':
    jsuanval.value=qxmobj.value.val5;
    break;
}
if(zairadio.value=='0'){
    falsecalculatefun();
  }else{
    calculatefun();
  }
}
// 障碍物
const zaireschange=(val)=>{
zaires.value=val;
switch(zaires.value){
    case '0':
    zuaival.value=zaiobj.value.val1;
    break;
    case '1':
    zuaival.value=zaiobj.value.val2;
    break;
    case '2':
    zuaival.value=zaiobj.value.val3;
    break;
 
}
console.log(  zuaival.value);
calculatefun()
}
// 障碍为否是
// 计算
const falsecalculatefun=()=>{
    let zonghe= parseFloat( jsuanval.value);
    zuli.value.jsuan=zonghe/ 10000;
}

// 计算
const calculatefun=()=>{
    let zonghe= parseFloat( jsuanval.value)+parseFloat( zuaival.value);
    zuli.value.jsuan=(zonghe/ 10000).toFixed(6);
}
// 清空
const zairadiochage1=()=>{
    if(radio1.value=="0"){
        zuli.value.jsuan=null;
        jsuanval.value=0;
        zuli.value.zidiny=guandaoobj.value.roughCoe;
        console.log('jis'+zuli.value.jsuan);
     
    }else if(radio1.value=="1"&&zairadio.value=='1'){
        zuli.value.zidiny=null;
        calculatefun();

    }else if(zairadio.value=='0'){
        falsecalculatefun();
    }
    else{
       calculatefun();
    }
  
}
const maoqueding=()=>{
    if(radio1.value=='0'){
    guandaoobj.value.roughCoe=zuli.value.zidiny;
 }else if(radio1.value=='1'){
    guandaoobj.value.roughCoe=zuli.value.jsuan;
 }
 ElMessage({
                  message:'系数保存成功',
                  type: 'success',
              })
sdialog.value.resistance = false;
}
const seltree=(data)=>{
    let val=data.value;
    zairadiochage1();
    radio1.value='0';
    zuli.value.jsuan='';
    zuli.value.zidiny=  guandaoobj.value.roughCoe;
if(val=='毛壁面'){
    jsuanval.value=58.8;
    zulitext.value='毛壁面'
    sdialog.value.resistance=true;
   // calculatefun();
}else if(val=='砌碹面'){
    jsuanval.value=29.4;
    zulitext.value='砌碹巷道'
    sdialog.value.resistance=true;
   // calculatefun();
}else if(val=='圆木棚式支护'){
    zulitext.value='圆木棚式支护'
    sdialog.value.resistance=true;
}else if(val=='工字梁拱形和梯形支护'){
    zulitext.value='工字梁拱形和梯形支护'
    sdialog.value.resistance=true;
}else if(val=='金属梁与柱支护'){
    zulitext.value='金属梁与柱支护'
    sdialog.value.resistance=true;
}
else if(val=='其它支护'){
    zulitext.value='其它支护'
    sdialog.value.resistance=true;
}else if(val=='工作面'){
    zulitext.value='工作面'
    sdialog.value.resistance=true;
}else{

}
}
//其它支护的计算
const qtzhobjchange=(val)=>{
if(val=='0'){
    jsuanval.value=qtzhobj.value.val1;
}else if(val=='1'){
    jsuanval.value=qtzhobj.value.val2;
}
let zonghe= parseFloat( jsuanval.value);
    zuli.value.jsuan=zonghe/ 10000;
}
//工作面
const handleRadioChange=(val)=>{
    if(val=='0'){
        gzmobj1.value.gzm=null;
        gzmobj2.value.gzm=null;
    }else if(val=='1'){
        gzmobj.value.gzm=null;
        gzmobj2.value.gzm=null;
    }else if(val=='2'){
        gzmobj.value.gzm=null;
        gzmobj1.value.gzm=null;
    }
}
  defineExpose({ dialogVisible, });
  </script>
  <style scoped>
  .maopading .jisuan1 .el-input-number{
    width: 40%;
  }
  .maoconent{

  }
  </style>
  
