Commit ff54896a authored by 罗超's avatar 罗超

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

parents f57f8dc9 eb9d94c1
<template>
<div v-if="isFinish" style="height: 100%;">
<div v-if="isFinish" style="height: 100vh;overflow: auto;background: rgb(243, 246, 251);">
<Screen v-if="screening" />
<Market v-else-if="market"></Market>
<Editor v-else-if="_isPC" />
......@@ -43,19 +43,31 @@ if (process.env.NODE_ENV === 'production') {
const userLoginHandler = async ()=>{
let param = query()
let userId = 1
let ConfigId = 0
let ConfigId = 0 // 9117
let model = 1
if(param.uid) userId=parseInt(param.uid)
if(ConfigId) ConfigIdStore.setConfigId(ConfigId)
if(model) modelStore.setModel(model)
if(param.ConfigId) ConfigId=parseInt(param.ConfigId)
if(param.model) model=parseInt(param.model)
ConfigIdStore.setConfigId(ConfigId)
modelStore.setModel(model)
try {
await userStore().setUserLoginAsync(userId)
} catch (error) {
}
isFinish.value=true
if(!ConfigId&&!model) ElMessageBox.confirm(
'当前没有权限进行任何操作,请联系管理员!',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {})
.catch(() => {})
}
userLoginHandler()
......
......@@ -63,9 +63,20 @@
<div class="menu-item" v-tooltip="'导出'" @click="setDialogForExport('pptx')">
<IconDownload class="icon" />
</div>
<el-button v-tooltip="'保存'" type="danger"
<!-- <el-button type="danger" v-tooltip="'保存'"
size="small" icon="Check" circle :loading="datas.loading"
@click="setTemplate()" style="color: #ffff;"></el-button>
@click="setTemplate()" style="color: #ffff;"></el-button> -->
<el-button type="danger"
v-if="(userInfo.IsEditTripTemplate==1&&model)||ConfigId>0"
size="small" :loading="datas.loading"
@click="setTemplate()" style="color: #ffff;margin-left: 10px;">
<template v-if="userInfo.IsEditTripTemplate==1&&model">
保存模版
</template>
<template v-if="ConfigId>0">
保存行程
</template>
</el-button>
<!-- <a class="github-link" href="https://github.com/pipipi-pikachu/PPTist" target="_blank">
<div class="menu-item"><IconGithub class="icon" /></div>
</a> -->
......
......@@ -77,6 +77,30 @@
</el-select>
</div>
</template>
<p class="q-mt-md"><span class="Required q-mr-md"></span>标签:</p>
<div class="row wrap q-mt-md">
<el-tag
v-for="tag in dynamicTags"
:key="tag"
class="mx-1 q-mr-md q-mb-md"
closable
:disable-transitions="false"
@close="handleClose(tag)">
{{ tag }}
</el-tag>
<el-input
v-if="inputVisible"
ref="InputRef"
v-model="inputValue"
class="ml-1 w-20"
size="small"
@keyup.enter="handleInputConfirm"
@blur="handleInputConfirm"
/>
<el-button v-else class="button-new-tag ml-1" size="small" @click="showInput">
+ 添加标签
</el-button>
</div>
<p class="q-mt-md"><span class="Required q-mr-md">*</span>选择颜色:</p>
<div class="row wrap q-mt-md">
<el-select v-model="queryObj.ColorStr" class="m-2" placeholder="请选择颜色"
......@@ -105,8 +129,10 @@
</template>
<script lang="ts" setup>
import { computed, ref, reactive, watch, inject } from 'vue'
import { computed, ref, reactive, watch, inject, nextTick } from 'vue'
import { storeToRefs } from 'pinia'
import { ElInput } from 'element-plus'
import { useMainStore, useSlidesStore, useScreenStore } from '@/store'
import LineService from '@/services/LineService'
import ConfigService from '@/services/ConfigService'
......@@ -115,7 +141,7 @@
const datas = reactive({
DataSource:{},
CountryValue: null
CountryValue: null,
})
const dispositionObj = ref({} as any)
const queryObj = ref({} as any)
......@@ -125,6 +151,14 @@
const Series = ref([] as Array < any > ) //系列
const cursors = [] as Array<any>
const inputValue = ref('')
const dynamicTags = ref([])
const inputVisible = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
if(queryObj.value.TagJsonStr!=''){
dynamicTags.value = queryObj.value.TagJsonStr.split(',')
}
const slidesStore = useSlidesStore()
const { slides, slideIndex } = storeToRefs(slidesStore)
......@@ -145,6 +179,27 @@
slidesStore.setSlides(newSlides)
})
const showInput = () => {
inputVisible.value = true
nextTick(() => {
InputRef.value.input.focus()
})
}
const handleClose = (tag: string) => {
dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1)
queryObj.value.TagJsonStr = dynamicTags.value.join(',')
}
const handleInputConfirm = () => {
if (inputValue.value) {
dynamicTags.value.push(inputValue.value)
}
queryObj.value.TagJsonStr = dynamicTags.value.join(',')
inputVisible.value = false
inputValue.value = ''
}
const setDialogForExport = (type: DialogForExportTypes) => {
mainStore.setDialogForExport(type)
mainMenuVisible.value = false
......
......@@ -70,6 +70,7 @@ const datas = reactive({
ColorName: '',//颜色名称 是 [string]
ColorStr: null,//颜色值 是 [string]
TempType: 1,// 版面类型(1-横版,2-竖版)
TagJsonStr: '',// 标签
}
},
......
......@@ -64,21 +64,30 @@
</div>
</div>
</div>
<div style="height: 750px;overflow: auto;" v-loading="loading">
<div style="margin-top: 20px;" v-loading="loading">
<div v-if="dataList.length>0" class="q-mt-lg row wrap bg-white rounded" style="padding: 30px 10px 0 10px;">
<template v-for="(item,index) in dataList">
<div class="MarketIndexListBox">
<div class="MarketIndexList bg-white rounded" @click="goToTemplate(item)">
<div class="MarketIndexList-img">
<img :src="item.CoverImg" style="width:100%;height:100%" />
<el-popover effect="light" trigger="hover" placement="bottom-start" width="auto" height="auto">
<template #default>
<LayoutPool v-loading="queryObj.loading" />
</template>
<template #reference>
<div class="MarketIndexListBox">
<div class="MarketIndexList bg-white rounded" @click="goToTemplate(item)"
@mouseover="getTemplate(item)">
<div class="MarketIndexList-img">
<el-image style="width: 100%;height: 100%" :src="item.CoverImg" fit="cover" />
<!-- <img :src="item.CoverImg" style="height:100%"/> -->
</div>
<div class="MarketIndexList-text">{{item.Title}}</div>
</div>
</div>
<div class="MarketIndexList-text">{{item.Title}}</div>
</div>
</div>
</template>
</el-popover>
</template>
</div>
<div v-else class="q-mt-lg bg-white rounded" style="padding: 30px 10px 30px 10px;text-align: center;color: #909399;">暂无数据</div>
<div v-if="dataList.length>0" class="q-mt-lg row" style="justify-content: center;">
<div v-if="dataList.length>0" class="q-mt-lg row" style="justify-content: center;margin-bottom: 40px">
<!-- hide-on-single-page -->
<el-pagination
background
......@@ -102,10 +111,13 @@
import LineService from '@/services/LineService'
import ConfigService from '@/services/ConfigService'
import { userStore } from "@/store/user";
import { useSlidesStore } from '@/store'
import { useScreenStore } from "@/store/screen";
import { storeToRefs } from "pinia";
import { injectKeyTemplate } from '@/types/injectKey'
import LayoutPool from '../Editor/Thumbnails/LayoutPool.vue'
const {
userInfo
} = storeToRefs(userStore())
......@@ -126,6 +138,7 @@
ColorName: '', //颜色名称
totalCount: 0, //总调试
pageCount: 0, //总页数
loading: false,
})
const loading = ref(false as any)
......@@ -133,10 +146,37 @@
searchData.value = inject(injectKeyTemplate)
const marketStore = useScreenStore()
const isModelStore = useScreenStore()
const layoutsStore = useSlidesStore()
const { screening, market, model, isModel, ConfigId} = storeToRefs(useScreenStore())
const addTemplate = () => {
marketStore.setMarket(!market)
// 查看所有子模版
const getTemplate = async (item) => {
queryObj.loading = true
layoutsStore.setLayouts([])
try {
let queryMsg = {
TempId: item.TempId
}
let dataRes = await ConfigService.GetTripTemplateSlide(queryMsg);
if (dataRes.data.resultCode == 1) {
let SlidesData = JSON.parse(dataRes.data.data.TempData)
let newSlides = []
if(typeof SlidesData=='object'&&!SlidesData.length){
let obj = {
pageType: 1,
...SlidesData
}
newSlides.push(obj)
}else if(SlidesData.length>0){
newSlides = SlidesData
}
layoutsStore.setLayouts(JSON.parse(JSON.stringify(newSlides)))
queryObj.loading = false
}
} catch (error) {
console.log("GetTripTemplateSlide", error);
queryObj.loading = false
}
}
/**
......@@ -302,22 +342,22 @@
box-shadow: 0 5px 6px -3px #0003, 0 9px 12px 1px #00000024, 0 3px 16px 2px #0000001f;
}
.MarketIndexList-img{
position: relative;
/* position: relative; */
width: 100%;
height: 0;
padding-top: 100%;
height: 252px;
/* padding-top: 100%; */
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
overflow: hidden;
/* border-bo: 1px solid #eeee; */
}
.MarketIndexList-img img{
position: absolute;
/* position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
height: 100%; */
}
.MarketIndexList-text{
font-size: 14px;
......
This diff is collapsed.
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