update 设备分组

This commit is contained in:
lb
2023-10-09 17:01:19 +08:00
parent 907db90e93
commit 769830c448
6 changed files with 200 additions and 10 deletions

View File

@@ -43,8 +43,8 @@
<base-table
v-loading="attrListLoading"
:table-props="section.props"
:page="attrQuery.params.pageNo || 1"
:limit="attrQuery.params.pageSize || 10"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="list"
:add-button-show="mode.includes('detail') ? null : '添加属性'"
@emitButtonClick="handleAddAttr"
@@ -109,7 +109,8 @@
</template>
<script>
import DialogForm from '@/components/DialogForm';
// import DialogForm from '@/components/DialogForm';
import DialogForm from './dialogForm';
const SmallTitle = {
name: 'SmallTitle',
@@ -138,9 +139,10 @@ const SmallTitle = {
export default {
components: { SmallTitle, DialogForm },
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
props: ['sections', 'defaultMode', 'dataId'], // dataId 作为一个通用的存放id的字段
data() {
return {
mode: '',
visible: false,
showForm: false,
total: 0,
@@ -202,7 +204,12 @@ export default {
},
],
],
attrQuery: null, // 属性列表的请求
attrQuery: {
params: {
pageNo: 1,
pageSize: 10
}
}, // 属性列表的请求
infoQuery: null, // 基本信息的请求
attrFormSubmitting: false,
attrListLoading: false,
@@ -227,6 +234,7 @@ export default {
},
},
mounted() {
this.mode = this.defaultMode || 'detail';
for (const section of this.sections) {
// 请求具体信息
if ('url' in section) {