Commit 36beee45 by web

Merge branch 'master' of http://git.jimijiayuan.cn/jml0128/xrk-bi into feature/照片墙

2 parents 2c59f546 84f7e4bc
No preview for this file type
No preview for this file type
No preview for this file type
{
"name": "xrk-bi",
"version": "0.1.11",
"version": "0.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -1266,6 +1266,21 @@
"integrity": "sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=",
"dev": true
},
"axios": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
},
"dependencies": {
"follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
}
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz",
......@@ -2169,6 +2184,12 @@
"resolved": "https://registry.nlark.com/bytes/download/bytes-3.1.0.tgz",
"integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=",
"dev": true
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
"dev": true
}
}
},
......@@ -2427,7 +2448,6 @@
"version": "1.0.2",
"resolved": "https://registry.nlark.com/call-bind/download/call-bind-1.0.2.tgz",
"integrity": "sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw=",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
......@@ -4359,6 +4379,12 @@
"resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
"dev": true
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
"dev": true
}
}
},
......@@ -4884,8 +4910,7 @@
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz",
"integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=",
"dev": true
"integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0="
},
"functional-red-black-tree": {
"version": "1.0.1",
......@@ -4941,7 +4966,6 @@
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/get-intrinsic/download/get-intrinsic-1.1.1.tgz?cache=0&sync_timestamp=1612364352840&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-intrinsic%2Fdownload%2Fget-intrinsic-1.1.1.tgz",
"integrity": "sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y=",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
......@@ -5106,7 +5130,6 @@
"version": "1.0.3",
"resolved": "https://registry.nlark.com/has/download/has-1.0.3.tgz?cache=0&sync_timestamp=1618847173393&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas%2Fdownload%2Fhas-1.0.3.tgz",
"integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
"dev": true,
"requires": {
"function-bind": "^1.1.1"
}
......@@ -5135,8 +5158,7 @@
"has-symbols": {
"version": "1.0.2",
"resolved": "https://registry.nlark.com/has-symbols/download/has-symbols-1.0.2.tgz",
"integrity": "sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM=",
"dev": true
"integrity": "sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM="
},
"has-unicode": {
"version": "2.0.1",
......@@ -7845,8 +7867,7 @@
"object-inspect": {
"version": "1.10.3",
"resolved": "https://registry.nlark.com/object-inspect/download/object-inspect-1.10.3.tgz?cache=0&sync_timestamp=1620446150016&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.10.3.tgz",
"integrity": "sha1-wqp9LQn1DJk3VwT3oK3yTFeC02k=",
"dev": true
"integrity": "sha1-wqp9LQn1DJk3VwT3oK3yTFeC02k="
},
"object-is": {
"version": "1.1.5",
......@@ -9087,10 +9108,12 @@
"dev": true
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz?cache=0&sync_timestamp=1616385328325&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.7.0.tgz",
"integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=",
"dev": true
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
"integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
"requires": {
"side-channel": "^1.0.4"
}
},
"query-string": {
"version": "4.3.4",
......@@ -10041,6 +10064,16 @@
"integrity": "sha1-Z6fQLHbJ2iT5nSCAj8re0ODgS+I=",
"dev": true
},
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
}
},
"signal-exit": {
"version": "3.0.3",
"resolved": "https://registry.nlark.com/signal-exit/download/signal-exit-3.0.3.tgz",
......
{
"name": "xrk-bi",
"version": "0.2.0",
"version": "0.3.0-beta.20",
"description": "xrk-bi",
"author": "xrk",
"main": "dist/bundler.js",
......@@ -20,9 +20,11 @@
"fix": "eslint --fix ./src --ext .js,.vue "
},
"dependencies": {
"axios": "^0.26.1",
"echarts": "^5.1.2",
"element-ui": "^2.15.2",
"html2canvas": "^1.1.4",
"qs": "^6.10.3",
"swiper": "^6.7.0",
"uuid": "^8.3.2",
"vue": "^2.5.11",
......
......@@ -6,14 +6,13 @@
<template>
<div>
<XrkBi
:print="false"
:cantEdit="2"
projectType="20"
from="cso"
v-bind="config"
:getTemplateList="getTemplateList"
></XrkBi>
<component
:is="componentName"
:mobile="isMobile"
:print="isPrint"
:projectType="projectType"
></component>
<!-- <XrkTaskRecordPdf :projectType="20" :taskId="1209388" :from="1" /> -->
</div>
<!-- <ul class="pervie">
<li name="任务记录">
......@@ -37,7 +36,7 @@
<script>
import { getQueryVariable } from './packages/bi/src/chart-type/common';
// import { XrkTaskRecordPdf } from './packages/task-recored/index';
export default {
name: 'App',
data() {
......@@ -45,416 +44,8 @@ export default {
isMobile: +getQueryVariable('mobile') === 1,
isPrint: +getQueryVariable('print') === 1,
projectType: +getQueryVariable('projectType') || 6,
componentName: getQueryVariable('componentName') || 'XrkBi',
config: {
getBaseInfo() {
return {
data: {
data: [
{
styleConfigureSettlementTime: '2022-04-13',
createUserId: 11,
createFullName: '钱思远',
projectType: 20,
endDt: null,
isAuditCso: 1,
dataCollectNumber: 1,
type: 1,
title:
'关于标签演示园区个体01产品全国区域可配置场景项目数据报告',
isAuditGongye: 1,
aspEnterpriseNameWrite:
'服务商:康师傅方便面投资(中国)有限公司-乙方',
aspEnterpriseName: '康师傅方便面投资(中国)有限公司-乙方',
examinePeopleNumber: 1,
executePeopleNumber: 1,
taskSum: 1,
clickNum: null,
id: 2614,
aspNamePosition: null,
titlePosition: null,
reportId: null,
coverTemplateUrl:
'https://cdn.yxvzb.com/sunflower/invoice/1648173119057.jpeg',
isContrainGroupAnalyse: 0,
nameShowType: 3,
patternType: 12,
videoNum: null,
isContrainSingleAnalyse: 1,
createDt: 1649821497000,
coverTemplateId: 1,
enterpriseType: null,
isAuditAllince: 1,
settlementTime: '2022-04-13',
chooseTopicNum: 1,
startDt: null,
enterpriseId: null,
projectName:
'关于标签演示园区个体01产品全国区域可配置场景项目',
fenpeiId: 5636,
sendEnterpriseName: null,
projectId: 122,
styleConfigureId: 120,
styleConfigureSettlementTimePosition: null,
totalTopicNum: 1,
csoAuditUser: '孟祥龙'
}
],
message: '操作成功',
status: '1'
}
};
},
getFixedInfo() {
return {
data: {
data: [
{
resultSystem:
'项目执行总人数1人,其中男性0人,占比0%;女性1,占比100.00%',
resultUser: null,
analyseDescribe:
'执行人数1,18-30岁的男性占比0% ,女性100.00%;31-40岁的男性占比0% ,女性0%;41-50岁的男性占比0% ,女性0%;51岁以上的男性占比0% ,女性0%',
chartType: null,
colourGroup: null,
id: 465,
fixedCountInfos: [
{
id: 1753,
fixedDetaileId: 465,
num: 0,
passType: null,
genderType: '男',
ageType: null,
taskNumType: null
},
{
id: 1754,
fixedDetaileId: 465,
num: 1,
passType: null,
genderType: '女',
ageType: null,
taskNumType: null
}
],
type: 1,
createDt: 1649821497000
},
{
resultSystem:
'项目执行总人数1人,其中18-30岁的1人,占比100.00%; 31-40岁的0人,占比0%;41-50岁的0人,占比0%;50岁及其以上0人 ,占比0%',
resultUser: null,
analyseDescribe:
'执行人数1,18-30岁的男性占比0% ,女性100.00%;31-40岁的男性占比0% ,女性0%;41-50岁的男性占比0% ,女性0%;51岁以上的男性占比0% ,女性0%',
chartType: null,
colourGroup: null,
id: 466,
fixedCountInfos: [
{
id: 1755,
fixedDetaileId: 466,
num: 1,
passType: null,
genderType: '18-30岁',
ageType: null,
taskNumType: null
},
{
id: 1756,
fixedDetaileId: 466,
num: 0,
passType: null,
genderType: '31-40岁',
ageType: null,
taskNumType: null
},
{
id: 1757,
fixedDetaileId: 466,
num: 0,
passType: null,
genderType: '41-50岁',
ageType: null,
taskNumType: null
},
{
id: 1758,
fixedDetaileId: 466,
num: 0,
passType: null,
genderType: '51岁以上',
ageType: null,
taskNumType: null
}
],
type: 2,
createDt: 1649821497000
},
{
resultSystem:
'项目执行总人数1人:完成1-10单的有1人,占比100.00%;完成11-20单的有0人,占比0%;完成21-30单的有0人,占比0%;完成31-40单的有0人,占比0%;完成41单以上的有0人,占比0%',
resultUser: null,
analyseDescribe: null,
chartType: null,
colourGroup: null,
id: 467,
fixedCountInfos: [
{
id: 1759,
fixedDetaileId: 467,
num: 1,
passType: null,
genderType: '1-10',
ageType: null,
taskNumType: null
},
{
id: 1760,
fixedDetaileId: 467,
num: 0,
passType: null,
genderType: '11-20',
ageType: null,
taskNumType: null
},
{
id: 1761,
fixedDetaileId: 467,
num: 0,
passType: null,
genderType: '21-30',
ageType: null,
taskNumType: null
},
{
id: 1762,
fixedDetaileId: 467,
num: 0,
passType: null,
genderType: '31-40',
ageType: null,
taskNumType: null
},
{
id: 1763,
fixedDetaileId: 467,
num: 0,
passType: null,
genderType: '41个以上',
ageType: null,
taskNumType: null
}
],
type: 3,
createDt: 1649821497000
},
{
resultSystem:
'项目执行总任务数:0次,其中通过任务数0,占比0%;未通过任务数0,占比0%',
resultUser: null,
analyseDescribe: null,
chartType: null,
colourGroup: null,
id: 468,
fixedCountInfos: [
{
id: 1764,
fixedDetaileId: 468,
num: 0,
passType: null,
genderType: '通过',
ageType: null,
taskNumType: null
},
{
id: 1765,
fixedDetaileId: 468,
num: 0,
passType: null,
genderType: '未通过',
ageType: null,
taskNumType: null
}
],
type: 4,
createDt: 1649821497000
}
],
message: '操作成功',
status: '1'
}
};
},
getTopicInfo() {
return {
data: {
data: [
{
resultSystem:
'参与【此题为单选题(点击编辑题干)】调查的1个样本。选择答案【选项1】有1个,占比100.00%;选择答案【选项2】有0个,占比0%;选择答案【选项yyy3】有0个,占比0%;选择答案【选项4】有0个,占比0%',
resultUser: null,
isDelete: 0,
type: 1,
createDt: 1649821497000,
topicTitle: '此题为单选题(点击编辑题干)',
topicId: 1195,
showSort: null,
chartType: null,
topicCountInfos: [
{
xTopicName: '选项1',
topicDetaileId: 248,
countNum: 1,
id: 696
},
{
xTopicName: '选项2',
topicDetaileId: 248,
countNum: 0,
id: 697
},
{
xTopicName: '选项yyy3',
topicDetaileId: 248,
countNum: 0,
id: 698
},
{
xTopicName: '选项4',
topicDetaileId: 248,
countNum: 0,
id: 699
}
],
colourGroup: null,
id: 248,
resultIsShow: 1
}
],
message: '操作成功',
status: '1'
}
};
},
getGroupInfo() {
return {
data: { data: [], message: '操作成功', status: '1' }
};
},
// 获取是否含有照片题
getImageQuestionCount() {
return {
data: { data: 1, message: '操作成功', status: '1' }
};
},
// 当期BI-保持选择的图片
saveBiPicList() {
return {
data: { data: [], message: '操作成功', status: '1' }
};
},
// 当期BI-任务记录图片列表
getTaskPicList() {
return {
data: {
data: {
imageStyle: 1, //展示样式 1 流式 2平铺
imageSize: 2, //图片大小 1 大 2中 3小
taskImages: [
{
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
}
]
},
message: '操作成功',
status: '1'
}
};
},
// 累计、当期、自定义BI获取随机50张图片
getImageList() {
return {
data: {
data: {
has: true,
isDelete: 0,
imageStyle: 1, //展示样式 1 流式 2平铺
imageSize: 2, //图片大小 1 大 2中 3小
imageUrls: [
{
id: 1,
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
id: 1,
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
},
{
id: 1,
biInfoId: 123, //BI主键
taskId: 123, //任务记录ID
imageUrl:
'http://yiyang.oss-cn-beijing.aliyuncs.com/WEB/SaaS/images/2103251844.png'
}
]
},
message: '操作成功',
status: '1'
}
};
},
saveInfo() {
return null;
},
exportBi() {
return null;
}
}
componentName: getQueryVariable('componentName') || 'XrkBi'
};
},
methods: {
getTemplateList() {
return {
data: {
data: [
{
id: 2,
templateCode: null,
templateName: '2022050711',
templatePicUrl:
'https://cdn.yxvzb.com/sunflower/invoice/1651894583988.png',
status: null,
isDelete: null,
createDt: null
}
],
message: '操作成功',
status: '1'
}
};
}
}
};
</script>
......
......@@ -4,9 +4,12 @@
* @Date: 2021-01-28 23:29:19
*/
import Bi from '../packages/bi/index.js';
import XrkTaskRecord from '../packages/task-recored/index.js';
import {
XrkTaskRecord,
XrkTaskRecordPdf
} from '../packages/task-recored/index.js';
const components = [Bi, XrkTaskRecord];
const components = [Bi, XrkTaskRecord, XrkTaskRecordPdf];
const install = function(Vue) {
components.forEach(component => {
......@@ -21,5 +24,6 @@ if (typeof window !== 'undefined' && window.Vue) {
export default {
install,
Bi,
XrkTaskRecord
XrkTaskRecord,
XrkTaskRecordPdf
};
......@@ -3,7 +3,6 @@
* @Date: 2021-06-20 01:16:17
*/
export const createMap = (Vue, chartData) => {
console.log(chartData);
return {
visualMap: {
borderColor: '#fff',
......@@ -65,7 +64,6 @@ export const createMap = (Vue, chartData) => {
};
export const createMapScatter = (Vue, chartData) => {
console.log(chartData);
return {
geo: [
{
......
......@@ -119,5 +119,12 @@ export default {
sort: 1,
icon: '',
create: createMapScatter
},
// 表格
15: {
name: 'article',
cnName: '图文',
sort: 1,
icon: 'http://cdn.yxvzb.com/WEB/SaaS/images/bi/svg/biaoge.svg'
}
};
<!--
* @Description: file content
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-04-29 12:27:09
-->
<template>
<div>
<BiBlank height="40" :usePrint="true"></BiBlank>
<div class="bi-article" v-html="_content"></div>
<BiBlank height="40" :usePrint="true"></BiBlank>
</div>
</template>
<script>
import BiBlank from './blank.vue';
export default {
name: 'bi-sex-icon',
components: { BiBlank },
props: {
title: {
type: String,
default: ''
},
content: {
type: String,
default: ''
}
},
computed: {
_content() {
return `${this.content}`.replace(
/((width)="(\d+)") ((height)="(\d+)")/g,
(...a) => {
return `style="width:1000px;height:${parseInt(
(a[6] * 1000) / a[3]
)}px;"`;
}
);
}
},
data() {
return {
option: {}
};
},
created() {}
};
</script>
<style lang="scss">
.bi-article {
line-height: 1.5;
width: 1000px;
margin: 0 auto;
img,
video {
width: 100%;
height: inherit;
}
}
</style>
......@@ -93,13 +93,14 @@ export default {
this.myChart = init(document.getElementById(this.uuid));
}
const { option, myChart } = this;
const maxLength = option.series[0].data.length;
const cloneArr = [...option.series[0].data];
const f = (option.series || [])[0] || { data: [] };
const maxLength = f.data.length;
const cloneArr = [...f.data];
if (maxLength > 200) {
const setData = (_myChart, startIndex) => {
const endIndex = startIndex + 200;
if (startIndex == 0) {
option.series[0].data = cloneArr.slice(startIndex, endIndex);
f.data = cloneArr.slice(startIndex, endIndex);
_myChart.setOption(option);
} else {
_myChart.appendData({
......
......@@ -3,7 +3,7 @@
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-28 21:17:43
* @LastEditTime: 2022-04-20 15:36:43
-->
<template>
<div style="position:relative;" class="bi-chart-block">
......@@ -44,6 +44,7 @@
}"
></BiTable>
<BiSexIcon v-else-if="chart.type == 12" v-bind="chart"></BiSexIcon>
<BiArticle v-else-if="chart.type == 15" v-bind="baseInfo"></BiArticle>
<BiChart :showGuide="showGuide" v-else v-bind="chart"></BiChart>
</template>
<BiChartLegend
......@@ -78,6 +79,7 @@ import BiTable from './table.vue';
import BiSexIcon from './sex-icon.vue';
import BiChartLegend from './chart-legend.vue';
import BiChartDesc from './chart-desc.vue';
import BiArticle from './article.vue';
import BiChartChoiceMinxinToggleAxis from './chart-choice-mixin-toggle-axis.vue';
import BiChartChoiceMinxinAnalysis from './chart-choice-mixin-analysis.vue';
......@@ -89,6 +91,7 @@ export default {
BiChart,
BiTable,
BiSexIcon,
BiArticle,
BiChartDesc,
BiChartLegend,
BiChartChoiceMinxinToggleAxis,
......@@ -108,6 +111,9 @@ export default {
analysisDesc() {
return this.chartConfig.analysisDesc || {};
},
baseInfo() {
return this.chartConfig.baseInfo || {};
},
chart() {
return this.chartConfig.chart || {};
},
......
......@@ -3,7 +3,7 @@
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-28 21:34:18
* @LastEditTime: 2022-04-20 13:35:29
-->
<template>
<div :style="{ height: `${(cHeight + 80) * zoom}px`, zoom: 1 / zoom }">
......
......@@ -118,10 +118,10 @@ export default {
});
this.saving = false;
})
.catch(() => {
.catch(e => {
this.saving = false;
loading.close();
Message.error('保存失败');
Message.error(e || '保存失败');
});
}
},
......
......@@ -15,6 +15,7 @@
<div ref="print-area">
<div
class="print-item"
:class="item.className"
v-for="(item, index) in scaleDomsInfo.items"
:key="index"
:style="{
......@@ -114,6 +115,8 @@ import eventBus from '../eventBus/index';
import mixin from '../mixin/index';
import { getQueryVariable } from '../chart-type/common';
const baseHeight = 1697;
const baseScale = 1.1;
export default {
name: 'bi-single-choice',
mixins: [mixin],
......@@ -133,6 +136,7 @@ export default {
type: Array,
default: () => []
},
printInfo: Boolean,
pageWrap: Boolean,
disabled: Boolean
},
......@@ -177,80 +181,67 @@ export default {
this.drag = false;
this.$emit('sort', this.copySingleChoice);
},
getPageSize() {
const topDom = (this.$slots.default || [{}])[0].elm || {
offsetHeight: 0
};
const domArr = [
{
$el: topDom
},
...(this.$refs['bi-single-choice_item'] || []).map(item => {
let height = 0;
item.pervPage = item.$children.reduce((pre, { $el }) => {
const { offsetHeight } = $el;
if ($el.className != 'bi-blank' && !this.Bi.isPrint) {
height += offsetHeight;
}
if (height >= 1697) {
pre += 1;
height = offsetHeight;
}
return pre;
}, 0);
return item;
})
];
const pageSizeInfo = {
pervHeight: 0,
pervPage: 0,
height: 0,
page: this.pageWrap ? 0 : 1
};
const catalogueInfoArr = [];
domArr.forEach(({ $el, title, pervPage = 0 }, index) => {
const offsetHeight = $el.offsetHeight - (this.Bi.isPrint ? 0 : 56);
pageSizeInfo.height += offsetHeight;
if (this.pageWrap) {
if (index == 1) {
// 遍历到第二个时,如果存在顶部标题,则将两个高度相加(汇总标题和表格不做强制分页)
pageSizeInfo.pervHeight = offsetHeight + topDom.offsetHeight;
if (offsetHeight + topDom.offsetHeight > 1697) {
pageSizeInfo.page += 1;
}
getArticleHeight(startHeight, parentElement) {
const blankDoms = parentElement.querySelectorAll('div.bi-blank');
const titleDom = parentElement.querySelector('div.bi-chart-title');
const contentDoms = parentElement.querySelectorAll('div.bi-article>div');
const { totalHeight } = [
blankDoms[0],
titleDom,
blankDoms[1],
...contentDoms,
blankDoms[2],
blankDoms[3]
].reduce(
(pre, cur) => {
if (pre.height + cur.offsetHeight < baseHeight * baseScale) {
pre.height += cur.offsetHeight;
} else {
pageSizeInfo.page += pageSizeInfo.pervPage + 1;
pageSizeInfo.pervPage = pervPage;
pre.height = cur.offsetHeight;
pre.totalHeight +=
baseHeight * baseScale -
(pre.totalHeight % (baseHeight * baseScale));
}
} else if (pageSizeInfo.height >= 1697) {
pageSizeInfo.page += 1;
pageSizeInfo.height = offsetHeight;
pre.totalHeight += cur.offsetHeight;
return pre;
},
{
totalHeight: startHeight,
height: startHeight
}
catalogueInfoArr.push({
name: (title || {}).name,
page: pageSizeInfo.page
});
});
console.log(111, pageSizeInfo.page, catalogueInfoArr);
this.$emit('page', {
pageSize: pageSizeInfo.page,
info: catalogueInfoArr
});
);
return totalHeight;
},
dealDomForScale() {
const topDom = (this.$slots.default || [{}])[0].elm || {
offsetHeight: 0
};
const baseHeight = 1697;
const baseScale = 1.1;
const cScale = height => {
return Math.min(baseHeight / height, 1);
};
const newDom = (this.$refs['bi-single-choice_item'] || []).reduce(
(pre, cur) => {
(pre, cur, index) => {
const { $el } = cur;
const { offsetHeight } = $el;
let { offsetHeight } = $el;
let className = 'print-item';
if (cur.chart.type == 15) {
if (index == 0) {
offsetHeight = this.getArticleHeight(topDom.offsetHeight, $el);
className = 'print-item nowarp child-nowarp';
} else {
offsetHeight = this.getArticleHeight(0, $el);
pre.totalPage += 1;
className = 'print-item child-nowarp';
}
console.log(
offsetHeight,
parseInt(offsetHeight / (baseHeight * baseScale))
);
}
const domUsePage = parseInt(offsetHeight / (baseHeight * baseScale));
if (this.printInfo) {
// console.log(topDom, cur);
}
if (pre.height + offsetHeight < baseHeight * baseScale) {
// 当前dom高度加上历史高度 小于 A4纸高度的1.15倍
if (pre.height === 0) {
......@@ -271,12 +262,21 @@ export default {
pre.totalPage += Math.max(domUsePage, 1);
pre.height = offsetHeight;
pre.items.push({
className,
allHeight: offsetHeight,
scale: domUsePage === 0 ? cScale(offsetHeight) : 1,
chartConfigs: [cur.chartConfig]
});
}
// console.log(
// cur.chartConfig.title.name,
// pre.height,
// offsetHeight,
// pre.totalPage,
// domUsePage
// );
pre.catalogueInfoArr.push({
showInCatalogue: cur.chartConfig.showInCatalogue,
name: (cur.chartConfig.title || {}).name,
page: pre.totalPage - domUsePage
});
......@@ -299,13 +299,14 @@ export default {
catalogueInfoArr: []
}
);
if (this.printInfo) {
console.log(newDom);
}
this.scaleDomsInfo = newDom;
this.$emit('page', {
pageSize: newDom.totalPage,
info: newDom.catalogueInfoArr
});
console.log(newDom);
// this.$refs['print-area'].innerHTML = 'xxxx';
}
},
mounted() {
......@@ -329,6 +330,18 @@ export default {
}
};
</script>
<style lang="scss">
.print-item {
&.child-nowarp {
.bi-chart-block {
background: #fff;
& > div {
page-break-inside: inherit;
}
}
}
}
</style>
<style lang="scss" scoped>
.print-item {
......@@ -339,6 +352,9 @@ export default {
// page-break-before: auto;
// page-break-inside: avoid;
// }
&.nowarp {
page-break-before: inherit;
}
}
.bi-single-choice {
// page-break-before: always;
......
......@@ -69,10 +69,11 @@ export default {
z-index: 2;
color: #ddeeff;
font-size: 14px;
text-align: center;
text-align: left;
padding-left: 130px;
&.one {
padding-left: 60px;
padding-top: 23px;
text-align: left;
& > div {
width: inherit;
& + div {
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: jml
* @Date: 2021-02-26 15:38:10
* @LastEditTime: 2022-05-19 15:07:27
* @LastEditTime: 2022-05-19 15:25:49
-->
<template>
<div class="xrk-components-bi bi" :class="{ 'bi-print': print }">
......@@ -17,6 +17,9 @@
<BiZoneMobile v-if="mobile"></BiZoneMobile>
<BiZone v-else></BiZone>
</template>
<template v-if="projectType == 21">
<BiDigitalQuestionnaire></BiDigitalQuestionnaire>
</template>
<template v-if="projectType == 2" name="otc拜访">
<BiOtc></BiOtc>
</template>
......@@ -38,6 +41,7 @@ import BiZoneMobile from './project/6-zone-mobile.vue';
import BiOtc from './project/2-otc.vue';
import BiJcyl from './project/10-jcyl.vue';
import BiGradeHospital from './project/9-gradeHospital.vue';
import BiDigitalQuestionnaire from './project/21-digitalQuestionnaire.vue';
export default {
name: 'XrkBi',
......@@ -116,7 +120,8 @@ export default {
BiZoneMobile,
BiOtc,
BiJcyl,
BiGradeHospital
BiGradeHospital,
BiDigitalQuestionnaire
},
methods: {
setFontSize() {
......
......@@ -68,6 +68,7 @@ export const chartConfig = () => {
return {
createConfig: (arr, options = {}) => {
const {
showInCatalogue,
blockTitle,
hideTitle,
hideColor,
......@@ -122,6 +123,7 @@ export const chartConfig = () => {
);
});
return {
showInCatalogue,
isDelete: isDelete || 0,
sort: showSort || 0,
chart: {
......
......@@ -503,9 +503,16 @@ export default {
});
},
saveInfo() {
return new Promise(resolve => {
return new Promise((resolve, reject) => {
const { biInfoId, styleConfigureId } = this.biInfo;
const { content } = this.$refs['cover'];
if (
this.taskImageInfo.has &&
!this.taskImageInfo.isDelete &&
!this.taskImageInfo.imageUrls.length
) {
reject('照片墙:请删除或至少选择一张图片');
}
Promise.all([
this.Bi.saveInfo({
biInfoId: biInfoId,
......
<!--
* @Description:
* @Date: 2022-04-20 13:24:40
-->
<!--
* @Description:
* @Date: 2021-06-17 20:27:04
-->
<template>
<div class="bi-zone">
<BiCover
:coverContent="coverContent"
ref="cover"
:coverList="coverList"
:coverId="coverId"
:coverUrl="coverUrl"
@change="
({ id, templatePicUrl }) => {
coverId = id;
coverUrl = templatePicUrl;
}
"
></BiCover>
<BiCatalogue class="bi-block" :catalogueArr="catalogueArr"></BiCatalogue>
<BiOverview
class="bi-block"
name="数据报告信息"
:title="projectName"
:data="baseInfo"
></BiOverview>
<BiMission
class="bi-block"
name="项目执行人数据统计"
:data="missionData"
@page="setPage(arguments, 'page1')"
></BiMission>
<BiSingleChoice
v-if="showSingleChoiceHistory.length > 0 && answerMode != 1"
class="bi-block no-border"
:textData="textDataHistory"
:singleChoice="showSingleChoiceHistory"
:pageWrap="true"
@sort="sort(arguments, 'singleChoice', hideSingleChoiceHistory)"
@page="setPage(arguments, 'page2', 'page2Info')"
>
<BiSingleChoiceInfo
index="3"
name="专区浏览效果评价 - 历史数据分析"
:info="textDataHistory"
></BiSingleChoiceInfo>
</BiSingleChoice>
<BiSingleChoice
v-if="showSingleChoice.length > 0"
class="bi-block no-border"
:textData="textData"
:singleChoice="showSingleChoice"
:pageWrap="true"
@sort="sort(arguments, 'singleChoice', hideSingleChoice)"
@page="setPage(arguments, 'page4', 'page4Info')"
>
<BiSingleChoiceInfo
:index="answerMode == 1 ? '3' : '4'"
name="本次专区反馈效果评价"
:info="textData"
></BiSingleChoiceInfo>
</BiSingleChoice>
<BiSingleChoice
v-if="showSingleChoiceMixin.length > 0"
style="margin-top:25px;"
class="bi-block no-border"
name="推广相关问卷数据分析"
:singleChoice="showSingleChoiceMixin"
:pageWrap="true"
printInfo
@sort="sort(arguments, 'singleChoiceMixin', hideSingleChoiceMixin)"
@page="setPage(arguments, 'page3', 'page3Info')"
>
<BiSingleChoiceInfo
:index="answerMode == 1 ? '4' : '5'"
name="推广相关问卷数据分析"
></BiSingleChoiceInfo>
</BiSingleChoice>
<BiCoverEnd title="奇正藏药医学沙龙推广项目数据报告"></BiCoverEnd>
<BiOperate
:questionData="[...singleChoice, ...singleChoiceMixin]"
:saveInfo="saveInfo"
:exportBi="exportBi"
></BiOperate>
</div>
</template>
<script>
import BiSingleChoiceInfo from '../components/singleChoiceInfo.vue';
import BiCover from '../components/cover.vue';
import BiCatalogue from '../components/catalogue.vue';
import BiOverview from '../components/overview.vue';
import BiMission from '../components/mission.vue';
import BiSingleChoice from '../components/singleChoice.vue';
import BiCoverEnd from '../components/cover-end.vue';
import BiOperate from '../components/operate.vue';
import mixin from '../mixin/index';
/**
* dealSingleChoice、sort、setPage
*/
import project from '../mixin/project';
import { chartConfig } from '../mock/index';
const ChartConfigFn = chartConfig();
import { date, check } from '../chart-type/common';
import {
dealAxis,
dealLegends,
randomType,
chartConfigToSetInfo
} from './tools';
export default {
name: 'bi-zone',
mixins: [mixin, project],
components: {
BiSingleChoiceInfo,
BiCover,
BiCatalogue,
BiOverview,
BiMission,
BiSingleChoice,
BiCoverEnd,
BiOperate
},
data() {
return {
page1: 0,
page2: 0,
page2Info: [],
page3Info: [],
coverId: 0,
coverUrl: '',
coverContent: [],
coverList: [],
singleChoice: [],
singleChoiceHistory: [],
singleChoiceMixin: [],
missionData: [],
projectName: '',
baseInfo: [],
textData: [],
textDataHistory: [],
biInfo: {},
answerMode: 1
};
},
computed: {
catalogueArr() {
const {
page1 = 0,
page2 = 0,
page4 = 0,
page2Info = [],
page3Info = [],
page4Info = []
} = this;
return [
{
name: '项目总览',
child: [
{
name: '项目总览',
page: 1
}
]
},
{
name: '项目执行任务模块',
child: [
// {
// name: '任务量分析',
// page: 2
// },
{
name: '执行任务人员画像',
page: 1
},
{
name: '项目参与人完成任务区间分布',
page: 1
}
]
},
{
name: '专区浏览效果评价 - 历史数据分析',
hide: this.answerMode == 1,
child: [
...page2Info
.filter(item => item.name)
.map(item => {
return {
...item,
page: item.page + page1
};
})
]
},
{
name: '本次专区反馈效果评价',
child: [
...page4Info
.filter(item => item.name)
.map(item => {
return {
...item,
page: item.page + page1 + page2
};
})
]
},
{
name: '推广相关问卷数据分析',
child: [
...page3Info
.filter(item => item.name)
.map(item => {
return {
...item,
page: item.page + page1 + page2 + page4
};
})
.filter(item => item.showInCatalogue)
]
}
].filter(i => !i.hide);
},
showSingleChoiceHistory() {
return this.dealSingleChoice(this.singleChoiceHistory);
},
hideSingleChoiceHistory() {
return this.dealSingleChoice(this.singleChoiceHistory, true);
},
showSingleChoice() {
return this.dealSingleChoice(this.singleChoice);
},
hideSingleChoice() {
return this.dealSingleChoice(this.singleChoice, true);
},
showSingleChoiceMixin() {
return this.dealSingleChoice(this.singleChoiceMixin);
},
hideSingleChoiceMixin() {
return this.singleChoiceMixin.filter(item => item.isDelete == 1);
}
},
methods: {
dealBaseInfo(info) {
const {
biInfoId,
coverTemplateId, // 模板ID
coverTemplateUrl = '',
styleConfigureId, // 配置ID
title,
titlePosition,
aspEnterpriseNameWrite,
aspNamePosition,
settlementTime,
settlementTimePosition,
dataCollectNumber,
projectName = '-',
sendEnterpriseName = '-',
aspEnterpriseName = '-',
// taskTime = 0,
// taskStartTime,
// taskEndTime,
taskSum,
executePeopleNumber,
createDt,
answerMode, // 1自答,2别人答
nameShowType //1:正常显示甲乙方 2:隐藏发起方,原"服务商"改为"项目方" 3:隐藏发起方
} = info;
this.biInfo = {
biInfoId: biInfoId,
styleConfigureId
};
this.answerMode = answerMode;
this.coverId = coverTemplateId;
this.coverUrl = coverTemplateUrl;
const biCreateDt = date.dateFormat(createDt, 'Y-M-D');
this.projectName = `${projectName}${biCreateDt}服务报告`;
this.coverContent = [
{
name: title,
pos: titlePosition
},
{
name: settlementTime,
pos: settlementTimePosition
},
{
name: aspEnterpriseNameWrite,
pos: aspNamePosition
}
];
this.baseInfo = [
{
hide: nameShowType == 2 || nameShowType == 3,
name: '项目方',
value: sendEnterpriseName
},
{
name: nameShowType == 2 ? '项目方' : '服务商',
value: aspEnterpriseName
},
// {
// name: '任务时间',
// value: `${taskTime}天`
// },
// {
// name: '任务开始时间',
// value: taskStartTime
// },
// {
// name: '任务结算时间',
// value: taskEndTime
// },
{
name: '报表生成时间',
value: biCreateDt
},
{
name: '本期个人数据数',
value: executePeopleNumber
},
{
name: '累计个人数据总数',
value: taskSum
}
].reduce((pre, cur) => {
if (!cur.hide) {
const lastArr = pre[pre.length - 1];
if (Array.isArray(lastArr) && lastArr.length < 3) {
lastArr.push(cur);
} else {
pre.push([cur]);
}
}
return pre;
}, []);
this.textData = [
[
{
name: '专区文章:',
value: `${dataCollectNumber}篇`
},
{
name: '总执行数(人或者机构):',
value: executePeopleNumber
},
{
name: '本次提交量:',
value: `${taskSum}条`
}
]
];
this.textDataHistory = [
[
{
name: '专区文章:',
value: `${dataCollectNumber}篇`
}
]
];
},
dealFixedInfo(infoArr) {
const [group1 = {}, group2 = {}] = infoArr;
this.missionData = [
ChartConfigFn.createConfig(dealAxis(group1.topicCountInfos), {
...group1,
chartType: group1.chartType || 12,
legends: dealLegends(group1.topicCountInfos, '性', '性'),
blockTitle: '参与任务执行的性别分布',
legendName: '总参与项目执行人数${num}人',
hideDesc: true,
hideDelete: true,
dontContenteditable: true,
width: 520,
height: 350,
disableTypes: [3, 4],
extendTypes: [12]
}),
ChartConfigFn.createConfig(
dealAxis(group2.topicCountInfos, '', '以上'),
{
...group2,
chartType: group2.chartType || 1,
legends: dealLegends(group2.topicCountInfos, '岁', '岁以上'),
blockTitle: '执行任务的年龄段',
legendName: '总参与项目执行人数${num}人',
hideDesc: true,
hideDelete: true,
dontContenteditable: true,
width: 520,
height: 350,
disableTypes: [3, 4]
}
),
ChartConfigFn.createConfig([], {
...group1,
resultIsShow: 1,
hideBtn: true,
hideLegend: true,
hideChart: true,
hideTitle: true
})
// ChartConfigFn.createConfig(dealAxis(group3.fixedCountInfos), {
// ...group3,
// chartType: group3.chartType || 2,
// legends: dealLegends(group3.fixedCountInfos),
// blockTitle: '项目参与人完成任务区间分布',
// legendName: '总参与项目执行人数${num}人',
// hideDelete: true,
// height: 400,
// disableTypes: [3, 4]
// })
];
},
dealChoice(obj, singleChoiceName) {
// 1有效点击量排名 2区域热力图 3 单日有效点击量6 单日最大点击量 7 单篇每日点击23 专区推广文章浏览量与有效反馈数量对比图
const config = {
1: {
chartType: 2,
blockTitle:
singleChoiceName === 'singleChoiceHistory'
? '数字问卷各篇内容浏览排行'
: '数字问卷各篇内容反馈排行',
hideTypes: true,
hideLegend: true,
hideDesc: true
},
2: {
chartType: 13,
blockTitle:
singleChoiceName === 'singleChoiceHistory'
? '数字问卷浏览分布区域热力图'
: '数字问卷反馈分布区域热力图',
hideTypes: true,
hideColor: true,
hideLegend: true,
hideDesc: true
},
3: item => ({
chartType: item.chartType || randomType([1, 2, 5, 6]),
blockTitle:
singleChoiceName === 'singleChoiceHistory'
? '数字问卷单日浏览走势图'
: '数字问卷单日反馈走势图',
hideLegend: true,
hideDesc: true,
disableTypes: [3, 4, 9, 10, 11]
}),
6: {
chartType: 2,
blockTitle:
singleChoiceName === 'singleChoiceHistory'
? '数字问卷各篇内容单日最大浏览量排名'
: '数字问卷各篇内容单日最大反馈排名',
hideTypes: true,
hideLegend: true,
hideDesc: true
},
7: { hideThisChart: true },
23: { hideThisChart: true }
};
this[singleChoiceName] = Object.entries(obj)
.filter(item => item[1])
.map(([index, item]) => {
let customConfig = config[index] || {};
if (check.isFunction(customConfig)) {
customConfig = customConfig(item);
}
return {
...ChartConfigFn.createConfig(dealAxis(item.topicCountInfos), {
...item,
...customConfig
}),
hideThisChart: customConfig.hideThisChart
};
})
.filter(item => !item.hideThisChart)
.sort((a, b) => {
if (a.sort < b.sort) {
return -1;
}
});
},
dealChoiceMixin(arr) {
this.singleChoiceMixin = (Array.isArray(arr) ? arr : [])
.filter(item => item)
.reduce((pre, item) => {
pre.push(
ChartConfigFn.createConfig(dealAxis([]), {
...item,
blockTitle: item.title,
chartType: 15,
hideTypes: true,
hideColor: true,
hideLegend: true,
hideDesc: true,
showInCatalogue: true
}),
...(Array.isArray(item.topic) ? item.topic : []).map(cItem => {
return ChartConfigFn.createConfig(
dealAxis(cItem.topicAnswerList),
{
...cItem,
blockTitle: cItem.topicTitle,
chartType: cItem.chartType || randomType([1, 2, 5, 6]),
hideLegend: true,
hideDesc: true,
disableTypes: [3, 4, 9, 10, 11]
}
);
})
);
return pre;
}, [])
.sort((a, b) => {
if (a.sort < b.sort) {
return -1;
}
});
},
saveInfo() {
const { biInfoId, styleConfigureId } = this.biInfo;
const { content } = this.$refs['cover'];
let _missionData = chartConfigToSetInfo(this.missionData, biInfoId);
_missionData[0] = Object.assign({}, _missionData[0], {
resultUser: (_missionData[2] || {}).resultUser || ''
});
_missionData = _missionData.slice(0, 2);
return this.Bi.saveInfo({
biInfoId: biInfoId,
commandType: 2,
biStyleConfigureInfo: {
biInfoId: biInfoId,
aspEnterpriseNameWrite: content[2].name || '', //乙方封面名称
aspNamePosition: JSON.stringify(content[2].pos), //乙方封面名称位置
styleConfigId: styleConfigureId, //封面配置ID
coverTemplateId: this.coverId, //封面ID
settlementTime: content[1].name || '', //封面时间
settlementTimePosition: JSON.stringify(content[1].pos), //封面时间位置
title: content[0].name || '', //封面标题
titlePosition: JSON.stringify(content[0].pos) //标题位置
},
styleConfigureFixedDetailList: _missionData,
hgtgDetailList: chartConfigToSetInfo(
[...this.singleChoice, ...this.singleChoiceMixin],
biInfoId
)
});
},
exportBi() {
this.Bi.exportBi();
}
},
created() {
Promise.all([
this.Bi.getBaseInfo(),
this.Bi.getFixedInfo(),
this.Bi.getTopicInfo({ useType: 2 }),
this.Bi.getTopicInfo({ useType: 1 }),
this.Bi.getGroupInfo(),
this.Bi.getTemplateList()
])
.then(
([
baseInfo,
fixedInfo,
topicInfoHistory,
topicInfo,
topicMixinInfo,
tempaletList = { data: { data: [] } }
]) => {
this.dealBaseInfo(baseInfo.data.data[0] || {});
this.dealFixedInfo(fixedInfo.data.data || []);
const singleChoiceHistory = topicInfoHistory.data.data || {};
const singleChoice = topicInfo.data.data || {};
(
(singleChoiceHistory[1] || {})['topicCountInfos'] || []
).sort((a, b) => (a.countNum > b.countNum ? 0 : -1));
(
(singleChoiceHistory[6] || {})['topicCountInfos'] || []
).sort((a, b) => (a.countNum > b.countNum ? 0 : -1));
((singleChoice[1] || {})['topicCountInfos'] || []).sort((a, b) =>
a.countNum > b.countNum ? 0 : -1
);
((singleChoice[6] || {})['topicCountInfos'] || []).sort((a, b) =>
a.countNum > b.countNum ? 0 : -1
);
this.dealChoice(singleChoiceHistory, 'singleChoiceHistory');
this.dealChoice(singleChoice, 'singleChoice');
this.dealChoiceMixin(topicMixinInfo.data.data || []);
this.coverList = tempaletList.data.data || [];
this.$nextTick(async () => {
await this.preloadImg(this.coverUrl);
// await Promise.all(
// [...document.querySelectorAll('img')].map(i =>
// this.preloadImg(i.src)
// )
// );
window.status = '1';
});
}
)
.catch(() => {
this.$nextTick(() => {
window.status = '1';
});
});
}
};
</script>
<style lang="scss" scoped>
.bi-block {
// margin-top: 8px;
}
</style>
......@@ -16,7 +16,7 @@ const dealStr = (str, unit = '') => {
export const dealAxis = (arr = [], unit = '', lastUnit = '') => {
return arr.map((item, index) => {
const isLast = index === arr.length - 1;
const xName = item.genderType || item.xTopicName;
const xName = item.genderType || item.xTopicName || item.optionName;
return {
x: xName ? dealStr(xName, isLast ? lastUnit : unit) : '-',
y: item.yTopicName,
......
......@@ -2,10 +2,15 @@
* @Description:
* @Date: 2021-12-17 13:04:12
*/
import XrkTaskRecord from './src/main';
import XrkTaskRecord from './src/digital-promotion.vue';
import XrkTaskRecordPdf from './src/main.vue';
XrkTaskRecord.install = function(Vue) {
Vue.component(XrkTaskRecord.name, XrkTaskRecord);
};
export default XrkTaskRecord;
XrkTaskRecordPdf.install = function(Vue) {
Vue.component(XrkTaskRecordPdf.name, XrkTaskRecordPdf);
};
export { XrkTaskRecord, XrkTaskRecordPdf };
/*
* @Description:
* @Date: 2022-03-23 16:47:37
*/
import { post } from '@/utils/http';
const basePath = '/rest/saas/crm/xcx';
// 获取任务详情
// 可配置和调研
export const makeSceneTaskInfo = data =>
post(`${basePath}/pdf/ms/makeSceneTaskInfo`, data);
// 数字问卷
export const numQuestTaskInfo = data =>
post(`${basePath}/pdf/nq/numQuestTaskInfo`, data);
<template>
<div>
<div v-if="+projectType === 20" class="block_box">
<div class="bi_title">
<div class="bi_title_text">
<div class="bi_title_text_content">
<div class="bi_title_text_index">02</div>
目标基础信息
</div>
<img
src="//cdn.yxvzb.com/WEB/SaaS/images/bi/svg/title.png"
alt
class="bi_title_text_icon"
width="62"
/>
</div>
</div>
<div class="info">
<div
class="info-item"
style="display: inline-block; vertical-align: top; width: 550px"
>
<div>{{ resData.targetTitle }}</div>
<div style="margin-top: 40px">{{ resData.customerName }}</div>
</div>
<div
class="info-item"
style="display: inline-block; vertical-align: top"
>
<div>{{ resData.timeTitle }}</div>
<div style="margin-top: 40px">
{{ `${dateFormat(resData.startDt)}-${dateFormat(resData.endDt)}` }}
</div>
</div>
</div>
<div class="info">
<div class="info-item" style="display: inline-block; width: 100%">
<div>{{ resData.locationTitle }}</div>
<img
style="
width: 530px;
height: 265px;
display: block;
margin-top: 40px;
"
width="530"
height="265"
:src="resData.addressWatermarkPicUrl"
alt="img"
/>
</div>
</div>
</div>
<div class="block_box">
<div class="bi_title">
<div class="bi_title_text">
<div class="bi_title_text_content">
<!-- 任务内容信息标题顺序 可配置是03 调研是02 -->
<div class="bi_title_text_index">
{{ +projectType === 20 ? '03' : '02' }}
</div>
任务内容信息
</div>
<img
src="//cdn.yxvzb.com/WEB/SaaS/images/bi/svg/title.png"
alt
class="bi_title_text_icon"
width="62"
/>
</div>
</div>
<slot name="information"></slot>
<div v-for="(item, index) in resData.contentTitleList" :key="index">
<!-- 单选题/多选/投票题 -->
<div v-if="[1, 2, 3].includes(item.type)" class="question-item">
<div class="question-item-title">
<span>{{ `${index + 1}.${item.title}` }}</span>
<span>{{ titleMap(item.type) }}</span>
<div>
此条任务收集的选择项为:{{ isMultiple(item.type, item.answer) }}
</div>
</div>
<div
v-for="(cItem, cIndex) in item.options"
:key="cIndex"
:class="`question-item-option${item.type == 2 ? ' checkbox' : ''}`"
>
{{ cItem }}
</div>
<div
style="color: #666666; font-size: 14px; margin-top: 30px"
v-if="item.remark"
>
备注:{{ item.remark }}
</div>
</div>
<!-- 单填空/多填空/数字填空/打分/时间/月度/描述 -->
<div
v-else-if="[4, 5, 6, 7, 19, 14, 15, 17, 18].includes(item.type)"
class="question-item"
>
<div class="question-item-title">
<span>{{ `${index + 1}.${item.title}` }}</span>
<span>{{ titleMap(item.type) }}</span>
</div>
<div class="question-item-answer">
{{
item.type == 5 || item.type == 18
? item.answer.join(',')
: item.type == 6
? item.answer + '分'
: item.answer
}}
</div>
<div
style="color: #666666; font-size: 14px; margin-top: 30px"
v-if="item.remark"
>
备注:{{ item.remark }}
</div>
</div>
<!-- 图片题/签名题/定位题 -->
<div v-else-if="[20, 13, 16].includes(item.type)" class="question-item">
<div class="question-item-title">
<span>{{ `${index + 1}.${item.title}` }}</span>
<span>{{ titleMap(item.type) }}</span>
</div>
<img
v-if="item.type === 20 || item.type === 16"
style="margin-top: 10px"
width="180"
:src="item.type === 20 ? item.answer : item.addressPicUrl"
alt="img"
/>
<img
v-else
v-for="file in item.answer"
:key="file"
style="margin-top: 10px"
width="180"
:src="file"
alt="img"
/>
<div
style="color: #666666; font-size: 14px; margin-top: 30px"
v-if="item.remark"
>
备注:{{ item.remark }}
</div>
</div>
<!-- 文件题 -->
<div
v-else-if="[8, 9, 10, 11, 12].includes(item.type)"
class="question-item"
>
<div class="question-item-title">
<span>{{ `${index + 1}.${item.title}` }}</span>
<span>{{ titleMap(item.type) }}</span>
</div>
<div
v-for="file in item.answer"
:key="file"
class="question-item-answer"
>
{{ file }}
</div>
<div
style="color: #666666; font-size: 14px; margin-top: 30px"
v-if="item.remark"
>
备注:{{ item.remark }}
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import dateFormat from '@/utils/dateFormat';
const qustionMap = {
1: '【单选题】',
2: '【多选题】',
3: '【单选投票题】',
4: '【单项填空题】',
5: '【多项填空题】',
6: '【打分题】',
7: '【地址题】',
8: '【上传附件】',
9: '【上传pdf】',
10: '【上传word】',
11: '【上传excel】',
12: '【上传ppt】',
13: '【图片题】',
14: '【时间题】',
15: '【月度题】',
16: '【定位题】',
17: '【描述题】',
18: '【描述题】',
19: '【数字填空题】',
20: '【图片题】',
22: '【姓名填空题】'
};
export default {
props: {
resData: Object,
projectType: [String, Number]
},
data() {
return {};
},
methods: {
dateFormat(e) {
return dateFormat(e);
},
isMultiple(type, answer) {
if (type == 2) {
if (Array.isArray(answer)) {
return answer.join(',');
} else {
try {
return JSON.parse(answer).join(',');
} catch (error) {
return answer;
}
}
} else {
return answer;
}
},
titleMap(type) {
return qustionMap[type];
}
}
};
</script>
<style lang="scss" scoped></style>
<template>
<div class="content">
<div class="content-title">
<span class="left-bar">
<img
src="//cdn.yxvzb.com/WEB/SaaS/images/bi/personal/line-left.png"
alt=""
/>
</span>
<span class="content-title-text">信息披露</span>
<span class="right-bar">
<img
src="//cdn.yxvzb.com/WEB/SaaS/images/bi/personal/line-right.png"
alt=""
/>
</span>
</div>
<div class="content-body">
<div class="static-content-module">
<div class="content-body-title">服务公司声明</div>
<div class="content-body-text">
本公司以勤勉的职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目执行采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
</div>
</div>
<div class="static-content-module">
<div class="content-body-title">法律声明</div>
<div class="content-body-text">
本报告仅供本公司的客户使用。本公司不会因接收人收到本报告而视其为本公司的当然客户。
<br />
本报告所载的资料仅反映本公司截止发布本报告当日的判断。在不同时期,本公司可发出与本报告所载资料不一致的报告。
<br />
本报告的版权归本公司所有,未经书面许可,任何机构和个人不得以任何形式翻版、复制、发表或引用,或再次分发给任何其他人,或以任何侵犯本公司版权的其他方式使用。
<br />
向日葵将尽商业上合理水平的技能和注意义务为平台用户提供稳定的技术服务,但不对服务内容本身承担责任。
</div>
</div>
</div>
</div>
</template>
<script>
export default {};
</script>
<style></style>
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<template>
<div>
<div class="title" v-if="+from === 2">
{{ resData.fullName }}—任务记录数据报表
</div>
<div class="block_box">
<div class="bi_title">
<div class="bi_title_text">
<div class="bi_title_text_content">
<div class="bi_title_text_index">01</div>
任务基础信息
</div>
<img
src="//cdn.yxvzb.com/WEB/SaaS/images/bi/svg/title.png"
alt=""
class="bi_title_text_icon"
width="62"
/>
</div>
</div>
<div class="info">
<div v-if="+from === 2" class="info-item">
<span>项目执行人:</span>
<span>{{ resData.fullName }}</span>
</div>
<div class="info-item">
<span>项目名称:</span>
<span>{{ resData.projectName }}</span>
</div>
<div v-if="+from === 2" class="info-item">
<span>电话:</span>
<span>{{ resData.phone }}</span>
</div>
<div v-if="resData.gongyeNameIsShow == 1" class="info-item">
<span>项目方:</span>
<span>
{{ resData.gongyeName }}
</span>
</div>
<div class="info-item">
<span>{{ resData.enterpriseTitle }}</span>
<span>{{ resData.enterpriseName }}</span>
</div>
<div class="info-item">
<span>任务提交时间:</span>
<span>{{ dateFormat(resData.finishDt) }}</span>
</div>
<div class="info-item">
<span>任务编码:</span>
<span>{{ resData.taskCode }}</span>
</div>
<!-- 数字问卷没有审核人,自动通过的 -->
<div
v-if="resData.isAuditGongye > 0 && projectType !== 21"
class="info-item"
>
<span>服务商审核人:</span>
<span>{{ resData.csoAuditUser }}</span>
</div>
</div>
</div>
</div>
</template>
<script>
import dateFormat from '@/utils/dateFormat';
export default {
props: {
from: String || Number,
resData: Object,
projectType: {
type: [Number, String]
}
},
methods: {
dateFormat(e) {
return dateFormat(e);
}
}
};
</script>
<style></style>
<!--
* @Description: 老的-需改为新组件
* @Date: 2021-12-17 13:04:30
-->
<template>
<div style="font-size: 14px;">
<div class="task-log-pdf-title" style="font-size: 29px">
{{ baseInfo.fullName }} -- 任务记录
</div>
<div style="padding:0 29px 0px;background:#fff;">
<BiTitle index="1" name="任务基础信息"></BiTitle>
<div style="display: block;overflow: hidden">
<div class="panel-row">
<div class="panel-cell" v-if="+this.search.party !== 1">
<span class="panel-cell-label">
项目执行人: {{ baseInfo.fullName }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.fullName }}</span> -->
</div>
<div
class="panel-cell"
:style="{ width: +this.search.party !== 1 ? '30%' : '100%' }"
>
<span class="panel-cell-label">
项目名称: {{ baseInfo.projectName }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.projectName }}</span> -->
</div>
<div class="panel-cell" v-if="+this.search.party !== 1">
<span class="panel-cell-label">电话: {{ baseInfo.phone }}</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.phone }}</span> -->
</div>
</div>
<div class="panel-row">
<div class="panel-cell">
<span class="panel-cell-label">
项目方: {{ baseInfo.industryEnterpriseName }}
</span>
<!-- <span class="panel-cell-ctx">
{{ baseInfo.industryEnterpriseName }}
</span> -->
</div>
<div class="panel-cell">
<span class="panel-cell-label">
服务商: {{ baseInfo.enterpriseName }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.enterpriseName }}</span> -->
</div>
<div class="panel-cell">
<span class="panel-cell-label">
任务提交时间: {{ baseInfo.createDt }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.createDt }}</span> -->
</div>
</div>
<div class="panel-row">
<div class="panel-cell">
<span class="panel-cell-label">
任务编码: {{ baseInfo.taskCode }}
</span>
<!-- <span class="panel-cell-ctx">
{{ baseInfo.taskCode }}
</span> -->
</div>
</div>
</div>
</div>
<div style="padding:0 29px 29px;background:#fff;margin-top: 20px">
<BiTitle index="2" name="任务内容信息"></BiTitle>
<div class="panel-row">
<!-- 根据后端返回数据 -->
<div class="panel-cell" v-for="(item, k) in ctxInfo" :key="k">
<span
class="panel-cell-label"
:style="{
width: maxLabelWidth
}"
>
{{ item.label }}: {{ item.value }}
</span>
<!-- <span class="panel-cell-ctx">{{ item.value }}</span> -->
</div>
<div>
<div
style="display: inline-block;width: 100%;height: 50px;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label">
传递信息 :
</p>
<div
style="text-indent: 2em;line-height: 25px"
v-for="(item, k) in cdInfo"
:key="k"
>
{{ item.informationName }}
</div>
</div>
</div>
<!-- 图片-->
<div
style=" display: flex;background:#fff;overflow: hidden;margin-top: 10px"
>
<div
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label" style>
信息反馈记录:
</p>
<div style="padding:20px 20px 0 0">
<img style="width: 100%;" :src="feedBackUrl" alt />
</div>
</div>
<div
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label" style>
信息转发记录:
</p>
<div style="padding:20px 20px 0 0">
<img style="width: 100%;" :src="forwardUrl" alt />
</div>
</div>
</div>
</div>
</div>
<bi-cover-end title="信息披露"></bi-cover-end>
</div>
</template>
<script>
/* eslint-disable */
import BiTitle from './components/title.vue';
import BiCoverEnd from './components/cover-end';
import createCtxInfo from './client.js';
export default {
name: 'XrkTaskRecord',
components: {
BiCoverEnd,
BiTitle
},
props: {
getBaseInfo: {
type: Function,
default: () => {}
},
getCtxInfo: {
type: Function,
default: () => {}
}
},
data() {
return {
baseInfo: [], //基础信息
ctxInfo: [], //内容信息
visitPlanInformation: '', // 拜访信息
cdInfo: [], // 传递信息
feedBackUrl: '', //反馈记录
forwardUrl: '', //转发记录
visitTargetType: '',
search: {
party: '' //party=1 工业 party=2乙方
},
maxLabelWidth: ''
};
},
async mounted() {
await this.getCtxInfo().then(({ data: { data } }) => {
this.cdInfo = data.cdInfo;
this.feedBackUrl = data.feedBackUrl;
this.forwardUrl = data.forwardUrl;
this.visitPlanInformation = data.visitPlanInformation;
this.visitTargetType = data.visitTargetType;
this.ctxInfo = createCtxInfo(this.visitTargetType, data);
// const labels = this.ctxInfo.map(i => i.label.length);
// this.maxLabelWidth = Math.max.apply(null, labels) * 17 + 'px';
});
let baseInfoFields = [
{ label: '项目执行人', key: 'fullName', value: '' },
{ label: '项目名称', key: 'projectName', value: '' },
{ label: '电话', key: 'phone', value: '' },
{ label: '发行单位', key: 'industryEnterpriseName', value: '' },
{ label: '服务商', key: 'enterpriseName', value: '' },
{ label: '任务提交时间', key: 'createDt', value: '' },
{ label: '任务编码', key: 'taskCode', value: '' }
];
this.$nextTick(() => {
this.getBaseInfo().then(({ data: { data } }) => {
let res = {};
baseInfoFields.map(i => {
res[i.key] = data[i.key];
});
this.baseInfo = res;
});
});
const search = window.location.search
.slice(1)
.split('&')
.reduce((acc, cur) => {
let [key, val] = cur.split('=');
acc[key] = val;
return acc;
}, {});
this.search = search;
}
};
</script>
<style scoped>
.panel-row {
margin-top: 25px;
line-break: auto;
}
.panel-row:not(:last-child) {
border-bottom: 1px solid #f4f4f4;
}
.panel-cell {
display: inline-table;
/* min-height: 50px; */
line-height: 25px;
padding-bottom: 10px;
transform: translateY(1px);
margin-right: 10px;
width: 30%;
color: #9aa2b2;
}
.panel-cell-label {
color: #a9b0bd;
margin-right: 0.5em;
}
.panel-cell-ctx {
display: inline-block;
padding-right: 10px;
}
.task-log-pdf-title {
position: relative;
/*padding-left: 29px;*/
text-indent: 12px;
margin-bottom: 20px;
/*background: #fff;*/
}
.task-log-pdf-title::before {
content: '';
display: block;
width: 5px;
height: 100%;
background: #1989fa;
position: absolute;
left: 0;
top: 0;
}
</style>
<!--
* @Description:
* @Date: 2021-12-17 13:04:30
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<template>
<div style="font-size: 14px;">
<div class="task-log-pdf-title" style="font-size: 29px">
{{ baseInfo.fullName }} -- 任务记录
</div>
<div style="padding:0 29px 0px;background:#fff;">
<BiTitle index="1" name="任务基础信息"></BiTitle>
<div style="display: block;overflow: hidden">
<div class="panel-row">
<div class="panel-cell" v-if="+this.search.party !== 1">
<span class="panel-cell-label">
项目执行人: {{ baseInfo.fullName }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.fullName }}</span> -->
</div>
<div
class="panel-cell"
:style="{ width: +this.search.party !== 1 ? '30%' : '100%' }"
>
<span class="panel-cell-label">
项目名称: {{ baseInfo.projectName }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.projectName }}</span> -->
</div>
<div class="panel-cell" v-if="+this.search.party !== 1">
<span class="panel-cell-label">电话: {{ baseInfo.phone }}</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.phone }}</span> -->
</div>
</div>
<div class="panel-row">
<div class="panel-cell">
<span class="panel-cell-label">
项目方: {{ baseInfo.industryEnterpriseName }}
</span>
<!-- <span class="panel-cell-ctx">
{{ baseInfo.industryEnterpriseName }}
</span> -->
</div>
<div class="panel-cell">
<span class="panel-cell-label">
服务商: {{ baseInfo.enterpriseName }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.enterpriseName }}</span> -->
</div>
<div class="panel-cell">
<span class="panel-cell-label">
任务提交时间: {{ baseInfo.createDt }}
</span>
<!-- <span class="panel-cell-ctx">{{ baseInfo.createDt }}</span> -->
</div>
</div>
<div class="panel-row">
<div class="panel-cell">
<span class="panel-cell-label">
任务编码: {{ baseInfo.taskCode }}
</span>
<!-- <span class="panel-cell-ctx">
{{ baseInfo.taskCode }}
</span> -->
</div>
</div>
</div>
</div>
<div style="padding:0 29px 29px;background:#fff;margin-top: 20px">
<BiTitle index="2" name="任务内容信息"></BiTitle>
<div class="panel-row">
<!-- 根据后端返回数据 -->
<div class="panel-cell" v-for="(item, k) in ctxInfo" :key="k">
<span
class="panel-cell-label"
:style="{
width: maxLabelWidth
}"
>
{{ item.label }}: {{ item.value }}
</span>
<!-- <span class="panel-cell-ctx">{{ item.value }}</span> -->
</div>
<div>
<div
style="display: inline-block;width: 100%;height: 50px;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label">
传递信息 :
</p>
<div
style="text-indent: 2em;line-height: 25px"
v-for="(item, k) in cdInfo"
:key="k"
>
{{ item.informationName }}
</div>
</div>
</div>
<!-- 图片-->
<div
style=" display: flex;background:#fff;overflow: hidden;margin-top: 10px"
>
<div
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label" style>
信息反馈记录:
</p>
<div style="padding:20px 20px 0 0">
<img style="width: 100%;" :src="feedBackUrl" alt />
</div>
</div>
<div
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label" style>
信息转发记录:
</p>
<div style="padding:20px 20px 0 0">
<img style="width: 100%;" :src="forwardUrl" alt />
</div>
</div>
</div>
</div>
</div>
<bi-cover-end title="信息披露"></bi-cover-end>
</div>
<component
:is="componentName"
:resData="resData"
:projectType="projectType"
:from="from"
:taskId="taskId"
></component>
</template>
<script>
/* eslint-disable */
import BiTitle from './components/title.vue';
import BiCoverEnd from './components/cover-end';
import createCtxInfo from './client.js';
<script>
import EditScene from './project-scene/edit-scene.vue';
import DigitalQuestionnaire from './project-scene/digital-questionnaire.vue';
export default {
name: 'XrkTaskRecord',
components: {
BiCoverEnd,
BiTitle
},
name: 'XrkTaskRecordPdf',
props: {
getBaseInfo: {
type: Function,
default: () => {}
from: {
type: [Number, String],
default: '2'
},
projectType: {
type: [Number, String]
},
getCtxInfo: {
type: Function,
default: () => {}
taskId: {
type: [String, Number],
default: ''
},
componentName: {
type: String,
default: 'DigitalQuestionnaire'
}
},
data() {
return {
baseInfo: [], //基础信息
ctxInfo: [], //内容信息
visitPlanInformation: '', // 拜访信息
cdInfo: [], // 传递信息
feedBackUrl: '', //反馈记录
forwardUrl: '', //转发记录
visitTargetType: '',
search: {
party: '' //party=1 工业 party=2乙方
},
maxLabelWidth: ''
};
},
async mounted() {
await this.getCtxInfo().then(({ data: { data } }) => {
this.cdInfo = data.cdInfo;
this.feedBackUrl = data.feedBackUrl;
this.forwardUrl = data.forwardUrl;
this.visitPlanInformation = data.visitPlanInformation;
this.visitTargetType = data.visitTargetType;
this.ctxInfo = createCtxInfo(this.visitTargetType, data);
// const labels = this.ctxInfo.map(i => i.label.length);
// this.maxLabelWidth = Math.max.apply(null, labels) * 17 + 'px';
});
let baseInfoFields = [
{ label: '项目执行人', key: 'fullName', value: '' },
{ label: '项目名称', key: 'projectName', value: '' },
{ label: '电话', key: 'phone', value: '' },
{ label: '发行单位', key: 'industryEnterpriseName', value: '' },
{ label: '服务商', key: 'enterpriseName', value: '' },
{ label: '任务提交时间', key: 'createDt', value: '' },
{ label: '任务编码', key: 'taskCode', value: '' }
];
this.$nextTick(() => {
this.getBaseInfo().then(({ data: { data } }) => {
let res = {};
baseInfoFields.map(i => {
res[i.key] = data[i.key];
});
this.baseInfo = res;
});
});
const search = window.location.search
.slice(1)
.split('&')
.reduce((acc, cur) => {
let [key, val] = cur.split('=');
acc[key] = val;
return acc;
}, {});
this.search = search;
components: {
EditScene,
DigitalQuestionnaire
}
};
</script>
<style scoped>
.panel-row {
margin-top: 25px;
line-break: auto;
}
.panel-row:not(:last-child) {
border-bottom: 1px solid #f4f4f4;
}
.panel-cell {
display: inline-table;
/* min-height: 50px; */
line-height: 25px;
padding-bottom: 10px;
transform: translateY(1px);
margin-right: 10px;
width: 30%;
color: #9aa2b2;
}
.panel-cell-label {
color: #a9b0bd;
margin-right: 0.5em;
}
.panel-cell-ctx {
display: inline-block;
padding-right: 10px;
}
.task-log-pdf-title {
position: relative;
/*padding-left: 29px;*/
text-indent: 12px;
margin-bottom: 20px;
/*background: #fff;*/
}
.task-log-pdf-title::before {
content: '';
display: block;
width: 5px;
height: 100%;
background: #1989fa;
position: absolute;
left: 0;
top: 0;
<style scoped>
@import url('./style/index.css');
.template-container {
text-align: left;
}
</style>
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<template>
<div class="template-container">
<Header :from="from" :projectType="projectType" :resData="resData"></Header>
<Configurable :resData="resData" :projectType="projectType">
<template v-slot:information>
<div>
<!-- <div class="information">
<img :src="resData.channelInformation.picUrl" />
<div style="margin:10px">
<span>资讯标题:</span>
<strong>
{{ resData.channelInformation.title }}
</strong>
</div>
</div> -->
<div
class="information-content"
v-html="resData.channelInformation.content"
></div>
</div>
</template>
</Configurable>
<Footer></Footer>
</div>
</template>
<script>
import Footer from '../components/base/footer.vue';
import Header from '../components/base/header.vue';
import Configurable from '../components/base/configurable.vue';
import { numQuestTaskInfo } from '../api';
export default {
name: 'digital-questionnaire',
props: {
from: {
type: String,
default: '2'
},
projectType: {
type: [Number, String]
},
taskId: {
type: [String, Number],
default: ''
}
},
components: {
Footer,
Header,
Configurable
},
data() {
return {
resData: {}
};
},
created() {
numQuestTaskInfo({ taskId: this.taskId }).then(res => {
this.resData = res.data;
});
}
};
</script>
<style scoped lang="scss">
@import url('../style/index.css');
.template-container {
text-align: left;
}
.information {
display: flex;
align-items: center;
margin: 15px;
img {
width: 300px;
height: 150px;
}
&-content {
margin: 0 auto;
width: 1000px;
video {
width: 100%;
object-fit: contain;
height: 100%;
}
}
}
</style>
<style lang="scss">
.information-content {
img {
width: 1000px;
object-fit: contain;
height: 100%;
}
p {
line-height: 1.5 !important;
}
}
</style>
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<template>
<div class="template-container">
<Header :from="from" :projectType="projectType" :resData="resData"></Header>
<Configurable
:resData="resData"
:projectType="projectType"
:from="from"
:taskId="taskId"
></Configurable>
<Footer></Footer>
</div>
</template>
<script>
import Footer from '../components/base/footer.vue';
import Header from '../components/base/header.vue';
import Configurable from '../components/base/configurable.vue';
import { makeSceneTaskInfo } from '../api';
export default {
name: 'editScene',
props: {
from: {
type: [Number, String],
default: '2'
},
projectType: {
type: [Number, String]
},
taskId: {
type: [String, Number],
default: ''
}
},
components: {
Footer,
Header,
Configurable
},
data() {
return {
resData: {}
};
},
created() {
makeSceneTaskInfo({ taskId: this.taskId }).then(res => {
this.resData = res.data;
});
}
};
</script>
<style scoped>
@import url('../style/index.css');
.template-container {
text-align: left;
}
</style>
/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.3.6,
* Autoprefixer: v10.3.1
* Browsers: >1%,last 2 versions
*/
@page {
size: A4;
margin: 20px 15px 20px 10px;
}
* {
font-family: SimSun;
}
body,
div,
p {
margin: 0;
padding: 0;
line-height: 1;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
/* background-color: #f9fafc; */
background-color: #fff;
/* padding-top: 50px; */
}
.title {
margin: 0 auto 0 auto;
width: 1190px;
font-size: 25px;
font-weight: bold;
position: relative;
/* height: 44px; */
line-height: 44px;
padding-left: 12px;
padding-top: 50px;
padding-bottom: 22px;
background-color: #f9fafc;
}
.title::before {
content: '';
width: 5px;
height: 26px;
background: #1989fa;
position: absolute;
left: 0;
top: 59px;
/* -webkit-transform: translateY(-50%);
transform: translateY(-50%); */
}
.block_box {
margin: 0 auto;
width: 1190px;
padding: 14px 14px 34px 14px;
background-color: #fff;
}
.block_box + .block_box {
/* margin-top: 36px; */
border-top: 36px solid #f9fafc;
}
.bi_title {
line-height: 0;
height: 70px;
border-bottom: 1px solid #efefef;
page-break-inside: avoid;
}
.bi_title_text {
color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
padding-top: 20px;
}
.bi_title_text_content {
height: 33px;
font-size: 22px;
position: relative;
background: #1989fa;
width: 237px;
padding-left: 60px;
line-height: 33px;
display: inline-block;
vertical-align: top;
}
.bi_title_text_index {
position: absolute;
width: 35px;
height: 35px;
background: #ffffff;
border: 2px solid #1989fa;
border-radius: 4px;
font-size: 22px;
line-height: 33px;
color: #1989fa;
text-align: center;
left: 16px;
top: -7px;
}
.bi_title_text_icon {
/* position: absolute;
right: -61px;
top: 0; */
/* margin-left: -9px; */
display: inline-block;
vertical-align: bottom;
position: absolute;
left: 237px;
top: 20px;
}
.info {
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
font-size: 1px;
line-height: 0;
border-bottom: 1px solid #efefef;
overflow: hidden;
}
.info-item {
display: inline-block;
font-size: 16px;
line-height: 1.5;
color: #6f7a91;
padding-right: 30px;
/* display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex; */
word-break: break-all;
padding: 50px 0;
/* border-top: 1px solid #efefef; */
vertical-align: top;
padding-left: 10px;
padding-bottom: 200px;
margin-bottom: -150px;
position: relative;
}
.info-item::after {
content: '';
width: 9999px;
height: 1px;
position: absolute;
left: 0;
top: 0;
background-color: #efefef;
}
.info-item:nth-child(1)::after,
.info-item:nth-child(2)::after,
.info-item:nth-child(3)::after {
height: 0;
}
.info-item.warp {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.info-item.warp img {
width: 180px;
height: 180px;
display: block;
margin: 5px 0;
}
.info-item > span:first-child {
-ms-flex-negative: 0;
flex-shrink: 0;
}
.info-item:nth-child(3n + 1) {
width: 390px;
}
.info-item:nth-child(3n + 2) {
width: 400px;
}
.info-item:nth-child(3n + 3) {
-ms-flex-negative: 1;
flex-shrink: 1;
width: 360px;
padding-right: 70px;
margin-right: 10px;
}
.info-item > div:nth-child(2) {
line-height: 1.5;
}
.info-item > div:nth-child(2) > img {
height: 265px;
}
.question-item {
margin-top: 22px;
padding: 27px 35px;
background: #f9fafc;
page-break-inside: avoid;
}
.question-item-title {
width: 100%;
font-size: 18px;
color: #2a3558;
line-height: 30px;
}
.question-item-title > div {
background: #ffffff;
border: 1px solid #cecece;
padding: 4px 30px 4px 18px;
font-size: 18px;
float: right;
display: inline;
margin-right: 50px;
width: 400px;
}
.question-item-option {
font-size: 18px;
color: #2a3558;
margin-top: 30px;
line-height: 1.3;
}
.question-item-option + .question-item-option {
margin-top: 40px;
}
.question-item-option::before {
content: '';
width: 40px;
height: 20px;
background-image: url('http://cdn.yxvzb.com/WEB/SaaS/template/images/bi-s.png?v=1');
background-size: 20px 20px;
background-repeat: no-repeat;
/* border: 1px solid #707070; */
/* border-radius: 18px; */
display: inline-block;
/* margin-right: 18px; */
}
.question-item-option.checkbox::before {
content: '';
width: 40px;
height: 20px;
background-image: url('http://cdn.yxvzb.com/WEB/SaaS/template/images/bi-s-1.png?v=1');
background-size: 20px 20px;
background-repeat: no-repeat;
/* border: 1px solid #707070; */
/* border-radius: 18px; */
display: inline-block;
/* margin-right: 18px; */
}
.question-item-answer {
font-size: 22px;
color: #2a3558;
margin-top: 30px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.question-item-answer img {
-o-object-fit: cover;
object-fit: cover;
width: 180px;
height: 180px;
margin: 5px;
}
.question-item-11 {
border-bottom: 1px solid #efefef;
padding-top: 50px;
padding-bottom: 50px;
}
.question-item-11-title {
font-size: 20px;
font-weight: bold;
color: #2a3558;
}
.question-item-11-options {
margin-top: 50px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 18px;
line-height: 1.5;
color: #6f7a91;
}
.question-item-11-options > div {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.question-item-11-options > div > div {
margin-top: 30px;
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.question-item-11-options > div > div > img {
width: 180px;
margin: 5px;
border: 1px solid #efefef;
}
.question-item-6 {
padding-top: 50px;
padding-bottom: 0;
}
.question-item-6-title {
font-size: 26px;
color: #2a3558;
}
.question-item-6-options {
margin-top: 60px;
font-size: 21px;
color: #6f7a91;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
page-break-inside: avoid;
}
.question-item-6-options > p {
line-height: 1.5;
}
.question-item-6-options > img {
width: 181px;
height: 181px;
margin-right: 39px;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.question-item-11 .info {
border: none;
padding: 60px 0 0 0;
}
.question-info {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.question-info .info-item {
padding-top: 55px;
}
.question-info .info-item .img-inline {
/* display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap; */
font-size: 12px;
}
.question-info .info-item .img-inline img {
display: inline-block;
}
.question-info .info-item img {
width: 180px;
margin: 5px;
border: 1px solid #efefef;
}
.question-info .info-item.block1 {
width: 100% !important;
}
.question-info .info-item:nth-child(3n + 1) {
width: 390px;
}
.question-info .info-item:nth-child(3n + 2) {
width: 400px;
}
.content-title {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
}
.left-bar {
line-height: 136px;
}
.content-title-text {
letter-spacing: 4px;
margin: 0 30px;
font-size: 28px;
font-family: SimSun;
font-weight: 600;
color: #000000;
line-height: 136px;
}
.content-body-span {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.right-bar {
line-height: 136px;
}
.content-body {
width: 1190px;
padding: 11px;
background-color: #ffffff;
margin: 0 auto;
}
.content-body-title {
text-align: left;
font-size: 16px;
font-family: SimSun;
font-weight: 600;
color: #333333;
line-height: 32px;
}
.content-body-text {
text-align: left;
font-size: 14px;
font-family: SimSun;
font-weight: 400;
color: #666666;
line-height: 28px;
white-space: normal;
word-break: break-all;
word-wrap: break-word;
}
.content-body-img {
text-align: left;
}
.content-body-div {
font-family: SimSun;
display: inline-block;
width: 15%;
margin: 0 -3px;
height: 50px;
border: 1px solid #000;
line-height: 25px;
}
.content-body-content {
text-align: left;
font-size: 12px;
color: #666666;
}
.content-module {
border: 1px solid rgba(169, 199, 228, 0.19);
padding: 15px;
}
.static-content-module {
border: 1px solid rgba(169, 199, 228, 0.19);
padding: 8px 25px;
}
/*
* @Description:
* @Date: 2019-08-02 15:05:16
*/
export default (date, fmt = 'YYYY-MM-DD HH:mm:ss') => {
if (!date) {
return '';
}
if (typeof date === 'string') {
date = new Date(date.replace(/-/g, '/'));
}
if (typeof date === 'number') {
date = new Date(date);
}
var o = {
'M+': date.getMonth() + 1,
'D+': date.getDate(),
'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12,
'H+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
S: date.getMilliseconds()
};
var week = {
'0': '\u65e5',
'1': '\u4e00',
'2': '\u4e8c',
'3': '\u4e09',
'4': '\u56db',
'5': '\u4e94',
'6': '\u516d'
};
if (/(Y+)/.test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
(date.getFullYear() + '').substr(4 - RegExp.$1.length)
);
}
if (/(E+)/.test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
(RegExp.$1.length > 1
? RegExp.$1.length > 2
? '\u661f\u671f'
: '\u5468'
: '') + week[date.getDay() + '']
);
}
for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
);
}
}
return fmt;
};
/*
* @Description:
* @Date: 2022-03-23 16:47:37
*/
import axios from 'axios';
import qs from 'qs';
const envMappings = {
development: 'https://saas-crm-wx.jimijiayuan.cn',
development106: 'https://saas-crm-wx-1.jimijiayuan.cn',
preProduction: 'https://saas-crm-wx-1.myxrk.cn',
production: 'https://crm-wx.yxvzb.com',
'dev-105': '//saas-crm-wx.jimijiayuan.cn',
'dev-106': '//saas-crm-wx-1.jimijiayuan.cn',
'dev-hw105': '//hw105-crm-wx.jimijiayuan.cn',
'dev-hw106': '//hw106-crm-wx.jimijiayuan.cn',
pre: '//saas-crm-wx-1.myxrk.cn',
pro: '//crm-wx.yxvzb.com'
};
const env = qs.parse(location.href.split('?')[1]).env;
const service = axios.create({
baseURL: envMappings[env || 'pro'],
timeout: 1000 * 60 * 5
});
console.log(envMappings[env || 'pro'], env, 'bi component');
export function get(url, params) {
return new Promise((resolve, reject) => {
service
.get(url, {
params: params
})
.then(res => {
resolve(res.data);
})
.catch(err => {
reject(err.data);
});
});
}
export function post(url, params) {
return new Promise((resolve, reject) => {
service
.post(url, qs.stringify(params))
.then(res => {
resolve(res.data);
})
.catch(err => {
reject(err.data);
});
});
}
......@@ -6,7 +6,9 @@
const path = require('path');
const webpack = require('webpack');
const os = require('os');
function resolve(dir) {
return path.join(__dirname, dir);
}
///获取本机ipV4地址
function getIPAdress() {
var interfaces = os.networkInterfaces();
......@@ -76,7 +78,8 @@ module.exports = {
},
resolve: {
alias: {
vue$: 'vue/dist/vue.esm.js'
vue$: 'vue/dist/vue.esm.js',
'@': resolve('src')
},
extensions: ['*', '.js', '.vue', '.json']
},
......@@ -86,8 +89,10 @@ module.exports = {
noInfo: true,
overlay: true,
proxy: {
'/relaCustomer': {
target: 'http://172.28.61.8:8888/'
'/rest': {
target: 'https://saas-crm-wx.jimijiayuan.cn',
changeOrigin: true,
secure: false
}
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!