修改 上报库管理的id生成
This commit is contained in:
@@ -966,8 +966,19 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
generateRandom() {
|
||||
return Math.random().toString(32)
|
||||
generateRandom(size = 16) {
|
||||
let urlAlphabet =
|
||||
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
|
||||
|
||||
let id = ''
|
||||
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
||||
let i = size
|
||||
while (i--) {
|
||||
// `| 0` is more compact and faster than `Math.floor()`.
|
||||
id += urlAlphabet[(Math.random() * 64) | 0]
|
||||
}
|
||||
return id
|
||||
// return Math.random().toString(32)
|
||||
},
|
||||
addconfig() {
|
||||
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
|
||||
|
||||
@@ -728,8 +728,8 @@
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="addconfig" class='addicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<div @click="addconfig" class='addicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
@@ -840,15 +840,29 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
generateRandom() {
|
||||
return Math.random().toString(32)
|
||||
generateRandom(size = 16) {
|
||||
|
||||
let urlAlphabet =
|
||||
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
|
||||
|
||||
let id = ''
|
||||
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
||||
let i = size
|
||||
while (i--) {
|
||||
// `| 0` is more compact and faster than `Math.floor()`.
|
||||
id += urlAlphabet[(Math.random() * 64) | 0]
|
||||
}
|
||||
return id
|
||||
// return Math.random().toString(32)
|
||||
},
|
||||
|
||||
addconfig() {
|
||||
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
|
||||
for (let i = 0; i < paramsConfigData.length; i++) {
|
||||
if (i == paramsConfigData.length - 1) {
|
||||
let name = paramsConfigData[i]
|
||||
let generateRandom = this.generateRandom()
|
||||
console.log(generateRandom)
|
||||
this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name]))
|
||||
this.detailDate.paramsConfigData[generateRandom].forEach(res => {
|
||||
if (res.type === 'pull_more') {
|
||||
|
||||
Reference in New Issue
Block a user