Merge branch 'master' into feature-creative-center

This commit is contained in:
wanganmao
2022-10-11 17:52:11 +08:00
19 changed files with 124 additions and 67 deletions

View File

@@ -6,6 +6,7 @@
"lint": "vue-cli-service lint",
"serve": "vue-cli-service serve --mode dev",
"dev": "vue-cli-service serve --mode dev",
"uat": "vue-cli-service serve --mode uat",
"build_uat": "vue-cli-service build --mode uat",
"build_prod": "vue-cli-service build --mode prod"
},

View File

@@ -107,8 +107,7 @@
</div>
</a-modal>
<!-- 下载中心 -->
<DownloadCenter v-model:visible="downloadVisible"
v-if="downloadVisible"></DownloadCenter>
<DownloadCenter v-model:visible="downloadVisible" v-if="downloadVisible"></DownloadCenter>
</template>
<script setup>
@@ -314,12 +313,15 @@ const clickEntrance = () => {
};
const groupInfo = ref(null);
const downloadVisible = ref(false);
const downloadVisible = computed(() => {
return store.state.downloadCenter.isShow;
});
// 下载中心
const toDownload = () => {
console.log("下载中心");
store.dispatch('downloadCenter/changeCenterUrl', route.path)
downloadVisible.value = true
// downloadVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path: route.path, sn },

View File

@@ -1,15 +1,18 @@
export default {
namespaced: true,
state: {
// 返回的路径
centerUrl: '',
namespaced: true,
state: {
// 返回的路径
centerUrl: '',
isShow: false,
},
getters: {},
mutations: {},
actions: {
changeCenterUrl ({ state }, url) {
state.centerUrl = url
},
getters: {},
mutations: {},
actions: {
changeCenterUrl ({ state }, url) {
state.centerUrl = url
},
changeCenterShow ({ state }, val) {
state.isShow = val
},
};
},
};

View File

@@ -64,7 +64,7 @@ export default {
data.project_id =1
return request({
url: `${pubUrl}/rp_lottery_logs/${data.log_id}/invalidPrizes`,
method: "post",
method: "PUT",
data,
});
},

View File

@@ -62,7 +62,8 @@ const download = async () => {
// 下载中心
addDownloadCenter(props.sn,params).then(res=>{
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadVisible.value = true
// downloadVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
shown.value = false;
// router.push({
// path: "/downloadCenter",

View File

@@ -75,7 +75,8 @@ function downloadCenter() {
let data ={ download_type: '3', question_index:question_index.value }
addDownloadCenter(props.sn,data).then(res=>{
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadVisible.value = true
// downloadVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path:route.path,sn:props.sn },

View File

@@ -180,7 +180,8 @@
addDownloadCenter(sn.value,data).then(res=>{
// 下载中心
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadCenterVisible.value = true
// downloadCenterVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path:route.path,sn:sn.value },

View File

@@ -442,7 +442,8 @@
let data ={ download_type: '1', ...subData }
addDownloadCenter(sn,data).then(res=>{
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadVisible.value = true
// downloadVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path:route.path,sn },

View File

@@ -235,7 +235,8 @@ setup(props) {
let data ={ download_type: '6', ids }
addDownloadCenter(sn,data).then(res=>{
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadVisible.value = true
// downloadVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path:route.path,sn },

View File

@@ -28,7 +28,7 @@
<vxe-column min-width="80" v-for="(children,children_index) in columnsDateItem.child" :key="'children'+children_index" :title="children.title" :field="children.key"></vxe-column>
</vxe-colgroup>
</vxe-table>
<Charts :index="index" :ref="el=>unitCharts.push(el)" :radioArr="item.header" :y_total_data="item.y_total_data" :x_data="item.x_data" :y_data="item.y_data" :pie_chart_data="item.pie_chart_data"></Charts>
<Charts :index="index" :ref="el=>unitCharts.push(el)" :radioArr="item.header" :y_total_data="item.y_total_data" :x_data="item.x_data" :y_data="item.y_data" :pie_chart_data="item.pie_chart_data"></Charts>
</template>
</div>
<div class="dra-btn">

View File

@@ -17,8 +17,15 @@ import { defineComponent, ref, onMounted, computed, watch } from 'vue';
import * as echarts from 'echarts'
import * as cheerio from 'cheerio';
import { markRaw } from 'vue'
// 获取当前时间 年月日时分
const getNowTime = ()=> {
const yy = new Date().getFullYear()
const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1)
const dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
// const HH = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours()
// const mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
return yy + '' + MM + '' + dd + ''
}
const option = {
tooltip: {
trigger: 'axis',
@@ -34,7 +41,8 @@ const option = {
iconStyle: {
textPadding: [0, 36, 5, 5]
}
}
},
name: '交叉分析图表' + '_' + getNowTime(),
}
},
},
@@ -98,7 +106,8 @@ const pieOption = {
iconStyle: {
textPadding: [0, 36, 5, 5]
}
}
},
name: '交叉分析图表' + '_' + getNowTime(),
}
},
},

View File

@@ -16,7 +16,15 @@ import { defineComponent, ref, onMounted, computed, watch } from 'vue';
import * as echarts from 'echarts'
import * as cheerio from 'cheerio';
import { markRaw } from 'vue'
// 获取当前时间 年月日时分
const getNowTime = ()=> {
const yy = new Date().getFullYear()
const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1)
const dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
// const HH = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours()
// const mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
return yy + '' + MM + '' + dd + ''
}
const option = {
tooltip: {
trigger: 'axis',
@@ -32,7 +40,8 @@ const option = {
iconStyle: {
textPadding: [0, 36, 5, 5]
}
}
},
name: '交叉分析图表' + '_' + getNowTime(),
}
},
},
@@ -99,7 +108,8 @@ const pieOption = {
iconStyle: {
textPadding: [0, 36, 5, 5]
}
}
},
name: '交叉分析图表' + '_' + getNowTime()
}
},
},
@@ -211,9 +221,10 @@ export default defineComponent({
font = _name[_name.length-1]
}
if(imgUrl){
font =text+`(${imgUrl})`
// font =text+`(${imgUrl})`
font =text+'[图片]'
}
// console.log(font);
// console.log('font',font);
return font
}
return str

View File

@@ -3,12 +3,14 @@
v-model:visible="shown"
:footer="null"
width="60%">
<div class="arrow-container-prev">
<i class="iconfont icon-xiangzuo-zhihui" @click="handlePrev"></i>
</div>
<DiagramItem v-if="shown" :data="source" :is-full="true" :sn="sn" :tableSearchInfo="tableSearchInfo"></DiagramItem>
<div class="arrow-container-next">
<i class="iconfont icon-xiangyou-zhihui" @click="handleNext"></i>
<div style="margin:15px">
<div class="arrow-container-prev">
<i class="iconfont icon-xiangzuo-zhihui" @click="handlePrev"></i>
</div>
<DiagramItem v-if="shown" :data="source" :is-full="true" :sn="sn" :tableSearchInfo="tableSearchInfo"></DiagramItem>
<div class="arrow-container-next">
<i class="iconfont icon-xiangyou-zhihui" @click="handleNext"></i>
</div>
</div>
</a-modal>
</template>

View File

@@ -133,7 +133,7 @@ function exportData() {
const colums = isSpecial ? [] :tableInstance.value.columns
const data = isSpecial ? [] : tableInstance.value.data
const html = generatorTable(imageUrl, colums, data);
const html = generatorTable(imageUrl, colums, data, props.data);
const title = `${props.data.title}_数据详情表_${getDateName()}`;
exportChart(props.sn,{
html,

View File

@@ -1,4 +1,4 @@
export default function (imgUrl, columns, data) {
export default function (imgUrl, columns, data, propsData) {
const str = []
@@ -22,6 +22,9 @@ export default function (imgUrl, columns, data) {
})
return arr
})
if(propsData.stem||propsData.title) {
str.push(`<div style="font-size: 18px;">${propsData.title}:${propsData.stem}</div>`)
}
if(imgUrl) {
str.push(`<img src="${imgUrl}"/>`)
}

View File

@@ -174,6 +174,7 @@ function getDiagramData() {
spinning.value = true;
return getDiagramAnalysis(sn, params)
.then((res) => {
console.log('res',res);
const _total = +res.meta.total || 0;
total.value = _total
per_page.value = res.meta.per_page;
@@ -424,4 +425,13 @@ onMounted(async () => {
color: #70b936;
font-size: 14px;
}
//设置图标颜色
.el-loading-spinner .path{
stroke: #70b936;
}
//设置文字颜色
.el-loading-spinner .el-loading-text{
color: #70b936;
}
</style>

View File

@@ -112,7 +112,8 @@ export default defineComponent({
}
addDownloadCenter(props.sn,data).then(res=>{
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadVisible.value = true
// downloadVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path:route.path,sn:props.sn },

View File

@@ -506,7 +506,8 @@
addDownloadCenter(sn,data).then(res=>{
// 下载中心
store.dispatch('downloadCenter/changeCenterUrl',route.path)
downloadCenterVisible.value = true
// downloadCenterVisible.value = true
store.dispatch('downloadCenter/changeCenterShow',true)
// router.push({
// path: "/downloadCenter",
// query: { path:route.path,sn },

View File

@@ -1,14 +1,14 @@
<template>
<div>
<a-modal v-model:visible="shown" title="下载中心" :destroyOnClose="true" :footer="null" width="100%" wrapClassName="full-modal">
<div class="download">
<!-- <a-modal v-model:visible="shown" title="下载中心" :destroyOnClose="true" :footer="null" width="100%" wrapClassName="full-modal"> -->
<div class="layout">
<!-- 头部导航栏 -->
<!-- <div class="header">
<div class="header">
<div @click="quitDownload" class="icon-left">
<i class="iconfont">&#xe6c0;</i>
<span class="icon-span">退出下载中心</span>
</div>
</div> -->
</div>
<div class="content">
<div class="left">
@@ -19,7 +19,7 @@
</div>
</div>
</div>
</a-modal>
<!-- </a-modal> -->
</div>
</template>
<script>
@@ -47,7 +47,10 @@ export default defineComponent({
const shown = ref(true)
// 退出预览
const quitDownload = ()=> {
proxy.$router.back();
// proxy.$router.back();
// shown.value = false
// window.history.go(-1)
store.dispatch('downloadCenter/changeCenterShow',false)
}
const activeDroupId = ref(0)
function changeGroup(id) {
@@ -89,6 +92,12 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.download {
position: absolute;
top: 0;
left: 0;
z-index: 100;
}
.layout {
// min-width: 1200px;
// background-color: #f5f5f5;
@@ -120,10 +129,10 @@ export default defineComponent({
}
.content {
// padding: 24px;
height: calc(100vh - 110px);
padding: 24px;
height: calc(100vh - 70px);
display: flex;
// background-color: #F5F5F5;
background-color: #F5F5F5;
}
.left {
width: 230px;
@@ -136,20 +145,20 @@ export default defineComponent({
}
</style>
<style lang="scss">
.full-modal {
.ant-modal {
max-width: 100%;
top: 0;
padding-bottom: 0;
margin: 0;
}
.ant-modal-content {
display: flex;
flex-direction: column;
height: calc(100vh);
}
.ant-modal-body {
flex: 1;
}
}
// .full-modal {
// .ant-modal {
// max-width: 100%;
// top: 0;
// padding-bottom: 0;
// margin: 0;
// }
// .ant-modal-content {
// display: flex;
// flex-direction: column;
// height: calc(100vh);
// }
// .ant-modal-body {
// flex: 1;
// }
// }
</style>