| | |
| | | <!-- 顶部自定义导航 --> |
| | | <!-- <view class=""> --> |
| | | |
| | | <tn-nav-bar fixed> |
| | | <tn-nav-bar fixed :isBack="false"> |
| | | <text class="page-title">信息</text> |
| | | </tn-nav-bar> |
| | | <!-- </view> --> |
| | |
| | | style="margin-top: 100px;"> |
| | | |
| | | <view v-for="(item, index) in list" :key="index"> |
| | | |
| | | |
| | | <view> |
| | | <tn-button class="modal-btn" backgroundColor="#01BEFF" size="sm" |
| | | @click="itemClick(item,index)">处理</tn-button> |
| | |
| | | }, 400) |
| | | }, |
| | | onLoad() { |
| | | console.log(4444444); |
| | | this.lock = false |
| | | |
| | | }, |
| | |
| | | const params = { |
| | | ids: this.checkboxValue1 |
| | | } |
| | | moreprocessingWarn(params).then((res) => { |
| | | if (res.code == 0) { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'success', |
| | | txt: '处理成功' |
| | | }); |
| | | this.show = false |
| | | // location.reload(); |
| | | this.handleRefresh({ |
| | | page: 1, |
| | | size: this.pageSize |
| | | }, () => { |
| | | // 可以在这里处理加载完成后的逻辑 |
| | | }); |
| | | } else { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'error', |
| | | txt: '处理失败' |
| | | }); |
| | | } |
| | | }) |
| | | if (this.vuex_is_login) { |
| | | moreprocessingWarn(params).then((res) => { |
| | | if (res.code == 0) { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'success', |
| | | txt: '处理成功' |
| | | }); |
| | | this.show = false |
| | | // location.reload(); |
| | | this.handleRefresh({ |
| | | page: 1, |
| | | size: this.pageSize |
| | | }, () => { |
| | | // 可以在这里处理加载完成后的逻辑 |
| | | }); |
| | | } else { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'error', |
| | | txt: '处理失败' |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | checkboxChange(n) { |
| | | this.show = true |
| | |
| | | size: data.size, |
| | | company: this.company, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | findwarning(params).then((res) => { |
| | | |
| | | findwarning(params).then((res) => { |
| | | console.log(res); |
| | | if (res.code == 0) { |
| | | let list = []; |
| | | setTimeout(() => { |
| | | let list = res.data.map(item => ({ |
| | | ...item, |
| | | checked: false // 初始化checked属性为false |
| | | })); |
| | | this.list = [...this.list, ...list]; |
| | | callback({ |
| | | list: this.list, |
| | | total: res.data.length |
| | | }); |
| | | }, 1500); |
| | | } |
| | | }) |
| | | if (res.code == 0) { |
| | | let list = []; |
| | | setTimeout(() => { |
| | | let list = res.data.map(item => ({ |
| | | ...item, |
| | | checked: false // 初始化checked属性为false |
| | | })); |
| | | this.list = [...this.list, ...list]; |
| | | callback({ |
| | | list: this.list, |
| | | total: res.data.length |
| | | }); |
| | | }, 1500); |
| | | } |
| | | }) |
| | | }else{ |
| | | callback({ |
| | | list: [], |
| | | total: 0 |
| | | }); |
| | | } |
| | | }, |
| | | handleSearch(data, callback) { |
| | | const params = { |
| | |
| | | objectid: this.keyword, |
| | | company: this.company, |
| | | } |
| | | |
| | | findwarning(params).then((res) => { |
| | | this.list = [] |
| | | if (res.code == 0) { |
| | | let list = []; |
| | | setTimeout(() => { |
| | | if (this.vuex_is_login) { |
| | | findwarning(params).then((res) => { |
| | | this.list = [] |
| | | if (res.code == 0) { |
| | | let list = []; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | list.push(res.data[i]); |
| | | } |
| | | this.list = [...this.list, ...list]; |
| | | callback({ |
| | | list: this.list, |
| | | total: res.data.length |
| | | }); |
| | | }, 1500); |
| | | } |
| | | }) |
| | | setTimeout(() => { |
| | | let list = []; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | list.push(res.data[i]); |
| | | } |
| | | this.list = [...this.list, ...list]; |
| | | callback({ |
| | | list: this.list, |
| | | total: res.data.length |
| | | }); |
| | | }, 1500); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 模拟请求数据刷新 |
| | | handleRefresh(data, callback) { |
| | | const params = { |
| | | current: data.page, |
| | | size: data.size, |
| | | objectid: data.objectid, |
| | | company: this.company, |
| | | } |
| | | findwarning(params).then((res) => { |
| | | if (res.code == 0) { |
| | | let list = []; |
| | | setTimeout(() => { |
| | | if (this.vuex_is_login) { |
| | | findwarning(params).then((res) => { |
| | | if (res.code == 0) { |
| | | let list = []; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | list.push(res.data[i]); |
| | | } |
| | | this.list = [] |
| | | this.list = [...this.list, ...list]; |
| | | callback({ |
| | | list: this.list, |
| | | total: res.data.length |
| | | }); |
| | | }, 1500); |
| | | } |
| | | }) |
| | | setTimeout(() => { |
| | | let list = []; |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | list.push(res.data[i]); |
| | | } |
| | | this.list = [] |
| | | this.list = [...this.list, ...list]; |
| | | callback({ |
| | | list: this.list, |
| | | total: res.data.length |
| | | }); |
| | | }, 1500); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | itemClick(item, index) { |
| | | console.log('点击了', item); |
| | | this.lock = true |
| | | this.warlist = item |
| | | this.warnindex = index |
| | |
| | | }, |
| | | prosuccess(e) { |
| | | this.lock = false |
| | | |
| | | |
| | | if (e == '已处理') { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'success', |