fix: 代码合并

This commit is contained in:
kun 2024-06-04 18:09:27 +08:00
commit 77df5422fd
3 changed files with 35 additions and 36 deletions

View File

@ -180,10 +180,9 @@ export default {
}).then((res) => {
console.log(res);
if (res.code == 200) {
if(res.result.success){
this.$message.error(res.result.msg);
}
this.getHikvisionPage();
}else {
this.$message.error(res.result.msg);
}
})
},

View File

@ -1233,7 +1233,7 @@
class="upload-demo"
:action="uploadUrl"
:on-preview="(file) => handlePreview(file, 4)"
:on-remove="(file) => handleRemove(file, 4)"
:on-remove="(file) => handleRemove({file, index: scope.$index}, 4)"
:on-success="(file) => handleSuccess(file, 4)"
:limit="5"
name="files"
@ -2799,19 +2799,19 @@ export default {
data.contractList.map((item) => {
if (item.imageUrl) {
if (item.imageUrl.indexOf(",") != -1) {
let arr = item.imageUrl.split(",");
let fileList = [];
arr.forEach((item) => {
fileList.push({ name: item, url: item });
});
item.fileList = fileList;
console.log("劳动~~~~~",item);
item.fileList = item.imageUrl.split(",").map((item) => {
return {
name: item.split("*")[0],
url: item.split("*")[1],
};
});
} else if (item.imageUrl.indexOf("*") != -1) {
let arr = item.imageUrl.split("*");
let fileList = [];
arr.forEach((item) => {
fileList.push({ name: item, url: item });
});
item.fileList = fileList;
console.log("劳动1~~~~~",item);
item.fileList = [{
name: item.imageUrl.split("*")[0],
url: item.imageUrl.split("*")[1],
}];
}
}
});
@ -2830,24 +2830,22 @@ export default {
if (item.photoUrl.indexOf(",") != -1) {
item.fileList = item.photoUrl.split(",").map((item) => {
return {
name: item,
url: item,
name: item.split("*")[0],
url: item.split("*")[1],
};
});
// item.fileList = [{ }];
} else if(item.photoUrl.indexOf("*") != -1) {
item.fileList = item.photoUrl.split("*").map((item) => {
return {
name: item,
url: item,
};
});
// item.fileList = [{ }];
item.fileList = [{
name: item.photoUrl.split("*")[0],
url: item.photoUrl.split("*")[1],
}];
} else {
item.fileList = [];
}
});
}
console.log("详情~~~",data.certificateList);
this.certificateList = data.certificateList; //
//
@ -2874,19 +2872,16 @@ export default {
if (item.photoUrl.indexOf(",") != -1) {
item.fileList = item.photoUrl.split(",").map((item) => {
return {
name: item,
url: item,
name: item.split("*")[0],
url: item.split("*")[1],
};
});
// item.fileList = [{ }];
} else if(item.photoUrl.indexOf("*") != -1) {
item.fileList = item.photoUrl.split("*").map((item) => {
return {
name: item,
url: item,
};
});
// item.fileList = [{ }];
item.fileList = [{
name: item.photoUrl.split("*")[0],
url: item.photoUrl.split("*")[1],
}];
} else {
item.fileList = [];
}
@ -3152,6 +3147,7 @@ export default {
},
//
addImgAdd(useName, file) {
console.log("上传图片~~~~~~~~~~~~",file);
let data = {
name: file.file.data[0].fileInfo.originalFilename,
url: file.file.data[0].imageUrl,
@ -3372,10 +3368,13 @@ export default {
// type==1 2 3 4 5
if (type == 4) {
this.contractList[0].fileList.forEach((item, index) => {
if (file.url == item.url) {
if (file.file.url == item.url) {
this.contractList[0].fileList.splice(index, 1);
this.contractList[0].imageUrl= this.contractList[0].imageUrl.split(",").splice(index, 1).join(",")
}
});
console.log(file, this.contractList);
// this.deleteImgUse("contractList", file);
} else if (type == 5) {
console.log("1111111111", file.file.url);
// this.certificateList[file.index].fileList = [];
@ -3620,6 +3619,7 @@ export default {
fileList.push({ name: valArr[0], url: valArr[1] });
});
data.contractList[0].fileList = fileList;
console.log("回显~~~~~~~",data.contractList[0]);
} else {
data.contractList = [];
}

View File

@ -182,7 +182,7 @@
}}</template>
</el-table-column>
</el-table>
<div class="tab_btn_wrap" v-if="tableData.length == 0">
<div class="tab_btn_wrap" v-if="tableData.length > 0">
<el-button
v-permission="{key: 'criterions_stop_open', menuPath: '/project/quality/criterion'}"
type="primary"