Commit ed0dc520 authored by 黄媛媛's avatar 黄媛媛
parents 81c1c15a 88df9a35
......@@ -40,6 +40,9 @@
.w200{
width:200px!important;
}
.w150{
width:150px!important;
}
.el-icon-search{
cursor: pointer;
}
......
......@@ -11,32 +11,38 @@
<div class="content">
<div>
<el-alert title="员工登录入口链接:" :closable='false' type="info" style="margin-bottom:20px;">
<span>http://wx.weibaoge.cn/web/index.php?r=admin/passport/login&mall_id=MTI4NQ==</span>
<el-button size="mini" style="margin-left:20px;">复制链接</el-button>
<span id="my_Link">http://wx.weibaoge.cn/web/index.php?r=admin/passport/login&mall_id=MTI4NQ==</span>
<el-button size="mini" style="margin-left:20px;" @click="copyCode()">复制链接</el-button>
</el-alert>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入用户昵称"
v-model="msg.NavIconName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入用户昵称" v-model="msg.EmpName"
size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
</div>
</div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="ID" label="ID" width="80">
<el-table-column prop="EmpId" label="ID" width="80">
</el-table-column>
<el-table-column prop="EmpName" label="昵称">
</el-table-column>
<el-table-column prop="EmpAccount" label="用户名">
</el-table-column>
<el-table-column prop="CreateTime" label="添加日期" width="220">
<el-table-column prop="CreateDateStr" label="添加日期" width="220">
</el-table-column>
<el-table-column label="操作" width="260">
<template slot-scope="scope">
<el-tooltip slot="label" class="item" effect="dark" content="编辑" placement="top">
<img @click="EditRole(scope.row)" src="../../assets/img/userman/edit.png" alt="">
<img @click="upPwddialog=true" style="margin:0 10px;" src="../../assets/img/userman/change.png" alt="">
<img @click="RemmoveRole(scope.row)" src="../../assets/img/userman/del.png"
alt="">
</el-tooltip>
<el-tooltip slot="label" class="item" effect="dark" content="修改密码" placement="top">
<img @click="upPwddialog=true,pwdMsg.EmpId=scope.row.EmpId" style="margin:0 10px;"
src="../../assets/img/userman/change.png" alt="">
</el-tooltip>
<el-tooltip slot="label" class="item" effect="dark" content="删除" placement="top">
<img @click="RemmoveRole(scope.row)" src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
</el-table>
......@@ -56,16 +62,18 @@
<el-input v-model="addMsg.EmpAccount" class="w400" size="small" maxlength="20" />
</el-form-item>
<el-form-item label="密码" prop="EmpPwd">
<el-input type="text" v-model="addMsg.EmpPwd" size="small" class="w400" />
<el-input type="password" v-model="addMsg.EmpPwd" size="small" class="w400" />
</el-form-item>
<el-form-item label="昵称" prop="EmpName">
<el-input type="text" v-model="addMsg.EmpName" size="small" class="w400" />
</el-form-item>
<el-form-item label="角色">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选
</el-checkbox>
<div style="margin: 15px 0;"></div>
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
<el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
<el-checkbox-group v-model="checkArr" @change="handleCheckedCitiesChange">
<el-checkbox v-for="item in RoleList" :label="item.RoleId" :key="item.RoleName">{{item.RoleName}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
......@@ -77,48 +85,46 @@
<el-dialog title="提示" :visible.sync="upPwddialog" width="400px">
<el-form label-width="0">
<p style="padding:10px 0">请输入新密码</p>
<el-input type="text" v-model="pwdMsg.password"></el-input>
<el-input type="password" v-model="pwdMsg.EmpPwd"></el-input>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="upPwddialog = false">取 消</el-button>
<el-button size="small" type="primary">确 定</el-button>
<el-button size="small" type="primary" @click="UpdatePwd()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
const cityOptions = ['上海', '北京', '广州', '深圳'];
export default {
data() {
return {
loading: false,
//修改密码弹窗
upPwddialog:false,
upPwddialog: false,
//全选
checkAll: false,
isIndeterminate: true,
checkedCities: ['上海', '北京'],
cities: cityOptions,
dataList: [{
ID:699,
EmpName:'李四',
EmpAccount:'ck',
CreateTime:'2020-10-25'
}],
checkArr: [], //选中数组
dataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
EmpName: ''
},
pwdMsg:{
password:''
//修改密码
pwdMsg: {
EmpPwd: '',
EmpId: 0,
},
total: 0,
empIsShowAdd: true,
addMsg: {
EmpId: 0, //员工编号
EmpAccount: '', //用户名
EmpPwd: '', //密码
EmpName: '', //昵称
RoleAuth: '' //角色
},
RoleList: [], //角色列表
rules: {
RoleName: [{
required: true,
......@@ -142,12 +148,24 @@
},
methods: {
UpdatePwd() {
this.apipost("/api/Employee/SetEmployeePwd", this.pwdMsg, res => {
if (res.data.resultCode == 1) {
this.getList();;
this.upPwddialog = false;
this.Success(res.data.message);
this.pwdMsg.EmpPwd='';
} else {
this.Info(res.data.message);
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.apipost("/api/Employee/GetRolePageList", this.msg, res => {
this.apipost("/api/Employee/GetEmployeePageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
......@@ -168,9 +186,8 @@
},
//保存
saveMsg() {
var ckedKeys = this.$refs.tree.getCheckedKeys();
this.addMsg.RoleAuth = ckedKeys.join(',');
this.apipost("/api/Employee/SetRole", this.addMsg, res => {
this.addMsg.RoleAuth = this.checkArr.join(',');
this.apipost("/api/Employee/SetEmployee", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.clearInfo();
......@@ -182,23 +199,27 @@
},
//清空
clearInfo() {
this.addMsg.RoleId = 0;
this.addMsg.RoleName = '';
this.addMsg.RoleIntro = '';
this.addMsg.EmpId = 0;
this.addMsg.EmpAccount = '';
this.addMsg.EmpPwd = '';
this.addMsg.EmpName = '';
this.addMsg.RoleAuth = '';
},
//修改
EditRole(item) {
this.apipost("/api/Employee/GetRole", {
RoleId: item.RoleId
this.apipost("/api/Employee/GetEmployee", {
EmpId: item.EmpId
}, res => {
if (res.data.resultCode == 1) {
this.checkArr = [];
this.addMsg = res.data.data;
this.empIsShowAdd = false;
let newArr = this.addMsg.RoleAuth.split(',');
setTimeout(() => {
this.$refs.tree.setCheckedKeys(newArr);
}, 10)
if (this.addMsg.RoleAuth != '') {
this.checkArr = newArr.map(function (data) {
return +data;
})
}
} else {
this.Info(res.data.message);
}
......@@ -208,8 +229,8 @@
RemmoveRole(item) {
var that = this;
that.Confirm("是否要删除?", function () {
that.apipost("/api/Employee/RemoveRole", {
RoleId: item.RoleId
that.apipost("/api/Employee/RemoveEmployee", {
EmpId: item.EmpId
}, res => {
if (res.data.resultCode == 1) {
that.getList();
......@@ -219,20 +240,42 @@
})
})
},
//全选
handleCheckAllChange(val) {
this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
this.checkArr = [];
if (val) {
this.RoleList.forEach(x => {
this.checkArr.push(x.RoleId);
});
}
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
}
this.checkAll = checkedCount === this.RoleList.length;
},
copyCode() {
var copycode = document.getElementById("my_Link").innerHTML;
var input = document.createElement("input"); // 直接构建input
input.value = copycode; // 设置内容
document.body.appendChild(input); // 添加临时实例
input.select(); // 选择实例内容
document.execCommand("Copy"); // 执行复制
document.body.removeChild(input); // 删除临时实例
},
//获取角色列表
getRoleList() {
this.apipost("/api/Employee/GetRoleList", {}, res => {
if (res.data.resultCode == 1) {
this.RoleList = res.data.data;
} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
//this.getList();
this.getRoleList();
this.getList();
}
};
......@@ -266,14 +309,18 @@
padding: 20px;
box-sizing: border-box;
}
.EmployeList .el-alert__content{
.EmployeList .el-alert__content {
display: flex;
align-items:center;
align-items: center;
}
.EmployeList .el-alert{
padding:0 0 5px 5px;
.EmployeList .el-alert {
padding: 0 0 5px 5px;
}
.EmployeList .el-alert__title{
margin-top:5px;
.EmployeList .el-alert__title {
margin-top: 5px;
}
</style>
......@@ -11,7 +11,7 @@
<div>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入角色名称"
v-model="msg.NavIconName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
v-model="msg.RoleName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
......@@ -24,9 +24,9 @@
</el-table-column>
<el-table-column prop="RoleIntro" label="备注/描述">
</el-table-column>
<el-table-column prop="Creater" label="创建者" width="150">
<el-table-column prop="CreateByName" label="创建者" width="150">
</el-table-column>
<el-table-column prop="CreateTime" label="添加日期" width="220">
<el-table-column prop="CreateDateStr" label="添加日期" width="220">
</el-table-column>
<el-table-column label="操作" width="260">
<template slot-scope="scope">
......@@ -77,6 +77,7 @@
msg: {
pageIndex: 1,
pageSize: 15,
RoleName:"",
},
total: 0,
roleIsShowAdd: true,
......
<template>
<div class="special">
<template v-if="speciaIsShowAdd">
<div class="head-title">
专题
<el-button @click="speciaIsShowAdd=false,clearInfo()" style="float:right;margin-top: -5px;" size="small"
type="primary">
新增
</el-button>
</div>
<div class="content">
<div>
<el-select size="small" class="w150" v-model="msg.TopicTypeId">
<el-option label="全部专题" :value="0"></el-option>
<el-option v-for="item in TypeList" :key="item.Id" :label="item.TopicName" :value="item.Id">
</el-option>
</el-select>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" v-model="msg.Title"
size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
</div>
</div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="Id" label="ID" width="100">
</el-table-column>
<el-table-column prop="TopicName" label="分类" width="120">
</el-table-column>
<el-table-column prop="Title" label="专题">
</el-table-column>
<el-table-column prop="FlexTypeStr" label="布局方式" width="120">
</el-table-column>
<el-table-column prop="IsChoiceStr" label="是否精选" width="100">
</el-table-column>
<el-table-column prop="SortNum" label="排序" width="200">
</el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<img @click="EditRole(scope.row)" src="../../assets/img/userman/edit.png" alt="">
<img @click="RemmoveRole(scope.row)" src="../../assets/img/userman/del.png" alt="">
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange"
:page-size="msg.pageSize" layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<template v-else>
<div class="head-title">
<span @click="speciaIsShowAdd=true" style="color:rgb(64, 158, 255);cursor:pointer;">专题</span><span
style="margin:0 9px;color:#C0C4CC">/</span><span>专题编辑</span>
</div>
<div class="content">
<el-tabs v-model="activeName">
<el-tab-pane label="基础设置" name="first">
<div class="contentTwo">
<el-form label-width="10rem">
<el-form-item label="标题">
<el-input type="text" maxlength="100" size="small" v-model="addMsg.Title"></el-input>
</el-form-item>
<el-form-item label="专题列表布局方式">
<el-radio-group v-model="addMsg.FlexType">
<el-radio :label="1">小图模式</el-radio>
<el-radio :label="2">大图模式</el-radio>
<el-radio :label="3">多图模式</el-radio>
</el-radio-group>
<div class="flexTypeList">
小图模式建议封面图片大小:268×202;大图模式建议封面图片大小:702×350;多图模式建议封面图片大小:268×202,最多上传3张图片
</div>
</el-form-item>
<el-form-item label="封面图">
<el-tooltip class="item" effect="dark" content="建议尺寸: 268 * 202" placement="top">
<el-button size="mini" @click="choicImg=true">选择图片</el-button>
</el-tooltip>
<div class="customize-share-title">
<div class="zk_pic_box" style="width:80px;height:80px;" flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(addMsg.CoverImg) + ')'}">
<i v-if="addMsg.CoverImg==''" class="el-icon-picture-outline"></i>
</div>
</div>
</el-form-item>
<el-form-item>
<span slot="label">摘要</span>
<el-tooltip slot="label" class="item" effect="dark" content="专题内容的简介,用于列表上显示" placement="top">
<i class="el-icon-info"></i>
</el-tooltip>
<el-input type="textarea" size="small" v-model="addMsg.Abstract" :rows="2"></el-input>
</el-form-item>
<el-form-item label="自定义分享标题">
<el-input type="text" size="small" v-model="addMsg.CustomTitle"></el-input>
</el-form-item>
<el-form-item label="自定义分享图片">
<el-tooltip class="item" effect="dark" content="建议尺寸:420 * 336" placement="top">
<el-button size="mini" @click="choicImg=true">选择图片</el-button>
</el-tooltip>
<div class="customize-share-title">
<div class="zk_pic_box" style="width:80px;height:80px;" flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(addMsg.CustomImg) + ')'}">
<i v-if="addMsg.CustomImg==''" class="el-icon-picture-outline"></i>
</div>
</div>
</el-form-item>
<el-form-item label="是否精选">
<el-switch v-model="addMsg.IsChoice" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<el-form-item label="分类">
<el-select v-model="addMsg.TopicTypeId" size="small">
<el-option :key="0" label="请选择" :value="0">
</el-option>
<el-option v-for="item in TypeList" :key="item.Id" :label="item.TopicName" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<span slot="label">虚拟阅读量</span>
<el-tooltip slot="label" class="item" effect="dark" content="手机端显示的阅读量=实际阅读量+虚拟阅读量" placement="top">
<i class="el-icon-info"></i>
</el-tooltip>
<el-input type="text" size="small" v-model="addMsg.ReadNum"
@keyup.native="checkInteger(addMsg,'ReadNum')" maxlength="8"></el-input>
</el-form-item>
<el-form-item label="排序">
<el-input type="text" size="small" v-model="addMsg.SortNum"
@keyup.native="checkInteger(addMsg,'SortNum')" maxlength="2"></el-input>
</el-form-item>
</el-form>
</div>
</el-tab-pane>
<el-tab-pane label="详情设置" name="second">
<div style="position: relative; margin-bottom: 10px; height: 621px;">
<div class="all-components">
<div class="component-list">
<div class="component-item" @click="setPlugin('rubik')">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/rubik.png" alt="">
<div class="component-name">图片广告</div>
</div>
<div class="component-item" @click="setPlugin('video')">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/video.png" alt="">
<div class="component-name">视频</div>
</div>
<div class="component-item" @click="setPlugin('imgtext')">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/image-text.png" alt="">
<div class="component-name">图文详情</div>
</div>
</div>
</div>
<div class="special_Content">
<div class="mobile-framework">
<div class="mobile-framework-header"></div>
<div class="mobile-framework-body">
<!-- 为空的样式开始 -->
<div v-if="pluginData.length==0" flex="main:center cross:center"
style="height: 200px; color: rgb(173, 177, 184); text-align: center;">
<div>
<i class="el-icon-folder-opened" style="font-size: 32px; margin-bottom: 10px;"></i>
<div>空空如也</div>
<div>请从左侧组件库添加组件</div>
</div>
</div>
<!-- 为空的样式结束 -->
<div v-for="(item,index) in pluginData" :key="index" @click="getItem(item)">
<rubik v-if="item.Id=='rubik'" :rubData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="pluginData.length"></rubik>
<myvideo v-if="item.Id=='video'" :videoData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length"></myvideo>
<imageText v-if="item.Id=='imgtext'" :imageData="item" @getSord="getSord"
@comDelPlugin="comDelPlugin" :index="index" :dataLeng="dataList.length"></imageText>
</div>
</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import rubik from "../sallCenter/plugin/rubik.vue"
import myvideo from "../sallCenter/plugin/video.vue"
import imageText from "../sallCenter/plugin/image-text.vue"
export default {
components: {
ChooseImg,
rubik,
myvideo,
imageText
},
data() {
return {
loading: false,
activeName: 'first',
pluginData: [],
TypeList: [], //分类列表
dataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
TopicTypeId: 0,
Title: "",
},
pwdMsg: {
password: ''
},
total: 0,
speciaIsShowAdd: true,
addMsg: {
Id: 0,
Title: '', //标题
FlexType: 1, //专题列表布局方式
CoverImg: '', //封面图
Abstract: '', //摘要
CustomTitle: '', //自定义分享标题
CustomImg: '', //自定义分享图片
IsChoice: 0, //是否精选
TopicTypeId: 0, //分类
ReadNum: 0, //虚拟阅读量
SortNum: 0, //排序
ComponentDataList: [], //插件
},
rules: {
RoleName: [{
required: true,
message: "请输入用户名",
trigger: "blur"
}],
},
};
},
created() {
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.apipost("/api/MContent/GetTopicPageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
submitform(addMsg) {
//提交创建、修改表单
// this.$refs[addMsg].validate(valid => {
// if (valid) {
// } else {
// return false;
// }
// });
this.saveMsg();
},
//保存
saveMsg() {
this.addMsg.ComponentDataList = this.pluginData;
this.apipost("/api/MContent/SetTopic", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.clearInfo();
this.speciaIsShowAdd = true;
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
//清空
clearInfo() {
this.addMsg.Id = 0;
this.addMsg.Title = '';
this.addMsg.FlexType = 1;
this.addMsg.CoverImg = '';
this.addMsg.Abstract = '';
this.addMsg.CustomTitle = '';
this.addMsg.CustomImg = '';
this.addMsg.IsChoice = 0;
this.addMsg.TopicTypeId = 0;
this.addMsg.ReadNum = 0;
this.addMsg.SortNum = 0;
this.addMsg.ComponentDataList = [];
},
//修改
EditRole(item) {
this.apipost("/api/MContent/GetTopic", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
this.addMsg.Id = jsonData.Id;
this.addMsg.Title = jsonData.Title;
this.addMsg.FlexType = jsonData.FlexType;
this.addMsg.CoverImg = jsonData.CoverImg;
this.addMsg.Abstract = jsonData.Abstract;
this.addMsg.CustomTitle = jsonData.CustomTitle;
this.addMsg.CustomImg = jsonData.CustomImg;
this.addMsg.IsChoice = jsonData.IsChoice;
this.addMsg.TopicTypeId = jsonData.TopicTypeId;
this.addMsg.ReadNum = jsonData.ReadNum;
this.addMsg.SortNum = jsonData.SortNum;
this.addMsg.ComponentDataList = jsonData.ComponentDataList;
this.speciaIsShowAdd = false;
} else {
this.Info(res.data.message);
}
})
},
//删除
RemmoveRole(item) {
var that = this;
that.Confirm("是否要删除?", function () {
that.apipost("/api/MContent/RemoveRole", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
that.getList();
} else {
that.Info(res.data.message);
}
})
})
},
//点击设置组件
setPlugin(Id) {
switch (Id.toString()) {
//图片广告
case 'rubik':
let rubObj = {
Id: 'rubik',
isCked: false,
data: {
style: -1, //样式-选取几张图
space: 0, //图片件间隔
height: 0, //选中的第几张图 对应的style_list里的height
w: 1, //选中的第几张图 对应的style_list里的w
h: 1, //选中的第几张图 对应的style_list里的h
list: [], //选中的第几张图的小区域对应的数据
hotspot: [] //热区划分
}
}
this.pluginData.push(rubObj);
break;
//视频
case 'video':
let videoObj = {
Id: 'video',
isCked: false,
data: {
pic_url: '', //图片地址
url: '' //视频地址
}
}
this.pluginData.push(videoObj);
break;
//图文详情
case 'imgtext':
let tuwenObj = {
Id: 'imgtext',
isCked: false,
data: {
content: '',
}
}
this.pluginData.push(tuwenObj);
break;
}
},
//给子组件调用 重新排序上移下移
getSord(index, IsUp) {
var currentItem = this.pluginData[index];
if (IsUp == 0) {
if (index > 0) {
var upItem = this.pluginData[index - 1];
this.$set(this.pluginData, index - 1, currentItem);
this.$set(this.pluginData, index, upItem);
}
} else {
if (index != this.pluginData.length - 1) {
var downItem = this.pluginData[index + 1];
this.$set(this.pluginData, index + 1, currentItem);
this.$set(this.pluginData, index, downItem);
}
}
},
//删除组件事件
comDelPlugin(index) {
this.pluginData.splice(index, 1);
},
//点击选中
getItem(item) {
this.pluginData.forEach(x => {
x.isCked = false;
})
item.isCked = true;
},
getTypeList() {
this.apipost("/api/MContent/GetTopicTypeList", {}, res => {
if (res.data.resultCode == 1) {
this.TypeList = res.data.data;
} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
this.getTypeList();
this.getList();
}
};
</script>
<style>
.special .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.special .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.special .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.special .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.special .contentTwo {
min-width: 1000px;
padding: 20px;
padding-right: 50%;
}
.special .el-alert__content {
display: flex;
align-items: center;
}
.special .el-alert {
padding: 0 0 5px 5px;
}
.special .el-alert__title {
margin-top: 5px;
}
.special .flexTypeList {
color: rgb(99, 108, 114);
font-size: 12px;
margin-top: -0.5rem;
}
.all-components {
width: 422px;
background: #fff;
max-height: 625px;
overflow-y: auto;
}
.all-components .component-list {
display: flex;
flex-wrap: wrap;
border: 0 solid #eeeeee;
border-width: 1px 0 0 1px;
}
.all-components .component-list .component-item {
width: 140px;
height: 100px;
border: 0 solid #eeeeee;
border-width: 0 1px 1px 0;
text-align: center;
padding: 15px 0 0;
cursor: pointer;
}
.all-components .component-list .component-item img {
width: 40px;
height: 40px;
}
.special_Content {
width: 430px;
overflow: hidden auto;
margin-top: 16px;
height: 605px;
}
.special_Content .mobile-framework {
width: 420px;
padding: 22px 22px 22px 23px;
background-color: #FFFFFF;
border-radius: 16px;
}
.special_Content .mobile-framework-header {
height: 60px;
line-height: 60px;
background: #333;
color: #fff;
text-align: center;
background: url(../../assets/img/storeDesign/topic-head.png) no-repeat;
border: 0 solid #eeeeee;
border-width: 2px 2px 0 2px;
width: 375px;
}
.special_Content .mobile-framework-body {
width: 375px;
min-height: 500px;
border: 1px solid #e2e2e2;
background: #f5f7f9;
}
.diy-component-options .el-button {
height: 25px;
line-height: 25px;
width: 25px;
padding: 0;
text-align: center;
border: none;
border-radius: 0;
position: absolute;
margin-left: 0;
}
.diy-component-preview {
cursor: pointer;
position: relative;
zoom: 0.5;
-moz-transform: scale(0.5);
-moz-transform-origin: top left;
font-size: 28px;
}
.diy-component-edit {
position: absolute;
top: 0;
bottom: 0;
left: 465px;
right: 0;
background: #fff;
padding: 20px;
overflow: auto;
min-width: 650px;
padding-right: 20%;
}
.diy-component-options {
position: relative;
}
.active .diy-component-preview {
border: 2px dashed #409EFF;
left: -2px;
right: -2px;
width: calc(100% + 4px);
}
</style>
......@@ -589,13 +589,13 @@
Id: 'topic',
isCked: false,
data: {
style: 'normal',
count: 1,
logo_1: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-topic-1.png',
logo_2: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-topic-2.png',
icon: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-topic-r.png',
style: 'normal',//专题样式
count: 1,//显示行数
logo_1: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-topic-1.png',//logo(1行)
logo_2: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-topic-2.png',//logo(2行)
icon: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-topic-r.png',//专题标签
list: [],
cat_show: false,
cat_show: false,//是否显示分类
topic_list: []
}
}
......
......@@ -328,6 +328,12 @@ export default new Router({
name: 'ProjectClassific',
component: resolve => require(['@/components/StoreDesign/ProjectClassific'], resolve),
},
//店铺管理 内容管理 专题
{
path: '/special',
name: 'special',
component: resolve => require(['@/components/StoreDesign/special'], resolve),
},
//店铺管理 内容管理 视频管理
{
path: '/videoManage',
......
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