Commit 5be6bd63 authored by 黄奎's avatar 黄奎

页面修改

parent 87701097
...@@ -3,183 +3,79 @@ ...@@ -3,183 +3,79 @@
<template> <template>
<div class="head-title"> <div class="head-title">
管理员列表 管理员列表
<el-button <el-button @click="showDialog" style="float:right;margin-top: -5px;" size="small" type="primary">
@click="showDialog"
style="float:right;margin-top: -5px;"
size="small"
type="primary"
>
添加管理员 添加管理员
</el-button> </el-button>
</div> </div>
<div class="content"> <div class="content">
<div <div class="searchInput" style="display:inline-block;width:200px;">
class="searchInput" <el-select v-model="msg.Source" placeholder="请选择" size="small" @change="(msg.pageIndex = 1),getList()">
style="display:inline-block;width:200px;" <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
>
<el-select
v-model="msg.platform"
placeholder="请选择"
size="small"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="searchInput"> <div class="searchInput">
<el-input <el-input style="display:inline-block;width:260px;height:30px" placeholder="请输入ID/昵称/手机号/备注/联系方式"
style="display:inline-block;width:260px;height:30px" v-model="msg.Name" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()"
placeholder="请输入ID/昵称/手机号/备注/联系方式" @clear="msg.pageIndex=1,getList()">
v-model="msg.PageName" <i slot="suffix" class="el-input__icon el-icon-search" @click="msg.pageIndex=1,getList()"></i>
size="small"
clearable
@keyup.enter.native="msg.pageIndex=1,getList()"
@clear="msg.pageIndex=1,getList()"
>
<i
slot="suffix"
class="el-input__icon el-icon-search"
@click="msg.pageIndex=1,getList()"
></i>
</el-input> </el-input>
</div> </div>
<br> <br>
<el-table <el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
:data="dataList" <el-table-column prop="AdminId" label="ID" width="100">
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>
<el-table-column <el-table-column prop="Photo" label="头像">
prop="PageName"
label="头像"
>
</el-table-column>
<!-- <el-table-column
label="导航与模板"
prop="DetailsList"
width="500"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div class="templat-list"> <div class="app-image" :style="{
<template backgroundImage: 'url(' + scope.row.Photo + ')',
v-if="scope.row.DetailsList && scope.row.DetailsList.length>0" backgroundSize: 'cover',
v-for="(subItem,subIndex) in scope.row.DetailsList" }"></div>
> <div flex="dir:left cross:center">
<div {{ scope.row.Name }}
class="templat-item"
:key="subIndex"
>
<div>{{subItem.NavName}}</div>
<div style="color: rgb(153, 153, 153);">{{subItem.TemplateShowName}}</div>
</div>
</template>
</div> </div>
<img v-if="scope.row.Source == 1" style="width: 24px; height: 24px" src="../../assets/img/userman/wx.png"
alt="" class="platform-img" />
<img v-if="scope.row.Source == 2" style="width: 30px; height: 30px"
src="../../assets/img/userman/alipay.png" alt="" class="platform-img" />
</template> </template>
</el-table-column> -->
<el-table-column
prop="IsHome"
label="手机号"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Moblie" label="手机号">
prop="IsHome"
label="加入时间"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="CreateDate" label="加入时间">
label="操作" </el-table-column>
width="180" <el-table-column label="操作" width="180">
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip <el-tooltip class="item" effect="dark" content="移除管理员" placement="top">
class="item" <img @click="removeAdmin(scope.row)" style="width:32px;height:32px;margin:0 10px"
effect="dark" src="../../assets/img/userman/renew.png" alt="">
content="移除管理员"
placement="top"
>
<img
@click="removeAdmin(scope.row)"
style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/renew.png"
alt=""
>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination style="text-align:right" background @current-change="handleCurrentChange"
style="text-align:right" :page-size="msg.pageSize" layout="prev, pager, next" :total="total">
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<el-dialog <el-dialog title="设置管理员" :visible.sync="isShowModule" width="600px">
title="设置管理员" <el-form :model="addMsg" :rules="addMsgRules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
:visible.sync="isShowModule" <el-form-item label="昵称搜索" prop="Name">
width="600px" <el-select v-model="addMsg.UserId" placeholder="请选择" filterable>
> <el-option v-for="item in adminOptions" :key="item.Id" :label="item.Name" :value="item.Id">
<el-form
:model="addMsg"
:rules="addMsgRules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item
label="昵称搜索"
prop="Name"
>
<el-select
v-model="addMsg.Name"
placeholder="请选择"
filterable
>
<el-option
v-for="item in adminOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span <span slot="footer" class="dialog-footer">
slot="footer" <el-button size="small" @click="isShowModule = false">取 消</el-button>
class="dialog-footer" <el-button size="small" type="primary" @click="submitForm('ruleForm')">确 定</el-button>
>
<el-button
size="small"
@click="isShowModule = false"
>取 消</el-button>
<el-button
size="small"
type="primary"
@click="submitForm('ruleForm')"
>确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
...@@ -187,17 +83,17 @@ export default { ...@@ -187,17 +83,17 @@ export default {
isShowModule: false, isShowModule: false,
dataList: [], dataList: [],
msg: { msg: {
platform: 1, Source: "",
PageName: "", //页面名称 Name: "",
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
}, },
addMsg: { addMsg: {
Name: "", AdminId: 0,
UserId: "",
}, },
total: 0, total: 0,
options: [ options: [{
{
value: 0, value: 0,
label: "不限", label: "不限",
}, },
...@@ -212,21 +108,36 @@ export default { ...@@ -212,21 +108,36 @@ export default {
], ],
adminOptions: [], adminOptions: [],
addMsgRules: { addMsgRules: {
Name: [{ required: true, message: "请输入名称", trigger: "blur" }], UserId: [{
required: true,
message: "请选择小程序用户",
trigger: "blur"
}],
}, },
}; };
}, },
methods: { methods: {
showDialog(){ showDialog() {
this.isShowModule=true; this.isShowModule = true;
this.addMsg.Name=""; this.addMsg.UserId = "";
}, },
submitForm(formName) { submitForm(formName) {
var that = this;
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); that.apipost(
'/api/user/SetMiniprogramAdmin',
that.addMsg,
(res) => {
if (res.data.resultCode === 1) {
that.getList();
that.Success(res.data.message);
that.isShowModule=false;
} else {
that.Error(res.data.message);
}
});
} else { } else {
console.log("error submit!!");
return false; return false;
} }
}); });
...@@ -237,7 +148,7 @@ export default { ...@@ -237,7 +148,7 @@ export default {
}, },
getList() { getList() {
this.apipost( this.apipost(
"/api/", "/api/user/GetMiniprogramAdminPage",
this.msg, this.msg,
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -254,10 +165,8 @@ export default { ...@@ -254,10 +165,8 @@ export default {
let that = this; let that = this;
that.Confirm("是否删除?", function () { that.Confirm("是否删除?", function () {
that.apipost( that.apipost(
"", "/api/user/DeleteMiniprogramAdmin", {
{ AdminId: item.AdminId,
Id: item.Id,
Status: 1,
}, },
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -269,62 +178,88 @@ export default { ...@@ -269,62 +178,88 @@ export default {
); );
}); });
}, },
//获取用户列表
getUserList() {
var qMsg={PageIndex:1,PageSize:1000000};
this.apipost(
"/api/user/GetMemberUserDropDownList", qMsg,
(res) => {
if (res.data.resultCode == 1) {
this.adminOptions = res.data.data.pageData;
} else {
this.Info(res.data.message);
}
}
);
}
}, },
mounted() { mounted() {
// this.getList(); this.getUserList();
this.getList();
}, },
}; };
</script> </script>
<style> <style>
.CustomPage .templat-list { .CustomPage .app-image {
background-position: center center;
width: 50px;
height: 50px;
border-radius: 0%;
float: left;
margin-right: 8px;
}
.CustomPage .templat-list {
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
} }
.CustomPage .templat-item { .CustomPage .templat-item {
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
display: flex; display: flex;
font-size: 13px; font-size: 13px;
} }
.templat-item:nth-child(odd) { .templat-item:nth-child(odd) {
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.templat-item:nth-child(even) { .templat-item:nth-child(even) {
background-color: #fff; background-color: #fff;
} }
.CustomPage .templat-item div { .CustomPage .templat-item div {
width: 50%; width: 50%;
padding-left: 20px; padding-left: 20px;
} }
.CustomPage .Custom_item { .CustomPage .Custom_item {
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
background-color: #fff; background-color: #fff;
color: #303133; color: #303133;
-webkit-transition: 0.3s; -webkit-transition: 0.3s;
transition: 0.3s; transition: 0.3s;
margin-bottom: 10px; margin-bottom: 10px;
} }
.CustomPage .Custom_item > div { .CustomPage .Custom_item>div {
padding: 20px; padding: 20px;
} }
.CustomPage .content { .CustomPage .content {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
padding: 20px; padding: 20px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.CustomPage .conten_indder { .CustomPage .conten_indder {
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
padding-right: 50%; padding-right: 50%;
min-width: 1100px; min-width: 1100px;
} }
</style> </style>
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