|
@@ -1,6 +1,7 @@
|
|
|
|
|
|
const qs = require('qs');
|
|
|
const imageUrlPrefix = 'http://192.168.2.241:82' //后台图片地址
|
|
|
+// const imageUrlPrefix = 'http://192.168.2.236:82' //后台图片地址
|
|
|
|
|
|
const getUrlArgObject = (parm) => {
|
|
|
let query = window.location.search;
|
|
@@ -16,9 +17,31 @@ const deepClone = (arr) =>{
|
|
|
return newArr;
|
|
|
}
|
|
|
|
|
|
+const getExpStr = (str) =>{
|
|
|
+ let result = {}
|
|
|
+ if(str.match(/\${number_(.*})/)){//数字输入框
|
|
|
+ let matchStr = str.match(/\${number_(.*})/)[0]
|
|
|
+ result = {
|
|
|
+ type:'number',
|
|
|
+ placeholder:matchStr.split('${number_')[1].split('}')[0],
|
|
|
+ prefix:str.split(matchStr)[0]||'',
|
|
|
+ suffix:str.split(matchStr)[1]||''
|
|
|
+ }
|
|
|
+ }else if(str.match(/\${input_(.*})/)){
|
|
|
+ let matchStr = str.match(/\${input_(.*})/)[0]
|
|
|
+ result = {
|
|
|
+ type:'text',
|
|
|
+ placeholder:matchStr.split('${input_')[1].split('}')[0],
|
|
|
+ prefix:str.split(matchStr)[0]||'',
|
|
|
+ suffix:str.split(matchStr)[1]||''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result
|
|
|
+}
|
|
|
+// 多行输入 多个输入框
|
|
|
const getModelExpStr = (str,txt) =>{
|
|
|
let result = {}
|
|
|
- console.log(str,txt,44444)
|
|
|
+ // console.log(str,txt,44444)
|
|
|
if(str.match(/\${number_(.*})/)){//数字输入框
|
|
|
let matchStr = str.match(/\${number_(.*})/)[0]
|
|
|
let tmpHolder = matchStr.split('${number_')[1].split('}')[0]
|
|
@@ -142,7 +165,8 @@ module.exports = {
|
|
|
getAllStr,
|
|
|
moduleConfig,
|
|
|
patt,
|
|
|
- moduleCP
|
|
|
+ moduleCP,
|
|
|
+ getExpStr
|
|
|
}
|
|
|
|
|
|
|