history标签功能
This commit is contained in:
@@ -79,28 +79,13 @@
|
||||
</div>
|
||||
<HistoryDetail ref="historyDetail" :groupDetails="groupDetails" :collectionName="collectionName"></HistoryDetail>
|
||||
|
||||
<a-modal class="rename_modal_component"
|
||||
v-model:visible="renameVisivle"
|
||||
:footer="null"
|
||||
:title="renameData?.name"
|
||||
:keyboard="false"
|
||||
width="56rem"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
>
|
||||
<div class="collection_rename_content">
|
||||
<div class="rename_form_content">
|
||||
<input class="rename_form_input" :placeholder="$t('HistoryPage.inputContent2')" v-model="newCollectionName" @keydown.enter="confrimRename()">
|
||||
</div>
|
||||
<div class="rename_submit_button" @click="confrimRename()">{{ $t('HistoryPage.Submit') }}</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<setLabel ref="setLabel"></setLabel>
|
||||
<RobotAssist></RobotAssist>
|
||||
<searchLabel ref="searchLabel"></searchLabel>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,computed,nextTick} from 'vue'
|
||||
import { defineComponent,ref,createVNode,computed,nextTick,provide} from 'vue'
|
||||
import HeaderComponent from "@/component/HomePage/Header.vue";
|
||||
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
||||
import { Https } from "@/tool/https";
|
||||
@@ -111,6 +96,7 @@ import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { ElCascader } from 'element-plus'
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
||||
import searchLabel from '@/component/LibraryPage/searchLabel.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@@ -118,7 +104,8 @@ export default defineComponent({
|
||||
HistoryDetail,
|
||||
RobotAssist,
|
||||
setLabel,
|
||||
ElCascader
|
||||
ElCascader,
|
||||
searchLabel
|
||||
},
|
||||
setup() {
|
||||
let rangePickerValue:any = ref([])
|
||||
@@ -159,7 +146,12 @@ export default defineComponent({
|
||||
label:'classificationName',
|
||||
}
|
||||
let intersection = ref(1)
|
||||
|
||||
let selectCode = ref('History')
|
||||
let type:any = {
|
||||
selectCode:selectCode,
|
||||
designType:''
|
||||
}
|
||||
provide('type',type)
|
||||
return {
|
||||
rangePickerValue,
|
||||
columns,
|
||||
@@ -170,6 +162,7 @@ export default defineComponent({
|
||||
value,
|
||||
props,
|
||||
intersection,
|
||||
selectCode,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -179,7 +172,6 @@ export default defineComponent({
|
||||
total:0,
|
||||
historyTableHeight:0,
|
||||
newCollectionName:'',
|
||||
renameVisivle:false,//修改名字弹窗
|
||||
groupDetails:{},//每个collection的详情
|
||||
collectionName:'',//选中的名字
|
||||
searchCollectionName:'',
|
||||
@@ -189,8 +181,39 @@ export default defineComponent({
|
||||
let historyTable:any = this.$refs.historyTable
|
||||
this.historyTableHeight = historyTable.clientHeight - 130
|
||||
this.getHistoryList()
|
||||
this.getClass()
|
||||
},
|
||||
methods:{
|
||||
getClass(){
|
||||
let data = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": '',
|
||||
"id": '',
|
||||
"libraryId": '',
|
||||
"parentId": '',
|
||||
"type": this.selectCode,
|
||||
"updateTime": "",
|
||||
"userId": ''
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
|
||||
(rv: any) => {
|
||||
this.options = rv
|
||||
rv.forEach((rvItem:any,rvIndex:number) => {
|
||||
this.options[rvIndex].value = rvItem.id
|
||||
this.options[rvIndex].label = rvItem.classificationName
|
||||
rvItem.childList.forEach((childItem:any,index:number) => {
|
||||
this.options[rvIndex].childList[index].value = childItem.id
|
||||
this.options[rvIndex].childList[index].label = childItem.classificationName
|
||||
});
|
||||
});
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
},
|
||||
turnToDetail(record:any){
|
||||
this.groupDetails = record.groupDetails
|
||||
let historyDetail:any = this.$refs.historyDetail
|
||||
@@ -222,7 +245,24 @@ export default defineComponent({
|
||||
startDate:startDate,
|
||||
endDate:endDate
|
||||
}
|
||||
let labelArr:any = []
|
||||
this.value.labelValue.forEach((item:any)=>{
|
||||
labelArr.push(item[item.length-1])
|
||||
})
|
||||
// console.log(this.value.labelValue);
|
||||
|
||||
// let data = {
|
||||
// classificationIdList:labelArr,
|
||||
// level1Type:this.selectCode,
|
||||
// level2Type:'',
|
||||
// page:1,
|
||||
// modelSex:'',
|
||||
// pictureName:this.searchCollectionName,
|
||||
// size:this.pageSize,
|
||||
// intersection:this.intersection,
|
||||
// }
|
||||
Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
||||
// Https.axiosPost( Https.httpUrls.queryLibraryPage, data).then(
|
||||
(rv: any) => {
|
||||
if(this.currentPage > 1 && rv.content.length == 0){
|
||||
this.currentPage = 1
|
||||
@@ -231,7 +271,6 @@ export default defineComponent({
|
||||
this.collectionList = rv.content
|
||||
this.total = rv.total
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -264,30 +303,8 @@ export default defineComponent({
|
||||
|
||||
//修改名字
|
||||
renameCollection(record:any,index:number){
|
||||
this.renameVisivle = true
|
||||
this.renameData = {
|
||||
...record,
|
||||
index:index
|
||||
}
|
||||
},
|
||||
|
||||
//确定修改名字
|
||||
confrimRename(){
|
||||
let data = {
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
userGroupId: this.renameData.id,
|
||||
userGroupName: this.newCollectionName
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.updateUserGroupName,data).then(
|
||||
(rv: any) => {
|
||||
message.success(this.t('HistoryPage.jsContent3'))
|
||||
this.collectionList[this.renameData.index].name = this.newCollectionName
|
||||
this.collectionList[this.renameData.index].updateDate = rv.updateDate
|
||||
this.renameVisivle = false
|
||||
this.newCollectionName = ''
|
||||
this.renameData = {}
|
||||
}
|
||||
);
|
||||
let searchLabel:any = this.$refs.searchLabel
|
||||
searchLabel.init(record,index)
|
||||
},
|
||||
|
||||
retrieveHome(record:any){
|
||||
@@ -332,34 +349,6 @@ export default defineComponent({
|
||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
||||
}
|
||||
},
|
||||
getClass(){
|
||||
let data = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": '',
|
||||
"id": '',
|
||||
"libraryId": '',
|
||||
"parentId": '',
|
||||
"type": '',
|
||||
"updateTime": "",
|
||||
"userId": ''
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
|
||||
(rv: any) => {
|
||||
this.options = rv
|
||||
rv.forEach((rvItem:any,rvIndex:number) => {
|
||||
this.options[rvIndex].value = rvItem.id
|
||||
this.options[rvIndex].label = rvItem.classificationName
|
||||
rvItem.childList.forEach((childItem:any,index:number) => {
|
||||
this.options[rvIndex].childList[index].value = childItem.id
|
||||
this.options[rvIndex].childList[index].label = childItem.classificationName
|
||||
});
|
||||
});
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Point')" @click.stop="editPlacementClick(img)" v-show="selectCode === 'Models'">
|
||||
<span class="icon iconfont icon-dianwei operate_icon"></span>
|
||||
</div>
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Rename')" @click.stop="showRenameModal(img,'single')">
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Rename')" @click.stop="showRenameModal(img,'total')">
|
||||
<span class="icon iconfont icon-tianxie operate_icon"></span>
|
||||
</div>
|
||||
<div class="img_operate_block" :title="t('LibraryPage.Delete')" @click.stop="deleteSinglePic(img,index)">
|
||||
@@ -573,7 +573,7 @@ export default defineComponent({
|
||||
});
|
||||
this.designType = arr[0]
|
||||
this.disignTypeList = arr
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
// this.workspaceItem.position = this.totalTypeList[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user