Commit 09fe2d28 authored by zhengke's avatar zhengke

Merge branch '1.2.0' of http://gitlab.oytour.com/viitto/pptist into 1.2.0

parents 7ee093cc c6067e8b
......@@ -45,6 +45,7 @@ declare module 'vue' {
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
......
......@@ -197,5 +197,10 @@ class ConfigService{
static async UpdateShareAsync(params:{ShareId:number,ShareTargetIds:string,EditType:string}):Promise<HttpResponse>{
return Api.Post("triptemplate_EditTripShare",params)
}
static async SearchFileAsync(params:{FileType:number,FileName:string,pageSize:number, [key: string]: any}):Promise<HttpResponse>{
params.pageIndex=1
return Api.Post("triptemplate_HomeQuery",params)
}
}
export default ConfigService;
\ No newline at end of file
......@@ -56,4 +56,44 @@ export const getDaysBetween = (date1:any, date2:any) => {
const difference = Math.abs(date1Time - date2Time); // 获取时间差
return Math.round(difference / ONE_DAY); // 两个日期之间的天数
}
export const formatDateTimeToRead = (dateStr:string,prefix:string='') =>{
console.log(dateStr)
let minute = 1000 * 60;
let hour = minute * 60;
let day = hour * 24;
let halfamonth = day * 15;
let month = day * 30;
let dateTimeStamp = Date.parse(dateStr.replaceAll('-',"/"))
let result = ''
let now = new Date().getTime();
let diffValue = now - dateTimeStamp;
if(diffValue < 0){
//若日期不符则弹出窗口告之
//alert("结束日期不能小于开始日期!");
return ''
}
let monthC =diffValue/month;
let weekC =diffValue/(7*day);
let dayC =diffValue/day;
let hourC =diffValue/hour;
let minC =diffValue/minute;
if(monthC>=1){
result=parseInt(monthC.toString()) + "月前";
}
else if(weekC>=1){
result=parseInt(weekC.toString()) + "周前";
}
else if(dayC>=1){
result=parseInt(dayC.toString()) +"天前";
}
else if(hourC>=1){
result=parseInt(hourC.toString()) +"小时前";
}
else if(minC>=1){
result=parseInt(minC.toString()) +"分钟前";
}else
result= "刚刚";
return prefix+result;
}
\ No newline at end of file
......@@ -98,13 +98,6 @@ import { useSellTemplateStore, useScreenStore, useSlidesStore } from '@/store'
const {userInfo} = storeToRefs(userStore())
const currentMenu = ref<number>(0)
// const datas = reactive({
// journeyAds:{
// RefreshLoading: false
// }
// })
// provide('journeyAds',datas.journeyAds)
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
if(searchData.value.SellTemplateType){
......@@ -123,6 +116,10 @@ const sellAdd = (type:number) =>{
marketStore.setMarket(true)
}
const openFilePosition = (playload:{FileId:number,FileType:1|2,Position:{FileId:number,FileName:string}[]})=>{
}
const setCurrentMenuHandler=(i:number)=>{
currentMenu.value=i
searchData.value.currentMenu=i
......
......@@ -138,7 +138,7 @@
v-if="item.editTitle"
@blur="handleUpdateTitle(item)"
/></td>
<td class="text-center" @click.stop="item.FileType?OffEdit():editDelete(item,2)"><span>{{item.Day?item.Day+'天前':item.UpdateTime}}</span></td>
<td class="text-center" @click.stop="item.FileType?OffEdit():editDelete(item,2)"><span>{{formatDateTimeToRead(item.UpdateTime&&item.UpdateTime!=''?item.UpdateTime:item.CreateTime)}}</span></td>
<td class="text-center" @click.stop="item.FileType?OffEdit():editDelete(item,2)"><span>{{item.CreateName}}</span></td>
<td class="text-center">
<div class="hoverShow row items-center just-center q-pt-sm">
......@@ -229,13 +229,13 @@
@close="() => {journeyAdsDetails = '';isCopyTo=false}"></CopyFile>
</template>
<script setup lang="ts">
import { ref, reactive, provide, watch, inject, onMounted } from "vue";
import { ref, reactive, provide, watch, inject, onMounted, PropType } from "vue";
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
import { MoreFilled, Edit, ArrowLeft,CopyDocument,DCaret,CaretTop,CaretBottom } from "@element-plus/icons-vue";
import ConfigService from "@/services/ConfigService";
import FolderService from "@/services/FolderService";
import { injectKeyTemplate } from "@/types/injectKey";
import { getDaysBetween } from "@/utils/common";
import { getDaysBetween,formatDateTimeToRead } from "@/utils/common";
import { useSellTemplateStore, useScreenStore, useSlidesStore } from "@/store";
import ShareForm from "./ShareForm.vue";
import Folder from "./Folder.vue";
......@@ -251,6 +251,10 @@ const props = defineProps({
type: Number,
default: 3,
},
Position:{
type:Object as PropType<{FileId:number,FileType:1|2,Position:{FileId:number,FileName:string}[]}|null>,
default:null
}
});
const PopoverVisibleControls = ref(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment