Commit 7449bc58 by crushh

update: dist

parent b0611688
......@@ -20,23 +20,15 @@
<video v-if="videoSrc != '' && videoFlag == false" :src="videoSrc" class="avatar">您的浏览器不支持视频播放</video>
<div v-if="!imgSrc && !videoSrc">
<i class="iconfont-hb3 iconPlusOutlined avatar-uploader-icon"></i>
<p class="font-12 color-606266" style="line-height:6px;">{{ uploadType == 1 || uploadType == 2 || uploadType == 4 ? '上传图片' : '上传视频' }}</p>
<p class="font-12 color-606266" style="line-height: 6px">{{ uploadType == 1 || uploadType == 2 || uploadType == 4 ? '上传图片' : '上传视频' }}</p>
</div>
<!-- <el-progress v-if="videoFlag == true" type="circle" :percentage="videoUploadPercent" style="margin-top:30px;"></el-progress> -->
</el-upload>
<p v-if="uploadType == 1 && showTips" class="upload-tip color-909399 font-12">
图片支持png、jpg、jpeg格式,大小不超过2M,可上传1张
</p>
<p v-if="uploadType == 2 && showTips" class="upload-tip color-909399 font-12">
建议尺寸:160×160;支持jpg、jpeg、png格式,图片大小不超过1MB
</p>
<p v-if="uploadType == 3 && showTips" class="upload-tip color-909399 font-12">
视频支持MP4格式,大小不超过10M,上传企业微信后3天内有效
</p>
<p v-if="uploadType == 4 && showTips" class="upload-tip color-909399 font-12">
建议尺寸:520×416,支持png、jpg、jpeg格式,大小不超过1M
</p>
<p v-if="uploadType == 1 && showTips" class="upload-tip color-909399 font-12">图片支持png、jpg、jpeg格式,大小不超过2M,可上传1张</p>
<p v-if="uploadType == 2 && showTips" class="upload-tip color-909399 font-12">建议尺寸:160×160;支持jpg、jpeg、png格式,图片大小不超过1MB</p>
<p v-if="uploadType == 3 && showTips" class="upload-tip color-909399 font-12">视频支持MP4格式,大小不超过10M,上传企业微信后3天内有效</p>
<p v-if="uploadType == 4 && showTips" class="upload-tip color-909399 font-12">建议尺寸:520×416,支持png、jpg、jpeg格式,大小不超过1M</p>
<!-- 图片预览 -->
<!-- <vue-gic-img-preview :imgUrl="imgUrl" :imgShowFlag="imgShowFlag" @hideImage="hideImage"></vue-gic-img-preview> -->
</div>
......@@ -74,7 +66,7 @@ export default {
},
uploadLimit: {
type: [Number, String],
default: 2
default: '2/MB'
},
uploadType: {
type: [Number, String],
......@@ -130,23 +122,31 @@ export default {
/* eslint-disable */
beforeAvatarUpload(file) {
const that = this;
// console.log(file);
that.fileType = file.type === 'image/jpeg'|| file.type === 'image/gif' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : '';
console.log(file);
that.fileType = file.type === 'image/jpeg' || file.type === 'image/gif' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : '';
const isJPG = this.imgType.includes(file.type);
const isMP4 = file.type == 'video/mp4';
const isLt2M = file.size / 1024 / 1024 < that.uploadLimit;
const uploadLimit = that.uploadLimit.split('/')[0];
const unit = that.uploadLimit.split('/')[1];
let isLt2M = false;
if (unit == 'KB') {
isLt2M = file.size / 1024 < uploadLimit;
} else {
isLt2M = file.size / 1024 / 1024 < uploadLimit;
}
if ((that.uploadType == 1 || that.uploadType == 2 || that.uploadType == 4) && !isJPG) {
that.$message.error(`上传图片支持${ this.imgType.map(item=>item.split('/')[1]).join('、')}格式!`);
that.$message.error(`上传图片支持${this.imgType.map((item) => item.split('/')[1]).join('、')}格式!`);
}
if ((that.uploadType == 1 || that.uploadType == 2 || that.uploadType == 4) && !isLt2M) {
that.$message.error(`上传图片大小不能超过 ${that.uploadLimit}MB!`);
that.$message.error(`上传图片大小不能超过 ${uploadLimit}${unit}!`);
}
if (that.uploadType == 3 && !isMP4) {
that.$message.error('上传视频支持MP4格式!');
}
if (that.uploadType == 3 && !isLt2M) {
that.$message.error(`上传视频大小不能超过 ${that.uploadLimit}MB!`);
that.$message.error(`上传视频大小不能超过 ${uploadLimit}${unit}!`);
}
if (that.uploadType == 3) {
return isMP4 && isLt2M;
......@@ -267,7 +267,7 @@ export default {
.avatar-uploader-icon {
font-size: 24px;
color:#303133;
color: #303133;
}
.avatar {
max-width: 100px;
......
......@@ -12,7 +12,7 @@
<el-descriptions-item label="创建人">{{ link.creatorName }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ filters.formatTimeStamp(link.createTime) }}</el-descriptions-item>
<el-descriptions-item label="链接标签">
<el-tag size="mini">{{ link.memberLabelName }}</el-tag>
<el-tag size="mini" type="info">{{ link.memberLabelName }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="链接描述">{{ link.remark }}</el-descriptions-item>
</el-descriptions>
......@@ -65,7 +65,7 @@
</div>
</dm-sub-title>
<el-row :gutter="20">
<el-col :span="6" v-for="(el, index) in targetList" :key="index">
<el-col :span="8" v-for="(el, index) in targetList" :key="index">
<target-group :data-list="el"></target-group>
</el-col>
</el-row>
......@@ -84,7 +84,7 @@
<el-button type="text"><i class="iconfont-hb3 iconzhibiaoshuoming info-icon"></i>指标说明</el-button>
</div>
</dm-sub-title>
<data-detail :id="linkId" :api="statisticsClerk" class="m-t-15"></data-detail>
<data-detail :id="linkId" typeT="link" :api="statisticsClerk" class="m-t-15"></data-detail>
</div>
</el-tab-pane>
</el-tabs>
......
......@@ -15,11 +15,11 @@
<el-input show-word-limit placeholder="请输入商户电话" type="text" v-model="form.merchantPhoneNumber" maxlength="20" class="w-340"></el-input>
</el-form-item>
<el-form-item label="商户LOGO">
<single-upload uploadType="1" :showTips="false" :imgSrc.sync="form.merchantLogo" :field="''" class="app-set" :uploadLimit="2" :imgType="['image/jpeg', 'image/jpg', 'image/png', 'image/gif']"> </single-upload>
<single-upload uploadType="1" :showTips="false" :imgSrc.sync="form.merchantLogo" :field="''" class="app-set" uploadLimit="200/KB" :imgType="['image/jpeg', 'image/jpg', 'image/png', 'image/gif']"> </single-upload>
<p style="margin-top: 6px;font-size: 12px;color: #909399;line-height: 17px;">图片建议尺寸 240*240px,格式 jpg/jpep/png/gif,大小 200KB 以内。</p>
</el-form-item>
<el-form-item label="页面背景">
<single-upload uploadType="1" :showTips="false" :imgSrc.sync="form.pageBackgroundImg" :field="''" class="app-set" :uploadLimit="2" :imgType="['image/jpeg', 'image/jpg', 'image/png', 'image/gif']"> </single-upload>
<single-upload uploadType="1" :showTips="false" :imgSrc.sync="form.pageBackgroundImg" :field="''" class="app-set" :imgType="['image/jpeg', 'image/jpg', 'image/png', 'image/gif']"> </single-upload>
<p style="margin-top: 6px;font-size: 12px;color: #909399;line-height: 17px;">图片建议尺寸 750*1334px,格式 jpg/png/gif,大小 2M 以内。</p>
</el-form-item>
<el-form-item label="引导语" prop="guideComment">
......
......@@ -171,8 +171,8 @@ export default {
linkId,
clerkId,
startTime,
endTime
// createTimeOrder: that.sortType || ''
endTime,
createTimeOrder: that.sortType || ''
};
}
// console.log(para);
......
......@@ -2,8 +2,8 @@
<div>
<el-row>
<div class="leftBox">
<el-input class="w260 mr10" placeholder="请输入门店名称/code" v-model="pageParam.storeSelect" prefix-icon="el-icon-search"></el-input>
<el-input class="w260 mr10" placeholder="请输入导购名称/code" v-model="pageParam.clerkSelect" prefix-icon="el-icon-search"></el-input>
<el-input class="w260 mr10" placeholder="请输入门店名称/code" v-model="pageParam.inFields.storeSelect" @keyup.native="value => toInput(value, searchInput)" prefix-icon="el-icon-search" clearable @clear="getTableList"></el-input>
<el-input class="w260 mr10" placeholder="请输入导购名称/code" v-model="pageParam.inFields.clerkSelect" @keyup.native="value => toInput(value, searchInput)" prefix-icon="el-icon-search" clearable @clear="getTableList"></el-input>
</div>
<div class="rightBox">
......@@ -54,6 +54,7 @@
<script>
import { detailClerkList } from '@/api/actCode.js';
import { _debounce } from '@/common/js/public';
export default {
name: 'DateDetail',
props: {
......@@ -82,13 +83,11 @@ export default {
tableData: [],
pageParam: {
inFields: {
hmId: '',
linkId: '',
startTime: '',
endTime: '',
storeSelect: '',
clerkSelect: '',
orderByField: 'addNumT desc'
orderByField: 'addNum desc'
},
pageNo: 1,
pageSize: 20
......@@ -131,6 +130,9 @@ export default {
this.btnChange(0);
},
methods: {
toInput: _debounce(function(e, value) {
this.getTableList();
}, 500),
getDateRange(setEndDate) {
const start = new Date();
let end = new Date();
......@@ -212,23 +214,20 @@ export default {
},
// 列表数据
async getTableList() {
this.pageParam.inFields.startTime = this.dateDefault ? this.dateDefault[0].toString() : '';
this.pageParam.inFields.endTime = this.dateDefault ? this.dateDefault[1].toString() : '';
if (this.$route.query.id && this.typeT == 'code') {
this.pageParam.inFields.hmId = this.$route.query.id;
delete this.pageParam.inFields.linkId;
} else if (this.$route.query.id && this.typeT == 'link') {
this.pageParam.inFields.linkId = this.$route.query.id;
delete this.pageParam.inFields.hmId;
}
if (this.pageParam.inFields.storeSelect == '') {
delete this.pageParam.inFields.storeSelect;
}
if (this.pageParam.inFields.clerkSelect == '') {
delete this.pageParam.inFields.clerkSelect;
const paras = JSON.parse(JSON.stringify(this.pageParam));
paras.inFields.startTime = this.dateDefault ? this.dateDefault[0].toString() : '';
paras.inFields.endTime = this.dateDefault ? this.dateDefault[1].toString() : '';
if (this.id && this.typeT == 'code') {
paras.inFields.hmId = this.id;
} else if (this.id && this.typeT == 'link') {
paras.inFields.linkId = this.id;
paras.inFields.linkSelect1 = paras.inFields.storeSelect;
paras.inFields.linkSelect2 = paras.inFields.clerkSelect;
delete paras.inFields.storeSelect;
delete paras.inFields.clerkSelect;
}
await this.api(this.pageParam).then(res => {
await this.api(paras).then(res => {
console.log(res);
if (res.data.code == 0) {
this.tableData = res.data.result.result || [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment