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