Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite

This commit is contained in:
2025-11-27 10:13:59 +08:00
4 changed files with 77 additions and 6 deletions

View File

@@ -38,7 +38,7 @@
</div> </div>
<div class="style marginBottom" v-if="show.style"> <div class="style marginBottom" v-if="show.style">
<div class="text">{{$t('Habit.Style')}}</div> <div class="text">{{$t('Habit.Style')}}</div>
<div class="center">{{ selectObject?.styleName?selectObject?.styleName:'All' }}</div> <div class="center">{{ selectObject?.styleName?selectObject?.styleName:$t('Header.All') }}</div>
<div class="gallery_btn" @click="setStyle">{{ $t('Habit.Select') }}</div> <div class="gallery_btn" @click="setStyle">{{ $t('Habit.Select') }}</div>
</div> </div>
<div class="style brand marginBottom"> <div class="style brand marginBottom">

View File

@@ -453,7 +453,8 @@ export default {
jsContent4: '图片必须小于5MB', jsContent4: '图片必须小于5MB',
jsContent5: '图片已经上传是否继续上传', jsContent5: '图片已经上传是否继续上传',
jsContent6: '输入的内容超过允许输入的最大长度', jsContent6: '输入的内容超过允许输入的最大长度',
jsContent7: '请输入内容~' jsContent7: '请输入内容~',
jsContent8: '请输入项目名字~'
}, },
ModelPlacement: { ModelPlacement: {
Registration: '新增模特', Registration: '新增模特',

View File

@@ -466,7 +466,8 @@ export default {
jsContent4: 'Image must smaller than 5MB!', jsContent4: 'Image must smaller than 5MB!',
jsContent5: 'This picture has been uploaded whether to continue uploading', jsContent5: 'This picture has been uploaded whether to continue uploading',
jsContent6: 'The entered content exceeds the maximum length.', jsContent6: 'The entered content exceeds the maximum length.',
jsContent7: 'Please enter content' jsContent7: 'Please enter content',
jsContent8: 'Please enter the project name.'
}, },
ModelPlacement: { ModelPlacement: {
Registration: 'Registration', Registration: 'Registration',

View File

@@ -9,7 +9,7 @@
:placeholder="t('batchGeneration.Search')" :placeholder="t('batchGeneration.Search')"
@search="searchHistoryList" @search="searchHistoryList"
/> />
<div class="history_table_content" ref="historyTable"> <div class="history_table_content" ref="historyTable" @click.stop>
<a-config-provider :locale="tableLocale"> <a-config-provider :locale="tableLocale">
<a-table <a-table
row-class-name="history_table_row" row-class-name="history_table_row"
@@ -28,6 +28,14 @@
}" }"
> >
<template #bodyCell="{ column, text, record, index }"> <template #bodyCell="{ column, text, record, index }">
<div class="update_name" v-if="column?.key === 'collectionName'">
<div v-if="updateName.selectIndex === index">
<input type="text" v-model="updateName.currentName">
</div>
<div v-show="updateName.selectIndex !== index">{{ record.name }}</div>
<i @click="setUpdateName(record.name,index)" v-show="updateName.selectIndex !== index" class="fi fi-rr-edit"></i>
<i @click="submitUpdateName" v-show="updateName.selectIndex === index" class="fi fi-sr-check-circle"></i>
</div>
<div class="operate_list" v-if="column?.Operations"> <div class="operate_list" v-if="column?.Operations">
<div <div
class="operate_item" class="operate_item"
@@ -213,6 +221,39 @@ export default defineComponent({
selectCode: selectCode, selectCode: selectCode,
designType: '' designType: ''
} }
const updateName = ref({
currentName:'',
selectIndex:-1,
})
const clearUpdateName = () => {
updateName.value.currentName = ''
updateName.value.selectIndex = -1
document.removeEventListener('click',clearUpdateName)
}
const setUpdateName = (name,index) => {
updateName.value.currentName = name
updateName.value.selectIndex = index
document.addEventListener('click',clearUpdateName)
}
const submitUpdateName = ()=>{
if(updateName.value.currentName === collectionList.value[updateName.value.selectIndex].name){
clearUpdateName()
return
}
if(updateName.value.selectIndex != -1){
if(!updateName.value.currentName)return message.info(t('HistoryPage.jsContent8'))
let data = {
id: collectionList.value[updateName.value.selectIndex].id, //library名字
name: updateName.value.currentName //history id
}
Https.axiosPost(Https.httpUrls.projectSaveOrUpdate, data)
.then(rv => {
collectionList.value[updateName.value.selectIndex].name = updateName.value.currentName
clearUpdateName()
})
.catch(res => {})
}
}
provide('type', type) provide('type', type)
return { return {
store, store,
@@ -232,7 +273,10 @@ export default defineComponent({
tableLocale, tableLocale,
projectSetting, projectSetting,
tableSearchBar, tableSearchBar,
currentProjectPath currentProjectPath,
updateName,
setUpdateName,
submitUpdateName,
} }
}, },
data() { data() {
@@ -608,6 +652,7 @@ export default defineComponent({
customTableRow(record: any) { customTableRow(record: any) {
return { return {
onDblclick: () => { onDblclick: () => {
if(this.updateName.selectIndex !== -1)return
this.retrieveHome(record) this.retrieveHome(record)
} }
} }
@@ -726,6 +771,11 @@ export default defineComponent({
} }
:deep(.ant-table-tbody > tr:hover) { :deep(.ant-table-tbody > tr:hover) {
background: #ededed; background: #ededed;
.update_name{
> .fi-rr-edit{
display: flex;
}
}
} }
:deep(.ant-table-tbody > tr > td) { :deep(.ant-table-tbody > tr > td) {
border: none; border: none;
@@ -780,7 +830,26 @@ export default defineComponent({
color: #000; color: #000;
} }
} }
.update_name{
display: flex;
align-items: center;
> div{
> input{
width: 12rem;
border-radius: .8rem;
padding-left: 1.5rem;
}
}
> i{
margin-left: 1.5rem;
cursor: pointer;
font-size: 2rem;
display: flex;
}
> .fi-rr-edit{
display: none;
}
}
.operate_list { .operate_list {
display: flex; display: flex;
align-items: center; align-items: center;