肖凡4.3提交

yinyuyang^2
肖凡 2024-04-03 11:46:12 +08:00
parent 320bcb9539
commit 16b0c1b2a6
3 changed files with 16 additions and 15 deletions

View File

@ -36,6 +36,7 @@
"url": "https://gitee.com/y_project/MuYu-Cloud.git" "url": "https://gitee.com/y_project/MuYu-Cloud.git"
}, },
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",

View File

@ -50,15 +50,15 @@ export function del(carIds) {
}); });
} }
export function updateStateClose(carId) { export function close(carVin) {
return request({ return request({
url: '/system/car/updateStateClose/'+carId, url: '/system/car/close/'+carVin,
method: 'post' method: 'post'
}); });
} }
export function updateStateOpen(carId) { export function open(carVin) {
return request({ return request({
url: '/system/car/updateStateOpen/'+carId, url: '/system/car/open/'+carVin,
method: 'post' method: 'post'
}); });
} }

View File

@ -135,17 +135,17 @@
type="text" type="text"
icon="el-icon-success" icon="el-icon-success"
v-if="scope.row.state === 1" v-if="scope.row.state === 1"
@click="handleUpdateOpen(scope.row.carId)" @click="handleUpdateOpen(scope.row.carVin)"
v-hasPermi="['system:car:edit']" v-hasPermi="['system:car:edit']"
>启用</el-button> >上线</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-error" icon="el-icon-error"
v-if="scope.row.state === 0" v-if="scope.row.state === 0"
@click="handleUpdateClose(scope.row.carId)" @click="handleUpdateClose(scope.row.carVin)"
v-hasPermi="['system:car:edit']" v-hasPermi="['system:car:edit']"
>禁用</el-button> >下线</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -217,7 +217,7 @@
</template> </template>
<script> <script>
import {list, add, update, findById, del, exportA, selectFence,updateStateClose,updateStateOpen} from "@/api/system/car"; import {list, add, update, findById, del, exportA, selectFence,open,close} from "@/api/system/car";
export default { export default {
name: "Car", name: "Car",
@ -350,16 +350,16 @@ export default {
}); });
}, },
/** 启用车辆 **/ /** 启用车辆 **/
handleUpdateOpen(carId){ handleUpdateOpen(carVin){
updateStateOpen(carId).then(res=>{ open(carVin).then(res=>{
this.$message.success('启用成功') this.$message.success('上线成功')
this.getList(); this.getList();
}) })
}, },
/** 禁用车辆 **/ /** 禁用车辆 **/
handleUpdateClose(carId){ handleUpdateClose(carVin){
updateStateClose(carId).then(res=>{ close(carVin).then(res=>{
this.$message.success('禁用成功') this.$message.success('下线成功')
this.getList(); this.getList();
}) })
}, },