Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
黄媛媛
ElectricitySheep
Commits
5ad347e5
Commit
5ad347e5
authored
Dec 06, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品牌 服务
parent
6dac2a92
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1227 additions
and
12 deletions
+1227
-12
BrandEnterEdit.vue
src/components/tradePavilion/BrandEnterEdit.vue
+778
-0
BrandEnterpriseManager.vue
src/components/tradePavilion/BrandEnterpriseManager.vue
+419
-0
tradePavilionIndex.vue
src/components/tradePavilion/tradePavilionIndex.vue
+12
-12
index.js
src/router/index.js
+18
-0
No files found.
src/components/tradePavilion/BrandEnterEdit.vue
0 → 100644
View file @
5ad347e5
<
template
>
<div
v-loading=
"pageloading"
class=
"editBrandEnter"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump(isBrand?'BrandManager':'EnterpriseManager')"
class=
"blue point"
>
{{
isBrand
?
'品牌'
:
'服务'
}}
管理
</span
>
/
<span>
{{
ID
?
'编辑'
:
'新增'
}}{{
isBrand
?
'品牌'
:
'服务'
}}
</span>
</div>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"180px"
>
<el-card
shadow=
"never"
style=
"margin-top: 10px"
class=
"box-card"
>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}分类`" class="is-required" prop="CategoryId">
<el-select
class=
"w300"
v-model=
"addMsg.CategoryId"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in CategoryList"
:key=
"item.ID"
:label=
"item.ClassName"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}全名`"
prop="FullBrandName"
class="is-required"
size="small"
>
<el-input
v-model=
"addMsg.FullBrandName"
:placeholder=
"`请输入$
{isBrand?'品牌':'服务'}全名`"
maxlength="100"
style="width: 690px;"
/>
</el-form-item>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}名`"
prop="BrandName"
class="is-required"
size="small"
>
<el-input
v-model=
"addMsg.BrandName"
:placeholder=
"`请输入$
{isBrand?'品牌':'服务'}名`"
maxlength="100"
style="width: 690px;"
/>
</el-form-item>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}视频`">
<el-input
v-model=
"addMsg.VideoUrl"
size=
"small"
placeholder=
"请输入内容"
style=
"width: 690px;"
>
<el-button
@
click=
"changeState1 = true"
slot=
"append"
>
添加视频
</el-button
>
</el-input>
<a
v-if=
"addMsg.VideoUrl != ''"
class=
"blue noline"
:href=
"addMsg.VideoUrl"
target=
"_blank"
>
视频链接
</a
>
</el-form-item>
<el-form-item
label=
"Logo"
class=
"is-required"
prop=
"Logo"
size=
"small"
>
<el-button
@
click=
"type=1,choicImg=true"
size=
"small"
>
选择文件
</el-button>
<div
class=
"app-gallery-item"
style=
"position: relative; width: 100px; margin-top: 10px"
>
<img
v-if=
"!addMsg.Logo || addMsg.Logo == ''"
src=
"../../assets/img/default.png"
style=
"width: 80px; height: 80px"
alt=
""
/>
<el-image
v-else
style=
"width: 80px; height: 80px"
:src=
"addMsg.Logo"
:preview-src-list=
"LogoList"
>
</el-image>
</div>
</el-form-item>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}介绍图`">
<el-tooltip
class=
"item"
effect=
"dark"
content=
"第一张图片为封面图"
placement=
"top"
style=
"position: absolute; left: -5px; top: 12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<p
style=
"color: #c9c9c9; margin: 0 0 12px 20px"
>
第一张图片为缩略图,其它图片为轮播图,建议像素750*750,最多支持上传9张
</p>
<div
class=
"nav_Main"
>
<div
class=
"nav_IconContent"
>
<draggable
v-model=
"addMsg.BannerList"
>
<div
style=
"
position: relative;
margin-right: 20px;
display: inline-block;
"
v-for=
"(item, index) in addMsg.BannerList"
:key=
"index + '2'"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"item"
:preview-src-list=
"addMsg.BannerList"
>
</el-image>
<el-button
@
click=
"ClearCarouse(index)"
class=
"delBtn"
type=
"danger"
icon=
"el-icon-close"
circle
>
</el-button>
</div>
</draggable>
</div>
<div
@
click=
"type=2,choicImg=true"
v-if=
"addMsg.BannerList.length
<
9
"
class=
"add-image-btn 2222"
style=
"cursor: pointer"
>
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item
label=
"店铺数量"
prop=
"ShopNum"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.ShopNum"
placeholder=
"请输入店铺数量"
type=
"number"
maxlength=
"3"
style=
"width: 690px;"
/>
</el-form-item>
<el-form-item
label=
"建筑面积"
size=
"small"
>
<el-input
v-model=
"addMsg.BuiltUpArea"
placeholder=
"请输入建筑面积"
type=
"number"
style=
"width: 200px"
maxlength=
"7"
/>
<span
style=
"margin: 0 10px"
>
~
</span>
<el-input
v-model=
"addMsg.EndBuiltUpArea"
placeholder=
"请输入建筑面积"
type=
"number"
style=
"width: 200px"
maxlength=
"7"
/>
</el-form-item>
<el-form-item
label=
"需求面积"
size=
"small"
>
<el-input
v-model=
"addMsg.AreaRequirement"
placeholder=
"请输入需求面积"
type=
"number"
style=
"width: 200px"
maxlength=
"7"
/>
<span
style=
"margin: 0 10px"
>
~
</span>
<el-input
v-model=
"addMsg.EndAreaRequirement"
placeholder=
"请输入需求面积"
type=
"number"
style=
"width: 200px"
maxlength=
"7"
/>
</el-form-item>
<el-form-item
label=
"客群定位"
size=
"small"
>
<el-input
v-model=
"addMsg.CustomerType"
placeholder=
"请输入客群定位"
maxlength=
"200"
style=
"width: 690px;"
/>
</el-form-item>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}定位`" size="small">
<el-input
v-model=
"addMsg.BrandType"
:placeholder=
"`请输入$
{isBrand?'品牌':'服务'}定位`"
maxlength="100"
style="width: 690px;"
/>
</el-form-item>
<!--
<el-form-item
label=
"拓店区域"
size=
"small"
>
<el-input
v-model=
"addMsg.StoreExpansion"
placeholder=
"请输入拓店区域"
class=
"w600"
maxlength=
"200"
/>
</el-form-item>
<el-form-item
label=
"商铺性质"
size=
"small"
>
<el-select
class=
"w300"
v-model=
"addMsg.ProjectType"
size=
"small"
placeholder=
"请选择商铺性质"
>
<el-option
:key=
"0"
label=
"请选择"
:value=
"0"
></el-option>
<el-option
v-for=
"item in ProjectTypeList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
-->
<!--
<el-form-item
label=
"电量"
size=
"small"
>
<el-input
v-model=
"addMsg.ShopSize"
class=
"w600"
placeholder=
"请输入电量"
maxlength=
"80"
/>
</el-form-item>
-->
<!--
<div
class=
"brandShuxing"
>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"店铺开口尺寸"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.IsShopSize"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.IsShopSize"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-input
v-model=
"addMsg.ShopSize"
v-if=
"addMsg.IsShopSize == 1"
size=
"small"
class=
"w120"
placeholder=
"店铺开口尺寸"
maxlength=
"80"
/>
</div>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"燃气"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.RanQi"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.RanQi"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-input
v-model=
"addMsg.RanQiBZ"
v-if=
"addMsg.RanQi == 1"
size=
"small"
class=
"w120"
placeholder=
"燃气备注"
maxlength=
"80"
/>
</div>
</div>
<div
class=
"brandShuxing"
>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"排烟量"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.PaiYan"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.PaiYan"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-input
v-model=
"addMsg.PaiYanBZ"
v-if=
"addMsg.PaiYan == 1"
size=
"small"
class=
"w120"
placeholder=
"排烟量"
maxlength=
"80"
/>
</div>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"电量"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.IsDianLiang"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.IsDianLiang"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-input
v-model=
"addMsg.DianLiang"
v-if=
"addMsg.IsDianLiang == 1"
size=
"small"
class=
"w120"
placeholder=
"电量"
maxlength=
"80"
/>
</div>
</div>
<div
class=
"brandShuxing"
>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"上下水"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.Plumbing"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.Plumbing"
:label=
"0"
>
否
</el-radio>
</el-form-item>
</div>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"管径"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.Caliber"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.Caliber"
:label=
"0"
>
否
</el-radio>
</el-form-item>
</div>
</div>
<div
class=
"brandShuxing"
>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"排污"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.Sewage"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.Sewage"
:label=
"0"
>
否
</el-radio>
</el-form-item>
</div>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"空调"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.KongTiao"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.KongTiao"
:label=
"0"
>
否
</el-radio>
</el-form-item>
</div>
</div>
<div
class=
"brandShuxing"
>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"新风"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.XinFeng"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.XinFeng"
:label=
"0"
>
否
</el-radio>
</el-form-item>
</div>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"成都落地"
class=
"is-required"
>
<el-radio
v-model=
"addMsg.IsInChengdu"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.IsInChengdu"
:label=
"0"
>
否
</el-radio>
</el-form-item>
</div>
</div>
<div
class=
"brandShuxing"
>
<div
class=
"brandShuxing_item"
>
<el-form-item
label=
"开店意愿"
class=
"is-required"
>
<el-radio
v-model=
"ShopWish"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"ShopWish"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-rate
style=
"margin-top: 10px;"
v-model=
"addMsg.OpenShopWish"
v-if=
"ShopWish == 1"
:colors=
"colors"
>
</el-rate>
</div>
</div>
<el-form-item
label=
"招引需求"
class=
"ue-style"
>
<el-input
type=
"textarea"
placeholder=
"请输入招引需求"
v-model=
"addMsg.Other"
maxlength=
"500"
show-word-limit
class=
"w600"
rows=
"8"
>
</el-input>
</el-form-item>
<el-form-item
label=
"广告"
class=
"ue-style"
>
<UE
style=
"width: 700px"
:defaultMsg=
"Advertising"
:config=
"config"
:IsMultiple=
"true"
ref=
"ue"
></UE>
</el-form-item>
-->
<!--
<el-form-item
label=
"其他"
class=
"ue-style"
>
<UE
style=
"width: 700px"
:defaultMsg=
"Other"
:config=
"config"
:IsMultiple=
"true"
ref=
"ueother"
></UE>
</el-form-item>
-->
<el-form-item
label=
"发展意向"
prop=
""
>
<el-input
v-model=
"addMsg.DevIntention"
style=
"width: 690px"
size=
"small"
placeholder=
"请输入发展意向"
>
</el-input>
</el-form-item>
<el-form-item
label=
"合作条件"
prop=
""
>
<el-input
v-model=
"addMsg.Cooperation"
style=
"width: 690px"
size=
"small"
placeholder=
"请输入合作条件"
>
</el-input>
</el-form-item>
<el-form-item
label=
"物业需求"
prop=
""
>
<el-input
v-model=
"addMsg.PropertyDemand"
style=
"width: 690px"
size=
"small"
placeholder=
"请输入物业需求"
>
</el-input>
</el-form-item>
<el-form-item
label=
"配套需求"
prop=
""
>
<el-input
v-model=
"addMsg.Complementary"
style=
"width: 690px"
size=
"small"
placeholder=
"请输入配套需求"
>
</el-input>
</el-form-item>
<el-form-item
:label=
"`$
{isBrand?'品牌':'服务'}简介`" class="ue-style">
<el-input
type=
"textarea"
:placeholder=
"`请输入$
{isBrand?'品牌':'服务'}简介`"
v-model="addMsg.Introduce"
maxlength="500"
show-word-limit
rows="8"
style="width: 690px;"
>
</el-input>
</el-form-item>
</el-card>
</el-form>
<div
style=
"padding: 20px; background: #fff; margin-top: 10px"
>
<el-button
@
click=
"Save('addMsg')"
size=
"small"
type=
"primary"
>
保存
</el-button
>
</div>
<!-- 选择图片文件 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"choicImg"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"changeState1"
width=
"1240px"
>
<Choosevideo
@
Selectvideo=
"Selectvideo"
></Choosevideo>
</el-dialog>
</div>
</
template
>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
Choosevideo
from
"@/components/global/Choosevideo.vue"
;
import
commonMap
from
"@/components/common/commonMap.vue"
;
import
draggable
from
"vuedraggable"
;
export
default
{
name
:
"editBrandEnter"
,
data
()
{
let
validataType
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
addMsg
.
CategoryId
==
0
)
{
return
callback
(
new
Error
(
"请选择类型"
));
}
else
{
callback
();
}
};
let
validataLogo
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
addMsg
.
Logo
==
""
)
{
return
callback
(
new
Error
(
"请上传Logo"
));
}
else
{
callback
();
}
};
return
{
pageloading
:
false
,
addMsg
:
{
ID
:
0
,
Logo
:
""
,
//Logo
BannerList
:
[],
//品牌介绍图
VideoUrl
:
""
,
//品牌视频
FullBrandName
:
""
,
//品牌全名
BrandName
:
""
,
//品牌名
ShopNum
:
""
,
//店铺数量
BuiltUpArea
:
0
,
//建筑面积小
EndBuiltUpArea
:
0
,
//建筑面积大
CustomerType
:
""
,
//客群定位
BrandType
:
""
,
//品牌定位
StoreExpansion
:
""
,
//扩店区域
ProjectType
:
0
,
//商铺性质
AreaRequirement
:
0
,
//
EndAreaRequirement
:
0
,
//
Advertising
:
""
,
//广告
Other
:
""
,
//其他
ShopSize
:
1
,
//店铺开口尺寸
Plumbing
:
1
,
//上下水
Caliber
:
1
,
//管径
Sewage
:
1
,
//排污
RanQi
:
1
,
//燃气
DianLiang
:
""
,
//电量
PaiYan
:
1
,
//排烟量
KongTiao
:
1
,
//空调
XinFeng
:
1
,
//新风
BrandClassId
:
0
,
//品牌分类Id
RanQiBZ
:
""
,
//燃气备注
IsDianLiang
:
1
,
//电量(0-否1-有)
PaiYanBZ
:
""
,
//排烟量备注
ShopSize
:
""
,
//店铺开口尺寸
IsShopSize
:
1
,
//店铺开口尺寸(0-否1-有)
OpenShopWish
:
5
,
//开店意愿
IsInChengdu
:
0
,
//是否成都落地
CategoryId
:
0
,
//分类ID
BrandEnterpriseType
:
1
,
//(1-品牌,2-企业服务)
Introduce
:
''
,
//品牌简介/企业简介
DevIntention
:
''
,
//发展意向
Cooperation
:
''
,
//合作条件
PropertyDemand
:
''
,
//物业需求
Complementary
:
''
,
//配套需求
},
rules
:
{
Logo
:
[
{
required
:
true
,
validator
:
validataLogo
,
trigger
:
"change"
,
},
],
FullBrandName
:
[
{
required
:
true
,
message
:
"请输入品牌全名"
,
trigger
:
"blur"
,
},
],
BrandName
:
[
{
required
:
true
,
message
:
"请输入品牌名"
,
trigger
:
"blur"
,
},
],
Logo
:
[
{
required
:
true
,
message
:
"请选择Logo"
,
trigger
:
"blur"
,
},
],
ShopNum
:
[
{
required
:
true
,
message
:
"请输入店铺数量"
,
trigger
:
"blur"
,
},
],
CategoryId
:
[
{
required
:
true
,
validator
:
validataType
,
trigger
:
"change"
,
},
],
},
ID
:
0
,
type
:
-
1
,
choicImg
:
false
,
changeState1
:
false
,
LogoList
:
[],
shenList
:
[],
isBrand
:
true
,
CategoryList
:
[],
};
},
components
:
{
ChooseImg
,
Choosevideo
,
draggable
,
},
created
()
{
this
.
isBrand
=
this
.
$route
.
query
.
isBrand
this
.
addMsg
.
BrandEnterpriseType
=
this
.
isBrand
?
this
.
isBrand
:
2
if
(
this
.
$route
.
query
.
ID
)
{
this
.
ID
=
this
.
$route
.
query
.
ID
;
this
.
getData
();
}
this
.
getTypeEnumList
();
this
.
GetAuthenticationCategoryEnumList
();
},
methods
:
{
//获取类型
getTypeEnumList
()
{
this
.
apipost
(
"/api/Trade/GetBrandClassList"
,
{
BrandCategory
:
this
.
isBrand
?
3
:
4
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CategoryList
=
res
.
data
.
data
;
let
obj
=
{
ClassName
:
"请选择"
,
ID
:
0
,
};
this
.
CategoryList
.
unshift
(
obj
);
}
});
},
Save
(
formName
)
{
//其他
// let other = this.$refs.ueother.getUEContent();
// this.addMsg.Other = other;
if
(
this
.
addMsg
.
BuiltUpArea
===
''
||
this
.
addMsg
.
EndBuiltUpArea
===
''
){
this
.
Error
(
'请输入建筑面积'
)
return
}
if
(
this
.
addMsg
.
AreaRequirement
===
''
||
this
.
addMsg
.
EndAreaRequirement
===
''
){
this
.
Error
(
'请输入需求面积'
)
return
}
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
"/api/Trade/SetBrandEnterprise"
,
this
.
addMsg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
CommonJump
(
this
.
isBrand
?
'BrandManager'
:
'EnterpriseManager'
);
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}
else
{
return
false
;
}
});
},
getData
()
{
this
.
pageloading
=
true
;
this
.
apipost
(
"/api/Trade/GetBrandEnterpriseInfo"
,
{
ID
:
this
.
ID
,
},
(
res
)
=>
{
this
.
pageloading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
this
.
addMsg
=
res
.
data
.
data
;
this
.
LogoList
=
[];
this
.
LogoList
.
push
(
this
.
addMsg
.
Logo
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
}
);
},
//选择图片
SelectId
(
msg
)
{
if
(
this
.
type
==
1
)
{
this
.
addMsg
.
Logo
=
this
.
getIconLink
(
msg
.
url
);
}
if
(
this
.
type
==
2
)
{
this
.
addMsg
.
BannerList
.
push
(
msg
.
url
);
}
this
.
choicImg
=
false
;
},
ClearCarouse
(
index
)
{
this
.
addMsg
.
BannerList
.
splice
(
index
,
1
);
},
Selectvideo
(
val
)
{
this
.
addMsg
.
VideoUrl
=
val
.
Path
;
this
.
changeState1
=
false
;
},
//获取首店类别
GetAuthenticationCategoryEnumList
()
{
this
.
apipost
(
"/api/AppletTrade/GetAuthenticationCategoryEnumList"
,
{
Name
:
""
,
Id
:
""
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
shenList
=
res
.
data
.
data
;
if
(
this
.
addMsg
.
FirstShopNumList
&&
this
.
addMsg
.
FirstShopNumList
.
length
===
0
)
{
this
.
shenList
.
map
((
e
)
=>
{
let
obj
=
{
Id
:
e
.
Id
,
Name
:
e
.
Name
,
Num
:
0
,
};
this
.
addMsg
.
FirstShopNumList
.
push
(
obj
);
});
}
}
}
);
},
addTypeAndNum
()
{
this
.
addMsg
.
FirstShopNumList
.
push
({
Id
:
0
,
Name
:
""
,
Num
:
0
,
});
},
delTypeAndNum
(
index
)
{
this
.
addMsg
.
FirstShopNumList
.
splice
(
index
,
1
);
},
},
};
</
script
>
<
style
>
.editBrandEnter
.content
{
background
:
#fff
;
margin-top
:
10px
;
box-sizing
:
border-box
;
}
.editBrandEnter
.editIconImg
{
width
:
80px
;
height
:
80px
;
}
.editBrandEnter
.add-image-btn
{
width
:
100px
;
height
:
100px
;
line-height
:
100px
;
color
:
#419efb
;
border
:
1px
solid
#e2e2e2
;
cursor
:
pointer
;
text-align
:
center
;
}
.editBrandEnter
.nav_Main
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
}
.editBrandEnter
.nav_IconContent
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
}
/* .editBrandEnter .nav_IconContent div>div {
display: inline-block;
} */
.editBrandEnter
.colapp-image
{
background-size
:
cover
;
background-position
:
center
center
;
width
:
100px
;
height
:
100px
;
border-radius
:
0%
;
}
.editBrandEnter
.delBtn
{
position
:
absolute
;
right
:
-8px
;
top
:
-8px
;
padding
:
4px
4px
!important
;
}
.delCarrClose
{
position
:
absolute
;
right
:
53px
;
top
:
8px
;
padding
:
4px
4px
!important
;
}
</
style
>
src/components/tradePavilion/BrandEnterpriseManager.vue
0 → 100644
View file @
5ad347e5
<
style
>
.CarrierList
{
border-bottom
:
1px
dashed
#eee
;
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.CarrierList
span
{
display
:
inline-block
;
margin-right
:
10px
;
}
</
style
>
<
template
>
<div
class=
"VehicleManagement"
>
<div
class=
"head-title"
>
{{
isBrand
?
'品牌'
:
'服务'
}}
管理
<div>
<el-button
@
click=
"checkAll=false,dialogVisible = true"
style=
"float: right; margin-top: -25px"
size=
"small"
type=
"primary"
>
批量导出
</el-button>
</div>
<div>
<el-button
type=
"primary"
style=
"float: right; margin: -25px 10px 0px 0px"
class=
"el-button--small"
@
click=
"CommonJump('BrandEnterEdit',
{isBrand:isBrand?1:0})">新增
{{
isBrand
?
'品牌'
:
'服务'
}}
</el-button>
</div>
</div>
<div
class=
"content"
>
<div>
<div
class=
"searchInput"
style=
"width: 250px; margin-bottom: 10px"
>
<el-input
@
keyup
.
enter
.
native=
"(msg.pageIndex = 1), getList()"
@
clear=
"(msg.pageIndex = 1), getList()"
style=
"display: inline-block; width: 225px; height: 30px"
:placeholder=
"`$
{isBrand?'品牌':'服务'}名称`" v-model="msg.BrandName"
size="small" clearable>
</el-input>
<span
@
click=
"(msg.pageIndex = 1), getList()"
class=
"el-icon-search"
style=
"
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div>
<div
class=
"searchInput"
style=
"width: 200px; margin-bottom: 10px"
>
<el-select
size=
"small"
v-model=
"msg.CategoryId"
filterable
@
change=
"(msg.pageIndex = 1), getList()"
:placeholder=
"`请选择$
{isBrand?'品牌':'服务'}分类`">
<el-option
v-for=
"item in CategoryList"
:key=
"item.ID"
:label=
"item.ClassName"
:value=
"item.ID"
>
</el-option>
</el-select>
</div>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width: 100%; margin: 20px 0"
>
<el-table-column
prop=
"Id"
label=
"ID"
width=
"100"
>
<template
slot-scope=
"scope"
>
<span
@
click=
"goRecruit(scope.row.ID)"
>
{{
scope
.
row
.
ID
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"BrandName"
:label=
"`${isBrand?'品牌':'服务'}名称`"
>
</el-table-column>
<el-table-column
prop=
"CategoryName"
:label=
"`${isBrand?'品牌':'服务'}分类`"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"Logo"
label=
"Logo"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-image
v-if=
"scope.row.Logo"
:src=
"scope.row.Logo"
style=
"width: 50px"
:preview-src-list=
"scope.row.LogoList"
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
prop=
"ShopNum"
label=
"店铺数量"
width=
"80"
>
</el-table-column>
<el-table-column
prop=
"BuiltUpArea"
label=
"建筑面积"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
BuiltUpArea
}}
至
{{
scope
.
row
.
EndBuiltUpArea
}}
平
</span>
</
template
>
</el-table-column>
<!-- <el-table-column prop="ProjectName" label="商铺性质" width="150">
</el-table-column> -->
<el-table-column
prop=
"BrandType"
:label=
"`${isBrand?'品牌':'服务'}定位`"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"CustomerType"
label=
"客群定位"
width=
"160"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"120"
v-if=
"!readonly"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
@
click=
"CommonJump('BrandEnterEdit',
{ ID: scope.row.ID,isBrand:isBrand?1:0 })"
src="../../assets/img/setup/edit.png" alt="" class="imgstyle" />
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
@
click=
"delManage(scope.row)"
src=
"../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
/>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align: right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
:current-page
.
sync=
"msg.pageIndex"
layout=
"total,prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog
title=
"选择导出信息"
:visible
.
sync=
"dialogVisible"
width=
"960px"
>
<div
v-loading=
"downLoadLoading"
:element-loading-text=
"loadingText"
>
<el-form
style=
"border: 1px solid #f0f2f7"
:model=
"addMsg"
ref=
"addMsg"
label-width=
"100px"
>
<div
style=
"
box-sizing: border-box;
background-color: #f3f5f6;
width: 100%;
padding-left: 20px;
height: 50px;
line-height: 50px;
"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</el-checkbox>
</div>
<div
style=
"margin: 15px 0"
></div>
<div
style=
"padding: 10px 25px 20px"
>
<el-checkbox-group
v-model=
"checkedCities"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
style=
"margin-bottom: 10px; width: 135px"
v-for=
"city in cities"
:label=
"city.Id"
:key=
"city.Name"
>
{{ city.Name }}
</el-checkbox>
</el-checkbox-group>
</div>
</el-form>
<div
style=
"text-align: right; margin-top: 20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"downLoadCarrier"
>
导出
</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
setInterval
,
clearInterval
}
from
'timers'
;
export
default
{
data
()
{
return
{
msg
:
{
BrandName
:
""
,
//名称
pageIndex
:
1
,
pageSize
:
15
,
CarrierName
:
""
,
//载体名称
MetroNum
:
""
,
//地铁线路
Developers
:
""
,
//开发商
QStartDate
:
""
,
//开业开始时间
QEndDate
:
""
,
// 开业截止时间
ExcelEnumIds
:
[],
UserId
:
0
,
RandomNum
:
0
,
//随机数
CategoryId
:
0
,
//分类Id
BrandEnterpriseType
:
null
,
//(1-品牌,2-服务)
OpeningStatus
:
-
1
,
// 0-即将开业,1-已开业
QShopType
:
0
,
//1-成都首店,2-宜宾商载通
},
addMsg
:
{},
dialogVisible
:
false
,
dateStr
:
[],
//日期
total
:
0
,
tableData
:
[],
//数据列表
isShowAdd
:
false
,
//新增修改载体
ProjectTypeList
:
[],
//项目类型
checkAll
:
false
,
checkedCities
:
[],
cities
:
[],
cityOptions
:
[],
isIndeterminate
:
false
,
downLoadLoading
:
false
,
//导出Loading
download_timer
:
null
,
//下载文件timer
loadingText
:
""
,
//下载文件提示名称
isBrand
:
true
,
CategoryList
:
[],
readonly
:
false
,
};
},
created
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
readonly
)
{
this
.
readonly
=
this
.
$route
.
query
.
readonly
;
}
this
.
isBrand
=
this
.
$route
.
name
==
'BrandManager'
this
.
msg
.
BrandEnterpriseType
=
this
.
isBrand
?
1
:
2
this
.
getList
();
this
.
getTypeEnumList
();
this
.
getDown
();
},
watch
:
{
$route
:
{
handler
(
val
,
oldVal
)
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
readonly
)
{
this
.
readonly
=
this
.
$route
.
query
.
readonly
;
}
this
.
isBrand
=
val
.
name
==
'BrandManager'
this
.
msg
=
{
BrandName
:
""
,
//名称
pageIndex
:
1
,
pageSize
:
15
,
CategoryId
:
0
,
//分类Id
BrandEnterpriseType
:
this
.
isBrand
?
1
:
2
,
//(1-品牌,2-服务)
}
this
.
getList
();
this
.
getTypeEnumList
();
},
deep
:
true
,
},
},
methods
:
{
getList
()
{
this
.
loading
=
true
;
if
(
this
.
dateStr
&&
this
.
dateStr
.
length
>
0
)
{
this
.
msg
.
QStartDate
=
this
.
dateStr
[
0
];
this
.
msg
.
QEndDate
=
this
.
dateStr
[
1
];
}
else
{
this
.
msg
.
QStartDate
=
""
;
this
.
msg
.
QEndDate
=
""
;
}
this
.
apipost
(
"/api/Trade/GetBrandEnterprisePage"
,
this
.
msg
,
(
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
this
.
tableData
.
forEach
((
x
)
=>
{
x
.
LogoList
=
[];
x
.
LogoList
.
push
(
x
.
Logo
);
});
}
});
},
handleCheckAllChange
(
val
)
{
this
.
checkedCities
=
val
?
this
.
cityOptions
:
[];
this
.
isIndeterminate
=
false
;
},
handleCheckedCitiesChange
(
value
)
{
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
},
//下载载体文件
downLoadCarrier
()
{
this
.
msg
.
ExcelEnumIds
=
this
.
checkedCities
;
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
msg
.
RandomNum
=
Math
.
random
();
if
(
!
msg
.
Id
||
msg
.
Id
==
""
)
{
msg
.
Id
=
0
;
}
this
.
downLoadLoading
=
true
;
if
(
this
.
isBrand
)
{
this
.
loadingText
=
"正在生成消费品牌文件,请勿关闭或刷新页面..."
;
}
else
{
this
.
loadingText
=
"正在生成服务文件,请勿关闭或刷新页面..."
;
}
var
that
=
this
;
this
.
download_timer
=
setInterval
(
function
()
{
that
.
checkCarrierFile
(
msg
)
},
2000
);
},
checkCarrierFile
(
msg
)
{
var
fileName
=
"服务信息.xls"
;
if
(
this
.
isBrand
)
{
fileName
=
"消费品牌信息.xls"
;
}
var
that
=
this
;
this
.
apipost
(
"/api/Trade/CheckBuildingCarrierFile"
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
clearInterval
(
this
.
download_timer
);
this
.
checkedCities
=
[];
if
(
this
.
isBrand
)
{
this
.
loadingText
=
"正在下载消费品牌文件,请勿关闭或刷新页面..."
;
}
else
{
this
.
loadingText
=
"正在下载服务文件,请勿关闭或刷新页面..."
;
}
var
fileUrl
=
res
.
data
.
data
.
fileUrl
;
var
filepath
=
res
.
data
.
data
.
filePath
;
var
key
=
res
.
data
.
message
;
var
params
=
{
fileUrl
:
fileUrl
}
//删除缓存和Key
var
deleteparams
=
{
key
:
key
,
fileUrl
:
fileUrl
,
filepath
:
filepath
,
};
var
apiurl
=
that
.
domainManager
().
DomainUrl
+
"/api/Trade/GetFile"
;
var
postData
=
that
.
GetPostData
(
""
,
params
,
""
);
that
.
$http
.
post
(
apiurl
,
postData
,
{
responseType
:
'arraybuffer'
,
onDownloadProgress
:
(
progressEvent
)
=>
{
const
progress
=
Math
.
round
((
progressEvent
.
loaded
/
progressEvent
.
total
)
*
100
);
that
.
loadingText
=
`正在下载【`
+
(
that
.
isBrand
?
'品牌'
:
"服务"
)
+
`】文件`
+
progress
+
`%,请勿关闭或刷新页面...`
;
// 在这里处理下载进度, 如更新界面上的进度条
}
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
that
.
downLoadLoading
=
false
;
that
.
loadingText
=
""
;
that
.
apipost
(
"/api/Trade/DeleteKey"
,
deleteparams
,
(
res
)
=>
{})
that
.
dialogVisible
=
false
;
}).
catch
(
function
(
res
)
{
console
.
log
(
res
);
});
}
}
);
},
getDown
()
{
this
.
cityOptions
=
[];
this
.
apipost
(
"/api/Trade/GetBuildingCarrierExportEnumList"
,
{},
(
res
)
=>
{
this
.
cities
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
data
.
forEach
((
item
)
=>
{
this
.
cityOptions
.
push
(
item
.
Id
);
});
});
},
//删除
delManage
(
obj
)
{
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Trade/RemoveBrandEnterpriseInfo"
,
{
CarrierId
:
obj
.
ID
,
Status
:
1
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
}
);
});
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//获取项目类型
getTypeEnumList
()
{
this
.
apipost
(
"/api/Trade/GetProjectTypeEnumList"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ProjectTypeList
=
res
.
data
.
data
;
}
});
this
.
apipost
(
"/api/Trade/GetBrandClassList"
,
{
BrandCategory
:
this
.
isBrand
?
3
:
4
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CategoryList
=
res
.
data
.
data
;
let
obj
=
{
ClassName
:
"不限"
,
ID
:
0
,
};
this
.
CategoryList
.
unshift
(
obj
);
}
});
},
//获取项目类型
getProject
(
type
)
{
let
str
=
""
;
this
.
ProjectTypeList
.
forEach
((
x
)
=>
{
if
(
x
.
Id
==
type
)
{
str
=
x
.
Name
;
}
});
return
str
;
},
},
mounted
()
{},
};
</
script
>
<
style
>
.VehicleManagement
.content
.searchInput
{
border
:
1px
solid
#dcdfe6
;
border-radius
:
4px
;
}
.VehicleManagement
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.VehicleManagement
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.VehicleManagement
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/tradePavilion/tradePavilionIndex.vue
View file @
5ad347e5
...
...
@@ -343,18 +343,18 @@
</li>
<li
class=
"menu_item"
:class=
"
{ Fchecked: isChecked == '/
brandManagement
' }"
:class=
"
{ Fchecked: isChecked == '/
BrandManager
' }"
@click="
(isChecked = '/
brandManagement'), CommonJump('brandManagement
')
(isChecked = '/
BrandManager'), CommonJump('BrandManager
')
"
>
<i
class=
"el-icon-menu"
></i><span>
消费品牌管理
</span>
</li>
<li
class=
"menu_item"
:class=
"
{ Fchecked: isChecked == '/
brandManagement
' }"
:class=
"
{ Fchecked: isChecked == '/
EnterpriseManager
' }"
@click="
(isChecked = '/
brandManagement'), CommonJump('brandManagement
')
(isChecked = '/
EnterpriseManager'), CommonJump('EnterpriseManager
')
"
>
<i
class=
"el-icon-menu"
></i><span>
企业服务管理
</span>
...
...
src/router/index.js
View file @
5ad347e5
...
...
@@ -814,6 +814,18 @@ export default new Router({
name
:
'BuildingServiceManager'
,
component
:
resolve
=>
require
([
'@/components/tradePavilion/BuildingManager'
],
resolve
),
},
//消费品牌管理
{
path
:
'/BrandManager'
,
name
:
'BrandManager'
,
component
:
resolve
=>
require
([
'@/components/tradePavilion/BrandEnterpriseManager'
],
resolve
),
},
//企业服务管理
{
path
:
'/EnterpriseManager'
,
name
:
'EnterpriseManager'
,
component
:
resolve
=>
require
([
'@/components/tradePavilion/BrandEnterpriseManager'
],
resolve
),
},
//贸易管理--载体管理编辑
{
path
:
'/editVehicle'
,
...
...
@@ -826,6 +838,12 @@ export default new Router({
name
:
'BuildingVehicle'
,
component
:
resolve
=>
require
([
'@/components/tradePavilion/BuildingVehicle'
],
resolve
),
},
//品牌管理--企业管理编辑
{
path
:
'/BrandEnterEdit'
,
name
:
'BrandEnterEdit'
,
component
:
resolve
=>
require
([
'@/components/tradePavilion/BrandEnterEdit'
],
resolve
),
},
//贸易管理--实名认证
{
path
:
'/realAuthentication'
,
...
...
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