购物车返回第一页bug

This commit is contained in:
gaoyuanwei 2022-07-21 09:59:17 +08:00
parent 66a5d33609
commit eadcfdceaf
2 changed files with 46 additions and 3 deletions

View File

@ -67,7 +67,7 @@
</el-radio-group>
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
<el-button class="inputBule"@click.native="agreeOrNot($store.state.contentTabsActiveName)">提交</el-button>
</div>
</div>
@ -79,14 +79,22 @@
<script>
//
import processModule from '@/mixins/process-module'
import mixinViewModule from '@/mixins/view-module'
import debounce from 'lodash/debounce'
import qs from 'qs'
import RenProcessDetail from '@/components/ren-process-detail/src/ren-process-detail'
export default {
//
mixins: [processModule],
mixins: [mixinViewModule, processModule],
data () {
return {
// mixinViewModuleOptions: {
// getDataListURL: '/act/task/myToDoTaskPage',
// getDataListIsPage: true,
// activatedIsNeed: true,
// deleteIsBatch: true,
// deleteIsBatchKey: 'deploymentId'
// },
visible: true,
showKey: 0,
//
@ -227,7 +235,8 @@ export default {
.catch(() => {})
},
// 退
agreeOrNot: debounce(function () {
agreeOrNot: debounce(function (data) {
console.log(data)
if (this.agreeOrList === '同意') {
console.log('this.dataForm', this.dataForm)
const params = qs.stringify({
@ -281,7 +290,35 @@ export default {
})
})
}
this.tabRemoveHandle(data)
// this.getDataList(data)
}, 1000, { leading: true, trailing: false }),
tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') {
return false
}
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== tabName
)
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName =
this.$store.state.contentTabsActiveName = 'home'
return false
}
// tab
if (tabName === this.$store.state.contentTabsActiveName) {
const tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
]
this.$router.push({
name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
params: { ...tab.params },
query: { ...tab.query }
})
}
},
//
startProcessErrorCallback (data) {
console.log(data)

View File

@ -1141,6 +1141,9 @@
console.log('paramsGetResources', paramsGetResources)
})
mybus.on('changeSelcted', () => {
//
paramsGetResources.pageNum = 1
currentPage.value = 1
getAppResources()
})
mybus.on('changeInfo', (info) => {
@ -1161,6 +1164,9 @@
getAppResources()
})
mybus.on('changeCondition', (condition) => {
// 1
paramsGetResources.pageNum = 1
currentPage.value = 1
// orderField: 'total' total visits 访 applyCount score collectCount
// orderType: 'ASC' ASC DESC
paramsGetResources.orderField = condition.orderField