Commit 7ef019d6 authored by 黄奎's avatar 黄奎

页面更新

parent af209121
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
<div class="content"> <div class="content">
<el-form :rules="rules" :model="addMsg" ref="addMsg" label-width="150px" style="width: 70%"> <el-form :rules="rules" :model="addMsg" ref="addMsg" label-width="150px" style="width: 70%">
<el-form-item label="品牌分类" class="is-required" prop="BrandClassId"> <el-form-item label="品牌分类" class="is-required" prop="CategoryId">
<el-select class="w300" v-model="addMsg.CategoryId" size="small" placeholder="请选择"> <el-select class="w300" v-model="addMsg.CategoryId" size="small" placeholder="请选择">
<el-option :key="0" label="请选择" :value="0"></el-option> <el-option :key="0" label="请选择" :value="0"></el-option>
<el-option v-for="item in CategoryList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="item in CategoryList" :key="item.Id" :label="item.Name" :value="item.Id">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</el-image> </el-image>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="品牌介绍图"> <el-form-item label="品牌介绍图" prop="BrandImgList">
<div class="nav_Main"> <div class="nav_Main">
<div class="nav_IconContent"> <div class="nav_IconContent">
<draggable v-model="addMsg.BrandImgList"> <draggable v-model="addMsg.BrandImgList">
...@@ -70,10 +70,10 @@ ...@@ -70,10 +70,10 @@
</div> </div>
</template> </template>
<script> <script>
import ChooseImg from "@/components/global/ChooseImg.vue"; import ChooseImg from "@/components/global/ChooseImg.vue";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
export default { export default {
components: { components: {
ChooseImg, ChooseImg,
draggable draggable
...@@ -95,13 +95,13 @@ ...@@ -95,13 +95,13 @@
chooseType: 0, chooseType: 0,
loading: false, loading: false,
rules: { rules: {
Name: [{ Name: [{ required: true, message: "请输入品牌名称", trigger: "blur" }],
required: true, CategoryId: [
message: "请输入品牌名称", { required: true, message: "请选择分类", trigger: "change" }
trigger: "blur" ],
}], BrandImgList: [
{ required: true, message: "请选择图片", trigger: "change" }
]
} }
}; };
}, },
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
//保存品牌 //保存品牌
Save(formName) { Save(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid && this.addMsg.Logo && this.addMsg.BrandImgList[0]) {
this.apipost("/api/Assess/SetBrandInfo", this.addMsg, res => { this.apipost("/api/Assess/SetBrandInfo", this.addMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CommonJump("hbrand"); this.CommonJump("hbrand");
...@@ -199,68 +199,68 @@ ...@@ -199,68 +199,68 @@
}); });
} }
} }
}; };
</script> </script>
<style> <style>
.app-add-cat .el-checkbox-group { .app-add-cat .el-checkbox-group {
font-size: 14px !important; font-size: 14px !important;
} }
.app-add-cat .el-checkbox { .app-add-cat .el-checkbox {
margin-right: 0; margin-right: 0;
} }
.app-add-cat .el-dialog__body { .app-add-cat .el-dialog__body {
padding: 10px 20px !important; padding: 10px 20px !important;
} }
.app-add-cat .tag-box .tag-item { .app-add-cat .tag-box .tag-item {
margin-right: 5px; margin-right: 5px;
} }
.app-add-cat .tag-box { .app-add-cat .tag-box {
margin: 20px 0; margin: 20px 0;
} }
.app-add-cat .app-goods-cat-list .active { .app-add-cat .app-goods-cat-list .active {
background: #fafafa; background: #fafafa;
} }
.app-add-cat .app-goods-cat-list .cat-item { .app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer; cursor: pointer;
padding: 5px 10px; padding: 5px 10px;
} }
.app-add-cat .app-goods-cat-list { .app-add-cat .app-goods-cat-list {
border: 1px solid #e8eaee; border: 1px solid #e8eaee;
border-radius: 5px; border-radius: 5px;
margin-top: -5px; margin-top: -5px;
padding: 10px 0; padding: 10px 0;
overflow: scroll; overflow: scroll;
height: 400px; height: 400px;
} }
.h_edit_brand .blue { .h_edit_brand .blue {
color: #409eff; color: #409eff;
} }
.h_edit_brand .content { .h_edit_brand .content {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.h_edit_brand .gez_list { .h_edit_brand .gez_list {
/*width: 650px;*/ /*width: 650px;*/
margin-bottom: 12px; margin-bottom: 12px;
padding: 20px; padding: 20px;
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
background-color: #fff; background-color: #fff;
color: #303133; color: #303133;
} }
.h_edit_brand .quyu { .h_edit_brand .quyu {
background-color: #f4f4f5; background-color: #f4f4f5;
color: #909399; color: #909399;
padding: 10px; padding: 10px;
...@@ -270,59 +270,59 @@ ...@@ -270,59 +270,59 @@
border-radius: 4px; border-radius: 4px;
white-space: nowrap; white-space: nowrap;
margin: 5px; margin: 5px;
} }
.h_edit_brand .el-tag+.el-tag { .h_edit_brand .el-tag+.el-tag {
margin-left: 10px; margin-left: 10px;
} }
.h_edit_brand .button-new-tag { .h_edit_brand .button-new-tag {
margin-left: 10px; margin-left: 10px;
height: 32px; height: 32px;
line-height: 30px; line-height: 30px;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.h_edit_brand .input-new-tag { .h_edit_brand .input-new-tag {
width: 90px; width: 90px;
margin-left: 10px; margin-left: 10px;
vertical-align: bottom; vertical-align: bottom;
} }
.h_edit_brand .ue-style .el-form-item__content { .h_edit_brand .ue-style .el-form-item__content {
line-height: 0; line-height: 0;
} }
.h_edit_brand .app-gallery-item { .h_edit_brand .app-gallery-item {
border: none; border: none;
} }
.h_edit_brand .nav_Main { .h_edit_brand .nav_Main {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
} }
.h_edit_brand .nav_IconContent { .h_edit_brand .nav_IconContent {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
} }
/* .h_edit_brand .nav_IconContent div>div { /* .h_edit_brand .nav_IconContent div>div {
display: inline-block; display: inline-block;
} */ } */
.h_edit_brand .colapp-image { .h_edit_brand .colapp-image {
background-size: cover; background-size: cover;
background-position: center center; background-position: center center;
width: 100px; width: 100px;
height: 100px; height: 100px;
border-radius: 0%; border-radius: 0%;
} }
.h_edit_brand .add-image-btn { .h_edit_brand .add-image-btn {
width: 100px; width: 100px;
height: 100px; height: 100px;
line-height: 100px; line-height: 100px;
...@@ -330,28 +330,28 @@ ...@@ -330,28 +330,28 @@
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
} }
.h_edit_brand .delBtn { .h_edit_brand .delBtn {
position: absolute; position: absolute;
right: -8px; right: -8px;
top: -8px; top: -8px;
padding: 4px 4px !important; padding: 4px 4px !important;
} }
.h_edit_brand .w600 { .h_edit_brand .w600 {
width: 600px; width: 600px;
} }
.h_edit_brand .brandShuxing { .h_edit_brand .brandShuxing {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 850px; width: 850px;
} }
.h_edit_brand .brandShuxing_item { .h_edit_brand .brandShuxing_item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 50%; width: 50%;
} }
</style> </style>
...@@ -57,14 +57,15 @@ ...@@ -57,14 +57,15 @@
<el-table-column prop="ReplyDate" label="回复时间"> </el-table-column> <el-table-column prop="ReplyDate" label="回复时间"> </el-table-column>
<el-table-column label="操作" width="250px"> <el-table-column label="操作" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip v-if="scope.row.ReplyDate == ''" class="item" effect="dark" content="回复" placement="top"> <el-tooltip class="item" effect="dark" content="回复" placement="top">
<img @click="showReplayForm(scope.row, 1)" class="app-order-icon" <img style="margin-right:10px;" v-if="scope.row.ReplyDate == ''"
src="../../assets/img/userman/add_remark.png" alt="" /> src="../../assets/img/userman/add_remark.png" @click="showReplayForm(scope.row, 1)" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="查看" placement="top"> <el-tooltip class="item" effect="dark" content="查看" placement="top">
<img @click="showReplayForm(scope.row, 2)" class="app-order-icon" <img style="width: 32px;height: 32px;" @click="showReplayForm(scope.row, 2)"
src="../../assets/img/userman/detail.png" alt="" /> src="../../assets/img/userman/icon-show.png" />
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -73,9 +74,9 @@ ...@@ -73,9 +74,9 @@
</el-pagination> </el-pagination>
</div> </div>
<!-- 回复 --> <!-- 回复 -->
<el-dialog :title="editTitle" :visible.sync="isShowReplayForm" width="600px"> <el-dialog :title="editTitle" :visible.sync="isShowReplayForm" width="800px">
<el-form label-width="150px" > <el-form label-width="150px" :rules="rules" :model="replayMsg">
<el-form-item label="咨询用户"> <el-form-item label="咨询用户" class="user">
{{ replayMsg.UserName }} {{ replayMsg.UserName }}
</el-form-item> </el-form-item>
<el-form-item label="咨询时间"> <el-form-item label="咨询时间">
...@@ -88,33 +89,33 @@ ...@@ -88,33 +89,33 @@
{{ replayMsg.BrandName }} {{ replayMsg.BrandName }}
</el-form-item> </el-form-item>
<el-form-item label="商品图片"> <el-form-item label="商品图片">
<div class="shopImg"> <div class="shopImg1">
<div class="indexApp_image" v-for="(item, index) in replayMsg.GoodsImgList" :key="index"> <div class="indexApp_image" v-for="(item, index) in replayMsg.GoodsImgList" :key="index">
<div> <div class="img_Des">
<el-image style="width: 100px; height: 100px" v-if="item.Path" :src="item.Path" <el-image style="width: 100px; height: 100px" v-if="item.Path" :src="item.Path"
:preview-src-list="srcList"></el-image> :preview-src-list="srcList"></el-image>
<br /> <p>{{ item.Name }}</p>
{{ item.Name }}
</div> </div>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="更多照片"> <el-form-item label="更多照片" class="more_img">
<div class="shopImg"> <div class="shopImg1">
<div class="indexApp_more-image" v-for="(item, index) in replayMsg.MoreImgList" :key="index"> <div class="indexApp_more-image" v-for="(item, index) in replayMsg.MoreImgList" :key="index">
<div> <div class="img_Des">
<el-image style="width: 100px; height: 100px" v-if="item.Path" :src="item.Path"></el-image><br /> <el-image style="width: 100px; height: 100px" v-if="item.Path" :src="item.Path"
{{ item.Name }} :preview-src-list="moreImg"></el-image>
<p>{{ item.Name }}</p>
</div> </div>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注信息"> <el-form-item label="备注信息" class="remark">
{{ replayMsg.Remark }} {{ replayMsg.Remark }}
</el-form-item> </el-form-item>
<el-form-item label="回复内容" prop="ReplyContent"> <el-form-item label="回复内容" prop="ReplyContent">
<template v-if="showType == 1"> <template v-if="showType == 1">
<el-input style="width:300px" size="small" maxlength="200" :rows="3" type="textarea" <el-input style="width:250px" size="small" maxlength="800" :rows="4" type="textarea"
v-model="replayMsg.ReplyContent"> v-model="replayMsg.ReplyContent">
</el-input> </el-input>
</template> </template>
...@@ -132,7 +133,7 @@ ...@@ -132,7 +133,7 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
...@@ -148,7 +149,8 @@ ...@@ -148,7 +149,8 @@
IsReply: "" IsReply: ""
}, },
//回复状态 //回复状态
ReplyList: [{ ReplyList: [
{
Id: 1, Id: 1,
Name: "已回复" Name: "已回复"
}, },
...@@ -187,8 +189,16 @@ ...@@ -187,8 +189,16 @@
Moblie: "" Moblie: ""
}, },
//放大商品图片 //放大商品图片数组
srcList: [] srcList: [],
moreImg: [],
//输入框验证
rules: {
ReplyContent: [
{ required: true, message: "请输入回复内容", trigger: "blur" }
]
}
}; };
}, },
created() { created() {
...@@ -224,6 +234,7 @@ ...@@ -224,6 +234,7 @@
this.replayMsg.CreateDate = item.CreateDate; this.replayMsg.CreateDate = item.CreateDate;
this.showType = showType; this.showType = showType;
this.srcList = item.GoodsImgList.map(v => v.Path); this.srcList = item.GoodsImgList.map(v => v.Path);
this.moreImg = item.MoreImgList.map(v => v.Path);
if (this.showType == 2) { if (this.showType == 2) {
this.replayMsg.ReplyContent = item.ReplyContent; this.replayMsg.ReplyContent = item.ReplyContent;
} }
...@@ -270,24 +281,40 @@ ...@@ -270,24 +281,40 @@
}); });
} }
} }
}; };
</script> </script>
<style> <style>
.performanceStatics .content { .performanceStatics .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;
} }
.shopImg { .performanceStatics .shopImg1 {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20px; margin-top: 10px;
} }
.shopImg>div { .performanceStatics .shopImg1>div {
width: 33%; width: 20%;
} }
.performanceStatics .img_Des {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.performanceStatics .el-form-item {
margin-bottom: 0;
}
.performanceStatics .remark {
margin-top: 30px;
}
</style> </style>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="content"> <div class="content">
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<span>分类</span> <span>分类</span>
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.CategoryId" <el-select style="margin:0 10px" class="w200" @change="(msg.pageIndex = 1), getList()" v-model="msg.CategoryId"
size="small" placeholder="请选择" clearable> size="small" placeholder="请选择" clearable>
<el-option label="不限" :value="0"></el-option> <el-option label="不限" :value="0"></el-option>
<el-option v-for="item in CategoryList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="item in CategoryList" :key="item.Id" :label="item.Name" :value="item.Id">
...@@ -16,14 +16,15 @@ ...@@ -16,14 +16,15 @@
</el-select> </el-select>
<span>品牌名称</span> <span>品牌名称</span>
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name" clearable <el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name" clearable
@input="msg.pageIndex=1,getList()"> @input="(msg.pageIndex = 1), getList()">
</el-input> </el-input>
<el-button @click="msg.pageIndex=1,getList()" size="small" type="primary"> <el-button @click="(msg.pageIndex = 1), getList()" size="small" type="primary">
查询 查询
</el-button> </el-button>
</div> </div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%"> <el-table :data="tableData" v-loading="loading" border style="width: 100%">
<el-table-column prop="Id" label="编号" width="100"> <el-table-column prop="Id" label="编号" width="100"> </el-table-column>
<el-table-column prop="CategoryName" label="所属分类" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="Name" label="品牌名称" width="200"> <el-table-column prop="Name" label="品牌名称" width="200">
</el-table-column> </el-table-column>
...@@ -34,20 +35,29 @@ ...@@ -34,20 +35,29 @@
</el-table-column> </el-table-column>
<el-table-column label="是否热门" width="100px"> <el-table-column label="是否热门" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsHot==1" effect="dark"> <el-tag v-if="scope.row.IsHot == 1" effect="dark">
热门 热门
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="RemarkDesc" label="上传描述"> <el-table-column label="上传描述">
<template slot-scope="scope">
<p class="moredesc-con">{{ scope.row.RemarkDesc }}</p>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="MoreDesc" label="备注描述"> <el-table-column label="备注描述">
<template slot-scope="scope">
<p class="moredesc-con">{{ scope.row.MoreDesc }}</p>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250px"> <el-table-column label="操作" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="showBrandForm(scope.row)" src="../../assets/img/userman/edit.png" alt="" /> <el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img @click="RemmoveBrand(scope.row)" style="margin-left:10px;" src="../../assets/img/userman/del.png" <img class="edit-img" src="../../assets/img/userman/edit.png" @click="showBrandForm(scope.row)" />
alt="" /> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/userman/del.png" @click="RemmoveBrand(scope.row)" />
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -59,7 +69,7 @@ ...@@ -59,7 +69,7 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
...@@ -69,14 +79,14 @@ ...@@ -69,14 +79,14 @@
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
CategoryId: 0, //分类编号 CategoryId: 0, //分类编号
Name: '', //品牌名称 Name: "" //品牌名称
}, },
CategoryList: [], //分类列表 CategoryList: [], //分类列表
dateList: [], //日期 dateList: [] //日期
} };
}, },
created() { created() {
this.getCategoryList() this.getCategoryList();
}, },
mounted() { mounted() {
this.getList(); this.getList();
...@@ -90,24 +100,23 @@ ...@@ -90,24 +100,23 @@
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) });
},
refreshPage() {
}, },
refreshPage() { },
//新增修改品牌 //新增修改品牌
showBrandForm(item) { showBrandForm(item) {
this.CommonJump('hbrandedit', { this.CommonJump("hbrandedit", {
Id: item.Id Id: item.Id
}) });
}, },
//删除品牌 //删除品牌
RemmoveBrand(item) { RemmoveBrand(item) {
let that = this; let that = this;
that.Confirm("是否删除此品牌?", function () { that.Confirm("是否删除此品牌?", function () {
that.apipost( that.apipost(
"/api/Assess/DelBrandInfo", { "/api/Assess/DelBrandInfo",
BrandId: item.Id, {
BrandId: item.Id
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -116,7 +125,7 @@ ...@@ -116,7 +125,7 @@
} else { } else {
that.Error(res.data.message); that.Error(res.data.message);
} }
}, }
); );
}); });
}, },
...@@ -131,21 +140,35 @@ ...@@ -131,21 +140,35 @@
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
},
} }
}; }
};
</script> </script>
<style> <style>
.performanceStatics .content { .performanceStatics .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;
} }
.performanceStatics .edit-img {
margin-right: 10px;
}
.performanceStatics .moredesc-con {
display: -webkit-box;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
white-space: pre-line;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
}
</style> </style>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="content"> <div class="content">
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<span>分类名称</span> <span>分类名称</span>
<el-input type="text" style="width:250px" size="small" maxlength="50" v-model="msg.Name" <el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name"
@input="(msg.pageIndex = 1), getList()" clearable> @input="(msg.pageIndex = 1), getList()" clearable>
</el-input> </el-input>
<el-button @click="(msg.pageIndex = 1), getList()" size="small" type="primary"> <el-button @click="(msg.pageIndex = 1), getList()" size="small" type="primary">
...@@ -31,9 +31,12 @@ ...@@ -31,9 +31,12 @@
<el-table-column prop="Sort" label="排序"> </el-table-column> <el-table-column prop="Sort" label="排序"> </el-table-column>
<el-table-column label="操作" width="250px"> <el-table-column label="操作" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="showCategoryForm(scope.row)" src="../../assets/img/userman/edit.png" alt="" /> <el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img @click="RemmoveCategory(scope.row)" style="margin-left:10px;" src="../../assets/img/userman/del.png" <img class="edit-img" src="../../assets/img/userman/edit.png" @click="showCategoryForm(scope.row)" />
alt="" /> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/userman/del.png" @click="RemmoveCategory(scope.row)" />
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -43,24 +46,25 @@ ...@@ -43,24 +46,25 @@
</div> </div>
<!-- 修改分类 --> <!-- 修改分类 -->
<el-dialog :title="editTitle" :visible.sync="isShowCategoryForm" width="500px"> <el-dialog :title="editTitle" :visible.sync="isShowCategoryForm" width="500px">
<el-form :model="postMsg" :rules="rules" label-width="150px"> <el-form :model="postMsg" :rules="rules" label-width="150px" @validate="formTest">
<el-form-item label="分类名称" prop="Name"> <el-form-item label="分类名称" prop="Name">
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="postMsg.Name"> <el-input type="text" style="width:250px" size="small" maxlength="100" v-model="postMsg.Name">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="Logo" prop="file"> <el-form-item label="Logo" prop="Image">
<el-input v-if="false" v-model="Image"></el-input>
<div> <div>
<el-button @click="openChangeDig()" size="small">选择文件</el-button> <el-button @click="openChangeDig()" size="small">选择文件</el-button>
</div> </div>
<div> <div class="indexApp_image">
<img v-if="postMsg.Image" :src="postMsg.Image" alt="" style="width:100px;height:100px;" /> <img v-if="postMsg.Image" :src="postMsg.Image" alt="" style="width:100px;height:100px;" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="启用状态" prop="Enable"> <el-form-item label="启用状态">
<el-radio v-model="postMsg.Enable" :label="1">启用</el-radio> <el-radio v-model="postMsg.Enable" :label="1">启用</el-radio>
<el-radio v-model="postMsg.Enable" :label="2">禁用</el-radio> <el-radio v-model="postMsg.Enable" :label="2">禁用</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="Sort"> <el-form-item label="排序">
<el-input style="width:250px" size="small" maxlength="200" v-model="postMsg.Sort"> <el-input style="width:250px" size="small" maxlength="200" v-model="postMsg.Sort">
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -78,8 +82,8 @@ ...@@ -78,8 +82,8 @@
</template> </template>
<script> <script>
import ChooseImg from "@/components/global/ChooseImg.vue"; import ChooseImg from "@/components/global/ChooseImg.vue";
export default { export default {
components: { components: {
ChooseImg ChooseImg
}, },
...@@ -105,26 +109,15 @@ ...@@ -105,26 +109,15 @@
isShowCategoryForm: false, isShowCategoryForm: false,
isShowChooseImage: false, isShowChooseImage: false,
rules: { rules: {
Name: [{ Name: [{ required: true, message: "请输入名称", trigger: "blur" }],
required: true, Image: [{ required: true, message: "请选择文件", trigger: "blur" }]
message: "请输入名称", },
trigger: "blur"
}],
Sort: [{
required: true,
message: "请输入排序",
trigger: "blur"
}],
Enable: [{
required: true,
message: "请选择状态",
trigger: "change"
}]
} // 验证是否通过
pass: ""
}; };
}, },
created() {}, created() { },
mounted() { mounted() {
this.getList(); this.getList();
}, },
...@@ -174,8 +167,13 @@ ...@@ -174,8 +167,13 @@
} }
this.isShowCategoryForm = true; this.isShowCategoryForm = true;
}, },
//表单验证是否通过
formTest(res, pass) {
this.pass = pass;
},
//新增修改分类 //新增修改分类
saveData() { saveData() {
if (this.pass && this.postMsg.Image) {
this.assetsApipost("/api/Assess/SetCategoryInfo", this.postMsg, res => { this.assetsApipost("/api/Assess/SetCategoryInfo", this.postMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
...@@ -184,13 +182,15 @@ ...@@ -184,13 +182,15 @@
this.Error(res.data.message); this.Error(res.data.message);
} }
}); });
}
}, },
//删除分类 //删除分类
RemmoveCategory(item) { RemmoveCategory(item) {
let that = this; let that = this;
that.Confirm("是否删除此分类?", function () { that.Confirm("是否删除此分类?", function () {
that.apipost( that.apipost(
"/api/Assess/DelCategoryInfo", { "/api/Assess/DelCategoryInfo",
{
CategoryId: item.Id CategoryId: item.Id
}, },
res => { res => {
...@@ -205,14 +205,18 @@ ...@@ -205,14 +205,18 @@
}); });
} }
} }
}; };
</script> </script>
<style> <style>
.performanceStatics .content { .performanceStatics .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;
} }
.performanceStatics .edit-img {
margin-right: 10px;
}
</style> </style>
<style> <style>
.huimaiSetting { .huimaiSetting {
height: 100%; height: 100%;
display: flex; display: flex;
-webkit-box-orient: horizontal; -webkit-box-orient: horizontal;
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
box-sizing: border-box; box-sizing: border-box;
min-width: 0; min-width: 0;
font-size: 14px; font-size: 14px;
} }
.huimaiSetting .mainLeftMenu { .huimaiSetting .mainLeftMenu {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
color: #fff; color: #fff;
} }
.huimaiSetting .leftMenu1 { .huimaiSetting .leftMenu1 {
background: #444444; background: #444444;
cursor: pointer; cursor: pointer;
width: 200px; width: 200px;
...@@ -33,17 +33,17 @@ ...@@ -33,17 +33,17 @@
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
} }
.huimaiSetting .asideInner { .huimaiSetting .asideInner {
background: rgba(0, 0, 0, 0.15); background: rgba(0, 0, 0, 0.15);
padding: 6px 6px; padding: 6px 6px;
width: 100%; width: 100%;
border-radius: 3px; border-radius: 3px;
font-weight: bold; font-weight: bold;
} }
.huimaiSetting .F_Logo { .huimaiSetting .F_Logo {
height: 60px; height: 60px;
background: #464d54; background: #464d54;
color: #f2f2f2; color: #f2f2f2;
...@@ -53,25 +53,25 @@ ...@@ -53,25 +53,25 @@
padding: 0 15px; padding: 0 15px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.huimaiSetting .mainRightContent { .huimaiSetting .mainRightContent {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #f3f3f3; background-color: #f3f3f3;
min-width: 0; min-width: 0;
} }
.huimaiSetting .mainRightTop { .huimaiSetting .mainRightTop {
width: 100%; width: 100%;
height: 60px; height: 60px;
background: #fff; background: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
color: #909399; color: #909399;
} }
.huimaiSetting .mainRightLeft { .huimaiSetting .mainRightLeft {
width: 110px; width: 110px;
height: 60px; height: 60px;
line-height: 62px; line-height: 62px;
...@@ -80,37 +80,37 @@ ...@@ -80,37 +80,37 @@
cursor: pointer; cursor: pointer;
position: relative; position: relative;
top: -2px; top: -2px;
} }
.huimaiSetting .marinRightList { .huimaiSetting .marinRightList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
width: 300px; width: 300px;
float: right; float: right;
} }
.huimaiSetting .marinRightList ul { .huimaiSetting .marinRightList ul {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-around; justify-content: space-around;
} }
.huimaiSetting .marinRightList ul li { .huimaiSetting .marinRightList ul li {
display: block; display: block;
list-style-type: none; list-style-type: none;
cursor: pointer; cursor: pointer;
color: #909399; color: #909399;
outline: none; outline: none;
border: none; border: none;
} }
.huimaiSetting .main_routerPage { .huimaiSetting .main_routerPage {
padding: 20px; padding: 20px;
overflow-y: scroll; overflow-y: scroll;
} }
.huimaiSetting .FsettingUU { .huimaiSetting .FsettingUU {
position: fixed; position: fixed;
width: 200px; width: 200px;
height: 100%; height: 100%;
...@@ -120,9 +120,9 @@ ...@@ -120,9 +120,9 @@
overflow: auto; overflow: auto;
z-index: 5; z-index: 5;
background-color: rgb(84, 92, 100); background-color: rgb(84, 92, 100);
} }
.huimaiSetting .FsettingUU .menu_item { .huimaiSetting .FsettingUU .menu_item {
font-size: 14px; font-size: 14px;
color: #303133; color: #303133;
padding: 0 20px; padding: 0 20px;
...@@ -137,33 +137,33 @@ ...@@ -137,33 +137,33 @@
color: #fff; color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.huimaiSetting .FsettingUU .menu_item i { .huimaiSetting .FsettingUU .menu_item i {
margin-right: 5px; margin-right: 5px;
width: 24px; width: 24px;
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
vertical-align: middle; vertical-align: middle;
color: #909399; color: #909399;
} }
.huimaiSetting .menu_item:hover { .huimaiSetting .menu_item:hover {
background-color: rgba(67, 74, 80, 0); background-color: rgba(67, 74, 80, 0);
} }
.huimaiSetting .F_Logo:hover { .huimaiSetting .F_Logo:hover {
background-color: #30353a; background-color: #30353a;
color: #fff; color: #fff;
} }
.huimaiSetting .Fchecked { .huimaiSetting .Fchecked {
color: rgb(255, 208, 75) !important; color: rgb(255, 208, 75) !important;
} }
.huimaiSetting .Fchecked i { .huimaiSetting .Fchecked i {
color: rgb(255, 208, 75) !important; color: rgb(255, 208, 75) !important;
} }
</style> </style>
<template> <template>
<div class="huimaiSetting"> <div class="huimaiSetting">
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
currentUser: {}, currentUser: {},
...@@ -248,5 +248,5 @@ ...@@ -248,5 +248,5 @@
this.Height = document.documentElement.clientHeight - 60; this.Height = document.documentElement.clientHeight - 60;
}; };
}, },
}; };
</script> </script>
\ No newline at end of file
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