Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
6d424ad9
提交
6d424ad9
编写于
8月 13, 2020
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新建云鹊店铺
上级
411e3754
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
790 行增加
和
76 行删除
+790
-76
router.js
src/router/router.js
+12
-0
slidebar.vue
src/views/layout/slidebar.vue
+15
-76
create-shop.vue
src/views/shop/create-shop.vue
+443
-0
shop-list.vue
src/views/shop/shop-list.vue
+320
-0
未找到文件。
src/router/router.js
浏览文件 @
6d424ad9
...
...
@@ -61,6 +61,10 @@ const createRange = r => require.ensure([], () => r(require('../views/yqrange/cr
const
editRange
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/yqrange/edit-range.vue'
)),
'edit-range'
)
const
createLive
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/yqrange/create-live.vue'
)),
'create-live'
)
const
shopList
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/shop/shop-list.vue'
)),
'shop-list'
)
const
createShop
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/shop/create-shop.vue'
)),
'create-shop'
)
export
default
[{
path
:
'/'
,
component
:
App
,
...
...
@@ -254,6 +258,14 @@ export default [{
path
:
'/edit-simple-advert'
,
component
:
editSimpleAdvert
,
},
{
path
:
'/shop-list'
,
component
:
shopList
,
},
{
path
:
'/create-shop'
,
component
:
createShop
,
},
// {
// path: '/followup',
// name: 'followUp',
...
...
src/views/layout/slidebar.vue
浏览文件 @
6d424ad9
...
...
@@ -121,76 +121,9 @@
]
},
// {
// title: '居民管理',
// icon: 'el-icon-patients-manage',
// index: 'patients-manage',
// subs: [
// {
// title: '我的居民',
// icon: 'el-icon-setting',
// index: 'patients-manage/mypatients-manage/patients-list'
// },
// {
// title: '新增居民',
// icon: 'el-icon-setting',
// index: 'patients-manage/new-manage/new-patient'
// },
// {
// title: '分组管理',
// icon: 'el-icon-setting',
// index: 'patients-manage/labels-manage/labels-list'
// },
// {
// title: '资料不全居民',
// icon: 'el-icon-setting',
// index: 'patients-manage/not-complete/uncompleted-list'
// }
// ]
// },{
// title: '消息推送',
// icon: 'el-icon-message',
// index: 'msg-push',
// isMessageSend: true,
// checkAuth: true,
// },
// {
// title: '学情报告',
// icon: 'el-icon-tickets',
// index: 'report-list',
// subs: [
// {
// title: '项目列表',
// icon: 'el-icon-document',
// index: 'report-list'
// },
// {
// title: '任务列表',
// icon: 'el-icon-document',
// index: 'export-download'
// }
// ]
// },
// {
// title: 'CME',
// icon: 'el-icon-reading',
// index: 'credit-manage',
// subs: [
// {
// title: '学分管理列表',
// icon: 'el-icon-document',
// index: 'credit-manage'
// },
// {
// title: '审核权限管理',
// icon: 'el-icon-document',
// index: 'review-access-manage'
// },
// {
// title: '学分发放管理',
// icon: 'el-icon-document',
// index: 'credit-send-manage'
// },
// ]
// title: '云鹊店铺',
// icon: 'el-icon-first-aid-kit',
// index: 'shop'
// },
],
outsideItems
:
[
// 外部用户 路由
...
...
@@ -214,9 +147,11 @@
mounted
(){
if
(
this
.
storageIdType
==
1
){
vm
.
setEntrySide
();
vm
.
setShopSide
()
}
else
if
(
this
.
storageIdType
==
2
)
{
vm
.
setFollowSide
();
vm
.
getRoleObj
();
vm
.
setShopSide
()
}
},
watch
:
{
...
...
@@ -234,15 +169,11 @@
storageIdType
(
val
){
if
(
val
==
1
){
vm
.
setEntrySide
();
vm
.
setShopSide
()
}
else
if
(
val
==
2
)
{
vm
.
setFollowSide
();
vm
.
getRoleObj
();
// let mainManager = localStorage.getItem('mainManager')
// let manager = localStorage.getItem('manager')
// console.log('存储权限值',mainManager,manager)
// if (mainManager == 1 || manager == 1) {
// vm.setCircleSize();
// }
vm
.
setShopSide
()
}
},
},
...
...
@@ -487,6 +418,14 @@
vm
.
items
.
push
(
yqRange
);
vm
.
items
.
push
(
outResourceManage
);
},
setShopSide
(){
const
shop
=
{
title
:
'云鹊店铺'
,
icon
:
'el-icon-first-aid-kit'
,
index
:
'shop-list'
};
vm
.
items
.
push
(
shop
);
},
goToMessageSendPage
(
checkAuth
)
{
if
(
checkAuth
){
...
...
src/views/shop/create-shop.vue
0 → 100644
浏览文件 @
6d424ad9
<
template
>
<div
class=
"create-shop-wrapper"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
></bread-crumb>
<div
class=
"create-shop-content screenSet"
id=
"screenSet"
>
<el-row
class=
"step-content"
>
<el-col
:span=
"20"
>
<p
class=
"title"
>
新建店铺
</p>
</el-col>
<el-col
:span=
"4"
style=
"text-align: right"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"complete"
>
完成
</el-button>
</el-col>
</el-row>
<el-form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-width=
"150px"
label-suffix=
":"
class=
"basic-form"
>
<div
class=
"basic-item-icon"
>
<el-form-item
label=
"店铺LOGO"
class=
"required-label"
>
<el-upload
v-model=
"formData.headUrl"
class=
"bg-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeUploadPic1"
>
<img
v-if=
"formData.headUrl"
:src=
"formData.headUrl"
@
mouseover
.
stop=
"imgMouseOver1=true"
class=
"bg-img"
/>
<img
v-if=
"!formData.headUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<div
class=
"img-delete"
v-show=
"imgMouseOver1"
@
click
.
stop=
"deleteImg(1)"
@
mouseout
.
stop=
"imgMouseOver1=false"
>
<i
class=
"el-icon-delete"
></i>
</div>
<div
class=
"limit-text"
>
<p>
限制大小: 500kb
</p>
<p>
最小尺寸:160*160
</p>
<p>
支持jpeg, png格式
</p>
</div>
</el-upload>
</el-form-item>
<p
class=
"upload-message"
v-if=
"uploadImgMessage1"
>
请上传店铺logo
</p>
</div>
<el-form-item
label=
"店铺名称"
prop=
"name"
>
<el-col
:span=
"13"
>
<el-input
size=
"small"
v-model=
"formData.name"
placeholder=
"请输入店铺名称"
style=
"width:70%;"
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
name
).
replace
(
/
\s
+/g
,
""
).
length
}}
/14
</span>
</el-col>
</el-form-item>
<el-form-item
label=
"店铺简介"
prop=
"introduce"
>
<el-col
:span=
"13"
>
<el-input
type=
"textarea"
rows=
"2"
maxlength=
"40"
size=
"small"
v-model=
"formData.introduce"
placeholder=
"请输入店铺简介"
style=
"width:70%;"
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
introduce
).
replace
(
/
\s
+/g
,
""
).
length
}}
/40
</span>
</el-col>
</el-form-item>
<el-form-item
label=
"店铺类型"
prop=
"dynamicFlag"
>
<el-select
v-model=
"formData.dynamicFlag"
placeholder=
"请选择店铺类型"
size=
"small"
clearable
>
<el-option
v-for=
"(item,index) in typeList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<el-dialog
class=
"dialog-title-border-old"
title=
"图片裁剪"
:visible
.
sync=
"showCropper"
:width=
"currentOption.cropDialogWidth"
center
>
<div
slot=
"title"
style=
"text-align: left;"
>
<span
style=
"font-weight: 700;"
>
图片裁剪
</span>
</div>
<div
v-if=
"showCropper"
style=
"margin-bottom: 20px;"
>
<Cropper
:cropOption=
"currentOption"
@
getCropImg=
"getCropImg(arguments)"
:originImg=
"slide2.oriUrl"
/>
</div>
</el-dialog>
</div>
</div>
</
template
>
<
script
>
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
let
vm
=
null
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
Cropper
from
'@/components/common/cropper.vue'
export
default
{
components
:
{
BreadCrumb
,
Cropper
},
data
(){
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
indexOf
(
"
\
\"
) != -1) {
//存在
callback(new Error("
请勿输入字符“
\\
”
"));
} else if (value.indexOf("
.
") != -1) {
callback(new Error("
请勿输入字符“
.
”
"));
} else {
callback();
}
};
return{
curmbFirst: '云鹊店铺',
typeList: [{
label: '供货商',
value: '1',
}, {
label: '医生小店',
value: '2',
}, {
label: '小药房',
value: '3',
}],
formData: {
headUrl: '',
name: '',
introduce: '',
dynamicFlag: '',
},
showCropper: false,
currentOption: {
offset_x: 120,
offset_y: 185,
width: 160,
height: 120,
cvWidth: 1000,
cvHeight: 800,
uploadType: 1,
cropDialogWidth: '900px',
cropBoxResizable: true,
minCropBoxWidth: 100,
minCropBoxHeight: 100,
aspectRatio: 16/9
},
slide2: {
oriUrl: '', // 原图
},
rules: {
name: [
{ required: true, message: "
请输入圈子名称
", trigger: "
blur
" },
{
min: 2,
max: 14,
message: "
输入长度为
2
-
14
的内容,可包含中英文、数字及特殊符号
",
trigger: "
blur
"
},
{ validator: checkProjectStr, trigger: "
blur
" }
],
introduce: [
{ required: true, message: "
请输入圈子介绍
", trigger: "
blur
" },
{
min: 2,
max: 40,
message: "
输入长度为
2
-
40
的内容,可包含中英文、数字及特殊符号
",
trigger: "
blur
"
},
{ validator: checkProjectStr, trigger: "
blur
" }
],
headUrl: [
{ required: true, message: "
请选择圈子头像
", trigger: "
blur
" }
],
dynamicFlag: [
{ required: true, message: "
请选择内容发布权限
", trigger: "
blur
" },
]
},
imgMouseOver1: false,
uploadImgMessage1: false,//未上传图片,校验提示语
}
},
created() {
vm = this;
},
methods: {
complete() {},
//表单校验
submitForm() {
let formName = "
formData
";
let flag = null;
if (!this.formData.headUrl){
this.uploadImgMessage1 = true;
}
this.$refs[formName].validate(valid => {
if (valid&&this.formData.headUrl!="") {
flag = true;
} else {
console.log("
error
submit
!!
");
flag = false;
}
});
this.$emit('returnIsNext', flag);
},
//上传店铺logo
beforeUploadPic1(file) {
this.currentOption.aspectRatio = 1/1;
this.currentOption.cropBoxResizable = true;
this.currentOption.minCropBoxWidth = 160;
this.currentOption.minCropBoxHeight = 160;
let fileLimit = {
width: 160,
height: 160,
size: 0.5,
sizeText: "
500
K
",
key: "
headUrl
",
more: "
imgUrl1More
",
show: "
uploadImgMessage1
"
};
this.beforeUpload(file, fileLimit);
},
//上传图片
beforeUpload(file, fileLimit) {
let vm = this;
const isJPG = file.type === "
image
/
jpeg
";
const isPNG = file.type === "
image
/
png
";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) {
vm.$message.error("
图片格式不符合规范,请根据规范上传图片
");
// return;
}
// if (!isLt2M) {
// vm.$message.error("
图片大小不符合规范,请根据规范上传图片
");
// return;
// }
let _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function (theFile) {
let image = new Image()
image.src = theFile.target.result
vm.slide2.oriUrl = theFile.target.result;
image.onload = function () {
let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
if (_this.width < fileLimit.width || _this.height < fileLimit.height) {
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
return;
} else if(_this.width > fileLimit.width || _this.height > fileLimit.height){
vm.showCropper = true;
vm.currentOption.cvWidth = _this.width;
vm.currentOption.cvHeight = _this.height;
return;
} else {
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function (path) {
closeLoading(vm);
console.log('上传成功后路径', path);
if (fileLimit.show == "
uploadImgMessage1
") {
vm.uploadImgMessage1 = false;
} else if (fileLimit.show == "
uploadImgMessage2
") {
vm.uploadImgMessage2 = false;
}
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.name,
attachmentExt: path.ext,
attachmentSize: path.size
};
vm.$message.success("
上传成功
");
});
}
};
};
return isJPG && isLt2M;
},
//删除图片
deleteImg(type) {
if (type == 1) {
vm.formData.headUrl = "";
vm.imgMouseOver1 = false;
}
},
// 获取裁剪的图片数据
getCropImg(argument) {
this.showCropper = false;
this.cropData = argument[1]
vm.doUploadQiNiu(argument[2])
argument[3] && argument[3].destroy();
// vm.slide2.oriUrl = "";
},
// 上传七牛
doUploadQiNiu(file){
doUpload(this,file, getFilePath(file,null), 'preview4', 'uploadProgress1', '').then(function (path) {
vm.formData.headUrl = path.fullPath;
vm.$message.success('上传成功');
});
},
},
}
</
script
>
<
style
lang=
"scss"
>
.create-shop-wrapper
{
.create-shop-content
{
background
:
#fff
;
padding
:
10px
;
.step-content
{
overflow
:
hidden
;
height
:
60px
;
padding
:
10px
10px
50px
;
border-bottom
:
1px
solid
#efefef
;
.title
{
font-size
:
13px
;
color
:
#449284
;
}
}
}
.el-button--text
{
color
:
#449284
;
font-size
:
14px
;
&
:
:
after
{
content
:
''
;
position
:
relative
;
height
:
14px
;
/*border-right: 1px solid #EBEEF5;*/
border-right
:
1px
solid
#aaaaaa
;
padding-right
:
10px
;
}
&
:last-of-type
{
&
:
:
after
{
content
:
''
;
position
:
relative
;
width
:
1px
;
height
:
14px
;
border-right
:
none
;
}
}
}
}
.
required-label
.
el-form-item__label
:
:
before
{
content
:
"*"
;
color
:
#f56c6c
;
margin-right
:
4px
;
}
.basic-item-icon
{
position
:
relative
;
.require
{
position
:
absolute
;
left
:
67px
;
top
:
11px
;
color
:
#f56c6c
;
}
.upload-message
{
position
:
absolute
;
left
:
160px
;
top
:
105px
;
font-size
:
12px
;
color
:
#f56c6c
;
}
.img-delete
{
position
:
absolute
;
left
:
0px
;
top
:
0px
;
width
:
84px
;
height
:
100px
;
background
:
#000
;
opacity
:
0
.7
;
z-index
:
999
;
i
{
color
:
#fff
;
margin-top
:
39px
;
margin-left
:
0px
;
}
}
}
.word-num
{
font-size
:
12px
;
color
:
#999
;
padding-top
:
5px
;
}
.line
{
margin-left
:
10px
;
width
:
20px
;
}
.bg-uploader
{
.bg-img
{
float
:
left
;
width
:
84px
;
height
:
100px
;
}
.limit-text
{
float
:
left
;
margin-left
:
10px
;
margin-top
:
-10px
;
p
{
font-size
:
12px
;
color
:
#999
;
text-align
:
left
;
}
}
}
.el-upload__tip
{
position
:
absolute
;
top
:
-6px
;
left
:
130px
;
}
</
style
>
src/views/shop/shop-list.vue
0 → 100644
浏览文件 @
6d424ad9
<
template
>
<div
class=
"yqshop-wrapper"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
></bread-crumb>
<div
class=
"yqshop-content screenSet"
id=
"screenSet"
>
<div
class=
"header-title"
>
云鹊店铺
</div>
<el-form
ref=
"searchForm"
:model=
"searchForm"
label-width=
"80px"
label-suffix=
":"
:inline=
"true"
>
<el-row
:gutter=
"30"
type=
"flex"
style=
"margin-top: 10px"
>
<el-col
:span=
"18"
>
<el-form-item
label=
"店铺名称"
>
<el-input
v-model=
"searchForm.name"
size=
"small"
placeholder=
"请输入店铺名称"
></el-input>
</el-form-item>
<el-form-item
label=
"店铺ID"
>
<el-input
v-model=
"searchForm.id"
size=
"small"
placeholder=
"请输入店铺ID"
></el-input>
</el-form-item>
<el-form-item
label=
"店铺类型"
>
<el-select
v-model=
"searchForm.type"
placeholder=
"请选择店铺类型"
size=
"small"
clearable
>
<el-option
v-for=
"(item,index) in typeList"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchList"
>
查询
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"resetForm"
style=
"margin-left:0;"
>
重置
</el-button>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"createShop"
>
新建店铺
</el-button>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"tableData"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
prop=
"id"
label=
"店铺ID"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"店铺名称"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"type"
label=
"店铺类型"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
type
|
dynamicFlagStatus
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"店铺状态"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"num"
label=
"已上架商品数"
min-width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createdTime"
label=
"创建时间"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createdTime
|
liveDateFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div>
<el-button
@
click=
"editShop(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"shopManage(scope.row)"
type=
"text"
size=
"small"
>
店铺管理
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
<div
class=
"pagination"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleNumChange"
:current-page=
"searchForm.pageNo"
:page-sizes=
"[10, 30, 50, 100]"
:page-size=
"searchForm.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<
script
>
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
getRangeList
,
updateRangeStatus
}
from
"../../utils/yqrange/yqrangeApi"
;
export
default
{
components
:
{
BreadCrumb
},
data
(){
return
{
curmbFirst
:
'云鹊店铺'
,
showAllFlag
:
false
,
showNewFlag
:
false
,
searchForm
:
{
name
:
''
,
id
:
''
,
type
:
''
,
pageNo
:
1
,
pageSize
:
10
,
},
totalRows
:
0
,
tableData
:
[
// {
// id: '',
// name: '',
// type: null,
// status: '',
// num: null,
// createdTime: '',
// }
],
typeList
:
[{
label
:
'供货商'
,
value
:
'1'
,
},
{
label
:
'医生小店'
,
value
:
'2'
,
},
{
label
:
'小药房'
,
value
:
'3'
,
}]
}
},
created
()
{
this
.
initPrivilege
();
this
.
searchList
();
},
methods
:
{
initPrivilege
(){
let
idType
=
localStorage
.
getItem
(
'storageIdType'
);
this
.
searchForm
.
userType
=
idType
;
// 内部用户:运营人员
if
(
idType
==
"1"
){
this
.
showAllFlag
=
true
;
this
.
showNewFlag
=
true
;
}
// 外部用户
else
if
(
idType
==
"2"
){
this
.
showAllFlag
=
false
;
this
.
getUserAuth
();
}
},
// 外部用户权限
getUserAuth
(){
let
highMainManager
=
localStorage
.
getItem
(
'highMainManager'
);
let
mainManager
=
localStorage
.
getItem
(
'mainManager'
);
let
manager
=
localStorage
.
getItem
(
'manager'
);
if
(
highMainManager
==
"1"
||
mainManager
==
"1"
){
this
.
showNewFlag
=
true
;
}
else
if
(
manager
==
"1"
){
this
.
showNewFlag
=
false
;
}
},
searchList
()
{
openLoading
(
this
);
let
params
=
this
.
searchForm
;
/* getRangeList(params).then((res) => {
closeLoading(this);
if(res.code == "000000") {
this.tableData = res.data.circleList;
this.totalRows = res.data.count;
} else {
this.tableData = [];
}
}).catch((error) => {
this.$message.error("请重试");
})*/
},
resetForm
()
{
this
.
searchForm
=
{
name
:
''
,
id
:
''
,
type
:
''
};
this
.
searchList
();
},
//新建店铺
createShop
()
{
let
enterType
=
1
;
//1:add 2 edit
this
.
$router
.
push
({
path
:
`/create-shop?enterType=
${
enterType
}
`
})
},
//上线
publishRange
(
row
)
{
this
.
$confirm
(
`确定上线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'上线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
// confirm
this
.
updateStatus
(
row
.
id
,
"30"
);
}).
catch
(()
=>
{
// cancel
// this.$message.error("上线失败");
});
},
//下线
unPublishRange
(
row
)
{
this
.
$confirm
(
`确定下线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'下线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"40"
);
// confirm
}).
catch
(()
=>
{
// cancel
});
},
// 更新圈子状态(上线,下线)
updateStatus
(
id
,
status
){
let
params
=
{
"id"
:
id
,
"status"
:
status
};
updateRangeStatus
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
status
==
"40"
){
this
.
$message
.
success
(
"下线成功"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
success
(
"上线成功"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
success
(
"解散成功"
);
}
this
.
searchList
();
}
else
{
if
(
status
==
"40"
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
}
}).
catch
((
error
)
=>
{
if
(
status
==
"40"
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
})
},
//店铺管理
shopManage
(
row
)
{
this
.
$router
.
push
({
path
:
'/role-manage?id='
+
row
.
id
,
})
},
//编辑
editShop
(
row
)
{
let
enterType
=
2
;
//1:add 2 edit
this
.
$router
.
push
({
path
:
`/create-range?enterType`
,
query
:{
id
:
row
.
id
,
enterType
:
enterType
,
roleType
:
row
.
roleId
}
})
},
handleSizeChange
(
val
)
{
this
.
searchForm
.
pageSize
=
val
;
this
.
searchForm
.
pageNo
=
1
;
this
.
searchList
();
},
handleNumChange
(
val
)
{
this
.
searchForm
.
pageNo
=
val
;
this
.
searchList
();
},
},
}
</
script
>
<
style
lang=
"scss"
>
.yqshop-wrapper
{
.yqshop-content
{
background
:
#fff
;
padding
:
10px
;
.header-title
{
padding
:
10px
12px
;
font-size
:
13px
;
color
:
#449284
;
border-bottom
:
1px
solid
#efefef
;
}
}
.el-button--text
{
color
:
#449284
;
font-size
:
14px
;
&
:
:
after
{
content
:
''
;
position
:
relative
;
height
:
14px
;
/*border-right: 1px solid #EBEEF5;*/
border-right
:
1px
solid
#aaaaaa
;
padding-right
:
10px
;
}
&
:last-of-type
{
&
:
:
after
{
content
:
''
;
position
:
relative
;
width
:
1px
;
height
:
14px
;
border-right
:
none
;
}
}
}
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录