123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408 |
- <template>
- <div class="airportInfo scroll-y">
- <div class="wrap">
- <Minheader :is-auth="true" :is-statuser="true" @addForm="addForm">
- <template #header>
- <div class="status flex-wrap">
- <div class="manageTitle">查询项设置</div>
- </div>
- </template></Minheader
- >
- <div class="app-containers">
- <DataTable
- :tableHeader="state.list"
- :tableData="tableData"
- :tableBtnGroup="tableBtnGroup"
- :tableProperty="{ rowKey: 'ID' }"
- @btnClick="btnClick"
- />
- </div>
- <Dialog
- width="734px"
- :flag="flag"
- :type="type"
- :msgTitle="msgTitle"
- @resetForm="resetForm"
- @delRest="delRest"
- >
- <div class="diacont">
- <el-form :model="tableForm">
- <el-row :gutter="24">
- <el-col :span="12">
- <el-form-item label="名称" size="default">
- <el-input v-model="tableForm.name" placeholder="请输入名称" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="标签" size="default">
- <el-input
- v-model="tableForm.china"
- placeholder="请输入标签"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="描述" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.englin"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="排序" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.two"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="过滤" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.three"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="显示" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.text"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="数据类型" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.text1"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="分组" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.text2"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="下拉" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.text3"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="合计" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.text4"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="字段排序" size="default">
- <el-select
- style="width: 100%"
- v-model="tableForm.text5"
- class="input-shadow"
- filterable
- default-first-option
- clearable
- placeholder="请选择"
- >
- <el-option
- v-for="item in tableOptionser"
- :key="item.v ? item.v : item.planDepartureApt"
- :label="item.k ? item.k : item.planDepartureApt"
- :value="item.v ? item.v : item.planDepartureApt"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- </Dialog>
- </div>
- </div>
- </template>
- <script setup lang="ts">
- import DataTable from "@/components/tableTemp/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 tableOptionser = ref<Array>([]); //弹窗下拉
- const tableForm = reactive({
- name: "",
- china: "",
- englin: "",
- two: "",
- three: "",
- text: "",
- text1: "",
- text2: "",
- text3: "",
- text4: "",
- text5: "",
- }); //弹窗内容
- //列表
- const tableData = ref([
- {
- name: "测试",
- china: "测试",
- englin: "测试",
- two: "测试",
- three: "测试",
- text: "测试",
- text1: "测试",
- text2: "测试",
- text3: "测试",
- text4: "测试",
- text5: "测试",
- },
- {
- name: "测试",
- china: "测试",
- englin: "测试",
- two: "测试",
- three: "测试",
- text: "测试",
- text1: "测试",
- text2: "测试",
- text3: "测试",
- text4: "测试",
- text5: "测试",
- },
- {
- name: "测试",
- china: "测试",
- englin: "测试",
- two: "测试",
- three: "测试",
- text: "测试",
- text1: "测试",
- text2: "测试",
- text3: "测试",
- text4: "测试",
- text5: "测试",
- },
- ]);
- //表头
- const state = reactive({
- list: [
- { label: "名称", key: "name" },
- { label: "标签", key: "china" },
- { label: "描述", key: "englin" },
- { label: "排序", key: "two" },
- { label: "过滤", key: "three" },
- { label: "显示", key: "text" },
- { label: "分组", key: "text1" },
- { label: "下拉", key: "text2" },
- { label: "数据类型", key: "text3" },
- { label: "字段排位", key: "text4" },
- { label: "合计", key: "text5" },
- ],
- listLoading: true,
- });
- const tableBtnGroup = ref([
- {
- name: "编辑",
- className: "editBtn",
- param: 2,
- },
- {
- name: "删除",
- className: "delBtn",
- param: 3,
- },
- ]);
- //新增
- const addForm = () => {
- msgTitle.value = "新增查询项";
- flag.value = true;
- type.value = "";
- };
- //取消
- const resetForm = () => {
- flag.value = false;
- tableForm.name = "";
- tableForm.china = "";
- tableForm.englin = "";
- tableForm.two = "";
- tableForm.three = "";
- tableForm.text = "";
- tableForm.text1 = "";
- tableForm.text2 = "";
- tableForm.text3 = "";
- tableForm.text4 = "";
- tableForm.text5 = "";
- };
- //编辑
- // const editDialog = (data) => {
- // msgTitle.value = "编辑航司信息维护";
- // flag.value = true;
- // type.value = "";
- // tableForm.name = data.name;
- // tableForm.china = data.china;
- // tableForm.englin = data.englin;
- // tableForm.two = data.two;
- // tableForm.three = data.three;
- // tableForm.text = data.text;
- // };
- //编辑-删除
- const btnClick = (row, index, param) => {
- if (param === 2) {
- msgTitle.value = "编辑查询项";
- flag.value = true;
- type.value = "";
- tableForm.name = index.name;
- tableForm.china = index.china;
- tableForm.englin = index.englin;
- tableForm.two = index.two;
- tableForm.three = index.three;
- tableForm.text = index.text;
- tableForm.text1 = index.text1;
- tableForm.text2 = index.text2;
- tableForm.text3 = index.text3;
- tableForm.text4 = index.text4;
- tableForm.text5 = index.text5;
- } else if (param === 3) {
- msgTitle.value = "删除查询项";
- flag.value = true;
- type.value = "del";
- } else if (param === 4) {
- }
- };
- //删除
- const eleDialog = () => {
- msgTitle.value = "删除查询项";
- flag.value = true;
- type.value = "del";
- };
- //删除
- const delRest = () => {
- flag.value = false;
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item__label {
- width: 100px;
- }
- .app-containers {
- height: calc(100vh - 180px);
- }
- </style>
|