feat: 健康管理平台,H5代码提交。
This commit is contained in:
44
src/api/health/doctorRecord.js
Normal file
44
src/api/health/doctorRecord.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询就医记录列表
|
||||
export function listDoctorRecord(query) {
|
||||
return request({
|
||||
url: '/health/doctorRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询就医记录详细
|
||||
export function getDoctorRecord(id) {
|
||||
return request({
|
||||
url: '/health/doctorRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增就医记录
|
||||
export function addDoctorRecord(data) {
|
||||
return request({
|
||||
url: '/health/doctorRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改就医记录
|
||||
export function updateDoctorRecord(data) {
|
||||
return request({
|
||||
url: '/health/doctorRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除就医记录
|
||||
export function delDoctorRecord(id) {
|
||||
return request({
|
||||
url: '/health/doctorRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/health/healthRecord.js
Normal file
44
src/api/health/healthRecord.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询健康档案列表
|
||||
export function listHealthRecord(query) {
|
||||
return request({
|
||||
url: '/health/healthRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询健康档案详细
|
||||
export function getHealthRecord(id) {
|
||||
return request({
|
||||
url: '/health/healthRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增健康档案
|
||||
export function addHealthRecord(data) {
|
||||
return request({
|
||||
url: '/health/healthRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改健康档案
|
||||
export function updateHealthRecord(data) {
|
||||
return request({
|
||||
url: '/health/healthRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除健康档案
|
||||
export function delHealthRecord(id) {
|
||||
return request({
|
||||
url: '/health/healthRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/health/marRecord.js
Normal file
44
src/api/health/marRecord.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询用药记录列表
|
||||
export function listMarRecord(query) {
|
||||
return request({
|
||||
url: '/health/marRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用药记录详细
|
||||
export function getMarRecord(id) {
|
||||
return request({
|
||||
url: '/health/marRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用药记录
|
||||
export function addMarRecord(data) {
|
||||
return request({
|
||||
url: '/health/marRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用药记录
|
||||
export function updateMarRecord(data) {
|
||||
return request({
|
||||
url: '/health/marRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用药记录
|
||||
export function delMarRecord(id) {
|
||||
return request({
|
||||
url: '/health/marRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/health/person.js
Normal file
44
src/api/health/person.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询成员管理列表
|
||||
export function listPerson(query) {
|
||||
return request({
|
||||
url: '/health/person/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询成员管理详细
|
||||
export function getPerson(id) {
|
||||
return request({
|
||||
url: '/health/person/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增成员管理
|
||||
export function addPerson(data) {
|
||||
return request({
|
||||
url: '/health/person',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改成员管理
|
||||
export function updatePerson(data) {
|
||||
return request({
|
||||
url: '/health/person',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除成员管理
|
||||
export function delPerson(id) {
|
||||
return request({
|
||||
url: '/health/person/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/health/temperatureRecord.js
Normal file
44
src/api/health/temperatureRecord.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询体温记录列表
|
||||
export function listTemperatureRecord(query) {
|
||||
return request({
|
||||
url: '/health/temperatureRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询体温记录详细
|
||||
export function getTemperatureRecord(id) {
|
||||
return request({
|
||||
url: '/health/temperatureRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增体温记录
|
||||
export function addTemperatureRecord(data) {
|
||||
return request({
|
||||
url: '/health/temperatureRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改体温记录
|
||||
export function updateTemperatureRecord(data) {
|
||||
return request({
|
||||
url: '/health/temperatureRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除体温记录
|
||||
export function delTemperatureRecord(id) {
|
||||
return request({
|
||||
url: '/health/temperatureRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/health/weightRecord.js
Normal file
44
src/api/health/weightRecord.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询体重记录列表
|
||||
export function listWeightRecord(query) {
|
||||
return request({
|
||||
url: '/health/weightRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询体重记录详细
|
||||
export function getWeightRecord(id) {
|
||||
return request({
|
||||
url: '/health/weightRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增体重记录
|
||||
export function addWeightRecord(data) {
|
||||
return request({
|
||||
url: '/health/weightRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改体重记录
|
||||
export function updateWeightRecord(data) {
|
||||
return request({
|
||||
url: '/health/weightRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除体重记录
|
||||
export function delWeightRecord(id) {
|
||||
return request({
|
||||
url: '/health/weightRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
568
src/pages.json
568
src/pages.json
@@ -18,13 +18,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/calendar/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/calendar/list",
|
||||
"path": "pages/health/homepage/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
@@ -35,9 +29,8 @@
|
||||
"navigationBarTitleText": "工作台"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/statistic/index",
|
||||
"path": "pages/health/statistic/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "统计分析"
|
||||
}
|
||||
@@ -49,558 +42,105 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/common/webview/index",
|
||||
"path": "pages/health/doctorRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览网页"
|
||||
"navigationBarTitleText": "就医记录"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/common/textview/index",
|
||||
"path": "pages/health/doctorRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览文本"
|
||||
"navigationBarTitleText": "就医记录详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/statistic/accounts/accountsBalance/index",
|
||||
"path": "pages/health/doctorRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "记账账户统计"
|
||||
}
|
||||
},{
|
||||
"path": "pages/statistic/bill/creditRecordAnalysis/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "征信查询统计"
|
||||
"navigationBarTitleText": "就医记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/accounts/posAnalysis/index",
|
||||
"path": "pages/health/healthRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机刷卡统计"
|
||||
"navigationBarTitleText": "健康档案"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/statistic/accounts/debitDealAnalysis/index",
|
||||
"path": "pages/health/healthRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户统计"
|
||||
"navigationBarTitleText": "健康档案详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/health/healthRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康档案"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/accounts/creditCardDealAnalysis/index",
|
||||
"path": "pages/health/marRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡收支统计"
|
||||
"navigationBarTitleText": "用药记录"
|
||||
}
|
||||
},{
|
||||
"path": "pages/statistic/accounts/dailyExpensesAnalysis/index",
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/health/marRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "日常支出统计"
|
||||
"navigationBarTitleText": "用药记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/bill/onlineLendAnalysis/index",
|
||||
"path": "pages/health/temperatureRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "贷款待还统计"
|
||||
"navigationBarTitleText": "体温记录"
|
||||
}
|
||||
},{
|
||||
"path": "pages/statistic/bill/onlineLendSettledAnalysis/index",
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/health/temperatureRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "贷款已还统计"
|
||||
"navigationBarTitleText": "体温记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/bill/futuresAnalysis/index",
|
||||
"path": "pages/health/person/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货统计分析"
|
||||
"navigationBarTitleText": "成员管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/statistic/bill/stocksAnalysis/index",
|
||||
"path": "pages/health/person/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票统计分析"
|
||||
"navigationBarTitleText": "成员管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/health/person/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "成员管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/bill/investAnalysis/index",
|
||||
"path": "pages/health/weightRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收益统计分析"
|
||||
"navigationBarTitleText": "体重记录"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/statistic/bill/creditInstallmentSettledAnalysis/index",
|
||||
"path": "pages/health/weightRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡分期已还"
|
||||
}
|
||||
},{
|
||||
"path": "pages/statistic/bill/creditBillAnalysis/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡账单统计"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/bill/creditInstallmentAnalysis/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡分期待还统计"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistic/accounts/investDealAnalysis/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资收益统计"
|
||||
"navigationBarTitleText": "体重记录详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/statistic/accounts/accountDealAnalysis/index",
|
||||
"path": "pages/health/weightRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账户收支统计"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/accountDealRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账户交易记录"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/accountDealRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账户交易记录详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/accountDealRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账户交易记录"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/posTransferRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机刷卡记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/posTransferRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机刷卡记账详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/posTransferRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机刷卡记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/creditTransferRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡还款"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/creditTransferRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡还款详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/creditTransferRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡还款"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/accounts/debitTransferRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/debitTransferRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户记账详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/debitTransferRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/lendTransferRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "借贷账户记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/lendTransferRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "借贷账户记账详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/lendTransferRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "借贷账户记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/accounts/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "记账账户"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/accounts/commonList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "记账账户"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/accounts/accounts/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "记账账户详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/heartJourney/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "心路历程"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/heartJourney/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "心路历程详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/heartJourney/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "心路历程"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/debitCard/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/debitCard/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/debitCard/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储蓄账户管理"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/lend/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "借贷账户管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/lend/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "借贷账户管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/lend/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "借贷账户管理"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/creditCard/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/creditCard/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/creditCard/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/base/posmachine/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/posmachine/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/posmachine/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "POS机管理"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/futures/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货账户管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/futures/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货账户管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/futures/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货账户管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/stocks/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票账户管理"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/base/stocks/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票账户管理详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/base/stocks/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票账户管理"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/creditQueryRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "征信记录查询"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/bill/creditQueryRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "征信记录查询详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/creditQueryRecord/analysis",
|
||||
"style": {
|
||||
"navigationBarTitleText": "征信记录查询统计"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/creditQueryRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "征信记录查询"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/creditCardBill/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡账单"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/bill/creditCardBill/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡账单明细"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/creditCardBill/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡账单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/futuresBill/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货账单"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/bill/futuresBill/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货账单明细"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/futuresBill/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "期货账单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/stocksBill/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票账单"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/bill/stocksBill/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票账单明细"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/stocksBill/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "股票账单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/onlineLendHistory/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "贷款账单"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/bill/onlineLendHistory/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "贷款账单还款明细"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/onlineLendHistory/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "贷款账单"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/peopleLendHistory/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人情账单"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/peopleLendHistory/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人情账单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/onlineLendHistory/detailsAddEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "贷款账单还款明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/creditInstallmentHistory/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡分期账单"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/bill/creditInstallmentHistory/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡分期账单还款明细"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/bill/creditInstallmentHistory/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡分期账单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/bill/creditInstallmentHistory/detailsAddEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信用卡分期账单还款明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/work/accounts/investTransferRecord/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资账户记账"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/investTransferRecord/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "信投资账户记账详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/investTransferRecord/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资账户记账"
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"path": "pages/work/accounts/investAccountDeal/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资交易记录"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/investAccountDeal/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资交易记录详情"
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
"path": "pages/work/accounts/investAccountDeal/addEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资交易记录"
|
||||
"navigationBarTitleText": "体重记录"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -661,7 +201,7 @@
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/calendar/index",
|
||||
"pagePath": "pages/health/homepage/index",
|
||||
"iconPath": "static/images/tabbar/home.png",
|
||||
"selectedIconPath": "static/images/tabbar/home_.png",
|
||||
"text": "首页"
|
||||
@@ -672,6 +212,12 @@
|
||||
"selectedIconPath": "static/images/tabbar/work_.png",
|
||||
"text": "工作台"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/health/statistic/index",
|
||||
"iconPath": "static/images/tabbar/statistic.png",
|
||||
"selectedIconPath": "static/images/tabbar/statistic_.png",
|
||||
"text": "统计分析"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine",
|
||||
"iconPath": "static/images/tabbar/mine.png",
|
||||
|
||||
@@ -1,559 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="calendarTitle" border="false" readonly class="search-input"
|
||||
suffixIcon="calendar" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-icon name="arrow-left" color="#666666" size="25" label="上个月"
|
||||
labelPos="right" labelSize="25rpx" labelColor="#666666" @click="getPrev()"></u-icon>
|
||||
<u-icon name="arrow-right" color="#666666" size="25" style="margin-left:15px" label="下个月"
|
||||
labelPos="left" labelSize="25rpx" labelColor="#666666" @click="getNext()"></u-icon>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<!-- 月视图和周视图显示,列视图显示表格形式 -->
|
||||
<div v-show="type !== '3'" ref="fullcalendar" class="card" />
|
||||
<u-list height="auto">
|
||||
<u-list-item v-for="(item, index) in currentInfoList" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header" @click="enterDetails(item)">
|
||||
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.start+' '+item.title" size="25rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, ref, onMounted, getCurrentInstance } from 'vue'
|
||||
import { Calendar } from '@fullcalendar/core'
|
||||
import dayGridPlugin from '@fullcalendar/daygrid'
|
||||
import timeGridPlugin from '@fullcalendar/timegrid'
|
||||
import listPlugin from '@fullcalendar/list'
|
||||
import interactionPlugin from '@fullcalendar/interaction'
|
||||
import dayjs from 'dayjs'
|
||||
import { getAccountCalendarInfo } from '@/api/invest/accountAnalysis.js'
|
||||
export default {
|
||||
name: 'PlanManagement',
|
||||
components: {},
|
||||
setup() {
|
||||
const { proxy } = getCurrentInstance()
|
||||
const state = reactive({
|
||||
calendarTitle: new Date().getFullYear() + '年' + Number(new Date().getMonth() + 1) + '月', // 日历头部显示文字
|
||||
dialogVisiable: false,
|
||||
loading: false,
|
||||
type: '1',
|
||||
dialogType: '',
|
||||
detailInfo: {},
|
||||
Tcalendar: null,
|
||||
drawerVisiable: false,
|
||||
drawerType: '',
|
||||
fullcalendar: ref(),
|
||||
nowDate: new Date(),
|
||||
infoList: [], // 日历显示的列信息
|
||||
currentInfoList: [] // 当前
|
||||
})
|
||||
onMounted(() => {
|
||||
initCalendar()
|
||||
getCalendarList()
|
||||
})
|
||||
const initCalendar = () => {
|
||||
state.Tcalendar = new Calendar(state.fullcalendar, {
|
||||
plugins: [dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin],
|
||||
initialView: 'dayGridMonth',
|
||||
aspectRatio: 1,
|
||||
locale: 'zh-cn',
|
||||
handleWindowResize: true,
|
||||
editable: false, // 允许编辑表格
|
||||
droppable: false,
|
||||
eventDisplay: 'block',
|
||||
// height: 'auto',
|
||||
// 限制事件最大数量
|
||||
dayMaxEvents: 0,
|
||||
eventLimit: false,
|
||||
// 事件数量超出时更多显示链接汉化
|
||||
moreLinkContent: morLinkFunction,
|
||||
// 显示事件开始时间
|
||||
displayEventTime: false,
|
||||
// 显示事件结束时间
|
||||
displayEventEnd: false,
|
||||
// 关闭全天区域显示
|
||||
allDaySlot: true,
|
||||
longPressDelay: 0,
|
||||
selectLongPressDelay: 0,
|
||||
// 开始时间段
|
||||
slotMinTime: '00:00:00',
|
||||
|
||||
// 结束时间段
|
||||
slotMaxTime: '00:00:00',
|
||||
eventOrder: 'type,color,start',
|
||||
eventDurationEditable: false,
|
||||
eventResizableFromStart: false,
|
||||
selectable: true, // 允许用户通过单击和拖动来突出显示多个日期或时间段
|
||||
firstDay: 1, // 设置一周中显示的第一天是哪天,周日是0,周一是1,类推。
|
||||
unselectAuto: true, // 当点击页面日历以外的位置时,是否自动取消当前的选中状态
|
||||
unselectCancel: '.el-drawer',
|
||||
// dayMaxEvents: true,
|
||||
// eventLimit: true,
|
||||
headerToolbar: false,
|
||||
buttonText: {
|
||||
today: '回到今天',
|
||||
month: '月',
|
||||
week: '周',
|
||||
list: '列',
|
||||
day: '日'
|
||||
},
|
||||
allDayText: '全天',
|
||||
events: state.infoList,
|
||||
eventClassNames: function (arg) {
|
||||
// 添加自定义class
|
||||
return [arg.event.extendedProps.class]
|
||||
},
|
||||
eventContent: function (arg) {
|
||||
const italicEl = document.createElement('div')
|
||||
if (arg.event.extendedProps.startDateMinute && state.type === '1') {
|
||||
const childEl = document.createElement('span')
|
||||
childEl.innerHTML = arg.event.extendedProps.startDateMinute
|
||||
italicEl.append(childEl)
|
||||
}
|
||||
italicEl.append(arg.event.title)
|
||||
italicEl.setAttribute('class', `plan_title ${arg.event.extendedProps.class}`)
|
||||
return { domNodes: [italicEl] }
|
||||
},
|
||||
eventClick: function (info) {
|
||||
// 点击查看时触发
|
||||
handleClick(info)
|
||||
},
|
||||
select: function (info) {
|
||||
// 视图选择日期触发
|
||||
handleSelectDate(info)
|
||||
}
|
||||
// select: function (info) {}
|
||||
})
|
||||
state.Tcalendar.render()
|
||||
}
|
||||
// 上一月、周、日
|
||||
const getPrev = () => {
|
||||
state.Tcalendar.prev()
|
||||
state.calendarTitle = state.Tcalendar.view.title
|
||||
getCalendarList()
|
||||
}
|
||||
// 下一月、周、日
|
||||
const getNext = () => {
|
||||
state.Tcalendar.next()
|
||||
state.calendarTitle = state.Tcalendar.view.title
|
||||
getCalendarList()
|
||||
}
|
||||
// 回到今天
|
||||
const morLinkFunction = (jsEvent) => {
|
||||
return jsEvent.shortText;
|
||||
}
|
||||
const getCalendarList = () => {
|
||||
const currentEnd = dayjs(state.Tcalendar.view.currentEnd).add(-1, 'day')
|
||||
const params = {
|
||||
startTime: dayjs(state.Tcalendar.view.currentStart).format('YYYY-MM-DD'),
|
||||
endTime: dayjs(currentEnd).format('YYYY-MM-DD'),
|
||||
type: state.type
|
||||
}
|
||||
state.loading = true
|
||||
state.Tcalendar.getEventSources().forEach((item) => {
|
||||
item.remove()
|
||||
})
|
||||
|
||||
getAccountCalendarInfo(params).then((res) => {
|
||||
state.loading = false
|
||||
if (res) {
|
||||
state.infoList = res.data
|
||||
const today= dayjs(new Date()).format('YYYY-MM-DD')
|
||||
state.infoList.forEach(item => {
|
||||
if(today===item.start){
|
||||
state.currentInfoList.push(item)
|
||||
}
|
||||
})
|
||||
state.Tcalendar.addEventSource(state.infoList)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const enterDetails = (info) => {
|
||||
const date = info.start
|
||||
const type = info.type
|
||||
const accountId = info.accountId
|
||||
const billDatePeriod = info.billDatePeriod
|
||||
//信用卡账单日
|
||||
if (type === 1) {
|
||||
const _id = accountId
|
||||
uni.navigateTo({ url: `/pages/calendar/list?accountId=${_id}&billDatePeriod=${billDatePeriod}` })
|
||||
}
|
||||
//贷款已还
|
||||
if (type === 4) {
|
||||
const _id = accountId
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?accountId=${_id}&billDatePeriod=${billDatePeriod}&dealType=1&dealCategory=9` })
|
||||
}
|
||||
//日常支出
|
||||
if (type === 5) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealType=2&dealCategory=1` })
|
||||
}
|
||||
|
||||
//投资收益
|
||||
if (type === 6) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealCategory=2` })
|
||||
}
|
||||
//POS机刷卡
|
||||
if (type === 7) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealType=2&dealCategory=5` })
|
||||
}
|
||||
|
||||
//工资收入
|
||||
if (type === 8) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealCategory=11` })
|
||||
|
||||
}
|
||||
}
|
||||
// 点击计划查看
|
||||
const handleClick = (info) => {
|
||||
const date = info.event.startStr
|
||||
const type = info.event._def.extendedProps.type
|
||||
const accountId = info.event._def.extendedProps.accountId
|
||||
const billDatePeriod = info.event._def.extendedProps.billDatePeriod
|
||||
//信用卡账单日
|
||||
if (type === 1) {
|
||||
const _id = accountId
|
||||
uni.navigateTo({ url: `/pages/calendar/list?accountId=${_id}&billDatePeriod=${billDatePeriod}` })
|
||||
}
|
||||
//贷款已还
|
||||
if (type === 4) {
|
||||
const _id = accountId
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?accountId=${_id}&billDatePeriod=${billDatePeriod}&dealType=1&dealCategory=9` })
|
||||
}
|
||||
//日常支出
|
||||
if (type === 5) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealType=2&dealCategory=1` })
|
||||
}
|
||||
|
||||
//投资收益
|
||||
if (type === 6) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealCategory=2` })
|
||||
}
|
||||
//POS机刷卡
|
||||
if (type === 7) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealType=2&dealCategory=5` })
|
||||
}
|
||||
|
||||
//工资收入
|
||||
if (type === 8) {
|
||||
const billDatePeriod = date+'~'+date
|
||||
uni.navigateTo({ url: `/pages/calendar/list?billDatePeriod=${billDatePeriod}&dealCategory=11` })
|
||||
|
||||
}
|
||||
}
|
||||
// 拖拽触发
|
||||
const handleSelectDate = (info) => {
|
||||
const selectDate= info.startStr
|
||||
state.currentInfoList=[]
|
||||
state.infoList.forEach(item => {
|
||||
if(selectDate==item.start){
|
||||
state.currentInfoList.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
getPrev,
|
||||
handleSelectDate,
|
||||
enterDetails,
|
||||
handleClick,
|
||||
getNext,
|
||||
morLinkFunction,
|
||||
getCalendarList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
.title {
|
||||
margin-left: 5px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 5px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 5rpx;
|
||||
padding: 5rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 5rpx;
|
||||
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 0rpx;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.calendarHeader {
|
||||
margin: 0px 0px 0px 0px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
.header_select {
|
||||
margin: 0 0 0 10px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
line-height: 32px;
|
||||
margin: 0 0 0 0;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
184
src/pages/health/doctorRecord/addEdit.vue
Normal file
184
src/pages/health/doctorRecord/addEdit.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title}}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="标题" prop="name" required >
|
||||
<u--input v-model="form.name" placeholder="请填写标题"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="类型" prop="typeName" required @click="handleShowTeam">
|
||||
<u--input v-model="form.typeName" disabled disabledColor="#ffffff" placeholder="请选择类型"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="记录时间" prop="createTime" required @click="selectDate()">
|
||||
<u--input v-model="form.createTime" disabled disabledColor="#ffffff" placeholder="请选择记录时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="内容" prop="remark" required labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请填写内容" border="none" autoHeight inputAlign="right" count
|
||||
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showTeam" :columns="journeyTypeList" keyName="dictLabel" @cancel="handleCancel"
|
||||
@confirm="handleConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="datetime"
|
||||
ref="createTimeRef"
|
||||
@cancel="datePickShow=false"
|
||||
@confirm="datePickConfirm"
|
||||
itemHeight="88"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getHeartJourney, addHeartJourney, updateHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
import dayjs from 'dayjs'
|
||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showTeam = ref(false)
|
||||
const title = ref("心路历程")
|
||||
const journeyTypeList = ref([])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }],
|
||||
typeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||
remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }],
|
||||
}
|
||||
})
|
||||
const { form, rules} = toRefs(data)
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="心路历程-修改"
|
||||
}else{
|
||||
title.value="心路历程-新增"
|
||||
}
|
||||
getDict()
|
||||
})
|
||||
onReady(() => {
|
||||
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getHeartJourney(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function handleShowTeam() {
|
||||
if (journeyTypeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '类型为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showTeam.value = true
|
||||
}
|
||||
}
|
||||
function handleConfirm(e) {
|
||||
form.value.typeName = e.value[0].dictLabel
|
||||
form.value.type = e.value[0].dictValue
|
||||
showTeam.value = false
|
||||
}
|
||||
function handleCancel() {
|
||||
showTeam.value = false
|
||||
}
|
||||
function selectDate() {
|
||||
datePickShow.value = true
|
||||
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
|
||||
}
|
||||
function datePickConfirm(e) {
|
||||
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||
datePickShow.value = false
|
||||
}
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
addHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 360rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
92
src/pages/health/doctorRecord/details.vue
Normal file
92
src/pages/health/doctorRecord/details.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<u-cell-group>
|
||||
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
|
||||
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getHeartJourney} from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const id = ref('')
|
||||
const data = reactive({
|
||||
detailInfo: {}
|
||||
})
|
||||
const {detailInfo} = toRefs(data)
|
||||
onLoad((option) => {
|
||||
id.value = option.id
|
||||
getInfo()
|
||||
})
|
||||
function getInfo() {
|
||||
getHeartJourney(id.value).then(res => {
|
||||
detailInfo.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 280rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 647rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.img-con {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx
|
||||
}
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,34 +2,26 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.time" border="false" disabled placeholder="请输入时间" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="calendar" suffixIconStyle="color: #909399">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入标题" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
<view class="filter-title">交易类别</view>
|
||||
<view class="filter-title">类型</view>
|
||||
<view class="state-list">
|
||||
<view v-for="item in dealCategoryList" :key="item.id" class="state-item"
|
||||
:class="item.selected ? 'active' : ''" @click="selectDealCategory(item)">{{ item.dictLabel }}</view>
|
||||
<view v-for="item in journeyTypeList" :key="item.id" class="state-item"
|
||||
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="datetime"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
@@ -39,40 +31,25 @@
|
||||
<view class="list-item">
|
||||
<view class="item-header" @click="enterDetails(item)">
|
||||
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.accountName+'交易金额:'+item.amount" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
:text="item.name" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">记账类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, accountTypeList) }}</text>
|
||||
<text class="row-label">类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, journeyTypeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">交易时间:</text>
|
||||
<text class="row-label">记录时间:</text>
|
||||
<text class="row-value">{{ item.createTime }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">交易金额:</text>
|
||||
<text class="row-value">{{ item.amount }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">当前余额:</text>
|
||||
<text class="row-value">{{ item.currentBalance }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">交易类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.dealType, dealTypeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">交易类别:</text>
|
||||
<text class="row-value">{{ dictStr(item.dealCategory, dealCategoryList) }}</text>
|
||||
</view>
|
||||
<view class="item-row" v-show="item.childCategory!=item.dealCategory">
|
||||
<text class="row-label">交易子类别:</text>
|
||||
<text class="row-value">{{ item.childCategoryName }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">备注:</text>
|
||||
<text class="row-label">内容:</text>
|
||||
<text class="row-value">{{ item.remark }}</text>
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
@@ -85,11 +62,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
listAccountDealRecord,
|
||||
} from '@/api/invest/accountDealRecord'
|
||||
import { listHeartJourney, delHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
@@ -97,36 +71,21 @@ const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const accountTypeList = ref([])
|
||||
const dealTypeList = ref([])
|
||||
const dealCategoryList = ref([])
|
||||
const journeyTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const timeShow= ref(false)
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: null,
|
||||
time: '',
|
||||
accountId: null,
|
||||
dealType: null,
|
||||
dealCategory: null
|
||||
name: '',
|
||||
type: '',
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad((option) => {
|
||||
queryParams.value.accountId = option.accountId
|
||||
queryParams.value.time = option.billDatePeriod
|
||||
queryParams.value.dealType = option.dealType
|
||||
queryParams.value.dealCategory = option.dealCategory
|
||||
queryParams.value.startTime = option.billDatePeriod.split('~')[0]
|
||||
queryParams.value.endTime = option.billDatePeriod.split('~')[1]
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
@@ -138,10 +97,7 @@ onLoad((option) => {
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
@@ -150,7 +106,7 @@ function loadmore() {
|
||||
}
|
||||
function getList() {
|
||||
status.value = 'loading'
|
||||
listAccountDealRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listHeartJourney({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
@@ -161,27 +117,10 @@ function getList() {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = date
|
||||
} else {
|
||||
queryParams.value.endTime = date
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function getDict() {
|
||||
// 记账类型类型
|
||||
getDicts('account_type').then(res => {
|
||||
accountTypeList.value = res.data
|
||||
})
|
||||
// 交易类型
|
||||
getDicts('deal_type').then(res => {
|
||||
dealTypeList.value = res.data
|
||||
})
|
||||
// 交易类别
|
||||
getDicts('deal_category').then(res => {
|
||||
dealCategoryList.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value = res.data
|
||||
})
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
@@ -201,20 +140,9 @@ function dictStr(val, arr) {
|
||||
})
|
||||
return str
|
||||
}
|
||||
function selectDealType(item) {
|
||||
queryParams.value.dealType = item.dictValue
|
||||
dealTypeList.value.map(ele => {
|
||||
if (ele.dictValue == item.dictValue) {
|
||||
ele.selected = true
|
||||
Reflect.set(ele, 'selected', true)
|
||||
} else {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
}
|
||||
})
|
||||
}
|
||||
function selectDealCategory(item) {
|
||||
queryParams.value.dealCategory = item.dictValue
|
||||
dealCategoryList.value.map(ele => {
|
||||
function selectStatus(item) {
|
||||
queryParams.value.type = item.dictValue
|
||||
journeyTypeList.value.map(ele => {
|
||||
if (ele.dictValue == item.dictValue) {
|
||||
ele.selected = true
|
||||
Reflect.set(ele, 'selected', true)
|
||||
@@ -235,24 +163,36 @@ function dictStr(val, arr) {
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = ''
|
||||
queryParams.value.name = '',
|
||||
queryParams.value.type = ''
|
||||
queryParams.value.dealType = ''
|
||||
queryParams.value.startTime = ''
|
||||
queryParams.value.endTime = ''
|
||||
queryParams.value.dealCategory = ''
|
||||
accountTypeList.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
dealTypeList.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
dealCategoryList.value.map(ele => {
|
||||
journeyTypeList.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/details?id=${item.id}` })
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/details?id=${item.id}` })
|
||||
}
|
||||
function handleEdit(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要删除吗',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
delHeartJourney(item.id)
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
184
src/pages/health/healthRecord/addEdit.vue
Normal file
184
src/pages/health/healthRecord/addEdit.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title}}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="标题" prop="name" required >
|
||||
<u--input v-model="form.name" placeholder="请填写标题"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="类型" prop="typeName" required @click="handleShowTeam">
|
||||
<u--input v-model="form.typeName" disabled disabledColor="#ffffff" placeholder="请选择类型"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="记录时间" prop="createTime" required @click="selectDate()">
|
||||
<u--input v-model="form.createTime" disabled disabledColor="#ffffff" placeholder="请选择记录时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="内容" prop="remark" required labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请填写内容" border="none" autoHeight inputAlign="right" count
|
||||
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showTeam" :columns="journeyTypeList" keyName="dictLabel" @cancel="handleCancel"
|
||||
@confirm="handleConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="datetime"
|
||||
ref="createTimeRef"
|
||||
@cancel="datePickShow=false"
|
||||
@confirm="datePickConfirm"
|
||||
itemHeight="88"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getHeartJourney, addHeartJourney, updateHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
import dayjs from 'dayjs'
|
||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showTeam = ref(false)
|
||||
const title = ref("心路历程")
|
||||
const journeyTypeList = ref([])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }],
|
||||
typeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||
remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }],
|
||||
}
|
||||
})
|
||||
const { form, rules} = toRefs(data)
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="心路历程-修改"
|
||||
}else{
|
||||
title.value="心路历程-新增"
|
||||
}
|
||||
getDict()
|
||||
})
|
||||
onReady(() => {
|
||||
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getHeartJourney(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function handleShowTeam() {
|
||||
if (journeyTypeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '类型为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showTeam.value = true
|
||||
}
|
||||
}
|
||||
function handleConfirm(e) {
|
||||
form.value.typeName = e.value[0].dictLabel
|
||||
form.value.type = e.value[0].dictValue
|
||||
showTeam.value = false
|
||||
}
|
||||
function handleCancel() {
|
||||
showTeam.value = false
|
||||
}
|
||||
function selectDate() {
|
||||
datePickShow.value = true
|
||||
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
|
||||
}
|
||||
function datePickConfirm(e) {
|
||||
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||
datePickShow.value = false
|
||||
}
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
addHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 360rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
92
src/pages/health/healthRecord/details.vue
Normal file
92
src/pages/health/healthRecord/details.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<u-cell-group>
|
||||
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
|
||||
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getHeartJourney} from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const id = ref('')
|
||||
const data = reactive({
|
||||
detailInfo: {}
|
||||
})
|
||||
const {detailInfo} = toRefs(data)
|
||||
onLoad((option) => {
|
||||
id.value = option.id
|
||||
getInfo()
|
||||
})
|
||||
function getInfo() {
|
||||
getHeartJourney(id.value).then(res => {
|
||||
detailInfo.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 280rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 647rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.img-con {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx
|
||||
}
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
372
src/pages/health/healthRecord/list.vue
Normal file
372
src/pages/health/healthRecord/list.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入标题" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
<view class="filter-title">类型</view>
|
||||
<view class="state-list">
|
||||
<view v-for="item in journeyTypeList" :key="item.id" class="state-item"
|
||||
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header" @click="enterDetails(item)">
|
||||
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.name" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, journeyTypeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">记录时间:</text>
|
||||
<text class="row-value">{{ item.createTime }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">内容:</text>
|
||||
<text class="row-value">{{ item.remark }}</text>
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listHeartJourney, delHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const journeyTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
name: '',
|
||||
type: '',
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
listData.value=[]
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function getList() {
|
||||
status.value = 'loading'
|
||||
listHeartJourney({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
} else {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
}).catch(() => {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value = res.data
|
||||
})
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
function selectStatus(item) {
|
||||
queryParams.value.type = item.dictValue
|
||||
journeyTypeList.value.map(ele => {
|
||||
if (ele.dictValue == item.dictValue) {
|
||||
ele.selected = true
|
||||
Reflect.set(ele, 'selected', true)
|
||||
} else {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
}
|
||||
})
|
||||
}
|
||||
function searchSubmit() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = '',
|
||||
queryParams.value.type = ''
|
||||
journeyTypeList.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/details?id=${item.id}` })
|
||||
}
|
||||
function handleEdit(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要删除吗',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
delHeartJourney(item.id)
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
117
src/pages/health/homepage/index.vue
Normal file
117
src/pages/health/homepage/index.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<view class="work-container">
|
||||
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="健康管理" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in healthGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
||||
|
||||
// 也可以使用下面的方式
|
||||
import { ref } from "vue";
|
||||
|
||||
const healthGridList=ref([
|
||||
{ path: '/pages/health/healthRecord/list', text: '健康档案', icon: 'wallet-filled', permission: 'health:healthRecord:list' },
|
||||
{ path: '/pages/health/temperatureRecord/list', text: '体温记录', icon: 'wallet', permission: 'health:temperatureRecord:list' },
|
||||
{ path: '/pages/health/doctorRecord/list', text: '就医记录', icon: 'upload', permission: 'health:doctorRecord:list' },
|
||||
{ path: '/pages/health/marRecord/list', text: '用药记录', icon: 'shop-filled', permission: 'health:marRecord:list' },
|
||||
{ path: '/pages/health/weightRecord/list', text: '体重记录', icon: 'calendar', permission: 'health:weightRecord:list' },
|
||||
{ path: '/pages/health/person/list', text: '成员管理', icon: 'paperplane-filled', permission: 'health:person:list' }
|
||||
])
|
||||
function navigateTo(path) {
|
||||
uni.navigateTo({
|
||||
url: path
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 500px) {
|
||||
.uni-swiper-dot-box {
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="健康管理" v-show="auth.hasPermi('invest:bankcard:list')" type="line"></uni-section>
|
||||
<uni-section title="健康管理" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in healthGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
@@ -26,12 +26,12 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
||||
import { ref } from "vue";
|
||||
|
||||
const healthGridList=ref([
|
||||
{ path: '/pages/work/base/debitCard/list', text: '健康档案', icon: 'wallet-filled', permission: 'invest:debitCard' },
|
||||
{ path: '/pages/work/base/creditCard/list', text: '体温记录', icon: 'wallet', permission: 'invest:creditCard' },
|
||||
{ path: '/pages/work/base/lend/list', text: '就医管理', icon: 'upload', permission: 'invest:onlineLend' },
|
||||
{ path: '/pages/work/base/posmachine/list', text: '用药记录', icon: 'shop-filled', permission: 'invest:posmachine:list' },
|
||||
{ path: '/pages/work/base/stocks/list', text: '体重记录', icon: 'calendar', permission: 'invest:futureStocks:list' },
|
||||
{ path: '/pages/work/base/futures/list', text: '成员管理', icon: 'paperplane-filled', permission: 'invest:futureStocks:list' }
|
||||
{ path: '/pages/health/healthRecord/list', text: '健康档案', icon: 'wallet-filled', permission: 'health:healthRecord:list' },
|
||||
{ path: '/pages/health/temperatureRecord/list', text: '体温记录', icon: 'wallet', permission: 'health:temperatureRecord:list' },
|
||||
{ path: '/pages/health/doctorRecord/list', text: '就医记录', icon: 'upload', permission: 'health:doctorRecord:list' },
|
||||
{ path: '/pages/health/marRecord/list', text: '用药记录', icon: 'shop-filled', permission: 'health:marRecord:list' },
|
||||
{ path: '/pages/health/weightRecord/list', text: '体重记录', icon: 'calendar', permission: 'health:weightRecord:list' },
|
||||
{ path: '/pages/health/person/list', text: '成员管理', icon: 'paperplane-filled', permission: 'health:person:list' }
|
||||
])
|
||||
function navigateTo(path) {
|
||||
uni.navigateTo({
|
||||
|
||||
376
src/pages/health/marRecord/addEdit.vue
Normal file
376
src/pages/health/marRecord/addEdit.vue
Normal file
@@ -0,0 +1,376 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="用药记录"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title}}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="人员姓名" prop="personName" required @click="handlePerson">
|
||||
<u--input v-model="form.personName" disabled disabledColor="#ffffff" placeholder="请选择人员"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="健康档案" prop="healthRecordName" required @click="handHealthRecord">
|
||||
<u--input v-model="form.healthRecordName" disabled disabledColor="#ffffff" placeholder="请选择健康档案"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="用药名称" prop="name" required >
|
||||
<u--input v-model="form.name" placeholder="请填写用药名称"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="用药类型" prop="marTypeName" required @click="handleMarType">
|
||||
<u--input v-model="form.marTypeName" disabled disabledColor="#ffffff" placeholder="请选择用药类型"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="药品来源" prop="resourceName" required @click="handleResource">
|
||||
<u--input v-model="form.resourceName" disabled disabledColor="#ffffff" placeholder="请选择药品来源"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="用药地点" prop="placeName" required @click="handlePlace">
|
||||
<u--input v-model="form.placeName" disabled disabledColor="#ffffff" placeholder="请选择用药地点"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="用药时间" prop="dosingTime" required @click="selectDate()">
|
||||
<u--input v-model="form.dosingTime" disabled disabledColor="#ffffff" placeholder="请选择用药时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="用药剂量" prop="dosage" required >
|
||||
<u--input v-model="form.dosage" placeholder="请填写用药剂量"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
|
||||
maxlength="2000" style="padding:18rpx 0;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
|
||||
@confirm="handlePersonConfirm"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showResource" :columns="resourceList" keyName="dictLabel" @cancel="handleResourceCancel"
|
||||
@confirm="handleResourceConfirm"></u-picker>
|
||||
|
||||
<u-picker itemHeight="88" :show="showPlace" :columns="placeList" keyName="dictLabel" @cancel="handlePlaceCancel"
|
||||
@confirm="handlePlaceConfirm"></u-picker>
|
||||
|
||||
<u-picker itemHeight="88" :show="showMarType" :columns="marTypeList" keyName="dictLabel" @cancel="handleMarTypeCancel"
|
||||
@confirm="handleMarTypeConfirm"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handHealthRecordCancel"
|
||||
@confirm="handHealthRecordConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="datetime"
|
||||
ref="dosingTimeRef"
|
||||
@cancel="datePickShow=false"
|
||||
@confirm="datePickConfirm"
|
||||
itemHeight="88"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMarRecord, addMarRecord, updateMarRecord } from '@/api/health/marRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { listHealthRecord } from '@/api/health/healthRecord'
|
||||
const { proxy } = getCurrentInstance()
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import dayjs from 'dayjs'
|
||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showPerson = ref(false)
|
||||
const showHealthRecord = ref(false)
|
||||
const title = ref("用药记录")
|
||||
const healthRecordList = ref([])
|
||||
const personList = ref([])
|
||||
|
||||
const marTypeList = ref([])
|
||||
const showMarType = ref(false)
|
||||
const resourceList = ref([])
|
||||
const showResource = ref(false)
|
||||
const placeList = ref([])
|
||||
const showPlace = ref(false)
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
id: null,
|
||||
name: null,
|
||||
type: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
delFlag: null,
|
||||
remark: null,
|
||||
healthRecordId: null,
|
||||
dosingTime: null,
|
||||
dosage: null,
|
||||
personId: null,
|
||||
resource: '1',
|
||||
place: '1',
|
||||
resourceName: '医院开药',
|
||||
placeName: '家中'
|
||||
},
|
||||
queryPersonParams: {
|
||||
pageNum: 1,
|
||||
status: '1',
|
||||
pageSize: 1000
|
||||
},
|
||||
queryHealthRecordParams: {
|
||||
pageNum: 1,
|
||||
personId:null,
|
||||
pageSize: 1000
|
||||
},
|
||||
rules: {
|
||||
healthRecordName: [{ required: true, message: '健康档案不能为空', trigger:['change', 'blur'] }],
|
||||
personName: [{ required: true, message: '人员不能为空', trigger: ['change', 'blur'] }],
|
||||
name: [{ required: true, message: '用药名称不能为空', trigger: ['change', 'blur'] }],
|
||||
type: [{ required: true, message: '用药类型不能为空', trigger: ['change', 'blur'] }],
|
||||
resource: [{ required: true, message: '药品来源不能为空', trigger: ['change', 'blur'] }],
|
||||
place: [{ required: true, message: '用药地点不能为空', trigger: ['change', 'blur'] }],
|
||||
|
||||
dosingTime: [{ required: true, message: '用药时间不能为空', trigger: ['change', 'blur'] }]
|
||||
}
|
||||
})
|
||||
const { form, queryPersonParams, queryHealthRecordParams, rules} = toRefs(data)
|
||||
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="用药记录-修改"
|
||||
}else{
|
||||
title.value="用药记录-新增"
|
||||
}
|
||||
getData()
|
||||
})
|
||||
onReady(() => {
|
||||
form.value.dosingTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
function getData() {
|
||||
listPerson(queryPersonParams.value).then((response) => {
|
||||
personList.value = [response.rows]
|
||||
if(response.rows.length>0){
|
||||
form.value.personName= response.rows[0].name
|
||||
form.value.personId = response.rows[0].id
|
||||
queryHealthRecordParams.value.personId=response.rows[0].id
|
||||
listHealthRecord(queryHealthRecordParams.value).then((response) => {
|
||||
healthRecordList.value = [response.rows]
|
||||
if(response.rows.length>0){
|
||||
form.value.healthRecordName= response.rows[0].name
|
||||
form.value.healthRecordId = response.rows[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// 类型
|
||||
getDicts('mar_type').then(res => {
|
||||
marTypeList.value =[res.data]
|
||||
})
|
||||
// 类型
|
||||
getDicts('mar_resource').then(res => {
|
||||
resourceList.value =[res.data]
|
||||
})
|
||||
// 子类型
|
||||
getDicts('mar_place').then(res => {
|
||||
placeList.value =[res.data]
|
||||
})
|
||||
|
||||
// 药品来源
|
||||
|
||||
if(form.value.id!=null){
|
||||
getMarRecord(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
getDicts('mar_place').then(result => {
|
||||
form.value.placeName=dictStr(form.value.place, result.data)
|
||||
})
|
||||
// 药品来源
|
||||
getDicts('mar_resource').then(result => {
|
||||
form.value.resourceName=dictStr(form.value.resource, result.data)
|
||||
})
|
||||
// 用药类型
|
||||
getDicts('mar_type').then(result => {
|
||||
form.value.marTypeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function handlePerson() {
|
||||
if (personList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '人员为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showPerson.value = true
|
||||
}
|
||||
}
|
||||
function handlePersonConfirm(e) {
|
||||
form.value.personName = e.value[0].name
|
||||
form.value.personId = e.value[0].id
|
||||
form.value.healthRecordName = ''
|
||||
form.value.healthRecordId = ''
|
||||
queryHealthRecordParams.value.personId=e.value[0].id
|
||||
listHealthRecord(queryHealthRecordParams.value).then((response) => {
|
||||
healthRecordList.value = [response.rows]
|
||||
showPerson.value = false
|
||||
})
|
||||
|
||||
}
|
||||
function handlePersonCancel() {
|
||||
showPerson.value = false
|
||||
}
|
||||
function handHealthRecord() {
|
||||
if (healthRecordList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '健康档案为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showHealthRecord.value = true
|
||||
}
|
||||
}
|
||||
function handHealthRecordConfirm(e) {
|
||||
form.value.healthRecordName = e.value[0].name
|
||||
form.value.healthRecordId = e.value[0].id
|
||||
showHealthRecord.value = false
|
||||
}
|
||||
function handHealthRecordCancel() {
|
||||
showHealthRecord.value = false
|
||||
}
|
||||
|
||||
function handleResource() {
|
||||
if (resourceList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '药品来源为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showResource.value = true
|
||||
}
|
||||
}
|
||||
function handleResourceConfirm(e) {
|
||||
form.value.resourceName = e.value[0].dictLabel
|
||||
form.value.resource = e.value[0].dictValue
|
||||
showResource.value = false
|
||||
}
|
||||
function handleResourceCancel() {
|
||||
showResource.value = false
|
||||
}
|
||||
|
||||
function handlePlace() {
|
||||
if (placeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '用药地点为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showPlace.value = true
|
||||
}
|
||||
}
|
||||
function handlePlaceConfirm(e) {
|
||||
form.value.placeName = e.value[0].dictLabel
|
||||
form.value.place = e.value[0].dictValue
|
||||
showPlace.value = false
|
||||
}
|
||||
function handlePlaceCancel() {
|
||||
showPlace.value = false
|
||||
}
|
||||
|
||||
function handleMarType() {
|
||||
if (marTypeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '用药类型为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showMarType.value = true
|
||||
}
|
||||
}
|
||||
function handleMarTypeConfirm(e) {
|
||||
form.value.marTypeName = e.value[0].dictLabel
|
||||
form.value.type = e.value[0].dictValue
|
||||
showMarType.value = false
|
||||
}
|
||||
function handleMarTypeCancel() {
|
||||
showMarType.value = false
|
||||
}
|
||||
|
||||
function selectDate() {
|
||||
datePickShow.value = true
|
||||
proxy.$refs['dosingTimeRef'].innerValue = new Date().getTime()
|
||||
}
|
||||
function datePickConfirm(e) {
|
||||
form.value.dosingTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||
datePickShow.value = false
|
||||
}
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateMarRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/health/marRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
addMarRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/health/marRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 360rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
495
src/pages/health/marRecord/list.vue
Normal file
495
src/pages/health/marRecord/list.vue
Normal file
@@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择用药时间" suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
<view class="filter-title">用药类型</view>
|
||||
<view class="state-list">
|
||||
<view v-for="item in typeList" :key="item.id" class="state-item"
|
||||
:class="item.selected ? 'active' : ''" @click="selectType(item)">{{ item.dictLabel }}</view>
|
||||
</view>
|
||||
<view class="select-header">用药时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="datetime"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.personName+',用药:'+item.name +item.dosage " size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">健康档案:</text>
|
||||
<text class="row-value">{{ item.healthRecordName }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">用药类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, typeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">药品来源:</text>
|
||||
<text class="row-value">{{ dictStr(item.resource,resourceList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">用药地点:</text>
|
||||
<text class="row-value">{{ dictStr(item.place, placeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">用药时间:</text>
|
||||
<text class="row-value">{{ item.dosingTime }}</text>
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
|
||||
@confirm="handlePersonConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listMarRecord, delMarRecord } from '@/api/health/marRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
import dayjs from 'dayjs'
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const timeShow= ref(false)
|
||||
const showPerson = ref(false)
|
||||
const personList = ref([])
|
||||
const typeList = ref([])
|
||||
const resourceList = ref([])
|
||||
const placeList = ref([])
|
||||
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryPersonParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
name: null,
|
||||
type: null,
|
||||
healthRecordId: null,
|
||||
dosingTime: null,
|
||||
dosage: null,
|
||||
personId: null,
|
||||
resource: null,
|
||||
place: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryPersonParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
listData.value=[]
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function selectType(item) {
|
||||
queryParams.value.type = item.dictValue
|
||||
typeList.value.map(ele => {
|
||||
if (ele.dictValue == item.dictValue) {
|
||||
ele.selected = true
|
||||
Reflect.set(ele, 'selected', true)
|
||||
} else {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function getList() {
|
||||
listPerson(queryPersonParams.value).then((response) => {
|
||||
personList.value = [response.rows]
|
||||
})
|
||||
// 用药类型
|
||||
getDicts('mar_type').then(res => {
|
||||
typeList.value = res.data
|
||||
})
|
||||
// 用药地点
|
||||
getDicts('mar_place').then(res => {
|
||||
placeList.value = res.data
|
||||
})
|
||||
// 药品类型
|
||||
getDicts('mar_resource').then(res => {
|
||||
resourceList.value = res.data
|
||||
})
|
||||
status.value = 'loading'
|
||||
listMarRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
} else {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
}).catch(() => {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
}
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function handlePerson() {
|
||||
if (personList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '人员为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showPerson.value = true
|
||||
}
|
||||
}
|
||||
function handlePersonConfirm(e) {
|
||||
queryParams.value.personName = e.value[0].name
|
||||
queryParams.value.personId= e.value[0].id
|
||||
showPerson.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handlePersonCancel() {
|
||||
showPerson.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.personName = ''
|
||||
queryParams.value.healthRecordId = ''
|
||||
queryParams.value.startTime = ''
|
||||
queryParams.value.time = ''
|
||||
|
||||
queryParams.value.endTime = ''
|
||||
queryParams.value.personId = ''
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/health/marRecord/details?id=${item.id}` })
|
||||
}
|
||||
function handleEdit(item) {
|
||||
uni.navigateTo({ url: `/pages/health/marRecord/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/health/marRecord/addEdit` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要删除吗',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
delMarRecord(item.id)
|
||||
uni.navigateTo({ url: `/pages/health/marRecord/list` })
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
184
src/pages/health/person/addEdit.vue
Normal file
184
src/pages/health/person/addEdit.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title}}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="标题" prop="name" required >
|
||||
<u--input v-model="form.name" placeholder="请填写标题"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="类型" prop="typeName" required @click="handleShowTeam">
|
||||
<u--input v-model="form.typeName" disabled disabledColor="#ffffff" placeholder="请选择类型"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="记录时间" prop="createTime" required @click="selectDate()">
|
||||
<u--input v-model="form.createTime" disabled disabledColor="#ffffff" placeholder="请选择记录时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="内容" prop="remark" required labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请填写内容" border="none" autoHeight inputAlign="right" count
|
||||
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showTeam" :columns="journeyTypeList" keyName="dictLabel" @cancel="handleCancel"
|
||||
@confirm="handleConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="datetime"
|
||||
ref="createTimeRef"
|
||||
@cancel="datePickShow=false"
|
||||
@confirm="datePickConfirm"
|
||||
itemHeight="88"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getHeartJourney, addHeartJourney, updateHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
import dayjs from 'dayjs'
|
||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showTeam = ref(false)
|
||||
const title = ref("心路历程")
|
||||
const journeyTypeList = ref([])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }],
|
||||
typeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||
remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }],
|
||||
}
|
||||
})
|
||||
const { form, rules} = toRefs(data)
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="心路历程-修改"
|
||||
}else{
|
||||
title.value="心路历程-新增"
|
||||
}
|
||||
getDict()
|
||||
})
|
||||
onReady(() => {
|
||||
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getHeartJourney(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function handleShowTeam() {
|
||||
if (journeyTypeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '类型为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showTeam.value = true
|
||||
}
|
||||
}
|
||||
function handleConfirm(e) {
|
||||
form.value.typeName = e.value[0].dictLabel
|
||||
form.value.type = e.value[0].dictValue
|
||||
showTeam.value = false
|
||||
}
|
||||
function handleCancel() {
|
||||
showTeam.value = false
|
||||
}
|
||||
function selectDate() {
|
||||
datePickShow.value = true
|
||||
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
|
||||
}
|
||||
function datePickConfirm(e) {
|
||||
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||
datePickShow.value = false
|
||||
}
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
addHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 360rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
92
src/pages/health/person/details.vue
Normal file
92
src/pages/health/person/details.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<u-cell-group>
|
||||
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
|
||||
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getHeartJourney} from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const id = ref('')
|
||||
const data = reactive({
|
||||
detailInfo: {}
|
||||
})
|
||||
const {detailInfo} = toRefs(data)
|
||||
onLoad((option) => {
|
||||
id.value = option.id
|
||||
getInfo()
|
||||
})
|
||||
function getInfo() {
|
||||
getHeartJourney(id.value).then(res => {
|
||||
detailInfo.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 280rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 647rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.img-con {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx
|
||||
}
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
372
src/pages/health/person/list.vue
Normal file
372
src/pages/health/person/list.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入标题" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
<view class="filter-title">类型</view>
|
||||
<view class="state-list">
|
||||
<view v-for="item in journeyTypeList" :key="item.id" class="state-item"
|
||||
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header" @click="enterDetails(item)">
|
||||
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.name" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, journeyTypeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">记录时间:</text>
|
||||
<text class="row-value">{{ item.createTime }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">内容:</text>
|
||||
<text class="row-value">{{ item.remark }}</text>
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listHeartJourney, delHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const journeyTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
name: '',
|
||||
type: '',
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
listData.value=[]
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function getList() {
|
||||
status.value = 'loading'
|
||||
listHeartJourney({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
} else {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
}).catch(() => {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value = res.data
|
||||
})
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
function selectStatus(item) {
|
||||
queryParams.value.type = item.dictValue
|
||||
journeyTypeList.value.map(ele => {
|
||||
if (ele.dictValue == item.dictValue) {
|
||||
ele.selected = true
|
||||
Reflect.set(ele, 'selected', true)
|
||||
} else {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
}
|
||||
})
|
||||
}
|
||||
function searchSubmit() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = '',
|
||||
queryParams.value.type = ''
|
||||
journeyTypeList.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/details?id=${item.id}` })
|
||||
}
|
||||
function handleEdit(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要删除吗',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
delHeartJourney(item.id)
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
117
src/pages/health/statistic/index.vue
Normal file
117
src/pages/health/statistic/index.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<view class="work-container">
|
||||
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="健康管理" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in healthGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
||||
|
||||
// 也可以使用下面的方式
|
||||
import { ref } from "vue";
|
||||
|
||||
const healthGridList=ref([
|
||||
{ path: '/pages/health/healthRecord/list', text: '健康档案', icon: 'wallet-filled', permission: 'health:healthRecord:list' },
|
||||
{ path: '/pages/health/temperatureRecord/list', text: '体温记录', icon: 'wallet', permission: 'health:temperatureRecord:list' },
|
||||
{ path: '/pages/health/doctorRecord/list', text: '就医记录', icon: 'upload', permission: 'health:doctorRecord:list' },
|
||||
{ path: '/pages/health/marRecord/list', text: '用药记录', icon: 'shop-filled', permission: 'health:marRecord:list' },
|
||||
{ path: '/pages/health/weightRecord/list', text: '体重记录', icon: 'calendar', permission: 'health:weightRecord:list' },
|
||||
{ path: '/pages/health/person/list', text: '成员管理', icon: 'paperplane-filled', permission: 'health:person:list' }
|
||||
])
|
||||
function navigateTo(path) {
|
||||
uni.navigateTo({
|
||||
url: path
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 500px) {
|
||||
.uni-swiper-dot-box {
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
245
src/pages/health/temperatureRecord/addEdit.vue
Normal file
245
src/pages/health/temperatureRecord/addEdit.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="体温记录"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title}}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="人员姓名" prop="personName" required @click="handlePerson">
|
||||
<u--input v-model="form.personName" disabled disabledColor="#ffffff" placeholder="请选择人员"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="健康档案" prop="healthRecordName" required @click="handHealthRecord">
|
||||
<u--input v-model="form.healthRecordName" disabled disabledColor="#ffffff" placeholder="请选择健康档案"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="测量时间" prop="measureTime" required @click="selectDate()">
|
||||
<u--input v-model="form.measureTime" disabled disabledColor="#ffffff" placeholder="请选择测量时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="体温" required prop="temperature" >
|
||||
<u--input v-model="form.temperature" type="number" placeholder="请填写体温"
|
||||
inputAlign="right" border="none">
|
||||
<template #suffix>
|
||||
<up-text
|
||||
text="℃"
|
||||
></up-text>
|
||||
</template>
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
|
||||
maxlength="2000" style="padding:18rpx 0;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
|
||||
@confirm="handlePersonConfirm"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showHealthRecord" :columns="healthRecordList" keyName="name" @cancel="handHealthRecordCancel"
|
||||
@confirm="handHealthRecordConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="datetime"
|
||||
ref="measureTimeRef"
|
||||
@cancel="datePickShow=false"
|
||||
@confirm="datePickConfirm"
|
||||
itemHeight="88"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getTemperatureRecord, addTemperatureRecord, updateTemperatureRecord } from '@/api/health/temperatureRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { listHealthRecord } from '@/api/health/healthRecord'
|
||||
const { proxy } = getCurrentInstance()
|
||||
import dayjs from 'dayjs'
|
||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showPerson = ref(false)
|
||||
const showHealthRecord = ref(false)
|
||||
const title = ref("体温记录")
|
||||
const healthRecordList = ref([])
|
||||
const personList = ref([])
|
||||
const data = reactive({
|
||||
form: {
|
||||
id: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
delFlag: null,
|
||||
remark: null,
|
||||
healthRecordId: null,
|
||||
measureTime: null,
|
||||
temperature: null,
|
||||
personId: null
|
||||
},
|
||||
queryPersonParams: {
|
||||
pageNum: 1,
|
||||
status: '1',
|
||||
pageSize: 1000
|
||||
},
|
||||
queryHealthRecordParams: {
|
||||
pageNum: 1,
|
||||
personId:null,
|
||||
pageSize: 1000
|
||||
},
|
||||
rules: {
|
||||
healthRecordName: [{ required: true, message: '健康档案不能为空', trigger:['change', 'blur'] }],
|
||||
personName: [{ required: true, message: '人员不能为空', trigger: ['change', 'blur'] }],
|
||||
temperature: [{ type: 'number',required: true, message: '体温不能为空', trigger: ['change', 'blur'] }],
|
||||
measureTime: [{ required: true, message: '测量时间不能为空', trigger: ['change', 'blur'] }]
|
||||
}
|
||||
})
|
||||
const { form, queryPersonParams, queryHealthRecordParams, rules} = toRefs(data)
|
||||
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="体温记录-修改"
|
||||
}else{
|
||||
title.value="体温记录-新增"
|
||||
}
|
||||
getData()
|
||||
})
|
||||
onReady(() => {
|
||||
form.value.measureTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
function getData() {
|
||||
listPerson(queryPersonParams.value).then((response) => {
|
||||
personList.value = [response.rows]
|
||||
if(response.rows.length>0){
|
||||
form.value.personName= response.rows[0].name
|
||||
form.value.personId = response.rows[0].id
|
||||
queryHealthRecordParams.value.personId=response.rows[0].id
|
||||
listHealthRecord(queryHealthRecordParams.value).then((response) => {
|
||||
healthRecordList.value = [response.rows]
|
||||
if(response.rows.length>0){
|
||||
form.value.healthRecordName= response.rows[0].name
|
||||
form.value.healthRecordId = response.rows[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if(form.value.id!=null){
|
||||
getTemperatureRecord(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function handlePerson() {
|
||||
if (personList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '人员为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showPerson.value = true
|
||||
}
|
||||
}
|
||||
function handlePersonConfirm(e) {
|
||||
form.value.personName = e.value[0].name
|
||||
form.value.personId = e.value[0].id
|
||||
form.value.healthRecordName = ''
|
||||
form.value.healthRecordId = ''
|
||||
queryHealthRecordParams.value.personId=e.value[0].id
|
||||
listHealthRecord(queryHealthRecordParams.value).then((response) => {
|
||||
healthRecordList.value = [response.rows]
|
||||
showPerson.value = false
|
||||
})
|
||||
|
||||
}
|
||||
function handlePersonCancel() {
|
||||
showPerson.value = false
|
||||
}
|
||||
function handHealthRecord() {
|
||||
if (healthRecordList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '健康档案为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showHealthRecord.value = true
|
||||
}
|
||||
}
|
||||
function handHealthRecordConfirm(e) {
|
||||
form.value.healthRecordName = e.value[0].name
|
||||
form.value.healthRecordId = e.value[0].id
|
||||
showHealthRecord.value = false
|
||||
}
|
||||
function handHealthRecordCancel() {
|
||||
showHealthRecord.value = false
|
||||
}
|
||||
function selectDate() {
|
||||
datePickShow.value = true
|
||||
proxy.$refs['measureTimeRef'].innerValue = new Date().getTime()
|
||||
}
|
||||
function datePickConfirm(e) {
|
||||
form.value.measureTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||
datePickShow.value = false
|
||||
}
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateTemperatureRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/health/temperatureRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
addTemperatureRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/health/temperatureRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 360rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
435
src/pages/health/temperatureRecord/list.vue
Normal file
435
src/pages/health/temperatureRecord/list.vue
Normal file
@@ -0,0 +1,435 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.personName" border="false" type="select" @click="handlePerson" placeholder="请选择人员" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择测量时间" suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
<view class="select-header">测量时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="datetime"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.personName+',体温:'+item.temperature +'℃'" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">健康档案:</text>
|
||||
<text class="row-value">{{ item.healthRecordName }}</text>
|
||||
</view>
|
||||
|
||||
<view class="item-row">
|
||||
<text class="row-label">测量时间:</text>
|
||||
<text class="row-value">{{ item.measureTime }}</text>
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showPerson" :columns="personList" keyName="name" @cancel="handlePersonCancel"
|
||||
@confirm="handlePersonConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listTemperatureRecord, delTemperatureRecord } from '@/api/health/temperatureRecord'
|
||||
import { listPerson, getPerson } from '@/api/health/person'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
import dayjs from 'dayjs'
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const timeShow= ref(false)
|
||||
const showPerson = ref(false)
|
||||
const personList = ref([])
|
||||
const flag= ref(true)
|
||||
const time =ref( Number(new Date()))
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryPersonParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
healthRecordId: null,
|
||||
measureTime: null,
|
||||
temperature: null,
|
||||
personId: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryPersonParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
listData.value=[]
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function getList() {
|
||||
listPerson(queryPersonParams.value).then((response) => {
|
||||
personList.value = [response.rows]
|
||||
})
|
||||
status.value = 'loading'
|
||||
listTemperatureRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
} else {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
}).catch(() => {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
}
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function handlePerson() {
|
||||
if (personList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '人员为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showPerson.value = true
|
||||
}
|
||||
}
|
||||
function handlePersonConfirm(e) {
|
||||
queryParams.value.personName = e.value[0].name
|
||||
queryParams.value.personId= e.value[0].id
|
||||
showPerson.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handlePersonCancel() {
|
||||
showPerson.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.personName = ''
|
||||
queryParams.value.healthRecordId = ''
|
||||
queryParams.value.startTime = ''
|
||||
queryParams.value.time = ''
|
||||
|
||||
queryParams.value.endTime = ''
|
||||
queryParams.value.personId = ''
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/health/temperatureRecord/details?id=${item.id}` })
|
||||
}
|
||||
function handleEdit(item) {
|
||||
uni.navigateTo({ url: `/pages/health/temperatureRecord/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/health/temperatureRecord/addEdit` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要删除吗',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
delTemperatureRecord(item.id)
|
||||
uni.navigateTo({ url: `/pages/health/temperatureRecord/list` })
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
184
src/pages/health/weightRecord/addEdit.vue
Normal file
184
src/pages/health/weightRecord/addEdit.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<view class="section-title">{{ title}}</view>
|
||||
<view class="form-view">
|
||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||
<u-form-item label="标题" prop="name" required >
|
||||
<u--input v-model="form.name" placeholder="请填写标题"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="类型" prop="typeName" required @click="handleShowTeam">
|
||||
<u--input v-model="form.typeName" disabled disabledColor="#ffffff" placeholder="请选择类型"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="记录时间" prop="createTime" required @click="selectDate()">
|
||||
<u--input v-model="form.createTime" disabled disabledColor="#ffffff" placeholder="请选择记录时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="内容" prop="remark" required labelPosition="top">
|
||||
<u--textarea v-model="form.remark" placeholder="请填写内容" border="none" autoHeight inputAlign="right" count
|
||||
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<view class="form-btn">
|
||||
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showTeam" :columns="journeyTypeList" keyName="dictLabel" @cancel="handleCancel"
|
||||
@confirm="handleConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="datetime"
|
||||
ref="createTimeRef"
|
||||
@cancel="datePickShow=false"
|
||||
@confirm="datePickConfirm"
|
||||
itemHeight="88"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getHeartJourney, addHeartJourney, updateHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
import dayjs from 'dayjs'
|
||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
|
||||
const datePickShow = ref(false)
|
||||
const showTeam = ref(false)
|
||||
const title = ref("心路历程")
|
||||
const journeyTypeList = ref([])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }],
|
||||
typeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||
remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }],
|
||||
}
|
||||
})
|
||||
const { form, rules} = toRefs(data)
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="心路历程-修改"
|
||||
}else{
|
||||
title.value="心路历程-新增"
|
||||
}
|
||||
getDict()
|
||||
})
|
||||
onReady(() => {
|
||||
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getHeartJourney(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function handleShowTeam() {
|
||||
if (journeyTypeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '类型为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showTeam.value = true
|
||||
}
|
||||
}
|
||||
function handleConfirm(e) {
|
||||
form.value.typeName = e.value[0].dictLabel
|
||||
form.value.type = e.value[0].dictValue
|
||||
showTeam.value = false
|
||||
}
|
||||
function handleCancel() {
|
||||
showTeam.value = false
|
||||
}
|
||||
function selectDate() {
|
||||
datePickShow.value = true
|
||||
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
|
||||
}
|
||||
function datePickConfirm(e) {
|
||||
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||
datePickShow.value = false
|
||||
}
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
addHeartJourney(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 360rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
92
src/pages/health/weightRecord/details.vue
Normal file
92
src/pages/health/weightRecord/details.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<view class="container" style="paddingBottom:1rpx;">
|
||||
<u-navbar
|
||||
leftIconSize="40rpx"
|
||||
leftIconColor="#333333"
|
||||
title="心路历程详情"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<u-cell-group>
|
||||
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
|
||||
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getHeartJourney} from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const id = ref('')
|
||||
const data = reactive({
|
||||
detailInfo: {}
|
||||
})
|
||||
const {detailInfo} = toRefs(data)
|
||||
onLoad((option) => {
|
||||
id.value = option.id
|
||||
getInfo()
|
||||
})
|
||||
function getInfo() {
|
||||
getHeartJourney(id.value).then(res => {
|
||||
detailInfo.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.section {
|
||||
margin: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.section-title {
|
||||
width: 280rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
font-size: 30rpx;
|
||||
border-left: 6rpx solid #2681FF;
|
||||
padding-left: 26rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 647rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.img-con {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx
|
||||
}
|
||||
.form-view {
|
||||
padding: 20rpx 0rpx 0 10rpx;
|
||||
|
||||
.form-btn {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
372
src/pages/health/weightRecord/list.vue
Normal file
372
src/pages/health/weightRecord/list.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u--input v-model="queryParams.name" border="false" placeholder="请输入标题" class="search-input"
|
||||
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||
</u--input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
<view class="filter-title">类型</view>
|
||||
<view class="state-list">
|
||||
<view v-for="item in journeyTypeList" :key="item.id" class="state-item"
|
||||
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header" @click="enterDetails(item)">
|
||||
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||
:text="item.name" size="30rpx" color="#333333" :bold="true"></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.type, journeyTypeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">记录时间:</text>
|
||||
<text class="row-value">{{ item.createTime }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">内容:</text>
|
||||
<text class="row-value">{{ item.remark }}</text>
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listHeartJourney, delHeartJourney } from '@/api/invest/heartJourney'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const status = ref('loadmore')
|
||||
const journeyTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
name: '',
|
||||
type: '',
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
listData.value=[]
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function loadmore() {
|
||||
pageNum.value += 1
|
||||
if (status.value == 'loadmore') {
|
||||
getList()
|
||||
}
|
||||
}
|
||||
function getList() {
|
||||
status.value = 'loading'
|
||||
listHeartJourney({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||
listData.value = listData.value.concat(res.rows)
|
||||
if (listData.value.length < res.total) {
|
||||
status.value = 'loadmore'
|
||||
} else {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
}).catch(() => {
|
||||
status.value = 'nomore'
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value = res.data
|
||||
})
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
function selectStatus(item) {
|
||||
queryParams.value.type = item.dictValue
|
||||
journeyTypeList.value.map(ele => {
|
||||
if (ele.dictValue == item.dictValue) {
|
||||
ele.selected = true
|
||||
Reflect.set(ele, 'selected', true)
|
||||
} else {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
}
|
||||
})
|
||||
}
|
||||
function searchSubmit() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function searchBlur() {
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.name = '',
|
||||
queryParams.value.type = ''
|
||||
journeyTypeList.value.map(ele => {
|
||||
Reflect.set(ele, 'selected', false)
|
||||
})
|
||||
}
|
||||
function enterDetails(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/details?id=${item.id}` })
|
||||
}
|
||||
function handleEdit(item) {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/addEdit` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleDelete(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要删除吗',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
delHeartJourney(item.id)
|
||||
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
|
||||
} else if (res.cancel) {
|
||||
console.log('取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -108,7 +108,7 @@ function loginSuccess(result) {
|
||||
// 设置用户信息
|
||||
userStore.getInfo().then(res => {
|
||||
uni.switchTab({
|
||||
url: '/pages/calendar/index'
|
||||
url: '/pages/health/homepage/index'
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="header-section text-center">
|
||||
<image style="width: 150rpx;height: 150rpx;" src="/static/intc.jpg" mode="widthFix">
|
||||
</image>
|
||||
<uni-title type="h2" title="智聪科技记账平台"></uni-title>
|
||||
<uni-title type="h2" title="智聪科技管理平台"></uni-title>
|
||||
</view>
|
||||
|
||||
<view class="content-section">
|
||||
|
||||
Reference in New Issue
Block a user