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) => { }).then((res) => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
if(res.result.success){
this.$message.error(res.result.msg);
}
this.getHikvisionPage(); this.getHikvisionPage();
}else {
this.$message.error(res.result.msg);
} }
}) })
}, },

View File

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

View File

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