Compare commits
No commits in common. "07fe167eacfac8d8f49dfe544f2dc03ab4537df8" and "a185f4755a2cff291ab1467c8ada8c32dad7500b" have entirely different histories.
07fe167eac
...
a185f4755a
|
@ -124,7 +124,7 @@
|
||||||
:active-text="$fd('FeedBackStatus', 1)"
|
:active-text="$fd('FeedBackStatus', 1)"
|
||||||
:inactive-text="$fd('FeedBackStatus', 0)"
|
:inactive-text="$fd('FeedBackStatus', 0)"
|
||||||
:disabled="level < 8 || !isStateChange"
|
:disabled="level < 8 || !isStateChange"
|
||||||
@change="changeState"
|
@change="isImgfail ? () => false : changeState"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -247,11 +247,9 @@ export default {
|
||||||
this.trialId = trialId;
|
this.trialId = trialId;
|
||||||
this.Id = Id;
|
this.Id = Id;
|
||||||
this.visitTaskId = visitTaskId;
|
this.visitTaskId = visitTaskId;
|
||||||
console.log(visitTaskId, "visitTaskId");
|
|
||||||
if (visitTaskId) {
|
if (visitTaskId) {
|
||||||
this.isImgfail = true;
|
this.isImgfail = true;
|
||||||
}
|
}
|
||||||
console.log(this.isImgfail, "isImgfail");
|
|
||||||
this.setTypeOption();
|
this.setTypeOption();
|
||||||
if (!Id) {
|
if (!Id) {
|
||||||
this.title = this.setTitle();
|
this.title = this.setTitle();
|
||||||
|
@ -293,7 +291,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 修改状态
|
// 修改状态
|
||||||
async changeState() {
|
async changeState() {
|
||||||
if (this.isImgfail) return;
|
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
IdList: [this.Id],
|
IdList: [this.Id],
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
alt=""
|
alt=""
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
/>
|
/>
|
||||||
<span class="el-upload-list__item-actions" v-if="!isUpload">
|
<span class="el-upload-list__item-actions">
|
||||||
<span
|
<span
|
||||||
class="el-upload-list__item-preview"
|
class="el-upload-list__item-preview"
|
||||||
@click="handlePictureCardPreview(file)"
|
@click="handlePictureCardPreview(file)"
|
||||||
|
@ -38,9 +38,6 @@
|
||||||
<i class="el-icon-delete"></i>
|
<i class="el-icon-delete"></i>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="loadingBox" v-else>
|
|
||||||
<i class="el-icon-loading" style="color: #fff; margin: auto"></i>
|
|
||||||
</div>
|
|
||||||
</viewer>
|
</viewer>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -66,7 +63,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
btnDisabled: false,
|
btnDisabled: false,
|
||||||
isUpload: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -122,19 +118,17 @@ export default {
|
||||||
},
|
},
|
||||||
async uploadFile(param) {
|
async uploadFile(param) {
|
||||||
var fileName = param.file.name;
|
var fileName = param.file.name;
|
||||||
this.isUpload = true;
|
|
||||||
this.btnDisabled = true;
|
this.btnDisabled = true;
|
||||||
let file = await this.fileToBlob(param.file);
|
let file = await this.fileToBlob(param.file);
|
||||||
let res = await this.uploadToOSS(fileName, file);
|
let res = await this.uploadToOSS(fileName, file);
|
||||||
this.btnDisabled = false;
|
this.btnDisabled = false;
|
||||||
if (!res) return (this.isUpload = false);
|
if (!res) return;
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: this.OSSclientConfig.basePath + res.name,
|
url: this.OSSclientConfig.basePath + res.name,
|
||||||
path: res.name,
|
path: res.name,
|
||||||
uid: param.file.uid,
|
uid: param.file.uid,
|
||||||
});
|
});
|
||||||
this.$emit("update:path", [...this.path, res.name]);
|
this.$emit("update:path", [...this.path, res.name]);
|
||||||
this.isUpload = false;
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
beforeUpload(file, fileList) {
|
beforeUpload(file, fileList) {
|
||||||
|
@ -142,7 +136,7 @@ export default {
|
||||||
if (isValidFile) {
|
if (isValidFile) {
|
||||||
// this.fileList = [];
|
// this.fileList = [];
|
||||||
} else {
|
} else {
|
||||||
this.$alert(this.$t("feedBack:uploadImg:format"));
|
this.$alert("请上传PNG/JPG/JPEG文件");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -203,17 +197,4 @@ export default {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
line-height: 100px;
|
line-height: 100px;
|
||||||
}
|
}
|
||||||
.loadingBox {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue