gaoshp
2024-10-05 65972957e56a31778cc1633b1032ac16627665f3
src/views/console/authority/datascope.vue
@@ -1,9 +1,9 @@
<!--
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-03-26 10:28:33
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-04-02 17:48:31
 * @FilePath: /smart-web/src/views/master/person/main/index.vue
 * @LastEditors: gaoshp
 * @LastEditTime: 2024-10-05 21:26:31
 * @FilePath: /cps-web/src/views/console/authority/datascope.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
@@ -15,12 +15,12 @@
         <el-form-item label="菜单编号">
            <el-input v-model="searchData.code" placeholder="菜单编号" clearable></el-input>
         </el-form-item>
         <el-form-item label="所属应用">
         <!-- <el-form-item label="所属应用">
            <el-select v-model="searchData.belongApplication" style="width: 100%">
               <el-option key="CPS" label="CPS" value="CPS"/>
               <el-option key="FMS" label="FMS" value="FMS"/>
            </el-select>
         </el-form-item>
         </el-form-item> -->
         <el-form-item>
            <el-button type="primary" @click="searchclick">搜索</el-button>
            <el-button @click="searchClearBtn">清空</el-button>
@@ -28,7 +28,9 @@
      </el-form>
      <div>
         <div class="dict-table">
            <el-table ref="multipleTableRef" :data="tableData" border row-key="id" style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange" :tree-props="{ children: 'children', hasChildren: 'has' }">
            <el-table ref="multipleTableRef" :data="tableData" border row-key="id" style="width: 100%"
               class="multipleTableRef" @selection-change="handleSelectionChange"
               :tree-props="{ children: 'children', hasChildren: 'has' }">
               <el-table-column type="selection" width="55" />
               <el-table-column prop="name" label="菜单名称"></el-table-column>
               <el-table-column prop="path" label="路由地址"></el-table-column>
@@ -46,16 +48,18 @@
                     <div>{{scope.row.isOpen == 0?"是":"否"}}</div>
                  </template>
               </el-table-column>
               <el-table-column prop="belongApplication" label="所属应用"></el-table-column>
               <!-- <el-table-column prop="belongApplication" label="所属应用"></el-table-column> -->
               <el-table-column fixed="right" label="操作">
                  <template #default="scope">
                     <el-button text type="primary" size="small" @click="showDrawer(scope.row, scope.$index)">权限配置</el-button>
                     <el-button text type="primary" size="small"
                        @click="showDrawer(scope.row, scope.$index)">权限配置</el-button>
                  </template>
               </el-table-column>
            </el-table>
         </div>
      </div>
      <el-drawer title="[控制中心]数据权限配置" v-model="drawer" :direction="direction" :before-close="handleClose" size="920" class="drawerStyle">
      <el-drawer title="[控制中心]数据权限配置" v-model="drawer" :direction="direction" :before-close="handleClose" size="920"
         class="drawerStyle">
         <el-form :inline="true" :model="drawerSearchData" label-width="120px">
            <el-form-item label="菜单名称">
               <el-input v-model="drawerSearchData.scopeName" placeholder="菜单名称" clearable />
@@ -74,7 +78,8 @@
               <el-button type="danger" plain @click="delData">删除</el-button>
            </div>
            <div class="dict-table">
               <el-table ref="multipleTableRef" :data="drawerTableData" border style="width: 100%" class="multipleTableRef" @selection-change="drawerHandleSelectionChange">
               <el-table ref="multipleTableRef" :data="drawerTableData" border style="width: 100%"
                  class="multipleTableRef" @selection-change="drawerHandleSelectionChange">
                  <el-table-column type="selection" width="55" />
                  <el-table-column prop="scopeName" label="权限名称"></el-table-column>
                  <el-table-column prop="resourceCode" label="权限编号"></el-table-column>
@@ -82,26 +87,24 @@
                  <el-table-column prop="scopeTypeName" label="规则分类"></el-table-column>
                  <el-table-column fixed="right" label="操作">
                     <template #default="scope">
                        <el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
                        <el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
                        <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">删除</el-button>
                        <el-button text type="primary" size="small"
                           @click="table_show(scope.row, scope.$index)">查看</el-button>
                        <el-button text type="primary" size="small"
                           @click="table_edit(scope.row, scope.$index)">编辑</el-button>
                        <el-button text type="primary" size="small"
                           @click="table_del(scope.row, scope.$index)">删除</el-button>
                     </template>
                  </el-table-column>
               </el-table>
               <el-pagination
                  style="margin-top: 12px;"
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage4"
                  :page-sizes="[15, 50, 100]"
                  :page-size="15"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="drawerTotal">
               <el-pagination style="margin-top: 12px;" @size-change="handleSizeChange"
                  @current-change="handleCurrentChange" :current-page="currentPage4" :page-sizes="[15, 50, 100]"
                  :page-size="15" layout="total, sizes, prev, pager, next, jumper" :total="drawerTotal">
               </el-pagination>
            </div>
         </div>
      </el-drawer>
      <save-dialog v-if="dialog.save" ref="saveDialog" :scopeTypeNameList="scopeTypeNameList" :tableRow="tableRow" @success="addDatascopeSuccess" @closed="dialog.save=false"></save-dialog>
      <save-dialog v-if="dialog.save" ref="saveDialog" :scopeTypeNameList="scopeTypeNameList" :tableRow="tableRow"
         @success="addDatascopeSuccess" @closed="dialog.save = false"></save-dialog>
   </div>
</template>
<script>
@@ -139,7 +142,7 @@
            searchData: {
               name: "",
               code: "",
               belongApplication: "",
            belongApplication: "CPS",
               parentId: ""
            },
            dialog: {
@@ -331,6 +334,7 @@
      margin: 8px;
      padding: 8px;
   }
   .dict-Btn {
      display: flex;
      justify-content: space-between;
@@ -339,20 +343,24 @@
      padding-left: 8px;
      padding-right: 8px;
   }
   .dict-btn-bottom {
      padding-left: 8px;
      padding-right: 8px;
      margin-bottom: 8px;
   }
   .dict-table {
      padding-left: 8px;
      padding-right: 8px;
      margin-bottom: 8px;
      
   }
   .multipleTableRef {
      margin-bottom: 8px;
   }
   .attachSize {
      color:#409eff;
      padding: 0 10px;
@@ -360,9 +368,11 @@
      background-color: #ebf4f4;
      border: 1px solid #d8e8e8;
   }
   /deep/ .drawerStyle {
      padding: 20px;
   }
   .datascope-drawer-btn {
      margin-bottom: 8px;
      padding-left: 8px;