Merge remote-tracking branch 'origin/master'

main
liu.shiyi 2 years ago
commit 9a663685e1

@ -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
}
]
}

@ -171,11 +171,20 @@ export default {
background-color: transparent !important; background-color: transparent !important;
} }
.popper__arrow{ .popper__arrow{
bottom: -6px !important;
border-top-color:var(--color) !important;
border-bottom-color:var(--color) !important; border-bottom-color:var(--color) !important;
&::after{ &::after{
bottom: 0px !important;
border-top-color:var(--color) !important;
border-bottom-color:var(--color) !important; border-bottom-color:var(--color) !important;
} }
} }
.el-popper[x-placement^="top"] .popper__arrow{
&::after{
}
}
} }
</style> </style>
@ -203,17 +212,8 @@ export default {
color: var(--dropDownHoverFontColor) !important; color: var(--dropDownHoverFontColor) !important;
background-color: var(--dropDownHoverBackgroundColor) !important; background-color: var(--dropDownHoverBackgroundColor) !important;
} }
.el-tag.el-tag--info { .el-tag.el-tag--info {
color: var(--bs-el-text) !important; color: var(--bs-el-text) !important;
} }
.popper__arrow {
bottom: 0 !important;
&:after {
bottom: 0 !important;
}
}
} }
</style> </style>

@ -57,7 +57,10 @@
v-model="config.dataHandler" v-model="config.dataHandler"
type="textarea" type="textarea"
:rows="5" :rows="5"
placeholder="请输入数据处理脚本" placeholder="示例:
data.forEach(item => {
//
})"
/> />
</el-form-item> </el-form-item>
</div> </div>

@ -155,6 +155,7 @@ export default {
data () { data () {
const validateName = (rule, value, callback) => { const validateName = (rule, value, callback) => {
this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', {
id: this.currentCatalog.id,
name: value, name: value,
type: this.catalogType type: this.catalogType
}, true).then((r) => { }, true).then((r) => {

@ -126,6 +126,7 @@ export default {
data () { data () {
const validateName = (rule, value, callback) => { const validateName = (rule, value, callback) => {
this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', {
id: this.currentCatalog.id,
name: value, name: value,
type: this.type || 'bigScreenCatalog' type: this.type || 'bigScreenCatalog'
}, true).then((r) => { }, true).then((r) => {

@ -154,6 +154,7 @@ export default {
// //
const validateName = (rule, value, callback) => { const validateName = (rule, value, callback) => {
this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', {
id: this.currentCatalog.id,
name: value, name: value,
type: this.catalogType type: this.catalogType
}, true).then((r) => { }, true).then((r) => {

@ -51,6 +51,7 @@
<script> <script>
import { categoryAdd, categoryUpdate } from 'data-room-ui/js/utils/datasetConfigService' import { categoryAdd, categoryUpdate } from 'data-room-ui/js/utils/datasetConfigService'
import { categoryNameRepeat } from "../../js/utils/datasetConfigService";
export default { export default {
name: 'CategroyEditForm', name: 'CategroyEditForm',
props: { props: {
@ -60,6 +61,29 @@ export default {
} }
}, },
data () { 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 { return {
type: 'dataset', type: 'dataset',
dataForm: { dataForm: {
@ -73,7 +97,8 @@ export default {
nodeFlag: false, nodeFlag: false,
rules: { rules: {
name: [ name: [
{ required: true, message: '分组名称不能为空', trigger: 'blur' } { required: true, message: '分组名称不能为空', trigger: 'blur' },
{ validator: nameRepeatCheck, trigger: 'blur' }
] ]
}, },
nodeData: {} nodeData: {}

@ -127,6 +127,7 @@ export default {
data () { data () {
const validateName = (rule, value, callback) => { const validateName = (rule, value, callback) => {
this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', { this.$dataRoomAxios.post('/bigScreen/type/nameRepeat', {
id: this.currentCatalog.id,
name: value, name: value,
type: 'resourceCatalog' type: 'resourceCatalog'
}, true).then((r) => { }, true).then((r) => {
@ -175,7 +176,6 @@ export default {
name: '', name: '',
id: '', id: '',
code: '', code: '',
orderNum: 0
}, },
formRules: { formRules: {
name: [ name: [

@ -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) 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 { export {
datasetPage, datasetPage,
datasetList, datasetList,
@ -132,5 +140,6 @@ export {
categoryAdd, categoryAdd,
categoryUpdate, categoryUpdate,
categoryRemove, categoryRemove,
datasetCheck datasetCheck,
categoryNameRepeat
} }

Loading…
Cancel
Save