fix
This commit is contained in:
parent
a81dd12cd1
commit
9b3dce01cc
|
|
@ -324,16 +324,31 @@ export default {
|
|||
showInForm: false
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
type: 'cascader',
|
||||
label: '作出决定机关',
|
||||
prop: 'judAuthCn',
|
||||
showInForm: false
|
||||
prop: 'judAuth',
|
||||
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: '作出决定日期',
|
||||
prop: 'judDate',
|
||||
showInForm: false
|
||||
showInForm: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
}
|
||||
}
|
||||
],
|
||||
// 选择市场主体弹窗
|
||||
|
|
|
|||
|
|
@ -132,9 +132,9 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公告日期" prop="noticeDate">
|
||||
<el-form-item label="公告日期" prop="noticedate">
|
||||
<el-date-picker
|
||||
v-model="formData.noticeDate"
|
||||
v-model="formData.noticedate"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
|
|
@ -316,16 +316,22 @@ export default {
|
|||
showInForm: false
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
type: 'date-picker',
|
||||
label: '作出决定日期',
|
||||
prop: 'judDate',
|
||||
showInForm: false
|
||||
showInForm: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
type: 'date-picker',
|
||||
label: '公告日期',
|
||||
prop: 'noticeDate',
|
||||
showInForm: false
|
||||
prop: 'noticedate',
|
||||
showInForm: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
}
|
||||
}
|
||||
],
|
||||
// 选择市场主体弹窗
|
||||
|
|
@ -357,13 +363,13 @@ export default {
|
|||
judAuthCn: '',
|
||||
judAuthPath: [],
|
||||
judDate: '',
|
||||
noticeDate: '',
|
||||
noticedate: '',
|
||||
noticeContent: ''
|
||||
},
|
||||
formRules: {
|
||||
judAuthPath: [{ 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' }]
|
||||
},
|
||||
// 机关树形列表
|
||||
|
|
@ -396,7 +402,7 @@ export default {
|
|||
const records = (res.data.records || []).map(item => ({
|
||||
...item,
|
||||
judDate: item.judDate ? item.judDate.split(' ')[0] : '',
|
||||
noticeDate: item.noticeDate ? item.noticeDate.split(' ')[0] : ''
|
||||
noticedate: item.noticedate ? item.noticedate.split(' ')[0] : ''
|
||||
}))
|
||||
return {
|
||||
tableData: records,
|
||||
|
|
@ -430,7 +436,7 @@ export default {
|
|||
...data,
|
||||
judAuthPath: judAuthPath || [],
|
||||
judDate: data.judDate ? data.judDate.split(' ')[0] : '',
|
||||
noticeDate: data.noticeDate ? data.noticeDate.split(' ')[0] : ''
|
||||
noticedate: data.noticedate ? data.noticedate.split(' ')[0] : ''
|
||||
}
|
||||
this.formDialogVisible = true
|
||||
}
|
||||
|
|
@ -468,7 +474,7 @@ export default {
|
|||
judAuthCn: '',
|
||||
judAuthPath: [],
|
||||
judDate: '',
|
||||
noticeDate: '',
|
||||
noticedate: '',
|
||||
noticeContent: ''
|
||||
}
|
||||
this.formDialogVisible = true
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<span class="text">{{ scope.getPropValue(scope.field.label) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:table-top="EditTable">
|
||||
<template v-slot:table-top>
|
||||
<div style="margin-bottom: 12px;">
|
||||
<el-button
|
||||
style="background: #48B86E;"
|
||||
|
|
@ -46,6 +46,7 @@ import {
|
|||
eSusNateOperRegUpdateSusNateOperReg,
|
||||
eSusNateOperRegDeleteSusNateOperRegPersonateId
|
||||
} from '@/api/auto-baseapi.js'
|
||||
import { getOrgTreeList } from '@/api/system.js'
|
||||
import EntList from './EntList.vue'
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -297,22 +298,22 @@ export default {
|
|||
showInTable: false
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
type: 'cascader',
|
||||
label: '登记机关',
|
||||
prop: 'regOrg',
|
||||
cnProp: 'regOrgCn',
|
||||
required: false,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
showInTable: false
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '登记机关',
|
||||
prop: 'regOrgCn',
|
||||
showInForm: false,
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
formProps: {
|
||||
props: { checkStrictly: true, value: 'id', label: 'label', children: 'children' },
|
||||
'show-all-levels': false,
|
||||
clearable: true,
|
||||
filterable: true
|
||||
},
|
||||
options: () => {
|
||||
return this.orgTreeList
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -348,7 +349,10 @@ export default {
|
|||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
showInTable: false
|
||||
showInTable: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'date-picker',
|
||||
|
|
@ -358,35 +362,28 @@ export default {
|
|||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
showInTable: false
|
||||
showInTable: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
type: 'cascader',
|
||||
label: '作出决定机关',
|
||||
prop: 'judAuth',
|
||||
cnProp: 'judAuthCn',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
showInTable: false,
|
||||
optionConfig: {
|
||||
labelKeyName: 'name',
|
||||
valueKeyName: 'id',
|
||||
isLeaf: (item) => {
|
||||
return item.children.length === 0
|
||||
}
|
||||
formProps: {
|
||||
props: { checkStrictly: true, value: 'id', label: 'label', children: 'children' },
|
||||
'show-all-levels': false,
|
||||
clearable: true,
|
||||
filterable: true
|
||||
},
|
||||
options: () => {
|
||||
return this.authItemMap
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '作出决定机关',
|
||||
prop: 'judAuthCn',
|
||||
showInForm: false,
|
||||
tableProps: {
|
||||
showOverflowTooltip: true
|
||||
return this.orgTreeList
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -397,6 +394,9 @@ export default {
|
|||
return meta.isForm === true
|
||||
},
|
||||
showInTable: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
},
|
||||
tableProps: {
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row, column, cellValue, index) => {
|
||||
|
|
@ -412,7 +412,10 @@ export default {
|
|||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
},
|
||||
showInTable: false
|
||||
showInTable: false,
|
||||
formProps: {
|
||||
valueFormat: 'yyyy-MM-dd'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
|
|
@ -428,6 +431,7 @@ export default {
|
|||
type: 'input',
|
||||
label: '处理原因',
|
||||
prop: 'handlRea',
|
||||
cnProp: 'handlReaCN',
|
||||
required: true,
|
||||
showInForm: ({ meta }) => {
|
||||
return meta.isForm === true
|
||||
|
|
@ -454,7 +458,9 @@ export default {
|
|||
// },
|
||||
// showInTable: false
|
||||
// }
|
||||
]
|
||||
],
|
||||
// 机关树形列表
|
||||
orgTreeList: []
|
||||
}
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
|
|
@ -468,6 +474,7 @@ export default {
|
|||
})
|
||||
},
|
||||
created() {
|
||||
this.loadOrgTreeList()
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
|
@ -501,6 +508,8 @@ export default {
|
|||
handleEntSelect(selected) {
|
||||
if (selected && selected.length > 0) {
|
||||
const ent = selected[0]
|
||||
// 获取登记机关的树形路径
|
||||
const regOrgPath = ent.regorg ? this.getPathById(this.orgTreeList, ent.regorg) : []
|
||||
// 确保所有必需属性都存在
|
||||
this.$refs.EditTable.editReady({
|
||||
entname: ent.entname,
|
||||
|
|
@ -508,10 +517,33 @@ export default {
|
|||
regno: ent.regno,
|
||||
regOrg: ent.regorg,
|
||||
regOrgCn: ent.regorgCn,
|
||||
regOrgPath: regOrgPath || [],
|
||||
pripid: ent.pripid,
|
||||
_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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue