diff --git a/src/assets/css/common/table-common.scss b/src/assets/css/common/table-common.scss index 7c5412e1..5d8aeb70 100644 --- a/src/assets/css/common/table-common.scss +++ b/src/assets/css/common/table-common.scss @@ -14,7 +14,7 @@ z-index: 0; } .main-container { - padding: 10px; + padding: 0px; height: 100%; background-color: #f6f6f6; &>div { @@ -36,7 +36,7 @@ align-items : center; position: relative; justify-content: space-between; - padding: 14px 20px; + padding: 12px 20px; &.top-tools--sub { align-items: center; @@ -50,6 +50,12 @@ .top-tool-btn { border-left: none; } + .top-tool-btn--search:hover { + border-left: none !important; + } + .top-tool-btn--search:focus { + border-left: none !important; + } } .top-tool-right { @@ -74,17 +80,28 @@ } .top-tool-btn { cursor: pointer; - height: 33px; - width: 36px; + height: 28px; + width: 72px; border: 1px solid $--border-color-primary; outline: none; border-radius: $--button-border-radius; background-color: $--button-gray-background-color; transition: background-color linear .1s; - + font-size:12px; + font-weight: 500; + font-family: NotoSansHans-Medium !important; i { font-size: 14px; - color: $--button-gray-color; + color: #575757; + margin-right:4px; + } + } + + .top-tool-btn:disabled { + cursor: not-allowed; + opacity: 0.66; + i { + } } @@ -94,13 +111,14 @@ color: #666; } .top-tool-btn:hover:not(.cn-btn-disabled) { + border: 1px solid $--border-color-primary; background-color: $--button-gray-hover-background-color; } .top-tool-btn:focus:not(.cn-btn-disabled), .top-tool-btn.is-focus { - background-color: $--button-gray-hover-background-color; - border: 1px solid $--color-primary !important; + background-color: $--button-gray-active-background-color; + border: 1px solid $--border-color-primary; i { - color: $--button-gray-active-color; + color: #575757; } } .top-tool-btn--delete.top-tool-btn:focus:not(.cn-btn-disabled) { @@ -111,6 +129,56 @@ color: #F0745A; } } + .top-tool-btn--create { + background-color: #38ACD2 !important; + border-color: #2E88A6 !important; + color:#FFFFFF; + i { + color: #FFFFFF; + } + } + .top-tool-btn--create:hover { + background-color: #57B8D9 !important; + border-color: #2E88A6 !important; + color:#FFFFFF; + i { + color: #FFFFFF; + } + } + .top-tool-btn--create:focus { + background-color: #31A5CD !important; + border-color: #2E88A6 !important; + color:#FFFFFF !important; + i { + color: #FFFFFF !important; + } + } + .top-tool-btn--create:disabled { + opacity: 0.66; + background-color: #38ACD2 !important; + border-color: #2E88A6 !important; + color:#FFFFFF; + i { + color: #FFFFFF; + } + } + + .btn-customize { + color:$blue; + font-size: 12px; + .icon-gear{ + color:#2C72C6; + width:12px; + height:12px; + margin-right:2px; + font-size:12px; + } + } + + .btn-customize:hover { + cursor:pointer; + } + .top-tool-btn--dropdown { position: relative; width: auto; @@ -130,6 +198,7 @@ width: calc(100% - 40px); border: 1px solid $--right-box-border-color; border-bottom: none; + border-radius:4px; .caret-wrapper { height: 23px; @@ -152,7 +221,8 @@ th { border-color: $--right-box-border-color; padding: 8px 0; - background: #F9F9F9; + background: #FFF; + border-right:0px; } .el-table__header th:first-of-type { border-left: none; diff --git a/src/assets/css/components/components/table/common.scss b/src/assets/css/components/components/table/common.scss index f874ec5b..b208219d 100644 --- a/src/assets/css/components/components/table/common.scss +++ b/src/assets/css/components/components/table/common.scss @@ -78,12 +78,28 @@ border-radius: 2px; background-color: #F9F9F9; transition: background-color linear .1s; + padding-left:10px; +} + + +.list-page .top-tools .top-tool-btn--search{ + width:28px !important; + height:28px !important; + padding:unset !important; + i { + font-size: 14px; + color: #575757; + margin-right:unset !important; + } } .list-page { + .el-input--small{ + width: 214px !important; + line-height: 27px; + } .el-input--small .el-input__inner { - height: 33px; - line-height: 32px; - border-radius: 0px; + height: 28px; + border-radius: 2px 0px 0px 2px; } } diff --git a/src/assets/css/components/views/setting/knowledgeBase.scss b/src/assets/css/components/views/setting/knowledgeBase.scss index 526c5108..7c9b1f7d 100644 --- a/src/assets/css/components/views/setting/knowledgeBase.scss +++ b/src/assets/css/components/views/setting/knowledgeBase.scss @@ -7,6 +7,19 @@ box-shadow: 0 2px 4px 0 rgba(51,51,51,0.02); border-radius: 12px; } + + .top-title { + font-family: NotoSansHans-Black; + font-size: 24px; + color: #353636; + font-weight: 900; + line-height: 24px; + display: flex; + align-items: center; + padding-bottom: 8px; + padding-top: 20px; + margin-left:20px; + } } .edit-knowledge-base { height: 100%; diff --git a/src/assets/css/themes/theme-dark.scss b/src/assets/css/themes/theme-dark.scss index 172e2268..042c3d96 100644 --- a/src/assets/css/themes/theme-dark.scss +++ b/src/assets/css/themes/theme-dark.scss @@ -31,12 +31,12 @@ $--button-primary-background-color: $--color-primary; // 普通按钮背景色 $--button-hover-tint-percent: 20%; // 非灰色按钮在鼠标hover时背景色变浅的幅度 $--button-active-shade-percent: 0; // 非灰色按钮在focus时背景色变深的幅度 -$--button-gray-color: #666; // 灰色按钮字色 +$--button-gray-color: #353636; // 灰色按钮字色 $--button-gray-hover-color: $--button-gray-color; // 灰色按钮hover字色 $--button-gray-active-color: $--color-primary; // 灰色按钮focus字色 $--button-gray-background-color: #F9F9F9; // 灰色按钮背景色 -$--button-gray-hover-background-color: #FFF; // 灰色按钮hover背景色 -$--button-gray-active-background-color: $--button-gray-hover-background-color; // 灰色按钮focus背景色 +$--button-gray-hover-background-color: #EBF1F4; // 灰色按钮hover背景色 +$--button-gray-active-background-color: #E0E7EA; // 灰色按钮focus背景色 $--button-gray-border-color: $--border-color-primary; // 灰色按钮边框色 $--button-gray-hover-border-color: $--button-gray-border-color; // 灰色按钮hover边框色 $--button-gray-active-border-color-tint-percent: 30%; // 灰色按钮在focus时边框色相对于主题色变浅的幅度 diff --git a/src/assets/css/themes/theme-light.scss b/src/assets/css/themes/theme-light.scss index e405c677..ec0ca16c 100644 --- a/src/assets/css/themes/theme-light.scss +++ b/src/assets/css/themes/theme-light.scss @@ -31,12 +31,12 @@ $--button-primary-background-color: $--color-primary; // 普通按钮背景色 $--button-hover-tint-percent: 20%; // 非灰色按钮在鼠标hover时背景色变浅的幅度 $--button-active-shade-percent: 0; // 非灰色按钮在focus时背景色变深的幅度 -$--button-gray-color: #666; // 灰色按钮字色 +$--button-gray-color: #353636; // 灰色按钮字色 $--button-gray-hover-color: $--button-gray-color; // 灰色按钮hover字色 $--button-gray-active-color: $--color-primary; // 灰色按钮focus字色 $--button-gray-background-color: #F9F9F9; // 灰色按钮背景色 -$--button-gray-hover-background-color: #FFF; // 灰色按钮hover背景色 -$--button-gray-active-background-color: $--button-gray-hover-background-color; // 灰色按钮focus背景色 +$--button-gray-hover-background-color: #EBF1F4; // 灰色按钮hover背景色 +$--button-gray-active-background-color: #E0E7EA; // 灰色按钮focus背景色 $--button-gray-border-color: $--border-color-primary; // 灰色按钮边框色 $--button-gray-hover-border-color: $--button-gray-border-color; // 灰色按钮hover边框色 $--button-gray-active-border-color-tint-percent: 30%; // 灰色按钮在focus时边框色相对于主题色变浅的幅度 diff --git a/src/components/table/CnDataList.vue b/src/components/table/CnDataList.vue index 9b7311b3..43100a41 100644 --- a/src/components/table/CnDataList.vue +++ b/src/components/table/CnDataList.vue @@ -7,23 +7,24 @@
-
-
- +
+
+ + - +
+ {{$t('network.customize')}} +
diff --git a/src/components/table/administration/RoleTable.vue b/src/components/table/administration/RoleTable.vue index 27cd5c95..62238910 100644 --- a/src/components/table/administration/RoleTable.vue +++ b/src/components/table/administration/RoleTable.vue @@ -47,29 +47,6 @@ {{scope.row[item.prop]}} - - - - diff --git a/src/components/table/administration/UserTable.vue b/src/components/table/administration/UserTable.vue index d879d801..267468b9 100644 --- a/src/components/table/administration/UserTable.vue +++ b/src/components/table/administration/UserTable.vue @@ -62,29 +62,6 @@ {{scope.row[item.prop]}} - - - - diff --git a/src/components/table/report/ReportTable.vue b/src/components/table/report/ReportTable.vue index 0f6f286e..576af3cf 100644 --- a/src/components/table/report/ReportTable.vue +++ b/src/components/table/report/ReportTable.vue @@ -188,22 +188,6 @@ {{ scope.row[item.prop] || '-' }} - - - -
@@ -308,6 +292,7 @@ export default { loadingTableId: '', loadingPreviewId: '', downDataList: [], + disableEdit:false,//编辑按钮是否不可用,当选择多条记录的时候你,编辑按钮不可用 // pageObj: { // pageNo: 1, // pageSize: 20, @@ -556,6 +541,12 @@ export default { }) // this.selectIds = selectIds } + this.batchDeleteObjs = objs + if(objs.length > 1) { + this.disableEdit = true + }else { + this.disableEdit = false + } }, /** * 全选按钮 @@ -574,6 +565,13 @@ export default { this.$refs.dataTable.clearSelection() } + this.batchDeleteObjs = objs + if(objs.length > 1) { + this.disableEdit = true + }else { + this.disableEdit = false + } + // this.selectIds = selectIds }, /** diff --git a/src/components/table/setting/KnowledgeBaseTable.vue b/src/components/table/setting/KnowledgeBaseTable.vue index b045ca5d..adc86b75 100644 --- a/src/components/table/setting/KnowledgeBaseTable.vue +++ b/src/components/table/setting/KnowledgeBaseTable.vue @@ -66,29 +66,6 @@ {{scope.row[item.prop] || '-'}} - - - - diff --git a/src/mixins/data-list.js b/src/mixins/data-list.js index 5e8101dc..f16e8b13 100644 --- a/src/mixins/data-list.js +++ b/src/mixins/data-list.js @@ -37,6 +37,7 @@ export default { tableData: [], scrollbarWrap: null, delFlag: false, + disableEdit:false,//编辑按钮是否不可用,当选择多条记录的时候你,编辑按钮不可用 operationWidth: '165' // 操作列宽 } }, @@ -74,6 +75,11 @@ export default { }, selectionChange (objs) { this.batchDeleteObjs = objs + if(this.batchDeleteObjs.length > 1) { + this.disableEdit = true + }else { + this.disableEdit = false + } }, getTableData (params) { if (params) { @@ -115,6 +121,39 @@ export default { }) }) }, + delBatch () { + let ids = [] + if(this.batchDeleteObjs && this.batchDeleteObjs.length > 0){ + this.batchDeleteObjs.forEach(item =>{ + ids.push(item.id) + }) + } + if(ids.length === 0){ + this.$alert(this.$t('tip.pleaseSelect'),{ + confirmButtonText: this.$t('tip.yes'), + type:'warning' + }) + }else { + this.$confirm(this.$t('tip.confirmDelete'), { + confirmButtonText: this.$t('tip.yes'), + cancelButtonText: this.$t('tip.no'), + type: 'warning' + }).then(() => { + this.tools.loading = true + axios.delete(this.url + '?ids=' + ids).then(response => { + if (response.data.code === 200) { + this.delFlag = true + this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') }) + this.getTableData() + } else { + this.$message.error(response.data.message) + } + }).finally(() => { + this.tools.loading = false + }) + }) + } + }, newObject () { return JSON.parse(JSON.stringify(this.blankObject)) }, @@ -153,6 +192,21 @@ export default { } }) }, + editSelectRecord(){ + if(this.batchDeleteObjs.length === 0){ + this.$alert(this.$t('tip.pleaseSelectForEdit'),{ + confirmButtonText: this.$t('tip.yes'), + type:'warning' + }) + }else { + get(`${this.url}/${this.batchDeleteObjs[0].id}`).then(response => { + if (response.code === 200) { + this.object = response.data + this.rightBox.show = true + } + }) + } + }, copy (u) { this.object = { ...u, name: 'Copy from ' + u.name, id: '' } this.rightBox.show = true diff --git a/src/views/administration/Roles.vue b/src/views/administration/Roles.vue index f5dcc6c8..6738ae34 100644 --- a/src/views/administration/Roles.vue +++ b/src/views/administration/Roles.vue @@ -9,11 +9,23 @@ :layout="['columnCustomize','elementSet','search']" @search="search" > -