表单提交组件之间的校验
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import ExpertForm from "@/views/components/ExpertForm";
|
||||
import { expertDetail, expertAdd } from "@/api/examine/expert";
|
||||
export default {
|
||||
components: {
|
||||
ExpertForm,
|
||||
@ -17,8 +18,8 @@ export default {
|
||||
return {
|
||||
form: {
|
||||
image: undefined,
|
||||
name: "1",
|
||||
mobile: "13911111111",
|
||||
name: undefined,
|
||||
mobile: undefined,
|
||||
research_id: undefined, // 所属单位
|
||||
laboratory_id: undefined, // 所属实验室
|
||||
tenant_id: undefined,
|
||||
@ -44,6 +45,9 @@ export default {
|
||||
submitForm() {
|
||||
if (this.$refs.expertForm.submitForm()) {
|
||||
console.log(this.form);
|
||||
// expertAdd(this.form).then((res) => {
|
||||
// console.log(res);
|
||||
// });
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
@ -73,9 +77,10 @@ export default {
|
||||
this.$router.go(-1);
|
||||
return;
|
||||
}
|
||||
console.log(id);
|
||||
// this.queryParams.reportedId = id;
|
||||
// this.getReportDetail();
|
||||
expertDetail({ id }).then((res) => {
|
||||
console.log(res);
|
||||
this.form = res.data;
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
@ -100,8 +100,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delUser } from "@/api/system/user";
|
||||
|
||||
import { expertList } from "@/api/examine/expert";
|
||||
|
||||
export default {
|
||||
|
Reference in New Issue
Block a user