Explorar o código

Merge branch 'feature/object-prop-manage' into 'develop'

Feature/object prop manage

See merge request dcuc-bujz/auth-web!10
林倩 %!s(int64=3) %!d(string=hai) anos
pai
achega
ffcbd8f8d9

+ 3 - 3
config/dev.env.js

@@ -13,7 +13,7 @@ module.exports = merge(prodEnv, {
   QQQ: '"/easy-mock2"',
 
   //是否需要登录验证
-  NEED_LOGIN: 'false',
+  NEED_LOGIN: 'true',
 
   //需要依赖的系统名称
   // INSTALLED_PROJECT: "'zfba,demo2,cross-env'",
@@ -35,9 +35,9 @@ module.exports = merge(prodEnv, {
     '/dcucauth': {
       // target: "http://10.11.1.237:8861"
       // target: "http://10.254.11.203:8861"
-      //  target: "http://192.168.10.2:8871"
+       target: "http://192.168.10.2:8871"
       //  target: "http://192.168.6.133:3471"
-      target: 'http://192.168.6.131:3561'
+      // target: 'http://192.168.6.131:3561'
     }
   })
 });

+ 187 - 172
src/api/data-auth.js

@@ -4,311 +4,326 @@
  @Date:2021-04-09
  */
 
-import request from "@/utils/request";
-const baseUrl = "/authsvr/v2/dataauth";
+import request from '@/utils/request';
+const baseUrl = '/authsvr/v2/dataauth';
 
 /********************************************  数据授权  ******************************************/
 
 // 标签树
 export function getBusinessTagTree(data) {
-    return request({
-        url: `${baseUrl}/businessTreeList`,
-        method: "get"
-    });
+  return request({
+    url: `${baseUrl}/businessTreeList`,
+    method: 'get'
+  });
 }
 
 // 获取数据授权资源树
 export function getAllDataTree(params) {
-    return request({
-        url: `${baseUrl}/allDataTree`,
-        method: "get",
-        params
-    });
+  return request({
+    url: `${baseUrl}/allDataTree`,
+    method: 'get',
+    params
+  });
 }
 
 // 获取单个主体数据权限
 export function getSubDataAuth(data) {
-    return request({
-        url: `${baseUrl}/getSubDataAuth`,
-        method: "post",
-        data
-    });
+  return request({
+    url: `${baseUrl}/getSubDataAuth`,
+    method: 'post',
+    data
+  });
 }
 
 // 人员视角数据权限查询
 export function dataAuthInfoByUserId(params) {
-    return request({
-        url: `${baseUrl}/dataAuthInfoByUserId`,
-        method: "get",
-        params
-    });
+  return request({
+    url: `${baseUrl}/dataAuthInfoByUserId`,
+    method: 'get',
+    params
+  });
 }
 
 // 业务域标签数据授权
 export function saveLabelDataAuth(data) {
-    return request({
-        url: `${baseUrl}/labelDataAuth`,
-        method: "post",
-        data
-    });
+  return request({
+    url: `${baseUrl}/labelDataAuth`,
+    method: 'post',
+    data
+  });
 }
 
 // 机构数据授权
 export function saveOrgDataAuth(data) {
-    return request({
-        url: `${baseUrl}/orgDataAuth`,
-        method: "post",
-        data
-    });
+  return request({
+    url: `${baseUrl}/orgDataAuth`,
+    method: 'post',
+    data
+  });
 }
 
 // 人员数据授权
 export function saveUserDataAuth(data) {
-    return request({
-        url: `${baseUrl}/userDataAuth`,
-        method: "post",
-        data
-    });
+  return request({
+    url: `${baseUrl}/userDataAuth`,
+    method: 'post',
+    data
+  });
 }
 
 /*********************************** 数据分级分类表码    ******************************************************/
 
-const dataLevelBaseUrl = "/datalevelsvr/v2";
+const dataLevelBaseUrl = '/datalevelsvr/v2';
 export const dataLevelTableUrl = `${dataLevelBaseUrl}/search`;
 // 数据分级详情
 export function getDataLevelDetail(id) {
-    return request({
-        url: `${dataLevelBaseUrl}/detail/` + id,
-        method: "get"
-    });
+  return request({
+    url: `${dataLevelBaseUrl}/detail/` + id,
+    method: 'get'
+  });
 }
 // 保存数据分级
 export function saveDataLevel(data) {
-    return request({
-        url: `${dataLevelBaseUrl}/save`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${dataLevelBaseUrl}/save`,
+    method: 'POST',
+    data
+  });
 }
 // 删除数据分级
 export function delDataLevel(id) {
-    return request({
-        url: `${dataLevelBaseUrl}/deleteById/` + id,
-        method: "DELETE"
-    });
+  return request({
+    url: `${dataLevelBaseUrl}/deleteById/` + id,
+    method: 'DELETE'
+  });
 }
 
-
 // 数据安全等级
-const dataSecLevBaseUrl = "/datasecsvr/v2";
+const dataSecLevBaseUrl = '/datasecsvr/v2';
 export const dataSecLevTableUrl = `${dataSecLevBaseUrl}/search`;
 // 获取数据安全等级详情
 export function getDataSecLevDetail(id) {
-    return request({
-        url: `${dataSecLevBaseUrl}/detail/` + id,
-        method: "get"
-    });
+  return request({
+    url: `${dataSecLevBaseUrl}/detail/` + id,
+    method: 'get'
+  });
 }
 // 保存数据安全等级
 export function saveDataSecLev(data) {
-    return request({
-        url: `${dataSecLevBaseUrl}/save`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${dataSecLevBaseUrl}/save`,
+    method: 'POST',
+    data
+  });
 }
 // 删除数据安全等级
 export function delDataSecLev(id) {
-    return request({
-        url: `${dataSecLevBaseUrl}/deleteById/` + id,
-        method: "DELETE"
-    });
+  return request({
+    url: `${dataSecLevBaseUrl}/deleteById/` + id,
+    method: 'DELETE'
+  });
 }
 
 // 数据资源分类表码
-const dataSourceClaBaseUrl = "/dataclassifysvr/v2"
+const dataSourceClaBaseUrl = '/dataclassifysvr/v2';
 export const dataSourceClaTableUrl = `${dataSourceClaBaseUrl}/search`;
 // 获取数据资源分类详情
 export function getDataSourceClaDetail(labId) {
-    return request({
-        url: `${dataSourceClaBaseUrl}/detailAllLevel/` + labId,
-        method: "get"
-    });
+  return request({
+    url: `${dataSourceClaBaseUrl}/detailAllLevel/` + labId,
+    method: 'get'
+  });
 }
 // 添加数据资源分类
 export function saveDataSourceCla(data) {
-    return request({
-        url: `${dataSourceClaBaseUrl}/save`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${dataSourceClaBaseUrl}/save`,
+    method: 'POST',
+    data
+  });
 }
 
 // 修改数据资源分类
 export function updateDataSourceCla(data) {
-    return request({
-        url: `${dataSourceClaBaseUrl}/update`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${dataSourceClaBaseUrl}/update`,
+    method: 'POST',
+    data
+  });
 }
 // 删除数据资源分类
 export function delDataSourceCla(id) {
-    return request({
-        url: `${dataSourceClaBaseUrl}/deleteById/` + id,
-        method: "DELETE"
-    });
+  return request({
+    url: `${dataSourceClaBaseUrl}/deleteById/` + id,
+    method: 'DELETE'
+  });
 }
 
-
 // 字段分类列表
-const fieldClassifyBaseUrl = "/fieldclassifysvr/v2"
+const fieldClassifyBaseUrl = '/fieldclassifysvr/v2';
 export const fieldClassifyTableUrl = `${fieldClassifyBaseUrl}/search`;
 // 获取字段分类详情
 export function getFieldClassifyDetail(labId) {
-    return request({
-        url: `${fieldClassifyBaseUrl}/detailAllLevel/` + labId,
-        method: "get"
-    });
+  return request({
+    url: `${fieldClassifyBaseUrl}/detailAllLevel/` + labId,
+    method: 'get'
+  });
 }
 // 添加字段分类
 export function saveFieldClassify(data) {
-    return request({
-        url: `${fieldClassifyBaseUrl}/save`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${fieldClassifyBaseUrl}/save`,
+    method: 'POST',
+    data
+  });
 }
 
 // 修改字段分类
 export function updateFieldClassify(data) {
-    return request({
-        url: `${fieldClassifyBaseUrl}/update`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${fieldClassifyBaseUrl}/update`,
+    method: 'POST',
+    data
+  });
 }
 // 删除字段分类
 export function delFieldClassify(id) {
-    return request({
-        url: `${fieldClassifyBaseUrl}/deleteById/` + id,
-        method: "DELETE"
-    });
+  return request({
+    url: `${fieldClassifyBaseUrl}/deleteById/` + id,
+    method: 'DELETE'
+  });
 }
 
-
-
 /************************************ 清单  *****************************************/
 
 // 清单列表
 export function getDataDetailList() {
-    return request({
-        url: `${baseUrl}/dataDetailList`,
-        method: "POST"
-    });
+  return request({
+    url: `${baseUrl}/dataDetailList`,
+    method: 'POST'
+  });
 }
 
 // 获取清单搜索下拉表
 export function getSelectList(params) {
-    return request({
-        url: `${baseUrl}/getDataResourceTree`,
-        method: "GET",
-        params: {
-            typeCode: params
-        }
-    });
+  return request({
+    url: `${baseUrl}/getDataResourceTree`,
+    method: 'GET',
+    params: {
+      typeCode: params
+    }
+  });
 }
 
 // 人员视角 - 授权列表
 export function userDataTreeByIdcard(authType, idcard) {
-    return request({
-        url: `${baseUrl}/userDataTreeByIdcard`,
-        method: "GET",
-        params: {
-            authType,
-            idcard
-        }
-    });
+  return request({
+    url: `${baseUrl}/userDataTreeByIdcard`,
+    method: 'GET',
+    params: {
+      authType,
+      idcard
+    }
+  });
 }
 
 /****************************** 用户属性管理 ************************************ */
 
-const authUserBaseUrl = "/authsvr/v2/authuserinfo";
+const authUserBaseUrl = '/authsvr/v2/authuserinfo';
 export const authUserTableUrl = `${authUserBaseUrl}/page`;
 // 获取人员详情
 export function getAuthUserDetail(id) {
-    return request({
-        url: `${authUserBaseUrl}/detail/` + id,
-        method: "GET"
-    });
+  return request({
+    url: `${authUserBaseUrl}/detail/` + id,
+    method: 'GET'
+  });
 }
 
 /****************************** 机构属性管理 ************************************ */
-const authOrgBaseUrl = "/authsvr/v2/authorginfo"
+const authOrgBaseUrl = '/authsvr/v2/authorginfo';
 // 机构详情
 export function orgInfoDetail(id) {
-    return request({
-        url: `${authOrgBaseUrl}/detail/` + id,
-        method: "GET"
-    });
+  return request({
+    url: `${authOrgBaseUrl}/detail/` + id,
+    method: 'GET'
+  });
 }
 
-
 /******************************* 主客体授权管理    ********************************* */
-const propBaseUrl = "/attrsvr/v2"
+const propBaseUrl = '/attrsvr/v2';
 // 根据属性所属类别获取属性列表,返回树结构
-export function getPropTreeByType(attrType) {
-    return request({
-        url: `${propBaseUrl}/getAttrTreeList`,
-        method: "GET",
-        params: {
-            attrType
-        }
-    });
+export function getPropTreeByType(attrSubType) {
+  return request({
+    url: `${propBaseUrl}/getAttrTreeList`,
+    method: 'GET',
+    params: {
+        attrSubType
+    }
+  });
 }
 // 获取属性详情
 export function getPropDetail(params) {
-    return request({
-        url: `${propBaseUrl}/attrRelToIds`,
-        method: "GET",
-        params
-    });
+  return request({
+    url: `${propBaseUrl}/attrRelToIds`,
+    method: 'GET',
+    params
+  });
 }
 
 // 保存属性
 export function saveProp(data) {
-    return request({
-        url: `${propBaseUrl}/attrAdds`,
-        method: "POST",
-        data
-    });
+  return request({
+    url: `${propBaseUrl}/attrAdds`,
+    method: 'POST',
+    data
+  });
 }
 // 删除属性
 export function deleteProp(params) {
-    return request({
-        url: `${propBaseUrl}/deleteAllById`,
-        method: "GET",
-        params
-    });
+  return request({
+    url: `${propBaseUrl}/deleteAllById`,
+    method: 'GET',
+    params
+  });
 }
 
 // 添加属性关联应用
-export function addRelateApp(data) {
-    return request({
-        url: `${propBaseUrl}/attrRelAdd`,
-        method: "POST",
-        data
-    });
+export function addAttrRelateSource(data) {
+  return request({
+    url: `${propBaseUrl}/attrRelAdd`,
+    method: 'POST',
+    data
+  });
 }
 
 // 查询属性关联的id集合
 export function getRelateIds(params) {
+  return request({
+    url: `${propBaseUrl}/attrRelToIds`,
+    method: 'get',
+    params
+  });
+}
+
+// 删除被关联的资源
+export function delAttrRelResource(attrRelId) {
     return request({
-        url: `${propBaseUrl}/attrRelToIds`,
-        method: "get",
-        params
+      url: `${propBaseUrl}/delAttrRelResource`,
+      method: 'get',
+      params: {
+        attrRelId
+      }
     });
-}
+  }
+
+// 查询客体属性-关联应用列表
+export const ObjRelAppTableUrl = `${propBaseUrl}/relAppPage`;
+
+// 查询客体属性-未关联应用列表
+export const ObjNotRelAppTableUrl = `${propBaseUrl}/notRelAppPage`;
+
+// 查询客体属性-关联服务列表
+export const ObjRelServiceTableUrl = `${propBaseUrl}/relServicePage`;
 
-// 查询客体-应用列表
-export const ObjAppTableUrl = `${propBaseUrl}/relAppPage`
+// 查询客体属性-未关联服务列表
+export const ObjNotRelServiceTableUrl = `${propBaseUrl}/notRelServicePage`;

+ 30 - 0
src/components/vxe-table-basic/index.scss

@@ -0,0 +1,30 @@
+.pagination-section {
+    text-align: right;
+    margin: 10px 0;
+  }
+  /deep/ .vxe-table .vxe-table--header-wrapper {
+    color: rgba(0, 0, 0, 0.65);
+    font-family: 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', Arial,
+      sans-serif;
+    -webkit-font-smoothing: antialiased;
+  }
+  /deep/ .vxe-table--render-default {
+    color: rgba(0, 0, 0, 0.85);
+  }
+  /deep/ .vxe-table--render-default .vxe-cell {
+    white-space: normal;
+  }
+  /deep/ .vxe-header--column {
+    font-weight: 400;  
+  }
+  /deep/ .vxe-table--render-default .vxe-cell--checkbox .vxe-checkbox--icon:before {   
+      border: 1px solid rgba(0, 0, 0, 0.15);
+  }
+  /deep/ .vxe-body--row:hover {
+     background-color: rgba(24, 144, 255, 0.08);
+  }
+ 
+  /deep/ .vxe-table--render-default .vxe-table--empty-block {
+    min-height: 60px;
+    color: rgba(0,0,0,.65);
+  }

+ 221 - 0
src/components/vxe-table-basic/index.vue

@@ -0,0 +1,221 @@
+<!--
+二次封装vxe-table组件
+@Author: linqian
+@Date: 2021-10-18 14:22
+-->
+<template>
+  <div>
+    <vxe-table
+      ref="vxeGrid"
+      :data="tableData"
+      :border="true"
+      :loading="false"
+      rowId="id"
+      v-bind="gridOptions"
+      highlight-hover-row
+      :seq-config="{ seqMethod }"
+    >
+      <vxe-table-column type="checkbox" width="60" align="center" v-if="selection">
+        <template #header="row">
+          <span class="custom-checkbox">
+            <el-checkbox
+              :indeterminate="row.indeterminate"
+              v-model="row.checked"
+              @change="handleToggleAllCheck"
+            ></el-checkbox>
+          </span>
+        </template>
+        <template #checkbox="scoped">
+          <span class="custom-checkbox">
+            <el-checkbox
+              :indeterminate="scoped.indeterminate"
+              v-model="scoped.checked"
+              @change="handleToggleCheck(scoped.row)"
+            ></el-checkbox>
+          </span>
+        </template>
+      </vxe-table-column>
+      <vxe-table-column type="seq" width="60" align="center" title="序号"></vxe-table-column>
+      <vxe-table-column
+        v-for="item in tableColumn"
+        :key="item.id"
+        :align="item.align ? item.align : 'center'"
+        v-bind="item"
+      >
+        <template #default="{ row }">
+          <template v-if="item.custom">
+            <slot :name="item.field" :row="row"></slot>
+          </template>
+          <template v-else>{{ row[item.field] }}</template>
+        </template>
+      </vxe-table-column>
+      <vxe-table-column v-if="tableOptList.length > 0" align="center" title="操作" field="operate" width="100px">
+        <template #default="{ row }">
+          <div class="u-table__operation">
+            <el-tooltip
+              v-for="(item, index) in tableOptList"
+              :key="index"
+              :content="item"
+              effect="dark"
+              placement="top-end"
+            >
+              <i :class="item | optIcon" @click="handleEvent(item, row)"></i>
+            </el-tooltip>
+          </div>
+        </template>
+      </vxe-table-column>
+    </vxe-table>
+    <!-- 分页器 -->
+    <div class="pagination-section" v-show="pagination">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :page-sizes="[10, 20, 30]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :page-size="pageSize"
+        :current-page="currentPage"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    // 表格数据
+    tableData: Array,
+    // 是否有复选框
+    selection: {
+      type: Boolean,
+      default: true
+    },
+    tableColumn: Array,
+    // 是否分页
+    pagination: {
+      type: Boolean,
+      default: true
+    },
+    paginationConfig: {
+      type: Object,
+      default: () => {
+        return {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        };
+      }
+    },
+    gridOptions: {
+      type: Object,
+      default: () => {}
+    },
+    tableOptList: {
+      type: Array,
+      default: () => []
+    }
+  },
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {
+    pageSize() {
+      return this.paginationConfig.pageSize;
+    },
+    currentPage() {
+      return this.paginationConfig.currentPage;
+    },
+    total() {
+      return this.paginationConfig.total;
+    }
+  },
+  methods: {
+    // 条数
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.submitPaginationChange(1, val);
+    },
+    // 页码改变
+    handleCurrentChange(val) {
+      this.submitPaginationChange(val, this.paginationConfig.pageSize);
+    },
+    submitPaginationChange(currentPage, pageSize) {
+      this.$emit('paginationChange', {
+        pageSize,
+        currentPage
+      });
+    },
+    // 发送操作事件类型
+    handleEvent(type, row) {
+      this.$emit('submitTableOpt', type, row);
+    },
+    // 改变单个复选框
+    handleToggleCheck(row) {
+      this.$refs.vxeGrid.toggleCheckboxRow(row);
+    },
+    // 改变全选复选框
+    handleToggleAllCheck() {
+      this.$refs.vxeGrid.toggleAllCheckboxRow();
+    },
+    // 自定义序号
+    // 自定义原因: 树形表格翻页序号还是从1开始
+    seqMethod({ level, seq, $seq }) {
+      let index = '';
+      if (level > 0) {
+        index = `${$seq}.${seq}`;
+        if (this.pagination) {
+          const dotIndex = index.indexOf('.');
+          if (dotIndex > -1) {
+            let integerNum = (this.currentPage - 1) * this.pageSize + Number(index.substring(0, dotIndex));
+            index = integerNum + '' + index.substr(dotIndex);
+          }
+        }
+      } else {
+        index = seq;
+        if (this.pagination) {
+          index = (this.currentPage - 1) * this.pageSize + seq;
+        }
+      }
+      return index;
+    }
+  },
+  created() {},
+  mounted() {}
+};
+</script>
+
+<style lang='scss' scoped>
+.pagination-section {
+  text-align: right;
+  margin-top: 10px;
+}
+/deep/ .vxe-table .vxe-table--header-wrapper {
+  color: rgba(0, 0, 0, 0.65);
+  font-family: 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', Arial,
+    sans-serif;
+  -webkit-font-smoothing: antialiased;
+}
+/deep/ .vxe-table--render-default {
+  color: rgba(0, 0, 0, 0.85);
+}
+/deep/ .vxe-table--render-default .vxe-cell {
+  white-space: normal;
+}
+/deep/ .vxe-header--column {
+  font-weight: 400;
+}
+/deep/ .vxe-table--render-default .vxe-cell--checkbox .vxe-checkbox--icon:before {
+  border: 1px solid rgba(0, 0, 0, 0.15);
+}
+/deep/ .vxe-body--row:hover {
+  background-color: rgba(24, 144, 255, 0.08);
+}
+
+/deep/ .vxe-table--render-default .vxe-table--empty-block {
+  min-height: 60px;
+  color: rgba(0, 0, 0, 0.65);
+}
+</style>

+ 93 - 0
src/pages/auth-object-manage/object-prop-manage/add-appser-dialog.vue

@@ -0,0 +1,93 @@
+<template>
+  <main class="add-dialog">
+    <dg-row class="property-wapper">
+      <!-- 搜索栏 -->
+      <search-bar :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
+      <!-- 表格 -->
+      <new-table
+        ref="table"
+        :selection="true"
+        :tableHeader="tableHeader"
+        :tableUrl="tableUrl[attrBelongType]"
+        :condition="condition"
+      >
+      </new-table>
+    </dg-row>
+    <div v-footer>
+      <dg-button @click="handleClose">取消</dg-button>
+      <dg-button type="primary" @click="handleSave">保存</dg-button>
+    </div>
+  </main>
+</template>
+
+<script>
+import { relateSourceTableHeader, relateSourceCondition } from '../../auth-subject-manage/DataConfig';
+import { addAttrRelateSource, ObjNotRelAppTableUrl, ObjNotRelServiceTableUrl } from '@/api/data-auth';
+import searchBar from '@/components/search-bar';
+import { searchOpt } from '@/mixins/page-opt';
+import newTable from '@/components/new-table';
+export default {
+  name: 'add-dialog',
+  props: {
+    attrBelongType: String,
+    parentNode: Object
+  },
+  components: { searchBar, newTable },
+  mixins: [searchOpt],
+  data() {
+    const vm = this;
+    return {
+      tableHeader: relateSourceTableHeader[vm.attrBelongType],
+      tableUrl: {
+        APP: ObjNotRelAppTableUrl,
+        SER: ObjNotRelServiceTableUrl
+      },
+      conditionForm: [
+        ...relateSourceCondition[vm.attrBelongType],
+        {
+          name: 'attrId',
+          value: this.parentNode.id
+        }
+      ],
+      condition: {
+        attrId: {
+          value: this.parentNode.id,
+          op: '='
+        }
+      }
+    };
+  },
+  computed: {}, // 计算属性
+  watch: {}, // 侦听器(扩展的计算属性)
+  methods: {
+    /**
+     * 关闭
+     */
+    handleClose() {
+      this.$emit('close');
+    },
+    /**
+     * 添加
+     */
+    handleSave() {
+      const params = {
+        attrId: this.parentNode.id,
+        relList: this.$refs.table.newChooseArr.map((item) => {
+          return {
+            id: item.id,
+            code: this.attrBelongType == 'FUN' ? item.applyCode : item.serviceCode
+          };
+        })
+      };
+      addAttrRelateSource(params).then((res) => {
+        this.$message.success('保存成功');
+        this.$emit('success');
+      });
+    }
+  },
+  created() {},
+  mounted() {
+  }
+};
+</script>
+<style lang="scss" scoped></style>

+ 0 - 103
src/pages/auth-object-manage/object-prop-manage/add-dialog.vue

@@ -1,103 +0,0 @@
-<!--
- * @Author: Liugh
- * @Date: 2021-05-19 16:09:07
- * @LastEditTime: 2021-05-20 11:13:49
- * @LastEditors: Do not edit
- * @FilePath: \auth-web\src\pages\data-auth-module\auth-object-manage\object-prop-manage\add-dialog.vue
- * @Description: 
--->
-
-<template>
-  <main class="add-dialog">
-    <dg-row class="property-wapper">
-      <!-- 搜索栏 -->
-      <search-bar :conditionForm="appConditonForm2" @submitSearch="receiveSearch"></search-bar>
-      <!-- 表格 -->
-      <new-table
-        ref="table"
-        :selection="true"
-        :tableHeader="cardAgencylist"
-        :tableUrl="tableUrl"
-        :condition="condition"
-        v-if="type !== 'service'"
-        lazyLoad
-      >
-      </new-table>
-    </dg-row>
-    <div v-footer>
-      <dg-button @click="handleClose">取消</dg-button>
-      <dg-button type="primary" @click="handleSave">保存</dg-button>
-    </div>
-  </main>
-</template>
-
-<script>
-import { appRestApi } from '@/api/application';
-import { cardAgencylist, cardFunctionList, appConditonForm2 } from '../../auth-subject-manage/DataConfig';
-import { addRelateApp, getRelateIds } from '@/api/data-auth';
-import searchBar from '@/components/search-bar';
-import { searchOpt } from '@/mixins/page-opt';
-import newTable from '@/components/new-table';
-import _ from 'lodash';
-export default {
-  name: 'add-dialog', // 组件名称
-  props: {
-    // 接收父组件的数据
-    type: {
-      type: String,
-      default: 'application'
-    },
-    parentNode: Object
-  },
-  components: { searchBar, newTable }, // 注册局部组件
-  mixins: [searchOpt],
-  data() {
-    // 组件内部参数
-    return {
-      // 参数名称及默认值
-      cardFunctionList,
-      cardAgencylist,
-      tableUrl: appRestApi.table,
-      otherParams: {
-        attrBelongType: this.parentNode.attrBelongType,
-        attrId: this.parentNode.id,
-        attrType: 'OBJ'
-      },
-      appConditonForm2
-    };
-  },
-  computed: {}, // 计算属性
-  watch: {}, // 侦听器(扩展的计算属性)
-  methods: {
-    /**
-     * 关闭
-     */
-    handleClose() {
-      this.$emit('close');
-    },
-    /**
-     * 添加
-     */
-    handleSave() {
-      const params = {
-        ...this.otherParams,
-        relIds: this.$refs.table.newChooseArr.map((item) => item.id || item)
-      };
-      addRelateApp(params).then((res) => {
-        this.$message.success('保存成功');
-        this.$emit('success');
-      });
-    }
-  },
-  created() {},
-  mounted() {
-    getRelateIds(this.otherParams).then((res) => {
-      this.$nextTick(() => {
-        this.$refs.table.newChooseArr = res.data.content;
-        this.$refs.table.handleSearch();
-      });
-    });
-  }
-};
-</script>
-<style lang="scss" scoped></style>

+ 115 - 0
src/pages/auth-object-manage/object-prop-manage/add-fun-dialog.vue

@@ -0,0 +1,115 @@
+<!--
+关联功能资源
+@Author: linqian
+@Date: 2021-10-18 14:08
+-->
+<template>
+  <div>
+    <!-- 搜索栏 -->
+    <search-bar :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
+    <!-- 列表 -->
+    <vxe-table-basic
+      :gridOptions="gridOptions"
+      :tableColumn="tableColumn"
+      :tableData="tableData"
+      :paginationConfig="paginationConfig"
+      @paginationChange="getPagination"
+    ></vxe-table-basic>
+    <div v-footer>
+      <dg-button @click="handleClose">取消</dg-button>
+      <dg-button type="primary" @click="handleSave">保存</dg-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import searchBar from '@/components/search-bar';
+import { searchOpt } from '@/mixins/page-opt';
+import { appRestApi } from '@/api/application';
+import vxeTableBasic from '@/components/vxe-table-basic';
+import { getRedAppFuncList } from '@/api/list-manage';
+export default {
+  components: { searchBar, vxeTableBasic },
+  mixins: [searchOpt],
+  props: {
+    parentNode: Object,
+    operateType: String,
+    attrBelongType: String
+  },
+  data() {
+    return {
+      conditionForm: [
+        {
+          label: '应用系统名称',
+          name: 'applyCode',
+          op: 'like',
+          value: '',
+          component: 'SelectApp',
+          apiUrl: appRestApi.table,
+          valueName: 'applyCode',
+          labelName: 'applyName'
+        }
+      ],
+      gridOptions: {
+        treeConfig: { children: 'child', indent: 40 }
+      },
+      tableColumn: [
+        {
+          align: 'left',
+          headerAlign: 'center',
+          title: '应用功能名称',
+          field: 'label',
+          treeNode: true
+        }
+      ],
+      tableData: [],
+      paginationConfig: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      }
+    };
+  },
+  computed: {},
+  methods: {
+    getPagination({ pageSize, currentPage }) {
+      this.paginationConfig.pageSize = pageSize;
+      this.paginationConfig.currentPage = currentPage;
+      this.getList();
+    },
+    /**
+     * 获取列表
+     */
+    getList() {
+      const params = {
+        page: this.paginationConfig.currentPage - 1,
+        size: this.paginationConfig.pageSize,
+        searchCondition: this.condition
+      };
+      getRedAppFuncList(params).then((res) => {
+        const { content, totalElements } = res.data;
+        this.tableData = content;
+        this.paginationConfig.total = totalElements;
+      });
+    },
+    receiveSearch(value) {
+      this.condition = value;
+      this.paginationConfig.currentPage = 1;
+      this.getList();
+    },
+    handleClose() {
+      this.$emit('close');
+    },
+    handleSubmit() {
+      this.$emit('success');
+    }
+  },
+  created() {
+    this.getList();
+  },
+  mounted() {}
+};
+</script>
+
+<style lang='scss'>
+</style>

+ 117 - 0
src/pages/auth-object-manage/object-prop-manage/app-ser-list.vue

@@ -0,0 +1,117 @@
+<template>
+  <div>
+    <template v-if="operateType == 'detail'">
+      <!-- 搜索栏 -->
+      <search-bar :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
+      <!-- 操作栏 -->
+      <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
+      <!-- 表格 -->
+      <new-table
+        ref="table"
+        :tableUrl="tableUrl[attrBelongType]"
+        :tableHeader="tableHeader"
+        :condition="condition"
+        :tableOptList="tableOptList"
+        @submitTableOpt="receviceOpt"
+        lazyl
+      >
+      </new-table>
+    </template>
+    <p v-else>请选择属性值</p>
+  </div>
+</template>
+
+<script>
+import newTable from '@/components/new-table';
+import { ObjRelAppTableUrl, ObjRelServiceTableUrl, delAttrRelResource } from '@/api/data-auth';
+import { relateSourceTableHeader, relateSourceCondition } from '../../auth-subject-manage/DataConfig';
+import addDialog from './add-appser-dialog';
+import operateBar from '@/components/operate-bar';
+import searchBar from '@/components/search-bar';
+import { searchOpt } from '@/mixins/page-opt';
+
+export default {
+  name: 'personnelList', // 组件名称
+  props: {
+    parentNode: Object,
+    operateType: String,
+    attrBelongType: String
+  },
+  components: { newTable, operateBar, searchBar },
+  mixins: [searchOpt],
+  data() {
+    const vm = this;
+    return {
+      tableHeader: relateSourceTableHeader[vm.attrBelongType],
+      tableUrl: {
+        APP: ObjRelAppTableUrl,
+        SER: ObjRelServiceTableUrl
+      },
+      condition: {
+        attrId: {
+          op: '=',
+          value: this.parentNode.id
+        }
+      },
+      conditionForm: [
+        ...relateSourceCondition[vm.attrBelongType],
+        {
+          name: 'attrId',
+          op: '=',
+          value: this.parentNode.id
+        }
+      ],
+      pageOptList: ['新增'],
+      tableOptList: ['删除']
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    receviceOpt(opt, row) {
+      if (opt == '新增') {
+        this.handleAdd();
+      } else if (opt == '删除') {
+        this.handleDelete(row);
+      }
+    },
+    /**
+     * @description: 添加
+     */
+    handleAdd() {
+      const vm = this;
+      const layer = this.$dgLayer({
+        title: '添加',
+        shade: [0.4, '#FFF'],
+        content: addDialog,
+        props: {
+          attrBelongType: vm.attrBelongType,
+          parentNode: vm.parentNode
+        },
+        on: {
+          success() {
+            layer.close(layer.dialogIndex);
+            vm.handleSearch();
+          }
+        },
+        area: ['1200px', '760px']
+      });
+    },
+    handleDelete(row) {
+      this.$dgConfirm(`是否确定删除这条数据!`, '提示', {}).then(() => {
+        delAttrRelResource(row.attrRelId).then((res) => {
+          this.$message.success('删除成功');
+          this.handleSearch();
+        });
+      });
+    }
+  },
+  created() {},
+  mounted() {}
+};
+</script>
+<style lang="scss" scoped>
+.add-btn {
+  margin-bottom: 10px;
+}
+</style>

+ 0 - 104
src/pages/auth-object-manage/object-prop-manage/application-list.vue

@@ -1,104 +0,0 @@
-<!--
- * @Author: Liugh
- * @Date: 2021-05-19 15:48:57
- * @LastEditTime: 2021-05-20 11:15:03
- * @LastEditors: Do not edit
- * @FilePath: \auth-web\src\pages\data-auth-module\auth-object-manage\object-prop-manage\application-list.vue
- * @Description: 
--->
-<template>
-  <dg-card header="应用列表" shadow="never">
-    <template v-if="operateType == 'detail'">
-      <!-- 搜索栏 -->
-      <search-bar :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
-      <!-- 操作栏 -->
-      <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
-      <!-- 表格 -->
-      <new-table ref="table" :tableUrl="ObjAppTableUrl" :tableHeader="cardAgencylist" :condition="condition"> </new-table>
-    </template>
-    <p v-else>请选择属性值</p>
-  </dg-card>
-</template>
-
-<script>
-import newTable from '@/components/new-table';
-import { ObjAppTableUrl } from '@/api/data-auth';
-import { cardAgencylist, appConditionForm3 } from '../../auth-subject-manage/DataConfig';
-import addDialog from './add-dialog';
-import operateBar from '@/components/operate-bar';
-import searchBar from '@/components/search-bar';
-import { searchOpt} from '@/mixins/page-opt';
-
-export default {
-  name: 'personnelList', // 组件名称
-  props: {
-    parentNode: Object,
-    operateType: String
-  },
-  components: { newTable, operateBar, searchBar }, // 注册局部组件
-  mixins: [ searchOpt ],
-  data() {
-    // 组件内部参数
-    return {
-      // 参数名称及默认值
-      cardAgencylist,
-      ObjAppTableUrl,
-      condition: {
-         attrId: {
-           op: "=",
-           value: this.parentNode.id
-         }
-      },
-      conditionForm: [
-        ...appConditionForm3,
-        {
-          name: 'attrId',
-          op: '=',
-          value: this.parentNode.id
-        }
-      ],
-      pageOptList: ['新增']
-    };
-  },
-  computed: {}, // 计算属性
-  watch: {}, // 侦听器(扩展的计算属性)
-  methods: {
-    receviceOpt(opt, row) {
-      this.handleAdd();
-    },
-    /**
-     * @description: 单击表格行
-     */
-    handleRowClick() {},
-    /**
-     * @description: 添加
-     */
-    handleAdd() {
-      const vm = this;
-      const layer = this.$dgLayer({
-        title: '添加应用资源',
-        shade: [0.4, '#FFF'],
-        content: addDialog,
-        props: {
-          type: 'application',
-          parentNode: vm.parentNode
-        },
-        on: {
-          success() {
-            layer.close(layer.dialogIndex);
-            vm.handleSearch();
-          }
-        },
-        area: ['1000px', '760px']
-      });
-    }
-  },
-  created() {},
-  mounted() {} // 组件挂载完成后
-};
-</script>
-<style lang="scss" scoped>
-.add-btn {
-  margin-bottom: 10px;
-}
-</style>

+ 0 - 40
src/pages/auth-object-manage/object-prop-manage/data-source-list.vue

@@ -1,40 +0,0 @@
-<!--
-数据资源列表
-@Author: linqian
-@Date: 2021-05-26 15:18
--->
-<template>
-    <div>
-         <dg-card class="box-card" header="数据资源列表">
-             暂无
-         </dg-card>
-    </div>
-</template>
-
-<script>
-    export default {
-        components: {
-
-        },
-        data () {
-            return {
-
-            };
-        },
-        computed: {
-
-        },
-        methods: {
-
-        },
-        created() {
-
-        },
-        mounted() {
-
-        }
-}
-</script>
-
-<style lang='scss'>
-</style>

+ 152 - 151
src/pages/auth-object-manage/object-prop-manage/function-list.vue

@@ -1,163 +1,164 @@
 <!--
- * @Author: Liugh
- * @Date: 2021-05-19 15:43:35
- * @LastEditTime: 2021-05-20 11:14:56
- * @LastEditors: Do not edit
- * @FilePath: \auth-web\src\pages\data-auth-module\auth-object-manage\object-prop-manage\function-list.vue
- * @Description: 
+关联功能资源
+@Author: linqian
+@Date: 2021-10-18 14:08
 -->
 <template>
-    <dg-card class="box-card" header="功能资源列表">
-        暂无
-        <!-- <el-form ref="form" :model="cardForm" label-suffix=":" inline>
-            <el-form-item label="姓名">
-                <el-input clearable placeholder="请输入姓名" v-model="cardForm.name"></el-input>
-            </el-form-item>
-            <el-form-item label="身份证号码">
-                <el-input clearable placeholder="请输入身份证号码" v-model="cardForm.name"></el-input>
-            </el-form-item>
-            <el-form-item label="单位名称">
-                <dg-tree-select
-                    v-model="cardForm.institution"
-                    placeholder="请选择单位名称"
-                    :data="options"
-                    clearable
-                    filterable
-                    multiple
-                ></dg-tree-select>
-            </el-form-item>
-            <el-form-item>
-                <dg-button type="primary" icon="el-icon-search" @click="doSearchPersion">查询</dg-button>
-                <dg-button type="primary" icon="el-icon-plus" @click="add">添加</dg-button>
-            </el-form-item>
-        </el-form>
-        <Table
-            ref="table"
-            :url="tableUrl"
-            :headerData="cardFunctionList"
-            :condition="reportForm"
-            :lazyLoad="true"
-            @handleRowClick="handleRowClick"
-        >
-        </Table> -->
-    </dg-card>
+  <div>
+    功能开发中暂不开放!
+    <!-- <template v-if="operateType == 'detail'"> -->
+      <!-- 搜索栏 -->
+      <!-- <search-bar :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar> -->
+      <!-- 操作栏 -->
+      <!-- <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar> -->
+      <!-- 列表 -->
+      <!-- <vxe-table-basic
+        :gridOptions="gridOptions"
+        :tableColumn="tableColumn"
+        :tableOptList="tableOptList"
+        :tableData="tableData"
+        :paginationConfig="paginationConfig"
+        @paginationChange="getPagination"
+        @submitTableOpt="receviceOpt"
+      ></vxe-table-basic> -->
+    <!-- </template> -->
+    <!-- <p v-else>请选择属性值</p> -->
+  </div>
 </template>
 
 <script>
-import Table from "@/components/table";
-import * as dynamicManageApi from "@/api/dynamic-manage";
-import { cardFunctionList } from "../../auth-subject-manage/DataConfig";
-import addDialog from "./add-dialog";
-const editorArea = ["1200px", "660px"];
+import operateBar from '@/components/operate-bar';
+import searchBar from '@/components/search-bar';
+import { searchOpt } from '@/mixins/page-opt';
+import { appRestApi } from '@/api/application';
+import vxeTableBasic from '@/components/vxe-table-basic';
+import { getRedAppFuncList, delRedAppFunc } from '@/api/list-manage';
+import addFunDialog from './add-fun-dialog.vue';
 export default {
-    name: "personnelList", // 组件名称
-    props: {
-        // 接收父组件的数据
+  components: { operateBar, searchBar, vxeTableBasic },
+  mixins: [searchOpt],
+  props: {
+    parentNode: Object,
+    operateType: String,
+    attrBelongType: String
+  },
+  data() {
+    return {
+      conditionForm: [
+        {
+          label: '应用系统名称',
+          name: 'appName',
+          op: 'like',
+          value: '',
+          component: 'SelectApp',
+          apiUrl: appRestApi.table,
+          valueName: 'applyName',
+          labelName: 'applyName'
+        }
+      ],
+      pageOptList: ['新增'],
+      gridOptions: {
+        treeConfig: { children: 'child', indent: 40 }
+      },
+      tableColumn: [
+        {
+          align: 'left',
+          headerAlign: 'center',
+          title: '应用功能名称',
+          field: 'label',
+          treeNode: true
+        }
+      ],
+      tableOptList: ['删除'],
+      tableData: [],
+      paginationConfig: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      }
+    };
+  },
+  computed: {},
+  methods: {
+    receviceOpt(opt, row) {
+      if (opt == '新增') {
+        this.handleAdd();
+      } else if (opt == '删除') {
+        this.handleRemove(row);
+      }
     },
-    data() {
-        // 组件内部参数
-        return {
-            // 参数名称及默认值
-            cardFunctionList,
-            tableUrl: dynamicManageApi.tableUrl,
-            reportForm: {},
-            cardForm: {},
-            options: [
-                {
-                    id: "fruits",
-                    label: "Fruits",
-                    children: [
-                        {
-                            id: "apple",
-                            label: "Apple",
-                            isNew: true
-                        },
-                        {
-                            id: "grapes",
-                            label: "Grapes",
-                            disabled: true
-                        },
-                        {
-                            id: "pear",
-                            label: "Pear"
-                        },
-                        {
-                            id: "strawberry",
-                            label: "Strawberry 🍓"
-                        },
-                        {
-                            id: "watermelon",
-                            label: "Watermelon 🍉"
-                        }
-                    ]
-                },
-                {
-                    id: "vegetables",
-                    label: "Vegetables",
-                    children: [
-                        {
-                            id: "corn",
-                            label: "Corn 🌽"
-                        },
-                        {
-                            id: "carrot",
-                            label: "Carrot 🥕"
-                        },
-                        {
-                            id: "eggplant",
-                            label: "Eggplant 🍆"
-                        },
-                        {
-                            id: "tomato",
-                            label: "Tomato 🍅"
-                        }
-                    ]
-                }
-            ]
+    /**
+     * 新增
+     */
+    handleAdd() {
+      const vm = this;
+      const layer = this.$dgLayer({
+        title: '新增',
+        content: addFunDialog,
+        props: {},
+        on: {
+          success() {
+            vm.reloadTable();
+            layer.close(layer.dialogIndex);
+          }
+        },
+        cancel: function (index) {
+          // 关闭对应弹窗的ID
+          layer.close(index);
+          return false;
+        },
+        area: ['900px', '800px']
+      });
+    },
+    /**
+     * 删除
+     */
+    handleRemove() {
+      this.$dgConfirm(`是否确定删除这条数据!`, '提示', {}).then(() => {
+        const params = {
+          // isTreeNode: row.isTreeNode,
+          // resourceId: row.id,
+          // resourceType: row.type
         };
+        delRedAppFunc(params).then((res) => {
+          this.$message.success('删除成功!');
+          this.getList();
+        });
+      });
     },
-    computed: {}, // 计算属性
-    watch: {}, // 侦听器(扩展的计算属性)
-    components: { Table }, // 注册局部组件
-    methods: {
-        /**
-         * @description: 查询
-         */
-        doSearchPersion() {},
-        /**
-         * @description: 单击表格行
-         */
-        handleRowClick() {},
-        /**
-         * @description: 添加
-         */
-        add() {
-            const layer = this.$dgLayer({
-                title: "添加功能资源",
-                shade: [0.4, "#FFF"],
-                content: addDialog,
-                props: {
-                    type: "personnel"
-                },
-                btn: ["保存", "关闭"],
-                yes: () => {
-                    console.log("我点击了保存");
-                },
-                btn2: () => {
-                    layer.close(layer.dialogIndex);
-                },
-                area: editorArea
-            });
-        }
-    }, // 内部方法
-    beforeCreate() {}, // 组件创建前
-    created() {}, // 组件创建完成后
-    beforeMount() {}, // 组件挂载前
-    mounted() {}, // 组件挂载完成后
-    beforeUpdate() {}, // 组件更新前
-    updated() {}, // 组件挂载完成后
-    beforeDestroy() {}, // 组件销毁前
-    destroyed() {} // 组件销毁完成后
+    getPagination({ pageSize, currentPage }) {
+      this.paginationConfig.pageSize = pageSize;
+      this.paginationConfig.currentPage = currentPage;
+      this.getList();
+    },
+    /**
+     * 获取列表
+     */
+    getList() {
+      const params = {
+        page: this.paginationConfig.currentPage - 1,
+        size: this.paginationConfig.pageSize,
+        searchCondition: this.condition
+      };
+      getRedAppFuncList(params).then((res) => {
+        const { content, totalElements } = res.data;
+        this.tableData = content;
+        this.paginationConfig.total = totalElements;
+      });
+    },
+    receiveSearch(value) {
+      this.condition = value;
+      this.paginationConfig.currentPage = 1;
+      this.getList();
+    },
+    reloadTable() {}
+  },
+  created() {
+    this.getList();
+  },
+  mounted() {}
 };
 </script>
-<style lang="scss" scoped></style>
+
+<style lang='scss'>
+</style>

+ 92 - 77
src/pages/auth-object-manage/object-prop-manage/index.vue

@@ -8,91 +8,106 @@
 -->
 
 <template>
-    <main class="subject-property">
-        <dg-row gutter="1rem">
-            <dg-col :span="5">
-                <tree ref="tree" title="客体属性类" type="OBJ" @submitNodeOperate="getNodeOperate" />
-            </dg-col>
-            <!-- 属性详情 -->
-            <dg-col :span="6">
-                <prop-detail
-                    :parentNode="parentNode"
-                    type="OBJ"
-                    :key="key"
-                    :operateType="operateType"
-                    @savePropSuccess="refreshTree"
-                ></prop-detail>
-            </dg-col>
-            <dg-col :span="13">
-                <!-- TODO 根据点击属性类型判断显示什么表格 -->
-                <component
-                    :is="componentValue"
-                    :parentNode="parentNode"
-                    :operateType="operateType"
-                    :key="key"
-                ></component>
-            </dg-col>
-        </dg-row>
-    </main>
+  <main class="subject-property">
+    <dg-row gutter="1rem">
+      <dg-col :span="5">
+        <tree ref="tree" title="客体属性类" type="OBJ" @submitNodeOperate="getNodeOperate" />
+      </dg-col>
+      <!-- 属性详情 -->
+      <dg-col :span="9">
+        <prop-detail
+          :parentNode="parentNode"
+          type="OBJ"
+          :key="key"
+          :operateType="operateType"
+          @savePropSuccess="refreshTree"
+        ></prop-detail>
+      </dg-col>
+      <dg-col :span="10">
+        <!-- TODO 根据点击属性类型判断显示什么表格 -->
+        <dg-card class="box-card" :header="componentType[attrBelongType].title" shadow="never">
+          <div style="height: calc(100vh - 15.5rem)">
+            <dg-scrollbar>
+              <component
+                :is="componentValue"
+                :parentNode="parentNode"
+                :operateType="operateType"
+                :attrBelongType="attrBelongType"
+                :key="key"
+              ></component>
+            </dg-scrollbar>
+          </div>
+        </dg-card>
+      </dg-col>
+    </dg-row>
+  </main>
 </template>
 
 <script>
-import Tree from "../../auth-subject-manage/subject-prop-manage/prop-tree";
-import propDetail from "../../auth-subject-manage/subject-prop-manage/prop-detail";
-import functionList from "./function-list";
-import serviceList from "./service-list";
-import applicationList from "./application-list";
-import dataSourceList from "./data-source-list";
+import Tree from '../../auth-subject-manage/subject-prop-manage/prop-tree';
+import propDetail from '../../auth-subject-manage/subject-prop-manage/prop-detail';
+import functionList from './function-list';
+import appSerList from './app-ser-list';
 export default {
-    name: "subject-property", // 组件名称
-    props: {
-        // 接收父组件的数据
-    },
-    data() {
-        // 组件内部参数
-        return {
-            // 参数名称及默认值
-            componentType: {
-                FUN: "function-list",
-                SER: "service-list",
-                APP: "application-list",
-                DATA: "data-source-list"
-            },
-            componentValue: "application-list",
-            parentNode: {},
-            key: 0,
-            // 操作类型,新增属性还是编辑
-            operateType: ""
-        };
-    },
-    computed: {}, // 计算属性
-    watch: {}, // 侦听器(扩展的计算属性)
-    components: { Tree, functionList, serviceList, applicationList, propDetail, dataSourceList }, // 注册局部组件
-    methods: {
-        /**
-         * 获取树操作
-         */
-        getNodeOperate(data) {
-            const { attrBelongType, operateType } = data;
-            this.operateType = operateType;
-            this.parentNode = data;
-            this.componentValue = this.componentType[attrBelongType];
-            this.key++;
+  name: 'subject-property', // 组件名称
+  props: {
+    // 接收父组件的数据
+  },
+  data() {
+    // 组件内部参数
+    return {
+      // 参数名称及默认值
+      componentType: {
+        FUN: {
+          cmp: 'function-list',
+          title: '关联功能资源列表'
         },
-        /**
-         * 刷新属性树
-         */
-        refreshTree() {
-            this.$refs.tree.init();
+        SER: {
+          cmp: 'app-ser-list',
+          title: '关联服务资源列表'
         },
-        /**
-         * @description: 表单查询
-         */
-        handleSearch() {}
+        APP: {
+          cmp: 'app-ser-list',
+          title: '关联应用资源列表'
+        }
+      },
+      componentValue: 'app-ser-list',
+      parentNode: {},
+      key: 0,
+      // 操作类型,新增属性还是编辑
+      operateType: '',
+      attrBelongType: 'APP'
+    };
+  },
+  computed: {}, // 计算属性
+  watch: {}, // 侦听器(扩展的计算属性)
+  components: { Tree, functionList, appSerList, propDetail }, // 注册局部组件
+  methods: {
+    /**
+     * 获取树操作
+     */
+    getNodeOperate(data) {
+      const { type, operateType } = data;
+      this.attrBelongType = type.split("-")[0];
+      this.operateType = operateType;
+      this.parentNode = data;
+      this.componentValue = this.componentType[this.attrBelongType].cmp;
+      this.key++;
+    },
+    /**
+     * 刷新属性树
+     */
+    refreshTree() {
+      this.$refs.tree.init();
     },
-    created() {} // 组件创建完成后
+    /**
+     * @description: 表单查询
+     */
+    handleSearch() {}
+  },
+  created() {} // 组件创建完成后
 };
 </script>
 <style lang="scss" scoped>
-@import "../../auth-subject-manage/index.scss";
+@import '../../auth-subject-manage/index.scss';
 </style>

+ 0 - 158
src/pages/auth-object-manage/object-prop-manage/service-list.vue

@@ -1,158 +0,0 @@
-<!--
- * @Author: Liugh
- * @Date: 2021-05-19 15:48:26
- * @LastEditTime: 2021-05-20 11:15:54
- * @LastEditors: Do not edit
- * @FilePath: \auth-web\src\pages\data-auth-module\auth-object-manage\object-prop-manage\service-list.vue
- * @Description: //TODO 暂定
--->
-<template>
-    <dg-card class="box-card" header="服务资源列表">
-        暂无
-        <!-- <el-form ref="form" :model="cardForm" label-suffix=":" inline>
-            <el-form-item label="单位名称">
-                <el-input clearable placeholder="请输入单位名称" v-model="cardForm.name"></el-input>
-            </el-form-item>
-            <el-form-item label="机构代码">
-                <dg-tree-select
-                    v-model="cardForm.institution"
-                    placeholder="请选择机构代码"
-                    :data="options"
-                    clearable
-                    filterable
-                    multiple
-                ></dg-tree-select>
-            </el-form-item>
-            <el-form-item>
-                <dg-button type="primary" icon="el-icon-search" @click="doSearchPersion">查询</dg-button>
-                <dg-button type="primary" icon="el-icon-plus">添加</dg-button>
-            </el-form-item>
-        </el-form>
-        <Table
-            ref="table"
-            :url="tableUrl"
-            :headerData="cardServiceList"
-            :condition="reportForm"
-            :lazyLoad="true"
-            @handleRowClick="handleRowClick"
-        >
-        </Table> -->
-    </dg-card>
-</template>
-
-<script>
-import Table from "@/components/table";
-import * as dynamicManageApi from "@/api/dynamic-manage";
-import addDialog from "./add-dialog";
-import { cardServiceList } from "../../auth-subject-manage/DataConfig";
-const editorArea = ["1200px", "660px"];
-export default {
-    name: "personnelList", // 组件名称
-    props: {
-        // 接收父组件的数据
-    },
-    data() {
-        // 组件内部参数
-        return {
-            // 参数名称及默认值
-            cardServiceList,
-            tableUrl: dynamicManageApi.tableUrl,
-            reportForm: {},
-            cardForm: {},
-            options: [
-                {
-                    id: "fruits",
-                    label: "Fruits",
-                    children: [
-                        {
-                            id: "apple",
-                            label: "Apple",
-                            isNew: true
-                        },
-                        {
-                            id: "grapes",
-                            label: "Grapes",
-                            disabled: true
-                        },
-                        {
-                            id: "pear",
-                            label: "Pear"
-                        },
-                        {
-                            id: "strawberry",
-                            label: "Strawberry 🍓"
-                        },
-                        {
-                            id: "watermelon",
-                            label: "Watermelon 🍉"
-                        }
-                    ]
-                },
-                {
-                    id: "vegetables",
-                    label: "Vegetables",
-                    children: [
-                        {
-                            id: "corn",
-                            label: "Corn 🌽"
-                        },
-                        {
-                            id: "carrot",
-                            label: "Carrot 🥕"
-                        },
-                        {
-                            id: "eggplant",
-                            label: "Eggplant 🍆"
-                        },
-                        {
-                            id: "tomato",
-                            label: "Tomato 🍅"
-                        }
-                    ]
-                }
-            ]
-        };
-    },
-    computed: {}, // 计算属性
-    watch: {}, // 侦听器(扩展的计算属性)
-    components: { Table }, // 注册局部组件
-    methods: {
-        /**
-         * @description: 查询
-         */
-        doSearchPersion() {},
-        /**
-         * @description: 单击表格行
-         */
-        handleRowClick() {},
-        /**
-         * @description: 添加
-         */
-        add() {
-            const layer = this.$dgLayer({
-                title: "添加机构",
-                shade: [0.4, "#FFF"],
-                content: addDialog,
-                props: {
-                    type: "agency"
-                },
-                on: {
-                    success() {
-                        layer.close(layer.dialogIndex);
-                    }
-                },
-                area: editorArea
-            });
-        }
-    }, // 内部方法
-    beforeCreate() {}, // 组件创建前
-    created() {}, // 组件创建完成后
-    beforeMount() {}, // 组件挂载前
-    mounted() {}, // 组件挂载完成后
-    beforeUpdate() {}, // 组件更新前
-    updated() {}, // 组件挂载完成后
-    beforeDestroy() {}, // 组件销毁前
-    destroyed() {} // 组件销毁完成后
-};
-</script>
-<style lang="scss" scoped></style>

+ 86 - 25
src/pages/auth-subject-manage/DataConfig.js

@@ -112,18 +112,6 @@ const appConditionForm = [
   }
 ];
 
-const appConditonForm2 = [
-  {
-    label: '应用系统名称',
-    name: 'applyName',
-    op: '=',
-    value: '',
-    component: 'SelectApp',
-    apiUrl: appRestApi.table,
-    valueName: 'applyName',
-    labelName: 'applyName'
-  }
-];
 
 const appConditionForm3 = [
   {
@@ -246,16 +234,7 @@ const cardFunctionList = [
     prop: ''
   }
 ];
-const cardServiceList = [
-  {
-    label: '服务资源名称',
-    prop: ''
-  },
-  {
-    label: '所属系统',
-    prop: ''
-  }
-];
+
 
 const typeData = {
   10: [
@@ -328,6 +307,87 @@ const orgConditonForm = [
     placeholder: '请选择单位名称'
   }
 ];
+
+
+const relateSourceTableHeader = {
+   APP: [
+    {
+      label: '应用系统名称',
+      prop: 'applyName'
+    },
+    {
+      label: '应用系统编号',
+      prop: 'applyCode'
+    }
+  ],
+  SER: [
+    {
+      label: '服务资源名称',
+      prop: 'serviceName'
+    },
+    {
+      label: '服务资源标识符',
+      prop: 'serviceCode'
+    },
+    {
+      label: '应用系统名称',
+      prop: 'appName'
+    }
+  ]
+}
+
+const relateSourceCondition =  {
+  APP: [
+    {
+      label: '应用系统名称',
+      name: 'id',
+      op: '=',
+      value: '',
+      component: 'SelectApp',
+      apiUrl: appRestApi.table,
+      valueName: 'id',
+      labelName: 'applyName'
+    },
+    {
+      label: '应用系统编码',
+      name: 'code',
+      op: 'like',
+      value: '',
+      component: 'ElInput',
+      attr: {
+        style: "width: 150px"
+      }
+
+    }
+  ],
+  SER: [
+    {
+      label: '服务资源名称',
+      name: 'name',
+      op: 'like',
+      value: '',
+      component: 'ElInput'
+    },
+    {
+      label: '服务资源标识符',
+      name: 'code',
+      op: 'like',
+      value: '',
+      component: 'ElInput'
+    },
+    {
+      label: '应用系统名称',
+      name: 'appCode',
+      op: 'like',
+      value: '',
+      component: 'SelectApp',
+      apiUrl: appRestApi.table,
+      valueName: 'applyCode',
+      labelName: 'applyName'
+    }
+  ]
+}
+
 export {
   pageOptList,
   userPropConditionForm,
@@ -335,7 +395,6 @@ export {
   typeData,
   orgDetail,
   appConditionForm,
-  appConditonForm2,
   appConditionForm3,
   appTableHeader,
   applicationField,
@@ -344,6 +403,8 @@ export {
   cardAgencylist,
   cardAddPersonnelList,
   cardFunctionList,
-  cardServiceList,
-  orgConditonForm
+  orgConditonForm,
+  relateSourceTableHeader,
+  relateSourceCondition
+
 };

+ 6 - 10
src/pages/auth-subject-manage/index.scss

@@ -30,16 +30,15 @@
   }
 }
 .subject-property /deep/ {
-  .box-card {
-    .el-card__header {
-      display: block;
-    }
-    height: calc(100vh - 12rem);
-  }
+  // .box-card {
+  //   .el-card__header {
+  //     display: block;
+  //   }
+  //   height: calc(100vh - 12rem);
+  // }
   .subject-property__form-item {
     display: flex;
     align-items: center;
-    // margin-bottom: 10px;
     .icon {
       margin-left: 10px;
       cursor: pointer;
@@ -49,7 +48,4 @@
   .subject-property__form-item:last-child {
     margin-bottom: 0;
   }
-  .prop-value-item {
-    // margin-bottom: 10px;
-  }
 }

+ 1 - 1
src/pages/auth-subject-manage/subject-prop-manage/application-list.vue

@@ -7,7 +7,7 @@
  * @Description: 
 -->
 <template>
-    <dg-card class="box-card" header="应用列表">
+    <dg-card class="box-card" header="关联应用资源">
         <el-form ref="form" label-suffix=":" inline>
             <el-form-item label="应用系统名称">
                 <el-input clearable placeholder="请输入应用系统名称" v-model="form.applyName.value"></el-input>

+ 233 - 160
src/pages/auth-subject-manage/subject-prop-manage/prop-detail.vue

@@ -4,178 +4,251 @@
 @Date: 2021-05-25 11:22
 -->
 <template>
-    <div>
-        <dg-card class="box-card" shadow="never" header="属性详情">
-            <div style="height: calc(100vh - 19rem)">
-                <dg-scrollbar>
-                    <el-form
-                        ref="ruleForm"
-                        :rules="rules"
-                        :model="form"
-                        label-width="80px"
-                        :style="{ width: type == 'SUB' ? '40%' : '90%' }"
-                    >
-                        <el-form-item label="属性类别">
-                            <el-input v-model="rootName" placeholder="请输入属性类别" disabled></el-input>
-                        </el-form-item>
-                        <el-form-item label="属性名称" prop="name">
-                            <el-input v-model="form.name" placeholder="请输入属性名称" :disabled="readOnly"></el-input>
-                        </el-form-item>
-                        <el-form-item
-                            v-for="(item, index) in form.child"
-                            :key="index"
-                            :label="index == 0 ? '属性值' : ''"
-                            :prop="'child.' + index + '.name'"
-                            class="prop-value-item"
-                            :rules="{
-                                required: true,
-                                message: '属性值不能为空',
-                                trigger: 'blur'
-                            }"
-                        >
-                            <div class="subject-property__form-item">
-                                <el-input
-                                    v-model="item.name"
-                                    placeholder="请输入属性值"
-                                    :disabled="readOnly"
-                                ></el-input>
-                                <i
-                                    class="el-icon-remove-outline icon"
-                                    @click="handleDeletePropValue(index)"
-                                    v-if="form.child.length > 1 && !readOnly"
-                                ></i>
-                                <!-- <dg-button class="delete-btn" size="mini" icon="el-icon-minus" plain></dg-button> -->
-                            </div>
-                        </el-form-item>
-                        <el-form-item label="">
-                            <dg-button
-                                v-if="!readOnly"
-                                :icon="'添加属性值' | optIcon"
-                                size="mini"
-                                type="primary"
-                                plain
-                                @click="handleAddPropValue"
-                                >添加属性值</dg-button
-                            >
-                        </el-form-item>
-                        <el-form-item label="说明" v-if="!readOnly">
-                            <el-input v-model="form.remark" type="textarea" row="3" placeholder="请输入说明"></el-input>
-                        </el-form-item>
-                        <el-form-item v-if="!readOnly" label="" style="text-align: center"
-                            ><dg-button type="primary" @click="handleSaveProp" :icon="'保存'| optIcon">保存</dg-button></el-form-item
-                        >
-                    </el-form>
-                </dg-scrollbar>
-            </div>
-        </dg-card>
-    </div>
+  <div>
+    <dg-card class="box-card" shadow="never" header="属性详情">
+      <div style="height: calc(100vh - 15.5rem)">
+        <dg-scrollbar>
+          <el-form
+            ref="ruleForm"
+            :rules="rules"
+            :model="form"
+            label-width="100px"
+            :style="{ width: type == 'SUB' ? '40%' : '90%' }"
+          >
+            <el-form-item label="属性类别">
+              <el-input v-model="rootName" placeholder="请输入属性类别" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="属性类别编码">
+              <el-input v-model="rootCode" placeholder="请输入属性类别编码" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="属性名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入属性名称" :disabled="readOnly"></el-input>
+            </el-form-item>
+            <el-form-item label="属性编码" prop="code" class="attr-code">
+              <template v-if="parentNode.pid && !parentNode.child">
+                <el-input v-model="attrCode" placeholder="请输入属性编码" :disabled="readOnly">
+                  <template slot="prepend">{{ rootCode }}-</template>
+                </el-input>
+              </template>
+              <template v-else>
+                <el-input v-model="form.code" placeholder="请输入属性编码" :disabled="readOnly">
+                  <template slot="prepend">{{ rootCode }}-</template>
+                </el-input>
+              </template>
+              <!-- <dg-row>
+                <dg-col :span="5"><el-input value="APP-RA" :disabled="true"></el-input></dg-col>
+                <dg-col :span="2" style="text-align: center"><i class="el-icon-minus"></i></dg-col>
+                <dg-col :span="17">
+                  <el-input v-model="form.code" placeholder="请输入属性编码" :disabled="readOnly"></el-input>
+                </dg-col>
+              </dg-row> -->
+            </el-form-item>
+            <el-form-item label="是否内置" v-if="operateType !== 'add'">
+              <el-input :value="form.builtIn == 1 ? '是' : '否'" disabled></el-input>
+            </el-form-item>
+            <template v-for="(item, index) in form.child">
+              <dg-row :key="index">
+                <dg-col :span="12">
+                  <el-form-item
+                    :label="index == 0 ? '属性值名称' : ''"
+                    :prop="'child.' + index + '.name'"
+                    class="prop-value-item"
+                    :rules="{
+                      required: true,
+                      message: '属性值名称不能为空',
+                      trigger: 'blur'
+                    }"
+                  >
+                    <el-input v-model="item.name" placeholder="请输入属性值名称" :disabled="readOnly"></el-input>
+                  </el-form-item>
+                </dg-col>
+                <dg-col :span="12">
+                  <el-form-item
+                    :label="index == 0 ? '属性值编码' : ''"
+                    :prop="'child.' + index + '.code'"
+                    class="prop-value-item"
+                    :rules="{
+                      required: true,
+                      message: '属性值编码不能为空',
+                      trigger: 'blur'
+                    }"
+                  >
+                    <div class="subject-property__form-item">
+                      <el-input v-model="item.code" placeholder="请输入属性值编码" :disabled="readOnly"></el-input>
+                      <i
+                        class="el-icon-remove-outline icon"
+                        @click="handleDeletePropValue(index)"
+                        v-if="form.child.length > 1 && !readOnly"
+                      ></i>
+                    </div>
+                  </el-form-item>
+                </dg-col>
+              </dg-row>
+            </template>
+            <el-form-item label="">
+              <dg-button
+                v-if="!readOnly"
+                :icon="'添加属性值' | optIcon"
+                size="mini"
+                type="primary"
+                plain
+                @click="handleAddPropValue"
+                >添加属性值</dg-button
+              >
+            </el-form-item>
+            <!-- <el-form-item label="说明" v-if="!readOnly">
+              <el-input v-model="form.remark" type="textarea" row="3" placeholder="请输入说明"></el-input>
+            </el-form-item> -->
+            <el-form-item v-if="!readOnly" label="" style="text-align: center"
+              ><dg-button type="primary" @click="handleSaveProp" :icon="'保存' | optIcon">保存</dg-button></el-form-item
+            >
+          </el-form>
+        </dg-scrollbar>
+      </div>
+    </dg-card>
+  </div>
 </template>
 
 <script>
-import { saveProp } from "@/api/data-auth";
-import _ from "lodash";
+import { saveProp } from '@/api/data-auth';
+import _ from 'lodash';
 export default {
-    props: {
-        parentNode: Object,
-        type: String,
-        operateType: String
+  props: {
+    parentNode: Object,
+    type: String,
+    operateType: String
+  },
+  components: {},
+  data() {
+    return {
+      form: {
+        attrSubType: '',
+        child: [
+          {
+            name: '',
+            code: ''
+          }
+        ],
+        remark: '',
+        name: '',
+        code: '',
+        pid: '',
+        builtIn: this.parentNode.builtIn,
+        ptype: '',
+        id: ''
+      },
+      rules: {
+        name: [{ required: true, message: '属性名称不能为空', trigger: 'change' }],
+        code: [{ required: true, message: '属性编码不能为空', trigger: 'change' }]
+      },
+      rootName: '',
+      rootCode: '',
+      attrCode: ''
+    };
+  },
+  computed: {
+    readOnly() {
+      const { pid, child, builtIn, ptype } = this.parentNode;
+      if (pid && !child) {
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
+        const index = ptype.indexOf('-');
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
+        this.attrCode = ptype.substring(index + 1);
+      }
+      return pid && (!child || builtIn == 1);
+    }
+  },
+  methods: {
+    /**
+     * 添加属性值
+     */
+    handleAddPropValue() {
+      this.form.child.push({
+        name: '',
+        code: ''
+      });
     },
-    components: {},
-    data() {
-        return {
-            form: {
-                attrBelongType: this.parentNode.attrBelongType,
-                attrType: this.type,
-                child: [
-                    {
-                        name: ""
-                    }
-                ],
-                remark: "",
-                name: "",
-                pid: this.parentNode.id
-            },
-            rules: {
-                name: [{ required: true, message: "属性名称不能为空", trigger: "change" }]
-            },
-            rootName: "",
-            readOnly: this.parentNode.pid && !this.parentNode.child
-        };
+    /**
+     * 删除属性值
+     */
+    handleDeletePropValue(index) {
+      this.form.child.splice(index, 1);
     },
-    computed: {},
-    methods: {
-        /**
-         * 添加属性值
-         */
-        handleAddPropValue() {
-            this.form.child.push({
-                name: ""
-            });
-        },
-        /**
-         * 删除属性值
-         */
-        handleDeletePropValue(index) {
-            this.form.child.splice(index, 1);
-        },
-        /**
-         * 保存属性
-         */
-        handleSaveProp() {
-            this.$refs.ruleForm.validate((valid) => {
-                if (valid) {
-                    // 属性值不能重复
-                    let flag = false;
-                    this.form.child.sort((a, b) => {
-                        if (a.name == b.name) {
-                            flag = true;
-                            return;
-                        }
-                    });
-                    if (flag) {
-                        this.$message.warning("属性值不能重复");
-                        return;
-                    }
-
-                    saveProp(this.form).then((res) => {
-                        const { result, msg } = res.data;
-                        if (result == "200") {
-                            this.$message.success("保存成功");
-                            this.$emit("savePropSuccess");
-                        } else {
-                            this.$message.error(msg);
-                        }
-                    });
-                }
-            });
-        }
-    },
-    created() {
-        if (this.parentNode.pname) {
-            const pName = this.parentNode.pname.split("-");
-            delete this.parentNode.operateType;
-            this.form = _.cloneDeep(this.parentNode);
-            if (pName.length > 1) {
-                this.form.name = pName[1];
-                this.form.child = [
-                    {
-                        ...this.parentNode
-                    }
-                ];
-                this.rootName = pName[0];
+    /**
+     * 保存属性
+     */
+    handleSaveProp() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          // 属性值不能重复
+          // let flag = false;
+          // this.form.child.sort((a, b) => {
+          //   if (a.name == b.name) {
+          //     flag = true;
+          //     return;
+          //   }
+          // });
+          // if (flag) {
+          //   this.$message.warning('属性值不能重复');
+          //   return;
+          // }
+          const { child, ...otherParams } = this.form;
+          const params = {
+            ...otherParams,
+            child: child.map((item) => {
+              const { id, code, name } = item;
+              return {
+                id,
+                code,
+                name
+              };
+            })
+          };
+          saveProp(params).then((res) => {
+            const { result, msg } = res.data;
+            if (result == '200') {
+              this.$message.success('保存成功');
+              this.$emit('savePropSuccess');
             } else {
-                this.rootName = pName[0];
+              this.$message.error(msg);
             }
-        } else {
-            this.rootName = this.parentNode.name;
+          });
         }
-    },
-    mounted() {}
+      });
+    }
+  },
+  created() {
+    const { attrSubType, type, id, code, name } = this.parentNode;
+
+    if (this.parentNode.pname) {
+      const pName = this.parentNode.pname.split('-');
+      const pType = this.parentNode.ptype.split('-');
+      delete this.parentNode.operateType;
+      this.form = _.cloneDeep(this.parentNode);
+      if (pName.length > 1) {
+        this.form.name = pName[1];
+        this.form.child = [
+          {
+            ...this.parentNode
+          }
+        ];
+      }
+      this.rootName = pName[0];
+      this.rootCode = pType[0];
+    } else {
+      this.rootName = this.parentNode.name;
+      this.rootCode = this.parentNode.code;
+      this.form.attrSubType = attrSubType;
+      this.form.pid = id;
+      this.form.ptype = type;
+    }
+  },
+  mounted() {}
 };
 </script>
 
 <style lang='scss' scoped>
-.delete-btn {
-    width: 50px !important;
+/deep/.el-input-group__prepend {
+  padding: 0 12px;
 }
 </style>

+ 9 - 8
src/pages/auth-subject-manage/subject-prop-manage/prop-tree.vue

@@ -98,7 +98,7 @@ export default {
         deleteProp(params).then((res) => {
           this.$message.success('删除成功');
           this.init();
-          this.setDefault();
+          // this.setDefault();
         });
       });
     },
@@ -107,6 +107,7 @@ export default {
         getPropTreeByType(this.type).then((res) => {
           this.treeData = res.data.content;
           resolve(res.data.content);
+          this.setDefault();
         });
       });
     },
@@ -120,7 +121,7 @@ export default {
   },
   async created() {
     await this.init();
-    this.setDefault();
+    // this.setDefault();
   },
   mounted() {}
 };
@@ -136,12 +137,12 @@ export default {
     i {
       color: #1890ff;
     }
-    .operation-icons {
-      display: none;
-    }
-    &:hover .operation-icons {
-      display: block;
-    }
+    // .operation-icons {
+    //   display: none;
+    // }
+    // &:hover .operation-icons {
+    //   display: block;
+    // }
   }
 }
 /deep/ .el-tree {