Commit 1d38186e authored by 罗超's avatar 罗超

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

parents dbca814a 907add6f
......@@ -27,7 +27,11 @@ export const ResolveThumbHandler = async (psd:any)=>{
return imgs
}
export const generateUniqueId = () => {
const timestamp = new Date().getTime()
const randomNum = Math.floor(Math.random() * 1000)
return '-' +timestamp + '-' + randomNum
}
export const ResolvePsdToSliderHandler = async (psd:any) => {
const { slides } = storeToRefs(useSlidesStore())
const ID_PREV = "import-slide-"
......@@ -39,9 +43,10 @@ export const ResolvePsdToSliderHandler = async (psd:any) => {
for (let i = 0; i < items.length; i++) {
const x = items[i];
let randomNum = Math.floor(Math.random()*100)+i
// let t =CreateDefaultSlider(ID_PREV+i)
let t =CreateDefaultSlider(ID_PREV+randomNum)
// let randomNum = Math.floor(Math.random()*100)+i
// let t =CreateDefaultSlider(ID_PREV+randomNum)
let t =CreateDefaultSlider(ID_PREV+i+generateUniqueId())
t.isTripItems=x.name.indexOf('trip_item')!=-1
const {_children} = x
......
......@@ -452,10 +452,12 @@ const GetTripTemplate = async () =>{
let existId = IDs.findIndex(y=>{ y==x.id }) == -1
if(existId) IDs.push(x.id)
else {
let id = Math.floor(Math.random() * newSlides.length)//Math.floor(Math.random())+index
x.id = `${ids[0]}-${ids[1]}-${id}`
//Math.floor(Math.random() * newSlides.length)
//Math.floor(Math.random())+index
let id = generateUniqueId()
x.id = `${ids[0]}-${ids[1]}${id}`
}
console.log(existId,x.id,'----newSlides ID')
console.log(existId,'-----',x.id,'----newSlides ID')
x.elements.forEach(y=>{
if(x.pageType!=1&&y.TemplateDataSource&&y.TemplateDataSource.index==null){
Reflect.set(y.TemplateDataSource, 'index', null)
......@@ -507,6 +509,12 @@ const GetTripTemplate = async () =>{
}
}
const generateUniqueId = () => {
const timestamp = new Date().getTime()
const randomNum = Math.floor(Math.random() * 1000)
return '-' + timestamp + '-' + randomNum
}
// 销售模版数据
const sellGetTripTemplate = async () =>{
try {
......
......@@ -55,32 +55,39 @@
</div>
</template>
</el-table-column>
<el-table-column label="" width="25" prop="">
<template #default="scope">
<span class="q-pr-sm q-pt-xs pointer" v-if="scope.row.FileType&&datas.loggedder==scope.row.CreateName&&currentMenu!=-1"
>
<el-tooltip effect="dark" v-if="scope.row.UpdateStatus">
<template #content>
<span v-if="scope.row.UpdateStatus==1||scope.row.UpdateStatus==2" @click.stop="OffEdit()">
{{scope.row.UpdateStatus==1?'同步中':scope.row.UpdateStatus==2?'同步成功':'同步失败'}}
</span>
<div v-if="scope.row.UpdateStatus==3" class="row flex-end">
<el-button type="primary" icon="Refresh" size="small"
@click.stop="OffEdit(),SynchronousUpdate(scope.row)">更新</el-button>
</div>
</template>
<el-icon @click.stop="OffEdit()">
<Clock :class="[scope.row.UpdateStatus==1?'text-info':'']" v-if="scope.row.UpdateStatus==1" />
<CircleCheck :class="[scope.row.UpdateStatus==2?'text-el-primary':'']" v-if="scope.row.UpdateStatus==2" />
<CircleClose :class="[scope.row.UpdateStatus==3?'text-waring':'']" v-if="scope.row.UpdateStatus==3" />
</el-icon>
</el-tooltip>
</span>
</template>
</el-table-column>
<el-table-column :label="datas.Title" width="150" sortable="custom" prop="CreateTime">
<template #default="scope">
{{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }}
<span @click.stop="scope.row.FileType?OffEdit():editDelete(scope.row,2)">
{{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }}
</span>
</template>
</el-table-column>
<el-table-column label="创建人" prop="" width="180" >
<template #default="scope">
<span class="row items-center">
<span class="q-pr-sm q-pt-xs pointer" v-if="scope.row.FileType&&datas.loggedder==scope.row.CreateName&&currentMenu!=-1">
<el-tooltip effect="dark" v-if="scope.row.UpdateStatus">
<template #content>
<span v-if="scope.row.UpdateStatus==1||scope.row.UpdateStatus==2">
{{scope.row.UpdateStatus==1?'同步中':scope.row.UpdateStatus==2?'同步成功':'同步失败'}}
</span>
<div v-if="scope.row.UpdateStatus==3" class="row flex-end">
<el-button type="primary" icon="Refresh" size="small"
@click.stop="SynchronousUpdate(scope.row)">更新</el-button>
</div>
</template>
<el-icon>
<Clock :class="[scope.row.UpdateStatus==1?'text-info':'']" v-if="scope.row.UpdateStatus==1" />
<CircleCheck :class="[scope.row.UpdateStatus==2?'text-el-primary':'']" v-if="scope.row.UpdateStatus==2" />
<CircleClose :class="[scope.row.UpdateStatus==3?'text-waring':'']" v-if="scope.row.UpdateStatus==3" />
</el-icon>
</el-tooltip>
</span>
<span class="row items-center" @click.stop="scope.row.FileType?OffEdit():editDelete(scope.row,2)">
<span>{{scope.row.CreateName}}</span>
<span class="text-info q-pl-sm" v-if="datas.loggedder!=scope.row.CreateName"> 分享的</span>
</span>
......
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