Commit c28ca619 by web

fix: 修改组件引用

1 parent c689f47a
{
"name": "xrk-bi",
"version": "0.3.0-beta.9",
"version": "0.3.0-beta.10",
"description": "xrk-bi",
"author": "xrk",
"main": "dist/bundler.js",
......
......@@ -3,39 +3,29 @@
* @Date: 2022-03-23 16:47:37
-->
<template>
<div class="template-container">
<Header :from="from" :projectType="projectType" :resData="resData"></Header>
<component
:is="componentName"
:resData="resData"
:projectType="projectType"
>
<template v-slot:information>
<div>
<div class="block_box information" v-if="+projectType === 21">
<img :src="resData.channelInformation.picUrl" />
<div style="margin:10px">
<span>资讯标题:</span>
<strong>
{{ resData.channelInformation.title }}
</strong>
</div>
<Configurable :resData="resData" :projectType="projectType">
<template v-slot:information>
<div>
<div class="block_box information" v-if="+projectType === 21">
<img :src="resData.channelInformation.picUrl" />
<div style="margin:10px">
<span>资讯标题:</span>
<strong>
{{ resData.channelInformation.title }}
</strong>
</div>
<div v-html="resData.channelInformation.content"></div>
</div>
</template>
</component>
<Footer></Footer>
</div>
<div v-html="resData.channelInformation.content"></div>
</div>
</template>
</Configurable>
</template>
<script>
import Footer from './components/footer.vue';
import Header from './components/header.vue';
import Configurable from './components/configurable.vue';
import { numQuestTaskInfo } from './api';
import Configurable from './configurable.vue';
import { numQuestTaskInfo } from '../api';
export default {
name: 'XrkTaskRecordPdf',
name: 'digital-questionnaire',
props: {
from: {
type: String,
......@@ -50,14 +40,11 @@ export default {
}
},
components: {
Footer,
Header,
Configurable
},
data() {
return {
resData: {},
componentName: 'Configurable'
resData: {}
};
},
created() {
......@@ -69,7 +56,7 @@ export default {
</script>
<style scoped>
@import url('./style/index.css');
@import url('../style/index.css');
.template-container {
text-align: left;
}
......
<!--
* @Description:
* @Description: 老的-需改为新组件
* @Date: 2021-12-17 13:04:30
-->
<template>
......
......@@ -9,6 +9,8 @@
:is="componentName"
:resData="resData"
:projectType="projectType"
:from="from"
:taskId="taskId"
></component>
<Footer></Footer>
</div>
......@@ -18,12 +20,14 @@
import Footer from './components/footer.vue';
import Header from './components/header.vue';
import Configurable from './components/configurable.vue';
import DigitalQuestionnaire from './components/digital-questionnaire.vue';
import { makeSceneTaskInfo } from './api';
export default {
name: 'XrkTaskRecordPdf',
props: {
from: {
type: String,
type: [Number, String],
default: '2'
},
projectType: {
......@@ -32,17 +36,21 @@ export default {
taskId: {
type: [String, Number],
default: ''
},
componentName: {
type: String,
default: 'Configurable'
}
},
components: {
Footer,
Header,
Configurable
Configurable,
DigitalQuestionnaire
},
data() {
return {
resData: {},
componentName: 'Configurable'
resData: {}
};
},
created() {
......
/*
* @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) => {
axios
service
.get(url, {
params: params
})
......@@ -17,7 +38,7 @@ export function get(url, params) {
}
export function post(url, params) {
return new Promise((resolve, reject) => {
axios
service
.post(url, qs.stringify(params))
.then(res => {
resolve(res.data);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!