Commit 1cd691f0 authored by 黄奎's avatar 黄奎

页面修改

parent 60a388ba
<template>
<div>
<div class="searchInput" style="margin-bottom:20px;">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入模板名称" v-model="qMsg.TemplateName"
size="small" clearable @keyup.enter.native="qMsg.pageIndex=1,getList()" @clear="qMsg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="qMsg.pageIndex=1,getList()"> </span>
</div>
<br>
<el-table :data="dataList" style="width: 100%">
<el-table-column prop="Id" label="ID" width="100">
</el-table-column>
......@@ -25,6 +33,7 @@
qMsg: {
pageIndex: 1,
pageSize: 20,
TemplateName: ""
}
}
},
......
......@@ -226,8 +226,21 @@
<div style="margin-bottom:5px;">
<el-input type="text" placeholder="名称" v-model="item.name" size="small"></el-input>
</div>
<div>
<el-input type="text" placeholder="组件名称" v-model="item.url" size="small"></el-input>
<div style="margin-bottom:5px;">
<el-radio-group v-model="item.ShowType">
<el-radio :label="0">组件</el-radio>
<el-radio :label="1">模板</el-radio>
</el-radio-group>
</div>
<div v-if="item.ShowType==0" style="margin-bottom:5px;">
<el-input type="text" v-model="item.ComponentName" placeholder="选择组件" size="small">
<el-button slot="append" @click="isShowModule=true,commonIndex=index">选择组件</el-button>
</el-input>
</div>
<div v-if="item.ShowType==1" style="margin-bottom:5px;">
<el-input type="text" v-model="item.TemplateShowName" placeholder="点击选择模板" size="small">
<el-button slot="append" @click="isShowModule=true,commonIndex=index">选择模板</el-button>
</el-input>
</div>
</div>
</div>
......@@ -302,30 +315,24 @@
</el-form-item>
</el-form>
</div>
<el-dialog title="导航链接" :visible.sync="isShowNavLink" width="800px">
<Navigation ref="Navigation"></Navigation>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowNavLink=false">取 消</el-button>
<el-button size="small" type="danger" @click="getMyLink()">确 定</el-button>
</span>
</el-dialog>
<el-dialog title="选择链接" :visible.sync="isShowLink" width="800px">
<chooseMenu ref="chooseMenu"></chooseMenu>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowLink=false">取 消</el-button>
<el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button>
</span>
</el-dialog>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择模板 -->
<el-dialog title="选择模板" :visible.sync="isShowModule" width="910px">
<choiceModule ref="choiceModule" @getCustom="getCustom"></choiceModule>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowModule = false">取 消</el-button>
<el-button size="small" type="primary" @click="choiceModule()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Navigation from "../../common/NavigationLinks.vue";
import chooseMenu from "../../common/chooseMenu.vue";
import ChooseImg from "@/components/global/ChooseImg.vue";
import choiceModule from "@/components/common/choiceModule.vue";
export default {
props: ["navData", "index", "dataLeng"],
......@@ -334,25 +341,30 @@
bgPostion: '',
//宽度
navWidth: '',
isShowNavLink: false,
//弹窗
isShowLink: false,
//数组下标
commonIndex: 0,
//选择图片弹窗
choicImg: false,
selectType: 1,
isShowModule: false, //是否显示选择模板
};
},
components: {
Navigation,
chooseMenu,
ChooseImg
ChooseImg,
choiceModule
},
created() {
},
methods: {
//选择模板
getCustom(obj) {
if (this.commonIndex > -1) {
this.navData.data.navs[this.commonIndex].TemplateId = obj.Id;
this.navData.data.navs[this.commonIndex].TemplateShowName = '#' + obj.Id + ':' + obj.TemplateName;
}
this.isShowModule = false;
},
//是否显示背景图切换
showImgChange() {
if (!this.navData.data.showImg) {
......@@ -380,9 +392,11 @@
let obj = {
icon: '',
name: '',
url: '',
openType: 'navigate',
key: 'diy'
ShowType:0,//0-组件,1-模板
ComponentName:"",//组件名称
url:"",//组件URL
TemplateId: 0,
TemplateShowName: "",
}
this.navData.data.navs.push(obj);
},
......@@ -390,23 +404,7 @@
delIcon(index) {
this.navData.data.navs.splice(index, 1);
},
//点击确定获取linK
getMyLink() {
var ckedArr = this.$refs.Navigation.getChooseLink();
this.navData.data.navs = this.navData.data.navs.concat(ckedArr);
this.isShowNavLink = false;
},
getMyChoice(index) {
this.isShowLink = true;
this.commonIndex = index;
},
//获取选择链接
getChoiceLink() {
//调用子组件方法
var obj = this.$refs.chooseMenu.getChooseMenu();
this.navData.data.navs[this.commonIndex].url = obj.PageUrl;
this.isShowLink = false;
},
//选择图片
SelectId(msg) {
if (this.selectType == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment