Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev
Showing
4 changed files
with
262 additions
and
128 deletions
src/views/sjgx/jkgnck/dialog/detail.vue
0 → 100644
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-26 15:40:23 | ||
5 | --> | ||
6 | <template> | ||
7 | <div class="loadingtext"> | ||
8 | <el-input | ||
9 | type="textarea" | ||
10 | :rows="8" | ||
11 | v-model="formData.json"> | ||
12 | </el-input> | ||
13 | <div class="text-center pt-10"> | ||
14 | <el-button type="primary" @click="pushRecord">推送</el-button> | ||
15 | </div> | ||
16 | </div> | ||
17 | </template> | ||
18 | <script> | ||
19 | import { push } from "@/api/sysPushRecord.js"; | ||
20 | export default { | ||
21 | props: { | ||
22 | formData: { | ||
23 | type: Object, | ||
24 | default: () => { | ||
25 | return {} | ||
26 | } | ||
27 | } | ||
28 | }, | ||
29 | methods: { | ||
30 | /** | ||
31 | * @description: pushRecord | ||
32 | * @author: renchao | ||
33 | */ | ||
34 | pushRecord () { | ||
35 | this.$startLoading() | ||
36 | push(this.formData).then((res) => { | ||
37 | this.$endLoading() | ||
38 | if (res.code === 200) { | ||
39 | this.$message.success("推送成功"); | ||
40 | } else { | ||
41 | this.$message.warning(res.message); | ||
42 | } | ||
43 | this.$popupCacel() | ||
44 | }) | ||
45 | } | ||
46 | } | ||
47 | } | ||
48 | </script> |
src/views/sjgx/jkgnck/djbcxdata.js
0 → 100644
1 | import filter from '@/utils/filter.js' | ||
2 | let vm = null | ||
3 | |||
4 | const sendThis = (_this) => { | ||
5 | vm = _this | ||
6 | } | ||
7 | class data extends filter { | ||
8 | constructor() { | ||
9 | super() | ||
10 | } | ||
11 | columns () { | ||
12 | return [ | ||
13 | { | ||
14 | label: '序号', | ||
15 | type: 'index', | ||
16 | width: '50', | ||
17 | render: (h, scope) => { | ||
18 | return ( | ||
19 | <div> | ||
20 | {(vm.pageData.currentPage - 1) * vm.pageData.pageSize + scope.$index + 1} | ||
21 | </div> | ||
22 | ) | ||
23 | } | ||
24 | }, | ||
25 | |||
26 | { | ||
27 | label: "推送状态", | ||
28 | render: (h, scope) => { | ||
29 | let obj = { | ||
30 | "0": { | ||
31 | text: '成功', | ||
32 | color: '#4BD863' | ||
33 | }, | ||
34 | "1": { | ||
35 | text: '失败', | ||
36 | color: 'red' | ||
37 | } | ||
38 | } | ||
39 | let textName = obj[scope.row.status]?.text || '' | ||
40 | let colorName = obj[scope.row.status]?.color || '' | ||
41 | return ( | ||
42 | <div> | ||
43 | <span style={`color:${colorName}`}>● </span> | ||
44 | <span >{textName}</span> | ||
45 | </div> | ||
46 | ) | ||
47 | } | ||
48 | }, | ||
49 | { | ||
50 | prop: "ywh", | ||
51 | label: "业务号", | ||
52 | // width: '110', | ||
53 | }, | ||
54 | { | ||
55 | prop: "ywh1", | ||
56 | label: "登记业务名称", | ||
57 | // width: '110', | ||
58 | }, | ||
59 | { | ||
60 | prop: "ywh2", | ||
61 | label: "登记情形名称", | ||
62 | // width: '110', | ||
63 | }, | ||
64 | { | ||
65 | prop: "bdcdyh", | ||
66 | label: "不动产单元号", | ||
67 | // width: '110', | ||
68 | }, | ||
69 | { | ||
70 | prop: "createtime", | ||
71 | label: "创建时间", | ||
72 | }, | ||
73 | { | ||
74 | prop: "createtime", | ||
75 | label: "推送时间", | ||
76 | }, | ||
77 | { | ||
78 | prop: "createtime1", | ||
79 | label: "响应时间", | ||
80 | }, | ||
81 | { | ||
82 | label: '操作', | ||
83 | width: '100', | ||
84 | render: (h, scope) => { | ||
85 | return ( | ||
86 | <div> | ||
87 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.detail(scope.row) }}>详情</el-button> | ||
88 | </div> | ||
89 | ) | ||
90 | } | ||
91 | } | ||
92 | ] | ||
93 | } | ||
94 | |||
95 | } | ||
96 | let datas = new data() | ||
97 | export { | ||
98 | datas, | ||
99 | sendThis | ||
100 | } |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-19 15:04:38 | ||
5 | --> | ||
6 | <template> | 1 | <template> |
7 | <div class="from-clues"> | 2 | <div class="from-clues"> |
8 | <!-- 表单部分 --> | 3 | <!-- 表单部分 --> |
9 | <div class="from-clues-header"> | 4 | <div class="from-clues-header"> |
10 | <el-form :model="queryForm" ref="queryForm" label-width="70px"> | 5 | <el-form :model="queryForm" ref="queryForm" @submit.native.prevent label-width="70px"> |
11 | <el-row> | 6 | <el-row> |
12 | <el-col :span="5"> | 7 | <el-col :span="5"> |
13 | <el-form-item label="接口类型"> | 8 | <el-form-item label="业务号"> |
14 | <el-input | 9 | <el-input placeholder="请输入业务号" v-model="queryForm.ywh" clearable class="width100"> |
15 | placeholder="请输入编号" | ||
16 | v-model="queryForm.jklx" | ||
17 | class="width200px" | ||
18 | clearable></el-input> | ||
19 | </el-form-item> | ||
20 | </el-col> | ||
21 | <el-col :span="5"> | ||
22 | <el-form-item label="调用状态"> | ||
23 | <el-input | ||
24 | placeholder="请输入编号" | ||
25 | v-model="queryForm.dyzt" | ||
26 | class="width200px" | ||
27 | clearable></el-input> | ||
28 | </el-form-item> | ||
29 | </el-col> | ||
30 | </el-row> | ||
31 | <el-row> | ||
32 | <el-col :span="5"> | ||
33 | <el-form-item label="访问IP"> | ||
34 | |||
35 | <el-input | ||
36 | placeholder="请输入IP" | ||
37 | v-model="queryForm.fwip" | ||
38 | class="width200px" | ||
39 | clearable></el-input> | ||
40 | |||
41 | </el-form-item> | ||
42 | </el-col> | ||
43 | <el-col :span="5"> | ||
44 | <el-form-item label="访问时间"> | ||
45 | <el-input placeholder="请输入业务号" v-model="queryForm.fwsj" clearable class="width200px"> | ||
46 | </el-input> | 10 | </el-input> |
47 | </el-form-item> | 11 | </el-form-item> |
48 | </el-col> | 12 | </el-col> |
49 | </el-row> | ||
50 | <el-row> | ||
51 | <el-col :span="10"> | ||
52 | <el-form-item label="请求地址"> | ||
53 | |||
54 | <el-input | ||
55 | placeholder="请输入url" | ||
56 | v-model="queryForm.qqdz" | ||
57 | class="width500px" | ||
58 | clearable></el-input> | ||
59 | 13 | ||
60 | </el-form-item> | ||
61 | </el-col> | ||
62 | </el-row> | ||
63 | |||
64 | </el-row> | ||
65 | <el-row> | ||
66 | <el-col :span="20"> | ||
67 | <el-form-item label="请求头数据"> | ||
68 | |||
69 | <el-input | ||
70 | placeholder="请输入请求头数据" | ||
71 | v-model="queryForm.qqtsj" | ||
72 | class="width500px" | ||
73 | clearable></el-input> | ||
74 | |||
75 | </el-form-item> | ||
76 | </el-col> | ||
77 | </el-row> | ||
78 | <el-row> | ||
79 | <el-col :span="20"> | ||
80 | <el-form-item label="入参数据"> | ||
81 | |||
82 | <el-input | ||
83 | placeholder="请输入参数" | ||
84 | v-model="queryForm.rcsj" | ||
85 | class="width500px" | ||
86 | clearable></el-input> | ||
87 | |||
88 | </el-form-item> | ||
89 | </el-col> | ||
90 | </el-row> | ||
91 | |||
92 | <el-row> | ||
93 | <el-col :span="5"> | ||
94 | <el-form-item label="调用描述"> | ||
95 | |||
96 | <el-input | ||
97 | placeholder="调用描述" | ||
98 | v-model="queryForm.dyms" | ||
99 | class="width200px" | ||
100 | clearable></el-input> | ||
101 | |||
102 | </el-form-item> | ||
103 | </el-col> | ||
104 | </el-row> | ||
105 | |||
106 | <el-row> | ||
107 | <el-col :span="5"> | ||
108 | <el-form-item label="返回数据"> | ||
109 | |||
110 | <el-input | ||
111 | placeholder="返回数据" | ||
112 | v-model="queryForm.fhsj" | ||
113 | class="width200px" | ||
114 | clearable></el-input> | ||
115 | |||
116 | </el-form-item> | ||
117 | </el-col> | ||
118 | </el-row> | ||
119 | |||
120 | <el-row> | ||
121 | <el-col :span="4" class="btnColRight"> | 14 | <el-col :span="4" class="btnColRight"> |
122 | <el-form-item> | 15 | <el-form-item> |
123 | <el-button type="primary" @click="queryClick()">发送</el-button> | 16 | <el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button> |
124 | |||
125 | </el-form-item> | 17 | </el-form-item> |
126 | </el-col> | 18 | </el-col> |
127 | </el-row> | 19 | </el-row> |
128 | </el-form> | 20 | </el-form> |
129 | </div> | 21 | </div> |
130 | <!-- 表格 --> | 22 | <!-- 表格 --> |
131 | 23 | <div class="from-clues-content"> | |
24 | <lb-table :page-size="pageData.size" class="loadingtext" | ||
25 | :current-page.sync="pageData.current" :total="tableData.total" @size-change="handleSizeChange" | ||
26 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | ||
27 | </lb-table> | ||
28 | </div> | ||
132 | </div> | 29 | </div> |
133 | </template> | 30 | </template> |
134 | <script> | 31 | <script> |
135 | 32 | import { mapGetters } from "vuex"; | |
136 | 33 | import table from "@/utils/mixin/table"; | |
137 | export default { | 34 | import { datas, sendThis } from "./djbcxdata"; |
138 | 35 | import { list, detail } from "@/api/sysPushRecord.js"; | |
36 | |||
37 | export default { | ||
38 | name: "djbcx", | ||
39 | mixins: [table], | ||
40 | mounted () { | ||
41 | sendThis(this); | ||
42 | this.queryClick() | ||
43 | }, | ||
139 | data () { | 44 | data () { |
140 | return { | 45 | return { |
141 | queryForm: { | 46 | queryForm: { |
142 | jklx: "", | 47 | qllx: "", |
143 | dyzt: "", | 48 | bdcdyh: "", |
144 | fwip: "", | 49 | bdcqzh: "", |
145 | fwsj: "", | 50 | ywh: "", |
146 | qqdz: "", | 51 | interfaceType: "5" |
147 | qqtsj: "", | 52 | }, |
148 | rcsj: "", | 53 | pageData: { |
149 | dyms: "", | 54 | current: 1, |
150 | fhsj: "", | 55 | size: 10, |
56 | total: 0, | ||
151 | }, | 57 | }, |
58 | tableData: { | ||
59 | columns: datas.columns(), | ||
60 | data: [], | ||
61 | } | ||
152 | } | 62 | } |
153 | }, | 63 | }, |
154 | 64 | computed: { | |
65 | ...mapGetters(["dictData"]) | ||
66 | }, | ||
67 | methods: { | ||
68 | // 初始化数据 | ||
69 | /** | ||
70 | * @description: 初始化数据 | ||
71 | * @author: renchao | ||
72 | */ | ||
73 | queryClick () { | ||
74 | this.$startLoading() | ||
75 | list({ ...this.queryForm, ...this.pageData }).then((res) => { | ||
76 | this.$endLoading() | ||
77 | if (res.code === 200) { | ||
78 | let { total, records } = res.result; | ||
79 | this.tableData.data = records; | ||
80 | this.tableData.total = total; | ||
81 | } | ||
82 | }); | ||
83 | }, | ||
84 | /** | ||
85 | * @description: openDialog | ||
86 | * @param {*} scroll | ||
87 | * @author: renchao | ||
88 | */ | ||
89 | openDialog (scroll) { | ||
90 | const h = this.$createElement; | ||
91 | this.$msgbox({ | ||
92 | title: '推送', | ||
93 | message: h('p', null, [ | ||
94 | h('span', null, '是否推送 '), | ||
95 | h('i', { style: 'color: teal' }, scroll.ywh), | ||
96 | h('span', null, ' 记录') | ||
97 | ]), | ||
98 | showCancelButton: true, | ||
99 | confirmButtonText: '确定', | ||
100 | cancelButtonText: '取消', | ||
101 | beforeClose: (action, instance, done) => { | ||
102 | if (action === 'confirm') { | ||
103 | this.pushRecord(scroll, done); | ||
104 | } else { | ||
105 | done(); | ||
106 | } | ||
107 | } | ||
108 | }).then(action => { }); | ||
109 | }, | ||
110 | /** | ||
111 | * @description: detail | ||
112 | * @param {*} row | ||
113 | * @author: renchao | ||
114 | */ | ||
115 | detail (row) { | ||
116 | detail(row.bsm).then((res) => { | ||
117 | this.$endLoading() | ||
118 | if (res.code === 200) { | ||
119 | this.$popupDialog("详情", "sjgx/sbxtsjts/dialog/detail", res.result, "60%") | ||
120 | } else { | ||
121 | this.$message.warning(res.message); | ||
122 | } | ||
123 | }) | ||
124 | } | ||
155 | } | 125 | } |
126 | } | ||
156 | </script> | 127 | </script> |
157 | <style scoped lang="scss"> | 128 | <style scoped lang="scss"> |
158 | @import "~@/styles/public.scss"; | 129 | @import "~@/styles/public.scss"; |
130 | |||
131 | .icon-circle { | ||
132 | position: relative; | ||
133 | } | ||
134 | |||
135 | .icon-circle::before { | ||
136 | content: ""; | ||
137 | width: 4px; | ||
138 | height: 4px; | ||
139 | border-radius: 50%; | ||
140 | background: #000; | ||
141 | top: 0px; | ||
142 | left: 0px; | ||
143 | } | ||
159 | </style> | 144 | </style> | ... | ... |
-
Please register or sign in to post a comment