|
|
@@ -6,7 +6,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="getDataList()">查询</el-button> |
|
|
|
<el-button @click="test()">测试</el-button> |
|
|
|
<el-button @click="addOrEdit()">测试</el-button> |
|
|
|
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
@@ -102,6 +102,7 @@ const tableConfigs = [ |
|
|
|
|
|
|
|
const addOrUpdateConfigs = { |
|
|
|
type: 'dialog', // dialog | drawer | page |
|
|
|
infoUrl: '/monitoring/product', |
|
|
|
fields: [ |
|
|
|
'name', |
|
|
|
{ |
|
|
@@ -214,14 +215,16 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// |
|
|
|
test() { |
|
|
|
addOrEdit(id) { |
|
|
|
this.showbasedialog = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.basedialog.init() |
|
|
|
this.$refs.basedialog.init(id) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取数据列表 |
|
|
|
getDataList() { |
|
|
|
// console.log("after dialog close: ", this.showbasedialog) |
|
|
|
this.showbasedialog = false // 清理弹窗 |
|
|
|
this.dataListLoading = true |
|
|
|
this.$http({ |
|
|
|
url: this.$http.adornUrl('/monitoring/product/page'), |
|
|
@@ -268,7 +271,7 @@ export default { |
|
|
|
handleOperations({ type, data }) { |
|
|
|
switch (type) { |
|
|
|
case 'viewAttr': // <== 对照 tableConfig |
|
|
|
return this.addOrUpdateHandle(data) |
|
|
|
return this.addOrEdit(data) |
|
|
|
case 'delete': |
|
|
|
return this.deleteHandle(data) |
|
|
|
} |
|
|
|