master
xy 2 years ago
parent 6a937bdfe9
commit 212fc1b25e

@ -15,18 +15,17 @@
:limit="1" :limit="1"
> >
<el-button slot="trigger" size="small" type="primary" <el-button slot="trigger" size="small" type="primary"
>选取文件</el-button >选取文件</el-button
> >
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
size="small" size="small"
type="success" type="success"
@click="$refs['upload'].submit()" @click="$refs['upload'].submit()"
>开始上传</el-button >开始上传</el-button
> >
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
支持文件格式.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls 支持文件格式.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls .xlsx
.xlsx
<br />单个文件不能超过50M <br />单个文件不能超过50M
</div> </div>
</el-upload> </el-upload>
@ -35,25 +34,25 @@
</template> </template>
<script> <script>
import { detailContract, editorContract } from '@/api/contract/contract' import { detailContract, editorContract } from "@/api/contract/contract";
export default { export default {
data() { data() {
return { return {
id: '', id: "",
isShow: false, isShow: false,
action: process.env.VUE_APP_UPLOAD_API, action: process.env.VUE_APP_UPLOAD_API,
fileList: [], fileList: [],
} };
}, },
methods: { methods: {
setId (id) { setId(id) {
this.id = id this.id = id;
}, },
show() { show() {
this.isShow = true this.isShow = true;
}, },
hide() { hide() {
this.isShow = false this.isShow = false;
}, },
// //
successHandle(response, file, fileList) { successHandle(response, file, fileList) {
@ -73,31 +72,30 @@ export default {
} }
}, },
async getDetail () { async getDetail() {
const res = await detailContract({ const res = await detailContract({
id: this.id id: this.id,
}) });
this.detail = res this.detail = res;
},
submit() {
this.detail.invite_status = 3;
this.detail.tender_id = this.fileList[0].response?.id;
editorContract(this.detail).then((res) => {
this.hide();
this.$emit("refresh");
});
}, },
submit () {
this.detail.invite_status = 3
this.detail.tender_id = this.fileList[0].response?.id
editorContract(this.detail).then(res => {
this.hide()
this.$emit('refresh')
})
}
}, },
computed: {}, computed: {},
watch: { watch: {
isShow (newVal) { isShow(newVal) {
if (newVal) { if (newVal) {
this.getDetail() this.getDetail();
} }
} },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss"></style>
</style>

Loading…
Cancel
Save