This commit is contained in:
2022-07-08 23:47:58 +08:00
parent 4ba7a55b2e
commit 91d78873a1
10 changed files with 236 additions and 134 deletions

View File

@@ -1,6 +1,12 @@
<template>
<div class="mod-config">
<el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-button size="small" type="primary" style="float:left" @click="open()">
<icon-svg class="iconClass" name="system"></icon-svg>
重置
</el-button>
</el-form-item>
<el-form-item>
<!-- <el-select size="small" v-model="dataForm.paramKey" filterable placeholder="名称">
<el-option
@@ -51,6 +57,18 @@
prop="code"
label="编码">
</el-table-column>
<el-table-column
prop="status"
label="状态"
>
<template slot-scope="scope">
<span>{{
scope.row.status === 0
? "空闲"
: "占用"
}}</span>
</template>
</el-table-column>
<el-table-column
prop="vehicleAlias"
label="缩写">
@@ -120,6 +138,34 @@
this.getDataList()
},
methods: {
open () {
this.$confirm('执行此操作前请确定当前没有任务在使用车辆!是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/resetStatus'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
// 获取数据列表
getDataList () {
this.dataListLoading = true