guhongwei 4 years ago
parent
commit
5c284d4777
1 changed files with 5 additions and 14 deletions
  1. 5 14
      src/views/technical/projectAdd/index.vue

+ 5 - 14
src/views/technical/projectAdd/index.vue

@@ -13,18 +13,6 @@
                   <span> 项目基本信息</span>
                 </el-col>
                 <el-col :span="24" class="info">
-                  <el-col :span="24" class="langSelect">
-                    <el-form-item prop="question_id">
-                      <el-col :span="21" slot="label">
-                        所属通知:
-                      </el-col>
-                      <el-col :span="24">
-                        <el-select v-model="form.question_id" filterable>
-                          <el-option v-for="(item, index) in questionList" :key="index" :value="item._id" :label="item.title"></el-option>
-                        </el-select>
-                      </el-col>
-                    </el-form-item>
-                  </el-col>
                   <el-col :span="24">
                     <el-form-item prop="name">
                       <el-col :span="21" slot="label">
@@ -339,7 +327,7 @@ export default {
       // 项目技术水平
       techollevelList: [{ name: '国际领先' }, { name: '国际先进' }, { name: '国内领先' }, { name: '国内先进' }],
       // 所属通知
-      questionList: [],
+      questionInfo: {},
     };
   },
   async created() {
@@ -351,6 +339,7 @@ export default {
     async onSubmit(status) {
       let data = this.form;
       data.user_id = this.user.userid;
+      data.question_id = this.questionInfo._id;
       data.status = status;
       if (status == '0') {
         this.$alert(
@@ -371,6 +360,7 @@ export default {
                 message: '数据添加成功',
                 type: 'success',
               });
+              this.$router.push({ path: '/technical/index' });
             }
           })
           .catch(() => {});
@@ -393,6 +383,7 @@ export default {
                 message: '数据添加成功',
                 type: 'success',
               });
+              this.$router.push({ path: '/technical/index' });
             }
           })
           .catch(() => {});
@@ -402,7 +393,7 @@ export default {
     async searchOther() {
       let res = await this.query();
       if (this.$checkRes(res)) {
-        this.$set(this, `questionList`, res.data);
+        this.$set(this, `questionInfo`, res.data[0]);
       }
     },
   },