当前位置: 首页 > news >正文

如果接口返回值图片有很长一串码,需要添加前缀

在这里插入图片描述

需要在前面添加前缀:data:image/jpeg;base64,然后将值赋值给<img :src="originalImage" />

 this.tableLists.map((item)=>{item.originalImage = "data:image/jpeg;base64,"+item.originalImage})

以上方法会导致出现一个小bug,在添加更新列表的时候,上一条数据的图片不显示。如下:
在这里插入图片描述
需修改逻辑代码如下:

   <el-table-column prop="originalImage" width="120" align="center"  label="票据预览"><template #default="scope"><div style="display: flex; align-items: center"><!-- <a :href="scope.row.originalImage" target="_blank"> --><img :src="'data:image/jpeg;base64,'+scope.row.originalImage" alt="" srcset="" slot="reference" style="width: 107px;"/><!-- </a> --></div></template></el-table-column>

<img>标签上前缀进行动态拼接字段,图像数据即可正常展示。
在这里插入图片描述

<template><div id="IntelligentReimbursement"  class="scroll-container" style="padding-left: 16px;"><div class="container"><div class="title"><div class="title1"><span><img src="../../assets/fangan@2x.png" alt="" srcset=""></span><span class="titleRight">差旅报销信息</span></div><div class="title2"><!-- <span><img src="../../assets/fangan.png" alt="" srcset=""> --><!-- <el-upload v-model="fileLists"><el-button link type="primary" @click="uploadFile()" style="    margin-right: 8px;">附件上传</el-button></el-upload> --><!-- <img :src="srcUrl" alt="" srcset="" style="width: 100%;height: 100%;"> --><!-- </span> --></div></div><div class="content"><el-form  :model="searchParams"ref="FormInfoData"><el-row><el-col :span="8"><el-form-item label="经办人:"><span>{{ '闫主任' }}</span></el-form-item></el-col><el-col :span="8"><el-form-item label="经办人工号:"><span>{{ '20038415' }}</span></el-form-item></el-col><el-col :span="8"><el-form-item label="代报销人工号:"><el-input v-model="searchParams.proxyReimbursementTravelerJobId" placeholder="请输入报销人工号"/></el-form-item></el-col></el-row><el-row><el-col :span="24"><el-form-item label="差旅选项:"><el-checkbox-group v-model="searchParams.checkRadioGroup"><el-checkbox v-for="city in searchParams.radioGroup" :key="city" :label="city" :value="city">{{ city }}</el-checkbox><!-- <el-radio :value="3">关联商旅平台</el-radio><el-radio :value="6">申请差旅补助</el-radio><el-radio :value="9">出差住宿报销</el-radio><el-radio :value="10">新员工入职出差</el-radio> --></el-checkbox-group></el-form-item></el-col></el-row><el-row><el-col :span="8"><el-form-item label="出发地点:"><el-input v-model="searchParams.departure" placeholder="请输入出发地点"/></el-form-item></el-col><el-col :span="8"></el-col><el-col :span="8"><el-form-item label="到达地点:"><el-input v-model="searchParams.arriTripLocation" placeholder="请输入到达地点"/></el-form-item></el-col></el-row><el-row><el-col :span="8"><el-form-item label="起始时间:"><el-input  type="date" v-model="searchParams.startTime" placeholder="请输入起始时间"/><!-- <p style="    color: #606266;">(例:日期格式为2024-11-28)</p> --></el-form-item></el-col><el-col :span="8">     </el-col><el-col :span="8"><el-form-item label="结束时间:"><el-input  type="date" v-model="searchParams.endTime" placeholder="请输入结束时间"/></el-form-item></el-col></el-row><!-- <el-row><el-col :span="18"><el-form-itemlabel="请仿照示例描述差旅信息:":label-width="labelText + 'px'"><el-inputclass="placeholderTextarea"v-model="searchParams.desInformation"placeholder="本人报销2024年11月3日至11月9日由北京去重庆市出差的差旅票据,本次报销交通费、住宿费用及7天的补助、走部门费用-制造费用、请帮我识别票据信息。"type="textarea"/><p style="color: red;" v-show="isShow">请语音输入需要报销的项目号</p></el-form-item></el-col><el-col :span="1"><img src="../../assets/yuyinshibie@2x.png" alt=""  @click="initVoice()" srcset="" style="margin-top: 32px;"></el-col></el-row> --><el-row class="myBottom"><el-col :span="5"><!-- <el-uploadv-model:file-list="fileList"class="upload-demo"action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"multiple:on-preview="handlePreview":on-remove="handleRemove":before-remove="beforeRemove":limit="3":on-exceed="handleExceed"><el-button type="primary">Click to upload</el-button><template #tip><div class="el-upload__tip">jpg/png files with a size less than 500KB.</div></template></el-upload> --><!--            <el-upload ref="ocrupimgupload" action="#" -->
<!--            list-type="text"-->
<!--            :multiple="false"-->
<!--            :on-change="uploadimgChange"-->
<!--            :on-remove="handleRemove"-->
<!--            :on-preview="handlePictureCardPreview"-->
<!--            :auto-upload="false"-->
<!--            :on-success="handleSuccess"-->
<!--            :file-list="imgfileList"-->
<!--            :show-file-list="false"-->
<!--            :before-upload="beforeimglistUpload"-->
<!--            accept=".jpg,.jpeg,.png,.bmp">-->
<!--             -->
<!--            <el-button type="primary">-->
<!--                <img src="../../assets/piaoju@2x.png" alt="" srcset="" class="img-size">-->
<!--              票据上传-->
<!--            </el-button>-->
<!--          </el-upload>--><div style="position: relative;"><input id="default-btn" type="file" @change="onSelectFile"  class="upload-input" style="width: 230px;"><img src="../../assets/piaoju@2x.png" alt="" style="position: absolute; bottom: 28%; right: 78%;"></div><!-- <input type="file"  @change="uploadPic"> --></el-col><el-col :span="3"></el-col><el-col :span="5"><el-button type="primary" @click="infoConfirm" ><img src="../../assets/gongdanqueren@2x.png" alt="" srcset="" class="img-size" >信息确认</el-button></el-col></el-row></el-form></div></div><div class="container"><div class="title"><div class="title1"><span><img src="../../assets/guanlianshengchengpingzheng@2x.png" alt="" srcset=""></span><span class="titleRight">商旅出差申请单详情</span></div></div><div class="content2" style="padding: 28px 30px;"><el-table:data="tableDatas"style="width: 100%":header-cell-style="{background: '#ECF3FF',color: '#027DDD',height: '35px',}":row-style="{ height: 12 + 'px' }"border><el-table-columnprop="businessTravelerName"label="出差人"align="center"></el-table-column><!-- <el-table-columnprop="xxx"label="出发城市"align="center"></el-table-column> --><el-table-columnprop="destination"label="出差城市"align="center"></el-table-column><el-table-columnprop="actualStartTime"label="出发日期"align="center"></el-table-column><el-table-columnprop="actualEndTime"label="返回日期"align="center"></el-table-column><el-table-columnlabel="交通工具"align="center"><template #default="scope"><span>{{ scope.row.transportation }}</span><!-- <el-tag effect="dark"  type="success">{{ scope.row.transportation }}</el-tag> --></template></el-table-column><!-- <el-table-columnprop="xxx"label="出差类别"align="center"></el-table-column> --><el-table-columnprop="purpose"label="出差事由"align="center"width="270"></el-table-column></el-table></div></div><div class="container"><div class="title"><div class="title1"><span><img src="../../assets/xinxitianxie@2x.png" alt="" srcset=""></span><span class="titleRight">报销项目信息详情</span></div></div><div class="content2" style="padding: 28px 23px;"><el-form :model="searchParams2"  ><el-row ><el-col><el-form-item label="出差目的:" :label-width="labelText + 'px'" ><el-input placeholder="出差目的" v-model="searchParams2.PurBusTrip" type="textarea"></el-input></el-form-item></el-col></el-row><el-row style="margin-top: 15px;"><el-col :span="10"><el-form-item label="WBS编号:" :label-width="labelText + 'px'" ><el-select v-model="searchParams2.WbsNumber" placeholder="WBS编号"  @change="changeWBS"><el-optionv-for="item in wbsLists":key="item":label="item":value="item"/></el-select></el-form-item></el-col><el-col :span="4"></el-col><el-col :span="10"><el-form-item label="订单号:" :label-width="labelText + 'px'" ><el-select v-model="searchParams2.OrderNo" placeholder="订单号"  @change="changeDDH"><el-optionv-for="item in ddLists":key="item":label="item":value="item"/></el-select></el-form-item></el-col></el-row><el-row style="margin-top: 15px;"><el-col :span="10"><el-form-item label="成本中心:" :label-width="labelText + 'px'" ><!-- <el-input placeholder="成本中心" v-model="searchParams2.costCenter"></el-input> --><el-select v-model="searchParams2.costCenter" placeholder="成本中心"  @change="changecb"><el-optionv-for="item in cbLists":key="item":label="item":value="item"/></el-select></el-form-item></el-col><el-col :span="4"></el-col><el-col :span="10"><el-form-item label="利润中心:" :label-width="labelText + 'px'" ><!-- <el-input placeholder="利润中心" v-model="searchParams2.profitCenter"></el-input> --><el-select v-model="searchParams2.profitCenter" placeholder="利润中心"  @change="changelr"><el-optionv-for="item in lrLists":key="item":label="item":value="item"/></el-select></el-form-item></el-col></el-row></el-form></div></div><div class="container" style="height: 729px;"><div class="title"><div class="title1"><span><img src="../../assets/mingxi@2x.png" alt="" srcset=""></span><span class="titleRight">差旅费用明细</span></div></div><div class="content2" style="padding: 28px 23px;height: 620px;"><el-table:data="tableLists"height="560"style="width: 100%":header-cell-style="{ background: '#ECF3FF', color: '#027DDD',height: '45px', }":row-style="{ height: 12 + 'px' }"@cell-dblclick="tableDbEdit":row-class-name="tableRowClassName"><!-- 拓展展开开始 --><el-table-column type="expand" width="0"><template #default="props"><div class="m4_con"><!-- <div class="title_con"><p m="t-0 b-2">1. 项目资产费用情况说明书已填写完整</p><span style="margin-left:20px">✅</span></div><p m="t-0 b-2">2. 项目资产费用情况说明书填写缺失 <span style="color:red;margin-left:20px">❌</span><span style="margin-left:25px">建议:请补充发票金额数据内容。</span></p> --><p m="t-0 b-2" ><span id="errorText">x</span>发票提前开具。 <span class="ml_20">建议:请上传提前开具发票的说明。<!-- {{ props.row.city }} --></span></p><p m="t-0 b-2" ><span id="errorText">x</span>发票抬头错误。<span class="ml_20"><!-- {{ props.row.city }} -->建议:请重新开具住宿费发票并上传。</span></p></div></template></el-table-column><!-- 拓展展开结束 --><el-table-column type="index" width="80" align="center"  label="序号" /><el-table-column prop="originalImage" width="120" align="center"  label="票据预览"><template #default="scope"><div style="display: flex; align-items: center"><!-- <a :href="scope.row.originalImage" target="_blank"> --><img :src="'data:image/jpeg;base64,'+scope.row.originalImage" alt="" srcset="" slot="reference" style="width: 107px;"/><!-- </a> --></div></template></el-table-column><el-table-column  align="center" prop="invoiceType" width="160" show-overflow-tooltip label="发票类型"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.invoiceType"placeholder="发票类型"></el-input><span v-else>{{ scope.row.invoiceType }}</span></template></el-table-column><el-table-columnprop="ticketAmount"align="center"width="160"label="交通费用金额 (元)"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.ticketAmount"placeholder="交通费用金额"></el-input><span v-else>{{ scope.row.ticketAmount }}</span></template></el-table-column><el-table-column prop="invoiceAmount" width="160" align="center" label="发票金额 (元)"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.invoiceAmount"placeholder="发票金额"></el-input><span v-else>{{ scope.row.invoiceAmount }}</span></template></el-table-column><el-table-column prop="deductibleInvoiceAmountExcludingTax" align="center" width="180" label="抵扣发票的不含税金额 (元)"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.deductibleInvoiceAmountExcludingTax"placeholder="抵扣发票的不含税金额"></el-input><span v-else>{{ scope.row.deductibleInvoiceAmountExcludingTax }}</span></template></el-table-column><!-- <el-table-column prop="civilAviationDevelopmentFund" align="center" width="160" label="民航发展基金"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.civilAviationDevelopmentFund"placeholder="民航发展基金"></el-input><span v-else>{{ scope.row.civilAviationDevelopmentFund }}</span></template></el-table-column> --><!-- <el-table-column prop="deductibleInvoiceTaxAmount" align="center" width="160" label="抵扣发票的税额 (元)"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.deductibleInvoiceTaxAmount"placeholder="抵扣发票的税额"></el-input><span v-else>{{ scope.row.deductibleInvoiceTaxAmount }}</span></template></el-table-column> --><el-table-column prop="startDate" align="center" width="160" label="开始日期"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.startDate"placeholder="开始日期"></el-input><span v-else>{{ scope.row.startDate }}</span></template></el-table-column><el-table-column prop="departureLocation" align="center" width="160" label="出发地点"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.departureLocation"placeholder="出发地点"></el-input><span v-else>{{ scope.row.departureLocation }}</span></template></el-table-column><el-table-column prop="endDate" align="center" width="160" label="结束日期"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.endDate"placeholder="结束日期"></el-input><span v-else>{{ scope.row.endDate }}</span></template></el-table-column><el-table-column prop="arrivalLocation" align="center" width="160" label="到达地点"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.arrivalLocation"placeholder="费用项目"></el-input><span v-else>{{ scope.row.arrivalLocation }}</span></template></el-table-column><!-- <el-table-column prop="fuelSurcharge" align="center" width="160" label="燃油附加费 (元)"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.fuelSurcharge"placeholder="燃油附加费"></el-input><span v-else>{{ scope.row.fuelSurcharge }}</span></template></el-table-column> --><!-- 从这里开始  --><!-- <el-table-column prop="invoiceTaxCode" align="center" width="160" label="税码"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.invoiceTaxCode"placeholder="税码"></el-input><span v-else>{{ scope.row.invoiceTaxCode }}</span></template></el-table-column> -->
<!-- <el-table-column prop="startDate" align="center" width="160" label="开始日期"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.startDate"placeholder="开始日期"></el-input><span v-else>{{ scope.row.startDate }}</span></template></el-table-column><el-table-column prop="departureLocation" align="center" width="160" label="出发地点"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.departureLocation"placeholder="出发地点"></el-input><span v-else>{{ scope.row.departureLocation }}</span></template></el-table-column><el-table-column prop="endDate" align="center" width="160" label="结束日期"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.endDate"placeholder="结束日期"></el-input><span v-else>{{ scope.row.endDate }}</span></template></el-table-column><el-table-column prop="arrivalLocation" align="center" width="160" label="到达地点"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.arrivalLocation"placeholder="费用项目"></el-input><span v-else>{{ scope.row.arrivalLocation }}</span></template></el-table-column> --><el-table-column prop="seat" align="center" width="160" label="座次"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.seat"placeholder="结束日期"></el-input><span v-else>{{ scope.row.seat }}</span></template></el-table-column><!-- 按照系统新增字段属性值开始 -->
<!--        <el-table-column prop="endDate" align="center" width="160" label="交通工具">-->
<!--          <template #default="scope">-->
<!--            <el-input-->
<!--              v-if="scope.row.edit"-->
<!--              v-model="scope.row.fuelSurcharge"-->
<!--              placeholder="交通工具"-->
<!--            ></el-input>-->
<!--            <span v-else>{{ scope.row.fuelSurcharge }}</span>-->
<!--          </template>-->
<!--        </el-table-column>--><!--        <el-table-column prop="endDate" align="center" width="160" label="报销天数">-->
<!--          <template #default="scope">-->
<!--            <el-input-->
<!--              v-if="scope.row.edit"-->
<!--              v-model="scope.row.fuelSurcharge"-->
<!--              placeholder="费用项目"-->
<!--            ></el-input>-->
<!--            <span v-else>{{ scope.row.fuelSurcharge }}</span>-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column prop="endDate" align="center" width="160" label="住宿城市">-->
<!--          <template #default="scope">-->
<!--            <el-input-->
<!--              v-if="scope.row.edit"-->
<!--              v-model="scope.row.fuelSurcharge"-->
<!--              placeholder="费用项目"-->
<!--            ></el-input>-->
<!--            <span v-else>{{ scope.row.fuelSurcharge }}</span>-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        &lt;!&ndash; 按照系统新增字段属性值结束 &ndash;&gt;--><el-table-column prop="Remarks" label="*特殊情况说明" align="center" min-width="280" ><template #default="scope"><!-- <div @click="showOverflowTooltip"> --><!-- scope.row.edit --><el-inputv-if="scope.row.edit"v-model="scope.row.Remarks"style="width: 220px"placeholder="请填写异常信息"/><!-- <span id="bzTextInfo" v-else>{{showEditTextContent}}</span> --><span id="bzTextInfo" v-if="showEditTextContent">{{scope.row.Remarks}}</span><!-- <el-button link type="primary" size="small" @click="addFaceDB('edit',scope.row)"></el-button><el-button link type="primary" size="small" @click="deleteItem(scope.row)"></el-button> --><!-- </div> --></template></el-table-column><!-- 按照系统新增末尾字段属性值开始 --><!-- <el-table-column prop="endDate" align="center" width="160" label="成本中心"></el-table-column><el-table-column prop="endDate" align="center" width="160" label="业务类型"></el-table-column><el-table-column prop="endDate" align="center" width="160" label="内部订单"></el-table-column><el-table-column prop="endDate" align="center" width="160" label="WBS元素"></el-table-column><el-table-column prop="endDate" align="center" width="160" label="报销标准"></el-table-column><el-table-column prop="endDate" align="center" width="160" label="是否超标"></el-table-column><el-table-column prop="endDate" align="center" width="160" label="是否关联商旅"></el-table-column> --><!-- 按照系统新增末尾字段属性值结束 --><el-table-column label="操作栏"  align="center" fixed="right" min-width="180" ><template #default="scope"><!-- <el-button type="primary" :icon="Edit"  @click="editInfoCon(scope.$index,scope.row,'编辑')">{{ textBtn }}</el-button> --><el-button type="primary" :icon="Edit" circle :disabled="scope.row.edit" @click="editInfoCon(scope.$index,scope.row)"></el-button><el-button type="primary" :icon="Check" circle :disabled="!scope.row.edit" @click="saveInfoCon(scope.$index,scope.row)"></el-button><!-- <el-popconfirm title="确定删除吗?"><template #reference><el-button type="danger" :icon="Delete" circle  @click="deleteInfoCon(scope.$index,scope.row)"></el-button></template></el-popconfirm> --><el-button type="danger" :icon="Delete" circle  @click="deleteInfoCon(scope.$index,scope.row)"></el-button></template></el-table-column></el-table><el-row style="margin-top: 28px;"><el-col><el-button @click="cancelAllPageCon">取消</el-button><el-button type="primary" @click="confirmAllPageCon" style="margin-left: 65px;">确定</el-button></el-col></el-row></div></div><div class="dialog"><el-dialog title="请确认报销信息" v-model="dialogVisible"><el-tablev-loading="loadingTable"element-loading-text="AI正在根据您的描述生成中,请稍等...":element-loading-spinner="svg"element-loading-svg-view-box="-10, -10, 50, 50"element-loading-background="rgba(236, 243, 255, 0.8)":data="confirmInfoLists"default-expand-allheight="380"style="width: 100%":header-cell-style="{ background: '#ECF3FF', color: '#027DDD',height: '45px', }":row-style="{ height: 12 + 'px' }"><el-table-column type="index" width="120" align="center"  label="序号" /><el-table-column prop="startTime" width="160" align="center" label="开始日期"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.startTime"placeholder="费用项目"></el-input><span v-else>{{ scope.row.startTime }}</span></template></el-table-column><el-table-column prop="endTime" align="center" width="160" label="结束日期"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.endTime"placeholder="费用项目"></el-input><span v-else>{{ scope.row.endTime }}</span></template></el-table-column><el-table-column prop="invoiceType" align="center" width="160" label="票据类型"><!-- <template #default="scope"><el-tag effect="dark"  type="primary">{{ scope.row.invoiceType }}</el-tag></template> --><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.invoiceType"placeholder="费用项目"></el-input><span v-else>{{ scope.row.invoiceType }}</span></template></el-table-column><el-table-column prop="destination" align="center" width="160" label="地点"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.destination"placeholder="费用项目"></el-input><span v-else>{{ scope.row.destination }}</span></template></el-table-column><el-table-column prop="expenseType" align="center" width="160" label="费用类型"><template #default="scope"><el-inputv-if="scope.row.edit"v-model="scope.row.expenseType"placeholder="费用项目"></el-input><span v-else>{{ scope.row.expenseType }}</span></template></el-table-column><el-table-column label="操作栏"  align="center" min-width="180" fixed="right"><template #default="scope"><!-- <el-button type="primary" :icon="Edit"  @click="editInfoCon(scope.$index,scope.row,'编辑')">{{ textBtn }}</el-button> --><el-button type="primary" :icon="Edit" circle :disabled="scope.row.edit" @click="editDiaInfo(scope.$index,scope.row)"></el-button><el-button type="primary" :icon="Check" circle :disabled="!scope.row.edit" @click="saveDiaInfo(scope.$index,scope.row)"></el-button><el-button type="danger" :icon="Delete" circle  @click="deletediaInfo(scope.$index,scope.row)"></el-button></template></el-table-column></el-table><el-row><el-col :span="12" type="cancel">取消</el-col><el-col :span="12" type="primary" @click="submitCon">确认</el-col></el-row><!-- <el-form  :model="searchParams_info"ref="FormInfoData" class="dialog-form"><el-row><el-col :span="24" style="margin-top: 14px;"><el-form-itemlabel="报销起始时间:":label-width="dialogLabelText + 'px'"><el-date-pickerv-model="searchParams_info.startTime"type="date"placeholder="请选择"size="large"/></el-form-item></el-col></el-row><el-row><el-col :span="24"><el-form-itemlabel="报销结束时间:":label-width="dialogLabelText + 'px'"><el-date-pickerv-model="searchParams_info.endTime"type="date"placeholder="请选择"size="large"/></el-form-item></el-col></el-row><el-row><el-col :span="18"><el-form-itemlabel="出差地点:":label-width="dialogLabelText + 'px'"><el-inputv-model="searchParams_info.destination"placeholder="请输入出差地点(例如:上海)"size="large"clearable/></el-form-item></el-col></el-row><el-row><el-col :span="18"><el-form-itemlabel="票据类型:":label-width="dialogLabelText + 'px'"><el-select v-model="searchParams2.destination" placeholder="请选择票据类型"  @change="changeDes" size="large"><el-optionv-for="item in destinationLists":key="item.dep":label="item.dep":value="item.dep"/></el-select></el-form-item></el-col></el-row><el-row><el-col :span="18"><el-form-itemlabel="费用类型:":label-width="dialogLabelText + 'px'"><el-select v-model="searchParams2.expenseType" placeholder="请选择费用类型"  @change="changeExp" size="large"><el-optionv-for="item in expenseTypeLists":key="item.dep":label="item.dep":value="item.dep"/></el-select></el-form-item></el-col></el-row><el-row style="margin-top: 28px;"><el-col><el-button>取消</el-button><el-button type="primary" style="margin-left: 65px;">确定</el-button></el-col></el-row></el-form> --></el-dialog></div></div></template><script setup>import {Check,Delete,Edit,Message,Search,Star,
} from '@element-plus/icons-vue'import { reactive, ref, onBeforeMount, onMounted, watch, nextTick } from "vue";import { ElMessage } from "element-plus";import axios from 'axios';</script><script>import noAttUploadRecognition from "./../noAttUploadRecognition/index.vue";// import voice from '../../apis/commons/ai_voice.adv'import VoiceStreamer from "../../../public/ai_voice.adv.es6.js";
import { fa } from "element-plus/es/locale/index.mjs";export default {name: "IntelligentReimbursement",components: { noAttUploadRecognition },props:{prop:{type: String,default: "这是外部属性没传时的默认值",required: false}},watch: {// // 监听内部属性的变化// inside_prop:{//     handler(inside_prop_new){//         // 将外部的属性更新//         this.$emit('update:prop',inside_prop_new);//     },//     deep: true,//     immediate: true// },// 监听外部属性的变化prop: {handler(jsonString) {// 更新内部的属性try {// this.inside_prop = outside_prop_new;let jsonObj = JSON.parse(jsonString);this.searchParams.departure = jsonObj.departure;//出发地点this.searchParams.arriTripLocation = jsonObj.destination;//到达地点this.searchParams.startTime = jsonObj.startTime;//起始时间this.searchParams.endTime = jsonObj.endTime;//结束时间//this.searchParams.checkRadioGroup = [];if(jsonObj.isLinkedToBusinessTravelPlatform){//是否关联商旅平台this.searchParams.checkRadioGroup.push("关联商旅平台");}if(jsonObj.isApplyingForTravelAllowance){//是否申请差旅补助this.searchParams.checkRadioGroup.push("申请差旅补助");}if(jsonObj.isOvernightStayReimbursement){//是否为加班住宿报销this.searchParams.checkRadioGroup.push("出差住宿报销");}// debuggerif(jsonObj.isNewEmployeeOnboardingTrip){//是否为新员工入职出差this.searchParams.checkRadioGroup.push("新员工入职出差");}if(jsonObj.isProxyReimbursement){//是否代报销this.searchParams.proxyReimbursementTravelerJobId = jsonObj.proxyReimbursementTravelerJobId;}else{this.searchParams.proxyReimbursementTravelerJobId = "";}// jsonObj.isLinkedToBusinessTravelPlatform :"" as boolean, //是否关联商旅平台//     jsonObj.isApplyingForTravelAllowance :  "" as boolean, //是否申请差旅补助//     jsonObj.isOvernightStayReimbursement :  "" as boolean, //是否为加班住宿报销//     jsonObj.isNewEmployeeOnboardingTrip : "" as boolean, //是否为新员工入职出差//     jsonObj.isProxyReimbursement :  "" as boolean, //是否代报销//     jsonObj.proxyReimbursementTravelerJobId :  "", //实际出差报销人员工号}catch (e) {}},deep: true,immediate: true},},data() {return {loadingTable:true,  //请确认报销信息LoadingconfirmInfoLists:[], //二次弹窗-请确认报销信息数据srcUrl:'',textBtn:'编辑',//编辑按钮tableLists:[],//差旅费用明细dialogLabelText:230,searchParams_info:{},dialogVisible:false,//弹窗isShow:false, //是否显示重新识别(red)// fileLists:[],//上传文件地址labelText:180,// voiceStreamer:null, //音频播放器// InfoFilling:{}, //报销项目信息详情showTable: false,tableDatas: [], // 出差申请单详情// acticeText_sl: "否", //是否关联商旅平台// ApplyTravelAllowance: "否", //申请差旅补助// acticeText_dbx: "否", //是否为代报销// active_OveAccReim: "否", //是否为加班住宿报销// active_newPerson: "否", //是否为新员工入职出差searchParams: {// radioGroup:3,checkRadioGroup:[],radioGroup:['关联商旅平台','申请差旅补助','出差住宿报销','新员工入职出差'],departure:'' ,//出发地点arriTripLocation:'', //到达地点startTime:'', //起始时间endTime:'', //结束时间proxyReimbursementTravelerJobId:'20079205'// desInformation: "这是2023年1月3日至1月8日去天津和北京出差的差旅票据,本次报销北京3日和5日的火车票、4日的打车票,天津6日和8日的火车票、6日到7日的住宿票,请帮我识别", //描述差旅信息// isRelated: false, //是否关联商旅平台// isReiAgent: false, //请选择是否代报销// ActBusReimbursementName: "", //实际出差报销人员姓名// applyTravelSubsidy: false, //是否申请差旅游补助// OveAccReimbursement: false, // 加班住宿报销// NewEmBusinessTripsJoining: false, // 新员工入职出差},searchParams2:{PurBusTrip:'',//出差目的WbsNumber:'20079205',//WBS编号OrderNo:'', //订单号costCenter:'',  //成本中心profitCenter:'', //利润中心},wbsLists:[],ddLists:[],cbLists:[], //成本中心lrLists:[], //利润中心status: false,imgfileList:[], //上传文件图片地址  };},mounted(){//this.voiceStreamer = new VoiceStreamer(this.myCallVoiceText);// setTimeout(()=>{//   this.getTableData()// },3000)},created(){},methods: {addRow(index,newRow){this.tableLists.splice(index+1,0,newRow)},//上传图片uploadPic(){},submitCon(){this.infoConfirm()},tableRowClassName({row,rowIndex}){// console.log(row,rowIndex,'aaaa');if(rowIndex==0){// this.tableListsreturn 'warning-row'}},//确认整体界面娇艳confirmAllPageCon(){ElMessage({message:'已提交至财务报账体统',type:"success",duration:5000,showClose: true,})location.reload();},//取消整体界面娇艳cancelAllPageCon(){ElMessage({message:'已取消填报',type:"success",duration:5000,showClose: true,})},//二次确定操作栏deletediaInfo(index,row){this.confirmInfoLists.splice(index, 1)},saveDiaInfo(index,row){row.edit = false},editDiaInfo(index,row){row.edit = true},/*** * @param index 以下为费用明细操作栏处理* @param row *///删除某条数据deleteInfoCon(index,row){this.tableLists.splice(index, 1)},//保存数据saveInfoCon(index,row){row.edit = false// this.tableLists={//   ...row// }console.log(index,row,this.tableLists,'看看保存状态');},//编辑行数据editInfoCon(index,row){row.edit = trueconsole.log(index,row,'看看编辑状态');},//编辑表格tableDbEdit(row, column, cell, event){},//上传成功后的函数// handleSuccess(response, file, fileList){//   // 如果需要上传//   this.getTableData()//   console.log(file);//   // debugger//   this.convertToBase64(file.raw).then(base64 => {//   console.log(base64);//   // 在这里你可以使用base64数据,例如可以将其设置到某个数据属性上// });// },// //预览图片// handlePictureCardPreview(file){//   alert(file)//  // file.url 复制给预览图img// //  this.srcUrl = file.url// },//获取差旅费用明细数据getTableData(img){axios({method:"POST",url:'/api/ocr/base64',data:{image_base64:img.image_baae64},headers: {'Content-Type': 'application/json'}}).then(res=>{this.$nextTick(()=>{this.tableLists.push(res.data);// this.tableLists.forEach((item)=>{//   item.originalImage = "data:image/jpeg;base64,"+item.originalImage// })console.log(this.tableLists,'lokkkkk');})})},//票据上传onSelectFile(event) {// debuggerconst file = event.target.files[0];if (!file) {return;}const reader = new FileReader();reader.onload = (e) => {// debuggervar face64 = e.target.result;var pos = face64.indexOf(';base64,');face64 = face64.substr(pos + ';base64,'.length)var image = {"image_baae64": face64};this.getTableData(image);};reader.readAsDataURL(file);},// change事件 每次选择文件后触发的事件uploadimgChange(file, fileList){// debuggerthis.imgfileList.push(file)// // 如果需要上传// this.getTableData()// let fileFormData = new FormData();// fileFormData.append('file', file);// axios({//   method:"get",//   url:'api/ocr/1',//     headers: {//         'Content-Type': 'multipart/form-data'//     },//     data: fileFormData,//     }).then((res) => {//         // console.log(res);//     })},//  删除某个已上传的图片handleRemove(file, fileList){this.imgfileList.splice(index, 1)},//上传附件部分// uploadFile(){//   const formData = new FormData();//   formData.append("file", this.fileLists)//   // console.log(this.fileLists,'aaaa');//   axios({//     method:"get",//     url:'api/ocr/1',//     data:formData//   }).then(res=>{//     this.searchParams.desInformation = res.data//     ElMessage({//           message:'已成功上传附件',//           type:"success",//           duration:5000,//           showClose: true,//         })//   })// },// myCallVoiceText(text){//   var content=this.searchParams.desInformation;//   content+=text;//   this.searchParams.desInformation = content;// },//获取出差申请单详情getTravelApplyDetail(){axios({method:"GET",url:'/api/oa/11688356',// params:{//   id:'11688356'// }}).then(res=>{res.data.travelRequestData.businessTravelerName = res.data.businessTravelerNamethis.tableDatas= [res.data.travelRequestData]console.log(res.data.travelRequestData,this.tableDatas,'this.tableDatas');})},initVoice() {// this.voiceStreamer.StartOrStopVoice('ws://localhost:31206/ws/app/chrome');},infoConfirm() {// debugger//出发地点if(this.searchParams.departure === ""){ElMessage({message: "请填写出发地点",type: "error",duration: 5000,showClose: true,});return ;}//到达地点if(this.searchParams.destination === ""){ElMessage({message: "请填写到达地点",type: "error",duration: 5000,showClose: true,});return ;}//起始时间if(this.searchParams.startTime === ""){ElMessage({message: "请填写起始时间",type: "error",duration: 5000,showClose: true,});return ;}//结束时间if(this.searchParams.endTime === ""){ElMessage({message: "请填写结束时间",type: "error",duration: 5000,showClose: true,});return ;}/*this.searchParams.departure = jsonObj.departure;this.searchParams.arriTripLocation = jsonObj.destination;//到达地点this.searchParams.startTime = jsonObj.startTime;//起始时间this.searchParams.endTime = jsonObj.endTime;//结束时间//this.searchParams.checkRadioGroup = [];if(jsonObj.isLinkedToBusinessTravelPlatform){//是否关联商旅平台this.searchParams.checkRadioGroup.push("关联商旅平台");}if(jsonObj.isApplyingForTravelAllowance){//是否申请差旅补助this.searchParams.checkRadioGroup.push("申请差旅补助");}if(jsonObj.isOvernightStayReimbursement){//是否为加班住宿报销this.searchParams.checkRadioGroup.push("出差住宿报销");}debuggerif(jsonObj.isNewEmployeeOnboardingTrip){//是否为新员工入职出差this.searchParams.checkRadioGroup.push("新员工入职出差");}if(jsonObj.isProxyReimbursement){//是否代报销this.searchParams.proxyReimbursementTravelerJobId = jsonObj.proxyReimbursementTravelerJobId;}else{this.searchParams.proxyReimbursementTravelerJobId = "";}*//*return;//以下为旧代码。保留不用console.log(this.searchParams,'信息填写参数');if(this.searchParams.desInformation=='') {this.isShow = true// this.dialogVisible = true//   ElMessage({//   message: "请填写差旅信息",//   type: "error",//   duration: 5000,//   showClose: true,// });return false;}else{this.isShow = falsethis.dialogVisible = false  //二次确认弹窗校验let searchParams = JSON.stringify({// invoiceText:this.searchParams.desInformationinvoiceText:'请仿照示例描述出差信息:本人2024年11月3日至11月9日去重庆市出差的差旅票据,本次报销交通费、住宿费用及7天的补助'})// axios.post('http://10.54.69.209:25001/text/', searchParams,{//   headers: {//     'Content-Type': 'application/json'//   }// }).then(res=>{//   alert(res,'aaa')// })axios({method:"POST",url:'http://10.54.69.209:25001/text/',data:searchParams,headers: {'Content-Type': 'application/json'}}).then(res=>{if(res){this.loadingTable = false// this.confirmInfoLists=res.data}let handlerData = json.dumps(res)console.log(handlerData,'aaaabbbbbcccc');console.log(JSON.parse(res),res,'lookkk');})// return}this.$refs["FormInfoData"].validate((valid) => {// debuggerif (valid) {*/this.getTravelApplyDetail()//提交表单 接口数据信息  接口文档中-八、查询数据湖/BW财务数据(WBS编号和订单号、一个接口包含项目信息5个字段值)// let url='http://10.129.182.23:8080/api/dataLake/1'axios({method:"GET",url:'/api/dataLake/'+JSON.stringify(this.searchParams2),// params:this.searchParams}).then(res=>{// debuggerif(res.status==200 && res.data){//出差目的   WBS编号  订单号   成本中心   利润中心// debugger// this.searchParams2={this.searchParams2.PurBusTrip=res.data.purpose //出差目的this.searchParams2.WbsNumber=res.data.wbsids[0]//WBS编号this.searchParams2.OrderNo=res.data.internalOrderIds[0] //订单号this.searchParams2.costCenter=res.data.travelerCostCenters[0]  //成本中心this.searchParams2.profitCenter=res.data.travelerProfitCenters[0] //利润中心// }this.wbsLists=res.data.wbsidsthis.ddLists=res.data.internalOrderIdsthis.cbLists = res.data.travelerCostCenters  //成本中心this.lrLists = res.data.travelerProfitCenters  //利润中心//   this.getUserInfo()ElMessage({message:'已成功提交信息',type:"success",duration:5000,showClose: true,})}})   .catch((err) => {//   ElMessage({//     message: "数据保存失败,请重试。",//     type: "error",//   });});// console.log(valid, "提交成功");// } else {//   ElMessage({//       message:'信息不正确,请检查后再次信息确认',//       type:"success",//       duration:5000,//       showClose: true,//     })// }//  );//提交成功后显示表格this.showTable=!this.showTable},/*** * acticeText_sl: '否', //是否关联商旅平台-ApplyTravelAllowance:'否', //申请差旅补助-acticeText_dbx: '否',  //是否为代报销-active_OveAccReim:'否', //是否为加班住宿报销active_newPerson:'否', //是否为新员工入职出差*/},};</script><style scoped lang="less">#bzTextInfo{color: red;}.m4_con p{font-weight: 400;}
.ml_20{margin-left: 20px;
}
#errorText{width: 18px;height: 18px;background-color: red;color: #ffffff;font-size: 14px;margin: 0 20px;font-weight: 800;display: inline-block;border-radius: 50%;text-align: center;line-height: 18px;
}#default-btn::file-selector-button{padding: 6px 42px;/*padding-left: 8px;*/background-color: #0B6CF8;border: 1px solid #0B6CF8;border-radius: 3px;cursor: pointer;color: #fff;font-size: 16px;font-weight: 500;width:130px;}#default-btn{font-size: 0;}.m4_con{// padding:20px 68px;padding: 0 92px;// background-color: #FFF1F1;border: 2px solid #ED1D1D;
}.scroll-container{// height: 1800px; /* 模拟长内容 */overflow-y: scroll;}.container {background-color: #fff;margin: 18px 13px;//   height: 2308px;border-radius: 7px;}.title{display: flex;justify-content: space-between;border-bottom: 1px solid #E8E8E8;height: 48px;line-height: 48px;}.content{// padding: 54px 48px;padding: 35px 48px;}.title1{// display: flex;display: flex;.titleRight{font-weight: 800;font-size: 15px;}}img{width: 18px;margin-right: 10px;margin-top: 14px;margin-left: 24px;}
.myBottom{margin-left: 328px;// margin-top: 38px;// display: flex;// justify-content: center;// margin-top: 38px;button{// width: 240px;// height: 38px;// font-size: 18px;// width: 156px;height: 36px;font-size: 16px;// margin-left: 265px;background: #0B6CF8;border: 1px solid #0B6CF8;}
}
// .dialog {
//   background-color: pink;
//   // background: url(../../assets/bg.png) no-repeat center !important;
//   // background-size: cover;
//   // background-position: center;
// }// 文件管理对话框
/deep/ .el-dialog {background: transparent;background-image: url("../../assets/bg.png");background-size: cover;height: 60vh;
}
/deep/ .el-dialog__title, .el-dialog__headerbtn .el-dialog__close{color: #027DDD;font-weight: 800;font-size: 20px;
}.dialog-form{// border: 1px solid #027DDD;border-radius: 8px;padding-top: 10px 48px;
}.el-table .borderColor{border:1px solid red !important;}.img-size{margin-left: 0;margin-top: 0;
}</style> 

相关文章:

如果接口返回值图片有很长一串码,需要添加前缀

需要在前面添加前缀&#xff1a;data:image/jpeg;base64,然后将值赋值给<img :src"originalImage" /> this.tableLists.map((item)>{item.originalImage "data:image/jpeg;base64,"item.originalImage})以上方法会导致出现一个小bug&#xff0c;…...

《AI大模型开发笔记》——ollama应用全面解析

入门篇 1 ollama是什么? Ollama 是一个支持在本地运行大语言模型的工具,兼容 Windows、Linux 和 MacOS 操作系统。使用 Ollama,您仅需一行命令即可启动模型。 2 如何安装? Windows和MacOS用户,从下面链接下载安装即可: 下载地址:https://ollama.com/download Linux系…...

Paddle Inference部署推理(三)

三&#xff1a;Paddle Inference推理 导出模型 Paddle Inference支持使用飞桨静态图模型进行推理&#xff0c;您可以通过以下两种方式获取静态图模型&#xff1a; &#xff08;1&#xff09;飞桨框架导出推理模型 飞桨框架在训练模型过程中&#xff0c;会在本地存储最终训练…...

CSP/信奥赛C++语法基础刷题训练(23):洛谷P1217:[USACO1.5] 回文质数 Prime Palindromes

CSP/信奥赛C语法基础刷题训练&#xff08;23&#xff09;&#xff1a;洛谷P1217&#xff1a;[USACO1.5] 回文质数 Prime Palindromes 题目描述 因为 151 151 151 既是一个质数又是一个回文数&#xff08;从左到右和从右到左是看一样的&#xff09;&#xff0c;所以 151 151 …...

《跨越语言壁垒:Python 人工智能原型到 C++可执行程序的转型之路》

在人工智能的广阔天地里&#xff0c;Python 以其简洁易用和丰富的库资源成为众多开发者快速搭建人工智能原型的首选语言。然而&#xff0c;在一些对性能和资源控制要求极高的场景下&#xff0c;C则展现出无可比拟的优势。那么&#xff0c;如何将 Python 中开发的人工智能原型代…...

flowable流程图详细绘制教程

文章目录 前言一、flowable是什么&#xff1f;回答下之前的问题 二、flowable-modeler使用1. 使用步骤2.开始绘制弄一个请假的流程 三 加载该流程总结 前言 flowable有些晦涩难懂的东西&#xff1a; 我最开始接触的时候,还是用的activity,当时觉得好复杂,那么这次经过我自己在…...

Figma入门-基本操作制作登录页

Figma入门-基本操作制作登录页 前言 在之前的工作中&#xff0c;大家的原型图都是使用 Axure 制作的&#xff0c;印象中 Figma 一直是个专业设计软件。 最近&#xff0c;很多产品朋友告诉我&#xff0c;很多原型图都开始用Figma制作了&#xff0c;并且很多组件都是内置的&am…...

在windows操作系统上,用git与github账户连接

一、环境准备 1.1 git软件 1.2 github账号 1.3 创建一个项目目录&#xff0c;比如 D:\project\gitproject 二、开始操作 1. 进入项目目录下&#xff0c;右键&#xff0c;如图&#xff0c;打开git bash命令行 2. 在命令行输入以下三个命令 $ git config --global user.name &quo…...

springboot系列--拦截器执行原理

一、拦截器核心概念 一、定义 拦截器&#xff08;Interceptor&#xff09;是框架级别的组件&#xff0c;用于在请求的不同阶段&#xff08;如到达控制器之前&#xff08;也就是接口&#xff09;、处理完成之后&#xff09;动态地拦截和处理 HTTP 请求。 二、使用场景 一、用户…...

数据可视化复习2-绘制折线图+条形图(叠加条形图,并列条形图,水平条形图)+ 饼状图 + 直方图

目录 目录 一、绘制折线图 1.使用pyplot 2.使用numpy ​编辑 3.使用DataFrame ​编辑 二、绘制条形图&#xff08;柱状图&#xff09; 1.简单条形图 2.绘制叠加条形图 3.绘制并列条形图 4.水平条形图 ​编辑 三、绘制饼状图 四、绘制散点图和直方图 1.散点图 2…...

STM32F10x 定时器

使用定时器实现&#xff1a;B5 E5的开关 添加相关的.h路径文件 添加相关的.c配置文件 led.h文件 用于声明LED函数 #ifndef __LED_H //没有定义__LED_H #define __LED_H //就定义__LED_H #define LED1_ON GPIO_ResetBits(GPIOB,GPIO_Pin_5) #defi…...

VBA技术资料MF230:展开所有折叠视图并恢复

我给VBA的定义&#xff1a;VBA是个人小型自动化处理的有效工具。利用好了&#xff0c;可以大大提高自己的工作效率&#xff0c;而且可以提高数据的准确度。“VBA语言専攻”提供的教程一共九套&#xff0c;分为初级、中级、高级三大部分&#xff0c;教程是对VBA的系统讲解&#…...

【数据结构OJ】【图论】图综合练习--拓扑排序

题目描述 已知有向图&#xff0c;顶点从0开始编号&#xff0c;求它的求拓扑有序序列。 拓扑排序算法&#xff1a;给出有向图邻接矩阵 1.逐列扫描矩阵&#xff0c;找出入度为0且编号最小的顶点v 2.输出v&#xff0c;并标识v已访问 3.把矩阵第v行全清0 重复上述步骤&#xff0…...

网络安全防范

网络安全防范技术 所属课程网络攻防实践作业要求第六次作业 实践内容 学习总结 PDR&#xff0c;$$P^2$$DR安全模型。 防火墙&#xff08;Firewall&#xff09;&#xff1a; 网络访问控制机制&#xff0c;布置在网际间通信的唯一通道上。 不足&#xff1a;无法防护内部威胁&…...

Linux nc 命令详解

简介 nc 全称 netcat&#xff0c;是一个在 Linux 中多功能的网络工具&#xff0c;通常用于通过 TCP 或 UDP 读取和写入网络连接&#xff0c;也能作为客户端或服务端用来 debug&#xff0c;测试&#xff0c;网络问题分析。 常用示例 检查端口是否是打开的 nc -zv <hostna…...

解决 Gradle 报错:`Plugin with id ‘maven‘ not found` 在 SDK 开发中的问题

在 SDK 开发过程中&#xff0c;使用 Gradle 构建和发布 SDK 是常见的任务。在将 SDK 发布为 AAR 或 JAR 包时&#xff0c;你可能会使用 apply plugin: maven 来发布到本地或远程的 Maven 仓库。但是&#xff0c;随着 Gradle 版本的更新&#xff0c;特别是从 Gradle 7 版本开始&…...

stm32cubemx+VSCODE+GCC+makefile 开发环境搭建

title: stm32cubemxVSCODEGCCmakefile 开发环境搭建 tags: FreertosHalstm32cubeMx 文章目录 内容往期内容导航第一步准备环境vscode 插件插件配置点灯 内容 往期内容导航 第一步准备环境 STM32CubeMXVSCODEMinGWOpenOcdarm-none-eabi-gcc 然后把上面下载的软件 3 4 5 bin 文…...

postgresql|数据库开发|python的psycopg2库按指定顺序批量执行SQL文件(可离线化部署)

一、 psycopg2简介 psycopg2库是python的一个可直接操作postgresql数据库的类库&#xff0c;是一个用于Python编程语言的PostgreSQL数据库适配器。它允许开发人员使用Python语言与PostgreSQL数据库进行交互和操作&#xff0c;不同于java&#xff0c;需要专用的一个驱动&#…...

学习ASP.NET Core的身份认证(基于Cookie的身份认证3)

用户通过验证后调用HttpContext.SignInAsync函数将用户的身份信息保存在认证Cookie中,以便后续的请求可以验证用户的身份,该函数原型如下所示&#xff0c;其中properties参数的主要属性已在前篇文章中学习&#xff0c;本文学习scheme和principal的意义及用法。 public static …...

Java 中的 HashMap 原理详解:底层结构与实现机制

HashMap 是 Java 中最常用的数据结构之一&#xff0c;它以其高效的存取速度在众多应用场景中被广泛使用。理解 HashMap 的底层实现原理&#xff0c;对提升开发效率、优化性能以及编写高效的代码都至关重要。本文将深入探讨 HashMap 的数据结构、存储机制、解决冲突的策略、扩容…...

数据库MYSQL——表的设计

文章目录 前言三大范式&#xff1a;几种实体间的关系&#xff1a;一对一关系&#xff1a;一对多关系&#xff1a;多对多关系&#xff1a; 前言 之前的博客中我们讲解的是关于数据库的增删改查与约束的基本操作&#xff0c; 是在已经创建数据库&#xff0c;表之上的操作。 在实…...

CUDA补充笔记

文章目录 一、不同核函数前缀二、指定kernel要执行的线程数量三、线程需要两个内置坐标变量来唯一标识线程四、不是blocksize越大越好&#xff0c;上限一般是1024个blocksize 一、不同核函数前缀 二、指定kernel要执行的线程数量 总共需要线程数是&#xff1a; 1 * N N个线程…...

OSI七层模型和TCP/IP五层模型详细介绍

这里写目录标题 一.OSI含义二.OSI七层模型1.应用层2.表示层3.会话层4.传输层5.网络层6.数据链路层7.物理层 TCP/IP五层协议1.应用层2.运输层运行在TCP上的协议运行在UDP上的协议 3.网络层IP协议配套使用的协议 4.数据链路层 四.网络协议分层的好处 一.OSI含义 OSI即是开放式通…...

mac安装Pytest、Allure、brew

安装环境 安装pytest 命令 pip3 install pytest 安装allure 命令&#xff1a;brew install allure 好吧 那我们在安装allure之前 我们先安装brew 安装brew 去了官网复制了命令 还是无法下载 如果你们也和我一样可以用这个方法哦 使用国内的代码仓库来执行brew的安装脚本…...

Linux/Windows/OSX 上面应用程序重新启动运行。

1、Linux/OSX 上面重新运行程序&#xff0c;直接使用 execvp 函数就可以了&#xff0c;把main 函数传递来的 argv 二维数组&#xff08;命令行参数&#xff09;传进去就可以&#xff0c;注意不要在 fork 出来的子进程搞。 2、Windows 平台可以通过 CreateProcess 函数来创建新的…...

自定义 Kafka 脚本 kf-use.sh 的解析与功能与应用示例

Kafka&#xff1a;分布式消息系统的核心原理与安装部署-CSDN博客 自定义 Kafka 脚本 kf-use.sh 的解析与功能与应用示例-CSDN博客 Kafka 生产者全面解析&#xff1a;从基础原理到高级实践-CSDN博客 Kafka 生产者优化与数据处理经验-CSDN博客 Kafka 工作流程解析&#xff1a…...

Odoo :免费且开源的农牧行业ERP管理系统

文 / 开源智造Odoo亚太金牌服务 引言 提供农牧企业数字化、智能化、无人化产品服务及全产业链高度协同的一体化解决方案&#xff0c;提升企业智慧种养、成本领先、产业互联的核心竞争力。 行业典型痛点 一、成本管理粗放&#xff0c;效率低、管控弱 产品研发过程缺少体系化…...

AI的自我陷阱:大型神经网络训练中的模型崩溃现象

10月7日&#xff0c;发布在arxiv上的一篇名为Strong Model Collapse的论文&#xff0c;由Meta 、纽约大学和加州大学洛杉矶分校的研究人员共同发表的研究表明在训练大型神经网络&#xff08;如 ChatGPT 和 Llama&#xff09;时&#xff0c;由于训练语料库中包含合成数据而导致的…...

Python(下载安装)

简介 开发工具&#xff1a;pycharm, VS Code 1. 下载&#xff08;解释器程序&#xff09; Download Python | Python.org 2. 安装&#xff08;解释器程序&#xff09; 双击下载后的exe文件 查看版本&#xff1a;python&#xff08;并可以执行python代码&#xff09; 3. 下载…...

记录一种在内核空间向用户空间通知中断的方法

记录一种在内核空间向用户空间通知中断的方法 0.前言1.代码实现1)内核设备驱动实现2)消息通知实现3)测试程序 2.解析 参考文章&#xff1a;Linux驱动实践&#xff1a;中断处理函数如何【发送信号】给应用层&#xff1f; 0.前言 最近在项目中遇到一个需求&#xff0c;需要将一个…...

Apache Maven 标准文件目录布局

Apache Maven 采用了一套标准的目录布局来组织项目文件。这种布局提供了一种结构化和一致的方式来管理项目资源&#xff0c;使得开发者更容易导航和维护项目。理解和使用标准目录布局对于有效的Maven项目管理至关重要。本文将探讨Maven标准目录布局的关键组成部分&#xff0c;并…...

【vim】使用 gn 组合命令实现搜索选中功能

gn是Vim 7.4新增的一个操作&#xff08;motion&#xff09;&#xff0c;作用是跳到并选中下一个搜索匹配项。 具体说&#xff0c;Vim里执行搜索后&#xff0c;执行n操作只会跳转到下一个匹配项&#xff0c;而不选中它。但是我们往往需要对匹配项执行一些修改操作&#xff0c;例…...

解决登录Google账号遇到手机上Google账号无法验证的问题

文章目录 场景小插曲解决方案总结 场景 Google账号在新的设备上登录的时候&#xff0c;会要求在手机的Google上进行确认验证&#xff0c;而如果没有安装Google play就可能出现像我一样没有任何弹框&#xff0c;无法实现验证 小插曲 去年&#xff0c;我在笔记本上登录了Googl…...

基于YOLOv10深度学习的公共安全持刀行为检测系统研究与实现(PyQt5界面+数据集+训练代码)

随着社会的不断进步和城市化进程的加快&#xff0c;人口密度的增加和社会结构的复杂化使得公共安全问题日益凸显。近年来&#xff0c;各类公共安全事件频发&#xff0c;其中持刀行为作为一种典型的暴力行为&#xff0c;已成为威胁公共安全的严重因素之一。这种行为在公共场所发…...

HP6心率血压传感器

目录 一、介绍 1、工作原理概述 2、具体实现步骤 二、HP6的通信及配置 1、通信接口 2、器件地址/命令 3、校验 三、程序设计 ①IIC通信相关基础函数 ②HP6相关基础函数 一、介绍 HP6心率血压传感器的原理主要基于光电容积脉搏波描记法&#xff08;PPG&#xff09;&…...

深入理解 JVM 中的 G1 垃圾收集器原理、算法、过程和参数配置

引言 Java 虚拟机&#xff08;JVM&#xff09;中的垃圾收集器&#xff08;Garbage Collector&#xff0c;简称 GC&#xff09;是自动内存管理的核心部分。G1&#xff08;Garbage-First&#xff09;垃圾收集器是 Oracle 在 JDK 7u4 版本中引入的一种新型垃圾收集器&#xff0c;…...

细说敏捷:敏捷四会之standup meeting

上一篇文章中&#xff0c;我们讨论了 敏捷四会 中 冲刺计划会 的实施要点&#xff0c;本篇我们继续分享敏捷四会中实施最频繁&#xff0c;团队最容易实施但往往也最容易走形的第二个会议&#xff1a;每日站会 关于每日站会的误区 站会是一个比较有标志性的仪式活动&#xff0…...

MySQL系列之身份鉴别(安全)

导览 前言Q&#xff1a;如何保障MySQL数据库身份鉴别的有效性一、有效性检查1. 用户唯一2. 启用密码验证3. 是否存在空口令用户4. 是否启用口令复杂度校验5. 是否设置口令的有效期6. 是否限制登录失败尝试次数7. 是否设置&#xff08;超过尝试次数&#xff09;锁定的最小时长8.…...

vue3封装Element Plus table表格组件

支持绝大部分Element Plus原有设置属性&#xff0c;支持分页&#xff0c;支持动态适配高度 效果展示 组件代码&#xff1a; <template><div class"table-wrap" ref"tableWrap"><el-tableclass"w100 h100":data"tableInfo.…...

SFP+光模块介绍

SFP光模块介绍 1 SFP光模块简介(Small Form -Factor Pluggable)2 光模块管脚定义 1 SFP光模块简介(Small Form -Factor Pluggable) 光模块&#xff08;Optical Module&#xff09;由光电子器件、功能电路和光接口等组成&#xff0c;光电子器件包括激光发射器(Laser Transmitte…...

神经网络的初始化

目录 为什么需要初始化&#xff1f; 初始化的常用方法&#xff1a; 是否必须初始化&#xff1f; 初始化神经网络中的权重和偏置是深度学习模型训练中非常重要的一步&#xff0c;虽然在某些情况下不进行初始化也能训练出模型&#xff0c;但正确的初始化方法能够显著提高训练效…...

数据集搜集器0.01

我们使用Python的Tkinter库来创建GUI界面&#xff0c;并使用requests库来从360百科获取数据。下面是一个完整的示例代码&#xff0c;它包括了一个简单的GUI界面&#xff0c;用户可以输入问题&#xff0c;点击按钮后会从360百科获取相关信息&#xff0c;并显示在同一个Text组件中…...

【Lucene】搜索引擎和文档相关性评分 BM25 算法的工作原理

BM25 算法的工作原理&#xff1a; 什么是 BM25 算法&#xff1f; BM25 是一种流行的文本检索算法&#xff0c;广泛用于搜索引擎和文档相关性评分。它基于概率检索模型&#xff0c;旨在评估查询和文档之间的相关性。 核心公式 BM25 的公式如下&#xff1a; score ( D , Q ) …...

嵌入式Linux——文件类型

目录 普通文件 目录文件 目录文件的权限与管理 字符设备文件和块设备文件 符号链接文件 查看符号链接 删除符号链接 修改符号链接 管道文件 匿名管道&#xff08;Anonymous Pipe&#xff09; 匿名管道的特点&#xff1a; 使用示例&#xff1a; 命名管道&#xff08…...

ES6 模块化语法

目录 ES6 模块化语法 分别暴露 统一暴露 ​编辑 默认暴露 ES6 模块化引入方式 ES6 模块化语法 模块功能主要由两个命令构成&#xff1a;export 和 import。 ⚫ export 命令用于规定模块的对外接口&#xff08;哪些数据需要暴露&#xff0c;就在数据前面加上关键字即可…...

Gradio学习笔记记录

安装指令&#xff1a;pip install gradio方法介绍 Interface》用于构建一些简单的页面&#xff0c;可以直接用这个指令搞定 形式》接收三个参数分别为处理函数、输入、输出三部分&#xff0c;呈现一般左/上为输入&#xff0c;右或下为输出 fn&#xff1a;将用户界面 &#xff0…...

Node.js的下载与安装(支持各种新旧版本)

目录 1、node官网 2、node软件下载 3、软件安装&#xff08;完整版&#xff09; 1、node官网 Node.js — Download Node.jshttps://nodejs.org/en/download/package-manager 2、node软件下载 按照下图进行选择node版本&#xff08;真心推荐16/18&#xff0c;而是尽量是LTS…...

数据库和缓存的数据一致性 -20241124

问题描述 一致性 缓存中有数据&#xff0c;缓存的数据值数据库中的值缓存中本没有数据&#xff0c;数据库中的值最新值&#xff08;有请求查询数据库时&#xff0c;会将数据写入缓存&#xff0c;则变为上面的“一致”状态&#xff09; “数据不一致”&#xff1a; 缓存的数据值…...

【计算机网络】多路转接之select

系统提供select()来实现多路转接 IO 等 拷贝 -> select()只负责等待&#xff0c;可以一次等待多个fd select()本身没有数据拷贝的能力&#xff0c;拷贝要read()/write()来完成 一、select的使用 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exc…...

Linux命令思维导图

看到一个很不错的Linux命令思维导图&#xff0c;用机器翻译了一下&#xff0c;建议收藏备用。 附上英文版&#xff1a;...