Browse Source

查看问答列表添加答案列表

lchao 1 year ago
parent
commit
599d941ef1
1 changed files with 13 additions and 5 deletions
  1. 13 5
      src/views/asking/question/index.vue

+ 13 - 5
src/views/asking/question/index.vue

@@ -204,6 +204,13 @@
         <el-form-item label="图片" prop="path">
           <image-upload v-model="form1.path"/>
         </el-form-item>
+        <el-form-item label="答案列表">
+          <ul>
+            <li v-for="(answer, index) in form1.answerList" :key="index">
+              <p>{{ answer.answer }}</p>
+            </li>
+          </ul>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button v-if="form1.a == '1'" type="primary" @click="through(1)">通 过</el-button>
@@ -382,16 +389,17 @@ export default {
       });
     },
     /** 审核 */
-    examine(row,a) {
+    examine(row, a) {
       this.reset();
-      const id = row.id || this.ids
+      const id = row.id || this.ids;
       getQuestion(id).then(response => {
         this.form1 = response.data;
-        this.form1.a = a
+        this.form1.a = a;
+        this.form1.answerList = response.data.answerList || [];
         this.open1 = true;
-        if (a == 1){
+        if (a === 1) {
           this.title = "审核";
-        }else {
+        } else {
           this.title = "查看";
         }
       });