Commit 38b30b3f authored by 黄奎's avatar 黄奎

页面更新

parent 30ee0dc8
...@@ -10,22 +10,22 @@ ...@@ -10,22 +10,22 @@
<div class="el-scrollbar" style="height: 450px; width: 100%;"> <div class="el-scrollbar" style="height: 450px; width: 100%;">
<div class="el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;"> <div class="el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view"> <div class="el-scrollbar__view">
<li :class="PageMsg.GroupId==0?'selectActive' : ''" @click="SelectGroup(0)" class="el-menu-item" <li :class="PageMsg.GroupId == 0 ? 'selectActive' : ''" @click="SelectGroup(0)" class="el-menu-item"
style="padding-left: 10px;padding-right: 10px;"> style="padding-left: 10px;padding-right: 10px;">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>全部</span> <span>全部</span>
</li> </li>
<li :class="PageMsg.GroupId==item.Id?'selectActive' : ''" @click="SelectGroup(item.Id)" <li :class="PageMsg.GroupId == item.Id ? 'selectActive' : ''" @click="SelectGroup(item.Id)"
v-for="(item,index) in NewItems" :key="index" class="el-menu-item" v-for="(item, index) in NewItems" :key="index" class="el-menu-item"
style="padding-left: 10px;padding-right: 10px;"> style="padding-left: 10px;padding-right: 10px;">
<div flex="dir:left box:last"> <div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;"> <el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>{{item.Name}}</span> <span>{{ item.Name }}</span>
</el-col> </el-col>
<el-col class="blue" :span="6"> <el-col class="blue" :span="6">
<span v-if="scgroupMsg.Recycled==1" @click.prevent="EditGroup(item)">编辑</span> <span v-if="scgroupMsg.Recycled == 1" @click.prevent="EditGroup(item)">编辑</span>
| <span v-if="scgroupMsg.Recycled==1" @click.prevent="HsGroup(item)">删除</span> | <span v-if="scgroupMsg.Recycled == 1" @click.prevent="HsGroup(item)">删除</span>
</el-col> </el-col>
</div> </div>
</li> </li>
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<div style="margin-top: 10px;margin-left: 20px;" class="appendInput"> <div style="margin-top: 10px;margin-left: 20px;" class="appendInput">
<el-input size="small" style="width:250px" placeholder="请输入内容" @keyup.enter.native="GetPageList" v-model="PageMsg.Name"> <el-input size="small" style="width:250px" placeholder="请输入内容" @keyup.enter.native="GetPageList"
v-model="PageMsg.Name">
<el-button @click="GetPageList" slot="append" icon="el-icon-search"></el-button> <el-button @click="GetPageList" slot="append" icon="el-icon-search"></el-button>
</el-input> </el-input>
</div> </div>
...@@ -48,12 +49,12 @@ ...@@ -48,12 +49,12 @@
</div> </div>
</el-upload> </el-upload>
</div> </div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark" <el-tooltip v-for="(item, index) in PageList" :key="index" class="item" effect="dark"
:content="'双击选中【'+item.Name+'】'" placement="top-start"> :content="'双击选中【' + item.Name + '】'" placement="top-start">
<div @click="PageSelect(item,1)" @dblclick="PageSelect(item,2)" :class="getChecked(item) ? 'selected' :''" <div @click="PageSelect(item, 1)" @dblclick="PageSelect(item, 2)" :class="getChecked(item) ? 'selected' : ''"
class="el-tooltip item app-attachment-item"> class="el-tooltip item app-attachment-item">
<img :src="getIconLink(item.Path)" class="app-attachment-img" style="width: 100px; height: 100px;"> <img :src="getIconLink(item.Path)" class="app-attachment-img" style="width: 100px; height: 100px;">
<div class="app-attachment-name">{{item.Name}}</div> <div class="app-attachment-name">{{ item.Name }}</div>
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="Sort"> <el-form-item label="排序" prop="Sort">
<el-input @keyup.native="checkInteger(addGroupMsg,'Sort')" size="small" v-model="addGroupMsg.Sort"></el-input> <el-input @keyup.native="checkInteger(addGroupMsg, 'Sort')" size="small" v-model="addGroupMsg.Sort"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -89,338 +90,337 @@ ...@@ -89,338 +90,337 @@
</template> </template>
<script> <script>
export default { export default {
//是否多选 //是否多选
props: ["IsMultiple"], props: ["IsMultiple"],
name: 'ChooseImg', name: 'ChooseImg',
data() { data() {
return { return {
czType: 0, czType: 0,
searchVal: '', searchVal: '',
val: '', val: '',
Id: '', Id: '',
currentPage4: 1, currentPage4: 1,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
}, },
total: 0, total: 0,
loading: false, loading: false,
scgroupMsg: { scgroupMsg: {
Id: 0, Id: 0,
Name: '', Name: '',
Type: 1, Type: 1,
Recycled: 1, Recycled: 1,
}, },
groupList: [], groupList: [],
PageMsg: { PageMsg: {
Id: 0, Id: 0,
Name: '', Name: '',
Type: 1, Type: 1,
Recycled: 1, Recycled: 1,
pageIndex: 1, pageIndex: 1,
pageSize: 17, pageSize: 17,
GroupId: 0, GroupId: 0,
}, },
PageList: [], PageList: [],
addGroupMsgDig: false, addGroupMsgDig: false,
pageMsgDig: false, pageMsgDig: false,
addGroupMsg: { addGroupMsg: {
Id: 0, Id: 0,
Name: '', Name: '',
Type: '', Type: '',
Sort: '', Sort: '',
}, },
addGroupMsgrules: { addGroupMsgrules: {
Name: [{ Name: [{
required: true, required: true,
message: '请填写分组名称', message: '请填写分组名称',
trigger: 'blur' trigger: 'blur'
}], }],
Sort: [{ Sort: [{
required: true, required: true,
message: '请填写排序', message: '请填写排序',
trigger: 'blur' trigger: 'blur'
}], }],
}, },
addpageMsg: { addpageMsg: {
Id: 0, Id: 0,
Name: '', Name: '',
Type: 1, Type: 1,
GroupId: 0, GroupId: 0,
Path: '', Path: '',
Image: '', Image: '',
VideoTime: 0, VideoTime: 0,
WithHeight: 0, WithHeight: 0,
PathType:0 PathType: 0
}, },
selectId: -1, selectId: -1,
emitmsg: [], emitmsg: [],
} }
}, },
created() {}, created() { },
computed: { computed: {
NewItems() { NewItems() {
var _this = this; var _this = this;
var NewItems = []; var NewItems = [];
this.groupList.map(function (item) { this.groupList.map(function (item) {
if (item.Name.search(_this.searchVal) != -1) { if (item.Name.search(_this.searchVal) != -1) {
NewItems.push(item); NewItems.push(item);
}
});
return NewItems;
}
},
mounted() {
this.GetMemberGradeList();
this.GetPageList();
},
methods: {
getChecked(item) {
var isChecked = false;
if (this.emitmsg && this.emitmsg.length > 0) {
this.emitmsg.forEach(eItem => {
if (eItem.selectId == item.Id && !isChecked) {
isChecked = true;
} }
}); });
return NewItems;
} }
return isChecked;
}, },
mounted() { InitData(Type) {
this.GetMemberGradeList(); this.czType = Type;
this.GetPageList(); this.selectId = -1;
}, },
methods: { SelectImgId() {
getChecked(item) { //多选
var isChecked = false; if (this.IsMultiple) {
this.$emit('SelectId', this.emitmsg)
}
//单选
else {
if (this.emitmsg && this.emitmsg.length > 0) { if (this.emitmsg && this.emitmsg.length > 0) {
this.emitmsg.forEach(eItem => { var result = {
if (eItem.selectId == item.Id && !isChecked) { selectId: this.emitmsg[0].selectId,
isChecked = true; url: this.emitmsg[0].url
} };
}); this.$emit('SelectId', result)
} }
return isChecked; }
}, this.selectId = -1;
InitData(Type) { this.emitmsg = [];
this.czType = Type; },
this.selectId = -1; UploadImage(file) {
}, this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => {
SelectImgId() { if (res.resultCode == 1) {
//多选 this.addpageMsg.Path = res.FileUrl;
if (this.IsMultiple) { this.addpageMsg.Name = res.FileName;
this.$emit('SelectId', this.emitmsg) this.addPageList();
}
//单选
else {
if (this.emitmsg && this.emitmsg.length > 0) {
var result = {
selectId: this.emitmsg[0].selectId,
url: this.emitmsg[0].url
};
this.$emit('SelectId', result)
}
} }
this.selectId = -1; })
this.emitmsg = []; },
}, // 新增素材信息
UploadImage(file) { addPageList() {
this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => { var upInfo = JSON.parse(localStorage.uploadInfo);
if (res.resultCode == 1) { if (upInfo) {
this.addpageMsg.Path = res.FileUrl; this.addpageMsg.PathType = upInfo.StoreType;
this.addpageMsg.Name = res.FileName; }
this.addPageList(); this.apipost("/api/product/SetGetMaterialInfo", this.addpageMsg, res => {
} if (res.data.resultCode == 1) {
}) this.GetPageList();
},
// 新增素材信息
addPageList() {
var upInfo = JSON.parse(localStorage.uploadInfo);
if(upInfo){
this.addpageMsg.PathType=upInfo.StoreType;
} }
this.apipost("/api/product/SetGetMaterialInfo", this.addpageMsg, res => { })
if (res.data.resultCode == 1) { },
this.GetPageList(); //选择图片 clickType 1单击 2双击
} PageSelect(item, clickType) {
}) //多选
}, if (this.IsMultiple) {
//选择图片 clickType 1单击 2双击 var findIndex = this.emitmsg.findIndex(eItem => eItem.selectId == item.Id);
PageSelect(item, clickType) { if (findIndex > -1) {
//多选 //第二次点击相同图片就删除
if (this.IsMultiple) { this.emitmsg.splice(findIndex, 1)
var findIndex = this.emitmsg.findIndex(eItem => eItem.selectId == item.Id);
if (findIndex > -1) {
//第二次点击相同图片就删除
this.emitmsg.splice(findIndex, 1)
} else {
this.emitmsg.push({
selectId: item.Id,
url: item.Path
});
}
} else { } else {
this.emitmsg = [];
this.emitmsg.push({ this.emitmsg.push({
selectId: item.Id, selectId: item.Id,
url: item.Path url: item.Path
}); });
} }
this.selectId = item.Id; } else {
if (clickType == 2) { this.emitmsg = [];
this.SelectImgId(); this.emitmsg.push({
} selectId: item.Id,
}, url: item.Path
addGroup() { });
this.addGroupMsgDig = true; }
this.addGroupMsg = { this.selectId = item.Id;
Id: 0, if (clickType == 2) {
Name: '', this.SelectImgId();
Type: 1, }
Sort: '', },
} addGroup() {
}, this.addGroupMsgDig = true;
//删除分组 this.addGroupMsg = {
HsGroup(item) { Id: 0,
let that = this; Name: '',
that.$confirm('是否删除?', '提示', { Type: 1,
confirmButtonText: '确定', Sort: '',
cancelButtonText: '取消', }
type: 'warning' },
}).then(() => { //删除分组
this.apipost('/api/product/SetMaterialGroupRecycled', { HsGroup(item) {
GroupId: item.Id let that = this;
}, that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/SetMaterialGroupRecycled', {
GroupId: item.Id
},
res => {
if (res.data.resultCode === 1) {
this.GetMemberGradeList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
}
);
}).catch(() => { });
},
EditGroup(item) {
this.addGroupMsgDig = true;
this.addGroupMsg = {
Id: item.Id,
Name: item.Name,
Type: item.Type,
Sort: item.Sort,
}
},
GroupsubmitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('/api/product/SetMaterialGroupInfo', this.addGroupMsg,
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.GetMemberGradeList(); this.GetMemberGradeList();
this.Success(res.data.message) this.Success(res.data.message)
this.addGroupMsgDig = false;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
} }
); );
}).catch(() => {}); } else {
}, return false;
EditGroup(item) {
this.addGroupMsgDig = true;
this.addGroupMsg = {
Id: item.Id,
Name: item.Name,
Type: item.Type,
Sort: item.Sort,
} }
}, });
GroupsubmitForm(formName) { },
this.$refs[formName].validate((valid) => { SelectGroup(id) {
if (valid) { this.PageMsg.GroupId = id;
this.apipost('/api/product/SetMaterialGroupInfo', this.addGroupMsg, this.addpageMsg.GroupId = id;
res => { this.GetPageList();
if (res.data.resultCode === 1) { },
this.GetMemberGradeList(); handleCurrentChange(val) {
this.Success(res.data.message) this.PageMsg.pageIndex = val;
this.addGroupMsgDig = false; this.GetPageList();
} else { },
this.Error(res.data.message); GetMemberGradeList() {
} this.loading = true;
} this.apipost("/api/product/GetMaterialGroupList", this.scgroupMsg, res => {
); this.loading = false;
} else { this.groupList = res.data.data;
return false; })
}
});
},
SelectGroup(id) {
this.PageMsg.GroupId = id;
this.addpageMsg.GroupId = id;
this.GetPageList();
},
handleCurrentChange(val) {
this.PageMsg.pageIndex = val;
this.GetPageList();
},
GetMemberGradeList() {
this.loading = true;
this.apipost("/api/product/GetMaterialGroupList", this.scgroupMsg, res => {
this.loading = false;
this.groupList = res.data.data;
})
},
GetPageList() {
this.loading = true;
this.apipost("/api/product/GetMaterialInfoPageList", this.PageMsg, res => {
this.loading = false;
this.total = res.data.data.count;
let data = res.data.data.pageData;
this.PageList = data;
})
},
}, },
} GetPageList() {
this.loading = true;
this.apipost("/api/product/GetMaterialInfoPageList", this.PageMsg, res => {
this.loading = false;
this.total = res.data.data.count;
let data = res.data.data.pageData;
this.PageList = data;
})
},
},
}
</script> </script>
<style> <style>
.ChooseImg .el-input.is-active .el-input__inner, .ChooseImg .el-input.is-active .el-input__inner,
.ChooseImg .el-input__inner:focus { .ChooseImg .el-input__inner:focus {
border-color: #DCDFE6; border-color: #DCDFE6;
} }
.ChooseImg .app-attachment-list .selected {
box-shadow: 0 0 0 1px #1ed0ff;
background: #daf5ff;
border-radius: 5px;
}
.ChooseImg .selectActive .el-icon-tickets { .ChooseImg .app-attachment-list .selected {
color: #409EFF; box-shadow: 0 0 0 1px #1ed0ff;
} background: #daf5ff;
border-radius: 5px;
}
.ChooseImg .selectActive { .ChooseImg .selectActive .el-icon-tickets {
color: #409EFF; color: #409EFF;
} }
.ChooseImg .app-attachment-name { .ChooseImg .selectActive {
color: #666666; color: #409EFF;
margin-top: 5px; }
font-size: 13px;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.ChooseImg .app-attachment-item .app-attachment-img { .ChooseImg .app-attachment-name {
display: block; color: #666666;
} margin-top: 5px;
font-size: 13px;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.ChooseImg .app-attachment-upload i { .ChooseImg .app-attachment-item .app-attachment-img {
font-size: 30px; display: block;
color: #909399; }
}
.ChooseImg .app-attachment-item { .ChooseImg .app-attachment-upload i {
display: inline-block; font-size: 30px;
cursor: pointer; color: #909399;
position: relative; }
float: left;
width: 120px;
height: 140px;
margin: 7.5px;
text-align: center;
padding: 10px 10px 0;
}
.ChooseImg .app-attachment-upload { .ChooseImg .app-attachment-item {
box-shadow: none; display: inline-block;
border: 1px dashed #b2b6bd; cursor: pointer;
height: 100px; position: relative;
width: 100px; float: left;
margin: 17.5px; width: 120px;
padding: 0; height: 140px;
} margin: 7.5px;
text-align: center;
padding: 10px 10px 0;
}
.ChooseImg .app-attachment-list { .ChooseImg .app-attachment-upload {
padding: 5px; box-shadow: none;
min-height: 475px; border: 1px dashed #b2b6bd;
} height: 100px;
width: 100px;
margin: 17.5px;
padding: 0;
}
.ChooseImg .appendInput .el-input__inner { .ChooseImg .app-attachment-list {
border-right: none; padding: 5px;
min-height: 475px;
}
} .ChooseImg .appendInput .el-input__inner {
border-right: none;
.ChooseImg .appendInput .el-input-group__append { }
background-color: #fff !important;
border-left: none;
padding: 0 15px;
}
.ChooseImg .appendInput .el-input-group__append {
background-color: #fff !important;
border-left: none;
padding: 0 15px;
}
</style> </style>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</div> </div>
<!-- 回复 --> <!-- 回复 -->
<el-dialog :title="editTitle" :visible.sync="isShowReplayForm" width="800px"> <el-dialog :title="editTitle" :visible.sync="isShowReplayForm" width="800px">
<el-form label-width="150px" :rules="rules" :model="replayMsg"> <el-form label-width="150px" :rules="rules" :model="replayMsg" @validate="answerTest">
<el-form-item label="咨询用户" class="user"> <el-form-item label="咨询用户" class="user">
{{ replayMsg.UserName }} {{ replayMsg.UserName }}
</el-form-item> </el-form-item>
...@@ -198,7 +198,8 @@ export default { ...@@ -198,7 +198,8 @@ export default {
ReplyContent: [ ReplyContent: [
{ required: true, message: "请输入回复内容", trigger: "blur" } { required: true, message: "请输入回复内容", trigger: "blur" }
] ]
} },
pass: ''
}; };
}, },
created() { created() {
...@@ -270,20 +271,26 @@ export default { ...@@ -270,20 +271,26 @@ export default {
}, },
//设置咨询回复 //设置咨询回复
saveData() { saveData() {
this.assetsApipost("/api/Assess/SetGoodsReply", this.replayMsg, res => { if (this.pass) {
if (res.data.resultCode == 1) { this.assetsApipost("/api/Assess/SetGoodsReply", this.replayMsg, res => {
this.isShowReplayForm = false; if (res.data.resultCode == 1) {
this.Success(res.data.message); this.isShowReplayForm = false;
this.getList(); this.Success(res.data.message);
} else { this.getList();
this.Error(res.data.message); } else {
} this.Error(res.data.message);
}); }
});
}
},
//回复验证结果
answerTest(res, pass) {
this.pass = pass
} }
} }
}; };
</script> </script>
<style> <style scoped>
.performanceStatics .content { .performanceStatics .content {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
......
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
</div> </div>
<div class="content"> <div class="content">
<div class="searchInput" style="display:inline-block;width:200px;"> <div class="searchInput" style="display:inline-block;width:200px;">
<el-select v-model="msg.Source" placeholder="请选择" size="small" @change="(msg.pageIndex = 1),getList()"> <el-select v-model="msg.Source" placeholder="请选择" size="small" @change="(msg.pageIndex = 1), getList()">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <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 style="display:inline-block;width:260px;height:30px" placeholder="请输入ID/昵称/手机号/备注/联系方式" <el-input style="display:inline-block;width:260px;height:30px" placeholder="请输入ID/昵称/手机号/备注/联系方式"
v-model="msg.Name" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()" v-model="msg.Name" size="small" clearable @keyup.enter.native="msg.pageIndex = 1, getList()"
@clear="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> <i slot="suffix" class="el-input__icon el-icon-search" @click="msg.pageIndex = 1, getList()"></i>
</el-input> </el-input>
</div> </div>
<br> <br>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<el-dialog title="设置管理员" :visible.sync="isShowModule" width="600px"> <el-dialog title="设置管理员" :visible.sync="isShowModule" width="600px">
<el-form :model="addMsg" :rules="addMsgRules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-form :model="addMsg" :rules="addMsgRules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="昵称搜索" prop="UserId"> <el-form-item label="昵称搜索" prop="UserId">
<el-select v-model="addMsg.UserId" placeholder="请选择" filterable :filter-method="ChangeListName"> <el-select v-model="addMsg.UserId" placeholder="请选择" filterable :filter-method="ChangeListName">
<el-option v-for="item in adminOptions" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="item in adminOptions" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
...@@ -75,204 +75,203 @@ ...@@ -75,204 +75,203 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
//弹窗 //弹窗
isShowModule: false, isShowModule: false,
dataList: [], dataList: [],
msg: { msg: {
Source: "", Source: "",
Name: "", Name: "",
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
},
addMsg: {
AdminId: 0,
UserId: "",
},
total: 0,
options: [{
value: 0,
label: "不限",
},
{
value: 1,
label: "微信小程序",
},
{
value: 2,
label: "支付宝小程序",
},
],
adminOptions: [],
addMsgRules: {
UserId: [{
required: true,
message: "请选择小程序用户",
trigger: "blur"
}],
},
usermsg: {
pageIndex: 1,
pageSize: 20,
Name: '',
Source: 0,
MemberGrade: 0,
Id: 0,
Moblie: ''
},
};
},
methods: {
showDialog() {
this.isShowModule = true;
this.addMsg.UserId = "";
}, },
submitForm(formName) { addMsg: {
var that = this; AdminId: 0,
this.$refs[formName].validate((valid) => { UserId: "",
if (valid) {
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 {
return false;
}
});
}, },
handleCurrentChange(val) { total: 0,
this.msg.pageIndex = val; options: [{
this.getList(); value: 0,
label: "不限",
}, },
getList() { {
this.apipost( value: 1,
"/api/user/GetMiniprogramAdminPage", label: "微信小程序",
this.msg, },
(res) => { {
if (res.data.resultCode == 1) { value: 2,
this.dataList = res.data.data.pageData; label: "支付宝小程序",
this.total = res.data.data.count; },
} else { ],
this.Info(res.data.message); adminOptions: [],
} addMsgRules: {
} UserId: [{
); required: true,
message: "请选择小程序用户",
trigger: "blur"
}],
},
usermsg: {
pageIndex: 1,
pageSize: 20,
Name: '',
Source: 0,
MemberGrade: 0,
Id: 0,
Moblie: ''
}, },
//删除 };
removeAdmin(item) { },
let that = this; methods: {
that.Confirm("是否删除?", function () { showDialog() {
this.isShowModule = true;
this.addMsg.UserId = "";
},
submitForm(formName) {
var that = this;
this.$refs[formName].validate((valid) => {
if (valid) {
that.apipost( that.apipost(
"/api/user/DeleteMiniprogramAdmin", { '/api/user/SetMiniprogramAdmin',
AdminId: item.AdminId, that.addMsg,
},
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode === 1) {
that.getList(); that.getList();
that.Success(res.data.message);
that.isShowModule = false;
} else { } else {
that.Info(res.data.message); that.Error(res.data.message);
} }
} });
); } else {
}); return false;
}, }
ChangeListName(val) { });
console.log('tag', val) },
this.usermsg.Name = val; handleCurrentChange(val) {
this.getUserList(); this.msg.pageIndex = val;
}, this.getList();
//获取用户列表 },
getUserList() { getList() {
this.apipost( this.apipost(
"/api/user/GetMemberUserDropDownList", this.usermsg, "/api/user/GetMiniprogramAdminPage",
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);
}
}
);
},
//删除
removeAdmin(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/user/DeleteMiniprogramAdmin", {
AdminId: item.AdminId,
},
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.adminOptions = res.data.data.pageData; that.getList();
} else { } else {
this.Info(res.data.message); that.Info(res.data.message);
} }
} }
); );
} });
}, },
mounted() { ChangeListName(val) {
console.log('tag', val)
this.usermsg.Name = val;
this.getUserList(); this.getUserList();
this.getList();
}, },
}; //获取用户列表
getUserList() {
this.apipost(
"/api/user/GetMemberUserDropDownList", this.usermsg,
(res) => {
if (res.data.resultCode == 1) {
this.adminOptions = res.data.data.pageData;
} else {
this.Info(res.data.message);
}
}
);
}
},
mounted() {
this.getUserList();
this.getList();
},
};
</script> </script>
<style> <style>
.CustomPage .app-image { .CustomPage .app-image {
background-position: center center; background-position: center center;
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 0%; border-radius: 0%;
float: left; float: left;
margin-right: 8px; margin-right: 8px;
} }
.CustomPage .templat-list {
border: 1px solid #ebeef5;
}
.CustomPage .templat-item { .CustomPage .templat-list {
line-height: 40px; border: 1px solid #ebeef5;
height: 40px; }
display: flex;
font-size: 13px;
}
.templat-item:nth-child(odd) { .CustomPage .templat-item {
background-color: #f7f7f7; line-height: 40px;
} height: 40px;
display: flex;
font-size: 13px;
}
.templat-item:nth-child(even) { .templat-item:nth-child(odd) {
background-color: #fff; background-color: #f7f7f7;
} }
.CustomPage .templat-item div { .templat-item:nth-child(even) {
width: 50%; background-color: #fff;
padding-left: 20px; }
}
.CustomPage .Custom_item { .CustomPage .templat-item div {
border: 1px solid #ebeef5; width: 50%;
background-color: #fff; padding-left: 20px;
color: #303133; }
-webkit-transition: 0.3s;
transition: 0.3s;
margin-bottom: 10px;
}
.CustomPage .Custom_item>div { .CustomPage .Custom_item {
padding: 20px; border: 1px solid #ebeef5;
} background-color: #fff;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
margin-bottom: 10px;
}
.CustomPage .content { .CustomPage .Custom_item>div {
background: #fff; padding: 20px;
margin-top: 10px; }
padding: 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.CustomPage .conten_indder { .CustomPage .content {
padding: 20px; background: #fff;
background-color: #fff; margin-top: 10px;
padding-right: 50%; padding: 20px;
min-width: 1100px; -webkit-box-sizing: border-box;
} box-sizing: border-box;
}
.CustomPage .conten_indder {
padding: 20px;
background-color: #fff;
padding-right: 50%;
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