| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 | 
							- <template>
 
-   <QuestionBase>
 
-     <template #content>
 
-       <div class="stem">
 
-         <RichText v-model="data.stem" :font-size="18" placeholder="输入题干" />
 
-         <RichText
 
-           v-if="isEnable(data.property.is_enable_description)"
 
-           v-model="data.description"
 
-           placeholder="输入提示"
 
-         />
 
-       </div>
 
-       <div class="content">
 
-         <div v-for="(item, index) in data.option_list" :key="index" class="content-item">
 
-           <template v-if="pic_list[item.picture_file_id]">
 
-             <span class="question-number" title="双击切换序号类型" @dblclick="changeOptionType(data)">
 
-               {{ computedQuestionNumber(index, data.option_number_show_mode) }}
 
-             </span>
 
-             <div class="item-left">
 
-               <el-image
 
-                 style="width: 72px; height: 72px"
 
-                 :src="pic_list[item.picture_file_id]"
 
-                 :preview-src-list="[pic_list[item.picture_file_id]]"
 
-                 fit="contain"
 
-               />
 
-               <button class="delete-btn" @click="delectOptions(index, item.picture_file_id)">
 
-                 <i class="el-icon-delete"></i>删除
 
-               </button>
 
-             </div>
 
-             <div class="item-right">
 
-               <div class="item-rich">
 
-                 <label class="">图片信息</label>
 
-                 <RichText v-model="item.picture_info" :font-size="12" placeholder="输入图片信息" />
 
-               </div>
 
-               <div v-if="isEnable(data.property.is_enable_reference_answer)" class="item-rich">
 
-                 <label class="">参考答案</label>
 
-                 <RichText v-model="item.reference_answer" placeholder="输入参考答案" />
 
-               </div>
 
-               <div v-if="isEnable(data.property.is_enable_analysis)" class="item-rich">
 
-                 <label>解析</label>
 
-                 <RichText v-model="item.analysis" :font-size="14" placeholder="输入解析" />
 
-               </div>
 
-             </div>
 
-           </template>
 
-           <el-divider />
 
-         </div>
 
-         <UploadDrag ref="uploadDrag" :limit="999" @fileUploadSuccess="fileUploadSuccess" />
 
-       </div>
 
-     </template>
 
-     <template #property>
 
-       <el-form :model="data.property" label-width="72px" label-position="left">
 
-         <el-form-item label="题号">
 
-           <el-input v-model="data.property.question_number" />
 
-         </el-form-item>
 
-         <el-form-item>
 
-           <el-radio
 
-             v-for="{ value, label } in questionNumberTypeList"
 
-             :key="value"
 
-             v-model="data.other.question_number_type"
 
-             :label="value"
 
-           >
 
-             {{ label }}
 
-           </el-radio>
 
-         </el-form-item>
 
-         <el-form-item label="题干题号">
 
-           <el-select v-model="data.property.stem_question_number_font_size">
 
-             <el-option v-for="item in fontSizeList" :key="item" :label="item" :value="item" />
 
-           </el-select>
 
-         </el-form-item>
 
-         <el-form-item label="提示">
 
-           <el-radio
 
-             v-for="{ value, label } in switchOption"
 
-             :key="value"
 
-             v-model="data.property.is_enable_description"
 
-             :label="value"
 
-           >
 
-             {{ label }}
 
-           </el-radio>
 
-         </el-form-item>
 
-         <el-form-item label="分值">
 
-           <el-radio
 
-             v-for="{ value, label } in scoreTypeList"
 
-             :key="value"
 
-             v-model="data.property.score_type"
 
-             :label="value"
 
-           >
 
-             {{ label }}
 
-           </el-radio>
 
-         </el-form-item>
 
-         <el-form-item>
 
-           <el-input-number
 
-             v-model="data.property.score"
 
-             :min="0"
 
-             :step="data.property.score_type === scoreTypeList[0].value ? 1 : 0.1"
 
-           />
 
-         </el-form-item>
 
-         <!-- <el-form-item label="语音作答">
 
-           <el-radio
 
-             v-for="{ value, label } in switchOption"
 
-             :key="value"
 
-             v-model="data.property.is_enable_voice_answer"
 
-             :label="value"
 
-           >
 
-             {{ label }}
 
-           </el-radio>
 
-         </el-form-item> -->
 
-         <el-form-item label="参考答案">
 
-           <el-radio
 
-             v-for="{ value, label } in switchOption"
 
-             :key="value"
 
-             v-model="data.property.is_enable_reference_answer"
 
-             :label="value"
 
-           >
 
-             {{ label }}
 
-           </el-radio>
 
-         </el-form-item>
 
-         <el-form-item label="解析">
 
-           <el-radio
 
-             v-for="{ value, label } in switchOption"
 
-             :key="value"
 
-             v-model="data.property.is_enable_analysis"
 
-             :label="value"
 
-           >
 
-             {{ label }}
 
-           </el-radio>
 
-         </el-form-item>
 
-       </el-form>
 
-     </template>
 
-   </QuestionBase>
 
- </template>
 
- <script>
 
- import QuestionMixin from '../common/QuestionMixin.js';
 
- import UploadDrag from '../common/UploadDrag.vue';
 
- import { talkPictrueData, getOption } from '@/views/exercise_questions/data/talkPicture';
 
- import { GetFileStoreInfo } from '@/api/app';
 
- import { changeOptionType } from '@/views/exercise_questions/data/common';
 
- export default {
 
-   name: 'TalkPicture',
 
-   components: { UploadDrag },
 
-   mixins: [QuestionMixin],
 
-   data() {
 
-     return {
 
-       changeOptionType,
 
-       data: JSON.parse(JSON.stringify(talkPictrueData)),
 
-       pic_list: {},
 
-       is_first: true,
 
-     };
 
-   },
 
-   watch: {
 
-     'data.file_id_list': {
 
-       handler() {
 
-         if (this.is_first) {
 
-           this.handleData();
 
-         }
 
-       },
 
-       deep: true,
 
-     },
 
-   },
 
-   created() {},
 
-   mounted() {},
 
-   methods: {
 
-     // 初始化数据
 
-     handleData() {
 
-       this.data.file_id_list.forEach((item) => {
 
-         GetFileStoreInfo({ file_id: item }).then(({ file_id, file_url }) => {
 
-           this.$set(this.pic_list, file_id, file_url);
 
-         });
 
-       });
 
-       this.is_first = false;
 
-     },
 
-     // 删除
 
-     delectOptions(i, id) {
 
-       this.$confirm('是否删除该条全部信息?', '提示', {
 
-         confirmButtonText: '确定',
 
-         cancelButtonText: '取消',
 
-         type: 'warning',
 
-       })
 
-         .then(() => {
 
-           delete this.pic_list[id];
 
-           this.data.file_id_list.splice(this.data.file_id_list.indexOf(id), 1);
 
-           this.data.option_list.splice(i, 1);
 
-           this.$refs.uploadDrag.clearFiles();
 
-         })
 
-         .catch(() => {});
 
-     },
 
-     fileUploadSuccess(file_id, file_url) {
 
-       this.data.file_id_list.push(file_id);
 
-       this.data.option_list.push(getOption());
 
-       this.data.option_list[this.data.option_list.length - 1].picture_file_id = file_id;
 
-       this.$set(this.pic_list, file_id, file_url);
 
-     },
 
-     /**
 
-      * 智能识别
 
-      * @param {String} text 识别数据
 
-      */
 
-     recognition(text) {
 
-       this.recognitionCommon(text);
 
-     },
 
-   },
 
- };
 
- </script>
 
- <style lang="scss" scoped>
 
- .content {
 
-   :deep .el-upload {
 
-     width: 100%;
 
-     &-dragger {
 
-       display: flex;
 
-       flex-direction: column;
 
-       align-items: center;
 
-       justify-content: center;
 
-       width: 100%;
 
-       height: 90px;
 
-       font-size: 14px;
 
-       :first-child {
 
-         color: #000;
 
-       }
 
-       :last-child {
 
-         color: $text-color;
 
-       }
 
-     }
 
-   }
 
-   .content-item {
 
-     display: flex;
 
-     flex-wrap: wrap;
 
-     column-gap: 8px;
 
-     margin-bottom: 24px;
 
-   }
 
-   .delete-btn {
 
-     width: 100%;
 
-     padding: 5px 8px;
 
-     font-size: 14px;
 
-     line-height: 22px;
 
-     color: #f53f3f;
 
-     background: #fff4f4;
 
-     border: none;
 
-     border-radius: 4px;
 
-     .el-icon-delete {
 
-       margin-right: 8px;
 
-     }
 
-     &:hover {
 
-       color: #f53f3f;
 
-     }
 
-     &:focus {
 
-       outline: none;
 
-     }
 
-   }
 
-   .item-left {
 
-     width: 72px;
 
-   }
 
-   .item-right {
 
-     flex: 1;
 
-     .item-rich {
 
-       display: flex;
 
-       > label {
 
-         flex-shrink: 0;
 
-         width: 64px;
 
-         font-size: 14px;
 
-         line-height: 32px;
 
-         color: $font-light-color;
 
-       }
 
-       :deep .rich-wrapper {
 
-         flex: 1;
 
-       }
 
-     }
 
-   }
 
-   .question-number {
 
-     min-width: 40px;
 
-     height: 32px;
 
-     padding: 4px 0;
 
-     color: $text-color;
 
-     text-align: center;
 
-     cursor: default;
 
-     background-color: $fill-color;
 
-     border-radius: 2px;
 
-   }
 
- }
 
- </style>
 
 
  |