Merge branch 'hhl' of SH-Arbitrate/Arbitrate-Frontend into dev

This commit was merged in pull request #48.
This commit is contained in:
2023-09-27 15:49:55 +08:00
committed by Gitea
2 changed files with 97 additions and 23 deletions
@@ -32,15 +32,21 @@
<el-descriptions-item label="申请人主张违约金">{{ <el-descriptions-item label="申请人主张违约金">{{
form.claimLiquidDamag form.claimLiquidDamag
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="申请人案件证据资料">{{ <el-descriptions-item label="申请人案件证据资料">
form.aaa <span @click="toFile(2)">
}}</el-descriptions-item> <a href="#">{{ applicantFile }}</a>
<el-descriptions-item label="被申请人案件证据资料">{{ </span>
form.aaa </el-descriptions-item>
}}</el-descriptions-item> <el-descriptions-item label="被申请人案件证据资料">
<el-descriptions-item label="裁决书附件">{{ <span @click="toFile(6)">
form.aaa <a href="#">{{ respondentFile }}</a>
}}</el-descriptions-item> </span>
</el-descriptions-item>
<el-descriptions-item label="裁决书附件">
<span @click="toFile(3)">
<a href="#">{{ awardFile }}</a>
</span>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-form <el-form
ref="form" ref="form"
@@ -208,6 +214,12 @@ export default {
}, },
], ],
}, },
applicantFile: "", //申请人
applicantPath: "", //申请人
respondentFile: "", //被申请人
respondentPath: "", //被申请人
awardFile: "", //裁决书
awardPath: "", //裁决书
}; };
}, },
watch: { watch: {
@@ -218,12 +230,40 @@ export default {
this.form = this.detailform; this.form = this.detailform;
this.arbitrateRecord = this.form.arbitrateRecord; this.arbitrateRecord = this.form.arbitrateRecord;
console.log(this.form, "this.form"); console.log(this.form, "this.form");
this.evidenceFile(this.form);
}, 1000); }, 1000);
} }
}, },
}, },
}, },
methods: { methods: {
// 申请人裁决书
evidenceFile(val) {
if (val) {
val.caseAttachList.forEach((item) => {
if ((item.annexType = 2)) {
this.applicantFile = item.annexName;
this.applicantPath = item.annexPath;
} else if ((item.annexType = 6)) {
this.respondentFile = item.annexName;
this.respondenPath = item.annexPath;
} else if ((item.annexType = 3)) {
this.awardFile = item.annexName;
this.awardPath = item.annexPath;
}
});
}
},
toFile(val) {
let headPath = window.location.origin + "/API";
if (val == 2) {
window.open(headPath + this.applicantPath, "_black");
} else if (val == 6) {
window.open(headPath + this.respondenPath, "_black");
} else if (val == 3) {
window.open(headPath + this.awardPath, "_black");
}
},
// 校验裁决书 // 校验裁决书
verificationArbitrateRecordFn(parms) { verificationArbitrateRecordFn(parms) {
verificationArbitrateRecord(parms).then((res) => { verificationArbitrateRecord(parms).then((res) => {
@@ -283,4 +323,7 @@ export default {
.esign { .esign {
border: 1px solid; border: 1px solid;
} }
a {
color: blue;
}
</style> </style>
@@ -119,6 +119,7 @@
ref="fileupload" ref="fileupload"
:action="UploadUrl()" :action="UploadUrl()"
:on-success="handlSuccess" :on-success="handlSuccess"
:on-remove="handleRemove"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:data="filedata" :data="filedata"
:headers="headers" :headers="headers"
@@ -137,9 +138,17 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="申请人案件证据资料:" label="申请人案件证据资料:"
v-if="flag == '0' && caseAttachList.length > 0" v-if="
flag == '0' &&
caseAttachList.length > 0 &&
applicateArr.length > 0
"
> >
<a href=""></a> <div v-for="(item, index) in applicateArr" :key="index">
<a href="#" @click="toFile(item, index)" style="color: blue">
{{ item }}
</a>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 仅详情展示 案件质证环节以后显示被申请人证据--> <!-- 仅详情展示 案件质证环节以后显示被申请人证据-->
@@ -147,11 +156,16 @@
<el-form-item <el-form-item
label="被申请人案件证据资料:" label="被申请人案件证据资料:"
prop="respondentEvidence" prop="respondentEvidence"
v-if="flag == '0' && caseAttachList.length > 0" v-if="
flag == '0' && caseAttachList.length > 0 && quiltArr.length > 0
"
> >
<a href="#" @click="toFile" style="color: blue">{{ <div v-for="(item, index) in quiltArr" :key="index">
caseAttachList[0].annexName <a href="#" @click="toFile(item, index)" style="color: blue">
}}</a> {{ item }}
</a>
</div>
<!-- <el-upload <!-- <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
@@ -762,7 +776,11 @@ export default {
}, },
], ],
}, },
// annexId: '',
caseAttachListArr: [],
fileList: [], fileList: [],
applicateArr: [],
quiltArr: [],
}; };
}, },
watch: { watch: {
@@ -774,6 +792,15 @@ export default {
setTimeout(() => { setTimeout(() => {
this.form2.paymentArr = this.initpaymentArr; this.form2.paymentArr = this.initpaymentArr;
this.form3.paymentArr1 = this.initpaymentArr1; this.form3.paymentArr1 = this.initpaymentArr1;
console.log(this.caseAttachList, "caseAttachList");
this.caseAttachList.forEach((item) => {
if (item.annexType == 2) {
this.applicateArr.push(item.annexName);
}
if (item.annexType == 6) {
this.quiltArr.push(item.annexName);
}
});
}, 1000); }, 1000);
} }
if (this.flag == "2") { if (this.flag == "2") {
@@ -817,7 +844,9 @@ export default {
}, },
// 文件上传成功 // 文件上传成功
handlSuccess(res, file) { handlSuccess(res, file) {
console.log(res, file); this.caseAttachListArr.push({
annexId: res.data.annexId,
});
}, },
// 文件超出个数限制时的钩子 // 文件超出个数限制时的钩子
handleExceed(files, fileList) { handleExceed(files, fileList) {
@@ -831,6 +860,12 @@ export default {
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`); return this.$confirm(`确定移除 ${file.name}?`);
}, },
handleRemove(file, fileList) {
(this.caseAttachListArr = []),
fileList.forEach((item) => {
this.caseAttachListArr.push({ annexId: item.response.data.annexId });
});
},
// 取消 // 取消
cancel() { cancel() {
this.$emit("cancel"); this.$emit("cancel");
@@ -918,11 +953,7 @@ export default {
...this.form2.paymentArr, ...this.form2.paymentArr,
...this.form3.paymentArr1, ...this.form3.paymentArr1,
]; ];
this.formData.caseAttachList = [ this.formData.caseAttachList = [...this.caseAttachListArr];
{
annexId: 106,
},
];
if (this.formData.id) { if (this.formData.id) {
editCaseApply({ editCaseApply({
...this.formData, ...this.formData,
@@ -954,9 +985,9 @@ export default {
}); });
}, },
// 详情显示,展示案件文件 // 详情显示,展示案件文件
toFile() { toFile(item, index) {
window.open( window.open(
window.location.origin + "/API" + this.caseAttachList[0].annexPath, window.location.origin + "/API" + this.caseAttachList[index].annexPath,
"_black" "_black"
); );
}, },