style:业务办理
Showing
3 changed files
with
20 additions
and
39 deletions
... | @@ -3,12 +3,12 @@ import Loading from '@/components/loading/index.js'; | ... | @@ -3,12 +3,12 @@ import Loading from '@/components/loading/index.js'; |
3 | let loading | 3 | let loading |
4 | 4 | ||
5 | // loading开始 方法 | 5 | // loading开始 方法 |
6 | function startLoading (target = 'body', loadingText = '正在加载中...') { | 6 | function startLoading (loadingText = '正在加载中...') { |
7 | loading = Loading.service({ | 7 | loading = Loading.service({ |
8 | text: loadingText, | 8 | text: loadingText, |
9 | spinner: 'el-icon-loading', | 9 | spinner: 'el-icon-loading', |
10 | background: 'rgba(255, 255, 255, 0.5)', | 10 | background: 'rgba(255, 255, 255, 0.5)', |
11 | target: '#' + target | 11 | target: document.querySelector('.loadingtext') |
12 | }) | 12 | }) |
13 | } | 13 | } |
14 | 14 | ... | ... |
... | @@ -55,10 +55,11 @@ | ... | @@ -55,10 +55,11 @@ |
55 | </el-row> | 55 | </el-row> |
56 | </el-form> | 56 | </el-form> |
57 | </div> | 57 | </div> |
58 | <div class="from-clues-content" id="dbx"> | 58 | <div class="from-clues-content"> |
59 | <lb-table :page-size="pageData.size" border @sort-change="handleSort" :current-page.sync="pageData.currentPage" | 59 | <lb-table :page-size="pageData.size" class="loadingtext" border @sort-change="handleSort" |
60 | :heightNum="300" :total="tableData.total" @size-change="handleSizeChange" | 60 | :current-page.sync="pageData.currentPage" :heightNum="300" :total="tableData.total" |
61 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | 61 | @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" |
62 | :data="tableData.data"> | ||
62 | </lb-table> | 63 | </lb-table> |
63 | </div> | 64 | </div> |
64 | <searchBox v-model="isSearch" @getSearch="getSearch" /> | 65 | <searchBox v-model="isSearch" @getSearch="getSearch" /> |
... | @@ -95,26 +96,12 @@ export default { | ... | @@ -95,26 +96,12 @@ export default { |
95 | }, | 96 | }, |
96 | mounted () { | 97 | mounted () { |
97 | sendThis(this); | 98 | sendThis(this); |
98 | window.addEventListener('visibilitychange', this.init, true) | 99 | this.queryClick() |
99 | }, | 100 | }, |
100 | destroyed () { | ||
101 | window.removeEventListener('visibilitychange', this.init, true) | ||
102 | }, | ||
103 | created () { }, | ||
104 | methods: { | 101 | methods: { |
105 | init (e) { | ||
106 | var isHidden = document.hidden; | ||
107 | if (isHidden) {//切离该页面时执行 | ||
108 | //页面切换时,处理逻辑 | ||
109 | } else {//切换到该页面时执行 | ||
110 | if (window.location.hash == '#/ywbl/dbx') { | ||
111 | this.fetchData() | ||
112 | } | ||
113 | } | ||
114 | }, | ||
115 | // 列表渲染接口 | 102 | // 列表渲染接口 |
116 | fetchData () { | 103 | queryClick () { |
117 | this.$startLoading('dbx') | 104 | this.$startLoading() |
118 | searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => { | 105 | searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => { |
119 | if (res.code === 200) { | 106 | if (res.code === 200) { |
120 | this.$endLoading() | 107 | this.$endLoading() |
... | @@ -132,9 +119,6 @@ export default { | ... | @@ -132,9 +119,6 @@ export default { |
132 | } | 119 | } |
133 | }) | 120 | }) |
134 | }, | 121 | }, |
135 | queryClick () { | ||
136 | this.fetchData() | ||
137 | }, | ||
138 | handelItem (index) { | 122 | handelItem (index) { |
139 | console.log(index); | 123 | console.log(index); |
140 | this.searchList.splice(index, 1) | 124 | this.searchList.splice(index, 1) |
... | @@ -142,7 +126,7 @@ export default { | ... | @@ -142,7 +126,7 @@ export default { |
142 | handleSort (val) { | 126 | handleSort (val) { |
143 | this.queryForm.sortField = val.prop | 127 | this.queryForm.sortField = val.prop |
144 | this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc' | 128 | this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc' |
145 | this.fetchData() | 129 | this.queryClick() |
146 | }, | 130 | }, |
147 | del (item) { | 131 | del (item) { |
148 | let formdata = new FormData(); | 132 | let formdata = new FormData(); |
... | @@ -159,7 +143,7 @@ export default { | ... | @@ -159,7 +143,7 @@ export default { |
159 | type: 'success', | 143 | type: 'success', |
160 | message: '删除成功!' | 144 | message: '删除成功!' |
161 | }); | 145 | }); |
162 | this.fetchData() | 146 | this.queryClick() |
163 | } else { | 147 | } else { |
164 | this.$message.error(res.message); | 148 | this.$message.error(res.message); |
165 | } | 149 | } | ... | ... |
... | @@ -33,14 +33,14 @@ | ... | @@ -33,14 +33,14 @@ |
33 | </el-col> | 33 | </el-col> |
34 | <el-col :span="5"> | 34 | <el-col :span="5"> |
35 | <el-form-item label="业务号"> | 35 | <el-form-item label="业务号"> |
36 | <el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick()" clearable class="width200px"> | 36 | <el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick" clearable class="width200px"> |
37 | </el-input> | 37 | </el-input> |
38 | </el-form-item> | 38 | </el-form-item> |
39 | </el-col> | 39 | </el-col> |
40 | 40 | ||
41 | <el-col :span="4" class="btnColRight"> | 41 | <el-col :span="4" class="btnColRight"> |
42 | <el-form-item> | 42 | <el-form-item> |
43 | <el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button> | 43 | <el-button type="primary" native-type="submit" @click="queryClick">查询</el-button> |
44 | <el-button @click="moreQueryClick()">高级查询</el-button> | 44 | <el-button @click="moreQueryClick()">高级查询</el-button> |
45 | </el-form-item> | 45 | </el-form-item> |
46 | </el-col> | 46 | </el-col> |
... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ |
60 | </div> | 60 | </div> |
61 | <!-- 表格 --> | 61 | <!-- 表格 --> |
62 | <div class="from-clues-content"> | 62 | <div class="from-clues-content"> |
63 | <lb-table :page-size="pageData.size" id="ybxLoading" :heightNum="300" @sort-change="handleSort" border | 63 | <lb-table :page-size="pageData.size" class="loadingtext" :heightNum="300" @sort-change="handleSort" border |
64 | :current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange" | 64 | :current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange" |
65 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | 65 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> |
66 | </lb-table> | 66 | </lb-table> |
... | @@ -81,6 +81,7 @@ export default { | ... | @@ -81,6 +81,7 @@ export default { |
81 | mixins: [table, searchMin], | 81 | mixins: [table, searchMin], |
82 | mounted () { | 82 | mounted () { |
83 | sendThis(this); | 83 | sendThis(this); |
84 | this.queryClick() | ||
84 | }, | 85 | }, |
85 | computed: { | 86 | computed: { |
86 | ...mapGetters(['dictData']) | 87 | ...mapGetters(['dictData']) |
... | @@ -106,13 +107,12 @@ export default { | ... | @@ -106,13 +107,12 @@ export default { |
106 | }; | 107 | }; |
107 | }, | 108 | }, |
108 | methods: { | 109 | methods: { |
109 | init (e) { | ||
110 | this.fetchData() | ||
111 | }, | ||
112 | // 列表渲染接口 | 110 | // 列表渲染接口 |
113 | fetchData () { | 111 | queryClick () { |
112 | this.$startLoading() | ||
114 | searchTaskDone({ ...this.queryForm, ...this.pageData }, { 'target': '#ybxLoading' }).then(res => { | 113 | searchTaskDone({ ...this.queryForm, ...this.pageData }, { 'target': '#ybxLoading' }).then(res => { |
115 | if (res.code === 200) { | 114 | if (res.code === 200) { |
115 | this.$endLoading() | ||
116 | let { total, records } = res.result | 116 | let { total, records } = res.result |
117 | this.pageData.total = total; | 117 | this.pageData.total = total; |
118 | records.forEach(item => { | 118 | records.forEach(item => { |
... | @@ -125,13 +125,10 @@ export default { | ... | @@ -125,13 +125,10 @@ export default { |
125 | } | 125 | } |
126 | }) | 126 | }) |
127 | }, | 127 | }, |
128 | queryClick () { | ||
129 | this.fetchData() | ||
130 | }, | ||
131 | handleSort (val) { | 128 | handleSort (val) { |
132 | this.queryForm.sortField = val.prop | 129 | this.queryForm.sortField = val.prop |
133 | this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc' | 130 | this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc' |
134 | this.fetchData() | 131 | this.queryClick() |
135 | }, | 132 | }, |
136 | ywhClick (item) { | 133 | ywhClick (item) { |
137 | const { href } = this.$router.resolve('/workFrameView?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&viewtype=1'); | 134 | const { href } = this.$router.resolve('/workFrameView?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&viewtype=1'); | ... | ... |
-
Please register or sign in to post a comment