Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mineTools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
mineTools
Commits
14a7192f
Commit
14a7192f
authored
Sep 25, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小工具管理
parent
0c1819e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1117 additions
and
0 deletions
+1117
-0
common.js
src/api/common.js
+640
-0
add.vue
src/views/backstage/appletMgt/applet/add.vue
+305
-0
index.vue
src/views/backstage/appletMgt/applet/index.vue
+172
-0
No files found.
src/api/common.js
0 → 100644
View file @
14a7192f
import
request
from
'
@/utils/request
'
import
qs
from
'
qs
'
export
const
HttpReq
=
{
// 后台管理接口列表
backstageApi
:
{
// 上传营业执照图片
uploadBusinessLicense
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/uploadBusinessLicense
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
deleteBusinessLicense
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/deleteBusinessLicense
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
deletePicture
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/common/deletePicture
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 获取行政区划
findAreaByCodeAndType
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/users/findAreaByCodeAndType?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 添加客户信息
addCustomer
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/addCustomer
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 修改客户信息
updateCustomerDetail
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/updateCustomerDetail
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 获取客户列表
queryCustomer
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/users/queryCustomer?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 客户信息详情
queryCustomerDetail
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/users/queryCustomerDetail?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 查询当前登录用户在进行新增客户的页面展示信息
queryCustomerTemporary
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/users/queryCustomerTemporary?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 新增当前登录用户在进行新增客户的页面展示信息
insertCustomerTemporary
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/insertCustomerTemporary
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 批量禁用启用客户
userEnableDisable
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/enableDisable
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 客户信息审核
reviewCustomer
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/users/reviewCustomer
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 上传产品图片
uploadProductPic
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/uploadProductPic
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
deleteProductPic
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/deleteProductPic
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 联想查询供应商名称
associateQueryEnterpriseName
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/associateQueryEnterpriseName?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
checkEnterpriseName
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/checkEnterpriseName?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 添加产品详情
addProduct
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/addProduct
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 更新产品详情
updateProductDetail
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/updateProductDetail
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 查询产品列表
queryProduct
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/queryProduct?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 查询产品详情
queryProductDetail
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/queryProductDetail?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 客户信息审核
reviewProduct
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/reviewProduct
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 批量上下架产品
batchReleaseAndRecovery
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/batchReleaseAndRecovery
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 查询咨询信息列表
queryInformation
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/information/queryInformation?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 查询咨询信息详情
queryInformationDetail
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/information/queryInformationDetail?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 批量处理咨询
batchInformationProcessing
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/information/batchInformationProcessing
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-新增供应商列表页面
addSupplierListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/supplierListPage/addSupplierListPage
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-修改供应商列表页中供应商详情(排序、展示产品)
updateSupplierListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/supplierListPage/updateSupplierListPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-供应商列表批量发布
releaseSupplierListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/supplierListPage/releaseSupplierListPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-查询单个供应商列表页
querySupplierListPageById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/supplierListPage/querySupplierListPageById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-供应商列表查询
querySupplierListPage
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/supplierListPage/querySupplierListPage?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-查询产品列表页
queryProductListPage
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/productListPage/queryProductListPage?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-查询单个产品列表页
queryProductListPageById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/productListPage/queryProductListPageById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-修改产品列表
updateProductListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/productListPage/updateProductListPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-产品列表批量发布
releaseProductListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/productListPage/releaseProductListPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-查询首页内容列表页
queryHomePage
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/homePage/queryHomePage?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-查询单个首页内容列表页
queryHomePageById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/homePage/queryHomePageById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-新增首页内容
addHomePage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/homePage/addHomePage
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-修改首页内容
updateHomePage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/homePage/updateHomePage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-首页管理批量发布
releaseHomePage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/homePage/releaseHomePage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-首页管理批量删除
hpBatchDelete
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/homePage/batchDelete
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-查询资讯页内容
queryNewsPage
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/newsPage/queryNewsPage?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-查询单个资讯页内容
queryNewsPageById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/newsPage/queryNewsPageById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-资讯发布
releaseNewsPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/releaseNewsPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-修改资讯
updateNewsPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/updateNewsPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-新增资讯
addNewsPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/addNewsPage
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-删除资讯
newsBatchDelete
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/batchDelete
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
}
},
// web端接口列表
webClientApi
:
{
// 首页-头部文件
homePageGetHeader
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/header?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-搜索推荐
homePageGetSearch
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/search?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-热门排行
homePageGetRank
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/rank?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-合作伙伴
homePageGetPartners
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/partners?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-底部导航
homePageGetBottomNavigation
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/bottomNavigationBar?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-供应商板块
homePageGetSupplier
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/supplier?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 首页-产品板块
homePageGetProduct
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/product?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 产品-硬件查询列表
productGetHardwareList
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/highQualityProducts?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 产品-方案概述、软件系统、专业培训
productGetPlanSystemAndTraining
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/highQualityProducts/planSystemAndTraining?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 底部文件-查询单个首页内容列表页
queryHomePageById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/queryHomePageById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 优质供应商-查询列表
supplierGetSupplierList
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/highQualitySuppliers?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 解决方案-查询列表
projectGetSolutionsAndServices
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/solutionsAndServices?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 软件系统-查询列表
softWareSystem
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/softWareSystem?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 专业培训-查询列表
professionalTraining
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/professionalTraining?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 行业资讯查询
industryInformation
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/industryInformation?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 行业资讯查询-详情
findDetailIndustryInformationById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/industryInformation/findDetailIndustryInformationById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 个人中心-个人详情
personalCenterInfo
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 个人中心-产品管理
productManagement
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/productManagement?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 个人中心-收藏的产品
collectProduct
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/collectProduct?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 个人中心-收藏的供应商
collectSupplier
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/collectSupplier?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 个人中心-被询价记录
inquiryRecord
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/inquiryRecord?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 个人中心-主动询价记录
translateInquiryRecord
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/translateInquiryRecord?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 收藏产品-供应商
collectProductOrSupplier
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/collectProductOrSupplier
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 供应商详细信息
supplierDetails
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/supplierDetails?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 产品详细信息
productDetails
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/productDetails?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 咨询
consultationInformation
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/index/consultationInformation
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 请求短信验证
sendSmsCode
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/sendSmsCode
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 短信注册
smsRegistration
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/smsRegistration
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 填写注册信息--注册成为供应商
supplierRegister
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/supplierRegister
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 完善供应商信息--根据当前登录用户查询供应商的详细信息
improveSupplierInformation
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/bigScreen/personalCenter/improveSupplierInformation?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
id
:
null
}
}
src/views/backstage/appletMgt/applet/add.vue
0 → 100644
View file @
14a7192f
<
template
>
<!-- 表单渲染 -->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelView"
:visible=
"visible"
:title=
"title"
width=
"900px"
>
<el-form
ref=
"formViewRef"
:model=
"formData"
:rules=
"rules"
:status-icon=
"true"
label-width=
"240px"
>
<el-form-item
label=
"选择分类:"
class=
"form-cell"
style=
"margin: 0"
>
<div
class=
"cell-box"
style=
"display: flex"
>
<el-form-item
prop=
"type"
>
<el-select
v-model=
"formData.type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in dict.tools_class"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
</div>
</el-form-item>
<el-form-item
label=
"软件工具名称:"
class=
"form-cell"
prop=
"title"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.title"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</el-form-item>
<el-form-item
label=
"标签:"
class=
"form-cell"
prop=
"feature"
>
<div
class=
"cell-box"
>
<el-tag
v-for=
"tag in feature"
:key=
"tag"
closable
size=
"small"
:disable-transitions=
"false"
@
close=
"handleClose(tag)"
>
{{
tag
}}
</el-tag>
<el-input
v-show=
"inputVisible"
ref=
"saveTagInput"
v-model=
"inputValue"
class=
"input-new-tag"
placeholder=
"请输入特点标签文本"
@
keyup.enter.native=
"handleInputConfirm"
@
blur=
"handleInputConfirm"
/>
<el-button
v-show=
"!inputVisible && feature.length
<
3
"
plain
round
class=
"button-new-tag"
icon=
"el-icon-price-tag"
@
click=
"showInput"
>
添加
</el-button>
</div>
</el-form-item>
<el-form-item
label=
"介绍说明:"
class=
"form-cell"
prop=
"notes"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.contentAbstract"
type=
"textarea"
placeholder=
"请输入文本"
maxlength=
"300"
:autosize=
"
{ minRows: 4, maxRows: 4}" show-word-limit resize="none" class="cell-input" />
</div>
</el-form-item>
<el-form-item
label=
"上传软件工具:"
class=
"form-cell"
>
<div
class=
"cell-box"
>
<el-upload
ref=
"uploadApp"
:before-upload=
"beforeUpload"
:auto-upload=
"false"
:headers=
"uploadHeaders"
:on-success=
"handleSuccess"
:on-error=
"handleError"
action=
"/api/miningManagement/uploadExcelOrFbx"
:data=
"
{}"
>
<div
class=
"eladmin-upload"
><i
class=
"el-icon-upload"
/>
添加.exe文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
请上传文件,且不超过20M
</div>
</el-upload>
</div>
</el-form-item>
<el-form-item
label=
"上传LOGO:"
class=
"form-cell"
>
<div
class=
"cell-box"
>
<el-upload
ref=
"uploadLogo"
:before-upload=
"beforeUpload"
:auto-upload=
"false"
:headers=
"uploadHeaders"
:on-success=
"handleSuccess"
:on-error=
"handleError"
action=
"/api/miningManagement/uploadExcelOrFbx"
:data=
"
{}"
>
<div
class=
"eladmin-upload"
><i
class=
"el-icon-upload"
/>
添加.gif/jpg/jpeg文件
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
请上传文件,且不超过20M
</div>
</el-upload>
</div>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
@
click=
"cancelView"
>
关闭
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm(true)"
>
提交
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
getToken
}
from
'
@/utils/auth
'
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
dicts
:
[
'
tools_class
'
],
data
()
{
return
{
uploadHeaders
:
{
'
Authorization
'
:
getToken
()
},
dialogImgUrl
:
''
,
dialogImgVisible
:
false
,
visible
:
false
,
title
:
'
上传小工具
'
,
feature
:
[],
inputVisible
:
false
,
inputValue
:
''
,
formData
:
{
id
:
null
,
title
:
''
,
// 标题
type
:
'
1
'
,
// 类型
subType
:
'
1
'
,
source
:
''
,
// 来源
content
:
''
,
// 内容
picture
:
''
,
// 图片
contentAbstract
:
''
,
// 摘要
url
:
''
// 链接
},
rules
:
{}
}
},
mounted
()
{
},
methods
:
{
// 上传
upload
()
{
this
.
$refs
.
uploadApp
.
submit
()
this
.
$refs
.
uploadLogo
.
submit
()
},
beforeUpload
(
file
)
{
let
isLt2M
=
true
isLt2M
=
file
.
size
/
1024
/
1024
<
20
if
(
!
isLt2M
)
{
this
.
loading
=
false
this
.
$message
.
error
(
'
上传文件大小不能超过 100MB!
'
)
}
return
isLt2M
},
handleSuccess
(
res
,
file
,
fileList
)
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
})
if
(
res
.
code
===
200
)
{
this
.
cancelView
()
}
},
handleError
(
e
,
file
,
fileList
)
{
const
msg
=
JSON
.
parse
(
e
.
message
)
this
.
$notify
({
title
:
msg
.
message
,
type
:
'
error
'
,
duration
:
2500
})
this
.
loading
=
false
},
// 标签
handleClose
(
tag
)
{
this
.
feature
.
splice
(
this
.
feature
.
indexOf
(
tag
),
1
)
this
.
formData
.
feature
=
this
.
feature
.
join
(
'
;
'
)
},
showInput
()
{
this
.
inputVisible
=
true
this
.
$nextTick
(
_
=>
{
this
.
$refs
.
saveTagInput
.
$refs
.
input
.
focus
()
})
},
handleInputConfirm
()
{
const
inputValue
=
this
.
inputValue
if
(
inputValue
&&
!
this
.
feature
.
filter
(
item
=>
{
return
item
===
inputValue
}).
length
)
{
this
.
feature
.
push
(
inputValue
)
this
.
formData
.
feature
=
this
.
feature
.
join
(
'
;
'
)
}
this
.
inputValue
=
''
this
.
inputVisible
=
false
},
showView
()
{
this
.
visible
=
true
},
hideView
()
{
if
(
this
.
$refs
.
uploadApp
)
{
this
.
$refs
.
uploadApp
.
clearFiles
()
}
if
(
this
.
$refs
.
uploadLogo
)
{
this
.
$refs
.
uploadLogo
.
clearFiles
()
}
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
visible
=
false
},
cancelView
()
{
this
.
hideView
()
},
submitForm
(
isRelease
)
{
this
.
$refs
.
formViewRef
.
validate
((
valid
,
obj
)
=>
{
if
(
valid
)
{
if
(
this
.
formData
.
newsPageId
)
{
HttpReq
.
backstageApi
.
updateNewsPage
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
})
if
(
res
.
code
===
200
)
{
if
(
isRelease
)
{
this
.
release
()
}
else
{
this
.
cancelView
()
this
.
$parent
.
loadData
()
}
}
})
}
else
{
HttpReq
.
backstageApi
.
addNewsPage
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
})
if
(
res
.
code
===
200
)
{
if
(
isRelease
)
{
this
.
release
()
}
else
{
this
.
cancelView
()
this
.
$parent
.
loadData
()
}
}
})
}
}
else
{
this
.
$message
({
message
:
'
表单信息有误,请核对无误后提交!
'
,
type
:
'
error
'
})
}
})
},
loadData
(
item
)
{
this
.
showView
()
this
.
$nextTick
(()
=>
{
})
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.grid-content
{
border
:
1px
solid
rgba
(
100
,
100
,
100
,
0
.3
);
padding
:
0
;
}
.grid-label
{
background
:
#dedede
;
padding
:
0
10px
;
}
.editor
{
text-align
:left
;
width
:
680px
;
}
::v-deep
.w-e-text-container
{
height
:
560px
!
important
;
}
.cell-box
{
min-width
:
120px
;
.cell-input
{
width
:
420px
;
}
.cell-select
{
width
:
220px
;
}
.el-tag
+
.el-tag
{
margin-left
:
10px
;
}
.button-new-tag
{
margin-left
:
10px
;
height
:
28px
;
line-height
:
24px
;
padding
:
0
8px
;
}
.input-new-tag
{
width
:
140px
;
height
:
28px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
>>>
.el-input__inner
{
border
:
1px
solid
rgba
(
100
,
100
,
100
,
0
.1
);
border-bottom
:
1px
solid
rgba
(
100
,
100
,
100
,
0
.2
);
border-radius
:
5px
;
}
>>>
.el-input.is-disabled
.el-input__inner
{
border-radius
:
0
;
border
:
0
;
border-bottom
:
1px
solid
rgba
(
100
,
100
,
100
,
0
.4
);
background
:
white
;
cursor
:
text
;
}
>>>
.el-input.is-disabled
.el-input__icon
{
cursor
:
text
;
}
>>>
.el-icon-circle-check
{
color
:
#13ce66
;
}
//>>>.el-icon-arrow-up:before {
// content: '';
//}
}
</
style
>
src/views/backstage/appletMgt/applet/index.vue
0 → 100644
View file @
14a7192f
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<el-input
v-model=
"query.name"
clearable
placeholder=
"请输入工具名称"
style=
"width:280px;"
/>
<el-select
v-model=
"query.type"
clearable
placeholder=
"请选择分类"
style=
"width: 150px"
>
<el-option
v-for=
"item in dict.tools_class"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-input
v-model=
"query.name"
clearable
placeholder=
"请输入标签名称"
style=
"width:280px;"
/>
<el-select
v-model=
"query.type"
clearable
placeholder=
"请选择状态"
style=
"width: 150px"
>
<el-option
v-for=
"item in dict.norm_status"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<date-range-picker
v-model=
"query.updateTime"
size=
"mini"
start-placeholder=
"上架开始日期"
style=
"width: 320px"
/>
<el-button
type=
"success"
icon=
"el-icon-search"
@
click=
"toSearch"
>
搜索
</el-button>
<el-button
type=
"warning"
icon=
"el-icon-refresh"
@
click=
"clearLimit"
>
重置
</el-button>
</div>
<div
class=
"toolbar"
>
<div>
<el-button
type=
"danger"
icon=
"el-icon-download"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(0, null)"
>
下架
</el-button>
<el-button
type=
"success"
icon=
"el-icon-finished"
:disabled=
"!multipleSelection.length"
@
click=
"batchOperate(1, null)"
>
上架
</el-button>
</div>
<div
style=
"text-align: right"
>
<el-button
type=
"primary"
icon=
"el-icon-upload2"
@
click=
"toAdd"
>
上传app
</el-button>
</div>
</div>
<!-- 表格 -->
<div
class=
"content"
>
<el-table
id=
"dataTable"
ref=
"dataTable"
v-loading=
"loading"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width:auto;min-height: 70vh"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
prop=
"productId"
label=
"ID"
width=
"100"
/>
<el-table-column
prop=
"productName"
label=
"小工具名称"
/>
<el-table-column
prop=
"productType"
label=
"分类"
width=
"140"
:formatter=
"(row, col, val)=>
{return dict.label.tools_class[val]}" />
<el-table-column
prop=
"productName"
label=
"标签"
/>
<el-table-column
label=
"状态"
width=
"100"
>
<template
slot-scope=
"scope"
>
<div
:style=
"'color:'+textColors[scope.row.status]"
>
{{
dict
.
label
.
norm_status
[
scope
.
row
.
status
]
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"updateTime"
label=
"最后维护日期"
align=
"center"
width=
"180"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
v-show=
"scope.row.status==5"
content=
"下架"
><el-button
round
plain
type=
"danger"
icon=
"el-icon-download"
@
click=
"batchOperate(0, scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==4"
content=
"上架"
><el-button
round
plain
type=
"success"
icon=
"el-icon-finished"
@
click=
"batchOperate(1, scope.row)"
/></el-tooltip>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total=
"total"
:current-page=
"page"
:page-size=
"pageSize"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
<add-page
ref=
"addPage"
/>
</div>
</template>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
addPage
from
'
./add
'
export
default
{
components
:
{
DateRangePicker
,
addPage
},
dicts
:
[
'
norm_status
'
,
'
tools_class
'
],
data
()
{
return
{
textColors
:
[
'
#ccc
'
,
'
#000
'
,
'
#f00
'
,
'
#000
'
,
'
#000
'
,
'
#32cd32
'
,
'
#bba
'
],
loading
:
false
,
page
:
1
,
pageSize
:
20
,
total
:
0
,
query
:
{},
tableData
:
[],
currentTime
:
''
,
multipleSelection
:
[]
}
},
mounted
()
{
this
.
currentTimeFn
()
this
.
$nextTick
(()
=>
{
this
.
loadData
()
})
},
methods
:
{
indexMethod
(
index
)
{
return
1
+
index
+
this
.
page
*
this
.
pageSize
-
this
.
pageSize
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
},
loadData
()
{
// 清除参数无值的情况
Object
.
keys
(
this
.
query
).
length
!==
0
&&
Object
.
keys
(
this
.
query
).
forEach
(
item
=>
{
if
(
this
.
query
[
item
]
===
null
||
this
.
query
[
item
]
===
''
)
this
.
query
[
item
]
=
undefined
})
HttpReq
.
backstageApi
.
queryProduct
({
page
:
this
.
page
-
1
,
pageSize
:
this
.
pageSize
,
...
this
.
query
}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
data
this
.
total
=
res
.
data
.
total
})
},
batchOperate
(
type
,
row
)
{
if
(
!
row
&&
!
this
.
multipleSelection
.
length
)
{
return
this
.
$message
({
message
:
'
未选取数据
'
,
type
:
'
info
'
})
}
HttpReq
.
backstageApi
.
batchReleaseAndRecovery
({
ids
:
row
?
[
row
.
productId
]
:
this
.
multipleSelection
.
map
(
item
=>
{
return
item
.
productId
}),
type
:
type
}).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
})
this
.
loadData
()
})
},
toAdd
()
{
this
.
$refs
.
addPage
.
loadData
()
},
toEdit
(
item
)
{
this
.
$refs
.
addPage
.
loadData
(
item
)
},
toSearch
()
{
this
.
page
=
1
this
.
loadData
()
},
clearLimit
()
{
this
.
query
=
{}
this
.
currentTimeFn
()
this
.
loadData
()
},
pageChange
(
e
)
{
this
.
page
=
e
this
.
loadData
()
},
sizeChange
(
e
)
{
this
.
page
=
1
this
.
pageSize
=
e
this
.
loadData
()
},
currentTimeFn
()
{
var
date
=
new
Date
()
var
year
=
date
.
getFullYear
()
var
month
=
date
.
getMonth
()
+
1
var
day
=
date
.
getDate
()
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
'
0
'
+
month
}
if
(
day
>=
0
&&
day
<=
9
)
{
day
=
'
0
'
+
day
}
this
.
currentTime
=
year
+
'
-
'
+
month
+
'
-
'
+
day
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.toolbar
{
display
:
flex
;
justify-content
:
space-between
;
}
.content
{
margin-top
:
15px
;
overflow
:
auto
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment