Files
aida_front/dist/js/537.f53d098a.js
2023-12-01 15:02:37 +08:00

1 line
7.4 KiB
JavaScript

"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[537],{5750:function(e,t,i){i.r(t),i.d(t,{default:function(){return E}});var a=i(6252),o=i(3577),s=i(9963),l=i.p+"img/bg.5af7d92c.png";const n={class:"history_page"},r={class:"page_content"},c=(0,a._)("img",{class:"page_content_bg",src:l},null,-1),h={class:"page_content_body"},u={class:"history_page_body"},m={class:"history_header"},d={class:"history_table_search"},p=(0,a._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1),g={class:"content_search_block"},_=["placeholder"],y=(0,a._)("span",{class:"icon iconfont icon-sousuo"},null,-1),D=[y],k={class:"history_table_content",ref:"historyTable"},w={key:0,class:"operate_list"},v=["onClick"],C=["onClick"],H=["onClick"],P=["onClick"],b={class:"collection_rename_content"},f={class:"rename_form_content"},N=["placeholder"];function V(e,t,i,l,y,V){const T=(0,a.up)("HeaderComponent"),S=(0,a.up)("a-range-picker"),x=(0,a.up)("a-table"),z=(0,a.up)("HistoryDetail"),L=(0,a.up)("a-modal"),$=(0,a.up)("RobotAssist");return(0,a.wg)(),(0,a.iD)("div",n,[(0,a._)("div",r,[c,(0,a._)("div",h,[(0,a.Wm)(T),(0,a._)("div",u,[(0,a._)("div",m,(0,o.zw)(e.$t("HistoryPage.History")),1),(0,a._)("div",d,[(0,a.Wm)(S,{class:"range_picker",value:e.rangePickerValue,"onUpdate:value":t[0]||(t[0]=t=>e.rangePickerValue=t),placeholder:[e.$t("HistoryPage.StartDate"),e.$t("HistoryPage.EndDate")],valueFormat:"YYYY-MM-DD"},{suffixIcon:(0,a.w5)((()=>[p])),_:1},8,["value","placeholder"]),(0,a._)("div",g,[(0,a.wy)((0,a._)("input",{class:"search_input",placeholder:e.$t("HistoryPage.inputContent1"),"onUpdate:modelValue":t[1]||(t[1]=t=>e.searchCollectionName=t),onKeydown:t[2]||(t[2]=(0,s.D2)((t=>e.searchHistoryList()),["enter"]))},null,40,_),[[s.nr,e.searchCollectionName]]),(0,a._)("div",{class:"search_icon_block",onClick:t[3]||(t[3]=t=>e.searchHistoryList())},D)])]),(0,a._)("div",k,[(0,a.Wm)(x,{columns:e.columns,"data-source":e.collectionList,scroll:{y:e.historyTableHeight},onChange:e.changePage,pagination:{showSizeChanger:!0,current:e.currentPage,pageSize:e.pageSize,total:e.total,showQuickJumper:!0,bordered:!1}},{bodyCell:(0,a.w5)((({column:t,text:i,record:s,index:l})=>[t?.Operations?((0,a.wg)(),(0,a.iD)("div",w,[(0,a._)("div",{class:"operate_item",onClick:t=>e.turnToDetail(s)},(0,o.zw)(e.$t("HistoryPage.Detail")),9,v),(0,a._)("div",{class:"operate_item",onClick:t=>e.renameCollection(s,l)},(0,o.zw)(e.$t("HistoryPage.Rename")),9,C),(0,a._)("div",{class:"operate_item",onClick:t=>e.retrieveHome(s)},(0,o.zw)(e.$t("HistoryPage.Retrieve")),9,H),(0,a._)("div",{class:"operate_item",onClick:t=>e.deleteGroup(s,l)},(0,o.zw)(e.$t("HistoryPage.Delete")),9,P)])):(0,a.kq)("",!0)])),_:1},8,["columns","data-source","scroll","onChange","pagination"])],512)])])]),(0,a.Wm)(z,{ref:"historyDetail",groupDetails:e.groupDetails,collectionName:e.collectionName},null,8,["groupDetails","collectionName"]),(0,a.Wm)(L,{class:"rename_modal_component",visible:e.renameVisivle,"onUpdate:visible":t[7]||(t[7]=t=>e.renameVisivle=t),footer:null,title:e.renameData?.name,keyboard:!1,width:"56rem",maskClosable:!1,centered:!0},{default:(0,a.w5)((()=>[(0,a._)("div",b,[(0,a._)("div",f,[(0,a.wy)((0,a._)("input",{class:"rename_form_input",placeholder:e.$t("HistoryPage.inputContent2"),"onUpdate:modelValue":t[4]||(t[4]=t=>e.newCollectionName=t),onKeydown:t[5]||(t[5]=(0,s.D2)((t=>e.confrimRename()),["enter"]))},null,40,N),[[s.nr,e.newCollectionName]])]),(0,a._)("div",{class:"rename_submit_button",onClick:t[6]||(t[6]=t=>e.confrimRename())},(0,o.zw)(e.$t("HistoryPage.Submit")),1)])])),_:1},8,["visible","title"]),(0,a.Wm)($)])}var T=i(2262),S=i(2307);const x=(0,a._)("span",{class:"icon iconfont icon-guanbi"},null,-1),z=[x],L={class:"history_detail_content scroll_style"},$={class:"history_img_item"},U=["src"];function Z(e,t,i,o,l,n){const r=(0,a.up)("a-modal");return(0,a.wg)(),(0,a.j4)(r,{class:"hsitory_detail_modal_component",visible:e.hsitoryDetailShow,"onUpdate:visible":t[1]||(t[1]=t=>e.hsitoryDetailShow=t),footer:null,title:e.collectionName,width:"80%",maskClosable:!1,keyboard:!1,centered:!0},{closeIcon:(0,a.w5)((()=>[(0,a._)("div",{class:"close_icon",onClick:t[0]||(t[0]=(0,s.iM)((t=>e.changeDetailShow()),["stop"]))},z)])),default:(0,a.w5)((()=>[(0,a._)("div",L,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.groupDetails,(e=>((0,a.wg)(),(0,a.iD)("div",{class:"history_img_block",key:e},[(0,a._)("div",$,[(0,a._)("img",{class:"element_img",src:e.url},null,8,U)])])))),128))])])),_:1},8,["visible","title"])}var Y=(0,a.aZ)({props:{groupDetails:{default:{}},collectionName:{default:""}},setup(){},data(){return{hsitoryDetailShow:!1}},methods:{changeDetailShow(){this.hsitoryDetailShow=!this.hsitoryDetailShow}}}),G=i(3744);const I=(0,G.Z)(Y,[["render",Z]]);var R=I,W=i(6214),Q=i(7332),M=i(1446),O=i(327),j=i(9206),F=i(8302),K=i(8552),q=(0,a.aZ)({components:{HeaderComponent:S.Z,HistoryDetail:R,RobotAssist:j.Z},setup(){let e=(0,T.iH)([]),t=(0,T.iH)({});const i=(0,a.Fl)((()=>[{title:(0,K.QT)().t("HistoryPage.CollectionsName"),align:"center",ellipsis:!0,width:150,dataIndex:"name",key:"collectionName"},{title:(0,K.QT)().t("HistoryPage.UptateTime"),align:"center",ellipsis:!0,width:150,dataIndex:"updateDate",key:"updateTime",customRender:e=>{let t=(0,Q.mr)(e.text/1e3,"YYYY-MM-DD hh:mm:ss");return t}},{title:(0,K.QT)().t("HistoryPage.SketchCounts"),align:"center",ellipsis:!0,width:150,dataIndex:"sketchCount",key:"sketchCounts"},{title:(0,K.QT)().t("HistoryPage.Operations"),key:"operation",align:"center",fixed:"right",width:150,Operations:!0}]));let o=(0,T.iH)([]),{t:s}=(0,K.QT)();return{rangePickerValue:e,columns:i,collectionList:o,renameData:t,t:s}},data(){return{currentPage:1,pageSize:10,total:0,historyTableHeight:0,newCollectionName:"",renameVisivle:!1,groupDetails:{},collectionName:"",searchCollectionName:""}},mounted(){let e=this.$refs.historyTable;this.historyTableHeight=e.clientHeight-130,this.getHistoryList()},methods:{turnToDetail(e){this.groupDetails=e.groupDetails;let t=this.$refs.historyDetail;this.collectionName=e.name,t.changeDetailShow()},changePage(e){this.currentPage=e.current,this.pageSize=e.pageSize,this.getHistoryList()},searchHistoryList(){this.currentPage=1,this.getHistoryList()},getHistoryList(){let e=this.rangePickerValue?new Date(this.rangePickerValue[0]).getTime():"",t=this.rangePickerValue?new Date(this.rangePickerValue[1]).getTime():"",i={page:this.currentPage,size:this.pageSize,collectionName:this.searchCollectionName,startDate:e,endDate:t};W.V.axiosPost(W.V.httpUrls.queryUserGroup,i).then((e=>{this.collectionList=e.content,this.total=e.total}))},deleteGroup(e,t){let i=(e,t)=>{let i={userGroupId:e};W.V.axiosPost(W.V.httpUrls.deleteUserGroup,i).then((e=>{M.ZP.success(this.t("HistoryPage.jsContent1")),this.collectionList.splice(t,1)}))};O.Z.confirm({title:this.t("HistoryPage.jsContent2"),icon:(0,a.Wm)(F.Z),okText:"Yes",cancelText:"No",centered:!0,mask:!1,onOk(){i(e.id,t)}})},renameCollection(e,t){this.renameVisivle=!0,this.renameData={...e,index:t}},confrimRename(){let e={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,userGroupId:this.renameData.id,userGroupName:this.newCollectionName};W.V.axiosPost(W.V.httpUrls.updateUserGroupName,e).then((e=>{M.ZP.success(this.t("HistoryPage.jsContent3")),this.collectionList[this.renameData.index].name=this.newCollectionName,this.collectionList[this.renameData.index].updateDate=e.updateDate,this.renameVisivle=!1,this.newCollectionName="",this.renameData={}}))},retrieveHome(e){this.$router.push({name:"home",params:{id:e.id}})}}});const A=(0,G.Z)(q,[["render",V]]);var E=A}}]);