跳转逻辑修改
This commit is contained in:
parent
0004ceb7f0
commit
f7b79f6ae8
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue