This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nezha-nezha-fronted/nezha-fronted/src/components/page/config/model.vue

99 lines
2.8 KiB
Vue
Raw Normal View History

2020-03-11 12:27:00 +08:00
<template>
<div>
<nz-data-list
ref="dataList"
:api="url"
:custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.model"
:layout="['searchInput', 'elementSet']"
:search-msg="searchMsg"
@search="search"
>
<template v-slot:top-tool-right>
2021-05-19 14:26:09 +08:00
<button id="account-add" v-has="'model_add'" :title="$t('overall.createUser')" class="top-tool-btn margin-r-10"
type="button" @click="add">
<i class="nz-icon-create-square nz-icon"></i>
</button>
2021-05-19 14:26:09 +08:00
<delete-button id="account-list-batch-delete" v-has="'model_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
</template>
<template v-slot="slotProps">
<model-table
ref="dataTable"
2021-05-18 19:18:14 +08:00
v-loading="tools.loading"
:api="url"
:custom-table-title="tools.customTableTitle"
:height="mainTableHeight"
:table-data="tableData"
@del="del"
@edit="edit"
@orderBy="tableDataSort"
@reload="getTableData"
@selectionChange="selectionChange"
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"></model-table>
</template>
<template v-slot:pagination>
<Pagination ref="Pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
</template>
</nz-data-list>
2020-07-20 11:43:10 +08:00
<transition name="right-box">
<model-box v-if="rightBox.show" :obj="object" @close="closeRightBox"></model-box>
2020-07-20 11:43:10 +08:00
</transition>
2020-03-11 12:27:00 +08:00
</div>
</template>
<script>
import deleteButton from '@/components/common/deleteButton'
import modelBox from '@/components/common/rightBox/administration/modelBox'
import nzDataList from '@/components/common/table/nzDataList'
import dataListMixin from '@/components/common/mixin/dataList'
import modelTable from '@/components/common/table/settings/modelTable'
2021-03-19 18:52:19 +08:00
export default {
name: 'model',
components: {
nzDataList,
modelBox,
deleteButton,
modelTable
2021-03-19 18:52:19 +08:00
},
mixins: [dataListMixin],
2021-03-19 18:52:19 +08:00
data () {
return {
url: 'asset/model',
blankObject: { // 空白对象
2021-03-19 18:52:19 +08:00
id: '',
name: '',
chartIds: '',
remark: ''
2020-03-11 12:27:00 +08:00
},
tableId: 'modelTable',
2021-03-19 18:52:19 +08:00
searchMsg: { // 给搜索框子组件传递的信息
searchLabelList: [{
2021-05-10 15:59:39 +08:00
name: 'ID',
type: 'input',
label: 'ids',
disabled: false
}, {
name: 'Name',
2021-03-19 18:52:19 +08:00
type: 'input',
label: 'name',
2021-03-19 18:52:19 +08:00
disabled: false
2021-05-10 15:59:39 +08:00
}, {
name: this.$t('asset.brand'),
type: 'brand',
label: 'brandIds',
disabled: false
2021-03-19 18:52:19 +08:00
}]
}
2021-03-19 18:52:19 +08:00
}
},
methods: {
2021-05-11 16:46:16 +08:00
},
created() {
},
computed: {
2020-03-11 12:27:00 +08:00
}
2021-03-19 18:52:19 +08:00
}
2020-03-11 12:27:00 +08:00
</script>