跳转逻辑修改

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>
<script>
import mixinViewModule from "@/mixins/view-module";
import mixinViewModule from '@/mixins/view-module'
import cityAdd from "./city-add";
import areaAdd from "./area-add";
import cityAdd from './city-add'
import areaAdd from './area-add'
export default {
mixins: [mixinViewModule],
data() {
data () {
return {
//
cityVisible:false,
//
areaVisible:false,
//tab
//
cityVisible: false,
//
areaVisible: false,
// tab
choose: 0,
tableData: [],
childName: '',
mixinViewModuleOptions: {
getDataListURL: "/fuse/page",
exportURL: "/ability/bsabilityai/export",
deleteURL: "/fuse",
getDataListURL: '/fuse/page',
exportURL: '/ability/bsabilityai/export',
deleteURL: '/fuse',
getDataListIsPage: true,
deleteIsBatch: false,
deleteIsBatch: false
},
disabled: false,
dataForm: {
name: "",
name: '',
order: 'desc',
orderField: 'create_date',
type: '赋能场景',
district: 0//0 1
district: 0// 0 1
},
qp: false,
modalType: 'add',
};
modalType: 'add'
}
},
components: {
areaAdd,
cityAdd
},
mounted() {
window.addEventListener("resize", this.a);
this.fullScreen();
mounted () {
window.addEventListener('resize', this.a)
this.fullScreen()
},
methods: {
handleChose(index) {
this.choose = index;
handleChose (index) {
this.choose = index
this.searchData()
},
deleteRow(id) {
deleteRow (id) {
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -131,91 +131,94 @@ export default {
}).then(res => {
console.log('删除成功', res)
if (res.data.code !== 0) {
return this.$message.error(res.msg);
return this.$message.error(res.msg)
}
this.$message({
message: '删除成功',
type: "success",
type: 'success',
duration: 500,
onClose: () => {
this.query()
},
});
}
})
}).catch(err => {
this.$message.error(err);
this.$message.error(err)
})
}).catch(() => {
});
})
},
//
searchData() {
this.dataForm.district=this.choose
searchData () {
this.dataForm.district = this.choose
this.query()
},
//
reset() {
this.dataForm.name = "";
reset () {
this.dataForm.name = ''
this.query()
},
//
handleUpdate(val) {
if(this.choose==0){
this.cityVisible=true
}else{
this.areaVisible=true
handleUpdate (val) {
if (this.choose == 0) {
this.cityVisible = true
} else {
this.areaVisible = true
}
this.modalType = 'update';
this.modalType = 'update'
const cloneVal = JSON.parse(JSON.stringify(val))
this.$nextTick(() => {
if(this.choose==0){
if (this.choose == 0) {
this.$refs.cityAdd.getDetail(cloneVal)
}else{
this.$refs.areaAdd.getDetail(cloneVal)
}
} else {
this.$refs.areaAdd.getDetail(cloneVal)
}
})
},
//
addServe() {
//this.addOrUpdateVisible = true
this.modalType = 'add';
if(this.choose===0){
this.cityVisible=true
}else{
this.areaVisible=true
addServe () {
// this.addOrUpdateVisible = true
this.modalType = 'add'
if (this.choose === 0) {
this.cityVisible = true
} else {
this.areaVisible = true
}
},
closeModal() {
this.cityVisible = false;
this.areaVisible=false;
closeModal () {
this.cityVisible = false
this.areaVisible = false
},
//
showDetail(val) {
window.open(window.SITE_CONFIG.previewUrl + '#/integrationServicesDetails?id=' + val.id)
showDetail (val) {
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.outerWidth === screen.availWidth) {
console.log(
"全屏1",
);
this.qp = false;
'全屏1'
)
this.qp = false
} else {
console.log(
"不是全屏2",
);
this.qp = true;
'不是全屏2'
)
this.qp = true
}
} else {
console.log(
"不是全屏3",
);
this.qp = true;
'不是全屏3'
)
this.qp = true
}
},
},
};
}
}
}
</script>
<style lang="scss" scoped>
.second-title {