l1069030731 2 лет назад
Родитель
Сommit
9566c349f2

+ 0 - 643
src/views/authority/apiscope.vue

@@ -1,643 +0,0 @@
-<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">
-      <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>
-      </template>
-      <template slot-scope="{row}" slot="source">
-        <div style="text-align:center">
-          <i :class="row.source"/>
-        </div>
-      </template>
-    </avue-crud>
-    <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">
-          <template slot="menuLeft">
-            <el-button type="danger"
-                       size="small"
-                       icon="el-icon-delete"
-                       plain
-                       @click="handleDeleteScope">删 除
-            </el-button>
-          </template>
-          <template slot-scope="{row}"
-                    slot="scopeType">
-            <el-tag>{{row.scopeTypeName}}</el-tag>
-          </template>
-        </avue-crud>
-      </basic-container>
-    </el-drawer>
-  </basic-container>
-</template>
-
-<script>
-  import {
-    add,
-    remove,
-    update,
-    getLazyMenuList,
-    getMenu
-  } from "@/api/system/menu";
-  import {
-    addApiScope,
-    removeApiScope,
-    updateApiScope,
-    getListApiScope,
-    getMenuApiScope
-  } from "@/api/system/scope";
-  import {mapGetters} from "vuex";
-  import iconList from "@/config/iconList";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionList: [],
-        query: {},
-        loading: true,
-        parentId: 0,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        drawerVisible: false,
-        direction: 'rtl',
-        scopeLoading: false,
-        scopeMenuId: 0,
-        scopeMenuName: "菜单",
-        menu: true,
-        option: {
-          lazy: true,
-          tip: false,
-          simplePage: true,
-          searchShow: true,
-          searchMenuSpan: 6,
-          dialogWidth: "60%",
-          tree: true,
-          border: true,
-          index: true,
-          selection: true,
-          viewBtn: false,
-          editBtn: false,
-          addBtn: false,
-          delBtn: false,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "菜单名称",
-              prop: "name",
-              search: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单名称",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "路由地址",
-              prop: "path",
-              rules: [
-                {
-                  required: true,
-                  message: "请输入路由地址",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "上级菜单",
-              prop: "parentId",
-              type: "tree",
-              dicUrl: "/api/blade-system/menu/tree",
-              hide: true,
-              props: {
-                label: "title"
-              },
-              rules: [
-                {
-                  required: false,
-                  message: "请选择上级菜单",
-                  trigger: "click"
-                }
-              ]
-            },
-            {
-              label: "菜单图标",
-              prop: "source",
-              type: "icon",
-              slot: true,
-              width: 80,
-              iconList: iconList,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单图标",
-                  trigger: "click"
-                }
-              ]
-            },
-            {
-              label: "菜单编号",
-              prop: "code",
-              search: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单编号",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "菜单类型",
-              prop: "category",
-              type: "radio",
-              dicData: [
-                {
-                  label: "菜单",
-                  value: 1
-                },
-                {
-                  label: "按钮",
-                  value: 2
-                }
-              ],
-              hide: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请选择菜单类型",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "菜单别名",
-              prop: "alias",
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单别名",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "按钮功能",
-              prop: "action",
-              type: "radio",
-              dicData: [
-                {
-                  label: "工具栏",
-                  value: 0
-                },
-                {
-                  label: "操作栏",
-                  value: 1
-                },
-                {
-                  label: "工具操作栏",
-                  value: 2
-                }
-              ],
-              hide: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请选择按钮功能",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "菜单排序",
-              prop: "sort",
-              type: "number",
-              width: 80,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单排序",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "新窗口",
-              prop: "isOpen",
-              type: "radio",
-              dicData: [
-                {
-                  label: "否",
-                  value: 0
-                },
-                {
-                  label: "是",
-                  value: 1
-                },
-              ],
-              hide: true
-            },
-            {
-              label: "菜单备注",
-              prop: "remark",
-              type: "textarea",
-              span: 24,
-              minRows: 6,
-              hide: true
-            }
-          ]
-        },
-        data: [],
-        formScope: {},
-        selectionListScope: [],
-        pageScope: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        optionScope: {
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          menuWidth: 200,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "权限名称",
-              prop: "scopeName",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入数据权限名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "权限编号",
-              prop: "resourceCode",
-              search: true,
-              width: 180,
-              rules: [{
-                required: true,
-                message: "请输入数据权限编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "权限路径",
-              prop: "scopePath",
-              width: 180,
-              rules: [{
-                required: true,
-                message: "请输入数据权限编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "接口类型",
-              type: "select",
-              dicUrl: "/api/blade-system/dict/dictionary?code=api_scope_type",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              width: 100,
-              prop: "scopeType",
-              rules: [{
-                required: true,
-                message: "请输入通知类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "备注",
-              prop: "remark",
-              span: 24,
-              hide: true,
-            },
-          ]
-        },
-        dataScope: []
-      };
-    },
-
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.menu_add, false),
-          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 = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-      scopeIds() {
-        let ids = [];
-        this.selectionListScope.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      // 菜单管理模块
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      searchReset() {
-        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();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getMenu(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
-          this.data = res.data.data;
-          this.loading = false;
-          this.selectionClear();
-        });
-      },
-      treeLoad(tree, treeNode, resolve) {
-        const parentId = tree.id;
-        getLazyMenuList(parentId).then(res => {
-          resolve(res.data.data);
-        });
-      },
-      // 数据权限模块
-      handleDataScope(row) {
-        this.drawerVisible = true;
-        this.scopeMenuId = row.id;
-        this.scopeMenuName = row.name;
-        this.onLoadScope(this.pageScope)
-      },
-      handleDrawerClose(hide) {
-        hide();
-      },
-      rowSaveScope(row, done, loading) {
-        row = {
-          ...row,
-          menuId: this.scopeMenuId,
-        };
-        addApiScope(row).then(() => {
-          this.onLoadScope(this.pageScope);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdateScope(row, index, done, loading) {
-        row = {
-          ...row,
-          menuId: this.scopeMenuId,
-        };
-        updateApiScope(row).then(() => {
-          this.onLoadScope(this.pageScope);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDelScope(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeApiScope(row.id);
-          })
-          .then(() => {
-            this.onLoadScope(this.pageScope);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDeleteScope() {
-        if (this.selectionListScope.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeApiScope(this.scopeIds);
-          })
-          .then(() => {
-            this.onLoadScope(this.pageScope);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crudScope.toggleSelection();
-          });
-      },
-      beforeOpenScope(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getMenuApiScope(this.formScope.id).then(res => {
-            this.formScope = res.data.data;
-          });
-        }
-        done();
-      },
-      searchResetScope() {
-        this.onLoadScope(this.pageScope);
-      },
-      searchChangeScope(params, done) {
-        this.onLoadScope(this.pageScope, params);
-        done();
-      },
-      selectionChangeScope(list) {
-        this.selectionListScope = list;
-      },
-      currentChangeScope(currentPage) {
-        this.pageScope.currentPage = currentPage;
-      },
-      sizeChangeScope(pageSize) {
-        this.pageScope.pageSize = pageSize;
-      },
-      onLoadScope(page, params = {}) {
-        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;
-        });
-      },
-    }
-  };
-</script>

+ 0 - 727
src/views/authority/datascope.vue

@@ -1,727 +0,0 @@
-<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">
-      <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>
-      </template>
-      <template slot-scope="{row}" slot="source">
-        <div style="text-align:center">
-          <i :class="row.source"/>
-        </div>
-      </template>
-    </avue-crud>
-    <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">
-          <template slot="menuLeft">
-            <el-button type="danger"
-                       size="small"
-                       icon="el-icon-delete"
-                       plain
-                       @click="handleDeleteScope">删 除
-            </el-button>
-          </template>
-          <template slot-scope="{row}"
-                    slot="scopeType">
-            <el-tag>{{row.scopeTypeName}}</el-tag>
-          </template>
-        </avue-crud>
-      </basic-container>
-    </el-drawer>
-  </basic-container>
-</template>
-
-<script>
-  import {
-    add,
-    remove,
-    update,
-    getLazyMenuList,
-    getMenu
-  } 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";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionList: [],
-        query: {},
-        loading: true,
-        parentId: 0,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        drawerVisible: false,
-        direction: 'rtl',
-        scopeMenuId: 0,
-        scopeMenuCode: '',
-        scopeMenuName: "菜单",
-        scopeLoading: false,
-        menu: true,
-        watchMode: true,
-        option: {
-          lazy: true,
-          tip: false,
-          simplePage: true,
-          searchShow: true,
-          searchMenuSpan: 6,
-          dialogWidth: "60%",
-          tree: true,
-          border: true,
-          index: true,
-          selection: true,
-          viewBtn: false,
-          editBtn: false,
-          addBtn: false,
-          delBtn: false,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "菜单名称",
-              prop: "name",
-              search: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单名称",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "路由地址",
-              prop: "path",
-              rules: [
-                {
-                  required: true,
-                  message: "请输入路由地址",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "上级菜单",
-              prop: "parentId",
-              type: "tree",
-              dicUrl: "/api/blade-system/menu/tree",
-              hide: true,
-              props: {
-                label: "title"
-              },
-              rules: [
-                {
-                  required: false,
-                  message: "请选择上级菜单",
-                  trigger: "click"
-                }
-              ]
-            },
-            {
-              label: "菜单图标",
-              prop: "source",
-              type: "icon",
-              slot: true,
-              width: 80,
-              iconList: iconList,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单图标",
-                  trigger: "click"
-                }
-              ]
-            },
-            {
-              label: "菜单编号",
-              prop: "code",
-              search: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单编号",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "菜单类型",
-              prop: "category",
-              type: "radio",
-              dicData: [
-                {
-                  label: "菜单",
-                  value: 1
-                },
-                {
-                  label: "按钮",
-                  value: 2
-                }
-              ],
-              hide: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请选择菜单类型",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "菜单别名",
-              prop: "alias",
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单别名",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "按钮功能",
-              prop: "action",
-              type: "radio",
-              dicData: [
-                {
-                  label: "工具栏",
-                  value: 0
-                },
-                {
-                  label: "操作栏",
-                  value: 1
-                },
-                {
-                  label: "工具操作栏",
-                  value: 2
-                }
-              ],
-              hide: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请选择按钮功能",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "菜单排序",
-              prop: "sort",
-              type: "number",
-              width: 80,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单排序",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "新窗口",
-              prop: "isOpen",
-              type: "radio",
-              dicData: [
-                {
-                  label: "否",
-                  value: 0
-                },
-                {
-                  label: "是",
-                  value: 1
-                },
-              ],
-              hide: true
-            },
-            {
-              label: "菜单备注",
-              prop: "remark",
-              type: "textarea",
-              span: 24,
-              minRows: 6,
-              hide: true
-            }
-          ]
-        },
-        data: [],
-        formScope: {},
-        selectionListScope: [],
-        pageScope: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        optionScope: {
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          menuWidth: 200,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "权限名称",
-              prop: "scopeName",
-              search: true,
-              value: "",
-              rules: [{
-                required: true,
-                message: "请输入数据权限名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "权限编号",
-              prop: "resourceCode",
-              search: true,
-              width: 100,
-              rules: [{
-                required: true,
-                message: "请输入数据权限编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "权限字段",
-              prop: "scopeColumn",
-              width: 130,
-              rules: [{
-                required: true,
-                message: "请输入数据权限编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "规则类型",
-              type: "select",
-              dicUrl: "/api/blade-system/dict/dictionary?code=data_scope_type",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              width: 140,
-              prop: "scopeType",
-              rules: [{
-                required: true,
-                message: "请输入通知类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "可见字段",
-              prop: "scopeField",
-              span: 24,
-              hide: true,
-              value: "*",
-              rules: [{
-                required: true,
-                message: "请输入数据权限可见的字段",
-                trigger: "blur"
-              }],
-            },
-            {
-              label: "权限类名",
-              prop: "scopeClass",
-              span: 24,
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入MybatisMapper对应方法的完整类名路径",
-                trigger: "blur"
-              }],
-            },
-            {
-              label: "规则值",
-              prop: "scopeValue",
-              span: 24,
-              minRows: 5,
-              type: "textarea",
-              display: true,
-              hide: true,
-            },
-            {
-              label: "备注",
-              prop: "remark",
-              span: 24,
-              hide: true,
-            },
-          ]
-        },
-        dataScope: []
-      };
-    },
-    watch: {
-      'formScope.scopeType'() {
-        this.initScope();
-      }
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.menu_add, false),
-          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 = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-      scopeIds() {
-        let ids = [];
-        this.selectionListScope.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      initScope() {
-        const scopeType = func.toInt(this.formScope.scopeType);
-        const watchMode = this.watchMode;
-        let column = "-", name = "暂无";
-        if (scopeType === 1) {
-          column = "-";
-          name = "全部可见";
-        } else if (scopeType === 2) {
-          column = "create_user";
-          name = "本人可见";
-        } else if (scopeType === 3) {
-          column = "create_dept";
-          name = "所在机构可见";
-        } else if (scopeType === 4) {
-          column = "create_dept";
-          name = "所在机构可见及子级可见";
-        } else if (scopeType === 5) {
-          column = "";
-          name = "自定义";
-        }
-        this.$refs.crudScope.option.column.filter(item => {
-          if (watchMode) {
-            if (item.prop === "scopeName") {
-              this.formScope.scopeName = `${this.scopeMenuName} [${name}]`;
-            }
-            if (item.prop === "resourceCode") {
-              this.formScope.resourceCode = this.scopeMenuCode;
-            }
-            if (item.prop === "scopeColumn") {
-              this.formScope.scopeColumn = column;
-            }
-          }
-          if (item.prop === "scopeValue") {
-            item.display = scopeType === 5;
-          }
-        });
-      },
-      // 菜单管理模块
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      searchReset() {
-        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();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getMenu(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
-          this.data = res.data.data;
-          this.loading = false;
-          this.selectionClear();
-        });
-      },
-      treeLoad(tree, treeNode, resolve) {
-        const parentId = tree.id;
-        getLazyMenuList(parentId).then(res => {
-          resolve(res.data.data);
-        });
-      },
-      // 数据权限模块
-      handleDataScope(row) {
-        this.drawerVisible = true;
-        this.scopeMenuId = row.id;
-        this.scopeMenuCode = row.code;
-        this.scopeMenuName = row.name;
-        this.onLoadScope(this.pageScope)
-      },
-      handleDrawerClose(hide) {
-        hide();
-      },
-      rowSaveScope(row, done, loading) {
-        row = {
-          ...row,
-          menuId: this.scopeMenuId,
-        };
-        addDataScope(row).then(() => {
-          this.onLoadScope(this.pageScope);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdateScope(row, index, done, loading) {
-        row = {
-          ...row,
-          menuId: this.scopeMenuId,
-        };
-        updateDataScope(row).then(() => {
-          this.onLoadScope(this.pageScope);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDelScope(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeDataScope(row.id);
-          })
-          .then(() => {
-            this.onLoadScope(this.pageScope);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDeleteScope() {
-        if (this.selectionListScope.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeDataScope(this.scopeIds);
-          })
-          .then(() => {
-            this.onLoadScope(this.pageScope);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crudScope.toggleSelection();
-          });
-      },
-      beforeOpenScope(done, type) {
-        if (["add"].includes(type)) {
-          this.watchMode = true;
-          this.initScope();
-        }
-        if (["edit", "view"].includes(type)) {
-          this.watchMode = false;
-          getMenuDataScope(this.formScope.id).then(res => {
-            this.formScope = res.data.data;
-          });
-        }
-        done();
-      },
-      searchResetScope() {
-        this.onLoadScope(this.pageScope);
-      },
-      searchChangeScope(params, done) {
-        this.onLoadScope(this.pageScope, params);
-        done();
-      },
-      selectionChangeScope(list) {
-        this.selectionListScope = list;
-      },
-      currentChangeScope(currentPage) {
-        this.pageScope.currentPage = currentPage;
-      },
-      sizeChangeScope(pageSize) {
-        this.pageScope.pageSize = pageSize;
-      },
-      onLoadScope(page, params = {}) {
-        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;
-        });
-      },
-    }
-  };
-</script>
-

+ 0 - 380
src/views/authority/role.vue

@@ -1,380 +0,0 @@
-<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">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   v-if="permission.role_delete"
-                   plain
-                   @click="handleDelete">删 除
-        </el-button>
-        <el-button size="small"
-                   icon="el-icon-setting"
-                   @click="handleRole"
-                   v-if="userInfo.role_name.includes('admin')"
-                   plain>权限设置
-        </el-button>
-      </template>
-    </avue-crud>
-    <el-dialog title="角色权限配置"
-               append-to-body
-               :visible.sync="box"
-               width="345px">
-      <el-tabs type="border-card">
-        <el-tab-pane label="菜单权限">
-          <el-tree :data="menuGrantList"
-                   show-checkbox
-                   node-key="id"
-                   ref="treeMenu"
-                   :default-checked-keys="menuTreeObj"
-                   :props="props">
-          </el-tree>
-        </el-tab-pane>
-        <el-tab-pane label="数据权限">
-          <el-tree :data="dataScopeGrantList"
-                   show-checkbox
-                   node-key="id"
-                   ref="treeDataScope"
-                   :default-checked-keys="dataScopeTreeObj"
-                   :props="props">
-          </el-tree>
-        </el-tab-pane>
-        <el-tab-pane label="接口权限">
-          <el-tree :data="apiScopeGrantList"
-                   show-checkbox
-                   node-key="id"
-                   ref="treeApiScope"
-                   :default-checked-keys="apiScopeTreeObj"
-                   :props="props">
-          </el-tree>
-        </el-tab-pane>
-      </el-tabs>
-
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="box = false">取 消</el-button>
-        <el-button type="primary"
-                   @click="submit">确 定</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {add, getList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
-  import {mapGetters} from "vuex";
-  import website from '@/config/website';
-
-  export default {
-    data() {
-      return {
-        form: {},
-        box: false,
-        props: {
-          label: "title",
-          value: "key"
-        },
-        menuGrantList: [],
-        dataScopeGrantList: [],
-        apiScopeGrantList: [],
-        apiGrantList: [],
-        menuTreeObj: [],
-        dataScopeTreeObj: [],
-        apiScopeTreeObj: [],
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        option: {
-          tip: false,
-          simplePage: true,
-          searchShow: true,
-          searchMenuSpan: 6,
-          tree: true,
-          border: true,
-          index: true,
-          selection: true,
-          viewBtn: true,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "角色名称",
-              prop: "roleName",
-              search: true,
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入角色名称",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "所属租户",
-              prop: "tenantId",
-              type: "tree",
-              dicUrl: "/api/blade-system/tenant/select",
-              addDisplay: false,
-              editDisplay: false,
-              viewDisplay: website.tenantMode,
-              span: 24,
-              props: {
-                label: "tenantName",
-                value: "tenantId"
-              },
-              hide: !website.tenantMode,
-              search: website.tenantMode,
-              rules: [{
-                required: true,
-                message: "请输入所属租户",
-                trigger: "click"
-              }]
-            },
-            {
-              label: "角色别名",
-              prop: "roleAlias",
-              search: true,
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入角色别名",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "上级角色",
-              prop: "parentId",
-              dicData: [],
-              type: "tree",
-              hide: true,
-              span: 24,
-              props: {
-                label: "title"
-              },
-              rules: [
-                {
-                  required: false,
-                  message: "请选择上级角色",
-                  trigger: "click"
-                }
-              ]
-            },
-            {
-              label: "角色排序",
-              prop: "sort",
-              type: "number",
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入角色排序",
-                  trigger: "blur"
-                }
-              ]
-            }
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["userInfo", "permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.role_add, false),
-          viewBtn: this.vaildData(this.permission.role_view, false),
-          delBtn: this.vaildData(this.permission.role_delete, false),
-          editBtn: this.vaildData(this.permission.role_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-
-        });
-        return ids.join(",");
-      },
-      idsArray() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids;
-      }
-    },
-    methods: {
-      initData(roleId){
-        getRoleTreeById(roleId).then(res => {
-          const column = this.findObject(this.option.column, "parentId");
-          column.dicData = res.data.data;
-        });
-      },
-      submit() {
-        const menuList = this.$refs.treeMenu.getCheckedKeys();
-        const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
-        const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
-        grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
-          this.box = false;
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.onLoad(this.page);
-        });
-      },
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      beforeOpen(done, type) {
-        if (["add", "edit"].includes(type)) {
-          this.initData(this.form.id);
-        }
-        done();
-      },
-      handleRole() {
-        if (this.selectionList.length !== 1) {
-          this.$message.warning("只能选择一条数据");
-          return;
-        }
-        this.menuTreeObj = [];
-        this.dataScopeTreeObj = [];
-        this.apiScopeTreeObj = [];
-        grantTree()
-          .then(res => {
-            this.menuGrantList = res.data.data.menu;
-            this.dataScopeGrantList = res.data.data.dataScope;
-            this.apiScopeGrantList = res.data.data.apiScope;
-            getRole(this.ids).then(res => {
-              this.menuTreeObj = res.data.data.menu;
-              this.dataScopeTreeObj = res.data.data.dataScope;
-              this.apiScopeTreeObj = res.data.data.apiScope;
-              this.box = true;
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
-          this.data = res.data.data;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>

+ 0 - 417
src/views/base/region.vue

@@ -1,417 +0,0 @@
-<template>
-  <el-row>
-    <el-col :span="9">
-      <div class="box">
-        <el-scrollbar>
-          <basic-container>
-            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
-          </basic-container>
-        </el-scrollbar>
-      </div>
-    </el-col>
-    <el-col :span="15">
-      <basic-container>
-        <el-button-group>
-          <el-button v-if="permission.region_add" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addChildren">新增下级</el-button>
-          <el-button v-if="permission.region_delete" type="primary" size="small" icon="el-icon-delete" @click="handleDelete">删除</el-button>
-          <el-button v-if="permission.region_import" type="primary" size="small" icon="el-icon-upload2" @click="handleImport">导入</el-button>
-          <el-button v-if="permission.region_export" type="primary" size="small" icon="el-icon-download" @click="handleExport">导出</el-button>
-          <el-button v-if="permission.region_debug" type="primary" size="small" icon="el-icon-video-play" @click="handleDebug">调试</el-button>
-        </el-button-group>
-      </basic-container>
-      <basic-container>
-        <avue-form ref="form" :option="regionOption" v-model="regionForm" @submit="handleSubmit">
-          <template slot="code" slot-scope="{}">
-            <el-input placeholder="请输入 区划子编号" v-model="regionForm.subCode">
-              <template slot="prepend">{{regionForm.parentCode}}</template>
-            </el-input>
-          </template>
-        </avue-form>
-        <el-dialog title="行政区划数据导入"
-                   append-to-body
-                   :visible.sync="excelBox"
-                   width="555px">
-          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
-            <template slot="excelTemplate">
-              <el-button type="primary" @click="handleTemplate">
-                点击下载<i class="el-icon-download el-icon--right"></i>
-              </el-button>
-            </template>
-          </avue-form>
-        </el-dialog>
-        <el-dialog title="行政区划数据调试"
-                   append-to-body
-                   :visible.sync="debugBox"
-                   width="350px">
-          <avue-form :option="debugOption" v-model="debugForm"/>
-        </el-dialog>
-      </basic-container>
-    </el-col>
-  </el-row>
-</template>
-
-<script>
-  import {getLazyTree, getDetail, submit, remove} from "@/api/base/region";
-  import {mapGetters} from "vuex";
-  import {validatenull} from "@/util/validate";
-  import {getToken} from "@/util/auth";
-
-  export default {
-    data() {
-      return {
-        topCode: '00',
-        treeCode: '',
-        treeParentCode: '',
-        treeData: [],
-        treeOption: {
-          nodeKey: 'id',
-          lazy: true,
-          treeLoad: function (node, resolve) {
-            const parentCode = (node.level === 0) ? "00" : node.data.id;
-            getLazyTree(parentCode).then(res => {
-              resolve(res.data.data.map(item => {
-                return {
-                  ...item,
-                  leaf: !item.hasChildren
-                }
-              }))
-            });
-          },
-          addBtn: false,
-          menu: false,
-          size: 'small',
-          props: {
-            labelText: '标题',
-            label: 'title',
-            value: 'value',
-            children: 'children'
-          }
-        },
-        regionForm: {},
-        regionOption: {
-          labelWidth: 100,
-          column: [
-            {
-              label: "父区划编号",
-              prop: "parentCode",
-              span: 24,
-              disabled: true,
-              rules: [{
-                required: true,
-                message: "请输入父区划编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "父区划名称",
-              prop: "parentName",
-              span: 24,
-              disabled: true,
-            },
-            {
-              label: "区划编号",
-              prop: "code",
-              formslot: true,
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请输入区划编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "区划子编号",
-              prop: "subCode",
-              display: false,
-            },
-            {
-              label: "区划名称",
-              prop: "name",
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请输入区划名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "区划等级",
-              prop: "regionLevel",
-              type: "radio",
-              dicUrl: "/api/blade-system/dict/dictionary?code=region",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请选择区划等级",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "区划排序",
-              prop: "sort",
-              type: "number",
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请输入区划排序",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "区划备注",
-              prop: "remark",
-              type: "textarea",
-              minRows: 6,
-              span: 24,
-            },
-          ]
-        },
-        excelBox: false,
-        excelForm: {},
-        excelOption: {
-          submitBtn: false,
-          emptyBtn: false,
-          column: [
-            {
-              label: '模板上传',
-              prop: 'excelFile',
-              type: 'upload',
-              drag: true,
-              loadText: '模板上传中,请稍等',
-              span: 24,
-              propsHttp: {
-                res: 'data'
-              },
-              tip: '请上传 .xls,.xlsx 标准格式文件',
-              action: "/api/blade-system/region/import-region"
-            },
-            {
-              label: "数据覆盖",
-              prop: "isCovered",
-              type: "switch",
-              align: "center",
-              width: 80,
-              dicData: [
-                {
-                  label: "否",
-                  value: 0
-                },
-                {
-                  label: "是",
-                  value: 1
-                }
-              ],
-              value: 0,
-              slot: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请选择是否覆盖",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: '模板下载',
-              prop: 'excelTemplate',
-              formslot: true,
-              span: 24,
-            }
-          ]
-        },
-        debugBox: false,
-        debugForm: {},
-        debugOption: {
-          labelWidth: 50,
-          submitBtn: false,
-          emptyBtn: false,
-          column: [
-            {
-              label: '省份',
-              prop: 'province',
-              type: 'select',
-              props: {
-                label: 'name',
-                value: 'code'
-              },
-              cascaderItem: ['city', 'district'],
-              dicUrl: '/api/blade-system/region/select',
-              span: 24,
-            },
-            {
-              label: '地市',
-              prop: 'city',
-              type: 'select',
-              props: {
-                label: 'name',
-                value: 'code'
-              },
-              dicFlag: false,
-              dicUrl: '/api/blade-system/region/select?code={{key}}',
-              span: 24,
-            },
-            {
-              label: '区县',
-              prop: 'district',
-              type: 'select',
-              props: {
-                label: 'name',
-                value: 'code'
-              },
-              dicFlag: false,
-              dicUrl: '/api/blade-system/region/select?code={{key}}',
-              span: 24,
-            }
-          ]
-        }
-      };
-    },
-    watch: {
-      'regionForm.subCode'() {
-        this.regionForm.code = this.regionForm.parentCode + this.regionForm.subCode;
-      },
-      'excelForm.isCovered'() {
-        if (this.excelForm.isCovered !== '') {
-          const column = this.findObject(this.excelOption.column, "excelFile");
-          column.action = `/api/blade-system/region/import-region?isCovered=${this.excelForm.isCovered}`;
-        }
-      }
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.region_add, false),
-          viewBtn: this.vaildData(this.permission.region_view, false),
-          delBtn: this.vaildData(this.permission.region_delete, false),
-          editBtn: this.vaildData(this.permission.region_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      initTree() {
-        this.treeData = [];
-        getLazyTree(this.topCode).then(res => {
-          this.treeData = res.data.data.map(item => {
-            return {
-              ...item,
-              leaf: !item.hasChildren
-            }
-          })
-        });
-      },
-      nodeClick(data) {
-        const column = this.findObject(this.regionOption.column, "parentCode");
-        column.disabled = true;
-        this.treeCode = data.id;
-        this.treeParentCode = data.parentId;
-        getDetail(this.treeCode).then(res => {
-          this.regionForm = res.data.data;
-          this.regionForm.subCode = this.regionForm.code.replace(this.regionForm.parentCode, '');
-        })
-      },
-      addChildren() {
-        if (validatenull(this.regionForm.code) || validatenull(this.regionForm.name)) {
-          this.$message.warning("请先选择一项区划");
-          return;
-        }
-        this.regionForm.parentCode = this.regionForm.code;
-        this.regionForm.parentName = this.regionForm.name;
-        this.regionForm.code = '';
-        this.regionForm.subCode = '';
-        this.regionForm.name = '';
-        this.regionForm.regionLevel = (this.regionForm.regionLevel === 5) ? 5 : this.regionForm.regionLevel + 1;
-      },
-      handleSubmit(form, done, loading) {
-        const parentCode = form.parentCode === this.topCode ? '' : form.parentCode;
-        form.code = parentCode + form.subCode;
-        submit(form).then(() => {
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.initTree();
-          this.regionForm.subCode = '';
-          this.$refs.form.resetForm();
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
-        });
-      },
-      handleDelete() {
-        if (validatenull(this.regionForm.code)) {
-          this.$message.warning("请先选择一项区划");
-          return;
-        }
-        this.$confirm(`确定将 [${this.regionForm.name}] 数据删除?`, {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.treeCode);
-          })
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.initTree();
-            this.regionForm.subCode = '';
-            this.$refs.form.resetForm();
-          });
-      },
-      uploadAfter(res, done, loading, column) {
-        window.console.log(column);
-        this.excelBox = false;
-        this.initTree();
-        done();
-      },
-      handleDebug() {
-        this.debugBox = true;
-      },
-      handleImport() {
-        this.excelBox = true;
-      },
-      handleExport() {
-        this.$confirm("是否导出行政区划数据?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          window.open(`/api/blade-system/region/export-region?${this.website.tokenHeader}=${getToken()}`);
-        });
-      },
-      handleTemplate() {
-        window.open(`/api/blade-system/region/export-template?${this.website.tokenHeader}=${getToken()}`);
-      },
-    }
-  };
-</script>
-
-<style>
-  .box {
-    height: 800px;
-  }
-
-  .el-scrollbar {
-    height: 100%;
-  }
-
-  .box .el-scrollbar__wrap {
-    overflow: scroll;
-  }
-</style>

+ 0 - 294
src/views/desk/notice.vue

@@ -1,294 +0,0 @@
-<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">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.notice_delete"
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="category">
-        <el-tag>{{row.categoryName}}</el-tag>
-      </template>
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-  import {getList, remove, update, add, getNotice} from "@/api/desk/notice";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          dialogWidth: 950,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          excelBtn: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "通知标题",
-              prop: "title",
-              span: 24,
-              row: true,
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入通知标题",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "通知类型",
-              type: "select",
-              dicUrl: "/api/blade-system/dict/dictionary?code=notice",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入通知类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "通知时间",
-              prop: "releaseTimeRange",
-              type: "datetime",
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
-              searchRange:true,
-              hide: true,
-              addDisplay: false,
-              editDisplay: false,
-              viewDisplay: false,
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入通知时间",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "通知日期",
-              prop: "releaseTime",
-              type: "date",
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
-              rules: [{
-                required: true,
-                message: "请输入通知日期",
-                trigger: "click"
-              }]
-            },
-            {
-              label: "通知内容",
-              prop: "content",
-              component: 'AvueUeditor',
-              options: {
-                action: '/api/blade-resource/oss/endpoint/put-file',
-                props: {
-                  res: "data",
-                  url: "link",
-                }
-              },
-              hide: true,
-              minRows: 6,
-              span: 24,
-            }
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.notice_add, false),
-          viewBtn: this.vaildData(this.permission.notice_view, false),
-          delBtn: this.vaildData(this.permission.notice_delete, false),
-          editBtn: this.vaildData(this.permission.notice_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getNotice(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const {releaseTimeRange} = this.query;
-        let values = {
-          ...params,
-        };
-        if (releaseTimeRange) {
-          values = {
-            ...params,
-            releaseTime_datege: releaseTimeRange[0],
-            releaseTime_datelt: releaseTimeRange[1],
-            ...this.query
-          };
-          values.releaseTimeRange = null;
-        }
-        this.loading = true;
-        getList(page.currentPage, page.pageSize, values).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-</style>

+ 0 - 154
src/views/flow/deploy.vue

@@ -1,154 +0,0 @@
-<template>
-  <basic-container>
-    <avue-form ref="form" :option="option" v-model="form" :upload-before="uploadBefore" :upload-after="uploadAfter"/>
-  </basic-container>
-</template>
-
-<script>
-  import {deployUpload} from "@/api/flow/flow";
-  import {flowCategory} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {
-          flowCategory: '',
-          tenantId: '',
-          flowFile: [],
-          file: {},
-        },
-        option: {
-          labelWidth: 120,
-          menuBtn: false,
-          column: [
-            {
-              label: '流程类型',
-              prop: 'flowCategory',
-              type: 'select',
-              dicUrl: `/api/blade-system/dict/dictionary?code=flow`,
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              row: true,
-              span: 12,
-              dataType: "number",
-              rules: [
-                {
-                  required: true,
-                  message: '请选择流程类型',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: "流程模式",
-              prop: "flowMode",
-              type: "radio",
-              dicData: [
-                {
-                  label: "通用流程",
-                  value: 1
-                },
-                {
-                  label: "定制流程",
-                  value: 2
-                }
-              ],
-              value: 1,
-              row: true,
-              span: 12,
-              rules: [
-                {
-                  required: true,
-                  message: '请选择流程模式',
-                  trigger: 'blur'
-                }
-              ],
-            },
-            {
-              label: "所属租户",
-              prop: "tenantId",
-              type: "tree",
-              multiple: true,
-              dicUrl: "/api/blade-system/tenant/select",
-              props: {
-                label: "tenantName",
-                value: "tenantId"
-              },
-              display: false,
-              row: true,
-              span: 12,
-              rules: [
-                {
-                  required: true,
-                  message: '请选择所属租户',
-                  trigger: 'blur'
-                }
-              ],
-            },
-            {
-              label: '附件上传',
-              prop: 'flowFile',
-              type: 'upload',
-              loadText: '附件上传中,请稍等',
-              span: 24,
-              propsHttp: {
-                res: 'data'
-              },
-              tip: '请上传 bpmn20.xml 标准格式文件',
-              action: '/api/blade-flow/manager/check-upload'
-            },
-          ]
-        }
-      }
-    },
-    watch: {
-      'form.flowMode'() {
-        this.$refs.form.option.column.filter(item => {
-          if (item.prop === "tenantId") {
-            item.display = this.form.flowMode === 2;
-          }
-        });
-      }
-    },
-    methods: {
-      uploadBefore(file, done) {
-        this.$message.success('部署开始');
-        this.file = file;
-        done()
-      },
-      uploadAfter(res, done, loading) {
-        if (!this.form.flowCategory) {
-          this.$message.warning('清先选择流程类型');
-          loading()
-          return false;
-        }
-        if (this.form.flowMode === 2 && !this.form.tenantId) {
-          this.$message.warning('清先选择对应租户');
-          loading();
-          return false;
-        }
-        if (res.success) {
-          deployUpload(
-            flowCategory(this.form.flowCategory),
-            (this.form.tenantId) ? this.form.tenantId.join(",") : "",
-            [this.file]
-          ).then(res => {
-            const data = res.data;
-            if (data.success) {
-              done()
-            } else {
-              this.$message.error(data.msg);
-              loading()
-            }
-          })
-        } else {
-          this.$message.warning('请上传 bpmn20.xml 标准格式文件');
-          loading()
-          return false;
-        }
-      },
-    }
-  }
-</script>

+ 0 - 203
src/views/flow/follow.vue

@@ -1,203 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :page.sync="page"
-               :permission="permissionList"
-               @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-scope="{row}"
-                slot="suspensionState">
-        <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程删除"
-               append-to-body
-               :visible.sync="followBox"
-               width="20%">
-      <el-form :model="form"
-               ref="form"
-               label-width="80px">
-        <el-form-item label="删除理由">
-          <el-input v-model="deleteReason"
-                    placeholder="请输入删除理由" />
-        </el-form-item>
-      </el-form>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="followBox = false">关 闭</el-button>
-        <el-button type="primary"
-                   @click="handleDelete">确 定</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {followList, deleteProcessInstance} from "@/api/flow/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionId: '',
-        processInstanceId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        followBox: false,
-        deleteReason: '',
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          dialogWidth: 900,
-          menuWidth: 100,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "执行id",
-              prop: "executionId",
-              search: true,
-              width: 320,
-            },
-            {
-              label: "流程key",
-              prop: "processDefinitionKey",
-              search: true,
-            },
-            {
-              label: "实例id",
-              prop: "processInstanceId",
-              search: true,
-              width: 320,
-            },
-            {
-              label: "状态",
-              prop: "suspensionState",
-              slot: true,
-              width: 80,
-            },
-            {
-              label: "发起人",
-              prop: "startUser",
-              width: 100,
-            },
-            {
-              label: '开始时间',
-              prop: 'startTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          delBtn: this.vaildData(this.permission.flow_follow_delete, false),
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      rowDel(row) {
-        this.followBox = true;
-        this.selectionId = row.id;
-        this.processInstanceId = row.processInstanceId;
-      },
-      handleDelete() {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return deleteProcessInstance({deleteReason: this.deleteReason, processInstanceId: this.processInstanceId});
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.followBox = false;
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        followList(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();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 368
src/views/flow/manager.vue

@@ -1,368 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :page.sync="page"
-               :permission="permissionList"
-               @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-radio-group v-model="mode" size="small">
-          <el-radio-button label="1">通用流程</el-radio-button>
-          <el-radio-button label="2">定制流程</el-radio-button>
-        </el-radio-group>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_manager_state"
-                   plain
-                   class="none-border"
-                   @click.stop="handleState(scope.row,scope.index)">变更状态
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_manager_image"
-                   plain
-                   class="none-border"
-                   @click.stop="handleImage(scope.row,scope.index)">流程图
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_manager_remove"
-                   plain
-                   class="none-border"
-                   @click.stop="handleSlotDelete(scope.row,scope.index)">删除
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="tenantId">
-        <el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="version">
-        <el-tag>v{{row.version}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="suspensionState">
-        <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="category">
-        <el-tag>{{row.categoryName}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="流程变更"
-               append-to-body
-               :visible.sync="stateBox"
-               width="20%">
-      <el-form :model="form"
-               ref="form"
-               label-width="80px">
-        <el-form-item label="流程状态">
-          <el-select v-model="flowState" placeholder="请选择" value="">
-            <el-option
-              v-for="item in stateOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="stateBox = false">关 闭</el-button>
-        <el-button type="primary"
-                   @click="handleDoState">确 定</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {managerList, changeState, deleteDeployment} from "@/api/flow/flow";
-  import {flowCategory} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        mode: '1',
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        flowBox: false,
-        flowUrl: '',
-        stateBox: false,
-        flowState: '',
-        stateOptions: [{
-          value: 'active',
-          label: '激活'
-        }, {
-          value: 'suspend',
-          label: '挂起'
-        }],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: '租户编号',
-              prop: 'tenantId',
-              slot: true,
-              width: 120,
-            },
-            {
-              label: '流程主键',
-              prop: 'id',
-            },
-            {
-              label: '流程标识',
-              prop: 'key',
-              search: true,
-              width: 150,
-            },
-            {
-              label: '流程名称',
-              prop: 'name',
-              width: 150,
-            },
-            {
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              width: 100,
-            },
-            {
-              label: '流程版本',
-              prop: 'version',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '状态',
-              prop: 'suspensionState',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '部署时间',
-              prop: 'deploymentTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    watch: {
-      'mode'() {
-        this.onLoad(this.page);
-      }
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          delBtn: this.vaildData(this.permission.flow_manager_remove, false),
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-      deploymentIds() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.deploymentId);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return deleteDeployment(this.deploymentIds);
-          })
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-            this.onLoad(this.page);
-          });
-      },
-      handleSlotDelete(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return deleteDeployment(row.deploymentId);
-          })
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-            this.onLoad(this.page);
-          });
-      },
-      handleState(row) {
-        this.stateBox = true;
-        this.selectionId = row.id;
-      },
-      handleDoState() {
-        if (!this.flowState) {
-          this.$message({
-            type: "warn",
-            message: "请先选择流程状态!"
-          });
-          return;
-        }
-        changeState({processId: this.selectionId, state: this.flowState}).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.$message({
-              type: "success",
-              message: data.msg
-            });
-            this.stateBox = false;
-            this.onLoad(this.page);
-          } else {
-            this.$message({
-              type: "warn",
-              message: data.msg
-            });
-          }
-        })
-      },
-      handleImage(row) {
-        this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
-        this.flowBox = true;
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const values = {
-          ...params,
-          category: (params.category) ? flowCategory(params.category) : null,
-          mode: this.mode
-        };
-        this.loading = true;
-        managerList(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 402
src/views/flow/model.vue

@@ -1,402 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :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="primary"
-                   size="small"
-                   icon="el-icon-circle-plus"
-                   v-if="permission.flow_model_create"
-                   plain
-                   @click="handleCreate">创 建
-        </el-button>
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   v-if="permission.flow_model_delete"
-                   plain
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_model_update"
-                   plain
-                   class="none-border"
-                   @click.stop="handleUpdate(scope.row,scope.index)">配置
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_model_deploy"
-                   plain
-                   class="none-border"
-                   @click.stop="handleDeploy(scope.row,scope.index)">部署
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_model_download"
-                   plain
-                   class="none-border"
-                   @click.stop="handleDownload(scope.row,scope.index)">下载
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.flow_model_delete"
-                   plain
-                   class="none-border"
-                   @click.stop="handleSlotDelete(scope.row,scope.index)">删除
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="version">
-        <el-tag>v{{row.version}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程配置"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程设计器"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">取 消</el-button>
-        <el-button type="primary" @click="handleRefresh">确 定</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="流程部署"
-               append-to-body
-               :visible.sync="deployBox"
-               width="20%">
-      <avue-form ref="form" :option="optionDeploy" v-model="form" @submit="handleSubmit"/>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="deployBox = false">取 消</el-button>
-        <el-button type="primary" @click="handleDoDeploy" :loading="deployLoading">确 定</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import website from '@/config/website';
-  import {modelList, removeModel, deployModel} from "@/api/flow/flow";
-  import {flowCategory} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        optionDeploy: {
-          menuBtn: false,
-          column: [
-            {
-              label: "流程类型",
-              type: "select",
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "categoryValue",
-              search: true,
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请选择流程类型",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "流程模式",
-              prop: "flowMode",
-              type: "radio",
-              dicData: [
-                {
-                  label: "通用流程",
-                  value: 1
-                },
-                {
-                  label: "定制流程",
-                  value: 2
-                }
-              ],
-              value: 1,
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: '请选择流程模式',
-                  trigger: 'blur'
-                }
-              ],
-            },
-            {
-              label: "所属租户",
-              prop: "tenantId",
-              type: "tree",
-              multiple: true,
-              dicUrl: "/api/blade-system/tenant/select",
-              props: {
-                label: "tenantName",
-                value: "tenantId"
-              },
-              display: false,
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: '请选择所属租户',
-                  trigger: 'blur'
-                }
-              ],
-            },
-          ],
-        },
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        deployLoading: false,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        deployBox: false,
-        flowBox: false,
-        flowUrl: '',
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: '模型主键',
-              prop: 'id',
-            },
-            {
-              label: '模型标识',
-              prop: 'modelKey',
-              search: true,
-              width: 150,
-            },
-            {
-              label: '模型名称',
-              prop: 'name',
-              search: true,
-              width: 150,
-            },
-            {
-              label: '流程版本',
-              prop: 'version',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '创建时间',
-              prop: 'created',
-              width: 165,
-            },
-            {
-              label: '更新时间',
-              prop: 'lastUpdated',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    watch: {
-      'form.flowMode'() {
-        this.$refs.form.option.column.filter(item => {
-          if (item.prop === "tenantId") {
-            item.display = this.form.flowMode === 2;
-          }
-        });
-      }
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      handleSubmit(form, done) {
-        this.deployLoading = true;
-        deployModel({
-          modelId: this.selectionId,
-          category: flowCategory(form.categoryValue),
-          tenantIds: form.tenantId.join(",")
-        }).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.$message({
-              type: "success",
-              message: data.msg
-            });
-            done();
-            this.$refs.form.resetForm();
-            this.deployBox = false;
-            this.deployLoading = false;
-          } else {
-            done();
-            this.deployLoading = false;
-            this.$message({
-              type: "warn",
-              message: data.msg
-            });
-          }
-        })
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeModel(this.ids);
-          })
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-            this.onLoad(this.page);
-          });
-      },
-      handleCreate() {
-        this.flowUrl = `${website.flowDesignUrl}/index.html`;
-        this.flowBox = true;
-      },
-      handleUpdate(row) {
-        this.flowUrl = `${website.flowDesignUrl}/index.html#/editor/${row.id}`;
-        this.flowBox = true;
-      },
-      handleDeploy(row) {
-        this.deployBox = true;
-        this.selectionId = row.id;
-      },
-      handleDoDeploy() {
-        this.$refs.form.submit();
-      },
-      handleDownload(row) {
-        window.open(`${website.flowDesignUrl}/app/rest/models/${row.id}/bpmn20`);
-      },
-      handleSlotDelete(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeModel(row.id);
-          })
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-            this.onLoad(this.page);
-          });
-      },
-      handleRefresh() {
-        this.flowBox = false;
-        this.onLoad(this.page);
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        modelList(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();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 161
src/views/monitor/log/api.vue

@@ -1,161 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :permission="permissionList"
-               :before-open="beforeOpen"
-               :page.sync="page"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-  import {getApiList, getApiLogs} from "@/api/logs";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          editBtn: false,
-          addBtn: false,
-          delBtn: false,
-          menuWidth: 120,
-          dialogType: 'drawer',
-          column: [
-            {
-              label: "服务id",
-              prop: "serviceId",
-              width:'120',
-              search: true
-            },
-            {
-              label: "服务host",
-              prop: "serverHost",
-              search: true
-            },
-            {
-              label: "服务ip",
-              prop: "serverIp",
-              width:'160'
-            },
-            {
-              label: "软件环境",
-              prop: "env",
-              width:'80',
-            },
-            {
-              label: "日志名",
-              prop: "title"
-            },
-            {
-              label: "请求方法",
-              prop: "method",
-              width:'80'
-            },
-            {
-              label: "请求接口",
-              prop: "requestUri"
-            },
-            {
-              label: "日志时间",
-              prop: "createTime",
-              width:'180'
-            },
-            {
-              label: "用户代理",
-              prop: "userAgent",
-              span: 24,
-              hide: true
-            },
-            {
-              label: "请求数据",
-              prop: "params",
-              type: "textarea",
-              span: 24,
-              minRows: 2,
-              hide: true
-            }
-          ]
-        },
-        data: []
-      };
-    },
-
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          viewBtn: this.vaildData(this.permission.log_api_view, false)
-        };
-      }
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getApiLogs(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getApiList(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;
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-</style>

+ 0 - 165
src/views/monitor/log/error.vue

@@ -1,165 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               :before-open="beforeOpen"
-               v-model="form"
-               :permission="permissionList"
-               :page.sync="page"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-  import {getErrorList, getErrorLogs} from "@/api/logs";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          editBtn: false,
-          addBtn: false,
-          delBtn: false,
-          menuWidth: 120,
-          dialogType: 'drawer',
-          column: [
-            {
-              label: "服务id",
-              prop: "serviceId",
-              search: true,
-              width:'120'
-            },
-            {
-              label: "服务host",
-              prop: "serverHost",
-              search: true,
-              width:'150'
-            },
-            {
-              label: "服务ip",
-              prop: "serverIp",
-              width:'160'
-            },
-            {
-              label: "软件环境",
-              prop: "env",
-              width:'80'
-            },
-            {
-              label: "请求方法",
-              prop: "method",
-              width:'80'
-            },
-            {
-              label: "请求接口",
-              prop: "requestUri"
-            },
-            {
-              label: "日志时间",
-              prop: "createTime",
-              width:'180'
-            },
-            {
-              label: "用户代理",
-              prop: "userAgent",
-              span: 24,
-              hide: true
-            },
-            {
-              label: "请求数据",
-              prop: "params",
-              type: "textarea",
-              span: 24,
-              minRows: 2,
-              hide: true
-            },
-            {
-              label: "日志数据",
-              prop: "stackTrace",
-              type: "textarea",
-              span: 24,
-              minRows: 16,
-              hide: true
-            }
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          viewBtn: this.vaildData(this.permission.log_error_view, false)
-        };
-      }
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getErrorLogs(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getErrorList(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;
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-</style>

+ 0 - 165
src/views/monitor/log/usual.vue

@@ -1,165 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :permission="permissionList"
-               :page.sync="page"
-               :before-open="beforeOpen"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-  import {getUsualList, getUsualLogs} from "@/api/logs";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          editBtn: false,
-          addBtn: false,
-          delBtn: false,
-          menuWidth: 120,
-          dialogType: 'drawer',
-          column: [
-            {
-              label: "服务id",
-              prop: "serviceId",
-              search: true
-            },
-            {
-              label: "服务host",
-              prop: "serverHost",
-              search: true
-            },
-            {
-              label: "服务ip",
-              prop: "serverIp"
-            },
-            {
-              label: "软件环境",
-              prop: "env",
-              width:'80'
-            },
-            {
-              label: "日志级别",
-              prop: "logLevel"
-            },
-            {
-              label: "日志id",
-              prop: "logId"
-            },
-            {
-              label: "请求接口",
-              prop: "requestUri"
-            },
-            {
-              label: "日志时间",
-              prop: "createTime",
-              width:'180'
-            },
-            {
-              label: "用户代理",
-              prop: "userAgent",
-              span: 24,
-              hide: true
-            },
-            {
-              label: "日志数据",
-              prop: "logData",
-              type: "textarea",
-              span: 24,
-              minRows: 2,
-              hide: true
-            },
-            {
-              label: "请求数据",
-              prop: "params",
-              type: "textarea",
-              span: 24,
-              minRows: 2,
-              hide: true
-            }
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          viewBtn: this.vaildData(this.permission.log_usual_view, false)
-        };
-      }
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getUsualLogs(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        getUsualList(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;
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-</style>

+ 0 - 203
src/views/report/reportlist.vue

@@ -1,203 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :page.sync="page"
-               :permission="permissionList"
-               @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
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button
-          type="text"
-          icon="el-icon-edit-outline"
-          size="small"
-          @click.stop="handleDesign(scope.row.name)"
-          v-if="userInfo.role_name.includes('admin')"
-        >设计
-        </el-button>
-        <el-button
-          type="text"
-          icon="el-icon-view"
-          size="small"
-          @click.stop="handlePreview(scope.row.name)"
-          v-if="userInfo.role_name.includes('admin')"
-        >预览
-        </el-button>
-      </template>
-      <template slot-scope="{row}" slot="name">
-        <el-tag style="cursor:pointer" @click="handlePreview(row.name)">{{ row.name }}</el-tag>
-      </template>
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-import {getList, remove} from "@/api/report/report";
-import {mapGetters} from "vuex";
-
-export default {
-  data() {
-    return {
-      form: {},
-      selectionList: [],
-      query: {},
-      loading: true,
-      page: {
-        pageSize: 10,
-        currentPage: 1,
-        total: 0
-      },
-      option: {
-        height: 'auto',
-        calcHeight: 30,
-        tip: false,
-        searchShow: true,
-        searchMenuSpan: 6,
-        border: true,
-        index: true,
-        selection: true,
-        viewBtn: true,
-        dialogClickModal: false,
-        column: [
-          {
-            label: "文件名",
-            prop: "name",
-            search: true,
-            slot: true,
-          },
-          {
-            label: "创建时间",
-            prop: "createTime",
-          },
-          {
-            label: "更新时间",
-            prop: "updateTime",
-          }
-        ]
-      },
-      data: []
-    };
-  },
-  computed: {
-    ...mapGetters(["userInfo", "permission"]),
-    permissionList() {
-      return {
-        addBtn: false,
-        viewBtn: false,
-        delBtn: true,
-        editBtn: false
-      };
-    },
-    ids() {
-      let ids = [];
-      this.selectionList.forEach(ele => {
-        ids.push(ele.id);
-      });
-      return ids.join(",");
-    }
-  },
-  methods: {
-    handlePreview(name) {
-      this.$router.push({path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`});
-    },
-    handleDesign(name) {
-      this.$router.push({path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=blade-${name}`});
-    },
-    rowDel(row) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          return remove(row.id);
-        })
-        .then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-        });
-    },
-    searchReset() {
-      this.query = {};
-      this.onLoad(this.page);
-    },
-    searchChange(params, done) {
-      this.query = params;
-      this.page.currentPage = 1;
-      this.onLoad(this.page, params);
-      done();
-    },
-    selectionChange(list) {
-      this.selectionList = list;
-    },
-    selectionClear() {
-      this.selectionList = [];
-      this.$refs.crud.toggleSelection();
-    },
-    handleDelete() {
-      if (this.selectionList.length === 0) {
-        this.$message.warning("请选择至少一条数据");
-        return;
-      }
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          return remove(this.ids);
-        })
-        .then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.$refs.crud.toggleSelection();
-        });
-    },
-    currentChange(currentPage) {
-      this.page.currentPage = currentPage;
-    },
-    sizeChange(pageSize) {
-      this.page.pageSize = pageSize;
-    },
-    refreshChange() {
-      this.onLoad(this.page, this.query);
-    },
-    onLoad(page, params = {}) {
-      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();
-      });
-    }
-  }
-};
-</script>
-
-<style>
-</style>

+ 0 - 288
src/views/resource/attach.vue

@@ -1,288 +0,0 @@
-<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-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="primary"
-                   size="small"
-                   plain
-                   v-if="permission.attach_upload"
-                   icon="el-icon-upload2"
-                   @click="handleUpload">上 传
-        </el-button>
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.attach_delete"
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   icon="el-icon-download"
-                   size="small"
-                   v-if="permission.attach_download"
-                   @click="handleDownload(scope.row)">下载
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="attachSize">
-        <el-tag>{{`${row.attachSize} KB`}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="附件管理"
-               append-to-body
-               :visible.sync="attachBox"
-               width="555px">
-      <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-after="uploadAfter">
-      </avue-form>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {getList, getDetail, remove} from "@/api/resource/attach";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        attachBox: false,
-        selectionList: [],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "附件地址",
-              prop: "link",
-              rules: [{
-                required: true,
-                message: "请输入附件地址",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "附件域名",
-              prop: "domain",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入附件域名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "附件名称",
-              prop: "name",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入附件名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "附件原名",
-              prop: "originalName",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入附件原名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "附件拓展名",
-              prop: "extension",
-              rules: [{
-                required: true,
-                message: "请输入附件拓展名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "附件大小",
-              prop: "attachSize",
-              slot: true,
-              rules: [{
-                required: true,
-                message: "请输入附件大小",
-                trigger: "blur"
-              }]
-            },
-          ]
-        },
-        data: [],
-        attachForm: {},
-        attachOption: {
-          submitBtn: false,
-          emptyBtn: false,
-          column: [
-            {
-              label: '附件上传',
-              prop: 'attachFile',
-              type: 'upload',
-              drag: true,
-              loadText: '模板上传中,请稍等',
-              span: 24,
-              propsHttp: {
-                res: 'data'
-              },
-              action: "/api/blade-resource/oss/endpoint/put-file-attach"
-            }
-          ]
-        }
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: false,
-          editBtn: false,
-          viewBtn: false,
-          delBtn: this.vaildData(this.permission.attach_delete, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      handleUpload() {
-        this.attachBox = true;
-      },
-      uploadAfter(res, done, loading, column) {
-        window.console.log(column);
-        this.attachBox = false;
-        this.refreshChange();
-        done();
-      },
-      handleDownload(row) {
-        window.open(`${row.link}`);
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        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();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-</style>

+ 0 - 416
src/views/resource/oss.vue

@@ -1,416 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               :page.sync="page"
-               :permission="permissionList"
-               v-model="form"
-               ref="crud"
-               @row-update="rowUpdate"
-               @row-save="rowSave"
-               @row-del="rowDel"
-               :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.oss_delete"
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   icon="el-icon-video-play"
-                   size="small"
-                   v-if="userInfo.role_name.includes('admin')"
-                   @click="handleDebug(scope.row)">调试
-        </el-button>
-        <el-button type="text"
-                   icon="el-icon-circle-check"
-                   size="small"
-                   v-if="permission.oss_enable"
-                   @click.stop="handleEnable(scope.row)">启用
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="status">
-        <el-tag>{{row.statusName}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="category">
-        <el-tag>{{row.categoryName}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="对象存储上传调试"
-               append-to-body
-               :visible.sync="box"
-               width="550px">
-      <avue-form ref="form" :option="debugOption" v-model="debugForm" @submit="handleSubmit"/>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {getList, getDetail, add, update, remove, enable} from "@/api/resource/oss";
-  import {mapGetters} from "vuex";
-  import func from "@/util/func";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        query: {},
-        loading: true,
-        box: false,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          menuWidth: 300,
-          labelWidth: 100,
-          dialogWidth: 880,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "分类",
-              type: "radio",
-              value: 1,
-              span: 24,
-              width: 100,
-              searchLabelWidth: 50,
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=oss",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请选择分类",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "资源编号",
-              prop: "ossCode",
-              span: 24,
-              width: 120,
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入资源编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "资源地址",
-              prop: "endpoint",
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请输入资源地址",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "空间名",
-              prop: "bucketName",
-              span: 24,
-              width: 120,
-              rules: [{
-                required: true,
-                message: "请输入空间名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "accessKey",
-              prop: "accessKey",
-              span: 24,
-              search: true,
-              width: 200,
-              overHidden: true,
-              rules: [{
-                required: true,
-                message: "请输入accessKey",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "secretKey",
-              prop: "secretKey",
-              span: 24,
-              width: 200,
-              overHidden: true,
-              rules: [{
-                required: true,
-                message: "请输入secretKey",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "appId",
-              prop: "appId",
-              span: 24,
-              hide: true,
-              display: false,
-            },
-            {
-              label: "region",
-              prop: "region",
-              span: 24,
-              hide: true,
-              display: false,
-            },
-            {
-              label: "是否启用",
-              prop: "status",
-              span: 24,
-              width: 80,
-              align: "center",
-              slot: true,
-              addDisplay: false,
-              editDisplay: false,
-              viewDisplay: false,
-            },
-            {
-              label: "备注",
-              prop: "remark",
-              span: 24,
-              hide: true,
-            },
-          ]
-        },
-        data: [],
-        debugForm: {
-          code: '',
-        },
-        debugOption: {
-          submitText: "提交",
-          column: [
-            {
-              label: "资源编号",
-              prop: "code",
-              disabled: true,
-              span: 24,
-            },
-            {
-              label: "上传背景",
-              prop: "backgroundUrl",
-              type: 'upload',
-              listType: 'picture-img',
-              dataType: 'string',
-              action: '/api/blade-resource/oss/endpoint/put-file',
-              propsHttp: {
-                res: 'data',
-                url: 'link',
-              },
-              span: 24,
-            },
-          ]
-        }
-      };
-    },
-    watch: {
-      'form.category'() {
-        const category = func.toInt(this.form.category);
-        this.$refs.crud.option.column.filter(item => {
-          if (item.prop === "appId") {
-            item.display = category === 4;
-          }
-          if (item.prop === "region") {
-            item.display = category === 4;
-          }
-        });
-      },
-      'debugForm.code'() {
-        const column = this.findObject(this.debugOption.column, "backgroundUrl");
-        column.action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}`;
-      }
-    },
-    computed: {
-      ...mapGetters(["userInfo", "permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.oss_add),
-          viewBtn: this.vaildData(this.permission.oss_view),
-          delBtn: this.vaildData(this.permission.oss_delete),
-          editBtn: this.vaildData(this.permission.oss_edit)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleEnable(row) {
-        this.$confirm("是否确定启用这条配置?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return enable(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      handleDebug(row) {
-        this.box = true;
-        this.debugForm.code = row.ossCode;
-        this.debugForm.backgroundUrl = '';
-      },
-      handleSubmit(form, done) {
-        this.$message({
-          type: "success",
-          message: `获取到图片地址:[${form.backgroundUrl}]`
-        });
-        done();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        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();
-        });
-      }
-    }
-  };
-</script>

+ 0 - 438
src/views/resource/sms.vue

@@ -1,438 +0,0 @@
-<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">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.sms_delete"
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   icon="el-icon-video-play"
-                   size="small"
-                   v-if="userInfo.role_name.includes('admin')"
-                   @click="handleDebug(scope.row)">调试
-        </el-button>
-        <el-button type="text"
-                   icon="el-icon-circle-check"
-                   size="small"
-                   v-if="permission.sms_enable"
-                   @click.stop="handleEnable(scope.row)">启用
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="status">
-        <el-tag>{{row.statusName}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="category">
-        <el-tag>{{row.categoryName}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="手机短信发送调试"
-               append-to-body
-               :visible.sync="box"
-               width="550px">
-      <avue-form :option="debugOption" v-model="debugForm" @submit="handleSend"/>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {getList, getDetail, add, update, remove, enable, send} from "@/api/resource/sms";
-  import {mapGetters} from "vuex";
-  import func from "@/util/func";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        query: {},
-        loading: true,
-        box: false,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          menuWidth: 300,
-          labelWidth: 100,
-          dialogWidth: 880,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "分类",
-              type: "radio",
-              value: 1,
-              span: 24,
-              width: 100,
-              searchLabelWidth: 50,
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=sms",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请选择分类",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "资源编号",
-              prop: "smsCode",
-              span: 24,
-              width: 200,
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入资源编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "模版ID",
-              prop: "templateId",
-              span: 24,
-              width: 200,
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入模版ID",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "accessKey",
-              prop: "accessKey",
-              span: 24,
-              overHidden: true,
-              rules: [{
-                required: true,
-                message: "请输入accessKey",
-                trigger: "blur"
-              }],
-            },
-            {
-              label: "secretKey",
-              prop: "secretKey",
-              span: 24,
-              overHidden: true,
-              display: true,
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入secretKey",
-                trigger: "blur"
-              }],
-            },
-            {
-              label: "regionId",
-              prop: "regionId",
-              span: 24,
-              value: "cn-hangzhou",
-              hide: true,
-              display: false
-            },
-            {
-              label: "短信签名",
-              prop: "signName",
-              span: 24,
-              width: 200,
-              rules: [{
-                required: true,
-                message: "请输入短信签名",
-                trigger: "blur"
-              }],
-            },
-            {
-              label: "是否启用",
-              prop: "status",
-              span: 24,
-              width: 80,
-              align: "center",
-              slot: true,
-              addDisplay: false,
-              editDisplay: false,
-              viewDisplay: false,
-            },
-            {
-              label: "备注",
-              prop: "remark",
-              span: 24,
-              hide: true
-            },
-          ]
-        },
-        data: [],
-        debugForm: {
-          code: '',
-        },
-        debugOption: {
-          submitText: "发送",
-          column: [
-            {
-              label: "资源编号",
-              prop: "code",
-              disabled: true,
-              span: 24,
-            },
-            {
-              label: "发送手机",
-              prop: "phones",
-              span: 24,
-            },
-            {
-              label: "发送参数",
-              prop: "params",
-              span: 24,
-              placeholder: "例: {'code':2333,'title':'通知标题'}",
-            },
-          ]
-        }
-      };
-    },
-    watch: {
-      'form.category'() {
-        const category = func.toInt(this.form.category);
-        this.$refs.crud.option.column.filter(item => {
-          if (item.prop === "templateId") {
-            if (category === 1) {
-              item.label = "模版内容";
-            } else {
-              item.label = "模版ID";
-            }
-          }
-          if (item.prop === "accessKey") {
-            if (category === 1) {
-              item.label = "apiKey";
-            } else if (category === 4) {
-              item.label = "appId";
-            } else {
-              item.label = "accessKey";
-            }
-          }
-          if (item.prop === "secretKey") {
-            item.display = category !== 1;
-            if (category === 4) {
-              item.label = "appKey";
-            } else {
-              item.label = "secretKey";
-            }
-          }
-          if (item.prop === "regionId") {
-            if (category === 3) {
-              item.display = true;
-              item.value = "cn-hangzhou";
-            } else {
-              item.display = false;
-            }
-          }
-        });
-      }
-    },
-    computed: {
-      ...mapGetters(["userInfo", "permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.sms_add, false),
-          viewBtn: this.vaildData(this.permission.sms_view, false),
-          delBtn: this.vaildData(this.permission.sms_delete, false),
-          editBtn: this.vaildData(this.permission.sms_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleEnable(row) {
-        this.$confirm("是否确定启用这条配置?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return enable(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      handleDebug(row) {
-        this.box = true;
-        this.debugForm.code = row.smsCode;
-      },
-      handleSend(form, done, loading) {
-        send(form.code, form.phones, form.params).then((res) => {
-          this.$message({
-            type: "success",
-            message: "发送成功!"
-          });
-          done();
-          window.console.log(res);
-          this.box = false;
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        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();
-        });
-      }
-    }
-  };
-</script>
-

+ 0 - 430
src/views/system/tenant.vue

@@ -1,430 +0,0 @@
-<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">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   v-if="permission.tenant_delete"
-                   plain
-                   @click="handleDelete">删 除
-        </el-button>
-        <el-button size="small"
-                   plain
-                   v-if="userInfo.role_name.includes('administrator')"
-                   icon="el-icon-setting"
-                   @click="handleSetting">授权配置
-        </el-button>
-        <el-button size="small"
-                   plain
-                   v-if="userInfo.role_name.includes('administrator')"
-                   icon="el-icon-coin"
-                   @click="handleDatasource">数据源配置
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="accountNumber">
-        <el-tag>{{ row.accountNumber > 0 ? row.accountNumber : '不限制' }}</el-tag>
-      </template>
-      <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">
-      <avue-form :option="settingOption" v-model="settingForm" @submit="handleSubmit"/>
-    </el-dialog>
-    <el-dialog title="租户数据源配置"
-               append-to-body
-               :visible.sync="datasourceBox"
-               width="450px">
-      <avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit"/>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-import {getList, getDetail, remove, update, add, setting, datasource} from "@/api/system/tenant";
-import {mapGetters} from "vuex";
-
-export default {
-  data() {
-    return {
-      form: {},
-      selectionList: [],
-      query: {},
-      loading: true,
-      box: false,
-      datasourceBox: false,
-      page: {
-        pageSize: 10,
-        currentPage: 1,
-        total: 0
-      },
-      option: {
-        height: 'auto',
-        calcHeight: 30,
-        tip: false,
-        searchShow: true,
-        searchMenuSpan: 6,
-        border: true,
-        index: true,
-        selection: true,
-        viewBtn: true,
-        dialogWidth: 900,
-        dialogClickModal: false,
-        column: [
-          {
-            label: "租户ID",
-            prop: "tenantId",
-            width: 100,
-            search: true,
-            addDisplay: false,
-            editDisplay: false,
-            span: 24,
-            rules: [{
-              required: true,
-              message: "请输入租户ID",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "租户名称",
-            prop: "tenantName",
-            search: true,
-            width: 180,
-            span: 24,
-            rules: [{
-              required: true,
-              message: "请输入参数名称",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "联系人",
-            prop: "linkman",
-            width: 100,
-            search: true,
-            rules: [{
-              required: true,
-              message: "请输入联系人",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "联系电话",
-            prop: "contactNumber",
-            width: 150,
-          },
-          {
-            label: "联系地址",
-            prop: "address",
-            span: 24,
-            minRows: 2,
-            type: "textarea",
-            hide: true,
-          },
-          {
-            label: "账号额度",
-            prop: "accountNumber",
-            width: 90,
-            slot: true,
-            addDisplay: false,
-            editDisplay: false,
-          },
-          {
-            label: "过期时间",
-            prop: "expireTime",
-            width: 180,
-            slot: true,
-            addDisplay: false,
-            editDisplay: false,
-          },
-          {
-            label: "绑定域名",
-            prop: "domain",
-            span: 24,
-          },
-          {
-            label: "系统背景",
-            prop: "backgroundUrl",
-            type: 'upload',
-            listType: 'picture-img',
-            dataType: 'string',
-            action: '/api/blade-resource/oss/endpoint/put-file',
-            propsHttp: {
-              res: 'data',
-              url: 'link',
-            },
-            hide: true,
-            span: 24,
-          },
-        ]
-      },
-      data: [],
-      settingForm: {},
-      settingOption: {
-        column: [
-          {
-            label: "账号额度",
-            prop: "accountNumber",
-            type: "number",
-            span: 24,
-          },
-          {
-            label: "过期时间",
-            prop: "expireTime",
-            type: "date",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
-            span: 24,
-          },
-        ]
-      },
-      datasourceForm: {},
-      datasourceOption: {
-        column: [
-          {
-            label: "数据源",
-            prop: "datasourceId",
-            search: true,
-            span: 24,
-            type: "select",
-            dicUrl: "/api/blade-develop/datasource/select",
-            props: {
-              label: "name",
-              value: "id"
-            },
-            rules: [{
-              required: true,
-              message: "请选择数据源",
-              trigger: "blur"
-            }]
-          },
-        ]
-      }
-    };
-  },
-  computed: {
-    ...mapGetters(["userInfo", "permission"]),
-    permissionList() {
-      return {
-        addBtn: this.vaildData(this.permission.tenant_add, false),
-        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 = [];
-      this.selectionList.forEach(ele => {
-        ids.push(ele.id);
-      });
-      return ids.join(",");
-    },
-    tenantId() {
-      return this.selectionList[0].tenantId;
-    }
-  },
-  methods: {
-    rowSave(row, done, loading) {
-      add(row).then(() => {
-        this.onLoad(this.page);
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
-        done();
-      }, error => {
-        window.console.log(error);
-        loading();
-      });
-    },
-    rowUpdate(row, index, done, loading) {
-      update(row).then(() => {
-        this.onLoad(this.page);
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
-        done();
-      }, error => {
-        window.console.log(error);
-        loading();
-      });
-    },
-    rowDel(row) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          return remove(row.id);
-        })
-        .then(() => {
-          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;
-          if (!(data.accountNumber > 0)) {
-            data.accountNumber = "不限制";
-          }
-          if (!data.expireTime) {
-            data.expireTime = "不限制";
-          }
-          this.form = data;
-        });
-      }
-      done();
-    },
-    searchReset() {
-      this.query = {};
-      this.onLoad(this.page);
-    },
-    searchChange(params, done) {
-      this.query = params;
-      this.page.currentPage = 1;
-      this.onLoad(this.page, params);
-      done();
-    },
-    selectionChange(list) {
-      this.selectionList = list;
-    },
-    selectionClear() {
-      this.selectionList = [];
-      this.$refs.crud.toggleSelection();
-    },
-    handleDelete() {
-      if (this.selectionList.length === 0) {
-        this.$message.warning("请选择至少一条数据");
-        return;
-      }
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          return remove(this.ids);
-        })
-        .then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.$refs.crud.toggleSelection();
-        });
-    },
-    handleSetting() {
-      if (this.selectionList.length === 0) {
-        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;
-        });
-      } else {
-        this.settingForm.accountNumber = -1;
-        this.settingForm.expireTime = '';
-      }
-      this.box = true;
-    },
-    handleDatasource() {
-      if (this.selectionList.length === 0) {
-        this.$message.warning("请选择至少一条数据");
-        return;
-      }
-      if (this.selectionList.length !== 1) {
-        this.$message.warning("只能选择一条数据");
-        return;
-      }
-      getDetail(this.selectionList[0].id).then(res => {
-        const data = res.data.data;
-        this.datasourceForm.datasourceId = data.datasourceId;
-      });
-      this.datasourceBox = true;
-    },
-    handleSubmit(form, done, loading) {
-      setting(this.ids, form).then(() => {
-        this.onLoad(this.page);
-        this.$message({
-          type: "success",
-          message: "配置成功!"
-        });
-        done();
-        this.box = false;
-      }, error => {
-        window.console.log(error);
-        loading();
-      });
-    },
-    handleDatasourceSubmit(form, done, loading) {
-      datasource(this.tenantId, form.datasourceId).then(() => {
-        this.$message({
-          type: "success",
-          message: "配置成功!"
-        });
-        done();
-        this.datasourceBox = false;
-      }, error => {
-        window.console.log(error);
-        loading();
-      });
-    },
-    currentChange(currentPage) {
-      this.page.currentPage = currentPage;
-    },
-    sizeChange(pageSize) {
-      this.page.pageSize = pageSize;
-    },
-    refreshChange() {
-      this.onLoad(this.page, this.query);
-    },
-    onLoad(page, params = {}) {
-      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();
-      });
-    }
-  }
-};
-</script>
-
-<style>
-</style>

+ 0 - 332
src/views/system/topmenu.vue

@@ -1,332 +0,0 @@
-<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">
-      <template slot="menuLeft">
-        <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"
-                   plain>菜单配置
-        </el-button>
-      </template>
-      <template slot-scope="{row}" slot="source">
-        <div style="text-align:center">
-          <i :class="row.source"></i>
-        </div>
-      </template>
-      <template slot="sort" slot-scope="{row}" >
-        <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-tree :data="menuGrantList"
-               show-checkbox
-               node-key="id"
-               ref="treeMenu"
-               :default-checked-keys="menuTreeObj"
-               :props="props">
-      </el-tree>
-
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="box = false">取 消</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";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        box: false,
-        query: {},
-        loading: true,
-        props: {
-          label: "title",
-          value: "key"
-        },
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        menuGrantList: [],
-        menuTreeObj: [],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "菜单名",
-              prop: "name",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入菜单名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "菜单图标",
-              prop: "source",
-              type: "icon",
-              slot: true,
-              iconList: iconList,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入菜单图标",
-                  trigger: "click"
-                }
-              ]
-            },
-            {
-              label: "菜单编号",
-              prop: "code",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入菜单编号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "菜单排序",
-              prop: "sort",
-              type: "number",
-              slot: true,
-              rules: [{
-                required: true,
-                message: "请输入菜单排序",
-                trigger: "blur"
-              }]
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.topmenu_add, false),
-          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 = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-      idsArray() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids;
-      }
-    },
-    methods: {
-      submit() {
-        const menuList = this.$refs.treeMenu.getCheckedKeys();
-        grant(this.idsArray, menuList).then(() => {
-          this.box = false;
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          this.onLoad(this.page);
-        });
-      },
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      handleMenuSetting() {
-        if (this.selectionList.length !== 1) {
-          this.$message.warning("只能选择一条数据");
-          return;
-        }
-        this.menuTreeObj = [];
-        grantTree()
-          .then(res => {
-            this.menuGrantList = res.data.data.menu;
-            getTopTree(this.ids).then(res => {
-              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;
-          });
-        }
-        done();
-      },
-      sortChange(row) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-        }, error => {
-          window.console.log(error);
-        });
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        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();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 379
src/views/tool/code.vue

@@ -1,379 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :permission="permissionList"
-               :page.sync="page"
-               @row-del="rowDel"
-               @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"
-                   v-if="permission.code_delete"
-                   plain
-                   @click="handleDelete">删 除
-        </el-button>
-        <el-button type="primary"
-                   size="small"
-                   plain
-                   icon="el-icon-refresh"
-                   @click="handleBuild">代码生成
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   icon="el-icon-document-copy"
-                   v-if="permission.code_edit"
-                   class="none-border"
-                   @click.stop="handleCopy(scope.row)">复制
-        </el-button>
-      </template>
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-  import {getList, getCode, build, remove, add, update, copy} from "@/api/tool/code";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionList: [],
-        loading: true,
-        query: {},
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          dialogWidth: 900,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          labelWidth: 120,
-          menuWidth: 250,
-          viewBtn: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "数据源",
-              prop: "datasourceId",
-              search: true,
-              span: 24,
-              type: "select",
-              dicUrl: "/api/blade-develop/datasource/select",
-              props: {
-                label: "name",
-                value: "id"
-              },
-              rules: [{
-                required: true,
-                message: "请选择数据源",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "模块名",
-              prop: "codeName",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入模块名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "服务名",
-              prop: "serviceName",
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入服务名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "表名",
-              prop: "tableName",
-              rules: [{
-                required: true,
-                message: "请输入表名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "表前缀",
-              prop: "tablePrefix",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入表前缀",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "主键名",
-              prop: "pkName",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入主键名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "包名",
-              prop: "packageName",
-              overHidden: true,
-              rules: [{
-                required: true,
-                message: "请输入包名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "基础业务",
-              prop: "baseMode",
-              type: 'radio',
-              dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请选择基础业务",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "包装器",
-              prop: "wrapMode",
-              type: 'radio',
-              dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请选择包装器",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "后端生成路径",
-              prop: "apiPath",
-              span: 24,
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入后端生成路径",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "前端生成路径",
-              prop: "webPath",
-              span: 24,
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入前端生成路径",
-                trigger: "blur"
-              }]
-            }
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.code_add, false),
-          viewBtn: this.vaildData(this.permission.code_view, false),
-          delBtn: this.vaildData(this.permission.code_delete, false),
-          editBtn: this.vaildData(this.permission.code_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      handleBuild() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("是否生成选中模块的代码?", {
-          title: "代码生成确认",
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return build(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      handleCopy(row) {
-        copy(row.id).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "复制成功!"
-          });
-        });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getCode(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        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();
-        });
-      }
-    }
-  };
-</script>

+ 0 - 272
src/views/tool/datasource.vue

@@ -1,272 +0,0 @@
-<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">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.datasource_delete"
-                   @click="handleDelete">删 除
-        </el-button>
-      </template>
-    </avue-crud>
-  </basic-container>
-</template>
-
-<script>
-  import {getList, getDetail, add, update, remove} from "@/api/tool/datasource";
-  import {mapGetters} from "vuex";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          dialogWidth: 900,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "名称",
-              prop: "name",
-              width: 120,
-              rules: [{
-                required: true,
-                message: "请输入数据源名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "驱动类",
-              prop: "driverClass",
-              type: 'select',
-              dicData: [
-                {
-                  label: 'com.mysql.cj.jdbc.Driver',
-                  value: 'com.mysql.cj.jdbc.Driver',
-                }, {
-                  label: 'org.postgresql.Driver',
-                  value: 'org.postgresql.Driver',
-                }, {
-                  label: 'oracle.jdbc.OracleDriver',
-                  value: 'oracle.jdbc.OracleDriver',
-                }
-              ],
-              width: 200,
-              rules: [{
-                required: true,
-                message: "请输入驱动类",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "用户名",
-              prop: "username",
-              width: 120,
-              rules: [{
-                required: true,
-                message: "请输入用户名",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "密码",
-              prop: "password",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入密码",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "连接地址",
-              prop: "url",
-              span: 24,
-              rules: [{
-                required: true,
-                message: "请输入连接地址",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "备注",
-              prop: "remark",
-              span: 24,
-              minRows: 3,
-              hide: true,
-              type: "textarea"
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.datasource_add, false),
-          viewBtn: this.vaildData(this.permission.datasource_view, false),
-          delBtn: this.vaildData(this.permission.datasource_delete, false),
-          editBtn: this.vaildData(this.permission.datasource_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
-    },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        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();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-</style>

+ 0 - 156
src/views/wel/dashboard.vue

@@ -1,156 +0,0 @@
-<template>
-  <basic-container>
-    <div class="wel">
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-platform-eleme"
-                   text="开始菜单1"
-                   time="1"
-                   background="/img/bg/bg3.jpg"
-                   color="#d56259"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-eleme"
-                   text="开始菜单2"
-                   time="2"
-                   background="/img/bg/bg2.jpg"
-                   color="#419ce7"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-delete-solid"
-                   text="开始菜单3"
-                   time="3"
-                   color="#56b69b"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-delete"
-                   text="开始菜单4"
-                   time="4"
-                   color="#d44858"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-tools"
-                   text="开始菜单5"
-                   time="5"
-                   color="#3a1f7e"></basic-block>
-      <basic-block :width="410"
-                   :height="height"
-                   icon="el-icon-setting"
-                   text="开始菜单6"
-                   time="6"
-                   background="/img/bg/bg1.jpg"
-                   dept="这是一段很长的很长很长很长的描述这是一段很长的很长很长很长的描述"
-                   color="#422829"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-user-solid"
-                   text="开始菜单7"
-                   time="7"
-                   color="#613cbd"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-star-off"
-                   text="开始菜单8"
-                   time="8"
-                   color="#da542e"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-goods"
-                   text="开始菜单9"
-                   time="9"
-                   color="#2e8aef"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-circle-check"
-                   text="开始菜单10"
-                   time="10"
-                   color="#3d17b8"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-platform"
-                   text="开始菜单11"
-                   time="11"
-                   color="#e31462"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-fold"
-                   text="开始菜单12"
-                   time="12"
-                   color="#d9532d"></basic-block>
-      <basic-block :width="410"
-                   :height="height"
-                   icon="el-icon-s-open"
-                   text="开始菜单13"
-                   time="13"
-                   dept="这是一段很长的很长很长很长的描述这是一段很长的很长很长很长的描述"
-                   color="#b72147"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-flag"
-                   text="开始菜单14"
-                   time="14"
-                   color="#01a100"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-data"
-                   text="开始菜单15"
-                   time="15"
-                   color="#0c56bf"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-grid"
-                   text="开始菜单16"
-                   time="16"
-                   color="#0098a9"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-release"
-                   text="开始菜单17"
-                   time="17"
-                   background="/img/bg/bg2.jpg"
-                   color="#209bdf"></basic-block>
-      <basic-block :width="width"
-                   :height="height"
-                   icon="el-icon-s-home"
-                   text="开始菜单18"
-                   time="18"
-                   background="/img/bg/bg3.jpg"
-                   color="#603bbc"></basic-block>
-      <basic-block :width="515"
-                   :height="height"
-                   icon="el-icon-s-promotion"
-                   text="开始菜单19"
-                   time="19"
-                   dept="这是一段很长的很长很长很长的描述这是一段很长的很长很长很长的描述"
-                   color="#009bad"></basic-block>
-      <basic-block :width="515"
-                   :height="height"
-                   icon="el-icon-s-custom"
-                   text="开始菜单20"
-                   time="20"
-                   background="/img/bg/bg4.jpg"
-                   dept="这是一段很长的很长很长很长的描述这是一段很长的很长很长很长的描述"
-                   color="#d74e2a"></basic-block>
-    </div>
-  </basic-container>
-</template>
-
-<script>
-  export default {
-    data() {
-      return {
-        width: 200,
-        height: 120,
-      }
-    }
-  }
-</script>
-
-<style lang="scss">
-  .wel {
-    display: flex;
-    flex-wrap: wrap;
-    width: 1100px;
-    margin: 0 auto;
-  }
-</style>

+ 0 - 231
src/views/work/claim.vue

@@ -1,231 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_claim_sign"
-                   plain
-                   class="none-border"
-                   @click.stop="handleClaim(scope.row)">签收
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_claim_detail"
-                   plain
-                   class="none-border"
-                   @click.stop="handleDetail(scope.row)">详情
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_claim_follow"
-                   plain
-                   class="none-border"
-                   @click.stop="handleImage(scope.row,scope.index)">跟踪
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="processDefinitionVersion">
-        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {claimList, claimTask} from "@/api/work/work";
-  import {flowCategory, flowRoute} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        flowBox: false,
-        flowUrl: '',
-        workBox: false,
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          simplePage: true,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              hide: true,
-              width: 100,
-            },
-            {
-              label: '流程名称',
-              prop: 'processDefinitionName',
-              search: true,
-            },
-            {
-              label: '当前步骤',
-              prop: 'taskName',
-            },
-            {
-              label: '流程版本',
-              prop: 'processDefinitionVersion',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '申请时间',
-              prop: 'createTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission", "flowRoutes"]),
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleClaim(row) {
-        this.$confirm("确定签收此任务?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return claimTask(row.taskId);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDetail(row) {
-        this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
-      },
-      handleImage(row) {
-        this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
-        this.flowBox = true;
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const query = {
-          ...this.query,
-          category: (params.category) ? flowCategory(params.category) : null
-        };
-        this.loading = true;
-        claimList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 207
src/views/work/done.vue

@@ -1,207 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :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-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_done_detail"
-                   plain
-                   class="none-border"
-                   @click.stop="handleDetail(scope.row)">详情
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_done_follow"
-                   plain
-                   class="none-border"
-                   @click.stop="handleImage(scope.row,scope.index)">跟踪
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="processDefinitionVersion">
-        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {doneList} from "@/api/work/work";
-  import {flowCategory, flowRoute} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        flowBox: false,
-        flowUrl: '',
-        workBox: false,
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              hide: true,
-              width: 100,
-            },
-            {
-              label: '流程名称',
-              prop: 'processDefinitionName',
-              search: true,
-            },
-            {
-              label: '当前步骤',
-              prop: 'taskName',
-            },
-            {
-              label: '流程版本',
-              prop: 'processDefinitionVersion',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '申请时间',
-              prop: 'createTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission", "flowRoutes"]),
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDetail(row) {
-        this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
-      },
-      handleImage(row) {
-        this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
-        this.flowBox = true;
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const query = {
-          ...this.query,
-          category: (params.category) ? flowCategory(params.category) : null
-        };
-        this.loading = true;
-        doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 108
src/views/work/process/leave/detail.vue

@@ -1,108 +0,0 @@
-<template>
-  <basic-container>
-    <el-form ref="form" :model="form" label-width="80px">
-      <el-row type="flex" class="row-bg" justify="end">
-        <el-form-item>
-          <el-button @click="handleCancel">关闭</el-button>
-        </el-form-item>
-      </el-row>
-      <el-card shadow="hover">
-        <div slot="header">
-          <span>审批信息</span>
-        </div>
-        <el-form-item label="申请人">
-          <el-input :disabled="true" v-model="form.flow.assigneeName" />
-        </el-form-item>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="开始时间">
-              <el-input :disabled="true" v-model="form.startTime" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="结束时间">
-              <el-input :disabled="true" v-model="form.endTime" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-form-item label="请假理由">
-          <el-input :disabled="true" type="textarea" v-model="form.reason" />
-        </el-form-item>
-      </el-card>
-      <el-card shadow="hover">
-        <div slot="header">
-          <span>流程信息</span>
-        </div>
-        <el-row type="flex" class="row-bg">
-          <el-timeline>
-            <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
-              <el-card shadow="hover">
-                <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
-                <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
-                <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
-                <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
-              </el-card>
-            </el-timeline-item>
-          </el-timeline>
-        </el-row>
-      </el-card>
-      <el-card shadow="hover">
-        <div slot="header">
-          <span>流程跟踪</span>
-        </div>
-        <el-row type="flex" class="row-bg">
-          <img :src="src" alt="design">
-        </el-row>
-      </el-card>
-    </el-form>
-  </basic-container>
-</template>
-
-<script>
-  import {historyFlowList, leaveDetail} from "@/api/work/process";
-
-  export default {
-    data() {
-      return {
-        businessId: '',
-        processInstanceId: '',
-        src: '',
-        flowList: [],
-        form: {
-          flow:{
-            assigneeName:'',
-          },
-          startTime: '',
-          endTime: '',
-          reason: '',
-        }
-      }
-    },
-    created() {
-      this.init();
-    },
-    methods: {
-      init() {
-        this.processInstanceId = this.$route.params.processInstanceId;
-        this.businessId = this.$route.params.businessId;
-        this.src = `/api/blade-flow/process/diagram-view?processInstanceId=${this.$route.params.processInstanceId}&t=${new Date().getTime()}`;
-        historyFlowList(this.processInstanceId).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.flowList = data.data;
-          }
-        })
-        leaveDetail(this.businessId).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.form = data.data;
-          }
-        })
-      },
-      handleCancel() {
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({path: `/work/start`});
-      }
-    }
-  }
-</script>

+ 0 - 103
src/views/work/process/leave/form.vue

@@ -1,103 +0,0 @@
-<template>
-  <basic-container>
-    <avue-form :option="option" v-model="form" @submit="handleSubmit"/>
-  </basic-container>
-</template>
-
-<script>
-  import {leaveProcess} from "@/api/work/process";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        option: {
-          group: [
-            {
-              icon: 'el-icon-info',
-              label: '请假基础信息',
-              prop: 'group1',
-              column: [
-                {
-                  label: '审批人员',
-                  prop: 'taskUser',
-                  type: 'select',
-                  dicUrl: `/api/blade-user/user-list`,
-                  props: {
-                    label: "account",
-                    value: "id"
-                  },
-                  span: 24,
-                  rules: [
-                    {
-                      required: true,
-                      message: '请选择审批人员',
-                      trigger: 'blur'
-                    }
-                  ]
-                },
-                {
-                  label: '开始时间',
-                  prop: 'startTime',
-                  type: 'datetime',
-                  valueFormat: 'yyyy-MM-dd HH:mm:ss',
-                  rules: [
-                    {
-                      required: true,
-                      message: '请选择开始时间',
-                      trigger: 'blur'
-                    }
-                  ]
-                },
-                {
-                  label: '结束时间',
-                  prop: 'endTime',
-                  type: 'datetime',
-                  valueFormat: 'yyyy-MM-dd HH:mm:ss',
-                  rules: [
-                    {
-                      required: true,
-                      message: '请选择结束时间',
-                      trigger: 'blur'
-                    }
-                  ]
-                },
-                {
-                  label: '请假理由',
-                  prop: 'reason',
-                  type: 'textarea',
-                  span: 24,
-                  rules: [
-                    {
-                      required: true,
-                      message: '请输入请假理由',
-                      trigger: 'blur'
-                    }
-                  ]
-                },
-              ]
-            },
-          ],
-        }
-      }
-    },
-    methods: {
-      handleSubmit() {
-        const params = {
-          processDefinitionId: this.$route.params.processDefinitionId,
-          ...this.form,
-        };
-        leaveProcess(params).then(resp => {
-          const data = resp.data;
-          if (data.success) {
-            this.$message.success(data.msg);
-            this.$router.$avueRouter.closeTag();
-            this.$router.push({path: `/work/start`});
-          } else {
-            this.$message.error(data.msg || '提交失败');
-          }
-        });
-      }
-    }
-  }
-</script>

+ 0 - 170
src/views/work/process/leave/handle.vue

@@ -1,170 +0,0 @@
-<template>
-  <basic-container>
-    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-      <el-row type="flex" class="row-bg" justify="end">
-        <el-form-item>
-          <el-button type="primary" @click="handleAgree">同意</el-button>
-          <el-button type="danger" @click="handleDisagree">驳回</el-button>
-          <el-button @click="handleCancel">关闭</el-button>
-        </el-form-item>
-      </el-row>
-      <el-card shadow="hover">
-        <div slot="header">
-          <span>审批信息</span>
-        </div>
-        <el-form-item label="申请人">
-          <el-input :disabled="true" v-model="form.flow.assigneeName"/>
-        </el-form-item>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="开始时间">
-              <el-input :disabled="true" v-model="form.startTime"/>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="结束时间">
-              <el-input :disabled="true" v-model="form.endTime"/>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-form-item label="请假理由">
-          <el-input :disabled="true" type="textarea" v-model="form.reason"/>
-        </el-form-item>
-        <el-form-item label="批复意见">
-          <el-input type="textarea" v-model="form.comment"/>
-        </el-form-item>
-      </el-card>
-      <el-card shadow="hover">
-        <div slot="header">
-          <span>流程信息</span>
-        </div>
-        <el-row type="flex" class="row-bg">
-          <el-timeline>
-            <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
-              <el-card shadow="hover">
-                <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
-                <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
-                <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
-                <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
-              </el-card>
-            </el-timeline-item>
-          </el-timeline>
-        </el-row>
-      </el-card>
-      <el-card shadow="hover">
-        <div slot="header">
-          <span>流程跟踪</span>
-        </div>
-        <el-row type="flex" class="row-bg">
-          <img :src="src" alt="design">
-        </el-row>
-      </el-card>
-    </el-form>
-  </basic-container>
-</template>
-
-<script>
-  import {historyFlowList, leaveDetail} from "@/api/work/process";
-  import {completeTask} from "@/api/work/work";
-
-  export default {
-    data() {
-      return {
-        taskId: '',
-        businessId: '',
-        processInstanceId: '',
-        src: '',
-        flowList: [],
-        form: {
-          flow: {
-            assigneeName: '',
-          },
-          startTime: '',
-          endTime: '',
-          reason: '',
-          comment: '',
-        },
-      }
-    },
-    created() {
-      this.init();
-    },
-    beforeRouteUpdate(to, from, next) {
-      // 在当前路由改变,但是该组件被复用时调用
-      // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
-      // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
-      // 可以访问组件实例 `this`
-      if (to.fullPath !== from.fullPath) {
-        next();
-        this.init();
-      }
-    },
-    methods: {
-      init() {
-        this.taskId = this.$route.params.taskId;
-        this.processInstanceId = this.$route.params.processInstanceId;
-        this.businessId = this.$route.params.businessId;
-        this.src = `/api/blade-flow/process/diagram-view?processInstanceId=${this.$route.params.processInstanceId}&t=${new Date().getTime()}`;
-        historyFlowList(this.processInstanceId).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.flowList = data.data;
-          }
-        })
-        leaveDetail(this.businessId).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.form = data.data;
-          }
-        })
-      },
-      handleAgree() {
-        if (!this.form.comment) {
-          this.$message.warning('请先填写批复意见');
-          return;
-        }
-        const params = {
-          taskId: this.taskId,
-          processInstanceId: this.processInstanceId,
-          flag: 'ok',
-          comment: this.form.comment,
-        };
-        completeTask(params).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.$message.success(data.msg);
-            this.$router.$avueRouter.closeTag();
-            this.$router.push({path: `/work/start`});
-          } else {
-            this.$message.error(data.msg || '提交失败');
-          }
-        })
-      },
-      handleDisagree() {
-        if (!this.form.comment) {
-          this.$message.warning('请先填写批复意见');
-          return;
-        }
-        const params = {
-          taskId: this.taskId,
-          processInstanceId: this.processInstanceId,
-          comment: this.form.comment,
-        };
-        completeTask(params).then(res => {
-          const data = res.data;
-          if (data.success) {
-            this.$message.success(data.msg);
-            this.$router.$avueRouter.closeTag();
-            this.$router.push({path: `/work/start`});
-          } else {
-            this.$message.error(data.msg || '提交失败');
-          }
-        })
-      },
-      handleCancel() {
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({path: `/work/start`});
-      }
-    }
-  }
-</script>

+ 0 - 217
src/views/work/send.vue

@@ -1,217 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :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-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_send_detail"
-                   plain
-                   class="none-border"
-                   @click.stop="handleDetail(scope.row)">详情
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_send_follow"
-                   plain
-                   class="none-border"
-                   @click.stop="handleImage(scope.row,scope.index)">跟踪
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="processDefinitionVersion">
-        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="processIsFinished">
-        <el-tag>{{row.processIsFinished==='finished' ? '已完成' : '未完成'}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {sendList} from "@/api/work/work";
-  import {flowCategory,flowRoute} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        flowBox: false,
-        flowUrl: '',
-        workBox: false,
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              hide: true,
-              width: 100,
-            },
-            {
-              label: '流程名称',
-              prop: 'processDefinitionName',
-              search: true,
-            },
-            {
-              label: '当前步骤',
-              prop: 'taskName',
-            },
-            {
-              label: '流程版本',
-              prop: 'processDefinitionVersion',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '流程进度',
-              prop: 'processIsFinished',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '申请时间',
-              prop: 'createTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission", "flowRoutes"]),
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleDetail(row) {
-        this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
-      },
-      handleImage(row) {
-        this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
-        this.flowBox = true;
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const query = {
-          ...this.query,
-          category: (params.category) ? flowCategory(params.category) : null
-        };
-        this.loading = true;
-        sendList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 243
src/views/work/start.vue

@@ -1,243 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               :page.sync="page"
-               v-model="form"
-               ref="crud"
-               @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-radio-group v-model="mode" size="small">
-          <el-radio-button label="1">通用流程</el-radio-button>
-          <el-radio-button label="2">定制流程</el-radio-button>
-        </el-radio-group>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_start_flow"
-                   plain
-                   class="none-border"
-                   @click.stop="handleStart(scope.row)">发起
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_start_image"
-                   plain
-                   class="none-border"
-                   @click.stop="handleImage(scope.row,scope.index)">流程图
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="tenantId">
-        <el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="version">
-        <el-tag>v{{row.version}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="suspensionState">
-        <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
-      </template>
-      <template slot-scope="{row}"
-                slot="category">
-        <el-tag>{{row.categoryName}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {startList} from "@/api/work/work";
-  import {flowCategory, flowRoute} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        mode: '1',
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        flowBox: false,
-        flowUrl: '',
-        workBox: false,
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          menuWidth: 150,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [
-            {
-              label: '租户编号',
-              prop: 'tenantId',
-              slot: true,
-              width: 120,
-            },
-            {
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              width: 100,
-            },
-            {
-              label: '流程标识',
-              prop: 'key',
-            },
-            {
-              label: '流程名称',
-              prop: 'name',
-              search: true,
-            },
-            {
-              label: '流程版本',
-              prop: 'version',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '状态',
-              prop: 'suspensionState',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '部署时间',
-              prop: 'deploymentTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    watch: {
-      'mode'() {
-        this.onLoad(this.page);
-      }
-    },
-    computed: {
-      ...mapGetters(["permission", "flowRoutes"]),
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleStart(row) {
-        this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`});
-      },
-      handleImage(row) {
-        this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
-        this.flowBox = true;
-      },
-      currentChange(currentPage) {
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize) {
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const query = {
-          ...this.query,
-          category: (params.category) ? flowCategory(params.category) : null,
-          mode: this.mode
-        };
-        this.loading = true;
-        startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>

+ 0 - 217
src/views/work/todo.vue

@@ -1,217 +0,0 @@
-<template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-      <template slot-scope="scope" slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_todo_handle"
-                   plain
-                   class="none-border"
-                   @click.stop="handleWork(scope.row)">处理
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_todo_detail"
-                   plain
-                   class="none-border"
-                   @click.stop="handleDetail(scope.row)">详情
-        </el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="permission.work_todo_follow"
-                   plain
-                   class="none-border"
-                   @click.stop="handleImage(scope.row,scope.index)">跟踪
-        </el-button>
-      </template>
-      <template slot-scope="{row}"
-                slot="processDefinitionVersion">
-        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
-      </template>
-    </avue-crud>
-    <el-dialog title="流程图"
-               append-to-body
-               :visible.sync="flowBox"
-               :fullscreen="true">
-      <iframe
-        :src=flowUrl
-        width="100%"
-        height="700"
-        title="流程图"
-        frameBorder="no"
-        border="0"
-        marginWidth="0"
-        marginHeight="0"
-        scrolling="no"
-        allowTransparency="yes">
-      </iframe>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="flowBox = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-  </basic-container>
-</template>
-
-<script>
-  import {mapGetters} from "vuex";
-  import {todoList} from "@/api/work/work";
-  import {flowCategory,flowRoute} from "@/util/flow";
-
-  export default {
-    data() {
-      return {
-        form: {},
-        selectionId: '',
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        flowBox: false,
-        flowUrl: '',
-        workBox: false,
-        option: {
-          height: 'auto',
-          calcHeight: 30,
-          tip: false,
-          simplePage: true,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          selection: true,
-          editBtn: false,
-          addBtn: false,
-          viewBtn: false,
-          delBtn: false,
-          dialogWidth: 900,
-          menuWidth: 150,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "流程分类",
-              type: "select",
-              row: true,
-              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              slot: true,
-              prop: "category",
-              search: true,
-              hide: true,
-              width: 100,
-            },
-            {
-              label: '流程名称',
-              prop: 'processDefinitionName',
-              search: true,
-            },
-            {
-              label: '当前步骤',
-              prop: 'taskName',
-            },
-            {
-              label: '流程版本',
-              prop: 'processDefinitionVersion',
-              slot: true,
-              width: 80,
-            },
-            {
-              label: '申请时间',
-              prop: 'createTime',
-              width: 165,
-            },
-          ]
-        },
-        data: []
-      };
-    },
-    computed: {
-      ...mapGetters(["permission", "flowRoutes"]),
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      },
-    },
-    methods: {
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      handleWork(row) {
-        this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` });
-      },
-      handleDetail(row) {
-        this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
-      },
-      handleImage(row) {
-        this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
-        this.flowBox = true;
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const query = {
-          ...this.query,
-          category: (params.category) ? flowCategory(params.category) : null
-        };
-        this.loading = true;
-        todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      }
-    }
-  };
-</script>
-
-<style>
-  .none-border {
-    border: 0;
-    background-color: transparent !important;
-  }
-</style>