修改轮胎安装

master
夜笙歌 2 years ago
parent c65c1c7784
commit 1eb328bf53

@ -1,9 +1,9 @@
import request from '@/utils/request'
// 查询列表
export function getList(query) {
export function listCarQueue(query) {
return request({
url: '/basetyre/tyre/list',
url: '/carqueue/carqueue/carQueuelist',
method: 'get',
params: query
})

@ -2,29 +2,20 @@
<div class="app-container">
<el-form :model="form" inline label-width="80px">
<el-form-item label="所属车队">
<el-select v-model="form.params1" placeholder="Select">
<el-select v-model="form.carQueue" placeholder="请选择" @change="carQueueChange">
<el-option
v-for="item in option1"
v-for="item in carQueueOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="车头牌号">
<el-select v-model="form.params2" placeholder="Select">
<el-form-item label="车牌号">
<el-select v-model="form.licenseNumber" :disabled='isLicenseNumber' placeholder="请选择"
@change="licenseNumberChange">
<el-option
v-for="item in option2"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="布局挂数">
<el-select v-model="form.params3" placeholder="Select">
<el-option
v-for="item in option3"
v-for="item in licenseNumberOption"
:key="item.value"
:label="item.label"
:value="item.value"
@ -35,12 +26,12 @@
<div style="display: inline-block;width: 560px;height:auto">
<div class="bg" style="margin-right: 40px;">
<div v-for="(item,index) in arr">
<div class="item">
<div class="item" @click="tyreClick(index,1,1)">
<div class="circle">
<span>{{ index + 1 }}排左侧外胎</span>
</div>
</div>
<div class="item">
<div class="item" @click="tyreClick(index,1,2)">
<div :style="item === 2? '':'display:none'" class="circle">
<span>{{ index + 1 }}排左侧内胎</span>
</div>
@ -49,13 +40,13 @@
</div>
<div class="bg">
<div v-for="(item,index) in arr">
<div class="item">
<div class="item" @click="tyreClick(index,2,1)">
<div :style="item === 2? '':'display:none'" class="circle">
<span>{{ index + 1 }}排右侧内胎</span>
</div>
</div>
<div class="item">
<div class="circle">
<div class="circle" @click="tyreClick(index,2,2)">
<span>{{ index + 1 }}排右侧外胎</span>
</div>
</div>
@ -75,13 +66,6 @@
</template>
</el-input>
</el-form-item>
<el-form-item label="RFID" style="width: 100%;">
<el-input v-model="form2.params3">
<template #append>
<el-button :icon="Search"/>
</template>
</el-input>
</el-form-item>
<el-form-item label="轮胎品牌" style="width: 100%;">
<el-select v-model="form2.params4" placeholder="Select">
<el-option
@ -106,7 +90,11 @@
<el-input v-model="form2.params6"/>
</el-form-item>
<el-form-item label="当前花纹深度" style="width: 100%;">
<el-input-number v-model="form2.params7" :step="0.1" :precision="2"/>
<el-input-number v-model="form2.params7" :precision="2" :step="0.1"/>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="installClick">/</el-button>
<el-button @click="uninstallClick"></el-button>
</el-form-item>
</el-form>
</div>
@ -114,7 +102,7 @@
</template>
<script name="basetyre" setup>
import {getList} from "@/api/tireManagement/install";
import {listCarQueue} from "@/api/tireManagement/install";
import {Search} from '@element-plus/icons-vue'
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
@ -124,6 +112,10 @@ const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable");
const isLicenseNumber = ref(true)
const carQueueList = ref([])
const carQueueOption = ref([])
const licenseNumberOption = ref([])
const item = '10T1-1|2-2|3-2|4-1|5-2|6-1|'
const arr = ref([])
@ -133,9 +125,8 @@ arr.value = (item?.split('T')[1]?.split('|').filter(e => e !== '') || []).map((r
console.log(arr.value)
const form = ref({
params1: '',
params2: '',
params3: '',
carQueue: '',
licenseNumber: '',
})
const form2 = ref({
params1: '',
@ -174,20 +165,7 @@ const option2 = [
label: 'Option3',
},
]
const option3 = [
{
value: 'Option1',
label: 'Option1',
},
{
value: 'Option2',
label: 'Option2',
},
{
value: 'Option3',
label: 'Option3',
},
]
const option4 = [
{
value: 'Option1',
@ -217,6 +195,43 @@ const option5 = [
},
]
const tyreClick = (index, dir, e) => {
let param1 = index + 1
let param2 = index + 1
let param3 = index + 1
console.log(index, dir, e)
}
const getList = async () => {
let {rows: queueList} = await listCarQueue()
carQueueList.value = queueList
carQueueOption.value = queueList.map(e => {
return {
label: e.title,
value: e.id
}
})
}
const carQueueChange = (e) => {
form.value.licenseNumber = null
let option = carQueueList.value.filter(res => res.id === e)[0]?.baseCarList || []
option.length !== 0 ? isLicenseNumber.value = false : isLicenseNumber.value = true
licenseNumberOption.value = option.map(e => {
return {
label: e.carLicense,
value: e.id
}
})
}
const licenseNumberChange = (e) => {
console.log(form.value)
}
const installClick = () => {
console.log(form2.value)
}
const uninstallClick = () => {
console.log(form2.value)
}
getList()
</script>
<style lang="scss">
.bg {

@ -137,6 +137,7 @@ const fun = () => {
list = list.sort((a, b) => {
return a.time - b.time
})
let arr = []
list.forEach((e, index) => {
let step = (e.time - list[index - 1]?.time) / 1000 / 60 / 60 / 24 || 0
@ -166,6 +167,7 @@ fun()
.topLeft {
width: 65%;
height: 20vh;
max-height: 150px;
position: absolute;
top: 10px;
left: 10px

@ -31,8 +31,8 @@ export default defineConfig(({mode, command}) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://10.11.41.249:8080',
// target: 'http://localhost:8080',
// target: 'http://10.11.41.249:8080',
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

Loading…
Cancel
Save