vue2 jeecg-boot

业务介绍 :

在首页进行数据的添加,添加之后 将数据传递给后端,后端会计算,在返回给前端,前端拿到进行渲染,拿到数据跳转到结果页面,点击存档后,才可以触发下载和浏览,不然按钮一直是失效状态,存档后数据会存档到 统计页面,在页面点击新增,可以跳转到当前数据对应的页面,并且渲染,然后从新走一遍流程

一,首页

<template>
  <div>
    <!-- 搜索框 -->
    <a-col :span="24" class="title-input">
      <label class="title-text">工程名称:</label>
      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectName">
        <a-input
          id="projectName"
          v-model="model.projectName"
          placeholder="请输入工程名称"
          style="width: 400px; margin-right: 10px"
        />
      </a-form-model-item>

      <span style="float: left; overflow: hidden">
        <a-button type="primary" @click="getValue">计算</a-button>
        <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
      </span>
    </a-col>

    <!-- 展示  -->
    <a-card :bordered="false" class="nav">
      <!-- 图片 -->
      <div class="card">
        <img :src="imageUrl" class="imgs" alt="图像" />
        <h2 class="img-text">计算简图</h2>
      </div>

      <!-- 输入框 -->
      <div class="dic">
        <a-spin :spinning="confirmLoading">
          <j-form-container :disabled="formDisabled">
            <a-form-model ref="form" :rules="rules" :model="model" slot="detail">
              <a-row>
                <a-col :span="24">
                  <h2 class="dic-h2">请输入构件尺寸:</h2>
                  <a-col :span="24">
                    <div
                      name="labelSize"
                      id="labelSize"
                      style="display: flex; justify-content: space-between; width: 100%"
                    >
                      <label style="background: #7891; text-align: center; width: 15%; border-radius: 0"
                        >标牌尺寸:</label
                      >
                      <el-tooltip class="item" effect="dark" content="标志宽度(毫米)" placement="top-start">
                        <el-input
                          v-model="model.a1"
                          placeholder="L"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                      <el-input
                        placeholder="X"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      ></el-input>
                      <el-tooltip class="item" effect="dark" content="标志高度(毫米)" placement="top-start">
                        <el-input v-model="model.a2" placeholder="B" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                      <el-input
                        placeholder="X"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      ></el-input>
                      <el-tooltip class="item" effect="dark" content="标志厚度(毫米)" placement="top-start">
                        <el-input v-model="model.a3" placeholder="H" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                      <el-input placeholder="" style="flex: 1; width: 10%; border-radius: 0" disabled></el-input>
                      <el-input placeholder="" style="flex: 1; width: 10%; border-radius: 0" disabled></el-input>
                    </div>
                  </a-col>
              
                  <a-col :span="24">
                    <div
                      name="ribbedStiffener"
                      id="ribbedStiffener"
                      style="display: flex; justify-content: space-between; width: 100%"
                    >
                      <label style="background: #9871; text-align: center; width: 15%; border-radius: 0"
                        >柱脚加劲肋:</label
                      >
                      <el-tooltip class="item" effect="dark" content="短边尺寸(毫米)" placement="top-start">
                        <el-input
                          v-model="model.d1"
                          placeholder=""
                          style="flex: 1; width: 10%; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                      <el-input
                        placeholder="~"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      ></el-input>
                      <el-tooltip class="item" effect="dark" content="长边尺寸(毫米)" placement="top-start">
                        <el-input
                          v-model="model.d2"
                          placeholder=""
                          style="flex: 1; width: 10%; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                      <el-input
                        placeholder="×"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      ></el-input>
                      <el-tooltip class="item" effect="dark" content="高度(毫米)" placement="top-start">
                        <el-input
                          v-model="model.d3"
                          placeholder=""
                          style="flex: 1; width: 10%; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                      <el-input
                        placeholder="×"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      ></el-input>
                      <el-tooltip class="item" effect="dark" content="厚度(毫米)" placement="top-start">
                        <el-input
                          v-model="model.d4"
                          placeholder=""
                          style="flex: 1; width: 10%; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                    </div>
                  </a-col>
                  <a-col :span="24">
                    <div
                      name="normsOne"
                      id="normsOne"
                      style="display: flex; justify-content: space-between; width: 100%"
                    >
                      <el-tooltip class="item" effect="dark" content="A级螺栓" placement="top-start">
               
                        <j-search-select-tag
                          style="background: #9871; text-align: center; text-align: center; width: 15%"
                          v-model="model.norms"
                          @change="getList(model.norms)"
                          dict="bp_bolt_diameter,bolt_diameter,bolt_diameter"
                          placeholder="螺栓规格"
                        />
                      </el-tooltip>
                      <el-tooltip class="item" effect="dark" content="螺栓根数" placement="top-start">
                        <el-input
                          v-model="model.e1"
                          placeholder=""
                          style="flex: 1; width: 10%; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                      <el-tooltip class="item" effect="dark" content="受拉侧螺栓数量(根)" placement="top-start">
                        <el-input
                          v-model="model.e2"
                          placeholder=""
                          style="flex: 1; width: 10%; border-radius: 0"
                        ></el-input>
                      </el-tooltip>
                      <el-tooltip class="item" effect="dark" content="单根螺栓直径(毫米)" placement="top-start">
                        <el-input
                          placeholder="d"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        />
                      </el-tooltip>
                      <el-input v-model="model.e3" style="flex: 1; width: 10%; text-align: center; border-radius: 0" />
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="柱脚螺栓至法兰盘边缘距离(毫米)"
                        placement="top-start"
                      >
                        <el-input placeholder="Lt" style="flex: 1; width: 10%; border-radius: 0" disabled></el-input>
                      </el-tooltip>
                      <el-input v-model="model.e4" placeholder="" style="flex: 1; width: 10%; border-radius: 0" />
                      <el-tooltip class="item" effect="dark" content="单根螺栓的面积(平方毫米)" placement="top-start">
                        <el-input v-model="h5" disabled placeholder="" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                    </div>
                  </a-col>
               
                  <a-col :span="24">
                      <div
                        name="basal"
                        id="basal"
                        style="display: flex; justify-content: space-between; width: 100%"
                      >
                        <label style="background: #9871; text-align: center; width: 15%; border-radius: 0"
                          >基础:</label
                        >

                        <el-tooltip class="item" effect="dark" content="混凝土规格" placement="top-start">
                          <j-search-select-tag
                            style="
                              background: #9871;
                              text-align: center;
                              text-align: center;
                              width: 12%;
                              border-radius: 0;
                            "
                            v-model="model.f1"
                            dict="concrete_specifications"
                            placeholder=""
                          />
                        </el-tooltip>
                        <el-tooltip class="item" effect="dark" content="基础混凝土重度(kN/m3)" placement="top-start">
                        <el-input v-model="model.f2" placeholder="" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                      <el-tooltip class="item" effect="dark" content="基础长度(毫米)" placement="top-start">
                        <el-input v-model="model.f3" placeholder="" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                      <el-input
                        placeholder="X"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      />
                      <el-tooltip class="item" effect="dark" content="基础宽度(毫米)" placement="top-start">
                        <el-input v-model="model.f4" placeholder="" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                      <el-input placeholder="X" style="flex: 1; width: 10%; border-radius: 0" disabled />
                      <el-tooltip class="item" effect="dark" content=" 基础高度(毫米)" placement="top-start">
                        <el-input v-model="model.f5" placeholder="" style="flex: 1; width: 10%; border-radius: 0" />
                      </el-tooltip>
                      </div>
                    </a-col>

                </a-col>
                <!-- =计算参数= -->
                <a-col :span="24">
                  <h2 class="dic-h2">请输入计算参数:</h2>
                  <a-col :span="24">
                    <div style="display: flex; justify-content: space-between; width: 100%">
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="结构重要性系数,位于高速公路、一级公路上的悬臂式、门架式交通标志取1.0,其余均取0.9"
                        placement="top-start"
                      >
                        <el-input
                          placeholder="γ0"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        ></el-input>
                      </el-tooltip>
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="永久荷载分项系数,有利时取1.2,不利时取1.0"
                        placement="top-start"
                      >
                        <el-input
                          placeholder="γG"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        ></el-input>
                      </el-tooltip>
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="永久荷载分项系数,计算柱脚螺栓时取0.9"
                        placement="top-start"
                      >
                        <el-input
                          placeholder="γG"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        ></el-input>
                      </el-tooltip>
                      <el-input
                        placeholder="γQ"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      />
                      <el-input
                        placeholder="γ"
                        style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                        disabled
                      />
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="标志牌风力系数,标志板取C=1.2"
                        placement="top-start"
                      >
                        <el-input
                          placeholder="C"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        />
                      </el-tooltip>
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="立柱风力系数,圆管形立柱C=0.8,薄壁矩形立柱C=1.4,其他型钢及组合型钢立柱C=1.3"
                        placement="top-start"
                      >
                        <el-input
                          placeholder="C"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        />
                      </el-tooltip>
                      <el-tooltip class="item" effect="dark" content="空气密度" placement="top-start">
                        <el-input
                          placeholder="ρ(g/m3)"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        />
                      </el-tooltip>

                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="风速v应选用当地比较空旷平坦地面上离地10m高统计所得的50年一遇10min平均最大风速,且不得小于22m/s。当无风速记录时,可查阅《公路桥梁抗风设计规范》(JTG/T 3360-01-2018)附录A.3选用"
                        placement="top-start"
                      >
                        <el-input
                          placeholder="v(m/s)"
                          style="flex: 1; width: 10%; text-align: center; border-radius: 0"
                          disabled
                        ></el-input>
                      </el-tooltip>
                    </div>
                  </a-col>
                  <a-col :span="24">
                      <div
                        name="firstColumn"
                        id="firstColumn"
                        style="display: flex; justify-content: space-between; width: 100%"
                      >
                        <j-search-select-tag
                          style="flex: 1; border-radius: 0; width: 10%;"
                          v-model="model.aName1"
                          dict="parameter"
                          placeholder=""
                          id="aName1"
                        />
                        <j-search-select-tag
                          style="flex: 1; border-radius: 0; width: 10%;"
                          v-model="model.aName2"
                          dict="parameterγG"
                          placeholder=""
                          id="aName2"
                        />
                        <j-search-select-tag
                        style="flex: 1; border-radius: 0; width: 10%;"
                          v-model="model.aName3"
                          dict="parameterγG2"
                          placeholder=""
                          id="aName3"
                        />
                        <el-input
                        v-model="model.aName4"
                        style="flex: 1; border-radius: 0; width: 10%; text-align: center"
                      />
                      <el-input
                        v-model="model.aName5"
                        style="flex: 1; border-radius: 0; width: 10%; text-align: center"
                      />
                      <el-input
                        v-model="model.aName6"
                        style="flex: 1; border-radius: 0; width: 10%; text-align: center"
                      />
                      <el-input
                        v-model="model.aName7"
                        style="flex: 1; border-radius: 0; width: 10%; text-align: center"
                      />
                      <el-input
                        v-model="model.aName8"
                        style="flex: 1; border-radius: 0; width: 10%; text-align: center"
                      />
                      <el-input
                        v-model="model.aName9"
                        style="flex: 1; border-radius: 0; width: 10%; text-align: center"
                      />
                      </div>
                    </a-col>
                
                 
             
                </a-col>
              </a-row>
            </a-form-model>
          </j-form-container>
        </a-spin>
      </div>
    </a-card>
  </div>
</template>

  
<script>
import { Notification } from 'element-ui';  

import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import BpTriangularSizeModal from './modules/BpTriangularSizeModal'
import { httpAction, getArea } from '@/api/manage'
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import { v4 as uuidv4 } from 'uuid'

Vue.use(ElementUI)
export default {
  name: 'CantileverList',
  mixins: [mixinDevice],
  components: {
    BpTriangularSizeModal,
  },
  props: {
    //表单禁用
    disabled: {
      type: Boolean,
      default: false,
      required: false,
    },
  },
  data() {
    return {
      rules: {
       
      },

      h5: '',
      imageUrl: require('@/assets/images/daosanjiao.png'),
      model: {
      
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      confirmLoading: false,
      url: {
        add: 'triangular/bpTriangularSize/add',  //数据通过 add路径请求
        add2: 'triangular/bpTriangularSize/add',
        getArea: '/size/bpMemberSize/getArea',
      },
    }
  },

  computed: {
    formDisabled() {
      return this.disabled
    },
  },

  mounted() {
 
    // 倒三角获取(通过路由传过来的值  receivedData接收)
    const receivedData = this.$route.query.data
    // console.log(receivedData, 'xxxxxxxxxxx') // 输出传递过来的值

    // 倒三角构建参数  (通过id查询 传id给后端)
    httpAction(`/triangular/bpTriangularSize/queryById?id=${receivedData.bpCountParameterId}`, null, 'get')
      .then((res) => {
         // 获取到返回值 然后赋值给当前页面

        //  因为页面没有定义 a1  a3  b1 b2 这些值 所有我们不能至于.(点)什么 要加  ""
        //   例子: this.$set(this.model,'a1',JSON.parse(res.result.labelSize).a1);
        // A
        this.$set(this.model,'a1',JSON.parse(res.result.labelSize).a1);
        this.$set(this.model,'a2',JSON.parse(res.result.labelSize).a2);
        this.$set(this.model,'a3',JSON.parse(res.result.labelSize).a3);
    
         // d
        this.$set(this.model,'d1',JSON.parse(res.result.plinthStiffeners).d1);
        this.$set(this.model,'d2',JSON.parse(res.result.plinthStiffeners).d2);
        this.$set(this.model,'d3',JSON.parse(res.result.plinthStiffeners).d3);
        this.$set(this.model,'d4',JSON.parse(res.result.plinthStiffeners).d4);

        // e
        this.$set(this.model,'norms',JSON.parse(res.result.normsOne).e1);
        this.$set(this.model,'e1',JSON.parse(res.result.normsOne).e2);
        this.$set(this.model,'e2',JSON.parse(res.result.normsOne).e3);
        this.$set(this.model,'e3',JSON.parse(res.result.normsOne).e4);
        this.$set(this.model,'e4',JSON.parse(res.result.normsOne).e5);

       // 因为上边有h5  所有不能set
        this.h5 = JSON.parse(res.result.normsOne).e6
     
        // f
        this.$set(this.model,'f1',JSON.parse(res.result.basis).f1);
        this.$set(this.model,'f2',JSON.parse(res.result.basis).f2);
        this.$set(this.model,'f3',JSON.parse(res.result.basis).f3);
        this.$set(this.model,'f4',JSON.parse(res.result.basis).f4);
        this.$set(this.model,'f5',JSON.parse(res.result.basis).f5);
      
      })
      .finally(() => {
        this.confirmLoading = false
      })

    // 倒三角计算参数 (通过id查询 传id给后端)
    httpAction(`/parameter/bpCountParameter/queryById?id=${receivedData.bpBuildId}`, null, 'get')
      .then((res) => {
       
            // 工程名称
         this.$set(this.model,'projectName',res.result.projectName);
    

        this.$set(this.model,'aName1',JSON.parse(res.result.firstColumn).aName1);
        this.$set(this.model,'aName2',JSON.parse(res.result.firstColumn).aName2);
        this.$set(this.model,'aName3',JSON.parse(res.result.firstColumn).aName3);
        this.$set(this.model,'aName4',JSON.parse(res.result.firstColumn).aName4);
        this.$set(this.model,'aName5',JSON.parse(res.result.firstColumn).aName5);
        this.$set(this.model,'aName6',JSON.parse(res.result.firstColumn).aName6);
        this.$set(this.model,'aName7',JSON.parse(res.result.firstColumn).aName7);
        this.$set(this.model,'aName8',JSON.parse(res.result.firstColumn).aName8);
        this.$set(this.model,'aName9',JSON.parse(res.result.firstColumn).aName9);


      })
      .finally(() => {
        this.confirmLoading = false
      })

    this.modelDefault = JSON.parse(JSON.stringify(this.model))
  },

  created() {
    //备份model原始值
    this.modelDefault = JSON.parse(JSON.stringify(this.model))
  },
  methods: {
    getList(value) {
      getArea(this.url.getArea, value).then((res) => {
        this.h5 = res
        if (res.code == 500) {
          this.h5 = ''
        }
      })
    },

    // 重置按钮
    searchReset() {
      const formModel = this.$refs.form
      var inputValues = formModel.model // 获取所有的input值
      for (let key in inputValues) {
        inputValues[key] = ''
      }
    },
    // 传递数据给后端
    getValue() {
      // debugger
      // 工程名
      var projectName = document.getElementById('projectName').value
      // 标牌尺寸
      var labelSize = document.getElementById('labelSize')
      var inputs1 = labelSize.getElementsByTagName('input')
      var a1 = inputs1[0].value
      var a2 = inputs1[2].value
      var a3 = inputs1[4].value
      var label_size = {
        a1: a1,
        a2: a2,
        a3: a3,
      }

      // 柱脚加劲肋:
      var ribbedStiffener = document.getElementById('ribbedStiffener')
      var inputs4 = ribbedStiffener.getElementsByTagName('input')
      var d1 = inputs4[0].value
      var d2 = inputs4[2].value
      var d3 = inputs4[4].value
      var d4 = inputs4[6].value
      var plinth_stiffeners = {
        d1: d1,
        d2: d2,
        d3: d3,
        d4: d4,
      }
    

      // A级螺栓
      var normsOneDom = document.getElementById('normsOne')
      var inputs5 = normsOneDom.getElementsByTagName('input')
      // debugger
      var e1 = this.model.norms
  
      var e2 = inputs5[1].value
      var e3 = inputs5[2].value
      var e4 = inputs5[4].value
      var e5 = inputs5[6].value
      var e6 = inputs5[7].value
      var norms_one = {

        e1: e1,
        e2: e2,
        e3: e3,
        e4: e4,
        e5: e5,
        e6: e6,
      }
      // console.log(norms_one, "===norms_one")

      // 基础
      var basalDom = document.getElementById('basal')
      var inputs6 = basalDom.getElementsByTagName('input')
      var f1 = this.model.f1

      this.model.f2 = inputs6[1].value
      this.model.f3 = inputs6[2].value
      this.model.f4 = inputs6[4].value
      this.model.f5 = inputs6[6].value
      var basis = {
    
        f1: f1,
        f2: this.model.f2,
        f3: this.model.f3,
        f4: this.model.f4,
        f5: this.model.f5,
   
      }

      // console.log(basis, "===basis")

      // 计算参数
      var firstColumnDom = document.getElementById('firstColumn')
      var firstColumn = firstColumnDom.querySelectorAll('input')

      var aName1 = this.model.aName1
      var aName2 = this.model.aName2
      var aName3 = this.model.aName3
      this.model.aName4 = firstColumn[3].value
      this.model.aName5 = firstColumn[4].value
      this.model.aName6 = firstColumn[5].value
      this.model.aName7 = firstColumn[6].value
      this.model.aName8 = firstColumn[7].value
      this.model.aName9 = firstColumn[8].value
      var first_column = {

        aName1: aName1,
        aName2: aName2,
        aName3: aName3,
        aName4: this.model.aName4,
        aName5: this.model.aName5,
        aName6: this.model.aName6,
        aName7: this.model.aName7,
        aName8: this.model.aName8,
        aName9: this.model.aName9,
      }

      var combinedData = {
        label_size: label_size,
        column_size: column_size,
        plinth_flangePlate: plinth_flangePlate,
        plinth_stiffeners: plinth_stiffeners,
        norms_one: norms_one,
        basis: basis,
        first_column: first_column,
        second_column: second_column,
        third_column: third_column,
      }
      let uuid = uuidv4()
      var data1 = {
        id: uuid,
        // projectName: projectName,
        labelSize: JSON.stringify(combinedData.label_size),
        plinthStiffeners: JSON.stringify(combinedData.plinth_stiffeners),
        normsOne: JSON.stringify(combinedData.norms_one),
        basis: JSON.stringify(combinedData.basis),
      }
      var data2 = {
        id: uuid,
        projectName: projectName,
        firstColumn: JSON.stringify(combinedData.first_column),
        projectType: '倒三角',
      }
      
    // 判断是否为空
      let but = ''
      if (this.model.projectName == '' || this.model.projectName == undefined) {
        but = '请完善工程名称不能为空\n'
      }

      // a标牌尺寸
      if (this.model.a1 == '' || this.model.a1 == undefined) {
        but += '请完善标牌尺寸 L 不能为空\n'
      }

      if (this.model.a2 == '' || this.model.a2 == undefined) {
        but += '请完善标牌尺寸 B 不能为空\n'
      }

      if (this.model.a3 == '' || this.model.a3 == undefined) {
        but += '请完善标牌尺寸 H 不能为空\n'
      }

      
      // d柱脚加劲肋:

      if (this.model.d1 == '' || this.model.d1 == undefined) {
        but += '请完善柱脚加劲肋短边尺寸不能为空\n'
      }

      if (this.model.d2 == '' || this.model.d2 == undefined) {
        but += '请完善柱脚加劲肋长边尺寸不能为空\n'
      }
      if (this.model.d3 == '' || this.model.d3 == undefined) {
        but += '请完善柱脚加劲肋高度(毫米)不能为空\n'
      }

      if (this.model.d4 == '' || this.model.d4 == undefined) {
        but += '请完善柱脚加劲肋厚度不能为空\n'
      }

      // e A级螺栓:
      if (this.model.e1 == '' || this.model.e1 == undefined) {
        but += '请完善A级螺栓不能为空\n'
      }

      if (this.model.e2 == '' || this.model.e2 == undefined) {
        but += '请完善A级螺栓根数不能为空\n'
      }

      if (this.model.e3 == '' || this.model.e3 == undefined) {
        but += '请完善A级螺栓侧螺栓数量不能为空\n'
      }
      if (this.model.e4 == '' || this.model.e4 == undefined) {
        but += '请完善A级螺栓单根直径不能为空\n'
      }

      //f 基础

      if (this.model.f1 == '' || this.model.f1 == undefined) {
        but += '请完善基础混凝土不能为空\n'
      }

      if (this.model.f2 == '' || this.model.f2 == undefined) {
        but += '请完善基础混凝土重度不能为空\n'
      }
      if (this.model.f3 == '' || this.model.f3 == undefined) {
        but += '请完善基础长度不能为空\n'
      }

      if (this.model.f4 == '' || this.model.f4 == undefined) {
        but += '请完善基础宽度不能为空\n'
      }
      if (this.model.f4 == '' || this.model.f4 == undefined) {
        but += '请完善基础高度不能为空\n'
      }

      // amane
      if (this.model.aName1 == '' || this.model.aName1 == undefined) {
        but += '请完善结构重要系数不能为空\n'
      }

      if (this.model.aName2 == '' || this.model.aName2 == undefined) {
        but += '请完善永久荷载分项系数不能为空\n'
      }

      if (this.model.aName3 == '' || this.model.aName3 == undefined) {
        but += '请完善永久荷载分项系数不能为空\n'
      }
      if (this.model.aName4 == '' || this.model.aName4 == undefined) {
        but += '请完善 γQ 不能为空\n'
      }

      if (this.model.aName5 == '' || this.model.aName5 == undefined) {
        but += '请完善 γ 不能为空\n'
      }

      if (this.model.aName6 == '' || this.model.aName6 == undefined) {
        but += '请完善标志牌风力系数不能为空\n'
      }

      if (this.model.aName7 == '' || this.model.aName7 == undefined) {
        but += '请完善立柱风力系数不能为空\n'
      }

      if (this.model.aName8 == '' || this.model.aName8 == undefined) {
        but += '请完善空气密度不能为空\n'
      }
      if (this.model.aName9 == '' || this.model.aName9 == undefined) {
        but += '请完善风速不能为空\n'
      }

     
      
      if (but != '') {
      
        if (!this.isNotifying) {
        if (this.latestNotification) {  
        this.latestNotification.close(); // 销毁通知  
        this.latestNotification = null; // 清空最新的通知对象  
      }  
   
      const notification = Notification({
            position: 'bottom-right',
            type: 'warning',
            customClass: 'notification-custom',
            duration: 1000, // 设置为0表示手动关闭通知   换成真的值 就是消失时间
            dangerouslyUseHTMLString: true, // 允许使用HTML字符串
            message: `
            <div class="notification-message">
           ${but.replace(/\n/g, '<br>')}
           </div>`,
          })

      this.latestNotification = notification; // 保存最新的通知对象  
        }
      } else {
      
        httpAction(this.url.add,  [data1,data2],  'post')
          .then((res) => {
            if (res.success) {
              this.$message.success("计算成功")
              this.$emit('ok')
              this.$router.push({ path: '/triangle/triangle', query: { id: uuid } }) //跳转计算结果页面
            } else {
              this.$message.warning("请核对计算参数!")
            }
          })
          .finally(() => {
            this.confirmLoading = false
          })

        this.confirmLoading = true 
      }
    },
    add() {
      this.edit(this.modelDefault)
    },

    edit(record) {
      this.model = Object.assign({}, record)
      this.visible = true
    },
 
  },
}
</script>
<style>

.ant-select-selection--single {
    position: relative;
    height: 40px;
    cursor: pointer;
}
.ant-card-body {
    padding: 24px;
    zoom: 1;
    height: 800px;
    /* margin: 54px; */
}

.title-input {
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 50px;
    margin-top: -50px;
    position: relative;
    margin-left: 50%;
}

.title-text {
  line-height: 40px;
}

.nav {
  margin-top: 50px;
}

.card {
  margin-left: 10%;
}
.imgs {
  width: 300px;
  height: 400px;
}
.img-text {
  width: 300px;
  margin-left: 120px;
  margin-top: 30px;
}

.dic {
  position: relative;
  width: 50%;
  height: 500px;
  margin-left: 40%;
  /* background-color: aquamarine; */
  overflow: scroll;
  margin-top: -50%;
}
.dic-h2 {
  max-width: 10px 20px;
}
</style>
  
<style scoped>
@import '~@assets/less/common.less';
</style>

二,结果页面 

 

三,统计页面 


 <template>
  <!-- 最外层背景 -->
  <!-- <div class="nav"> -->
  <div>
    <div class="layout">
      <!-- 位于浏览器水平居中个位置 这个效果被称之为:版心-->
      <div class="bancen">
        <span class="span">工程名</span>

        <el-input class="inp" v-model="goujian" placeholder="请输入内容" size="mini" :disabled="true"></el-input>
        <!-- @click="" -->
        <el-button type="primary" icon="el-icon-edit" size="mini" @click="save">存档</el-button>
        <el-button type="primary" icon="el-icon-edit" size="mini" @click="browse" :disabled="!isButton2Enabled"  >浏览</el-button>
        <el-button type="primary" icon="el-icon-edit" size="mini" @click="download"  :disabled="!isButton3Enabled"  >下载</el-button>
      </div>
    </div>

    <div class="nav-1">
      <!-- </div> -->
      <!-- 头部 -->
      <div class="nav-header">
        <h2 class="headers">倒三角形柱式标志结构计算书</h2>


      </div>

      <!-- 内部数据 -->
      <th class="th">一、计算简图</th>
      <br />
      <img src="@/assets/images/daosanjiao.png" alt="" class="img" />

      
      <table class="tab">
 
      <tr>1、标牌采用{{jieguo_xbsResult.l17}}×{{jieguo_xbsResult.n17}}×{{jieguo_xbsResult.p17}}mm三角形标志板。</tr>
      <tr>2、立柱采用φ{{jieguo_xbsResult.l18}}×{{jieguo_xbsResult.n18}}mm钢管,立柱高H={{jieguo_xbsResult.q18}}mm。</tr>
      <tr>3、柱脚法兰盘采用{{jieguo_xbsResult.l19}}×{{jieguo_xbsResult.n19}}×{{jieguo_xbsResult.p19}}mm矩形法兰盘。</tr>
      <tr>4、柱脚加劲肋采用{{jieguo_xbsResult.l20}}~{{jieguo_xbsResult.n20}}×{{jieguo_xbsResult.p20}}×{{jieguo_xbsResult.r20}}mm梯形加劲肋。</tr>
      <tr>5、柱脚螺栓采用{{jieguo_xbsResult.l21}}根{{jieguo_xbsResult.n21}}螺栓,螺栓中心距法兰盘边缘{{jieguo_xbsResult.s21}}mm。</tr>
      <tr>6、基础采用{{jieguo_xbsResult.l22}}×{{jieguo_xbsResult.n22}}×{{jieguo_xbsResult.p22}}mm{{jieguo_xbsResult.l7}}素混凝土,混凝土容重为{{jieguo_xbsResult.t22}}kN/m^3。</tr>

</table>


<th>二、荷载计算</th>
      <table class="tab">
        <tr>  1、永久荷载   </tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;标志板由LF2-M型铝合金板制作,其单位面积质量为8.037kg/m<span><sup>2</sup></span><span>,其重力为:</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;G<span><sub>1</sub></span><span>=A</span><span>ρg</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k27}}×{{jieguo_xbsResult.m27}}×{{jieguo_xbsResult.o27}}={{jieguo_xbsResult.q27}}(N)</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;立柱采用φ{{jieguo_xbsResult.l28}}mm×{{jieguo_xbsResult.n28}}mm钢管,单位质量为{{jieguo_xbsResult.q28}}kg/m,其重力为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;G<span><sub>2</sub></span><span>=H</span><span>ρ</span><span><sub>1</sub></span><span>g</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k30}}×{{jieguo_xbsResult.m30}}×9.8={{jieguo_xbsResult.q30}}(N)</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;标志上部结构的总重力G按标志板和立柱总重力的110%计(考虑有关连接件及加劲肋等</tr>
        <tr>的重力),则</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;G=(G<span><sub>1</sub></span><span>+G</span><span><sub>2</sub></span><span>)</span><span>×1.1</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=({{jieguo_xbsResult.l34}}+{{jieguo_xbsResult.n34}})×1.1={{jieguo_xbsResult.r34}}(N)</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;有关系数将视永久荷载效应对结构构件或连接的承载能力是否有利而选择。</tr>
        <tr>2、风荷载</tr>
        <tr>(1)标志板</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;F<span><sub>wb</sub></span><span>=</span><span>γ</span><span><sub>0</sub></span><span>γ</span><span><sub>Q</sub></span><span>[(1/2</span><span>ρ</span><span>Cv</span><span><sup>2</sup></span><span>)(W</span><span><sub>b</sub></span><span>×</span><span>H</span><span><sub>b</sub></span><span>)]/1000</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k39}}×{{jieguo_xbsResult.m39}}×[(1/2×{{jieguo_xbsResult.p39}}×{{jieguo_xbsResult.r39}}×{{jieguo_xbsResult.t39}}^2)×(1/2×{{jieguo_xbsResult.w39}}×{{jieguo_xbsResult.y39}})]/1000={{jieguo_xbsResult.ac39}}(kN)</tr>
        <tr>(2)立柱</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;F<span><sub>wp</sub></span><span>=</span><span>γ</span><span><sub>0</sub></span><span>γ</span><span><sub>Q</sub></span><span>[(1/2</span><span>ρ</span><span>Cv</span><span><sup>2</sup></span><span>)(W</span><span><sub>p</sub></span><span>×</span><span>H</span><span><sub>p</sub></span><span>)]/1000</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k42}}×{{jieguo_xbsResult.m42}}×[(1/2×{{jieguo_xbsResult.p42}}×{{jieguo_xbsResult.r42}}×{{jieguo_xbsResult.t42}}^2)×({{jieguo_xbsResult.v42}}×{{jieguo_xbsResult.x42}})]/1000={{jieguo_xbsResult.ab42}}(kN)</tr>
        <tr></tr>
 
      </table>


      <th>三、强度验算</th>
      <table class="tab">
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;立柱的截面积为A={{jieguo_xbsResult.l44}}mm^2,截面惯性矩为I={{jieguo_xbsResult.p44}}mm^4,抗弯截面模量为W=</tr>
        <tr>{{jieguo_xbsResult.j45}}mm^3。</tr>
        <tr>1、立柱根部所受到的由风荷载引起的弯矩为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;M=F<span><sub>wb</sub></span><span>×</span><span>L</span><span><sub>3</sub></span><span>+F</span><span><sub>wp</sub></span><span>×</span><span>L</span><span><sub>2</sub></span><span>/2</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k48}}×{{jieguo_xbsResult.m48}}+{{jieguo_xbsResult.o48}}×{{jieguo_xbsResult.q48}}/2={{jieguo_xbsResult.s48}}(kN·m)</tr>
        <tr>2、立柱根部所受到的由风荷载引起的剪力为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;F=F<span><sub>wb</sub></span><span>+F</span><span><sub>wp</sub></span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k51}}+{{jieguo_xbsResult.m51}}={{jieguo_xbsResult.o51}}(kN)</tr>
        <tr>3、最大正应力验算</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;立柱根部横截面上由风荷载引起的最大正应力为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>σ</span><span><sub>max</sub></span><span>=M/W</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k55}}×10^6/{{jieguo_xbsResult.m55}}={{jieguo_xbsResult.o55}}(MPa)<γ·f={{jieguo_xbsResult.s55}}×{{jieguo_xbsResult.u55}}={{jieguo_xbsResult.w55}}(MPa),{{jieguo_xbsResult.z55}}要求。</tr>
        <tr>4、最大剪应力验算</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>τ</span><span><sub>max</sub></span><span>=2×F/A</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k58}}×{{jieguo_xbsResult.m58}}×10^3/{{jieguo_xbsResult.o58}}={{jieguo_xbsResult.q58}}(MPa)<fv={{jieguo_xbsResult.u58}}(MPa),{{jieguo_xbsResult.x58}}要求。</tr>
        <tr>5、危险点应力验算</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;对圆柱形立柱截面,通过圆心与X-X轴成45°的直线与截面中心线的交点处于复杂应力</tr>
        <tr>状态,正应力和剪应力均比较大,应对该点进行应力状态分析。</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;危险点所在的位置为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;x=y=({{jieguo_xbsResult.l63}}-{{jieguo_xbsResult.n63}})/2×sin(π/4)={{jieguo_xbsResult.q63}}(mm)。</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;危险点处的正应力为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>σ</span><span>=M·y/I</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k66}}×10^6/{{jieguo_xbsResult.m66}}×{{jieguo_xbsResult.o66}}={{jieguo_xbsResult.q66}}(MPa)</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;危险点处的剪应力为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>τ=F·S</span><span><sub>x</sub></span><span><sup>*</sup></span><span>/(I·2t)</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k69}}×10^3×(cosπ/4-cos3π/4)×[({{jieguo_xbsResult.p69}}-{{jieguo_xbsResult.r69}})/2]^2×{{jieguo_xbsResult.t69}}/({{jieguo_xbsResult.v69}}×2×{{jieguo_xbsResult.z69}})</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k70}}(MPa)</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;根据形状改变比能理论(即第四强度理论)进行强度校核。在此应力状态下,三个主</tr>
        <tr>应力分别为:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>σ</span><span><sub>1</sub></span><span>=σ/2+[(σ/2)</span><span><sup>2</sup></span><span>+τ</span><span><sup>2</sup></span><span>]</span><span><sup>0.5</sup></span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>σ</span><span><sub>2</sub></span><span>=0</span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>σ</span><span><sub>3</sub></span><span>=σ/2-[(σ/2)</span><span><sup>2</sup></span><span>+τ</span><span><sup>2</sup></span><span>]</span><span><sup>0.5</sup></span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;代入第四强度理论公式,可得到如下强度条件:</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;<span>σ</span><span><sub>4</sub></span><span><sup>*</sup></span><span>=(σ</span><span><sup>2</sup></span><span>+3τ</span><span><sup>2</sup></span><span>)</span><span><sup>0.5</sup></span></tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=({{jieguo_xbsResult.l78}}^2+3×{{jieguo_xbsResult.p78}}^2)^0.5={{jieguo_xbsResult.r78}}(MPa)<β1·f=1.1×{{jieguo_xbsResult.x78}}</tr>
        <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;={{jieguo_xbsResult.k79}}(MPa),{{jieguo_xbsResult.n79}}要求。</tr>
      </table>

    </div>
  </div>
</template>

<script>
import { Message } from 'element-ui'
import { httpAction } from '@/api/manage'
export default {
  data() {
    return {
    // 控制按钮显隐
      isButton2Enabled: false,  
      isButton3Enabled: false,  

      // 工程名称
      goujian: '',

      // 返回打印参数
      jieguo_xbsResult: [],
    }
  },

  methods: {

    save() {
     
      httpAction(`/triangular/bpTriangularSize/word?id=${this.id}`, null, 'get')
        .then((res) => {
          if (res.success) {
            const loading = this.$loading({
              lock: true,
              text: '存档中...',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)',
            })
            setTimeout(() => {
              loading.close()
              this.$message.success(res.message)
              this.isButton2Enabled = true;  
              this.isButton3Enabled = true;  
            }, 2000)

          } else {
            this.$message.warning(res.message)
          }
        })
        .finally(() => {
          this.confirmLoading = false
        })
    },

    browse() {

      // 在新窗口或标签页中打开一个网页,并传递参数/triangular/bpTriangularSize/wordToPdf88
      var myWindow = window.open(`http://172.16.4.7:9998/jeecg-boot/triangular/bpTriangularSize/wordToPdf88?id=${this.id}`) //后端写好 生成一个路径点击跳转

      // 等待新窗口加载完成后,向其传递参数
      myWindow.onload = function () {
        // 在新窗口中执行 JavaScript 代码
        myWindow.someFunction('参数值')
      }

      console.log('浏览')
    },
    download() {
 
      var myWindow = window.open(`http://172.16.4.2:9998/jeecg-boot/triangular/bpTriangularSize/download?id=${this.id}`) 

      // 等待新窗口加载完成后,向其传递参数
      myWindow.onload = function () {
        // 在新窗口中执行 JavaScript 代码
        myWindow.someFunction('参数值')
      }

      console.log('下载')
    },
  },

  mounted() {
    
    this.id = this.$route.query.id

    // 获取数据
    httpAction(`/triangular/bpTriangularSize/view?id=${this.$route.query.id}`, null, 'get')
      //  console.log('inssssssssssssssssssssput')
      .then((res) => {
        if (res.success) {
          console.log(res.result,'res')

          console.log(res.result.dsjResult,'倒三角')

          this.goujian = res.result.projectName

          this.jieguo_xbsResult = JSON.parse(res.result.dsjResult)

        
    
        } else {
          this.$message.warning(res.message)
        }
      })
      .finally(() => {
        this.confirmLoading = false
      })

  },
}
</script>

<style>
.nav {
  width: 100%;
  position: relative;
}
.nav-1 {
  margin: 0 auto;
  width: 850px;
  background-color: #fff;
  /* background-color: rgb(255, 255, 255); */
  padding: 0 40px;
  position: relative;
}

.span {
  margin-left: 15rem;
}
.inp {
  width: 200px;
  margin: 10px;
}
.nav-header {
  margin-top: -43rem;
  padding: 70px;
}
.headers {
    width: 274px;
    margin: 0 auto;
}

.tab {
  margin: 26px 6rem;
}
.but {
  margin-left: 70%;
}

.img {
  margin-bottom: 20px;
  margin: 0 9rem;
}
.th {
  margin: 10px;
}

/* .layout {
      height: 44px;

      position: sticky;
      top: 0px;
    } */

.layout {
  height: 44px;
  /* background-color: #d92b34; */
  /* 设置导航栏粘性定位 */
  /* width: 、、; */
  position: sticky;
  top: 0px;
}
/* 版心设置 ,在通栏内部设置版心宽高*/
.bancen {
  width: 988px;
  height: 44px;
  /* background-color: green; */
  /* 水平居中位置 */
  margin: 0 auto;
}
</style>

 

<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24"> </a-row>
      </a-form>
    </div>
  
    <div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{ x: true }"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
        class="j-table-force-nowrap"
        @change="handleTableChange"
      >
        <span slot="action" slot-scope="text, record" style="display: flex; justify-content: space-between">
          <a @click.stop="routera(record)">编辑新增</a>

          <a @click="look(record)">查看</a>
          <a @click="download(record)">下载</a>
          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>

    <bp-record-modal ref="modalForm" @ok="modalFormOk"></bp-record-modal>
  </a-card>
</template>

<script>
import { httpAction } from '@/api/manage'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import BpRecordModal from './modules/BpRecordModal'

export default {
  name: 'BpRecordList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    BpRecordModal,
  },
  data() {
    return {
      juxingid: [],
      daosanjid: [],
      description: '标志统计管理页面',
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        {
          title: '创建人',
          align: 'center',
          dataIndex: 'createBy',
        },
        {
          title: '创建日期',
          align: 'center',
          dataIndex: 'createTime',
          customRender: function (text) {
            return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
          },
        },
        {
          title: '计算类型',
          align: 'center',
          dataIndex: 'type',
        },
        {
          title: '工程名',
          align: 'center',
          dataIndex: 'projectName',
        },
        {
          title: '文件名',
          align: 'center',
          dataIndex: 'fileName',
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 210,
          scopedSlots: { customRender: 'action' },
        },
      ],
      url: {
        list: '/record/bpRecord/list',
        delete: '/record/bpRecord/delete',
        deleteBatch: '/record/bpRecord/deleteBatch',
        exportXlsUrl: '/record/bpRecord/exportXls',
        importExcelUrl: 'record/bpRecord/importExcel',
        juxing: '/jeecg-boot/rectangle/bpRectangleSize/queryById',
      },
      dictOptions: {},
      superFieldList: [],
    }
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    },
  },
  methods: {
    // 跳转详情  record 当前页数据
    routera(record) {
      // 如果 是倒三角 就跳转 带着当前数据  跳转到对应的页面  那个页面就是 接收路由参数
      if (record.type == '倒三角') {
        // console.log('倒三角 fuction')
        this.$router.push({ 
          path: '/invertedtriangle/BpTriangularSizeList',
          //  params: {data:record}}
          query: { data:record }
        })
      }

    },

    // 查看

    look(record) {
     
      if (record.type == '倒三角') {
      //后端写好 生成一个路径点击跳转
  // record.bpCountParameterId   这个是当前数据的id  打印 record就可以看见
        var myWindow = window.open(`http://172.16.4.72:9998/jeecg-boot/triangular/bpTriangularSize/wordToPdf88?id=${record.bpCountParameterId}`)

        // 等待新窗口加载完成后,向其传递参数
        myWindow.onload = function () {
          // 在新窗口中执行 JavaScript 代码
          myWindow.someFunction = function (param) {
            // 在这里处理参数或执行所需的操作
            // console.log('参数值:', param)
          }
        }
      }

    },

    // 下载
    download(record) {

      if (record.type == '倒三角') {
        // record.bpCountParameterId   这个是当前数据的id  打印 record就可以看见

        var myWindow = window.open(`http://172.16.4.72:9998/jeecg-boot/triangular/bpTriangularSize/download?id=${record.bpCountParameterId}`)

        // 等待新窗口加载完成后,向其传递参数
        myWindow.onload = function () {
          // 在新窗口中执行 JavaScript 代码
          myWindow.someFunction = function (param) {
            // 在这里处理参数或执行所需的操作
            // console.log('参数值:', param)
          }
        }
      }


      if (record.type == '矩形') {
        // 
        // console.log('矩形')
        // var myWindow = window.open(`http://192.168.31.105:8080/jeecg-boot/rectangle/bpRectangleSize/download?id=${this.id}`);  

        var myWindow = window.open(`http://172.16.4.72:9998/jeecg-boot/rectangle/bpRectangleSize/download?id=${record.bpCountParameterId}`)

        // 等待新窗口加载完成后,向其传递参数
        myWindow.onload = function () {
          // 在新窗口中执行 JavaScript 代码
          myWindow.someFunction = function (param) {
            // 在这里处理参数或执行所需的操作
            // console.log('参数值:', param)
          }
        }
      }

    },
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';

.l {
  display: flex;
  justify-content: space-between;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/288370.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

如何自动生成 API 接口文档 - 一份详细指南

本篇文章详细教你如何使用 Apifox 的 IDEA 插件实现自动生成接口代码。好处简单总结有以下几点&#xff1a; 自动生成接口文档&#xff1a; 不用手写&#xff0c;一键点击就可以自动生成文档&#xff0c;当有更新时&#xff0c;点击一下就可以自动同步接口文档&#xff1b;代码…

Apipost多Host服务配置

最近Apipost新增同环境下多host服务的配置功能&#xff0c;本篇文章带来该功能的使用场景及使用方法。 配置方法&#xff1a; 点击右上角眼睛标识进入环境管理 点击添加服务&#xff0c;输入服务名和URL 配置完成后需要在接口目录中选择该目录下需要使用的host服务&#xff0…

Linux——进程初识(二)

1. 对当前目录创建文件的理解 我们知道在创建一个文件时&#xff0c;它会被默认创建到当前目录下&#xff0c;那么它是如何知道当前目录的呢&#xff1f; 对于下面这样一段代码 #include <stdio.h> #include <unistd.h>int main() {fopen("tmp.txt", …

C++大作业——学生选课系统优化版

C大作业——学生选课系统优化版 前言1.学生类和课程类的实现2.输入输出流重载的实现3.增删改查的实现4.多级菜单的实现5.选课和退选的实现5.完整代码 前言 本文是对本人之前写过的一个学生选课系统的优化&#xff0c;整体上的逻辑是和我上一篇博客一样的&#xff08;链接在此&a…

这次,数据泄露的目标受害者指向了---救护车服务公司

已停业的救护车服务遭到勒索软件攻击导致近百万人受到威胁&#xff01; 此次数据泄露的目标受害者是法伦救护车服务公司&#xff0c;该公司是Transformative Healthcare的子公司。ALPHV勒索软件团伙声称对2023年4月下旬对Transformative Healthcare的攻击负责&#xff0c;并导…

3dmax全景图用什么渲染 全景图云渲染使用教程

在给客户展示设计概念时&#xff0c;应用3ds Max创建的全景图是一个高效直观的方法。这种方式不仅可以全方位地呈现整个空间&#xff0c;让客户沉浸式地感受设计师的创意&#xff0c;而且在展现大型空间设计&#xff0c;如展览馆或者会议室等&#xff0c;效果尤其显著&#xff…

如何在anaconda里安装basemap和pyproj库

当直接使用conda命令进行安装basemap和pyproj库时&#xff0c;会出现版本不对应的报错问题(如下图)&#xff0c;所以此篇博客用以展示如何安装basemap和pyproj库 题主默认使用的anaconda源已经切换成了清华大学源&#xff0c;但是仍然会出现报错&#xff0c;所以不是源的问题&a…

什么是向量数据库

什么是向量数据库 向量数据库是一种应用在高效存储和查询高维向量的数据库。在传统的OLTP和OLAP数据库中&#xff08;如上图所示&#xff09;&#xff0c;数据按行和列组织&#xff08;这些称为表&#xff09;&#xff0c;并根据这些列中的值执行查询。然而&#xff0c;在某些应…

ASP.NET Core AOT

Native AOT 最初在 .NET 7 中引入&#xff0c;在即将发布的 .NET 8 版本中可以与 ASP.NET Core 一起使用。在这篇文章中&#xff0c;我们从总体角度审视其优点和缺点&#xff0c;并进行测量以量化不同平台上的改进。 源代码&#xff1a;https://download.csdn.net/download/he…

华清远见作业第二十天——IO(第三天)

思维导图&#xff1a; 使用标准IO完成两个文件的拷贝 代码&#xff1a; #include<stdio.h> #include<string.h> #include<stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main(int argc, const char *…

SQL Server注入之攻防技战法

那天下着很大的雨&#xff0c;母亲从城里走回来的时候&#xff0c;浑身就是一个泥人&#xff0c;那一刻我就知道我没有别的选择了 1.Mssql报错注入 0.判断数据库类型 1.爆当前用户名 2.爆版本 3.爆服务器名 4.判断数据库个数 5.获取全部数据库 语句只适合>2005 爆当前数据…

桶式移位器

前言 本篇文章介绍CPU的核心部件之一&#xff1a;桶式移位器&#xff0c;简称BS&#xff0c;英文全称为Barrel Shifter 桶式移位器最大的特点就是能在单周期内完成多种方式&#xff0c;各种位数的移位操作 常见的移位操作 常见的移位操作种类如下&#xff1a; 算术右移 是指…

google-java-format 配置及应用

以google 的java 风格为基准&#xff0c;以后面的开发中&#xff0c;都需要满足这个&#xff0c;主要用到的是google的两个插件&#xff1a;google-java-format, google_checks.xml代码格式检测&#xff0c;这两个堪称双剑合并&#xff0c;代码成诗。google-java-format替换ide…

RS485数据采集模块,如何一次采集多个modbus设备数据?

在工业数据采集中&#xff0c;RS485是一种常见的数据通信协议&#xff0c;而Modbus则是其上的常用设备协议。那么&#xff0c;如何用一个模块高效采集多个Modbus设备的数据呢&#xff1f;这就是我们今天要探讨的话题&#xff01; 什么是RS485数据采集模块&#xff1f; 首先&a…

算法28:力扣64题,最小路径和------------样本模型

题目&#xff1a; 给定一个二维数组matrix&#xff0c;一个人必须从左上角出发&#xff0c;最后到达右下角 。沿途只可以向下或者向右走&#xff0c;沿途的数字都累加就是距离累加和 * 返回累加和最小值 思路&#xff1a; 1. 既然是给定二维数组matrix&#xff0c;那么二维数…

FreeRTOS——队列及其实战

1.队列概念 1&#xff09;队列是任务到任务、任务到中断、中断到任务数据交流的一种机制&#xff08;消息传递&#xff09; 2&#xff09;队列类似数组&#xff0c;只能存储有限数量、相同类型的数据&#xff0c;在创建时需指定队列长度与队列项大小 3&#xff09;出队入队阻塞…

xshell登录不上虚拟机了

电脑重启后连不上本地虚机了 1、关闭防火墙 2 虚拟机ping得到主机&#xff0c;而主机ping不到虚拟机的解决办法 原因&#xff1a;可能是主机的网络适配器没有调好 首先&#xff0c;找到虚拟机的网络配置器 根据虚拟机的IP信息修改主机虚拟适配器VMnet8 修改ip使得和虚拟机连…

Element-ui自定义input框非空校验

1、vue自定义非空指令&#xff1a; main.js中自定义非空指令 当input框或下拉框中数据更新时&#xff0c;触发校验 Vue.directive(isEmpty,{update:function(el,binding,vnode){if(vnode.componentInstance.value""){el.classList.add("is-required");}e…

[Unity]实时阴影技术方案总结

一&#xff0c;Planar Shadow 原理就是将模型压扁之后绘制在需要接受阴影的物体上&#xff0c;这种方式十分高效&#xff0c;消耗很低。具体实现过程参考Unity Shader - Planar Shadow - 平面阴影。具按照自己的理解&#xff0c;其实就是根据光照方向计算片元在接受阴影的平面…

详解卡尔曼滤波(Kalman Filter)

1. 从维纳滤波到卡尔曼滤波 黑盒&#xff08;Black Box&#xff09;思想最早由维纳&#xff08;Wiener&#xff09;在1939年提出&#xff0c;即假定我们对从数据到估计中间的映射过程一无所知&#xff0c;仅仅用线性估计&#xff08;我们知道在高斯背景下&#xff0c;线性估计…