|
@@ -273,6 +273,10 @@
|
|
|
return result;
|
|
|
});
|
|
|
},
|
|
|
+ //字符串中的 "平" 字符替换为 "㎡"
|
|
|
+ convertPingToSquareMeter(text) {
|
|
|
+ return text.replace(/(\d+)(平)/g, '$1㎡'); // 使用正则表达式替换
|
|
|
+ },
|
|
|
extractNumber(text) {
|
|
|
const parts = text.split('第')[1]; // 分割并获取数字部分
|
|
|
return parts ? (parseInt(parts, 10) - 1) : null; // 转换为整数
|
|
@@ -311,6 +315,7 @@
|
|
|
// console.warn("****pinyin***", pinyin)
|
|
|
// text = pinyin;
|
|
|
text = this.convertChineseToArabic(text); //中文数字转为阿拉伯数字
|
|
|
+ text = this.convertPingToSquareMeter(text);
|
|
|
let houseIndex = this.backwardNumber(text);//获取文字里面的数字 倒数第三个 类似这样的
|
|
|
if(houseIndex){
|
|
|
houseIndex = this.houseList.length - houseIndex;
|