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