guanqb
2024-01-29 bf45ce8559383eb2c940affc6296c4c156ecf5e2
所有页面搜索栏左侧对齐
66 files modified
1830 ■■■■ changed files
src/const/tool/model.js 15 ●●●● patch | view | raw | blame | history
src/option/system/dict.js 6 ●●●●● patch | view | raw | blame | history
src/option/system/dictCategory.js 5 ●●●●● patch | view | raw | blame | history
src/option/system/dictbiz.js 5 ●●●●● patch | view | raw | blame | history
src/views/article/article.vue 1 ●●●● patch | view | raw | blame | history
src/views/article/articleComment.vue 1 ●●●● patch | view | raw | blame | history
src/views/article/discussionManage.vue 17 ●●●●● patch | view | raw | blame | history
src/views/article/publicSignUp.vue 8 ●●●●● patch | view | raw | blame | history
src/views/article/rotation.vue 1 ●●●● patch | view | raw | blame | history
src/views/authority/apiscope.vue 283 ●●●●● patch | view | raw | blame | history
src/views/authority/datascope.vue 336 ●●●●● patch | view | raw | blame | history
src/views/authority/role.vue 2 ●●●●● patch | view | raw | blame | history
src/views/cGovernance/gridPatrolRecord.vue 1 ●●●● patch | view | raw | blame | history
src/views/cGovernance/gridWorkLog.vue 1 ●●●● patch | view | raw | blame | history
src/views/cGovernance/punchCard.vue 3 ●●●● patch | view | raw | blame | history
src/views/cGovernance/reportForRepairs.vue 1 ●●●● patch | view | raw | blame | history
src/views/cGovernance/taskECall.vue 1 ●●●● patch | view | raw | blame | history
src/views/community/index.vue 11 ●●●●● patch | view | raw | blame | history
src/views/district/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/flow/follow.vue 1 ●●●● patch | view | raw | blame | history
src/views/flow/manager.vue 1 ●●●● patch | view | raw | blame | history
src/views/flow/model.vue 1 ●●●● patch | view | raw | blame | history
src/views/grid/gridman.vue 1 ●●●● patch | view | raw | blame | history
src/views/grid/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/gzll/owners.vue 2 ●●● patch | view | raw | blame | history
src/views/monitor/log/api.vue 3 ●●●● patch | view | raw | blame | history
src/views/monitor/log/error.vue 3 ●●●● patch | view | raw | blame | history
src/views/monitor/log/usual.vue 3 ●●●● patch | view | raw | blame | history
src/views/place/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/property/convenienceHotline.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/inviteTenders.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/oiae.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/ownersCommittee.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/partyOrganization.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/propertyCapitalApply.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/propertyCharge.vue 1 ●●●● patch | view | raw | blame | history
src/views/property/propertyChargeRecord.vue 3 ●●●● patch | view | raw | blame | history
src/views/property/propertyCompany.vue 11 ●●●● patch | view | raw | blame | history
src/views/property/propertyCompanyDistrict.vue 1 ●●●● patch | view | raw | blame | history
src/views/propertySupervision/houseHoldSupervision.vue 1 ●●●● patch | view | raw | blame | history
src/views/propertySupervision/ownersCommittee.vue 8 ●●●●● patch | view | raw | blame | history
src/views/propertySupervision/propertyCompanyDistrict.vue 8 ●●●●● patch | view | raw | blame | history
src/views/propertySupervision/propertyEvaluation.vue 13 ●●●● patch | view | raw | blame | history
src/views/propertySupervision/residentSupervision.vue 2 ●●● patch | view | raw | blame | history
src/views/publicSecurity/bailReporting.vue 24 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/keynotePlaceManage.vue 9 ●●●●● patch | view | raw | blame | history
src/views/report/reportlist.vue 1 ●●●● patch | view | raw | blame | history
src/views/resource/attach.vue 1 ●●●● patch | view | raw | blame | history
src/views/resource/oss.vue 2 ●●● patch | view | raw | blame | history
src/views/resource/sms.vue 2 ●●● patch | view | raw | blame | history
src/views/system/client.vue 141 ●●●●● patch | view | raw | blame | history
src/views/system/dept.vue 2 ●●●●● patch | view | raw | blame | history
src/views/system/menu.vue 180 ●●●● patch | view | raw | blame | history
src/views/system/post.vue 147 ●●●●● patch | view | raw | blame | history
src/views/system/tenant.vue 319 ●●●●● patch | view | raw | blame | history
src/views/system/topmenu.vue 202 ●●●●● patch | view | raw | blame | history
src/views/system/user.vue 13 ●●●● patch | view | raw | blame | history
src/views/task/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/task/reportForRepairs.vue 2 ●●● patch | view | raw | blame | history
src/views/tool/code.vue 2 ●●● patch | view | raw | blame | history
src/views/userHouse/hireInfoList.vue 2 ●●● patch | view | raw | blame | history
src/views/userHouse/houseHoldList.vue 2 ●●● patch | view | raw | blame | history
src/views/userHouse/houseList.vue 2 ●●● patch | view | raw | blame | history
src/views/work/claim.vue 2 ●●●●● patch | view | raw | blame | history
src/views/work/send.vue 1 ●●●● patch | view | raw | blame | history
src/views/work/start.vue 1 ●●●● patch | view | raw | blame | history
src/const/tool/model.js
@@ -7,7 +7,7 @@
    label: "",
    value: 1,
  },
];
]
export const entityDic = [
  {
@@ -38,7 +38,7 @@
    label: "Date",
    value: "java.util.Date",
  },
];
]
export const componentDic = [
  {
@@ -77,7 +77,7 @@
    label: "日期框",
    value: "date",
  },
];
]
export const queryDic = [
  {
@@ -120,7 +120,7 @@
    label: "右模糊",
    value: "likeright",
  },
];
]
export const templateDic = [
  {
@@ -135,7 +135,7 @@
    label: "树表",
    value: "tree",
  },
];
]
export const option = {
  height: "auto",
@@ -153,6 +153,7 @@
      prop: "datasourceId",
      searchSpan: 4,
      search: true,
            searchLabelWidth: 60,
      span: 24,
      type: "select",
      dicUrl: "/api/blade-develop/datasource/select",
@@ -230,7 +231,7 @@
      span: 24,
    },
  ],
};
}
export const optionModel = {
  border: true,
@@ -340,4 +341,4 @@
      cell: true,
    },
  ],
};
}
src/option/system/dict.js
@@ -16,6 +16,7 @@
      label: "字典编号",
      prop: "code",
      search: true,
            searchLabelWidth: 76,
      slot: true,
      span: 24,
      rules: [
@@ -30,6 +31,7 @@
      label: "字典名称",
      prop: "dictValue",
      search: true,
            searchLabelWidth: 100,
      align: "center",
      rules: [
        {
@@ -85,7 +87,7 @@
      hide: true
    }
  ]
};
}
export const optionChild = {
  height: 'auto',
@@ -207,4 +209,4 @@
      hide: true
    }
  ]
};
}
src/option/system/dictCategory.js
@@ -86,7 +86,7 @@
      hide: true,
    },
  ],
};
}
export const optionChild = {
  height: "auto",
@@ -121,6 +121,7 @@
      prop: "dictValue",
      searchSpan: 4,
      search: true,
            searchLabelWidth: 76,
      align: "center",
      rules: [
        {
@@ -209,4 +210,4 @@
      // hide: true
    },
  ],
};
}
src/option/system/dictbiz.js
@@ -16,6 +16,7 @@
      label: "字典编号",
      prop: "code",
      search: true,
            searchLabelWidth: 76,
      slot: true,
      span: 24,
      rules: [
@@ -86,7 +87,7 @@
      hide: true
    }
  ]
};
}
export const optionChild = {
  height: 'auto',
@@ -208,4 +209,4 @@
      hide: true
    }
  ]
};
}
src/views/article/article.vue
@@ -149,6 +149,7 @@
                        row: true,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        rules: [{
                            required: true,
                            message: "请输入文章标题",
src/views/article/articleComment.vue
@@ -70,6 +70,7 @@
                        prop: 'phone',
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 46,
                    },
                    {
                        width: 110,
src/views/article/discussionManage.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
          除
@@ -23,11 +24,13 @@
          参与用户
        </el-button>
        <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
                <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type"
                    @click.stop="updateFb(row)">
          撤销
        </el-button>
        <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
                <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type"
                    @click.stop="updateFb(row)">
          发布
        </el-button>
      </template>
@@ -142,6 +145,7 @@
              row: true,
              searchSpan: 4,
              search: true,
                    searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请输入议事标题",
@@ -769,5 +773,4 @@
<style>
  .avue-upload__icon {
    line-height: 6;
  }
</style>
}</style>
src/views/article/publicSignUp.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
          除
@@ -137,6 +138,7 @@
              row: true,
              searchSpan: 4,
              search: true,
                    searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请输入文章标题",
src/views/article/rotation.vue
@@ -58,6 +58,7 @@
                        span: 12,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 46,
                    },
                    {
                        width: 110,
src/views/authority/apiscope.vue
@@ -1,31 +1,13 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :before-open="beforeOpen"
               @row-del="rowDel"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad"
               @tree-load="treeLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            :permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate"
            @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad">
      <template slot-scope="{row}" slot="menu">
        <el-button type="text"
                   icon="el-icon-setting"
                   size="small"
                   v-if="permission.api_scope_setting"
                   plain
                   style="border: 0;background-color: transparent !important;"
                   @click.stop="handleDataScope(row)">权限配置
                <el-button type="text" icon="el-icon-setting" size="small" v-if="permission.api_scope_setting" plain
                    style="border: 0;background-color: transparent !important;" @click.stop="handleDataScope(row)">权限配置
        </el-button>
      </template>
      <template slot-scope="{row}" slot="source">
@@ -34,36 +16,19 @@
        </div>
      </template>
    </avue-crud>
    <el-drawer :title="`[${scopeMenuName}] 接口权限配置`" :visible.sync="drawerVisible" :direction="direction"
               append-to-body
        <el-drawer :title="`[${scopeMenuName}] 接口权限配置`" :visible.sync="drawerVisible" :direction="direction" append-to-body
               :before-close="handleDrawerClose" size="1000px">
      <basic-container>
        <avue-crud :option="optionScope"
                   :data="dataScope"
                   :page="pageScope"
                   v-model="formScope"
                   :table-loading="scopeLoading"
                   ref="crudScope"
                   @row-del="rowDelScope"
                   @row-update="rowUpdateScope"
                   @row-save="rowSaveScope"
                   :before-open="beforeOpenScope"
                   @search-change="searchChangeScope"
                   @search-reset="searchResetScope"
                   @selection-change="selectionChangeScope"
                   @current-change="currentChangeScope"
                   @size-change="sizeChangeScope"
                   @on-load="onLoadScope">
                <avue-crud :option="optionScope" :data="dataScope" :page="pageScope" v-model="formScope"
                    :table-loading="scopeLoading" ref="crudScope" @row-del="rowDelScope" @row-update="rowUpdateScope"
                    @row-save="rowSaveScope" :before-open="beforeOpenScope" @search-change="searchChangeScope"
                    @search-reset="searchResetScope" @selection-change="selectionChangeScope"
                    @current-change="currentChangeScope" @size-change="sizeChangeScope" @on-load="onLoadScope">
          <template slot="menuLeft">
            <el-button type="danger"
                       size="small"
                       icon="el-icon-delete"
                       plain
                       @click="handleDeleteScope">删 除
                        <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDeleteScope">删 除
            </el-button>
          </template>
          <template slot-scope="{row}"
                    slot="scopeType">
                    <template slot-scope="{row}" slot="scopeType">
            <el-tag>{{row.scopeTypeName}}</el-tag>
          </template>
        </avue-crud>
@@ -79,16 +44,16 @@
    update,
    getLazyMenuList,
    getMenu
  } from "@/api/system/menu";
} from "@/api/system/menu"
  import {
    addApiScope,
    removeApiScope,
    updateApiScope,
    getListApiScope,
    getMenuApiScope
  } from "@/api/system/scope";
  import {mapGetters} from "vuex";
  import iconList from "@/config/iconList";
} from "@/api/system/scope"
import { mapGetters } from "vuex"
import iconList from "@/config/iconList"
  export default {
    data() {
@@ -131,6 +96,7 @@
              label: "菜单名称",
              prop: "name",
              search: true,
                        searchLabelWidth: 76,
              rules: [
                {
                  required: true,
@@ -186,6 +152,7 @@
              label: "菜单编号",
              prop: "code",
              search: true,
                        searchLabelWidth: 100,
              rules: [
                {
                  required: true,
@@ -372,7 +339,7 @@
          ]
        },
        dataScope: []
      };
        }
    },
    computed: {
@@ -383,50 +350,50 @@
          viewBtn: this.vaildData(this.permission.menu_view, false),
          delBtn: this.vaildData(this.permission.menu_delete, false),
          editBtn: this.vaildData(this.permission.menu_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
      scopeIds() {
        let ids = [];
            let ids = []
        this.selectionListScope.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      // 菜单管理模块
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -435,39 +402,39 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.parentId = 0;
        this.onLoad(this.page);
            this.query = {}
            this.parentId = 0
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.parentId = '';
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.parentId = ''
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -475,91 +442,91 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getMenu(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
          this.loading = false;
          this.selectionClear();
        });
                this.data = res.data.data
                this.loading = false
                this.selectionClear()
            })
      },
      treeLoad(tree, treeNode, resolve) {
        const parentId = tree.id;
            const parentId = tree.id
        getLazyMenuList(parentId).then(res => {
          resolve(res.data.data);
        });
                resolve(res.data.data)
            })
      },
      // 数据权限模块
      handleDataScope(row) {
        this.drawerVisible = true;
        this.scopeMenuId = row.id;
        this.scopeMenuName = row.name;
            this.drawerVisible = true
            this.scopeMenuId = row.id
            this.scopeMenuName = row.name
        this.onLoadScope(this.pageScope)
      },
      handleDrawerClose(hide) {
        hide();
            hide()
      },
      rowSaveScope(row, done, loading) {
        row = {
          ...row,
          menuId: this.scopeMenuId,
        };
            }
        addApiScope(row).then(() => {
          this.onLoadScope(this.pageScope);
                this.onLoadScope(this.pageScope)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdateScope(row, index, done, loading) {
        row = {
          ...row,
          menuId: this.scopeMenuId,
        };
            }
        updateApiScope(row).then(() => {
          this.onLoadScope(this.pageScope);
                this.onLoadScope(this.pageScope)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDelScope(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -568,20 +535,20 @@
          type: "warning"
        })
          .then(() => {
            return removeApiScope(row.id);
                    return removeApiScope(row.id)
          })
          .then(() => {
            this.onLoadScope(this.pageScope);
                    this.onLoadScope(this.pageScope)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDeleteScope() {
        if (this.selectionListScope.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -589,55 +556,55 @@
          type: "warning"
        })
          .then(() => {
            return removeApiScope(this.scopeIds);
                    return removeApiScope(this.scopeIds)
          })
          .then(() => {
            this.onLoadScope(this.pageScope);
                    this.onLoadScope(this.pageScope)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crudScope.toggleSelection();
          });
                    })
                    this.$refs.crudScope.toggleSelection()
                })
      },
      beforeOpenScope(done, type) {
        if (["edit", "view"].includes(type)) {
          getMenuApiScope(this.formScope.id).then(res => {
            this.formScope = res.data.data;
          });
                    this.formScope = res.data.data
                })
        }
        done();
            done()
      },
      searchResetScope() {
        this.onLoadScope(this.pageScope);
            this.onLoadScope(this.pageScope)
      },
      searchChangeScope(params, done) {
        this.onLoadScope(this.pageScope, params);
        done();
            this.onLoadScope(this.pageScope, params)
            done()
      },
      selectionChangeScope(list) {
        this.selectionListScope = list;
            this.selectionListScope = list
      },
      currentChangeScope(currentPage) {
        this.pageScope.currentPage = currentPage;
            this.pageScope.currentPage = currentPage
      },
      sizeChangeScope(pageSize) {
        this.pageScope.pageSize = pageSize;
            this.pageScope.pageSize = pageSize
      },
      onLoadScope(page, params = {}) {
        this.scopeLoading = true;
            this.scopeLoading = true
        const values = {
          ...params,
          menuId: this.scopeMenuId,
        }
        getListApiScope(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => {
          const data = res.data.data;
          this.pageScope.total = data.total;
          this.dataScope = data.records;
          this.selectionListScope = [];
          this.scopeLoading = false;
        });
                const data = res.data.data
                this.pageScope.total = data.total
                this.dataScope = data.records
                this.selectionListScope = []
                this.scopeLoading = false
            })
      },
    }
  };
}
</script>
src/views/authority/datascope.vue
@@ -1,32 +1,13 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :before-open="beforeOpen"
               :before-close="beforeClose"
               @row-del="rowDel"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad"
               @tree-load="treeLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel"
            @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad">
      <template slot-scope="{row}" slot="menu">
        <el-button type="text"
                   icon="el-icon-setting"
                   size="small"
                   v-if="permission.data_scope_setting"
                   plain
                   style="border: 0;background-color: transparent !important;"
                   @click.stop="handleDataScope(row)">权限配置
                <el-button type="text" icon="el-icon-setting" size="small" v-if="permission.data_scope_setting" plain
                    style="border: 0;background-color: transparent !important;" @click.stop="handleDataScope(row)">权限配置
        </el-button>
      </template>
      <template slot-scope="{row}" slot="source">
@@ -35,36 +16,19 @@
        </div>
      </template>
    </avue-crud>
    <el-drawer :title="`[${scopeMenuName}] 数据权限配置`" :visible.sync="drawerVisible" :direction="direction"
               append-to-body
        <el-drawer :title="`[${scopeMenuName}] 数据权限配置`" :visible.sync="drawerVisible" :direction="direction" append-to-body
               :before-close="handleDrawerClose" size="1000px">
      <basic-container>
        <avue-crud :option="optionScope"
                   :data="dataScope"
                   :page="pageScope"
                   v-model="formScope"
                   :table-loading="scopeLoading"
                   ref="crudScope"
                   @row-del="rowDelScope"
                   @row-update="rowUpdateScope"
                   @row-save="rowSaveScope"
                   :before-open="beforeOpenScope"
                   @search-change="searchChangeScope"
                   @search-reset="searchResetScope"
                   @selection-change="selectionChangeScope"
                   @current-change="currentChangeScope"
                   @size-change="sizeChangeScope"
                   @on-load="onLoadScope">
                <avue-crud :option="optionScope" :data="dataScope" :page="pageScope" v-model="formScope"
                    :table-loading="scopeLoading" ref="crudScope" @row-del="rowDelScope" @row-update="rowUpdateScope"
                    @row-save="rowSaveScope" :before-open="beforeOpenScope" @search-change="searchChangeScope"
                    @search-reset="searchResetScope" @selection-change="selectionChangeScope"
                    @current-change="currentChangeScope" @size-change="sizeChangeScope" @on-load="onLoadScope">
          <template slot="menuLeft">
            <el-button type="danger"
                       size="small"
                       icon="el-icon-delete"
                       plain
                       @click="handleDeleteScope">删 除
                        <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDeleteScope">删 除
            </el-button>
          </template>
          <template slot-scope="{row}"
                    slot="scopeType">
                    <template slot-scope="{row}" slot="scopeType">
            <el-tag>{{row.scopeTypeName}}</el-tag>
          </template>
        </avue-crud>
@@ -80,17 +44,17 @@
    update,
    getLazyMenuList,
    getMenu
  } from "@/api/system/menu";
} from "@/api/system/menu"
  import {
    addDataScope,
    removeDataScope,
    updateDataScope,
    getListDataScope,
    getMenuDataScope
  } from "@/api/system/scope";
  import {mapGetters} from "vuex";
  import iconList from "@/config/iconList";
  import func from "@/util/func";
} from "@/api/system/scope"
import { mapGetters } from "vuex"
import iconList from "@/config/iconList"
import func from "@/util/func"
  export default {
    data() {
@@ -135,6 +99,7 @@
              label: "菜单名称",
              prop: "name",
              search: true,
                        searchLabelWidth: 76,
              rules: [
                {
                  required: true,
@@ -190,6 +155,7 @@
              label: "菜单编号",
              prop: "code",
              search: true,
                        searchLabelWidth: 100,
              rules: [
                {
                  required: true,
@@ -409,11 +375,11 @@
          ]
        },
        dataScope: []
      };
        }
    },
    watch: {
      'formScope.scopeType'() {
        this.initScope();
            this.initScope()
      }
    },
    computed: {
@@ -424,87 +390,87 @@
          viewBtn: this.vaildData(this.permission.menu_view, false),
          delBtn: this.vaildData(this.permission.menu_delete, false),
          editBtn: this.vaildData(this.permission.menu_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
      scopeIds() {
        let ids = [];
            let ids = []
        this.selectionListScope.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      initScope() {
        const scopeType = func.toInt(this.formScope.scopeType);
        const watchMode = this.watchMode;
        let column = "-", name = "暂无";
            const scopeType = func.toInt(this.formScope.scopeType)
            const watchMode = this.watchMode
            let column = "-", name = "暂无"
        if (scopeType === 1) {
          column = "-";
          name = "全部可见";
                column = "-"
                name = "全部可见"
        } else if (scopeType === 2) {
          column = "create_user";
          name = "本人可见";
                column = "create_user"
                name = "本人可见"
        } else if (scopeType === 3) {
          column = "create_dept";
          name = "所在机构可见";
                column = "create_dept"
                name = "所在机构可见"
        } else if (scopeType === 4) {
          column = "create_dept";
          name = "所在机构可见及子级可见";
                column = "create_dept"
                name = "所在机构可见及子级可见"
        } else if (scopeType === 5) {
          column = "";
          name = "自定义";
                column = ""
                name = "自定义"
        }
        this.$refs.crudScope.option.column.filter(item => {
          if (watchMode) {
            if (item.prop === "scopeName") {
              this.formScope.scopeName = `${this.scopeMenuName} [${name}]`;
                        this.formScope.scopeName = `${this.scopeMenuName} [${name}]`
            }
            if (item.prop === "resourceCode") {
              this.formScope.resourceCode = this.scopeMenuCode;
                        this.formScope.resourceCode = this.scopeMenuCode
            }
            if (item.prop === "scopeColumn") {
              this.formScope.scopeColumn = column;
                        this.formScope.scopeColumn = column
            }
          }
          if (item.prop === "scopeValue") {
            item.display = scopeType === 5;
                    item.display = scopeType === 5
          }
        });
            })
      },
      // 菜单管理模块
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -513,39 +479,39 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.parentId = 0;
        this.onLoad(this.page);
            this.query = {}
            this.parentId = 0
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.parentId = '';
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.parentId = ''
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -553,96 +519,96 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getMenu(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      beforeClose(done) {
        this.formScope = {};
        done();
            this.formScope = {}
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
          this.loading = false;
          this.selectionClear();
        });
                this.data = res.data.data
                this.loading = false
                this.selectionClear()
            })
      },
      treeLoad(tree, treeNode, resolve) {
        const parentId = tree.id;
            const parentId = tree.id
        getLazyMenuList(parentId).then(res => {
          resolve(res.data.data);
        });
                resolve(res.data.data)
            })
      },
      // 数据权限模块
      handleDataScope(row) {
        this.drawerVisible = true;
        this.scopeMenuId = row.id;
        this.scopeMenuCode = row.code;
        this.scopeMenuName = row.name;
            this.drawerVisible = true
            this.scopeMenuId = row.id
            this.scopeMenuCode = row.code
            this.scopeMenuName = row.name
        this.onLoadScope(this.pageScope)
      },
      handleDrawerClose(hide) {
        hide();
            hide()
      },
      rowSaveScope(row, done, loading) {
        row = {
          ...row,
          menuId: this.scopeMenuId,
        };
            }
        addDataScope(row).then(() => {
          this.onLoadScope(this.pageScope);
                this.onLoadScope(this.pageScope)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdateScope(row, index, done, loading) {
        row = {
          ...row,
          menuId: this.scopeMenuId,
        };
            }
        updateDataScope(row).then(() => {
          this.onLoadScope(this.pageScope);
                this.onLoadScope(this.pageScope)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDelScope(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -651,20 +617,20 @@
          type: "warning"
        })
          .then(() => {
            return removeDataScope(row.id);
                    return removeDataScope(row.id)
          })
          .then(() => {
            this.onLoadScope(this.pageScope);
                    this.onLoadScope(this.pageScope)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDeleteScope() {
        if (this.selectionListScope.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -672,61 +638,61 @@
          type: "warning"
        })
          .then(() => {
            return removeDataScope(this.scopeIds);
                    return removeDataScope(this.scopeIds)
          })
          .then(() => {
            this.onLoadScope(this.pageScope);
                    this.onLoadScope(this.pageScope)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crudScope.toggleSelection();
          });
                    })
                    this.$refs.crudScope.toggleSelection()
                })
      },
      beforeOpenScope(done, type) {
        if (["add"].includes(type)) {
          this.watchMode = true;
          this.initScope();
                this.watchMode = true
                this.initScope()
        }
        if (["edit", "view"].includes(type)) {
          this.watchMode = false;
                this.watchMode = false
          getMenuDataScope(this.formScope.id).then(res => {
            this.formScope = res.data.data;
          });
                    this.formScope = res.data.data
                })
        }
        done();
            done()
      },
      searchResetScope() {
        this.onLoadScope(this.pageScope);
            this.onLoadScope(this.pageScope)
      },
      searchChangeScope(params, done) {
        this.onLoadScope(this.pageScope, params);
        done();
            this.onLoadScope(this.pageScope, params)
            done()
      },
      selectionChangeScope(list) {
        this.selectionListScope = list;
            this.selectionListScope = list
      },
      currentChangeScope(currentPage) {
        this.pageScope.currentPage = currentPage;
            this.pageScope.currentPage = currentPage
      },
      sizeChangeScope(pageSize) {
        this.pageScope.pageSize = pageSize;
            this.pageScope.pageSize = pageSize
      },
      onLoadScope(page, params = {}) {
        this.scopeLoading = true;
            this.scopeLoading = true
        const values = {
          ...params,
          menuId: this.scopeMenuId,
        }
        getListDataScope(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => {
          const data = res.data.data;
          this.pageScope.total = data.total;
          this.dataScope = data.records;
          this.selectionListScope = [];
          this.scopeLoading = false;
        });
                const data = res.data.data
                this.pageScope.total = data.total
                this.dataScope = data.records
                this.selectionListScope = []
                this.scopeLoading = false
            })
      },
    }
  };
}
</script>
src/views/authority/role.vue
@@ -97,6 +97,7 @@
                        prop: "roleName",
                        search: true,
                        span: 24,
                        searchLabelWidth: 76,
                        rules: [
                            {
                                required: true,
@@ -130,6 +131,7 @@
                        label: "角色别名",
                        prop: "roleAlias",
                        search: true,
                        searchLabelWidth: 100,
                        span: 24,
                        rules: [
                            {
src/views/cGovernance/gridPatrolRecord.vue
@@ -71,6 +71,7 @@
                        row: true,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        rules: [
                            {
                                required: true,
src/views/cGovernance/gridWorkLog.vue
@@ -66,6 +66,7 @@
                        span: 12,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType",
                        dataType: "number",
src/views/cGovernance/punchCard.vue
@@ -53,7 +53,8 @@
                        label: "打卡人员",
                        prop: "name",
                        search: true,
                        searchSpan: 4
                        searchSpan: 4,
                        searchLabelWidth: 76,
                    },
                    {
                        label: "打卡时间",
src/views/cGovernance/reportForRepairs.vue
@@ -198,6 +198,7 @@
                        searchLabelWidth: 66,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 46,
                        dataType: "number",
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
src/views/cGovernance/taskECall.vue
@@ -83,6 +83,7 @@
                    searchSpan: 4,
                    width: 100,
                    search: true,
                    searchLabelWidth: 76,
                    rules: [{
                        required: true,
                        message: "请输入事件名称",
src/views/community/index.vue
@@ -1,11 +1,13 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.community_delete" @click="handleDelete">删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.community_delete"
                    @click="handleDelete">删 除
        </el-button>
      </template>
    </avue-crud>
@@ -61,6 +63,7 @@
              prop: "name",
              searchSpan: 4,
              search: true,
                    searchLabelWidth: 76,
              span: 12,
              rules: [{
                required: true,
src/views/district/index.vue
@@ -56,6 +56,7 @@
                        prop: "name",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        span: 12,
                        rules: [
                            {
src/views/flow/follow.vue
@@ -71,6 +71,7 @@
                        prop: "executionId",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 60,
                        width: 320,
                    },
                    {
src/views/flow/manager.vue
@@ -129,6 +129,7 @@
                    prop: 'key',
                    searchSpan: 4,
                    search: true,
                    searchLabelWidth: 76,
                },
                {
                    width: 150,
src/views/flow/model.vue
@@ -171,6 +171,7 @@
                        prop: 'modelKey',
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        overHidden: true
                    },
                    {
src/views/grid/gridman.vue
@@ -99,6 +99,7 @@
                        prop: "gridmanName",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 66,
                        rules: [
                            {
                                required: true,
src/views/grid/index.vue
@@ -69,6 +69,7 @@
                        prop: "communityName",
                        search: true,
                        searchSpan: 4,
                        searchLabelWidth: 76,
                        rules: [{
                            required: true,
                            message: "请选择所属社区",
src/views/gzll/owners.vue
@@ -103,7 +103,7 @@
                        label: "业委会名称",
                        prop: "name",
                        search: true,
                        searchLabelWidth: 124,
                        searchLabelWidth: 90,
                        rules: [{
                            required: true,
                            message: "请输入业委会名称",
src/views/monitor/log/api.vue
@@ -47,7 +47,8 @@
                        prop: "serviceId",
                        width: '120',
                        searchSpan: 4,
                        search: true
                        search: true,
                        searchLabelWidth: 60,
                    },
                    {
                        label: "服务host",
src/views/monitor/log/error.vue
@@ -47,7 +47,8 @@
                        prop: "serviceId",
                        searchSpan: 4,
                        search: true,
                        width: '120'
                        width: '120',
                        searchLabelWidth: 60,
                    },
                    {
                        label: "服务host",
src/views/monitor/log/usual.vue
@@ -46,7 +46,8 @@
                        label: "服务id",
                        prop: "serviceId",
                        searchSpan: 4,
                        search: true
                        search: true,
                        searchLabelWidth: 60,
                    },
                    {
                        label: "服务host",
src/views/place/index.vue
@@ -130,6 +130,7 @@
                        prop: "placeName",
                        searchSpan: 5,
                        search: true,
                        searchLabelWidth: 76,
                        rules: [{
                            required: true,
                            message: "请输入场所名称",
@@ -416,7 +417,7 @@
                        width: 120,
                        display: false,
                        label: '是否有二维码',
                        searchLabelWidth: 110,
                        searchLabelWidth: 104,
                        prop: 'source',
                        type: "select",
                        search: true,
src/views/property/convenienceHotline.vue
@@ -73,6 +73,7 @@
                    prop: "name",
                    searchSpan: 4,
                    search: true,
                    searchLabelWidth: 46,
                    width: 260,
                    rules: [{
                        required: true,
src/views/property/inviteTenders.vue
@@ -138,6 +138,7 @@
                    row: true,
                    searchSpan: 4,
                    search: true,
                    searchLabelWidth: 76,
                    rules: [{
                        required: true,
                        message: "请输入招标标题",
src/views/property/oiae.vue
@@ -149,6 +149,7 @@
                        row: true,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        rules: [{
                            required: true,
                            message: "请输入收支标题",
src/views/property/ownersCommittee.vue
@@ -119,6 +119,7 @@
                    row: true,
                    searchSpan: 4,
                    search: true,
                    searchLabelWidth: 46,
                    rules: [{
                        required: true,
                        message: "请输入业主大会标题",
src/views/property/partyOrganization.vue
@@ -74,6 +74,7 @@
                        prop: "areaId",
                        search: true,
                        searchSpan: searchSpan,
                        searchLabelWidth: 76,
                        width: 150,
                        type: "tree",
                        dicUrl: "/api/blade-system/region/tree",
src/views/property/propertyCapitalApply.vue
@@ -84,6 +84,7 @@
                    prop: "districtName",
                    search: true,
                    searchSpan: 4,
                    searchLabelWidth: 76,
                    rules: [{
                        required: true,
                        message: "请输入小区名称",
src/views/property/propertyCharge.vue
@@ -64,6 +64,7 @@
                        },
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        disabled: false,
                        type: "select",
                        rules: [{
src/views/property/propertyChargeRecord.vue
@@ -64,6 +64,7 @@
                        },
                        searchSpan,
                        search: true,
                        searchLabelWidth: 76,
                        disabled: false,
                        type: "select",
                        rules: [{
@@ -78,7 +79,7 @@
                        label: "付款人",
                        prop: "payUser",
                        searchSpan: searchSpan,
                        searchLabelWidth: 80,
                        searchLabelWidth: 90,
                        search: true,
                        rules: [{
                            required: true,
src/views/property/propertyCompany.vue
@@ -2,9 +2,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.propertyCompany_delete"
          @click="handleDelete">删 除
@@ -113,7 +114,7 @@
              label: "物业公司名称",
              prop: "name",
              searchSpan: 5,
              searchLabelWidth: 124,
                    searchLabelWidth: 104,
              search: true,
              span: 18,
              row: true,
@@ -409,7 +410,7 @@
      addProperty(row) {
        this.$refs.propertyEdit.init(row);
            this.$refs.propertyEdit.init(row)
      },
      aliSubmit(form, done) {
src/views/property/propertyCompanyDistrict.vue
@@ -80,6 +80,7 @@
                    prop: "districtName",
                    search: true,
                    searchSpan: 4,
                    searchLabelWidth: 76,
                    rules: [{
                        required: true,
                        message: "请输入小区名称",
src/views/propertySupervision/houseHoldSupervision.vue
@@ -247,6 +247,7 @@
                    parent: false,
                    prop: "houseName",
                    searchSpan: 4,
                    searchLabelWidth: 50,
                    display: false,
                    search: true,
                },
src/views/propertySupervision/ownersCommittee.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <!-- <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
          除
@@ -118,6 +119,7 @@
              span: 24,
              row: true,
              searchSpan: 4,
                    searchLabelWidth: 50,
              search: true,
              rules: [{
                required: true,
src/views/propertySupervision/propertyCompanyDistrict.vue
@@ -2,9 +2,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.propertyCompanyDistrict_delete"
          @click="handleDelete">删 除
@@ -80,6 +81,7 @@
              prop: "districtName",
              search: true,
              searchSpan: 4,
                    searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请输入小区名称",
src/views/propertySupervision/propertyEvaluation.vue
@@ -2,9 +2,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.propertyCompany_delete"
          @click="handleDelete">删 除
@@ -113,7 +114,7 @@
              label: "物业公司名称",
              prop: "name",
              searchSpan: 5,
              searchLabelWidth: 124,
                    searchLabelWidth: 104,
              search: true,
              span: 18,
              row: true,
@@ -191,7 +192,7 @@
              label: "社会信用代码",
              prop: "socialCreditCode",
              searchSpan: 5,
              // searchLabelWidth: 124,
                    searchLabelWidth: 124,
              search: true,
              span: 18,
              row: true,
@@ -410,7 +411,7 @@
      addProperty(row) {
        this.$refs.propertyEdit.init(row);
            this.$refs.propertyEdit.init(row)
      },
      aliSubmit(form, done) {
src/views/propertySupervision/residentSupervision.vue
@@ -223,7 +223,7 @@
                        label: "姓名",
                        prop: "name",
                        searchSpan: 3,
                        searchLabelWidth: 66,
                        searchLabelWidth: 50,
                        search: true,
                        rules: [{
                            required: true,
src/views/publicSecurity/bailReporting.vue
@@ -1,16 +1,19 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="{row, size, index}" slot="menu">
        <el-button :size="size" type="text" icon="el-icon-view"  v-if="permission.bail_view"  plain @click="lookDetail(row, 0)">查 看
                <el-button :size="size" type="text" icon="el-icon-view" v-if="permission.bail_view" plain
                    @click="lookDetail(row, 0)">查 看
        </el-button>
        <el-button :size="size" type="text" icon="el-icon-s-check" v-if="row.status == 1 && permission.bail_check" plain
          @click="lookDetail(row, 1)">审 核
                <el-button :size="size" type="text" icon="el-icon-s-check" v-if="row.status == 1 && permission.bail_check"
                    plain @click="lookDetail(row, 1)">审 核
        </el-button>
        <el-button :size="size" type="text" icon="el-icon-delete" v-if="permission.bail_del"   plain @click="rowDel(row)">删 除
                <el-button :size="size" type="text" icon="el-icon-delete" v-if="permission.bail_del" plain
                    @click="rowDel(row)">删 除
        </el-button>
      </template>
@@ -104,7 +107,7 @@
          label: "社区",
          prop: "communityName",
          searchSpan: 4,
          searchLabelWidth: 66,
                    searchLabelWidth: 46,
          search: true,
          hide: true,
        },
@@ -260,7 +263,7 @@
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
         console.log("permission===>",this.permission);
            console.log("permission===>", this.permission)
      return {
        addBtn: this.vaildData(this.permission.bail_add, false),
@@ -495,5 +498,4 @@
<style>
.avue-upload__icon {
  line-height: 6;
}
</style>
}</style>
src/views/publicSecurity/keynotePlaceManage.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="{row, size}" slot="menu">
        <el-button type="text" :size="size" icon="el-icon-view" v-if="permission.place_view" plain
@@ -107,7 +108,7 @@
              label: "社区",
              prop: "communityName",
              searchSpan: 4,
              searchLabelWidth: 66,
                    searchLabelWidth: 46,
              search: true,
              hide: true,
            },
src/views/report/reportlist.vue
@@ -61,6 +61,7 @@
                        prop: "name",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 60,
                        slot: true,
                    },
                    {
src/views/resource/attach.vue
@@ -75,6 +75,7 @@
                        prop: "domainUrl",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        rules: [{
                            required: true,
                            message: "请输入附件域名",
src/views/resource/oss.vue
@@ -75,7 +75,7 @@
                        value: 1,
                        span: 24,
                        width: 120,
                        searchLabelWidth: 50,
                        searchLabelWidth: 46,
                        row: true,
                        dicUrl: "/api/blade-system/dict/dictionary?code=oss",
                        props: {
src/views/resource/sms.vue
@@ -73,7 +73,7 @@
                        value: 1,
                        span: 24,
                        width: 100,
                        searchLabelWidth: 66,
                        searchLabelWidth: 46,
                        row: true,
                        dicUrl: "/api/blade-system/dict/dictionary?code=sms",
                        props: {
src/views/system/client.vue
@@ -1,29 +1,11 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               @row-del="rowDel"
               v-model="form"
               ref="crud"
               :permission="permissionList"
               @row-update="rowUpdate"
               @row-save="rowSave"
               :before-open="beforeOpen"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" @row-del="rowDel" v-model="form"
            ref="crud" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   v-if="permission.client_delete"
                <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.client_delete"
                   @click="handleDelete">删 除
        </el-button>
      </template>
@@ -32,8 +14,8 @@
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/system/client";
  import {mapGetters} from "vuex";
import { getList, getDetail, add, update, remove } from "@/api/system/client"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -63,6 +45,7 @@
              label: "应用id",
              prop: "clientId",
              search: true,
                        searchLabelWidth: 60,
              rules: [{
                required: true,
                message: "请输入客户端id",
@@ -73,6 +56,7 @@
              label: "应用密钥",
              prop: "clientSecret",
              search: true,
                        searchLabelWidth: 100,
              rules: [{
                required: true,
                message: "请输入客户端密钥",
@@ -195,7 +179,7 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission"]),
@@ -205,42 +189,42 @@
          viewBtn: this.vaildData(this.permission.client_view),
          delBtn: this.vaildData(this.permission.client_delete),
          editBtn: this.vaildData(this.permission.client_edit)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -249,37 +233,37 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -287,47 +271,46 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/system/dept.vue
@@ -71,6 +71,7 @@
                        label: "机构名称",
                        prop: "deptName",
                        search: true,
                        searchLabelWidth: 76,
                        rules: [{
                            required: true,
                            message: "请输入机构名称",
@@ -102,6 +103,7 @@
                        label: "机构全称",
                        prop: "fullName",
                        search: true,
                        searchLabelWidth: 100,
                        rules: [{
                            required: true,
                            message: "请输入机构全称",
src/views/system/menu.vue
@@ -32,20 +32,20 @@
    update,
    add,
    getMenu
  } from "@/api/system/menu";
} from "@/api/system/menu"
  import {
    mapGetters
  } from "vuex";
  import iconList from "@/config/iconList";
  import func from "@/util/func";
} from "vuex"
import iconList from "@/config/iconList"
import func from "@/util/func"
  import {
    getMenuTree
  } from "@/api/system/menu";
} from "@/api/system/menu"
  import {
    getTreeList
  } from "@/api/label/label";
} from "@/api/label/label"
  export default {
    data() {
@@ -78,6 +78,7 @@
              label: "菜单名称",
              prop: "name",
              search: true,
                    searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请输入菜单名称",
@@ -252,19 +253,19 @@
        },
        data: [],
        labelList: [],
      };
        }
    },
    watch: {
      'form.category'() {
        const category = func.toInt(this.form.category);
            const category = func.toInt(this.form.category)
        this.$refs.crud.option.column.filter(item => {
          if (item.prop === "path") {
            item.rules[0].required = category === 1;
                    item.rules[0].required = category === 1
          }
          if (item.prop === 'isOpen') {
            item.disabled = category === 2;
                    item.disabled = category === 2
          }
        });
            })
      },
    },
    computed: {
@@ -275,64 +276,64 @@
          viewBtn: this.vaildData(this.permission.menu_view, false),
          delBtn: this.vaildData(this.permission.menu_delete, false),
          editBtn: this.vaildData(this.permission.menu_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      initData() {
        getMenuTree().then(res => {
          const column = this.findObject(this.option.column, "parentId");
          column.dicData = res.data.data;
        });
                const column = this.findObject(this.option.column, "parentId")
                column.dicData = res.data.data
            })
        // getTreeList().then(res => {
        // console.log(JSON.stringify(res.data.data))
        const column = this.findObject(this.option.column, "labelList");
        column.dicData = this.labelList;
            const column = this.findObject(this.option.column, "labelList")
            column.dicData = this.labelList
        // });
      },
      handleAdd(row) {
        this.parentId = row.id;
        const column = this.findObject(this.option.column, "parentId");
        column.value = row.id;
        column.addDisabled = true;
        this.$refs.crud.rowAdd();
            this.parentId = row.id
            const column = this.findObject(this.option.column, "parentId")
            column.value = row.id
            column.addDisabled = true
            this.$refs.crud.rowAdd()
      },
      rowSave(row, done, loading) {
        add(row).then((res) => {
          // 获取新增数据的相关字段
          const data = res.data.data;
          row.id = data.id;
                const data = res.data.data
                row.id = data.id
          this.$message({
            type: "success",
            message: "操作成功!"
          });
                })
          // 数据回调进行刷新
          done(row);
                done(row)
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.$message({
            type: "success",
            message: "操作成功!"
          });
                })
          // 数据回调进行刷新
          done(row);
                done(row)
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row, index, done) {
        this.$confirm("确定将选择数据删除?", {
@@ -341,21 +342,21 @@
            type: "warning"
          })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.$message({
              type: "success",
              message: "操作成功!"
            });
                    })
            // 数据回调进行刷新
            done(row);
          });
                    done(row)
                })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
@@ -363,93 +364,92 @@
            type: "warning"
          })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            // 刷新表格数据并重载
            this.data = [];
            this.parentId = 0;
            this.$refs.crud.refreshTable();
            this.$refs.crud.toggleSelection();
                    this.data = []
                    this.parentId = 0
                    this.$refs.crud.refreshTable()
                    this.$refs.crud.toggleSelection()
            // 表格数据重载
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.parentId = 0;
        this.onLoad(this.page);
            this.query = {}
            this.parentId = 0
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.parentId = '';
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.parentId = ''
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      beforeOpen(done, type) {
        if (["add", "edit"].includes(type)) {
          this.initData();
                this.initData()
        }
        if (["edit", "view"].includes(type)) {
          getMenu(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      beforeClose(done) {
        this.parentId = "";
        const column = this.findObject(this.option.column, "parentId");
        column.value = "";
        column.addDisabled = false;
        done();
            this.parentId = ""
            const column = this.findObject(this.option.column, "parentId")
            column.value = ""
            column.addDisabled = false
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
          this.loading = false;
          this.selectionClear();
        });
                this.data = res.data.data
                this.loading = false
                this.selectionClear()
            })
        getTreeList().then(res => {
          this.labelList = res.data.data;
        });
                this.labelList = res.data.data
            })
      },
      treeLoad(tree, treeNode, resolve) {
        const parentId = tree.id;
            const parentId = tree.id
        getLazyList(parentId).then(res => {
          resolve(res.data.data);
        });
                resolve(res.data.data)
            })
        // getTreeList().then(res => {
        // console.log(JSON.stringify(res.data.data))
        const column = this.findObject(this.option.column, "labelList");
        column.dicData = this.labelList;
            const column = this.findObject(this.option.column, "labelList")
            column.dicData = this.labelList
        // });
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/system/post.vue
@@ -1,34 +1,15 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
            :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
            @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   v-if="permission.post_delete"
                <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.post_delete"
                   @click="handleDelete">删 除
        </el-button>
      </template>
      <template slot-scope="{row}"
                slot="category">
            <template slot-scope="{row}" slot="category">
        <el-tag>{{row.categoryName}}</el-tag>
      </template>
    </avue-crud>
@@ -36,9 +17,9 @@
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/system/post";
  import {mapGetters} from "vuex";
  import website from "@/config/website";
import { getList, getDetail, add, update, remove } from "@/api/system/post"
import { mapGetters } from "vuex"
import website from "@/config/website"
  export default {
    data() {
@@ -96,6 +77,7 @@
              dataType: "number",
              slot: true,
              search: true,
                        searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请选择岗位类型",
@@ -106,6 +88,7 @@
              label: "岗位编号",
              prop: "postCode",
              search: true,
                        searchLabelWidth: 100,
              rules: [{
                required: true,
                message: "请输入岗位编号",
@@ -116,6 +99,7 @@
              label: "岗位名称",
              prop: "postName",
              search: true,
                        searchLabelWidth: 100,
              rules: [{
                required: true,
                message: "请输入岗位名称",
@@ -143,7 +127,7 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission"]),
@@ -153,42 +137,42 @@
          viewBtn: this.vaildData(this.permission.post_view, false),
          delBtn: this.vaildData(this.permission.post_delete, false),
          editBtn: this.vaildData(this.permission.post_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -197,20 +181,20 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -218,64 +202,63 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/system/tenant.vue
@@ -1,106 +1,63 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               @row-del="rowDel"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
            :permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate"
            @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   v-if="permission.tenant_delete"
                   plain
                <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.tenant_delete" plain
                   @click="handleDelete">删 除
        </el-button>
        <el-tooltip class="item" effect="dark" content="给租户配置账号额度、过期时间等授权信息" placement="top">
          <el-button size="small"
                     plain
                     v-if="userInfo.role_name.includes('administrator')"
                     icon="el-icon-setting"
                    <el-button size="small" plain v-if="userInfo.role_name.includes('administrator')" icon="el-icon-setting"
                     @click="handleSetting">授权配置
          </el-button>
        </el-tooltip>
        <el-tooltip class="item" effect="dark" content="给租户配置独立数据源以实现数据库隔离" placement="top">
          <el-button size="small"
                     plain
                     v-if="userInfo.role_name.includes('administrator')"
                     icon="el-icon-coin"
                    <el-button size="small" plain v-if="userInfo.role_name.includes('administrator')" icon="el-icon-coin"
                     @click="handleDatasource">数据源配置
          </el-button>
        </el-tooltip>
        <el-tooltip class="item" effect="dark" content="将菜单产品包与租户配置绑定" placement="top">
          <el-button size="small"
                     plain
                     v-if="userInfo.role_name.includes('administrator')"
                     icon="el-icon-notebook-1"
                     @click="handlePackage">产品包配置
                    <el-button size="small" plain v-if="userInfo.role_name.includes('administrator')"
                        icon="el-icon-notebook-1" @click="handlePackage">产品包配置
          </el-button>
        </el-tooltip>
        <el-tooltip class="item" effect="dark" content="将自定义的菜单集合定制为租户绑定的菜单产品包" placement="top">
          <el-button size="small"
                     plain
                     v-if="userInfo.role_name.includes('administrator')"
                     icon="el-icon-notebook-2"
                     @click="handlePackageSetting">产品包管理
                    <el-button size="small" plain v-if="userInfo.role_name.includes('administrator')"
                        icon="el-icon-notebook-2" @click="handlePackageSetting">产品包管理
          </el-button>
        </el-tooltip>
      </template>
      <template slot-scope="{row}"
                slot="accountNumber">
            <template slot-scope="{row}" slot="accountNumber">
        <el-tag>{{ row.accountNumber > 0 ? row.accountNumber : '不限制' }}</el-tag>
      </template>
      <template slot-scope="{row}"
                slot="expireTime">
            <template slot-scope="{row}" slot="expireTime">
        <el-tag>{{ row.expireTime ? row.expireTime : '不限制' }}</el-tag>
      </template>
    </avue-crud>
    <el-dialog title="租户授权配置"
               append-to-body
               :visible.sync="box"
               width="450px">
        <el-dialog title="租户授权配置" append-to-body :visible.sync="box" width="450px">
      <avue-form :option="settingOption" v-model="settingForm" @submit="handleSubmit"/>
    </el-dialog>
    <el-dialog title="租户数据源配置"
               append-to-body
               :visible.sync="datasourceBox"
               width="450px">
        <el-dialog title="租户数据源配置" append-to-body :visible.sync="datasourceBox" width="450px">
      <avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit"/>
    </el-dialog>
    <el-dialog title="租户产品包配置"
               append-to-body
               :visible.sync="packageBox"
               width="450px">
        <el-dialog title="租户产品包配置" append-to-body :visible.sync="packageBox" width="450px">
      <avue-form ref="formPackage" :option="packageOption" v-model="packageForm" @submit="handlePackageSubmit"/>
    </el-dialog>
    <el-dialog title="租户产品包管理"
               append-to-body
               :visible.sync="packageSettingBox"
               width="1000px">
        <el-dialog title="租户产品包管理" append-to-body :visible.sync="packageSettingBox" width="1000px">
      <tenant-package></tenant-package>
    </el-dialog>
  </basic-container>
</template>
<script>
import {getList, getDetail, remove, update, add, setting, datasource, packageInfo, packageSetting} from "@/api/system/tenant";
import {getDetail as packageDetail} from "@/api/system/tenantpackage";
import {mapGetters} from "vuex";
import {getMenuTree} from "@/api/system/menu";
import {validatenull} from "@/util/validate";
import { getList, getDetail, remove, update, add, setting, datasource, packageInfo, packageSetting } from "@/api/system/tenant"
import { getDetail as packageDetail } from "@/api/system/tenantpackage"
import { mapGetters } from "vuex"
import { getMenuTree } from "@/api/system/menu"
import { validatenull } from "@/util/validate"
export default {
  data() {
@@ -136,6 +93,7 @@
            prop: "tenantId",
            width: 100,
            search: true,
                        searchLabelWidth: 60,
            addDisplay: false,
            editDisplay: false,
            span: 24,
@@ -289,15 +247,15 @@
          },
        ]
      },
    };
        }
  },
  watch: {
    'packageForm.packageId'() {
      if (!validatenull(this.packageForm.packageId)) {
        packageDetail(this.packageForm.packageId).then(res => {
          this.packageForm.menuId = res.data.data.menuId;
          this.initData();
        });
                    this.packageForm.menuId = res.data.data.menuId
                    this.initData()
                })
      }
    }
  },
@@ -309,51 +267,51 @@
        viewBtn: this.vaildData(this.permission.tenant_view, false),
        delBtn: this.vaildData(this.permission.tenant_delete, false),
        editBtn: this.vaildData(this.permission.tenant_edit, false)
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
    tenantId() {
      return this.selectionList[0].tenantId;
            return this.selectionList[0].tenantId
    }
  },
  methods: {
    initData() {
      getMenuTree().then(res => {
        const column = this.findObject(this.packageOption.column, "menuId");
        column.dicData = res.data.data;
      });
                const column = this.findObject(this.packageOption.column, "menuId")
                column.dicData = res.data.data
            })
    },
    rowSave(row, done, loading) {
      add(row).then(() => {
        this.onLoad(this.page);
                this.onLoad(this.page)
        this.$message({
          type: "success",
          message: "操作成功!"
        });
        done();
                })
                done()
      }, error => {
        window.console.log(error);
        loading();
      });
                window.console.log(error)
                loading()
            })
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(() => {
        this.onLoad(this.page);
                this.onLoad(this.page)
        this.$message({
          type: "success",
          message: "操作成功!"
        });
        done();
                })
                done()
      }, error => {
        window.console.log(error);
        loading();
      });
                window.console.log(error)
                loading()
            })
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -362,52 +320,52 @@
        type: "warning"
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
        });
                    })
                })
    },
    beforeOpen(done, type) {
      if (["view"].includes(type)) {
        getDetail(this.form.id).then(res => {
          const data = res.data.data;
                    const data = res.data.data
          if (!(data.accountNumber > 0)) {
            data.accountNumber = "不限制";
                        data.accountNumber = "不限制"
          }
          if (!data.expireTime) {
            data.expireTime = "不限制";
                        data.expireTime = "不限制"
          }
          this.form = data;
        });
                    this.form = data
                })
      }
      done();
            done()
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -415,140 +373,139 @@
        type: "warning"
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    handleSetting() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      if (this.selectionList.length === 1) {
        getDetail(this.selectionList[0].id).then(res => {
          const data = res.data.data;
          this.settingForm.accountNumber = data.accountNumber;
          this.settingForm.expireTime = data.expireTime;
        });
                    const data = res.data.data
                    this.settingForm.accountNumber = data.accountNumber
                    this.settingForm.expireTime = data.expireTime
                })
      } else {
        this.settingForm.accountNumber = -1;
        this.settingForm.expireTime = '';
                this.settingForm.accountNumber = -1
                this.settingForm.expireTime = ''
      }
      this.box = true;
            this.box = true
    },
    handleDatasource() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      if (this.selectionList.length !== 1) {
        this.$message.warning("只能选择一条数据");
        return;
                this.$message.warning("只能选择一条数据")
                return
      }
      getDetail(this.selectionList[0].id).then(res => {
        const data = res.data.data;
        this.datasourceForm.datasourceId = data.datasourceId;
      });
      this.datasourceBox = true;
                const data = res.data.data
                this.datasourceForm.datasourceId = data.datasourceId
            })
            this.datasourceBox = true
    },
    handlePackage() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      if (this.selectionList.length !== 1) {
        this.$message.warning("只能选择一条数据");
        return;
                this.$message.warning("只能选择一条数据")
                return
      }
      if (this.selectionList.length === 1) {
        packageInfo(this.selectionList[0].id).then(res => {
          const data = res.data.data;
          this.packageForm.packageId = data.id;
          this.packageForm.menuId = data.menuId;
        });
                    const data = res.data.data
                    this.packageForm.packageId = data.id
                    this.packageForm.menuId = data.menuId
                })
      } else {
        this.packageForm.menuId = '';
                this.packageForm.menuId = ''
      }
      this.packageBox = true;
            this.packageBox = true
      //更新字典远程数据
      setTimeout(() => {
        const form = this.$refs.formPackage;
        form.updateDic('packageId');
      }, 10);
                const form = this.$refs.formPackage
                form.updateDic('packageId')
            }, 10)
    },
    handlePackageSetting() {
      this.packageSettingBox = true;
            this.packageSettingBox = true
    },
    handleSubmit(form, done, loading) {
      setting(this.ids, form).then(() => {
        this.onLoad(this.page);
                this.onLoad(this.page)
        this.$message({
          type: "success",
          message: "配置成功!"
        });
        done();
        this.box = false;
                })
                done()
                this.box = false
      }, error => {
        window.console.log(error);
        loading();
      });
                window.console.log(error)
                loading()
            })
    },
    handleDatasourceSubmit(form, done, loading) {
      datasource(this.tenantId, form.datasourceId).then(() => {
        this.$message({
          type: "success",
          message: "配置成功!"
        });
        done();
        this.datasourceBox = false;
                })
                done()
                this.datasourceBox = false
      }, error => {
        window.console.log(error);
        loading();
      });
                window.console.log(error)
                loading()
            })
    },
    handlePackageSubmit(form, done, loading) {
      packageSetting(this.tenantId, form.packageId).then(() => {
        this.onLoad(this.page);
                this.onLoad(this.page)
        this.$message({
          type: "success",
          message: "配置成功!"
        });
        done();
        this.packageBox = false;
                })
                done()
                this.packageBox = false
      }, error => {
        window.console.log(error);
        loading();
      });
                window.console.log(error)
                loading()
            })
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      this.loading = true;
            this.loading = true
      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
    }
  }
};
}
</script>
<style>
</style>
<style></style>
src/views/system/topmenu.vue
@@ -1,35 +1,14 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
            :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
            @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   v-if="permission.topmenu_delete"
                <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.topmenu_delete"
                   @click="handleDelete">删 除
        </el-button>
        <el-button size="small"
                   icon="el-icon-delete"
                   @click="handleMenuSetting"
                   v-if="permission.topmenu_setting"
                <el-button size="small" icon="el-icon-delete" @click="handleMenuSetting" v-if="permission.topmenu_setting"
                   plain>菜单配置
        </el-button>
      </template>
@@ -42,33 +21,24 @@
        <el-input-number v-model="row.sort" @change="sortChange(row)" :min="1" :max="100"></el-input-number>
      </template>
    </avue-crud>
    <el-dialog title="下级菜单配置"
               append-to-body
               :visible.sync="box"
               width="345px">
        <el-dialog title="下级菜单配置" append-to-body :visible.sync="box" width="345px">
      <el-tree :data="menuGrantList"
               show-checkbox
               node-key="id"
               ref="treeMenu"
               :default-checked-keys="menuTreeObj"
            <el-tree :data="menuGrantList" show-checkbox node-key="id" ref="treeMenu" :default-checked-keys="menuTreeObj"
               :props="props">
      </el-tree>
      <span slot="footer"
            class="dialog-footer">
            <span slot="footer" class="dialog-footer">
        <el-button @click="box = false">取 消</el-button>
        <el-button type="primary"
                   @click="submit">确 定</el-button>
                <el-button type="primary" @click="submit">确 定</el-button>
      </span>
    </el-dialog>
  </basic-container>
</template>
<script>
  import {getList, getDetail, add, update, remove, grant, grantTree, getTopTree} from "@/api/system/topmenu";
  import {mapGetters} from "vuex";
  import iconList from "@/config/iconList";
import { getList, getDetail, add, update, remove, grant, grantTree, getTopTree } from "@/api/system/topmenu"
import { mapGetters } from "vuex"
import iconList from "@/config/iconList"
  export default {
    data() {
@@ -106,6 +76,7 @@
              label: "菜单名",
              prop: "name",
              search: true,
                        searchLabelWidth: 60,
              rules: [{
                required: true,
                message: "请输入菜单名",
@@ -130,6 +101,7 @@
              label: "菜单编号",
              prop: "code",
              search: true,
                        searchLabelWidth: 100,
              rules: [{
                required: true,
                message: "请输入菜单编号",
@@ -150,7 +122,7 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission"]),
@@ -160,60 +132,60 @@
          viewBtn: this.vaildData(this.permission.topmenu_view, false),
          delBtn: this.vaildData(this.permission.topmenu_delete, false),
          editBtn: this.vaildData(this.permission.topmenu_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
      idsArray() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids;
                ids.push(ele.id)
            })
            return ids
      }
    },
    methods: {
      submit() {
        const menuList = this.$refs.treeMenu.getCheckedKeys();
            const menuList = this.$refs.treeMenu.getCheckedKeys()
        grant(this.idsArray, menuList).then(() => {
          this.box = false;
                this.box = false
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          this.onLoad(this.page);
        });
                })
                this.onLoad(this.page)
            })
      },
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -222,20 +194,20 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -243,85 +215,85 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      handleMenuSetting() {
        if (this.selectionList.length !== 1) {
          this.$message.warning("只能选择一条数据");
          return;
                this.$message.warning("只能选择一条数据")
                return
        }
        this.menuTreeObj = [];
            this.menuTreeObj = []
        grantTree()
          .then(res => {
            this.menuGrantList = res.data.data.menu;
                    this.menuGrantList = res.data.data.menu
            getTopTree(this.ids).then(res => {
              this.menuTreeObj = res.data.data.menu;
              this.box = true;
            });
          });
                        this.menuTreeObj = res.data.data.menu
                        this.box = true
                    })
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      sortChange(row) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
        }, error => {
          window.console.log(error);
        });
                window.console.log(error)
            })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
src/views/system/user.vue
@@ -12,10 +12,10 @@
    <el-col :span="19">
      <basic-container>
        <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud"
          v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
          :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
          @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
          @refresh-change="refreshChange" @on-load="onLoad">
                    v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate"
                    @row-save="rowSave" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange"
                    @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
                    @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
          <template slot="menuLeft">
            <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
              @click="handleDelete">删 除
@@ -58,8 +58,8 @@
        </avue-crud>
        <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px">
          <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole"
            :default-checked-keys="roleTreeObj" :props="props">
                    <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id"
                        ref="treeRole" :default-checked-keys="roleTreeObj" :props="props">
          </el-tree>
          <span slot="footer" class="dialog-footer">
@@ -244,6 +244,7 @@
              label: "登录账号",
              prop: "account",
              search: true,
                    searchLabelWidth: 76,
              display: false
            },
            // {
src/views/task/index.vue
@@ -90,6 +90,7 @@
                            value: "dictKey",
                        },
                        search: true,
                        searchLabelWidth: 46,
                        row: true,
                    },
                    {
src/views/task/reportForRepairs.vue
@@ -195,7 +195,7 @@
                        label: "类型",
                        prop: "type",
                        span: 12,
                        searchLabelWidth: 66,
                        searchLabelWidth: 46,
                        searchSpan: 4,
                        search: true,
                        dataType: "number",
src/views/tool/code.vue
@@ -63,7 +63,7 @@
                    {
                        label: "模块名",
                        prop: "codeName",
                        searchLabelWidth: 80,
                        searchLabelWidth: 60,
                        searchSpan: 4,
                        search: true,
                        display: false,
src/views/userHouse/hireInfoList.vue
@@ -319,7 +319,7 @@
                        prop: "tenantRelationship",
                        search: true,
                        searchSpan: 3,
                        searchLabelWidth: 66,
                        searchLabelWidth: 46,
                        width: 100,
                        type: "select",
                        dicData: [{
src/views/userHouse/houseHoldList.vue
@@ -251,7 +251,7 @@
                    label: "姓名",
                    prop: "name",
                    searchSpan: 3,
                    searchLabelWidth: 66,
                    searchLabelWidth: 46,
                    search: true,
                    rules: [{
                        required: true,
src/views/userHouse/houseList.vue
@@ -241,7 +241,7 @@
                        parent: false,
                        prop: "address",
                        display: false,
                        searchLabelWidth: 66,
                        searchLabelWidth: 46,
                        searchSpan: 4,
                        search: true,
                    },
src/views/work/claim.vue
@@ -78,6 +78,7 @@
                        prop: "category",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        hide: true,
                        width: 100,
                    },
@@ -86,6 +87,7 @@
                        prop: 'processDefinitionName',
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 100,
                    },
                    {
                        label: '当前步骤',
src/views/work/send.vue
@@ -79,6 +79,7 @@
                        prop: "category",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                        hide: true,
                        width: 100,
                    },
src/views/work/start.vue
@@ -107,6 +107,7 @@
                        prop: "category",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                    },
                    {
                        label: '流程标识',