From 0ffdf00009b0bede0859fa33deddefb55c075a7b Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 01 二月 2026 16:42:36 +0800
Subject: [PATCH] feat:优化增加任务同步接口,允许前端手动控制同步
---
app/pagesTask/create-emergency.vue | 404 ++++++++++++++++++++++-----------------------------------
1 files changed, 159 insertions(+), 245 deletions(-)
diff --git a/app/pagesTask/create-emergency.vue b/app/pagesTask/create-emergency.vue
index 146f8c0..d1adac9 100644
--- a/app/pagesTask/create-emergency.vue
+++ b/app/pagesTask/create-emergency.vue
@@ -400,41 +400,6 @@
</view>
</view>
</uni-popup>
-
- <!-- 鎷嶇収璇嗗埆寮圭獥 -->
- <uni-popup ref="photoOCRPopup" type="bottom" :safe-area="true">
- <view class="photo-ocr-popup">
- <view class="popup-header">
- <view class="popup-title">鎷嶇収璇嗗埆</view>
- <view class="popup-close" @click="closePhotoOCRPopup">
- <uni-icons type="closeempty" size="24" color="#333"></uni-icons>
- </view>
- </view>
-
- <view class="ocr-content">
- <view class="ocr-tip">
- <uni-icons type="info" size="18" color="#007AFF"></uni-icons>
- <text>鎷嶇収鎴栭�夋嫨鍥剧墖锛岃嚜鍔ㄨ瘑鍒浆杩愬崟淇℃伅</text>
- </view>
-
- <view class="image-preview" v-if="ocrImage">
- <image :src="ocrImage" mode="aspectFit" style="width: 100%; height: 300rpx; border-radius: 10rpx;"></image>
- </view>
-
- <view class="ocr-actions">
- <button class="select-btn" @click="selectImage">閫夋嫨鍥剧墖</button>
- <button class="capture-btn" @click="captureImage">鎷嶇収</button>
- </view>
- </view>
-
- <view class="popup-footer">
- <button class="cancel-btn" @click="closePhotoOCRPopup">鍙栨秷</button>
- <button class="confirm-btn" @click="performOCR" :disabled="ocrLoading">
- {{ ocrLoading ? '璇嗗埆涓�...' : '寮�濮嬭瘑鍒�' }}
- </button>
- </view>
- </view>
- </uni-popup>
</scroll-view>
</template>
@@ -537,9 +502,6 @@
// 鏅鸿兘璇嗗埆鐩稿叧
rawText: '',
parseLoading: false,
- // 鎷嶇収璇嗗埆鐩稿叧
- ocrImage: '',
- ocrLoading: false,
// 澶氬浘鐗囨媿鐓ц瘑鍒浉鍏�
multiOcrImages: [],
multiOcrLoading: false,
@@ -1692,12 +1654,6 @@
// ==================== 鎷嶇収璇嗗埆鐩稿叧鏂规硶 ====================
- // 鏄剧ず鎷嶇収璇嗗埆寮圭獥
- showPhotoOCRPopup() {
- this.ocrImage = ''
- this.$refs.photoOCRPopup.open()
- },
-
// 鏄剧ず澶氬浘鎷嶇収璇嗗埆寮圭獥
showMultiPhotoOCRPopup() {
this.page1Image = ''
@@ -1774,38 +1730,6 @@
fail: (err) => {
console.error('閫夋嫨鍥剧墖澶辫触:', err)
this.$modal.showToast('閫夋嫨鍥剧墖澶辫触')
- }
- })
- },
-
- // 閫夋嫨鍥剧墖
- selectImage() {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- sourceType: ['album'],
- success: (res) => {
- this.ocrImage = res.tempFilePaths[0]
- },
- fail: (err) => {
- console.error('閫夋嫨鍥剧墖澶辫触:', err)
- this.$modal.showToast('閫夋嫨鍥剧墖澶辫触')
- }
- })
- },
-
- // 鎷嶇収
- captureImage() {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- sourceType: ['camera'],
- success: (res) => {
- this.ocrImage = res.tempFilePaths[0]
- },
- fail: (err) => {
- console.error('鎷嶇収澶辫触:', err)
- this.$modal.showToast('鎷嶇収澶辫触')
}
})
},
@@ -1963,41 +1887,101 @@
}
}
- // 鎻愬彇璇婃柇锛堢梾鎯咃級
+ // 鎻愬彇璇婃柇锛堢梾鎯咃級锛堥檺鍒�10涓瓧绗︿互鍐咃紝閬垮厤璇瘑鍒級
if (fields['璇婃柇']) {
- this.taskForm.patient.condition = fields['璇婃柇'].trim()
+ const diagnosis = fields['璇婃柇'].trim()
+ // 鍙湁褰�10涓瓧绗︿互鍐呯殑璇婃柇淇℃伅鎵嶅~鍏ヨ〃鍗�
+ if (diagnosis.length <= 10) {
+ this.taskForm.patient.condition = diagnosis
+ } else {
+ console.log('璇婃柇淇℃伅杩囬暱锛屽彲鑳戒负璇瘑鍒紝宸插拷鐣�:', diagnosis)
+ }
}
// 鎻愬彇琛岀▼锛堣浆鍑哄尰闄㈠拰杞叆鍖婚櫌锛�
if (fields['琛岀▼']) {
const route = fields['琛岀▼'].trim()
- // 鎸�"-"鎴�"鈥�"鍒嗗壊琛岀▼
- const hospitals = route.split(/[-鈥擼/).map(h => h.trim())
+ console.log('銆愯绋嬨�慜CR璇嗗埆鐨勮绋嬩俊鎭�:', route)
+
+ // 鎸夊绉嶅垎闅旂鍒嗗壊琛岀▼锛�-銆佲�斻��---銆�-->銆佲啋銆佺┖鏍肩瓑
+ const hospitals = route.split(/[-鈥擼{1,3}|-->|鈫抾\s{2,}/).map(h => h.trim()).filter(h => h.length > 0)
+ console.log('銆愯绋嬨�戝垎鍓插悗鐨勫尰闄㈠垪琛�:', hospitals)
+
if (hospitals.length >= 2) {
// 绗竴涓槸杞嚭鍖婚櫌
- this.taskForm.hospitalOut.name = hospitals[0]
- // 绗簩涓槸杞叆鍖婚櫌
- this.taskForm.hospitalIn.name = hospitals[1]
+ const outHospital = hospitals[0]
+ this.taskForm.hospitalOut.name = outHospital
- // 灏濊瘯浠庡尰闄㈠簱涓尮閰嶅苟琛ュ叏鍦板潃
- Promise.all([
- this.findHospitalByName(hospitals[0], 'out', false),
- this.findHospitalByName(hospitals[1], 'in', false)
- ]).then(([outHosp, inHosp]) => {
- if (outHosp) {
- this.taskForm.hospitalOut.id = outHosp.hospId
- this.taskForm.hospitalOut.name = outHosp.hospName
- if (outHosp.hospName !== '瀹朵腑') {
- this.taskForm.hospitalOut.address = this.buildFullAddress(outHosp)
- this.taskForm.hospitalOut.city = outHosp.hopsCity || ''
+ // 濡傛灍杞嚭鍖婚櫌鏄�滃涓�濓紝鎻愬彇鍚庨潰鐨勮缁嗗湴鍧�
+ if (outHospital === '瀹朵腑' && hospitals.length >= 3) {
+ // 灏嗗墿浣欓儴鍒嗕綔涓鸿缁嗗湴鍧�
+ const detailAddress = hospitals.slice(1, hospitals.length - 1).join(' ')
+ if (detailAddress) {
+ this.taskForm.hospitalOut.address = detailAddress
+ console.log('銆愯绋嬨�戣浆鍑哄涓湴鍧�:', detailAddress)
+ }
+ // 鏈�鍚庝竴涓槸杞叆鍖婚櫌
+ this.taskForm.hospitalIn.name = hospitals[hospitals.length - 1]
+ console.log('銆愯绋嬨�戣浆鍏ュ尰闄�:', hospitals[hospitals.length - 1])
+ } else {
+ // 绗簩涓槸杞叆鍖婚櫌
+ const inHospital = hospitals[1]
+ this.taskForm.hospitalIn.name = inHospital
+
+ // 濡傛灉杞叆鍖婚櫌鏄�滃涓�濓紝鎻愬彇鍚庨潰鐨勮缁嗗湴鍧�
+ if (inHospital === '瀹朵腑' && hospitals.length >= 3) {
+ // 灏嗗墿浣欓儴鍒嗕綔涓鸿缁嗗湴鍧�
+ const detailAddress = hospitals.slice(2).join(' ')
+ if (detailAddress) {
+ this.taskForm.hospitalIn.address = detailAddress
+ console.log('銆愯绋嬨�戣浆鍏ュ涓湴鍧�:', detailAddress)
}
}
- if (inHosp) {
- this.taskForm.hospitalIn.id = inHosp.hospId
- this.taskForm.hospitalIn.name = inHosp.hospName
- if (inHosp.hospName !== '瀹朵腑') {
+ }
+
+ // 灏濊瘯浠庡尰闄㈠簱涓尮閰嶅苟琛ュ叏鍦板潃锛堝彧鍦ㄩ潪鈥滃涓�濇椂锛�
+ const outHospitalName = this.taskForm.hospitalOut.name
+ const inHospitalName = this.taskForm.hospitalIn.name
+
+ Promise.all([
+ outHospitalName !== '瀹朵腑' ? this.findHospitalByName(outHospitalName, 'out', false) : Promise.resolve(null),
+ inHospitalName !== '瀹朵腑' ? this.findHospitalByName(inHospitalName, 'in', false) : Promise.resolve(null)
+ ]).then(([outHosp, inHosp]) => {
+ // 澶勭悊杞嚭鍖婚櫌
+ if (outHospitalName !== '瀹朵腑') {
+ if (outHosp) {
+ // 鎵惧埌鍖婚櫌锛屼娇鐢ㄥ尰闄㈠簱涓殑淇℃伅
+ this.taskForm.hospitalOut.id = outHosp.hospId
+ this.taskForm.hospitalOut.name = outHosp.hospName
+ this.taskForm.hospitalOut.address = this.buildFullAddress(outHosp)
+ this.taskForm.hospitalOut.city = outHosp.hopsCity || ''
+ console.log('銆愯绋嬨�戣浆鍑哄尰闄㈠尮閰嶆垚鍔�:', outHosp.hospName)
+ } else {
+ // 鎵句笉鍒板尰闄紝榛樿璁剧疆涓�"瀹朵腑"锛屽師鍖婚櫌鍚嶇О浣滀负鍦板潃
+ console.log('銆愯绋嬨�戣浆鍑哄尰闄㈡湭鎵惧埌锛岄粯璁よ缃负瀹朵腑锛屽湴鍧�涓�:', outHospitalName)
+ this.taskForm.hospitalOut.name = '瀹朵腑'
+ this.taskForm.hospitalOut.address = outHospitalName
+ this.taskForm.hospitalOut.id = null
+ this.taskForm.hospitalOut.city = ''
+ }
+ }
+
+ // 澶勭悊杞叆鍖婚櫌
+ if (inHospitalName !== '瀹朵腑') {
+ if (inHosp) {
+ // 鎵惧埌鍖婚櫌锛屼娇鐢ㄥ尰闄㈠簱涓殑淇℃伅
+ this.taskForm.hospitalIn.id = inHosp.hospId
+ this.taskForm.hospitalIn.name = inHosp.hospName
this.taskForm.hospitalIn.address = this.buildFullAddress(inHosp)
this.taskForm.hospitalIn.city = inHosp.hopsCity || ''
+ console.log('銆愯绋嬨�戣浆鍏ュ尰闄㈠尮閰嶆垚鍔�:', inHosp.hospName)
+ } else {
+ // 鎵句笉鍒板尰闄紝榛樿璁剧疆涓�"瀹朵腑"锛屽師鍖婚櫌鍚嶇О浣滀负鍦板潃
+ console.log('銆愯绋嬨�戣浆鍏ュ尰闄㈡湭鎵惧埌锛岄粯璁よ缃负瀹朵腑锛屽湴鍧�涓�:', inHospitalName)
+ this.taskForm.hospitalIn.name = '瀹朵腑'
+ this.taskForm.hospitalIn.address = inHospitalName
+ this.taskForm.hospitalIn.id = null
+ this.taskForm.hospitalIn.city = ''
}
}
@@ -2013,171 +1997,101 @@
console.log('澶氬浘OCR缁撴灉澶勭悊瀹屾垚锛岃〃鍗曟暟鎹洿鏂�')
},
- // 鎵цOCR璇嗗埆
- performOCR() {
- if (!this.ocrImage) {
- this.$modal.showToast('璇峰厛閫夋嫨鎴栨媿鎽勫浘鐗�')
- return
- }
-
- this.ocrLoading = true
-
- // 浣跨敤OCR API杩涜璇嗗埆
- recognizeImage(this.ocrImage, 'HandWriting', 'tencent', DEFAULT_TRANSFER_ITEM_NAMES)
- .then(response => {
- const ocrResult = response.data.ocrResult
- this.processOCRResult(ocrResult)
- this.$modal.showToast('OCR璇嗗埆鎴愬姛')
- })
- .catch(error => {
- console.error('OCR璇嗗埆澶辫触:', error)
- this.$modal.showToast(`OCR璇嗗埆澶辫触: ${error.msg || '鏈煡閿欒'}`)
- })
- .finally(() => {
- this.ocrLoading = false
- this.closePhotoOCRPopup()
- })
- },
-
- // 澶勭悊OCR璇嗗埆缁撴灉
- processOCRResult(ocrResult) {
- if (!ocrResult || !ocrResult.content) {
- console.log('OCR璇嗗埆缁撴灉涓虹┖')
- return
- }
-
- const content = ocrResult.content
- console.log('OCR璇嗗埆鍐呭:', content)
-
- // 鎻愬彇鎮h�呭鍚�
- const patientNameMatch = content.match(/鎮h�呭鍚峓锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (patientNameMatch && patientNameMatch[1]) {
- this.taskForm.patient.name = patientNameMatch[1].trim()
- }
-
- // 鎻愬彇鎬у埆
- const genderMatch = content.match(/鎬у埆[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (genderMatch && genderMatch[1]) {
- const gender = genderMatch[1].trim()
- if (gender.includes('鐢�')) {
- this.taskForm.patient.gender = 'male'
- } else if (gender.includes('濂�')) {
- this.taskForm.patient.gender = 'female'
- }
- }
-
- // 鎻愬彇韬唤璇佸彿
- const idCardMatch = content.match(/韬唤璇佸彿[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- const signerIdMatch = content.match(/绛惧瓧浜鸿韩浠借瘉鍙风爜[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (idCardMatch && idCardMatch[1]) {
- this.taskForm.patient.idCard = idCardMatch[1].trim()
- } else if (signerIdMatch && signerIdMatch[1]) {
- this.taskForm.patient.idCard = signerIdMatch[1].trim()
- }
-
- // 鎻愬彇鑱旂郴鐢佃瘽
- const phoneMatch = content.match(/鑱旂郴鐢佃瘽[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (phoneMatch && phoneMatch[1]) {
- this.taskForm.patient.phone = phoneMatch[1].trim()
- }
-
- // 鎻愬彇璇婃柇淇℃伅
- const diagnosisMatch = content.match(/璇婃柇[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (diagnosisMatch && diagnosisMatch[1]) {
- this.taskForm.patient.condition = diagnosisMatch[1].trim()
- }
-
- // 鎻愬彇闇�鏀粯杞繍璐圭敤锛堟垚浜や环锛�
- const priceMatch = content.match(/闇�鏀粯杞繍璐圭敤[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (priceMatch && priceMatch[1]) {
- // 鎻愬彇鏁板瓧閲戦
- const priceNumber = priceMatch[1].match(/\d+(?:\.\d{1,2})?/)
- if (priceNumber) {
- this.taskForm.price = parseFloat(priceNumber[0]).toFixed(2)
- }
- }
-
- // 鎻愬彇鏃ユ湡
- const dateMatch = content.match(/鏃ユ湡[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (dateMatch && dateMatch[1]) {
- const dateString = dateMatch[1].trim()
- // 灏濊瘯瑙f瀽鏃ユ湡鏍煎紡
- const dateFormatted = this.formatDateString(dateString)
- if (dateFormatted) {
- this.taskForm.transferTime = dateFormatted
- }
- }
-
- // 鎻愬彇琛岀▼锛堣浆鍑哄尰闄㈠拰杞叆鍖婚櫌锛�
- const routeMatch = content.match(/琛岀▼[锛�:]?\s*([^\n]+)/)
- if (routeMatch && routeMatch[1]) {
- const route = routeMatch[1].trim()
- // 鎸�"-"鍒嗗壊琛岀▼锛岃幏鍙栬浆鍑哄拰杞叆鍖婚櫌
- const hospitals = route.split(/[-鈥擼/).map(h => h.trim())
- if (hospitals.length >= 2) {
- // 绗竴涓槸杞嚭鍖婚櫌
- this.taskForm.hospitalOut.name = hospitals[0]
- // 绗簩涓槸杞叆鍖婚櫌
- this.taskForm.hospitalIn.name = hospitals[1]
- }
- }
-
- // 鎻愬彇瀹跺睘绛惧悕鎴栨湰浜轰綔涓鸿仈绯讳汉
- const familyContactMatch = content.match(/(?:瀹跺睘绛惧悕|鏈汉)[锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (familyContactMatch && familyContactMatch[1]) {
- this.taskForm.patient.contact = familyContactMatch[1].trim()
- }
-
- // 鎻愬彇鎮h�呯鍚嶏紙鎵嬪嵃锛変綔涓鸿仈绯讳汉
- const patientSignatureMatch = content.match(/鎮h�呯鍚嶏紙鎵嬪嵃锛塠锛�:]?\s*([^\n锛�,銆傦紱;]+)/)
- if (patientSignatureMatch && patientSignatureMatch[1]) {
- if (!this.taskForm.patient.contact) {
- this.taskForm.patient.contact = patientSignatureMatch[1].trim()
- }
- }
-
- console.log('OCR缁撴灉澶勭悊瀹屾垚锛岃〃鍗曟暟鎹洿鏂�')
- },
-
// 鏍煎紡鍖栨棩鏈熷瓧绗︿覆锛堣繑鍥� yyyy-MM-dd HH:mm:ss 鏍煎紡锛�
formatDateString(dateStr) {
// 灏濊瘯涓嶅悓鐨勬棩鏈熸牸寮�
- let cleaned = dateStr.replace(/[骞存湀]/g, '-').replace(/[鏃ュ彿]/g, '')
+ // 鏀寔鏍煎紡锛�
+ // - yyyy骞碝M鏈坉d鏃H鏃秏m鍒�
+ // - yyyy骞碝M鏈坉d鏃�
+ // - YYYYMMDD
+ // - yyyy-MM-dd HH:mm:ss
+ console.log('灏濊瘯鏍煎紡鍖栨棩鏈熷瓧绗︿覆:', dateStr)
+
+ // 濡傛灉杈撳叆涓虹┖鎴栨棤鏁堬紝杩斿洖绌哄瓧绗︿覆
+ if (!dateStr || typeof dateStr !== 'string') {
+ console.warn('鏃ユ湡瀛楃涓叉棤鏁�:', dateStr)
+ return ''
+ }
+
+ // 娓呮礂鏃ユ湡瀛楃涓�
+ let cleaned = dateStr
+ .replace(/[骞存湀]/g, '-')
+ .replace(/[鏃ュ彿]/g, ' ') // 鏃�/鍙� 鈫� 绌烘牸锛屼繚鐣欐棩鏈熷拰鏃堕棿鐨勫垎闅�
+ .replace(/鏃�/g, ':')
+ .replace(/鍒�/g, ':')
+ .replace(/绉�/g, '')
+ .replace(/\s+/g, ' ') // 澶氫釜绌烘牸鍚堝苟涓轰竴涓�
+ .trim()
+
+ console.log('娓呯悊鍚庣殑鏃ユ湡瀛楃涓�:', cleaned)
+
+ // 鍒嗙鏃ユ湡鍜屾椂闂撮儴鍒�
+ const parts = cleaned.split(' ')
+ let datePart = parts[0] || ''
+ let timePart = parts[1] || ''
let dateResult = ''
+ // 澶勭悊鏃ユ湡閮ㄥ垎
// 濡傛灉鏄痀YMMDD鏍煎紡
- if (/^\d{6}$/.test(cleaned)) {
- const year = '20' + cleaned.substring(0, 2)
- const month = cleaned.substring(2, 4)
- const day = cleaned.substring(4, 6)
+ if (/^\d{6}$/.test(datePart)) {
+ const year = '20' + datePart.substring(0, 2)
+ const month = datePart.substring(2, 4)
+ const day = datePart.substring(4, 6)
dateResult = `${year}-${month}-${day}`
}
// 濡傛灉鏄痀YYYMMDD鏍煎紡
- else if (/^\d{8}$/.test(cleaned)) {
- const year = cleaned.substring(0, 4)
- const month = cleaned.substring(4, 6)
- const day = cleaned.substring(6, 8)
+ else if (/^\d{8}$/.test(datePart)) {
+ const year = datePart.substring(0, 4)
+ const month = datePart.substring(4, 6)
+ const day = datePart.substring(6, 8)
dateResult = `${year}-${month}-${day}`
}
- // 濡傛灉宸茬粡鏄悎鐞嗘牸寮忥紝鐩存帴浣跨敤
- else if (cleaned.match(/^\d{4}[-/]\d{1,2}[-/]\d{1,2}$/)) {
- dateResult = cleaned.replace(/[//]/g, '-')
- }
- // 濡傛灉宸茬粡鍖呭惈鏃跺垎绉掞紝鐩存帴杩斿洖
- else if (cleaned.match(/^\d{4}[-/]\d{1,2}[-/]\d{1,2}\s+\d{1,2}:\d{1,2}:\d{1,2}$/)) {
- return cleaned.replace(/[//]/g, '-')
+ // 濡傛灉鏄痽yyy-MM-dd鎴杫yyy/MM/dd鏍煎紡
+ else if (datePart.match(/^\d{4}[-\/]\d{1,2}[-\/]\d{1,2}$/)) {
+ dateResult = datePart.replace(/\//g, '-')
}
else {
- dateResult = dateStr
+ dateResult = datePart
}
- // 濡傛灉鏃ユ湡鏍煎紡姝g‘锛屾坊鍔犻粯璁ゆ椂鍒嗙 00:00:00
- if (dateResult && dateResult.match(/^\d{4}-\d{1,2}-\d{1,2}$/)) {
- return dateResult + ' 00:00:00'
+ // 楠岃瘉鏃ユ湡閮ㄥ垎鏄惁鏈夋晥
+ if (!dateResult.match(/^\d{4}-\d{1,2}-\d{1,2}$/)) {
+ console.warn('鏃ユ湡鏍煎紡涓嶆纭�:', dateResult)
+ return ''
}
- return dateResult
+ // 澶勭悊鏃堕棿閮ㄥ垎
+ let timeResult = '00:00:00' // 榛樿鏃堕棿
+
+ if (timePart) {
+ // 绉婚櫎鏈熬澶氫綑鐨勫啋鍙�
+ timePart = timePart.replace(/:+$/, '')
+
+ // 鍒嗗壊鏃躲�佸垎銆佺
+ const timeParts = timePart.split(':')
+ const hour = timeParts[0] || '00'
+ const minute = timeParts[1] || '00'
+ const second = timeParts[2] || '00'
+
+ // 楠岃瘉鏃堕棿鏁板瓧鏄惁鏈夋晥
+ const hourNum = parseInt(hour, 10)
+ const minuteNum = parseInt(minute, 10)
+ const secondNum = parseInt(second, 10)
+
+ if (!isNaN(hourNum) && !isNaN(minuteNum) && !isNaN(secondNum) &&
+ hourNum >= 0 && hourNum < 24 && minuteNum >= 0 && minuteNum < 60 && secondNum >= 0 && secondNum < 60) {
+ // 琛ラ綈涓や綅鏁�
+ timeResult = `${String(hourNum).padStart(2, '0')}:${String(minuteNum).padStart(2, '0')}:${String(secondNum).padStart(2, '0')}`
+ } else {
+ console.warn('鏃堕棿鏁板�艰秴鍑鸿寖鍥达紝浣跨敤榛樿鍊�00:00:00')
+ }
+ }
+
+ const finalResult = `${dateResult} ${timeResult}`
+ console.log('鏈�缁堟牸寮忓寲缁撴灉:', finalResult)
+
+ return finalResult
}
}
}
--
Gitblit v1.9.1