Commit 49ffb70c by web

feat: 修改文件目录

1 parent 1a3933b1
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
import Bi from '../packages/bi/index.js'; import Bi from '../packages/bi/index.js';
import { import {
XrkTaskRecord, XrkTaskRecord,
XrkTaskRecordConfigurable XrkTaskRecordPdf
} from '../packages/task-recored/index.js'; } from '../packages/task-recored/index.js';
const components = [Bi, XrkTaskRecord, XrkTaskRecordConfigurable]; const components = [Bi, XrkTaskRecord, XrkTaskRecordPdf];
const install = function(Vue) { const install = function(Vue) {
components.forEach(component => { components.forEach(component => {
...@@ -25,5 +25,5 @@ export default { ...@@ -25,5 +25,5 @@ export default {
install, install,
Bi, Bi,
XrkTaskRecord, XrkTaskRecord,
XrkTaskRecordConfigurable XrkTaskRecordPdf
}; };
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* @Description: * @Description:
* @Date: 2021-12-17 13:04:12 * @Date: 2021-12-17 13:04:12
*/ */
import XrkTaskRecord from './src/main.vue'; import XrkTaskRecord from './src/digital-promotion.vue';
import XrkTaskRecordConfigurable from './src/configurable/main.vue'; import XrkTaskRecordPdf from './src/main.vue';
XrkTaskRecord.install = function(Vue) { XrkTaskRecord.install = function(Vue) {
Vue.component(XrkTaskRecord.name, XrkTaskRecord); Vue.component(XrkTaskRecord.name, XrkTaskRecord);
}; };
XrkTaskRecordConfigurable.install = function(Vue) { XrkTaskRecordPdf.install = function(Vue) {
Vue.component(XrkTaskRecordConfigurable.name, XrkTaskRecordConfigurable); Vue.component(XrkTaskRecordPdf.name, XrkTaskRecordPdf);
}; };
export { XrkTaskRecord, XrkTaskRecordConfigurable }; export { XrkTaskRecord, XrkTaskRecordPdf };
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<template>
<div class="template-container">
<Header :from="from" :resData="resData"></Header>
<Main :resData="resData" :projectType="projectType"></Main>
<Footer></Footer>
</div>
</template>
<script>
import Footer from './components/footer.vue';
import Header from './components/header.vue';
import Main from './components/main.vue';
import { makeSceneTaskInfo } from './api';
export default {
name: 'XrkTaskRecordConfigurable',
props: {
from: {
type: String,
default: 'gongye'
},
projectType: {
type: [Number, String]
},
taskId: {
type: [String, Number],
default: '1209161'
}
},
components: {
Footer,
Header,
Main
},
data() {
return {
resData: {}
};
},
created() {
makeSceneTaskInfo({ taskId: this.taskId }).then(res => {
this.resData = res.data;
});
}
};
</script>
<style>
@import url('../style/index.css');
</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: * @Description:
* @Date: 2021-12-17 13:04:30 * @Date: 2022-03-23 16:47:37
--> -->
<template> <template>
<div style="font-size: 14px;"> <div class="template-container">
<div class="task-log-pdf-title" style="font-size: 29px"> <Header :from="from" :resData="resData"></Header>
{{ baseInfo.fullName }} -- 任务记录 <component
</div> :is="componentName"
:resData="resData"
<div style="padding:0 29px 0px;background:#fff;"> :projectType="projectType"
<BiTitle index="1" name="任务基础信息"></BiTitle> ></component>
<div style="display: block;overflow: hidden"> <Footer></Footer>
<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> </div>
</template> </template>
<script>
/* eslint-disable */
import BiTitle from './components/title.vue';
import BiCoverEnd from './components/cover-end';
import createCtxInfo from './client.js';
<script>
import Footer from './components/footer.vue';
import Header from './components/header.vue';
import Configurable from './components/configurable.vue';
import { makeSceneTaskInfo } from './api';
export default { export default {
name: 'XrkTaskRecord', name: 'XrkTaskRecordConfigurable',
components: {
BiCoverEnd,
BiTitle
},
props: { props: {
getBaseInfo: { from: {
type: Function, type: String,
default: () => {} default: 'gongye'
}, },
getCtxInfo: { projectType: {
type: Function, type: [Number, String]
default: () => {} },
taskId: {
type: [String, Number],
default: '1209161'
} }
}, },
components: {
Footer,
Header,
Configurable
},
data() { data() {
return { return {
baseInfo: [], //基础信息 resData: {},
ctxInfo: [], //内容信息 componentName: 'Configurable'
visitPlanInformation: '', // 拜访信息
cdInfo: [], // 传递信息
feedBackUrl: '', //反馈记录
forwardUrl: '', //转发记录
visitTargetType: '',
search: {
party: '' //party=1 工业 party=2乙方
},
maxLabelWidth: ''
}; };
}, },
async mounted() { created() {
await this.getCtxInfo().then(({ data: { data } }) => { makeSceneTaskInfo({ taskId: this.taskId }).then(res => {
this.cdInfo = data.cdInfo; this.resData = res.data;
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> </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 { <style>
content: ''; @import url('../style/index.css');
display: block;
width: 5px;
height: 100%;
background: #1989fa;
position: absolute;
left: 0;
top: 0;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!