1
lzhe
2024-06-05 dcf9c9e0410fe1186239e3f8d6f7bdc789c08010
src/views/master/person/main/personPost.vue
@@ -12,6 +12,10 @@
         <div class="right-top">
            <div class="right-bottom"> 
               <el-button type="primary" @click="addPerson">+ 添加岗位</el-button>
               <!-- 导入 -->
               <import-table class="exportBtn" :exportUrl="exportUrl" :uploadUrl="uploadUrl"></import-table>
               <!-- 导出 -->
               <el-button type="primary" @click="getExport">导出</el-button>
               <el-button type="danger" plain @click="delPerson">删除</el-button>
            </div>
            <div>
@@ -68,11 +72,14 @@
   </el-dialog>
</template>
<script>
   import importTable from '@/layout/components/importTable.vue'
   import saveDialog from './post'
   export default {
      name: "bakalaka",
      data(){
         return {
            uploadUrl: "/api/blade-system/post/import-post",
            exportUrl: "/api/blade-system/post/export-template",
            totle: "0",
            postSearchData: {
               current: 1,
@@ -97,9 +104,16 @@
         this.getPost();
      },
      components: {
         saveDialog
         saveDialog,importTable
      },
      methods: {
         getExport() {
            this.$HTTP.get(`/api/blade-system/post/export-post?`+this.$TOOL.qsStringify(this.postSearchData)).then(res=> {
               if(res.code == 200) {
                  window.open(res.data.link);
               }
            })
         },
         delData(type) {
            this.$HTTP.post(`/api/blade-system/post/remove?ids=${this.selectId}&type=${type}`).then(res=> {
               if(res.code == 200) {
@@ -220,7 +234,7 @@
      border-left: 0px;
   }
   .person-left-active {
      background-color: #3b8e8e;
      background-color: #409eff;
      color: #fff;
   }
   .person-left-search {
@@ -300,4 +314,8 @@
       line-height: 20px;
       margin-right: 6px;
   }
   .exportBtn {
      margin-left:8px;
      margin-right:8px;
   }
</style>