2020-03-11 12:27:00 +08:00
|
|
|
<template>
|
2021-04-26 19:33:49 +08:00
|
|
|
<div>
|
2021-04-08 20:28:54 +08:00
|
|
|
<nz-data-list
|
|
|
|
|
ref="dataList"
|
2021-04-26 19:33:49 +08:00
|
|
|
:api="url"
|
2021-04-08 20:28:54 +08:00
|
|
|
:custom-table-title.sync="tools.customTableTitle"
|
|
|
|
|
:from="fromRoute.model"
|
2021-04-26 19:33:49 +08:00
|
|
|
:layout="['searchInput', 'elementSet']"
|
2021-04-08 20:28:54 +08:00
|
|
|
:search-msg="searchMsg"
|
2021-04-26 19:33:49 +08:00
|
|
|
@search="search"
|
|
|
|
|
>
|
2021-04-08 20:28:54 +08:00
|
|
|
<template v-slot:top-tool-right>
|
2021-04-26 19:33:49 +08:00
|
|
|
<button id="account-add" v-has="'user_add'" :title="$t('overall.createUser')" class="top-tool-btn margin-r-10"
|
|
|
|
|
type="button" @click="add">
|
2021-04-08 20:28:54 +08:00
|
|
|
<i class="nz-icon-create-square nz-icon"></i>
|
|
|
|
|
</button>
|
2021-04-26 19:33:49 +08:00
|
|
|
<delete-button id="account-list-batch-delete" v-has="'user_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
2021-04-08 20:28:54 +08:00
|
|
|
</template>
|
2021-04-26 19:33:49 +08:00
|
|
|
<template v-slot="slotProps">
|
|
|
|
|
<model-table
|
2021-04-08 20:28:54 +08:00
|
|
|
ref="dataTable"
|
2021-04-26 19:33:49 +08:00
|
|
|
v-loading="slotProps.loading"
|
|
|
|
|
:api="url"
|
|
|
|
|
:custom-table-title="tools.customTableTitle"
|
2021-04-08 20:28:54 +08:00
|
|
|
:height="mainTableHeight"
|
2021-04-26 19:33:49 +08:00
|
|
|
:table-data="tableData"
|
|
|
|
|
@del="del"
|
|
|
|
|
@edit="edit"
|
|
|
|
|
@orderBy="tableDataSort"
|
|
|
|
|
@reload="getTableData"
|
|
|
|
|
@selectionChange="selectionChange"
|
|
|
|
|
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"></model-table>
|
2021-04-08 20:28:54 +08:00
|
|
|
</template>
|
|
|
|
|
<template v-slot:pagination>
|
2021-04-26 19:33:49 +08:00
|
|
|
<Pagination ref="Pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
2021-04-08 20:28:54 +08:00
|
|
|
</template>
|
|
|
|
|
</nz-data-list>
|
2020-07-20 11:43:10 +08:00
|
|
|
<transition name="right-box">
|
2021-04-26 19:33:49 +08:00
|
|
|
<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>
|
2021-04-08 20:28:54 +08:00
|
|
|
import deleteButton from '@/components/common/deleteButton'
|
2021-04-26 19:33:49 +08:00
|
|
|
import modelBox from '@/components/common/rightBox/administration/modelBox'
|
2021-04-08 20:28:54 +08:00
|
|
|
import nzDataList from '@/components/common/table/nzDataList'
|
2021-04-26 19:33:49 +08:00
|
|
|
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: {
|
2021-04-26 19:33:49 +08:00
|
|
|
nzDataList,
|
2021-04-08 20:28:54 +08:00
|
|
|
modelBox,
|
2021-04-26 19:33:49 +08:00
|
|
|
deleteButton,
|
|
|
|
|
modelTable
|
2021-03-19 18:52:19 +08:00
|
|
|
},
|
2021-04-26 19:33:49 +08:00
|
|
|
mixins: [dataListMixin],
|
2021-03-19 18:52:19 +08:00
|
|
|
data () {
|
|
|
|
|
return {
|
2021-04-26 19:33:49 +08:00
|
|
|
url: 'asset/model',
|
|
|
|
|
blankObject: { // 空白对象
|
2021-03-19 18:52:19 +08:00
|
|
|
id: '',
|
|
|
|
|
name: '',
|
2021-04-26 19:33:49 +08:00
|
|
|
chartIds: '',
|
|
|
|
|
remark: ''
|
2020-03-11 12:27:00 +08:00
|
|
|
},
|
2021-04-26 19:33:49 +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',
|
2021-04-26 19:33:49 +08:00
|
|
|
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-04-08 20:28:54 +08:00
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-05-11 16:46:16 +08:00
|
|
|
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|
2021-04-26 19:33:49 +08:00
|
|
|
},
|
|
|
|
|
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>
|