|
|
|
@ -18,12 +18,6 @@
|
|
|
|
|
v-show="item.dataIndex != 'itemCode' && item.dataIndex != 'remark'"
|
|
|
|
|
>
|
|
|
|
|
<a-form-item :label="item.title">
|
|
|
|
|
<!-- <a-input
|
|
|
|
|
v-model="queryParam[item.dataIndex]"
|
|
|
|
|
allow-clear
|
|
|
|
|
:placeholder="`请输入${item.title}`"
|
|
|
|
|
v-if="item.title == '租户'"
|
|
|
|
|
/> -->
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
placeholder="请选择租户"
|
|
|
|
@ -33,7 +27,7 @@
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="tenantIdSearch"
|
|
|
|
|
v-model="queryParam[item.dataIndex]"
|
|
|
|
|
v-model="queryParam.tenantId"
|
|
|
|
|
allow-clear
|
|
|
|
|
v-if="item.title == '租户'"
|
|
|
|
|
:style="{ width: '100%' }"
|
|
|
|
@ -44,14 +38,13 @@
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择租户参数类别"
|
|
|
|
|
v-model="queryParam[item.dataIndex]"
|
|
|
|
|
v-model="queryParam.paraCode"
|
|
|
|
|
v-else-if="item.title == '租户参数类别'"
|
|
|
|
|
allow-clear
|
|
|
|
|
>
|
|
|
|
|
<a-select-opt-group
|
|
|
|
|
v-for="(item, index) in WTypeData"
|
|
|
|
|
:key="`W${index}`"
|
|
|
|
|
:label="FnTypeD(item[0].type)"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item2 in item" :key="item2.id" :value="item2.paraCode">
|
|
|
|
|
{{ item2.paraName }}
|
|
|
|
@ -72,10 +65,6 @@
|
|
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
|
|
<a-button type="primary" @click="FnGetData">查询</a-button>
|
|
|
|
|
<a-button style="margin-left: 8px" @click="init">重置</a-button>
|
|
|
|
|
<!-- <a @click="toggleAdvanced" style="margin-left: 8px">
|
|
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
|
|
</a> -->
|
|
|
|
|
</span>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
@ -99,13 +88,7 @@
|
|
|
|
|
:min-width="item.width"
|
|
|
|
|
:title="item.title"
|
|
|
|
|
:align="item.align"
|
|
|
|
|
v-if="item.title != '租户'"
|
|
|
|
|
>
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
<span v-if="item.title == '租户参数类别'">{{ FnTurnD(row.paraCode) }}</span>
|
|
|
|
|
<span v-if="item.title == '租户参数名称'">{{ FnRTypeCode(row) }}</span>
|
|
|
|
|
<span v-else>{{ row[item.dataIndex] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
<vxe-column title="操作" fixed="right" width="200" align="center">
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
@ -123,20 +106,19 @@
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
|
|
|
|
|
<!-- <vxe-button type="text">删除</vxe-button> -->
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
</vxe-table>
|
|
|
|
|
<!-- <vxe-pager
|
|
|
|
|
<vxe-pager
|
|
|
|
|
:loading="loading"
|
|
|
|
|
:current-page="queryParam.currentPage"
|
|
|
|
|
:current-page="queryParam.pageNo"
|
|
|
|
|
:page-size="queryParam.pageSize"
|
|
|
|
|
:total="queryParam.totalResult"
|
|
|
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
|
>
|
|
|
|
|
</vxe-pager> -->
|
|
|
|
|
</vxe-pager>
|
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
|
</a-card>
|
|
|
|
@ -169,9 +151,8 @@ export default {
|
|
|
|
|
setVisible: false,
|
|
|
|
|
setVisible1: false,
|
|
|
|
|
queryParam: {
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
totalResult: 1
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 10
|
|
|
|
|
},
|
|
|
|
|
ColumnsQuery: [],
|
|
|
|
|
columns: [
|
|
|
|
@ -179,13 +160,13 @@ export default {
|
|
|
|
|
title: '租户',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'tenantId'
|
|
|
|
|
dataIndex: 'tenantName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租户参数类别',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '100',
|
|
|
|
|
dataIndex: 'paraCode'
|
|
|
|
|
dataIndex: 'paraName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租户参数名称',
|
|
|
|
@ -193,7 +174,6 @@ export default {
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'itemCode'
|
|
|
|
|
},
|
|
|
|
|
// itemCode
|
|
|
|
|
{
|
|
|
|
|
title: '备注',
|
|
|
|
|
align: 'center',
|
|
|
|
@ -209,32 +189,37 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
$route() {
|
|
|
|
|
'$route.query': {
|
|
|
|
|
immediate: true,
|
|
|
|
|
handler(nval, oval) {
|
|
|
|
|
if (this.$route.name === 'tenant_param_item') {
|
|
|
|
|
this.init()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.init()
|
|
|
|
|
// this.init()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
FnRTypeCode(e) {
|
|
|
|
|
let RData = ''
|
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
|
if (item.paraCode == e.paraCode) {
|
|
|
|
|
if (item.itemCodeData.length) {
|
|
|
|
|
item.itemCodeData.forEach(item2 => {
|
|
|
|
|
if (item2.itemCode == e.itemCode) {
|
|
|
|
|
console.log(item2, 'item2')
|
|
|
|
|
RData = item2.itemName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
RData = e.itemCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return RData
|
|
|
|
|
// let RData = ''
|
|
|
|
|
// this.TypeData.forEach(item => {
|
|
|
|
|
// if (item.paraCode == e.paraCode) {
|
|
|
|
|
// if (item.itemCodeData.length) {
|
|
|
|
|
// item.itemCodeData.forEach(item2 => {
|
|
|
|
|
// if (item2.itemCode == e.itemCode) {
|
|
|
|
|
// console.log(item2, 'item2')
|
|
|
|
|
// RData = item2.itemName
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// RData = e.itemCode
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// return RData
|
|
|
|
|
},
|
|
|
|
|
tenantIdSearch(value) {
|
|
|
|
|
if (value) {
|
|
|
|
@ -244,22 +229,22 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
FnTurnD(data) {
|
|
|
|
|
let Rdata = ''
|
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
|
if (item.paraCode == data) {
|
|
|
|
|
Rdata = item.paraName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return Rdata
|
|
|
|
|
// let Rdata = ''
|
|
|
|
|
// this.TypeData.forEach(item => {
|
|
|
|
|
// if (item.paraCode == data) {
|
|
|
|
|
// Rdata = item.paraName
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// return Rdata
|
|
|
|
|
},
|
|
|
|
|
FnTypeD(data) {
|
|
|
|
|
let Rdata = ''
|
|
|
|
|
this.YWData.forEach(item => {
|
|
|
|
|
if (item.code == data) {
|
|
|
|
|
Rdata = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return Rdata
|
|
|
|
|
// let Rdata = ''
|
|
|
|
|
// this.YWData.forEach(item => {
|
|
|
|
|
// if (item.code == data) {
|
|
|
|
|
// Rdata = item.name
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// return Rdata
|
|
|
|
|
},
|
|
|
|
|
toggleAdvanced() {
|
|
|
|
|
this.advanced = !this.advanced
|
|
|
|
@ -269,10 +254,13 @@ export default {
|
|
|
|
|
this.ColumnsQuery = this.columns
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
this.YWData = this.$options.filters['dictData']('tenant_param_group')
|
|
|
|
|
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
|
|
|
|
|
this.TenantData = res.data.rows
|
|
|
|
|
})
|
|
|
|
|
DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => {
|
|
|
|
|
this.TypeData = res.data
|
|
|
|
|
this.TypeData = res.data.items
|
|
|
|
|
let data = []
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
res.data.items.forEach(item => {
|
|
|
|
|
if (data.length) {
|
|
|
|
|
let type2 = false
|
|
|
|
|
data.forEach((item2, index2) => {
|
|
|
|
@ -289,14 +277,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.WTypeData = data
|
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
|
DJYTenantParamGetParamItem({ paraCode: item.paraCode }).then(res => {
|
|
|
|
|
item.itemCodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
|
|
|
|
|
this.TenantData = res.data.rows
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handlePageChange({ currentPage, pageSize }) {
|
|
|
|
@ -307,15 +287,12 @@ export default {
|
|
|
|
|
FnGetData() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
let data = { ...this.queryParam }
|
|
|
|
|
if (!data.tenantId) {
|
|
|
|
|
data.tenantId = 0
|
|
|
|
|
}
|
|
|
|
|
DJYTenantParamGetParamValue(data).then(res => {
|
|
|
|
|
this.loadData = res.data
|
|
|
|
|
this.loadData = res.data.items
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.queryParam.currentPage = res.data.pageNo
|
|
|
|
|
this.queryParam.pageNo = res.data.pageIndex
|
|
|
|
|
this.queryParam.pageSize = res.data.pageSize
|
|
|
|
|
this.queryParam.totalResult = res.data.totalRows
|
|
|
|
|
this.queryParam.totalResult = res.data.totalCount
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|