style:table
Showing
8 changed files
with
151 additions
and
154 deletions
... | @@ -40,7 +40,7 @@ | ... | @@ -40,7 +40,7 @@ |
40 | 40 | ||
41 | <br> | 41 | <br> |
42 | <el-pagination class="lb-table-pagination" v-if="pagination" v-bind="$attrs" v-on="$listeners" background | 42 | <el-pagination class="lb-table-pagination" v-if="pagination" v-bind="$attrs" v-on="$listeners" background |
43 | layout="total, prev, pager, next" @current-change="paginationCurrentChange" | 43 | layout="total, sizes, prev, pager, next" @current-change="paginationCurrentChange" @size-change="handleSizeChange" |
44 | :style="{ 'margin-top': paginationTop, 'text-align': paginationAlign }"> | 44 | :style="{ 'margin-top': paginationTop, 'text-align': paginationAlign }"> |
45 | </el-pagination> | 45 | </el-pagination> |
46 | </div> | 46 | </div> |
... | @@ -306,6 +306,9 @@ | ... | @@ -306,6 +306,9 @@ |
306 | paginationCurrentChange (val) { | 306 | paginationCurrentChange (val) { |
307 | this.$emit('p-current-change', val) | 307 | this.$emit('p-current-change', val) |
308 | }, | 308 | }, |
309 | handleSizeChange (val) { | ||
310 | this.$emit('size-change', val) | ||
311 | }, | ||
309 | /** | 312 | /** |
310 | * @description: getMergeArr | 313 | * @description: getMergeArr |
311 | * @param {*} tableData | 314 | * @param {*} tableData | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-19 16:10:10 | 4 | * @LastEditTime: 2024-01-25 15:06:08 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="tableBox"> | 7 | <div class="tableBox"> |
... | @@ -257,7 +257,7 @@ | ... | @@ -257,7 +257,7 @@ |
257 | let that = this | 257 | let that = this |
258 | let sjlx = row.sjlx, | 258 | let sjlx = row.sjlx, |
259 | bsmQlxx = row.bsmQlxx | 259 | bsmQlxx = row.bsmQlxx |
260 | if (sjlx == '系统数据') { | 260 | if (['系统数据', '存量数据'].includes(sjlx)) { |
261 | getXtParamsByYwh(ywh).then(res => { | 261 | getXtParamsByYwh(ywh).then(res => { |
262 | let data = res.result | 262 | let data = res.result |
263 | that.$popup('材料信息', 'registerBook/components/clxx/index', { | 263 | that.$popup('材料信息', 'registerBook/components/clxx/index', { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: miaofang | 3 | * @Autor: miaofang |
4 | * @LastEditTime: 2024-01-19 16:09:59 | 4 | * @LastEditTime: 2024-01-25 15:08:01 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="djxxTable"> | 7 | <div class="djxxTable"> |
... | @@ -304,7 +304,7 @@ | ... | @@ -304,7 +304,7 @@ |
304 | let that = this | 304 | let that = this |
305 | let sjlx = row.sjlx, | 305 | let sjlx = row.sjlx, |
306 | bsmQlxx = row.bsmQlxx | 306 | bsmQlxx = row.bsmQlxx |
307 | if (sjlx == '系统数据') { | 307 | if (['系统数据', '存量数据'].includes(sjlx)) { |
308 | getXtParamsByYwh(ywh).then(res => { | 308 | getXtParamsByYwh(ywh).then(res => { |
309 | let data = res.result | 309 | let data = res.result |
310 | that.$popup('材料信息', 'registerBook/components/clxx/index', { | 310 | that.$popup('材料信息', 'registerBook/components/clxx/index', { | ... | ... |
... | @@ -22,123 +22,123 @@ | ... | @@ -22,123 +22,123 @@ |
22 | <!-- 表格 --> | 22 | <!-- 表格 --> |
23 | <div class="from-clues-content"> | 23 | <div class="from-clues-content"> |
24 | <lb-table :page-size="pageData.size" class="loadingtext" | 24 | <lb-table :page-size="pageData.size" class="loadingtext" |
25 | :current-page.sync="pageData.current" :total="tableData.total" @size-change="handleSizeChange" | 25 | :current-page.sync="pageData.current" :total="tableData.total" @size-change="handleSizeChange" |
26 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | 26 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> |
27 | </lb-table> | 27 | </lb-table> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | </template> | 30 | </template> |
31 | <script> | 31 | <script> |
32 | import { mapGetters } from "vuex"; | 32 | import { mapGetters } from "vuex"; |
33 | import table from "@/utils/mixin/table"; | 33 | import table from "@/utils/mixin/table"; |
34 | import { datas, sendThis } from "./djbcxdata"; | 34 | import { datas, sendThis } from "./djbcxdata"; |
35 | import { list, detail } from "@/api/sysPushRecord.js"; | 35 | import { list, detail } from "@/api/sysPushRecord.js"; |
36 | 36 | ||
37 | export default { | 37 | export default { |
38 | name: "djbcx", | 38 | name: "djbcx", |
39 | mixins: [table], | 39 | mixins: [table], |
40 | mounted () { | 40 | mounted () { |
41 | sendThis(this); | 41 | sendThis(this); |
42 | this.queryClick() | 42 | this.queryClick() |
43 | }, | 43 | }, |
44 | data () { | 44 | data () { |
45 | return { | 45 | return { |
46 | queryForm: { | 46 | queryForm: { |
47 | qllx: "", | 47 | qllx: "", |
48 | bdcdyh: "", | 48 | bdcdyh: "", |
49 | bdcqzh: "", | 49 | bdcqzh: "", |
50 | ywh: "", | 50 | ywh: "", |
51 | interfaceType: "5" | 51 | interfaceType: "5" |
52 | }, | 52 | }, |
53 | pageData: { | 53 | pageData: { |
54 | current: 1, | 54 | current: 1, |
55 | size: 10, | 55 | size: 10, |
56 | total: 0, | 56 | total: 0, |
57 | }, | 57 | }, |
58 | tableData: { | 58 | tableData: { |
59 | columns: datas.columns(), | 59 | columns: datas.columns(), |
60 | data: [], | 60 | data: [], |
61 | } | ||
62 | } | ||
63 | }, | ||
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 | } | 61 | } |
82 | }); | 62 | } |
63 | }, | ||
64 | computed: { | ||
65 | ...mapGetters(["dictData"]) | ||
83 | }, | 66 | }, |
84 | /** | 67 | methods: { |
85 | * @description: openDialog | 68 | // 初始化数据 |
86 | * @param {*} scroll | 69 | /** |
87 | * @author: renchao | 70 | * @description: 初始化数据 |
88 | */ | 71 | * @author: renchao |
89 | openDialog (scroll) { | 72 | */ |
90 | const h = this.$createElement; | 73 | queryClick () { |
91 | this.$msgbox({ | 74 | this.$startLoading() |
92 | title: '推送', | 75 | list({ ...this.queryForm, ...this.pageData }).then((res) => { |
93 | message: h('p', null, [ | 76 | this.$endLoading() |
94 | h('span', null, '是否推送 '), | 77 | if (res.code === 200) { |
95 | h('i', { style: 'color: teal' }, scroll.ywh), | 78 | let { total, records } = res.result; |
96 | h('span', null, ' 记录') | 79 | this.tableData.data = records; |
97 | ]), | 80 | this.tableData.total = total; |
98 | showCancelButton: true, | 81 | } |
99 | confirmButtonText: '确定', | 82 | }); |
100 | cancelButtonText: '取消', | 83 | }, |
101 | beforeClose: (action, instance, done) => { | 84 | /** |
102 | if (action === 'confirm') { | 85 | * @description: openDialog |
103 | this.pushRecord(scroll, done); | 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%") | ||
104 | } else { | 120 | } else { |
105 | done(); | 121 | this.$message.warning(res.message); |
106 | } | 122 | } |
107 | } | 123 | }) |
108 | }).then(action => { }); | 124 | } |
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 | } | 125 | } |
125 | } | 126 | } |
126 | } | ||
127 | </script> | 127 | </script> |
128 | <style scoped lang="scss"> | 128 | <style scoped lang="scss"> |
129 | @import "~@/styles/public.scss"; | 129 | @import "~@/styles/public.scss"; |
130 | 130 | ||
131 | .icon-circle { | 131 | .icon-circle { |
132 | position: relative; | 132 | position: relative; |
133 | } | 133 | } |
134 | 134 | ||
135 | .icon-circle::before { | 135 | .icon-circle::before { |
136 | content: ""; | 136 | content: ""; |
137 | width: 4px; | 137 | width: 4px; |
138 | height: 4px; | 138 | height: 4px; |
139 | border-radius: 50%; | 139 | border-radius: 50%; |
140 | background: #000; | 140 | background: #000; |
141 | top: 0px; | 141 | top: 0px; |
142 | left: 0px; | 142 | left: 0px; |
143 | } | 143 | } |
144 | </style> | 144 | </style> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-17 17:30:08 | 4 | * @LastEditTime: 2024-01-25 15:01:43 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues"> | 7 | <div class="from-clues"> |
... | @@ -69,7 +69,6 @@ | ... | @@ -69,7 +69,6 @@ |
69 | :current-page.sync="pageData.currentPage" | 69 | :current-page.sync="pageData.currentPage" |
70 | :total="tableData.total" | 70 | :total="tableData.total" |
71 | @size-change="handleSizeChange" | 71 | @size-change="handleSizeChange" |
72 | @select="select" | ||
73 | @p-current-change="handleCurrentChange" | 72 | @p-current-change="handleCurrentChange" |
74 | @selection-change="handleSelectionChange" | 73 | @selection-change="handleSelectionChange" |
75 | :column="tableData.columns" | 74 | :column="tableData.columns" |
... | @@ -99,6 +98,7 @@ | ... | @@ -99,6 +98,7 @@ |
99 | mixins: [ywsqTable, jump], | 98 | mixins: [ywsqTable, jump], |
100 | data () { | 99 | data () { |
101 | return { | 100 | return { |
101 | radioVal: '', | ||
102 | loading: false, | 102 | loading: false, |
103 | queryForm: defaultParameters.defaultParameters(), | 103 | queryForm: defaultParameters.defaultParameters(), |
104 | tableData: { | 104 | tableData: { |
... | @@ -111,6 +111,28 @@ | ... | @@ -111,6 +111,28 @@ |
111 | }, | 111 | }, |
112 | mounted () { | 112 | mounted () { |
113 | sendThis(this); | 113 | sendThis(this); |
114 | if (this.sqywInfo.sqywdylx == "1") { | ||
115 | this.tableData.columns = [{ | ||
116 | label: '选择', | ||
117 | width: '50px', | ||
118 | render: (h, scope) => { | ||
119 | return ( | ||
120 | <div class="orgColumn"> | ||
121 | <el-radio onChange={() => { this.handleChange(scope.row) }} v-model={this.radioVal} label={scope.row.bdcdyid}> | ||
122 |   | ||
123 | </el-radio> | ||
124 | </div> | ||
125 | ) | ||
126 | } | ||
127 | }].concat(datas.columns()) | ||
128 | } else { | ||
129 | this.tableData.columns = | ||
130 | [{ | ||
131 | type: 'selection', | ||
132 | label: '全选', | ||
133 | width: '50' | ||
134 | }].concat(datas.columns()) | ||
135 | } | ||
114 | }, | 136 | }, |
115 | methods: { | 137 | methods: { |
116 | /** | 138 | /** |
... | @@ -207,54 +229,26 @@ | ... | @@ -207,54 +229,26 @@ |
207 | } | 229 | } |
208 | }, | 230 | }, |
209 | /** | 231 | /** |
210 | * @description: select | ||
211 | * @param {*} selection | ||
212 | * @param {*} row | ||
213 | * @author: renchao | ||
214 | */ | ||
215 | select (selection, row) { | ||
216 | if (this.sqywInfo.sqywdylx == "1") { | ||
217 | // 清除 所有勾选项 | ||
218 | this.$refs.table.clearSelection(); | ||
219 | // 当表格数据都没有被勾选的时候 就返回 | ||
220 | // 主要用于将当前勾选的表格状态清除 | ||
221 | if (selection.length == 0) return; | ||
222 | this.$refs.table.toggleRowSelection(row, true); | ||
223 | } | ||
224 | }, | ||
225 | /** | ||
226 | * @description: handleRowClick | 232 | * @description: handleRowClick |
227 | * @param {*} row | 233 | * @param {*} row |
228 | * @author: renchao | 234 | * @author: renchao |
229 | */ | 235 | */ |
236 | handleChange () { | ||
237 | let arr = this.tableData.data.filter(item => item.bdcdyid == this.radioVal) | ||
238 | arr[0].bsm = arr[0].zdbsm | ||
239 | this.bdcdysz = arr | ||
240 | }, | ||
230 | handleRowClick (row) { | 241 | handleRowClick (row) { |
231 | // 如果状态是1,那就是单选 | 242 | // 如果状态是1,那就是单选 |
243 | let refs = 'table'; | ||
232 | if (this.sqywInfo.sqywdylx == "1") { | 244 | if (this.sqywInfo.sqywdylx == "1") { |
233 | const bdcdysz = this.bdcdysz; | 245 | row.bsm = row.zdbsm |
234 | this.$refs.table.clearSelection(); | 246 | this.bdcdysz = [row] |
235 | if (bdcdysz.length == 1) { | 247 | this.radioVal = row.bdcdyid |
236 | bdcdysz.forEach((item) => { | ||
237 | // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中 | ||
238 | if (item == row) { | ||
239 | this.$refs.table.toggleRowSelection(row, false); | ||
240 | } | ||
241 | // 不然就让当前的一行勾选 | ||
242 | else { | ||
243 | this.$refs.table.toggleRowSelection(row, true); | ||
244 | } | ||
245 | }); | ||
246 | } else { | ||
247 | this.$refs.table.toggleRowSelection(row, true); | ||
248 | } | ||
249 | } else { | 248 | } else { |
250 | this.$refs.table.toggleRowSelection(row); | 249 | this.$refs[refs].toggleRowSelection(row) |
251 | } | 250 | } |
252 | }, | 251 | }, |
253 | /** | ||
254 | * @description: openBook | ||
255 | * @param {*} row | ||
256 | * @author: miaofang | ||
257 | */ | ||
258 | openBook (row) { | 252 | openBook (row) { |
259 | var param = { | 253 | var param = { |
260 | bdcdyid: row.bdcdyid, | 254 | bdcdyid: row.bdcdyid, | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-17 15:34:28 | 4 | * @LastEditTime: 2024-01-25 14:59:59 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues"> | 7 | <div class="from-clues"> |
... | @@ -74,7 +74,7 @@ | ... | @@ -74,7 +74,7 @@ |
74 | </div> | 74 | </div> |
75 | <div class="from-clues-content loadingtext"> | 75 | <div class="from-clues-content loadingtext"> |
76 | <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" | 76 | <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" |
77 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" | 77 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" |
78 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" | 78 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" |
79 | :data="zrztableData.data"> | 79 | :data="zrztableData.data"> |
80 | </lb-table> | 80 | </lb-table> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-17 17:20:34 | 4 | * @LastEditTime: 2024-01-25 14:59:36 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues"> | 7 | <div class="from-clues"> |
... | @@ -62,7 +62,7 @@ | ... | @@ -62,7 +62,7 @@ |
62 | </div> | 62 | </div> |
63 | <div class="from-clues-content loadingtext"> | 63 | <div class="from-clues-content loadingtext"> |
64 | <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" | 64 | <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" |
65 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" | 65 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" |
66 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" | 66 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" |
67 | :data="zrztableData.data"> | 67 | :data="zrztableData.data"> |
68 | </lb-table> | 68 | </lb-table> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2024-01-17 17:15:13 | 4 | * @LastEditTime: 2024-01-25 14:57:59 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues"> | 7 | <div class="from-clues"> |
... | @@ -62,7 +62,7 @@ | ... | @@ -62,7 +62,7 @@ |
62 | </div> | 62 | </div> |
63 | <div class="from-clues-content loadingtext"> | 63 | <div class="from-clues-content loadingtext"> |
64 | <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" | 64 | <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" |
65 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" | 65 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" |
66 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" | 66 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" |
67 | :data="zrztableData.data"> | 67 | :data="zrztableData.data"> |
68 | </lb-table> | 68 | </lb-table> | ... | ... |
-
Please register or sign in to post a comment