Commit e7e4d9f8 by jml0128

Merge branch 'release' into 'master'

feat: 添加任务记录

See merge request !7
2 parents de3da450 acccc3ae
......@@ -3,7 +3,7 @@
* @Date: 2021-03-02 20:19:43
-->
<!DOCTYPE html>
<html lang="en">
<html lang="en" style='background: #eeeeee'>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
......
{
"name": "xrk-bi",
"version": "0.1.25",
"version": "0.2.0",
"description": "xrk-bi",
"author": "xrk",
"main": "dist/bundler.js",
......@@ -15,6 +15,7 @@
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"test:local": "cross-env NODE_ENV=production webpack-dev-server --open --hot",
"lint": "eslint src/ --ext .js,.vue ",
"fix": "eslint --fix ./src --ext .js,.vue "
},
......@@ -31,6 +32,7 @@
},
"devDependencies": {
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/composition-api": "^1.0.0-rc.11",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-core": "^6.26.0",
......
......@@ -3,13 +3,15 @@
* @LastEditors: Please set LastEditors
* @Date: 2021-01-28 23:29:19
-->
<template>
<div>
<XrkBi
<component
:is="componentName"
:mobile="isMobile"
:print="isPrint"
:projectType="projectType"
></XrkBi>
></component>
</div>
<!-- <ul class="pervie">
<li name="任务记录">
......@@ -33,21 +35,17 @@
<script>
import { getQueryVariable } from './packages/bi/src/chart-type/common';
export default {
name: 'App',
data() {
return {
isMobile: getQueryVariable('mobile') == 1,
isPrint: getQueryVariable('print') == 1,
projectType: getQueryVariable('projectType') || 6
isMobile: +getQueryVariable('mobile') === 1,
isPrint: +getQueryVariable('print') === 1,
projectType: +getQueryVariable('projectType') || 6,
componentName: getQueryVariable('componentName') || 'XrkBi'
};
},
components: {},
watch: {},
computed: {},
methods: {},
created() {},
beforeDestroy() {}
}
};
</script>
......
......@@ -4,8 +4,9 @@
* @Date: 2021-01-28 23:29:19
*/
import Bi from '../packages/bi/index.js';
import XrkTaskRecord from '../packages/task-recored/index.js';
const components = [Bi];
const components = [Bi, XrkTaskRecord];
const install = function(Vue) {
components.forEach(component => {
......@@ -19,5 +20,6 @@ if (typeof window !== 'undefined' && window.Vue) {
export default {
install,
Bi
Bi,
XrkTaskRecord
};
......@@ -213,6 +213,7 @@ export const initDivInput = (
let focusIndex = 0;
let leftText = '';
let rightText = '';
// eslint-disable-next-line no-unused-vars
let deleteText = '';
let isComposition = false;
dom.innerHTML = dom.innerText;
......
......@@ -18,7 +18,7 @@
* echart 配置
*/
import { use, init, registerMap } from 'echarts/core';
import { SVGRenderer, CanvasRenderer } from 'echarts/renderers';
import { SVGRenderer } from 'echarts/renderers';
import {
PieChart,
BarChart,
......
......@@ -10,8 +10,7 @@
<p>服务公司声明</p>
<div>
<p>
本公司以勤勉的职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰
准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
本公司以勤勉的职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
</p>
</div>
<p class="t">法律声明</p>
......
/*
* @Description:
* @Date: 2021-12-17 13:04:12
*/
import XrkTaskRecord from './src/main';
XrkTaskRecord.install = function(Vue) {
Vue.component(XrkTaskRecord.name, XrkTaskRecord);
};
export default XrkTaskRecord;
/*
* @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: 'officeWorkerName', value: '' },
{ label: '职务', key: 'jobTitle', value: '' },
{ label: '商业公司名称', key: 'fullName', 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: '' }
]
};
Object.keys(mapping).forEach(k => {
let common = [
{ label: '拜访时间', key: 'visitDt', visitDt: '' },
{ label: '数字拜访途径', key: 'visitType', value: '' },
{ label: '客户反馈时间', key: 'feedbackDt', value: '' },
{ label: '客户反馈', key: 'feedbackContent', value: '' }
];
common.forEach(i => {
mapping[k].push(i);
});
});
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: ' + 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:
* @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>
......@@ -3,9 +3,29 @@
* @LastEditors: Please set LastEditors
* @Date: 2021-01-28 23:29:19
*/
var path = require('path');
var webpack = require('webpack');
var entry =
const path = require('path');
const webpack = require('webpack');
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'
? './src/main.js'
: './src/lib/index.js';
......@@ -61,7 +81,7 @@ module.exports = {
extensions: ['*', '.js', '.vue', '.json']
},
devServer: {
host: '0.0.0.0',
host: ipv4 || '0.0.0.0',
historyApiFallback: true,
noInfo: true,
overlay: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!