|
|
@@ -16,7 +16,7 @@
|
|
|
<el-cascader
|
|
|
ref="artCascader"
|
|
|
style="width: 100%"
|
|
|
- v-model="formData.artTypeId"
|
|
|
+ v-model="formData.specialtyId"
|
|
|
:props="optionProps"
|
|
|
:options="artTypes"
|
|
|
:show-all-levels="false"
|
|
|
@@ -154,7 +154,10 @@
|
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
|
<el-form-item prop="sex" label="性别">
|
|
|
- <el-select v-model="item.sex"></el-select>
|
|
|
+ <el-select v-model="item.sex">
|
|
|
+ <el-option label="男" value="男"></el-option>
|
|
|
+ <el-option label="女" value="女"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
|
@@ -202,6 +205,16 @@ export default {
|
|
|
.get('programme/get/' + this.$route.query.id)
|
|
|
.then(res => {
|
|
|
this.formData = res;
|
|
|
+
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/participant/all',
|
|
|
+ { size: 100, query: { programmeId: this.$route.query.id } },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.participants = res.content;
|
|
|
+ });
|
|
|
})
|
|
|
.catch(e => {
|
|
|
console.log(e);
|
|
|
@@ -321,11 +334,26 @@ export default {
|
|
|
checkStrictly: true,
|
|
|
expandTrigger: 'hover'
|
|
|
},
|
|
|
- participants: []
|
|
|
+ participants: [],
|
|
|
+ programmeId: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['organization'])
|
|
|
+ ...mapState(['organization']),
|
|
|
+ saveOtherJson() {
|
|
|
+ return [...this.participants]
|
|
|
+ .filter(item => {
|
|
|
+ return !!item.name || !!item.sex || !!item.phone;
|
|
|
+ })
|
|
|
+ .map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ programmeId: this.programmeId
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ // return JSON.stringify(participants);
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
onSave() {
|
|
|
@@ -345,6 +373,11 @@ export default {
|
|
|
.post('/programme/save', data, { body: 'json' })
|
|
|
.then(res => {
|
|
|
this.saving = false;
|
|
|
+
|
|
|
+ this.programmeId = res.id;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$http.post('/participant/batchSave', this.saveOtherJson, { body: 'json' });
|
|
|
+ });
|
|
|
this.$message.success('成功');
|
|
|
this.$router.go(-1);
|
|
|
})
|