Commit d518e97b by leic

update

1 parent 696d65ed
......@@ -17,3 +17,12 @@ export const errorOrderSummaryAPI = () => {
});
};
// 广告位列表
export const getAdvListAPI = (data) => {
return $http({
url: $http.adornLdyUrl("adv/adv/list"),
method: "post",
data: $http.adornData(data),
})
}
......@@ -18,6 +18,24 @@ export function getNoticeList(data) {
});
}
export function getNoticeListAPI(data) {
return $http({
url: $http.adornLdyUrl("colleges/manageLestoreNotices/lists"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function getNoticeDetailAPI(data) {
return $http({
url: $http.adornLdyUrl("colleges/manageLestoreNotices/details"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function currentlists(data) {
return $http({
url: $http.adornLdyUrl("messages/notice/lists/current"),
......
......@@ -477,6 +477,7 @@ img {
&--tabs {
padding: 64px 0 0;
}
// 导航标签栏
>.el-tabs {
>.el-tabs__header {
......@@ -524,6 +525,7 @@ img {
.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
padding-left: 0 !important;
}
.el-tabs--top .el-tabs__item.is-top:last-child {
padding-right: 0 !important;
}
......@@ -597,7 +599,7 @@ img {
th {
font-weight: 500;
background-color: #fafafa;
background-color: #fafafa !important;
position: relative;
// &.is-leaf:not(:last-child){
// border-right: 1px solid #ebeef5;
......
......@@ -23,11 +23,7 @@
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<image-viewer
v-if="previewVisible"
:z-index="10000"
:urlList="previewList"
:on-close="onClose"></image-viewer>
<image-viewer v-if="previewVisible" :z-index="10000" :urlList="previewList" :on-close="onClose"></image-viewer>
<!-- <el-dialog :visible.sync="previewVisible" append-to-body>
<img width="100%" :src="previewUrl" alt="">
</el-dialog> -->
......@@ -203,7 +199,7 @@ export default {
this.$message.success("上传成功")
this.loading = false;
if (!this.multiple) {
this.$emit("input", res.domain + res.truekey)
this.$emit("input", { data: res.domain + res.truekey })
} else {
this.changeFileList(fileList)
}
......@@ -219,7 +215,7 @@ export default {
// 预览
handlePictureCardPreview(file) {
this.previewUrl = file.url;
if(!this.multiple) {
if (!this.multiple) {
this.previewList = [this.previewUrl]
}
this.previewVisible = true;
......
<template>
<div class="navigate_back">
<a href="#" @click="navigatorBack" class="navigate_back_title">
<icon-svg class="navigate_back_arrow" name="jiantou"></icon-svg>
返回
</a>
<span class="navigate_back_line">|</span>
<slot></slot>
</div>
</template>
<script>
export default {
methods: {
navigatorBack() {
this.$router.back()
}
}
}
</script>
<style scoped lang="scss">
// 返回按钮
.navigate_back {
display: flex;
flex: 1;
font-size: 18px;
margin-bottom: 15px;
&_title {
display: inline-block;
width: 54px;
text-decoration: none;
font-size: 14px;
}
&_arrow {
width: 17px;
height: 17px;
position: relative;
top: 4px;
}
&_line {
display: inline-block;
margin: 0 15px;
color: #D9D9D9;
}
}
</style>
\ No newline at end of file
......@@ -11,19 +11,21 @@
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
</quill-editor>
<div v-else-if="form.conditionFrom == 'image'">
<el-upload class="avatar-uploader" v-model="form.value"
<!-- <el-upload class="avatar-uploader" v-model="form.value"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess1">
<img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload>
</el-upload> -->
<upload-image v-model="form.value" @input="handleAvatarSuccess1"></upload-image>
</div>
<div v-else-if="form.conditionFrom == 'coupon'">
<div style="height: 150px;width: 72%;border: 1px solid #efefef;border-radius: 6px;padding: 10px;">
<span v-for="(item, index) in form.couponList" style="border: 1px;margin-right: 5px;"
:key="index">
{{ item.couponName }}
<i class="el-icon-circle-close" @click="del(index, item)"></i>
{{ item && item.couponName ? item.couponName : '' }}
<i v-if="item && item.couponName" class="el-icon-circle-close"
@click="del(index, item)"></i>
</span>
</div>
......@@ -89,9 +91,11 @@ import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import quillConfig from '@/views/locality/quill-config.js'
import UploadImage from '@/components/UploadImage'
export default {
components: {
quillEditor
quillEditor,
UploadImage
},
props: {
formInfo: {
......@@ -121,7 +125,7 @@ export default {
},
watch: {
dialogFormVisible(val) {
if(val) {
if (val) {
this.form = this.formInfo
}
}
......@@ -171,7 +175,8 @@ export default {
if (this.form.conditionFrom == 'coupon') {
this.values = []
for (var i in this.form.couponList) {
this.values.push(this.form.couponList[i].couponId)
if (this.form.couponList[i])
this.values.push(this.form.couponList[i].couponId)
}
this.form.value = this.values.toString()
}
......@@ -219,6 +224,10 @@ export default {
this.form.couponList.push(row)
this.dialogFormVisibleYhq = false
},
del(index, row) {
// this.values.splice(index,1)
this.form.couponList.splice(index, 1)
},
}
}
</script>
......
......@@ -8,7 +8,15 @@
</el-table-column> -->
<el-table-column prop="min" label="类型" width="250">
</el-table-column>
<el-table-column prop="value" label="内容">
<el-table-column prop="value" label="优惠券名称" v-if="tabName == 'yhq'">
<template slot-scope="scope">
<div>
<span v-for="(item, index) in scope.row.couponList" :key="index">{{ item &&
item.couponName ? item.couponName + ';' : '' }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="value" label="内容" v-else>
<template slot-scope="scope">
<tooltip-text :text="scope.row.value" multiLine />
</template>
......@@ -33,6 +41,10 @@ import sysSetDialog from '@/components/sysSetDialog'
import TooltipText from '@/components/Tooltip'
export default {
props: {
tabName: {
type: String,
default: ''
},
data: {
type: Array,
default: []
......@@ -57,6 +69,9 @@ export default {
},
}
},
mounted() {
console.log(this.$scopedSlots, this.$slots)
},
methods: {
// 修改弹框
amend(index, rows) {
......
......@@ -47,6 +47,11 @@ if (process.env.NODE_ENV !== "production") {
require("@/mock");
}
// 全局过滤器
Vue.filter('priceFilter', function(value) {
return value && (typeof value === 'string' || typeof value === 'number') ? Number(value) / 100 : ''
})
// 挂载全局
Vue.prototype.$http = httpRequest; // ajax请求方法
Vue.prototype.isAuth = isAuth; // 权限方法
......
......@@ -8,7 +8,7 @@ const cookie_pre = config.extraData.cookie.pre
export function getMallToken() {
let token =
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NzUxMTQsIm5iZiI6MTY4Mzg3NTExNCwiZXhwIjoxNjg0NDc5OTE0LCJ0b2tlbiI6ImVlOTNmN2VkMDNhZGFlZjVlODQ1MTg3MTFjOWU5MzMwIiwiYnRva2VuIjoiZWU5M2Y3ZWQwM2FkYWVmNWU4NDUxODcxMWM5ZTkzMzAiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIzMCIsIm5hbWUiOiIxOTIwMDAwMDAwMCIsInBob25lIjoiMTkyMDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjE0IiwibXRva2VuIjoiODUxMjc0YTI0NjUwMTgwYjc3OWZmZjk1ZTY2YTAyMzMiLCJ0eXBlIjoic3RvcmUiLCJ0aGlyZF9hcHBpZCI6IiIsImN1cnJlbnRfYnRva2VuIjoiZWU5M2Y3ZWQwM2FkYWVmNWU4NDUxODcxMWM5ZTkzMzAiLCJhY2NvdW50X3R5cGUiOiIxIiwiYWNjb3VudF9yb2xlcyI6WyJtYXN0ZXIiXSwic3dpdGNoX3RpbWUiOjE2ODM4NzU0MTd9.wBPUbouiSs2HeQPZUuwVQ62BHUoNWFydE6vre8ulwZs";
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODQzMjEyNjgsIm5iZiI6MTY4NDMyMTI2OCwiZXhwIjoxNjg0OTI2MDY4LCJ0b2tlbiI6ImZkNjg2MGE4OTkwNTA4N2MwYjc4NzYxZWJmYzNiNDA3IiwiYnRva2VuIjoiZmQ2ODYwYTg5OTA1MDg3YzBiNzg3NjFlYmZjM2I0MDciLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIzMiIsIm5hbWUiOiIxNTEwMDAwMDAwMCIsInBob25lIjoiMTUxMDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjE2IiwibXRva2VuIjoiZGE4MGJmZDk3NDA3MmMyNGJiMWQ1OWRlMDc3YmFkYzYiLCJ0eXBlIjoic3RvcmUiLCJ0aGlyZF9hcHBpZCI6IiIsImN1cnJlbnRfYnRva2VuIjoiZmQ2ODYwYTg5OTA1MDg3YzBiNzg3NjFlYmZjM2I0MDciLCJhY2NvdW50X3R5cGUiOiIxIiwiYWNjb3VudF9yb2xlcyI6WyJtYXN0ZXIiXSwic3dpdGNoX3RpbWUiOjE2ODQzMjE1NzB9.HdfzIIenGOOkbu2mGM3WQrvr-vr9lRJMPYnnckyBC2Y";
if (process.env.NODE_ENV === "development") {
return token;
} else return getCookie("token");
......
......@@ -5,11 +5,11 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加轮播图</el-button>
</div>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData" >
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
......@@ -25,7 +25,7 @@
</el-table-column>
<el-table-column prop="state" label="是否启用">
<template slot-scope="scope">
<el-switch v-model="scope.row.state" @change="change(scope.row.state,scope.row)"
<el-switch v-model="scope.row.state" @change="change(scope.row.state, scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
......@@ -167,9 +167,9 @@
</div>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
......@@ -186,7 +186,7 @@
</el-table-column>
<el-table-column prop="state" label="是否启用">
<template slot-scope="scope">
<el-switch v-model="scope.row.state" @change="change(scope.row.state,scope.row)"
<el-switch v-model="scope.row.state" @change="change(scope.row.state, scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
......@@ -216,11 +216,11 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加</el-button>
</div>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData" >
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
......@@ -237,7 +237,7 @@
</el-table-column>
<el-table-column prop="state" label="是否启用">
<template slot-scope="scope">
<el-switch v-model="scope.row.state" @change="change(scope.row.state,scope.row)"
<el-switch v-model="scope.row.state" @change="change(scope.row.state, scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
......@@ -269,9 +269,9 @@
</div>
<el-table v-loading="tableDataLoading" :data="tableData" :key="activeName">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
......@@ -287,7 +287,7 @@
</el-table-column>
<el-table-column prop="state" label="是否启用">
<template slot-scope="scope">
<el-switch v-model="scope.row.state" @change="change(scope.row.state,scope.row)"
<el-switch v-model="scope.row.state" @change="change(scope.row.state, scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
......@@ -318,9 +318,9 @@
</div>
<el-table v-loading="tableDataLoading" :data="tableData" :key="activeName">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
......@@ -337,9 +337,9 @@
</el-table-column>
<el-table-column prop="state" label="是否启用">
<template slot-scope="scope">
<el-switch v-model="scope.row.state" :disabled="!isAuth('bannerList:update')" @change="change(scope.row.state,scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949">
<el-switch v-model="scope.row.state" :disabled="!isAuth('bannerList:update')"
@change="change(scope.row.state, scope.row)" :active-value="openValue"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
......@@ -363,18 +363,18 @@
<!-- 添加弹框 -->
</el-tab-pane>
<!-- 添加 -->
<el-dialog title="添加" :visible.sync="dialogFormVisible" center>
<el-dialog title="添加" :visible.sync="dialogFormVisible" center @close="dialogClose">
<div style="margin-bottom: 10px;display: flex;">
<span style="width: 200px;display: inline-block;text-align: right;">图片:</span>
<div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="imageUrl"
<div>
<!-- <el-upload class="avatar-uploader" v-model="imageUrl"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar"
style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-upload> -->
<upload-image v-model="imageUrl" @input="handleAvatarSuccess"></upload-image>
</div>
</div>
<div style="margin-bottom: 10px;">
......@@ -395,18 +395,18 @@
</div>
</el-dialog>
<!-- 修改弹框 -->
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center @close="dialogClose">
<el-form :model="form">
<el-form-item label="图片:" :label-width="formLabelWidth">
<div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="imageUrl"
<div>
<!-- <el-upload class="avatar-uploader" v-model="imageUrl"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess2">
<img v-if="form.imageUrl" :src="form.imageUrl" class="avatar"
style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-upload> -->
<upload-image v-model="form.imageUrl" @input="handleAvatarSuccess2"></upload-image>
</div>
</el-form-item>
<el-form-item label="链接:" :label-width="formLabelWidth">
......@@ -428,184 +428,195 @@
</template>
<script>
export default {
data() {
return {
page: 1,
limit: 10,
size: 5,
classify: 1,
openValue: 1,
closeValue: 2,
import UploadImage from '@/components/UploadImage'
export default {
components: { UploadImage },
data() {
return {
page: 1,
limit: 10,
size: 5,
classify: 1,
openValue: 1,
closeValue: 2,
name: '',
imageUrl: '',
url: '',
state: 1,
describes: '',
hideUpload: false,
activeName: 'first',
dialogFormVisible: false,
dialogFormVisibleG: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
dialogFormVisible6: false,
tableDataLoading: true,
formLabelWidth: '200px',
tableData: [],
gonggaoData: {},
choicenData: [],
choicenData2: [],
checkBoxData: [], //多选框选择的值
keyword: '',
info: {
stockDate: this.getNowTime(), //日期
},
states: [{
label: '显示',
value: 1
},
{
label: '隐藏',
value: 2
}
],
type: 1,
types: [{
value: 1,
label: '文字'
},
{
value: 2,
label: '链接'
}
],
form: {
id: '',
name: '',
imageUrl: '',
url: '',
state: 1,
classify: '',
createTime: '',
sort: '',
state: '',
describes: '',
hideUpload: false,
activeName: 'first',
dialogFormVisible: false,
dialogFormVisibleG: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
dialogFormVisible6: false,
tableDataLoading: true,
formLabelWidth: '200px',
tableData: [],
gonggaoData:{},
choicenData: [],
choicenData2: [],
checkBoxData: [], //多选框选择的值
keyword: '',
info: {
stockDate: this.getNowTime(), //日期
},
states: [{
label: '显示',
value: 1
},
{
label: '隐藏',
value: 2
}
],
type: 1,
types: [{
value: 1,
label: '文字'
},
{
value: 2,
label: '链接'
}
],
form: {
id: '',
name: '',
imageUrl: '',
url: '',
classify: '',
createTime: '',
sort: '',
state: '',
describes: '',
type:'',
title:'',
},
type: '',
title: '',
}
},
methods: {
// 多选
changeFun(val) {
this.checkBoxData = val
},
//处理默认选中当前日期
getNowTime() {
var now = new Date()
var year = now.getFullYear() //得到年份
var month = now.getMonth() //得到月份
var date = now.getDate() //得到日期
var hh = now.getHours() < 10 ? '0' + now.getHours() : now.getHours()
var mm = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes()
var ss = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds()
month = month + 1
month = month.toString().padStart(2, '0')
date = date.toString().padStart(2, '0')
var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}`
return defaultDate
this.$set(this.info, 'stockDate', defaultDate)
},
// tabs切换
handleClick(tab, event) {
// if (tab._props.label == '首页公告') {
// this.page = 1
// this.limit = 10
// this.state = 1
// this.dataSelect1()
// }
if (tab.name == 'first') {
this.page = 1
this.limit = 10
this.classify = 1
this.dataSelect()
}
if (tab.name == 'fourthly') {
this.page = 1
this.limit = 10
this.classify = 2
this.dataSelect()
}
if (tab.name == 'fenleihuodong') {
this.page = 1
this.limit = 10
this.classify = 3
this.dataSelect()
}
// if (tab._props.label == '精品服务') {
// this.page = 1
// this.limit = 10
// this.classify = 4
// this.dataSelect()
// }
if (tab.name == 'qita') {
this.page = 1
this.limit = 10
this.classify = 4
this.dataSelect()
}
if (tab.name == 'fivethly') {
this.page = 1
this.limit = 10
this.classify = 5
this.dataSelect()
}
},
//上传成功
handleAvatarSuccess(file) {
this.imageUrl = file.data
},
handleAvatarSuccess2(file2) {
this.form.imageUrl = file2.data
},
handleSizeChange(val) {
this.limit = val
title: '',
}
},
methods: {
dialogClose() {
this.imageUrl = ''
this.state = ''
this.url = ''
this.name = ''
this.describes = ''
},
// 多选
changeFun(val) {
this.checkBoxData = val
},
//处理默认选中当前日期
getNowTime() {
var now = new Date()
var year = now.getFullYear() //得到年份
var month = now.getMonth() //得到月份
var date = now.getDate() //得到日期
var hh = now.getHours() < 10 ? '0' + now.getHours() : now.getHours()
var mm = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes()
var ss = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds()
month = month + 1
month = month.toString().padStart(2, '0')
date = date.toString().padStart(2, '0')
var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}`
return defaultDate
this.$set(this.info, 'stockDate', defaultDate)
},
// tabs切换
handleClick(tab, event) {
// if (tab._props.label == '首页公告') {
// this.page = 1
// this.limit = 10
// this.state = 1
// this.dataSelect1()
// }
if (tab.name == 'first') {
this.page = 1
this.limit = 10
this.classify = 1
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val
}
if (tab.name == 'fourthly') {
this.page = 1
this.limit = 10
this.classify = 2
this.dataSelect()
},
handleSizeChange2(val) {
this.limit = val
this.dataSelect1()
},
handleCurrentChange2(val) {
this.page = val
this.dataSelect1()
},
handleSizeChange3(val) {
this.limit = val
this.choicenSelect()
},
handleCurrentChange3(val) {
this.page = val
this.choicenSelect()
},
// 是否启用
change(val, row) {
this.$http({
url: this.$http.adornUrl(`banner/updateBannerStateById?id=${row.id}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
}
if (tab.name == 'fenleihuodong') {
this.page = 1
this.limit = 10
this.classify = 3
this.dataSelect()
}
// if (tab._props.label == '精品服务') {
// this.page = 1
// this.limit = 10
// this.classify = 4
// this.dataSelect()
// }
if (tab.name == 'qita') {
this.page = 1
this.limit = 10
this.classify = 4
this.dataSelect()
}
if (tab.name == 'fivethly') {
this.page = 1
this.limit = 10
this.classify = 5
this.dataSelect()
}
},
//上传成功
handleAvatarSuccess(file) {
console.log(file)
this.imageUrl = file.data
},
handleAvatarSuccess2(file2) {
this.form.imageUrl = file2.data
},
handleSizeChange(val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val
this.dataSelect()
},
handleSizeChange2(val) {
this.limit = val
this.dataSelect1()
},
handleCurrentChange2(val) {
this.page = val
this.dataSelect1()
},
handleSizeChange3(val) {
this.limit = val
this.choicenSelect()
},
handleCurrentChange3(val) {
this.page = val
this.choicenSelect()
},
// 是否启用
change(val, row) {
this.$http({
url: this.$http.adornUrl(`banner/updateBannerStateById?id=${row.id}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
......@@ -614,92 +625,92 @@
this.dataSelect()
}
})
})
},
//添加banner图
addNotice() {
this.dialogFormVisible = true
},
// 添加banner图
addNoticeTo() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
// this.classify = 1
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
})
},
//添加banner图
addNotice() {
this.dialogFormVisible = true
},
// 添加banner图
addNoticeTo() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
// this.classify = 1
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.imageUrl = ''
this.state = ''
this.url = ''
this.name = ''
this.describes = ''
this.dialogClose()
this.dataSelect()
}
})
}
})
},
// 修改
amendBanner(index, rows) {
this.dialogFormVisible1 = true
this.form.id = rows.id
this.form.imageUrl = rows.imageUrl
this.form.url = rows.url
this.form.sort = rows.sort
this.form.state = rows.state
this.form.name = rows.name
this.form.describes = rows.describes
},
// 修改
amendNoticeTo() {
this.$http({
url: this.$http.adornUrl('banner/updateBannerById'),
method: 'post',
data: this.$http.adornData({
'id': this.form.id,
'createTime': this.info.stockDate,
'imageUrl': this.form.imageUrl,
'url': this.form.url,
'state': this.form.state,
'sort': this.form.sort,
'name': this.form.name,
'describes': this.form.describes
})
},
// 修改
amendBanner(index, rows) {
this.dialogFormVisible1 = true
this.form.id = rows.id
this.form.imageUrl = rows.imageUrl
this.form.url = rows.url
this.form.sort = rows.sort
this.form.state = rows.state
this.form.name = rows.name
this.form.describes = rows.describes
},
// 修改
amendNoticeTo() {
this.$http({
url: this.$http.adornUrl('banner/updateBannerById'),
method: 'post',
data: this.$http.adornData({
'id':this.form.id,
'createTime':this.info.stockDate,
'imageUrl':this.form.imageUrl,
'url':this.form.url,
'state':this.form.state,
'sort':this.form.sort,
'name':this.form.name,
'describes':this.form.describes
})
}).then(({
data
}) => {
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
......@@ -709,430 +720,428 @@
this.dataSelect()
}
})
})
},
//添加任务分类
addNotice2() {
this.dialogFormVisible2 = true
},
// 添加添加任务分类
addNoticeTo2() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 2
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
})
},
//添加任务分类
addNotice2() {
this.dialogFormVisible2 = true
},
// 添加添加任务分类
addNoticeTo2() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 2
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible2 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.imageUrl = ''
this.state = ''
this.url = ''
this.name = ''
this.describes = ''
this.dialogClose()
this.dataSelect()
}
})
})
},
//添加活动
addNotice3() {
this.dialogFormVisible3 = true
},
// 添加添加活动
addNoticeTo3() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 3
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
})
},
//添加活动
addNotice3() {
this.dialogFormVisible3 = true
},
// 添加添加活动
addNoticeTo3() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 3
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible3 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.imageUrl = ''
this.state = ''
this.url = ''
this.name = ''
this.describes = ''
this.dialogClose()
this.dataSelect()
}
})
})
},
//添加精品服务
addNotice4() {
this.dialogFormVisible4 = true
},
// 添加精品服务
addNoticeTo4() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 4
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
})
},
//添加精品服务
addNotice4() {
this.dialogFormVisible4 = true
},
// 添加精品服务
addNoticeTo4() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 4
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible4 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.imageUrl = ''
this.state = ''
this.url = ''
this.name = ''
this.describes = ''
this.dialogClose()
this.dataSelect()
}
})
})
},
//添加活动背景图
addNotice5() {
if (this.tableData.length == 1) {
this.$message({
title: '提示',
duration: 1800,
message: '活动背景图只能添加一张',
type: 'warning'
})
} else {
this.dialogFormVisible5 = true
}
},
// 添加背景图
addNoticeTo5() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
// type: 'success',
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 5
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
})
},
//添加活动背景图
addNotice5() {
if (this.tableData.length == 1) {
this.$message({
title: '提示',
duration: 1800,
message: '活动背景图只能添加一张',
type: 'warning'
})
} else {
this.dialogFormVisible5 = true
}
},
// 添加背景图
addNoticeTo5() {
if (this.imageUrl == '') {
this.$notify({
title: '提示',
duration: 1800,
// type: 'success',
message: '请上传图片',
type: 'warning'
})
return
}
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入名称',
type: 'warning'
})
return
}
this.classify = 5
this.$http({
url: this.$http.adornUrl('banner/insertBanner'),
method: 'post',
data: this.$http.adornData({
'classify': this.classify,
'imageUrl': this.imageUrl,
'state': this.state,
'url': this.url,
'name': this.name,
'describes': this.describes
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible5 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.imageUrl = ''
this.state = ''
this.url = ''
this.name = ''
this.describes = ''
this.dialogClose()
this.dataSelect()
}
})
})
},
// 删除banner图
deletes(row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`banner/deleteBannerById?ids=${delid}`),
method: 'get',
data: this.$http.adornData({})
}).then(({
data
}) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {})
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('banner/selectBannerList'),
method: 'get',
params: this.$http.adornParams({
'state': this.state,
'classify': this.classify,
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
}
})
},
// 获取数据列表
dataSelect1() {
this.tableDataLoading = true
}
})
},
// 删除banner图
deletes(row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('admin/notice/selectNoticeList'),
url: this.$http.adornUrl(`banner/deleteBannerById?ids=${delid}`),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data
this.gonggaoData = returnData
})
},
//添加精选商品
choiaddNotice() {
this.dialogFormVisible6 = true
},
// 添加商品
releasNoticeTo(row) {
this.$http({
url: this.$http.adornUrl('commodity/save'),
method: 'post',
data: this.$http.adornData({
'activityid': row.activityid,
'couponendtime': row.couponendtime,
'couponmoney': row.couponmoney,
'couponstarttime': row.couponstarttime,
'couponurl': row.couponurl,
'deposit': row.deposit,
'deposit_deduct': row.deposit_deduct,
'item_from': row.item_from,
'itemdesc': row.itemdesc,
'itemendprice': row.itemendprice,
'itemid': row.itemid,
'itempic': row.itempic,
'itemprice': row.itemprice,
'itemsale': row.itemsale,
'itemshorttitle': row.itemshorttitle,
'itemtitle': row.itemtitle,
'presale_end_time': row.presale_end_time,
'presale_start_time': row.presale_start_time,
'presale_tail_end_time': row.presale_tail_end_time,
'presale_tail_start_time': row.presale_tail_start_time,
'sellernick': row.sellernick,
'shopname': row.shopname,
'shoptype': row.shoptype,
'taobao_image': row.taobao_image,
'tkrates': row.tkrates,
'videoid': row.videoid,
})
data: this.$http.adornData({})
}).then(({
data
}) => {
if (data && data.code === 0) {
if (data && data.code == 0) {
this.$message({
message: '操作成功',
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.choicenSelect()
this.keyword = ''
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
},
// 精选淘宝商品
handpick() {
this.tableDataLoading = true
this.keyword = '网红'
this.$http({
url: this.$http.adornUrl2(
`/supersearch/apikey/maxd/back/20/sort/2/keyword/${this.keyword}/is_coupon/1/tb_p/1/min_id/1`
),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 1) {
this.tableDataLoading = false
this.keyword = ''
let returnData = data.data
this.choicenData2 = returnData
}
}).catch(() => { })
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('banner/selectBannerList'),
method: 'get',
params: this.$http.adornParams({
'state': this.state,
'classify': this.classify,
})
},
// 搜索
shousuo() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl2(
`/supersearch/apikey/maxd/back/100/sort/2/keyword/${this.keyword}/is_coupon/1/tb_p/1/min_id/1`
),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
console.log(data)
if (data && data.code === 1) {
this.tableDataLoading = false
let returnData = data.data
this.choicenData2 = returnData
}
}).then(({
data
}) => {
if (data && data.code === 0) {
let returnData = data.data
this.tableData = returnData
}
}).finally(() => {
this.tableDataLoading = false
})
},
// 获取数据列表
dataSelect1() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('admin/notice/selectNoticeList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
})
},
// 精选商品列表
choicenSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('commodity/selectCommodityList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
}).then(({
data
}) => {
if (data && data.code == 0) {
let returnData = data.data
this.gonggaoData = returnData
}
}).finally(() => {
this.tableDataLoading = false
})
},
//添加精选商品
choiaddNotice() {
this.dialogFormVisible6 = true
},
// 添加商品
releasNoticeTo(row) {
this.$http({
url: this.$http.adornUrl('commodity/save'),
method: 'post',
data: this.$http.adornData({
'activityid': row.activityid,
'couponendtime': row.couponendtime,
'couponmoney': row.couponmoney,
'couponstarttime': row.couponstarttime,
'couponurl': row.couponurl,
'deposit': row.deposit,
'deposit_deduct': row.deposit_deduct,
'item_from': row.item_from,
'itemdesc': row.itemdesc,
'itemendprice': row.itemendprice,
'itemid': row.itemid,
'itempic': row.itempic,
'itemprice': row.itemprice,
'itemsale': row.itemsale,
'itemshorttitle': row.itemshorttitle,
'itemtitle': row.itemtitle,
'presale_end_time': row.presale_end_time,
'presale_start_time': row.presale_start_time,
'presale_tail_end_time': row.presale_tail_end_time,
'presale_tail_start_time': row.presale_tail_start_time,
'sellernick': row.sellernick,
'shopname': row.shopname,
'shoptype': row.shoptype,
'taobao_image': row.taobao_image,
'tkrates': row.tkrates,
'videoid': row.videoid,
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.choicenSelect()
this.keyword = ''
}
})
}).then(({
data
}) => {
} else {
this.$message.error(data.msg)
}
})
},
// 精选淘宝商品
handpick() {
this.tableDataLoading = true
this.keyword = '网红'
this.$http({
url: this.$http.adornUrl2(
`/supersearch/apikey/maxd/back/20/sort/2/keyword/${this.keyword}/is_coupon/1/tb_p/1/min_id/1`
),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 1) {
this.tableDataLoading = false
this.keyword = ''
let returnData = data.data
this.choicenData = returnData
})
},
// 批量删除任务
choideletes(id) {
var ids = id ? [id] : this.checkBoxData.map(item => {
return item.id
this.choicenData2 = returnData
}
})
},
// 搜索
shousuo() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl2(
`/supersearch/apikey/maxd/back/100/sort/2/keyword/${this.keyword}/is_coupon/1/tb_p/1/min_id/1`
),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 1) {
this.tableDataLoading = false
let returnData = data.data
this.choicenData2 = returnData
}
})
},
// 精选商品列表
choicenSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('commodity/selectCommodityList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
})
this.$http({
url: this.$http.adornUrl(`/commodity/deleteById?id=${ids}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data
this.choicenData = returnData
})
},
// 批量删除任务
choideletes(id) {
var ids = id ? [id] : this.checkBoxData.map(item => {
return item.id
})
this.$http({
url: this.$http.adornUrl(`/commodity/deleteById?id=${ids}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.$message({
message: '批量删除成功',
type: 'success',
......@@ -1141,23 +1150,25 @@
this.choicenSelect()
}
})
})
},
// 删除商品
choidelete(row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`/commodity/deleteById/?id=${delid}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
}
})
},
// 删除商品
choidelete(row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`/commodity/deleteById/?id=${delid}`),
method: 'post',
data: this.$http.adornData({})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
......@@ -1166,69 +1177,71 @@
this.choicenSelect()
}
})
})
}).catch(() => {})
},
// 添加公告弹框
addNoticeG() {
this.title = ''
this.type = 1
this.url = ''
this.dialogFormVisibleG = true
},
// 修改弹框
updates(rows) {
console.log('``````````````````')
this.form.state = rows.state
this.dialogFormVisible2 = true
this.form.id = rows.id
this.form.title = rows.title
this.form.url = rows.url
this.form.type = rows.type
},
// 添加公告
releasgongaoTo() {
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告标题',
type: 'warning'
})
return
}
if (this.type == '') {
}
})
}).catch(() => { })
},
// 添加公告弹框
addNoticeG() {
this.title = ''
this.type = 1
this.url = ''
this.dialogFormVisibleG = true
},
// 修改弹框
updates(rows) {
console.log('``````````````````')
this.form.state = rows.state
this.dialogFormVisible2 = true
this.form.id = rows.id
this.form.title = rows.title
this.form.url = rows.url
this.form.type = rows.type
},
// 添加公告
releasgongaoTo() {
if (this.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告标题',
type: 'warning'
})
return
}
if (this.type == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择公告类型',
type: 'warning'
})
return
}
if (this.type == 2) {
if (this.url == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择公告类型',
message: '请输入公告链接',
type: 'warning'
})
return
}
if(this.type == 2){
if (this.url == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告链接',
type: 'warning'
})
return
}
}
this.$http({
url: this.$http.adornUrl('admin/notice/insertNotice'),
method: 'post',
data: this.$http.adornData({
'state': this.state,
'url': this.url,
'title': this.title,
'type': this.type
})
}).then(({
data
}) => {
}
this.$http({
url: this.$http.adornUrl('admin/notice/insertNotice'),
method: 'post',
data: this.$http.adornData({
'state': this.state,
'url': this.url,
'title': this.title,
'type': this.type
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisibleG = false
this.$message({
message: '操作成功',
......@@ -1238,50 +1251,52 @@
this.dataSelect1()
}
})
})
},
// 修改公告
amendNoticeToG() {
if (this.form.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告标题',
type: 'warning'
})
return
}
if (this.form.url == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告链接',
type: 'warning'
})
return
}
if (this.form.type == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择公告类型',
type: 'warning'
})
return
}
this.$http({
url: this.$http.adornUrl('admin/notice/updateNotice'),
method: 'post',
data: this.$http.adornData({
'id': this.form.id,
'state': this.form.state,
'title': this.form.title,
'url': this.form.url,
'type': this.form.type,
})
}).then(({
data
}) => {
})
},
// 修改公告
amendNoticeToG() {
if (this.form.title == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告标题',
type: 'warning'
})
return
}
if (this.form.url == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入公告链接',
type: 'warning'
})
return
}
if (this.form.type == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择公告类型',
type: 'warning'
})
return
}
this.$http({
url: this.$http.adornUrl('admin/notice/updateNotice'),
method: 'post',
data: this.$http.adornData({
'id': this.form.id,
'state': this.form.state,
'title': this.form.title,
'url': this.form.url,
'type': this.form.type,
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.dialogFormVisible2 = false
this.$message({
message: '操作成功',
......@@ -1291,24 +1306,26 @@
this.dataSelect1()
}
})
})
},
// 删除公告
deletes1(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/admin/notice/deleteNotice'),
method: 'post',
params: this.$http.adornParams({
'id':row.id
})
}).then(({
data
}) => {
}
})
},
// 删除公告
deletes1(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/admin/notice/deleteNotice'),
method: 'post',
params: this.$http.adornParams({
'id': row.id
})
}).then(({
data
}) => {
if (data && data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
......@@ -1318,18 +1335,19 @@
this.dataSelect1()
}
})
})
}).catch(() => {})
},
}
})
}).catch(() => { })
},
activated() {
this.handleClick({name: this.activeName})
}
},
activated() {
this.handleClick({ name: this.activeName })
}
}
</script>
<style>
.customWidth {
width: 80% !important;
}
.customWidth {
width: 80% !important;
}
</style>
......@@ -212,6 +212,15 @@ export default {
},
},
components: { SearchForm },
watch: {
activeName: {
handler(val) {
if(val == 'huodong') {
this.dataSelect()
}
},
}
},
data() {
return {
searchData: {
......@@ -260,7 +269,7 @@ export default {
tableDataYhq: {},
couponContentImage: [], //轮播图
percentage1: 0,
originalPrice: '',
originalPrice: '',
quillOption: quillConfig,
}
},
......@@ -280,13 +289,13 @@ export default {
this.dataSelect()
},
handleSizeChangeY(val) {
this.size1 = val;
this.dataSelectYhq()
},
handleCurrentChangeY(val) {
this.page1 = val;
this.dataSelectYhq()
},
this.size1 = val;
this.dataSelectYhq()
},
handleCurrentChangeY(val) {
this.page1 = val;
this.dataSelectYhq()
},
// 列表
dataSelect() {
this.tableDataLoading = true
......@@ -541,25 +550,26 @@ export default {
})
},
// 多选券
changeFun(row) {
this.couponIds.push(row.couponId)
this.couponIdList.push(row.couponName)
this.dialogFormVisible4 = false
},
changeFun(row) {
this.couponIds.push(row.couponId)
this.couponIdList.push(row.couponName)
this.dialogFormVisible4 = false
},
onprogress1(event, file, fileList) {
console.log('详情图上传进度', parseInt(event.percent))
this.percentage1 = parseInt(event.percent)
},
console.log('详情图上传进度', parseInt(event.percent))
this.percentage1 = parseInt(event.percent)
},
handleAvatarSuccess2(file, fileList) {
this.form.couponIssueImage = file.data
},
this.form.couponIssueImage = file.data
},
// 删除
clear(index) {
this.couponContentImage.splice(index, 1);
},
clear(index) {
this.couponContentImage.splice(index, 1);
},
},
mounted() {
this.dataSelect()
activated() {
if (this.activeName == 'huodong')
this.dataSelect()
}
};
</script>
......
......@@ -65,6 +65,14 @@ export default {
if (val) {
this.serachHandle()
}
},
activeName: {
handler(val) {
if(val == 'kami') {
this.dataSelect();
}
},
immediate: true
}
},
data() {
......@@ -188,8 +196,9 @@ export default {
})
},
},
mounted() {
this.dataSelect()
activated() {
if (this.activeName == 'kami')
this.dataSelect()
}
};
</script>
......
......@@ -212,6 +212,16 @@ export default {
},
},
components: { SearchForm },
watch: {
activeName: {
handler(val) {
if (val == 'shoumai') {
this.dataSelect()
}
},
immediate: true
}
},
data() {
return {
searchData: {
......@@ -388,43 +398,43 @@ export default {
},
// 删除优惠券
// 删除优惠券
shopdeletes(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('couponIssue/deleteCouponIssueById'),
method: 'post',
params: this.$http.adornParams({
'couponIssueId': row.couponIssueId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}
})
}).catch(() => { })
},
shopdeletes(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('couponIssue/deleteCouponIssueById'),
method: 'post',
params: this.$http.adornParams({
'couponIssueId': row.couponIssueId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'error',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}
})
}).catch(() => { })
},
//上传成功
handleUploadSuccess(file, fileList) {
this.form.couponContentImage = file.data
......@@ -570,19 +580,20 @@ export default {
this.dialogFormVisible4 = false
},
onprogress1(event, file, fileList) {
console.log('详情图上传进度', parseInt(event.percent))
this.percentage1 = parseInt(event.percent)
},
console.log('详情图上传进度', parseInt(event.percent))
this.percentage1 = parseInt(event.percent)
},
handleAvatarSuccess2(file, fileList) {
this.form.couponIssueImage = file.data
},
this.form.couponIssueImage = file.data
},
// 删除
clear(index) {
this.couponContentImage.splice(index, 1);
},
clear(index) {
this.couponContentImage.splice(index, 1);
},
},
mounted() {
this.dataSelect()
activated() {
if (this.activeName == 'shoumai')
this.dataSelect()
}
};
</script>
......
......@@ -34,14 +34,14 @@
<el-dropdown trigger="click">
<el-link type="primary" :underline="false">更多<i class="el-icon-arrow-down"></i></el-link>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<span @click="listBtn(scope.row)">优惠券列表</span>
<el-dropdown-item @click.native="listBtn(scope.row)">
<span>优惠券列表</span>
</el-dropdown-item>
<el-dropdown-item>
<span @click="listBtnKm(scope.row)">卡密列表</span>
<el-dropdown-item @click.native="listBtnKm(scope.row)">
<span>卡密列表</span>
</el-dropdown-item>
<el-dropdown-item :disabled="!isAuth('coupon:shengcheng')" >
<span @click="shengCoupon(scope.row)">生成卡密</span>
<el-dropdown-item :disabled="!isAuth('coupon:shengcheng')" @click.native="shengCoupon(scope.row)">
<span>生成卡密</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -165,7 +165,7 @@
</el-dialog>
<!-- 卡密列表 -->
<el-dialog title="卡密列表" :visible.sync="dialogFormVisibleKm" center width="70%">
<coupon-card-seal :activeName="activeName" :couponCardTypeId="couponCardTypeId"
<coupon-card-seal ref="couponCardSealRef" :activeName="activeName" :couponCardTypeId="couponCardTypeId"
:isSlot="true"></coupon-card-seal>
</el-dialog>
</el-tabs>
......@@ -236,7 +236,11 @@ export default {
this.dataSelectYhq()
},
handleClick(tab, event) {
if(tab.name == 'first') {
this.refresh()
}else if(tab.name == 'kami') {
}
},
// 刷新
refresh() {
......@@ -530,7 +534,7 @@ export default {
this.dialogFormVisibleKm = true
},
},
mounted() {
activated() {
this.dataSelect()
}
};
......
<template>
<div>
<sys-set-table :key="tabName" :tabName="tabName" :loading="tableDataLoading" :data="tableData" @refresh="refresh">
<template #content slot-scope="slotProps">
<div>
<span v-for="(item, index) in slotProps.scopeRow.couponList" :key="index">{{ (item && item.couponName) || '' }};</span>
</div>
</template>
</sys-set-table>
</div>
</template>
<script>
import sysSetTable from '@/components/sysSetTable'
export default {
props: {
tabName: {
type: String,
default: ''
}
},
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'yhq') {
this.getData()
}
},
immediate: true
}
},
data() {
return {
tableDataLoading: false,
tableData: [],
}
},
activated() {
if (this.tabName == 'yhq')
this.getData();
},
methods: {
// 获取数据列表
getData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/coupon`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
refresh() {
this.getData();
}
}
}
</script>
<style></style>
\ No newline at end of file
......@@ -26,11 +26,14 @@
<span style="color: #3E8EF7;" v-if="scope.row.type==2">商品券</span>
</template>
</el-table-column> -->
<el-table-column prop="money" label="优惠券面值" width="100">
<el-table-column prop="money" label="优惠券面值" width="100"
:formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="minMoney" label="优惠券最低消费" width="150">
<el-table-column prop="minMoney" label="优惠券最低消费" width="150"
:formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="endDate" label="优惠券有效期限(天)" width="150">
<el-table-column prop="endDate" label="优惠券有效期限(天)" width="150"
:formatter="(row, column) => tableFormatter(row, column, null, '天')">
</el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
......@@ -77,14 +80,14 @@
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">优惠券图片:</span>
<div
style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;">
<el-upload class="avatar-uploader" v-model="couponPicture"
<div style="display: inline-block; vertical-align: top;">
<!-- <el-upload class="avatar-uploader" v-model="couponPicture"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess1">
<img v-if="couponPicture" :src="couponPicture" class="avatar" style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload>
</el-upload> -->
<upload-image v-model="couponPicture" @input="handleAvatarSuccess1"></upload-image>
</div>
</div>
<div style="margin-bottom: 10px;">
......@@ -133,7 +136,7 @@
style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> -->
<upload-image v-model="form.couponPicture"></upload-image>
<upload-image v-model="form.couponPicture" @input="handleAvatarSuccess2"></upload-image>
</div>
</el-form-item>
......@@ -245,7 +248,7 @@
</div>
</el-dialog>
<!-- 赠送优惠券-->
<el-dialog title="赠送优惠券" :visible.sync="dialogFormVisible0" center>
<el-dialog title="赠送优惠券" :visible.sync="dialogFormVisible0" center @close="dialogClose">
<!-- <div>
<span style="width: 200px;display: inline-block;text-align: right;">赠送类型:</span>
<el-radio-group v-model="types">
......@@ -300,7 +303,7 @@
</div>
<el-button style="margin-left:15px;" :disabled="userIdList.length <= 0" size="mini" type="primary"
icon="document" @click="closes2()">确定</el-button>
<el-table v-loading="tableDataLoading1" @selection-change="changeFun1" :data="userData.list"
<el-table ref="multipleTableRef" v-loading="tableDataLoading1" @selection-change="changeFun1" :data="userData.list"
:row-key="(row) => { return row.userId }">
<el-table-column :reserve-selection="true" type="selection" fixed>
</el-table-column>
......@@ -396,7 +399,7 @@ export default {
data() {
return {
dialogImageUrl: '',
dialogVisible: false,
dialogVisible: false,
size: 10,
page: 1,
size1: 10,
......@@ -471,6 +474,10 @@ export default {
},
methods: {
// 弹窗关闭
dialogClose() {
this.$refs.multipleTableRef.clearSelection();
},
// 通用券/商品券
couponClick(val) {
if (val = 1) {
......@@ -706,12 +713,12 @@ export default {
})
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
// 删除优惠券
shopdeletes(row) {
this.$confirm(`确定删除此条信息?`, '提示', {
......@@ -1074,6 +1081,17 @@ export default {
}
})
},
// 表格数据格式化
tableFormatter(row, column, type, unit) {
switch (type) {
case 'datetime':
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date':
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit && !this.isEmpty(row[column.property]) ? row[column.property] + unit : '--'
}
},
},
activated() {
this.dataSelect()
......
......@@ -32,9 +32,9 @@
</el-table-column>
<el-table-column prop="phone" label="手机号">
</el-table-column>
<el-table-column prop="money" label="优惠券面值">
<el-table-column prop="money" label="优惠券面值" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="minMoney" label="优惠券最低消费">
<el-table-column prop="minMoney" label="优惠券最低消费" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column>
<el-table-column prop="expirationTime" label="优惠券失效时间" width="150">
</el-table-column>
......@@ -161,6 +161,17 @@ export default {
}
})
},
// 表格数据格式化
tableFormatter(row, column, type, unit) {
switch (type) {
case 'datetime':
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date':
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit && !this.isEmpty(row[column.property]) ? row[column.property] + unit : '--'
}
},
},
activated() {
this.dataSelect()
......
......@@ -193,7 +193,7 @@
<li v-for="(msg, index) in tableData" :key="index" @click="toDetail(msg)">
<div class="message_content">
<h4 class="message_title">{{ msg.title }}</h4>
<div class="message_desc">{{ msg.content }}</div>
<!-- <div class="message_desc">{{ msg.content }}</div> -->
</div>
</li>
</ul>
......@@ -215,12 +215,15 @@
<div slot="header" class="card_header">
<span class="card_title">广告位</span>
</div>
<el-carousel :interval="4000" height="307px">
<el-carousel-item style="display: flex; justify-content: center; align-items: center;"
v-for="(item, index) in bannerList" :key="index">
<el-image :src="item"></el-image>
</el-carousel-item>
</el-carousel>
<div class="adv_container">
<el-carousel :interval="4000" height="307px" v-if="bannerList && bannerList.length">
<el-carousel-item style="display: flex; justify-content: center; align-items: center;"
v-for="(item, index) in bannerList" :key="index">
<el-image :src="item.picUrl"></el-image>
</el-carousel-item>
</el-carousel>
<div class="not-list" v-else>暂无广告</div>
</div>
</el-card>
</div>
</template>
......@@ -233,9 +236,9 @@
<script>
import moment from 'moment';
import { getNoticeList } from '@/api/ldy/notice'
import { getNoticeListAPI } from '@/api/ldy/notice'
import { preChargeSumDetailAPI } from '@/api/ldy/finance/billDetail'
import { getExpressageCompanySimpleAPI, errorOrderSummaryAPI } from '@/api/ldy/home'
import { getExpressageCompanySimpleAPI, errorOrderSummaryAPI, getAdvListAPI } from '@/api/ldy/home'
import payUp from '../pay/components/payUp.vue';
import skeleton from '@/components/skeleton'
export default {
......@@ -265,7 +268,7 @@ export default {
],
channelList: [],
tableData: [],
bannerList: ['http://static.ledouya.com/20220904/140537_1662271673908.png', 'http://static.ledouya.com/20220904/140537_1662271673908.png'],
bannerList: [],
flag: 1,
dataInfos: {
moneyCharge: 0, //累计充值
......@@ -309,12 +312,13 @@ export default {
set(val) { this.$store.commit('user/updateName', val) }
}
},
created() {
activated() {
this.noticeList();
this.preChargeSumDetail();
this.getViewData();
this.getExpressageCompanySimple();
this.errorOrderSummary();
this.getAdvList();
},
methods: {
// 功能导航点击事件
......@@ -385,118 +389,11 @@ export default {
// 通知列表
noticeList() {
let params = {
category: "4",
status: 1,
page: 1,
page_size: 10
}
getNoticeList(params).then(res => {
// this.tableData = [
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// {
// attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
// category: 4,
// content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
// created_at: "2021-07-01 07:17:42",
// industry: "ADVANCED",
// is_read: "1",
// origin_unique_id: "26",
// post_time: "2021-07-01 07:17",
// role: "BUSINESS",
// scene: "SYSTEM_UPGRADE",
// title: "系统升级",
// type: "LESTORE_NOTICE",
// unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
// },
// ]
getNoticeListAPI(params).then(res => {
this.tableData = [];
if (res.error == 0 && res.data) {
this.tableData = res.data.item;
......@@ -643,6 +540,17 @@ export default {
this.loading1 = false
});
},
// 广告位
getAdvList() {
let params = {
"category" : 1
}
getAdvListAPI(params).then(({data: res}) => {
if(res.error == 0 && res.data) {
this.bannerList = res.data.info || []
}
})
}
}
}
</script>
......@@ -778,7 +686,18 @@ export default {
}
}
}
.not-list {
position: absolute;
text-align: center;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
.adv_container {
height: 307px;
overflow-y: auto;
position: relative;
.not-list {
position: absolute;
text-align: center;
......
<template>
<div class="notice_container">
<div class="tabs-nav">
<el-tabs v-model="activeName" @tab-click="togglePage(activeName)">
<el-tab-pane label="系统通知" name="4"></el-tab-pane>
</el-tabs>
<el-select v-model="filter" class="filter-status" size="small" placeholder="请选择" @change="getList(1)">
<el-option label="全部/不限" value="0"></el-option>
<el-option label="已读" value="2"></el-option>
<el-option label="未读" value="1"></el-option>
</el-select>
</div>
<div class="notice_box">
<template v-if="tableData.length > 0">
<div class="item" :class="{ 'readed': item.is_read == 2 }" v-for="(item, index) in tableData" :key="index"
@click="toDetail(item)">
<div class="header">
<h4 class="title">{{ item.title }}</h4>
</div>
<p class="info-content">{{ item.content }}
<span class="to-detail" v-if="activeName != 4" @click="toDetail(item)">【详情】</span>
</p>
<span class="time">
{{ item.post_time }}
<span class="to-read" v-if="item.is_read == 1 && activeName != 4"
@click="toRead(item.unique_id)">标记为已读</span>
</span>
<span class="del" @click="toDel(item.unique_id)" v-if="activeName != 4">
<i class="el-icon-circle-close"></i>
</span>
<div>
<el-tabs v-model="activeName">
<el-tab-pane label="系统通知" name="1">
<el-table v-loading="tableDataLoading" :data="tableData">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column type="index" label="编号" align="center" width="80">
</el-table-column>
<el-table-column prop="title" label="公告标题"></el-table-column>
<el-table-column prop="created_at" label="创建时间"
:formatter="(row, column) => tableFormatter(row, column, 'datetime')">
</el-table-column>
<el-table-column label="操作" prop="options" width="120">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="toDetail(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15]" :page-size="pageSize" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="totalnum">
</el-pagination>
</div>
</template>
<!-- ele 暂无数据插槽 -->
<!-- <template v-else>
<TableEmpty />
</template> -->
<div class="nodata" v-else>
暂无通知
</div>
<div class="footer flex-box">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-sizes="[10, 20, 30]" :page-size="pageSize" layout="total,sizes, prev, pager, next,jumper"
@size-change="changePageSize" :total="total">
</el-pagination>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { getNoticeList, operationRead, operationDelete } from "@/api/ldy/notice";
import moment from 'moment';
import { getNoticeListAPI } from '@/api/ldy/notice'
export default {
data() {
return {
activeName: '4',
filter: '0',
activeName: '1',
pageSize: 10,
currentPage: 1,
total: 0,
tableData: []
page: 1,
totalnum: 0,
tableDataLoading: false,
tableData: [],
}
},
activated() {
this.getList(1);
},
watch: {
$route: {
handler() {
this.activeName = this.$route.query.to ? this.$route.query.to : '4';
},
immediate: true
}
this.getTableData();
},
methods: {
toDetail(item) {
// new goAnyWhere(this, item)
this.$router.push({ name: 'noticeDetail', query: { noticeDetail: JSON.stringify(item) } })
},
togglePage(activeName) {
this.$router.push({ path: this.$route.path, query: { to: activeName } });
this.getList(1)
handleSizeChange(val) {
this.pageSize = val;
this.getTableData()
},
handleCurrentChange(val) {
this.getList(val)
},
changePageSize(val) {
this.pageSize = val
this.getList(1)
this.page = val;
this.getTableData()
},
toRead(id) {
operationRead({ id }).then(res => {
if (res.error == 0) {
this.getList(this.currentPage)
// 表格数据格式化
tableFormatter(row, column, type, unit) {
if (row[column.property]) {
switch (type) {
case 'datetime':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit ? row[column.property] + unit : row[column.property]
}
})
},
toDel(id) {
operationDelete({ id }).then(res => {
if (res.error == 0) {
let page = this.currentPage > 1 && this.tableData.length == 1 ? this.currentPage - 1 : this.currentPage;
this.getList(page)
}
})
},
getList(val) {
let data = {
page: val,
page_size: this.pageSize,
category: this.activeName
}
if (this.filter != 0) {
data.is_read = this.filter
},
//获取列表数据
getTableData() {
this.tableDataLoading = true
let params = {
status: 1,
page: this.page,
page_size: this.pageSize
}
getNoticeList(data).then(res => {
this.currentPage = 1;
this.total = 0;
getNoticeListAPI(params).then(res => {
this.tableData = [];
if (res.error == 0 && res.data) {
this.currentPage = val;
this.total = res.data.count;
this.tableData = res.data.item;
this.totalnum = res.data.count
}
}).finally(() => {
this.tableDataLoading = false
})
}
},
// 复制
copys(number) {
var _this = this
this.$copyText(number).then(function (e) {
_this.$message({
message: '复制成功',
type: 'success'
});
}, function (e) {
_this.$message.error('复制失败');
})
},
toDetail(row) {
this.$router.push({ name: 'noticeDetail', query: { noticeDetail: JSON.stringify(row) } })
},
}
}
</script>
<style scoped lang="scss">
.notice_container {
.tabs-nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.filter-status {
width: 120px;
margin-top: -6px;
}
.title {
margin: 0;
font-size: 15px;
line-height: 28px;
font-weight: 500;
}
.nodata {
font-size: 14px;
line-height: 120px;
color: #666;
text-align: center;
}
.footer {
margin-top: 15px;
text-align: right;
}
.item {
padding: 16px;
cursor: pointer;
&:first-child {
padding-top: 0;
}
.info-content,
.time {
font-size: 14px;
line-height: 24px;
color: #666;
}
}
}
</style>
\ No newline at end of file
<style></style>
\ No newline at end of file
......@@ -2,34 +2,69 @@
<div class="notice_detail">
<el-card shadow="never" class="card-common" style="min-height: 200px">
<div slot="header" class="card_header">
<span class="card_title">{{noticeDetail.title}}</span>
<navigate-back>
<span class="card_title">{{ noticeDetail.title }}</span>
</navigate-back>
</div>
<div class="content">
{{noticeDetail.content}}
<div class="content" v-html="noticeDetail.details">
</div>
</el-card>
</div>
</template>
<script>
import { getNoticeDetailAPI } from '@/api/ldy/notice'
import navigateBack from '@/components/navigateBack'
export default {
data() {
return {
noticeDetail: {}
}
},
created() {
let noticeDetail = JSON.parse(this.$route.query.noticeDetail)
this.noticeDetail = noticeDetail || {}
components: {
navigateBack
},
watch: {
'$route.query.noticeDetail': {
handler(val) {
let noticeDetail = JSON.parse(val || '{}')
if (noticeDetail.id) {
this.getData(noticeDetail.id)
}
},
deep: true,
immediate: true
}
},
activated() {
},
methods: {
getData(id) {
getNoticeDetailAPI({ id }).then((res) => {
if (res.error == 0) {
this.noticeDetail = res.data
}
})
},
navigatorBack() {
this.$router.back()
}
}
}
</script>
<style scoped lang="scss">
.notice_detail{
.notice_detail {
.card_header {
display: flex;
justify-content: center;
.card_title {
width: 100%;
display: inline-block;
text-align: center;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="notice_container">
<div class="tabs-nav">
<el-tabs v-model="activeName" @tab-click="togglePage(activeName)">
<el-tab-pane label="系统通知" name="4"></el-tab-pane>
</el-tabs>
<el-select v-model="filter" class="filter-status" size="small" placeholder="请选择" @change="getList(1)">
<el-option label="全部/不限" value="0"></el-option>
<el-option label="已读" value="2"></el-option>
<el-option label="未读" value="1"></el-option>
</el-select>
</div>
<div class="notice_box">
<template v-if="tableData.length > 0">
<div class="item" :class="{ 'readed': item.is_read == 2 }" v-for="(item, index) in tableData" :key="index"
@click="toDetail(item)">
<div class="header">
<h4 class="title">{{ item.title }}</h4>
</div>
<p class="info-content">{{ item.content }}
<span class="to-detail" v-if="activeName != 4" @click="toDetail(item)">【详情】</span>
</p>
<span class="time">
{{ item.post_time }}
<span class="to-read" v-if="item.is_read == 1 && activeName != 4"
@click="toRead(item.unique_id)">标记为已读</span>
</span>
<span class="del" @click="toDel(item.unique_id)" v-if="activeName != 4">
<i class="el-icon-circle-close"></i>
</span>
</div>
</template>
<!-- ele 暂无数据插槽 -->
<!-- <template v-else>
<TableEmpty />
</template> -->
<div class="nodata" v-else>
暂无通知
</div>
<div class="footer flex-box">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-sizes="[10, 20, 30]" :page-size="pageSize" layout="total,sizes, prev, pager, next,jumper"
@size-change="changePageSize" :total="total">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import { getNoticeList, operationRead, operationDelete } from "@/api/ldy/notice";
export default {
data() {
return {
activeName: '4',
filter: '0',
pageSize: 10,
currentPage: 1,
total: 0,
tableData: []
}
},
activated() {
this.getList(1);
},
watch: {
$route: {
handler() {
this.activeName = this.$route.query.to ? this.$route.query.to : '4';
},
immediate: true
}
},
methods: {
toDetail(item) {
// new goAnyWhere(this, item)
this.$router.push({ name: 'noticeDetail', query: { noticeDetail: JSON.stringify(item) } })
},
togglePage(activeName) {
this.$router.push({ path: this.$route.path, query: { to: activeName } });
this.getList(1)
},
handleCurrentChange(val) {
this.getList(val)
},
changePageSize(val) {
this.pageSize = val
this.getList(1)
},
toRead(id) {
operationRead({ id }).then(res => {
if (res.error == 0) {
this.getList(this.currentPage)
}
})
},
toDel(id) {
operationDelete({ id }).then(res => {
if (res.error == 0) {
let page = this.currentPage > 1 && this.tableData.length == 1 ? this.currentPage - 1 : this.currentPage;
this.getList(page)
}
})
},
getList(val) {
let data = {
page: val,
page_size: this.pageSize,
category: this.activeName
}
if (this.filter != 0) {
data.is_read = this.filter
}
getNoticeList(data).then(res => {
this.currentPage = 1;
this.total = 0;
if (res.error == 0 && res.data) {
this.currentPage = val;
this.total = res.data.count;
this.tableData = res.data.item;
}
})
}
}
}
</script>
<style scoped lang="scss">
.notice_container {
.tabs-nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.filter-status {
width: 120px;
margin-top: -6px;
}
.title {
margin: 0;
font-size: 15px;
line-height: 28px;
font-weight: 500;
}
.nodata {
font-size: 14px;
line-height: 120px;
color: #666;
text-align: center;
}
.footer {
margin-top: 15px;
text-align: right;
}
.item {
padding: 16px;
cursor: pointer;
&:first-child {
padding-top: 0;
}
.info-content,
.time {
font-size: 14px;
line-height: 24px;
color: #666;
}
}
}
</style>
\ No newline at end of file
......@@ -108,15 +108,15 @@
<div class="card_bottom">
<div class="percent">
<div>取消订单率</div>
<div>34.22%</div>
<div>0%</div>
</div>
<div class="percent">
<div>超重订单率</div>
<div>34.22%</div>
<div>0%</div>
</div>
<div class="percent">
<div>未处理超重订单率</div>
<div>34.22%</div>
<div>0%</div>
</div>
</div>
</el-card>
......
......@@ -3,7 +3,7 @@
<!-- 主入口标签页 s -->
<el-tabs v-if="$route.meta.isTab" v-model="mainTabsActiveName" type="border-card" @tab-click="selectedTabHandle"
@tab-remove="removeTabHandle" class="navigation-tabs">
<el-dropdown class="site-tabs__tools" :show-timeout="0">
<!-- <el-dropdown class="site-tabs__tools" :show-timeout="0" trigger="click">
<i class="el-icon-arrow-down el-icon--right"></i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="tabsCloseCurrentHandle">关闭当前标签页</el-dropdown-item>
......@@ -11,11 +11,20 @@
<el-dropdown-item @click.native="tabsCloseAllHandle">关闭全部标签页</el-dropdown-item>
<el-dropdown-item @click.native="refresh()">刷新当前标签页</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<ul v-show="tabMenuVisible" :style="{ left: tabMenuLeft + 'px', top: tabMenuTop + 'px' }" class="tabMenu">
<li @click="tabsCloseCurrentHandle" v-if="currentTabName != 'home'">关闭当前标签页</li>
<li @click="tabsCloseOtherHandle">关闭其它标签页</li>
<li @click="tabsCloseAllHandle">关闭全部标签页</li>
<!-- <li @click="refresh()">刷新当前标签页</li> -->
</ul>
<el-tab-pane v-for="item in mainTabs" :key="item.name" :label="item.title" :name="item.name"
:closable="item.name != 'home'">
<span slot="label"><i v-show="mainTabsActiveName == item.name" class="el-icon-refresh"
@click="refreshCurrentTab"></i> {{ item.title }}</span>
<span slot="label" :data-id="item.name">
<i :data-id="item.name" v-show="mainTabsActiveName == item.name" class="el-icon-refresh"
@click="refreshCurrentTab">
</i> {{ item.title }}
</span>
<!-- card模板 -->
<el-card shadow="never"
:body-style="{ ...siteContentViewHeight, padding: $route.meta.notCard || (item.type === 'module' && ['sys-role', 'sys-user'].indexOf($route.name) !== -1) ? 0 : '20px' }"
......@@ -47,10 +56,33 @@ export default {
inject: ['refresh'],
data() {
return {
cardStyle: {}
cardStyle: {},
tabMenuVisible: false,
tabMenuLeft: 0,
tabMenuTop: 0,
currentTabName: ''
}
},
created() {
mounted() {
this.$nextTick(() => {
document.querySelector('.navigation-tabs .el-tabs__item').addEventListener('contextmenu', this.openRightMenu)
})
},
beforeDestroy() {
this.$nextTick(() => {
document.querySelector('.navigation-tabs .el-tabs__item').removeEventListener('contextmenu', this.openRightMenu)
})
},
watch: {
tabMenuVisible(val) {
if (val) {
document.body.addEventListener('click', this.closeRightMenu)
document.body.addEventListener('contextmenu', this.closeRightMenu)
} else {
document.body.removeEventListener('click', this.closeRightMenu)
document.body.removeEventListener('contextmenu', this.closeRightMenu)
}
}
},
computed: {
documentClientHeight: {
......@@ -79,6 +111,22 @@ export default {
}
},
methods: {
closeRightMenu(e) {
if (e && (e.srcElement.id != '' || e.target.getAttribute('data-id'))) return
this.tabMenuVisible = false
},
// tabs右键菜单
openRightMenu(e) {
this.closeRightMenu();
if (e.srcElement.id != '' || e.target.getAttribute('data-id')) {
e.preventDefault()
this.currentTabName = e.srcElement.id || e.target.getAttribute('data-id')
// 右键点击的是tab
this.tabMenuLeft = e.clientX;
this.tabMenuTop = e.clientY + 10;
this.tabMenuVisible = true;
}
},
// tabs, 选中tab
selectedTabHandle(tab) {
tab = this.mainTabs.filter(item => item.name === tab.name)
......@@ -111,11 +159,14 @@ export default {
},
// tabs, 关闭当前
tabsCloseCurrentHandle() {
this.removeTabHandle(this.mainTabsActiveName)
// this.removeTabHandle(this.mainTabsActiveName)
this.removeTabHandle(this.currentTabName)
},
// tabs, 关闭其它
tabsCloseOtherHandle() {
this.mainTabs = this.mainTabs.filter(item => item.name === this.mainTabsActiveName)
// this.mainTabs = this.mainTabs.filter(item => item.name === this.mainTabsActiveName)
this.mainTabs = this.mainTabs.filter(item => item.name === this.currentTabName)
this.$router.push({ name: this.mainTabs[0].name })
},
// tabs, 关闭全部
tabsCloseAllHandle() {
......@@ -157,4 +208,37 @@ export default {
border-radius: 0;
border: 0;
}
.tabMenu {
position: fixed;
top: 0;
left: 0;
z-index: 10;
padding: 6px 0;
margin: 12px 0 5px;
background-color: #fff;
border: 1px solid #ebeef5;
border-radius: 4px;
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
li {
list-style: none;
line-height: 36px;
padding: 0 20px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: 0;
line-height: 30px;
padding: 0 17px;
font-size: 14px;
&:hover {
background-color: rgba(var(--primary-color-rgb), .4);
color: var(--primary-color);
}
}
}
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
</div>
<div class="logistics_bottom">
<div class="price">
<span>{{ packageChecked.price }}元 / {{ packageChecked.amount }}</span>
<span>{{ packageChecked.price | priceFilter }}元 / {{ packageChecked.amount }}</span>
</div>
<div class="right">
<el-button class="btn" type="primary" size="mini"
......@@ -42,7 +42,7 @@
{{ item.amount }}
</div>
<div class="checkcard-description">
{{ item.price }}
{{ item.price | priceFilter }}
</div>
</div>
</div>
......@@ -180,7 +180,7 @@ export default {
},
// 资源包列表
getPackageList() {
packageListAPI().then((res) => {
packageListAPI({state: 1}).then((res) => {
if (res.error == 0) {
this.packageList = res.data || []
if (this.packageList.length > 0) {
......
......@@ -28,10 +28,14 @@
<el-input v-model="dataForm.phone" placeholder="联系方式"></el-input>
</el-form-item>
<el-form-item label="角色" size="mini" prop="roles">
<el-checkbox-group v-model="dataForm.roles">
<el-checkbox-group v-if="roleList && roleList.length" v-model="dataForm.roles">
<el-checkbox v-for="(role, index) in roleList" :key="index" :label="role.roleId">{{ role.roleName
}}</el-checkbox>
</el-checkbox-group>
<div v-else style="display: flex; align-items: center;">
<span style="color: #999;">暂无角色</span>
<el-link style="margin-left: 10px" type="primary" @click="createRole">创建角色</el-link>
</div>
</el-form-item>
<!-- <el-form-item label="状态" size="mini" prop="status">
<el-radio-group v-model="dataForm.status">
......@@ -201,6 +205,11 @@ export default {
},
methods: {
// 创建角色
createRole() {
this.visible = false;
this.$router.push({ name: 'sys-role' })
},
// 初始化表单
resetInfo() {
this.infoStatus = false;
......@@ -209,7 +218,6 @@ export default {
},
async init() {
await this.getRoleList();
console.log(this.info)
// 如果是新增
if (this.info.type == 'add') {
this.resetInfo()
......@@ -233,7 +241,6 @@ export default {
roles = res.data.roles.map(role => Number(role))
}
}
console.log(roles)
this.unique_id = res.data.unique_id;
this.dataForm.business_account = res.data.business_account;
this.dataForm.business_password = res.data.business_password;
......
......@@ -15,7 +15,11 @@
</span>
</template>
</el-table-column>
<el-table-column prop="expressageNo" label="物流单号" width="200px"></el-table-column>
<el-table-column prop="expressageNo" label="物流单号" width="200px">
<template slot-scope="scope">
<span>{{ scope.row.expressageNo || '--' }}</span>
</template>
</el-table-column>
<el-table-column prop="goodsWeight" label="下单重量"
:formatter="(row, column) => tableFormatter(row, column, null, 'kg')"></el-table-column>
<el-table-column prop="couponName" label="体积重量"
......@@ -216,7 +220,7 @@ export default {
case 'date':
return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit && !this.isEmpty(row[column.property]) ? row[column.property] + unit : row[column.property]
return unit && !this.isEmpty(row[column.property]) ? row[column.property] + unit : '--'
}
},
// 超轻退款
......
......@@ -17,10 +17,13 @@ export default {
sysSetTable
},
watch: {
tabName(val) {
if (val == 'kefu') {
this.getData()
}
tabName: {
handler(val) {
if (val == 'kefu') {
this.getData()
}
},
immediate: true
}
},
data() {
......
......@@ -48,10 +48,13 @@ export default {
},
components: {},
watch: {
tabName(val) {
if (val == 'tishi') {
this.getData()
}
tabName: {
handler(val) {
if (val == 'tishi') {
this.getData()
}
},
immediate: true
}
},
data() {
......
......@@ -58,9 +58,11 @@ export default {
},
components: {},
watch: {
tabName(val) {
if (val == 'xiaoshou') {
this.getData()
tabName: {
handler(val) {
if (val == 'xiaoshou') {
this.getData()
}
}
}
},
......
......@@ -17,10 +17,13 @@ export default {
sysSetTable
},
watch: {
tabName(val) {
if (val == 'kaiguan') {
this.getData()
}
tabName: {
handler(val) {
if (val == 'kaiguan') {
this.getData()
}
},
immediate: true
}
},
data() {
......
<template>
<div class="platformSetting_wrapper">
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tabs v-model="activeName">
<el-tab-pane label="销售比例设置" name="xiaoshou" lazy>
<sell-ratio-setting :tabName="activeName"></sell-ratio-setting>
</el-tab-pane>
......@@ -13,6 +13,9 @@
<el-tab-pane label="开关配置" name="kaiguan" lazy>
<switch-setting :tabName="activeName"></switch-setting>
</el-tab-pane>
<el-tab-pane label="优惠券配置" name="yhq" lazy>
<coupon-new-user :tabName="activeName"></coupon-new-user>
</el-tab-pane>
</el-tabs>
</div>
</template>
......@@ -24,6 +27,7 @@ import customSetting from './components/customSetting'
import switchSetting from './components/switchSetting'
import sellRatioSetting from './components/sellRatioSetting'
import HintSetting from './components/hintSetting';
import couponNewUser from '@/views/campus/couponNewUser'
export default {
components: {
rateInfo,
......@@ -31,6 +35,7 @@ export default {
switchSetting,
sellRatioSetting,
HintSetting,
couponNewUser
},
data() {
return {
......@@ -61,8 +66,7 @@ export default {
}
},
},
created() { },
mounted() {
created() {
this.activeName = 'xiaoshou'
},
};
......
......@@ -16,6 +16,16 @@ export default {
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'xieyi') {
this.getData()
}
},
immediate: true,
}
},
data() {
return {
tableDataLoading: false,
......
......@@ -39,10 +39,13 @@ export default {
},
components: {},
watch: {
tabName(val) {
if (val == 'qudao') {
this.getExpressageCompanySimple()
}
tabName: {
handler(val) {
if (val == 'qudao') {
this.getExpressageCompanySimple()
}
},
immediate:true,
}
},
data() {
......
......@@ -16,6 +16,15 @@ export default {
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'fuwufei') {
this.getData()
}
},
}
},
data() {
return {
tableDataLoading: false,
......
<template>
<div class="setting_wrapper">
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tabs v-model="activeName">
<el-tab-pane label="服务费配置" name="fuwufei" lazy>
<cover-charge :tabName="activeName" ></cover-charge>
</el-tab-pane>
......@@ -56,12 +56,6 @@ export default {
},
// tabs切换
tabClick(tab) {
switch (tab.name) {
case 'fuwufei':
break;
default:
break;
}
},
},
created() {
......
......@@ -16,6 +16,16 @@ export default {
components: {
sysSetTable
},
watch: {
tabName: {
handler(val) {
if (val == 'duanxin') {
this.getData()
}
},
immediate: true,
}
},
data() {
return {
tableDataLoading: false,
......
......@@ -218,15 +218,15 @@ export default {
}
.tabs-span.active {
background: #3794FF;
background: var(--primary-color);
color: #fff;
border-color: #3794FF;
border-color: var(--primary-color);
}
.tabs-span:hover {
background: #3794FF;
background: var(--primary-color);
color: #fff;
border-color: #3794FF;
border-color: var(--primary-color);
}
.info {
......
......@@ -138,7 +138,8 @@ export default {
methods: {
// 查询
serachHandle() {
this.$refs['userTableRef_' + this.activeName].dataSelect();
// this.$refs['userTableRef_' + this.activeName].dataSelect();
this.$refs.userTableRef.dataSelect()
},
handleClick(tab) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!