跳转逻辑修改

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,56 +71,56 @@
</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 () {
return { return {
// //
cityVisible:false, cityVisible: false,
// //
areaVisible:false, areaVisible: false,
//tab // tab
choose: 0, choose: 0,
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: '赋能场景',
district: 0//0 1 district: 0// 0 1
}, },
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) {
this.$confirm('确认是否删除?', '提示', { this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -131,91 +131,94 @@ 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 () {
this.dataForm.district=this.choose this.dataForm.district = this.choose
this.query() this.query()
}, },
// //
reset() { reset () {
this.dataForm.name = ""; this.dataForm.name = ''
this.query() this.query()
}, },
// //
handleUpdate(val) { handleUpdate (val) {
if(this.choose==0){ if (this.choose == 0) {
this.cityVisible=true this.cityVisible = true
}else{ } else {
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) {
this.$refs.cityAdd.getDetail(cloneVal) this.$refs.cityAdd.getDetail(cloneVal)
}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 {
this.areaVisible=true this.areaVisible = true
} }
}, },
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 {