张同海 2 years ago
parent d0df3316cb
commit 6c2bb04912

@ -150,9 +150,9 @@ export default {
values.cateName = cateName values.cateName = cateName
let cateCode = '' let cateCode = ''
values.cateCode.forEach(item => { values.cateCode.forEach(item => {
cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item) cateCode = `${cateCode}[${item}]`
}) })
values.cateCode = `[${cateCode}]` values.cateCode = cateCode
for (const key in values) { for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) { if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key]) values[key] = JSON.stringify(values[key])

@ -129,13 +129,18 @@ export default {
this.id = record.id this.id = record.id
this.visible = true this.visible = true
setTimeout(() => { setTimeout(() => {
let cateCode = []
record.cateCode.split('[').forEach(item => {
if (item) {
item.split(']').forEach(item2 => {
if (item2) {
cateCode.push(item2)
}
})
}
})
this.form.setFieldsValue({ this.form.setFieldsValue({
cateCode: record.cateCode cateCode: record.cateCode ? cateCode : null,
? record.cateCode
.split('[')[1]
.split(']')[0]
.split(',')
: null,
cateName: record.cateName, cateName: record.cateName,
displayName: record.displayName, displayName: record.displayName,
tenantId: record.tenantId, tenantId: record.tenantId,
@ -171,9 +176,9 @@ export default {
values.cateName = cateName values.cateName = cateName
let cateCode = '' let cateCode = ''
values.cateCode.forEach(item => { values.cateCode.forEach(item => {
cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item) cateCode = `${cateCode}[${item}]`
}) })
values.cateCode = `[${cateCode}]` values.cateCode = cateCode
for (const key in values) { for (const key in values) {
console.log(key, 1) console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) { if (typeof values[key] === 'object' && !(values[key] === null)) {

@ -15,6 +15,11 @@
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" /> <a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24">
<a-form-item label="显示名称:">
<a-input v-model="queryParam.displayName" allow-clear placeholder="请输入显示名称" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item label="分类"> <a-form-item label="分类">
<a-select v-model="queryParam.cateCode" style="width: 100%" placeholder="请选择分类" allow-clear> <a-select v-model="queryParam.cateCode" style="width: 100%" placeholder="请选择分类" allow-clear>
@ -42,10 +47,10 @@
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnQueryData"></a-button> <a-button type="primary" @click="FnQueryData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button> <a-button style="margin-left: 8px" @click="init"></a-button>
<!-- <a @click="toggleAdvanced" style="margin-left: 8px"> <a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }} {{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" /> <a-icon :type="advanced ? 'up' : 'down'" />
</a> --> </a>
</span> </span>
</a-col> </a-col>
<a-col :md="2" :sm="24" class="SetFlex"> <a-col :md="2" :sm="24" class="SetFlex">
@ -558,7 +563,7 @@ button {
.Open { .Open {
} }
.Close { .Close {
min-height: 45px; max-height: 50px;
padding-bottom: 8px; padding-bottom: 8px;
overflow: hidden; overflow: hidden;
} }

Loading…
Cancel
Save