This commit is contained in:
chenxf 2026-03-06 09:51:35 +08:00
parent a81dd12cd1
commit 9b3dce01cc
3 changed files with 103 additions and 50 deletions

View File

@ -324,16 +324,31 @@ export default {
showInForm: false showInForm: false
}, },
{ {
type: 'input', type: 'cascader',
label: '作出决定机关', label: '作出决定机关',
prop: 'judAuthCn', prop: 'judAuth',
showInForm: false cnProp: 'judAuthCn',
showInForm: ({ meta }) => meta.isSearchForm === true,
formProps: {
props: { checkStrictly: true, value: 'id', label: 'label', children: 'children' },
'show-all-levels': false,
clearable: true,
filterable: true
},
options: () => this.orgTreeList,
tableProps: {
minWidth: '180px',
showOverflowTooltip: true
}
}, },
{ {
type: 'input', type: 'date-picker',
label: '作出决定日期', label: '作出决定日期',
prop: 'judDate', prop: 'judDate',
showInForm: false showInForm: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
}
} }
], ],
// //

View File

@ -132,9 +132,9 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公告日期" prop="noticeDate"> <el-form-item label="公告日期" prop="noticedate">
<el-date-picker <el-date-picker
v-model="formData.noticeDate" v-model="formData.noticedate"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@ -316,16 +316,22 @@ export default {
showInForm: false showInForm: false
}, },
{ {
type: 'input', type: 'date-picker',
label: '作出决定日期', label: '作出决定日期',
prop: 'judDate', prop: 'judDate',
showInForm: false showInForm: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
}
}, },
{ {
type: 'input', type: 'date-picker',
label: '公告日期', label: '公告日期',
prop: 'noticeDate', prop: 'noticedate',
showInForm: false showInForm: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
}
} }
], ],
// //
@ -357,13 +363,13 @@ export default {
judAuthCn: '', judAuthCn: '',
judAuthPath: [], judAuthPath: [],
judDate: '', judDate: '',
noticeDate: '', noticedate: '',
noticeContent: '' noticeContent: ''
}, },
formRules: { formRules: {
judAuthPath: [{ required: true, message: '请选择作出决定机关', trigger: 'change' }], judAuthPath: [{ required: true, message: '请选择作出决定机关', trigger: 'change' }],
judDate: [{ required: true, message: '请选择作出决定日期', trigger: 'change' }], judDate: [{ required: true, message: '请选择作出决定日期', trigger: 'change' }],
noticeDate: [{ required: true, message: '请选择公告日期', trigger: 'change' }], noticedate: [{ required: true, message: '请选择公告日期', trigger: 'change' }],
noticeContent: [{ required: true, message: '请输入公告内容', trigger: 'blur' }] noticeContent: [{ required: true, message: '请输入公告内容', trigger: 'blur' }]
}, },
// //
@ -396,7 +402,7 @@ export default {
const records = (res.data.records || []).map(item => ({ const records = (res.data.records || []).map(item => ({
...item, ...item,
judDate: item.judDate ? item.judDate.split(' ')[0] : '', judDate: item.judDate ? item.judDate.split(' ')[0] : '',
noticeDate: item.noticeDate ? item.noticeDate.split(' ')[0] : '' noticedate: item.noticedate ? item.noticedate.split(' ')[0] : ''
})) }))
return { return {
tableData: records, tableData: records,
@ -430,7 +436,7 @@ export default {
...data, ...data,
judAuthPath: judAuthPath || [], judAuthPath: judAuthPath || [],
judDate: data.judDate ? data.judDate.split(' ')[0] : '', judDate: data.judDate ? data.judDate.split(' ')[0] : '',
noticeDate: data.noticeDate ? data.noticeDate.split(' ')[0] : '' noticedate: data.noticedate ? data.noticedate.split(' ')[0] : ''
} }
this.formDialogVisible = true this.formDialogVisible = true
} }
@ -468,7 +474,7 @@ export default {
judAuthCn: '', judAuthCn: '',
judAuthPath: [], judAuthPath: [],
judDate: '', judDate: '',
noticeDate: '', noticedate: '',
noticeContent: '' noticeContent: ''
} }
this.formDialogVisible = true this.formDialogVisible = true

View File

@ -18,7 +18,7 @@
<span class="text">{{ scope.getPropValue(scope.field.label) }}</span> <span class="text">{{ scope.getPropValue(scope.field.label) }}</span>
</div> </div>
</template> </template>
<template v-slot:table-top="EditTable"> <template v-slot:table-top>
<div style="margin-bottom: 12px;"> <div style="margin-bottom: 12px;">
<el-button <el-button
style="background: #48B86E;" style="background: #48B86E;"
@ -46,6 +46,7 @@ import {
eSusNateOperRegUpdateSusNateOperReg, eSusNateOperRegUpdateSusNateOperReg,
eSusNateOperRegDeleteSusNateOperRegPersonateId eSusNateOperRegDeleteSusNateOperRegPersonateId
} from '@/api/auto-baseapi.js' } from '@/api/auto-baseapi.js'
import { getOrgTreeList } from '@/api/system.js'
import EntList from './EntList.vue' import EntList from './EntList.vue'
export default { export default {
components: { components: {
@ -297,22 +298,22 @@ export default {
showInTable: false showInTable: false
}, },
{ {
type: 'input', type: 'cascader',
label: '登记机关', label: '登记机关',
prop: 'regOrg', prop: 'regOrg',
cnProp: 'regOrgCn',
required: false, required: false,
showInForm: ({ meta }) => { showInForm: ({ meta }) => {
return meta.isForm === true return meta.isForm === true
}, },
showInTable: false formProps: {
props: { checkStrictly: true, value: 'id', label: 'label', children: 'children' },
'show-all-levels': false,
clearable: true,
filterable: true
}, },
{ options: () => {
type: 'input', return this.orgTreeList
label: '登记机关',
prop: 'regOrgCn',
showInForm: false,
tableProps: {
showOverflowTooltip: true
} }
}, },
{ {
@ -348,7 +349,10 @@ export default {
showInForm: ({ meta }) => { showInForm: ({ meta }) => {
return meta.isForm === true return meta.isForm === true
}, },
showInTable: false showInTable: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
}
}, },
{ {
type: 'date-picker', type: 'date-picker',
@ -358,35 +362,28 @@ export default {
showInForm: ({ meta }) => { showInForm: ({ meta }) => {
return meta.isForm === true return meta.isForm === true
}, },
showInTable: false showInTable: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
}
}, },
{ {
type: 'input', type: 'cascader',
label: '作出决定机关', label: '作出决定机关',
prop: 'judAuth', prop: 'judAuth',
cnProp: 'judAuthCn',
required: true, required: true,
showInForm: ({ meta }) => { showInForm: ({ meta }) => {
return meta.isForm === true return meta.isForm === true
}, },
showInTable: false, formProps: {
optionConfig: { props: { checkStrictly: true, value: 'id', label: 'label', children: 'children' },
labelKeyName: 'name', 'show-all-levels': false,
valueKeyName: 'id', clearable: true,
isLeaf: (item) => { filterable: true
return item.children.length === 0
}
}, },
options: () => { options: () => {
return this.authItemMap return this.orgTreeList
}
},
{
type: 'input',
label: '作出决定机关',
prop: 'judAuthCn',
showInForm: false,
tableProps: {
showOverflowTooltip: true
} }
}, },
{ {
@ -397,6 +394,9 @@ export default {
return meta.isForm === true return meta.isForm === true
}, },
showInTable: false, showInTable: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
},
tableProps: { tableProps: {
showOverflowTooltip: true, showOverflowTooltip: true,
formatter: (row, column, cellValue, index) => { formatter: (row, column, cellValue, index) => {
@ -412,7 +412,10 @@ export default {
showInForm: ({ meta }) => { showInForm: ({ meta }) => {
return meta.isForm === true return meta.isForm === true
}, },
showInTable: false showInTable: false,
formProps: {
valueFormat: 'yyyy-MM-dd'
}
}, },
{ {
type: 'input', type: 'input',
@ -428,6 +431,7 @@ export default {
type: 'input', type: 'input',
label: '处理原因', label: '处理原因',
prop: 'handlRea', prop: 'handlRea',
cnProp: 'handlReaCN',
required: true, required: true,
showInForm: ({ meta }) => { showInForm: ({ meta }) => {
return meta.isForm === true return meta.isForm === true
@ -454,7 +458,9 @@ export default {
// }, // },
// showInTable: false // showInTable: false
// } // }
] ],
//
orgTreeList: []
} }
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
@ -468,6 +474,7 @@ export default {
}) })
}, },
created() { created() {
this.loadOrgTreeList()
}, },
mounted() { mounted() {
}, },
@ -501,6 +508,8 @@ export default {
handleEntSelect(selected) { handleEntSelect(selected) {
if (selected && selected.length > 0) { if (selected && selected.length > 0) {
const ent = selected[0] const ent = selected[0]
//
const regOrgPath = ent.regorg ? this.getPathById(this.orgTreeList, ent.regorg) : []
// //
this.$refs.EditTable.editReady({ this.$refs.EditTable.editReady({
entname: ent.entname, entname: ent.entname,
@ -508,10 +517,33 @@ export default {
regno: ent.regno, regno: ent.regno,
regOrg: ent.regorg, regOrg: ent.regorg,
regOrgCn: ent.regorgCn, regOrgCn: ent.regorgCn,
regOrgPath: regOrgPath || [],
pripid: ent.pripid, pripid: ent.pripid,
_isAdd: true _isAdd: true
}) })
} }
},
//
loadOrgTreeList() {
getOrgTreeList().then(res => {
if (res.code === 0) {
this.orgTreeList = res.data || []
}
})
},
// id
getPathById(tree, id, path = []) {
for (const node of tree) {
const currentPath = [...path, node.id]
if (node.id === id) {
return currentPath
}
if (node.children && node.children.length > 0) {
const found = this.getPathById(node.children, id, currentPath)
if (found) return found
}
}
return null
} }
} }
} }