otherEnterpriseList.vue
11.7 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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<template>
<div style="background-color: #fafafa;">
<div class="mb10">
<div class="common_con w80">
<div class="search_bar">
<el-row>
<el-col :span="20">
<el-input placeholder="Symantec" v-model="state.queryParams.name" class="search_input">
<template #prepend>
<!-- <el-select v-model="state.country" placeholder="请选择国家" class="country_select" filterable>
<el-option label="中国" value="中国"></el-option>
</el-select>-->
<div class="cur_country">
<div class="select_country" @click="handleShowCountry">
<span>{{state.country}}</span>
<el-icon style="vertical-align: middle" class="ml5"><ArrowDown :class="{ 'rotate': state.isShowAllCountry }" class="rotatable"/></el-icon>
</div>
<div class="all_country" v-if="state.isShowAllCountry">
<el-input class="mb20" @input="handleChangeCountry" v-model="state.countryName" placeholder="请输入国家/地区名称搜索"></el-input>
<div class="country_level1">
<div class="country_list">
<template v-for="item in state.countryList" :key="item.jcCode">
<div v-if="item.isShow"
class="country_name"
@click="handleSelectCountry(item.gj, item.jcCode)">{{item.gj}}</div>
</template>
</div>
</div>
</div>
</div>
</template>
<template #prefix>
<el-icon class="el-input__icon"><Search /></el-icon>
</template>
</el-input>
</el-col>
<el-col :span="4">
<el-button @click="getList" type="primary" style="height: 60px; width: 100%;font-size: 24px">
<span>马上查</span>
</el-button>
</el-col>
</el-row>
<div class="search_title">
<span>若您在系统中未找到所需企业信息,请
<el-button type="primary" link @click="handleFeedback('feedback')">点击此处</el-button>
向我们反馈,我们承诺在2个工作日内与您联系!</span>
</div>
</div>
</div>
</div>
<div style="padding-bottom: 50px; min-height: 300px">
<div class="common_con w80 table_wrap">
<div class="loader_warp" v-if="state.isLoading">
<div class="loader"></div>
</div>
<template v-for="(item, index) in state.tableList" v-if="state.tableList.length < 150">
<el-row :gutter="40">
<el-col :span="24">
<el-descriptions>
<template #title>
<!-- <el-link :underline="false" :href="'/enterpriseDetail?name=' + item.name" :style="{'font-size': '22px'}">{{item.name}}</el-link>-->
<span :style="{'font-size': '22px', cursor: 'pointer'}" @click="toDetail(item)">{{item.name}}</span>
<el-tag class="ml20" type="primary">{{item.status}}</el-tag>
</template>
<template v-for="col in state.columnsList">
<el-descriptions-item v-if="col.prop != 'regStatus'" :label="col.label+ ':'" width="300px">
<template v-if="col.type === 'date'">
{{item[col.prop] && item[col.prop].substring(0, 10)}}
</template>
<template v-else-if="col.type === 'labels'">
{{(col.prop.map((label: any)=> {
return item[label]
})).filter(a=> {return a !== ""}).join(',')}}
</template>
<template v-else>
{{item[col.prop]}}
</template>
</el-descriptions-item>
</template>
<template #extra>
<el-button type="primary" icon="Download" link size="large" v-if="isHaveButton('front:reportOrder') && item.pdfUrl" @click="handleDownload('reportDownloadOpen', item)">下载报告</el-button>
<el-button type="primary" icon="Position" link size="large" v-if="isHaveButton('front:reportOrder')" @click="handleSubmit('reportOrderOpen', item)">报告下单</el-button>
</template>
</el-descriptions>
</el-col>
</el-row>
<el-divider />
</template>
<div class="no_data" v-if="state.tableList.length === 0 && !state.isLoading && !state.isSoMore">
<!-- <img src="./../assets/images/noData.png" alt="noData.png">-->
<el-image :src="getImage('noData.png','/home')" style="width: 260px"></el-image>
<div>暂未查询到相关企业!</div>
<div>
<el-button type="primary" link @click="handleFeedback('feedback')">点击此处</el-button>
可联系我们核实企业信息。
</div>
</div>
<div class="more_data" v-if="state.isSoMore">
<el-image :src="getImage('moreData.png','/home')" style="width: 260px"></el-image>
<div>您提供的信息不足以匹配到相关企业,请增加详细信息后重新尝试。</div>
</div>
<pagination
v-show="state.total > 0"
:total="state.total"
:page.sync="state.queryParams.pageNum"
:limit.sync="state.queryParams.pageSize"
@pagination="getList"
/>
<other-report-order title="海外报告下单"
:open="state.reportOrderOpen"
open-name="reportOrderOpen"
:is-show-footer="true"
:entryType="1"
@handleClose="handleClose"
>
</other-report-order>
<add-enterprise
title="海外企业信息核实"
:open="state.feedback"
open-name="feedback"
:is-show-footer="true"
@handleClose="handleClose"
>
</add-enterprise>
<report-download
title="报告下载"
:open="state.reportDownloadOpen"
open-name="reportDownloadOpen"
:is-show-footer="false"
@handleClose="handleClose"
:enterprise-name="state.curEnterpriseName"
>
</report-download>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import * as api from './../interface/api'
import OtherReportOrder from "../components/reportOrder/otherReportOrder.vue";
import AddEnterprise from "../components/reportOrder/addEnterprise.vue";
import ReportDownload from "../components/reportOrder/reportDownload.vue";
import { orderInfo } from './../store/index'
let orderInfoAct = orderInfo()
import router from "./../router/index"
import {isHaveButton} from "../utils/until.ts";
import {getToken} from "../utils/auth.ts";
import getImage from "../assets/getImage.ts";
const route = useRoute();
let state = reactive({
tableList: [],
columnsList: [
{
label: "城市",
prop: "city"
}, {
label: "法律形式",
prop: "legalform"
}, {
label: "公司注册号码",
prop: "regnr",
type: 'date'
}, {
label: "公司地址",
prop: ["postcode", "street", "county"],
type: "labels"
}
],
total: 0,
queryParams: {
name: "",
countrycode: "",
},
reportOrderOpen: false,
isLoading: false,
feedback: false,
reportDownloadOpen: false,
curEnterpriseName: "",
country: "",
isShowAllCountry: false,
countryList: [],
countryName: "",
isSoMore: false,
}) as any;
let getList = () => {
state.isLoading = true
state.tableList = []
state.isSoMore = false
api.getInfoList(state.queryParams, "/web/worldBox/search").then((res: any)=> {
if (res.code == 2000) {
state.tableList = res.data
} else if (res.code == 3001){
state.isSoMore = true
}
}).finally(()=> {
state.isLoading = false
})
}
let toDetail = (item: Object) => {
// orderInfoAct.setProjectInfo(item)
localStorage.setItem('projectInfo', JSON.stringify(item))
router.push('/otherEnterpriseDetail?name=' + item.name)
}
// 立即下单
let handleSubmit = (name: string, row: object) => {
state[name] = true
orderInfoAct.setProjectInfo(row)
}
let handleDownload = (name: string, row: object) => {
state[name] = true
state.curEnterpriseName = row.name
}
let getIndex = (index: number) => {
if (index < 10) {
return index
} else if (index < 20) {
return index - 10
} else if (index < 30) {
return index - 20
}
}
let handleClose = (name: string, value: boolean, isRefresh: boolean) => {
state[name] = value
}
let handleFeedback = (name: string) => {
state[name] = true
}
let handleShowCountry = () => {
state.isShowAllCountry = !state.isShowAllCountry
}
let getCountryList = () => {
api.getInfoList({},'/web/worldBox/getAllCountry').then((res: any)=> {
state.countryList = res.data
state.countryList.forEach((item: any)=> {
item.isShow = true
if (item.jcCode === state.queryParams.countrycode) {
state.country = item.gj
}
if (item.jcCode === "CN") {
state.countryList.splice(state.countryList.indexOf(item), 1)
}
})
})
}
let handleChangeCountry = (val: string) => {
state.countryList.forEach((item: any)=> {
if (item.gj.includes(val)) {
item.isShow = true
} else {
item.isShow = false
}
})
}
let handleSelectCountry = (name: string, jcCode: string) => {
state.isShowAllCountry = !state.isShowAllCountry
state.country = name
state.queryParams.countrycode = jcCode
}
onMounted(()=> {
state.queryParams.name = route.query.name
state.queryParams.countrycode = route.query.country
getList()
getCountryList()
})
</script>
<style scoped lang="scss">
.el-main {
background-color: #fafafa;
}
.search_bar {
width: 80%;
margin: 30px auto;
.search_input {
height: 60px;
font-size: 18px;
margin-bottom: 20px;
}
.search_title {
color: #999999;
}
}
.no_data, .more_data {
padding-top: 50px;
text-align: center;
color: #999999;
}
.center_col {
display: flex;
align-items: center;
justify-content: center;
}
.col_title {
text-align: center;
border-radius: 10px;
color: #ffffff;
font-size: 22px;
padding: 5px;
position: absolute;
right: 0;
div {
letter-spacing: 10px;
padding-left: 10px;
}
&.title_color_0, &.title_color_5 {
background-color: #93BBF2;
}
&.title_color_1, &.title_color_6 {
background-color: #93DDF2;
}
&.title_color_2, &.title_color_7 {
background-color: #B693F2;
}
&.title_color_3, &.title_color_8 {
background-color: #F6AEAE;
}
&.title_color_4, &.title_color_9 {
background-color: #EEC5AB;
}
}
.all_country {
position: absolute;
top: 60px;
left: 0;
background: #f8f8f8;
z-index: 1;
padding: 20px;
.country_level1 {
display: flex;
.level1_name {
width: 100px;
padding: 10px 0;
}
.country_list {
width: 1100px;
height: 300px;
overflow-y: scroll;
.country_name {
float: left;
width: 20%;
cursor: pointer;
padding: 10px 0;
}
}
}
}
</style>