Commit f658e01c authored by 黄奎's avatar 黄奎

页面修改

parent 8151297f
......@@ -26,7 +26,7 @@
@keyup.enter.native="msg.pageIndex=1,getPageList()" @clear="msg.pageIndex=1,getPageList()"></el-input>
<button type="button" class="normalBtn"
@click="plugTitle='新增diy插件',marketingPlugDialog=true,resetMsg()">新增</button>
<button type="button" class="normalBtn" @click="CommonJump('setformplug',{})">设置表单组件</button>
</div>
<table class="commonTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
......
......@@ -88,6 +88,7 @@
setArray.push({
Id: 0,
PlugId: subItem.PlugId,
QPlugTypeStr:"1,2,3",
TenantId: this.TenantId
});
}
......
<style>
.setDiyPlugDiv .query-box {
width: 100%;
padding: 0 0 20px;
border-bottom: 1px solid #ccc;
position: relative;
text-align: right;
}
.setDiyPlugDiv .normalBtn {
color: #fff;
padding: 0 15px;
height: 30px;
background: #e95252;
border: 1px solid #e95252;
cursor: pointer;
border-radius: 15px;
margin-left: 10px;
outline: none;
}
</style>
<template>
<div class="setDiyPlugDiv">
<div class="query-box">
<button type="button" class="normalBtn" @click="setMiniProgramPage()">保存</button>
<button type="button" class="normalBtn" @click="CommonJump('formplug',{})">插件中心</button>
</div>
<table class="commonTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th style="width:200px">插件类型</th>
<th>插件名称</th>
</tr>
<tr v-for="(item,index) in dataList" :key="index">
<td>
<el-checkbox v-model="item.IsChecked" :key="index" @change="ChangeItem(item)">{{item.Name}}
</el-checkbox>
</td>
<td style="text-align:left; padding-left:5px;">
<template v-for="(subItem,subIndex) in item.SubList">
<el-checkbox v-model="subItem.IsChecked" :key="subIndex">{{subItem.Name}}</el-checkbox>
</template>
</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
dataList: [],
TenantId: 0, //商户Id
};
},
created() {
},
methods: {
ChangeItem(item) {
if (item.SubList && item.SubList.length > 0) {
item.SubList.forEach(subItem => {
subItem.IsChecked = item.IsChecked;
})
}
},
//获取分页数据
getPageList() {
this.apipost("/api/MContent/GetTenantPlugList", {
QPlugTypeStr: "4"
}, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
} else {
this.Info(res.data.message);
}
})
},
//添加修改插件
setMiniProgramPage() {
var setArray = []; //新增修改的数组
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.SubList && item.SubList.length > 0) {
item.SubList.forEach(subItem => {
if (subItem.IsChecked) {
setArray.push({
Id: 0,
PlugId: subItem.PlugId,
QPlugTypeStr:"4",
TenantId: this.TenantId
});
}
})
}
})
}
if (setArray.length == 0) {
this.Info("请选择要操作的插件!");
return;
}
this.apipost("/api/MContent/SetTenantPlug", setArray, res => {
if (res.data.resultCode == 1) {
this.getPageList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.TenantId = this.getLocalStorage().TenantId;
this.getPageList();
}
};
</script>
<template>
<div class="brandClassification">
<div class="head-title">
品牌分类管理
<el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="goRegistrationAdd()">
自定义榜单报名表单
<el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="goRegistrationAdd(null)">
新增</el-button>
</div>
<div class="content">
<div>
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:225px;height:30px" placeholder="请输入品牌分类名称" v-model="msg.ClassName" size="small"
clearable>
style="display:inline-block;width:225px;height:30px" placeholder="表单名称" v-model="msg.FormName" size="small"
clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="ID" label="编号" width="100">
<el-table-column prop="Id" label="编号" width="100">
</el-table-column>
<el-table-column prop="ClassName" label="表单名称">
<el-table-column prop="FormName" label="表单名称">
</el-table-column>
<el-table-column prop="Logo" width="150" label="表单名称">
<el-table-column prop="FormTypeStr" width="150" label="类型">
</el-table-column>
<el-table-column prop="CreateDate" width="200" label="对应榜单类型">
<el-table-column prop="CreateDate" width="200" label="创建时间">
</el-table-column>
<el-table-column prop="" width="130" label="表单项目">
</el-table-column>
<el-table-column prop="address" width="200" label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img style="width:32px;height:32px" src="../../assets/img/userman/edit.png"
alt="">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img style="width:32px;height:32px" src="../../assets/img/userman/edit.png" @click="goRegistrationAdd(scope.row)" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<img style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt="">
<el-tooltip class="item" effect="dark" content="删除" placement="top-start" >
>
<img style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" @click="delCustomForm(scope.row)" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="预览" placement="top-start">
<img style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/icon-show.png" alt="">
<img style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/icon-show.png" alt="">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange"
:page-size="msg.pageSize" :current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
:current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
components: {
},
components: {},
data() {
return {
msg: {
pageIndex: 1,
pageSize: 10,
ClassName: '',
FormName: '',
},
total: 0,
tableData: [], //数据列表
loading:false
loading: false
};
},
created() {
//this.getList();
this.getList();
},
methods: {
getList() {
this.loading = true;
this.apipost("/api/Trade/GetBrandClassPageList", this.msg, res => {
this.apipost("/api/CustomForm/GetCustomFormPage", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
......@@ -87,14 +84,13 @@
this.msg.pageIndex = val;
this.getList();
},
//删除品牌分类
delNews(item) {
//删除自定义表单
delCustomForm(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/Trade/RemoveBrandClass", {
Id: item.ID,
Status: 1
"/api/CustomForm/RemoveCustomeForm", {
Id: item.Id,
},
res => {
if (res.data.resultCode == 1) {
......@@ -108,12 +104,19 @@
});
},
//新增组件
goRegistrationAdd(){
goRegistrationAdd(item) {
var obj = {
blank: "y",
};
if (item) {
obj = {
blank: "y",
Id: item.Id,
};
}
this.$router.push({
name: "registrationAdd",
query: {
blank: "y",
},
query: obj,
});
}
},
......@@ -122,7 +125,6 @@
</script>
<style>
.brandClassification .content {
background: #fff;
margin-top: 10px;
......
......@@ -85,6 +85,11 @@ export default new Router({
name: 'formplug',
component: resolve => require(['@/components/system/formplug'], resolve),
},
{
path: '/setformplug', //设置表单组件
name: 'setformplug',
component: resolve => require(['@/components/system/setformplug'], resolve),
},
]
},
{
......
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