124b73ca by 杨威

宗地右键添加定着物功能

1 parent 332dd659
......@@ -56,14 +56,19 @@
<li v-show="isZD">导入属性</li>
<li v-show="!isZD">导入楼盘</li>
<li>重叠分析</li>
<li v-show="isZD">添加定着物</li>
<li v-show="isZD" @click="openCreateDialog">添加定着物</li>
<li @click="deleteByBsm()">删除</li>
</ul>
<!-- 添加定着物弹框 -->
<el-dialog title="新建" :visible.sync="dialogVisible" width="40%">
<Create @closeDialog="closeDialog" :auth="true"></Create>
</el-dialog>
</div>
</template>
<script>
import lineItem from "./lineItem.vue";
import {deleteZdInfoByBsm} from "../../api/zd";
import Create from "../../views/panel/create/index";
export default {
inheritAttrs: false,
props: {
......@@ -73,7 +78,7 @@ export default {
default: 14,
},
},
components: { lineItem },
components: { lineItem,Create },
data() {
return {
selectedDetail: {},
......@@ -83,7 +88,8 @@ export default {
top: 0,
left: 0,
isZD: true,
zdData:{}
zdData:{},
dialogVisible:false
};
},
watch: {
......@@ -115,6 +121,14 @@ export default {
changeIsZD(data) {
this.isZD = data;
},
//添加定着物
openCreateDialog(){
this.dialogVisible = true
},
//关闭添加定着物弹框
closeDialog() {
this.dialogVisible = false;
},
preDealData(list) {
list.forEach((x) => {
if (!x.expand) this.$set(x, "expand", true);
......
......@@ -36,7 +36,7 @@
<Navigation ref="navigation"></Navigation>
</div> -->
<el-dialog title="新建" :visible.sync="dialogVisible" width="40%">
<Create @closeDialog="closeDialog"></Create>
<Create @closeDialog="closeDialog" :auth="false"></Create>
</el-dialog>
</el-header>
<el-main>
......
......@@ -6,7 +6,7 @@
type="card"
class="eltabs"
@tab-click="handleClick">
<el-tab-pane class="eltabspane" label="宗地" name="zd">
<el-tab-pane class="eltabspane" v-if="!auth" label="宗地" name="zd">
<el-form :inline="true" :rules="rules" :model="ruleForm" ref="ruleForm" class="demo-form-inline">
<el-form-item label="行政区划" required prop="xzqbsm">
<el-select v-model="ruleForm.xzqbsm" style="width:100px;" value-key="xzqbsm" placeholder="行政区" @change="changeXzq(ruleForm.xzqbsm)">
......@@ -82,7 +82,7 @@
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane class="eltabspane" label="宗海" name="zh">宗海</el-tab-pane>
<el-tab-pane class="eltabspane" v-if="!auth" label="宗海" name="zh">宗海</el-tab-pane>
<el-tab-pane class="eltabspane" label="自然幢" name="zrz">
<el-form :inline="true" :rules="rules1" :model="ruleForm1" ref="ruleForm1" class="zrzProject">
<el-form-item label="项目名称" prop="xmmc">
......@@ -133,12 +133,12 @@ import { insertDzjbxx } from "../../../api/dz";
export default {
name: "",
components: {},
props: {},
props: ['auth'],
data() {
return {
tabPosition: "left",
//默认第一个选项卡
activeName: "zd",
activeName: "",
zrzProjectName: "",
xzq: [],
djq: [],
......@@ -211,7 +211,10 @@ export default {
created() {
this.getXzqList();
},
mounted() {},
mounted() {
console.log(this,'this');
this.activeName = this.auth ? 'zrz':'zd'
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
......