diff --git a/DataRoom/dataroom-core/src/main/resources/chart/mock/sales.json b/DataRoom/dataroom-core/src/main/resources/chart/mock/sales.json new file mode 100644 index 00000000..0be7d0aa --- /dev/null +++ b/DataRoom/dataroom-core/src/main/resources/chart/mock/sales.json @@ -0,0 +1,53 @@ +{ + "success": false, + "data": [ + { + "month": "2022-1", + "sales": 47 + }, + { + "month": "2022-2", + "sales": 64 + }, + { + "month": "2022-3", + "sales": 27 + }, + { + "month": "2022-4", + "sales": 44 + }, + { + "month": "2022-5", + "sales": 90 + }, + { + "month": "2022-6", + "sales": 83 + }, + { + "month": "2022-7", + "sales": 37 + }, + { + "month": "2022-8", + "sales": 86 + }, + { + "month": "2022-9", + "sales": 98 + }, + { + "month": "2022-10", + "sales": 84 + }, + { + "month": "2022-11", + "sales": 35 + }, + { + "month": "2022-12", + "sales": 73 + } + ] +} \ No newline at end of file diff --git a/data-room-ui/packages/BasicComponents/Select/index.vue b/data-room-ui/packages/BasicComponents/Select/index.vue index 7391856d..adfe864b 100644 --- a/data-room-ui/packages/BasicComponents/Select/index.vue +++ b/data-room-ui/packages/BasicComponents/Select/index.vue @@ -171,11 +171,20 @@ export default { background-color: transparent !important; } .popper__arrow{ + bottom: -6px !important; + border-top-color:var(--color) !important; border-bottom-color:var(--color) !important; &::after{ + bottom: 0px !important; + border-top-color:var(--color) !important; border-bottom-color:var(--color) !important; } } + .el-popper[x-placement^="top"] .popper__arrow{ + + &::after{ + } + } } </style> @@ -203,17 +212,8 @@ export default { color: var(--dropDownHoverFontColor) !important; background-color: var(--dropDownHoverBackgroundColor) !important; } - .el-tag.el-tag--info { color: var(--bs-el-text) !important; } - - .popper__arrow { - bottom: 0 !important; - - &:after { - bottom: 0 !important; - } - } } </style> diff --git a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue index f0d544b5..22051172 100644 --- a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue +++ b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue @@ -57,7 +57,10 @@ v-model="config.dataHandler" type="textarea" :rows="5" - placeholder="请输入数据处理脚本" + placeholder="示例: +data.forEach(item => { +// 数据处理 +})" /> </el-form-item> </div> diff --git a/data-room-ui/packages/BigScreenList/CatalogEditForm.vue b/data-room-ui/packages/BigScreenList/CatalogEditForm.vue index 49d13584..9089fde8 100644 --- a/data-room-ui/packages/BigScreenList/CatalogEditForm.vue +++ b/data-room-ui/packages/BigScreenList/CatalogEditForm.vue @@ -155,6 +155,7 @@ export default { data () { const validateName = (rule, value, callback) => { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { + id: this.currentCatalog.id, name: value, type: this.catalogType }, true).then((r) => { diff --git a/data-room-ui/packages/BigScreenMag/SideMenu.vue b/data-room-ui/packages/BigScreenMag/SideMenu.vue index 880e8720..ff66e1e0 100644 --- a/data-room-ui/packages/BigScreenMag/SideMenu.vue +++ b/data-room-ui/packages/BigScreenMag/SideMenu.vue @@ -126,6 +126,7 @@ export default { data () { const validateName = (rule, value, callback) => { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { + id: this.currentCatalog.id, name: value, type: this.type || 'bigScreenCatalog' }, true).then((r) => { diff --git a/data-room-ui/packages/ComponentList/CatalogEditForm.vue b/data-room-ui/packages/ComponentList/CatalogEditForm.vue index 4548204b..d6de0cbb 100644 --- a/data-room-ui/packages/ComponentList/CatalogEditForm.vue +++ b/data-room-ui/packages/ComponentList/CatalogEditForm.vue @@ -154,6 +154,7 @@ export default { // 检验分组名称是否重复 const validateName = (rule, value, callback) => { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { + id: this.currentCatalog.id, name: value, type: this.catalogType }, true).then((r) => { diff --git a/data-room-ui/packages/DataSetManagement/src/CategroyEditForm.vue b/data-room-ui/packages/DataSetManagement/src/CategroyEditForm.vue index d0e7ef79..614d0629 100644 --- a/data-room-ui/packages/DataSetManagement/src/CategroyEditForm.vue +++ b/data-room-ui/packages/DataSetManagement/src/CategroyEditForm.vue @@ -51,6 +51,7 @@ <script> import { categoryAdd, categoryUpdate } from 'data-room-ui/js/utils/datasetConfigService' +import { categoryNameRepeat } from "../../js/utils/datasetConfigService"; export default { name: 'CategroyEditForm', props: { @@ -60,6 +61,29 @@ export default { } }, data () { + const nameRepeatCheck = (rule, value, callback) => { + let parentId = '' + if (this.nodeFlag) { + // 新增节点 + if (this.radio === 0) { + // 新增同级 + parentId = this.nodeData.parentId + } else { + // 新增子级 + parentId = this.nodeData.id + } + } + categoryNameRepeat({ + ...this.dataForm, + parentId + }).then(res => { + if (res) { + callback(new Error('分组名称已存在')) + } else { + callback() + } + }) + } return { type: 'dataset', dataForm: { @@ -73,7 +97,8 @@ export default { nodeFlag: false, rules: { name: [ - { required: true, message: '分组名称不能为空', trigger: 'blur' } + { required: true, message: '分组名称不能为空', trigger: 'blur' }, + { validator: nameRepeatCheck, trigger: 'blur' } ] }, nodeData: {} diff --git a/data-room-ui/packages/SourceMag/SideMenu.vue b/data-room-ui/packages/SourceMag/SideMenu.vue index cc00417c..36f1b3f0 100644 --- a/data-room-ui/packages/SourceMag/SideMenu.vue +++ b/data-room-ui/packages/SourceMag/SideMenu.vue @@ -127,6 +127,7 @@ export default { data () { const validateName = (rule, value, callback) => { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { + id: this.currentCatalog.id, name: value, type: 'resourceCatalog' }, true).then((r) => { @@ -175,7 +176,6 @@ export default { name: '', id: '', code: '', - orderNum: 0 }, formRules: { name: [ diff --git a/data-room-ui/packages/js/utils/datasetConfigService.js b/data-room-ui/packages/js/utils/datasetConfigService.js index eb01fe12..6359c98d 100644 --- a/data-room-ui/packages/js/utils/datasetConfigService.js +++ b/data-room-ui/packages/js/utils/datasetConfigService.js @@ -117,6 +117,14 @@ const categoryUpdate = (params = {}, flag = false) => Vue.prototype.$dataRoomAxi */ const categoryRemove = (id = '-1', flag = false) => Vue.prototype.$dataRoomAxios.post(`/category/delete/${id}`, {}, flag) + +/** + * 分类名称校验 + * @param params + * @param flag + */ +const categoryNameRepeat = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.post('/category/checkRepeat', params, flag) + export { datasetPage, datasetList, @@ -132,5 +140,6 @@ export { categoryAdd, categoryUpdate, categoryRemove, - datasetCheck + datasetCheck, + categoryNameRepeat }