|
|
@ -1,30 +1,48 @@ |
|
|
|
<template> |
|
|
|
<div class="appClass" v-if="isVip"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12" style="padding: 8px;height: 100vh;"> |
|
|
|
<el-form :model="form" label-width="auto" @submit.prevent> |
|
|
|
<el-form-item label="范围:" style="padding: 8px 0;"> |
|
|
|
<el-col :span="12" style="padding: 8px; text-align:center;height: 100vh;"> |
|
|
|
<el-row> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<span>范围:</span> |
|
|
|
<el-input-number v-model="form.min" :step="1" style="width: 130px;" /> |
|
|
|
<span>-</span> |
|
|
|
<el-input-number v-model="form.max" :step="1" style="width: 130px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="小数位数:" style="padding: 8px 0;"> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<span>小数位数:</span> |
|
|
|
<el-input-number v-model="form.weishu" :step="1" style="width: 130px;" :min="0" :max="12" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="每组个数:" style="padding: 8px 0;"> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<span>每组个数:</span> |
|
|
|
<el-input-number v-model="form.geshu" :step="1" style="width: 130px;" :min="0" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="生成组数:" style="padding: 8px 0;"> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<span>生成组数:</span> |
|
|
|
<el-input-number v-model="form.zushu" :step="1" style="width: 130px;" :min="0" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<el-button type="primary" @click="onSubmit">随机数生成</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<span>现场干密度:</span> |
|
|
|
<el-input-number v-model="secondObj.first" style="width: 230px;" :min="0" /> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<span>击实最大干密度:</span> |
|
|
|
<el-input-number v-model="secondObj.second" style="width: 230px;" :min="0" /> |
|
|
|
</el-col> |
|
|
|
<el-col class="colStyle"> |
|
|
|
<el-input v-model="secondObj.result" style="width: 330px;" placeholder="Please input" disabled> |
|
|
|
<template #prepend>压实度:</template> |
|
|
|
<template #append>%</template> |
|
|
|
</el-input> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-input v-model="resultStr" :rows="27" type="textarea" /> |
|
|
|
<el-button type="primary" @click="copyJIhuoma" style="margin: 8px;">随机数生成</el-button> |
|
|
|
<el-button type="primary" @click="copyJIhuoma" style="margin: 8px;">随机数复制</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
@ -53,10 +71,30 @@ export default { |
|
|
|
geshu: 3, |
|
|
|
zushu: 8, |
|
|
|
}, |
|
|
|
secondObj: { |
|
|
|
first: 0, |
|
|
|
second: 1, |
|
|
|
result: 0, |
|
|
|
}, |
|
|
|
result: [], |
|
|
|
resultStr: "", |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
"secondObj.first": { |
|
|
|
handler: function (nvl, ovl) { |
|
|
|
this.dealResult() |
|
|
|
}, |
|
|
|
deep: true, |
|
|
|
}, |
|
|
|
"secondObj.second": { |
|
|
|
handler: function (nvl, ovl) { |
|
|
|
this.dealResult() |
|
|
|
}, |
|
|
|
deep: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
methods: { |
|
|
|
onSubmit() { |
|
|
|
// console.log(this.form) |
|
|
@ -97,7 +135,15 @@ export default { |
|
|
|
} catch (err) { |
|
|
|
alert('无法复制,请手动选择复制'); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
dealResult() { |
|
|
|
if (this.secondObj.second === 0) { |
|
|
|
ElMessage.error('击实最大干密度不能为0') |
|
|
|
} else { |
|
|
|
let result = Number((this.secondObj.first / this.secondObj.second).toFixed(2)) |
|
|
|
this.secondObj.result = result * 100 |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
async mounted() { |
|
|
|
let fiveDay = dayjs('2024-10-15T00:00:00').valueOf() |
|
|
@ -110,8 +156,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: {}, |
|
|
|
computed: {} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
@ -121,6 +166,10 @@ export default { |
|
|
|
color: #000; |
|
|
|
} |
|
|
|
|
|
|
|
.colStyle { |
|
|
|
margin-bottom: 32px; |
|
|
|
} |
|
|
|
|
|
|
|
.noVip { |
|
|
|
text-align: center; |
|
|
|
margin-top: 40vh; |
|
|
|