chenrui  2 gadi atpakaļ
vecāks
revīzija
b6813d2305

+ 1 - 1
src/components/dialog/index.vue

@@ -37,7 +37,7 @@
           <div class="airportInfoDialog dialog-public-background">
             <div class="title">{{ props.msgTitle }}</div>
             <div class="content">
-              <slot name="content" />
+              <slot />
             </div>
             <div class="foot text-right t30">
               <el-button

+ 36 - 38
src/views/BasicsData/airlineCompany/index.vue

@@ -16,44 +16,42 @@
         @resetForm="resetForm"
         @delRest="delRest"
       >
-        <template #content>
-          <div class="diacont">
-            <el-form :model="tableForm">
-              <el-row :gutter="24">
-                <el-col>
-                  <el-form-item label="航司名称">
-                    <el-input v-model="tableForm.name" />
-                  </el-form-item>
-                </el-col>
-                <el-col>
-                  <el-form-item label="中文简称">
-                    <el-input v-model="tableForm.china" />
-                  </el-form-item>
-                </el-col>
-                <el-col>
-                  <el-form-item label="英文简称">
-                    <el-input v-model="tableForm.englin" />
-                  </el-form-item>
-                </el-col>
-                <el-col>
-                  <el-form-item label="航司二字码">
-                    <el-input v-model="tableForm.two" />
-                  </el-form-item>
-                </el-col>
-                <el-col>
-                  <el-form-item label="航司三字码">
-                    <el-input v-model="tableForm.three" />
-                  </el-form-item>
-                </el-col>
-                <el-col>
-                  <el-form-item label="备注">
-                    <el-input type="textarea" v-model="tableForm.text" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-          </div>
-        </template>
+        <div class="diacont">
+          <el-form :model="tableForm">
+            <el-row :gutter="24">
+              <el-col>
+                <el-form-item label="航司名称">
+                  <el-input v-model="tableForm.name" />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="中文简称">
+                  <el-input v-model="tableForm.china" />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="英文简称">
+                  <el-input v-model="tableForm.englin" />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="航司二字码">
+                  <el-input v-model="tableForm.two" />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="航司三字码">
+                  <el-input v-model="tableForm.three" />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="备注">
+                  <el-input type="textarea" v-model="tableForm.text" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
       </Dialog>
     </div>
   </div>

+ 72 - 3
src/views/BasicsData/airportCompany/index.vue

@@ -1,22 +1,91 @@
 <template>
   <div class="airportInfo">
     <div class="wrap">
-      <Minheader :is-auth="true" :is-statuser="true">
+      <Minheader :is-auth="true" :is-statuser="true" @addForm="addForm">
         <template #header>
           <div class="status flex-wrap">
             <div class="manageTitle">机场公司维护</div>
           </div>
         </template></Minheader
       >
-      <DataTable />
+      <DataTable @editDialog="editDialog" @eleDialog="eleDialog" />
+      <Dialog
+        :flag="flag"
+        :type="type"
+        :msgTitle="msgTitle"
+        @resetForm="resetForm"
+        @delRest="delRest"
+      >
+        <div class="diacont">
+          <el-form :model="tableForm">
+            <el-row :gutter="24">
+              <el-col>
+                <el-form-item label="公司名称">
+                  <el-input v-model="tableForm.name" />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="上级公司">
+                  <!-- <el-input v-model="tableForm.china" /> -->
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item label="公司描述">
+                  <el-input type="textarea" v-model="tableForm.text" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+      </Dialog>
     </div>
   </div>
 </template>
 <script setup lang="ts">
 import DataTable from "@/views/table/index.vue";
 import Minheader from "@/components/minheader/index.vue";
+import Dialog from "@/components/dialog/index.vue";
+const flag = ref<Boolean>(false); //弹窗开关
+const type = ref<String>(""); //判断是否删除
+const msgTitle = ref<String>("新增机场公司维护"); //弹窗标题
+const tableColsCopys = reactive<Object>({}); //弹窗
+const tableForm = reactive<Object>({
+  name: "",
+  china: "",
+  englin: "",
+  two: "",
+  three: "",
+  text: "",
+}); //弹窗内容
+//新增
+const addForm = () => {
+  msgTitle.value = "新增机场公司维护";
+  flag.value = true;
+  type.value = "";
+};
+//取消
+const resetForm = () => {
+  flag.value = false;
+};
+//编辑
+const editDialog = () => {
+  msgTitle.value = "编辑机场公司维护";
+  flag.value = true;
+  type.value = "";
+};
+//删除
+const eleDialog = () => {
+  msgTitle.value = "删除机场公司维护";
+  flag.value = true;
+  type.value = "del";
+};
+//删除
+const delRest = () => {
+  flag.value = false;
+};
 </script>
 <style lang="scss" scoped>
-.airportInfo {
+::v-deep .el-form-item__label {
+  width: 100px;
 }
 </style>