修改单车监控界面

master
夜笙歌 2 years ago
parent 7dc7afe4d6
commit 18c0474847

@ -140,7 +140,7 @@
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.title')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.state')" prop="state">
<el-switch v-model="form.state"/>
<el-switch v-model="form.state" :active-value="0" :inactive-value="1"/>
</el-form-item>
</el-form>
<template #footer>
@ -206,7 +206,7 @@ const rules = {
const form = ref({
id: null,
title: null,
state: true,
state: 0,
});
/** 查询岗位列表 */
@ -239,7 +239,7 @@ function reset() {
form.value = {
id: null,
title: null,
state: true,
state: 0,
};
proxy.resetForm("postRef");
}
@ -276,7 +276,6 @@ function handleUpdate(row) {
const postId = row.id || ids.value;
getCarQueue(postId).then(response => {
form.value = response.data;
form.value.state = response.data.state === 1
open.value = true;
title.value = t('baseCar.carQueue.editTitle');
});
@ -285,7 +284,6 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
let params = form.value
params.state = params.state ? 1 : 0
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (params.id != undefined) {

@ -117,7 +117,7 @@
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="state">
<el-switch v-model="form.state"/>
<el-switch v-model="form.state" :active-value="0" :inactive-value="1"/>
</el-form-item>
</el-form>
<div style="width: 100%;text-align: center;height: 50px;line-height: 50px">轮胎布局图</div>
@ -265,7 +265,7 @@ const queryParams = ref({
companyCode: undefined,
code: undefined,
title: undefined,
state: undefined,
state: 0,
axleTotal: undefined,
tyreTotal: undefined,
isDelete: undefined,
@ -292,7 +292,7 @@ const rules = {
const form = ref({
id: null,
axleTotal: 2,
state: true,
state: 0,
});
/** 查询岗位列表 */
@ -317,7 +317,7 @@ function reset() {
form.value = {
id: null,
axleTotal: 2,
state: true,
state: 0,
};
TireRowInfo.value = [1, 1]
proxy.resetForm("postRef");
@ -355,7 +355,6 @@ function handleUpdate(row) {
const postId = row.id || ids.value;
getCartype(postId).then(response => {
let params = response.data
params.state === 1 ? params.state = true : params.state = false
let TireRow = params.title?.split('T')[1]?.split('|').filter(e => e !== '') || []
let title = []
TireRow.forEach((res) => {
@ -373,7 +372,6 @@ function submitForm() {
let title = (2 * TireRowInfo.value.reduce((a, b) => a + b)) + 'T' + TireRowInfo.value.map((e, index) => {
return `${index + 1}-${e}|`
}).join('')
form.value.state ? form.value.state = 1 : form.value.state = 0
let params = {...form.value, title}
proxy.$refs["postRef"].validate(valid => {
if (valid) {

Loading…
Cancel
Save