升级avue2.3.4,部门、菜单树列表改为懒加载

dev
smallchill 6 years ago
parent f1703bc968
commit 4679f3c7eb
  1. 2
      package.json
  2. 8
      public/cdn/avue/2.2.3/avue.min.js
  3. 1
      public/cdn/avue/2.2.3/index.css
  4. 8
      public/cdn/avue/2.3.4/avue.min.js
  5. 1
      public/cdn/avue/2.3.4/index.css
  6. 4
      public/index.html
  7. 12
      src/api/system/dept.js
  8. 12
      src/api/system/menu.js
  9. 10
      src/const/system/dict.js
  10. 14
      src/const/system/dictbiz.js
  11. 10
      src/util/func.js
  12. 5
      src/views/authority/apiscope.vue
  13. 9
      src/views/authority/datascope.vue
  14. 4
      src/views/authority/role.vue
  15. 5
      src/views/desk/notice.vue
  16. 5
      src/views/flow/follow.vue
  17. 4
      src/views/flow/manager.vue
  18. 4
      src/views/flow/model.vue
  19. 4
      src/views/monitor/log/api.vue
  20. 4
      src/views/monitor/log/error.vue
  21. 4
      src/views/monitor/log/usual.vue
  22. 5
      src/views/resource/oss.vue
  23. 13
      src/views/system/client.vue
  24. 42
      src/views/system/dept.vue
  25. 14
      src/views/system/dict.vue
  26. 14
      src/views/system/dictbiz.vue
  27. 26
      src/views/system/menu.vue
  28. 5
      src/views/system/param.vue
  29. 4
      src/views/system/tenant.vue
  30. 4
      src/views/system/topmenu.vue
  31. 5
      src/views/system/user.vue
  32. 5
      src/views/tool/code.vue
  33. 5
      src/views/tool/datasource.vue
  34. 12
      src/views/util/demo/dict-classic.vue
  35. 5
      src/views/util/demo/dict-horizontal.vue
  36. 5
      src/views/util/demo/dict-vertical.vue
  37. 4
      src/views/work/claim.vue
  38. 4
      src/views/work/done.vue
  39. 4
      src/views/work/send.vue
  40. 4
      src/views/work/start.vue
  41. 4
      src/views/work/todo.vue

@ -1,6 +1,6 @@
{
"name": "saber-admin",
"version": "2.2.2",
"version": "2.3.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -12,7 +12,7 @@
<link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.12.0/theme-chalk/index.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.2.3/index.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.3.4/index.css">
<script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
<script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.png">
@ -105,7 +105,7 @@
<script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script>
<script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script>
<script src="<%= BASE_URL %>cdn/element-ui/2.12.0/index.js" charset="utf-8"></script>
<script src="<%= BASE_URL %>cdn/avue/2.2.3/avue.min.js" charset="utf-8"></script>
<script src="<%= BASE_URL %>cdn/avue/2.3.4/avue.min.js" charset="utf-8"></script>
</body>
</html>

@ -11,6 +11,18 @@ export const getList = (current, size, params) => {
}
})
}
export const getLazyList = (parentId, params) => {
return request({
url: '/api/blade-system/dept/lazy-list',
method: 'get',
params: {
...params,
parentId
}
})
}
export const remove = (ids) => {
return request({
url: '/api/blade-system/dept/remove',

@ -12,6 +12,18 @@ export const getList = (current, size, params) => {
})
}
export const getLazyList = (parentId, params) => {
return request({
url: '/api/blade-system/menu/lazy-list',
method: 'get',
params: {
...params,
parentId
}
})
}
export const getMenuList = (current, size, params) => {
return request({
url: '/api/blade-system/menu/menu-list',

@ -1,13 +1,12 @@
export const optionParent = {
height: 'auto',
calcHeight: 365,
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
searchShow: false,
menuWidth: 150,
dialogWidth: 880,
dialogHeight: 320,
@ -69,7 +68,7 @@ export const optionParent = {
value: 1
}
],
valueDefault: 0,
value: 0,
slot: true,
rules: [
{
@ -89,14 +88,13 @@ export const optionParent = {
export const optionChild = {
height: 'auto',
calcHeight: 365,
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
searchShow: false,
menuWidth: 150,
dialogWidth: 880,
dialogHeight: 320,
@ -190,7 +188,7 @@ export const optionChild = {
value: 1
}
],
valueDefault: 0,
value: 0,
slot: true,
rules: [
{

@ -1,13 +1,12 @@
export const optionParent = {
height: 'auto',
calcHeight: 365,
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
searchShow: false,
menuWidth: 150,
dialogWidth: 880,
dialogHeight: 320,
@ -56,7 +55,7 @@ export const optionParent = {
{
label: "封存",
prop: "isSealed",
type: "select",
type: "switch",
align: "center",
width: 80,
dicData: [
@ -69,7 +68,7 @@ export const optionParent = {
value: 1
}
],
valueDefault: 0,
value: 0,
slot: true,
rules: [
{
@ -89,14 +88,13 @@ export const optionParent = {
export const optionChild = {
height: 'auto',
calcHeight: 365,
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
searchShow: false,
menuWidth: 150,
dialogWidth: 880,
dialogHeight: 320,
@ -177,7 +175,7 @@ export const optionChild = {
{
label: "封存",
prop: "isSealed",
type: "select",
type: "switch",
align: "center",
width: 80,
dicData: [
@ -190,7 +188,7 @@ export const optionChild = {
value: 1
}
],
valueDefault: 0,
value: 0,
slot: true,
rules: [
{

@ -1,4 +1,3 @@
/**
* 通用工具类
*/
@ -12,6 +11,15 @@ export default class func {
return !this.isEmpty(val);
}
/**
* 是否为定义
* @param val
* @returns {boolean}
*/
static isUndefined(val) {
return val === null || typeof val === 'undefined';
}
/**
* 为空
* @param val

@ -108,6 +108,7 @@
menu: true,
option: {
tip: false,
searchShow: false,
dialogWidth: "60%",
tree: true,
border: true,
@ -296,6 +297,7 @@
},
optionScope: {
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -439,10 +441,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -111,6 +111,7 @@
watchMode: true,
option: {
tip: false,
searchShow: false,
dialogWidth: "60%",
tree: true,
border: true,
@ -299,6 +300,7 @@
},
optionScope: {
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -311,7 +313,7 @@
label: "权限名称",
prop: "scopeName",
search: true,
valueDefault: "",
value: "",
rules: [{
required: true,
message: "请输入数据权限名称",
@ -362,7 +364,7 @@
prop: "scopeField",
span: 24,
hide: true,
valueDefault: "*",
value: "*",
rules: [{
required: true,
message: "请输入数据权限可见的字段",
@ -516,10 +518,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -106,6 +106,7 @@
},
option: {
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
@ -285,10 +286,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -57,10 +57,10 @@
selectionList: [],
option: {
height: 'auto',
calcHeight: 350,
dialogWidth: 900,
dialogHeight: 530,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -212,10 +212,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -64,8 +64,8 @@
deleteReason: '',
option: {
height: 'auto',
calcHeight: 350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -157,10 +157,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -141,6 +141,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -230,10 +231,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -144,6 +144,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -207,10 +208,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -38,6 +38,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -116,10 +117,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {

@ -38,6 +38,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -122,10 +123,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {

@ -38,6 +38,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -114,10 +115,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {

@ -67,8 +67,8 @@
selectionList: [],
option: {
height: 'auto',
calcHeight: 350,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -231,10 +231,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -49,8 +49,8 @@
selectionList: [],
option: {
height: 'auto',
calcHeight: 350,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -79,7 +79,7 @@
{
label: "授权类型",
prop: "authorizedGrantTypes",
valueDefault: "refresh_token,password,authorization_code",
value: "refresh_token,password,authorization_code",
rules: [{
required: true,
message: "请输入授权类型",
@ -89,7 +89,7 @@
{
label: "授权范围",
prop: "scope",
valueDefault: "all",
value: "all",
rules: [{
required: true,
message: "请输入授权范围",
@ -100,7 +100,7 @@
label: "令牌秒数",
prop: "accessTokenValidity",
type: "number",
valueDefault: 3600,
value: 3600,
rules: [{
required: true,
message: "请输入令牌过期秒数",
@ -111,7 +111,7 @@
label: "刷新秒数",
prop: "refreshTokenValidity",
type: "number",
valueDefault: 604800,
value: 604800,
hide: true,
rules: [{
required: true,
@ -237,10 +237,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -17,7 +17,8 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
@on-load="onLoad"
@tree-load="treeLoad">
<template slot="menuLeft">
<el-button type="danger"
size="small"
@ -46,7 +47,7 @@
<script>
import {
getList,
getLazyList,
remove,
update,
add,
@ -63,13 +64,16 @@
selectionList: [],
query: {},
loading: true,
parentId: 0,
page: {
pageSize: 10,
currentPage: 1,
total: 0
total: 0,
},
option: {
lazy: true,
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
@ -196,12 +200,22 @@
return ids.join(",");
}
},
created() {
this.initData();
},
methods: {
initData() {
getDeptTree().then(res => {
const data = res.data.data;
const index = this.$refs.crud.findColumnIndex("parentId");
this.option.column[index].dicData = data;
});
},
handleAdd(row) {
this.$refs.crud.value.parentId = row.id;
this.$refs.crud.option.column.filter(item => {
if (item.prop === "parentId") {
item.valueDefault = row.id;
item.value = row.id;
item.addDisabled = true;
}
});
@ -274,12 +288,15 @@
},
searchReset() {
this.query = {};
this.parentId = 0;
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.parentId = '';
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
@ -301,7 +318,7 @@
this.$refs.crud.value.addDisabled = false;
this.$refs.crud.option.column.filter(item => {
if (item.prop === "parentId") {
item.valueDefault = "";
item.value = "";
item.addDisabled = false;
}
});
@ -318,16 +335,17 @@
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
this.data = res.data.data;
getDeptTree().then(res => {
const data = res.data.data;
const index = this.$refs.crud.findColumnIndex("parentId");
this.option.column[index].dicData = data;
});
this.loading = false;
this.selectionClear();
});
},
treeLoad(tree, treeNode, resolve) {
const parentId = tree.id;
getLazyList(parentId).then(res => {
resolve(res.data.data);
});
}
}
};

@ -56,7 +56,7 @@
<div class="clearfix">
<avue-crud
:option="optionChild"
:table-loading="loading"
:table-loading="loadingChild"
:data="dataChild"
:page="pageChild"
ref="crudChild"
@ -119,6 +119,7 @@
selectionList: [],
query: {},
loading: true,
loadingChild: true,
pageParent: {
pageSize: 10,
pageSizes: [10, 30, 50, 100, 200],
@ -216,10 +217,10 @@
this.$refs.crudChild.value.parentId = row.id;
this.$refs.crudChild.option.column.filter(item => {
if (item.prop === "code") {
item.valueDefault = row.code;
item.value = row.code;
}
if (item.prop === "parentId") {
item.valueDefault = row.id;
item.value = row.id;
}
});
this.onLoadChild(this.pageChild);
@ -228,10 +229,11 @@
this.query = {};
this.onLoadParent(this.pageParent);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.pageParent.currentPage = 1;
this.onLoadParent(this.pageParent, params);
done();
},
selectionChange(list) {
this.selectionList = list;
@ -398,7 +400,7 @@
});
},
onLoadChild(page, params = {}) {
this.loading = true;
this.loadingChild = true;
getChildList(
page.currentPage,
page.pageSize,
@ -408,7 +410,7 @@
const data = res.data.data;
this.pageChild.total = data.total;
this.dataChild = data.records;
this.loading = false;
this.loadingChild = false;
getDictTree().then(res => {
const data = res.data.data;
const index = this.$refs.crudChild.findColumnIndex("parentId");

@ -56,7 +56,7 @@
<div class="clearfix">
<avue-crud
:option="optionChild"
:table-loading="loading"
:table-loading="loadingChild"
:data="dataChild"
:page="pageChild"
ref="crudChild"
@ -119,6 +119,7 @@
selectionList: [],
query: {},
loading: true,
loadingChild: true,
pageParent: {
pageSize: 10,
pageSizes: [10, 30, 50, 100, 200],
@ -216,10 +217,10 @@
this.$refs.crudChild.value.parentId = row.id;
this.$refs.crudChild.option.column.filter(item => {
if (item.prop === "code") {
item.valueDefault = row.code;
item.value = row.code;
}
if (item.prop === "parentId") {
item.valueDefault = row.id;
item.value = row.id;
}
});
this.onLoadChild(this.pageChild);
@ -228,10 +229,11 @@
this.query = {};
this.onLoadParent(this.pageParent);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.pageParent.currentPage = 1;
this.onLoadParent(this.pageParent, params);
done();
},
selectionChange(list) {
this.selectionList = list;
@ -398,7 +400,7 @@
});
},
onLoadChild(page, params = {}) {
this.loading = true;
this.loadingChild = true;
getChildList(
page.currentPage,
page.pageSize,
@ -408,7 +410,7 @@
const data = res.data.data;
this.pageChild.total = data.total;
this.dataChild = data.records;
this.loading = false;
this.loadingChild = false;
getDictTree().then(res => {
const data = res.data.data;
const index = this.$refs.crudChild.findColumnIndex("parentId");

@ -16,7 +16,8 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
@on-load="onLoad"
@tree-load="treeLoad">
<template slot="menuLeft">
<el-button type="danger"
size="small"
@ -29,7 +30,7 @@
<template slot-scope="{row}"
slot="source">
<div style="text-align:center">
<i :class="row.source"></i>
<i :class="row.source"/>
</div>
</template>
</avue-crud>
@ -37,7 +38,7 @@
</template>
<script>
import {getList, remove, update, add, getMenu} from "@/api/system/menu";
import {getLazyList, remove, update, add, getMenu} from "@/api/system/menu";
import {mapGetters} from "vuex";
import iconList from "@/config/iconList";
@ -48,13 +49,16 @@
query: {},
loading: true,
selectionList: [],
parentId: 0,
page: {
pageSize: 10,
currentPage: 1,
total: 0
total: 0,
},
option: {
lazy: true,
tip: false,
searchShow: false,
dialogWidth: "60%",
tree: true,
border: true,
@ -154,6 +158,7 @@
{
label: "菜单别名",
prop: "alias",
search: true,
rules: [
{
required: true,
@ -252,12 +257,15 @@
},
searchReset() {
this.query = {};
this.parentId = 0;
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.parentId = '';
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
@ -307,11 +315,17 @@
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
getLazyList(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;
getLazyList(parentId).then(res => {
resolve(res.data.data);
});
}
}
};

@ -48,8 +48,8 @@
},
option: {
height: 'auto',
calcHeight: 350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -155,10 +155,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -50,6 +50,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -175,10 +176,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -91,6 +91,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -269,10 +270,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -117,8 +117,8 @@
},
option: {
height: 'auto',
calcHeight: 350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -387,10 +387,11 @@
this.treeDeptId = '';
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -65,10 +65,10 @@
},
option: {
height: 'auto',
calcHeight: 350,
dialogWidth: 900,
dialogHeight: 500,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -279,10 +279,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -49,10 +49,10 @@
selectionList: [],
option: {
height: 'auto',
calcHeight: 350,
dialogWidth: 900,
dialogHeight: 330,
tip: false,
searchShow: false,
border: true,
index: true,
viewBtn: true,
@ -230,10 +230,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -72,6 +72,7 @@
},
option: {
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
@ -206,11 +207,11 @@
this.$refs.crud.value.parentId = row.id;
this.$refs.crud.option.column.filter(item => {
if (item.prop === "code") {
item.valueDefault = row.code;
item.value = row.code;
item.addDisabled = true;
}
if (item.prop === "parentId") {
item.valueDefault = row.id;
item.value = row.id;
item.addDisabled = true;
}
});
@ -269,10 +270,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
@ -317,11 +319,11 @@
this.$refs.crud.value.addDisabled = false;
this.$refs.crud.option.column.filter(item => {
if (item.prop === "code") {
item.valueDefault = "";
item.value = "";
item.addDisabled = false;
}
if (item.prop === "parentId") {
item.valueDefault = "";
item.value = "";
item.addDisabled = false;
}
});

@ -118,12 +118,12 @@
dataChild: [],
option: {
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
searchShow: false,
menuWidth: 300,
dialogWidth: 880,
dialogHeight: 320,
@ -287,10 +287,11 @@
this.query = {};
this.onLoadParent(this.pageParent);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.pageParent.currentPage = 1;
this.onLoadParent(this.pageParent, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -122,12 +122,12 @@
dataChild: [],
option: {
tip: false,
searchShow: false,
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
searchShow: false,
height: 300,
menuWidth: 300,
dialogWidth: 880,
@ -292,10 +292,11 @@
this.query = {};
this.onLoadParent(this.pageParent);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.pageParent.currentPage = 1;
this.onLoadParent(this.pageParent, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -90,6 +90,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -156,10 +157,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -83,6 +83,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -149,10 +150,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -87,6 +87,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -159,10 +160,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -91,6 +91,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -162,10 +163,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

@ -90,6 +90,7 @@
height:'auto',
calcHeight:350,
tip: false,
searchShow: false,
border: true,
index: true,
selection: true,
@ -156,10 +157,11 @@
this.query = {};
this.onLoad(this.page);
},
searchChange(params) {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;

Loading…
Cancel
Save