Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fulixin
dsk-operate-sys-cscec
Commits
69ceb835
Commit
69ceb835
authored
Oct 27, 2023
by
danfuman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e967da69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
815 additions
and
809 deletions
+815
-809
index.vue
dsk-operate-ui/src/views/custom/customList/index.vue
+815
-809
No files found.
dsk-operate-ui/src/views/custom/customList/index.vue
View file @
69ceb835
...
@@ -19,38 +19,38 @@
...
@@ -19,38 +19,38 @@
<el-form
ref=
"queryForm"
:model=
"searchParam"
:inline=
"true"
size=
"small"
>
<el-form
ref=
"queryForm"
:model=
"searchParam"
:inline=
"true"
size=
"small"
>
<el-form-item>
<el-form-item>
<el-cascader
ref=
"address1"
:class=
"[`select-adaptive-$
{inputID1}`]" :options="addressList" :props="addressProps" v-model="address"
<el-cascader
ref=
"address1"
:class=
"[`select-adaptive-$
{inputID1}`]" :options="addressList" :props="addressProps" v-model="address"
@change="iptAdaptive(inputID1,true)" placeholder="地区选择" collapse-tags style="width: 130px;" clearable>
</el-cascader>
@change="iptAdaptive(inputID1,true)" placeholder="地区选择" collapse-tags style="width: 130px;" clearable>
</el-cascader>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"companyNatures"
>
<el-form-item
prop=
"companyNatures"
>
<el-select
v-model=
"searchParam.companyNatures"
:class=
"[`select-adaptive-$
{inputID2}`]" style="width: 130px;"
<el-select
v-model=
"searchParam.companyNatures"
:class=
"[`select-adaptive-$
{inputID2}`]" style="width: 130px;"
@change="iptAdaptive(inputID2,true)" multiple collapse-tags clearable class="form-content-width" placeholder="客户性质">
@change="iptAdaptive(inputID2,true)" multiple collapse-tags clearable class="form-content-width" placeholder="客户性质">
<el-option
v-for=
"(item, index) in companyNaturelist"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
<el-option
v-for=
"(item, index) in companyNaturelist"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"isOn"
>
<el-form-item
prop=
"isOn"
>
<el-select
v-model=
"searchParam.isOn"
:class=
"[`select-adaptive-$
{inputID3}`]" filterable clearable style="width: 130px;"
<el-select
v-model=
"searchParam.isOn"
:class=
"[`select-adaptive-$
{inputID3}`]" filterable clearable style="width: 130px;"
@change="iptAdaptive(inputID3)" class="form-content-width" placeholder="上市公司">
@change="iptAdaptive(inputID3)" class="form-content-width" placeholder="上市公司">
<el-option
v-for=
"(item, index) in isMajorlist"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
<el-option
v-for=
"(item, index) in isMajorlist"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"creditLevels"
>
<el-form-item
prop=
"creditLevels"
>
<el-select
v-model=
"searchParam.creditLevels"
:class=
"[`select-adaptive-$
{inputID4}`]" style="width: 130px;"
<el-select
v-model=
"searchParam.creditLevels"
:class=
"[`select-adaptive-$
{inputID4}`]" style="width: 130px;"
@change="iptAdaptive(inputID4,true)" multiple collapse-tags clearable class="form-content-width" placeholder="资信评级">
@change="iptAdaptive(inputID4,true)" multiple collapse-tags clearable class="form-content-width" placeholder="资信评级">
<el-option
v-for=
"(item, index) in creditLevellist"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
<el-option
v-for=
"(item, index) in creditLevellist"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"companyName"
>
<el-form-item
prop=
"companyName"
>
<div
class=
"normal-search-container"
:class=
"
{'is-hover-search' : searchHoverStatus}" @mouseover="searchHover($event)"
<div
class=
"normal-search-container"
:class=
"
{'is-hover-search' : searchHoverStatus}" @mouseover="searchHover($event)"
@mouseleave="searchUnHover($event,form)">
@mouseleave="searchUnHover($event,form)">
<img
src=
"@/assets/images/enterprise/enterprise-search-icon.svg"
alt=
""
>
<img
src=
"@/assets/images/enterprise/enterprise-search-icon.svg"
alt=
""
>
<span
v-show=
"!searchHoverStatus && !searchParam.companyName"
>
搜索
</span>
<span
v-show=
"!searchHoverStatus && !searchParam.companyName"
>
搜索
</span>
<el-input
v-model=
"searchParam.companyName"
placeholder=
"输入关键词查询"
style=
"width:238px;"
@
focus=
"searchFocus($event)"
<el-input
v-model=
"searchParam.companyName"
placeholder=
"输入关键词查询"
style=
"width:238px;"
@
focus=
"searchFocus($event)"
@
blur=
"searchBlur($event)"
@
input=
"value => searchInput(value)"
v-show=
"searchHoverStatus || searchParam.companyName"
@
blur=
"searchBlur($event)"
@
input=
"value => searchInput(value)"
v-show=
"searchHoverStatus || searchParam.companyName"
@
keydown
.
native
.
enter=
"handleSearch"
>
@
keydown
.
native
.
enter=
"handleSearch"
>
<template
slot=
"suffix"
>
<template
slot=
"suffix"
>
<transition
mode=
"out-in"
appear
name=
"fade"
>
<transition
mode=
"out-in"
appear
name=
"fade"
>
<img
src=
"@/assets/images/enterprise/search-input-clear-icon.svg"
alt=
""
<img
src=
"@/assets/images/enterprise/search-input-clear-icon.svg"
alt=
""
@
click
.
stop=
"searchParam.companyName = '';handleSearch"
v-show=
"showClearIcon"
>
@
click
.
stop=
"searchParam.companyName = '';handleSearch"
v-show=
"showClearIcon"
>
</transition>
</transition>
</
template
>
</
template
>
</el-input>
</el-input>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<skeleton
v-if=
"isSkeleton"
></skeleton>
<skeleton
v-if=
"isSkeleton"
></skeleton>
<div
class=
"table-item"
>
<div
class=
"table-item"
>
<el-table
v-show=
"!isSkeleton&&tableData.total > 0"
class=
"fixed-table"
v-horizontal-scroll=
"'hover'"
ref=
"thistables"
<el-table
v-show=
"!isSkeleton&&tableData.total > 0"
class=
"fixed-table"
v-horizontal-scroll=
"'hover'"
ref=
"thistables"
:data=
"tableData.rows"
stripe
border
style=
"width: 100%"
>
:data=
"tableData.rows"
stripe
border
style=
"width: 100%"
>
<el-table-column
prop=
"index"
label=
"序号"
fixed=
"left"
width=
"60"
>
<el-table-column
prop=
"index"
label=
"序号"
fixed=
"left"
width=
"60"
>
<
template
slot-scope=
'scope'
>
<
template
slot-scope=
'scope'
>
<span>
{{
(
searchParam
.
pageNum
-
1
)
*
searchParam
.
pageSize
+
scope
.
$index
+
1
}}
</span>
<span>
{{
(
searchParam
.
pageNum
-
1
)
*
searchParam
.
pageSize
+
scope
.
$index
+
1
}}
</span>
...
@@ -83,11 +83,11 @@
...
@@ -83,11 +83,11 @@
<div
class=
"ps3"
>
<div
class=
"ps3"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"写跟进"
placement=
"top"
transition=
""
:open-delay=
"450"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"写跟进"
placement=
"top"
transition=
""
:open-delay=
"450"
>
<div
@
click=
"toDetail(scope.row,'gjjl')"
><img
class=
"i"
src=
"@/assets/images/project/edit_1.png"
><img
class=
"o"
<div
@
click=
"toDetail(scope.row,'gjjl')"
><img
class=
"i"
src=
"@/assets/images/project/edit_1.png"
><img
class=
"o"
src=
"@/assets/images/project/edit_11.png"
></div>
src=
"@/assets/images/project/edit_11.png"
></div>
</el-tooltip>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑信息"
placement=
"top"
transition=
""
:open-delay=
"450"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑信息"
placement=
"top"
transition=
""
:open-delay=
"450"
>
<div
@
click=
"toDetail(scope.row,'business')"
><img
class=
"i"
src=
"@/assets/images/project/edit_2.png"
><img
class=
"o"
<div
@
click=
"toDetail(scope.row,'business')"
><img
class=
"i"
src=
"@/assets/images/project/edit_2.png"
><img
class=
"o"
src=
"@/assets/images/project/edit_22.png"
></div>
src=
"@/assets/images/project/edit_22.png"
></div>
</el-tooltip>
</el-tooltip>
</div>
</div>
</div>
</div>
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
</div>
</div>
<div
class=
"bottems"
v-if=
"tableData.total>searchParam.pageSize"
>
<div
class=
"bottems"
v-if=
"tableData.total>searchParam.pageSize"
>
<el-pagination
background
:page-size=
"searchParam.pageSize"
:current-page=
"searchParam.pageNum"
@
current-change=
"handleCurrentChange"
<el-pagination
background
:page-size=
"searchParam.pageSize"
:current-page=
"searchParam.pageNum"
@
current-change=
"handleCurrentChange"
layout=
"prev, pager, next"
:total=
"tableData.total"
>
layout=
"prev, pager, next"
:total=
"tableData.total"
>
</el-pagination>
</el-pagination>
</div>
</div>
</div>
</div>
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
<el-input
type=
"text"
placeholder=
"请输入"
v-model=
"queryParam.companyName"
@
input=
"getCompany(1)"
></el-input>
<el-input
type=
"text"
placeholder=
"请输入"
v-model=
"queryParam.companyName"
@
input=
"getCompany(1)"
></el-input>
<div
class=
"resultlist infinite-list"
v-if=
"showlist"
id=
"box"
v-infinite-scroll=
"load"
style=
"overflow:auto"
>
<div
class=
"resultlist infinite-list"
v-if=
"showlist"
id=
"box"
v-infinite-scroll=
"load"
style=
"overflow:auto"
>
<div
class=
"infinite-list-item"
v-for=
"(item,index) in companData"
@
click=
"selCompany(item)"
><span
v-html=
"item.name"
<div
class=
"infinite-list-item"
v-for=
"(item,index) in companData"
@
click=
"selCompany(item)"
><span
v-html=
"item.name"
:key=
"companypage"
></span></div>
:key=
"companypage"
></span></div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户等级:"
class=
"row"
>
<el-form-item
label=
"客户等级:"
class=
"row"
>
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"企业注册地:"
class=
"row"
>
<el-form-item
label=
"企业注册地:"
class=
"row"
>
<el-cascader
:props=
"props"
@
change=
"getAddr($event)"
ref=
"address"
v-model=
"queryParam.address"
:options=
"addressList"
<el-cascader
:props=
"props"
@
change=
"getAddr($event)"
ref=
"address"
v-model=
"queryParam.address"
:options=
"addressList"
clearable
></el-cascader>
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item
label=
"统一社会信用代码:"
class=
"row"
>
<el-form-item
label=
"统一社会信用代码:"
class=
"row"
>
<el-input
type=
"text"
placeholder=
"请输入"
v-model=
"queryParam.creditCode"
></el-input>
<el-input
type=
"text"
placeholder=
"请输入"
v-model=
"queryParam.creditCode"
></el-input>
...
@@ -240,914 +240,920 @@
...
@@ -240,914 +240,920 @@
</template>
</template>
<
script
>
<
script
>
import
{
getToken
}
from
'@/utils/auth'
;
import
{
getToken
}
from
'@/utils/auth'
;
import
'@/assets/styles/project.scss'
;
import
'@/assets/styles/project.scss'
;
import
{
addCustomer
,
getCustomerList
,
importData
}
from
'@/api/custom/custom'
;
import
{
addCustomer
,
getCustomerList
,
importData
}
from
'@/api/custom/custom'
;
import
{
getDictType
,
getEnterprise
}
from
'@/api/main'
;
import
{
getDictType
,
getEnterprise
}
from
'@/api/main'
;
import
prvinceTree
from
'@/assets/json/provinceTree'
;
import
prvinceTree
from
'@/assets/json/provinceTree'
;
import
batchimport
from
'../../project/projectList/component/batchImport'
;
import
batchimport
from
'../../project/projectList/component/batchImport'
;
import
skeleton
from
'../../project/projectList/component/skeleton'
;
import
skeleton
from
'../../project/projectList/component/skeleton'
;
import
{
encodeStr
}
from
'@/assets/js/common'
;
import
{
encodeStr
}
from
'@/assets/js/common'
;
import
{
v4
}
from
"uuid"
;
import
{
v4
}
from
"uuid"
;
export
default
{
export
default
{
name
:
'CustomList'
,
name
:
'CustomList'
,
components
:
{
batchimport
,
skeleton
},
components
:
{
batchimport
,
skeleton
},
data
()
{
data
()
{
return
{
return
{
encodeStr
,
encodeStr
,
pldr
:
false
,
pldr
:
false
,
types
:
'custom'
,
types
:
'custom'
,
searchParam
:
{
searchParam
:
{
companyName
:
''
,
companyName
:
''
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
20
pageSize
:
20
},
address
:
''
,
props
:
{
checkStrictly
:
true
,
expandTrigger
:
'hover'
},
dialogVisible
:
false
,
textarea
:
""
,
nowedit
:
-
1
,
//当前正在编辑的文本
tipslit
:
[],
//项目标签
tipsvalue
:
""
,
//标签填写内容
tableData
:
[],
//列表
companData
:
[],
//联想企业列表
addressProps
:
{
multiple
:
true
,
expandTrigger
:
'hover'
},
//上市公司
isMajorlist
:
[
{
dictValue
:
0
,
dictLabel
:
'否'
,
},
},
{
address
:
''
,
dictValue
:
1
,
props
:
{
checkStrictly
:
true
,
expandTrigger
:
'hover'
},
dictLabel
:
'是'
,
dialogVisible
:
false
,
}
textarea
:
""
,
],
nowedit
:
-
1
,
//当前正在编辑的文本
companyNaturelist
:
[],
//客户性质
tipslit
:
[],
//项目标签
creditLevellist
:
[],
//资信评级
tipsvalue
:
""
,
//标签填写内容
customerLevel
:
[],
//客户等级
tableData
:
[],
//列表
addressList
:
[],
//地区
companData
:
[],
//联想企业列表
//添加客户
addressProps
:
{
queryParam
:
{
multiple
:
true
,
companyId
:
''
,
//jsk企业id
expandTrigger
:
'hover'
companyName
:
''
,
//客户名称(企业名称
},
customerLevel
:
''
,
//客户等级
//上市公司
legalPerson
:
''
,
//法定代表人
isMajorlist
:
[
registerCapital
:
''
,
//注册资本
{
registerAddress
:
''
,
//企业注册地址
dictValue
:
0
,
creditCode
:
''
,
//社会统一信用代码
dictLabel
:
'否'
,
address
:
''
,
//选择的地址
},
provinceId
:
''
,
{
cityId
:
''
,
dictValue
:
1
,
districtId
:
''
,
dictLabel
:
'是'
,
},
}
rules
:
{
],
companyName
:
[{
required
:
true
,
message
:
'请输入非空格字符!'
,
trigger
:
'blur'
},]
companyNaturelist
:
[],
//客户性质
},
creditLevellist
:
[],
//资信评级
//批量导入
customerLevel
:
[],
//客户等级
action
:
process
.
env
.
VUE_APP_BASE_API
+
"/customer/importData"
,
addressList
:
[],
//地区
fileList
:
[],
//添加客户
headers
:
{
queryParam
:
{
Authorization
:
"Bearer "
+
getToken
(),
companyId
:
''
,
//jsk企业id
},
companyName
:
''
,
//客户名称(企业名称
// isNew:true,
customerLevel
:
''
,
//客户等级
showlist
:
false
,
legalPerson
:
''
,
//法定代表人
keys
:
1
,
registerCapital
:
''
,
//注册资本
isSkeleton
:
true
,
registerAddress
:
''
,
//企业注册地址
companypage
:
1
,
creditCode
:
''
,
//社会统一信用代码
isscroll
:
false
,
address
:
''
,
//选择的地址
inputID1
:
this
.
getUid
(),
provinceId
:
''
,
inputID2
:
this
.
getUid
(),
cityId
:
''
,
inputID3
:
this
.
getUid
(),
districtId
:
''
,
inputID4
:
this
.
getUid
(),
},
showSearchBox
:
false
,
rules
:
{
searchHoverStatus
:
false
,
companyName
:
[{
required
:
true
,
message
:
'请输入非空格字符!'
,
trigger
:
'blur'
},]
showClearIcon
:
false
},
};
//批量导入
},
action
:
process
.
env
.
VUE_APP_BASE_API
+
"/customer/importData"
,
created
()
{
fileList
:
[],
if
(
this
.
$route
.
query
.
key
)
{
headers
:
{
this
.
searchParam
.
companyName
=
this
.
$route
.
query
.
key
;
Authorization
:
"Bearer "
+
getToken
(),
}
},
if
(
this
.
$route
.
query
.
type
===
'1'
)
{
// isNew:true,
this
.
searchParam
.
companyNatures
=
[
'国有企业'
];
showlist
:
false
,
}
keys
:
1
,
if
(
this
.
$route
.
query
.
type
===
'2'
)
{
isSkeleton
:
true
,
this
.
searchParam
.
companyNatures
=
[
'央企'
];
companypage
:
1
,
}
isscroll
:
false
,
if
(
this
.
$route
.
query
.
type
===
'3'
)
{
inputID1
:
this
.
getUid
(),
this
.
searchParam
.
companyNatures
=
[
'事业单位'
,
'机关单位'
];
inputID2
:
this
.
getUid
(),
}
inputID3
:
this
.
getUid
(),
this
.
$watch
(()
=>
this
.
$route
.
params
,
()
=>
{
inputID4
:
this
.
getUid
(),
this
.
getCustomerList
();
showSearchBox
:
false
,
this
.
getDictType
();
searchHoverStatus
:
false
,
this
.
prvinceTree
();
showClearIcon
:
false
this
.
handleQuery
();
};
this
.
searchParam
.
companyName
=
''
;
},
// 组件创建完后获取数据,
// 此时 data 已经被 observed 了
{
immediate
:
true
}
);
},
methods
:
{
searchFocus
(
event
)
{
const
{
target
}
=
event
;
if
(
target
?.
value
?.
length
)
{
this
.
showClearIcon
=
true
;
}
},
searchBlur
(
event
)
{
this
.
showClearIcon
=
false
;
},
searchInput
(
value
)
{
if
(
value
?.
length
)
{
this
.
showClearIcon
=
true
;
}
},
searchHover
(
event
)
{
this
.
searchHoverStatus
=
true
;
},
},
searchUnHover
(
event
)
{
created
(
)
{
if
(
!
this
.
searchParam
.
companyName
)
{
if
(
this
.
$route
.
query
.
key
)
{
this
.
search
HoverStatus
=
false
;
this
.
search
Param
.
companyName
=
this
.
$route
.
query
.
key
;
}
}
},
if
(
this
.
$route
.
query
.
type
===
'1'
)
{
async
handleQuery
()
{
this
.
searchParam
.
companyNatures
=
[
'国有企业'
];
let
[
type1
,
type2
]
=
await
Promise
.
all
([
getDictType
(
'company_nature_type'
),
getDictType
(
'credit_level_type'
),
]);
if
(
type1
.
code
==
200
)
{
type1
.
data
.
forEach
(
item
=>
{
this
.
companyNaturelist
.
push
({
dictLabel
:
item
.
dictLabel
,
dictValue
:
item
.
dictLabel
});
});
}
}
if
(
type2
.
code
==
200
)
{
if
(
this
.
$route
.
query
.
type
===
'2'
)
{
type2
.
data
.
forEach
(
item
=>
{
this
.
searchParam
.
companyNatures
=
[
'央企'
];
this
.
creditLevellist
.
push
({
dictLabel
:
item
.
dictLabel
,
dictValue
:
item
.
dictLabel
});
});
}
}
},
if
(
this
.
$route
.
query
.
type
===
'3'
)
{
sq1
(
item
,
sq
)
{
this
.
searchParam
.
companyNatures
=
[
'事业单位'
,
'机关单位'
];
this
.
$nextTick
(()
=>
{
item
.
sq1
=
sq
;
this
.
keys
++
;
});
},
sq2
(
item
,
sq
)
{
this
.
$nextTick
(()
=>
{
item
.
sq2
=
sq
;
this
.
keys
++
;
});
},
handleALL
(
event
)
{
var
one
=
document
.
getElementById
(
"box"
);
if
(
one
)
{
if
(
!
one
.
contains
(
event
.
target
))
{
this
.
showlist
=
false
;
}
}
}
this
.
getCustomerList
();
this
.
getDictType
();
this
.
prvinceTree
();
this
.
handleQuery
();
this
.
searchParam
.
companyName
=
''
;
// this.$watch(() => this.$route.params, () => {
// this.getCustomerList();
// this.getDictType();
// this.prvinceTree();
// this.handleQuery();
// this.searchParam.companyName = '';
// },
// // 组件创建完后获取数据,
// // 此时 data 已经被 observed 了
// { immediate: true }
// );
},
},
toct
()
{
methods
:
{
this
.
dialogVisible
=
false
;
searchFocus
(
event
)
{
this
.
$router
.
push
({
path
:
'/macro/urban'
});
const
{
target
}
=
event
;
},
if
(
target
?.
value
?.
length
)
{
getDictType
()
{
this
.
showClearIcon
=
true
;
//获取客户等级
getDictType
(
'customer_level_type'
).
then
(
result
=>
{
this
.
customerLevel
=
result
.
code
==
200
?
result
.
data
:
[];
});
},
pldrs
()
{
this
.
pldr
=
true
;
},
cancelimport
()
{
this
.
pldr
=
false
;
},
//获取客户列表
getCustomerList
()
{
let
params
=
this
.
searchParam
;
if
(
this
.
address
.
length
>
0
)
{
let
arr
=
this
.
$refs
.
address1
.
getCheckedNodes
();
let
provinceCode
=
[],
cityCode
=
[],
countyCode
=
[];
for
(
var
i
in
arr
)
{
if
(
arr
[
i
].
parent
)
{
if
(
!
arr
[
i
].
parent
.
checked
)
{
arr
[
i
].
hasChildren
&&
cityCode
.
push
(
arr
[
i
].
value
);
!
arr
[
i
].
hasChildren
&&
countyCode
.
push
(
arr
[
i
].
value
);
}
}
else
{
provinceCode
.
push
(
arr
[
i
].
value
);
}
}
if
(
provinceCode
.
length
>
0
)
{
params
.
provinceIds
=
provinceCode
;
}
}
if
(
cityCode
.
length
>
0
)
{
},
params
.
cityIds
=
cityCode
;
searchBlur
(
event
)
{
this
.
showClearIcon
=
false
;
},
searchInput
(
value
)
{
if
(
value
?.
length
)
{
this
.
showClearIcon
=
true
;
}
}
if
(
countyCode
.
length
>
0
)
{
},
params
.
districtIds
=
countyCode
;
searchHover
(
event
)
{
this
.
searchHoverStatus
=
true
;
},
searchUnHover
(
event
)
{
if
(
!
this
.
searchParam
.
companyName
)
{
this
.
searchHoverStatus
=
false
;
}
}
}
else
{
},
if
(
params
.
provinceIds
)
{
async
handleQuery
()
{
delete
params
.
provinceIds
;
let
[
type1
,
type2
]
=
await
Promise
.
all
([
getDictType
(
'company_nature_type'
),
getDictType
(
'credit_level_type'
),
]);
if
(
type1
.
code
==
200
)
{
type1
.
data
.
forEach
(
item
=>
{
this
.
companyNaturelist
.
push
({
dictLabel
:
item
.
dictLabel
,
dictValue
:
item
.
dictLabel
});
});
}
}
if
(
params
.
cityIds
)
{
if
(
type2
.
code
==
200
)
{
delete
params
.
cityIds
;
type2
.
data
.
forEach
(
item
=>
{
this
.
creditLevellist
.
push
({
dictLabel
:
item
.
dictLabel
,
dictValue
:
item
.
dictLabel
});
});
console
.
log
(
this
.
creditLevellist
)
}
}
if
(
params
.
districtIds
)
{
},
delete
params
.
districtIds
;
sq1
(
item
,
sq
)
{
this
.
$nextTick
(()
=>
{
item
.
sq1
=
sq
;
this
.
keys
++
;
});
},
sq2
(
item
,
sq
)
{
this
.
$nextTick
(()
=>
{
item
.
sq2
=
sq
;
this
.
keys
++
;
});
},
handleALL
(
event
)
{
var
one
=
document
.
getElementById
(
"box"
);
if
(
one
)
{
if
(
!
one
.
contains
(
event
.
target
))
{
this
.
showlist
=
false
;
}
}
}
},
}
toct
()
{
getCustomerList
(
params
).
then
(
result
=>
{
this
.
dialogVisible
=
false
;
this
.
isSkeleton
=
false
;
this
.
$router
.
push
({
path
:
'/macro/urban'
});
this
.
tableData
=
result
;
},
this
.
tableData
.
rows
.
forEach
(
item
=>
{
getDictType
()
{
item
.
registerCapital
=
item
.
registerCapital
==
null
?
null
:
item
.
registerCapital
.
replace
(
/^
\D
*
(\d
*
(?:\.\d{0,6})?)
.*$/g
,
'$1'
);
//获取客户等级
if
(
item
.
mainBusiness
!=
""
&&
item
.
mainBusiness
!=
null
&&
item
.
mainBusiness
.
length
>
84
)
{
getDictType
(
'customer_level_type'
).
then
(
result
=>
{
item
.
mainBusiness1
=
item
.
mainBusiness
.
substring
(
0
,
81
);
this
.
customerLevel
=
result
.
code
==
200
?
result
.
data
:
[];
item
.
sq1
=
true
;
});
}
else
{
},
item
.
sq1
=
false
;
pldrs
()
{
this
.
pldr
=
true
;
},
cancelimport
()
{
this
.
pldr
=
false
;
},
//获取客户列表
getCustomerList
()
{
let
params
=
this
.
searchParam
;
if
(
this
.
address
.
length
>
0
)
{
let
arr
=
this
.
$refs
.
address1
.
getCheckedNodes
();
let
provinceCode
=
[],
cityCode
=
[],
countyCode
=
[];
for
(
var
i
in
arr
)
{
if
(
arr
[
i
].
parent
)
{
if
(
!
arr
[
i
].
parent
.
checked
)
{
arr
[
i
].
hasChildren
&&
cityCode
.
push
(
arr
[
i
].
value
);
!
arr
[
i
].
hasChildren
&&
countyCode
.
push
(
arr
[
i
].
value
);
}
}
else
{
provinceCode
.
push
(
arr
[
i
].
value
);
}
}
}
if
(
item
.
companyAttribute
!=
""
&&
item
.
companyAttribute
!=
null
&&
item
.
companyAttribute
.
length
>
84
)
{
if
(
provinceCode
.
length
>
0
)
{
item
.
companyAttribute1
=
item
.
companyAttribute
.
substring
(
0
,
81
);
params
.
provinceIds
=
provinceCode
;
item
.
sq2
=
true
;
}
else
{
item
.
sq2
=
false
;
}
}
// console.log(item)
if
(
cityCode
.
length
>
0
)
{
});
params
.
cityIds
=
cityCode
;
});
}
},
if
(
countyCode
.
length
>
0
)
{
//跳转到客户详情
params
.
districtIds
=
countyCode
;
toDetail
(
row
,
type
)
{
}
let
customerId
=
row
.
customerId
;
}
else
{
let
companyId
=
row
.
companyId
;
if
(
params
.
provinceIds
)
{
let
path
=
type
;
delete
params
.
provinceIds
;
// if(type == "" && companyId == null){
// path = 'business'
// }
this
.
$router
.
push
({
path
:
'/enterprise/'
+
encodeStr
(
companyId
),
query
:
{
customerId
:
customerId
,
path
:
path
}
});
},
handleSearch
()
{
this
.
$nextTick
(()
=>
{
this
.
searchParam
.
pageNum
=
1
;
this
.
getCustomerList
();
});
},
clearname
(
value
)
{
if
(
value
==
""
)
{
this
.
handleCurrentChange
(
1
);
}
},
//翻页
handleCurrentChange
(
val
)
{
this
.
isSkeleton
=
true
;
this
.
pldr
=
false
;
// this.isNew = false
this
.
searchParam
.
pageNum
=
val
;
this
.
getCustomerList
();
},
//打开新建窗口
opennew
()
{
this
.
dialogVisible
=
true
;
},
getAddr
(
obj
)
{
if
(
obj
.
length
==
0
)
{
this
.
queryParam
.
provinceId
=
''
;
this
.
queryParam
.
cityId
=
''
;
this
.
queryParam
.
districtId
=
''
;
return
false
;
}
let
labelString
=
this
.
$refs
.
address
.
getCheckedNodes
()[
0
].
pathLabels
.
join
(
"-"
);
this
.
queryParam
.
registerAddress
=
labelString
;
this
.
queryParam
.
provinceId
=
obj
[
0
];
this
.
queryParam
.
cityId
=
obj
.
length
>=
1
?
obj
[
1
]
:
''
;
this
.
queryParam
.
districtId
=
obj
.
length
>=
2
?
obj
[
2
]
:
''
;
},
//获取建设库客户
getCompany
(
value
)
{
this
.
queryParam
.
companyId
=
null
;
if
(
value
==
1
)
{
this
.
companData
=
[];
this
.
companypage
=
1
;
}
if
(
this
.
queryParam
.
companyName
.
length
>=
2
)
{
let
param
=
{
keyword
:
this
.
queryParam
.
companyName
,
page
:
{
limit
:
20
,
page
:
this
.
companypage
}
}
};
if
(
params
.
cityIds
)
{
getEnterprise
(
JSON
.
stringify
(
param
)).
then
(
result
=>
{
delete
params
.
cityIds
;
if
(
result
.
code
!=
200
)
{
return
false
;
}
}
if
(
result
.
data
.
list
!=
null
&&
result
.
data
.
list
.
length
>
0
)
{
if
(
params
.
districtIds
)
{
this
.
isscroll
=
true
;
delete
params
.
districtIds
;
if
(
this
.
companData
.
length
===
0
)
{
}
this
.
companData
=
result
.
data
.
list
;
}
getCustomerList
(
params
).
then
(
result
=>
{
this
.
isSkeleton
=
false
;
this
.
tableData
=
result
;
this
.
tableData
.
rows
.
forEach
(
item
=>
{
item
.
registerCapital
=
item
.
registerCapital
==
null
?
null
:
item
.
registerCapital
.
replace
(
/^
\D
*
(\d
*
(?:\.\d{0,6})?)
.*$/g
,
'$1'
);
if
(
item
.
mainBusiness
!=
""
&&
item
.
mainBusiness
!=
null
&&
item
.
mainBusiness
.
length
>
84
)
{
item
.
mainBusiness1
=
item
.
mainBusiness
.
substring
(
0
,
81
);
item
.
sq1
=
true
;
}
else
{
}
else
{
let
arr2
=
result
.
data
.
list
;
item
.
sq1
=
false
;
arr2
.
unshift
(
2
,
0
);
Array
.
prototype
.
splice
.
apply
(
this
.
companData
,
arr2
);
}
}
if
(
this
.
companData
.
length
===
0
)
{
if
(
item
.
companyAttribute
!=
""
&&
item
.
companyAttribute
!=
null
&&
item
.
companyAttribute
.
length
>
84
)
{
this
.
showlist
=
false
;
item
.
companyAttribute1
=
item
.
companyAttribute
.
substring
(
0
,
81
);
item
.
sq2
=
true
;
}
else
{
}
else
{
this
.
showlist
=
tru
e
;
item
.
sq2
=
fals
e
;
}
}
this
.
companypage
+=
1
;
// console.log(item)
}
else
{
});
this
.
isscroll
=
false
;
}
});
});
}
},
},
//跳转到客户详情
load
()
{
toDetail
(
row
,
type
)
{
if
(
this
.
isscroll
)
{
let
customerId
=
row
.
customerId
;
this
.
getCompany
(
2
);
let
companyId
=
row
.
companyId
;
}
let
path
=
type
;
},
// if(type == "" && companyId == null){
selCompany
(
item
)
{
// path = 'business'
this
.
queryParam
.
companyId
=
item
.
jskEid
;
// }
this
.
queryParam
.
companyName
=
item
.
name
.
replace
(
/<
[^
>
]
+>/g
,
''
);
this
.
$router
.
push
({
path
:
'/enterprise/'
+
encodeStr
(
companyId
),
query
:
{
customerId
:
customerId
,
path
:
path
}
});
this
.
queryParam
.
legalPerson
=
item
.
legalPerson
;
},
let
registeredCapitalStr
=
""
;
handleSearch
()
{
if
(
item
.
registeredCapitalStr
==
"0"
||
item
.
registeredCapitalStr
==
0
)
{
this
.
$nextTick
(()
=>
{
registeredCapitalStr
=
''
;
this
.
searchParam
.
pageNum
=
1
;
}
else
{
this
.
getCustomerList
();
registeredCapitalStr
=
item
.
registeredCapitalStr
;
});
}
},
this
.
queryParam
.
registerCapital
=
registeredCapitalStr
;
clearname
(
value
)
{
this
.
queryParam
.
creditCode
=
item
.
creditCode
;
if
(
value
==
""
)
{
this
.
queryParam
.
provinceId
=
item
.
provinceId
;
this
.
handleCurrentChange
(
1
);
this
.
queryParam
.
cityId
=
item
.
cityId
;
}
this
.
queryParam
.
districtId
=
item
.
cityId
;
},
//翻页
let
list
=
[];
handleCurrentChange
(
val
)
{
if
(
item
.
provinceId
!=
null
&&
item
.
provinceId
!=
""
)
this
.
isSkeleton
=
true
;
list
.
push
(
item
.
provinceId
);
this
.
pldr
=
false
;
if
(
item
.
cityId
!=
null
&&
item
.
cityId
!=
""
)
// this.isNew = false
list
.
push
(
item
.
cityId
);
this
.
searchParam
.
pageNum
=
val
;
if
(
item
.
districtId
!=
null
&&
item
.
districtId
!=
""
)
this
.
getCustomerList
();
list
.
push
(
item
.
districtId
);
},
this
.
$nextTick
(()
=>
{
//打开新建窗口
this
.
queryParam
.
address
=
list
;
opennew
()
{
let
_this
=
this
;
this
.
dialogVisible
=
true
;
setTimeout
(
function
()
{
},
if
(
_this
.
$refs
.
address
)
{
getAddr
(
obj
)
{
_this
.
queryParam
.
registerAddress
=
_this
.
$refs
.
address
.
getCheckedNodes
()[
0
].
pathLabels
.
join
(
"-"
);
if
(
obj
.
length
==
0
)
{
}
this
.
queryParam
.
provinceId
=
''
;
},
1000
);
this
.
queryParam
.
cityId
=
''
;
});
this
.
queryParam
.
districtId
=
''
;
this
.
showlist
=
false
;
return
false
;
},
}
//添加客户
let
labelString
=
this
.
$refs
.
address
.
getCheckedNodes
()[
0
].
pathLabels
.
join
(
"-"
);
submitForm
(
formName
)
{
this
.
queryParam
.
registerAddress
=
labelString
;
// if(this.queryParam.companyId=="" || this.queryParam.companyId == null){
this
.
queryParam
.
provinceId
=
obj
[
0
];
// this.$message.error({message:'请选择企业!',showClose:true})
this
.
queryParam
.
cityId
=
obj
.
length
>=
1
?
obj
[
1
]
:
''
;
//
this
.
queryParam
.
districtId
=
obj
.
length
>=
2
?
obj
[
2
]
:
''
;
// return;
},
// }
//获取建设库客户
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
getCompany
(
value
)
{
if
(
valid
)
{
this
.
queryParam
.
companyId
=
null
;
addCustomer
(
this
.
queryParam
).
then
(
result
=>
{
if
(
value
==
1
)
{
if
(
result
.
code
==
200
)
{
this
.
companData
=
[];
this
.
$message
.
success
(
'添加成功!'
);
this
.
companypage
=
1
;
this
.
dialogVisible
=
false
;
}
this
.
handleCurrentChange
(
1
);
if
(
this
.
queryParam
.
companyName
.
length
>=
2
)
{
this
.
resetForm
(
'ruleForm'
);
let
param
=
{
keyword
:
this
.
queryParam
.
companyName
,
page
:
{
limit
:
20
,
page
:
this
.
companypage
}
};
getEnterprise
(
JSON
.
stringify
(
param
)).
then
(
result
=>
{
if
(
result
.
code
!=
200
)
{
return
false
;
}
if
(
result
.
data
.
list
!=
null
&&
result
.
data
.
list
.
length
>
0
)
{
this
.
isscroll
=
true
;
if
(
this
.
companData
.
length
===
0
)
{
this
.
companData
=
result
.
data
.
list
;
}
else
{
let
arr2
=
result
.
data
.
list
;
arr2
.
unshift
(
2
,
0
);
Array
.
prototype
.
splice
.
apply
(
this
.
companData
,
arr2
);
}
if
(
this
.
companData
.
length
===
0
)
{
this
.
showlist
=
false
;
}
else
{
this
.
showlist
=
true
;
}
this
.
companypage
+=
1
;
}
else
{
}
else
{
this
.
$message
.
error
(
result
.
msg
)
;
this
.
isscroll
=
false
;
}
}
});
});
}
else
{
}
}
});
},
resetForm
(
formName
)
{
this
.
queryParam
=
{
companyId
:
''
,
//jsk企业id
companyName
:
''
,
//客户名称(企业名称
customerLevel
:
''
,
//客户等级
legalPerson
:
''
,
//法定代表人
registerCapital
:
''
,
//注册资本
registerAddress
:
''
,
//企业注册地址
creditCode
:
''
,
//社会统一信用代码
address
:
''
,
//选择的地址
provinceId
:
''
,
cityId
:
''
,
districtId
:
''
,
},
},
this
.
dialogVisible
=
false
;
load
()
{
this
.
showlist
=
false
;
if
(
this
.
isscroll
)
{
},
this
.
getCompany
(
2
);
}
},
selCompany
(
item
)
{
this
.
queryParam
.
companyId
=
item
.
jskEid
;
this
.
queryParam
.
companyName
=
item
.
name
.
replace
(
/<
[^
>
]
+>/g
,
''
);
this
.
queryParam
.
legalPerson
=
item
.
legalPerson
;
let
registeredCapitalStr
=
""
;
if
(
item
.
registeredCapitalStr
==
"0"
||
item
.
registeredCapitalStr
==
0
)
{
registeredCapitalStr
=
''
;
}
else
{
registeredCapitalStr
=
item
.
registeredCapitalStr
;
}
this
.
queryParam
.
registerCapital
=
registeredCapitalStr
;
this
.
queryParam
.
creditCode
=
item
.
creditCode
;
this
.
queryParam
.
provinceId
=
item
.
provinceId
;
this
.
queryParam
.
cityId
=
item
.
cityId
;
this
.
queryParam
.
districtId
=
item
.
cityId
;
//地区
let
list
=
[];
async
prvinceTree
()
{
if
(
item
.
provinceId
!=
null
&&
item
.
provinceId
!=
""
)
// await axios.post("https://files.jiansheku.com/file/json/common/provinceTree.json", {}, {
list
.
push
(
item
.
provinceId
);
// headers: {
if
(
item
.
cityId
!=
null
&&
item
.
cityId
!=
""
)
// 'Content-Type': 'application/json'
list
.
push
(
item
.
cityId
);
// }
if
(
item
.
districtId
!=
null
&&
item
.
districtId
!=
""
)
// }).then(res => {
list
.
push
(
item
.
districtId
);
// if (res.data.code == 200) {
this
.
$nextTick
(()
=>
{
// console.log(res.data.data)
this
.
queryParam
.
address
=
list
;
// }
let
_this
=
this
;
// })
setTimeout
(
function
()
{
// console.log(prvinceTree)
if
(
_this
.
$refs
.
address
)
{
this
.
addressList
=
prvinceTree
;
_this
.
queryParam
.
registerAddress
=
_this
.
$refs
.
address
.
getCheckedNodes
()[
0
].
pathLabels
.
join
(
"-"
);
this
.
getadd
(
this
.
addressList
);
}
},
},
1000
);
//处理注册地数据
getadd
(
row
)
{
this
.
addrcallback
(
row
,
this
.
getadd
);
},
addrcallback
(
row
,
callback
)
{
if
(
row
)
{
row
.
forEach
(
item
=>
{
item
.
value
=
item
.
id
;
callback
&&
callback
(
item
.
children
);
});
});
}
this
.
showlist
=
false
;
},
},
//输入数字
//添加客户
number
(
value
)
{
submitForm
(
formName
)
{
if
(
value
==
''
)
// if(this.queryParam.companyId=="" || this.queryParam.companyId == null){
this
.
queryParam
.
registerCapital
=
value
;
// this.$message.error({message:'请选择企业!',showClose:true})
else
//
this
.
queryParam
.
registerCapital
=
value
.
replace
(
/^
\D
*
(\d
*
(?:\.\d{0,6})?)
.*$/g
,
'$1'
);
//输入6位小数
// return;
},
// }
iptAdaptive
(
uid
,
multiple
=
false
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
multiple
?
this
.
multipleAdaptiveHandle
(
uid
)
:
this
.
iptAdaptiveHandle
(
uid
);
if
(
valid
)
{
},
addCustomer
(
this
.
queryParam
).
then
(
result
=>
{
getUid
()
{
if
(
result
.
code
==
200
)
{
return
v4
();
this
.
$message
.
success
(
'添加成功!'
);
},
this
.
dialogVisible
=
false
;
// 多选处理
this
.
handleCurrentChange
(
1
);
async
multipleAdaptiveHandle
(
uid
)
{
this
.
resetForm
(
'ruleForm'
);
try
{
}
else
{
await
this
.
$nextTick
();
this
.
$message
.
error
(
result
.
msg
);
const
dom
=
document
.
querySelector
(
`.select-adaptive-
${
uid
}
`
);
}
const
iptChild
=
dom
.
querySelector
(
".el-input__inner"
);
if
(
dom
)
{
const
textContainer
=
document
.
createElement
(
"span"
);
const
textName
=
`text-
${
uid
}
`
;
textContainer
.
classList
.
add
(
textName
);
const
selectChildren
=
dom
.
querySelectorAll
(
".el-tag"
);
if
(
selectChildren
.
length
)
{
let
width
=
0
;
selectChildren
.
forEach
(
item
=>
{
const
text
=
item
.
textContent
;
const
itemInfo
=
window
.
getComputedStyle
(
item
);
textContainer
.
style
.
setProperty
(
"visibility"
,
"hidden"
);
textContainer
.
style
.
setProperty
(
"display"
,
"inline-block"
);
textContainer
.
style
.
setProperty
(
"font-size"
,
"14px"
);
textContainer
.
style
.
setProperty
(
"padding"
,
itemInfo
.
padding
);
textContainer
.
style
.
setProperty
(
"box-sizing"
,
"border-box"
);
textContainer
.
textContent
=
text
;
document
.
body
.
append
(
textContainer
);
width
+=
textContainer
.
offsetWidth
+
parseInt
(
itemInfo
.
marginLeft
)
+
parseInt
(
itemInfo
.
marginRight
);
textContainer
.
remove
();
});
});
dom
.
style
.
setProperty
(
"width"
,
`
${
width
+
50
}
px`
);
}
else
{
this
.
handleSearch
();
return
;
}
}
textContainer
.
style
.
setProperty
(
"visibility"
,
"hidden"
);
});
textContainer
.
style
.
setProperty
(
"display"
,
"inline-block"
);
},
textContainer
.
style
.
setProperty
(
"font-size"
,
"14px"
);
resetForm
(
formName
)
{
textContainer
.
style
.
setProperty
(
"padding"
,
"0px 8px"
);
this
.
queryParam
=
{
textContainer
.
style
.
setProperty
(
"box-sizing"
,
"border-box"
);
companyId
:
''
,
//jsk企业id
textContainer
.
textContent
=
iptChild
.
getAttribute
(
"placeholder"
);
companyName
:
''
,
//客户名称(企业名称
document
.
body
.
append
(
textContainer
);
customerLevel
:
''
,
//客户等级
// let containerWidth = textContainer.offsetWidth + 12 + 8;
legalPerson
:
''
,
//法定代表人
let
containerWidth
=
130
;
registerCapital
:
''
,
//注册资本
textContainer
.
remove
();
registerAddress
:
''
,
//企业注册地址
dom
.
style
.
setProperty
(
"width"
,
`
${
containerWidth
}
px`
);
creditCode
:
''
,
//社会统一信用代码
this
.
handleSearch
();
address
:
''
,
//选择的地址
}
provinceId
:
''
,
cityId
:
''
,
districtId
:
''
,
},
this
.
dialogVisible
=
false
;
this
.
showlist
=
false
;
},
}
catch
(
error
)
{
//地区
console
.
log
(
error
);
async
prvinceTree
()
{
}
// await axios.post("https://files.jiansheku.com/file/json/common/provinceTree.json", {}, {
},
// headers: {
// 单选处理
// 'Content-Type': 'application/json'
async
iptAdaptiveHandle
(
uid
)
{
// }
try
{
// }).then(res => {
await
this
.
$nextTick
();
// if (res.data.code == 200) {
const
dom
=
document
.
querySelector
(
`.select-adaptive-
${
uid
}
`
);
// console.log(res.data.data)
const
realStyles
=
window
.
getComputedStyle
(
dom
);
// }
if
(
dom
)
{
// })
// console.log(prvinceTree)
this
.
addressList
=
prvinceTree
;
this
.
getadd
(
this
.
addressList
);
},
//处理注册地数据
getadd
(
row
)
{
this
.
addrcallback
(
row
,
this
.
getadd
);
},
addrcallback
(
row
,
callback
)
{
if
(
row
)
{
row
.
forEach
(
item
=>
{
item
.
value
=
item
.
id
;
callback
&&
callback
(
item
.
children
);
});
}
},
//输入数字
number
(
value
)
{
if
(
value
==
''
)
this
.
queryParam
.
registerCapital
=
value
;
else
this
.
queryParam
.
registerCapital
=
value
.
replace
(
/^
\D
*
(\d
*
(?:\.\d{0,6})?)
.*$/g
,
'$1'
);
//输入6位小数
},
iptAdaptive
(
uid
,
multiple
=
false
)
{
multiple
?
this
.
multipleAdaptiveHandle
(
uid
)
:
this
.
iptAdaptiveHandle
(
uid
);
},
getUid
()
{
return
v4
();
},
// 多选处理
async
multipleAdaptiveHandle
(
uid
)
{
try
{
await
this
.
$nextTick
();
const
dom
=
document
.
querySelector
(
`.select-adaptive-
${
uid
}
`
);
const
iptChild
=
dom
.
querySelector
(
".el-input__inner"
);
const
iptChild
=
dom
.
querySelector
(
".el-input__inner"
);
const
textContainer
=
document
.
createElement
(
"span"
);
if
(
dom
)
{
const
textName
=
`text-
${
uid
}
`
;
const
textContainer
=
document
.
createElement
(
"span"
);
textContainer
.
classList
.
add
(
textName
);
const
textName
=
`text-
${
uid
}
`
;
textContainer
.
style
.
setProperty
(
"visibility"
,
"hidden"
);
textContainer
.
classList
.
add
(
textName
);
textContainer
.
style
.
setProperty
(
"display"
,
"inline-block"
);
const
selectChildren
=
dom
.
querySelectorAll
(
".el-tag"
);
textContainer
.
style
.
setProperty
(
"font-size"
,
"14px"
);
if
(
selectChildren
.
length
)
{
const
hasPadding
=
(
parseInt
(
realStyles
.
paddingLeft
)
||
parseInt
(
realStyles
.
paddingRight
))
?
true
:
false
;
let
width
=
0
;
hasPadding
?
textContainer
.
style
.
setProperty
(
"padding"
,
"0px 8px"
)
:
null
;
selectChildren
.
forEach
(
item
=>
{
textContainer
.
style
.
setProperty
(
"box-sizing"
,
"border-box"
);
const
text
=
item
.
textContent
;
textContainer
.
textContent
=
iptChild
.
value
?
iptChild
.
value
:
iptChild
.
getAttribute
(
"placeholder"
);
const
itemInfo
=
window
.
getComputedStyle
(
item
);
document
.
body
.
append
(
textContainer
);
textContainer
.
style
.
setProperty
(
"visibility"
,
"hidden"
);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
textContainer
.
style
.
setProperty
(
"display"
,
"inline-block"
);
let
containerWidth
=
0
;
textContainer
.
style
.
setProperty
(
"font-size"
,
"14px"
);
if
(
iptChild
.
value
)
{
textContainer
.
style
.
setProperty
(
"padding"
,
itemInfo
.
padding
);
containerWidth
=
70
;
textContainer
.
style
.
setProperty
(
"box-sizing"
,
"border-box"
);
}
else
{
textContainer
.
textContent
=
text
;
containerWidth
=
130
;
document
.
body
.
append
(
textContainer
);
width
+=
textContainer
.
offsetWidth
+
parseInt
(
itemInfo
.
marginLeft
)
+
parseInt
(
itemInfo
.
marginRight
);
textContainer
.
remove
();
});
dom
.
style
.
setProperty
(
"width"
,
`
${
width
+
50
}
px`
);
this
.
handleSearch
();
return
;
}
textContainer
.
style
.
setProperty
(
"visibility"
,
"hidden"
);
textContainer
.
style
.
setProperty
(
"display"
,
"inline-block"
);
textContainer
.
style
.
setProperty
(
"font-size"
,
"14px"
);
textContainer
.
style
.
setProperty
(
"padding"
,
"0px 8px"
);
textContainer
.
style
.
setProperty
(
"box-sizing"
,
"border-box"
);
textContainer
.
textContent
=
iptChild
.
getAttribute
(
"placeholder"
);
document
.
body
.
append
(
textContainer
);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let
containerWidth
=
130
;
textContainer
.
remove
();
dom
.
style
.
setProperty
(
"width"
,
`
${
containerWidth
}
px`
);
this
.
handleSearch
();
}
}
textContainer
.
remove
();
}
catch
(
error
)
{
dom
.
style
.
setProperty
(
"width"
,
`
${
containerWidth
}
px`
);
console
.
log
(
error
);
}
}
this
.
handleSearch
();
},
}
catch
(
error
)
{
// 单选处理
async
iptAdaptiveHandle
(
uid
)
{
try
{
await
this
.
$nextTick
();
const
dom
=
document
.
querySelector
(
`.select-adaptive-
${
uid
}
`
);
const
realStyles
=
window
.
getComputedStyle
(
dom
);
if
(
dom
)
{
const
iptChild
=
dom
.
querySelector
(
".el-input__inner"
);
const
textContainer
=
document
.
createElement
(
"span"
);
const
textName
=
`text-
${
uid
}
`
;
textContainer
.
classList
.
add
(
textName
);
textContainer
.
style
.
setProperty
(
"visibility"
,
"hidden"
);
textContainer
.
style
.
setProperty
(
"display"
,
"inline-block"
);
textContainer
.
style
.
setProperty
(
"font-size"
,
"14px"
);
const
hasPadding
=
(
parseInt
(
realStyles
.
paddingLeft
)
||
parseInt
(
realStyles
.
paddingRight
))
?
true
:
false
;
hasPadding
?
textContainer
.
style
.
setProperty
(
"padding"
,
"0px 8px"
)
:
null
;
textContainer
.
style
.
setProperty
(
"box-sizing"
,
"border-box"
);
textContainer
.
textContent
=
iptChild
.
value
?
iptChild
.
value
:
iptChild
.
getAttribute
(
"placeholder"
);
document
.
body
.
append
(
textContainer
);
// let containerWidth = textContainer.offsetWidth + 12 + 8;
let
containerWidth
=
0
;
if
(
iptChild
.
value
)
{
containerWidth
=
70
;
}
else
{
containerWidth
=
130
;
}
textContainer
.
remove
();
dom
.
style
.
setProperty
(
"width"
,
`
${
containerWidth
}
px`
);
}
this
.
handleSearch
();
}
catch
(
error
)
{
}
},
clickFocus
(
e
)
{
document
.
getElementById
(
e
).
classList
.
toggle
(
'span-ba'
);
}
}
},
clickFocus
(
e
)
{
document
.
getElementById
(
e
).
classList
.
toggle
(
'span-ba'
);
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.custom-list-container
{
.custom-list-container
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
padding
:
24px
;
padding
:
24px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.miantitle
{
.miantitle
{
padding
:
12px
0px
;
padding
:
12px
0px
;
padding-top
:
0px
;
padding-top
:
0px
;
margin
:
0px
;
margin
:
0px
;
}
}
::v-deep
.el-card
{
::v-deep
.el-card
{
.table_search
{
.table_search
{
.el-form-item
{
.el-form-item
{
.el-input
{
.el-input
{
.el-input__inner
{
.el-input__inner
{
&
:
:
placeholder
{
&
:
:
placeholder
{
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
font-size
:
14px
;
font-size
:
14px
;
}
}
&
:focus
{
&
:focus
{
color
:
rgba
(
35
,
35
,
35
,
1
);
color
:
rgba
(
35
,
35
,
35
,
1
);
}
}
}
}
.el-input__suffix
{
.el-input__suffix
{
.el-input__icon
{
.el-input__icon
{
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
.box-card
{
.box-card
{
@import
"@/assets/styles/search-common.scss"
;
@import
"@/assets/styles/search-common.scss"
;
padding-top
:
16px
;
padding-top
:
16px
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
.table_search
{
.table_search
{
::v-deep
.el-form
{
::v-deep
.el-form
{
.el-input
{
.el-input
{
line-height
:
32px
;
.el-input__inner
{
height
:
32px
;
line-height
:
32px
;
line-height
:
32px
;
border-radius
:
4px
;
.el-input__inner
{
border
:
0
;
height
:
32px
;
line-height
:
32px
;
border-radius
:
4px
;
border
:
0
;
}
}
}
}
.is-focus
{
.is-focus
{
.el-input__inner
{
.el-input__inner
{
background
:
#f4f6f9
;
background
:
#f4f6f9
;
}
}
}
}
}
}
::v-deep
.normal-search-container
{
::v-deep
.normal-search-container
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
&
.is-hover-search
{
&
.is-hover-search
{
width
:
238px
;
width
:
238px
;
background
:
#f4f6f9
;
background
:
#f4f6f9
;
border-radius
:
4px
4px
4px
4px
;
border-radius
:
4px
4px
4px
4px
;
&
>
img
{
&
>
img
{
cursor
:
unset
;
cursor
:
unset
;
}
}
}
}
&
:hover
{
&
:hover
{
&
>
span
{
&
>
span
{
color
:
#0081ff
;
color
:
#0081ff
;
}
}
}
}
&
>
img
{
&
>
img
{
width
:
16px
;
width
:
16px
;
height
:
16px
;
height
:
16px
;
margin-left
:
12px
;
margin-left
:
12px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
&
>
span
{
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
font-weight
:
400
;
margin-left
:
8px
;
line-height
:
22px
;
font-size
:
14px
;
cursor
:
pointer
;
}
.el-input
{
&
>
span
{
&
>
.el-input__inner
{
border
:
none
;
height
:
32px
;
line-height
:
32px
;
caret-color
:
#0081ff
;
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
font-weight
:
400
;
margin-left
:
8px
;
line-height
:
22px
;
font-size
:
14px
;
font-size
:
14px
;
background
:
#f4f6f9
;
cursor
:
pointer
;
padding-right
:
26px
;
}
padding-left
:
8px
;
&
:
:
placeholder
{
.el-input
{
color
:
rgba
(
35
,
35
,
35
,
0
.4
)
!
important
;
&
>
.el-input__inner
{
font-size
:
14px
!
important
;
border
:
none
;
height
:
32px
;
line-height
:
32px
;
line-height
:
32px
;
}
caret-color
:
#0081ff
;
}
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
.el-input__suffix
{
font-size
:
14px
;
right
:
12px
;
background
:
#f4f6f9
;
display
:
fle
x
;
padding-right
:
26p
x
;
align-items
:
center
;
padding-left
:
8px
;
.el-input__suffix-inner
{
&
:
:
placeholder
{
height
:
14px
;
color
:
rgba
(
35
,
35
,
35
,
0
.4
)
!
important
;
width
:
14px
;
font-size
:
14px
!
important
;
line-height
:
32px
;
}
}
}
.el-input__suffix
{
right
:
12px
;
display
:
flex
;
align-items
:
center
;
img
{
.el-input__suffix-inner
{
cursor
:
pointer
;
height
:
14px
;
vertical-align
:
unset
;
width
:
14px
;
margin-bottom
:
14px
;
}
img
{
cursor
:
pointer
;
vertical-align
:
unset
;
margin-bottom
:
14px
;
}
}
}
}
}
}
}
}
}
}
}
}
.box
{
.box
{
position
:
relative
;
position
:
relative
;
>
span
{
>
span
{
position
:
absolute
;
position
:
absolute
;
right
:
10px
;
right
:
10px
;
bottom
:
0
;
bottom
:
0
;
color
:
#0081ff
;
color
:
#0081ff
;
cursor
:
pointer
;
cursor
:
pointer
;
&
:hover
{
&
:hover
{
color
:
#006ad1
;
color
:
#006ad1
;
}
}
}
}
}
}
.dc
{
.dc
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#3d3d3d
;
color
:
#3d3d3d
;
font-weight
:
400
;
font-weight
:
400
;
position
:
relative
;
position
:
relative
;
&
:
:
after
{
&
:
:
after
{
content
:
" "
;
content
:
" "
;
width
:
2px
;
width
:
2px
;
height
:
2px
;
height
:
2px
;
background
:
rgba
(
35
,
35
,
35
,
0
.4
)
;
background
:
rgba
(
35
,
35
,
35
,
0
.4
)
;
border-radius
:
50%
;
border-radius
:
50%
;
position
:
absolute
;
position
:
absolute
;
top
:
16px
;
top
:
16
px
;
left
:
14
px
;
left
:
14px
;
}
}
>
div
{
>
div
{
display
:
inline-block
;
display
:
inline-block
;
margin-left
:
20px
;
margin-left
:
20px
;
}
}
}
}
.img.img1
{
.img.img1
{
margin-right
:
2px
;
margin-right
:
2px
;
background
:
url("../../../../src/assets/images/project/add_2.png")
no-repeat
background
:
url("../../../../src/assets/images/project/add_2.png")
no-repeat
center
center
;
center
center
;
background-size
:
100%
;
background-size
:
100%
;
}
.w88
{
width
:
88px
;
}
.tables
{
position
:
relative
;
min-height
:
calc
(
100vh
-
134px
);
/*overflow: auto;*/
.empty
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
.btn
{
margin-right
:
8px
;
margin-top
:
16px
;
}
}
}
.table_search
{
.w88
{
::v-deep
.el-cascader
{
width
:
88px
;
height
:
32px
;
}
line-height
:
32px
;
.tables
{
.el-input
{
position
:
relative
;
input
{
min-height
:
calc
(
100vh
-
134px
);
height
:
32px
!
important
;
/*overflow: auto;*/
}
.empty
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
.btn
{
margin-right
:
8px
;
margin-top
:
16px
;
}
}
.el-cascader__tags
{
}
flex-wrap
:
inherit
;
.table_search
{
margin-top
:
1px
;
::v-deep
.el-cascader
{
.el-tag
{
height
:
32px
;
/*max-width: 120px;*/
line-height
:
32px
;
.el-input
{
input
{
height
:
32px
!
important
;
}
}
.el-cascader__tags
{
flex-wrap
:
inherit
;
margin-top
:
1px
;
.el-tag
{
/*max-width: 120px;*/
}
}
.el-input__suffix
{
top
:
1px
;
}
}
}
}
.el-input__suffix
{
::v-deep
.normal-search-container
{
top
:
1px
;
height
:
32px
;
}
display
:
flex
;
}
align-items
:
center
;
::v-deep
.normal-search-container
{
height
:
32px
;
display
:
flex
;
align-items
:
center
;
&
.is-hover-search
{
&
.is-hover-search
{
width
:
238px
;
width
:
238px
;
background
:
#f4f6f9
;
background
:
#f4f6f9
;
border-radius
:
4px
4px
4px
4px
;
border-radius
:
4px
4px
4px
4px
;
&
>
img
{
&
>
img
{
cursor
:
unset
;
cursor
:
unset
;
}
}
}
}
&
:hover
{
&
:hover
{
&
>
span
{
&
>
span
{
color
:
#0081ff
;
color
:
#0081ff
;
}
}
}
}
&
>
img
{
&
>
img
{
width
:
16px
;
width
:
16px
;
height
:
16px
;
height
:
16px
;
margin-left
:
12px
;
margin-left
:
12px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
&
>
span
{
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
font-weight
:
400
;
margin-left
:
8px
;
line-height
:
22px
;
font-size
:
14px
;
cursor
:
pointer
;
}
.el-input
{
&
>
span
{
&
>
.el-input__inner
{
border
:
none
;
height
:
32px
;
line-height
:
32px
;
caret-color
:
#0081ff
;
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
font-weight
:
400
;
margin-left
:
8px
;
line-height
:
22px
;
font-size
:
14px
;
font-size
:
14px
;
background
:
#f4f6f9
;
cursor
:
pointer
;
padding-right
:
26px
;
}
padding-left
:
8px
;
&
:
:
placeholder
{
.el-input
{
color
:
rgba
(
35
,
35
,
35
,
0
.4
)
!
important
;
&
>
.el-input__inner
{
font-size
:
14px
!
important
;
border
:
none
;
height
:
32px
;
line-height
:
32px
;
line-height
:
32px
;
}
caret-color
:
#0081ff
;
}
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
.el-input__suffix
{
font-size
:
14px
;
right
:
12px
;
background
:
#f4f6f9
;
display
:
fle
x
;
padding-right
:
26p
x
;
align-items
:
center
;
padding-left
:
8px
;
.el-input__suffix-inner
{
&
:
:
placeholder
{
height
:
14px
;
color
:
rgba
(
35
,
35
,
35
,
0
.4
)
!
important
;
width
:
14px
;
font-size
:
14px
!
important
;
line-height
:
32px
;
}
}
}
.el-input__suffix
{
right
:
12px
;
display
:
flex
;
align-items
:
center
;
img
{
.el-input__suffix-inner
{
cursor
:
pointer
;
height
:
14px
;
vertical-align
:
unset
;
width
:
14px
;
}
img
{
cursor
:
pointer
;
vertical-align
:
unset
;
}
}
}
}
}
}
}
}
.cooperate-name
{
.cooperate-name
{
margin-left
:
12px
;
margin-left
:
12px
;
display
:
flex
;
display
:
flex
;
border-radius
:
2px
;
border-radius
:
2px
;
border
:
1px
solid
#d9d9d9
;
border
:
1px
solid
#d9d9d9
;
line-height
:
34px
;
line-height
:
34px
;
height
:
34px
;
height
:
34px
;
float
:
left
;
float
:
left
;
span
{
width
:
60px
;
height
:
32px
;
line-height
:
32px
;
font-size
:
14px
;
background
:
#f5f5f5
;
text-align
:
center
;
color
:
#0081ff
;
border
:
1px
solid
#efefef
;
border-left
:
0
;
cursor
:
pointer
;
}
&
.span-ba
{
border
:
1px
solid
#0081ff
;
span
{
span
{
color
:
#ffffff
;
width
:
60px
;
background
:
#0081ff
;
height
:
32px
;
line-height
:
32px
;
font-size
:
14px
;
background
:
#f5f5f5
;
text-align
:
center
;
color
:
#0081ff
;
border
:
1px
solid
#efefef
;
border-left
:
0
;
cursor
:
pointer
;
}
&
.span-ba
{
border
:
1px
solid
#0081ff
;
border
:
1px
solid
#0081ff
;
span
{
color
:
#ffffff
;
background
:
#0081ff
;
border
:
1px
solid
#0081ff
;
}
}
::v-deep
.el-input
{
flex
:
1
;
}
::v-deep
.el-input__inner
{
border
:
0
;
line-height
:
32px
;
height
:
32px
;
position
:
absolute
;
top
:
0
;
padding-right
:
28px
;
font-size
:
12px
;
padding-left
:
8px
;
}
}
}
::v-deep
.el-input
{
flex
:
1
;
}
::v-deep
.el-input__inner
{
border
:
0
;
line-height
:
32px
;
height
:
32px
;
position
:
absolute
;
top
:
0
;
padding-right
:
28px
;
font-size
:
12px
;
padding-left
:
8px
;
}
}
}
}
}
}
}
.ps1
{
.ps1
{
display
:
flex
;
justify-content
:
space-between
;
.ps2
{
width
:
350px
;
}
.ps3
{
width
:
60px
;
display
:
flex
;
display
:
flex
;
justify-content
:
right
;
justify-content
:
space-between
;
>
div
{
.ps2
{
margin-left
:
12px
;
width
:
350px
;
>
img
{
}
float
:
right
;
.ps3
{
margin
:
3px
0
0
4px
;
width
:
60px
;
width
:
14px
;
display
:
flex
;
}
justify-content
:
right
;
.i
{
>
div
{
display
:
inline-block
;
margin-left
:
12px
;
}
>
img
{
.o
{
float
:
right
;
display
:
none
;
margin
:
3px
0
0
4px
;
}
width
:
14px
;
&
:hover
{
}
cursor
:
pointer
;
.i
{
.i
{
display
:
none
;
display
:
inline-block
;
}
}
.o
{
.o
{
display
:
inline-block
;
display
:
none
;
}
&
:hover
{
cursor
:
pointer
;
.i
{
display
:
none
;
}
.o
{
display
:
inline-block
;
}
}
}
}
}
}
}
}
}
}
.popbot
{
.popbot
{
.wordprimary
{
.wordprimary
{
display
:
inline
;
display
:
inline
;
padding-right
:
26px
;
padding-right
:
26px
;
}
}
.searchInput
{
width
:
240px
;
}
}
}
.searchInput
{
width
:
240px
;
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment