main.vue
7.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!--
* @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: '', //转发记录
visitTatgetType: '',
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.visitTatgetType = data.visitTatgetType;
this.ctxInfo = createCtxInfo(this.visitTatgetType, 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: anywhere;
display: flex;
flex-wrap: wrap;
}
.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>