fix : 修改命名规范
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<div class="address-book">
|
||||
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="searchAddressBook"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="addressBookTableConfig" @headBtnClick="headBtnClick"
|
||||
@selectionChange="selectionChange"></fvTable>
|
||||
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||
:form-schema="formSchema" :form-rules="formRules" @dialogCancel="handleCancel"
|
||||
@dialogSubmit="handleSubmit"></fvFormDialog>
|
||||
:form-schema="formSchema" :form-rules="formRules"
|
||||
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -18,7 +17,6 @@ import {ElMessage, ElMessageBox} from "element-plus";
|
||||
const router = useRouter()
|
||||
const tableIns = ref()
|
||||
const formDialogRef = ref()
|
||||
const delBtnDisabled = ref(true)
|
||||
const contactIds = ref("");
|
||||
const dialogTitle = ref("");
|
||||
const dialogType = ref("");
|
||||
@@ -154,7 +152,7 @@ const searchConfig = reactive([
|
||||
component: 'el-input',
|
||||
}
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
const addressBookTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
@@ -237,14 +235,14 @@ const tableConfig = reactive({
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
]
|
||||
})
|
||||
const search = (val) => {
|
||||
const searchAddressBook = (val) => {
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
addressBookTableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
@@ -264,6 +262,7 @@ const handleAdd = () => {
|
||||
dialogTitle.value = "新增通讯录";
|
||||
dialogType.value = "add";
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues({})
|
||||
// 清空校验
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
formDialogRef.value.getFormInstance().resetFields()
|
||||
@@ -291,11 +290,9 @@ const getDetail = (row) => {
|
||||
|
||||
const selectionChange = (selection) => {
|
||||
if (selection.length !== 0) {
|
||||
delBtnDisabled.value = false
|
||||
contactIds.value = selection.map(item => item.contactsId).join()
|
||||
} else {
|
||||
contactIds.value=''
|
||||
delBtnDisabled.value = true
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (contactsId) => {
|
||||
@@ -332,7 +329,7 @@ const handleSingleDelete = (row) => {
|
||||
}
|
||||
|
||||
//提交
|
||||
const handleSubmit = async (formInstance) => {
|
||||
const handleSubmitAddressBook = async (formInstance) => {
|
||||
if (!formInstance) return;
|
||||
let validate = await formInstance.validate()
|
||||
if (!validate.isValidate) return;
|
||||
|
||||
Reference in New Issue
Block a user