2000反馈问题修改

main
limingyuan 1 year ago
parent 2b542dea6f
commit 7160005d96

2
components.d.ts vendored

@ -40,7 +40,5 @@ declare module '@vue/runtime-core' {
VanIcon: typeof import('vant/es')['Icon']
VanOverlay: typeof import('vant/es')['Overlay']
VanSlider: typeof import('vant/es')['Slider']
VanSwipe: typeof import('vant/es')['Swipe']
VanSwipeItem: typeof import('vant/es')['SwipeItem']
}
}

@ -132,8 +132,11 @@ const routerBack = () => {
loginStore.userInfo = []
loginStore.token = ''
sessionStorage.removeItem("selectTrmina")
}else if(currentPath.value === '/cabinetManage/parameterInfo'){
router.push('/home')
}else {
router.go(-1)
// router.push('/' + `${routerStore.backPath}`)
}
}
@ -206,9 +209,9 @@ const toWarningModal = () =>{
</div> -->
<!-- <div> -->
<div class="right-btn">
<div class="btn-img" @click="toWarningModal">
<!-- <div class="btn-img" @click="toWarningModal">
<img src="../../assets/imgs/home/warning.png" />
</div>
</div> -->
<div class="lay-button lay-button-admin" @click=" changeValue = !changeValue"
v-if="hiddenRouter.indexOf(currentPath) == -1 && loginStore.userInfo?.length == loginStore.loginNum">
<div class="btn-name">

@ -22,12 +22,12 @@ const changeLable = (index) => {
}
// changeLable()
active.value =props.value
console.log(active.value,'照名数值',props.value)
// watch(() => props.value, (a, b) => {
// console.log(active.value,'',props.value)
watch(() => props.value, (a, b) => {
// console.log(a,':', b);
// active.value =b
// //
// });
active.value = a
//
});
</script>
<template>
<div class="container-wk">

@ -3,7 +3,7 @@ import { ref, reactive } from "vue"
import sel_label from "./components/label.vue"
import sel_labelTwo from "./components/labelTwo.vue"
// import sel_input from '@/components/SelInput/index.vue'
import { updateDateConfig } from "@/api/cabinet"
import { queryCabinetList, updateDateConfig } from "@/api/cabinet"
import { useRoute } from "vue-router"
import { showNotify, showToast } from 'vant'
import { useStore } from "@/store"
@ -22,6 +22,10 @@ const Temperature = reactive({
name: '整机控温',
id: 1
},
{
name: '左右控温',
id: 2
},
{
name: '无控温',
id: 3
@ -46,7 +50,12 @@ const light = reactive({
]
})
let cabinetsData = reactive({})
const params = {
page_no: 1,
page_size: 10,
keyWorld: ''
}
const formTest = reactive<any>({
type: 2,
@ -73,39 +82,45 @@ const formValue = reactive<any>({
const form = reactive<any>({
})
console.log(cabinetStore.cabinetConfig, '柜体参数配置1', cabinetStore.cabinetConfig.type)
formValue.light_config = cabinetStore.cabinetConfig.light_config
Object.assign(formValue, cabinetStore.cabinetConfig)
if (Object.keys(cabinetStore.cabinetConfig).length) {
formValue.defrost_config = cabinetStore.cabinetConfig.defrost_config
formValue.fan_config = cabinetStore.cabinetConfig.fan_config
formValue.temp_out = cabinetStore.cabinetConfig.temp_out
formValue.heat_config = cabinetStore.cabinetConfig.heat_config
formValue.light_config = cabinetStore.cabinetConfig.light_config
formValue.type = cabinetStore.cabinetConfig.type;
formValue.all_temperature = cabinetStore.cabinetConfig.all_temperature
if (cabinetStore.cabinetConfig.temperature.length == 0) {
const queryList = async () => {
const res = await queryCabinetList(params)
// res.data.cabinets.forEach((item: any) => {
// cabinetsData.push(item)
// })
cabinetsData = res.data.cabinets[0].params;
// console.log(cabinetsData,'')
formValue.light_config = cabinetsData.light_config
Object.assign(formValue, cabinetsData)
if (Object.keys(cabinetsData).length) {
formValue.defrost_config = cabinetsData.defrost_config
formValue.fan_config = cabinetsData.fan_config
formValue.temp_out = cabinetsData.temp_out
formValue.heat_config = cabinetsData.heat_config
formValue.light_config = cabinetsData.light_config
formValue.type = cabinetsData.type;
formValue.all_temperature = cabinetsData.all_temperature
if (cabinetsData.temperature.length == 0) {
// formValue.type = 0
} else if (cabinetStore.cabinetConfig.temperature.length == 1) {
} else if (cabinetsData.temperature.length == 1) {
// formValue.type = 1
formValue.all_temperature = cabinetStore.cabinetConfig.all_temperature
formValue.all_temperature = cabinetsData.all_temperature
} else {
// formValue.type = 2
formValue.left_temperature = cabinetStore.cabinetConfig.temperature[0] ? cabinetStore.cabinetConfig.temperature[0] : 0
formValue.right_temperature = cabinetStore.cabinetConfig.temperature[1] ? cabinetStore.cabinetConfig.temperature[1] : 0
formValue.left_temperature = cabinetsData.temperature[0] ? cabinetsData.temperature[0] : 0
formValue.right_temperature = cabinetsData.temperature[1] ? cabinetsData.temperature[1] : 0
}
}
}
console.log(formValue, '回显参数29', cabinetStore.cabinetConfig)
queryList()
const saveForm = async () => {
console.log(formValue.type, '......')
console.log(formValue, '......')
if (formValue.type == 1) {
// delete formValue.left_temperature
// delete formValue.right_temperature
@ -137,7 +152,11 @@ const saveForm = async () => {
form.light_config = formValue.light_config;
form.filterExpire = formValue.filterExpire;
form.defrosWarning = formValue.defrosWarning;
// const data = { id, json: form }
// let id = 'ed94d085-a0b8-413e-a79b-8abff1cd08e3';
let id = 'a0c0fa54-bdeb-42f7-bd9d-1fdffed58eea';
const data = { id, json: form }
// console.log(data,'ppp')
const res = await updateDateConfig(data)
if (res.code == 200) {
showNotify({ message: '保存成功!', type: 'success' })
@ -158,7 +177,7 @@ const changelightConfig = async (val: any) => {
<div class="select-type">
<sel_label :label="Temperature" :value="formValue.type" @update:modelValue="changeType"></sel_label>
</div>
<!-- <div class="wd-seting" v-if="formValue.type == 2">
<div class="wd-seting" v-if="formValue.type == 2">
<div class="wd-seting-item">
<div class="lable">左区温控设值</div>
<vxe-input v-model="formValue.left_temperature" type="number" min="-30" max="40"></vxe-input>
@ -174,8 +193,8 @@ const changelightConfig = async (val: any) => {
<vxe-input v-model="formValue.temp_out" type="number" min="5"></vxe-input>
<div class="menu"></div>
</div>
</div> -->
<!-- <div class="wd-seting">
</div>
<div class="wd-seting" v-if="formValue.type == 1">
<div class="wd-seting-item">
<div class="lable">整机温控定值</div>
<vxe-input v-model="formValue.all_temperature" type="number" min="-30" max="40"></vxe-input>
@ -186,7 +205,7 @@ const changelightConfig = async (val: any) => {
<vxe-input v-model="formValue.temp_out" type="number" min="5"></vxe-input>
<div class="menu"></div>
</div>
</div> -->
</div>
<div class="select-type">
<sel_labelTwo :label="light" @change="changelightConfig" :value="formValue.light_config"></sel_labelTwo>
</div>

@ -2,7 +2,7 @@
* @Author: limingyuan 13613947821@163.com
* @Date: 2024-01-03 08:40:07
* @LastEditors: limingyuan 13613947821@163.com
* @LastEditTime: 2024-01-05 08:52:55
* @LastEditTime: 2024-01-15 14:27:51
* @FilePath: \rms-terminal-frontend-portrait\vite.config.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -53,7 +53,8 @@ export default defineConfig({
// target: 'http://192.168.0.66:8000/api/',
// target: 'http://192.168.2.117:8000/api/',
// target: 'http://192.168.2.100:8000/api/', //展厅
target: 'http://192.168.100.64:8000/api/', //曹工
// target: 'http://192.168.100.64:8000/api/', //曹工
target: 'http://192.168.10.104:8000/api/', //柜机
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},

Loading…
Cancel
Save