You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
2.2 KiB
133 lines
2.2 KiB
|
3 weeks ago
|
const _app = getApp<IAppOption>()
|
||
|
|
|
||
|
|
Page({
|
||
|
|
data: {
|
||
|
|
popupShow: false,
|
||
|
|
popupType: 'popup16', // 提示保存弹窗
|
||
|
|
popupParams: {
|
||
|
|
close: false,
|
||
|
|
position: 'bottom',
|
||
|
|
} as any,
|
||
|
|
|
||
|
|
imagePreview: false,
|
||
|
|
|
||
|
|
imageSrc: '',
|
||
|
|
|
||
|
|
cameraList: {
|
||
|
|
frontend: [
|
||
|
|
{
|
||
|
|
name: '睁眼',
|
||
|
|
type: 1,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '闭眼',
|
||
|
|
type: 2,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '仰头',
|
||
|
|
type: 3,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
backend: [
|
||
|
|
{
|
||
|
|
name: '左侧-90°',
|
||
|
|
type: 4,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '右侧-90°',
|
||
|
|
type: 5,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '左侧-45°',
|
||
|
|
type: 6,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '右侧-45°',
|
||
|
|
type: 7,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
other: [
|
||
|
|
{
|
||
|
|
name: '左上',
|
||
|
|
type: 8,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '向上',
|
||
|
|
type: 9,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '左下',
|
||
|
|
type: 10,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '向左',
|
||
|
|
type: 11,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '向右',
|
||
|
|
type: 12,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '右上',
|
||
|
|
type: 13,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '向下',
|
||
|
|
type: 14,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '右下',
|
||
|
|
type: 15,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
onLoad() {},
|
||
|
|
handleDemo() {
|
||
|
|
wx.navigateTo({
|
||
|
|
url: '/patient/pages/noteDemo/index',
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handleImageRetake() {
|
||
|
|
this.setData({
|
||
|
|
imagePreview: false,
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handleImageDel() {
|
||
|
|
this.setData({
|
||
|
|
imagePreview: false,
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handleCamera(e) {
|
||
|
|
const { type } = e.currentTarget.dataset
|
||
|
|
const cameraComponent = this.selectComponent('#camera-component')
|
||
|
|
cameraComponent.handleSelect(type)
|
||
|
|
},
|
||
|
|
onUploadSuccess(e) {
|
||
|
|
this.setData({
|
||
|
|
imageSrc: e.detail.url,
|
||
|
|
})
|
||
|
|
},
|
||
|
|
onUploadError(e) {
|
||
|
|
console.log('DEBUGPRINT[221]: index.ts:34: e=', e)
|
||
|
|
},
|
||
|
|
handlePreview() {
|
||
|
|
this.selectComponent('#note-image-preview').handlePreview(this.data.imageSrc)
|
||
|
|
},
|
||
|
|
handlePopupOk() {
|
||
|
|
this.setData({
|
||
|
|
popupShow: false,
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handlePopupCancel() {
|
||
|
|
this.setData({
|
||
|
|
popupShow: false,
|
||
|
|
})
|
||
|
|
},
|
||
|
|
handleBack() {
|
||
|
|
wx.navigateBack()
|
||
|
|
},
|
||
|
|
})
|
||
|
|
|
||
|
|
export {}
|