dengjunjie
2025-04-19 9e579eda4601ed7b492b9d19a24e8146f6ebdf8d
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/extension/system/Sys_Role.js
@@ -11,11 +11,11 @@
    modelFooter: ''
  },
  buttons: [],//扩展的按钮
  tableAction:"Sys_Role",
  tableAction: "Sys_Role",
  methods: {//事件扩展
    onInited () {
    onInited() {
      this.height = this.height - 80;
       this.editFormOptions.forEach(x => {
      this.editFormOptions.forEach(x => {
        x.forEach(item => {
          if (item.field == 'ParentId') {
            item.title = "上级角色";
@@ -26,21 +26,23 @@
      })
    },
    onInit() {
      this.pagination.sortName = "roleId";  //设置排序字段,多个字段排序用逗号隔开,如:a,b,c
      this.pagination.order = "asc"; //排序方式desc或者asc
      //设置treetable的唯一值字段(这个字段的值在表里面必须是唯一的)
      this.rowKey="Role_Id";
      this.rowKey = "Role_Id";
    },
    /***加载后台数据见Sys_RoleController.cs文件***/
    loadTreeChildren(tree, treeNode, resolve) { //加载子节点
      let url=`api/role/getTreeTableChildrenData?roleId=${tree.Role_Id}`;
      this.http.post(url,{}).then(result=>{
      let url = `api/role/getTreeTableChildrenData?roleId=${tree.Role_Id}`;
      this.http.post(url, {}).then(result => {
        resolve(result.rows)
      })
    },
      /***加载后台数据见Sys_RoleController.cs文件***/
    searchBefore(params){//判断加载根节点或子节点
    /***加载后台数据见Sys_RoleController.cs文件***/
    searchBefore(params) {//判断加载根节点或子节点
      //没有查询条件,默认查询返回所有根节点数据
      if (!params.wheres.length) {
        params.value=1;
        params.value = 1;
      }
      return true;
    }