Commit 4360081f by shangriqiang

feature/数字拜访

1 parent 474e720e
<!-- <!--
* @Description: * @Description:
* @Date: 2021-03-02 20:19:43 * @Date: 2021-03-02 20:19:43
--> -->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en" style='background: #eeeeee'>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" /> <meta http-equiv="x-ua-compatible" content="ie=edge" />
......
/* eslint-disabled */
<!-- <!--
* @Description: * @Description:
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Date: 2021-01-28 23:29:19 * @Date: 2021-01-28 23:29:19
--> -->
<template> <template>
<div> <div>
<component <component
:is="cName" :is="cName"
:mobile="isMobile" :mobile="isMobile"
:print="isPrint" :print="isPrint"
:projectType="projectType"> :projectType="projectType"
</component> ></component>
</div> </div>
<!-- <ul class="pervie"> <!-- <ul class="pervie">
<li name="任务记录"> <li name="任务记录">
...@@ -38,10 +40,11 @@ export default { ...@@ -38,10 +40,11 @@ export default {
name: 'App', name: 'App',
data() { data() {
return { return {
isMobile: getQueryVariable('mobile') == 1, isMobile: +getQueryVariable('mobile') === 1,
isPrint: getQueryVariable('print') == 1, isPrint: +getQueryVariable('print') === 1,
projectType: getQueryVariable('projectType') || 6, projectType: +getQueryVariable('projectType') || 6,
cName: 'XrkBi' cName: 'TaskRecord'
// cName: 'XrkBi'
}; };
}, },
components: {}, components: {},
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
* @Date: 2021-01-28 23:29:19 * @Date: 2021-01-28 23:29:19
*/ */
import Bi from '../packages/bi/index.js'; import Bi from '../packages/bi/index.js';
import TaskRecord from '../packages/task-recored/index.js';
const components = [Bi]; const components = [Bi, TaskRecord];
const install = function(Vue) { const install = function(Vue) {
components.forEach(component => { components.forEach(component => {
......
/* /*
* @Description: * @Description:
* @Date: 2021-12-17 13:04:12 * @Date: 2021-12-17 13:04:12
*/ */
import TaskRecord from './src/main';
TaskRecord.install = function(Vue) {
Vue.component(TaskRecord.name, TaskRecord);
};
export default TaskRecord;
/*
* @Description: 根据目标适配
* @Date: 2021-12-20 17:01:55
*/
/*
* @Description: 可配置场景对应机构 目标题类型
1 医生
2 等级医院医生
3 基层医疗机构医生
4 零售药店(OTC药店巡店) -D
5 零售药店客户(OTC药店拜访) -D
6 等级医院科室
7 医药商业公司 -D
8 医药商业公司客户 -D
9 医药商业公司客户
10 零售药店客户
11 零售药店
12 医疗商业公司
13 患者
14 医院科室
15 等级医院
16 基层医疗机构
17 代理商
* @Date: 2020-10-22 11:10:39
*/
const mapping = {
1: [
{ label: '客户名称', key: 'fullName', value: '' },
{ label: '医院名称', key: 'hospitalName', value: '' },
{ label: '科室名称', key: 'departmentName', value: '' },
{ label: '职务', key: 'dutyName', value: '' }
],
2: [
{ label: '客户名称', key: 'fullName', value: '' },
{ label: '医院名称', key: 'hospitalName', value: '' },
{ label: '医院等级', key: 'gradeName', value: '' },
{ label: '科室名称', key: 'departmentName', value: '' },
{ label: '职称', key: 'dutyName', value: '' }
],
3: [
{ label: '客户名称', key: 'fullName', value: '' },
{ label: '医疗机构名称', key: 'hospitalName', value: '' },
{ label: '医疗机构类别', key: 'gradeName', value: '' },
{ label: '医疗机构地区', key: 'ssq', value: '' },
{ label: '科室名称', key: 'departmentName', value: '' }
],
9: [
{ label: '客户名称', key: 'fullName', value: '' },
{ label: '职务', key: 'jobTitle', value: '' },
{ label: '商业公司名称', key: 'gradeName', value: '' },
{ label: '公司所在省市区', key: 'ssq', value: '' }
],
10: [
{ label: '客户名称', key: 'officeWorkerName', value: '' },
{ label: '职务', key: 'jobTitle', value: '' },
{ label: '药店名称', key: 'fullName', value: '' },
{ label: '药店所在省市区', key: 'ssq', value: '' }
],
13: [
{ label: '患者姓名', key: 'fullName', value: '' },
{ label: '性别', key: 'sex', value: '' },
{ label: '出生年月', key: 'birthday', value: '' },
{ label: '手机号', key: 'phone', value: '' }
],
17: [
{ label: '客户姓名', key: 'fullName', value: '' },
{ label: '业务领域', key: 'agentAreaName', value: '' },
{ label: '擅长领域', key: 'agentProductName', value: '' },
{ label: '擅长终端', key: 'agentTerminalName', value: '' }
],
6: [
{ label: '医院名称', key: 'hospitalName', value: '' },
{ label: '医院等级', key: 'gradeName', value: '' },
{ label: '科室名称', key: 'departmentName', value: '' }
],
14: [
{ label: '医院名称', key: 'hospitalName', value: '' },
{ label: '科室名称', key: 'departmentName', value: '' }
],
15: [
{ label: '医院名称', key: 'hospitalName', value: '' },
{ label: '医院等级', key: 'gradeName', value: '' },
{ label: '医院地区', key: 'ssq', value: '' },
{ label: '地址详情', key: 'address', value: '' }
],
16: [
{ label: '医疗机构名称', key: 'hospitalName', value: '' },
{ label: '医疗机构类别', key: 'gradeName', value: '' },
{ label: '医疗机构地区', key: 'ssq', value: '' },
{ label: '医疗机构地址详情', key: 'address', value: '' }
],
11: [
{ label: '药店名称', key: 'fullName', value: '' },
{ label: '药店所在省市区', key: 'ssq', value: '' },
{ label: '药店地址详情', key: 'address', value: '' }
],
12: [
{ label: '医药商业公司名称', key: 'fullName', value: '' },
{ label: '公司所在省市区', key: 'ssq', value: '' }
]
};
const validTargets = Object.keys(mapping);
/**
* @description: 根据类型适配字段
* @param {number} target 当前目标类型
* @param {object} data 当前数据
* @return {array} 匹配后数据
*/
export default (target, data) => {
if (!validTargets.includes(target + '')) {
throw new Error('invalid target');
}
if (Object.prototype.toString.call(data) !== '[object Object]') {
throw new Error('invalid data');
}
return mapping[target].map(item => ({ ...item, value: data[item.key] }));
};
<!--
* @Description:
* @Date: 2021-06-09 19:05:20
-->
<template>
<div class="bi-cover-2">
<!-- <BiBlank :height="42" :usePrint="true"></BiBlank>-->
<div class="bi-cover-2-content">
<div style="display: flex">
<div
style="position: relative;flex:1;border-top: 1px solid #989898;margin-top:20px;padding-bottom: 20px"
>
<div
style="position:absolute;border:1px solid #989898;width: 3.5px;height: 3.5px;border-radius: 50%;top:0;right:0;transform: translateY(-50%);background: #fff;margin:0"
></div>
</div>
<div
style="line-height: 41px;font-size: 18px;font-weight: 400;margin:0 2rem"
>
{{ title }}
</div>
<div
style="position: relative;flex:1;border-top: 1px solid #989898;margin-top:20px;padding-bottom: 20px"
>
<div
style="position:absolute;border:1px solid #989898;width: 3.5px;height: 3.5px;border-radius: 50%;top:0;left:0;transform: translateY(-50%);background: #fff;margin:0"
></div>
</div>
</div>
<p>服务公司声明</p>
<div>
<p>
本公司以勤勉的职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰
准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
</p>
</div>
<p class="t">法律声明</p>
<div>
<p>
本报告仅供本公司的客户使用。本公司不会因接收人收到本报告而视其为本公司的当然客户。
</p>
<p>
本报告所载的资料仅反映本公司截止发布本报告当日的判断。在不同时期,本公司可发出与本报告所载资料不一致的报告。
</p>
<p>
本报告的版权归本公司所有,未经书面许可,任何机构和个人不得以任何形式翻版、复制、发表或引用,或再次分发给任何其他人,或以任何侵犯本公司版权的其他方式使用。
</p>
<p>
向日葵将尽商业上合理水平的技能和注意义务为平台用户提供稳定的技术服务,但不对服务内容本身承担责任。
</p>
</div>
</div>
</div>
</template>
<script>
// import BiBlank from '../commonComponents/blank.vue';
export default {
name: 'bi-cover-end',
// components: { BiBlank },
props: {
title: String
}
};
</script>
<style lang="scss" scoped>
.bi-cover {
width: 1200px;
height: 1697px;
background: #1989fa;
// page-break-before: always;
font-size: 50px;
color: #ffffff;
text-align: center;
padding: 0 50px;
padding-top: 562px;
letter-spacing: 3px;
text-indent: 3px;
}
.bi-cover-2 {
// page-break-before: always;
page-break-inside: avoid;
&-content {
width: 100%;
border: 4px solid #f4f4f4;
border-radius: 4px;
padding: 40px 26px;
background: #fff;
box-sizing: border-box;
p {
font-size: 18px;
color: #2a3558;
}
.t {
margin-top: 60px;
}
div {
margin-top: 24px;
p {
font-size: 14px;
line-height: 1.5;
color: #989898;
}
}
}
&.mobile {
.bi-cover-2-content {
border-width: 2px;
padding-top: 20px;
p {
font-size: 0.32rem;
}
.t {
margin-top: 30px;
}
div {
margin-top: 15px;
p {
font-size: 0.32rem;
}
}
}
}
}
</style>
<!--
* @Description:
* @Date: 2021-06-09 20:37:58
-->
<template>
<div class="bi_title">
<div class="bi_title_text">
<div class="bi_title_text_index">{{ `${index}`.padStart(2, 0) }}</div>
{{ name }}
<img
src="http://cdn.yxvzb.com/WEB/SaaS/images/bi/svg/title.svg"
alt=""
class="bi_title_text_icon"
/>
</div>
</div>
</template>
<script>
export default {
name: 'bi-title',
props: {
index: String,
name: String
}
};
</script>
<style lang="scss" scoped>
$bluecolor: #1989fa;
.bi {
&_title {
line-height: 0;
height: 88px;
border-bottom: 2px solid #f4f4f4;
&_text {
margin-top: 32px;
height: 33px;
background: $bluecolor;
font-size: 22px;
line-height: 33px;
color: #fff;
padding-left: 60px;
padding-right: 20px;
min-width: 237px;
box-sizing: border-box;
display: inline-block;
position: relative;
&_index {
position: absolute;
width: 35px;
height: 35px;
background: #ffffff;
border: 2px solid $bluecolor;
border-radius: 4px;
font-size: 22px;
line-height: 33px;
color: $bluecolor;
text-align: center;
left: 16px;
top: -7px;
}
&_icon {
position: absolute;
right: -61px;
top: 0;
}
}
}
}
</style>
<!-- <!--
* @Description: * @Description:
* @Date: 2021-12-17 13:04:30 * @Date: 2021-12-17 13:04:30
--> -->
<template>
<div>
<div class="task-log-pdf-title" style="font-size: 29px">
{{ executorName }} -- 任务记录
</div>
<div style="padding:0 29px 29px;background:#fff;">
<BiTitle index="1" name="任务基础信息"></BiTitle>
<div style="display: block;overflow: hidden">
<div
class="panel-cell"
style="transform: translateY(1px);display: inline-block;width: 33%;height: 70px;line-height: 70px;color:#9aa2b2;border-bottom:1px solid #f4f4f4"
v-for="(item, k) in baseInfo"
:key="k"
>
<span class="panel-cell-label" style="">{{ item.label }}</span>
:
<span style="color: #2d2d2d">{{ item.value }}</span>
</div>
</div>
</div>
<div style="padding:0 29px 29px;background:#fff;margin-top: 20px">
<BiTitle index="2" name="任务内容信息"></BiTitle>
<div>
<div
style="display: inline-block;width: 33%;height: 50px;line-height: 50px;color:#9aa2b2"
v-for="(item, k) in ctxInfo"
:key="k"
>
<span class="panel-cell-label" style="">{{ item.label }}</span>
:
<span style="color: #2d2d2d">{{ item.value }}</span>
</div>
<!-- 拜访信息 -->
<div>
<div
style="display: inline-block;width: 100%;height: 50px;line-height: 50px;color:#9aa2b2"
>
<span class="panel-cell-label">拜访信息 :</span>
<span style="color:#2d2d2d">{{ visitPlanInformation }}</span>
</div>
</div>
<!-- 传递信息 -->
<div>
<div
style="display: inline-block;width: 100%;height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label" style="">传递信息 :</p>
<div
style="color: #2d2d2d;text-indent: 2em;list-style: circle"
v-for="(item, k) in cdInfo"
:key="k"
>
{{ item.informationName }}
</div>
</div>
</div>
</div>
</div>
<!-- 图片-->
<div
style=" display: flex;background:#fff;padding-left: 29px;overflow: hidden"
>
<div
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
>
<p class="panel-cell-label" style="">信息反馈记录:</p>
<div style="color: #2d2d2d;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="color: #2d2d2d;padding:20px 20px 0 0">
<img style="width: 100%;" :src="forward" alt="" />
</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 createCells from './client.js';
const MockBI17 = {
getBaseInfo() {
return new Promise((resolve) => {
setTimeout(() => {
resolve({
data: [
{
id: 123,
userId: 123,
fullName: '张三',
projectName: '项目名称',
phone: '手机号',
enterpriseName: '服务商',
industryEnterpriseName: '发行单位',
createDt: 234234234234234240,
industryEnterpriseId: 123,
taskCode: 'fdaga-egew-gew-qw-q'
}
],
message: '操作成功',
status: '1'
});
}, 800);
});
},
getCtxInfo() {
return new Promise(resolve => {
setTimeout(() => {
resolve({
data: {
customerName: '', // '客户名称',
visitPlanInformation: 'mock拜访信息mock', // '拜访信息',
visitTatgetType: '', //'目标题类型 1 医生 2 等级医院医生 3 基层医疗机构医生 6 等级医院科室 9 医药商业公司客户 10 零售药店客户 11 零售药店 12 医药商业公司 13 患者随访 14 医院科室 15 等级医院 16 基层医疗机构 17 代理商',
provinceName: '', // '省份',
cityName: '', // '城市',
districtName: '', // '区域',
address: '', // '地址',
hospitalName: '', // '医院医疗机构名称',
gradeName: '', // '医院医疗机构等级',
departmentName: '', // '二级科室名称',
dutyName: '', // '职称名称',
pharmacyName: '', // '药店名称',
pharmacyPeopleDuty: '', //'客户药店职务 1 店长 2 副店长 3 店员 4 业务员 5 采购 6 其他',
visitDt: '', // '拜访时间 时间戳',
isFeedback: '', // '客户是否反馈 0 未反馈 1 已反馈',
feedbackDt: '', // '客户反馈时间 时间戳',
feedbackContent: '', // '客户反馈内容',
visitType: '', // '数字拜访途径 1 微信 或其他',
finishDt: '', // '完成时间',
firstDepartmentName: '', // '一级科室名称',
taskCode: '', // '任务编码',
feedBackUrl:
'https://img1.baidu.com/it/u=435073176,3897268984&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=758', // '反馈图片url',
forward:
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202107%2F17%2F20210717200148_c6932.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642589172&t=fd4a2241ee703fd55bc3be6bf80ecf8f', // '转发图片url',
cdInfo: [
{ informationName: 'aaaa' },
{ informationName: 'bbb' },
{ informationName: 'bbb' }
]
},
message: '操作成功',
status: '1'
});
}, 800);
});
}
};
export default {
name: 'TaskRecord',
components: {
BiCoverEnd,
BiTitle
},
getBaseInfo: {
type: Function,
default: () => {}
},
getCtxInfo: {
type: Function,
default: () => {}
},
data() {
return {
baseInfo: [], //基础信息
ctxInfo: [], //内容信息
visitPlanInformation: '', // 拜访信息
cdInfo: [], // 传递信息
feedBackUrl: '', //反馈记录
forward: '', //转发记录
targetType: '' //目标类型
};
},
computed: {
executorName() {
return this.baseInfo[0] && this.baseInfo[0]['value'];
}
},
created() {
typeof this.getBaseInfo === 'function' &&
this.getBaseInfo().then(({ data: [data] }) => {
this.baseInfo = createCells(2, data);
});
typeof this.getCtxInfo === 'function' &&
this.getCtxInfo().then(({ data }) => {
this.cdInfo = data.cdInfo;
this.feedBackUrl = data.feedBackUrl;
this.forward = data.forward;
this.cdInfo = data.cdInfo;
this.visitPlanInformation = data.visitPlanInformation;
this.ctxInfo = createCells(2, data);
});
}
};
</script>
<style scoped>
.panel-cell-label {
color: #a9b0bd;
}
.task-log-pdf-title {
position: relative;
/*padding-left: 29px;*/
text-indent: 12px;
margin-bottom: 50px;
/*background: #fff;*/
}
.task-log-pdf-title::before {
content: '';
display: block;
width: 5px;
height: 100%;
background: #1989fa;
position: absolute;
left: 0;
top: 0;
}
</style>
...@@ -3,9 +3,29 @@ ...@@ -3,9 +3,29 @@
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Date: 2021-01-28 23:29:19 * @Date: 2021-01-28 23:29:19
*/ */
var path = require('path'); const path = require('path');
var webpack = require('webpack'); const webpack = require('webpack');
var entry = const os = require('os');
///获取本机ipV4地址
function getIPAdress() {
var interfaces = os.networkInterfaces();
for (var devName in interfaces) {
var iface = interfaces[devName];
for (var i = 0; i < iface.length; i++) {
var alias = iface[i];
if (
alias.family === 'IPv4' &&
alias.address !== '127.0.0.1' &&
!alias.internal
) {
return alias.address;
}
}
}
}
const ipv4 = getIPAdress();
const entry =
process.env.NODE_ENV === 'development' process.env.NODE_ENV === 'development'
? './src/main.js' ? './src/main.js'
: './src/lib/index.js'; : './src/lib/index.js';
...@@ -61,7 +81,7 @@ module.exports = { ...@@ -61,7 +81,7 @@ module.exports = {
extensions: ['*', '.js', '.vue', '.json'] extensions: ['*', '.js', '.vue', '.json']
}, },
devServer: { devServer: {
host: '0.0.0.0', host: ipv4 || '0.0.0.0',
historyApiFallback: true, historyApiFallback: true,
noInfo: true, noInfo: true,
overlay: true, overlay: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!