|
@@ -78,7 +78,7 @@
|
|
<div class="sentence-config">
|
|
<div class="sentence-config">
|
|
<el-input v-model="data.btStr" placeholder="请输入词头本体变体信息,用/隔开"></el-input>
|
|
<el-input v-model="data.btStr" placeholder="请输入词头本体变体信息,用/隔开"></el-input>
|
|
<el-button type="primary" size="small" @click="handleSentence">匹配句子</el-button>
|
|
<el-button type="primary" size="small" @click="handleSentence">匹配句子</el-button>
|
|
- <el-button type="primary" size="small" @click="handleSave('newWordFlag')"><i class="el-icon-plus"></i>添加句子</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="selectSentFlag=true"><i class="el-icon-plus"></i>添加句子</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="channel-item" v-for="(item,index) in data.bind_sents" :key="index">
|
|
<div class="channel-item" v-for="(item,index) in data.bind_sents" :key="index">
|
|
<div class="channel-top">
|
|
<div class="channel-top">
|
|
@@ -104,14 +104,25 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog
|
|
|
|
+ :visible.sync="selectSentFlag"
|
|
|
|
+ :show-close="false"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ :append-to-body="true"
|
|
|
|
+ width="696px"
|
|
|
|
+ class="login-dialog"
|
|
|
|
+ v-if="selectSentFlag">
|
|
|
|
+ <add-sentence @closeAddSentence="closeAddSentence" :sentenceList="sentenceList" @sureAddSentence="sureAddSentence"></add-sentence>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { getLogin } from "@/api/ajax";
|
|
import { getLogin } from "@/api/ajax";
|
|
import Upload from "../../../components/Upload.vue"
|
|
import Upload from "../../../components/Upload.vue"
|
|
|
|
+import AddSentence from "./AddSentence.vue"
|
|
export default {
|
|
export default {
|
|
- components: {Upload},
|
|
|
|
|
|
+ components: {Upload, AddSentence},
|
|
name: "newwordstemplate",
|
|
name: "newwordstemplate",
|
|
props: ["itemData","articleId","vlInfo", "sentenceList"],
|
|
props: ["itemData","articleId","vlInfo", "sentenceList"],
|
|
data() {
|
|
data() {
|
|
@@ -187,6 +198,7 @@ export default {
|
|
}
|
|
}
|
|
],
|
|
],
|
|
matchFlag: true,
|
|
matchFlag: true,
|
|
|
|
+ selectSentFlag: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {},
|
|
watch: {},
|
|
@@ -409,6 +421,18 @@ export default {
|
|
}else{
|
|
}else{
|
|
this.$message.warning('至少保留一个词性释义')
|
|
this.$message.warning('至少保留一个词性释义')
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ closeAddSentence(){
|
|
|
|
+ this.selectSentFlag = false
|
|
|
|
+ },
|
|
|
|
+ sureAddSentence(list){
|
|
|
|
+ let arr = JSON.parse(JSON.stringify(list))
|
|
|
|
+ arr.forEach(item=>{
|
|
|
|
+ item.show = false
|
|
|
|
+ item.highIndexArr = []
|
|
|
|
+ })
|
|
|
|
+ this.data.bind_sents = this.data.bind_sents.concat(arr)
|
|
|
|
+ this.selectSentFlag = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|