@@ -29,6 +29,7 @@ interface Form {
2929const { t } = useI18n ()
3030const multipleSelectionAll = ref <any []>([])
3131const keywords = ref (' ' )
32+ const oldKeywords = ref (' ' )
3233const searchLoading = ref (false )
3334
3435const selectable = () => {
@@ -53,7 +54,7 @@ const defaultForm = {
5354 id: null ,
5455 word: null ,
5556 description: null ,
56- other_words: [],
57+ other_words: [' ' ],
5758}
5859const pageForm = ref <Form >(cloneDeep (defaultForm ))
5960
@@ -72,7 +73,7 @@ const exportBatchUser = () => {
7273 cancelButtonText: t (' common.cancel' ),
7374 customClass: ' confirm-no_icon' ,
7475 autofocus: false ,
75- },
76+ }
7677 ).then (() => {
7778 professionalApi .deleteEmbedded (multipleSelectionAll .value .map ((ele ) => ele .id )).then (() => {
7879 ElMessage ({
@@ -112,7 +113,7 @@ const deleteBatchUser = () => {
112113 cancelButtonText: t (' common.cancel' ),
113114 customClass: ' confirm-no_icon' ,
114115 autofocus: false ,
115- },
116+ }
116117 ).then (() => {
117118 professionalApi .deleteEmbedded (multipleSelectionAll .value .map ((ele ) => ele .id )).then (() => {
118119 ElMessage ({
@@ -125,7 +126,7 @@ const deleteBatchUser = () => {
125126 })
126127}
127128const deleteHandler = (row : any ) => {
128- ElMessageBox .confirm (t (' professional.the_term_gmv' , { msg: row .name }), {
129+ ElMessageBox .confirm (t (' professional.the_term_gmv' , { msg: row .word }), {
129130 confirmButtonType: ' danger' ,
130131 confirmButtonText: t (' dashboard.delete' ),
131132 cancelButtonText: t (' common.cancel' ),
@@ -183,6 +184,7 @@ const handleToggleRowSelection = (check: boolean = true) => {
183184
184185const search = () => {
185186 searchLoading .value = true
187+ oldKeywords .value = keywords .value
186188 professionalApi
187189 .getList (pageInfo .currentPage , pageInfo .pageSize , { word: keywords .value })
188190 .then ((res ) => {
@@ -220,7 +222,7 @@ const saveHandler = () => {
220222 termFormRef .value .validate ((res : any ) => {
221223 if (res ) {
222224 const obj = unref (pageForm )
223- if (obj .id === ' ' ) {
225+ if (! obj .id ) {
224226 delete obj .id
225227 }
226228 professionalApi .updateEmbedded (obj ).then (() => {
@@ -324,7 +326,7 @@ const deleteHandlerItem = (idx: number) => {
324326 class =" table-content"
325327 :class =" multipleSelectionAll?.length && 'show-pagination_height'"
326328 >
327- <template v-if =" ! keywords && ! fieldList .length " >
329+ <template v-if =" ! oldKeywords && ! fieldList .length " >
328330 <EmptyBackground
329331 class =" datasource-yet"
330332 :description =" $t('professional.no_term')"
@@ -393,13 +395,13 @@ const deleteHandlerItem = (idx: number) => {
393395 </el-table-column >
394396 <template #empty >
395397 <EmptyBackground
396- v-if =" !keywords && !fieldList.length"
398+ v-if =" !oldKeywords && !fieldList.length"
397399 :description =" $t('professional.no_term')"
398400 img-type =" noneWhite"
399401 />
400402
401403 <EmptyBackground
402- v-if =" !!keywords && !fieldList.length"
404+ v-if =" !!oldKeywords && !fieldList.length"
403405 :description =" $t('datasource.relevant_content_found')"
404406 img-type =" tree"
405407 />
@@ -428,15 +430,15 @@ const deleteHandlerItem = (idx: number) => {
428430 >
429431 {{ $t('datasource.select_all') }}
430432 </el-checkbox >
431- <button class =" primary-button" @click =" exportBatchUser" >
433+ <button v-if = " false " class =" primary-button" @click =" exportBatchUser" >
432434 {{ $t('professional.export') }}
433435 </button >
434436
435437 <button class =" danger-button" @click =" deleteBatchUser" >{{ $t('dashboard.delete') }}</button >
436438
437439 <span class =" selected" >{{
438- $t('user.selected_2_items', { msg: multipleSelectionAll.length })
439- }}</span >
440+ $t('user.selected_2_items', { msg: multipleSelectionAll.length })
441+ }}</span >
440442
441443 <el-button text @click =" cancelDelete" >
442444 {{ $t('common.cancel') }}
@@ -485,8 +487,8 @@ const deleteHandlerItem = (idx: number) => {
485487 <template #label >
486488 <div style =" display : flex ; align-items : center " >
487489 <span >{{ t('professional.synonyms') }}</span >
488- <span class =" btn" >
489- <el-icon style =" margin-right : 4px " size =" 16" @click = " pageForm.other_words.push('') " >
490+ <span class =" btn" @click = " pageForm.other_words.push('') " >
491+ <el-icon style =" margin-right : 4px " size =" 16" >
490492 <icon _add_outlined ></icon _add_outlined >
491493 </el-icon >
492494 {{ $t('model.add') }}
@@ -495,7 +497,7 @@ const deleteHandlerItem = (idx: number) => {
495497 </template >
496498 <div class =" synonyms-list" >
497499 <el-scrollbar max-height =" 218px" >
498- <div v-for =" (item , index) in pageForm.other_words" :key =" item " class =" scrollbar-item" >
500+ <div v-for =" (_ , index) in pageForm.other_words" :key =" index " class =" scrollbar-item" >
499501 <el-input
500502 v-model =" pageForm.other_words[index]"
501503 style =" width : 528px "
@@ -548,7 +550,7 @@ const deleteHandlerItem = (idx: number) => {
548550 </el-form-item >
549551 <el-form-item :label =" t('professional.synonyms')" >
550552 <div class =" content" >
551- {{ pageForm.other_words }}
553+ {{ pageForm.other_words.join(',') }}
552554 </div >
553555 </el-form-item >
554556 <el-form-item :label =" t('professional.term_description')" >
@@ -579,6 +581,10 @@ const deleteHandlerItem = (idx: number) => {
579581 padding-top : 200px ;
580582 }
581583
584+ :deep(.ed-table__cell ) {
585+ cursor : pointer ;
586+ }
587+
582588 .tool-left {
583589 display : flex ;
584590 align-items : center ;
0 commit comments