@ -0,0 +1,5 @@ |
|||||||
|
cd ./src/images/ |
||||||
|
svn add . --no-ignore --force |
||||||
|
svn ci -m "版本更新" |
||||||
|
cd .. |
||||||
|
cd .. |
@ -1,6 +1,6 @@ |
|||||||
<button class="button" wx:if="{{chooseAvatar}}" open-type="chooseAvatar" bindchooseavatar="handleChooseAvatar"> |
<button class="button" wx:if="{{chooseAvatar}}" open-type="chooseAvatar" bindchooseavatar="handleChooseAvatar"> |
||||||
<slot></slot> |
<slot></slot> |
||||||
</button> |
</button> |
||||||
<van-uploader wx:else max-count="{{1}}" bind:after-read="handleAfterRead"> |
<van-uploader wx:else accept="{{accept}}" max-count="{{1}}" bind:after-read="handleAfterRead"> |
||||||
<slot></slot> |
<slot></slot> |
||||||
</van-uploader> |
</van-uploader> |
||||||
|
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.4 KiB |
@ -1,29 +1,66 @@ |
|||||||
const _app = getApp<IAppOption>() |
const _app = getApp<IAppOption>(); |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: { |
data: { |
||||||
show1: false, |
show1: false, |
||||||
show2: false, |
show2: false, |
||||||
show3: false, |
show3: false, |
||||||
|
|
||||||
|
images: [] as any, |
||||||
|
description: "", |
||||||
|
audios: [] as any, |
||||||
}, |
}, |
||||||
onLoad() {}, |
onLoad() {}, |
||||||
handleChooseFile() { |
handleChooseFile() { |
||||||
wx.chooseMessageFile({ |
wx.chooseMessageFile({ |
||||||
count: 1, |
count: 1, |
||||||
success(res) { |
success(res) { |
||||||
console.log(res) |
console.log(res); |
||||||
}, |
}, |
||||||
fail() { |
fail() { |
||||||
wx.showToast({ |
wx.showToast({ |
||||||
icon: 'none', |
icon: "none", |
||||||
title: '取消选择', |
title: "取消选择", |
||||||
}) |
}); |
||||||
}, |
}, |
||||||
}) |
}); |
||||||
}, |
}, |
||||||
handleSubmit() { |
handleSubmit() { |
||||||
wx.navigateTo({ |
wx.navigateTo({ |
||||||
url: '/module1/pages/entryCasesResult/index', |
url: "/module1/pages/entryCasesResult/index", |
||||||
}) |
}); |
||||||
|
}, |
||||||
|
handlePhoto(e) { |
||||||
|
const detail = e.detail; |
||||||
|
const images = this.data.images; |
||||||
|
this.setData({ |
||||||
|
images: [ |
||||||
|
...images, |
||||||
|
{ |
||||||
|
name: detail.name, |
||||||
|
url: detail.fileUrl, |
||||||
|
isRepeat: 2, |
||||||
|
}, |
||||||
|
], |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDelPhoto(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
images: this.data.images.filter((_, i) => i !== Number(index)), |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleAudio(e) { |
||||||
|
this.setData({ |
||||||
|
audios: [ |
||||||
|
...this.data.audios, |
||||||
|
{ |
||||||
|
name: e.detail.name, |
||||||
|
url: e.detail.fileUrl, |
||||||
|
duration: e.detail.duration, |
||||||
|
isRepeat: 2, |
||||||
|
}, |
||||||
|
], |
||||||
|
}); |
||||||
}, |
}, |
||||||
}) |
}); |
||||||
|
@ -1,25 +1,385 @@ |
|||||||
const _app = getApp<IAppOption>() |
const app = getApp<IAppOption>(); |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: { |
data: { |
||||||
|
fold: true, |
||||||
|
|
||||||
show1: false, |
show1: false, |
||||||
show2: false, |
show2: false, |
||||||
show3: false, |
show3: false, |
||||||
|
showArea: false, |
||||||
|
fieldNames: { text: "label", value: "value", children: "children" }, |
||||||
|
|
||||||
|
nav: "0", |
||||||
|
|
||||||
|
area: [], |
||||||
|
caseStatusList: {}, |
||||||
|
fileTypeList: {}, |
||||||
|
reasonList: {}, |
||||||
|
|
||||||
|
pagination: { |
||||||
|
page: 1, |
||||||
|
pages: 1, |
||||||
|
count: 1, |
||||||
|
}, |
||||||
|
list: [], |
||||||
|
|
||||||
|
hostilatSearch: "", |
||||||
|
hostipalList: [], |
||||||
|
hospitalClassification: {}, |
||||||
|
hospitalLevel: {}, |
||||||
|
hostipalPagination: { |
||||||
|
page: 1, |
||||||
|
pages: 1, |
||||||
|
count: 1, |
||||||
|
}, |
||||||
|
|
||||||
|
deptList: [] as any, |
||||||
|
labelList: [] as any, |
||||||
|
|
||||||
|
caseStatusName: "全部", |
||||||
|
hospitalName: "全部", |
||||||
|
deptName: "全部", |
||||||
|
provinceName: "", |
||||||
|
cityName: "", |
||||||
|
countyName: "", |
||||||
|
|
||||||
|
search: "", |
||||||
|
caseStatus: [] as any, |
||||||
|
hospitalId: [] as any, |
||||||
|
submitTimeBegin: "", |
||||||
|
submitTimeEnd: "", |
||||||
|
feedbackTimeBegin: "", |
||||||
|
feedbackTimeEnd: "", |
||||||
|
deptId: [] as any, |
||||||
|
labelId: [] as any, |
||||||
|
provinceId: "", |
||||||
|
cityId: "", |
||||||
|
countyId: "", |
||||||
|
isReject: "", |
||||||
|
isHighQuality: "", |
||||||
|
isOpen: "", |
||||||
|
needDeal: "", |
||||||
|
orderType: "", |
||||||
}, |
}, |
||||||
onLoad() { |
onLoad() { |
||||||
this.getTabBar().setData({ |
this.getTabBar().setData({ |
||||||
active: 2, |
active: 2, |
||||||
}) |
}); |
||||||
|
|
||||||
|
app.waitLogin().then(() => { |
||||||
|
this.getBaseInfo(); |
||||||
|
this.getList(); |
||||||
|
this.getHospitalsList(); |
||||||
|
this.getHostipalDict(); |
||||||
|
this.getDoctorDict(); |
||||||
|
this.getArea(); |
||||||
|
}); |
||||||
|
}, |
||||||
|
getBaseInfo() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/case/get-base-info", |
||||||
|
data: {}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
caseStatusList: res.caseStatusList, |
||||||
|
fileTypeList: res.fileTypeList, |
||||||
|
reasonList: res.reasonList, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
getArea() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "/js/area.json", |
||||||
|
isJSON: true, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
area: res, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleNav(e) { |
||||||
|
const { nav } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
nav, |
||||||
|
isOpen: nav === "1" ? "1" : "", |
||||||
|
isHighQuality: nav === "2" ? "1" : "", |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
getList(newPage = 1) { |
||||||
|
wx.ajax({ |
||||||
|
method: "POST", |
||||||
|
url: "?r=takeda/case/get-list", |
||||||
|
data: { |
||||||
|
page: newPage, |
||||||
|
search: this.data.search, |
||||||
|
caseStatus: this.data.caseStatus, |
||||||
|
submitTimeBegin: this.data.submitTimeBegin, |
||||||
|
submitTimeEnd: this.data.submitTimeEnd, |
||||||
|
feedbackTimeBegin: this.data.feedbackTimeBegin, |
||||||
|
feedbackTimeEnd: this.data.feedbackTimeEnd, |
||||||
|
deptId: this.data.deptId, |
||||||
|
labelId: this.data.labelId, |
||||||
|
provinceId: this.data.provinceId, |
||||||
|
cityId: this.data.cityId, |
||||||
|
countyId: this.data.countyId, |
||||||
|
hospitalId: this.data.hospitalId, |
||||||
|
isReject: this.data.isReject, |
||||||
|
isHighQuality: this.data.isHighQuality, |
||||||
|
isOpen: this.data.isOpen, |
||||||
|
needDeal: this.data.needDeal, |
||||||
|
orderType: this.data.orderType, |
||||||
|
}, |
||||||
|
}).then((res) => { |
||||||
|
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list]; |
||||||
|
this.setData({ |
||||||
|
list, |
||||||
|
pagination: { |
||||||
|
page: res.page, |
||||||
|
pages: res.pages, |
||||||
|
count: res.count, |
||||||
|
}, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
onReachBottom() { |
||||||
|
const { page, pages } = this.data.pagination; |
||||||
|
if (pages > page) { |
||||||
|
this.getList(page + 1); |
||||||
|
} |
||||||
|
}, |
||||||
|
handleSearch() { |
||||||
|
this.getList(); |
||||||
|
}, |
||||||
|
handleCaseShow() { |
||||||
|
this.setData({ |
||||||
|
show1: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleCase(e) { |
||||||
|
const { value } = e.currentTarget.dataset; |
||||||
|
const { caseStatus, caseStatusList } = this.data; |
||||||
|
if (!value) { |
||||||
|
this.setData({ |
||||||
|
caseStatus: [], |
||||||
|
caseStatusName: "全部", |
||||||
|
}); |
||||||
|
return; |
||||||
|
} |
||||||
|
if (caseStatus.includes(value)) { |
||||||
|
this.setData({ |
||||||
|
caseStatus: caseStatus.filter((item) => item !== value), |
||||||
|
caseStatusName: caseStatus |
||||||
|
.filter((item) => item !== value) |
||||||
|
.map((item) => caseStatusList[item]) |
||||||
|
.join(","), |
||||||
|
}); |
||||||
|
} else { |
||||||
|
this.setData({ |
||||||
|
caseStatus: [...caseStatus, value], |
||||||
|
caseStatusName: [...caseStatus, value].map((item) => caseStatusList[item]).join(","), |
||||||
|
}); |
||||||
|
} |
||||||
|
}, |
||||||
|
handleCaseSubmit() { |
||||||
|
this.setData({ |
||||||
|
show1: false, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
onClose() { |
||||||
|
this.setData({ |
||||||
|
show1: false, |
||||||
|
show2: false, |
||||||
|
show3: false, |
||||||
|
showArea: false, |
||||||
|
}); |
||||||
}, |
}, |
||||||
handleImagePreview(e) { |
handleImagePreview(e) { |
||||||
const { url } = e.currentTarget.dataset |
const { url } = e.currentTarget.dataset; |
||||||
wx.previewImage({ |
wx.previewImage({ |
||||||
urls: [url], |
urls: [url], |
||||||
}) |
}); |
||||||
}, |
}, |
||||||
handleDetail(){ |
handleDetail() { |
||||||
wx.navigateTo({ |
wx.navigateTo({ |
||||||
url:"/module1/pages/casesDetail/index" |
url: "/module1/pages/casesDetail/index", |
||||||
}) |
}); |
||||||
} |
}, |
||||||
}) |
|
||||||
|
// 医院选择弹窗
|
||||||
|
handleHostipalShow() { |
||||||
|
this.setData({ |
||||||
|
show2: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
getHostipalDict() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/reg/hospital-dict", |
||||||
|
data: {}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
hospitalClassification: res.hospitalClassification, |
||||||
|
hospitalLevel: res.hospitalLevel, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleSearchHostipal() { |
||||||
|
this.getHospitalsList(); |
||||||
|
}, |
||||||
|
getHospitalsList(newPage = 1) { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/reg/hospitals", |
||||||
|
data: { |
||||||
|
page: newPage, |
||||||
|
Search: this.data.hostilatSearch, |
||||||
|
}, |
||||||
|
}).then((res) => { |
||||||
|
const hostipalList = res.page === 1 ? res.list : [...this.data.hostipalList, ...res.list]; |
||||||
|
this.setData({ |
||||||
|
hostipalList, |
||||||
|
hostipalPagination: { |
||||||
|
page: res.page, |
||||||
|
pages: res.pages, |
||||||
|
count: res.count, |
||||||
|
}, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleHostipalBottom(e) { |
||||||
|
const hostipalPagination = this.data.hostipalPagination; |
||||||
|
if (e.detail.direction === "botttom" && hostipalPagination.page < hostipalPagination.pages) { |
||||||
|
this.getHospitalsList(Number(hostipalPagination.page) + 1); |
||||||
|
} |
||||||
|
}, |
||||||
|
handleHostipal(e) { |
||||||
|
const { params } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
show2: false, |
||||||
|
hospitalId: this.data.hospitalId.includes(params.HospitalId) ? [] : [params.HospitalId], |
||||||
|
hospitalName: this.data.hospitalId.includes(params.HospitalId) ? "全部" : params.Name, |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
getDoctorDict() { |
||||||
|
wx.ajax({ |
||||||
|
method: "POST", |
||||||
|
url: "?r=takeda/reg/doctor-dict", |
||||||
|
data: {}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
deptList: res.DoctorSpecialtyLabel, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleTagShow() { |
||||||
|
this.setData({ |
||||||
|
show3: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDept(e) { |
||||||
|
const { params } = e.currentTarget.dataset; |
||||||
|
const deptId = this.data.deptId; |
||||||
|
const newDeptId: any = deptId.includes(params.value) |
||||||
|
? deptId.filter((item) => item !== params.value) |
||||||
|
: [...deptId, params.value]; |
||||||
|
const newDeptName = this.data.deptList |
||||||
|
.filter((item) => newDeptId.includes(item.value)) |
||||||
|
.map((item) => item.label) |
||||||
|
.join(","); |
||||||
|
const labelList = this.data.deptList |
||||||
|
.filter((item) => newDeptId.includes(item.value)) |
||||||
|
.reduce((pre, cur) => { |
||||||
|
return [...pre, ...cur.options]; |
||||||
|
}, []); |
||||||
|
this.setData({ |
||||||
|
deptId: newDeptId, |
||||||
|
deptName: newDeptName || "全部", |
||||||
|
labelList, |
||||||
|
labelId: [], |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleLabel(e) { |
||||||
|
const { params } = e.currentTarget.dataset; |
||||||
|
const labelId = this.data.labelId; |
||||||
|
const newDeptId = labelId.includes(params.value) |
||||||
|
? labelId.filter((item) => item !== params.value) |
||||||
|
: [...labelId, ...params.value]; |
||||||
|
this.setData({ |
||||||
|
labelId: newDeptId, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleTagSubmit() { |
||||||
|
this.setData({ |
||||||
|
show3: false, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
|
||||||
|
handleArea() { |
||||||
|
this.setData({ |
||||||
|
showArea: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
onFinish(e: any) { |
||||||
|
this.setData({ |
||||||
|
provinceId: e.detail.selectedOptions[0].value, |
||||||
|
provinceName: e.detail.selectedOptions[0].label, |
||||||
|
cityId: e.detail.selectedOptions[1].value, |
||||||
|
cityName: e.detail.selectedOptions[1].label, |
||||||
|
countyId: e.detail.selectedOptions[2].value, |
||||||
|
countyName: e.detail.selectedOptions[2].label, |
||||||
|
showArea: false, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
|
||||||
|
handleRadio(e) { |
||||||
|
const { key } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
[key]: this.data[key] === "1" ? "" : "1", |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
handleOrder(e) { |
||||||
|
const { value } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
orderType: value, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
handleFold() { |
||||||
|
this.setData({ |
||||||
|
fold: !this.data.fold, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDel(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
const params: any = this.data.list[index]; |
||||||
|
wx.showModal({ |
||||||
|
title: "确认删除该病历?", |
||||||
|
success: (e) => { |
||||||
|
if (e.confirm) { |
||||||
|
wx.ajax({ |
||||||
|
method: "POST", |
||||||
|
url: "?r=takeda/case/delete-case", |
||||||
|
data: { |
||||||
|
caseId: params.caseId, |
||||||
|
}, |
||||||
|
}).then(() => { |
||||||
|
this.setData({ |
||||||
|
list: this.data.list.filter((item: any) => item.caseId !== params.caseId), |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
|
|
||||||
|
export {}; |
||||||
|