<template>
  <div ref="all_w">
    <transformtool ref="transform"></transformtool>
    <el-container style="height: 100vh">
      <el-header class="fixed-header">
        <el-menu class="headMenu_1" mode="horizontal">
          <div class="log">
            <el-image :src="adilog"></el-image>
          </div>
          <div class="log logtitle">
            <li>&nbsp;&nbsp;HCFDLab</li>
          </div>
          <el-submenu index="1" v-show="newload">
            <template slot="title">{{ $t("HCFD.file.file") }}</template>
            <div>
              <el-menu-item
                index="1-1"
                v-if="missType"
                @click="clickNew"
                >{{ $t("HCFD.file.new") }}</el-menu-item
              >
              <el-menu-item
                v-if="missType"
                index="1-2"
                @click="
                  dialog.load_visiable = true;
                  loadProjects();
                "
                >{{ $t("HCFD.file.load") }}</el-menu-item
              >
              <el-menu-item v-if="!missType" index="1-3" @click="dialog.upload_visiable = true"
                >upLoad</el-menu-item
              >
            </div>
          </el-submenu>
          <el-menu-item index="2" @click="showHeadMenu('geneal')">{{
            $t("HCFD.geneal.geneal")
          }}</el-menu-item>
          <el-menu-item index="3" @click="showHeadMenu('physics')">{{
            $t("HCFD.physics.physics")
          }}</el-menu-item>
          <el-menu-item index="4" @click="showHeadMenu('solution')">{{
            $t("HCFD.solution.solution")
          }}</el-menu-item>
          <el-menu-item index="5" @click="showHeadMenu('result')">{{
            $t("HCFD.results.results")
          }}</el-menu-item>
          <el-submenu index="6">
            <template slot="title">{{ $t("HCFD.tool.tool") }}</template>
            <el-menu-item index="6-1" @click="unitConversion">{{
              $t("HCFD.tool.unitConversion")
            }}</el-menu-item>
            <el-menu-item class="24" index="6-2" @click="yCalchange">{{
              $t("HCFD.tool.yCal")
            }}</el-menu-item>
            <el-menu-item index="6-3" @click="reyCalchange">{{
              $t("HCFD.tool.reyCal")
            }}</el-menu-item>
            <!-- <el-menu-item index="6-4" @click="atmoCalchange">{{
              $t("HCFD.tool.atmoCal")
            }}</el-menu-item> -->
          </el-submenu>
          <!-- <el-submenu index="7">
            <template slot="title">{{ $t("HCFD.help.help") }}</template>
            <el-menu-item index="7-1">{{ $t("HCFD.help.about") }}</el-menu-item>
            <el-menu-item index="7-2">{{
              $t("HCFD.help.theroy")
            }}</el-menu-item>
            <el-menu-item index="7-3">{{ $t("HCFD.help.user") }}</el-menu-item>
            <el-menu-item index="7-4">{{ $t("HCFD.help.appli") }}</el-menu-item>
          </el-submenu> -->
        </el-menu>
      </el-header>
      <div v-show="headMenu_2Show" class="headMenu_2" id="head2">
        <div v-show="gennealShow" class="lg_weiyi">
          <div class="el-padding">
            <el-row>
              <el-col :span="3">
                <li class="title">{{ $t("HCFD.geneal.mesh") }}</li>
                <div class="title_content_1">
                  <el-button size="mini" type="success" @click="dialog.scale_visiable = true">
                    <el-image :src="scaleimage"></el-image
                    >{{ $t("HCFD.geneal.scale") }}
                  </el-button>
                  <el-button size="mini" type="success" @click="dialog.translation_visiable = true">
                    <el-image :src="transformimage"></el-image
                    >{{ $t("HCFD.geneal.translation") }}
                  </el-button>
                  <el-button size="mini" type="success" @click="dialog.rotation_visiable = true">
                    <el-image :src="rotationimage"></el-image
                    >{{ $t("HCFD.geneal.rotation") }}
                  </el-button>
                </div>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="3">
                <li class="title">{{ $t("HCFD.geneal.analysis") }}</li>
                <el-radio
                  v-model="parameterObj.nmlParam.analysis_Type"
                  label="Steady"
                  >{{ $t("HCFD.geneal.steady") }}</el-radio
                >
                <el-radio
                  v-model="parameterObj.nmlParam.analysis_Type"
                  label="Unsteady"
                  >{{ $t("HCFD.geneal.unsteady") }}</el-radio
                >
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="8">
                <li class="title" id="lg-title">
                  {{ $t("HCFD.geneal.parallel") }}
                </li>
                <el-radio-group
                  v-model="parameterObj.nmlParam.parallel_Optional"
                >
                  <el-radio label="Serial">
                    {{ $t("HCFD.geneal.serial") }}</el-radio
                  >
                  <el-radio label="MPI Parallel">{{
                    $t("HCFD.geneal.mpi")
                  }}</el-radio>
                </el-radio-group>
                <li
                  class="disacent"
                  style="padding: 6px 0 6px 3.125vw"
                  v-if="
                    parameterObj.nmlParam.parallel_Optional == 'MPI Parallel'
                  "
                >
                  <span>{{ $t("HCFD.geneal.number") }}</span>
                  <el-input
                    size="mini"
                    style="width:20%"
                    v-model="parameterObj.nmlParam.number_of_Processors"
                  ></el-input>
                </li>
              </el-col>
            </el-row>
          </div>
        </div>
        <!-- 第二的一个导航条点击事件 -->
        <div v-show="physicsShow" class="lg-er">
          <div class="el-padding">
            <el-row>
              <el-col :span="4">
                <li class="title">{{ $t("HCFD.physics.gover") }}</li>
                <el-radio-group
                  v-model="parameterObj.nmlParam.eqn_type"
                  size="mini"
                >
                  <el-radio label="cal_perf_compress">{{
                    $t("HCFD.physics.compress")
                  }}</el-radio>
                  <el-radio label="cal_perf_incompress">{{
                    $t("HCFD.physics.incompress")
                  }}</el-radio>
                </el-radio-group>
                <!-- <table>
                  <tr>
                    <td>{{ $t("HCFD.physics.artifical") }}</td>
                    <td>
                      <el-input
                        size="mini"
                        v-model="parameterObj.nmlParam.artificial_compress"
                      ></el-input>
                    </td>
                  </tr>
                </table> -->
                <li class="disflex">
                  <span>{{ $t("HCFD.physics.artifical") }}</span>
                  <el-input
                        class='inpw75'
                        size="mini"
                        v-model="parameterObj.nmlParam.artificial_compress"
                      ></el-input>
                </li>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="2">
                <li class="title">{{ $t("HCFD.physics.viscous") }}</li>
                <el-radio-group
                  v-model="parameterObj.nmlParam.viscous_terms"
                  @change="viscouschange()"
                  size="mini"
                >
                  <el-radio-button label="inviscid">
                    <el-image :src="inviscid"></el-image
                    >{{ $t("HCFD.physics.inviscid") }}
                  </el-radio-button>
                  <el-radio-button
                    @click.native="physicslaminar()"
                    label="laminar"
                  >
                    <el-image :src="laminar"></el-image
                    >{{ $t("HCFD.physics.laminar") }}
                  </el-radio-button>
                  <el-radio-button
                    @click.native="physicsturbulent()"
                    label="turbulent"
                  >
                    <el-image :src="turbulent"></el-image>
                    {{ $t("HCFD.physics.turbulent") }}
                  </el-radio-button>
                </el-radio-group>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="3">
                <li class="title">{{ $t("HCFD.physics.boundary") }}</li>
                <el-select
                  class="inpw100"
                  size="mini"
                  @change="boundaryChange"
                  v-model="Physics.Boundary.bquery"
                  placeholder="select boundary"
                >
                  <el-option
                    v-for="hcfdBoundary in parameterObj.hcfdBoundarys"
                    :key="hcfdBoundary.id"
                    :label="hcfdBoundary.name"
                    :value="hcfdBoundary.id"
                  >
                  </el-option>
                </el-select>
                <el-select
                  class="inpw100"
                  size="mini"
                  @change="conditionsChange"
                  v-model="Physics.Boundary.cquery"
                  placeholder="select Conditions"
                >
                  <el-option
                    v-for="Condition in Physics.Boundary.Conditions"
                    :key="Condition.conditionsCode"
                    :label="Condition.name"
                    :value="Condition.conditionsCode"
                  >
                  </el-option>
                </el-select>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="3">
                <li class="title">{{ $t("HCFD.physics.dynamic") }}</li>
                <el-radio
                  v-model="parameterObj.nmlParam.dynamic_Mesh"
                  label="on"
                  >on</el-radio
                >
                <el-radio
                  v-model="parameterObj.nmlParam.dynamic_Mesh"
                  label="off"
                  >off</el-radio
                >
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="3" style="position:relative">
                <li class="title">{{ $t("HCFD.physics.reference") }}</li>
                <li class="disflex">
                  <span>{{ $t("HCFD.physics.machNum") }}</span>
                  <el-input
                        class="inpw50"
                        size="mini"
                        v-model="parameterObj.nmlParam.mach_number"
                      ></el-input>
                </li>
                <li class="disflex">
                  <span>{{ $t("HCFD.physics.reyNum") }}</span>
                  <el-input
                        class="inpw50"
                        size="mini"
                        v-model="parameterObj.nmlParam.reynolds_number"
                      ></el-input>
                </li>
                  <el-button
                    size="mini"
                    type="text"
                    style="position:absolute;bottom:-15px;right:-10px"
                    icon="el-icon-arrow-down"
                    @click="dialog.reference_visiable = true"
                    >more</el-button
                  >
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="4">
                <li class="title">{{ $t("HCFD.physics.nonitertial") }}</li>
                <el-radio
                  v-model="parameterObj.nmlParam.noninertial_Reference_Frame"
                  label="on"
                  >on</el-radio
                >
                <el-radio
                  v-model="parameterObj.nmlParam.noninertial_Reference_Frame"
                  label="off"
                  >off</el-radio
                >
              </el-col>
              <!-- <el-col :span="1">
              <div class="line"></div>
            </el-col> -->
            </el-row>
          </div>
        </div>
        <div v-show="solutionShow" class="lg-san">
          <div class="el-padding">
            <el-row>
              <el-col :span="4" class="lg-bu">
                <li class="title">{{ $t("HCFD.solution.invis") }}</li>
                <el-button type="success" size="mini" @click="dialog.fluxrc_visiable = true">
                  <el-image :src="fluxr"></el-image
                  >{{ $t("HCFD.solution.fluxResCon") }}
                </el-button>
                <el-button type="success" size="mini" @click="dialog.fluxl_visiable = true">
                  <el-image :src="fluxl"></el-image
                  >{{ $t("HCFD.solution.flux") }}
                </el-button>
                <el-button type="success" size="mini" @click="dialog.fluxjc_visiable = true">
                  <el-image :src="fluxj"></el-image
                  >{{ $t("HCFD.solution.fluxJacCon") }}
                </el-button>
                <li class="disflex">
                  <span>
                    {{ $t("HCFD.solution.muscl") }}
                  </span>
                  <el-input
                    class="inpw75"
                    size="mini"
                    v-model="parameterObj.nmlParam.schedule"
                  ></el-input>
                </li>
                <li class="disflex">
                  <span>
                    {{ $t("HCFD.solution.firstOrderNum") }}
                  </span>
                  <el-input
                    class="inpw75"
                    size="mini"
                    v-model="parameterObj.nmlParam.first_order_iterations"
                  ></el-input>
                </li>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="4">
                <li class="title">{{ $t("HCFD.solution.timeAdvance") }}</li>
                <el-button type="success" size="mini" @click="dialog.time_visiable = true">
                  <el-image :src="times"></el-image
                  >{{ $t("HCFD.solution.timeScheme") }}
                </el-button>
                <li class="disflex">
                  <span class="marr30">
                    {{ $t("HCFD.solution.pseudo") }}
                  </span>
                  <div class="disflex">
                    <el-radio
                      v-model="parameterObj.nmlParam.pseudo_time_stepping"
                      label="off"
                      >Off</el-radio
                    >
                    <el-radio
                      v-model="parameterObj.nmlParam.pseudo_time_stepping"
                      label="on"
                      >On</el-radio
                    >
                  </div>
                </li>
                <li class="disflex">
                  <span>
                    {{ $t("HCFD.solution.timeStep") }}
                  </span>
                  <el-input
                    class="inpw75"
                    size="mini"
                    v-model="parameterObj.nmlParam.time_step_nondim"
                  ></el-input>
                </li>
                <li class="disflex">
                  <span>
                    {{ $t("HCFD.solution.subiterations") }}
                  </span>
                  <el-input
                    class="inpw75"
                    size="mini"
                    v-model="parameterObj.nmlParam.subiterations"
                  ></el-input>
                </li>
                <li class="disrs">
                  <el-button
                    size="mini"
                      type="text"
                      class="move"
                    icon="el-icon-arrow-down"
                    @click="dialog.timeasm_visiable = true"
                    >more</el-button
                  >
                </li>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="4" class="lg-ss">
                <li class="title">{{ $t("HCFD.solution.linearSol") }}</li>
                <li class="disflex">
                  <span>
                    {{ $t("HCFD.solution.meanflow") }}
                  </span>
                  <el-input
                    class="inpw75"
                    size="mini"
                    v-model="parameterObj.nmlParam.meanflow_sweeps"
                  ></el-input>
                </li>
                <li class="disflex">
                  <span>
                    {{ $t("HCFD.solution.turbulence") }}
                  </span>
                  <el-input
                    class="inpw75"
                    size="mini"
                    v-model="parameterObj.nmlParam.turbulence_sweeps"
                  ></el-input>
                </li>
                <li>
                  <span class="marr30">
                    {{ $t("HCFD.solution.gcr") }}
                  </span>
                  <el-radio-group v-model="parameterObj.nmlParam.line_implicit">
                    <el-radio label="off">Off</el-radio>
                    <el-radio label="on">On</el-radio>
                  </el-radio-group>
                </li>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="3">
                <li class="title">{{ $t("HCFD.solution.initialization") }}</li>
                <el-radio-group v-model="initialization" size="mini">
                  <el-radio label="freestreams">{{
                    $t("HCFD.solution.freestreams")
                  }}</el-radio>
                  <el-radio label="specified">{{
                    $t("HCFD.solution.specified")
                  }}</el-radio>
                </el-radio-group>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="2" style="position:relative">
                <li class="title">{{ $t("HCFD.solution.run") }}</li>
                <li>{{ $t("HCFD.solution.iterNum")}}</li>
                <li>
                  <el-input
                    size="mini"
                    v-model="parameterObj.nmlParam.steps"
                  ></el-input>
                </li>
                <li>{{ $t("HCFD.solution.stopToler")}}</li>
                <li>
                  <el-input
                    size="mini"
                    v-model="parameterObj.nmlParam.stopping_tolerance"
                  ></el-input>
                </li>
                  <el-button
                   type="text"
                  size="mini"
                  style="position:absolute;buttom:0;right:0"
                  icon="el-icon-arrow-down"
                  @click="dialog.runc_visiable = true"
                  >more</el-button
                >
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="3">
                <li class="title">{{ $t("HCFD.solution.outCon") }}</li>
                <el-button
                  size="mini"
                   type="success"
                  @click="dialog.boundaryo_visiable = true"
                >
                  <el-image :src="boundary"></el-image
                  >{{ $t("HCFD.solution.bounOut") }}
                </el-button>
                <el-button type="success" size="mini" @click="dialog.volumeo_visiable = true">
                  <el-image :src="volume"> </el-image
                  >{{ $t("HCFD.solution.volOut") }}
                </el-button>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="2">
                <li class="title">{{ $t("HCFD.solution.advance") }}</li>
                <el-button type="success" size="mini" @click="dialog.specialp_visiable = true">
                  <el-image :src="special"></el-image
                  >{{ $t("HCFD.solution.specialPara") }}
                </el-button>
                <el-button type="success" size="mini" @click="dialog.swap_visiable = true">
                  <el-image :src="swap"></el-image
                  >{{ $t("HCFD.solution.swapYZ") }}
                </el-button>
                <div>
                  <el-button
                    size="mini"
                     type="primary"
                    v-show="runMonitor"
                    @click="hcfdrun(true)"
                  >
                    <div class="disflex">
                      <el-image :src="run" style="width:15px"></el-image>
                      <span class="borun">Run</span>
                    </div>
                  </el-button>
                  <el-button
                    size="mini"
                    type="primary"
                    @click="showMonitor()"
                    v-show="runMonitor"
                    >Monitor</el-button
                  >
                   <el-button
                    size="mini"
                    type="primary"
                    @click="showresource()"
                    >资源选择</el-button
                  >
                </div>
              </el-col>
              <!-- <el-col :span="0">
              <div class="line"></div> </el-col > -->
            </el-row>
          </div>
        </div>
        <div v-show="resultShow" class="lg-si">
          <div class="el-padding">
            <el-row>
              <el-col :span="9" class="lisin">
                <li class="title">Surface Grid</li>
                <div class="flexpad30">
                  <div>
                    <li>
                      <span class='span100'>Steps</span>
                      <el-select size="mini" v-model="bStep" placeholder="请选择">
                        <el-option
                          v-for="setep in boundaryStep"
                          :key="setep"
                          :label="setep"
                          :value="setep"
                        >
                        </el-option>
                      </el-select>
                    </li>
                    <li class="disflex">
                      <div>
                        <span class='span100'>Scalar Selection</span>
                        <el-select size="mini" v-model="bScalar" placeholder="请选择">
                          <el-option
                            v-for="scalar in boundaryScalars"
                            :key="scalar"
                            :label="scalar"
                            :value="scalar"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </li>
                  </div>
                  <div>
                    <li class="disflex lheig34">
                      <span class="span100 marb5">Vector Selection</span>
                      <el-checkbox checked>Velocity</el-checkbox>
                    </li>
                    <li class="disflex lheig34">
                      <span class='span100 marb5' style="width:111px">Show Element</span>
                      <el-checkbox-group v-model="belementCheckeds" style="display:flex">
                        <el-checkbox
                          label="Mesh"
                          @change="Contourval('Mesh')"
                        ></el-checkbox>
                        <el-checkbox
                          label="Contour"
                          @change="Contourval('Contour')"
                        ></el-checkbox>
                      </el-checkbox-group>
                    </li>
                  </div>
                </div>
                      <el-button
                        size="mini"
                        type="primary"
                        style="margin:0 0 0 40%"
                        @click="showSurface()"
                        >Show Surface</el-button>
              </el-col>
              <el-col :span="1">
                <div class="line"></div>
              </el-col>
              <el-col :span="11" class="lg-si-right lisin">
                <li class="title">Volume Grid</li>
                <div class="flexpad30">
                  <div>
                    <li>
                      <span class='span100'>Steps</span>
                      <el-select size="mini" v-model="vStep" placeholder="请选择">
                        <el-option
                          v-for="setep in volumStep"
                          :key="setep"
                          :label="setep"
                          :value="setep"
                        >
                        </el-option>
                      </el-select>
                    </li>
                    <li class="disflex">
                      <div>
                        <span class='span100'>Scalar Selection</span>
                        <el-select size="mini" v-model="vSalar" placeholder="请选择">
                          <el-option
                            v-for="scalar in volumScalars"
                            :key="scalar"
                            :label="scalar"
                            :value="scalar"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </li>
                  </div>
                  <div>
                    <li class="disflex lheig34">
                      <span class="span100 marb5">Vector Selection</span>
                      <el-checkbox checked>Velocity</el-checkbox>
                    </li>
                    <li class="disflex lheig34">
                      <span class="span100 marb5" style="width:111px">Show Element</span>
                      <el-checkbox-group v-model="velementCheckeds" style="display:flex">
                        <el-checkbox
                          label="Mesh"
                          @change="ContourvalVolume('Mesh')"
                        ></el-checkbox>
                        <el-checkbox
                          label="Contour"
                          @change="ContourvalVolume('Contour')"
                        ></el-checkbox>
                      </el-checkbox-group>
                    </li>
                  </div>
                </div>
                  <el-button
                     type="primary"
                    size="mini"
                    style="margin:0 0 0 34%"
                    @click="showVolume()"
                    >Show Volume</el-button
                  >
              </el-col>
            </el-row>
          </div>
        </div>
      </div>
      <el-container>
        <el-aside ref="leftMenu_1" class="leftMenu_1_1">
          <li class="outline">{{ project.projectName }}</li>
          <el-tree :data="menuList" @node-click="handleNodeClick"> </el-tree>
        </el-aside>
        <!-- Task Page的弹框  -->
        <div class="lg-centent">
          <div class="lg-modl" v-show="TaskGenealshow">
            <div class="logs_title">
              Task Page
              <div class="x" @click="taskchangGeneal()">x</div>
            </div>
            <div class="el-padding Task-lg" :class="headMenu_2Show?'maxh290':'maxh100'">
              <el-row>
                <el-col>
                  <li class="title">{{ $t("HCFD.geneal.mesh") }}</li>
                  <div>
                    <li class="discenter padding0">
                      <el-button size="mini" type="success" @click="dialog.scale_visiable = true">
                        <el-image :src="scaleimage"></el-image
                        >{{ $t("HCFD.geneal.scale") }}
                      </el-button>
                    </li>
                    <li class="discenter padding0">
                      <el-button size="mini" type="success" @click="dialog.translation_visiable = true">
                        <el-image :src="transformimage"></el-image
                        >{{ $t("HCFD.geneal.translation") }}
                      </el-button>
                    </li>
                    <li class="discenter padding0">
                      <el-button size="mini" type="success" @click="dialog.rotation_visiable = true">
                        <el-image :src="rotationimage"></el-image
                        >{{ $t("HCFD.geneal.rotation") }}
                      </el-button>
                    </li>
                  </div>
                </el-col>

                <el-col>
                  <li class="title">{{ $t("HCFD.geneal.analysis") }}</li>
                  <div class="pdingf10">
                    <el-radio
                      v-model="parameterObj.nmlParam.analysis_Type"
                      label="Steady"
                      >{{ $t("HCFD.geneal.steady") }}</el-radio
                    >
                    <el-radio
                      v-model="parameterObj.nmlParam.analysis_Type"
                      label="Unsteady"
                      >{{ $t("HCFD.geneal.unsteady") }}</el-radio
                    >
                  </div>
                </el-col>

                <el-col>
                  <li class="title">{{ $t("HCFD.geneal.parallel") }}</li>
                  <el-radio-group
                    v-model="parameterObj.nmlParam.parallel_Optional"
                    class="pdingf10"
                  >
                    <el-radio label="Serial">
                      {{ $t("HCFD.geneal.serial") }}</el-radio
                    >
                    <el-radio label="MPI Parallel">{{
                      $t("HCFD.geneal.mpi")
                    }}</el-radio>
                  </el-radio-group>
                  <li
                    class="disacent pdingf10"
                    v-if="
                      parameterObj.nmlParam.parallel_Optional == 'MPI Parallel'
                    "
                  >
                    <span class="disinblok" style="width:150px">{{ $t("HCFD.geneal.number") }}</span>
                    <el-input
                      size="mini"
                      class="inpw35"
                      v-model="parameterObj.nmlParam.number_of_Processors"
                    ></el-input>
                  </li>
                </el-col>
              </el-row>
            </div>
          </div>
          <!-- task第二个 -->
          <div class="lg-modl" v-show="TaskPhysicsshow">
            <div class="logs_title">
              Task Page
              <div class="x" @click="taskchangPhysics()">x</div>
            </div>
            <div class="el-padding Task-lg" :class="headMenu_2Show?'maxh290':'maxh100'">
              <el-row>
                <el-col>
                  <li class="title">{{ $t("HCFD.physics.gover") }}</li>
                  <el-radio-group
                    v-model="parameterObj.nmlParam.eqn_type"
                    size="mini"
                    class="pdingf10"
                  >
                    <el-radio label="cal_perf_compress">{{
                      $t("HCFD.physics.compress")
                    }}</el-radio>
                    <el-radio label="cal_perf_incompress">{{
                      $t("HCFD.physics.incompress")
                    }}</el-radio>
                  </el-radio-group>
                  <li class="disflex pdingf10">
                    <span>{{ $t("HCFD.physics.artifical") }}</span>
                    <el-input
                          size="mini"
                          style="width:25%"
                          v-model="parameterObj.nmlParam.artificial_compress"
                        ></el-input>
                  </li>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.physics.viscous") }}</li>
                  <el-radio-group
                    v-model="parameterObj.nmlParam.viscous_terms"
                    @change.native="viscouschange()"
                    size="mini"
                    class="pdingf10"
                  >
                    <el-radio-button label="inviscid">
                      <el-image :src="inviscid"></el-image
                      >{{ $t("HCFD.physics.inviscid") }}
                    </el-radio-button>
                    <el-radio-button
                      label="laminar"
                      @click.native="physicslaminar()"
                    >
                      <el-image :src="laminar"></el-image
                      >{{ $t("HCFD.physics.laminar") }}
                    </el-radio-button>
                    <el-radio-button
                      label="turbulent"
                      @click.native="physicsturbulent()"
                    >
                      <el-image :src="turbulent"></el-image>
                      {{ $t("HCFD.physics.turbulent") }}
                    </el-radio-button>
                  </el-radio-group>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.physics.boundary") }}</li>
                  <div class="pdingf10">
                    <el-select
                      size="mini"
                      @change="boundaryChange"
                      v-model="Physics.Boundary.bquery"
                      placeholder="select boundary"
                    >
                      <el-option
                        v-for="hcfdBoundary in parameterObj.hcfdBoundarys"
                        :key="hcfdBoundary.id"
                        :label="hcfdBoundary.name"
                        :value="hcfdBoundary.id"
                      >
                      </el-option>
                    </el-select>
                    <el-select
                      size="mini"
                      @change="conditionsChange"
                      v-model="Physics.Boundary.cquery"
                      placeholder="select Conditions"
                    >
                      <el-option
                        v-for="Condition in Physics.Boundary.Conditions"
                        :key="Condition.conditionsCode"
                        :label="Condition.name"
                        :value="Condition.conditionsCode"
                      >
                      </el-option>
                    </el-select>
                  </div>
                </el-col>

                <el-col>
                  <li class="title">{{ $t("HCFD.physics.dynamic") }}</li>
                  <div class="pdingf10">
                    <el-radio
                      v-model="parameterObj.nmlParam.dynamic_Mesh"
                      label="on"
                      >on</el-radio
                    >
                    <el-radio
                      v-model="parameterObj.nmlParam.dynamic_Mesh"
                      label="off"
                      >off</el-radio
                    >
                  </div>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.physics.reference") }}</li>
                  <li class="disflex55 pdingf10">
                    <span>{{ $t("HCFD.physics.machNum") }}</span>
                    <el-input
                          size="mini"
                          v-model="parameterObj.nmlParam.mach_number"
                        ></el-input>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span>{{ $t("HCFD.physics.reyNum") }}</span>
                    <el-input
                          size="mini"
                          v-model="parameterObj.nmlParam.reynolds_number"
                        ></el-input>
                  </li>
                  <li class="discenter">
                    <el-button
                      size="mini"
                      type="success"
                      icon="el-icon-arrow-down"
                      @click="dialog.reference_visiable = true"
                      >more</el-button
                    >
                  </li>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.physics.nonitertial") }}</li>
                  <div class="pdingf10">
                    <el-radio
                      v-model="parameterObj.nmlParam.noninertial_Reference_Frame"
                      label="on"
                      >on</el-radio
                    >
                    <el-radio
                      v-model="parameterObj.nmlParam.noninertial_Reference_Frame"
                      label="off"
                      >off</el-radio
                    >
                  </div>
                </el-col>
              </el-row>
            </div>
          </div>
          <!-- 第三 -->
          <div class="lg-modl" v-show="TaskSolutionshow">
            <div class="logs_title">
              Task Page
              <div class="x" @click="taskchangSolution()">x</div>
            </div>
            <div class="el-padding Task-lg" :class="headMenu_2Show?'maxh290':'maxh100'">
              <el-row>
                <el-col class="lg-bu">
                  <li class="title">{{ $t("HCFD.solution.invis") }}</li>
                  <li class="discenter padding0">
                    <el-button type="success" size="mini" @click="dialog.fluxrc_visiable = true">
                      <el-image :src="fluxr"></el-image
                      >{{ $t("HCFD.solution.fluxResCon") }}
                    </el-button>
                  </li>
                  <li class="discenter padding0">
                    <el-button type="success" size="mini" @click="dialog.fluxl_visiable = true">
                      <el-image :src="fluxl"></el-image
                      >{{ $t("HCFD.solution.flux") }}
                    </el-button>
                  </li>
                  <li class="discenter padding0">
                    <el-button type="success" size="mini" @click="dialog.fluxjc_visiable = true">
                      <el-image :src="fluxj"></el-image
                      >{{ $t("HCFD.solution.fluxJacCon") }}
                    </el-button>
                  </li>
                  <li class="pdingf10">
                    {{ $t("HCFD.solution.muscl") }}
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.schedule"
                    ></el-input>
                  </li>
                  <li class="pdingf10">
                    {{ $t("HCFD.solution.firstOrderNum") }}
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.first_order_iterations"
                    ></el-input>
                  </li>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.solution.timeAdvance") }}</li>
                  <li class="discenter">
                    <el-button type="success" size="mini" @click="dialog.time_visiable = true">
                      <el-image :src="times"></el-image
                      >{{ $t("HCFD.solution.timeScheme") }}
                    </el-button>
                  </li>
                  <li class="disflex pdingf10">
                    <span>{{ $t("HCFD.solution.pseudo") }}</span>
                    <div class="disflex" style="width:45%">
                      <el-radio
                        style="margin:0 20px 0 0"
                        v-model="parameterObj.nmlParam.pseudo_time_stepping"
                        label="off"
                        >Off</el-radio
                      >
                      <el-radio
                        v-model="parameterObj.nmlParam.pseudo_time_stepping"
                        label="on"
                        >On</el-radio
                      >
                    </div>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span>{{ $t("HCFD.solution.timeStep") }}</span>
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.time_step_nondim"
                    ></el-input>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span>{{ $t("HCFD.solution.subiterations") }}</span>
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.subiterations"
                    ></el-input>
                  </li>
                  <li class="discenter">
                    <el-button
                      size="mini"
                      type="success"
                      icon="el-icon-arrow-down"
                      @click="dialog.timeasm_visiable = true"
                      >more</el-button
                    >
                  </li>
                  
                </el-col>
                <el-col class="lg-ss">
                  <li class="title">{{ $t("HCFD.solution.linearSol") }}</li>
                  <li class="disflex55 pdingf10">
                    <span>{{ $t("HCFD.solution.meanflow") }}</span>
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.meanflow_sweeps"
                    ></el-input>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span>{{ $t("HCFD.solution.turbulence") }}</span>
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.turbulence_sweeps"
                    ></el-input>
                  </li>
                  <li class="disflex pdingf10">
                    <span>{{ $t("HCFD.solution.gcr") }}</span>
                    <el-radio-group
                      v-model="parameterObj.nmlParam.line_implicit"
                      class="disflex"
                    >
                      <el-radio label="off" style="margin:0 10px 0 0">Off</el-radio>
                      <el-radio label="on">On</el-radio>
                    </el-radio-group>
                  </li>
                </el-col>
                <el-col>
                  <li class="title">
                    {{ $t("HCFD.solution.initialization") }}
                  </li>
                  <el-radio-group v-model="initialization" size="mini" class="pdingf10">
                    <el-radio label="freestreams">{{
                      $t("HCFD.solution.freestreams")
                    }}</el-radio>
                    <el-radio label="specified">{{
                      $t("HCFD.solution.specified")
                    }}</el-radio>
                  </el-radio-group>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.solution.run") }}</li>
                  <li class="disflex55 pdingf10">
                    <span style="width:51%">{{ $t("HCFD.solution.iterNum")}}</span>
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.steps"
                    ></el-input>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span style="width:51%">{{ $t("HCFD.solution.stopToler")}}</span>
                    <el-input
                      size="mini"
                      v-model="parameterObj.nmlParam.stopping_tolerance"
                    ></el-input>
                  </li>
                  <li class="discenter">
                    <el-button
                      size="mini"
                       type="success"
                      icon="el-icon-arrow-down"
                      @click="dialog.runc_visiable = true"
                      >more</el-button
                    >
                  </li>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.solution.outCon") }}</li>
                  <li class="discenter padding0">
                    <el-button
                      size="mini"
                       type="success"
                      @click="dialog.boundaryo_visiable = true"
                    >
                      <el-image :src="boundary"></el-image
                      >{{ $t("HCFD.solution.bounOut") }}
                    </el-button></li>
                  <li class="discenter padding0">
                    <el-button
                      size="mini"
                       type="success"
                      @click="dialog.volumeo_visiable = true"
                    >
                      <el-image :src="volume"> </el-image
                      >{{ $t("HCFD.solution.volOut") }}
                    </el-button>
                  </li>
                </el-col>
                <el-col>
                  <li class="title">{{ $t("HCFD.solution.advance") }}</li>
                  <li class="discenter padding0">
                    <el-button
                    size="mini"
                     type="success"
                    @click="dialog.specialp_visiable = true"
                  >
                    <el-image :src="special"></el-image
                    >{{ $t("HCFD.solution.specialPara") }}
                  </el-button>
                  </li>
                  <li class="discenter padding0">
                    <el-button type="success" size="mini" @click="dialog.swap_visiable = true">
                    <el-image :src="swap"></el-image
                    >{{ $t("HCFD.solution.swapYZ") }}
                  </el-button>
                  </li>
                  <div class="discenter padding0">
                    <div>
                      <el-button
                        size="mini"
                         type="primary"
                        v-show="runMonitor"
                        @click="hcfdrun(true)"
                      >
                        <div class="disflex">
                          <el-image :src="run" style="width:15px"></el-image>
                          <span class="borun">Run</span>
                        </div>
                      </el-button>
                      <el-button
                        size="mini"
                         type="primary"
                        @click="showMonitor()"
                        v-show="runMonitor"
                        >Monitor</el-button
                      >
                    </div>
                  </div>
                </el-col>
                <!-- <el-col :span="0">
              <div class="line"></div> </el-col > -->
              </el-row>
            </div>
          </div>
          <!-- 第四个 -->
          <div class="lg-modl" v-show="TaskSurfaceshow">
            <div class="logs_title">
              Task Page
              <div class="x" @click="taskchangSurface()">x</div>
            </div>
            <div class="el-padding Task-lg task-si" :class="headMenu_2Show?'maxh290':'maxh100'">
              <el-row
                ><el-col>
                  <li class="title">Surface Grid</li>
                  <li class="disflex55 pdingf10">
                    <span>Steps</span>
                    <el-select size="mini" v-model="bStep" placeholder="请选择">
                      <el-option
                        v-for="setep in boundaryStep"
                        :key="setep"
                        :label="setep"
                        :value="setep"
                      >
                      </el-option>
                    </el-select>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span>Scalar Selection</span>
                    <el-select
                      size="mini"
                      v-model="bScalar"
                      placeholder="请选择"
                    >
                      <el-option
                        v-for="scalar in boundaryScalars"
                        :key="scalar"
                        :label="scalar"
                        :value="scalar"
                      >
                      </el-option>
                    </el-select>
                  </li>
                  <li class="disflex55 lheig34 pdingf10">
                    <span>Vector Selection</span>
                    <el-checkbox checked>Velocity</el-checkbox>
                  </li>
                  <li class="disflex55 lheig34 pdingf10">
                    <span>Show Element</span>
                    <el-checkbox-group v-model="belementCheckeds" class="discenter">
                      <el-checkbox
                        label="Mesh"
                        style="margin:0 8px 0 0"
                        @change="Contourval('Mesh')"
                      ></el-checkbox>
                      <el-checkbox
                        label="Contour"
                        @change="Contourval('Contour')"
                      ></el-checkbox>
                    </el-checkbox-group>
                  </li>
                  <li class="discenter">
                    <el-button
                      size="mini"
                      type="primary"
                      @click="showSurface()"
                      >Show Surface</el-button
                    >
                  </li>
                </el-col>
              </el-row>
            </div>
          </div>
          <!-- 第五个 -->
          <div class="lg-modl" v-show="TaskVolumeshow">
            <div class="logs_title">
              Task Page
              <div class="x" @click="taskchangVolume()">x</div>
            </div>
            <div class="el-padding Task-lg task-si" :class="headMenu_2Show?'maxh290':'maxh100'">
              <el-row>
                <el-col class="lg-si-right">
                  <li class="title">Volume Grid</li>
                  <li class="disflex55 pdingf10">
                    <span>Steps</span>
                    <el-select size="mini" v-model="vStep" placeholder="请选择">
                      <el-option
                        v-for="setep in volumStep"
                        :key="setep"
                        :label="setep"
                        :value="setep"
                      >
                      </el-option>
                    </el-select>
                  </li>
                  <li class="disflex55 pdingf10">
                    <span>Scalar Selection</span>
                    <el-select
                      size="mini"
                      v-model="vSalar"
                      placeholder="请选择"
                    >
                      <el-option
                        v-for="scalar in volumScalars"
                        :key="scalar"
                        :label="scalar"
                        :value="scalar"
                      >
                      </el-option>
                    </el-select>
                  </li>
                  <li class="disflex55 lheig34 pdingf10">
                    <span>Vector Selection</span>
                     <el-checkbox checked>Velocity</el-checkbox>
                  </li>
                  <li class="disflex55 lheig34 pdingf10">
                    <span>Show Element</span>
                    <el-checkbox-group v-model="velementCheckeds" class="discenter">
                      <el-checkbox
                        label="Mesh"
                        style="margin:0 8px 0 0"
                        @change="ContourvalVolume('Mesh')"
                      ></el-checkbox>
                      <el-checkbox
                        label="Contour"
                        @change="ContourvalVolume('Contour')"
                      ></el-checkbox>
                    </el-checkbox-group>
                  </li>
                  <li class="discenter">
                    <el-button type="primary" size="mini" @click="showVolume()"
                      >Show Volume</el-button
                    >
                  </li>
                </el-col>
              </el-row>
            </div>
          </div>
        </div>

        <!-- Task Page的弹框的结束-->
        <el-container class="beij-container">
          <el-aside v-if="leftMenu_2Show" class="leftMenu_1_1">Aside</el-aside>
          <el-container>
            <el-main ref="main3d" :class="headMenu_2Show?'maxh400':'maxh221'">
              <echartsHFCD ref="monitor" :name="project.projectName"></echartsHFCD>
              <ugrid-load
                ref="ugridLoad"
                :renderer_hight="renderer_hight"
                :renderer_width="renderer_width"
              ></ugrid-load>
              <volum-load
                ref="volumLoad"
                @showVolume="showVolume"
                :renderer_hight="renderer_hight"
                :renderer_width="renderer_width"
                @setVolumScalars="setVolumScalars($event)"
              ></volum-load>
              <boundary-load
                ref="boundaryLoad"
                @showSurface="showSurface"
                :bScalar="bScalar"
                :contourLevel="contourLevel"
                :renderer_hight="renderer_hight"
                :renderer_width="renderer_width"
                @setBoundaryScalars="setBoundaryScalars($event)"
              ></boundary-load>
              <!-- 颜色条 -->
              <!-- <div class="colortiao"></div>
               <vtkLoad ref="vtkLoad" :bScalar='bScalar' :contourLevel="contourLevel">
            </vtkLoad>  -->
            </el-main>
            <!-- <div class="x" @click="change">==</div> -->
            <el-footer style="height: 160px" v-show="Consoleshow">
              <div class="logs_title">
                Console
                <div class="x">x</div>
                <div class="exloadbox" :style="{ visibility: exLoading}">
                  <span>正在求解中</span>
                  <i class="el-icon-loading"></i>
                </div>
              </div>
              <div class="logs_console">
                <textarea v-model="logs" style="width: 100%;height:120px">
                  "欢迎来到HCFD！"
                </textarea>
              </div>
            </el-footer>
          </el-container>
        </el-container>
      </el-container>
    </el-container>

    <el-dialog
      :close-on-click-modal="false"
      title="New"
      :visible.sync="dialog.new_visiable"
      class="dialog lg-dialog-2"
    >
      <el-form>
        <el-form-item>
          <span>Project Name</span>
          <el-input v-model="project.projectName"></el-input>
          <span>Project description</span>
          <el-input v-model="project.projectDesc"></el-input>
        </el-form-item>
        <el-form-item label="File Type">
          <el-radio disabled v-model="project.fileType" label="binary"
            >Binary</el-radio
          >
          <el-radio v-model="project.fileType" label="ascii">ASCII</el-radio>
        </el-form-item>
        <vue-uploader
          ref="ugrid"
          :projectId="project.projectId"
          :solverType="'hcfd'"
          :accept="'.ugrid'"
          :name="'Load Grid File'"
          :upId="'2'"
        ></vue-uploader>
        <vue-uploader
          ref="mapbc"
          :projectId="project.projectId"
          :solverType="'hcfd'"
          :accept="'.mapbc'"
          :name="'Load BC File'"
          :upId="'1'"
        ></vue-uploader>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info" @click="dialog.new_visiable = false">Cancel</el-button>
        <el-button type="danger" @click="reUpload">Reupload</el-button>
        <el-button type="warning" @click="saveProject('newProject')">Save</el-button>
        <el-button type="primary" @click="ugridShow">OK</el-button>
      </div>
    </el-dialog>
    <el-dialog
      :close-on-click-modal="false"
      title="Load"
      :visible.sync="dialog.load_visiable"
      width="45%"
      class="dialog"
    >
      <el-form>
        <el-table
          v-loading="loading"
          :data="projects"
          border
          height="250"
          ref="projectsTable"
          @selection-change="projectsSelectionChange"
          @select="projectsSelectionSelect"
        >
          <el-table-column type="selection" />
          <el-table-column property="projectId" label="Project ID" />
          <el-table-column property="projectName" label="Project Name" />
          <el-table-column property="createTime" label="Project Create Time" />
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="dialog.load_visiable = false">Cancel</el-button>
        <el-button type="primary" @click="selectProjectOK()">OK</el-button>
      </div>
    </el-dialog>
 <el-dialog
      :close-on-click-modal="false"
      title="资源选择"
      :visible.sync="dialog.ziyuan"
      width="45%"
      class="dialog"
    >
      <el-form>
        <el-table
          v-loading="loading"
          :data="ziyprojects"
          border
          :row-key="getRowKeys"
          height="250"
          ref="multipleTable"
          @selection-change="ziySelectionChange"
          @select="ziySelectionSelect"
        > 
          <el-table-column type="selection"  label="选择" :reserve-selection="true"/>
          <el-table-column property="id" label="ID" />
          <el-table-column property="resIp" label="资源内网IP" />
          <el-table-column property="resShortname" label="资源简称" />
        </el-table>
      </el-form>
        <div class="pagination">
      <Pagination
        :pagination-config="paginationConfig"
        @putPagination="getPagination"
      ></Pagination>
    </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="dialog.ziyuan = false">Cancel</el-button>
        <el-button type="primary"  @click='resourceOK()'>OK</el-button>
      </div>
    </el-dialog>
    <el-dialog
      title="Scale"
      :visible.sync="dialog.scale_visiable"
      :close-on-click-modal="false"
      width="20%"
    >
      <el-form>
        <div class="disflex">
          <span class="sblock">Factor</span>
          <el-input class="inpwidth" v-model="geneal.MeshTransform.Scale.Factor"></el-input>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="dialog.scale_visiable = false">Cancel</el-button>
        <el-button type="primary" @click="dialog.scale_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
      title="Translation"
      :visible.sync="dialog.translation_visiable"
      :close-on-click-modal="false"
      width="511px"
    >
      <el-form class="div64">
        <div>
          <span>Distance</span>
          <el-input
            v-model="geneal.MeshTransform.Translation.Distance"
          ></el-input>
        </div>
        <div>
          <span>X-Component of Translation Unit Vector</span>
          <el-input v-model="geneal.MeshTransform.Translation.X"></el-input>
        </div>
        <div>
          <span>Y-Component of Translation Unit Vector&nbsp;&nbsp;&nbsp;</span>
          <el-input v-model="geneal.MeshTransform.Translation.Y"></el-input>
        </div>
        <div>
          <span>Z-Component of Translation Unit Vector&nbsp;&nbsp;&nbsp;</span>
          <el-input v-model="geneal.MeshTransform.Translation.Z"></el-input>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="dialog.translation_visiable = false"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.translation_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
      :close-on-click-modal="false"
      title="Rotation"
      :visible.sync="dialog.rotation_visiable"
      width="500px"
    >
      <el-form class="div64">
        <div>
          <span>Angle(deg)</span>
          <el-input v-model="geneal.MeshTransform.Rotation.Angle"></el-input>
        </div>

        <div>
          <span>X-Coordinate of Rotation Origin</span>
          <el-input
            class="lg-Rotation"
            v-model="geneal.MeshTransform.Rotation.X"
          ></el-input>
        </div>
        <div>
          <span>Y-Coordinate of Rotation Origin</span>
          <el-input
            class="lg-Rotation"
            v-model="geneal.MeshTransform.Rotation.Y"
          ></el-input>
        </div>
        <div>
          <span>Z-Coordinate of Rotation Origin</span>
          <el-input
            class="lg-Rotation"
            v-model="geneal.MeshTransform.Rotation.Z"
          ></el-input>
        </div>

        <div>
          <span>X-Component of Rotation Axis Unit Vector</span>
          <el-input
            class="lg-Rotation2"
            v-model="geneal.MeshTransform.Rotation.X1"
          ></el-input>
        </div>
        <div>
          <span>Y-Component of Rotation Axis Unit Vector</span>
          <el-input
            class="lg-Rotation2"
            v-model="geneal.MeshTransform.Rotation.Y1"
          ></el-input>
        </div>
        <div>
          <span>Z-Component of Rotation Axis Unit Vector</span>
          <el-input
            class="lg-Rotation2"
            v-model="geneal.MeshTransform.Rotation.Z1"
          ></el-input>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="dialog.rotation_visiable = false">Cancel</el-button>
        <el-button type="primary" @click="dialog.rotation_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
      title="Upload File"
      :visible.sync="dialog.upload_visiable"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      width="535px"
      center
    >
      <div>
        <div>
          <h4>upLoader File</h4>
          <p>
            <span
              v-for="(item, i) in fileNames"
              :key="i"
              style="padding: 0 5px"
              >{{ item }}</span
            >
          </p>
        </div>
        <vue-uploader
          ref="ugrid"
          :projectId="project.projectId"
          :solverType="'hcfd'"
          :accept="'.ugrid'"
          :name="'Load Grid File'"
          :upfileName="this.fileNames"
          :upId="'2'"
        ></vue-uploader>
        <vue-uploader
          ref="mapbc"
          :projectId="project.projectId"
          :solverType="'hcfd'"
          :accept="'.mapbc'"
          :name="'Load BC File'"
          :upfileName="this.fileNames"
          :upId="'1'"
        ></vue-uploader>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialog.upload_visiable = false">Cancel</el-button>
        <!-- <el-button  @click="reUpload">Reupload</el-button> -->
        <el-button type="info"  @click="reUpload">Save</el-button>
        <el-button type="primary" @click="ugridShow(), (dialog.upload_visiable = false)"
          >OK</el-button
        >
      </span>
    </el-dialog>

    <el-dialog
      :close-on-click-modal="false"
      title="Laminar"
      :visible.sync="dialog.laminar_visiable"
      width="23%"
    >
      <el-form class="div64">
        <div>
          <span>Molecular Prandtl Number</span>
          <el-input
            v-model="parameterObj.nmlParam.prandtlnumber_molecular"
          ></el-input>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.laminar_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.laminar_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      class="dialog-block"
      title="Turbulent"
      :visible.sync="dialog.turbulent_visiable"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group v-model="parameterObj.nmlParam.turb_model">
          <el-radio :label="'sa'">SA</el-radio>
          <el-radio :label="'menter-sst'">Menter-SST</el-radio>
          <el-radio :label="'k-omega-sst'">k-omega-SST</el-radio>
          <el-radio :label="'sa-des'">SA-DES</el-radio>
          <el-radio :label="'k-omega-des'">k-omega-DES</el-radio>
          <el-radio :label="'linear-k-epsilon'">Linear-k-epsilon</el-radio>
          <el-radio :label="'abid-k-epsilon'">Abid-k-epsilon</el-radio>
          <el-radio :label="'menter-sst-les'">Menter-SST-LES</el-radio>
          <el-radio :label="'Wilcox-les'">Wilcox-LES</el-radio>
        </el-radio-group>
        <div class="disflex55">
          <span>Molecular Prandtl Number</span>
          <el-input
            class="lg-Rotation"
            v-model="parameterObj.nmlParam.prandtlnumber_molecular"
          ></el-input>
        </div>
        <div class="disflex55">
          <span>Turbulent Prandtl Number</span>
          <el-input
            class="lg-Rotation"
            v-model="Physics.Turbulent.TurbulentPrandtlNumber"
          ></el-input>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
           type="info" 
          @click="referencevisiable((dialog.turbulent_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.turbulent_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      class="Conditions"
      title="Reference Conditions"
      :visible.sync="dialog.reference_visiable"
      :close-on-click-modal="false"
      width="500px"

    >
      <el-form class="lg-form">
        <li>
          <span>Mach Number</span>
          <el-input v-model="parameterObj.nmlParam.mach_number"></el-input>
        </li>
        <li>
          <span>Reynolds Number</span>
          <el-input v-model="parameterObj.nmlParam.reynolds_number"></el-input>
        </li>
        <li>
          <span>Temperature</span>
        </li>
        <li>
          <el-radio-group v-model="parameterObj.nmlParam.temperature_units">
            <el-radio :label="'Kelvin'">Kelvin</el-radio>
            <el-radio :label="'Rankine'">Rankine</el-radio>
          </el-radio-group>
          <el-input v-model="parameterObj.nmlParam.temperature"></el-input>
        </li>
        <li>
          <span>Angle of Attack (deg)</span>
          <el-input v-model="parameterObj.nmlParam.angle_of_attack"></el-input>
        </li>
        <li>
          <span>Angle of Yaw (deg) </span>
          <el-input v-model="parameterObj.nmlParam.angle_of_yaw"></el-input>
        </li>
        <li>
          <span>Reference Area </span>
          <el-input v-model="parameterObj.nmlParam.area_reference"></el-input>
        </li>
        <li>
          <span>Length In X About Moment of Y Axis</span>
          <el-input v-model="parameterObj.nmlParam.x_moment_length"></el-input>
        </li>
        <li>
          <span>Length In Y About Moment of X and Z Axis</span>
          <el-input v-model="parameterObj.nmlParam.y_moment_length"></el-input>
        </li>
        <li>
          <span>Location of Moment Center</span>
        </li>
        <li>
          <span>X-Coordinate</span>
          <el-input v-model="parameterObj.nmlParam.x_moment_center"></el-input>
        </li>
        <li>
          <span>Y-Coordinate</span>
          <el-input v-model="parameterObj.nmlParam.y_moment_center"></el-input>
        </li>
        <li>
          <span>Z-Coordinate</span>
          <el-input v-model="parameterObj.nmlParam.z_moment_center"></el-input>
        </li>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
           type="info" 
          @click="referencevisiable((dialog.reference_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.reference_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      class="lg-Solution"
      title="Flux Residual Construction"
      :visible.sync="dialog.fluxrc_visiable"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group columns='2' v-model="parameterObj.nmlParam.flux_construction">
          <el-radio :label="'roe'">Roe</el-radio>
          <el-radio :label="'vanleer'">vanleer</el-radio>
          <el-radio :label="'hllc'">HLLC</el-radio>
          <el-radio :label="'aufs'">AUFS</el-radio>
          <el-radio :label="'central_diss'">Central_Diss</el-radio>
          <el-radio :label="'dlfss'">LDFSS</el-radio>
          <el-radio :label="'stvd'">STVD</el-radio>
          <el-radio :label="'stvd_modified'">STVD_modified</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.fluxrc_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.fluxrc_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Flux Limiter"
      :visible.sync="dialog.fluxl_visiable"
      class="lg-Solution"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group
          v-model="parameterObj.nmlParam.flux_limiter"
          size="small"
        >
          <el-radio :label="'none'">none</el-radio>
          <el-radio :label="'barth'">barth</el-radio>
          <el-radio :label="'venkat'">venkat</el-radio>
          <el-radio :label="'minmod'">minmod</el-radio>
          <el-radio :label="'vanleer'">vanleer</el-radio>
          <el-radio :label="'vanalbada'">vanalbada</el-radio>
          <el-radio :label="'smooth'">smooth</el-radio>
          <el-radio :label="'hminmod'">hminmod</el-radio>
          <el-radio :label="'hvanleer'">hvanleer</el-radio>
          <el-radio :label="'hvanalbada'">hvanalbada</el-radio>
          <el-radio :label="'hsmooth'">hsmooth</el-radio>
          <el-radio :label="'hvenkat'">hvenkat</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.fluxl_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.fluxl_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Flux Jacobian Construction"
      :visible.sync="dialog.fluxjc_visiable"
      class="lg-Solution"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group
          v-model="parameterObj.nmlParam.flux_construction_lhs"
          size="small"
        >
          <el-radio :label="'roe'">Roe</el-radio><br />
          <el-radio :label="'vanleer'">vanleer</el-radio><br />
          <el-radio :label="'hllc'">HLLC</el-radio><br />
          <el-radio :label="'aufs'">AUFS</el-radio><br />
          <el-radio :label="'central-diss'">Central-Diss</el-radio><br />
          <el-radio :label="'ldfss'">LDFSS</el-radio><br />
          <el-radio :label="'stvd'">STVD</el-radio><br />
          <el-radio :label="'stvd_modified'">STVD_modified</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.fluxjc_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.fluxjc_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
      title="Flux Jacobian Construction"
      :visible.sync="dialog.flujc_visiable"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group v-model="parameterObj.nmlParam.flux_limiter">
          <el-radio :label="'roe'">Roe</el-radio>
          <el-radio :label="'hllc'">HLLC</el-radio>
          <el-radio :label="'aufs'">AUFS</el-radio>
          <el-radio :label="'ldfss'">LDFSS</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.flujc_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.flujc_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Time Scheme"
      :visible.sync="dialog.time_visiable"
      class="lg-Solution"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group v-model="parameterObj.nmlParam.time_accuracy">
          <el-radio :label="'steady'">Steady</el-radio>
          <el-radio :label="'1storder'">1storder</el-radio>
          <el-radio :label="'2ndorder'">2ndorder</el-radio>
          <el-radio :label="'2ndorderOPT'">2ndorderOPT</el-radio>
          <el-radio :label="'3rdorder'">3rdorder</el-radio>
          <el-radio :label="'4thorderMEBDF4'">4thorderMEBDF4</el-radio>
          <el-radio :label="'4thorderESDIRK4'">4thorderESDIRK4</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.time_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.time_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Time Advanced Scheme"
      :visible.sync="dialog.timeasm_visiable"
      :close-on-click-modal="false"
    >
      <el-form class="lg-form">
        <li class="lheig34" style="padding:5px 0">
          <span>Pseudo Time Stepping</span>
          <el-radio-group class="inpw35" style="display:flex" v-model="parameterObj.nmlParam.pseudo_time_stepping">
            <el-radio :label="'on'">On</el-radio>
            <el-radio :label="'off'">Off</el-radio>
          </el-radio-group>
        </li>
        <li>
          <span>Time Step Nondim</span>
          <el-input v-model="parameterObj.nmlParam.time_step_nondim"></el-input>
        </li>
        <li>
          <span>Subiterations</span>
          <el-input v-model="parameterObj.nmlParam.subiterations"></el-input>
        </li>
        <li>
          <span>Schedule Iteration For Ramped CFL</span>
          <el-input
            v-model="parameterObj.nmlParam.schedule_iteration[0]"
          ></el-input>
          <el-input
            v-model="parameterObj.nmlParam.schedule_iteration[1]"
          ></el-input>
        </li>
        <li>
          <span>Schedule CFL</span>
          <el-input v-model="parameterObj.nmlParam.schedule_cfl[0]"></el-input>
          <el-input v-model="parameterObj.nmlParam.schedule_cfl[1]"></el-input>
        </li>
        <li>
          <span>Schedule CFL Turb</span>
          <el-input
            v-model="parameterObj.nmlParam.schedule_cflturb[0]"
          ></el-input>
          <el-input
            v-model="parameterObj.nmlParam.schedule_cflturb[1]"
          ></el-input>
        </li>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="timeasmvisiable">Cancel</el-button>
        <el-button type="primary" @click="dialog.timeasm_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Run Control"
      :visible.sync="dialog.runc_visiable"
      :close-on-click-modal="false"
    >
      <el-form class="lg-form">
        <li>
          Number of Iterations<el-input
            v-model="parameterObj.nmlParam.steps"
          ></el-input>
        </li>
        <li>
          Stopping Tolerance<el-input
            v-model="parameterObj.nmlParam.stopping_tolerance"
          ></el-input>
        </li>
        <li>
          Restart Write Freq<el-input
            v-model="parameterObj.nmlParam.restart_write_freq"
          ></el-input>
        </li>
        <li>
          Jacobian Evaluate Freq<el-input
            v-model="parameterObj.nmlParam.jacobian_eval_freq"
          ></el-input>
        </li>
        <li class="lheig34" style="padding:5px 0">
          Read Restart
          <el-radio-group class="inpw35" v-model="parameterObj.nmlParam.restart_read">
            <el-radio label="off">Off</el-radio>
            <el-radio label="on">On</el-radio>
          </el-radio-group>
        </li>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="runcvisiable">Cancel</el-button>
        <el-button type="primary" @click="dialog.runc_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Boundary Output"
      :visible.sync="dialog.boundaryo_visiable"
      :close-on-click-modal="false"
      class="Conditions lg-out-h"
    >
      <el-form>
        <li class="disflex">
          Output Freq<el-input
            v-model="parameterObj.nmlParam.animation_freq"
          class="inpw50"></el-input>
        </li>
        <li>Output Variables</li>
        <el-checkbox
          :indeterminate="Solution.boundaryout.isIndeterminate"
          v-model="Solution.boundaryout.checkAll"
          @change="solutionbCheckAllChange"
          >All</el-checkbox
        >
          <div>
           <el-checkbox  
                v-model="parameterObj.nmlParam.a_u">X-component of velocity</el-checkbox>
             <el-checkbox   
                v-model="parameterObj.nmlParam.a_v"
              >Y-component of velocity</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.a_w"
              >Z-component of velocity</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.a_p"
              >Press</el-checkbox>
               <el-checkbox   
                v-model="parameterObj.nmlParam.a_cp"
              >Press coefficient</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.a_mach"
              >Mach Number</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.a_vort_mag"
              >Vorticity magnitude</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.a_vort_x "
              >X-component of vorticity</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.a_vort_y"
              >Y-component of vorticity</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.a_vort_z "
              >Z-component of vorticity</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.a_q_criterion"
              >Q Criterion</el-checkbox>
                </div>
        <!-- </el-checkbox-group> -->
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
           type="info" 
          @click="referencevisiable((dialog.boundaryo_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.boundaryo_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      title="Volume Output"
      :visible.sync="dialog.volumeo_visiable"
      class="Conditions lg-out-h"
      :close-on-click-modal="false"
    >
      <el-form>
        <li class="disflex">
          Output Freq<el-input
            v-model="parameterObj.nmlParam.volume_animation_freq"
          class="inpw50"></el-input>
        </li>
        <li>Output Variables</li>
        <el-checkbox
          :indeterminate="Solution.volumout.isIndeterminate"
          v-model="Solution.volumout.checkAll"
          @change="solutionvCheckAllChange"
          >All</el-checkbox
        >
        <!-- <el-checkbox-group
          v-model="Solution.volumout.checkeds"
          @change="solutionvCheckedCitiesChange"
        >
          <el-checkbox
            v-for="cell in Solution.volumout.lists"
            :label="cell"
            :key="cell"
            >{{ cell }}</el-checkbox
          >
        </el-checkbox-group> -->
        <div>
        <el-checkbox  
                v-model="parameterObj.nmlParam.v_u">X-component of velocity</el-checkbox>
             <el-checkbox   
                v-model="parameterObj.nmlParam.v_v "
              >Y-component of velocity</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.v_w"
              >Z-component of velocity</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.v_p "
              >Press</el-checkbox>
               <el-checkbox   
                v-model="parameterObj.nmlParam.v_cp"
              >Press coefficient</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.v_mach"
              >Mach Number</el-checkbox>
               <el-checkbox  
                v-model="parameterObj.nmlParam.v_vort_mag"
              >Vorticity magnitude</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.v_vort_x "
              >X-component of vorticity</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.v_vort_y"
              >Y-component of vorticity</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.v_vort_z "
              >Z-component of vorticity</el-checkbox>
                <el-checkbox   
                v-model="parameterObj.nmlParam.v_q_criterion"
              >Q Criterion</el-checkbox>
               </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.volumeo_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.volumeo_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>

    <el-dialog
      class="lg-y-z"
      title="Special Parameters"
      :visible.sync="dialog.specialp_visiable"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group v-model="parameterObj.nmlParam.large_angle_fix">
          <el-radio label="off">Off</el-radio>
          <el-radio label="on">On</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
           type="info" 
          @click="referencevisiable((dialog.specialp_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.specialp_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>
    <el-dialog
      title="Swap Y-Z Axres"
      :visible.sync="dialog.swap_visiable"
      class="lg-y-z"
      :close-on-click-modal="false"
    >
      <el-form>
        <el-radio-group v-model="parameterObj.nmlParam.swap_yz_axes">
          <el-radio label="false">Off</el-radio>
          <el-radio label="true">On</el-radio>
        </el-radio-group>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="info"  @click="referencevisiable((dialog.swap_visiable = false))"
          >Cancel</el-button
        >
        <el-button type="primary" @click="dialog.swap_visiable = false"
          >OK</el-button
        >
      </div>
    </el-dialog>
    <!-- 单位计算开始 -->
    <!-- Y+ Calculator -->
    <el-dialog
      title="Y+值计算"
      :visible.sync="Yvisiable"
      :close-on-click-modal="false"
    >
      <el-form :model="form" class="gongju">
        <!-- Freestream velocity流速度U∞ -->
        <el-form-item label="自由流速度U∞(m/s):">
          <el-input v-model="form.u_freestream" autocomplete="off"></el-input>
        </el-form-item>
        <!--Density 自由氣流密度ρ  -->
        <el-form-item label="自由氣流密度ρ(kg/m^3):">
          <el-input v-model="form.rho" autocomplete="off"></el-input>
        </el-form-item>

        <!-- Characteristic length 特征长度L-->
        <el-form-item label="特征长度L:(m):">
          <el-input
            v-model="form.L"
            type="number"
            autocomplete="off"
          ></el-input>
        </el-form-item>

        <!-- Dynamic viscosity表流运动粘贴系数μ: -->
        <el-form-item label="表流运动粘贴系数μ(Pa·s):">
          <el-input v-model="form.mu" autocomplete="off"></el-input>
        </el-form-item>
        <!-- Desired Y+ value: -->
        <el-form-item label="Y+:">
          <el-input
            v-model="form.y_plus_desired"
            type="number"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <!-- Reynolds number -->
        <h3 class="Rex">雷诺数:&nbsp;&nbsp;&nbsp;&nbsp;{{ form.Rex }}</h3>
        <!-- Estimated wall distance: -->
        <h3 class="Rex">估计墙距:&nbsp;&nbsp;&nbsp;&nbsp;{{ form.dtc }}</h3>
        <el-form-item style="margin-left: 0">
          <!-- <el-input v-model="form.lys" type="number" autocomplete="off"></el-input> -->
          
            <el-button type="primary" @click="dialogbtny" style="margin:0 0 0 55px">计算</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- r雷诺数计算 -->
    <el-dialog
      title="雷诺数计算"
      :visible.sync="llsvisiable"
      :close-on-click-modal="false"
    >
      <el-form :model="form" class="leiluoshu">
        <el-form-item label="流速v(m/s):">
          <el-input v-model="form.lls" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="密度ρ(kg/m^3)">
          <el-input v-model="form.lmi" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="动力黏性系数η(Pa·s)">
          <el-input v-model="form.ldlzxxs" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="特征长度(内径)d(m):">
          <el-input v-model="form.lld" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="">
          <!-- <el-input v-model="form.lys" type="number" autocomplete="off"></el-input> -->
          <h3 class="Rex">雷诺数Re:{{ form.Re }}</h3>
          <el-button type="primary" style="margin:0 0 0 60px" @click="leinsdialogbtny">计算</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- 单位计算结束 -->
    <filesload
      ref="filesload"
      :fileurls="fileurls"
      @fileLoadeState="fileLoadeState($event)"
    ></filesload>
    <loading ref="loading" :loadObjs="loadObjs"></loading>
    <hcfd-Calculator ref="Calculator"></hcfd-Calculator>
  </div>
</template>
<script>
import adilog from "@/assets/hcfd_images/adilog.png";
import Pagination from '@/components/Pagination'
import scaleimage from "@/assets/hcfd_images/scaleimage.png";
import transformimage from "@/assets/hcfd_images/transformimage.png";
import rotationimage from "@/assets/hcfd_images/rotationimage.png";
import inviscid from "@/assets/hcfd_images/inviscid.png";
import laminar from "@/assets/hcfd_images/laminar.png";
import turbulent from "@/assets/hcfd_images/turbulent.png";
import times from "@/assets/hcfd_images/times.png";
import fluxr from "@/assets/hcfd_images/fluxr.png";
import fluxl from "@/assets/hcfd_images/fluxl.png";
import fluxj from "@/assets/hcfd_images/fluxj.png";
import boundary from "@/assets/hcfd_images/boundary.png";
import volume from "@/assets/hcfd_images/volume.png";
import special from "@/assets/hcfd_images/special.png";
import swap from "@/assets/hcfd_images/swap.png";
import run from "@/assets/hcfd_images/run.png";
import { Message, MessageBox } from "element-ui";
import store from "@/store";
import UgridLoad from "./loads/UgridLoad.vue";
import VolumLoad from "./loads/VolumLoad.vue";
import BoundaryLoad from "./loads/BoundaryLoad.vue";
import { request, uploadFile } from "@/utils/request";
import vueUploader from "./fileupload.vue";
import filesload from "./filesload.vue";
import { Caegw_ProUrl } from "@/settings"; // 引入settings.js
import loading from "./loading.vue";
import transformtool from "../common/transformtool.vue";
import echartsHFCD from "./echartsHFCD.vue";
import Calculator from "./hcfdCalculator.vue";

export default {
  data() {
    return {
      ziyprojects:[],
      paginationConfig: {
        hideSinglePage: false,
        page: 1,
        size: 15,
        sizeList: [10, 15, 30, 50],
        layout: 'total, sizes, prev, pager, next, jumper',
        total: 0,
      },
      getRowKeys(row) {
            return row.id;
        },
      selsectid:[],
      missType:true,
      initialization: "",
      upVisible: false,
      Yvisiable: false,
      llsvisiable: false,
      newload: true,
      runMonitor: true,
      contourLevel: 3,
      exLoading:"hidden",

      form: {
        u_freestream: "",
        rho: "",
        L: "",
        mu: "",
        y_plus_desired: "",

        dtc: "",
        md: "",
        ls: "",
        cd: "",
        Rex: "",
        Re: "",
        lys: "",
        lmi: "",
        ldlzxxs: "",
        lld: "",
        Re: "",
        dtc: "",
        lls: "",
      },
      uploadlist: [
        {
          name: "mapbc",
          percentage: 0,
        },
        {
          name: "ugrid",
          percentage: 0,
        },
      ],
      ContourSurface: false,
      adilog: adilog,
      loading: loading,
      scaleimage: scaleimage,
      transformimage: transformimage,
      rotationimage: rotationimage,
      inviscid: inviscid,
      laminar: laminar,
      turbulent: turbulent,
      times: times,
      fluxr: fluxr,
      fluxj: fluxj,
      fluxl: fluxl,
      boundary: boundary,
      volume: volume,
      special: special,
      run: run,
      swap: swap,
      headMenu_2Show: false,
      leftMenu_2Show: false,
      gennealShow: false,
      physicsShow: false,
      solutionShow: false,
      resultShow: false,
      Consoleshow: true,
      TaskGenealshow: false,
      TaskPhysicsshow: false,
      TaskSolutionshow: false,
      TaskSurfaceshow: false,
      TaskVolumeshow: false,
      ugridUrl: "",
      bload: null,
      websock: null,
      logs: "欢迎来到HCFD！",
      islogload: true, //控制log请求（ture 发起 false 不发起）
      outline: "OutLine",
      fileNames: [],

      belementCheckeds: ["Mesh"],
      boundaryStep: [],
      bStep: 100,
      boundaryScalars: [],
      bScalar: "p",

      velementCheckeds: ["Mesh"],
      vStep: 100,
      volumStep: [],
      volumScalars: [],
      vSalar: "p",

      isSolverEnd: false, //判断是否求解完成
      solverState: "0", //求解状态（0-未求解 1-求解中 2-求解完成）

      menuList: [
        {
          id: "1",
          label: "Setup",
          children: [
            {
              id: "2",
              label: "General",
            },
            {
              id: "3",
              label: "Physics",
            },
            {
              id: "4",
              label: "Solution",
            },
          ],
        },
        {
          id: "5",
          label: "Results",
          children: [
            {
              id: "6",
              label: "Monitor",
            },
            {
              id: "7",
              label: "Surface Grid",
            },
            {
              id: "8",
              label: "Volume Grid",
            },
            {
              id: "9",
              label: "Ugrid",
            },
          ],
        },
      ],

      dialog: {
        //弹出框 控制
        new_visiable: false,
        load_visiable: false,
        ziyuan:false,
        upload_visiable: false,
        scale_visiable: false,
        translation_visiable: false,
        rotation_visiable: false,
        laminar_visiable: false,
        turbulent_visiable: false,
        reference_visiable: false,
        fluxrc_visiable: false,
        fluxl_visiable: false,
        fluxjc_visiable: false,
        time_visiable: false,
        timeasm_visiable: false,
        specified_visiable: false, //未完成
        runc_visiable: false,
        boundaryo_visiable: false,
        volumeo_visiable: false,
        specialp_visiable: false,
        swap_visiable: false,
      },
      geneal: {
        //数据存储
        MeshTransform: {
          Scale: {
            Factor: 1,
          },
          Translation: {
            Distance: 0,
            X: 1,
            Y: 0,
            Z: 0,
          },
          Rotation: {
            Angle: 0,
            X: 0,
            Y: 0,
            Z: 0,
            X1: 1,
            Y1: 0,
            Z1: 0,
          },
        },
      },
      Physics: {
        Turbulent: {
          TurbulentPrandtlNumber: 0.9,
        },
        Boundary: {
          bquery: null, //hcfdBoundary 选中数据 id
          hcfdBoundaryquery: null, //hcfdBoundary 选中数据
          cquery: null,
          /* 黎曼远场边界(Farfield) 5000
           * 自由来流边界（Freestream）5050
           * 无粘壁面(Inviscous Wall) 3000
           * 粘性壁面（Viscous Wall）4000
           * X-对称平面(X-symmetry Plane)6661
           * Y-对称平面(Y-symmetry Plane ) 6662
           * Z-对称平面Z-symmetry Plane) 6663
           * 周期边界(Periodic) 6100*/
          Conditions: [
            { conditionsCode: 5000, name: "Farfield" },
            { conditionsCode: 5050, name: "Freestream" },
            { conditionsCode: 3000, name: "Inviscous Wall" },
            { conditionsCode: 4000, name: "Viscous Wall" },
            { conditionsCode: 6661, name: "X-symmetry Plane" },
            { conditionsCode: 6662, name: "Y-symmetry Plane" },
            { conditionsCode: 6663, name: "Z-symmetry Plane" },
            { conditionsCode: 6100, name: "Periodic" },
          ],
        },
      },
      Solution: {
        boundaryout: {
          checkAll: false,
          checkeds: [],
          lists: [
            "X-component of velocity",
            "Y-component of velocity",
            "Z-component of velocity",
            "Press",
            "Press coefficient",
            "Mach Number",
            "Vorticity magnitude",
            "X-component of vorticity",
            "Y-component of vorticity",
            "Z-component of vorticity",
            "Q Criterion",
          ],
          isIndeterminate: true,
        },
        volumout: {
          checkAll: false,
          checkeds: [],
          lists: [
            "X-component of velocity",
            "Y-component of velocity",
            "Z-component of velocity",
            "Press",
            "Press coefficient",
            "Mach Number",
            "Vorticity magnitude",
            "X-component of vorticity",
            "Y-component of vorticity",
            "Z-component of vorticity",
            "Q Criterion",
          ],
          isIndeterminate: true,
        },
      },
      //state -1,0 ,1
      //message
      //type 1 一般 2 下载
      loadObjs: [],
      loadVVisiable: false,
      loading: false,
      fileurls: [],
      project: {
        projectId: "",
        lesseeId:'',
        projectName: "",
        projectType: "hcfd",
        projectDesc: "",
        fileType: "ascii",
        solverfiles: [],
        solverVolumUrls: [],
        solverBoundaryUrls: [],
        loadfils: [],
        converge: "",
        uid: "",
      },
      projects: [],
      parameterObjclone: [],
      parameterObj: {
        hcfdBoundarys: [
          {
            name: "WING1",
            id: 1,
            conditionsCode: 3000,
          },
        ],
        nmlParam: {
          a_vort_mag: "false",
          case_title: "case_name",
          angle_of_yaw: 0,
          x_moment_center: 0,
          eqn_type: "cal_perf_incompress",
          schedule_cfl: [200, 200],
          swap_yz_axes: "false",
          v_vort_mag: "false",
          pseudo_time_stepping: "on",
          meanflow_sweeps: 15,
          a_p: "true",
          a_u: true,
          a_w: "true",
          a_v: "true",
          dynamic_Mesh: "off",
          jacobian_eval_freq: 10,
          turb_model: "sa",
          grid_format: "aflr3",
          turbulence_sweeps: 10,
          mach_number: 0.5,
          y_moment_length: 1,
          area_reference: 1,
          flux_limiter: "none",
          a_cp: "true",
         viscous_terms : "inviscid",
          volume_animation_freq: 100,
          steps: 1500,
          flux_construction_lhs: "roe",
          stopping_tolerance: 1.0e-15,
          prandtlnumber_molecular: 0.72,
          restart_write_freq: 250,
          v_vort_x: "false",
          schedule_iteration: [1, 50],
          v_vort_y: "false",
          v_vort_z: "false",
          line_implicit: "off",
          temperature_units: "Rankine",
          number_of_Processors: 2,
          x_moment_length: 1,
          time_accuracy: "steady",
          angle_of_attack: 0,
          subiterations: 0,
          artificial_compress: 15,
          a_q_criterion: "false",
          schedule_cflturb: [50, 50],
          schedule: 1,
          first_order_iterations: 0,
          restart_read: "off",
          temperature: 491.4,
          input_version: 2.2,
          namelist_verbosity: "off",
          ignore_euler_number: "false",
          data_format: "ascii",
          v_cp: "true",
          time_step_nondim: 0,
          a_mach: "true",
          large_angle_fix: "off",
          v_p: "true",
          animation_freq: 100,
          v_mach: "true",
          project_rootname: "tf",
          v_v: "true",
          v_q_criterion: "false",
          v_u: "true",
          y_moment_center: 0,
          v_w: true,
          z_moment_center: 0,
          parallel_Optional: "Serial",
          analysis_Type: "Steady",
          noninertial_Reference_Frame: "off",
          flux_construction: "roe",
          a_vort_z: "false",
          a_vort_y: "false",
          a_vort_x: "false",
          reynolds_number: 1000000,
        },
      },

      renderer_hight: 500,
      renderer_width: 500,
      showUgridflag: false, //ugrid 是否显示过
      showSurfaceflag: false, //surface 是否显示过
      showVolumeflage: false, //Volume 是否显示过
      showMonitorflage: false, //Monitor是否显示过
    };
  },
  mounted() {
    // this.project.projectId=this.$route.query.projectId;//获取url 参数
     this.init();
  },
  components: {
    vueUploader,
    filesload,
    loading,
    UgridLoad,
    VolumLoad,
    BoundaryLoad,
    transformtool,
    Pagination,
    // vtkLoad,
    echartsHFCD,
    "hcfd-Calculator": Calculator,
  },
    
//  watch: {
//   docData: {
//    handler(newVal) {
//    let arrboundaryout=[];
//     arrboundaryout.push(this.parameterObj.nmlParam.a_u);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_v);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_w);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_p);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_cp);
//      arrboundaryout.push(this.parameterObj.nmlParam.a_mach);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_vort_mag );
//     arrboundaryout.push(this.parameterObj.nmlParam.a_vort_x);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_vort_y);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_vort_z);
//     arrboundaryout.push(this.parameterObj.nmlParam.a_q_criterion);
//    },
//    deep: true,
// 　　immediate: false,

//   }
// },
  methods: {
    //清除相关信息
    clearAll() {
      this.showUgridflag = false; //ugrid 是否显示过
      this.showSurfaceflag = false; //surface 是否显示过
      this.showVolumeflage = false; //Volume 是否显示过
      this.showMonitorflage = false;

      this.$refs.ugridLoad.clear();
      this.$refs.volumLoad.clear();
      this.$refs.boundaryLoad.clear();

      this.$refs.ugridLoad.hiden();
      this.$refs.volumLoad.hiden();
      this.$refs.boundaryLoad.hiden();
      this.islogload = true;

      this.logs = "";
      this.project = {
        projectId: "",
        projectName: "",
        projectType: "hcfd",
        projectDesc: "",
        fileType: "ascii",
        solverfiles: [],
        solverVolumUrls: [],
        solverBoundaryUrls: [],
        loadfils: [],
        converge: "",
      };
    },
    init() {
      this.project.projectId = this.$route.query.projectId; //获取url 参数
      this.project.lesseeId = this.$store.getters.lesseeId; //获取url 参数
    // this.project.projectId = '86d0d4a3f85c40bea218936b6bad59ca';
    //    this.project.lesseeId = '1'; //获取url 参数
      
      if (
        this.project.projectId != undefined &&
        this.project.projectId != null
      ) {
        this.selectProjectOK();
      }
      this.missType=true
      // console.log( this.project.projectId);
      this.changeRendererSize();
      this.logtime()
    },
    logtime(){
      let self = this;
      let projectId = self.project.projectId;
        if (projectId != null && projectId != "" && self.islogload) {
          self.islogload = false;
          let params = {
            transCode: "A00112",
            projectId: projectId,
            page: 0,
            count: 30,
          };
          request(params)
            .then((res) => {
              let rows = res.rows;
              self.logs = ""; //只显示最新的数据
              rows.forEach((row) => {
                self.logs = row.log + "\n" + self.logs;
                if (row.log.indexOf("Solver end") > 0) {
                  self.isSolverEnd = true;
                }
              });
              self.islogload = true;
            })
            .catch((err) => {
              self.islogload = true;
            });
        }
    },
    getlogs(){
      var self = this;
      let logtime=setInterval(getLog, 10000);
      function getLog() {
        let projectId = self.project.projectId;
        if (projectId != null && projectId != "" && self.islogload) {
          self.islogload = false;
          let params = {
            transCode: "A00112",
            projectId: projectId,
            page: 0,
            count: 30,
          };
          request(params)
            .then((res) => {
              let rows = res.rows;
              self.logs = ""; //只显示最新的数据
              rows.forEach((row) => {
                self.logs = row.log + "\n" + self.logs;
                if (row.log.indexOf("Solver end") >= 0) {
                  // console.log(row.log)
                  self.exLoading='hidden';
                  clearInterval(logtime)
                  self.isSolverEnd = true;
                }
              });
              self.islogload = true;
            })
            .catch((err) => {
              self.islogload = true;
              // self.exLoading='hidden';
              clearInterval(logtime)
            });
        }
      }
      getLog();
    },
    setBoundaryScalars(scalars) {
      this.boundaryScalars = scalars;
    },
    setVolumScalars(scalars) {
      console.log(scalars)
      this.volumScalars = scalars;
    },
    changeRendererSize() {
      let allHight = this.$refs.all_w.offsetHeight;
      let allwidth = this.$refs.all_w.offsetWidth;
      this.$nextTick(() => {
        if (!this.headMenu_2Show) {
          this.renderer_hight = allHight - 61 - 149 - 13;
          this.renderer_width = allwidth - 300;
          this.$refs.transform.changeCssBig();
        } else if (this.headMenu_2Show) {
          this.renderer_hight = allHight - 61 - 207 - 149 - 6;
          this.renderer_width = allwidth - 300;
          this.$refs.transform.changeCssSmall();
        }
      });
    },
    change() {
      this.Consoleshow = !this.Consoleshow;
    },
    // 工具栏的点击事件
    yCalchange() {
      this.Yvisiable = true;
    },
    reyCalchange() {
      this.llsvisiable = true;
    },
    atmoCalchange() {},
    // 弹框执行事件
    referencevisiable() {
      this.parameterObjclone = JSON.parse(sessionStorage.getItem("res"));
      this.parameterObj.nmlParam = this.parameterObjclone.nmlParam;
      // this.dialog.scale_visiable = false;
    },
    // referencevisiable(){
    // this.parameterObjclone=JSON.parse(sessionStorage.getItem('res'));
    //   this.parameterObj.nmlParam= this.parameterObjclone.nmlParam;
    // this.dialog.reference_visiable = false;
    // },
    timeasmvisiable() {
      this.parameterObjclone = JSON.parse(sessionStorage.getItem("res"));
      this.parameterObj.nmlParam = this.parameterObjclone.nmlParam;
      this.dialog.timeasm_visiable = false;
    },
    runcvisiable() {
      this.parameterObjclone = JSON.parse(sessionStorage.getItem("res"));
      this.parameterObj.nmlParam = this.parameterObjclone.nmlParam;
      this.dialog.runc_visiable = false;
    },
    dialogbtny() {
      let u_freestream = eval(this.form.u_freestream);
      if (u_freestream <= 0.0) {
        alert("Free stream velocity must be greater than zero");
        return;
      }

      let rho = eval(this.form.rho);
      if (rho <= 0.0) {
        alert("Density must be greater than zero");
        return;
      }
      let L = eval(this.form.L);
      if (L <= 0.0) {
        alert("Boundary layer reference length must be greater than zero");
        return;
      }
      let mu = eval(this.form.mu);
      if (mu <= 0.0) {
        alert("Dynamic viscosity must be greater than zero");
        return;
      }
      let y_plus_desired = eval(this.form.y_plus_desired);
      if (y_plus_desired <= 0.0) {
        alert("Desired y+ value must be greater than zero");
        return;
      }
      let Re = (rho * u_freestream * L) / mu;
      let C_f = 0.026 * Math.pow(Re, -(1.0 / 7.0));
      C_f = 0.0576 * Math.pow(Re, -1.0 / 5.0);
      C_f = 0.37 * Math.pow(Math.log(Re) / Math.log(10), -2.584);
      C_f = Math.pow((2 * Math.log(Re)) / Math.log(10) - 0.65, -2.3);
      let tau_w = C_f * 0.5 * rho * u_freestream * u_freestream;
      let U_f = Math.sqrt(tau_w / rho);
      let wall_distance_estimation = (y_plus_desired * mu) / (U_f * rho);
      this.form.Rex = Re.toExponential(1);
      this.form.dtc = wall_distance_estimation.toExponential(1);
    },
    leinsdialogbtny() {
      this.form.Re =
        (this.form.lmi * this.form.lls * this.form.lld) / this.form.ldlzxxs;
      // console.log(this.form.Re);
    },
    unitConversion() {
      this.$refs.Calculator.visiable = true;
    },
    taskchangGeneal() {
      this.TaskGenealshow = false;
    },
    taskchangPhysics() {
      this.TaskPhysicsshow = false;
    },
    taskchangSolution() {
      this.TaskSolutionshow = false;
    },
    taskchangSurface() {
      this.TaskSurfaceshow = false;
    },
    taskchangVolume() {
      this.TaskVolumeshow = false;
 
    },
    //  Contour

    Contourval(val) {
      switch (val) {
        case "Mesh":
          this.showSurface();
          break;
        case "Contour":
          // this.$refs.boundaryLoad.divb=false;
          this.showSurface();
      }
    },
    ContourvalVolume(val) {
      switch (val) {
        case "Mesh":
          this.showVolume();
          break;
        case "Contour":
          this.showVolume();
      }
    },
    physicslaminar() {
      this.dialog.laminar_visiable = true;
    },
    physicsturbulent() {
      this.dialog.turbulent_visiable = true;
    },
    viscouschange() {
      if (this.parameterObj.nmlParam.viscous_terms == "laminar") {
        this.dialog.laminar_visiable = true;
      } else if (this.parameterObj.nmlParam.viscous_terms == "turbulent") {
        this.dialog.turbulent_visiable = true;
      }
    },
    showHeadMenu(emt) {
      if (
        (emt == "geneal" && this.gennealShow && this.headMenu_2Show) ||
        (emt == "physics" && this.physicsShow && this.headMenu_2Show) ||
        (emt == "solution" && this.solutionShow && this.headMenu_2Show) ||
        (emt == "result" && this.resultShow && this.headMenu_2Show)
      ) {
        this.headMenu_2Show = false;
        this.changeRendererSize();
        
        return;
      }
      this.headMenu_2Show = true;

      if (emt == "geneal") {
        this.gennealShow = true;
        this.physicsShow = false;
        this.solutionShow = false;
        this.resultShow = false;
      }
      if (emt == "physics") {
        this.gennealShow = false;
        this.physicsShow = true;
        this.solutionShow = false;
        this.resultShow = false;
      }
      if (emt == "solution") {
        this.gennealShow = false;
        this.physicsShow = false;
        this.solutionShow = true;
        this.resultShow = false;
      }
      if (emt == "result") {
        this.gennealShow = false;
        this.physicsShow = false;
        this.solutionShow = false;
        this.resultShow = true;
        //  console.log(this.$refs.boundaryLoad.container_show)
        //   console.log(this.$refs.volumLoad.container_show)
        if (
          this.$refs.boundaryLoad.container_show == false &&
          this.$refs.volumLoad.container_show == false
        ) {
          this.showSurface()
          this.showVolumers()
        } else {
        }
      }
      this.changeRendererSize();
    },
    showLeftMenu(emt) {
      this.leftMenu_2Show = true;
    },
    uploadRequest1(params) {
      let param = new FormData();
      param.append("transCode", "A00102");
      param.append("file", params.file);
      param.append("projectId", this.project.projectId);
      uploadFile(param)
        .then((res) => {
          // console.log(res);
          // this.fileId = res.fileId
          this.findParam();
          this.getHCFDLoadFiles();
        })
        .catch((err) => {});
    },
    uploadRequest2(params) {
      let param = new FormData();
      param.append("transCode", "A00102");
      param.append("file", params.file);
      param.append("projectId", this.project.projectId);
      uploadFile(param)
        .then((res) => {
          // console.log(res);
          // this.fileId = res.fileId
          this.findParam();
        })
        .catch((err) => {});
    },
    //获取上传文件
    async getHCFDLoadFiles() {
      let params = {
        transCode: "A00110",
        projectId: this.project.projectId,
      };
      await request(params)
        .then((res) => {
          this.project.loadfils = res.files;
          this.fileNames = [];
          res.files.forEach((url) => {
            let names = url.filepath.split("/");
            let name = names[names.length - 1];
            this.fileNames.push(name);
          });
        })
        .catch((err) => {});
    },
    //获取计算结果文件 并缓存
    async gethcfdsolverfiles() {
      let params = {
        transCode: "A00109",
        projectId: this.project.projectId,
      };
      await request(params)
        .then((res) => {
          this.project.solverfiles = res.files;
        })
        .catch((err) => {});
      this.project.solverfiles.forEach((solverfile) => {
        let url = solverfile.filepath;
        if (
          url.indexOf("volume_timestep") > 1 ||
          url.indexOf("boundary_timestep") > 1 ||
          url.indexOf("converge.dat") > 1
        ) {
          let names = url.split("/");
          let name = names[names.length - 1];
          let loadOj3 = {
            type: 2,
            filename: name,
            percentage: 0,
          };
          this.loadObjs.push(loadOj3);
          this.$refs.filesload.load(url);
        }
        if (url.indexOf("volume_timestep") > 1) {
          this.project.solverVolumUrls.push(url);
        }
        if (url.indexOf("boundary_timestep") > 1) {
          this.project.solverBoundaryUrls.push(url);
        }
        if (url.indexOf("converge.dat") > 1) {
          this.project.converge = url;
        }
      });
      this.project.solverVolumUrls.forEach((url) => {
        let step = url.split("volume_timestep")[1].split(".da")[0];
        this.bStep=step;
        this.volumStep.push(step);
        let newArr = [...new Set(this.volumStep)]; //去重
        this.volumStep = newArr;
      });
      this.project.solverBoundaryUrls.forEach((url) => {
        let step = url.split("boundary_timestep")[1].split(".da")[0];
        this.vStep=step;
        this.boundaryStep.push(step);
        let newArr = [...new Set(this.boundaryStep)]; //去重
        this.boundaryStep = newArr;
      });
    },
    /**
     * 更新配置 并求解
     */
    async hcfdrun() {
      // this.clearAll();
      this.showUgridflag = false; //ugrid 是否显示过
      this.showSurfaceflag = false; //surface 是否显示过
      this.showVolumeflage = false; //Volume 是否显示过
      this.showMonitorflage = false;

      this.$refs.ugridLoad.clear();
      this.$refs.volumLoad.clear();
      this.$refs.boundaryLoad.clear();

      this.$refs.ugridLoad.hiden();
      this.$refs.volumLoad.hiden();
      this.$refs.boundaryLoad.hiden();
      this.islogload = true;

      // this.loadObjs = [];
      
      // let loadOj1 = {
      //   type: 1,
      //   message: "参数更新",
      //   state: -1,
      // };
      // this.loadObjs.push(loadOj1);
      // let loadOj2 = {
      //   type: 1,
      //   message: "求解",
      //   state: -1,
      // };
      // this.loadObjs.push(loadOj2);
      await this.updateParam();
      // loadOj1.state = 1;

      if (this.solverState == "2") {
        //上次求解完成
        MessageBox.confirm(
          "已完成计算，是否放弃上次计算结果，重新计算? 如果不放弃请自行下载上次结果文件！",
          "提示",
          {
            confirmButtonText: "重新计算",
            cancelButtonText: "取消",
            type: "warning",
          }
        )
          .then(() => {
            MessageBox.close();
            this.exLoading='visible';
            this.isSolverEnd = false;
            this.hcfdExe();
            let _this = this;
            let isStop = false;
            setInterval(function () {
              if (!isStop && _this.isSolverEnd) {
                isStop = true;
                // loadOj2.state = 1;
                _this.showHeadMenu("result");
                
              }
            }, 500);
            //  let logUrl = window.location.protocol+"//"+window.location.host+"/"+Caegw_LogUrl;
            //  // console.log(logUrl);
            //  window.location.href=logUrl
          })
          .catch(() => {
            Message.info("已取消！");
            loadOj2.state = 1;
            MessageBox.close();
          });
      } else {
        this.exLoading='visible';
        this.isSolverEnd = false;
        this.hcfdExe();
        let _this = this;
        let isStop = false;
        setInterval(function () {
          if (!isStop && _this.isSolverEnd) {
            isStop = true;
            // loadOj2.state = 1;
            // _this.gethcfdsolverfiles();
            _this.showHeadMenu("result");
          }
        }, 500);
      }
    },
    //求解
    hcfdExe() {
      var _this = this;
      let params = {
        transCode: "A00105",
        projectId: this.project.projectId,
        lesseeId:this.$store.getters.lesseeId,
        userName:this.$store.getters.name
      };
      request(params)
        .then((res) => {
          // console.log("hcfdExe" + res);
          this.getlogs()
        })
        .catch((err) => {
          //  console.log("hcfdExe" + err);
          setTimeout(function () {
            _this.$refs.loading.visiable = false;
          }, 4000);

          if (err.returnCode == "EB8100017") {
            //资源未分配
            // _this.loading=false;
            //_this.$refs.loading.visiable=false
            // console.log(1111);
            MessageBox.confirm("你还未分配资源?", "提示", {
              confirmButtonText: "分配资源",
              cancelButtonText: "取消",
              type: "warning",
            })
              .then(() => {
                // const errUril = Caegw_ProUrl +"?projectId="+_this.project.projectId;
                let errUril =
                  // window.location.protocol +
                  // "//" +
                  // window.location.host +
                  // "/" +
                  _this.$store.getters.proUrl +
                  "?projectId=" +
                  _this.project.projectId;
                let params2 = {
                  transCode: "A00118",
                  lesseeId: _this.$store.getters.lesseeId
                };
                request(params2)
                  .then((res) => {
                    window.location.href =
                      errUril + "&authCode=" + res.authCode;
                  })
                  .catch((err) => {});
              })
              .catch(() => {
                _this.$refs.loading.visiable = false;
                Message({
                  type: "info",
                  message: "已取消",
                });
              });
          }
        });
    },
    async reUpload() {
      this.$refs.mapbc.uploader.upload();
      this.$refs.ugrid.uploader.upload();
    },

    async saveProject(formName) {
      //  this.$refs[formName].validate((valid) => {
      //         if (valid && this.files.length != 0) {
      //         }else{
      //           console.log(2222);
      //         }
      //     })
      const params = {
        transCode: "A00100",
        projectName: this.project.projectName,
        projectDesc: this.project.projectDesc,
        parameterObj: null,
        projectType: "hcfd",
        fileType: this.project.fileType,
        lesseeId: this.$store.getters.lesseeId
      };

      if (
        params.projectName == "" ||
        params.projectName == undefined ||
        params.projectName == null
      ) {
        Message({
          type: "error",
          message: "项目名称不能为空",
        });
      } else if (
        params.projectDesc == "" ||
        params.projectDesc == undefined ||
        params.projectDesc == null
      ) {
        Message({
          type: "error",
          message: "描述信息不能为空",
        });
      } else if (
        this.$refs.mapbc.files.length == 0 ||
        this.$refs.ugrid.files.length == 0
      ) {
        Message({
          type: "error",
          message: "项目文件不能为空",
        });
      } else {
        await request(params)
          .then((res) => {
            this.clearAll();
            // console.log(res);
            this.project.projectId = res.projectId;
            this.project.projectName=res.projectName;
            this.project.projectDesc=res.projectDesc;
            this.project.fileType=res.fileType;
          })
          .catch((err) => {
            return;
          });
        await this.reUpload();
      }
    },
    async ugridShow() {
      if (
        this.project.projectId == "" ||
        this.project.projectId == undefined ||
        this.project.projectId == null
      ) {
        Message({
          type: "error",
          message: "缺少文件，请检查修改",
        });
      } else {
        this.dialog.new_visiable = false;

        // await this.getHCFDLoadFiles();
        this.loadObjs = [];
        let loadOj1 = {
          type: 1,
          message: "获取参数",
          state: -1,
        };
        this.loadObjs.push(loadOj1);

        let loadOj2 = {
          type: 1,
          message: "获取上传文件URL",
          state: -1,
        };
        this.loadObjs.push(loadOj2);
        await this.findParam();
        loadOj1.state = 1;
        await this.getHCFDLoadFiles();
        loadOj2.state = 1;
        this.project.loadfils.forEach((url) => {
          let names = url.filepath.split("/");
          let name = names[names.length - 1];
          let loadOj3 = {
            type: 2,
            filename: name,
            percentage: 0,
          };
          this.loadObjs.push(loadOj3);
          this.$refs.filesload.load(url.filepath);
          this.$refs.filesload.load(url.filepath);
          if (url.filepath.indexOf(".ugrid") > 0) {
            this.ugridUrl = url.filepath;
          }
        });
        this.$refs.ugridLoad.loadUgrid(this.ugridUrl, 1);
      }
    },
    async findParam() {
      let params = {
        transCode: "A00107",
        projectId: this.project.projectId,
      };
      // console.log(params);
      await request(params)
        .then((res) => {
          // console.log("findParam：" + res);
          
          this.project.projectName = res.projectName;
          this.project.uid = res.uid;
          let cjuserid = this.$route.query.cjuserid;
          if(res.missionType==='3'||res.missionType==='4'){
            this.missType=false
          }else{
            this.missType=true
          }
          // console.log("A00107:",res);
          // console.log("cjuserid:",cjuserid);
          // if(cjuserid&&cjuserid==this.project.uid){
          //     this.newload  = true;
          //     this.runMonitor=true;
          // }else{
          //     this.newload  = false;
          //     this.runMonitor=false;
          // }
          console.log(this.parameterObj)
          this.parameterObj = JSON.parse(res.parameterObj);
          sessionStorage.setItem("res", res.parameterObj);
          //  this.parameterObjclone=JSON.parse(res.parameterObj);
          // console.log(res);
        })
        .catch((err) => {});
    },
    //上传配置参数
    async updateParam() {
      delete this.parameterObj.nmlParam.initialization;
      let params = {
        transCode: "A00104",
        parameterObj: JSON.stringify(this.parameterObj),
        projectId: this.project.projectId,
        lesseeId: this.$store.getters.lesseeId
      };
        console.log(this.parameterObj.nmlParam.a_u);
      console.log(this.parameterObj);
      await request(params)
        .then((res) => {
          // console.log("updateParam" + res);
          // this.parameterObj = JSON.parse(res.parameterObj);
          this.solverState = res.solverState;
        })
        .catch((err) => {});
    },
    loadProjects() {
      let params = {
        transCode: "A00101",
        page: 1,
        size: 1,
        projectType: "hcfd",
        lesseeId: this.$store.getters.lesseeId
      };
      this.loading = true;
      request(params)
        .then((res) => {
          // console.log("项目：" + res.rows);
          this.projects = res.rows;
          this.loading = false;
        })
        .catch((err) => {});
    },
    projectsSelectionChange(val) {
      this.clearAll();
      if (val.length > 0) {
        this.project.projectId = val[0].projectId;
        this.project.projectName = val[0].projectName;
        this.project.projectDesc = val[0].projectDesc;
      }
    },
    projectsSelectionSelect(selection, row) {
      if (selection.length <= 1) return;
      this.$refs.projectsTable.clearSelection();
      this.$refs.projectsTable.toggleRowSelection(row, true);
    },
    //load状态回调
    fileLoadeState(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;
          }
        });
      });
    },
    // 选择项目
    async selectProjectOK() {
      this.dialog.load_visiable = false;
      this.loadObjs = [];
      let loadOj1 = {
        type: 1,
        message: "获取参数",
        state: -1,
      };
      this.loadObjs.push(loadOj1);

      let loadOj2 = {
        type: 1,
        message: "获取上传文件URL",
        state: -1,
      };
      this.loadObjs.push(loadOj2);

      //结束
      await this.findParam();
      loadOj1.state = 1;
      await this.getHCFDLoadFiles();
      loadOj2.state = 1;
      this.project.loadfils.forEach((url) => {
        let names = url.filepath.split("/");
        let name = names[names.length - 1];
        let loadOj3 = {
          type: 2,
          filename: name,
          percentage: 0,
        };
        this.loadObjs.push(loadOj3);
        this.$refs.filesload.load(url.filepath);
        if (url.filepath.indexOf(".ugrid") > 0) {
          this.ugridUrl = url.filepath;
        }
      });
      this.showUgrid();
      this.logtime()
    },

    boundaryChange(boundaryid) {
      this.parameterObj.hcfdBoundarys.forEach((hcfdBoundary) => {
        if (hcfdBoundary.id === boundaryid) {
          this.Physics.hcfdBoundaryquery = hcfdBoundary;
          this.Physics.Boundary.cquery = hcfdBoundary.conditionsCode;
          return;
        }
      });
    },
    conditionsChange(conditionsCode) {
      this.Physics.hcfdBoundaryquery.conditionsCode = conditionsCode;
    },
    // solutionbCheckAllChange(val) {
    //   this.Solution.boundaryout.checkeds = val
    //     ? this.Solution.boundaryout.lists
    //     : [];
    //   this.Solution.boundaryout.isIndeterminate = false;
    //   this.solutionbSetParam();
    // },
 
     solutionbCheckAllChange(val) {
if(val==true){
   this.parameterObj.nmlParam.a_u = true;
      this.parameterObj.nmlParam.a_v = true;
       this.parameterObj.nmlParam.a_w = true;
      this.parameterObj.nmlParam.a_p = true;
      this.parameterObj.nmlParam.a_cp = true;
      this.parameterObj.nmlParam.a_mach = true;
      this.parameterObj.nmlParam.a_vort_mag = true;
      this.parameterObj.nmlParam.a_vort_x = true;
      this.parameterObj.nmlParam.a_vort_y = true;
      this.parameterObj.nmlParam.a_vort_z = true;
      this.parameterObj.nmlParam.a_q_criterion = true;
      this.Solution.boundaryout.isIndeterminate = false;
      //this.solutionbSetParam();
}else {
   
     this.parameterObj.nmlParam.a_u = false;
      this.parameterObj.nmlParam.a_v = false;
       this.parameterObj.nmlParam.a_w = false;
      this.parameterObj.nmlParam.a_p = false;
      this.parameterObj.nmlParam.a_cp = false;
      this.parameterObj.nmlParam.a_mach = false;
      this.parameterObj.nmlParam.a_vort_mag = false;
      this.parameterObj.nmlParam.a_vort_x = false;
      this.parameterObj.nmlParam.a_vort_y = false;
      this.parameterObj.nmlParam.a_vort_z = false;
      this.parameterObj.nmlParam.a_q_criterion = false;
       this.Solution.boundaryout.isIndeterminate = false;
} 
        
  
    },
    solutionbCheckedCitiesChange(value) {
      let checkedCount = value.length;
      this.Solution.boundaryout.checkAll =
        checkedCount === this.Solution.boundaryout.lists.length;
      this.Solution.boundaryout.isIndeterminate =
        checkedCount > 0 &&
        checkedCount < this.Solution.boundaryout.lists.length;
      this.solutionbSetParam();
    },
    solutionbSetParam() {
      this.Solution.boundaryout.checkeds.forEach((cell) => {
        switch (cell) {
          case "X-component of velocity":
            console.log( this.parameterObj.nmlParam.a_u);
            this.parameterObj.nmlParam.a_u = true;
            break;
          case "Y-component of velocity":
            this.parameterObj.nmlParam.a_v = true;
            break;
          case "Z-component of velocity":
            this.parameterObj.nmlParam.a_w = true;
            break;
          case "Press":
            this.parameterObj.nmlParam.a_p = true;
            break;
          case "Press coefficient":
            this.parameterObj.nmlParam.a_cp = true;
            break;
          case "Mach Number":
            this.parameterObj.nmlParam.a_mach = true;
            break;
          case "Vorticity magnitude":
            this.parameterObj.nmlParam.a_vort_mag = true;
            break;
          case "X-component of vorticity":
            this.parameterObj.nmlParam.a_vort_x = true;
            break;
          case "Y-component of vorticity":
            this.parameterObj.nmlParam.a_vort_y = true;
            break;
          case "Z-component of vorticity":
            this.parameterObj.nmlParam.a_vort_z = true;
            break;
          case "Q Criterion":
            this.parameterObj.nmlParam.a_q_criterion = true;
            break;
          default:   
            break;
        }
               
      });
     
    },
    clickNew(){
      this.project.projectName='';
      this.dialog.new_visiable = true;
      this.$refs.mapbc.$emit('childmethods');
      this.$refs.ugrid.$emit('childmethods');
    },
    solutionvCheckAllChange(val) {
      // this.Solution.volumout.checkeds = val ? this.Solution.volumout.lists : [];
      // this.Solution.volumout.isIndeterminate = false;
      // this.solutionbSetParam();
      if(val==true){
     this.parameterObj.nmlParam.v_u = true;
      this.parameterObj.nmlParam.v_v = true;
       this.parameterObj.nmlParam.v_w = true;
      this.parameterObj.nmlParam.v_p = true;
      this.parameterObj.nmlParam.v_cp = true;
      this.parameterObj.nmlParam.v_mach = true;
      this.parameterObj.nmlParam.v_vort_mag = true;
      this.parameterObj.nmlParam.v_vort_x = true;
      this.parameterObj.nmlParam.v_vort_y = true;
      this.parameterObj.nmlParam.v_vort_z = true;
      this.parameterObj.nmlParam.v_q_criterion = true;
}else{
     this.parameterObj.nmlParam.v_u = false;
      this.parameterObj.nmlParam.v_v = false;
       this.parameterObj.nmlParam.v_w = false;
      this.parameterObj.nmlParam.v_p = false;
      this.parameterObj.nmlParam.v_cp = false;
      this.parameterObj.nmlParam.v_mach = false;
      this.parameterObj.nmlParam.v_vort_mag = false;
      this.parameterObj.nmlParam.v_vort_x = false;
      this.parameterObj.nmlParam.v_vort_y = false;
      this.parameterObj.nmlParam.v_vort_z = false;
      this.parameterObj.nmlParam.v_q_criterion = false;
   this.Solution.volumout.isIndeterminate = false;
} 
    },
    solutionvCheckedCitiesChange(value) {
      let checkedCount = value.length;
      console.log(value);
      this.Solution.volumout.checkAll =
        checkedCount === this.Solution.volumout.lists.length;
      this.Solution.volumout.isIndeterminate =
        checkedCount > 0 && checkedCount < this.Solution.volumout.lists.length;
      this.solutionvSetParam();
    },
    solutionvSetParam() {
      this.Solution.volumout.checkeds.forEach((cell) => {
        switch (cell) {
          case "X-component of velocity":
            this.parameterObj.nmlParam.v_u = true;
            break;
          case "Y-component of velocity":
            this.parameterObj.nmlParam.v_v = true;
            break;
          case "Z-component of velocity":
            this.parameterObj.nmlParam.v_w = true;
            break;
          case "Press":
            this.parameterObj.nmlParam.v_p = true;
            break;
          case "Press coefficient":
            this.parameterObj.nmlParam.v_cp = true;
            break;
          case "Mach Number":
            this.parameterObj.nmlParam.v_mach = true;
            break;
          case "Vorticity magnitude":
            this.parameterObj.nmlParam.v_vort_mag = true;
            break;
          case "X-component of vorticity":
            this.parameterObj.nmlParam.v_vort_x = true;
            break;
          case "Y-component of vorticity":
            this.parameterObj.nmlParam.v_vort_y = true;
            break;
          case "Z-component of vorticity":
            this.parameterObj.nmlParam.v_vort_z = true;
            break;
          case "Q Criterion":
            this.parameterObj.nmlParam.v_q_criterion = true;
            break;
          default:
            break;
        }
      });
    },
    //显示 UgridLoad
    async showUgrid() {
      console.log(this.showUgridflag);
      this.$refs.volumLoad.hiden();
      this.$refs.boundaryLoad.hiden();
      this.$refs.monitor.hiden();
      if (!this.showUgridflag) {
        //是否显示过
        this.$refs.ugridLoad.clear();
        if (this.project.loadfils.length == 0) {
          await this.getHCFDLoadFiles();
        }
        this.project.loadfils.forEach((url) => {
          if (url.filepath.indexOf(".ugrid") > 0) {
            this.ugridUrl = url.filepath;
          }
        });

        this.$refs.ugridLoad.loadUgrid(this.ugridUrl, 1);
        this.showUgridflag = true;
      } else {
        this.$refs.ugridLoad.nhiden();
      }
    },
    // Task Page
    handleNodeClick(data) {
      let treeid = data.id;
      if (treeid == "2") {
        this.TaskGenealshow = true;
        this.TaskPhysicsshow = false;
        this.TaskSolutionshow = false;
        this.TaskSurfaceshow = false;
        this.TaskVolumeshow = false;
      } else if (treeid == "3") {
        this.TaskGenealshow = false;
        this.TaskPhysicsshow = true;
        this.TaskSolutionshow = false;
        this.TaskSurfaceshow = false;
        this.TaskVolumeshow = false;
      } else if (treeid == "4") {
        this.TaskGenealshow = false;
        this.TaskPhysicsshow = false;
        this.TaskSolutionshow = true;
        this.TaskSurfaceshow = false;
        this.TaskVolumeshow = false;
      } else if (treeid == "7") {
        this.TaskGenealshow = false;
        this.TaskPhysicsshow = false;
        this.TaskSolutionshow = false;
        this.TaskSurfaceshow = true;
        this.TaskVolumeshow = false;
      } else if (treeid == "8") {
        this.TaskGenealshow = false;
        this.TaskPhysicsshow = false;
        this.TaskSolutionshow = false;
        this.TaskSurfaceshow = false;
        this.TaskVolumeshow = true;
      } else if (treeid == "6") {
        this.showMonitor();
      } else if (treeid == "9") {
        this.showUgrid();
      } else {
        this.TaskGenealshow = false;
        this.TaskPhysicsshow = false;
        this.TaskSolutionshow = false;
        this.TaskSurfaceshow = false;
        this.TaskVolumeshow = false;
      }
      this.changeRendererSize();
    },
    //显示 Surface
    async showSurface() {
      let mesh = false;
      let contour = false;
      this.belementCheckeds.forEach((ele) => {
        if ("Mesh" == ele) {
          mesh = true;
        } else if ("Contour" == ele) {
          contour = true;
        }
      });
      this.$refs.ugridLoad.hiden();
      this.$refs.volumLoad.hiden();
      this.$refs.monitor.hiden();
      if (!this.showSurfaceflag) {
        this.$refs.boundaryLoad.clear();
        if (this.project.solverfiles.length == 0) {
          await this.gethcfdsolverfiles();
        }
        let burl;
       
        this.project.solverBoundaryUrls.forEach((url) => {
          if (url.indexOf(this.bStep + ".dat") > 0) {
            burl = url;
          }
        });
        if (mesh) {
          this.$refs.boundaryLoad.loadBoundary(burl, 1, this.bScalar);
        }
        if (contour) {
          this.$refs.boundaryLoad.loadBoundary(burl, 2, this.bScalar);
        }
        this.showSurfaceflag = true;
      } else {
        this.$refs.boundaryLoad.clear();
        this.$refs.boundaryLoad.nhiden();
        if (mesh) {
          this.$refs.boundaryLoad.mesh(this.bScalar);
        }
        if (contour) {
          //  console.log(222);
          this.$refs.volumLoad.vdivb = false;
          this.$refs.boundaryLoad.divb = true;
          this.$refs.boundaryLoad.contour(this.bScalar);
        }
      }
    },

    //通过 volume 解析文件,不显示图像
    async showVolumers() {
      let mesh = false;
      let contour = false;
      this.velementCheckeds.forEach((ele) => {
        if ("Mesh" == ele) {
          mesh = true;
        } else if ("Contour" == ele) {
          contour = true;
        }
      });
      if (!this.showVolumeflage) {
        this.$refs.volumLoad.clear();
        if (this.project.solverfiles.length == 0) {
          await this.gethcfdsolverfiles();
        }
        let urls = [];
        this.project.solverVolumUrls.forEach((url) => {
          if (url.indexOf(this.bStep + ".dat") > 0) {
            urls.push(url);
          }
        });
        if (mesh) {
          this.$refs.volumLoad.loadVolumHiden(urls, 1, this.vSalar);
        }
        if (contour) {
          this.$refs.boundaryLoad.divb = false;
          this.$refs.volumLoad.vdivb = true;
          this.$refs.volumLoad.loadVolumHiden(urls, 2, this.vSalar);
        }
      } else {
        this.$refs.volumLoad.clear();
        this.$refs.volumLoad.nhiden();
        if (mesh) {
          this.$refs.volumLoad.mesh(this.vSalar);
        }

        if (contour) {
          this.$refs.boundaryLoad.divb = false;
          this.$refs.volumLoad.vdivb = true;
          this.$refs.volumLoad.contour(this.vSalar);
        }
      }
    },
    async showVolume() {
      let mesh = false;
      let contour = false;
      this.velementCheckeds.forEach((ele) => {
        if ("Mesh" == ele) {
          mesh = true;
        } else if ("Contour" == ele) {
          contour = true;
        }
      });

      this.$refs.ugridLoad.hiden();
      this.$refs.boundaryLoad.hiden();
      this.$refs.monitor.hiden();

      if (!this.showVolumeflage) {
        this.$refs.volumLoad.clear();
        if (this.project.solverfiles.length == 0) {
          await this.gethcfdsolverfiles();
        }
        let urls = [];
        this.project.solverVolumUrls.forEach((url) => {
          if (url.indexOf(this.bStep + ".dat") > 0) {
            urls.push(url);
          }
        });
        if (mesh) {
          this.$refs.volumLoad.loadVolum(urls, 1, this.vSalar);
        }
        if (contour) {
          this.$refs.boundaryLoad.divb = false;
          this.$refs.volumLoad.vdivb = true;
          this.$refs.volumLoad.loadVolum(urls, 2, this.vSalar);
        }
        this.showVolumeflage = true;
      } else {
        this.$refs.volumLoad.clear();
        this.$refs.volumLoad.nhiden();
        if (mesh) {
          this.$refs.volumLoad.mesh(this.vSalar);
        }

        if (contour) {
          this.$refs.boundaryLoad.divb = false;
          this.$refs.volumLoad.vdivb = true;
          this.$refs.volumLoad.contour(this.vSalar);
        }
      }
    },
    async showMonitor() {
      this.$refs.ugridLoad.hiden();
      this.$refs.boundaryLoad.hiden();
      this.$refs.volumLoad.hiden();
      if (!this.showMonitorflage) {
        if (this.project.converge == "") {
          await this.gethcfdsolverfiles();
        }
        let convergeUrl = this.project.converge;
        this.$refs.monitor.loadConverge(convergeUrl);
      } else {
        this.$refs.monitor.nhiden();
      }
      this.showMonitorflage = true;
    },
    large() {
      this.$refs.ugridLoad.large();
      this.$refs.boundaryLoad.large();
      this.$refs.volumLoad.large();
    },
    small() {
      this.$refs.ugridLoad.small();
      this.$refs.boundaryLoad.small();
      this.$refs.volumLoad.small();
    },
    positive(axis) {
      this.$refs.ugridLoad.positive(axis);
      this.$refs.boundaryLoad.positive(axis);
      this.$refs.volumLoad.positive(axis);
    },
    negative(axis) {
      this.$refs.ugridLoad.negative(axis);
      this.$refs.boundaryLoad.negative(axis);
      this.$refs.volumLoad.negative(axis);
    },
    // 资源选择代码
    showresource(){
      this.dialog.ziyuan=true;
      this.getresource();
    },
    //获取资源代码
    getresource(){
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)',
      })
      setTimeout(() => {
        const params = {
          transCode: 'HG00000',
        page: this.paginationConfig.page,
        count: this.paginationConfig.size,
          lesseeId:this.$store.getters.lesseeId,
  
        }
        request(params)
          .then((res) => { 
             loading.close()
            this.ziyprojects = res.rows;
           this.paginationConfig.total = res.total
           this.resourcelook();
          })
          .catch((err) => {
            loading.close()
          })
      }, 500)
    },
     getPagination(data) {
      this.paginationConfig = data
      this.getresource()
    },
    //选中
    ziySelectionChange (val) {
   
    let id= []
     val.map((item)=> {
    id.push(item.id)
      })
  this.selsectid= id.join(',')    
    },
     ziySelectionSelect(selection, row) {
    },
    //保存
    resourceOK(){
     
       const params = {
          transCode: 'HG00002',
          otherId:this.project.projectId,
          type:'1',
           resourceIds:this.selsectid,
          lesseeId:this.$store.getters.lesseeId,
        }
        request(params)
          .then((res) => { 
              Message({
          type: "success",
          message: "保存成功",
        });
       this.dialog.ziyuan=false;
          })
          .catch((err) => {
         
          })
    },
    // 查看已经中的
        resourcelook(){
           const params = {
          transCode: 'HG00001',
          otherId:  this.project.projectId,
          type:'1',
          lesseeId:this.$store.getters.lesseeId,
        }
        request(params)
          .then((res) => { 
          let rst=res.rows;
            this.$refs.multipleTable.clearSelection();
          if (rst.length > 0) {
            for (var i = 0; i < rst.length; i++) { 
              for ( let j = 0 ; j < this.ziyprojects.length; j++ ){
                  if (this.ziyprojects[j].id === rst[i].resourceId) {
                    this.$refs.multipleTable.toggleRowSelection(this.ziyprojects[j],true);
                  } 
              }
            }
          }
          })
  
          .catch((err) => {
         
          })
        }
  },
};
</script>
<style lang="scss">
@media screen and (max-width:1650px){
  .headMenu_2 .el-col{
    transform:scale(0.9);
    transform-origin: 0 0;
  }
  .headMenu_2{
    height: 175px !important;
  }
}
@media screen and (max-width:1330px){
  .headMenu_2 .el-col{
    transform:scale(0.8);
    transform-origin: 0 0;
  }
  .headMenu_2{
    height: 150px !important;
  }
  .asideTag2,.asideTag {
    transform:scale(0.7);
    transform-origin: 0 0;
  }
}
@media screen and (max-width:1160px){
  .headMenu_2 .el-col{
    transform:scale(0.7);
    transform-origin: 0 0;
  }
  .asideTag2{
    left: 91%;
  }
  .el-aside{
    width:170px !important;
  }
  .headMenu_2{
    height: 135px !important;
  }
}
body {
  font-size: 62.5%;
  position: relative;
}
.el-padding {
  padding: 5px 20px;
}
.headMenu_1 {
  background: #232426;
}
.logtitle {
  color: #fff;
}
.el-header {
  padding: 0;
}
.logs_console {
  overflow: hidden;
}
.el-menu {
  padding-left: 13px;
}
.el-menu .el-menu-item:hover {
  background-color: #bfc5cb;
  color: #333333;
}
// .el-menu--horizontal>.el-submenu:focus .el-submenu__title, .el-menu--horizontal>.el-submenu:hover .el-submenu__title{
//  color: #e4e4e4;
// }
.el-menu--horizontal > .el-menu-item {
  color: #e4e4e4;
}
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
  color: #e4e4e4;
}
.el-menu--horizontal > .el-menu-item.is-active {
  color: #e4e4e4;
}
.el-menu--horizontal > .el-submenu .el-submenu__title {
  color: #e4e4e4;
  font-size: 16px;
}
.el-menu--horizontal {
  -webkit-box-pack: inherit;
  justify-content: flex-start;
}
.logtitle li:nth-child(1) {
  margin-right: 100px;
}
.el-menu-item {
  font-size: 16px;
  padding: 0 35px;
}
#head2 {
  background-color: #f9f9f9;
}
#lg-title {
  text-align: left;
  padding: 6px 0px 6px 3.125vw;
}
.Task-lg {
  width: 100%;
}
.el-col-1 {
  width: 0; //重点修改了宽度
}
.title_content_1 {
  padding-left: 2.96875vw;
}
.el-col-3 li {
  padding: 6px 0;
}
.lg-er .el-col-3 li {
  padding-top: 0;
}
.el-image {
  padding-right: 4px;
}
.lg_weiyi .el-radio {
  display: block;
  padding: 6px 0 6px 3.125vw;
}
.el-dialog .el-input__inner {
  height: 34px;
  line-height: 34px;
}
.el-input--mini {
  display: inline;
}
.lg-centent {
  background-color: #f4f4f4;
}
.leiluoshu .el-form-item__content {
  margin-left: 180px;
}
.lg-centent .el-row {
  height: 100%;
}
.lg-modl {
  width: 300px;
  background: #f4f4f4;
}
.lg-centent .lg-modl .Task-lg {
  // max-height: calc(100vh - 300px);
  overflow-y: auto;
}
// .tasklg1{
//   height: 100%;
//   overflow-y: auto;
// }
// .tasklg2{
//   height: calc(100%-225px);
//   overflow-y: auto;
// }
.lg-san .el-col-3 li {
  padding: 0;
}

.el-input--mini .el-input__inner {
  width: 100%;
}
.el-radio__input.is-checked .el-radio__inner {
  border-color: #333;
  background: #333;
}
.beij-container {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ccd3e2 0%, rgba(255, 255, 255, 0) 100%);
}
.el-footer {
  padding: 0;
  height: 149px;
  overflow-y: auto;
}

.el-input__inner {
  height: 30px;
  // text-align: center;
}
.el-input--mini {
  display: inline;
}
.movieControlTitle {
  font-weight: 700;
  position: relative;
  top: -8px;
  background-color: #d7dce7;
  padding: 0 10px;
  font-size: 16px;
}

.el-main {
  position: relative;
  background-repeat: no-repeat;
  
}
.maxh221{
  max-height: calc(100vh - 221px);
}
.maxh400{
  max-height: calc(100vh - 410px);
}
body {
  position: relative;
  background-color: #eceef0;
}
.el-loading-mask {
  background: none;
}
.el-tree {
  background-color: #eceef0;
  padding: 13px;
}
// 第二个点击事件
.lg-er .el-col {
  padding: 0 12px;
}
.el-radio-button:first-child .el-radio-button__inner {
  border-radius: 4px;
}
.el-radio-button:last-child .el-radio-button__inner {
  border-radius: 4px;
}
.lg-er label {
  padding: 5px 0;
}
.el-radio-button__inner {
  border: none;
}
.lg-er label {
  display: block;
}
.lg-form li {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lg-form>li>span{
  display:inline-block;
  width:65%
}
.lg-form>li>.el-input{
  width:35%
}
.lg-form {
  padding-bottom: 5px;
}
.lg-san .el-col {
  padding: 5px 0.5vw;
}
.lg-san label {
  padding: 10px 0;
}
#head2 .lg-san input {
  margin: 3px 0px;
}
.lg-san .el-padding {
  padding: 0 20px;
}
// #head2 input

.el-button + .el-button {
  margin-left: 0;
}
.maxh100{
  max-height: calc(100vh - 100px);
}
.maxh290{
  max-height: calc(100vh - 290px);
}
.el-button{
  margin-bottom: 2px;
}
.lg-si .el-input__inner {
  padding: 0 0 0 0;
}
.lg-si-right {
  padding-left: 30px;
}
.lg-button {
  background-color: #4c4f54;
  color: #fff;
  border-radius: 10px;
}
.el-button--mini,
.el-button--mini.is-round {
  padding: 5px 15px;
}
.lg-san {
  height: 189px;
  overflow: auto;
}
.lg-si li {
  padding: 2px 0;
}
.el-dialog__body .el-input {
  padding: 5px 0;
}
.el-dialog__body .el-form li:first {
  padding: 10px 0;
}
.logs_title {
  background: #bfc5cb;
  padding: 10px;
  font-size: 16px;
}
.el-col-4,
.el-col-3 {
  position: relative;
}
.lg-more {
  position: absolute;
  right: 0;
  bottom: 15px;
}
//  弹框
.lg-bg .el-dialog__header {
  background: #efefef;
  border-color: #82848a;
   text-align: center;
   font-weight: 600;
}
.dialog-block label {
  display: block;
  font-size: 20px;
}
.el-dialog__footer {
  padding: 0px 20px 20px;
}
.dialog-block .el-dialog {
  width: 23%;
}
.Conditions .el-dialog {
  width: 26%;
}
.el-dialog__body {
  padding: 20px 20px;
}
.el-dialog {
  max-width: 600px;
  min-width: 452px;
}
.lg-Solution .el-dialog {
  width: 16%;
}
.lg-Solution label {
  display: block;
  padding: 5px 0;
}
.lg-out-h .el-checkbox {
  width: 40%;
}

.showright {
  float: right;
  margin-right: 20px;
}
.Task-lg li {
  padding: 5px 0;
}
.Task-lg .el-radio {
  display: block;
  padding: 3px 0;
}
.tack-btn .el-button {
  padding: 8px 16px;
  display: block;
}

.outline {
  font-size: 20px;
  padding: 10px 20px;
  font-weight: 600;
}
.pagination {
  margin-top: 10px;
}
.pagination  .el-input{
  padding: 0;
}
#head2 input {
  padding-left: 5px;
}
.lg-modl .el-radio-button {
  display: block;
  padding: 5px 0;
}
.lg-modl .el-select {
  display: block;
  padding: 3px 0;
}
.lg-modl .lg-si-right {
  padding: 0;
}
.lg-modl .task-si li label {
  display: block;
}
.el-col-24 {
  margin-bottom: 10px;
}
.x {
  // display: inline-block;
  cursor: default;
  float: right;
}
.lg-y-z .el-dialog {
  width: 16%;
}
.gongju .el-form-item__content {
  margin-left: 185px;
}
.gongju .el-form-item {
  margin-bottom: 0;
}
.exloadbox{
  float: right;
  margin-right: 100px;
}

// background: linear-gradient(180deg, #CCD3E2 0%, rgba(255, 255, 255, 0) 100%);
//lq结束
#head2 input {
  margin: 3px 5px;
}
// #head2 button{
//    margin: 3px 5px;
//   //  width: 50%;
// }
.contour .el-input-number__decrease,
.el-input-number__increase {
  top: 5px;
  width: 40px;
  cursor: pointer;
  font-size: 13px;
  height: 28px;
  line-height: 28px;
}
.line {
  width: 0px;
  height: 167px;
  border: 1px solid #d4d3d1;

  // background: #D4D3D1;
  // box-shadow: 0px 1px 0px 0px #FFFFFF;
  float: right;
}
.lg_weiyi .title {
  text-align: center;
}
.title {
  font-size: 0.8vw !important;
  margin: 6px 0px !important;
  font-weight: 600;
}
.headMenu_2 {
  height: 189px;
  overflow: hidden;
  font-size: 12px;
  width: 100%;
}
.headMenu_2 span{
  font-size: 12px !important;
}
.headMenu_2 .el-input__inner{
  padding:0 2px
}
.lisin>li{
  display: flex;
  align-items: center;
}
.lisin>li>span{
  display: inline-block;
  width:100px
}
.lisin>li>.el-input{
  width:120px
}
.sblock{
  display: inline-block;
  width:40%
}
.disinblok{
  display: inline-block;
}
.inpw50{
  width:50%
}
.inpw100{
  width:100%
}
.inpw35{
  width:25%
}
.inpw75{
  width:75px
}
.inpwidth{
  flex:1
}
.lheig34{
  line-height: 34px;
}
.pdingf10{
  padding-left: 10px !important;
}
.move{
  position: relative;
  top: -8px;
  right:-30px
}
.discenter{
  display: flex;
  justify-content: center;
}
.disrs{
  display: flex;
  flex-direction: row-reverse;
}
.padding0{
  padding: 0 !important;
}
.marr30{
  margin-right: 30px;
}
.marb5{
  margin-bottom:5px
}
.disacent{
  display: flex;
  align-items: center;
}
.div64>div,
.disflex,
.disflex55{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.div64>div>span{
  display: inline-block;
  width:65%
}
.span100{
  display: inline-block;
  width: 100px;
}
.div64>div>.el-input{
  width: 35%;
}
.disflex55>span{
  display: inline-block;
  width:50%
}
.disflex55>.el-input{
  width:50%
}
.el-dialog__header{
  font-size: 16px;
  font-weight: 700;
  background: #ccc;
  padding: 0 10px;
  line-height: 45px;
}
.flexpad30{
  display: flex;
}
.flexpad30>div{
  padding-right: 30px;
}


</style>
<style lang="scss"
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
</style>