Merge branch 'master' of https://git.njzscloud.com/lzq/njzscloud-dispose
commit
d12153d6f4
|
|
@ -15,10 +15,10 @@ var dTsName = dc + ".d.ts";
|
|||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
width="fit-content"
|
||||
ref="${lcc}Form"
|
||||
@close="dialogCloseHandler">
|
||||
<ElForm :model="formData"
|
||||
:rules="rules"
|
||||
ref="${lcc}Form"
|
||||
class="form-panel"
|
||||
label-width="auto">
|
||||
<%
|
||||
|
|
@ -67,14 +67,14 @@ ${toCamelCase(column.name)}: [{ required: true, message: '请填写${column.comm
|
|||
})
|
||||
|
||||
function dialogCloseHandler() {
|
||||
formData.vaule = {}
|
||||
formData.value = {}
|
||||
}
|
||||
|
||||
function submitHandler() {
|
||||
if (status.value === 'view') return
|
||||
submiting.value = true
|
||||
if (formData.vaule.id != null) {
|
||||
FormUtil.submit(${lcc}FormIns, () => ${ucc}Api.modify(formData.vaule))
|
||||
if (formData.value.id != null) {
|
||||
FormUtil.submit(${lcc}FormIns, () => ${ucc}Api.modify(formData.value))
|
||||
.then(() => {
|
||||
ElMessage.success('修改成功')
|
||||
emits('editSucc')
|
||||
|
|
@ -84,7 +84,7 @@ function submitHandler() {
|
|||
submiting.value = false
|
||||
})
|
||||
} else {
|
||||
FormUtil.submit(${lcc}FormIns, () => ${ucc}Api.add(formData.vaule))
|
||||
FormUtil.submit(${lcc}FormIns, () => ${ucc}Api.add(formData.value))
|
||||
.then(() => {
|
||||
ElMessage.success('添加成功')
|
||||
emits('editSucc')
|
||||
|
|
@ -103,11 +103,11 @@ defineExpose({
|
|||
status.value = 'modify'
|
||||
${ucc}Api.detail(data.id!)
|
||||
.then(res => {
|
||||
formData.vaule = res.data
|
||||
formData.value = res.data
|
||||
})
|
||||
} else {
|
||||
status.value = 'add'
|
||||
formData.vaule = data
|
||||
formData.value = data
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ import Page from '@/components/page/Page.vue'
|
|||
import { elIcons } from '@/common/element/element.ts'
|
||||
|
||||
const tableData = ref<${ucc}Types.Search${ucc}Result[]>([])
|
||||
const searchForm = reactive<${ucc}Types.Search${ucc}Param>({
|
||||
const searchForm = ref<${ucc}Types.Search${ucc}Param>({
|
||||
current: 1,
|
||||
size: 20,
|
||||
})
|
||||
|
|
@ -98,8 +98,8 @@ const pagination = reactive<G.Pagination>({
|
|||
size: 1,
|
||||
})
|
||||
function pageChangeHandler(currentPage: number, pageSize: number) {
|
||||
searchForm.current = currentPage
|
||||
searchForm.size = pageSize
|
||||
searchForm.value.current = currentPage
|
||||
searchForm.value.size = pageSize
|
||||
paging()
|
||||
}
|
||||
function showDialog(data?: ${ucc}Types.Search${ucc}Result) {
|
||||
|
|
@ -127,13 +127,13 @@ function addHandler() {
|
|||
}
|
||||
|
||||
function reset() {
|
||||
Object.assign(searchForm, {})
|
||||
searchForm.value = {}
|
||||
paging()
|
||||
}
|
||||
|
||||
function paging() {
|
||||
searching.value = true
|
||||
${ucc}Api.paging(searchForm)
|
||||
${ucc}Api.paging(searchForm.value)
|
||||
.then(res => {
|
||||
tableData.value = res.data?.records ?? []
|
||||
})
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class CustomerController {
|
|||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<SearchCustomerResult> detail(@RequestParam Long id) {
|
||||
public R<SearchCustomerResult> detail(@RequestParam("id") Long id) {
|
||||
return R.success(customerService.detail(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class DictController {
|
|||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<DictEntity> detail(@RequestParam Long id) {
|
||||
public R<DictEntity> detail(@RequestParam("id") Long id) {
|
||||
return R.success(dictService.detail(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class SysDictItemController {
|
|||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<DictItemEntity> detail(@RequestParam Long id) {
|
||||
public R<DictItemEntity> detail(@RequestParam("id") Long id) {
|
||||
return R.success(dictItemService.detail(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class DistrictController {
|
|||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<DistrictEntity> detail(@RequestParam Long id) {
|
||||
public R<DistrictEntity> detail(@RequestParam("id") Long id) {
|
||||
return R.success(districtService.detail(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class MenuController {
|
|||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<MenuDetailResult> detail(@RequestParam Long id) {
|
||||
public R<MenuDetailResult> detail(@RequestParam("id") Long id) {
|
||||
return R.success(menuService.detail(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue