Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zentao-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zentao
zentao-view
Commits
46f9d418
Commit
46f9d418
authored
Feb 24, 2021
by
王鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 清除冗余代码
parent
cc978938
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
0 additions
and
4742 deletions
+0
-4742
administrative.js
src/api/base/administrative.js
+0
-13
baseAioVersion.js
src/api/base/baseAioVersion.js
+0
-53
baseAppModule.js
src/api/base/baseAppModule.js
+0
-71
baseAppVersion.js
src/api/base/baseAppVersion.js
+0
-62
baseCommunity.js
src/api/base/baseCommunity.js
+0
-59
baseUser.js
src/api/base/baseUser.js
+0
-62
communityUser.js
src/api/base/communityUser.js
+0
-76
pointsTemplate.js
src/api/base/pointsTemplate.js
+0
-53
index.js
src/api/common/index.js
+0
-10
bootAdvertisement.js
src/api/saas/bootAdvertisement.js
+0
-82
saasCompany.js
src/api/saas/saasCompany.js
+0
-115
saasCompanyBusiness.js
src/api/saas/saasCompanyBusiness.js
+0
-40
card.png
src/assets/card.png
+0
-0
play.png
src/assets/play.png
+0
-0
AdministrativeList.vue
src/views/base/administrative/AdministrativeList.vue
+0
-75
AdministrativeRouteView.vue
src/views/base/administrative/AdministrativeRouteView.vue
+0
-17
AioVersionDetail.vue
src/views/base/aioVersion/AioVersionDetail.vue
+0
-241
AioVersionList.vue
src/views/base/aioVersion/AioVersionList.vue
+0
-191
AioVersionRouteView.vue
src/views/base/aioVersion/AioVersionRouteView.vue
+0
-17
AppModuleDetail.vue
src/views/base/app/AppModuleDetail.vue
+0
-371
AppModuleList.vue
src/views/base/app/AppModuleList.vue
+0
-270
AppModuleRouteView.vue
src/views/base/app/AppModuleRouteView.vue
+0
-17
AppVersionDetail.vue
src/views/base/appVersion/AppVersionDetail.vue
+0
-292
AppVersionList.vue
src/views/base/appVersion/AppVersionList.vue
+0
-261
AppVersionRouteView.vue
src/views/base/appVersion/AppVersionRouteView.vue
+0
-17
BootAdvertisementDetail.vue
src/views/base/bootAdvertisement/BootAdvertisementDetail.vue
+0
-227
BootAdvertisementList.vue
src/views/base/bootAdvertisement/BootAdvertisementList.vue
+0
-316
BootAdvertisementRouteView.vue
...ews/base/bootAdvertisement/BootAdvertisementRouteView.vue
+0
-17
CommunityUserDetail.vue
src/views/base/communityUser/CommunityUserDetail.vue
+0
-167
CommunityUserList.vue
src/views/base/communityUser/CommunityUserList.vue
+0
-221
CommunityUserRouteView.vue
src/views/base/communityUser/CommunityUserRouteView.vue
+0
-17
PointsTemplateDetail.vue
src/views/base/points/PointsTemplateDetail.vue
+0
-171
PointsTemplateList.vue
src/views/base/points/PointsTemplateList.vue
+0
-274
PointsTemplateRouteView.vue
src/views/base/points/PointsTemplateRouteView.vue
+0
-17
CompanyDetail.vue
src/views/saas/company/CompanyDetail.vue
+0
-483
CompanyList.vue
src/views/saas/company/CompanyList.vue
+0
-228
CompanyRouteView.vue
src/views/saas/company/CompanyRouteView.vue
+0
-17
CompanyBusinessList.vue
src/views/saas/companyBusiness/CompanyBusinessList.vue
+0
-29
CompanyBusinessOperateDetail.vue
...ews/saas/companyBusiness/CompanyBusinessOperateDetail.vue
+0
-35
CompanyBusinessRouteView.vue
src/views/saas/companyBusiness/CompanyBusinessRouteView.vue
+0
-17
ParamTemplateList.vue
src/views/saas/paramTemplate/ParamTemplateList.vue
+0
-24
ParamTemplateRouteView.vue
src/views/saas/paramTemplate/ParamTemplateRouteView.vue
+0
-17
No files found.
src/api/base/administrative.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getList
:
'/base/area/page/'
,
};
export
function
getList
(
parentId
)
{
return
axios
({
url
:
api
.
getList
+
parentId
,
method
:
'get'
,
useFullLoading
:
true
,
})
}
\ No newline at end of file
src/api/base/baseAioVersion.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/base/aio/version/page'
,
getDetail
:
'/base/aio/version/'
,
save
:
'/base/aio/version/'
,
publish
:
'/base/aio/version/publish/'
,
deleteOne
:
'/base/aio/version/'
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
publish
(
id
)
{
return
axios
({
url
:
api
.
publish
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
src/api/base/baseAppModule.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/saas/app/module/getPage'
,
getDetail
:
'/saas/app/module/'
,
deleteOne
:
'/saas/app/module/'
,
deleteBatch
:
'/saas/app/module/batchDelete'
,
save
:
'/saas/app/module/'
,
getConsumePage
:
'/saas/app/module/consume/list'
,
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'put'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
add
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
deleteBatch
(
parameter
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
parameter
})
}
export
function
getConsumePage
(
parameter
)
{
return
axios
({
url
:
api
.
getConsumePage
,
method
:
'post'
,
data
:
parameter
})
}
src/api/base/baseAppVersion.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/base/app/version/page'
,
getDetail
:
'/base/app/version/'
,
deleteOne
:
'/base/app/version/'
,
save
:
'/base/app/version/'
,
getConsumePage
:
'/base/app/version/consume/list'
,
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
add
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
getConsumePage
(
parameter
)
{
return
axios
({
url
:
api
.
getConsumePage
,
method
:
'post'
,
data
:
parameter
})
}
src/api/base/baseCommunity.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/base/community/list'
,
deleteOne
:
'/base/community/'
,
deleteBatch
:
'/base/community/batchDelete'
,
save
:
'/base/community'
,
getDetail
:
'/base/community/'
,
getAllList
:
'/base/community/all'
,
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
deleteBatch
(
parameter
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
parameter
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
getAllCommunityList
()
{
return
axios
({
url
:
api
.
getAllList
,
method
:
'post'
,
})
}
\ No newline at end of file
src/api/base/baseUser.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/base/user/list'
,
getDetail
:
'/base/user/'
,
deleteOne
:
'/base/user/'
,
deleteBatch
:
'/base/user/batch/del'
,
save
:
'/base/user'
,
getConsumePage
:
'/base/user/consume/list'
,
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
deleteBatch
(
parameter
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
parameter
})
}
export
function
getConsumePage
(
parameter
)
{
return
axios
({
url
:
api
.
getConsumePage
,
method
:
'post'
,
data
:
parameter
})
}
src/api/base/communityUser.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'community/user/list'
,
getDetail
:
'community/user/'
,
deleteOne
:
'community/user/'
,
deleteBatch
:
'community/user/batch/delete'
,
save
:
'community/user/'
,
changeAllowPush
:
'/community/user/allow/push/'
,
changeAllowSpeak
:
'/community/user/allow/speak/'
,
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
deleteBatch
(
parameter
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
parameter
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
/**
* 允许推送修改
* @param id
*/
export
function
changeAllowPush
(
id
,
allowPush
)
{
return
axios
({
url
:
api
.
changeAllowPush
+
id
+
'/'
+
allowPush
,
method
:
'get'
,
useFullLoading
:
true
})
}
/**
* 允许发言修改
* @param id
*/
export
function
changeAllowSpeak
(
id
,
allowSpeak
)
{
return
axios
({
url
:
api
.
changeAllowSpeak
+
id
+
'/'
+
allowSpeak
,
method
:
'get'
,
useFullLoading
:
true
})
}
\ No newline at end of file
src/api/base/pointsTemplate.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/points/award/rule/template/list'
,
getDetail
:
'/points/award/rule/template/'
,
deleteOne
:
'/points/award/rule/template/'
,
deleteBatch
:
'/points/award/rule/template/batch/delete'
,
save
:
'/points/award/rule/template/'
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
deleteBatch
(
parameter
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
parameter
})
}
src/api/common/index.js
deleted
100644 → 0
View file @
cc978938
const
api
=
{
Login
:
'/auth/login'
,
Logout
:
'/auth/logout'
,
ForgePassword
:
'/auth/forge-password'
,
Register
:
'/auth/register'
,
SendSms
:
'/account/sms'
,
// get my info
UserInfo
:
'/user/info'
}
export
default
api
\ No newline at end of file
src/api/saas/bootAdvertisement.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@util/axios/request'
const
api
=
{
getPage
:
'/saas/app/boot/advertisement/page'
,
getDetail
:
'/saas/app/boot/advertisement/'
,
deleteOne
:
'/saas/app/boot/advertisement/'
,
deleteBatch
:
'/saas/app/boot/advertisement/batch/delete'
,
save
:
'/saas/app/boot/advertisement/'
,
changeShowStatus
:
'/saas/app/boot/advertisement/available/'
,
getModuleAdvertisement
:
'/saas/app/boot/advertisement/module/'
,
getModuleAdvertisementCommunity
:
'/saas/app/boot/advertisement/module/'
}
export
default
api
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
deleteBatch
(
parameter
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
parameter
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
/**
* 修改启用状态
* @param id
*/
export
function
changeShowStatus
(
status
,
id
)
{
return
axios
({
url
:
api
.
changeShowStatus
+
status
+
'/'
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
getModuleAdvertisement
(
code
,
param
)
{
return
axios
({
url
:
api
.
getModuleAdvertisement
+
code
,
method
:
'post'
,
data
:
param
,
useFullLoading
:
false
})
}
export
function
getModuleAdvertisementCommunity
(
code
,
businessId
)
{
return
axios
({
url
:
api
.
getModuleAdvertisementCommunity
+
code
+
'/'
+
businessId
+
'/publish/community'
,
method
:
'get'
,
useFullLoading
:
true
})
}
src/api/saas/saasCompany.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
getPage
:
'/saas/company/getPage'
,
getDetail
:
'/saas/company/'
,
deleteOne
:
'/saas/company/'
,
deleteBatch
:
'/saas/company/batchDelete'
,
save
:
'/saas/company/'
,
add
:
'/saas/company'
,
getAllSaasAppModuleByType
:
'/saas/app/module/type/'
,
getAllSaaSBusiness
:
'/saas/business/tree'
,
getResource
:
'/saas/company/resource/'
,
init
:
'/saas/company/init'
,
modify
:
'/saas/company/modify'
,
clear
:
'/saas/company/clear/'
}
export
default
api
export
function
getResource
(
id
)
{
return
axios
({
url
:
api
.
getResource
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
init
(
data
)
{
return
axios
({
url
:
api
.
init
,
method
:
'post'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
modify
(
data
)
{
return
axios
({
url
:
api
.
modify
,
method
:
'put'
,
data
:
data
,
useFullLoading
:
true
})
}
export
function
clear
(
id
)
{
return
axios
({
url
:
api
.
clear
+
id
,
method
:
'delete'
,
useFullLoading
:
true
})
}
export
function
getAllSaaSBusiness
()
{
return
axios
({
url
:
api
.
getAllSaaSBusiness
,
method
:
'get'
})
}
export
function
getAllSaasAppModuleByType
(
type
)
{
return
axios
({
url
:
api
.
getAllSaasAppModuleByType
+
type
,
method
:
'get'
})
}
export
function
getPage
(
parameter
)
{
return
axios
({
url
:
api
.
getPage
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
getDetail
(
id
)
{
return
axios
({
url
:
api
.
getDetail
+
id
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
deleteOne
+
id
,
method
:
'delete'
,
})
}
export
function
deleteBatch
(
ids
)
{
return
axios
({
url
:
api
.
deleteBatch
,
method
:
'post'
,
data
:
ids
})
}
export
function
save
(
data
)
{
return
axios
({
url
:
api
.
save
,
method
:
'put'
,
data
:
data
})
}
export
function
add
(
data
)
{
return
axios
({
url
:
api
.
add
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/api/saas/saasCompanyBusiness.js
deleted
100644 → 0
View file @
cc978938
import
{
axios
}
from
'@/util/axios/request'
const
api
=
{
sysBusinessUrl
:
'/sys/business/'
,
};
export
function
getList
()
{
return
axios
({
url
:
api
.
sysBusinessUrl
,
method
:
'get'
,
useFullLoading
:
true
})
}
export
function
save
(
parameter
)
{
return
axios
({
url
:
api
.
sysBusinessUrl
,
method
:
'post'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
update
(
parameter
)
{
return
axios
({
url
:
api
.
sysBusinessUrl
,
method
:
'put'
,
data
:
parameter
,
useFullLoading
:
true
})
}
export
function
deleteOne
(
id
)
{
return
axios
({
url
:
api
.
sysBusinessUrl
+
id
,
method
:
'delete'
,
})
}
src/assets/card.png
deleted
100644 → 0
View file @
cc978938
6.1 KB
src/assets/play.png
deleted
100644 → 0
View file @
cc978938
7.99 KB
src/views/base/administrative/AdministrativeList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card
class=
"cust-list-cart"
>
<div>
<a-table
size=
"middle"
:columns=
"columns"
:dataSource=
"menuList"
@
expand=
"expand"
:pagination=
"false"
rowKey=
"id"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
行政区域列表
{{
data
.
none
}}
</span>
</div>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
getList
}
from
"@/api/base/administrative"
;
const
columns
=
[
{
title
:
'行政区域'
,
width
:
300
,
dataIndex
:
'name'
},
{
title
:
'区域编码'
,
width
:
100
,
dataIndex
:
'code'
},
{
title
:
'id路径'
,
width
:
170
,
dataIndex
:
'idPath'
},
{
title
:
'名称全路径'
,
dataIndex
:
'namePath'
}
]
export
default
{
name
:
'AdministrativeList'
,
data
()
{
return
{
parentId
:
0
,
record
:
[],
columns
:
columns
,
menuList
:
[],
}
},
methods
:
{
loadData
()
{
getList
(
parseInt
(
this
.
parentId
)).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
dataList
=
response
.
data
;
if
(
this
.
parentId
==
0
)
{
this
.
menuList
=
dataList
}
if
(
this
.
parentId
>
0
)
{
this
.
record
.
children
=
dataList
this
.
record
.
children
.
map
(
m
=>
{
if
(
m
.
leaf
){
m
.
children
=
null
}
})
}
}
});
},
expand
(
expanded
,
record
)
{
this
.
record
=
record
if
(
expanded
)
{
this
.
parentId
=
record
.
id
this
.
loadData
()
}
},
},
mounted
()
{
this
.
loadData
();
}
}
</
script
>
src/views/base/administrative/AdministrativeRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"AdministrativeRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/base/aioVersion/AioVersionDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div
class=
"aioUpgradeRecord"
>
<a-form
@
submit=
"handleSubmit"
:form=
"form"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
一体机版本升级
</span>
<a-button-group
slot=
"extra"
>
<a-button
type=
'primary'
htmlType=
'submit'
>
保存
</a-button>
<a-button
type=
"primary"
@
click=
"back"
ghost
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
title=
"基础数据"
class=
"cust-normal-card"
>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'版本名称'
>
<a-input
:disabled=
"disabled"
v-decorator=
"['aioUpgradeRecord.name',
{initialValue:aioUpgradeRecord.name,rules: [{ required: true, message: '请输入版本名称' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'版本号'
>
<a-input
:disabled=
"disabled"
v-decorator=
"['aioUpgradeRecord.version',
{initialValue:aioUpgradeRecord.version,rules: [{ required: true, message: '请输入版本号' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
label=
'类型'
v-bind=
"formItemLayout"
>
<a-select
:disabled=
"disabled"
style=
'width: 100%'
@
change=
"sizeChange"
v-decorator=
"['aioUpgradeRecord.size',
{initialValue:aioUpgradeRecord.size,rules: [{ required: true, message: '请选择一体机类型' }]}]"
>
<a-select-option
v-for=
"item in sizeList"
v-bind:key=
"item.id"
v-bind:value=
"item.valueInt"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
label=
'上传文件'
v-bind=
"formItemLayout"
>
<div
style=
""
class=
"pub-code-value"
>
<a-upload
:disabled=
"disabled"
v-decorator=
"['aioUpgradeRecord.url',
{
valuePropName: 'fileList',
getValueFromEvent: normFile,
rules: [{ required: true, message: '请上传更新文件' }]
},
]"
:remove="remove"
:beforeUpload="beforeUpload"
:action="getUploadAttachmentUrl(business)"
:headers="uploadImageHeader"
@change="handleChange"
>
<div
v-if=
"fileList.length
<
1
"
>
<a-button>
<a-icon
type=
"upload"
/>
选择文件
</a-button>
</div>
</a-upload>
</div>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"16"
>
<a-form-item
v-bind=
"formmarkItemLayout"
label=
'更新内容'
>
<a-textarea
:autoSize=
"
{ minRows: 8, maxRows: 15}"
v-decorator="['aioUpgradeRecord.content', {initialValue:aioUpgradeRecord.content,rules: [{ required: true, message: '请输入更新内容' }]}]"/>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-form>
</div>
</
template
>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
save
}
from
'@/api/base/baseAioVersion'
import
{
getOneImageURL
,
getUploadAttachmentUrl
,
getUploadImageHeader
,
getUploadImageUrl
,
isLoading
,
isUpdateSuccess
}
from
'@/api/common/fileUpload'
let
listPathName
=
'aioVersionList'
;
export
default
{
name
:
"aioVersionDetail"
,
components
:
{
HeaderToolBar
},
data
()
{
return
{
id
:
0
,
url
:
""
,
disabled
:
false
,
fileList
:
[],
sizeList
:
[],
business
:
'AioUpdate'
,
uploadImageHeader
:
getUploadImageHeader
(),
form
:
this
.
$form
.
createForm
(
this
),
aioUpgradeRecord
:
{},
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
8
},
},
wrapperCol
:
{
sm
:
{
span
:
16
},
},
},
formmarkItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
4
},
},
wrapperCol
:
{
sm
:
{
span
:
20
},
},
},
fileData
:
{},
}
},
activated
()
{
this
.
form
.
resetFields
()
this
.
initData
()
},
methods
:
{
getUploadImageUrl
,
getUploadAttachmentUrl
,
isUpdateSuccess
,
getOneImageURL
,
isLoading
,
initData
()
{
//todo size下拉框未处理
this
.
id
=
this
.
$route
.
query
.
id
||
0
this
.
url
=
""
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
console
.
log
(
resp
)
this
.
aioUpgradeRecord
=
resp
.
data
.
aioUpgradeRecord
;
this
.
sizeList
=
resp
.
data
.
codeMap
[
SYS_CONST
.
CODE
.
AIO_SIZE
];
console
.
log
(
2
,
this
.
sizeList
)
this
.
disabled
=
this
.
aioUpgradeRecord
.
isPublish
if
(
this
.
aioUpgradeRecord
.
url
)
{
this
.
url
=
this
.
aioUpgradeRecord
.
url
;
let
strs
=
this
.
url
.
split
(
'/'
);
let
attachList
=
[{
uid
:
'-1'
,
name
:
strs
[
strs
.
length
-
1
],
status
:
'done'
,
url
:
this
.
url
}];
this
.
fileList
.
push
(
attachList
);
this
.
form
.
setFieldsValue
({
'aioUpgradeRecord.url'
:
attachList
})
}
}
})
},
handleChange
({
fileList
})
{
if
(
fileList
.
length
<
1
)
{
this
.
fileList
=
[];
}
this
.
fileList
=
fileList
},
beforeUpload
(
file
)
{
this
.
fileList
=
[...
this
.
fileList
,
file
];
return
true
},
remove
(){
if
(
this
.
disabled
){
return
false
}
},
sizeChange
(
val
){
console
.
log
(
val
)
// this.aioUpgradeRecord.size = val
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
values
.
aioUpgradeRecord
.
url
=
getOneImageURL
(
this
.
fileList
)
this
.
$valueCopy
(
this
.
aioUpgradeRecord
,
values
.
aioUpgradeRecord
)
save
(
this
.
aioUpgradeRecord
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
})
},
normFile
(
e
)
{
if
(
Array
.
isArray
(
e
))
{
return
e
}
return
e
&&
e
.
fileList
},
back
()
{
this
.
$router
.
push
({
name
:
listPathName
})
},
},
deactivated
()
{
this
.
fileList
=
[];
}
};
</
script
>
<
style
>
.aioUpgradeRecord
.cust-normal-card
.ant-row
{
height
:
auto
;
}
.aioUpgradeRecord
.ant-upload.ant-upload-select.ant-upload-select-text
{
height
:
32px
!important
;
}
</
style
>
\ No newline at end of file
src/views/base/aioVersion/AioVersionList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card>
<div
class=
"cust-list-cart"
ref=
"code"
>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
一体机版本列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
@
click=
"addNew"
>
新建
</a-button>
</a-button-group>
</div>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
:disabled=
"record.isPublish"
@
click=
"onPublish(record)"
>
发布
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"editRow(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a
:disabled=
"record.isPublish"
@
click=
"onDelete(record)"
>
删除
</a>
</span>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
getPage
,
publish
,
deleteOne
}
from
"@/api/base/baseAioVersion"
;
import
{
formatDate
,
humpToLine
,
setOrder
}
from
"@/util/util"
;
const
dataSource
=
[];
let
detailPathName
=
'aioVersionDetail'
const
columns
=
[
{
title
:
'版本名称'
,
width
:
110
,
dataIndex
:
'name'
},
{
title
:
'版本号'
,
width
:
80
,
dataIndex
:
'version'
},
{
title
:
'下载url'
,
dataIndex
:
'url'
},
{
title
:
'是否已发布'
,
width
:
100
,
align
:
'center'
,
dataIndex
:
'isPublish'
,
customRender
:
(
value
)
=>
value
?
"是"
:
"否"
},
{
title
:
'适用尺寸'
,
width
:
100
,
align
:
'center'
,
dataIndex
:
'size'
,
customRender
:
(
value
)
=>
value
==
1
?
"19寸"
:
"55寸"
},
{
title
:
'创建时间'
,
dataIndex
:
'ctDate'
,
width
:
120
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd hh:mm'
)
},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
140
,
scopedSlots
:
{
customRender
:
'action'
}}
];
export
default
{
name
:
"AioVersionList"
,
data
()
{
return
{
query
:
{
order
:
""
,
sort
:
""
,
pageNum
:
1
,
sizeNum
:
10
,
},
rowKey
:
"id"
,
total
:
0
,
columns
:
columns
,
dataSource
:
dataSource
,
isFirstLoad
:
true
,
}
},
methods
:
{
reset
()
{
this
.
query
.
page
=
1
;
this
.
loadData
();
},
loadData
(
size
)
{
if
(
size
&&
!
isNaN
(
size
))
{
this
.
query
.
size
=
size
}
console
.
log
(
1
,
this
.
query
)
getPage
(
this
.
query
).
then
(
response
=>
{
console
.
log
(
2
,
this
.
query
)
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
dataSource
=
respData
.
list
;
this
.
total
=
respData
.
total
;
}
});
},
addNew
()
{
this
.
editRow
()
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
deleteRow
(
id
)
{
deleteOne
(
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDelete
(
row
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录吗?'
,
onOk
()
{
_this
.
deleteRow
(
row
.
id
);
},
onCancel
()
{
},
});
},
onPublish
(
row
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定发布该版本的安装文件吗?'
,
onOk
()
{
_this
.
publish
(
row
.
id
);
},
onCancel
()
{
},
});
},
publish
(
id
){
publish
(
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
){
this
.
loadData
()
}
})
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
mounted
()
{
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/base/aioVersion/AioVersionRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"AioVersionRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/base/app/AppModuleDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div
class=
"appModule"
>
<a-form
@
submit=
"handleSubmit"
:form=
"form"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
APP模块明细
</span>
<a-button-group
slot=
"extra"
>
<a-button
type=
'primary'
htmlType=
'submit'
:loading=
"loading"
>
保存
</a-button>
<a-button
type=
"primary"
@
click=
"back"
ghost
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
title=
"基础数据"
class=
"cust-normal-card"
>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'模块编号'
>
<a-input
v-decorator=
"['appModule.code',
{initialValue:appModule.code, rules: [{ required: true, message: '请输入编号' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'模块名称'
>
<a-input
v-decorator=
"['appModule.name',
{initialValue:appModule.name,rules: [{ required: true, message: '请输入名称' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
label=
'模块类型'
v-bind=
"formItemLayout"
>
<a-select
style=
'width: 100%'
v-decorator=
"['appModule.type',
{initialValue:appModule.type,rules: [{ required: true, message: '请选择模块类型' }]}]"
>
<a-select-option
v-for=
"type in typeList"
v-bind:value=
"type.valueInt"
v-bind:key=
"type.id"
>
{{
type
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
label=
'模块分组'
v-bind=
"formItemLayout"
>
<a-select
style=
'width: 100%'
v-decorator=
"['appModule.moduleGroup',
{initialValue:appModule.moduleGroup,rules: [{ required: true, message: '请选择模块分组' }]}]"
>
<a-select-option
v-for=
"type in moduleGroupList"
v-bind:value=
"type.valueInt"
v-bind:key=
"type.id"
>
{{
type
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'需登陆'
>
<a-radio-group
@
change=
"loginRadioChange"
v-decorator=
"['appModule.needLogin',
{initialValue: appModule.needLogin,rules:[{ required: true, message: '' }]}]">
<a-radio
:value=
"true"
>
是
</a-radio>
<a-radio
:value=
"false"
>
否
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'需绑定房产'
>
<a-radio-group
@
change=
"bindRadioChange"
v-decorator=
"['appModule.needBindHouse',
{initialValue: appModule.needBindHouse, rules:[{ required: true, message: '' }]}]">
<a-radio
:value=
"true"
>
是
</a-radio>
<a-radio
:value=
"false"
>
否
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'是否可配置广告位'
>
<a-radio-group
@
change=
"allowDrillChange"
v-decorator=
"['appModule.allowAdvertisementDrill',
{initialValue: appModule.allowAdvertisementDrill, rules:[{ required: true, message: '' }]}]">
<a-radio
:value=
"true"
>
是
</a-radio>
<a-radio
:value=
"false"
>
否
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'是否固定模块'
>
<a-radio-group
@
change=
"allowDrillChange"
v-decorator=
"['appModule.fixed',
{initialValue: appModule.fixed, rules:[{ required: true, message: '' }]}]">
<a-radio
:value=
"true"
>
是
</a-radio>
<a-radio
:value=
"false"
>
否
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'Android首页路径'
>
<a-input
v-decorator=
"['appModule.androidView',
{initialValue:appModule.androidView, rules: [{ required: true, message: '请输入路径' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'Android详情路径'
>
<a-input
v-decorator=
"['appModule.androidDetailView',
{initialValue:appModule.androidDetailView, rules: [{ required: true, message: '请输入路径' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'IOS首页路径'
>
<a-input
v-decorator=
"['appModule.iosView',
{initialValue:appModule.iosView, rules: [{ required: true, message: '请输入路径' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'IOS详情路径'
>
<a-input
v-decorator=
"['appModule.iosDetailView',
{initialValue:appModule.iosDetailView, rules: [{ required: true, message: '请输入路径' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'是否H5'
>
<a-radio-group
@
change=
"isH5Module"
v-decorator=
"['appModule.isH5',
{initialValue: appModule.isH5, rules:[{ required: true, message: '' }]}]">
<a-radio
:value=
"true"
>
是
</a-radio>
<a-radio
:value=
"false"
>
否
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'排序号'
>
<a-input
v-decorator=
"['appModule.showOrder',
{initialValue:appModule.showOrder}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row
v-if=
"isH5"
>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'H5列表路径'
>
<a-input
v-decorator=
"['appModule.h5ListUrl',
{initialValue:appModule.h5ListUrl, rules: [{ required: isH5, message: '请输入路径' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'H5详情路径'
>
<a-input
v-decorator=
"['appModule.h5DetailUrl',
{initialValue:appModule.h5DetailUrl, rules: [{ required: false, message: '请输入路径' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'模块图标'
>
<a-upload
v-decorator=
"['appModule.icon',
{
getValueFromEvent: normFile,
rules: [{ required: true, message: '请上传模块图标' }]
}]"
:defaultFileList="imageList"
listType="picture-card"
:action="getUploadImageUrl(business)"
:headers="uploadImageHeader"
:fileList="imageList"
@change="handleChange"
@preview="handlePreview"
>
<div
v-if=
"imageList.length
<
1
"
>
<a-icon
type=
"plus"
/>
<div
class=
"ant-upload-text"
>
上传图片
</div>
</div>
</a-upload>
<a-modal
:visible=
"previewVisible"
:footer=
"null"
@
cancel=
"handleCancel"
>
<img
alt=
"example"
style=
"width: 100%"
:src=
"previewImage"
/>
</a-modal>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"16"
>
<a-form-item
v-bind=
"formmarkItemLayout"
label=
'备注'
>
<a-textarea
:autoSize=
"
{ minRows: 4, maxRows: 8 }"
v-decorator="['appModule.remark', {initialValue:appModule.remark,rules: [{ required: false, message: '请输入备注' }]}]"/>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-form>
</div>
</
template
>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
save
,
add
}
from
'@/api/base/baseAppModule'
import
{
getUploadImageHeader
,
getUploadImageUrl
,
isUpdateSuccess
,
getOneImageURL
,
isLoading
}
from
"@/api/common/fileUpload"
;
let
listPathName
=
'appModuleList'
;
export
default
{
name
:
"appModuleDetail"
,
components
:
{
HeaderToolBar
},
data
()
{
return
{
id
:
0
,
checkedList
:
[],
form
:
this
.
$form
.
createForm
(
this
),
appModule
:
{},
moduleGroupList
:
[],
typeList
:[],
imageList
:[],
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
8
},
},
wrapperCol
:
{
sm
:
{
span
:
16
},
},
},
business
:
'appModule'
,
uploadImageHeader
:
getUploadImageHeader
(),
loading
:
false
,
needLogin
:
false
,
needBindHouse
:
false
,
previewVisible
:
false
,
isH5
:
false
,
allowAdvertisementDrill
:
false
,
previewImage
:
''
,
formmarkItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
4
},
},
wrapperCol
:
{
sm
:
{
span
:
20
},
},
}
}
},
activated
()
{
this
.
form
.
resetFields
()
this
.
initData
()
},
deactivated
()
{
},
methods
:
{
getUploadImageUrl
,
isUpdateSuccess
,
getOneImageURL
,
isLoading
,
initData
()
{
this
.
id
=
this
.
$route
.
query
.
id
||
0
this
.
imageList
=
[]
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
appModule
=
resp
.
data
.
saasAppModule
;
this
.
isH5
=
this
.
appModule
.
isH5
||
false
;
this
.
typeList
=
resp
.
data
.
codeMap
[
SYS_CONST
.
CODE
.
APP_TYPE
];
this
.
moduleGroupList
=
resp
.
data
.
codeMap
[
SYS_CONST
.
CODE
.
MODULE_GROUP
];
if
(
this
.
appModule
.
icon
)
{
let
image
=
{
uid
:
'-1'
,
name
:
'xxx.png'
,
status
:
'done'
,
url
:
this
.
appModule
.
icon
,
}
this
.
imageList
.
push
(
image
)
this
.
form
.
setFieldsValue
({
'appModule.icon'
:
this
.
imageList
})
}
}
this
.
needLogin
=
this
.
appModule
.
needLogin
;
this
.
needBindHouse
=
this
.
appModule
.
needBindHouse
;
this
.
allowAdvertisementDrill
=
this
.
appModule
.
allowAdvertisementDrill
;
})
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
values
.
appModule
.
icon
=
getOneImageURL
(
this
.
imageList
);
if
(
this
.
appModule
.
id
)
{
save
(
this
.
$valueCopy
(
this
.
appModule
,
values
.
appModule
)).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
else
{
add
(
values
.
appModule
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
}
})
},
normFile
(
e
)
{
if
(
Array
.
isArray
(
e
))
{
return
e
}
return
e
&&
e
.
fileList
},
handleChange
({
fileList
})
{
this
.
isUpdateSuccess
(
fileList
);
this
.
loading
=
this
.
isLoading
(
fileList
);
this
.
imageList
=
fileList
},
handleCancel
()
{
this
.
previewVisible
=
false
;
},
handlePreview
(
file
)
{
this
.
previewImage
=
file
.
url
||
file
.
thumbUrl
;
this
.
previewVisible
=
true
;
},
loginRadioChange
(
e
)
{
this
.
needLogin
=
e
.
target
.
value
},
bindRadioChange
(
e
)
{
this
.
needBindHouse
=
e
.
target
.
value
},
allowDrillChange
(
e
)
{
this
.
allowAdvertisementDrill
=
e
.
target
.
value
},
isH5Module
(
e
)
{
this
.
isH5
=
e
.
target
.
value
;
},
back
()
{
this
.
$router
.
push
({
name
:
listPathName
})
},
}
};
</
script
>
<
style
>
.appModule
.cust-normal-card
.ant-row
{
height
:
auto
;
}
</
style
>
\ No newline at end of file
src/views/base/app/AppModuleList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card>
<div
class=
"cust-list-cart"
ref=
"code"
>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
label=
"模块名称"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.name"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
label=
"模块编号"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.code"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
label=
"类型"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-select
placeholder=
"请选择类型"
v-model=
"query.type"
:allowClear=
"true"
>
<a-select-option
v-for=
"type in typeList"
v-bind:value=
"type.valueInt"
v-bind:key=
"type.id"
>
{{
type
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
APP模块列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
@
click=
"addNew"
>
新建
</a-button>
<a-button
@
click=
"onDeleteBatch"
type=
"danger"
>
批量删除
</a-button>
</a-button-group>
</div>
</div>
<div
slot=
"footer"
slot-scope=
"data"
>
{{
data
.
none
}}
<a-pagination
@
change=
"pageChange"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
:showTotal="$showTotal"/>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"editRow(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"onDelete(record)"
>
删除
</a>
</span>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
getPage
,
deleteOne
,
deleteBatch
}
from
"@/api/base/baseAppModule"
;
import
{
formatDate
,
humpToLine
,
setOrder
}
from
"@/util/util"
;
import
{
getCommonCode
}
from
"@/api/system/sysCode"
;
const
dataSource
=
[];
let
detailPathName
=
'appModuleDetail'
let
codeMap
;
const
columns
=
[
{
title
:
'模块名称'
,
width
:
100
,
dataIndex
:
'name'
},
{
title
:
'模块编号'
,
width
:
100
,
dataIndex
:
'code'
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
width
:
100
,
customRender
:
(
value
)
=>
codeMap
[
SYS_CONST
.
CODE
.
APP_TYPE
][
value
]
},
{
title
:
'排序号'
,
width
:
100
,
dataIndex
:
'showOrder'
,
sorter
:
true
},
{
title
:
'备注'
,
dataIndex
:
'remark'
},
{
title
:
'修改时间'
,
dataIndex
:
'lmDate'
,
width
:
140
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd hh:mm'
)
},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'action'
}}
];
export
default
{
name
:
"AppModuleList"
,
data
()
{
return
{
query
:
{
pageNum
:
1
,
sizeNum
:
10
,
name
:
""
,
code
:
""
,
type
:
""
,
sort
:
""
},
rowKey
:
"id"
,
selectedRowKeys
:
[],
typeList
:
[],
total
:
0
,
loading
:
false
,
columns
:
columns
,
dataSource
:
dataSource
,
isFirstLoad
:
true
,
visible
:
false
,
record
:
{},
}
},
methods
:
{
reset
()
{
this
.
query
.
page
=
1
;
this
.
query
.
name
=
""
;
this
.
query
.
code
=
""
;
this
.
query
.
type
=
""
;
this
.
loadData
();
},
showDrawer
()
{
this
.
visible
=
true
},
onClose
()
{
this
.
visible
=
false
;
this
.
record
=
{};
},
loadData
(
size
)
{
this
.
loading
=
true
;
if
(
size
&&
!
isNaN
(
size
))
{
this
.
query
.
size
=
size
}
getPage
(
this
.
query
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
dataSource
=
respData
.
list
;
this
.
total
=
respData
.
total
;
}
this
.
loading
=
false
;
});
},
search
()
{
this
.
query
.
page
=
1
;
this
.
loadData
();
},
addNew
()
{
this
.
editRow
()
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
deleteRow
(
id
)
{
deleteOne
(
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDelete
(
row
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录吗?'
,
onOk
()
{
_this
.
deleteRow
(
row
.
id
);
},
onCancel
()
{
},
});
},
deleteBatch
()
{
deleteBatch
(
this
.
selectedRowKeys
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDeleteBatch
()
{
if
(
this
.
selectedRowKeys
.
length
==
0
)
{
return
;
}
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除选中的记录吗?'
,
onOk
()
{
_this
.
deleteBatch
()
},
onCancel
()
{
},
});
},
updateSelect
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
getTypes
()
{
getCommonCode
([
SYS_CONST
.
CODE
.
APP_TYPE
]).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
codList
=
response
.
data
.
data
;
this
.
typeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
APP_TYPE
];
codeMap
=
this
.
$codeToMap
(
codList
)
}
})
},
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
mounted
()
{
this
.
getTypes
()
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/base/app/AppModuleRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view
/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"AppModuleRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/base/appVersion/AppVersionDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div
class=
"appVersion"
>
<a-form
@
submit=
"handleSubmit"
:form=
"form"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
APP版本详情
</span>
<a-button-group
slot=
"extra"
>
<a-button
type=
'primary'
htmlType=
'submit'
>
保存
</a-button>
<a-button
type=
"primary"
@
click=
"back"
ghost
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
title=
"基础数据"
class=
"cust-normal-card"
>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
label=
'APP类型'
v-bind=
"formItemLayout"
>
<a-select
style=
'width: 100%'
@
change=
"appTypeChange"
:disabled=
"disabled"
v-decorator=
"['appVersion.appType',
{initialValue:appVersion.appType,rules: [{ required: true, message: '请输入代码类型' }]}]"
>
<a-select-option
v-for=
"item in appTypeList"
:key=
"item.id"
:value=
"item.valueInt"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
label=
'客户端类型'
v-bind=
"formItemLayout"
>
<a-select
style=
'width: 100%'
@
change=
"typeChange"
:disabled=
"disabled"
v-decorator=
"['appVersion.clientType',
{initialValue:appVersion.clientType,rules: [{ required: true, message: '请输入代码类型' }]}]"
>
<a-select-option
v-for=
"item in clientTypeList"
:key=
"item.id"
:value=
"item.valueInt"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'版本号'
>
<a-input
:disabled=
"disabled"
v-decorator=
"['appVersion.version',
{initialValue:appVersion.version,rules: [{ required: true, message: '请输入版本号' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'强制更新'
>
<a-radio-group
v-decorator=
"['appVersion.isForce',
{initialValue:appVersion.isForce,rules:[{required: true}]}]">
<a-radio
:value=
'false'
>
不强制
</a-radio>
<a-radio
:value=
'true'
>
强制
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row
v-show=
"this.needUpload"
>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'上传APP'
>
<a-upload
v-decorator=
"['appVersion.url',
{
valuePropName: 'fileList',
getValueFromEvent: normFile,
rules: [{ required: needUpload, message: '请上传APP' }]
},
]"
:remove="remove"
@change="handleChange"
:beforeUpload="beforeUpload">
<div
v-if=
"fileList.length
<
1
"
>
<a-button>
<a-icon
type=
"upload"
/>
选择文件
</a-button>
</div>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"16"
>
<a-form-item
v-bind=
"formmarkItemLayout"
label=
'更新内容'
>
<a-textarea
:autoSize=
"
{ minRows: 8, maxRows: 15}"
v-decorator="['appVersion.content', {initialValue:appVersion.content,rules: [{ required: true, message: '请输入更新内容' }]}]"/>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-form>
</div>
</
template
>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
save
}
from
'@/api/base/baseAppVersion'
import
{
uploadApp
}
from
'@/api/common/fileUpload'
let
listPathName
=
'appVersionList'
;
export
default
{
name
:
"appVersionDetail"
,
components
:
{
HeaderToolBar
},
data
()
{
return
{
id
:
0
,
productType
:
SYS_CONST
.
SYS_CLIENT_TYPE
.
ANDROID
,
appType
:
""
,
url
:
""
,
disabled
:
false
,
isRemove
:
false
,
clientTypeList
:
[],
appTypeList
:
[],
fileList
:
[],
form
:
this
.
$form
.
createForm
(
this
),
appVersion
:
{},
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
8
},
},
wrapperCol
:
{
sm
:
{
span
:
16
},
},
},
formmarkItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
4
},
},
wrapperCol
:
{
sm
:
{
span
:
20
},
},
},
fileData
:
{},
android
:
SYS_CONST
.
SYS_CLIENT_TYPE
.
ANDROID
,
needUpload
:
true
}
},
activated
()
{
this
.
disabled
=
false
this
.
form
.
resetFields
()
this
.
initData
()
},
methods
:
{
initData
()
{
this
.
id
=
this
.
$route
.
query
.
id
||
0
this
.
isRemove
=
false
;
this
.
url
=
""
if
(
this
.
id
!=
0
)
{
this
.
disabled
=
true
}
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
appVersion
=
resp
.
data
.
baseAppVersion
;
this
.
clientTypeList
=
resp
.
data
.
codeMap
[
SYS_CONST
.
CODE
.
SYS_CLIENT_TYPE
];
this
.
appTypeList
=
resp
.
data
.
codeMap
[
SYS_CONST
.
CODE
.
APP_TYPE
];
this
.
productType
=
this
.
appVersion
.
clientType
?
this
.
appVersion
.
clientType
:
SYS_CONST
.
SYS_CLIENT_TYPE
.
ANDROID
;
this
.
appType
=
this
.
appVersion
.
appType
this
.
needUpload
=
this
.
productType
==
this
.
android
;
if
(
this
.
appVersion
.
url
)
{
this
.
url
=
this
.
appVersion
.
url
;
let
strs
=
this
.
url
.
split
(
'/'
);
let
attachList
=
[{
uid
:
'-1'
,
name
:
strs
[
strs
.
length
-
1
],
status
:
'done'
,
url
:
this
.
appVersion
.
url
}];
this
.
fileList
.
push
(
attachList
);
this
.
form
.
setFieldsValue
({
'appVersion.url'
:
attachList
})
}
}
})
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
let
that
=
this
;
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
this
.
id
===
0
)
{
// 新增
this
.
saveFile
(
values
,
that
);
}
else
{
// 编辑
if
(
this
.
isRemove
)
{
// 删除了附件
this
.
saveFile
(
values
,
that
);
}
else
{
// 未删除附件,只编辑其他内容
values
.
appVersion
.
url
=
this
.
appVersion
.
url
;
this
.
saveDetail
(
values
);
}
}
}
})
},
saveFile
(
values
,
that
)
{
const
{
fileList
}
=
that
;
const
formData
=
new
FormData
();
if
(
this
.
needUpload
){
fileList
.
forEach
(
file
=>
{
formData
.
append
(
'file'
,
file
);
});
uploadApp
(
formData
,
values
.
appVersion
.
appType
,
values
.
appVersion
.
version
).
then
(
response
=>
{
values
.
appVersion
.
url
=
response
.
data
.
url
;
this
.
saveDetail
(
values
);
});
}
else
{
values
.
appVersion
.
url
=
""
;
this
.
saveDetail
(
values
);
}
},
saveDetail
(
values
)
{
save
(
this
.
$valueCopy
(
this
.
appVersion
,
values
.
appVersion
)).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
},
normFile
(
e
)
{
if
(
Array
.
isArray
(
e
))
{
return
e
}
return
e
&&
e
.
fileList
},
beforeUpload
(
file
)
{
this
.
fileList
=
[...
this
.
fileList
,
file
];
return
false
;
},
handleChange
({
fileList
})
{
if
(
fileList
.
length
<
1
)
{
this
.
fileList
=
[];
}
},
remove
()
{
this
.
isRemove
=
true
;
if
(
this
.
id
!=
0
){
return
false
}
},
typeChange
(
val
)
{
this
.
productType
=
val
;
this
.
needUpload
=
this
.
productType
==
this
.
android
;
},
appTypeChange
(
val
)
{
this
.
appType
=
val
},
back
()
{
this
.
form
.
resetFields
();
this
.
productType
=
SYS_CONST
.
SYS_CLIENT_TYPE
.
ANDROID
;
this
.
$router
.
push
({
name
:
listPathName
})
},
},
deactivated
()
{
this
.
fileList
=
[];
}
};
</
script
>
<
style
>
.appVersion
.cust-normal-card
.ant-row
{
height
:
auto
;
}
.appVersion
.ant-upload.ant-upload-select.ant-upload-select-text
{
height
:
32px
!important
;
}
</
style
>
\ No newline at end of file
src/views/base/appVersion/AppVersionList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card>
<div
class=
"cust-list-cart"
ref=
"code"
>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"5"
>
<a-form-item
label=
"客户端类型"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-select
placeholder=
"请选择类型"
v-model=
"query.clientType"
:allowClear=
"true"
>
<a-select-option
v-for=
"type in codeClientTypeList"
v-bind:value=
"type.valueInt"
v-bind:key=
"type.id"
>
{{
type
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:span=
"5"
>
<a-form-item
label=
"APP类型"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-select
placeholder=
"请选择类型"
v-model=
"query.appType"
:allowClear=
"true"
>
<a-select-option
v-for=
"type in codeAppTypeList"
v-bind:value=
"type.valueInt"
v-bind:key=
"type.id"
>
{{
type
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:span=
"5"
>
<a-form-item
label=
"版本号"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.versionNum"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:span=
"9"
>
<a-form-item
label=
"创建时间"
:labelCol=
"
{span: 4}" :wrapperCol="{span: 20}">
<a-range-picker
style=
"width:100%"
:value=
"ctDatePicker"
@
change=
"onCtDateChange"
/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
APP版本列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
@
click=
"addNew"
>
新建
</a-button>
</a-button-group>
</div>
</div>
<div
slot=
"footer"
slot-scope=
"data"
>
{{
data
.
none
}}
<a-pagination
@
change=
"pageChange"
:current=
"query.page"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:showTotal=
"$showTotal"
/>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"editRow(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"onDelete(record)"
>
删除
</a>
</span>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
getPage
,
deleteOne
,
}
from
"@/api/base/baseAppVersion"
;
import
{
formatDate
,
humpToLine
,
setOrder
}
from
"@/util/util"
;
import
{
getCommonCode
}
from
"@/api/system/sysCode"
;
const
dataSource
=
[];
let
detailPathName
=
'appVersionDetail'
let
codeMap
=
null
;
const
columns
=
[
{
title
:
'APP类型'
,
width
:
90
,
dataIndex
:
'appType'
,
customRender
:
(
value
)
=>
codeMap
?
codeMap
[
SYS_CONST
.
CODE
.
APP_TYPE
][
value
]
:
[]
},
{
title
:
'客户端类型'
,
width
:
90
,
dataIndex
:
'clientType'
,
customRender
:
(
value
)
=>
codeMap
?
codeMap
[
SYS_CONST
.
CODE
.
SYS_CLIENT_TYPE
][
value
]
:
[]
},
{
title
:
'强制更新'
,
width
:
80
,
dataIndex
:
'isForce'
,
customRender
:
(
value
)
=>
value
?
"是"
:
"否"
},
{
title
:
'版本号'
,
width
:
90
,
dataIndex
:
'version'
},
{
title
:
'下载url'
,
dataIndex
:
'url'
},
{
title
:
'创建时间'
,
dataIndex
:
'ctDate'
,
width
:
120
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd hh:mm'
)
},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
90
,
scopedSlots
:
{
customRender
:
'action'
}}
];
export
default
{
name
:
"AppVersionList"
,
data
()
{
return
{
query
:
{
page
:
1
,
size
:
10
,
clientType
:
""
,
appType
:
""
,
versionNum
:
""
,
sort
:
""
,
ctDateBegin
:
""
,
ctDateEnd
:
""
},
ctDatePicker
:
[],
rowKey
:
"id"
,
total
:
0
,
columns
:
columns
,
dataSource
:
dataSource
,
isFirstLoad
:
true
,
codeClientTypeList
:
[],
codeAppTypeList
:
[],
}
},
methods
:
{
reset
()
{
this
.
query
.
page
=
1
;
this
.
query
.
clientType
=
""
;
this
.
query
.
appType
=
""
;
this
.
query
.
versionNum
=
""
;
this
.
query
.
ctDateBegin
=
""
;
this
.
query
.
ctDateEnd
=
""
;
this
.
ctDatePicker
=
[];
this
.
loadData
();
},
loadData
(
size
)
{
if
(
size
&&
!
isNaN
(
size
))
{
this
.
query
.
size
=
size
}
getPage
(
this
.
query
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
dataSource
=
respData
.
list
;
this
.
total
=
respData
.
total
;
}
});
},
search
()
{
this
.
query
.
page
=
1
;
this
.
loadData
();
},
onCtDateChange
(
date
,
dateString
)
{
this
.
ctDatePicker
=
date
;
this
.
query
.
ctDateBegin
=
dateString
[
0
]
this
.
query
.
ctDateEnd
=
dateString
[
1
]
this
.
loadData
()
},
addNew
()
{
this
.
editRow
()
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
deleteRow
(
id
)
{
deleteOne
(
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDelete
(
row
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录吗?'
,
onOk
()
{
_this
.
deleteRow
(
row
.
id
);
},
onCancel
()
{
},
});
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
getTypes
()
{
getCommonCode
([
SYS_CONST
.
CODE
.
APP_TYPE
,
SYS_CONST
.
CODE
.
SYS_CLIENT_TYPE
]).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
codList
=
response
.
data
.
data
;
this
.
codeAppTypeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
APP_TYPE
];
this
.
codeClientTypeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
SYS_CLIENT_TYPE
];
codeMap
=
this
.
$codeToMap
(
codList
)
}
})
},
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
mounted
()
{
this
.
getTypes
();
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/base/appVersion/AppVersionRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"AppVersionRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/base/bootAdvertisement/BootAdvertisementDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div
class=
"boot-ad-detail"
>
<a-form
:form=
"form"
@
submit=
"handleSubmit"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
开机广告详情页
</span>
<a-button-group
slot=
"extra"
>
<a-button
:loading=
"loading"
htmlType=
"submit"
type=
"primary"
>
保存
</a-button>
<a-button
@
click=
"back"
ghost
type=
"primary"
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
class=
"cust-normal-card"
title=
"开机广告信息详情"
>
<a-row>
<a-col
:span=
"11"
>
<a-form-item
label=
"标题: "
v-bind=
"formItemLayout"
>
<a-input
v-decorator=
"['saasAppBootAdvertisement.title',
{initialValue:saasAppBootAdvertisement.title, rules: [{ required: true, message: '请输入广告描述' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"11"
>
<a-form-item
label=
"生效时间"
v-bind=
"formItemLayout"
>
<a-range-picker
:showTime=
"
{format: 'HH:mm',defaultValue:[moment('00:00', 'HH:mm'),moment('23:59', 'HH:mm')]}"
@change="DateChange"
format="YYYY-MM-DD HH:mm"
style="width: 100%"
v-decorator="['activityDate', {rules: [{ required: true, message: '请选择起始时间' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"11"
>
<a-form-item
label=
"持续时间(1-5秒): "
v-bind=
"formItemLayout"
>
<a-input-number
:max=
"5"
:min=
"1"
v-decorator=
"['saasAppBootAdvertisement.duration',
{initialValue:saasAppBootAdvertisement.duration, rules: [{ required: true, message: '请输入时间' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"11"
>
<a-form-item
label=
"是否启用"
v-bind=
"formItemLayout"
>
<a-radio-group
v-decorator=
"['saasAppBootAdvertisement.available',
{initialValue:saasAppBootAdvertisement.available}]">
<a-radio
:value=
"true"
>
是
</a-radio>
<a-radio
:value=
"false"
>
否
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"11"
>
<a-form-item
label=
"图片(1080*2220,主内容高度1920居中)"
v-bind=
"formItemLayout"
>
<a-upload
style=
"height: 100%"
:action=
"getUploadImageUrl(business)"
:beforeUpload=
"beforeUpload"
:defaultFileList=
"imageList"
:fileList=
"imageList"
:headers=
"uploadImageHeader"
@
change=
"handleChange"
@
preview=
"handlePreview"
class=
"custom-ant-upload"
listType=
"picture-card"
v-decorator=
"['saasAppBootAdvertisement.filePath',
{
getValueFromEvent: normFile,
rules: [{ required: true, message: '开机广告图片必须上传' }]
}]"
>
<div
v-if=
"imageList.length
<
1
"
>
<a-icon
:type=
"loading ? 'loading' : 'plus'"
/>
<div
class=
"ant-upload-text"
>
上传广告图片
</div>
</div>
</a-upload>
<a-modal
:footer=
"null"
:visible=
"previewVisible"
@
cancel=
"handleCancel"
>
<img
:src=
"previewImage"
alt=
"example"
style=
"width: 100%"
/>
</a-modal>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-form>
</div>
</
template
>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
save
}
from
'@/api/saas/bootAdvertisement'
import
ATextarea
from
"ant-design-vue/es/input/TextArea"
;
import
moment
from
'moment'
;
import
{
getOneImageURL
,
getUploadImageHeader
,
getUploadImageUrl
,
handleUploadChange
,
imgBeforeUpload
}
from
"@/api/common/fileUpload"
;
let
listPathName
=
'bootAdvertisementList'
;
export
default
{
name
:
"bootAdvertisementDetail"
,
components
:
{
ATextarea
,
HeaderToolBar
},
data
()
{
return
{
id
:
0
,
form
:
this
.
$form
.
createForm
(
this
),
saasAppBootAdvertisement
:
{},
imageList
:
[],
// 查询出来的图片列表
typeList
:
[],
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
10
},
},
wrapperCol
:
{
sm
:
{
span
:
14
},
},
},
uploadImageHeader
:
getUploadImageHeader
(),
previewImage
:
''
,
previewVisible
:
false
,
loading
:
false
,
business
:
'bootAdvertisement'
,
}
},
activated
()
{
this
.
form
.
resetFields
()
this
.
initData
()
},
methods
:
{
moment
,
getUploadImageUrl
,
getOneImageURL
,
initData
()
{
this
.
id
=
this
.
$route
.
query
.
id
||
0
this
.
imageList
=
[];
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
saasAppBootAdvertisement
=
resp
.
data
.
saasAppBootAdvertisement
}
//时间回显
if
(
resp
.
data
.
saasAppBootAdvertisement
.
startDate
!=
null
)
{
this
.
form
.
setFieldsValue
({
'activityDate'
:
[
moment
(
this
.
saasAppBootAdvertisement
.
startDate
),
moment
(
this
.
saasAppBootAdvertisement
.
endDate
)]});
}
//图片回显
if
(
this
.
saasAppBootAdvertisement
.
filePath
)
{
this
.
thumbnail
=
this
.
saasAppBootAdvertisement
.
filePath
let
image
=
{
uid
:
'-1'
,
name
:
'xxx.png'
,
status
:
'done'
,
url
:
this
.
saasAppBootAdvertisement
.
filePath
,
}
this
.
imageList
.
push
(
image
)
this
.
form
.
setFieldsValue
({
'saasAppBootAdvertisement.filePath'
:
this
.
imageList
})
}
})
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
values
.
saasAppBootAdvertisement
.
filePath
=
getOneImageURL
(
this
.
imageList
);
let
saveData
=
{
saasAppBootAdvertisement
:
this
.
$valueCopy
(
this
.
saasAppBootAdvertisement
,
values
.
saasAppBootAdvertisement
)
}
save
(
saveData
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
})
},
DateChange
(
date
,
dateString
)
{
this
.
saasAppBootAdvertisement
.
startDate
=
dateString
[
0
]
this
.
saasAppBootAdvertisement
.
endDate
=
dateString
[
1
]
},
handleChange
({
fileList
})
{
this
.
loading
=
handleUploadChange
(
fileList
);
this
.
imageList
=
fileList
;
},
handlePreview
(
file
)
{
this
.
previewImage
=
file
.
url
||
file
.
thumbUrl
;
this
.
previewVisible
=
true
;
},
handleCancel
()
{
this
.
previewVisible
=
false
;
},
normFile
(
e
)
{
if
(
Array
.
isArray
(
e
))
{
return
e
}
return
e
&&
e
.
fileList
},
beforeUpload
(
file
)
{
return
imgBeforeUpload
(
file
,
1080
,
2220
)
},
back
()
{
this
.
$router
.
push
({
name
:
listPathName
})
}
}
};
</
script
>
<
style
scoped
>
.boot-ad-detail
.cust-normal-card
.ant-row
{
height
:
auto
;
}
.custom-ant-upload
>>>
.ant-upload-list-picture-card-container
{
height
:
auto
;
}
.custom-ant-upload
>>>
.ant-upload-list-picture-card
.ant-upload-list-item
{
margin
:
4px
4px
0px
4px
;
height
:
auto
!important
;
width
:
100%
!important
;
padding
:
2px
;
}
</
style
>
src/views/base/bootAdvertisement/BootAdvertisementList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card>
<div
class=
"cust-list-cart"
ref=
"code"
>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
label=
"描述"
:labelCol=
"
{span: 6}" :wrapperCol="{span: 18}">
<a-input
@
pressEnter=
"search"
v-model=
"query.title"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
label=
"状态"
:labelCol=
"
{span: 6}" :wrapperCol="{span: 18}">
<a-select
placeholder=
"请选择状态"
v-model=
"query.available"
:allowClear=
"true"
>
<a-select-option
v-for=
"option in availabStatus"
v-bind:value=
"option.valueInt"
v-bind:key=
"option.id"
>
{{
option
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
<a-table
size=
"middle"
@
change=
"sortChange"
:loading=
"loading"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
开机广告列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
@
click=
"addNew"
>
新建
</a-button>
</a-button-group>
</div>
</div>
<div
v-if=
"total > 0"
id=
"components-pagination-demo-mini"
slot=
"footer"
slot-scope=
"data"
>
{{
data
.
none
}}
<a-pagination
:current=
"query.page"
@
change=
"pageChange"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
:showTotal="$showTotal"/>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"editRow(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a
style=
"color:red"
@
click=
"onDelete(record)"
>
删除
</a>
</span>
<span
slot=
"tags"
slot-scope=
"text, record"
>
<a-switch
checkedChildren=
"启用"
unCheckedChildren=
"禁用"
@
click=
"setStatus(record)"
:checked=
"record.available"
:key=
"record.id"
/>
</span>
<span
slot=
"avatar"
slot-scope=
"text"
>
<img
:src=
text
style=
"width: 25px;height: 25px;"
/>
</span>
</a-table>
<a-drawer
:title=
"drTitle"
placement=
"right"
:closable=
"true"
@
close=
"onClose"
:visible=
"visible"
:width=
"drWidth"
>
</a-drawer>
</div>
</a-card>
</
template
>
<
script
>
import
{
changeShowStatus
,
deleteOne
,
getPage
}
from
"@/api/saas/bootAdvertisement"
;
import
{
formatDate
,
humpToLine
,
setOrder
}
from
"@/util/util"
;
import
{
getCommonCode
}
from
"@/api/system/sysCode"
;
const
dataSource
=
[];
let
detailPathName
=
'bootAdvertisementDetail'
const
columns
=
[
{
title
:
'广告图片'
,
width
:
100
,
dataIndex
:
'filePath'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'avatar'
}},
{
title
:
'描述'
,
ellipsis
:
true
,
dataIndex
:
'title'
},
{
title
:
'生效时间'
,
width
:
140
,
align
:
'center'
,
dataIndex
:
'startDate'
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd hh:mm'
)
},
{
title
:
'结束时间'
,
width
:
140
,
align
:
'center'
,
dataIndex
:
'endDate'
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd hh:mm'
)
},
{
title
:
'持续时间'
,
align
:
'right'
,
width
:
80
,
dataIndex
:
'duration'
},
{
title
:
'状态'
,
align
:
'center'
,
dataIndex
:
'available'
,
width
:
80
,
scopedSlots
:
{
customRender
:
'tags'
}},
{
title
:
'操作'
,
align
:
'center'
,
key
:
'operation'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'action'
}}
];
export
default
{
name
:
"bootAdvertisementList"
,
data
()
{
return
{
query
:
{
page
:
1
,
size
:
10
,
},
rowKey
:
"id"
,
selectedRowKeys
:
[],
selectedRows
:
[],
currentEditDate
:
{},
total
:
0
,
loading
:
false
,
availabStatus
:[],
columns
:
columns
,
dataSource
:
dataSource
,
isFirstLoad
:
true
,
visible
:
false
,
drWidth
:
'70%'
,
drTitle
:
''
,
record
:
{},
}
},
methods
:
{
reset
()
{
this
.
query
.
page
=
1
;
this
.
query
.
available
=
undefined
;
this
.
query
.
title
=
undefined
;
this
.
loadData
();
},
handleCancel
()
{
this
.
previewVisible
=
false
},
handlePreview
(
file
)
{
this
.
previewImage
=
file
.
url
||
file
.
thumbUrl
;
this
.
previewVisible
=
true
;
},
handleChange
({
fileList
})
{
this
.
isUpdateSuccess
(
fileList
);
this
.
fileList
=
fileList
;
},
showDrawer
()
{
this
.
visible
=
true
},
onClose
()
{
this
.
visible
=
false
;
this
.
drTitle
=
''
;
this
.
record
=
{};
this
.
fileList
=
[];
},
loadData
(
size
)
{
this
.
loading
=
true
;
if
(
size
&&
!
isNaN
(
size
))
{
this
.
query
.
size
=
size
}
getPage
(
this
.
query
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
dataSource
=
respData
.
list
;
this
.
total
=
respData
.
total
;
}
this
.
loading
=
false
;
});
},
search
()
{
this
.
query
.
page
=
1
;
this
.
loadData
();
},
addNew
()
{
this
.
editRow
()
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
deleteRow
(
id
)
{
deleteOne
(
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDelete
(
row
)
{
let
_this
=
this
;
if
(
row
.
available
==
SYS_CONST
.
AVAILABLE_STATUS
.
AVAILABLE
){
this
.
$notification
.
error
({
message
:
'系统提示'
,
description
:
"启用状态的记录不能删除"
,
duration
:
4
,});
return
}
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录吗?'
,
onOk
()
{
_this
.
deleteRow
(
row
.
id
);
},
onCancel
()
{
},
});
},
onChangeStatus
()
{
this
.
loadData
();
},
onDeleteBatch
()
{
if
(
this
.
selectedRowKeys
.
length
==
0
)
{
return
;
}
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除选中的记录吗?'
,
onOk
()
{
_this
.
deleteBatch
()
},
onCancel
()
{
},
});
},
updateSelect
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
},
setStatus
(
record
)
{
changeShowStatus
(
record
.
available
,
record
.
id
).
then
(()
=>
{
this
.
loadData
();
});
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
page
=
1
;
this
.
query
.
size
=
size
;
this
.
loadData
();
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
getSysCode
()
{
getCommonCode
([
SYS_CONST
.
CODE
.
SYS_AVAILABLE_STATUS
]).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
availabStatus
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
SYS_AVAILABLE_STATUS
];
}
})
},
},
mounted
()
{
//查询下拉菜单
this
.
getSysCode
();
this
.
loadData
(
this
.
defaultPageSize
);
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
query
.
page
=
1
this
.
loadData
()
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/base/bootAdvertisement/BootAdvertisementRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view
/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"BootAdvertisementRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/base/communityUser/CommunityUserDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div
class=
"news-detail"
>
<a-form
@
submit=
"handleSubmit"
:form=
"form"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
业主用户明细
</span>
<a-button-group
slot=
"extra"
>
<!--
<a-button
type=
'primary'
htmlType=
'submit'
:loading=
"loading"
>
保存
</a-button>
-->
<a-button
type=
"primary"
@
click=
"back"
ghost
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
title=
"业主用户详情"
class=
"cust-normal-card"
>
<a-row
:utter=
"gutter"
>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'实名'
>
<span>
{{
communityUser
.
realName
}}
</span>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'昵称'
>
<span>
{{
communityUser
.
nickname
}}
</span>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'电话'
>
<span>
{{
communityUser
.
phone
}}
</span>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'生日'
>
<span>
{{
formatDate
(
new
Date
(
communityUser
.
birthday
),
'yyyy-MM-dd'
)
}}
</span>
</a-form-item>
</a-col>
</a-row>
<a-row
:utter=
"gutter"
>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'头像'
>
<img
style=
"width: 86px"
:src=
"communityUser.avatar"
>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'性别'
>
<span
v-for=
"item in this.sexList"
:key=
"item.id"
:value =
"item.valueInt"
v-if=
"communityUser.sex==item.valueInt"
>
{{
item
.
name
}}
</span>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'级别'
>
<span>
{{
communityUser
.
level
}}
</span>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card
title=
"房产列表"
class=
"cust-normal-card"
>
<a-table
:columns=
"columns"
:dataSource=
"itemList"
size=
"middle"
:rowKey=
"rowKey"
:pagination=
"false"
class=
"cust-card-table"
bordered
>
</a-table>
</a-card>
</a-form>
</div>
</
template
>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
save
}
from
"../../../api/base/communityUser"
;
import
moment
from
'moment'
;
import
{
formatDate
}
from
"@/util/util"
;
let
listPathName
=
'communityUserList'
;
const
columns
=
[
{
title
:
'社区'
,
width
:
150
,
dataIndex
:
'communityName'
},
{
title
:
'房产编号'
,
dataIndex
:
'code'
}
]
export
default
{
name
:
"CommunityUserDetail"
,
components
:
{
HeaderToolBar
},
data
()
{
return
{
id
:
0
,
online
:
false
,
rowKey
:
"id"
,
columns
:
columns
,
form
:
this
.
$form
.
createForm
(
this
),
communityUser
:
{},
sexList
:
[],
itemList
:
[],
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
8
},
},
wrapperCol
:
{
sm
:
{
span
:
16
},
},
},
loading
:
false
,
gutter
:
8
,
}
},
activated
()
{
this
.
form
.
resetFields
()
this
.
initData
()
},
methods
:
{
moment
,
formatDate
,
initData
()
{
this
.
id
=
this
.
$route
.
query
.
id
||
0
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
communityUser
=
resp
.
data
.
communityUser
this
.
sexList
=
resp
.
data
.
codeMap
[
SYS_CONST
.
CODE
.
USER_SEX
]
this
.
itemList
=
resp
.
data
.
houseList
||
[]
}
})
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
let
community
=
this
.
$valueCopy
(
this
.
communityUser
,
values
.
communityUser
);
save
(
community
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
})
},
back
()
{
this
.
$router
.
push
({
name
:
listPathName
})
},
},
mounted
()
{
},
};
</
script
>
<
style
>
.news-detail
.cust-normal-card
.ant-row
{
height
:
auto
;
}
</
style
>
src/views/base/communityUser/CommunityUserList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card
class=
"cust-list-cart"
>
<div>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
label=
"昵称"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
placeholder=
"请输入"
v-model=
"query.nickname"
/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
label=
"电话"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
oninput=
"value=value.replace(/[^\d]/g,'')"
@
pressEnter=
"search"
placeholder=
"请输入"
v-model=
"query.phone"
/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
</div>
<div>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
业主用户列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
</a-button-group>
</div>
</div>
<div
slot=
"footer"
slot-scope=
"data"
>
{{
data
.
none
}}
<a-pagination
@
change=
"pageChange"
:current=
"query.page"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:showTotal=
"$showTotal"
/>
</div>
<span
slot=
"tags"
slot-scope=
"text"
>
<img
:src=
text
style=
"width: 25px;height: 25px;"
/>
</span>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"editRow(record)"
>
详情
</a>
</span>
<span
slot=
"sexTags"
slot-scope=
"text"
>
<div
v-for=
"option in sexList"
:key=
"option.id"
>
<a-tag
v-if=
"text == option.valueInt"
:color=
"setSexColor(option)"
:key=
"text"
>
{{
option
.
name
}}
</a-tag>
</div>
</span>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
formatDate
,
humpToLine
,
setOrder
}
from
"@/util/util"
;
import
{
getCommonCode
}
from
"@/api/system/sysCode"
;
import
{
getPage
}
from
"../../../api/base/communityUser"
;
let
detailPathName
=
'communityUserDetail'
const
dataSource
=
[]
const
columns
=
[
{
title
:
'头像'
,
width
:
80
,
dataIndex
:
'avatar'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'tags'
}},
{
title
:
'昵称'
,
width
:
180
,
dataIndex
:
'nickname'
},
{
title
:
'电话'
,
width
:
100
,
dataIndex
:
'phone'
},
{
title
:
'真实姓名'
,
width
:
90
,
dataIndex
:
'realName'
},
{
title
:
'级别'
,
width
:
90
,
dataIndex
:
'level'
},
{
title
:
'性别'
,
width
:
70
,
dataIndex
:
'sex'
,
scopedSlots
:
{
customRender
:
'sexTags'
}
},
{
title
:
'生日'
,
dataIndex
:
'birthday'
,
width
:
110
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd'
)
},
{
title
:
'备注'
,
dataIndex
:
'remark'
},
{
title
:
'创建时间'
,
dataIndex
:
'ctDate'
,
width
:
120
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd hh:mm'
)
},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
60
,
scopedSlots
:
{
customRender
:
'action'
}}
]
export
default
{
name
:
'CommunityHouseList'
,
data
()
{
return
{
isFirstLoad
:
true
,
query
:
{
nickname
:
""
,
phone
:
""
,
sort
:
""
,
page
:
1
,
size
:
10
,
},
ctDatePicker
:
[],
total
:
0
,
rowKey
:
"id"
,
columns
:
columns
,
dataSource
:
dataSource
,
selectedRowKeys
:
[],
selectedRows
:
[],
sexList
:
[],
}
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
methods
:
{
search
()
{
this
.
query
.
page
=
1
this
.
loadData
();
},
reset
()
{
this
.
query
.
page
=
1
this
.
query
.
nickname
=
""
;
this
.
query
.
phone
=
""
;
this
.
loadData
();
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
loadData
(
pageSize
)
{
if
(
pageSize
&&
!
isNaN
(
pageSize
))
{
this
.
query
.
size
=
pageSize
}
getPage
(
this
.
query
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
total
=
respData
.
total
;
this
.
dataSource
=
respData
.
list
;
}
});
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
updateSelect
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
},
setSexColor
(
option
)
{
if
(
option
.
valueInt
==
SYS_CONST
.
USER_SEX
.
MALE
)
{
return
"blue"
;
}
else
if
(
option
.
valueInt
==
SYS_CONST
.
USER_SEX
.
FEMALE
)
{
return
"#FFB7DD"
}
else
{
return
"#DDDDDD"
}
},
getSysCode
()
{
getCommonCode
([
SYS_CONST
.
CODE
.
USER_SEX
]).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
sexList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
USER_SEX
]
}
})
},
},
mounted
()
{
this
.
getSysCode
();
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
\ No newline at end of file
src/views/base/communityUser/CommunityUserRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"CommunityUserRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/base/points/PointsTemplateDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div>
<a-form
@
submit=
"handleSubmit"
:form=
"form"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
积分奖励模板明细
</span>
<a-button-group
slot=
"extra"
>
<a-button
type=
'primary'
htmlType=
'submit'
:loading=
"loading"
>
保存
</a-button>
<a-button
type=
"primary"
@
click=
"back"
ghost
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
title=
"基础数据"
class=
"cust-normal-card"
>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'模板编号'
>
<a-input
placeholder=
"请输入模板编号"
v-decorator=
"['pointsAwardRuleTemplate.code',
{initialValue:pointsAwardRuleTemplate.code, rules: [{ required: true, message: '请输入编号' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
label=
'平台'
v-bind=
"formItemLayout"
>
<a-select
v-decorator=
"['pointsAwardRuleTemplate.platform',
{initialValue:pointsAwardRuleTemplate.platform,rules: [{ required: true, message: '请选择平台' }]}]">
<a-select-option
v-for=
"type in typeList"
v-bind:value=
"type.valueInt"
v-bind:key=
"type.id"
>
{{
type
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'类型'
>
<a-radio-group
v-decorator=
"['pointsAwardRuleTemplate.type',
{initialValue: pointsAwardRuleTemplate.type,rules: [{ required: true, message: '请选择类型' }]}]">
<a-radio
v-for=
"change in changeList"
v-bind:value=
"change.valueInt"
v-bind:key=
"change.id"
>
{{
change
.
name
}}
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"8"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'排序号'
>
<a-input-number
:min=
0
style=
"width: 100%"
v-decorator=
"['pointsAwardRuleTemplate.showOrder',
{initialValue:pointsAwardRuleTemplate.showOrder,rules: [{ required: true, message: '请输入' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"16"
>
<a-form-item
v-bind=
"formmarkItemLayout"
label=
'模板描述'
>
<a-input
v-decorator=
"['pointsAwardRuleTemplate.description',
{initialValue:pointsAwardRuleTemplate.description,rules: [{ required: true, message: '请输入描述信息' }]}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"16"
>
<a-form-item
v-bind=
"formmarkItemLayout"
label=
'备注'
>
<a-textarea
:autoSize=
"
{ minRows: 2, maxRows: 6 }"
v-decorator="['pointsAwardRuleTemplate.remark', {initialValue:pointsAwardRuleTemplate.remark,rules: [{ required: true, message: '请输入备注' }]}]"/>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-form>
</div>
</
template
>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
save
}
from
'@/api/base/pointsTemplate'
import
{
getCommonCode
}
from
"@/api/system/sysCode"
;
let
listPathName
=
'pointsTemplateList'
;
export
default
{
name
:
"pointsTemplateDetail"
,
components
:
{
HeaderToolBar
},
data
()
{
return
{
id
:
0
,
checkedList
:
[],
typeList
:
[],
changeList
:
[],
form
:
this
.
$form
.
createForm
(
this
),
pointsAwardRuleTemplate
:
{},
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
8
},
},
wrapperCol
:
{
sm
:
{
span
:
16
},
},
},
loading
:
false
,
formmarkItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
4
},
},
wrapperCol
:
{
sm
:
{
span
:
20
},
},
}
}
},
activated
()
{
this
.
form
.
resetFields
()
this
.
initData
()
},
mounted
()
{
this
.
getTypes
();
},
methods
:
{
initData
()
{
this
.
id
=
this
.
$route
.
query
.
id
||
0
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
pointsAwardRuleTemplate
=
resp
.
data
}
})
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
save
(
this
.
$valueCopy
(
this
.
pointsAwardRuleTemplate
,
values
.
pointsAwardRuleTemplate
)).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
})
},
getTypes
()
{
getCommonCode
([
SYS_CONST
.
CODE
.
POINT_CHANGE
,
SYS_CONST
.
CODE
.
APP_TYPE
]).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
typeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
APP_TYPE
];
this
.
changeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
POINT_CHANGE
];
}
})
},
back
()
{
this
.
$router
.
push
({
name
:
listPathName
})
},
}
};
</
script
>
<
style
>
.cust-detail-form
.ant-row
{
height
:
auto
;
}
</
style
>
\ No newline at end of file
src/views/base/points/PointsTemplateList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card>
<div
class=
"cust-list-cart"
ref=
"code"
>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
label=
"模板编号"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.code"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
label=
"模板描述"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.description"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
积分奖励模板列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
@
click=
"addNew"
>
新建
</a-button>
<!--
<a-button
@
click=
"onDeleteBatch"
type=
"danger"
>
批量删除
</a-button>
-->
</a-button-group>
</div>
</div>
<div
slot=
"footer"
slot-scope=
"data"
>
{{
data
.
none
}}
<a-pagination
@
change=
"pageChange"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:rowKey=
"rowKey"
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
:showTotal="$showTotal"/>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"editRow(record)"
>
编辑
</a>
<!--
<a-divider
type=
"vertical"
/>
-->
<!--
<a
@
click=
"onDelete(record)"
>
删除
</a>
-->
</span>
<span
slot=
"tags"
slot-scope=
"text"
>
<div
v-for=
"option in typeList"
:key=
"option.id"
>
<span
v-if=
"text === option.valueInt"
:key=
"text"
>
{{
option
.
name
}}
</span>
</div>
</span>
<span
slot=
"type"
slot-scope=
"text"
>
<div
v-for=
"option in changeList"
:key=
"option.id"
>
<span
v-if=
"text === option.valueInt"
:key=
"text"
>
{{
option
.
name
}}
</span>
</div>
</span>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
getPage
,
deleteOne
,
deleteBatch
}
from
"@/api/base/pointsTemplate"
;
import
{
humpToLine
,
setOrder
}
from
"@/util/util"
;
import
{
getCommonCode
}
from
"@/api/system/sysCode"
;
const
dataSource
=
[];
let
detailPathName
=
'pointsTemplateDetail'
const
columns
=
[
{
title
:
'模板编号'
,
width
:
180
,
dataIndex
:
'code'
},
{
title
:
'模板描述'
,
dataIndex
:
'description'
},
{
title
:
'模板类型'
,
dataIndex
:
'type'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'type'
}},
{
title
:
'平台'
,
dataIndex
:
'platform'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'tags'
}},
{
title
:
'排序号'
,
width
:
100
,
dataIndex
:
'showOrder'
,
sorter
:
true
},
{
title
:
'备注'
,
width
:
180
,
dataIndex
:
'remark'
},
// {title: '创建人', width: 100, dataIndex: 'ctUserName', sorter: true},
// {
// title: '创建时间',
// dataIndex: 'ctDate',
// width: 120,
// sorter: true,
// customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd hh:mm:ss')
// },
// {title: '修改人', width: 100, dataIndex: 'lmUserName', sorter: true},
// {
// title: '修改时间',
// dataIndex: 'lmDate',
// width: 120,
// sorter: true,
// customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd hh:mm:ss')
// },
{
title
:
'操作'
,
key
:
'operation'
,
width
:
80
,
scopedSlots
:
{
customRender
:
'action'
}}
];
export
default
{
name
:
"pointsTemplateList"
,
data
()
{
return
{
query
:
{
page
:
1
,
size
:
10
,
code
:
""
,
description
:
""
},
rowKey
:
"id"
,
selectedRowKeys
:
[],
selectedRows
:
[],
total
:
0
,
loading
:
false
,
columns
:
columns
,
dataSource
:
dataSource
,
isFirstLoad
:
true
,
visible
:
false
,
record
:
{},
typeList
:
[],
changeList
:
[],
}
},
methods
:
{
reset
()
{
this
.
query
.
page
=
1
;
this
.
query
.
code
=
""
;
this
.
query
.
description
=
""
;
this
.
loadData
();
},
showDrawer
()
{
this
.
visible
=
true
},
onClose
()
{
this
.
visible
=
false
;
this
.
record
=
{};
},
loadData
(
size
)
{
this
.
loading
=
true
;
if
(
size
&&
!
isNaN
(
size
))
{
this
.
query
.
size
=
size
}
getPage
(
this
.
query
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
dataSource
=
respData
.
list
;
this
.
total
=
respData
.
total
;
}
this
.
loading
=
false
;
});
},
search
()
{
this
.
query
.
page
=
1
this
.
loadData
();
},
addNew
()
{
this
.
editRow
()
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
deleteRow
(
id
)
{
deleteOne
(
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDelete
(
row
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录吗?'
,
onOk
()
{
_this
.
deleteRow
(
row
.
id
);
},
onCancel
()
{
},
});
},
deleteBatch
()
{
deleteBatch
(
this
.
selectedRowKeys
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDeleteBatch
()
{
if
(
this
.
selectedRowKeys
.
length
==
0
)
{
return
;
}
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除选中的记录吗?'
,
onOk
()
{
_this
.
deleteBatch
()
},
onCancel
()
{
},
});
},
updateSelect
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
getTypes
()
{
getCommonCode
([
SYS_CONST
.
CODE
.
POINT_CHANGE
,
SYS_CONST
.
CODE
.
APP_TYPE
]).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
typeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
APP_TYPE
];
this
.
changeList
=
response
.
data
.
data
[
SYS_CONST
.
CODE
.
POINT_CHANGE
];
}
})
},
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
mounted
()
{
this
.
getTypes
();
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/base/points/PointsTemplateRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"PointsTemplateRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/saas/company/CompanyDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div
class=
"company-detail"
>
<a-form
@
submit=
"handleSubmit"
:form=
"form"
class=
"cust-detail-form"
>
<header-tool-bar>
<span
class=
"cust-title"
slot=
"title"
>
<a-icon
type=
"hdd"
/>
公司管理明细
</span>
<a-button-group
slot=
"extra"
>
<a-button
type=
'primary'
htmlType=
'submit'
:loading=
"loading"
>
保存
</a-button>
<a-button
type=
"primary"
@
click=
"back"
ghost
>
返回
</a-button>
</a-button-group>
</header-tool-bar>
<a-card
title=
"公司数据"
class=
"cust-normal-card"
>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'公司编码'
>
<a-input
v-decorator=
"['company.code',
{initialValue:company.code, rules: [{ required: true, message: '请输入公司编码' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'公司名称'
>
<a-input
v-decorator=
"['company.name',
{initialValue:company.name,rules: [{ required: true, message: '请输入公司名称' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'公司法人'
>
<a-input
v-decorator=
"['company.legalPerson',
{initialValue:company.legalPerson, rules: [{ required: true, message: '请输入公司法人' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'成立时间'
>
<a-date-picker
style=
"width: 100%;"
v-decorator=
"['company.foundDate',
{initialValue:null==company.foundDate?undefined:moment(company.foundDate),rules: [{ required: true, message: '请选择成立时间' }]}]"
/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'座机'
>
<a-input
v-decorator=
"['company.landline',
{initialValue:company.landline,rules: [{ required: true, message: '请输入座机' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-item
:labelCol=
"
{span: 4}"
:wrapperCol="{span: 20}"
v-bind="formItemLayout"
label='公司地址'>
<a-input
v-decorator=
"['company.address',
{initialValue:company.address,rules: [{ required: true, message: '请输入公司地址' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'排序号'
>
<a-input-number
:min=
"0"
style=
"width: 100%;"
v-decorator=
"['company.showOrder',
{initialValue:company.showOrder}]"/>
</a-form-item>
</a-col>
</a-row>
<a-row
:utter=
"gutter"
>
<a-col
:span=
"6"
>
<a-form-item
v-bind=
"formItemLayout"
label=
'公司图标'
>
<a-upload
:rows=
"3"
v-decorator=
"['company.icon',
{
getValueFromEvent: normFile,
rules: [{ required: false, message: '请上传公司图标' }]
}]"
:defaultFileList="imageList"
:fileList="imageList"
listType="picture-card"
:action="getUploadImageUrl(business)"
:headers="uploadImageHeader"
@change="handleChangeImg"
@preview="handlePreview"
>
<div
v-if=
"imageList.length
<
1
"
>
<a-icon
type=
"plus"
/>
<div
class=
"ant-upload-text"
>
上传图片
</div>
</div>
</a-upload>
<a-modal
:visible=
"previewVisible"
:footer=
"null"
@
cancel=
"handleCancel"
>
<img
alt=
"example"
style=
"width: 100%"
:src=
"previewImage"
/>
</a-modal>
</a-form-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-item
:labelCol=
"
{span: 4}"
:wrapperCol="{span: 20}"
label='公司简介'>
<a-textarea
:rows=
"3"
v-decorator=
"['company.description',
{initialValue: company.description, rules: [{ required: false, message: '' }]}]"/>
</a-form-item>
</a-col>
<a-col
:span=
"6"
>
<a-form-item
:labelCol=
"
{span: 8}"
:wrapperCol="{span: 16}"
label='备注'>
<a-textarea
:rows=
"3"
v-decorator=
"['company.remark',
{initialValue: company.remark, rules: [{ required: false, message: '' }]}]"/>
</a-form-item>
</a-col>
</a-row>
</a-card>
</a-form>
<a-row>
<a-col
:span=
"8"
>
<a-card
title=
"公司业务"
class=
"cust-normal-card"
>
<template>
<div
style=
"overflow: auto"
v-bind:style=
"
{ height: dynamicHeight + 'px' }">
<a-tree
:defaultExpandParent=
true
checkable
@
expand=
"onExpand"
:expandedKeys=
"expandedKeys"
:autoExpandParent=
"autoExpandParent"
v-model=
"checkedKeys"
@
select=
"onSelect"
@
check=
"onCheck"
:selectedKeys=
"selectedKeys"
:treeData=
"treeData"
/>
</div>
</
template
>
</a-card>
</a-col>
<a-col
:span=
"8"
>
<a-card
style=
"height: 95%;"
title=
"用户APP"
class=
"cust-normal-card app-model"
>
<
template
>
<div
style=
"overflow: auto"
v-bind:style=
"
{ height: dynamicHeight + 'px' }">
<a-checkbox-group
v-model=
"proprietorCheckedList"
>
<a-row
v-for=
"item in proprietorAppModules"
:key=
"item.id+100"
>
<a-col
:span=
"24"
>
<a-checkbox
@
change=
"onChange"
:value=
"item.id"
:disabled=
"item.fixed"
><span
style=
"color: black"
>
{{
item
.
name
}}
</span>
</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</div>
</
template
>
</a-card>
</a-col>
<a-col
:span=
"8"
>
<a-card
style=
"height: 95%;"
title=
"管理APP"
class=
"cust-normal-card app-model"
>
<
template
>
<div
style=
"overflow: auto"
v-bind:style=
"
{ height: dynamicHeight + 'px' }">
<a-checkbox-group
v-model=
"administratorCheckedList"
>
<a-row
v-for=
"item in administratorAppModules"
:key=
"item.id+100"
>
<a-col
:span=
"24"
>
<a-checkbox
@
change=
"onChange"
:value=
"item.id"
:disabled=
"item.fixed"
><span
style=
"color: black"
>
{{
item
.
name
}}
</span>
</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</div>
</
template
>
</a-card>
</a-col>
</a-row>
</div>
</template>
<
script
>
import
HeaderToolBar
from
'@/components/page/HeaderToolBar'
import
{
getDetail
,
modify
,
init
,
getResource
}
from
'@/api/saas/saasCompany'
import
{
getUploadImageHeader
,
getUploadImageUrl
,
isUpdateSuccess
,
getOneImageURL
,
isLoading
}
from
"@/api/common/fileUpload"
;
import
moment
from
'moment'
;
let
listPathName
=
'companyList'
;
export
default
{
name
:
"CompanyDetail"
,
components
:
{
HeaderToolBar
},
data
()
{
return
{
loading
:
false
,
business
:
'company'
,
imageList
:
[],
previewVisible
:
false
,
previewImage
:
''
,
uploadImageHeader
:
getUploadImageHeader
(),
saasBusinessIds
:
[],
dynamicHeight
:
380
,
checkedValus
:
{},
proprietorCheckedList
:
[],
administratorCheckedList
:
[],
leafKeys
:
[],
expandedKeys
:
[],
autoExpandParent
:
true
,
checkedKeys
:
[],
selectedKeys
:
[],
treeData
:
[],
proprietorAppModules
:
[],
administratorAppModules
:
[],
id
:
0
,
form
:
this
.
$form
.
createForm
(
this
),
company
:
{},
formItemLayout
:
{
labelCol
:
{
sm
:
{
span
:
8
},
},
wrapperCol
:
{
sm
:
{
span
:
16
},
},
},
gutter
:
8
}
},
watch
:
{
checkedKeys
(
val
)
{
//console.log(JSON.stringify(val));
//只要叶子节点
let
temp
=
[];
if
(
val
&&
val
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
val
.
length
;
i
++
)
{
if
(
this
.
leafKeys
.
indexOf
(
val
[
i
])
>
-
1
)
{
temp
.
push
(
val
[
i
]);
}
}
}
this
.
saasBusinessIds
=
temp
;
//console.log(JSON.stringify(this.saasBusinessIds));
},
},
activated
()
{
this
.
form
.
resetFields
();
this
.
initData
();
},
methods
:
{
moment
,
getUploadImageUrl
,
isUpdateSuccess
,
getOneImageURL
,
isLoading
,
addAllExpandedKeys
(
arr
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
].
isLeaf
)
{
this
.
leafKeys
.
push
(
arr
[
i
].
key
);
}
this
.
expandedKeys
.
push
(
arr
[
i
].
key
);
if
(
arr
[
i
].
children
)
{
this
.
addAllExpandedKeys
(
arr
[
i
].
children
);
}
}
},
onChange
(
val
)
{
let
value
=
val
.
target
.
value
;
let
checked
=
val
.
target
.
checked
;
this
.
checkedValus
[
value
]
=
checked
;
//console.log(JSON.stringify(this.checkedValus));
},
onExpand
(
expandedKeys
)
{
//console.log('onExpand', expandedKeys);
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys.
this
.
expandedKeys
=
expandedKeys
;
this
.
autoExpandParent
=
false
;
},
onCheck
(
checkedKeys
/*, info*/
)
{
/*console.log(info.node.isLeaf);
console.log(info.node.eventKey);
console.log(info.checked);*/
//只保存叶子节点
this
.
checkedKeys
=
checkedKeys
;
},
onSelect
(
selectedKeys
)
{
//console.log('onSelect', info);
/*info.node.checked=true;*/
this
.
selectedKeys
=
selectedKeys
;
},
initData
()
{
let
screenHeight
=
document
.
documentElement
.
clientHeight
;
let
height
=
200
;
if
(
screenHeight
>
1200
)
{
height
=
800
;
}
else
if
(
screenHeight
>
900
)
{
height
=
400
;
}
else
if
(
screenHeight
>
700
)
{
height
=
300
;
}
this
.
dynamicHeight
=
height
;
this
.
company
=
{};
this
.
saasBusinessIds
=
[];
this
.
proprietorCheckedList
=
[];
this
.
administratorCheckedList
=
[];
this
.
proprietorAppModules
=
[];
this
.
administratorAppModules
=
[];
this
.
checkedValus
=
{};
this
.
checkedKeys
=
[];
this
.
expandedKeys
=
[];
this
.
imageList
=
[];
this
.
id
=
this
.
$route
.
query
.
id
;
let
id
=
this
.
id
?
this
.
id
:
0
;
getResource
(
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
treeData
=
resp
.
data
.
treeData
;
this
.
addAllExpandedKeys
(
this
.
treeData
);
this
.
proprietorAppModules
=
resp
.
data
.
proprietorAppModules
;
this
.
administratorAppModules
=
resp
.
data
.
administratorAppModules
;
if
(
null
!=
resp
.
data
.
saasBusinessIds
&&
resp
.
data
.
saasBusinessIds
.
length
>
0
)
{
this
.
checkedKeys
=
resp
.
data
.
saasBusinessIds
;
}
if
(
null
!=
resp
.
data
.
saasProprietorAppModuleIds
&&
resp
.
data
.
saasProprietorAppModuleIds
.
length
>
0
)
{
this
.
proprietorCheckedList
=
resp
.
data
.
saasProprietorAppModuleIds
;
}
if
(
null
!=
resp
.
data
.
saasAdministratorAppModuleIds
&&
resp
.
data
.
saasAdministratorAppModuleIds
.
length
>
0
)
{
this
.
administratorCheckedList
=
resp
.
data
.
saasAdministratorAppModuleIds
;
}
let
noSaveFixModule
=
[];
this
.
proprietorAppModules
.
forEach
(
i
=>
{
if
(
i
.
fixed
)
{
if
(
this
.
proprietorCheckedList
.
indexOf
(
i
.
id
)
==
-
1
)
{
noSaveFixModule
.
push
(
i
.
name
);
this
.
proprietorCheckedList
.
push
(
i
.
id
);
}
}
})
this
.
administratorAppModules
.
forEach
(
i
=>
{
if
(
i
.
fixed
)
{
if
(
this
.
administratorCheckedList
.
indexOf
(
i
.
id
)
==
-
1
)
{
noSaveFixModule
.
push
(
i
.
name
);
this
.
administratorCheckedList
.
push
(
i
.
id
);
}
}
})
/*if (noSaveFixModule.length > 0) {
this.$info({
title: '信息提示',
content: '有未保存的固定模块:['+noSaveFixModule+'],请点击保存',
okText: '确定'
});
}*/
}
})
if
(
this
.
id
&&
this
.
id
>
0
)
{
getDetail
(
this
.
id
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
if
(
resp
.
data
)
{
this
.
company
=
resp
.
data
;
if
(
this
.
company
.
icon
)
{
let
image
=
{
uid
:
'-1'
,
name
:
'xxx.png'
,
status
:
'done'
,
url
:
this
.
company
.
icon
,
}
this
.
imageList
.
push
(
image
)
}
}
}
})
}
},
handleSubmit
(
e
)
{
e
.
preventDefault
();
this
.
form
.
validateFieldsAndScroll
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
this
.
saasBusinessIds
.
length
==
0
)
{
this
.
$info
({
title
:
'信息提示'
,
content
:
'请勾选公司业务'
,
okText
:
'确定'
});
return
;
}
values
.
company
.
icon
=
getOneImageURL
(
this
.
imageList
);
if
(
this
.
company
.
id
&&
this
.
company
.
id
>
0
)
{
let
modifyData
=
{
saasCompany
:
this
.
$valueCopy
(
this
.
company
,
values
.
company
),
saasBusinessIds
:
this
.
saasBusinessIds
,
saasAppModuleIds
:
this
.
proprietorCheckedList
.
concat
(
this
.
administratorCheckedList
)
};
modify
(
modifyData
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"保存成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
else
{
let
initData
=
{
saasCompany
:
values
.
company
,
saasBusinessIds
:
this
.
saasBusinessIds
,
saasAppModuleIds
:
this
.
proprietorCheckedList
.
concat
(
this
.
administratorCheckedList
)
};
init
(
initData
).
then
(
resp
=>
{
if
(
resp
&&
resp
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
$notification
.
success
({
message
:
'系统提示'
,
description
:
"添加成功"
,
duration
:
4
,});
this
.
$router
.
push
({
name
:
listPathName
,
query
:
{
isModify
:
this
.
id
!=
0
}})
}
})
}
}
})
},
normFile
(
e
)
{
if
(
Array
.
isArray
(
e
))
{
return
e
}
return
e
&&
e
.
fileList
},
handleChangeImg
({
fileList
})
{
this
.
isUpdateSuccess
(
fileList
);
this
.
loading
=
this
.
isLoading
(
fileList
);
this
.
imageList
=
fileList
},
handleCancel
()
{
this
.
previewVisible
=
false
;
},
handlePreview
(
file
)
{
this
.
previewImage
=
file
.
url
||
file
.
thumbUrl
;
this
.
previewVisible
=
true
;
},
back
()
{
this
.
$router
.
push
({
name
:
listPathName
})
}
}
};
</
script
>
<
style
lang=
"less"
>
.company-detail {
.cust-normal-card .ant-row {
height: auto;
}
.app-model .ant-row {
height: 28px;
}
.ant-tree-title {
color: black !important;
}
.ant-tree-child-tree > li:first-child {
padding-top: 0px;
}
.ant-tree li {
padding: 0px;
}
}
</
style
>
src/views/saas/company/CompanyList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<a-card
class=
"cust-list-cart"
>
<div>
<a-form
layout=
"horizontal"
class=
"ant-advanced-search-form"
>
<div>
<a-row>
<a-col
:span=
"6"
>
<a-form-item
label=
"公司名称"
:labelCol=
"
{span: 8}" :wrapperCol="{span: 16}">
<a-input
@
pressEnter=
"search"
style=
"width: 100%"
v-model=
"query.name"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
</div>
<div>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:pagination=
"false"
:rowKey=
"rowKey"
bordered
>
<div
slot=
"title"
slot-scope=
"data"
>
<span
class=
"cust-title"
>
<a-icon
type=
"hdd"
/>
公司管理列表
{{
data
.
none
}}
</span>
<div
class=
"cust-table-operator"
>
<a-button-group>
<a-button
type=
"primary"
@
click=
"search"
>
查询
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
@
click=
"addNew"
>
新建
</a-button>
<!--
<a-button
@
click=
"onDeleteBatch"
type=
"danger"
>
批量删除
</a-button>
-->
</a-button-group>
</div>
</div>
<div
slot=
"footer"
slot-scope=
"data"
>
{{
data
.
none
}}
<a-pagination
@
change=
"pageChange"
:current=
"query.page"
:defaultPageSize=
"defaultPageSize"
:pageSizeOptions=
"$pageSizeOptions"
@
showSizeChange=
"sizeChange"
class=
"cust-pagination"
size=
"small"
:total=
"total"
showSizeChanger
showQuickJumper
:showTotal=
"$showTotal"
/>
</div>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"editRow(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"onDelete(record)"
>
删除
</a>
</span>
<span
slot=
"tags"
slot-scope=
"text"
>
<img
v-if=
"text"
:src=
text
style=
"width: 25px;height: 25px;"
/>
</span>
</a-table>
</div>
</a-card>
</
template
>
<
script
>
import
{
deleteBatch
,
clear
,
getPage
}
from
"@/api/saas/saasCompany"
;
import
{
formatDate
,
humpToLine
,
setOrder
}
from
"@/util/util"
;
let
detailPathName
=
'companyDetail'
const
dataSource
=
[]
const
columns
=
[
{
title
:
'公司图标'
,
width
:
80
,
dataIndex
:
'icon'
,
align
:
'center'
,
scopedSlots
:
{
customRender
:
'tags'
}},
{
title
:
'公司编码'
,
width
:
80
,
dataIndex
:
'code'
},
{
title
:
'公司名称'
,
width
:
170
,
dataIndex
:
'name'
},
{
title
:
'公司法人'
,
width
:
90
,
dataIndex
:
'legalPerson'
},
{
title
:
'公司地址'
,
width
:
260
,
dataIndex
:
'address'
},
{
title
:
'成立时间'
,
width
:
100
,
dataIndex
:
'foundDate'
,
sorter
:
true
,
customRender
:
(
text
)
=>
formatDate
(
new
Date
(
text
),
'yyyy-MM-dd'
)
},
{
title
:
'座机'
,
width
:
120
,
dataIndex
:
'landline'
},
{
title
:
'排序号'
,
width
:
100
,
dataIndex
:
'showOrder'
},
{
title
:
'备注'
,
dataIndex
:
'remark'
},
{
title
:
'操作'
,
key
:
'operation'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'action'
}}
]
export
default
{
name
:
'CompanyList'
,
data
()
{
return
{
isFirstLoad
:
true
,
query
:
{
code
:
""
,
name
:
""
,
type
:
""
,
ctDateBegin
:
""
,
ctDateEnd
:
""
,
order
:
""
,
sort
:
""
,
page
:
1
,
size
:
10
,
},
ctDatePicker
:
[],
total
:
0
,
rowKey
:
"id"
,
columns
:
columns
,
dataSource
:
dataSource
,
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
computed
:
{
defaultPageSize
:
function
()
{
return
this
.
$defaultPageSize
()
}
},
methods
:
{
search
()
{
this
.
query
.
page
=
1
this
.
loadData
();
},
reset
()
{
this
.
query
.
page
=
1
this
.
query
.
name
=
""
;
this
.
loadData
();
},
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
this
.
loadData
();
},
sizeChange
(
current
,
size
)
{
this
.
query
.
size
=
size
;
this
.
loadData
();
},
loadData
(
pageSize
)
{
if
(
pageSize
&&
!
isNaN
(
pageSize
))
{
this
.
query
.
size
=
pageSize
}
getPage
(
this
.
query
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
let
respData
=
response
.
data
;
this
.
total
=
respData
.
total
;
this
.
dataSource
=
respData
.
list
;
}
});
},
sortChange
(
pagination
,
filters
,
sorter
)
{
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
},
addNew
()
{
this
.
editRow
()
},
editRow
(
row
)
{
this
.
$router
.
push
({
name
:
detailPathName
,
query
:
{
id
:
row
?
row
.
id
:
0
}})
},
deleteRow
(
id
)
{
clear
(
id
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDelete
(
row
)
{
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录吗?'
,
onOk
()
{
_this
.
deleteRow
(
row
.
id
);
},
onCancel
()
{
},
});
},
deleteBatch
()
{
deleteBatch
(
this
.
selectedRowKeys
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
loadData
();
}
});
},
onDeleteBatch
()
{
if
(
this
.
selectedRowKeys
.
length
==
0
)
{
return
;
}
let
_this
=
this
;
this
.
$confirm
({
title
:
'提示'
,
content
:
'确定删除选中的记录吗?'
,
onOk
()
{
_this
.
deleteBatch
()
},
onCancel
()
{
},
});
},
updateSelect
(
selectedRowKeys
)
{
this
.
selectedRowKeys
=
selectedRowKeys
}
},
mounted
()
{
},
activated
()
{
if
(
this
.
isFirstLoad
==
true
)
{
this
.
loadData
(
this
.
defaultPageSize
)
this
.
isFirstLoad
=
false
}
else
{
let
isModify
=
this
.
$route
.
query
.
isModify
if
(
isModify
==
true
)
{
this
.
loadData
()
}
else
if
(
isModify
!=
undefined
)
{
this
.
loadData
()
}
}
}
}
</
script
>
src/views/saas/company/CompanyRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view
/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"CompanyRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/saas/companyBusiness/CompanyBusinessList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div>
<sys-business-list-com
:pageType=
"type"
></sys-business-list-com>
</div>
</
template
>
<
script
>
import
SysBusinessListCom
from
'@/components/business/SysBusinessListCom'
export
default
{
name
:
"CompanyBusinessList"
,
components
:
{
SysBusinessListCom
},
data
()
{
return
{
type
:
"company"
}
},
methods
:
{},
mounted
()
{
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/saas/companyBusiness/CompanyBusinessOperateDetail.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div>
<sys-business-operate-detail-com
:pageData=
"this.pageData"
></sys-business-operate-detail-com>
</div>
</
template
>
<
script
>
import
SysBusinessOperateDetailCom
from
'@/components/business/SysBusinessOperateDetailCom'
export
default
{
name
:
"CompanyBusinessOperateDetail"
,
components
:
{
SysBusinessOperateDetailCom
},
data
()
{
return
{}
},
computed
:
{
pageData
:
function
()
{
let
obj
=
{};
obj
.
id
=
this
.
$route
.
query
.
id
||
0
;
obj
.
businessName
=
this
.
$route
.
query
.
name
;
obj
.
pageType
=
this
.
$route
.
query
.
pageType
;
return
obj
;
}
},
methods
:
{
},
mounted
()
{
},
activated
()
{
},
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/saas/companyBusiness/CompanyBusinessRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view
/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"CompanyBusinessRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
src/views/saas/paramTemplate/ParamTemplateList.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<div>
<sys-param-component
:type=
'type'
:listName=
'listName'
></sys-param-component>
</div>
</
template
>
<
script
>
import
SysParamComponent
from
'@views/base/sysParam/SysParamComponent'
export
default
{
name
:
'paramTemplateList'
,
components
:
{
SysParamComponent
},
data
()
{
return
{
type
:
'saas'
,
listName
:
'系统参数列表'
,
}
},
methods
:
{
},
}
</
script
>
src/views/saas/paramTemplate/ParamTemplateRouteView.vue
deleted
100644 → 0
View file @
cc978938
<
template
>
<keep-alive
v-if=
"keepAlive"
>
<router-view
/>
</keep-alive>
<router-view
v-else
/>
</
template
>
<
script
>
export
default
{
name
:
"ParamTemplateRouteView"
,
computed
:
{
keepAlive
()
{
return
this
.
$route
.
meta
.
keepAlive
}
},
}
</
script
>
\ No newline at end of file
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