Commit d1e88b9a by 前端

Merge branch 'v3.3.0' into 'master'

V3.3.0

See merge request !26
2 parents 277d4f50 407eb63a
......@@ -15,6 +15,11 @@
"js-message": "1.0.7"
}
},
"@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@ampproject/remapping": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
......@@ -1913,7 +1918,7 @@
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"version": "npm:vue-loader-v16@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
......@@ -6310,14 +6315,16 @@
}
},
"glsx-components": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.2.tgz",
"integrity": "sha512-5/LaPu0B1uT7Kzl6oyIqyFT/NXIz2w7HNstiRtHaUQN1waSrPPPtzRRwywJg6CSSL+p994NaqPRnX696NAYzKg==",
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.4.tgz",
"integrity": "sha512-TemXhzs6giPF7idPHNhrpeMNvP4O6hbm6q/aKPNJSldZB7o+MbmPxeYXKZydvvz6V53tk+KBLbgVhcSv1F8FIA==",
"requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
"glsx-common": "^1.4.9",
"vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vuedraggable": "^2.24.3"
}
},
......@@ -12398,6 +12405,21 @@
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
"dev": true
},
"uppercamelcase": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
"integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
"requires": {
"camelcase": "^1.2.1"
},
"dependencies": {
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g=="
}
}
},
"uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
......@@ -12587,6 +12609,14 @@
"csstype": "^3.1.0"
}
},
"vue-amap": {
"version": "0.5.10",
"resolved": "https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.10.tgz",
"integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
"requires": {
"uppercamelcase": "^1.1.0"
}
},
"vue-cli-plugin-element": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz",
......
......@@ -14,7 +14,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.5.2",
"glsx-components": "^1.5.4",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
......
......@@ -175,4 +175,16 @@ const orderVerfication = params => {
})
}
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType }
/** 批量退款众筹活动/膨胀金活动订单(SAAS) */
const batchRefundOrder = params => {
params.method = 'scrm.api.shopmall.crowd.funding.order.refund.batch'
return http({
url: '/rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder }
import { http } from '@/main'
const url = '/rop-scrm-entmicro/router'
// 获取活动记录列表
const getActivityRecord = params => {
params.method = 'entmicro.api.business.activityRecord.page'
return http({
url: url,
method: 'GET',
data: params,
sign: true
})
}
// 新增活动记录列表
const addActivityRecord = params => {
params.method = 'entmicro.api.business.activityRecord.add'
return http({
url: url,
method: 'post',
data: params,
sign: true
})
}
// 更新活动记录列表
const updateActivityRecord = params => {
params.method = 'entmicro.api.business.activityRecord.update'
return http({
url: url,
method: 'post',
data: params,
sign: true
})
}
// 查询活动记录
const getActivityRecordDetail = params => {
params.method = 'entmicro.api.business.activityRecord.detail'
return http({
url: url,
method: 'post',
data: params,
sign: true
})
}
// 删除活动记录
const delActivityRecord = params => {
params.method = 'entmicro.api.business.activityRecord.delete'
return http({
url: url,
method: 'post',
data: params,
sign: true
})
}
// 同步活动记录
const activityRecordSync = params => {
params.method = 'entmicro.api.business.activityRecord.syn'
return http({
url: url,
method: 'post',
data: params,
sign: true
})
}
// 获取众筹活动数据
const findActivity = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.smart.card'
return http({
url: '/rop-scrm-shopmall/router',
method: 'post',
data: params,
sign: true
})
}
export default {
getActivityRecord,
addActivityRecord,
getActivityRecordDetail,
delActivityRecord,
updateActivityRecord,
activityRecordSync,
findActivity
}
......@@ -269,4 +269,16 @@ const liveroomOverview = params => {
})
}
export default { getPayListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics }
/**获取众筹活动名称&门店 */
const getCrowdfundingParams = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.parameter.list'
/**1秒杀 2直播间活动 3众筹 4膨胀金 */
params.marketingType = 3
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getPayListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams }
......@@ -10,6 +10,24 @@ const staticRoutes = Object.freeze([
component: resolve => require([`@/views/battle/index.vue`], resolve),
meta: {}
},
{
name: 'activityRecord',
path: '/activityRecord/index',
component: resolve => require([`@/views/activityRecord/index.vue`], resolve),
meta: {}
},
{
name: 'addRecord',
path: '/activityRecord/addRecord',
component: resolve => require([`@/views/activityRecord/addRecord.vue`], resolve),
meta: {}
},
{
name: 'viewRecord',
path: '/activityRecord/viewRecord',
component: resolve => require([`@/views/activityRecord/viewRecord.vue`], resolve),
meta: {}
},
// 众筹订单
{
......
......@@ -115,4 +115,48 @@
}
.statusText {
vertical-align: middle;
}
\ No newline at end of file
}
.dot {
display: inline-flex;
align-items: center;
div {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.normal {
background-color: #2cca74;
}
.draft {
background-color: #fdb757;
}
.dot1 {
background-color: #fdb757;
}
.dot2 {
background-color: #5850FF;
}
.dot3 {
background-color: #999999;
}
.dot4 {
background-color: #eb4e4e;
}
.dot5 {
background-color: #fdb757;
}
.dot6 {
background-color: #5850FF;
}
}
\ No newline at end of file
<template>
<div class="role-home-page">
<div class="add-btn">
<GLButton :size="size" fn="新建活动记录" type="primary" @click="toCreatePage(1)" mode="el-button">新增活动记录</GLButton>
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage(1)">新增活动记录</el-button> -->
</div>
<div class="table_widget">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" :searchSelectObj="searchSelectObj" @handleOk="handleSearch" @handleRest="handleRest"></GLCombiForm>
</div>
<GLTable ref="recordTable" :pageConf="pageConf" :getListApi="getListApi" :noDataImg="url" :tableParams="tableParams" :searchForm="searchForm">
<!-- 活动时间 -->
<div slot="activityTime" slot-scope="scope">
<span>{{ scope.scope.beginTime }}至{{ scope.scope.endTime }}</span>
</div>
<!-- 省市 -->
<!-- <div slot="province" slot-scope="scope">
<span>{{ scope.scope.province }}-{{ scope.scope.city }}</span>
</div> -->
<!-- 状态 -->
<div slot="status" class="dot" slot-scope="scope">
<div :class="recordCss[scope.scope.status]"></div>
{{ recordStatus[scope.scope.status] }}
</div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<!-- <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button type="text" @click="toCreatePage(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="todelete(scope.scope)">删除</el-button> -->
</template>
</GLTable>
</div>
</div>
</template>
<script>
const recordCss = {
1: 'draft',
2: 'dot2',
3: 'dot3'
}
const recordStatus = {
1: '未开始',
2: '进行中',
3: '已结束'
}
export default {
name: '',
data() {
return {
recordStatus: recordStatus,
recordCss,
searchForm: {
activityName: '',
merchantName: ''
},
searchFormData: [
{
label: '活动名称',
name: 'activityName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
}
],
//表格配置
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
listName: 'data',
// tableOption: false,
tableColumns: [
{
label: '活动名称',
prop: 'activityName',
minWidth: '250'
},
{
label: '门店名称',
prop: 'merchantName',
minWidth: '220'
},
{
label: '活动时间',
addHtml: 'activityTime',
prop: 'beginTime',
minWidth: '300'
},
{
label: '省市',
// addHtml: 'province',
prop: 'provinceCity',
minWidth: '180'
},
{
label: '参与人数',
prop: 'participants',
minWidth: '150'
},
{
label: '活动状态',
prop: 'status',
addHtml: 'status',
minWidth: '180'
},
{
label: '操作',
prop: 'auth-button',
width: '180',
addHtml: 'auth-button',
fixed: 'right'
}
]
},
tableData: [
{
id: 1,
activityName: 'dff',
merchantName: 888,
beginTime: '2021-2-2',
endTime: '2021-12-2',
province: 'hunan',
city: 'yiyang',
updatedTime: 2,
status: 1
}
],
buttonList: [
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '查看活动记录'
},
listeners: {
click: row => this.toLookPage(row)
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '新建活动记录'
},
listeners: {
click: row => this.toCreatePage(2, row)
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除活动记录'
},
listeners: {
click: row => this.todelete(row)
}
}
],
// 表格
getListApi: this.$apis.record.getActivityRecord
}
},
methods: {
// 去创建/修改页面
toCreatePage(addOrEdit, scope) {
let params = {
addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 1 ? '创建活动记录' : '编辑活动记录'),
id: scope ? scope.id : ''
}
this.$router.push({
path: '/activityRecord/addRecord',
query: params
})
},
// 去查看页面
toLookPage(scope) {
let params = {
id: scope.id
}
this.$router.push({
path: '/activityRecord/viewRecord',
query: params
})
},
// 去删除草稿
todelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'gl-message-box',
type: 'warning'
}).then(() => {
this.$apis.record.delActivityRecord({ id: row.id }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.handleSearch()
}
})
})
},
handleRest() {
this.searchForm = {
activityName: '',
merchantName: ''
}
this.handleSearch()
},
handleSearch() {
this.$refs.recordTable.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.add-btn {
margin-bottom: 16px;
}
.role-home-page {
box-sizing: border-box;
display: flex;
flex-direction: column;
height: 100%;
}
.table_widget {
width: 100%;
// height: calc(100% - 138px);
background: #ffffff;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding: 20px;
}
.search_widget {
padding: 0 0 20px 0;
display: flex;
align-items: center;
justify-content: space-between;
.left_wrap {
display: flex;
align-items: center;
.top_select {
display: flex;
align-items: center;
margin-right: 30px;
.select_label {
font-size: 14px;
font-weight: 400;
color: #333333;
margin-right: 10px;
white-space: nowrap;
}
}
}
.btn_wrapper {
display: flex;
align-items: center;
}
}
</style>
<template>
<div>
<div class="record-box">
<div class="title">活动记录</div>
<div class="record-form">
<div class="record-flex record-center record-bottom">
<div class="record-type">活动ID:</div>
<div class="record-text">{{ recordForm.crowdFundActivityId }}</div>
<el-button size="small" type="primary" @click="activityRecordSync">更新数据</el-button>
</div>
<!-- 活动详情 -->
<div class="activity-detail">
<div class="activity-detail-left">
<div class="activity-detail-content activity-bottom">
<div class="activity-title">活动名称:</div>
<div class="activity-content">{{ recordForm.activityName }}</div>
</div>
<div class="activity-detail-content">
<div class="activity-title">活动地址:</div>
<div class="activity-content">{{ recordForm.address }}</div>
</div>
</div>
<div class="activity-detail-right">
<div class="activity-detail-content activity-bottom">
<div class="activity-title">主办方:</div>
<div class="activity-content">{{ recordForm.sponsorName }}</div>
</div>
<div class="activity-detail-content">
<div class="activity-title">活动时间:</div>
<div class="activity-content">{{ recordForm.beginTime }}-{{ recordForm.endTime }}</div>
</div>
</div>
</div>
<div class="record-flex">
<div class="record-type">活动介绍:</div>
<div class="record-intro">{{ recordForm.activityEvent }}</div>
</div>
</div>
</div>
<div class="record-box">
<div class="title">活动素材</div>
<div class="record-form">
<div class="record-flex record-bottom">
<div class="record-type">活动视频:</div>
<div v-if="recordForm.videoUrl">
<div class="video-box">
<video width="100%" height="100%" preload loop muted>
<source :src="recordForm.videoUrl" type="video/mp4" />
</video>
<div class="mask">
<div class="video-pane-close" @click="handleEnlarge(recordForm.videoUrl, 'video')">
<img src="../../assets/material/view.png" alt="" />
</div>
</div>
</div>
</div>
</div>
<div class="record-flex">
<div class="record-type">活动图片:</div>
<div class="record-flex" v-if="recordForm.imageUrlArr && recordForm.imageUrlArr.length > 0">
<div v-for="(item, index) in recordForm.imageUrlArr" :key="index">
<div class="video-box">
<img class="photo-activity" :src="item" alt="" />
<div class="mask">
<div class="video-pane-close" @click="handleEnlarge(item)">
<img src="../../assets/material/view.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="record-flex">
<el-button class="back-btn" size="medium" type="primary" @click="goback">返回</el-button>
</div>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
recordForm: {
name: '',
desc: '',
imageUrlArr: [],
videoUrl: ''
},
dialogVisibleImg: false
}
},
created() {
this.routeInfo = this.$route.query
this.getActivityRecordDetail(this.routeInfo.id)
},
methods: {
// 获取活动记录详情
getActivityRecordDetail(id) {
this.$apis.record.getActivityRecordDetail({ Id: id }).then(res => {
if (res) {
this.recordForm = res
}
})
},
// 预览图文
handleEnlarge(src, type) {
this.dialogVisibleImg = true
this.dialogSrc = src
this.dialogType = type ? type : 'img'
},
goback() {
this.$router.go(-1)
},
// 同步活动
activityRecordSync() {
let params = {
id: this.routeInfo.id,
crowdFundActivityId: this.recordForm.crowdFundActivityId
}
this.$apis.record.activityRecordSync(params).then(res => {
if (res) {
this.recordForm = res
this.$message.success('更新数据成功')
}
})
}
}
}
</script>
<style lang="scss" scoped>
.record-box {
width: 100%;
background-color: #fff;
margin-bottom: 16px;
}
.title {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 16px;
padding: 15px 0 15px 20px;
border-bottom: 1px solid #d8d8d8;
}
.record-form {
padding: 32px 0;
}
.record-flex {
display: flex;
}
.record-center {
align-items: center;
}
.record-bottom {
margin-bottom: 10px;
}
.record-text {
margin-right: 20px;
}
.back-btn {
margin: auto;
}
.record-introducer {
display: flex;
padding-right: 100px;
&-left {
width: 665px;
text-align: right;
}
}
.record-type {
width: 154px;
text-align: right;
}
.record-intro {
max-width: 1000px;
}
.activity-detail {
display: flex;
justify-content: space-around;
margin: 0 0 20px 154px;
background: #f9f9f9;
padding: 20px 0;
min-width: 600px;
max-width: 1100px;
&-content {
display: flex;
.activity-title {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.activity-content {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.activity-bottom {
margin-bottom: 20px;
}
}
.video-box {
position: relative;
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 8px;
&:hover .mask {
opacity: 1;
}
.video {
position: absolute;
object-fit: fill;
}
.photo-activity {
position: absolute;
width: 104px;
height: 104px;
}
.mask {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
background: rgba(0, 0, 0, 0.5);
color: #ffffff;
opacity: 0;
top: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 999;
.video-pane-close {
width: 14px;
height: 14px;
cursor: pointer;
margin-right: 8px;
}
}
}
.image-dialog {
/deep/ {
.el-dialog__header {
border-bottom: 0px;
padding: 0px;
}
}
}
</style>
......@@ -15,7 +15,9 @@
<span slot="footer">
<el-button :size="size"
type="primary"
@click="resetTable">查询</el-button>
@click="getTable">查询</el-button>
<el-button :size="size"
@click="resetTable">重置</el-button>
</span>
</glsx-combi-form>
<!-- : :hasPage="false"
......@@ -192,7 +194,7 @@ export default {
// })
})
},
resetTable() {
getTable() {
this.$refs.storeRef.page.currentPage = 1
this.getList()
},
......@@ -214,7 +216,10 @@ export default {
// this.staffUuid = val.uuid
// this.store = val
},
resetTable() {
this.searchForm = {}
// this.$refs.showSearch.refreshTable()
},
handleClose() {
this.$emit('handleRelateStoreClose')
},
......
<template>
<div class="sub-el-table-column">
<el-table-column v-for="(item, index) in reverseData" :key="index + 'child'" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'" :sortable="item.sortable" :render-header="item.renderHeader" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ item.formatter(scope.row) | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ item.formatter(scope.row) || '--' }} -->
{{ item.formatter(scope.row) | tableCellFormat }}
</span>
</template>
<template v-else-if="getListApi">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="scope.row[item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ scope.row[item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ scope.row[item.prop] || '--' }} -->
{{ scope.row[item.prop] | tableCellFormat }}
</span>
</template>
<template v-else>
<!-- 大于10或 20个字节长度 -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" width="200" trigger="hover" :content="tableData[scope.$index][item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ tableData[scope.$index][item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<!-- <span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="tableData[scope.$index][item.prop]"></span> -->
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ tableData[scope.$index][item.prop] || '--' }} -->
{{ tableData[scope.$index][item.prop] | tableCellFormat }}
</span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
</div>
</template>
<script>
// import GlSubTableColumn from '../../GlSubTableColumn'
export default {
name: 'sub-el-table-column',
props: {
data: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
// 获取列表接口
getListApi: {
type: Function,
default: null
}
},
computed: {
reverseData() {
let arr = [...this.data]
let temp = arr.pop()
arr.unshift(temp)
return arr
}
},
// components: {
// GlSubTableColumn
// }
// created(){
// // console.log('data',this.data)
// }
}
</script>
<style lang="scss">
// .sub-el-table-column {
// }
</style>
......@@ -29,7 +29,12 @@
<div class="data-board-box">
<p class="edit-title">员工排行榜</p>
<div class="p-20">
<GLCombiForm ref="rankRef" :rowNumber="1" :formObj="searchRankForm" :formData="searchFormRankData" @handleOk="handleSearchRank"></GLCombiForm>
<GLCombiForm ref="rankRef"
:rowNumber="1"
:formObj="searchRankForm"
:formData="searchFormRankData"
@handleOk="handleSearchRank"
@handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('rank')">导出</el-button>
......@@ -295,10 +300,10 @@ export default {
this.getLiveData()
},
mounted() {
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'),
[rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default')
// [rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
if (dataResetBtn) dataResetBtn.style.display = 'none'
if (rankResetBtn) rankResetBtn.style.display = 'none'
// if (rankResetBtn) rankResetBtn.style.display = 'none'
},
methods: {
......@@ -313,6 +318,11 @@ export default {
})
.catch(err => {})
},
handleReset() {
this.searchRankForm = this.$options.data.call(this).searchRankForm
// this.$refs.rankRef.refreshTable()
// this.handleSearch()
},
getDataBoardApi() {
// { activityId } = this.$route.query,
let { statDate } = this.searchForm
......
......@@ -64,7 +64,6 @@
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
:disabled="isDisabled"
@change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</template>
<div slot="goodsHtml"
......@@ -85,8 +84,7 @@
prop="crowdFundingPrice"
id="crowdFundingPrice">
<el-input v-model="editForm.crowdFundingPrice"
style="width: 150px"
:disabled="isDisabled"><span slot="append">元</span></el-input>
style="width: 150px"><span slot="append">元</span></el-input>
<span class="balancePayment">尾款:
{{ editForm.crowdFundingPrice | filterBalancePayment(editForm.activityPrice) }}</span>
</el-form-item>
......@@ -94,8 +92,7 @@
prop="activityPrice"
id="activityPrice">
<el-input v-model="editForm.activityPrice"
style="width: 150px"
:disabled="isDisabled"><span slot="append">元</span></el-input>
style="width: 150px"><span slot="append">元</span></el-input>
</el-form-item>
<el-form-item label="活动库存:"
......@@ -165,8 +162,8 @@
@change="handleIsLimit">
<el-radio v-for="(item, index) in scope.scope.optionList"
:key="index"
:label="item[scope.scope.optionId]"
:disabled="isDisabled">{{ item[scope.scope.optionLabel] }}</el-radio>
:label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}
</el-radio>
</el-radio-group>
<p v-if="editForm[scope.scope.name] == 2"
id="limitPurchaseNumber"
......@@ -174,8 +171,7 @@
每人限购
<el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber"
placeholder="请输入限购次数"
:disabled="isDisabled"></el-input>
placeholder="请输入限购次数"></el-input>
</el-form-item>
件
</p>
......@@ -687,10 +683,14 @@
<div slot="paymentModel"
class="paymentModelSlot">
<el-radio-group v-model="editForm.paymentModel">
<el-radio :label="1">广联收定金和尾款</el-radio>
<el-radio :label="2">广联收定金门店收尾款</el-radio>
<el-radio :label="3">广联收定金门店收全款退定金</el-radio>
<el-radio :label="4">门店收定金和尾款</el-radio>
<el-radio :disabled="isDisabled"
:label="1">广联收定金和尾款</el-radio>
<el-radio :disabled="isDisabled"
:label="2">广联收定金门店收尾款</el-radio>
<el-radio :disabled="isDisabled"
:label="3">广联收定金门店收全款退定金</el-radio>
<el-radio :disabled="isDisabled"
:label="4">门店收定金和尾款</el-radio>
</el-radio-group>
</div>
</glsx-combi-form>
......@@ -1037,8 +1037,7 @@ export default {
name: 'activityName',
type: 'input',
maxlength: 40,
tips: '如XX店车主关怀活动',
isDisabled: false
tips: '如XX店车主关怀活动'
},
{
label: '活动宣传图',
......@@ -1047,7 +1046,6 @@ export default {
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityImg',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
......@@ -1068,9 +1066,8 @@ export default {
label: '活动宣传语',
name: 'promotion',
type: 'input',
maxlength: 20,
tips: '比如车主关怀,0元秒杀',
isDisabled: false
maxlength: 50,
tips: '比如车主关怀,0元秒杀'
},
{
label: '活动时间',
......@@ -1139,13 +1136,11 @@ export default {
optionList: [
{
confId: 1,
confName: '否',
isDisabled: false
confName: '否'
},
{
confId: 2,
confName: '是',
isDisabled: false
confName: '是'
}
]
}
......@@ -1697,18 +1692,12 @@ export default {
this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 'add' ? this.getInfo() : this.getPayList()
var id = this.routeInfo.id
var detailDisableList = ['editFormData']
if (id) {
if (this.routeInfo.addOrEdit == 'edit' && this.routeInfo.activityStatus == 2) {
// this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit()
this.isDisabled = this.routeInfo.addOrEdit != 'add'
detailDisableList.forEach(attr => {
this.changeFormAttr(
attr,
'isDisabled',
this[attr].map(item => item.label),
true
)
this.editFormData.map(item => {
if (!['activityName', 'activityImg', 'promotion'].includes(item.name)) this.changeFormAttr('editFormData', 'isDisabled', [item.label], true)
})
this.changeFormAttr('configEditFormData', 'isDisabled', ['定金收款账户'], true)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!