Commit 7cdac9cd by 前端

第一轮BUG修复

1 parent f2ddd239
<template>
<div class="basic-panel">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="content" v-if="tooltipStatus">
<div class="basic-title" slot="reference">{{ content | ellipsis(this) }}</div>
</el-popover>
<div class="basic-title" v-else>{{ content | ellipsis(this) }}</div>
</div>
</template>
<script>
export default {
name: 'basic-dialog',
props: {
content: {
type: String,
default: ''
},
textLength: {
type: Number,
default: 8
}
},
data() {
return {
tooltipStatus: false
}
},
filters: {
ellipsis(value,that) {
console.log(value,that)
if (value.length > that.textLength) {
that.tooltipStatus = true
return value.slice(0, that.textLength) + '...'
}
return value
}
},
mounted() {
// this.$nextTick(() => {
// const title = document.querySelector('.basic-title-s')
// console.log(title.innerText, this.content)
// if (title.innerText == this.content) {
// this.tooltipStatus = false
// } else {
// this.tooltipStatus = true
// }
// })
}
}
</script>
<style lang="scss">
.basic-panel {
display: inline-block;
}
</style>
const TYPE = Object.freeze({
none: ''
})
// 权限校验
function permission(ctx) {
console.log(ctx)
if (!ctx) return TYPE.none
const {
props: { fn, mode },
parent: {
$GLBUTTION_PERMISSIONS: { routes = [], routerBase }
}
} = ctx
const router = routes.find(route => location.pathname === `${routerBase}${route.path.split(':/')[0]}`)
if (router && router.meta && router.meta.permissions && router.meta.permissions.includes(fn)) {
return mode
}
return TYPE.none
}
export default {
functional: true,
name: 'GLButton',
props: {
fn: {
type: String
},
mode: {
type: String,
default: 'el-button'
}
},
render: function(createElement, context) {
return createElement(permission(context), context.data, context.children)
}
}
\ No newline at end of file \ No newline at end of file
...@@ -8,4 +8,29 @@ ...@@ -8,4 +8,29 @@
*/ */
import Vue from 'vue' import Vue from 'vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue' import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
import selectMutiProDialog from '@/components/selectMutiProDialog/index.vue'
import selectSingleProDialog from '@/components/selectSingleProDialog/index.vue'
import relateStoreDialog from '@/components/relate-store-dialog'
import selectMutiProForcouponDialog from '@/components/selectMutiProDialog/indexForCoupon.vue'
import tableTooltip from '@/components/table-tooltip/index.vue'
import glsxRows from '@/components/glsx-rows/index.vue'
import glsxDescriptions from '@/components/glsx-descriptions/index.vue'
import selectTag from '@/components/selectTag/index.vue'
import searchForm from '@/components/search-form/index.vue'
import _button from '@/components/glsx-button/index'
import _title from '@/components/basic-title/index'
Vue.component('glsx-combi-form', glsxCombiForm) Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('glsx-dialog', glsxDialog)
Vue.component('select-muti-pro-dialog', selectMutiProDialog)
Vue.component('select-single-pro-dialog', selectSingleProDialog)
Vue.component('relate-store-dialog', relateStoreDialog)
Vue.component('select-muti-pro-forcoupon-dialog', selectMutiProForcouponDialog)
Vue.component('table-tooltip', tableTooltip)
Vue.component('glsx-rows', glsxRows)
Vue.component('glsx-descriptions', glsxDescriptions)
Vue.component('select-tag', selectTag)
Vue.component('search-form', searchForm)
Vue.component('GLButton', _button)
Vue.component('GLTitle', _title)
<template> <template>
<div class="tag-main select-tag"> <div class="tag-main select-tag">
<GLDialog bigTitle="选择标签" mode="big" :visible.sync="dialogVisible" :before-close="handleClose"> <GLDialog bigTitle="选择标签"
mode="big"
:visible.sync="dialogVisible"
:before-close="handleClose">
<div class="tag-panel"> <div class="tag-panel">
<div class="tag-panel-select"> <div class="tag-panel-select">
<div class="tag-title">预选标签</div> <div class="tag-title">预选标签</div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header"> <div class="tag-box-header">
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input> <el-input size="small"
<el-button size="small" type="primary" @click="handleSearch">查询</el-button> v-model="labelGroupName"
placeholder="请输入搜索内容"></el-input>
<el-button size="small"
type="primary"
@click="handleSearch">查询</el-button>
</div> </div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading"> <div class="checkbox-group-box"
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index"> :style="{ height: heightBox + 'px' }"
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" v-loading="loading">
<div style="margin-bottom: 8px"
v-for="(item, index) in labelTreeRets"
:key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right"
:class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"></span> @click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" <el-checkbox :indeterminate="item.isIndeterminate"
v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)">{{ @change="handleCheckAllChange(item.checkAll, index)">{{
item.labelGroup.name item.labelGroup.name
}}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项) }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)
</el-checkbox> </el-checkbox>
<div style="margin: 15px 0"></div> <div style="margin: 15px 0"></div>
<el-checkbox-group class="tag-group" v-model="item.tagChecked" <el-checkbox-group class="tag-group"
@change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked"> v-model="item.tagChecked"
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox> @change="handleCheckedChange(item.tagChecked, index)"
v-if="item.checked">
<el-checkbox v-for="(itm, idx) in item.labelList"
:label="itm"
:key="idx">{{ itm.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</div> </div>
...@@ -31,31 +48,50 @@ ...@@ -31,31 +48,50 @@
<div class="tag-title">已选标签 <div class="tag-title">已选标签
<!-- <image src="@/assets/icon-info.png"/>--> <!-- <image src="@/assets/icon-info.png"/>-->
<el-tooltip effect="light" popper-class="tool-gltip"> <el-tooltip effect="light"
<img class="tag-img" src="@/assets/icon-tip.png" alt=""/> popper-class="tool-gltip">
<img class="tag-img"
src="@/assets/icon-tip.png"
alt="" />
<div slot="content"> <div slot="content">
<div class="tag-content"> <div class="tag-content">
<p class="tag-ex">说明:</p> <p class="tag-ex">说明:</p>
<p>标签组内已选标签取<span class="tag-ex">并集(或)</span>,即满足一个条件即可、标签组之间取<span class="tag-ex">交集(且)</span>,即同时满足标签组条件。</p> <p>标签组内已选标签取<span class="tag-ex">并集(或)</span>,即满足一个条件即可、标签组之间取<span
<img src="@/assets/sop/groupTips.png" alt=""/> class="tag-ex">交集(且)</span>,即同时满足标签组条件。</p>
<img src="@/assets/sop/groupTips.png"
alt="" />
</div> </div>
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div> <div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }"> <div class="tag-selected-box"
<div v-show="!!selectNum" class="tag-line-and" :style="{ height: heightBox + 'px' }"> :style="{ height: heightBox + 'px' }">
<div v-show="!!selectNum"
class="tag-line-and"
:style="{ height: heightBox + 'px' }">
<p class="tag-line"></p> <p class="tag-line"></p>
<p class="tag-and" :style="{ top: heightBox / 2 - 20 + 'px' }">且</p> <p class="tag-and"
:style="{ top: heightBox / 2 - 20 + 'px' }">且</p>
</div> </div>
<div class="label-box"> <div class="label-box">
<div v-for="(item, index) in labelTreeRetSelect" :key="index"> <div v-for="(item, index) in labelTreeRetSelect"
<p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p> :key="index">
<span v-for="(tag, idx) in item.tagChecked" :key="idx"> <p class="tag-selected-label"
<span class="tag-txt" v-show="idx != 0">或</span> v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p>
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag" <span v-for="(tag, idx) in item.tagChecked"
closable :disable-transitions="false" @close="remove(item, idx)"> :key="idx">
<span class="tag-txt"
v-show="idx != 0">或</span>
<el-tag :title="tag.name"
type="info"
class="customer-tag-selected-item"
:key="idx"
v-if="tag"
closable
:disable-transitions="false"
@close="remove(item, idx)">
{{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }} {{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }}
</el-tag> </el-tag>
</span> </span>
...@@ -65,20 +101,25 @@ ...@@ -65,20 +101,25 @@
</div> </div>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer"
<a class="dialog-jump" @click="jumpUrl" class="dialog-footer">
<a class="dialog-jump"
@click="jumpUrl"
v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<el-button size="small" @click="handleClose"> <el-button size="small"
@click="handleClose">
取 消 取 消
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small"
type="primary"
@click="handleSelect">确 定</el-button>
</span> </span>
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
<script> <script>
import {utils} from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/utils/util' import util from '@/utils/util'
export default { export default {
...@@ -132,6 +173,7 @@ export default { ...@@ -132,6 +173,7 @@ export default {
this.querylabeltree() this.querylabeltree()
}, },
querylabeltree(selectItem) { querylabeltree(selectItem) {
console.log('selectItem', selectItem);
this.loading = true this.loading = true
this.$apis.common this.$apis.common
.querylabeltree({ .querylabeltree({
...@@ -469,14 +511,14 @@ export default { ...@@ -469,14 +511,14 @@ export default {
min-height: 200px; min-height: 200px;
display: flex; display: flex;
} }
/deep/ .el-tooltip__popper.is-light{ /deep/ .el-tooltip__popper.is-light {
width: 1000px !important; width: 1000px !important;
} }
.tool-gltip { .tool-gltip {
/deep/.el-tooltip__popper.is-light{ /deep/.el-tooltip__popper.is-light {
width: 1000px !important; width: 1000px !important;
} }
/deep/.el-tooltip__popper{ /deep/.el-tooltip__popper {
width: 1000px !important; width: 1000px !important;
} }
.tag-content { .tag-content {
...@@ -484,10 +526,10 @@ export default { ...@@ -484,10 +526,10 @@ export default {
overflow: hidden; overflow: hidden;
width: 500px; width: 500px;
paddding: 10px; paddding: 10px;
p{ p {
margin: 3px 0; margin: 3px 0;
} }
.tag-ex{ .tag-ex {
color: #333333; color: #333333;
font-weight: 600; font-weight: 600;
} }
...@@ -496,7 +538,7 @@ export default { ...@@ -496,7 +538,7 @@ export default {
</style> </style>
<style> <style>
.tool-gltip { .tool-gltip {
max-width: 520px!important; max-width: 520px !important;
width: 520px!important; width: 520px !important;
} }
</style> </style>
...@@ -19,6 +19,7 @@ Vue.config.productionTip = false ...@@ -19,6 +19,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
Vue.prototype.setMinHeight = setMinHeight Vue.prototype.setMinHeight = setMinHeight
Vue.prototype.defaultLabelWidth = '154px' Vue.prototype.defaultLabelWidth = '154px'
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
......
...@@ -19,8 +19,8 @@ let router = null ...@@ -19,8 +19,8 @@ let router = null
let instance = null let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState ,routerBase}) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, request_merchant ,merchantId} = await fetchConfig(common) const { response, request, sign, secret, sign_common, request_common, request_merchant, merchantId } = await fetchConfig(common)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -28,6 +28,7 @@ export async function bootstrap({ history, common, messenger, globalState ,route ...@@ -28,6 +28,7 @@ export async function bootstrap({ history, common, messenger, globalState ,route
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$hmdMerchantId = merchantId Vue.prototype.$hmdMerchantId = merchantId
Vue.prototype.$tracker = common.tracker
// 集团版集团账号 // 集团版集团账号
Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4 Vue.prototype.$isGroupUp = globalState.session.accountLevel != 4
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
......
...@@ -390,9 +390,9 @@ export default { ...@@ -390,9 +390,9 @@ export default {
}, },
mounted() { mounted() {
// this.handleRefresh() this.handleRefresh()
// this.getListData() this.getListData()
// this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
......
...@@ -10,114 +10,84 @@ ...@@ -10,114 +10,84 @@
fn="新增众筹" fn="新增众筹"
mode="el-button" mode="el-button"
>新建众筹</GLButton> --> >新建众筹</GLButton> -->
<el-button <el-button :size="size"
:size="size"
type="default" type="default"
class="default-blue-btn" class="default-blue-btn"
@click="handleJump" @click="handleJump">订单管理</el-button>
>订单管理</el-button>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm <GLCombiForm ref="showSearch"
ref="showSearch"
:rowNumber="1" :rowNumber="1"
:formObj="searchForm" :formObj="searchForm"
:formData="searchFormData" :formData="searchFormData"
@handleOk="handleSearch" @handleOk="handleSearch"
@handleRest="handleReset" @handleRest="handleReset"></GLCombiForm>
></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button <el-button v-if="configShow"
v-if="configShow"
:size="size" :size="size"
class="default-blue-btn" class="default-blue-btn"
type="default" type="default"
@click="handleExport" @click="handleExport">导出</el-button>
>导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<single-gltable <single-gltable ref="activity"
ref="activity"
:getListApi="getListApi" :getListApi="getListApi"
:noDataImg="url" :noDataImg="url"
:searchForm="tableSearchForm" :searchForm="tableSearchForm"
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun">
> <div slot="activityImg"
<div
slot="activityImg"
class="table-image" class="table-image"
slot-scope="scope" slot-scope="scope">
> <el-popover placement="top"
<el-popover
placement="top"
width="160" width="160"
trigger="hover" trigger="hover"
popper-class="table-popover-block" popper-class="table-popover-block">
> <img class="table-popover-img"
<img :src="scope.scope.activityImg" />
class="table-popover-img" <img class="img-60 pointer"
:src="scope.scope.activityImg"
/>
<img
class="img-60 pointer"
slot="reference" slot="reference"
:src="scope.scope.activityImg" :src="scope.scope.activityImg" />
/>
</el-popover> </el-popover>
</div> </div>
<div <div slot="linkText"
slot="linkText" slot-scope="scope">
slot-scope="scope"
>
<template v-if="scope.scope.incrementFlag == 'Y' || !configShow"> <template v-if="scope.scope.incrementFlag == 'Y' || !configShow">
{{scope.scope[scope.prop] || 0 }} {{scope.scope[scope.prop] || 0 }}
</template> </template>
<template v-else> <template v-else>
<p <p class="cursor-pointer"
class="cursor-pointer" @click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
@click="handleDetail(scope)"
>{{ scope.scope[scope.prop] || 0 }}</p>
</template> </template>
</div> </div>
<div <div slot="joinText"
slot="joinText" slot-scope="scope">
slot-scope="scope" <el-tooltip effect="dark"
>
<el-tooltip
effect="dark"
:content="formatterNumber(scope.scope,scope.prop)" :content="formatterNumber(scope.scope,scope.prop)"
placement="top" placement="top">
>
<div class="line-ellipsis">{{formatterNumber(scope.scope,scope.prop)}}</div> <div class="line-ellipsis">{{formatterNumber(scope.scope,scope.prop)}}</div>
</el-tooltip> </el-tooltip>
</div> </div>
<div <div class="table-btns"
class="table-btns"
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope">
> <GLTableButton :buttonList="tableButtonList"
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope" :buttonItem="scope.scope"
:buttonNum="3" :buttonNum="3"></GLTableButton>
></GLTableButton>
</div> </div>
</single-gltable> </single-gltable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 众筹分享 --> <!-- 众筹分享 -->
<crowdFundingShare <crowdFundingShare :isShareVisible="isShareVisible"
:isShareVisible="isShareVisible"
:shareForm="shareForm" :shareForm="shareForm"
@handleShareClose="handleShareClose" @handleShareClose="handleShareClose"
:hideStatus="!configShow" :hideStatus="!configShow"></crowdFundingShare>
></crowdFundingShare>
</div> </div>
</template> </template>
...@@ -129,7 +99,7 @@ import url from '@/assets/empty.png' ...@@ -129,7 +99,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
export default { export default {
name: 'crowdFundList', name: 'crowdFundList',
data () { data() {
return { return {
size: 'small', size: 'small',
url: url, url: url,
...@@ -327,13 +297,13 @@ export default { ...@@ -327,13 +297,13 @@ export default {
singleGltable: GLTable singleGltable: GLTable
}, },
mounted () { mounted() {
this.getCrowdfundingOrderConfig() this.getCrowdfundingOrderConfig()
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
async getCrowdfundingOrderConfig () { async getCrowdfundingOrderConfig() {
let tableColumns = [ let tableColumns = [
// { // {
// label: '序号', // label: '序号',
...@@ -475,11 +445,11 @@ export default { ...@@ -475,11 +445,11 @@ export default {
this.channelType = channelType this.channelType = channelType
this.tableParams.tableColumns = tableColumns this.tableParams.tableColumns = tableColumns
}, },
getParams () { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
return params return params
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate // delete this.tableSearchForm.createDate
...@@ -487,13 +457,15 @@ export default { ...@@ -487,13 +457,15 @@ export default {
}) })
}, },
handleJump (path, row = {}) { handleJump(path, row = {}) {
console.log('111');
this.$router.push({ this.$router.push({
path: '/orderManage/index' path: '/orderManage/index'
}) })
}, },
secondConfirm (title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -519,16 +491,16 @@ export default { ...@@ -519,16 +491,16 @@ export default {
}, },
//开始 //开始
start (item) { start(item) {
this.startOrEndConfirm('开始', item) this.startOrEndConfirm('开始', item)
}, },
//结束 //结束
end (item) { end(item) {
this.startOrEndConfirm('结束', item) this.startOrEndConfirm('结束', item)
}, },
startOrEndConfirm (txt, row) { startOrEndConfirm(txt, row) {
var title = txt var title = txt
var params = {} var params = {}
params.id = row.id params.id = row.id
...@@ -541,26 +513,26 @@ export default { ...@@ -541,26 +513,26 @@ export default {
}, },
//置顶 //置顶
topping (row) { topping(row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params) this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
}, },
//删除 //删除
del (row) { del(row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params) this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
}, },
// 1-新增;2-编辑 // 1-新增;2-编辑
handleEdit (addOrEdit, row) { handleEdit(addOrEdit, row) {
var txtObj = { var txtObj = {
add: '新建', add: '新建',
edit: '编辑', edit: '编辑',
copy: '复制', copy: '复制',
detail: '编辑' detail: '查看'
}[addOrEdit] }[addOrEdit]
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
...@@ -579,7 +551,7 @@ export default { ...@@ -579,7 +551,7 @@ export default {
// console.log(JSON.parse(JSON.stringify(option))) // console.log(JSON.parse(JSON.stringify(option)))
// }, // },
// 明细 // 明细
handleDetail ({ prop, scope }) { handleDetail({ prop, scope }) {
let data = { let data = {
viewAmount: { viewAmount: {
type: 1, type: 1,
...@@ -605,25 +577,25 @@ export default { ...@@ -605,25 +577,25 @@ export default {
}) })
}, },
handleExport () { handleExport() {
var params = this.getParams() var params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => { this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleShare (row) { handleShare(row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => { this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
this.shareForm = res this.shareForm = res
this.handleShareClose() this.handleShareClose()
}) })
}, },
handleShareClose () { handleShareClose() {
this.isShareVisible = !this.isShareVisible this.isShareVisible = !this.isShareVisible
}, },
getOptionsList (formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
...@@ -649,11 +621,11 @@ export default { ...@@ -649,11 +621,11 @@ export default {
} }
}, },
handleSearch () { handleSearch() {
this.$refs.activity.refreshTable() this.$refs.activity.refreshTable()
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
activityName: '', activityName: '',
activityStatus: '' activityStatus: ''
...@@ -661,12 +633,12 @@ export default { ...@@ -661,12 +633,12 @@ export default {
this.handleSearch() this.handleSearch()
}, },
setTableFinishFun () { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun() this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
}, },
formatterNumber (cell, key) { formatterNumber(cell, key) {
const str = [] const str = []
cell?.goodsList?.map(e => { cell?.goodsList?.map(e => {
str.push(key != 'activityGoodsStock' ? (e[key] / 100).toFixed(2) : e[key]) str.push(key != 'activityGoodsStock' ? (e[key] / 100).toFixed(2) : e[key])
......
...@@ -2,27 +2,58 @@ ...@@ -2,27 +2,58 @@
<template> <template>
<div class="marketing"> <div class="marketing">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" class="el-icon-plus" type="primary" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton> <GLButton :size="size"
class="el-icon-plus"
type="primary"
@click="addActivity()"
fn="新增秒杀活动"
mode="el-button">新增秒杀活动</GLButton>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="activity"
<div slot="activityImg" class="table-image" slot-scope="scope"> :getListApi="getListApi"
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> :noDataImg="url"
<img class="table-popover-img" :src="scope.scope.activityImg" /> :searchForm="tableSearchForm"
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" /> :tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div slot="activityImg"
class="table-image"
slot-scope="scope">
<el-popover placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block">
<img class="table-popover-img"
:src="scope.scope.activityImg" />
<img class="img-60 pointer"
slot="reference"
:src="scope.scope.activityImg" />
</el-popover> </el-popover>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns"
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 分享 --> <!-- 分享 -->
<share-dialog :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></share-dialog> <share-dialog :isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"></share-dialog>
</div> </div>
</template> </template>
......
...@@ -26,9 +26,12 @@ ...@@ -26,9 +26,12 @@
editForm.customerOptType == '1' ? '选择指定客户' : editForm.customerOptType == '2' ? '按人群选择客户' : editForm.customerOptType == '3' ? '按标签选择客户' : editForm.customerOptType == '4' ? '按群标签选择客户' : '' editForm.customerOptType == '1' ? '选择指定客户' : editForm.customerOptType == '2' ? '按人群选择客户' : editForm.customerOptType == '3' ? '按标签选择客户' : editForm.customerOptType == '4' ? '按群标签选择客户' : ''
}}</span> }}</span>
<div class="base-info-obj"> <div class="base-info-obj">
<el-tag v-for="(item,index) in marketingObj" :key="index" class="customer-tag" :size="size" <el-tag v-for="(item,index) in marketingObj"
type="info" :disable-transitions="false" :key="index"
> class="customer-tag"
:size="size"
type="info"
:disable-transitions="false">
<span v-if="editForm.customerOptType == '1'">{{ item.customerName }}</span> <span v-if="editForm.customerOptType == '1'">{{ item.customerName }}</span>
<span v-if="editForm.customerOptType == '2'">{{ item.crowdName }}</span> <span v-if="editForm.customerOptType == '2'">{{ item.crowdName }}</span>
<span v-if="editForm.customerOptType == '3' || editForm.customerOptType == '4'">{{ <span v-if="editForm.customerOptType == '3' || editForm.customerOptType == '4'">{{
...@@ -41,49 +44,71 @@ ...@@ -41,49 +44,71 @@
</div> </div>
<!-- 营销事件设置--> <!-- 营销事件设置-->
<div class="container edit-container" v-loading="marketingEventLoading"> <div class="container edit-container"
<div class="edit-title flex" style="align-items: center"> v-loading="marketingEventLoading">
<div class="edit-title flex"
style="align-items: center">
<p>营销事件设置</p> <p>营销事件设置</p>
</div> </div>
<div v-show="!editForm.eventList.length" class="event-empty"> <div v-show="!editForm.eventList.length"
<img class="empty-img" :src="url"/> class="event-empty">
<img class="empty-img"
:src="url" />
<p class="empty-txt">暂无营销事件</p> <p class="empty-txt">暂无营销事件</p>
</div> </div>
<div v-show="editForm.eventList.length" class="event-box"> <div v-show="editForm.eventList.length"
<div class="event-item" v-for="(item, index) in editForm.eventList" :key="index"> class="event-box">
<div class="event-item"
v-for="(item, index) in editForm.eventList"
:key="index">
<div class="flex-default event-title"> <div class="flex-default event-title">
<p class="m-r-20">{{item.firstPushDate}} {{ item.eventTime }}</p> <p class="m-r-20">{{item.firstPushDate}} {{ item.eventTime }}</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 1">每天重复循环至</p> <p class="m-r-20"
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{ v-show="item.repeatFlag == 'Y' && item.repeatMode == 1">每天重复循环至</p>
<p class="m-r-20"
v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{
item.repeatTime item.repeatTime
}}重复循环至</p> }}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 3">每月{{ <p class="m-r-20"
v-show="item.repeatFlag == 'Y' && item.repeatMode == 3">每月{{
item.repeatTime item.repeatTime
}}重复循环至</p> }}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p> <p class="m-r-20"
v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p>
<p class="m-r-20 txt-blue"> <p class="m-r-20 txt-blue">
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p> {{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}
</p>
</div> </div>
<div> <div>
<div v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index"> <div v-for="(obj,index) in backupContentJson(item.backupContent)"
<div class="textHidden" :title="obj.attContent" v-if="obj.attType == 1" :key="index">
<div class="textHidden"
:title="obj.attContent"
v-if="obj.attType == 1"
v-html="tramWord(obj.attContent)"></div> v-html="tramWord(obj.attContent)"></div>
</div> </div>
<div class="event-inline" v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index"> <div class="event-inline"
v-for="(obj,index) in backupContentJson(item.backupContent)"
:key="index">
<div> <div>
<div v-if="obj.attType == 2"> <div v-if="obj.attType == 2">
<img class="model-item-img" <img class="model-item-img"
:src="obj.attContent" alt/> :src="obj.attContent"
alt />
</div> </div>
<div v-if="obj.attType == 3"> <div v-if="obj.attType == 3">
<video class="model-item-img" :src="obj.attContent" controls="controls"/> <video class="model-item-img"
:src="obj.attContent"
controls="controls" />
</div> </div>
<div v-if="obj.attType == 6"> <div v-if="obj.attType == 6">
<div class="welcome-activity-panel"> <div class="welcome-activity-panel">
<div class="welcome-activity-box"> <div class="welcome-activity-box">
<img src="@/assets/welcomeWord/material-icon.png" alt=""/> <img src="@/assets/welcomeWord/material-icon.png"
alt="" />
<div class="welcome-activity-desc"> <div class="welcome-activity-desc">
<div class="model-item-title">{{ backupContentJson(obj.attContent).fileName }}</div> <div class="model-item-title">
{{ backupContentJson(obj.attContent).fileName }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -92,31 +117,37 @@ ...@@ -92,31 +117,37 @@
<div v-if="obj.attType == 7 || obj.attType == 4"> <div v-if="obj.attType == 7 || obj.attType == 4">
<div class="welcome-activity-panel"> <div class="welcome-activity-panel">
<div class="welcome-activity-box"> <div class="welcome-activity-box">
<img src="@/assets/welcomeWord/activity-icon.png" alt=""/> <img src="@/assets/welcomeWord/activity-icon.png"
alt="" />
<div class="welcome-activity-desc"> <div class="welcome-activity-desc">
<template v-if="marketingContentJSON(obj).selectType == 'card'"> <template v-if="marketingContentJSON(obj).selectType == 'card'">
<div class="model-item-title" :title="marketingContentJSON(obj).equityName"> <div class="model-item-title"
:title="marketingContentJSON(obj).equityName">
{{ marketingContentJSON(obj).equityName }} {{ marketingContentJSON(obj).equityName }}
</div> </div>
</template> </template>
<template v-else-if="marketingContentJSON(obj).selectType == 'package'"> <template v-else-if="marketingContentJSON(obj).selectType == 'package'">
<div class="model-item-title" :title="marketingContentJSON(obj).packageName"> <div class="model-item-title"
:title="marketingContentJSON(obj).packageName">
{{ marketingContentJSON(obj).packageName }} {{ marketingContentJSON(obj).packageName }}
</div> </div>
</template> </template>
<template v-else-if="marketingContentJSON(obj).selectType == 'coupon'"> <template v-else-if="marketingContentJSON(obj).selectType == 'coupon'">
<div class="model-item-title" :title="marketingContentJSON(obj).couponName"> <div class="model-item-title"
:title="marketingContentJSON(obj).couponName">
{{ marketingContentJSON(obj).couponName }} {{ marketingContentJSON(obj).couponName }}
</div> </div>
</template> </template>
<template <template
v-else-if="marketingContentJSON(obj).selectType == 'activity'|| marketingContentJSON(obj).selectType == 'crowdfunding'"> v-else-if="marketingContentJSON(obj).selectType == 'activity'|| marketingContentJSON(obj).selectType == 'crowdfunding'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName"> <div class="model-item-title"
:title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }} {{ marketingContentJSON(obj).activityName }}
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="model-item-title" :title="marketingContentJSON(obj.attContent).couponName"> <div class="model-item-title"
:title="marketingContentJSON(obj.attContent).couponName">
{{ marketingContentJSON(obj).equityName }} {{ marketingContentJSON(obj).equityName }}
</div> </div>
</template> </template>
...@@ -129,7 +160,9 @@ ...@@ -129,7 +160,9 @@
</div> </div>
<div class="event-btns"> <div class="event-btns">
<el-button type="primary" size="small" @click="handleEventView">查看</el-button> <el-button type="primary"
size="small"
@click="handleEventView">查看</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -201,7 +234,7 @@ export default { ...@@ -201,7 +234,7 @@ export default {
methods: { methods: {
handleEventView() { handleEventView() {
let info = this.editForm.eventList && this.editForm.eventList[0] let info = this.editForm.eventList && this.editForm.eventList[0]
this.$router.push({path: '/sop/viewEvent', query: {info,sopType:this.editForm.sopType}}); this.$router.push({ path: '/sop/viewEvent', query: { info, sopType: this.editForm.sopType } });
}, },
tramWord(val) { tramWord(val) {
...@@ -239,7 +272,7 @@ export default { ...@@ -239,7 +272,7 @@ export default {
}, },
getInfo() { getInfo() {
this.$apis.sop.getSopInfoDetailApi({sopId: this.$route.query.id}).then(async res => { this.$apis.sop.getSopInfoDetailApi({ sopId: this.$route.query.id }).then(async res => {
this.editForm = res this.editForm = res
this.marketingObj = res.customerOptType == '1' ? res.customerList : res.customerOptType == '2' ? res.crowdList : res.customerOptType == '3' || res.customerOptType == '4' ? res.labelList : '' this.marketingObj = res.customerOptType == '1' ? res.customerList : res.customerOptType == '2' ? res.crowdList : res.customerOptType == '3' || res.customerOptType == '4' ? res.labelList : ''
} }
...@@ -371,7 +404,6 @@ export default { ...@@ -371,7 +404,6 @@ export default {
} }
} }
.welcome-activity-panel { .welcome-activity-panel {
display: flex; display: flex;
margin-right: 10px; margin-right: 10px;
...@@ -486,10 +518,9 @@ export default { ...@@ -486,10 +518,9 @@ export default {
.event-inline { .event-inline {
margin-top: 8px; margin-top: 8px;
display: inline-block display: inline-block;
} }
.base-info-list { .base-info-list {
padding: 32px 84px; padding: 32px 84px;
display: grid; display: grid;
...@@ -502,13 +533,13 @@ export default { ...@@ -502,13 +533,13 @@ export default {
font-size: 14px; font-size: 14px;
.base-info-obj { .base-info-obj {
background: #F9F9F9; background: #f9f9f9;
margin: 10px 0 0 64px; margin: 10px 0 0 64px;
padding: 8px; padding: 8px;
} }
} }
} }
.red-icon{ .red-icon {
color: #f56c6c; color: #f56c6c;
margin-right: 4px; margin-right: 4px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!