diff --git a/src/components/AssetRelationCard/index.vue b/src/components/AssetRelationCard/index.vue
index 1f02958af..a0caf498d 100644
--- a/src/components/AssetRelationCard/index.vue
+++ b/src/components/AssetRelationCard/index.vue
@@ -3,7 +3,7 @@
-
+
|
@@ -49,6 +49,12 @@ export default {
onAddSuccess: {
type: Function,
default: (objects, that) => {}
+ },
+ canSelect: {
+ type: Function,
+ default(row, index) {
+ return true
+ }
}
},
data() {
diff --git a/src/components/AssetSelect/index.vue b/src/components/AssetSelect/index.vue
index c5a372b6e..115474229 100644
--- a/src/components/AssetSelect/index.vue
+++ b/src/components/AssetSelect/index.vue
@@ -34,6 +34,12 @@ export default {
value: {
type: Array,
default: () => []
+ },
+ canSelect: {
+ type: Function,
+ default(row, index) {
+ return true
+ }
}
},
data() {
@@ -68,6 +74,7 @@ export default {
tableConfig: {
url: '/api/v1/assets/assets/',
hasTree: true,
+ canSelect: this.canSelect,
columns: [
{
prop: 'hostname',
diff --git a/src/components/DataTable/compenents/el-data-table/el-data-table.vue b/src/components/DataTable/compenents/el-data-table/el-data-table.vue
index b406765e2..2a0417095 100644
--- a/src/components/DataTable/compenents/el-data-table/el-data-table.vue
+++ b/src/components/DataTable/compenents/el-data-table/el-data-table.vue
@@ -13,7 +13,7 @@
:row-class-name="rowClassName"
@selection-change="selectStrategy.onSelectionChange"
@select="selectStrategy.onSelect"
- @select-all="selectStrategy.onSelectAll($event, selectable)"
+ @select-all="selectStrategy.onSelectAll($event, canSelect)"
@sort-change="onSortChange"
>
@@ -90,7 +90,7 @@
-
+
{
+ let treeUrl
+ if (this.init && this.treeSetting.treeUrl.indexOf('/perms/') !== -1 && this.treeSetting.treeUrl.indexOf('rebuild_tree') === -1) {
+ treeUrl = (this.treeSetting.treeUrl.indexOf('?') === -1) ? `${this.treeSetting.treeUrl}?rebuild_tree=1` : `${this.treeSetting.treeUrl}&rebuild_tree=1`
+ } else {
+ treeUrl = this.treeSetting.treeUrl
+ this.init = true
+ }
+ this.$axios.get(treeUrl).then(res => {
if (!res) {
res = []
}
@@ -65,6 +73,7 @@ export default {
name: this.$t('common.tree.Empty')
})
}
+ this.treeSetting.treeUrl = treeUrl
this.zTree = $.fn.zTree.init($(`#${this.iZTreeID}`), this.treeSetting, res)
if (this.treeSetting.showRefresh) {
this.rootNodeAddDom(
diff --git a/src/components/DatetimeRangePicker/index.vue b/src/components/DatetimeRangePicker/index.vue
index c5fb0e4f2..f42d21f5d 100644
--- a/src/components/DatetimeRangePicker/index.vue
+++ b/src/components/DatetimeRangePicker/index.vue
@@ -93,7 +93,7 @@ export default {
diff --git a/src/layout/components/Page/LicenseExpireTip.vue b/src/layout/components/Page/LicenseExpireTip.vue
new file mode 100644
index 000000000..b6508f57c
--- /dev/null
+++ b/src/layout/components/Page/LicenseExpireTip.vue
@@ -0,0 +1,60 @@
+
+
+
+ {{ isExpire }}
+
+
+
+
+
+
+
diff --git a/src/layout/components/Page/PageHeading.vue b/src/layout/components/Page/PageHeading.vue
index 9f1e8256f..ed8642387 100644
--- a/src/layout/components/Page/PageHeading.vue
+++ b/src/layout/components/Page/PageHeading.vue
@@ -1,22 +1,31 @@
-
-
-
- {{ title }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+