瀏覽代碼

机场公司不可选自己

chenrui  2 年之前
父節點
當前提交
69fbc61eea
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/views/BasicsData/airportCompany/index.vue

+ 10 - 0
src/views/BasicsData/airportCompany/index.vue

@@ -89,6 +89,7 @@ import DataTable from "@/components/tableTemp/index.vue";
 import Minheader from "@/components/minheader/index.vue";
 import Dialog from "@/components/dialog/index.vue";
 import { Query, GeneralDataReception } from "@/api/webApi";
+import * as _ from "lodash";
 import { ElMessage } from "element-plus";
 const formRules = useElement().formRules;
 const page = ref<number>(0); //分页参数
@@ -103,6 +104,7 @@ const flag = ref<Boolean>(false); //弹窗开关
 const type = ref<String>(""); //判断是否删除
 const msgTitle = ref<String>("新增机场公司维护"); //弹窗标题
 const tableOptionser = ref([]); //弹窗下拉
+const tableOptionCopys = ref([]); //弹窗下拉
 const tableColsCopys = reactive([]); //弹窗
 const tableForm = reactive({
   companyName: "",
@@ -162,6 +164,13 @@ const btnClick = (row, index, param) => {
     tableForm.parentID = index.parentID;
     tableForm.companyDesc = index.companyDesc;
     tableForm.companyID = index.companyID;
+    tableOptionser.value = [];
+    tableOptionCopys.value.forEach((element) => {
+      if (element.k !== index.companyName) {
+        tableOptionser.value.push(element);
+      }
+    });
+    console.log(tableOptionser);
   } else if (param === 3) {
     msgTitle.value = "删除机场公司维护";
     flag.value = true;
@@ -186,6 +195,7 @@ const getSelectData = async (id, name) => {
   });
   if (code == 0) {
     tableOptionser.value = returnData.listValues;
+    tableOptionCopys.value = _.cloneDeep(returnData.listValues);
   } else {
     tableOptionser.value = [];
   }