Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zj-manage
Overview
Overview
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
new-zhengjiang
zj-manage
Commits
cc211273
Commit
cc211273
authored
Mar 06, 2024
by
swl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: gx
parent
becc8fc5
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1255 additions
and
380 deletions
+1255
-380
.DS_Store
.DS_Store
+0
-0
livingCircle.js
src/api/livingCircle.js
+118
-0
index.js
src/config/index.js
+2
-2
index.js
src/router/index.js
+2
-2
request.js
src/utils/request.js
+2
-2
category.vue
src/views/livingCircle/category.vue
+363
-0
enter.vue
src/views/livingCircle/enter.vue
+385
-67
help.vue
src/views/livingCircle/help.vue
+254
-98
searchTerms.vue
src/views/livingCircle/searchTerms.vue
+127
-31
serviceType.vue
src/views/livingCircle/serviceType.vue
+0
-176
vue.config.js
vue.config.js
+2
-2
No files found.
.DS_Store
View file @
cc211273
No preview for this file type
src/api/livingCircle.js
View file @
cc211273
...
...
@@ -15,6 +15,30 @@ export function applyReview(params) {
})
);
}
// 详情
export
function
applyDetail
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"GET"
),
{
url
:
"/admin-api/living-circle/detail?shopId="
+
params
,
})
);
}
// 菜单
export
function
shopMenu
()
{
return
api
(
Object
.
assign
(
formatParams
(
"GET"
),
{
url
:
"/admin-api/living-circle/menu"
,
})
);
}
// 启用|禁用
export
function
shopEnable
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/enable"
,
})
);
}
// 邻里互助--商家、居民申请列表
export
function
helpList
(
params
)
{
return
api
(
...
...
@@ -31,6 +55,22 @@ export function helpReview(params) {
})
);
}
// 邻里互助--启用|禁用
export
function
helpEnable
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle-mutual-aid/enable"
,
})
);
}
// 邻里互助--详情
export
function
helpDetail
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"GET"
),
{
url
:
"/admin-api/living-circle-mutual-aid/comment?infoId="
+
params
,
})
);
}
// 类别
export
function
categoryList
()
{
return
api
(
...
...
@@ -39,3 +79,81 @@ export function categoryList() {
})
);
}
// 类别列表
export
function
getCategory
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/categoryList"
,
})
);
}
// 类别新增
export
function
addCategory
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/addCategory"
,
})
);
}
// 类别编辑
export
function
editCategory
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/editCategory"
,
})
);
}
// 类别-启用|禁用
export
function
enableCategory
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/categoryEnable"
,
})
);
}
// 上传-图标
export
function
iconUpload
(
params
)
{
let
header
=
{
"Content-Type"
:
"multipart/form-data"
,
};
let
formData
=
new
FormData
();
formData
.
append
(
"file"
,
params
);
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
formData
,
header
),
{
url
:
`/admin-api/file/iconUpload`
,
})
);
}
// 关键词列表
export
function
getKeyword
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/keywordList"
,
})
);
}
// 关键词新增
export
function
addKeyword
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/addKeyword"
,
})
);
}
// 关键词编辑
export
function
editKeyword
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/editKeyword"
,
})
);
}
// 关键词-启用|禁用
export
function
enableKeyword
(
params
)
{
return
api
(
Object
.
assign
(
formatParams
(
"POST"
,
params
),
{
url
:
"/admin-api/living-circle/keywordEnable"
,
})
);
}
src/config/index.js
View file @
cc211273
const
domain
=
{
// dev: "http://192.168.3.87:8881", // 姚镇接口
//
dev: "http://81.69.231.72:8881", // 姚镇接口
dev
:
"http://81.69.231.72:8881"
,
// 姚镇接口
// dev: "http://81.69.231.72:8881", // 测试接口
dev
:
"https://exam.smart-zj.cn:9100/smartExam/"
,
// 新正式接口
//
dev: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口
};
// 腾讯地图 key
const
map
=
{
...
...
src/router/index.js
View file @
cc211273
...
...
@@ -296,10 +296,10 @@ const routes = [
},
// 便民生活圈
{
path
:
"/livingCircle/
serviceType
"
,
path
:
"/livingCircle/
category
"
,
name
:
"serviceType"
,
meta
:
[
"服务类型管理"
],
component
:
()
=>
import
(
"@/views/livingCircle/
serviceType
.vue"
),
component
:
()
=>
import
(
"@/views/livingCircle/
category
.vue"
),
},
{
path
:
"/livingCircle/searchTerms"
,
...
...
src/utils/request.js
View file @
cc211273
...
...
@@ -5,9 +5,9 @@ import { TokenKey } from "@/utils/auth";
const
config
=
{
// proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址
//
proxy: "http://81.69.231.72:8881", // 测试地址
proxy
:
"http://81.69.231.72:8881"
,
// 测试地址
// proxy: "http://192.168.3.87:8881", //本地
proxy
:
"https://exam.smart-zj.cn:9100/smartExam"
,
// 新正式接口zs
//
proxy: "https://exam.smart-zj.cn:9100/smartExam", // 新正式接口zs
// proxy: "http://81.69.231.72:9089/", // 测试地址
// proxy1: "http://81.69.231.72:8881/admin-api", // 测试地址
// proxy1: "https://exam.smart-zj.cn:9100/smartExam/admin-api", // 新正式接口
...
...
src/views/livingCircle/category.vue
0 → 100644
View file @
cc211273
<
template
>
<div>
<div
class=
"search-wrapper"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"search_form"
style=
"text-align: left"
>
<el-form-item
label=
"类型名称"
>
<el-input
clearable
v-model=
"searchForm.name"
placeholder=
"请输入类型名称"
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-select
v-model=
"searchForm.menuId"
placeholder=
"请选择类型"
clearable
size=
"medium"
@
change=
"init"
>
<el-option
label=
"全部"
value=
""
>
</el-option>
<el-option
v-for=
"item in menuList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"addHandle"
>
新增
</el-button>
</el-form-item>
</el-form>
</div>
<div
class=
"table-wrapper"
>
<table-template
:tableData=
"tableData"
:tableColumns=
"tableColumns"
:loading=
"loading"
:pagination=
"pagination"
@
Jump=
"jumpPage"
>
<el-table-column
slot=
"iconUrl"
label=
"图标"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.iconUrl"
:preview-src-list=
"[scope.row.iconUrl]"
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
slot=
"delFlag"
label=
"启用状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.delFlag == 0 || scope.row.delFlag == 1"
:type=
"
scope.row.delFlag == 1
? 'danger'
: scope.row.delFlag == 0
? 'success'
: ''
"
>
{{
scope
.
row
.
delFlag
==
1
?
"禁用"
:
"启用"
}}
</el-tag
>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"350"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
size=
"mini"
class=
"btn"
round
@
click=
"view(scope.row)"
>
编辑
</el-button
>
<el-button
@
click=
"delFlagHandle(scope.row)"
:type=
"scope.row.delFlag == 0 ? 'danger' : 'success'"
size=
"mini"
round
slot=
"reference"
>
{{
scope
.
row
.
delFlag
==
0
?
"禁用"
:
"启用"
}}
</el-button>
</
template
>
</el-table-column>
</table-template>
</div>
<el-dialog
:title=
"type == 'add' ? '新增' : '编辑'"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
:model=
"dataForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"名称"
prop=
"name"
>
<el-input
v-model=
"dataForm.name"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"所属类型"
prop=
"menuId"
>
<el-select
v-model=
"dataForm.menuId"
placeholder=
"请选择类型"
clearable
size=
"medium"
>
<el-option
v-for=
"item in menuList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-input-number
v-model=
"dataForm.sort"
:min=
"1"
></el-input-number>
</el-form-item>
<el-form-item
label=
"图标"
prop=
"iconUrl"
>
<el-upload
class=
"avatar-uploader"
:show-file-list=
"false"
action=
"#"
:http-request=
"upload"
:before-upload=
"beforeUpload"
>
<img
v-if=
"dataForm.iconUrl"
:src=
"dataForm.iconUrl"
class=
"avatar"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmHandle"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getCategory
,
shopMenu
,
enableCategory
,
iconUpload
,
editCategory
,
addCategory
,
}
from
"@/api/livingCircle"
;
import
TableTemplate
from
"@/components/Table"
;
export
default
{
components
:
{
TableTemplate
},
data
()
{
return
{
type
:
"add"
,
searchForm
:
{},
menuList
:
[],
loading
:
false
,
tableData
:
[],
tableColumns
:
[
{
key
:
"name"
,
label
:
"服务名称"
,
},
{
key
:
"menuName"
,
label
:
"所属菜单"
,
},
{
key
:
"createTime"
,
label
:
"创建时间"
,
},
{
key
:
"iconUrl"
,
label
:
"图标"
,
type
:
"slot"
,
},
{
key
:
"delFlag"
,
label
:
"启用状态"
,
type
:
"slot"
,
},
{
key
:
"sort"
,
label
:
"排序"
,
},
],
pagination
:
{
total
:
0
,
pageSize
:
10
,
currentPage
:
1
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入类型名称"
,
trigger
:
"blur"
}],
sort
:
[{
required
:
true
,
message
:
"请输入类型排序"
,
trigger
:
"blur"
}],
menuId
:
[
{
required
:
true
,
message
:
"请输入所属类型"
,
trigger
:
"blur"
},
],
iconUrl
:
[
{
required
:
true
,
message
:
"请输入类型图标"
,
trigger
:
"blur"
},
],
},
dataForm
:
{
name
:
""
,
sort
:
1
,
iconUrl
:
""
,
menuId
:
""
,
id
:
""
,
},
dialogVisible
:
false
,
};
},
watch
:
{
dialogVisible
(
val
)
{
if
(
!
val
)
{
this
.
dataForm
=
{
name
:
""
,
sort
:
""
,
iconUrl
:
""
,
menuId
:
""
,
id
:
""
,
};
}
},
},
created
()
{
this
.
getMenu
();
this
.
init
();
},
methods
:
{
getMenu
()
{
shopMenu
().
then
((
res
)
=>
{
this
.
menuList
=
res
.
data
;
});
},
beforeUpload
()
{},
upload
(
file
)
{
console
.
log
(
"addCategory--->"
,
111
);
iconUpload
(
file
.
file
).
then
((
res
)
=>
{
this
.
dataForm
.
iconUrl
=
res
.
data
;
});
},
init
()
{
let
params
=
{
menuId
:
this
.
searchForm
.
menuId
,
name
:
this
.
searchForm
.
name
,
pageNum
:
this
.
pagination
.
currentPage
,
pageSize
:
this
.
pagination
.
pageSize
,
};
getCategory
(
params
).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
list
;
this
.
pagination
.
total
=
res
.
data
.
total
;
});
},
delFlagHandle
(
row
)
{
enableCategory
({
id
:
row
.
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
init
();
}
});
},
onSubmit
()
{
this
.
init
();
},
jumpPage
()
{
this
.
init
();
},
view
(
row
)
{
this
.
type
=
"edit"
;
this
.
dialogVisible
=
true
;
this
.
dataForm
.
sort
=
row
.
sort
;
this
.
dataForm
.
name
=
row
.
name
;
this
.
dataForm
.
iconUrl
=
row
.
iconUrl
;
this
.
dataForm
.
menuId
=
row
.
menuId
;
this
.
dataForm
.
id
=
row
.
id
;
},
confirmHandle
()
{
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
dataForm
.
id
)
{
editCategory
(
this
.
dataForm
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"编辑成功"
);
this
.
dialogVisible
=
false
;
this
.
init
();
}
});
}
else
{
addCategory
(
this
.
dataForm
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"新增成功"
);
this
.
dialogVisible
=
false
;
this
.
init
();
}
});
}
}
else
{
return
false
;
}
});
},
addHandle
()
{
this
.
type
=
"add"
;
this
.
dialogVisible
=
true
;
},
},
};
</
script
>
<
style
lang=
"stylus"
scoped
>
@import
'~@/stylus/common'
;
.btn
{
margin-right
10px
}
</
style
>
<
style
>
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
150px
;
height
:
150px
;
line-height
:
150px
;
text-align
:
center
;
}
.avatar
{
width
:
150px
;
height
:
150px
;
display
:
block
;
}
</
style
>
src/views/livingCircle/enter.vue
View file @
cc211273
...
...
@@ -7,20 +7,41 @@
class=
"search_form"
style=
"text-align: left"
>
<el-form-item
label=
"
入驻
名称"
>
<el-form-item
label=
"
店铺
名称"
>
<el-input
v-model=
"searchForm.name"
placeholder=
"请输入
入驻
名称"
placeholder=
"请输入
店铺
名称"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"
入驻名称
"
>
<el-form-item
label=
"
电话
"
>
<el-input
v-model=
"searchForm.
categoryId
"
placeholder=
"请输入
入驻名称
"
v-model=
"searchForm.
phone
"
placeholder=
"请输入
电话
"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"需求类型"
>
<el-cascader
:options=
"menuOptions"
clearable
filterable
@
change=
"menuChange"
></el-cascader>
</el-form-item>
<el-form-item
label=
"入驻类型"
>
<el-select
v-model=
"searchForm.type"
clearable
placeholder=
"请选择入驻类型"
size=
"medium"
>
<el-option
label=
"全部"
value=
""
>
</el-option>
<el-option
label=
"商家入驻"
value=
"0"
>
</el-option>
<el-option
label=
"市民上报"
value=
"1"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
查询
</el-button>
</el-form-item>
...
...
@@ -59,109 +80,250 @@
:pagination=
"pagination"
@
Jump=
"jumpPage"
>
<el-table-column
slot=
"
icon"
label=
"照片
"
align=
"center"
>
<el-table-column
slot=
"
type"
label=
"入驻类型
"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.icon"
:preview-src-list=
"[scope.row.icon]"
<el-tag
v-if=
"scope.row.type == 0 || scope.row.type == 1"
:type=
"scope.row.type == 1 ? 'success' : ''"
>
{{
scope
.
row
.
type
==
0
?
"商家入驻"
:
scope
.
row
.
type
==
1
?
"市民上报"
:
""
}}
</el-tag
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
slot=
"
url"
label=
"营业执照
"
align=
"center"
>
<el-table-column
slot=
"
state"
label=
"审核状态
"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.url"
:preview-src-list=
"[scope.row.url]"
<el-tag
v-if=
"
scope.row.state == 0 ||
scope.row.state == 1 ||
scope.row.state == 4
"
:type=
"
scope.row.state == 4
? 'danger'
: scope.row.state == 1
? 'success'
: ''
"
>
{{
scope
.
row
.
stateName
}}
</el-tag
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
slot=
"url1"
label=
"身份证照片"
align=
"center"
>
<el-table-column
slot=
"delFlag"
label=
"启用状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.delFlag == 0 || scope.row.delFlag == 1"
:type=
"
scope.row.delFlag == 1
? 'danger'
: scope.row.delFlag == 0
? 'success'
: ''
"
>
{{
scope
.
row
.
flagName
}}
</el-tag
>
</
template
>
</el-table-column>
<el-table-column
slot=
"icon"
label=
"照片"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-image
v-if=
"scope.row.pictureList"
style=
"width: 30px; height: 30px"
:src=
"scope.row.
icon
"
:preview-src-list=
"
[scope.row.url1]
"
:src=
"scope.row.
pictureList && scope.row.pictureList[0].url
"
:preview-src-list=
"
scope.row.previewSrcList
"
>
</el-image>
<div
v-else
>
暂无图片
</div>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"350"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
round
@
click=
"view(scope.row)"
>
查看
</el-button
>
<el-popconfirm
title=
"确定通过此申请吗?"
style=
"margin-left: 10px"
@
confirm=
"reviewHandle('pass', scope.row)"
v-if=
"scope.row.state == 0 && scope.row.state != 1"
>
<el-button
type=
"success"
size=
"mini"
round
slot=
"reference"
>
通过
</el-button>
</el-popconfirm>
<el-popconfirm
title=
"确定拒绝此申请吗?"
@
confirm=
"reviewHandle('refuse', scope.row)"
v-if=
"scope.row.state == 0 && scope.row.state != 4"
style=
"margin-left: 10px"
>
<el-button
type=
"danger"
size=
"mini"
round
slot=
"reference"
>
拒绝
</el-button>
</el-popconfirm>
<el-button
@
click=
"delFlagHandle(scope.row)"
:type=
"scope.row.delFlag == 0 ? 'danger' : 'success'"
size=
"mini"
round
slot=
"reference"
>
{{
scope
.
row
.
delFlag
==
0
?
"禁用"
:
"启用"
}}
</el-button>
</
template
>
</el-table-column>
</table-template>
</div>
<el-dialog
title=
"详情"
:visible
.
sync=
"dialogVisible"
width=
"30%"
destroy-on-close
>
<div
class=
"cell"
>
<p
class=
"label"
>
店铺名称
</p>
<p
class=
"value"
>
{{ detail.name }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
入驻类型
</p>
<p
class=
"value"
>
<el-tag
v-if=
"detail.type == 0 || detail.type == 1"
:type=
"detail.type == 1 ? 'success' : ''"
>
{{ detail.type == 0 ? "商家入驻" : "市民上报" }}
</el-tag
>
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
经营类型
</p>
<p
class=
"value"
>
{{ detail.categoryName }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
详细地址
</p>
<p
class=
"value"
>
{{ detail.address }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
区
</p>
<p
class=
"value"
>
{{ detail.district }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
电话
</p>
<p
class=
"value"
>
{{ detail.phone }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
营业时间
</p>
<p
class=
"value"
>
{{ detail.businessHours }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
创建时间
</p>
<p
class=
"value"
>
{{ detail.createTime }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
审核状态
</p>
<p
class=
"value"
>
<el-tag
v-if=
"detail.state == 0 || detail.state == 1 || detail.state == 4"
:type=
"
detail.state == 4 ? 'danger' : detail.state == 1 ? 'success' : ''
"
>
{{
detail.state == 4
? "审核拒绝"
: detail.state == 1
? "审核通过"
: "未审核"
}}
</el-tag
>
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
启用状态
</p>
<p
class=
"value"
>
<el-tag
v-if=
"detail.delFlag == 0 || detail.delFlag == 1"
:type=
"detail.delFlag == 1 ? 'danger' : 'success'"
>
{{ detail.delFlag == 1 ? "禁用" : "启用" }}
</el-tag
>
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
照片
</p>
<p
class=
"value"
>
<el-image
v-for=
"(item, index) in detail.pictureList"
:key=
"index"
style=
"width: 100px; height: 100px; margin-right: 10px"
:src=
"item.url"
:z-index=
"7777777"
:preview-src-list=
"[item.url]"
>
</el-image>
</p>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-popconfirm
title=
"确定通过此申请吗?"
style=
"margin-left: 10px"
@
confirm=
"reviewHandle('pass', detail)"
v-if=
"detail.state == 0 && detail.state != 1"
>
<el-button
type=
"success"
round
slot=
"reference"
>
通过
</el-button>
</el-popconfirm>
<el-popconfirm
title=
"确定拒绝此申请吗?"
@
confirm=
"reviewHandle('refuse', detail)"
v-if=
"detail.state == 0 && detail.state != 4"
style=
"margin-left: 10px"
>
<el-button
type=
"danger"
round
slot=
"reference"
>
拒绝
</el-button>
</el-popconfirm>
<!-- <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
> -->
</span>
</el-dialog>
</div>
</template>
<
script
>
import
tableTemplate
from
"@/components/Table"
;
import
{
applyList
,
applyReview
}
from
"@/api/livingCircle"
;
import
{
applyList
,
applyReview
,
applyDetail
,
shopEnable
,
shopMenu
,
}
from
"@/api/livingCircle"
;
export
default
{
name
:
"enter"
,
components
:
{
tableTemplate
},
data
()
{
return
{
dialogVisible
:
false
,
detail
:
{},
searchForm
:
{
name
:
""
,
state
:
""
,
type
:
""
,
phone
:
""
,
categoryId
:
""
,
},
// taskData: {
// myTask: 1,
// finishedTask: 2,
// allTask: 3,
// },
// activeName: "1",
menuOptions
:
[],
loading
:
false
,
tableData
:
[
{
name
:
"服务名称"
,
type
:
"所属类型"
,
icon
:
require
(
"@/assets/1.png"
),
wx
:
"1"
,
},
],
tableData
:
[],
tableColumns
:
[
{
key
:
"name"
,
label
:
"商家名称"
,
label
:
"店铺名称"
,
},
{
key
:
"type"
,
label
:
"入驻类型"
,
type
:
"slot"
,
},
{
key
:
"category"
,
key
:
"category
Name
"
,
label
:
"经营类型"
,
},
{
key
:
"district"
,
label
:
"区"
,
},
{
key
:
"address"
,
label
:
"详细地址"
,
width
:
220
,
},
{
key
:
"icon"
,
...
...
@@ -173,15 +335,35 @@ export default {
label
:
"联系电话"
,
},
{
key
:
"url"
,
label
:
"营业执照"
,
key
:
"businessHours"
,
label
:
"营业时间"
,
},
{
key
:
"createTime"
,
label
:
"创建时间"
,
width
:
180
,
},
{
key
:
"state"
,
label
:
"审核状态"
,
type
:
"slot"
,
},
{
key
:
"
url1
"
,
label
:
"
身份证
"
,
key
:
"
delFlag
"
,
label
:
"
启用状态
"
,
type
:
"slot"
,
},
// {
// key: "url",
// label: "营业执照",
// type: "slot",
// },
// {
// key: "url1",
// label: "身份证",
// type: "slot",
// },
],
pagination
:
{
total
:
0
,
...
...
@@ -192,24 +374,89 @@ export default {
name
:
[{
required
:
true
,
message
:
"请输入活动名称"
,
trigger
:
"blur"
}],
},
userName
:
""
,
typeList
:
[],
};
},
mounted
()
{
this
.
userName
=
localStorage
.
getItem
(
"userName"
);
this
.
init
();
this
.
getShopMenu
();
},
methods
:
{
getShopMenu
()
{
shopMenu
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
arr
=
[];
res
.
data
.
forEach
((
item
)
=>
{
let
obj
=
{
value
:
item
.
id
,
label
:
item
.
name
,
children
:
[],
};
if
(
item
.
categoryDOList
&&
item
.
categoryDOList
.
length
>
0
)
{
item
.
categoryDOList
.
forEach
((
it
)
=>
{
obj
.
children
.
push
({
value
:
it
.
id
,
label
:
it
.
name
,
});
});
}
arr
.
push
(
obj
);
this
.
menuOptions
=
arr
;
});
console
.
log
(
"res--->"
,
this
.
menuOptions
);
}
});
},
menuChange
(
val
)
{
this
.
searchForm
.
categoryId
=
val
[
1
];
this
.
init
();
// console.log("menuChange--->", val, this.searchForm.categoryId);
},
init
()
{
applyList
({
name
:
this
.
searchForm
.
name
,
state
:
this
.
searchForm
.
state
,
type
:
0
,
type
:
this
.
searchForm
.
type
,
phone
:
this
.
searchForm
.
phone
,
pageNum
:
this
.
pagination
.
currentPage
,
pageSize
:
this
.
pagination
.
pageSize
,
categoryId
:
this
.
searchForm
.
categoryId
,
}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
list
?
res
.
data
.
list
:
[];
this
.
pagination
.
total
=
res
.
data
.
total
;
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
data
.
list
&&
res
.
data
.
list
.
length
>
0
?
res
.
data
.
list
.
map
((
item
)
=>
{
return
{
...
item
,
stateName
:
item
.
state
==
0
?
"未审核"
:
item
.
state
==
1
?
"审核通过"
:
item
.
state
==
4
?
"审核拒绝"
:
""
,
flagName
:
item
.
delFlag
==
0
?
"启用"
:
item
.
delFlag
==
1
?
"禁用"
:
""
,
previewSrcList
:
item
.
pictureList
&&
item
.
pictureList
.
length
>
0
?
item
.
pictureList
.
map
((
item
)
=>
{
return
item
.
url
;
})
:
[],
};
})
:
[];
// this.tableData = res.data.list;
this
.
pagination
.
total
=
res
.
data
.
total
;
}
});
},
...
...
@@ -234,9 +481,27 @@ export default {
this
.
init
();
}
});
this
.
dialogVisible
=
false
;
},
view
()
{},
view
(
row
)
{
applyDetail
(
row
.
id
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
detail
=
res
.
data
;
this
.
dialogVisible
=
true
;
}
});
},
delFlagHandle
(
row
)
{
shopEnable
({
id
:
row
.
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
init
();
}
});
},
handleClick
()
{
this
.
loading
=
true
;
this
.
init
();
...
...
@@ -249,6 +514,16 @@ export default {
onSubmit
()
{
this
.
init
();
},
previewSrcList
(
list
)
{
this
.
$nextTick
(()
=>
{
if
(
list
&&
list
.
length
>
0
)
{
console
.
log
(
"previewSrcList--->"
,
list
);
list
.
forEach
((
item
)
=>
{
return
item
.
url
;
});
}
});
},
},
};
</
script
>
...
...
@@ -258,4 +533,47 @@ export default {
.btn
{
margin-right
10px
}
.cell
{
display
:
flex
;
align-items
:
center
;
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
.label
{
width
:
150px
;
color
:
#999
;
text-align
:
left
;
span
{
color
:
red
;
font-size
:
12px
;
}
}
.value
{
color
:
#000
;
text-align
:
left
;
}
.value1
{
color
:
red
;
}
.value2
{
color
:
green
;
}
.info
{
.item
{
width
:
100%
;
text-align
:
left
;
color
:
#000
;
margin-bottom
:
10px
;
}
.item
:last-child
{
margin-bottom
:
0
;
}
}
}
</
style
>
src/views/livingCircle/help.vue
View file @
cc211273
...
...
@@ -7,20 +7,6 @@
class=
"search_form"
style=
"text-align: left"
>
<el-form-item
label=
"用户名称"
>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名称"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"详细地址"
>
<el-input
v-model=
"searchForm.address"
placeholder=
"请输入详细地址"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"需求类型"
>
<el-select
v-model=
"searchForm.categoryId"
...
...
@@ -37,11 +23,26 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"描述"
>
<el-input
v-model=
"searchForm.content"
placeholder=
"请输入描述"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"电话"
>
<el-input
v-model=
"searchForm.phone"
placeholder=
"请输入电话"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
查询
</el-button>
</el-form-item>
<br
/>
<el-form-item
label=
"状态"
style=
"margin-top: 10px"
>
<el-form-item
label=
"
审核
状态"
style=
"margin-top: 10px"
>
<el-radio-group
v-model=
"searchForm.state"
@
change=
"onSubmit"
>
<el-radio
label=
""
>
全部
</el-radio>
<el-radio
:label=
"0"
>
未审核
</el-radio>
...
...
@@ -49,24 +50,18 @@
<el-radio
:label=
"4"
>
拒绝
</el-radio>
</el-radio-group>
</el-form-item>
<br
/>
<el-form-item
label=
"启用状态"
style=
"margin-top: 10px"
>
<el-radio-group
v-model=
"searchForm.delFlag"
@
change=
"onSubmit"
>
<el-radio
label=
""
>
全部
</el-radio>
<el-radio
:label=
"0"
>
启用
</el-radio>
<el-radio
:label=
"1"
>
禁用
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
<!--
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
:label=
"`我的待办 ( $
{taskData.myTask} )`"
name="1"
>
</el-tab-pane>
<el-tab-pane
:label=
"`我的已办 ( $
{taskData.finishedTask} )`"
name="2"
>
</el-tab-pane>
<el-tab-pane
:label=
"`所有任务 ( $
{taskData.allTask} )`"
name="3"
>
</el-tab-pane>
</el-tabs>
-->
<div
class=
"table-wrapper"
>
<table-template
:tableData=
"tableData"
...
...
@@ -75,85 +70,166 @@
:pagination=
"pagination"
@
Jump=
"jumpPage"
>
<el-table-column
slot=
"
icon"
label=
"照片
"
align=
"center"
>
<el-table-column
slot=
"
state"
label=
"审核状态
"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.icon"
:preview-src-list=
"[scope.row.icon]"
<el-tag
v-if=
"
scope.row.state == 0 ||
scope.row.state == 1 ||
scope.row.state == 4
"
:type=
"
scope.row.state == 4
? 'danger'
: scope.row.state == 1
? 'success'
: ''
"
>
{{
scope
.
row
.
stateName
}}
</el-tag
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
slot=
"
url"
label=
"营业执照
"
align=
"center"
>
<el-table-column
slot=
"
delFlag"
label=
"启用状态
"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.url"
:preview-src-list=
"[scope.row.url]"
<el-tag
v-if=
"scope.row.delFlag == 0 || scope.row.delFlag == 1"
:type=
"
scope.row.delFlag == 1
? 'danger'
: scope.row.delFlag == 0
? 'success'
: ''
"
>
{{
scope
.
row
.
flagName
}}
</el-tag
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
slot=
"url1"
label=
"身份证照片"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.icon"
:preview-src-list=
"[scope.row.url1]"
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"350"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
round
@
click=
"view(scope.row)"
>
查看
</el-button
>
<el-popconfirm
title=
"确定通过此申请吗?"
style=
"margin-left: 10px"
@
confirm=
"reviewHandle('pass', scope.row)"
v-if=
"scope.row.state == 0 && scope.row.state != 1"
>
<el-button
type=
"success"
size=
"mini"
round
slot=
"reference"
>
通过
</el-button>
</el-popconfirm>
<el-popconfirm
title=
"确定拒绝此申请吗?"
@
confirm=
"reviewHandle('refuse', scope.row)"
v-if=
"scope.row.state == 0 && scope.row.state != 4"
style=
"margin-left: 10px"
>
<el-button
type=
"danger"
size=
"mini"
round
slot=
"reference"
>
拒绝
</el-button>
</el-popconfirm>
</
template
>
</el-table-column>
<el-button
@
click=
"delFlagHandle(scope.row)"
:type=
"scope.row.delFlag == 0 ? 'danger' : 'success'"
size=
"mini"
round
slot=
"reference"
>
{{
scope
.
row
.
delFlag
==
0
?
"禁用"
:
"启用"
}}
</el-button>
</
template
>
</el-table-column
>
s
</table-template>
</div>
<el-dialog
title=
"详情"
:visible
.
sync=
"dialogVisible"
width=
"30%"
destroy-on-close
>
<div
class=
"cell"
>
<p
class=
"label"
>
求助类型
</p>
<p
class=
"value"
>
{{ detail.categoryName }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
描述
</p>
<p
class=
"value"
>
{{ detail.content }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
详细地址
</p>
<p
class=
"value"
>
{{ detail.address }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
区
</p>
<p
class=
"value"
>
{{ detail.district }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
电话
</p>
<p
class=
"value"
>
{{ detail.phone }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
创建时间
</p>
<p
class=
"value"
>
{{ detail.createTime }}
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
审核状态
</p>
<p
class=
"value"
>
<el-tag
v-if=
"detail.state == 0 || detail.state == 1 || detail.state == 4"
:type=
"
detail.state == 4 ? 'danger' : detail.state == 1 ? 'success' : ''
"
>
{{
detail.state == 4
? "审核拒绝"
: detail.state == 1
? "审核通过"
: "未审核"
}}
</el-tag
>
</p>
</div>
<div
class=
"cell"
>
<p
class=
"label"
>
启用状态
</p>
<p
class=
"value"
>
<el-tag
v-if=
"detail.delFlag == 0 || detail.delFlag == 1"
:type=
"detail.delFlag == 1 ? 'danger' : 'success'"
>
{{ detail.delFlag == 1 ? "禁用" : "启用" }}
</el-tag
>
</p>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-popconfirm
title=
"确定通过此申请吗?"
style=
"margin-left: 10px"
@
confirm=
"reviewHandle('pass', detail)"
v-if=
"detail.state == 0 && detail.state != 1"
>
<el-button
type=
"success"
round
slot=
"reference"
>
通过
</el-button>
</el-popconfirm>
<el-popconfirm
title=
"确定拒绝此申请吗?"
@
confirm=
"reviewHandle('refuse', detail)"
v-if=
"detail.state == 0 && detail.state != 4"
style=
"margin-left: 10px"
>
<el-button
type=
"danger"
round
slot=
"reference"
>
拒绝
</el-button>
</el-popconfirm>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
tableTemplate
from
"@/components/Table"
;
import
{
categoryList
,
helpList
,
helpReview
}
from
"@/api/livingCircle"
;
import
{
categoryList
,
helpList
,
helpReview
,
helpEnable
,
helpDetail
,
}
from
"@/api/livingCircle"
;
export
default
{
name
:
"enter"
,
components
:
{
tableTemplate
},
data
()
{
return
{
dialogVisible
:
false
,
detail
:
{},
typeList
:
[],
searchForm
:
{
userName
:
""
,
state
:
""
,
address
:
""
,
categoryId
:
""
,
content
:
""
,
phone
:
""
,
delFlag
:
""
,
},
// taskData: {
// myTask: 1,
...
...
@@ -173,35 +249,39 @@ export default {
userName
:
""
,
tableColumns
:
[
{
key
:
"
user
Name"
,
label
:
"
用户名称
"
,
key
:
"
category
Name"
,
label
:
"
求助类型
"
,
},
{
key
:
"c
ategoryName
"
,
label
:
"
经营类型
"
,
key
:
"c
ontent
"
,
label
:
"
描述
"
,
},
{
key
:
"address"
,
label
:
"详细地址"
,
},
{
key
:
"icon"
,
label
:
"照片"
,
type
:
"slot"
,
width
:
220
,
},
{
key
:
"phone"
,
label
:
"联系电话"
,
},
{
key
:
"url"
,
label
:
"营业执照"
,
key
:
"district"
,
label
:
"区"
,
},
{
key
:
"createTime"
,
label
:
"创建时间"
,
width
:
180
,
},
{
key
:
"state"
,
label
:
"审核状态"
,
type
:
"slot"
,
},
{
key
:
"
url1
"
,
label
:
"
身份证
"
,
key
:
"
delFlag
"
,
label
:
"
启用状态
"
,
type
:
"slot"
,
},
],
...
...
@@ -224,16 +304,32 @@ export default {
methods
:
{
init
()
{
let
params
=
{
address
:
""
,
categoryId
:
this
.
searchForm
.
categoryId
,
state
:
this
.
searchForm
.
state
,
userName
:
this
.
searchForm
.
userName
,
delFlag
:
this
.
searchForm
.
delFlag
,
phone
:
this
.
searchForm
.
phone
,
content
:
this
.
searchForm
.
content
,
pageNum
:
this
.
pagination
.
currentPage
,
pageSize
:
this
.
pagination
.
pageSize
,
};
helpList
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
data
.
list
;
if
(
res
.
data
&&
res
.
data
.
list
&&
res
.
data
.
list
.
length
>
0
)
{
this
.
tableData
=
res
.
data
.
list
.
map
((
item
)
=>
{
return
{
...
item
,
stateName
:
item
.
state
==
0
?
"未审核"
:
item
.
state
==
1
?
"审核通过"
:
item
.
state
==
4
?
"审核拒绝"
:
""
,
flagName
:
item
.
delFlag
==
0
?
"启用"
:
item
.
delFlag
==
1
?
"禁用"
:
""
,
};
});
// this.tableData = res.data.list;
this
.
pagination
.
total
=
res
.
data
.
total
;
}
});
...
...
@@ -261,7 +357,24 @@ export default {
});
},
view
()
{},
view
(
row
)
{
helpDetail
(
row
.
id
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
detail
=
res
.
data
;
this
.
dialogVisible
=
true
;
}
});
},
delFlagHandle
(
row
)
{
helpEnable
({
id
:
row
.
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
init
();
}
});
},
getCategoryList
()
{
categoryList
().
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -290,4 +403,47 @@ export default {
.btn
{
margin-right
10px
}
.cell
{
display
:
flex
;
align-items
:
center
;
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
.label
{
width
:
150px
;
color
:
#999
;
text-align
:
left
;
span
{
color
:
red
;
font-size
:
12px
;
}
}
.value
{
color
:
#000
;
text-align
:
left
;
}
.value1
{
color
:
red
;
}
.value2
{
color
:
green
;
}
.info
{
.item
{
width
:
100%
;
text-align
:
left
;
color
:
#000
;
margin-bottom
:
10px
;
}
.item
:last-child
{
margin-bottom
:
0
;
}
}
}
</
style
>
src/views/livingCircle/searchTerms.vue
View file @
cc211273
...
...
@@ -9,12 +9,14 @@
>
<el-form-item
label=
"推荐搜索词"
>
<el-input
v-model=
"searchForm.name"
clearable
v-model=
"searchForm.keyword"
placeholder=
"请输入推荐搜索词"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"addHandle"
>
新增
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -36,6 +38,21 @@
</el-image>
</
template
>
</el-table-column>
<el-table-column
slot=
"delFlag"
label=
"启用状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.delFlag == 0 || scope.row.delFlag == 1"
:type=
"
scope.row.delFlag == 1
? 'danger'
: scope.row.delFlag == 0
? 'success'
: ''
"
>
{{
scope
.
row
.
delFlag
==
1
?
"禁用"
:
"启用"
}}
</el-tag
>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"350"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
...
...
@@ -46,17 +63,24 @@
@
click=
"view(scope.row)"
>
编辑
</el-button
>
<el-popconfirm
title=
"确定删除此数据吗?"
@
confirm=
"del(scope.row)"
>
<el-button
type=
"warning"
size=
"mini"
round
slot=
"reference"
>
删除
</el-button
>
</el-popconfirm>
<el-button
@
click=
"delFlagHandle(scope.row)"
:type=
"scope.row.delFlag == 0 ? 'danger' : 'success'"
size=
"mini"
round
slot=
"reference"
>
{{
scope
.
row
.
delFlag
==
0
?
"禁用"
:
"启用"
}}
</el-button>
</
template
>
</el-table-column>
</table-template>
</div>
<el-dialog
title=
"编辑"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-dialog
:title=
"type == 'add' ? '新增' : '编辑'"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
:model=
"dataForm"
:rules=
"rules"
...
...
@@ -64,16 +88,17 @@
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"服务名称"
prop=
"name"
>
<el-input
v-model=
"dataForm.name"
></el-input>
<el-form-item
label=
"推荐搜索词"
prop=
"keyword"
>
<el-input
v-model=
"dataForm.keyword"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-input-number
v-model=
"dataForm.sort"
:min=
"1"
></el-input-number>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button
>
<el-button
type=
"primary"
@
click=
"confirmHandle"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -81,27 +106,38 @@
<
script
>
import
TableTemplate
from
"@/components/Table"
;
import
{
getKeyword
,
enableKeyword
,
editKeyword
,
addKeyword
,
}
from
"@/api/livingCircle"
;
export
default
{
components
:
{
TableTemplate
},
data
()
{
return
{
searchForm
:
{},
type
:
"add"
,
// 'add' or 'edit
dialogVisible
:
false
,
searchForm
:
{
keyword
:
""
,
},
TypeList
:
[],
loading
:
false
,
tableData
:
[
{
name
:
"便利店"
,
sort
:
"1"
,
},
],
tableData
:
[],
tableColumns
:
[
{
key
:
"
name
"
,
key
:
"
keyword
"
,
label
:
"推荐搜索词"
,
},
{
key
:
"createTime"
,
label
:
"创建时间"
,
},
{
key
:
"delFlag"
,
label
:
"启用状态"
,
type
:
"slot"
,
},
{
key
:
"sort"
,
label
:
"排序"
,
...
...
@@ -113,16 +149,24 @@ export default {
currentPage
:
1
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入活动名称"
,
trigger
:
"blur"
}],
keyword
:
[
{
required
:
true
,
message
:
"请输入推荐搜索词"
,
trigger
:
"blur"
},
],
sort
:
[{
required
:
true
,
message
:
"请输入排序"
,
trigger
:
"blur"
}],
},
dataForm
:
{
keyword
:
""
,
sort
:
""
,
},
dataForm
:
{},
dialogVisible
:
false
,
};
},
watch
:
{
dialogVisible
(
val
)
{
if
(
!
val
)
{
this
.
$refs
.
ruleForm
.
resetFields
();
this
.
dataForm
=
{
keyword
:
""
,
sort
:
""
,
};
}
},
},
...
...
@@ -130,15 +174,67 @@ export default {
this
.
init
();
},
methods
:
{
init
()
{},
onSubmit
()
{},
init
()
{
let
params
=
{
keyword
:
this
.
searchForm
.
keyword
,
pageSize
:
this
.
pagination
.
pageSize
,
pageNum
:
this
.
pagination
.
currentPage
,
};
getKeyword
(
params
).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
list
;
});
},
onSubmit
()
{
this
.
init
();
},
jumpPage
()
{
this
.
init
();
},
view
()
{
view
(
row
)
{
this
.
type
=
"edit"
;
this
.
dataForm
.
sort
=
row
.
sort
;
this
.
dataForm
.
keyword
=
row
.
keyword
;
this
.
dialogVisible
=
true
;
},
del
()
{},
delFlagHandle
(
row
)
{
enableKeyword
({
id
:
row
.
id
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
init
();
}
});
},
addHandle
()
{
this
.
type
=
"add"
;
this
.
dialogVisible
=
true
;
},
confirmHandle
()
{
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
dataForm
.
id
)
{
editKeyword
(
this
.
dataForm
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"编辑成功"
);
this
.
dialogVisible
=
false
;
this
.
init
();
}
});
}
else
{
addKeyword
(
this
.
dataForm
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"新增成功"
);
this
.
dialogVisible
=
false
;
this
.
init
();
}
});
}
}
else
{
return
false
;
}
});
},
},
};
</
script
>
...
...
src/views/livingCircle/serviceType.vue
deleted
100644 → 0
View file @
becc8fc5
<
template
>
<div>
<div
class=
"search-wrapper"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"search_form"
style=
"text-align: left"
>
<el-form-item
label=
"服务名称"
>
<el-input
v-model=
"searchForm.name"
placeholder=
"请输入服务名称"
></el-input>
</el-form-item>
<el-form-item
label=
"服务类型"
>
<el-select
v-model=
"searchForm.typeId"
placeholder=
"请选择服务类型"
size=
"medium"
>
<el-option
v-for=
"item in TypeList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
查询
</el-button>
</el-form-item>
</el-form>
</div>
<div
class=
"table-wrapper"
>
<table-template
:tableData=
"tableData"
:tableColumns=
"tableColumns"
:loading=
"loading"
:pagination=
"pagination"
@
Jump=
"jumpPage"
>
<el-table-column
slot=
"icon"
label=
"服务图标"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-image
style=
"width: 30px; height: 30px"
:src=
"scope.row.icon"
:preview-src-list=
"[scope.row.icon]"
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"350"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
size=
"mini"
class=
"btn"
round
@
click=
"view(scope.row)"
>
编辑
</el-button
>
<el-popconfirm
title=
"确定删除此数据吗?"
@
confirm=
"del(scope.row)"
>
<el-button
type=
"warning"
size=
"mini"
round
slot=
"reference"
>
删除
</el-button
>
</el-popconfirm>
</
template
>
</el-table-column>
</table-template>
</div>
<el-dialog
title=
"编辑"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-form
:model=
"dataForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"服务名称"
prop=
"name"
>
<el-input
v-model=
"dataForm.name"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button
>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
TableTemplate
from
"@/components/Table"
;
export
default
{
components
:
{
TableTemplate
},
data
()
{
return
{
searchForm
:
{},
TypeList
:
[],
loading
:
false
,
tableData
:
[
{
name
:
"服务名称"
,
type
:
"所属类型"
,
icon
:
require
(
"@/assets/1.png"
),
sort
:
"1"
,
},
],
tableColumns
:
[
{
key
:
"name"
,
label
:
"服务名称"
,
},
{
key
:
"type"
,
label
:
"所属类型"
,
},
{
key
:
"icon"
,
label
:
"服务图标"
,
type
:
"slot"
,
},
{
key
:
"sort"
,
label
:
"排序"
,
},
],
pagination
:
{
total
:
0
,
pageSize
:
10
,
currentPage
:
1
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入活动名称"
,
trigger
:
"blur"
}],
},
dataForm
:
{},
dialogVisible
:
false
,
};
},
watch
:
{
dialogVisible
(
val
)
{
if
(
!
val
)
{
this
.
$refs
.
ruleForm
.
resetFields
();
}
},
},
created
()
{
this
.
init
();
},
methods
:
{
init
()
{},
onSubmit
()
{},
jumpPage
()
{
this
.
init
();
},
view
()
{
this
.
dialogVisible
=
true
;
},
del
()
{},
},
};
</
script
>
<
style
lang=
"stylus"
scoped
>
@import
'~@/stylus/common'
;
.btn
{
margin-right
10px
}
</
style
>
vue.config.js
View file @
cc211273
const
env
=
process
.
env
.
NODE_ENV
===
"production"
;
const
publicPath
=
env
?
"/manage-h5/"
:
"/"
;
//正式
//
const publicPath = env ? "/smartExam-h5/" : "/"; //测试
//
const publicPath = env ? "/manage-h5/" : "/"; //正式
const
publicPath
=
env
?
"/smartExam-h5/"
:
"/"
;
//测试
module
.
exports
=
{
publicPath
,
...
...
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