跳转逻辑修改

This commit is contained in:
a0049873 2023-01-06 16:56:48 +08:00
parent 0004ceb7f0
commit f7b79f6ae8
1 changed files with 73 additions and 70 deletions

View File

@ -71,10 +71,10 @@
</template> </template>
<script> <script>
import mixinViewModule from "@/mixins/view-module"; import mixinViewModule from '@/mixins/view-module'
import cityAdd from "./city-add"; import cityAdd from './city-add'
import areaAdd from "./area-add"; import areaAdd from './area-add'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
@ -88,15 +88,15 @@ export default {
tableData: [], tableData: [],
childName: '', childName: '',
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: "/fuse/page", getDataListURL: '/fuse/page',
exportURL: "/ability/bsabilityai/export", exportURL: '/ability/bsabilityai/export',
deleteURL: "/fuse", deleteURL: '/fuse',
getDataListIsPage: true, getDataListIsPage: true,
deleteIsBatch: false, deleteIsBatch: false
}, },
disabled: false, disabled: false,
dataForm: { dataForm: {
name: "", name: '',
order: 'desc', order: 'desc',
orderField: 'create_date', orderField: 'create_date',
type: '赋能场景', type: '赋能场景',
@ -104,20 +104,20 @@ export default {
}, },
qp: false, qp: false,
modalType: 'add', modalType: 'add'
}; }
}, },
components: { components: {
areaAdd, areaAdd,
cityAdd cityAdd
}, },
mounted () { mounted () {
window.addEventListener("resize", this.a); window.addEventListener('resize', this.a)
this.fullScreen(); this.fullScreen()
}, },
methods: { methods: {
handleChose (index) { handleChose (index) {
this.choose = index; this.choose = index
this.searchData() this.searchData()
}, },
deleteRow (id) { deleteRow (id) {
@ -131,21 +131,21 @@ export default {
}).then(res => { }).then(res => {
console.log('删除成功', res) console.log('删除成功', res)
if (res.data.code !== 0) { if (res.data.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: "success", type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.query() this.query()
}, }
}); })
}).catch(err => { }).catch(err => {
this.$message.error(err); this.$message.error(err)
}) })
}).catch(() => { }).catch(() => {
}); })
}, },
// //
searchData () { searchData () {
@ -154,7 +154,7 @@ export default {
}, },
// //
reset () { reset () {
this.dataForm.name = ""; this.dataForm.name = ''
this.query() this.query()
}, },
// //
@ -165,7 +165,7 @@ export default {
this.areaVisible = true this.areaVisible = true
} }
this.modalType = 'update'; this.modalType = 'update'
const cloneVal = JSON.parse(JSON.stringify(val)) const cloneVal = JSON.parse(JSON.stringify(val))
this.$nextTick(() => { this.$nextTick(() => {
if (this.choose == 0) { if (this.choose == 0) {
@ -173,13 +173,12 @@ export default {
} else { } else {
this.$refs.areaAdd.getDetail(cloneVal) this.$refs.areaAdd.getDetail(cloneVal)
} }
}) })
}, },
// //
addServe () { addServe () {
// this.addOrUpdateVisible = true // this.addOrUpdateVisible = true
this.modalType = 'add'; this.modalType = 'add'
if (this.choose === 0) { if (this.choose === 0) {
this.cityVisible = true this.cityVisible = true
} else { } else {
@ -187,35 +186,39 @@ export default {
} }
}, },
closeModal () { closeModal () {
this.cityVisible = false; this.cityVisible = false
this.areaVisible=false; this.areaVisible = false
}, },
// //
showDetail (val) { showDetail (val) {
window.open(window.SITE_CONFIG.previewUrl + '#/integrationServicesDetails?id=' + val.id) if (val.district == 0) {
window.open(window.SITE_CONFIG.previewUrl + '#/integrationServicesDetails?id=' + val.id + '&districtType=0&type=典型赋能场景')
} else {
window.open(window.SITE_CONFIG.previewUrl + '#/integrationServicesDetails?id=' + val.id + '&districtType=1&type=典型赋能场景')
}
}, },
fullScreen () { fullScreen () {
if (window.outerHeight === screen.availHeight) { if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) { if (window.outerWidth === screen.availWidth) {
console.log( console.log(
"全屏1", '全屏1'
); )
this.qp = false; this.qp = false
} else { } else {
console.log( console.log(
"不是全屏2", '不是全屏2'
); )
this.qp = true; this.qp = true
} }
} else { } else {
console.log( console.log(
"不是全屏3", '不是全屏3'
); )
this.qp = true; this.qp = true
}
}
}
} }
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.second-title { .second-title {