提交代码

main
姜玉琦 2024-09-19 10:59:19 +08:00
parent 67c57cc17e
commit db8c6d60ed
5 changed files with 7014 additions and 7282 deletions

View File

@ -111,17 +111,17 @@
<el-button type="primary" @click="handleSubmit"><i-ep-check /> </el-button>
<el-button @click="closeBack"><i-ep-close /> </el-button>
</el-card>
<el-dialog v-model="dialogVisible" title="上传标注图片" width="880" append-to-body>
<el-dialog v-model="dialogVisible" title="上传标注图片" width="880" append-to-body style="max-height:600px;">
<el-card v-loading.fullscreen.lock="uploadLoading">
<el-upload v-model:file-list="uploadImgFileList" class="upload-demo upload-demo-3"
:before-remove="handleRemoveFiles" :auto-upload="autoUpload" :on-change="handleChangeFiles"
list-type="picture" multiple accept="application/json,image/jpeg">
list-type="picture" multiple accept="application/json,text/plain,image/jpeg">
<!--accept="application/json,image/png,image/jpg,image/jpeg"-->
<el-button type="primary"><el-icon class="el-icon--upload"> <i-ep-upload-filled /> </el-icon></el-button>
<template #tip>
<div class="el-upload__tip">
请上传大小不超过 <strong style="color: red">10M</strong>格式为
<strong style="color: red">json/jpg</strong> 的文件
<strong style="color: red">json/txt/jpg</strong> 的文件
</div>
</template>
</el-upload>
@ -219,7 +219,7 @@ const handleSubmit = useThrottleFn(() => {
function handleChangeFiles(uploadFile, uploadFiles) {
//uploadFile.status = 'success';
clearTimeout(autoTime.value);
if (uploadFile.raw.type == "application/json") {
if (uploadFile.raw.type == "application/json" || uploadFile.raw.type == "text/plain") {
uploadJsonList.value.push(uploadFile);
}
autoTime.value = setTimeout(doEquipmentFiles, 280);
@ -228,7 +228,7 @@ function handleChangeFiles(uploadFile, uploadFiles) {
/** 上传文件>回调 */
const doEquipmentFiles = () => {
uploadImgFileList.value = uploadImgFileList.value.filter(
(it) => it.raw.type != "application/json"
(it) => it.raw.type != "application/json" && it.raw.type != "text/plain"
);
if (form.value.dats_label_type != "no_label") {
var element = document.getElementsByClassName("upload-demo-3")[0];

View File

@ -74,7 +74,9 @@ const queryParams = reactive({
function getCurrentRow(row) {
form.uuid = row.uuid;
form.pcie_index = row.pcie_index;
form.infomation = row.manufacturer;
form.device_name = row.device_name;
form.device_desc = row.device_desc;
form.infomation = row.infomation;
form.manufacturer = row.manufacturer;
form.hardware_chip = row.hardware_chip;
form.hardware_model = row.hardware_model;

View File

@ -5,8 +5,8 @@
<template #header>
<div class="flex justify-between">
<div>
<el-button type="primary" @click="handleAddPcie()"><i-ep-plus />PCLE设备</el-button>
<el-button type="primary" @click="handleAddNet()"><i-ep-plus />网络设备</el-button>
<el-button type="primary" @click="handleAddPcie()"><i-ep-plus />添加设备</el-button>
<!-- <el-button type="primary" @click="handleAddNet()"><i-ep-plus />网络设备</el-button> -->
</div>
<!-- <div>
<el-form ref="queryFormRef" :model="queryParams" :inline="true">

View File

@ -159,6 +159,8 @@ const handleSubmit = useThrottleFn(() => {
/** 选中未注册工具链 */
function getCurrentRow(row) {
formData.uuid = row.uuid;
formData.tool_name = row.tool_name;
formData.tool_desc = row.tool_desc;
formData.tool_type = row.tool_type;
formData.cmpt_hardware_type = row.cmpt_hardware_type;
formData.manufacturer = row.manufacturer;

14276
yarn.lock

File diff suppressed because it is too large Load Diff