This commit is contained in:
parent
18dbbfc42d
commit
d9a0403981
|
@ -1,6 +1,21 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-ability__bsabilityai">
|
||||
<div class="second-title">
|
||||
<div
|
||||
|
||||
:class="[choose === 0 ? 'departmentStyle' : 'departmentStyle1']"
|
||||
@click="handleChose(0)"
|
||||
>
|
||||
市级领域场景
|
||||
</div>
|
||||
<div
|
||||
:class="[choose === 1 ? 'departmentStyle' : 'departmentStyle1']"
|
||||
@click="handleChose(1)"
|
||||
>
|
||||
基层场景
|
||||
</div>
|
||||
</div>
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" placeholder="名称" clearable></el-input>
|
||||
|
@ -40,21 +55,36 @@
|
|||
</el-pagination>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-update-scene v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="query" @closeModal="closeModal"
|
||||
<!-- <add-update-scene v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="query" @closeModal="closeModal"
|
||||
:addOrUpdateVisible="addOrUpdateVisible" :modalType="modalType">
|
||||
</add-update-scene>
|
||||
</add-update-scene> -->
|
||||
<!-- 市级挂接 -->
|
||||
<city-add v-if="cityVisible" ref="cityAdd" @refreshDataList="query" @closeModal="closeModal"
|
||||
:cityVisible="cityVisible" :modalType="modalType">
|
||||
</city-add>
|
||||
<!--基层挂架-->
|
||||
<area-add v-if="areaVisible" ref="areaAdd" @refreshDataList="query" @closeModal="closeModal"
|
||||
:areaVisible="areaVisible" :modalType="modalType">
|
||||
</area-add>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddUpdateScene from "./add-update-scene";
|
||||
|
||||
import cityAdd from "./city-add";
|
||||
import areaAdd from "./area-add";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
//市级挂接
|
||||
cityVisible:false,
|
||||
//基层挂接
|
||||
areaVisible:false,
|
||||
//tab切换
|
||||
choose: 0,
|
||||
tableData: [],
|
||||
childName: '',
|
||||
mixinViewModuleOptions: {
|
||||
|
@ -69,20 +99,27 @@ export default {
|
|||
name: "",
|
||||
order: 'desc',
|
||||
orderField: 'create_date',
|
||||
type: '赋能场景'
|
||||
type: '赋能场景',
|
||||
district: 0//0市级 1基层
|
||||
|
||||
},
|
||||
qp: false,
|
||||
modalType: 'add',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddUpdateScene,
|
||||
areaAdd,
|
||||
cityAdd
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("resize", this.a);
|
||||
this.fullScreen();
|
||||
},
|
||||
methods: {
|
||||
handleChose(index) {
|
||||
this.choose = index;
|
||||
this.searchData()
|
||||
},
|
||||
deleteRow(id) {
|
||||
this.$confirm('确认是否删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
|
@ -112,6 +149,7 @@ export default {
|
|||
},
|
||||
// 查询
|
||||
searchData() {
|
||||
this.dataForm.district=this.choose
|
||||
this.query()
|
||||
},
|
||||
// 重置
|
||||
|
@ -121,20 +159,36 @@ export default {
|
|||
},
|
||||
// 修改
|
||||
handleUpdate(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
if(this.choose==0){
|
||||
this.cityVisible=true
|
||||
}else{
|
||||
this.areaVisible=true
|
||||
}
|
||||
|
||||
this.modalType = 'update';
|
||||
const cloneVal = JSON.parse(JSON.stringify(val))
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.getDetail(cloneVal)
|
||||
if(this.choose==0){
|
||||
this.$refs.cityAdd.getDetail(cloneVal)
|
||||
}else{
|
||||
this.$refs.areaAdd.getDetail(cloneVal)
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 挂接
|
||||
addServe() {
|
||||
this.addOrUpdateVisible = true
|
||||
//this.addOrUpdateVisible = true
|
||||
this.modalType = 'add';
|
||||
if(this.choose===0){
|
||||
this.cityVisible=true
|
||||
}else{
|
||||
this.areaVisible=true
|
||||
}
|
||||
},
|
||||
closeModal() {
|
||||
this.addOrUpdateVisible = false;
|
||||
this.cityVisible = false;
|
||||
this.areaVisible=false;
|
||||
},
|
||||
// 详情
|
||||
showDetail(val) {
|
||||
|
@ -164,6 +218,32 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.second-title {
|
||||
margin-bottom: 16px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
background: rgb(0,0,0,0.03);
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.departmentStyle {
|
||||
float: left;
|
||||
width: 100px;
|
||||
color: #0058e1;
|
||||
background-color: #fff;
|
||||
border-right: 1px solid #d9d9d9;
|
||||
border-left: 1px solid #d9d9d9;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
}
|
||||
.departmentStyle1 {
|
||||
|
||||
float: left;
|
||||
width: 100px;
|
||||
}
|
||||
.el-tooltip__popper {
|
||||
max-width: 50%;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue