96142a2c by 任超

style:业务办理

1 parent 84361e33
......@@ -3,12 +3,12 @@ import Loading from '@/components/loading/index.js';
let loading
// loading开始 方法
function startLoading (target = 'body', loadingText = '正在加载中...') {
function startLoading (loadingText = '正在加载中...') {
loading = Loading.service({
text: loadingText,
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.5)',
target: '#' + target
target: document.querySelector('.loadingtext')
})
}
......
......@@ -55,10 +55,11 @@
</el-row>
</el-form>
</div>
<div class="from-clues-content" id="dbx">
<lb-table :page-size="pageData.size" border @sort-change="handleSort" :current-page.sync="pageData.currentPage"
:heightNum="300" :total="tableData.total" @size-change="handleSizeChange"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
<div class="from-clues-content">
<lb-table :page-size="pageData.size" class="loadingtext" border @sort-change="handleSort"
:current-page.sync="pageData.currentPage" :heightNum="300" :total="tableData.total"
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
</lb-table>
</div>
<searchBox v-model="isSearch" @getSearch="getSearch" />
......@@ -95,26 +96,12 @@ export default {
},
mounted () {
sendThis(this);
window.addEventListener('visibilitychange', this.init, true)
this.queryClick()
},
destroyed () {
window.removeEventListener('visibilitychange', this.init, true)
},
created () { },
methods: {
init (e) {
var isHidden = document.hidden;
if (isHidden) {//切离该页面时执行
//页面切换时,处理逻辑
} else {//切换到该页面时执行
if (window.location.hash == '#/ywbl/dbx') {
this.fetchData()
}
}
},
// 列表渲染接口
fetchData () {
this.$startLoading('dbx')
queryClick () {
this.$startLoading()
searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => {
if (res.code === 200) {
this.$endLoading()
......@@ -132,9 +119,6 @@ export default {
}
})
},
queryClick () {
this.fetchData()
},
handelItem (index) {
console.log(index);
this.searchList.splice(index, 1)
......@@ -142,7 +126,7 @@ export default {
handleSort (val) {
this.queryForm.sortField = val.prop
this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc'
this.fetchData()
this.queryClick()
},
del (item) {
let formdata = new FormData();
......@@ -159,7 +143,7 @@ export default {
type: 'success',
message: '删除成功!'
});
this.fetchData()
this.queryClick()
} else {
this.$message.error(res.message);
}
......
......@@ -33,14 +33,14 @@
</el-col>
<el-col :span="5">
<el-form-item label="业务号">
<el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick()" clearable class="width200px">
<el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick" clearable class="width200px">
</el-input>
</el-form-item>
</el-col>
<el-col :span="4" class="btnColRight">
<el-form-item>
<el-button type="primary" native-type="submit" @click="queryClick()">查询</el-button>
<el-button type="primary" native-type="submit" @click="queryClick">查询</el-button>
<el-button @click="moreQueryClick()">高级查询</el-button>
</el-form-item>
</el-col>
......@@ -60,7 +60,7 @@
</div>
<!-- 表格 -->
<div class="from-clues-content">
<lb-table :page-size="pageData.size" id="ybxLoading" :heightNum="300" @sort-change="handleSort" border
<lb-table :page-size="pageData.size" class="loadingtext" :heightNum="300" @sort-change="handleSort" border
:current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
</lb-table>
......@@ -81,6 +81,7 @@ export default {
mixins: [table, searchMin],
mounted () {
sendThis(this);
this.queryClick()
},
computed: {
...mapGetters(['dictData'])
......@@ -106,13 +107,12 @@ export default {
};
},
methods: {
init (e) {
this.fetchData()
},
// 列表渲染接口
fetchData () {
queryClick () {
this.$startLoading()
searchTaskDone({ ...this.queryForm, ...this.pageData }, { 'target': '#ybxLoading' }).then(res => {
if (res.code === 200) {
this.$endLoading()
let { total, records } = res.result
this.pageData.total = total;
records.forEach(item => {
......@@ -125,13 +125,10 @@ export default {
}
})
},
queryClick () {
this.fetchData()
},
handleSort (val) {
this.queryForm.sortField = val.prop
this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc'
this.fetchData()
this.queryClick()
},
ywhClick (item) {
const { href } = this.$router.resolve('/workFrameView?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&viewtype=1');
......