فهرست منبع

节假日关联部门

yanliming 4 سال پیش
والد
کامیت
e13cac66d1
1فایلهای تغییر یافته به همراه24 افزوده شده و 2 حذف شده
  1. 24 2
      src/views/base/holidayInfo-list.vue

+ 24 - 2
src/views/base/holidayInfo-list.vue

@@ -142,11 +142,12 @@
         label="参考上班日"
         width="120"
       ></el-table-column>
-      <el-table-column label="操作" width="200" fixed="right">
+      <el-table-column label="操作" width="300" fixed="right">
         <template slot-scope="{ row }">
           <el-button size="mini" type="warning" @click="handleEdit(row)"
             >修改</el-button
           >
+          <el-button size="mini" type="primary" @click="bindCompany(row)">关联部门</el-button>
           <el-button size="mini" type="danger" @click="handleDelete(row)"
             >删除</el-button
           >
@@ -229,11 +230,18 @@
       </div>
     </el-dialog>
     <!--批量导入E-->
+    <holidayCompany-list
+      v-if="showModal2"
+      :businessKey="businessKey"
+      :title="modalTitle2"
+      @close="onDetailModalClose2"
+    ></holidayCompany-list>
   </div>
 </template>
 <script>
 import Constant from "@/constant";
 import holidayInfoDetail from "./holidayInfo-detail";
+import holidayCompanyList from "./holidayCompany-list";
 import holidayInfoApi from "@/api/base/holidayInfo";
 import companyInfoApi from "@/api/base/companyInfo";
 import SelectTree from "@/components/SelectTree";
@@ -260,7 +268,9 @@ export default {
       multipleSelection: [],
       timeRangesDefaultTime: [],
       showModal: false,
+      showModal2: false,
       modalTitle: "",
+      modalTitle2: "",
       businessKey: "",
       queryModel: {
         companyId: "",
@@ -381,6 +391,11 @@ export default {
       this.businessKey = record.id;
       this.showModal = true;
     },
+    bindCompany(record) {
+      this.modalTitle2 = "关联部门";
+      this.businessKey = record.id;
+      this.showModal2 = true;
+    },
     handleDelete(record) {
       var self = this;
 
@@ -440,6 +455,13 @@ export default {
         this.changePage(this.pageIndex);
       }
     },
+    onDetailModalClose2(refreshed) {
+      //保存成功后回调
+      this.showModal2 = false;
+      if (refreshed) {
+        this.changePage(this.pageIndex);
+      }
+    },
     beforeUpload(file, fileList) {
       //导入前判断
       var self = this;
@@ -565,7 +587,7 @@ export default {
   },
   components: {
     "holidayInfo-detail": holidayInfoDetail,
-    "el-select-tree": SelectTree,
+    "holidayCompany-list":holidayCompanyList
   },
 };
 </script>