feat(component): 添加产品线选择组件并重构系统组件API
- 新增 CuteProductLineSelect 组件API接口 - 重命名 SystemComponentController 为 CuteProductLineSelectProApi - 迁移部门选择数据源接口到新API路径 - 更新前端组件导入路径和API调用方式 - 修改 CuteDeptTree 组件分页大小限制 - 为文件上传组件添加上传方式配置选项 - 调整字典详情和定时任务模块的API导入路径
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listMetadata() {
|
||||
return request({
|
||||
url: 'api/component/CuteProductLineSelectPro/listMetadata',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listMetadata() {
|
||||
return request({
|
||||
url: 'api/component/CuteProductLineSelect/listMetadata',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listDeptSelectDataSource() {
|
||||
return request({
|
||||
url: 'api/component/listDeptSelectDataSource',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function listDeptSelectProDataSource() {
|
||||
return request({
|
||||
url: 'api/component/listDeptSelectProDataSource',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
import { get as getDictDetail } from '@/api/system/dictDetail'
|
||||
import { get as getDictDetail } from '@/api/system/dict-detail'
|
||||
|
||||
export default class Dict {
|
||||
constructor(dict) {
|
||||
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
searchDept({
|
||||
page: 1,
|
||||
size: 9999999,
|
||||
size: 1000,
|
||||
args: params
|
||||
}).then(res => {
|
||||
if (resolve) {
|
||||
|
||||
@@ -34,6 +34,14 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: null
|
||||
},
|
||||
/**
|
||||
* 上传方式:server、oss
|
||||
*/
|
||||
mode: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: 'oss'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -32,6 +32,14 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: null
|
||||
},
|
||||
/**
|
||||
* 上传方式:server、oss
|
||||
*/
|
||||
mode: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: 'oss'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { listDeptSelectDataSource } from '@/api/system/component'
|
||||
import { listMetadata } from '@/api/application/cute-product-line-select'
|
||||
import CsMessage from '@/utils/elementui/CsMessage'
|
||||
|
||||
export default {
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
fetchDeptData() {
|
||||
listDeptSelectDataSource().then(data => {
|
||||
listMetadata().then(data => {
|
||||
this.deptOptions = data
|
||||
}).catch(error => {
|
||||
console.error('获取部门数据失败:', error)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { listDeptSelectProDataSource } from '@/api/system/component'
|
||||
import { listMetadata } from '@/api/application/cute-product-line-select-pro'
|
||||
import CsMessage from '@/utils/elementui/CsMessage'
|
||||
|
||||
export default {
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
})
|
||||
},
|
||||
fetchDeptData() {
|
||||
listDeptSelectProDataSource().then(data => {
|
||||
listMetadata().then(data => {
|
||||
this.deptOptions = this.cleanEmptyChildren(data)
|
||||
// console.error('deptOptions', this.deptOptions)
|
||||
}).catch(error => {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudDictDetail from '@/api/system/dictDetail'
|
||||
import crudDictDetail from '@/api/system/dict-detail'
|
||||
import CRUD, { form, header, presenter } from '@crud/crud'
|
||||
import pagination from '@crud/Pagination'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudJob from '@/api/system/quartzJob'
|
||||
import crudJob from '@/api/system/quartz-job'
|
||||
import Log from './log'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import crudFile from '@/api/system/localStorage'
|
||||
import crudFile from '@/api/system/local-storage'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import crudFile from '@/api/system/ossStorage'
|
||||
import crudFile from '@/api/system/oss-storage'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package cn.odboy.system.application;
|
||||
|
||||
import cn.odboy.system.service.SystemDeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统组件:CuteProductLineSelect")
|
||||
@RequestMapping("/api/component/CuteProductLineSelect")
|
||||
public class CuteProductLineSelectApi {
|
||||
|
||||
@Autowired
|
||||
private SystemDeptService systemDeptService;
|
||||
|
||||
@ApiOperation("查询部门下拉选择数据源")
|
||||
@PostMapping(value = "/listMetadata")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<?> listMetadata() {
|
||||
return ResponseEntity.ok(systemDeptService.listDeptSelectDataSource());
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package cn.odboy.system.application;
|
||||
|
||||
import cn.odboy.system.service.SystemDeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统组件:CuteProductLineSelectPro")
|
||||
@RequestMapping("/api/component/CuteProductLineSelectPro")
|
||||
public class CuteProductLineSelectProApi {
|
||||
|
||||
@Autowired
|
||||
private SystemDeptService systemDeptService;
|
||||
|
||||
@ApiOperation("查询部门下拉选择Pro数据源")
|
||||
@PostMapping(value = "/listMetadata")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<?> listMetadata() {
|
||||
return ResponseEntity.ok(systemDeptService.listDeptSelectProDataSource());
|
||||
}
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021-2026 Odboy
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.odboy.system.controller;
|
||||
|
||||
import cn.odboy.system.service.SystemDeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:组件数据源")
|
||||
@RequestMapping("/api/component")
|
||||
public class SystemComponentController {
|
||||
|
||||
@Autowired
|
||||
private SystemDeptService systemDeptService;
|
||||
|
||||
@ApiOperation("查询部门下拉选择数据源")
|
||||
@PostMapping(value = "/listDeptSelectDataSource")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<?> listDeptSelectDataSource() {
|
||||
return ResponseEntity.ok(systemDeptService.listDeptSelectDataSource());
|
||||
}
|
||||
|
||||
@ApiOperation("查询部门下拉选择Pro数据源")
|
||||
@PostMapping(value = "/listDeptSelectProDataSource")
|
||||
@PreAuthorize("@el.check()")
|
||||
public ResponseEntity<?> listDeptSelectProDataSource() {
|
||||
return ResponseEntity.ok(systemDeptService.listDeptSelectProDataSource());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user