Commit bc1e4dfa by shangriqiang

去掉console

1 parent 80acb942
...@@ -20,5 +20,6 @@ if (typeof window !== 'undefined' && window.Vue) { ...@@ -20,5 +20,6 @@ if (typeof window !== 'undefined' && window.Vue) {
export default { export default {
install, install,
Bi Bi,
TaskRecord
}; };
...@@ -110,7 +110,7 @@ const validTargets = Object.keys(mapping); ...@@ -110,7 +110,7 @@ const validTargets = Object.keys(mapping);
*/ */
export default (target, data) => { export default (target, data) => {
if (!validTargets.includes(target + '')) { if (!validTargets.includes(target + '')) {
throw new Error('invalid target'); throw new Error('invalid target: ' + target);
} }
if (Object.prototype.toString.call(data) !== '[object Object]') { if (Object.prototype.toString.call(data) !== '[object Object]') {
throw new Error('invalid data'); throw new Error('invalid data');
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<!-- 传递信息 --> <!-- 传递信息 -->
<div> <div>
<div <div
style="display: inline-block;width: 100%;height: 50px;color:#9aa2b2" style="display: inline-block;width: 100%;height: 50px;line-height: 50px;color:#9aa2b2"
> >
<p class="panel-cell-label" style="">传递信息 :</p> <p class="panel-cell-label" style="">传递信息 :</p>
<div <div
...@@ -59,30 +59,28 @@ ...@@ -59,30 +59,28 @@
</div> </div>
</div> </div>
</div> </div>
</div> <!-- 图片-->
</div> <div style=" display: flex;background:#fffoverflow: hidden">
<div
<!-- 图片--> style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
<div >
style=" display: flex;background:#fff;padding-left: 29px;overflow: hidden" <p class="panel-cell-label" style="">信息反馈记录:</p>
> <div style="color: #2d2d2d;padding:20px 20px 0 0">
<div <img style="width: 100%;" :src="feedBackUrl" alt="" />
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2" </div>
> </div>
<p class="panel-cell-label" style="">信息反馈记录:</p> <div
<div style="color: #2d2d2d;padding:20px 20px 0 0"> style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2"
<img style="width: 100%;" :src="feedBackUrl" alt="" /> >
</div> <p class="panel-cell-label" style="">信息转发记录:</p>
</div> <div style="color: #2d2d2d;padding:20px 20px 0 0">
<div <img style="width: 100%;" :src="forward" alt="" />
style="display: inline-block;width: 33%;line-height: 50px;color:#9aa2b2" </div>
> </div>
<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> </div>
</div> </div>
<bi-cover-end title="信息披露"></bi-cover-end> <bi-cover-end title="信息披露"></bi-cover-end>
</div> </div>
</template> </template>
...@@ -92,74 +90,6 @@ import BiTitle from './components/title.vue'; ...@@ -92,74 +90,6 @@ import BiTitle from './components/title.vue';
import BiCoverEnd from './components/cover-end'; import BiCoverEnd from './components/cover-end';
import createCells from './client.js'; 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 { export default {
name: 'TaskRecord', name: 'TaskRecord',
components: { components: {
...@@ -169,15 +99,12 @@ export default { ...@@ -169,15 +99,12 @@ export default {
props: { props: {
getBaseInfo: { getBaseInfo: {
type: Function, type: Function,
default: () => { default: () => {}
}
}, },
getCtxInfo: { getCtxInfo: {
type: Function, type: Function,
default: () => { default: () => {}
} }
},
targetType: String, //目标类型
}, },
data() { data() {
return { return {
...@@ -187,7 +114,8 @@ export default { ...@@ -187,7 +114,8 @@ export default {
visitPlanInformation: '', // 拜访信息 visitPlanInformation: '', // 拜访信息
cdInfo: [], // 传递信息 cdInfo: [], // 传递信息
feedBackUrl: '', //反馈记录 feedBackUrl: '', //反馈记录
forward: '' //转发记录 forward: '', //转发记录
visitTatgetType: ''
}; };
}, },
computed: { computed: {
...@@ -195,20 +123,20 @@ export default { ...@@ -195,20 +123,20 @@ export default {
return this.baseInfo[0] && this.baseInfo[0]['value']; return this.baseInfo[0] && this.baseInfo[0]['value'];
} }
}, },
created() { async mounted() {
typeof this.getBaseInfo === 'function' && await this.getCtxInfo().then(({ data: { data } }) => {
this.getBaseInfo().then(({ data: [data] }) => {
this.baseInfo = createCells(this.targetType, data);
});
typeof this.getCtxInfo === 'function' &&
this.getCtxInfo().then(({ data }) => {
this.cdInfo = data.cdInfo; this.cdInfo = data.cdInfo;
this.feedBackUrl = data.feedBackUrl; this.feedBackUrl = data.feedBackUrl;
this.forward = data.forward; this.forward = data.forward;
this.cdInfo = data.cdInfo; this.cdInfo = data.cdInfo;
this.visitPlanInformation = data.visitPlanInformation; this.visitPlanInformation = data.visitPlanInformation;
this.ctxInfo = createCells(this.targetType, data); this.visitTatgetType = data.visitTatgetType;
this.ctxInfo = createCells(this.visitTatgetType, data);
});
this.$nextTick(() => {
this.getBaseInfo().then(res => {
this.baseInfo = createCells(this.visitTatgetType, res.data.data[0]);
});
}); });
} }
}; };
......
...@@ -26,7 +26,7 @@ function getIPAdress() { ...@@ -26,7 +26,7 @@ function getIPAdress() {
} }
const ipv4 = getIPAdress(); const ipv4 = getIPAdress();
const entry = 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';
module.exports = { module.exports = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!