6 changed files with 113 additions and 15 deletions
-
13src/App.vue
-
2src/router/index.ts
-
12src/services/sysConfig/sysConfig.ts
-
41src/stores/setting.ts
-
32src/views/addLiquid/addLiquid.vue
-
28src/views/oreManage/components/StepItemEx.vue
@ -0,0 +1,32 @@ |
|||||
|
<template> |
||||
|
<div class="component-page"> |
||||
|
<section class="overflow-auto"> |
||||
|
<div v-for="container in settingStore.heatContainers" :key="container.id" class="flex items-center gap-4 p-2"> |
||||
|
<p class="min-w-16">容器 {{ container.id }}:</p> |
||||
|
<el-select |
||||
|
v-model="container.solutionId" |
||||
|
placeholder="Select" |
||||
|
style="width: 200px" |
||||
|
@change="onChange($event, container)"> |
||||
|
<el-option v-for="item in settingStore.liquidList" :key="item.id" :label="item.name" :value="item.id" /> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</section> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { useSettingStore } from "@/stores/setting"; |
||||
|
import { updateContainer, type Container } from "@/services/sysConfig/sysConfig"; |
||||
|
import { showToast } from "vant"; |
||||
|
|
||||
|
const settingStore = useSettingStore(); |
||||
|
|
||||
|
function onChange(value: number, container: Container) { |
||||
|
updateContainer(container.id, value).then(res => { |
||||
|
if (res.success) { |
||||
|
} else { |
||||
|
showToast(res.msg); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
</script> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue