|
|
@@ -53,7 +53,22 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-input v-model="checkPinyinInput" type="text" class="checkPinyinInput" />
|
|
|
+ <!-- <el-input v-model="checkPinyinInput" type="text" class="checkPinyinInput" /> -->
|
|
|
+ <el-select
|
|
|
+ v-model="checkPinyinInput"
|
|
|
+ placeholder="请选择"
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ class="checkPinyinInput"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in pinyinList" :key="item.pinyin" :value="item.pinyin.replace(/,/g, '')">
|
|
|
+ <span style="float: left">{{ item.pinyin.replace(/,/g, '') }}</span>
|
|
|
+ <span style="float: right; font-size: 13px; color: #8492a6">{{
|
|
|
+ item.storage_type === 1 ? '机构库' : item.storage_type === 2 ? '全域库' : '个人库'
|
|
|
+ }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
<p class="tips">
|
|
|
一到四声分别用数字1-4表示。拼音间用空格隔开,儿化音用_代替空格,如“骨朵儿”输入“gu1 duo3_er”。
|
|
|
</p>
|
|
|
@@ -67,8 +82,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import { publicMethods, reparse } from '@/api/api';
|
|
|
-import th from 'element-ui/lib/locale/lang/th';
|
|
|
+import { toolGetWordPinyinCorrectionList } from '@/api/pinyinCorrection';
|
|
|
|
|
|
export default {
|
|
|
components: {},
|
|
|
@@ -100,6 +114,7 @@ export default {
|
|
|
['m̄', 'ḿ', 'm', 'm̀', 'm'],
|
|
|
],
|
|
|
toneList: [' ', 'ˉ', 'ˊ', 'ˇ', 'ˋ'],
|
|
|
+ pinyinList: [], // 拼音校正列表
|
|
|
};
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
@@ -158,7 +173,20 @@ export default {
|
|
|
selectItem(item, index) {
|
|
|
this.activeIndex = index;
|
|
|
this.itemActive = item;
|
|
|
- this.dialogFlag = true;
|
|
|
+ this.pinyinList = [];
|
|
|
+ toolGetWordPinyinCorrectionList({
|
|
|
+ word: item.wordsName ? item.wordsName : item.onebest,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.pinyinList = res.pinyin_correction_list;
|
|
|
+ }
|
|
|
+ this.dialogFlag = true;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.dialogFlag = true;
|
|
|
+ });
|
|
|
+
|
|
|
this.checkPinyinInput = '';
|
|
|
},
|
|
|
cancleDialog() {
|