df9b1518 by 赵千

推送功能

1 parent 9793fc85
......@@ -249,5 +249,13 @@ export function pushSjsbRecord (data) {
})
}
// 数据上报推送
export function detail (bsm) {
return request({
url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/detail?bsm=' + bsm,
method: 'get'
})
}
......
......@@ -25,11 +25,11 @@ class data extends filter {
{
prop: "ywh",
label: "业务号",
width: '110',
// width: '110',
},
{
label: "权属状态",
width: '80',
// width: '80',
render: (h, scope) => {
let obj = {
"0": {
......@@ -54,11 +54,7 @@ class data extends filter {
{
prop: "createtime",
label: "创建时间",
width: '180',
},
{
prop: "json",
label: "json体",
// width: '180',
},
{
label: '操作',
......@@ -66,7 +62,7 @@ class data extends filter {
render: (h, scope) => {
return (
<div>
<el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.openDialog(scope.row) }}>推送</el-button>
<el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.detail(scope.row) }}>详情</el-button>
</div>
)
}
......
......@@ -26,13 +26,23 @@
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
</lb-table>
</div>
<el-dialog title="详情" :visible.sync="detailVisible">
<div>
{{ dialogData.json }}
</div>
<div>
<button @click="pushRecord">推送</button>
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./djbcxdata";
import { getSjsbPushList, pushSjsbRecord } from "@/api/zhcx.js";
import { getSjsbPushList, pushSjsbRecord, detail } from "@/api/zhcx.js";
export default {
name: "djbcx",
......@@ -49,6 +59,7 @@ export default {
bdcqzh: "",
ywh: "",
},
detailVisible : false,
pageData: {
current: 1,
size: 10,
......@@ -60,6 +71,7 @@ export default {
},
qllxs: [],
isDialog: false,
dialogData: {},
djbxxData: {},
};
},
......@@ -82,9 +94,9 @@ export default {
handleSort (name, sort) {
console.log(name, sort);
},
pushRecord (row, done) {
pushRecord () {
this.$startLoading()
pushSjsbRecord(row).then((res) => {
pushSjsbRecord(this.dialogData).then((res) => {
this.$endLoading()
if (res.code === 200) {
this.$message.success("推送成功");
......@@ -120,6 +132,18 @@ export default {
}).then(action => {});
},
detail(row) {
this.detailVisible = true
detail(row.bsm).then((res) => {
this.$endLoading()
if (res.code === 200) {
this.dialogData = res.result;
} else {
this.$message.warning(res.message);
}
});
}
}
}
</script>
......