update 料位“
This commit is contained in:
parent
5a1f8d894d
commit
c5703b4b88
@ -11,7 +11,13 @@
|
|||||||
|
|
||||||
<div class="storage-body" style="height: 120px; display: flex">
|
<div class="storage-body" style="height: 120px; display: flex">
|
||||||
<div class="storage-box__bg" style="height: 100%; width: 48px; margin-right: 12px; border-radius: 4px; overflow: hidden">
|
<div class="storage-box__bg" style="height: 100%; width: 48px; margin-right: 12px; border-radius: 4px; overflow: hidden">
|
||||||
<div class="storage-box__inner" style="position: absolute; bottom: 0; left: 0; height: 65%; width: 100%" :style="{ background: color }"></div>
|
<div
|
||||||
|
class="storage-box__inner"
|
||||||
|
style="position: absolute; bottom: 0; left: 0; height: 0; width: 100%; font-size: 1.125rem; text-align: center;"
|
||||||
|
:style="{ background: color, height: computedRatio + '%', color: computedRatio > 20 ? 'white' : '#ccc' }"
|
||||||
|
>
|
||||||
|
<span style="height: 100%; display: flex; flex-direction: column; justify-content: flex-end;">{{ computedRatio + '%' }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: flex; flex-direction: column; min-width: 128px; justify-content: space-between">
|
<div style="display: flex; flex-direction: column; min-width: 128px; justify-content: space-between">
|
||||||
@ -56,8 +62,12 @@ export default {
|
|||||||
},
|
},
|
||||||
unitValue: {
|
unitValue: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null,
|
||||||
}
|
},
|
||||||
|
ratio: {
|
||||||
|
type: Number,
|
||||||
|
default: 0.0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -66,9 +76,12 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
computedUnit() {
|
computedUnit() {
|
||||||
if (!this.unitValue) return '存量'
|
if (!this.unitValue) return "存量";
|
||||||
return this.unitList(this.unitValue)+' 存量'
|
return this.unitList(this.unitValue) + " 存量";
|
||||||
},
|
},
|
||||||
|
computedRatio() {
|
||||||
|
return this.ratio ? this.ratio.toFixed(2) * 100 : 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
:material="st.material ?? '默认物料'"
|
:material="st.material ?? '默认物料'"
|
||||||
:total="2"
|
:total="2"
|
||||||
:unit-value="st.unitDictValue"
|
:unit-value="st.unitDictValue"
|
||||||
|
:ratio="st.ratio"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -60,6 +61,7 @@
|
|||||||
:material="st.material ?? '默认物料'"
|
:material="st.material ?? '默认物料'"
|
||||||
:total="2"
|
:total="2"
|
||||||
:unit-value="st.unitDictValue"
|
:unit-value="st.unitDictValue"
|
||||||
|
:ratio="st.ratio"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -89,6 +91,7 @@
|
|||||||
:material="st.material ?? '默认物料'"
|
:material="st.material ?? '默认物料'"
|
||||||
:total="2"
|
:total="2"
|
||||||
:unit-value="st.unitDictValue"
|
:unit-value="st.unitDictValue"
|
||||||
|
:ratio="st.ratio"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,7 +69,7 @@ export default function () {
|
|||||||
|
|
||||||
const dialogConfigs = {
|
const dialogConfigs = {
|
||||||
extraIds: { wsId: 4 }, // 工艺管理里面的相关模块的 dialogWithMenu 需要额外的工序 id
|
extraIds: { wsId: 4 }, // 工艺管理里面的相关模块的 dialogWithMenu 需要额外的工序 id
|
||||||
menu: [{ name: "压制工艺", key: 'info' }, { name: "工艺参数", key: 'attr', onlyEditMode: true }],
|
menu: [{ name: "检测工艺", key: 'info' }, { name: "工艺参数", key: 'attr', onlyEditMode: true }],
|
||||||
form: {
|
form: {
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user