Commit e9d44ac2 authored by lshan's avatar lshan

聊天空问题

parent cdf777cb
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
<a-modal v-model="show" title="设置常用问题、自动回复" :centered="true" footer="" style="text:center"> <a-modal v-model="show" title="设置常用问题、自动回复" :centered="true" footer="" style="text:center">
<a-form-model :model="form" ref="ruleForm"> <a-form-model :model="form" ref="ruleForm">
<div style="color: #e63956;text-align: center;">您最多可以设置5个常用问题</div> <div style="color: #e63956;text-align: center;">您最多可以设置5个常用问题</div>
<a-form-model-item style="justify-content: center; padding: 4rem;"> <a-form-model-item style="justify-content: center; padding: 4rem;">
<span v-for="(item,index) of forms" :key="index" class=""> <span v-for="(item,index) of forms" :key="index" class="">
<!-- <span v-if="index%2!==0" > --> <!-- <span v-if="index%2!==0" > -->
<div class="flex"> <div class="flex">
<span> <span>
<a-input v-model="item.answer" :placeholder="'设置自动回复'+ index +'(50字以内)'" :maxLength="50" style="width: 18rem;margin-right:10px;"/> <a-input v-model="item.answer" :placeholder="'设置自动回复'+ index +'(50字以内)'" :maxLength="50" style="width: 18rem;margin-right:10px;"/>
</span> </span>
<span @click="addInput(index)"> <span @click="addInput(index)">
<a-icon type="plus" style=" margin-right:10px;" /> <a-icon type="plus" style=" margin-right:10px;" />
</span> </span>
...@@ -249,8 +250,8 @@ export default Vue.extend({ ...@@ -249,8 +250,8 @@ export default Vue.extend({
if (valid) { if (valid) {
this.show = false this.show = false
for(let i=0;i<this.forms.length;i++){ for(let i=0;i<this.forms.length;i++){
if( !this.forms[i].question ){ if( !this.forms[i].question || !this.forms[i].answer){
message.error('第'+i+'个问题为空') message.error('第'+i+'个问题添加失败')
}else{ }else{
FAQService.getInstance(). AddQueAns({ FAQService.getInstance(). AddQueAns({
answer:this.forms[i].answer, answer:this.forms[i].answer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment