From 4167c7f398b38f26936d34d19488d2624d924161 Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang960204@163.com>
Date: 星期四, 30 三月 2023 23:02:38 +0800
Subject: [PATCH] 提交代码
---
src/components/page/EditParkNum.vue | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 153 insertions(+), 0 deletions(-)
diff --git a/src/components/page/EditParkNum.vue b/src/components/page/EditParkNum.vue
new file mode 100644
index 0000000..7a9c1f1
--- /dev/null
+++ b/src/components/page/EditParkNum.vue
@@ -0,0 +1,153 @@
+<template>
+ <section class="content-box">
+
+ <div class="form-box">
+ <h1>鍋� 杞� 鍦� 杞� 浣� 绠� 鐞�</h1>
+ <el-form :inline="true" :model="searchForm" size="medium" >
+ <el-form-item>
+ <el-select v-model="searchForm.parkId" clearable>
+ <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+
+ <div class="table">
+ <el-table :data="table2" border height="300" style="font-size: 15px">
+ <el-table-column prop="name" label="鍋滆溅鍦哄悕绉�" align="center" ></el-table-column>
+ <el-table-column prop="num" label="璁″垝杞︿綅鏁伴噺" align="center" ></el-table-column>
+ <el-table-column prop="carNum" label="鍦哄唴娉婅溅鏁伴噺" align="center" ></el-table-column>
+ <el-table-column prop="content" label="鎻忚堪" align="center"></el-table-column>
+ <el-table-column label="鎿嶄綔" fixed="right" align="center">
+ <template slot-scope="scope">
+ <el-button size="mini" @click="onEdit(scope.$index, scope.row)">淇敼</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+
+ <el-dialog title="缂栬緫" :visible.sync="flag" width="40%">
+ <el-form :model="formData" ref="formData" label-width="130px" >
+ <el-form-item label="鍋滆溅鍦哄悕绉�" prop="name" aria-readonly="true">
+ <el-input v-model="formData.name"></el-input>
+ </el-form-item>
+ <el-form-item label="璁″垝杞︿綅鏁伴噺" prop="num" :rules="[{ required: true, message: '璇疯緭鍏ヨ溅浣嶆暟閲�', trigger: 'blur'}]">
+ <el-input v-model="formData.num"></el-input>
+ </el-form-item>
+ <el-form-item label="鍦哄唴娉婅溅鏁伴噺" prop="num" :rules="[{ required: true, message: '璇疯緭鍏ヨ溅浣嶆暟閲�', trigger: 'blur'}]">
+ <el-input v-model="formData.carNum"></el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="flag = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="onSave">纭� 瀹�</el-button>
+ </div>
+ </el-dialog>
+
+
+ </section>
+</template>
+
+<script>
+export default {
+ name: "EditCarNum",
+ data: function () {
+ return {
+ flag:false,
+ flag2:false,
+ pageData: null,
+ searchForm: {
+ parkId: '',
+ },
+ formData: {
+ id:null,
+ parkName:'',
+ num:'',
+ carNum:''
+ },
+ urlPath:this.$systemconfig.basePath + '/park/',
+ table1:[],
+ table2:[],
+ }
+ },
+ mounted() {
+ this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => {
+ this.table1 = res.data;
+ })
+ },
+ methods: {
+ onSave(){
+ this.$refs['formData'].validate((valid) => {
+ if (valid) {
+ this.$byutil.postData(this, this.urlPath+'editParkCarNum', this.formData, res => {
+ this.$refs['formData'].resetFields();
+ this.flag=false;
+ this.$message({message: '淇濆瓨鎴愬姛', type: 'success'});
+ this.loadData();
+ })
+ } else {
+ return false;
+ }
+ });
+ },
+ loadData() {
+ this.$byutil.postData(this, this.urlPath+'getById', this.searchForm,res => {
+ this.table2 = []
+ this.table2.push(res.data);
+ });
+ },
+ onSearch() {
+ this.flag2 = true
+ this.loadData();
+ },
+ onEdit(index, row) {
+ this.flag=true;
+ this.formData = row;
+ },
+ }
+}
+</script>
+
+<style scoped>
+.content-box{
+ width: 100vw;
+ height: 100vh;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ position: relative;
+ left: 0;
+ top: 0;
+}
+
+h1{
+ font-size: 55px;
+ color: #409EFF;
+ margin-bottom: 50px;
+}
+
+.form-box{
+ width: 1000px;
+ /*height: 50px;*/
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+
+/deep/ .el-input--medium .el-input__inner{
+ width: 700px;
+ border: 2px solid #BDE2B2FF;
+ border-radius: 30px;
+}
+
+.table{
+ width: 1000px;
+ height: 500px;
+}
+
+</style>
\ No newline at end of file
--
Gitblit v1.9.1