优化覆冰

jc
fanluyan 1 year ago
parent 482182bd38
commit c70d60ea60

@ -151,7 +151,7 @@ export default {
console.log(devtypeList); console.log(devtypeList);
getICEdyTreeList({ getICEdyTreeList({
type: -1, type: -1,
devtype: devtypeList, // devtype: devtypeList,
}) })
.then((res) => { .then((res) => {
this.lineTreeData = []; this.lineTreeData = [];

@ -230,7 +230,7 @@
fixed="right" fixed="right"
label="操作" label="操作"
width="320" width="320"
v-if="roleUser == 2" v-if="roleUser == 0"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown <el-dropdown
@ -296,6 +296,12 @@
@click.native.stop="handlepicture(scope.row)" @click.native.stop="handlepicture(scope.row)"
>图片标记</el-button >图片标记</el-button
> >
<el-button
v-if="notes == '覆冰用户使用'"
@click.native.stop="handleParameterSet(scope.row)"
type="text"
>参数配置</el-button
>
<el-button <el-button
type="text" type="text"
class="deleteText" class="deleteText"

@ -139,6 +139,7 @@ export default {
fileList: [], fileList: [],
reportData: { reportData: {
title: "", title: "",
modifiedName: "",
}, },
fileData: [], // fileData: [], //
fileloading: false, fileloading: false,
@ -193,11 +194,40 @@ export default {
}, },
beforeUpload(file) { beforeUpload(file) {
const fileName = file.name; const fileName = file.name;
console.log(fileName);
//
const regex = /^(mpapp|MpMaster)_v\d+\.\d+(\.\d+)?_rel_\d{8}\.apk$/;
if (regex.test(fileName)) {
// v
const versionMatch = fileName.match(/v(\d+\.\d+(\.\d+)?)/);
if (versionMatch && versionMatch[1]) {
// V_rel_
const baseName = fileName.startsWith("mpapp") ? "mpapp" : "mpmst"; // mpmastermpmst
const version = versionMatch[1];
this.reportData.modifiedName = `${baseName}_${version}.apk`;
}
} else {
// 20
if (fileName.length > 19) { if (fileName.length > 19) {
//
console.log("文件名过长:", fileName);
this.$message.error("文件名长度不能超过 19 个字符!"); this.$message.error("文件名长度不能超过 19 个字符!");
return false; // return false; //
} }
//
this.reportData.modifiedName = fileName; //
}
// console.log(fileName);
// this.reportData.modifiedName = fileName
// .replace("V", "")
// .replace(/_rel_[^.]*\./, ".");
// if (this.reportData.modifiedName.length > 20) {
// this.$message.error(" 20 ");
// return false; //
// }
return true; // return true; //
}, },
// // // //
@ -215,6 +245,7 @@ export default {
const formData = new FormData(); const formData = new FormData();
formData.append("file", options.file); formData.append("file", options.file);
formData.append("title", this.reportData.title); // formData.append("title", this.reportData.title); //
formData.append("name", this.reportData.modifiedName); //
console.log(formData); console.log(formData);
uploadApk(formData, (progressEvent) => { uploadApk(formData, (progressEvent) => {
// //

@ -23,7 +23,7 @@ module.exports = defineConfig({
//表示拦截以/api开头的请求路径 //表示拦截以/api开头的请求路径
//target: "http://192.168.1.190:8080", //190 需要去掉/Api //target: "http://192.168.1.190:8080", //190 需要去掉/Api
//target: "http://192.168.50.7:8093", //liu 本机ip 需要去掉/Api // target: "http://61.169.135.146:9911/", //运维
target: "http://61.169.135.146:40080/", //dell target: "http://61.169.135.146:40080/", //dell
changOrigin: true, //是否开启跨域 changOrigin: true, //是否开启跨域
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save