Files
UNION_HUTB/target/classes/views/platform/jdh/two/reading.html
T
2026-09-09 09:14:28 +08:00

130 lines
4.8 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<jdh-two-search :audit="false" :page="pageForm" @search="doSearch"></jdh-two-search>
<div class="mt20">
<jdh-two-table :loading="tableLoading" :page="pageForm" :table="tableData">
<template #column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="scope">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:scope.row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',data:scope.row}"
v-if="[100].includes(scope.row.audit_state)">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',data:scope.row}"
:loading="scope.row.delLoading">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</template>
</jdh-two-table>
</div>
</template>
<template #view>
<jdh-two-info ref="twoInfo"></jdh-two-info>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'jdh-two-search': httpVueLoader('/components/jdh/JdhTwoSearch.vue'),
'jdh-two-table': httpVueLoader('/components/jdh/JdhTwoTable.vue'),
'jdh-two-info': httpVueLoader('/components/jdh/JdhTwoInfo.vue')
},
data() {
return {
viewData: {},
pageForm: {
searchName: "meeting_name",
isAudit: false,
}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'delete') {
this.doDelete(data)
} else if (type == 'edit') {
this.openEdit(data.id)
}
},
openView(row) {
const {id} = row
this.$refs.twoInfo.openView(id)
this.$refs.guava.view()
},
async pageData() {
const {data} = await POST('/platform/jdh/level2/info/pageData', this.pageForm, true)
this.tableData = data.list
this.pageForm.totalCount = data.totalCount
},
openEdit(id) {
window.location.href = '/platform/jdh/level2/info?id=' + id
},
async doDelete(row) {
const {id} = row
this.$confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: async (a, b) => {
if ("confirm" == a) {//确认后再执行
this.$set(row, "delLoading", true)
const resp = await GET('/platform/jdh/level2/info/doDelete', {id: id})
requestLaterMsgFun(vue, resp, async () => {
this.pageData()
}, () => {
}, () => {
this.$set(row, "delLoading", false)
})
}
}
});
}
},
async created() {
this.pageData();
}
})
</script>
<!--#
}
#-->