This commit is contained in:
lb
2022-08-09 10:39:33 +08:00
parent 0733660c2f
commit 2557026002
2 changed files with 92 additions and 15 deletions

View File

@@ -6,6 +6,7 @@
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button @click="test()">测试</el-button>
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item>
</el-form>
@@ -52,6 +53,8 @@
></el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs"></base-dialog>
</div>
</template>
@@ -60,7 +63,7 @@ import AddOrUpdate from './product-add-or-update'
import BaseTable from '@/components/base-table'
import TableOperateComponent from '@/components/base-table/components/operationComponent'
import TableTextComponent from '@/components/base-table/components/detailComponent'
import BaseDialog from '@/components/base-dialog/addOrUpdate'
const tableConfigs = [
{ type: 'index', name: '序号' },
{ prop: 'updateTime', name: '添加时间' },
@@ -135,10 +138,10 @@ const addOrUpdateConfigs = {
}
],
operations: [
{ name: 'reset', url: true },
{ name: 'save', url: 'api/product/add' },
{ name: 'update', url: 'api/product/update' },
{ name: 'reset', url: true }
],
{ name: 'update', url: 'api/product/update' }
]
// extraComponents: [
// {
// name: 'CompName',
@@ -162,17 +165,27 @@ export default {
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
addOrUpdateVisible: false,
addOrUpdateConfigs,
showbasedialog: false
}
},
components: {
AddOrUpdate,
BaseTable
BaseTable,
BaseDialog
},
activated() {
this.getDataList()
},
methods: {
//
test() {
this.showbasedialog = true
this.$nextTick(() => {
this.$refs.basedialog.init()
})
},
// 获取数据列表
getDataList() {
this.dataListLoading = true