代码注释添加
parent
e74c6d9eda
commit
133febe7a7
|
@ -25,7 +25,6 @@
|
|||
<!-- 拼图验证码 -->
|
||||
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
|
||||
</Col>
|
||||
<!-- <LangSwitch /> -->
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -36,12 +35,10 @@ import { validateMobile } from "@/libs/validate";
|
|||
import Cookies from "js-cookie";
|
||||
import Header from "@/views/main-components/header";
|
||||
import Footer from "@/views/main-components/footer";
|
||||
import LangSwitch from "@/views/main-components/lang-switch";
|
||||
import util from "@/libs/util.js";
|
||||
import verify from "@/views/my-components/verify";
|
||||
export default {
|
||||
components: {
|
||||
LangSwitch,
|
||||
Header,
|
||||
Footer,
|
||||
verify,
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
<template>
|
||||
<div class="lang-icon">
|
||||
<Dropdown @on-click="langChange">
|
||||
<Icon type="md-globe" size="26"/>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem name="zh-CN">简体中文</DropdownItem>
|
||||
<DropdownItem name="en-US">English</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "langSwitch",
|
||||
methods: {
|
||||
langChange(v) {
|
||||
this.$i18n.locale = v;
|
||||
this.$store.commit("switchLang", v);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lang-icon {
|
||||
position: fixed;
|
||||
top: 2vh;
|
||||
right: 1.5vw;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -42,7 +42,7 @@ export default {
|
|||
visible: false, // 显示操作按钮
|
||||
contextMenuLeft: 0, // 内容左偏移量
|
||||
contextMenuTop: 0, // 内容上偏移量
|
||||
actionList: {
|
||||
actionList: { // 右键菜单
|
||||
others: '关闭其他',
|
||||
clearAll: '关闭所有'
|
||||
},
|
||||
|
@ -68,6 +68,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 格式化标签名
|
||||
itemTitle(item) {
|
||||
if (typeof item.title == "object") {
|
||||
return this.$t(item.title.i18n);
|
||||
|
@ -75,6 +76,7 @@ export default {
|
|||
return item.title;
|
||||
}
|
||||
},
|
||||
// 关闭页面
|
||||
closePage(event, name) {
|
||||
let storeOpenedList = this.$store.state.app.storeOpenedList;
|
||||
let lastPageObj = storeOpenedList[0];
|
||||
|
@ -102,6 +104,7 @@ export default {
|
|||
this.linkTo(lastPageObj);
|
||||
}
|
||||
},
|
||||
// 跳转
|
||||
linkTo(item) {
|
||||
if (this.$route.name == item.name) {
|
||||
return;
|
||||
|
@ -118,6 +121,7 @@ export default {
|
|||
this.$router.push(routerObj);
|
||||
}
|
||||
},
|
||||
// 页签栏滚动
|
||||
handlescroll(e) {
|
||||
var type = e.type;
|
||||
let delta = 0;
|
||||
|
@ -155,6 +159,7 @@ export default {
|
|||
}
|
||||
this.tagBodyLeft = left;
|
||||
},
|
||||
// 标签右键操作
|
||||
handleTagsOption(type) {
|
||||
if (type == "clearAll") {
|
||||
this.$store.commit("clearAllTags");
|
||||
|
@ -166,6 +171,7 @@ export default {
|
|||
}
|
||||
this.tagBodyLeft = 0;
|
||||
},
|
||||
// 标签栏滚动
|
||||
moveToView(tag) {
|
||||
if (tag.offsetLeft < -this.tagBodyLeft) {
|
||||
// 标签在可视区域左侧
|
||||
|
@ -193,12 +199,14 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
// 显示操作按钮
|
||||
contextMenu (item, e) {
|
||||
this.visible = true
|
||||
const offsetLeft = this.$el.getBoundingClientRect().left
|
||||
this.contextMenuLeft = e.clientX - offsetLeft + 10
|
||||
this.contextMenuTop = e.clientY - 64
|
||||
},
|
||||
// 关闭右侧菜单
|
||||
closeMenu () {
|
||||
this.visible = false
|
||||
}
|
||||
|
|
|
@ -1,57 +1,53 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="会员名称" prop="memberName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.memberName"
|
||||
clearable
|
||||
placeholder="请输入会员名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
clearable
|
||||
placeholder="请输入商品名"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="评价" prop="orderStatus">
|
||||
<Select v-model="searchForm.grade" placeholder="请选择" clearable style="width: 200px">
|
||||
<Option value="GOOD">好评</Option>
|
||||
<Option value="MODERATE">中评</Option>
|
||||
<Option value="WORSE">差评</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="评论日期">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
type="datetimerange"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
clearable
|
||||
@on-change="selectDateRange"
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Form ref="searchForm" :model="searchForm" @keydown.enter.native="handleSearch" inline :label-width="70" class="search-form">
|
||||
<Form-item label="会员名称" prop="memberName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.memberName"
|
||||
clearable
|
||||
placeholder="请输入会员名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
clearable
|
||||
placeholder="请输入商品名"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="评价" prop="orderStatus">
|
||||
<Select v-model="searchForm.grade" placeholder="请选择" clearable style="width: 200px">
|
||||
<Option value="GOOD">好评</Option>
|
||||
<Option value="MODERATE">中评</Option>
|
||||
<Option value="WORSE">差评</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="评论日期">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
type="datetimerange"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
clearable
|
||||
@on-change="selectDateRange"
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
<Button @click="handleReset" class="search-btn">重置</Button>
|
||||
</Form>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
class="mt_10"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
|
@ -154,10 +150,9 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
detailInfo: [],
|
||||
detailInfo: {}, // 详情信息
|
||||
image: [],//评价图片
|
||||
replyStatus: false,//回复状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
loading: true, // 表单加载状态
|
||||
|
@ -179,7 +174,7 @@ export default {
|
|||
// 表单验证规则
|
||||
formValidate: {
|
||||
reply: [
|
||||
{required: true, message: '请输入回复内容', trigger: 'blur'},
|
||||
{required: true, message: '请输入回复内容', trigger: 'blur'}
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
|
@ -284,50 +279,45 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init() { // 初始化数据
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页数
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 改变页码
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchForm = {}
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
// 清除选中状态
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
// 选择日期回调
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
API_Member.getMemberReview(this.searchForm).then((res) => {
|
||||
|
@ -353,7 +343,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 获取详情
|
||||
detail(v) {
|
||||
this.form.replyImage = []
|
||||
this.loading = true;
|
||||
|
|
Loading…
Reference in New Issue