You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
2.7 KiB
118 lines
2.7 KiB
<template>
|
|
<div class="page">
|
|
<div class="pageBox">
|
|
<div class="topTitle">关联项目</div>
|
|
<div class="biaodan">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="84px">
|
|
<el-form-item label="项目名称" prop="projectName">
|
|
<el-select
|
|
v-model="form.projectName"
|
|
placeholder="请关联项目"
|
|
filterable
|
|
clearable
|
|
size="small"
|
|
style="width: 100%"
|
|
multiple
|
|
>
|
|
<el-option
|
|
v-for="dict in projectNameOptions"
|
|
:key="dict.bidProjectName + dict.id"
|
|
:label="dict.bidProjectName"
|
|
:value="dict.proNo"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div class="btn">
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import {
|
|
listBidResult,
|
|
getBidResult,
|
|
delBidResult,
|
|
addBidResult,
|
|
updateBidResult,
|
|
exportBidResult,
|
|
} from "@/api/earlyStage/bidResult";
|
|
import { legalLinkProject } from "@/api/common";
|
|
export default {
|
|
name: "legalLinkProject",
|
|
data() {
|
|
return {
|
|
title: "关联项目",
|
|
open: true,
|
|
form: {},
|
|
rules: {
|
|
projectName: [
|
|
{ required: true, message: "请选择关联的项目", trigger: "blur" },
|
|
],
|
|
},
|
|
projectNameOptions: [],
|
|
};
|
|
},
|
|
created() {
|
|
this.getProjectNameOptions();
|
|
},
|
|
methods: {
|
|
getProjectNameOptions() {
|
|
listBidResult({}).then((res) => {
|
|
console.log(res);
|
|
this.projectNameOptions = res.records;
|
|
});
|
|
},
|
|
submitForm() {
|
|
this.$refs["form"].validate((valid) => {
|
|
if (valid) {
|
|
console.log(this.form.projectName);
|
|
legalLinkProject(this.form.projectName).then((res) => {
|
|
if (res.code === 200) {
|
|
this.$router.push("/");
|
|
}
|
|
});
|
|
}
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.page {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #808080;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
.pageBox {
|
|
width: 500px;
|
|
height: 300px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: #fff;
|
|
.topTitle {
|
|
text-align: center;
|
|
font-weight: bold;
|
|
padding: 20px 0;
|
|
}
|
|
.biaodan {
|
|
flex: 1;
|
|
padding: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
// justify-content: center;
|
|
.btn {
|
|
position: absolute;
|
|
right: 20px;
|
|
bottom: 20px;
|
|
text-align: right;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|