Commit e528cc0f by 前端

Merge branch 'develop' into 'master'

v2.10.1上线后,Develop合并代码到master。

See merge request !357
2 parents 599dc5b0 c64dd432
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
"vuex": "^3.1.2", "vuex": "^3.1.2",
......
...@@ -45,10 +45,34 @@ const getBrowseListApi = params => { ...@@ -45,10 +45,34 @@ const getBrowseListApi = params => {
sign: true sign: true
}) })
} }
//众筹活动访客明细
const getVisitorListApi = params => {
params.method = 'scrm.api.shopmall.customer.visitor.records'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 众筹活动分享明细
const getSharedListApi = params => {
params.method = 'scrm.api.shopmall.customer.shared.records'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 分页浏览-导出 // 分页浏览-导出
const exportBrowseApi = params => { const exportBrowseApi = (params, TYPE = 1) => {
params.method = 'scrm.api.shopmall.customer.browse.records.export' //TYPE 1 浏览 2 访客 3 分享
params.method = {
1: 'scrm.api.shopmall.customer.browse.records.export',
2: 'scrm.api.shopmall.customer.visitor.records.export',
3: 'scrm.api.shopmall.customer.shared.records.export'
}[TYPE]
return http({ return http({
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-shopmall/router',
method: 'POST', method: 'POST',
...@@ -137,5 +161,45 @@ const getCrowdSharedApi = params => { ...@@ -137,5 +161,45 @@ const getCrowdSharedApi = params => {
sign: true sign: true
}) })
} }
/**直播间下拉列表 */
const getLiveListApi = params => {
params.method = 'scrm.api.shopmall.livebroadcast.dropdown.list'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi } /**数据看板员工排名 */
const getRankListApi = params => {
params.method = 'scrm.api.shopmall.activity.ranking.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 数据看板员工-导出
const exportRankListApi = params => {
params.method = 'scrm.api.shopmall.activity.ranking.export'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
/**数据看板 */
const getDataBoardApi = params => {
params.method = 'scrm.api.shopmall.activity.statdata'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi }
<!-- 搜索 --> <!-- 搜索 -->
<template> <template>
<div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']"> <div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form
:ref="formRef"
:inline="true"
:model="formObj"
:rules="formRules"
size="small"
class="glsx-combi-form-block"
>
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> v-if="!item.isHide"
:key="index"
:id="item.name"
:labelWidth="isEdit ? '154px' : labelWidth"
:class="[{ 'no-label': !item.label, isBlock: isBlock },{'textBox':item.type=='textBox'}]"
:style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }"
:label="item.label"
:prop="item.name"
>
<span
v-if="!item.isHide && item.tips"
class="tips-block"
slot="label"
>
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips"> <el-popover
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" /> placement="top"
width="200"
trigger="hover"
:content="item.tips"
>
<img
slot="reference"
class="tips-icon"
src="./images/icon-tip.png"
/>
</el-popover> </el-popover>
: :
</span> </span>
<span v-else-if="!item.isHide && item.label && !item.tips" slot="label"> <span
<span class="combi-form-label" :style="{ width: item.labelWidth || labelWidth }">{{ item.label }}:</span> v-else-if="!item.isHide && item.label && !item.tips"
slot="label"
>
<span
class="combi-form-label"
:style="{ width: item.labelWidth || labelWidth }"
>{{ item.label }}:</span>
</span> </span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="item"
></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span> <span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)"> <el-input
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span> :placeholder="item.placeholder || '请输入' + item.label"
<span v-if="item.append" slot="suffix">{{ item.append }}</span> v-bind="item.attrs ? item.attrs : {}"
v-on="item.listeners ? item.listeners : {}"
:prefix-icon="item.prefixIcon"
v-model.trim="formObj[item.name]"
:disabled="item.isDisabled"
:maxlength="item.maxlength"
:clearable="item.isClear || false"
:type="item.inputType || 'text'"
:rows="item.rows || 2"
:style="{ width: item.width || defaultWidth }"
:show-word-limit="item.showLimit || false"
:show-password="item.showPass || false"
@keydown.native="e => handleInputDown(e, item)"
>
<span
v-if="item.prepend"
slot="prepend"
>{{ item.prepend }}</span>
<span
v-if="item.append"
slot="suffix"
>{{ item.append }}</span>
</el-input> </el-input>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot
:name="item.suffixSlot"
:scope="item"
></slot>
</div> </div>
<!-- 选择框 --> <!-- 选择框 -->
<div v-else-if="item.type === 'select'"> <div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)"> <el-select
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option> :style="{ width: item.width || defaultWidth }"
v-model="formObj[item.name]"
v-bind="item.attrs ? item.attrs : {}"
v-on="item.listeners ? item.listeners : {}"
:clearable="item.isClear || false"
:placeholder="item.placeholder || '请选择' + item.label"
:filterable="!item.noFilter"
:disabled="item.isDisabled"
:no-data-text="item.noDataText || '无数据'"
:multiple="item.multiple || false"
:collapse-tags="item.collapseTags || true"
@change="selectAddAttr($event, item)"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem[item.optionId]"
:label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"
:disabled="subItem.isDisabled || false"
></el-option>
</el-select> </el-select>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot
:name="item.suffixSlot"
:scope="item"
></slot>
</div> </div>
<!-- radio --> <!-- radio -->
<div v-else-if="item.type === 'radio'"> <div v-else-if="item.type === 'radio'">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange"> <el-radio-group
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]"> v-model="formObj[item.name]"
v-bind="item.attrs ? item.attrs : {}"
v-on="item.listeners ? item.listeners : {}"
:disabled="item.isDisabled"
@change="item.handleRadioChange"
>
<el-radio
v-for="subItem in item.optionList"
:key="subItem[item.optionId]"
:disabled="subItem.isDisabled"
:label="subItem[item.optionId]"
>
{{ subItem[item.optionLabel] }} {{ subItem[item.optionLabel] }}
<slot :name="subItem.suffixSonSlot" :scope="subItem"></slot> <slot
:name="subItem.suffixSonSlot"
:scope="subItem"
></slot>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot
:name="item.suffixSlot"
:scope="item"
></slot>
</div> </div>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker> <el-date-picker
v-else-if="item.type === 'datePicker'"
v-model="formObj[item.name]"
v-bind="item.attrs ? item.attrs : {}"
v-on="item.listeners ? item.listeners : {}"
:type="item.dateType || 'daterange'"
:disabled="item.isDisabled"
:value-format="item.valueFormat"
:style="{ width: item.width || defaultWidth }"
:clearable="item.isClear || false"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"
></el-date-picker>
<template v-else-if="item.type === 'upload'"> <template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }"> <slot
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"> :name="item.prefixSlot"
<div class="add" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('addStyle') ? item.uploadStyle.addStyle : ''">+</div> :scope="item"
></slot>
<div
v-if="!item.isDisabled"
:style="{ width: item.width || defaultWidth }"
>
<div
v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]"
class="activity-img img-w-h"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
>
<div
class="add"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('addStyle') ? item.uploadStyle.addStyle : ''"
>+</div>
<!-- <span v-if="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }}/{{ item.maxPhotoNum }}</span> --> <!-- <span v-if="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }}/{{ item.maxPhotoNum }}</span> -->
<span class="number" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('fontSize') ? item.uploadStyle.fontSize : ''">上传{{ item.uploadType == 'video' ? '视频' : '图片' }}</span> <span
<input v-if="item.uploadType == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" accept="video/mp4" @change="e => handleUploadChange(e, item)" /> class="number"
<input v-else type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" /> :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('fontSize') ? item.uploadStyle.fontSize : ''"
>上传{{ item.uploadType == 'video' ? '视频' : '图片' }}</span>
<input
v-if="item.uploadType == 'video'"
type="file"
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="activity-img img-w-h"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
accept="video/mp4"
@change="e => handleUploadChange(e, item)"
/>
<input
v-else
type="file"
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="activity-img img-w-h"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
accept="image/png, image/jpeg, image/gif, image/jpg"
@change="e => handleUploadChange(e, item)"
/>
</div> </div>
</div> </div>
<template> <template>
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length : formObj[item.name]"> <div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length : formObj[item.name]">
<span v-if="Array.isArray(formObj[item.name])"> <span v-if="Array.isArray(formObj[item.name])">
<span v-for="(subItem, subIndex) in formObj[item.name]" :key="subIndex" class="muti-imgs img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"> <span
<video v-if="item.uploadType == 'video'" class="img-w-h activity-img" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="typeof subItem == 'object' ? subItem.content : subItem"></video> v-for="(subItem, subIndex) in formObj[item.name]"
<img v-else class="img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="typeof subItem == 'object' ? subItem.content : subItem" /> :key="subIndex"
<span class="img-btns" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"> class="muti-imgs img-w-h"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
>
<video
v-if="item.uploadType == 'video'"
class="img-w-h activity-img"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
:src="typeof subItem == 'object' ? subItem.content : subItem"
></video>
<img
v-else
class="img-w-h"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
:src="typeof subItem == 'object' ? subItem.content : subItem"
/>
<span
class="img-btns"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
>
<span class="btn-item"> <span class="btn-item">
<i v-show="!item.isDisabled" class="el-icon-delete" @click="handleImgDelete(item, subIndex)"></i> <i
<i class="el-icon-zoom-in" @click="handleImgLook(typeof subItem == 'object' ? subItem.content : subItem, item)"></i> v-show="!item.isDisabled"
class="el-icon-delete"
@click="handleImgDelete(item, subIndex)"
></i>
<i
class="el-icon-zoom-in"
@click="handleImgLook(typeof subItem == 'object' ? subItem.content : subItem, item)"
></i>
</span> </span>
</span> </span>
</span> </span>
</span> </span>
<span v-else class="muti-imgs"> <span
<video v-if="item.uploadType == 'video'" class="img-w-h activity-img" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="formObj[item.name]"></video> v-else
<img v-else class="img-w-h" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''" :src="formObj[item.name]" /> class="muti-imgs"
<span class="img-btns" :style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"> >
<video
v-if="item.uploadType == 'video'"
class="img-w-h activity-img"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
:src="formObj[item.name]"
></video>
<img
v-else
class="img-w-h"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
:src="formObj[item.name]"
/>
<span
class="img-btns"
:style="item.uploadStyle && item.uploadStyle.hasOwnProperty('imgWH') ? item.uploadStyle.imgWH : ''"
>
<span class="btn-item"> <span class="btn-item">
<i v-show="!item.isDisabled" class="el-icon-delete" @click="handleImgDelete(item)"></i> <i
<i class="el-icon-zoom-in" @click="handleImgLook(formObj[item.name], item)"></i> v-show="!item.isDisabled"
class="el-icon-delete"
@click="handleImgDelete(item)"
></i>
<i
class="el-icon-zoom-in"
@click="handleImgLook(formObj[item.name], item)"
></i>
</span> </span>
</span> </span>
</span> </span>
</div> </div>
</template> </template>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot
:name="item.suffixSlot"
:scope="item"
></slot>
</template> </template>
<!-- 图文编辑器 --> <!-- 图文编辑器 -->
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" :excludeMenus="item.excludeMenus || ['code']" @change="e => handleTextBoxChange(e, item)" @focus="handleTextBoxFocus(item)"></textBox> <textBox
v-else-if="item.type === 'textBox'"
:ref="item.name + 'TextBox'"
:excludeMenus="item.excludeMenus || ['code']"
@change="e => handleTextBoxChange(e, item)"
@focus="handleTextBoxFocus(item)"
:boxHeight="item.boxHeight"
></textBox>
<!-- 地图 --> <!-- 地图 -->
<div v-else-if="item.type === 'map'" class="flex"> <div
<Province ref="provinceForm" :subdistrict="subdistrict" :isDisabled="item.isDisabled" @selectProvince="e => handleSelectProvince(e, item)" @selectCity="e => handleSelectCity(e, item)"></Province> v-else-if="item.type === 'map'"
<el-input style="flex: 1;" v-model="formObj[item.name]" placeholder="请选择商户地址" :readonly="item.isReadonly"></el-input> class="flex"
<el-button class="m-l-10" v-show="!item.isDisabled" @click="handleSelectMap(item)" type="primary">选择地址</el-button> >
<Province
ref="provinceForm"
:subdistrict="subdistrict"
:isDisabled="item.isDisabled"
@selectProvince="e => handleSelectProvince(e, item)"
@selectCity="e => handleSelectCity(e, item)"
></Province>
<el-input
style="flex: 1;"
v-model="formObj[item.name]"
placeholder="请选择商户地址"
:readonly="item.isReadonly"
></el-input>
<el-button
class="m-l-10"
v-show="!item.isDisabled"
@click="handleSelectMap(item)"
type="primary"
>选择地址</el-button>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
<slot name="footer"></slot> <slot name="footer"></slot>
</el-form> </el-form>
<GLDialog v-if="isImgVisible" bigTitle="查看" mode="big" :visible.sync="isImgVisible" :close-on-click-modal="false" @onOk="isImgVisible = false" @onCancel="isImgVisible = false"> <GLDialog
v-if="isImgVisible"
bigTitle="查看"
mode="big"
:visible.sync="isImgVisible"
:close-on-click-modal="false"
@onOk="isImgVisible = false"
@onCancel="isImgVisible = false"
>
<div class="dialog-look"> <div class="dialog-look">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls> <video
<source :src="dialogObj.url" type="video/mp4" /> v-if="dialogObj.uploadType == 'video'"
class="dialog-video"
controls
>
<source
:src="dialogObj.url"
type="video/mp4"
/>
</video> </video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" /> <img
v-else
class="dialog-img"
width="100%"
:src="dialogObj.url"
alt=""
/>
</div> </div>
</GLDialog> </GLDialog>
<GLDialog bigTitle="选择地址" mode="big" :visible.sync="dialogMapVisible" @onOk="getAddress" @onCancel="dialogMapVisible = false"> <GLDialog
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> bigTitle="选择地址"
mode="big"
:visible.sync="dialogMapVisible"
@onOk="getAddress"
@onCancel="dialogMapVisible = false"
>
<map-view
v-if="dialogMapVisible"
ref="mapForm"
></map-view>
<!-- <span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
<el-button @click="">取 消</el-button> <el-button @click="">取 消</el-button>
<el-button type="primary" @click="getAddress">确 定</el-button> <el-button type="primary" @click="getAddress">确 定</el-button>
...@@ -117,14 +377,13 @@ import mapView from './mapView.vue' ...@@ -117,14 +377,13 @@ import mapView from './mapView.vue'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common' import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default { export default {
name: 'glsx-combi-form', name: 'glsx-combi-form',
data() { data () {
return { return {
pickerOption: { pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions, beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions afterRangePickerOptions: afterRangePickerOptions
}, },
subdistrict: 2, subdistrict: 2,
mapHeight: 450,
dialogMapVisible: false, dialogMapVisible: false,
targetItem: {}, targetItem: {},
isImgVisible: false, isImgVisible: false,
...@@ -190,30 +449,32 @@ export default { ...@@ -190,30 +449,32 @@ export default {
mapView mapView
}, },
mounted() { }, mounted () { },
methods: { methods: {
// 选择框-添加其他属性 // 选择框-添加其他属性
selectAddAttr(value, targetItem) { selectAddAttr (value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem) targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
}, },
handleInputDown(e, item) { handleInputDown (e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) { if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn() item.keyFn()
} }
}, },
handleInputBlur(e, item) { handleInputBlur (e, item) {
item.inputBlur && item.inputBlur(e, item) item.inputBlur && item.inputBlur(e, item)
}, },
// 图片 // 图片
handleUploadChange(e, targetItem) { handleUploadChange (e, targetItem) {
var reader = new FileReader() var reader = new FileReader()
var file = e.srcElement.files[0] var file = e.srcElement.files[0]
var uploadType = targetItem.uploadType || 'img' var uploadType = targetItem.uploadType || 'img',
IMGTYPE = ['image/jpeg', 'image/png', 'image/jpg']
if (targetItem.supportGif) IMGTYPE.push('image/gif')
// 默认1MB // 默认1MB
const limitSize = targetItem.limitSize || 1 const limitSize = targetItem.limitSize || 1
const isLt = file.size / 1024 / 1024 < limitSize const isLt = file.size / 1024 / 1024 < limitSize
const isType = uploadType == 'img' ? ['image/jpeg', 'image/png', 'image/jpg'].includes(file.type) : ['video/mp4'].includes(file.type) const isType = uploadType == 'img' ? IMGTYPE.includes(file.type) : ['video/mp4'].includes(file.type)
const maxPhotoNum = targetItem.maxPhotoNum || 1 const maxPhotoNum = targetItem.maxPhotoNum || 1
const wdithLt = targetItem.wdithLt || 300 const wdithLt = targetItem.wdithLt || 300
const heightLt = targetItem.heightLt || 300 const heightLt = targetItem.heightLt || 300
...@@ -253,13 +514,13 @@ export default { ...@@ -253,13 +514,13 @@ export default {
document.getElementById(targetItem.name + 'file').value = '' document.getElementById(targetItem.name + 'file').value = ''
}, },
// 图片删除 // 图片删除
handleImgDelete(targetItem, subIndex = -1) { handleImgDelete (targetItem, subIndex = -1) {
Array.isArray(this.formObj[targetItem.name]) ? this.formObj[targetItem.name].splice(subIndex, 1) : (this.formObj[targetItem.name] = '') Array.isArray(this.formObj[targetItem.name]) ? this.formObj[targetItem.name].splice(subIndex, 1) : (this.formObj[targetItem.name] = '')
targetItem.handleDelete && targetItem.handleDelete(subIndex) targetItem.handleDelete && targetItem.handleDelete(subIndex)
// this.$emit('handleImgDelete', targetItem) // this.$emit('handleImgDelete', targetItem)
}, },
// 图片查看 // 图片查看
handleImgLook(src, targetItem) { handleImgLook (src, targetItem) {
this.isImgVisible = true this.isImgVisible = true
this.dialogObj = { this.dialogObj = {
url: src, url: src,
...@@ -267,28 +528,29 @@ export default { ...@@ -267,28 +528,29 @@ export default {
} }
}, },
// 获取富文本框内容 // 获取富文本框内容
handleTextBoxChange(val, targetItem) { handleTextBoxChange (val, targetItem) {
this.formObj[targetItem.name] = val this.formObj[targetItem.name] = val
}, },
handleTextBoxFocus(targetItem) { handleTextBoxFocus (targetItem) {
this.$refs[targetItem.name + 'TextBox'][0].setEdit(this.formObj[targetItem.name]) this.$refs[targetItem.name + 'TextBox'][0].setEdit(this.formObj[targetItem.name])
}, },
// 禁用富文本 // 禁用富文本
forbidEdit() { forbidEdit () {
this.$refs.textBox.forbidEdit() this.$refs.textBox.forbidEdit()
}, },
// 地图 // 地图
handleSelectMap(targetItem) { handleSelectMap (targetItem) {
this.targetItem = targetItem this.targetItem = targetItem
this.dialogMapVisible = true this.dialogMapVisible = true
this.$nextTick(() => { this.$nextTick(() => {
if (this.formObj[targetItem.attrObj.fullAddress] && !this.$refs.mapForm.address) { if (this.formObj[targetItem.attrObj.fullAddress] && !this.$refs.mapForm.address) {
this.$refs.mapForm.address = this.formObj[targetItem.attrObj.fullAddress] this.$refs.mapForm.address = this.formObj[targetItem.attrObj.fullAddress]
this.$refs.mapForm.addMarker([this.formObj[targetItem.attrObj.lng], this.formObj[targetItem.attrObj.lat]]) this.$refs.mapForm.lnglat = this.formObj[targetItem.attrObj.lng] ? [this.formObj[targetItem.attrObj.lng], this.formObj[targetItem.attrObj.lat]] : []
// this.$refs.mapForm.addMarker([this.formObj[targetItem.attrObj.lng], this.formObj[targetItem.attrObj.lat]])
} }
}) })
}, },
getAddress() { getAddress () {
let mapInfo = this.$refs.mapForm let mapInfo = this.$refs.mapForm
if (!mapInfo.address) { if (!mapInfo.address) {
this.$message({ this.$message({
...@@ -299,8 +561,8 @@ export default { ...@@ -299,8 +561,8 @@ export default {
return return
} }
this.formObj[this.targetItem.attrObj.fullAddress] = mapInfo.address this.formObj[this.targetItem.attrObj.fullAddress] = mapInfo.address
this.formObj[this.targetItem.attrObj.lat] = mapInfo.lnglat.lat this.formObj[this.targetItem.attrObj.lat] = mapInfo.lnglat[1]
this.formObj[this.targetItem.attrObj.lng] = mapInfo.lnglat.lng this.formObj[this.targetItem.attrObj.lng] = mapInfo.lnglat[0]
// var fullAddress = mapInfo.geocoderAddress.addressComponent || this.formObj[this.targetItem.attrObj.fullAddress] // var fullAddress = mapInfo.geocoderAddress.addressComponent || this.formObj[this.targetItem.attrObj.fullAddress]
var fullAddress = mapInfo.geocoderAddress.addressComponent var fullAddress = mapInfo.geocoderAddress.addressComponent
var provincecode = mapInfo.geocoderAddress.adcode || this.formObj[this.targetItem.attrObj.provinceCode] var provincecode = mapInfo.geocoderAddress.adcode || this.formObj[this.targetItem.attrObj.provinceCode]
...@@ -338,14 +600,14 @@ export default { ...@@ -338,14 +600,14 @@ export default {
this.$refs.provinceForm[0].init(province, city) this.$refs.provinceForm[0].init(province, city)
}, },
// 获取省 // 获取省
handleSelectProvince(val, targetItem) { handleSelectProvince (val, targetItem) {
this.formObj[targetItem.attrObj.fullAddress] = '' this.formObj[targetItem.attrObj.fullAddress] = ''
this.formObj[targetItem.attrObj.cityName] = '' this.formObj[targetItem.attrObj.cityName] = ''
this.formObj[targetItem.attrObj.provinceName] = val.provinceName this.formObj[targetItem.attrObj.provinceName] = val.provinceName
this.formObj[targetItem.attrObj.provinceCode] = val.provinceCode this.formObj[targetItem.attrObj.provinceCode] = val.provinceCode
}, },
// 获取市 // 获取市
handleSelectCity(val, targetItem) { handleSelectCity (val, targetItem) {
if (val.cityName) { if (val.cityName) {
this.formObj[targetItem.attrObj.cityName] = val.cityName this.formObj[targetItem.attrObj.cityName] = val.cityName
this.formObj[targetItem.attrObj.cityCode] = val.cityCode this.formObj[targetItem.attrObj.cityCode] = val.cityCode
...@@ -535,4 +797,8 @@ export default { ...@@ -535,4 +797,8 @@ export default {
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover { .glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea; background-color: #e8e8ea;
} }
.textBox .el-form-item__content {
width: 62%;
/* background: #096; */
}
</style> </style>
<template> <template>
<div class="map-box" :style="{ height: mapHeight + 'px' }"> <div class="map-box" :style="{ height: mapHeight + 'px', width: mapWidth + 'xp' }">
<div id="container" style="width: 100%; height: 100%"></div> <div id="container">
<div class="map-address">{{ address }}</div> <el-select v-model="input" class="map-input" filterable remote reserve-keyword placeholder="请输入" :remote-method="remoteMethod" @change="handleChangeAdr" :loading="loading">
<div id="myPageTop" style="position: absolute; top: 10px; width: 50%; left: 25%"> <el-option v-for="item in adrList" :key="item.id" :label="item.address" :value="item.id"></el-option>
<el-input placeholder="请输入关键字" v-model="input" class="input-with-select"> </el-select>
<el-button slot="append" icon="el-icon-search" @click="searchAddress"></el-button> </div>
</el-input> <div class="map-address">
<img class="icon-map" src="./images/icon-map.png" />
{{ address }}
</div> </div>
</div> </div>
</template> </template>
...@@ -16,23 +18,65 @@ export default { ...@@ -16,23 +18,65 @@ export default {
props: { props: {
mapHeight: { mapHeight: {
type: Number, type: Number,
default: 300 default: 460
},
mapWidth: {
type: Number,
default: 740
} }
}, },
data() { data() {
return { return {
input: '', input: [],
address: '', address: '',
adrList: [],
lnglat: [], lnglat: [],
geocoderAddress: {} geocoderAddress: {}
} }
}, },
mounted() {
this.mapInit()
},
methods: { methods: {
// initMap() {
// console.log(document.getElementsByTagName('head'))
// var script = document.createElement('script')
// script.type = 'text/javascript'
// script.src = 'https://webapi.amap.com/loader.js'
// document.getElementsByTagName('head')[0].appendChild(script)
// },
mapInit() { mapInit() {
/* eslint-disable */
AMapLoader.load({
/* eslint-enable */
key: '44cc16e43ad7ed3358df507bd0618181', // 申请好的Web端开发者Key,首次调用 load 时必填
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
// 需要使用的的插件列表
plugins: ['AMap.ToolBar', 'AMap.Scale', 'AMap.Geocoder'],
AMapUI: {
// 是否加载 AMapUI,缺省不加载
version: '1.1', // AMapUI 版本
plugins: ['overlay/SimpleMarker'] // 需要加载的 AMapUI ui插件
},
Loca: {
// 是否加载 Loca, 缺省不加载
version: '2.0' // Loca 版本
}
})
.then(AMap => {
map = new AMap.Map('container', { map = new AMap.Map('container', {
zoom: 20,
autoFitView: true,
resizeEnable: true, resizeEnable: true,
zoom: 20 cursor: 'move'
}) })
if (this.lnglat.length) {
this.addMarker(this.lnglat)
}
map.addControl(new AMap.Scale())
map.addControl(new AMap.ToolBar())
this.geocoder = new AMap.Geocoder()
map.setDefaultCursor('pointer')
AMap.plugin(['AMap.PlaceSearch'], function () { AMap.plugin(['AMap.PlaceSearch'], function () {
//构造地点查询类 //构造地点查询类
placeSearch = new AMap.PlaceSearch({ placeSearch = new AMap.PlaceSearch({
...@@ -44,15 +88,20 @@ export default { ...@@ -44,15 +88,20 @@ export default {
renderStyle: 'default' renderStyle: 'default'
}) })
}) })
// 添加列表点选监听事件
map.on('click', this.getAddress) map.on('click', this.getAddress)
})
.catch(e => {
console.error(e) //加载错误提示
})
}, },
searchAddress() { remoteMethod(query) {
if (query == '') {
return true
}
let _this = this let _this = this
placeSearch.search(this.input, function (status, result) { placeSearch.search(query, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) { if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location _this.adrList = result.poiList.pois
_this.getAddress(lnglat)
} }
}) })
}, },
...@@ -63,63 +112,76 @@ export default { ...@@ -63,63 +112,76 @@ export default {
} else { } else {
position = lnglat position = lnglat
} }
this.lnglat = position
marker = new AMap.Marker({ marker = new AMap.Marker({
map: map,
icon: new AMap.Icon({ icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png', image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小 size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34) imageSize: new AMap.Size(27, 34)
}), }),
// draggable: true,
position: position, position: position,
offset: new AMap.Pixel(-10, -10) offset: new AMap.Pixel(-10, -10)
}) })
map.setCenter(position)
map.add(marker) map.add(marker)
map.setFitView() marker.setMap(map)
// this.map.setFitView()
}, },
getAddress(e) { getAddress(e) {
let self = this let self = this
let lnglat let position
if (e.type == 'click') { if (e.type == 'click') {
lnglat = e.lnglat position = e.lnglat
} else { } else {
let { lng, lat } = e let { lng, lat } = e
lnglat = [lng, lat] position = [lng, lat]
} }
if (marker) { if (marker) {
map.remove(marker)
marker.setMap(null) marker.setMap(null)
marker = null marker = null
} }
self.addMarker(lnglat) self.addMarker(position)
AMap.plugin('AMap.Geocoder', () => { AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder() const geocoder = new AMap.Geocoder()
geocoder.getAddress(lnglat, (status, result) => { geocoder.getAddress(position, (status, result) => {
self.lnglat = lnglat
self.address = result.regeocode.formattedAddress self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => { geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') { if (status === 'complete' && result.info === 'OK') {
this.geocoderAddress = result.geocodes[0] self.geocoderAddress = result.geocodes[0]
} }
}) })
}) })
}) })
}, },
selectAddress(e) { handleChangeAdr(val) {
//这里获得点选地点的经纬度 if (val) {
this.getAddress() var location = this.adrList.find(item => item.id == val)
this.getAddress(location.location)
this.input = ''
this.adrList = []
}
} }
},
mounted() {
this.mapInit()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.map-box { .map-box {
display: flex;
#container {
position: relative; position: relative;
width: 100%; width: calc(100% - 284px - 16px);
}
#container {
position: absolute;
height: 100%; height: 100%;
}
.map-input {
position: absolute;
top: 32px;
width: 60%;
left: 25%;
z-index: 2;
}
} }
#panel { #panel {
position: absolute; position: absolute;
...@@ -130,8 +192,18 @@ export default { ...@@ -130,8 +192,18 @@ export default {
width: 280px; width: 280px;
} }
.map-address { .map-address {
position: absolute; display: flex;
box-sizing: border-box;
width: 284px;
height: 100%;
background-color: #f9f9f9;
padding: 20px;
margin-left: 16px;
line-height: 20px; line-height: 20px;
bottom: -30px; .icon-map {
width: 16px;
height: 16px;
margin-right: 6px;
}
} }
</style> </style>
...@@ -15,14 +15,6 @@ import '@/components' ...@@ -15,14 +15,6 @@ import '@/components'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup' import { start } from '@/setup'
import { setMinHeight } from '@/common/constant' import { setMinHeight } from '@/common/constant'
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
// 初始化vue-amap
VueAMap.initAMapApiLoader({
key: 'bd290dc27d0945959280753215ddda71', // 这里写你申请的高德地图的key
plugin: ['AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.Geolocation'],
v: '1.4.15'
})
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
......
...@@ -350,6 +350,12 @@ const staticRoutes = Object.freeze([ ...@@ -350,6 +350,12 @@ const staticRoutes = Object.freeze([
path: '/seckillActivity/browseList', path: '/seckillActivity/browseList',
component: resolve => require([`@/views/seckillActivity/browseList.vue`], resolve), component: resolve => require([`@/views/seckillActivity/browseList.vue`], resolve),
meta: {} meta: {}
},
{
name: 'dataBoard',
path: '/seckillActivity/dataBoard',
component: resolve => require([`@/views/seckillActivity/dataBoard.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -19,6 +19,10 @@ export default { ...@@ -19,6 +19,10 @@ export default {
excludeMenus: { excludeMenus: {
type: Array, type: Array,
default: () => ['code'] default: () => ['code']
},
boxHeight:{
type: Number,
default: 240
} }
}, },
mounted() { mounted() {
...@@ -31,7 +35,7 @@ export default { ...@@ -31,7 +35,7 @@ export default {
this.editor.config.uploadImgShowBase64 = true this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down' this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = 400 this.editor.config.height = this.boxHeight
this.editor.config.width = 500 this.editor.config.width = 500
this.editor.config.excludeMenus = this.excludeMenus this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.onchange = html => { this.editor.config.onchange = html => {
...@@ -112,7 +116,7 @@ export default { ...@@ -112,7 +116,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
#div-demo { #div-demo {
margin: 16px 300px 0 0; // margin: 16px 300px 0 0;
} }
.el-form .editor { .el-form .editor {
margin-top: 20px; margin-top: 20px;
......
<!-- 订单管理 --> <!-- 订单管理 -->
<template> <template>
<div class="marketing order-manage"> <div class="marketing order-manage">
<div class="container"> <div class="list-tips m-b-10">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <img
class="tips-img"
<div class="flex"> src="@/assets/icon-info.png"
<div class="flex-default"> />
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="全部订单" name="allOrder"></el-tab-pane>
<el-tab-pane label="售后订单" name="afterOrder"></el-tab-pane>
</el-tabs>
<span class="table-tips"> <span class="table-tips">
已生成有效订单 已生成有效订单
<span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span> <span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
...@@ -21,55 +16,206 @@ ...@@ -21,55 +16,206 @@
元 元
</span> </span>
</div> </div>
<el-button class="default-blue-btn" :size="size" type="default" @click="handleExport">导出</el-button> <div class="container">
</div> <div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="flex">
<div class="flex-default tabs">
<el-tabs
v-model="searchForm.requestSource"
@tab-click="handleTabClick"
>
<el-tab-pane
label="全部订单"
name="0"
></el-tab-pane>
<el-tab-pane
label="已付款"
name="1"
></el-tab-pane>
<el-tab-pane
label="未付款"
name="2"
></el-tab-pane>
<el-tab-pane
label="已退款"
name="3"
></el-tab-pane>
<el-tab-pane
label="售后订单"
name="4"
></el-tab-pane>
</el-tabs>
</div>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 --> <!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <div class="order-manage-table">
<div slot="weChatName" class="flex-align" slot-scope="scope"> <GLTable
<img v-if="scope.scope.weChatImageUrl" class="img-36 pointer img-circle" :src="scope.scope.weChatImageUrl" /> ref="allOrderRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="weChatName"
class="flex-align"
slot-scope="scope"
>
<img
v-if="scope.scope.weChatImageUrl"
class="img-36 pointer img-circle"
:src="scope.scope.weChatImageUrl"
/>
<span class="m-l-10">{{ scope.scope.weChatName }}</span> <span class="m-l-10">{{ scope.scope.weChatName }}</span>
<span v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span> <span v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span>
</div> </div>
<template slot="vinNo" slot-scope="scope"> <template
slot="vinNo"
slot-scope="scope"
>
{{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }} {{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }}
<el-popover popper-class="order-table-popover" placement="right-start" trigger="click"> <el-popover
<p v-for="(item, index) in scope.scope.vinNo" :key="index">{{ item }}</p> popper-class="order-table-popover"
<span class="car-no" slot="reference" v-show="Array.isArray(scope.scope.vinNo)">...({{ scope.scope.vinNo.length - 1 }})</span> placement="right-start"
trigger="click"
>
<p
v-for="(item, index) in scope.scope.vinNo"
:key="index"
>{{ item }}</p>
<span
class="car-no"
slot="reference"
v-show="Array.isArray(scope.scope.vinNo)"
>...({{ scope.scope.vinNo.length - 1 }})</span>
</el-popover> </el-popover>
</template> </template>
<div slot="orderStatus" slot-scope="scope"> <div
slot="orderStatus"
slot-scope="scope"
>
<span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span> <span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span>
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span> <span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> </div>
<div slot="shareStaffName" class="table-image" slot-scope="scope"> <div
slot="shareStaffName"
class="table-image"
slot-scope="scope"
>
<div> <div>
<img v-if="scope.scope.shareStaffImageUrl" class="img-36 pointer img-circle" style="vertical-align: middle" slot="reference" :src="scope.scope.shareStaffImageUrl" /> <img
v-if="scope.scope.shareStaffImageUrl"
class="img-36 pointer img-circle"
style="vertical-align: middle"
slot="reference"
:src="scope.scope.shareStaffImageUrl"
/>
<span class="m-l-10"> <span class="m-l-10">
<span>{{ scope.scope.shareStaffName }}</span> <span>{{ scope.scope.shareStaffName }}</span>
<span class="txt-green" v-if="scope.scope.shareStaffType == 1">@微信</span> <span
<span class="txt-orange" v-if="scope.scope.shareStaffType == 2">@企微</span> class="txt-green"
<span class="txt-blue" v-if="scope.scope.shareStaffType == 3">@小程序</span> v-if="scope.scope.shareStaffType == 1"
>@微信</span>
<span
class="txt-orange"
v-if="scope.scope.shareStaffType == 2"
>@企微</span>
<span
class="txt-blue"
v-if="scope.scope.shareStaffType == 3"
>@小程序</span>
</span> </span>
</div> </div>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span> <span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</div> </div>
</GLTable> </GLTable>
</div>
<!-- 表格区域 - 全部订单/售后订单 - end --> <!-- 表格区域 - 全部订单/售后订单 - end -->
</div> </div>
<!-- 快递信息 --> <!-- 快递信息 -->
<GLDialog v-if="isExpressVisible" title="输入快递信息" mode="mid" okText="确定" cancelText="取消" :visible.sync="isExpressVisible" @onOk="handleExpressConfirm" @onCancel="handleExpressClose"> <GLDialog
<glsx-combi-form class="small-content m-t-20" ref="expressRef" :isBlock="true" defaultWidth="284px" :isEdit="isEdit" :formRef="editChildRef" :formObj="expressForm" :formData="expressFormData" :formRules="expressRules"></glsx-combi-form> v-if="isExpressVisible"
title="输入快递信息"
mode="mid"
okText="确定"
cancelText="取消"
:visible.sync="isExpressVisible"
@onOk="handleExpressConfirm"
@onCancel="handleExpressClose"
>
<glsx-combi-form
class="small-content m-t-20"
ref="expressRef"
:isBlock="true"
defaultWidth="284px"
:isEdit="isEdit"
:formRef="editChildRef"
:formObj="expressForm"
:formData="expressFormData"
:formRules="expressRules"
></glsx-combi-form>
</GLDialog> </GLDialog>
<!-- 订单核销 --> <!-- 订单核销 -->
<GLDialog v-if="isWriteOffVisible" title="订单核销(请确保用户到店后核销,避免引起不必要问题)" mode="mid" okText="确定" cancelText="取消" :visible.sync="isWriteOffVisible" @onOk="handleWriteOffConfirm" @onCancel="handleWriteOffClose"> <GLDialog
<glsx-combi-form class="small-content m-t-20" ref="writeOffRef" :isBlock="true" defaultWidth="284px" :formRef="editChildRef" :formObj="writeOffForm" :formData="writeOffFormData" :formRules="writeOffRules"></glsx-combi-form> v-if="isWriteOffVisible"
title="订单核销(请确保用户到店后核销,避免引起不必要问题)"
mode="mid"
okText="确定"
cancelText="取消"
:visible.sync="isWriteOffVisible"
@onOk="handleWriteOffConfirm"
@onCancel="handleWriteOffClose"
>
<glsx-combi-form
class="small-content m-t-20"
ref="writeOffRef"
:isBlock="true"
defaultWidth="284px"
:formRef="editChildRef"
:formObj="writeOffForm"
:formData="writeOffFormData"
:formRules="writeOffRules"
></glsx-combi-form>
</GLDialog> </GLDialog>
<!-- 退款审核 --> <!-- 退款审核 -->
<GLDialog v-if="isExamineVisible" bigTitle="退款审核" mode="big" :visible.sync="isExamineVisible" @onOk="handleExamineConfirm" @onCancel="handleExamineClose"> <GLDialog
v-if="isExamineVisible"
bigTitle="退款审核"
mode="big"
:visible.sync="isExamineVisible"
@onOk="handleExamineConfirm"
@onCancel="handleExamineClose"
>
<el-form label-width="144px"> <el-form label-width="144px">
<el-form-item label="售后类型"> <el-form-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span> <span>{{ orderInfo.refundTypeName }}</span>
...@@ -84,8 +230,15 @@ ...@@ -84,8 +230,15 @@
<span>{{ orderInfo.remark || '-' }}</span> <span>{{ orderInfo.remark || '-' }}</span>
</el-form-item> </el-form-item>
<el-form-item v-if="orderInfo.imgUrls"> <el-form-item v-if="orderInfo.imgUrls">
<span v-for="(item, index) in orderInfo.imgUrls" :key="index"> <span
<el-image class="img-60" :src="item" :preview-src-list="[item]"></el-image> v-for="(item, index) in orderInfo.imgUrls"
:key="index"
>
<el-image
class="img-60"
:src="item"
:preview-src-list="[item]"
></el-image>
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="审核是否通过"> <el-form-item label="审核是否通过">
...@@ -95,12 +248,28 @@ ...@@ -95,12 +248,28 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'"> <template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'">
<glsx-combi-form ref="examineRef" :isEdit="isEdit" defaultWidth="284px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules"></glsx-combi-form> <glsx-combi-form
ref="examineRef"
:isEdit="isEdit"
defaultWidth="284px"
:isBlock="true"
:formRef="editChildRef"
:formObj="examineForm"
:formData="examineFormData"
:formRules="examineRules"
></glsx-combi-form>
</template> </template>
</el-form> </el-form>
</GLDialog> </GLDialog>
<!-- 确认收货 --> <!-- 确认收货 -->
<GLDialog v-if="isReceivingVisible" bigTitle="确认收货" mode="big" :visible.sync="isReceivingVisible" @onOk="handleReceivingConfirm" @onCancel="handleReceivingClose"> <GLDialog
v-if="isReceivingVisible"
bigTitle="确认收货"
mode="big"
:visible.sync="isReceivingVisible"
@onOk="handleReceivingConfirm"
@onCancel="handleReceivingClose"
>
<el-form label-width="140px"> <el-form label-width="140px">
<el-form-item label="售后类型"> <el-form-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span> <span>{{ orderInfo.refundTypeName }}</span>
...@@ -131,11 +300,10 @@ import url from '@/assets/empty.png' ...@@ -131,11 +300,10 @@ import url from '@/assets/empty.png'
import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant' import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default { export default {
name: 'orderManage', name: 'orderManage',
data() { data () {
return { return {
size: 'small', size: 'small',
url: url, url: url,
activeName: 'allOrder',
isEdit: true, isEdit: true,
orderCode: '', orderCode: '',
oldVal: { oldVal: {
...@@ -155,7 +323,8 @@ export default { ...@@ -155,7 +323,8 @@ export default {
shareStaffName: '', shareStaffName: '',
shareStaffType: '', shareStaffType: '',
activityName: '', activityName: '',
goodsName: '' goodsName: '',
requestSource: '0'
}, },
tableSearchForm: {}, tableSearchForm: {},
statisticsInfo: { statisticsInfo: {
...@@ -513,8 +682,7 @@ export default { ...@@ -513,8 +682,7 @@ export default {
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
line: 2, width: 160,
width: 180,
formatter: cellValue => { formatter: cellValue => {
return cellValue.customerName || '-' return cellValue.customerName || '-'
} }
...@@ -522,21 +690,35 @@ export default { ...@@ -522,21 +690,35 @@ export default {
{ {
label: '手机号', label: '手机号',
prop: 'customerPhone', prop: 'customerPhone',
width: 130, width: 160,
formatter: cellValue => { formatter: cellValue => {
return cellValue.customerPhone || '-' return cellValue.customerPhone || '-'
} }
}, },
{ {
label: '其他信息', label: '其他',
prop: 'otherInformation', prop: 'otherInformation',
width: '280' width: 210
}, },
{ {
label: '微信名称', label: '微信名称',
prop: 'weChatName', prop: 'weChatName',
addHtml: 'weChatName', addHtml: 'weChatName',
width: 300 width: 210
},
{
label: '推荐人',
prop: 'shareStaffName',
width: 210,
addHtml: 'shareStaffName'
},
{
label: '推荐人手机号',
prop: 'shareStaffPhone',
width: 160,
formatter: cellValue => {
return cellValue.shareStaffPhone || '-'
}
}, },
{ {
label: '订单时间', label: '订单时间',
...@@ -583,20 +765,6 @@ export default { ...@@ -583,20 +765,6 @@ export default {
} }
}, },
{ {
label: '推荐人',
prop: 'shareStaffName',
width: 360,
addHtml: 'shareStaffName'
},
{
label: '推荐人手机号',
prop: 'shareStaffPhone',
width: 130,
formatter: cellValue => {
return cellValue.shareStaffPhone || '-'
}
},
{
label: '支付总价/元', label: '支付总价/元',
prop: 'payPrice', prop: 'payPrice',
width: '120', width: '120',
...@@ -676,27 +844,24 @@ export default { ...@@ -676,27 +844,24 @@ export default {
} }
}, },
mounted() { mounted () {
// this.getCount() // this.getCount()
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
getParams() { getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) { if (this.searchForm.createDate.length) {
params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdEndDateStr = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.createdEndDateStr = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
// 售后订单 if (params.orderStatuses.includes('3') && params.requestSource == '0') delete params.requestSource
if (this.activeName == 'afterOrder') {
params.orderStatusPart = 1
}
delete params.createDate delete params.createDate
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
...@@ -704,7 +869,7 @@ export default { ...@@ -704,7 +869,7 @@ export default {
}) })
}, },
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)
...@@ -730,7 +895,7 @@ export default { ...@@ -730,7 +895,7 @@ export default {
} }
}, },
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: '取消',
...@@ -752,15 +917,16 @@ export default { ...@@ -752,15 +917,16 @@ export default {
}) })
}, },
getCount() { getCount () {
var params = this.getParams() var params = this.getParams()
delete params.createDate delete params.createDate
// if(params.orderStatuses.includes('3')) return
this.$apis.orderManage.getCountApi(params).then(res => { this.$apis.orderManage.getCountApi(params).then(res => {
this.statisticsInfo = res || { orderCount: '', payPriceTotal: '', refundTotal: '' } this.statisticsInfo = res || { orderCount: '', payPriceTotal: '', refundTotal: '' }
}) })
}, },
handleDetail(row) { handleDetail (row) {
this.$router.push({ this.$router.push({
path: '/orderManage/orderDetail', path: '/orderManage/orderDetail',
query: { query: {
...@@ -770,7 +936,7 @@ export default { ...@@ -770,7 +936,7 @@ export default {
}, },
// 输入快递信息 - start // 输入快递信息 - start
handleExpressClose() { handleExpressClose () {
this.isExpressVisible = !this.isExpressVisible this.isExpressVisible = !this.isExpressVisible
this.orderCode = '' this.orderCode = ''
this.expressForm = { this.expressForm = {
...@@ -779,7 +945,7 @@ export default { ...@@ -779,7 +945,7 @@ export default {
} }
}, },
handleExpressConfirm() { handleExpressConfirm () {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => { this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.expressForm) var params = this.$common.utils.deepClone(this.expressForm)
...@@ -799,14 +965,14 @@ export default { ...@@ -799,14 +965,14 @@ export default {
}) })
}, },
handleExpressInfo(row) { handleExpressInfo (row) {
this.isExpressVisible = !this.isExpressVisible this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode this.orderCode = row.orderCode
}, },
// 输入快递信息 - end // 输入快递信息 - end
// 订单核销 - start // 订单核销 - start
handleWriteOffClose() { handleWriteOffClose () {
this.isWriteOffVisible = !this.isWriteOffVisible this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = '' this.orderCode = ''
this.writeOffForm = { this.writeOffForm = {
...@@ -814,7 +980,7 @@ export default { ...@@ -814,7 +980,7 @@ export default {
} }
}, },
handleWriteOffConfirm() { handleWriteOffConfirm () {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => { this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.writeOffForm) var params = this.$common.utils.deepClone(this.writeOffForm)
...@@ -834,7 +1000,7 @@ export default { ...@@ -834,7 +1000,7 @@ export default {
}) })
}, },
handleWriteOff(row) { handleWriteOff (row) {
if (row.orderSource == 4) { if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }) this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode })
return true return true
...@@ -845,7 +1011,7 @@ export default { ...@@ -845,7 +1011,7 @@ export default {
// 订单核销 - end // 订单核销 - end
// 退款审核 - start // 退款审核 - start
handleExamineClose() { handleExamineClose () {
this.isExamineVisible = !this.isExamineVisible this.isExamineVisible = !this.isExamineVisible
this.orderCode = '' this.orderCode = ''
this.orderInfo = {} this.orderInfo = {}
...@@ -857,7 +1023,7 @@ export default { ...@@ -857,7 +1023,7 @@ export default {
} }
}, },
submitExamine(params) { submitExamine (params) {
this.$apis.orderManage.examineAllowApi(params).then(res => { this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -871,7 +1037,7 @@ export default { ...@@ -871,7 +1037,7 @@ export default {
}) })
}, },
handleExamineConfirm() { handleExamineConfirm () {
var params = { var params = {
id: this.orderInfo.id id: this.orderInfo.id
} }
...@@ -890,7 +1056,7 @@ export default { ...@@ -890,7 +1056,7 @@ export default {
} }
}, },
handleExamine(row) { handleExamine (row) {
this.orderCode = row.orderCode this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => { this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
...@@ -902,13 +1068,13 @@ export default { ...@@ -902,13 +1068,13 @@ export default {
// 退款审核 - end // 退款审核 - end
// 确认收货 - start // 确认收货 - start
handleReceivingClose() { handleReceivingClose () {
this.isReceivingVisible = !this.isReceivingVisible this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = '' this.orderCode = ''
this.orderInfo = {} this.orderInfo = {}
}, },
handleReceivingConfirm() { handleReceivingConfirm () {
var params = { var params = {
id: this.orderInfo.id id: this.orderInfo.id
} }
...@@ -925,7 +1091,7 @@ export default { ...@@ -925,7 +1091,7 @@ export default {
}) })
}, },
handleReceiving(row) { handleReceiving (row) {
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => { this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-' this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
...@@ -935,7 +1101,7 @@ export default { ...@@ -935,7 +1101,7 @@ export default {
}, },
// 确认收货 - end // 确认收货 - end
setTableFinishFun() { setTableFinishFun () {
this.$refs.allOrderRef.data.forEach(item => { this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-' item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
}) })
...@@ -944,37 +1110,23 @@ export default { ...@@ -944,37 +1110,23 @@ export default {
this.getCount() this.getCount()
}, },
handleSearch() { handleSearch () {
this.$refs.allOrderRef.refreshTable() this.$refs.allOrderRef.refreshTable()
}, },
handleTabClick() { handleTabClick () {
this.handleSearch() this.handleSearch()
}, },
handleExport(row) { handleExport (row) {
var params = this.getParams() var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => { this.$apis.orderManage.orderExportApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = this.$options.data.call(this).searchForm
orderCode: '',
orderStatuses: [],
afterSaleStatuses: [],
merchantName: '',
customerName: '',
createDate: [],
orderSource: '',
deliveryType: '',
vin: '',
shareStaffName: '',
shareStaffType: '',
activityName: '',
goodsName: ''
}
this.handleSearch() this.handleSearch()
} }
} }
...@@ -987,12 +1139,12 @@ export default { ...@@ -987,12 +1139,12 @@ export default {
padding: 8px 12px !important; padding: 8px 12px !important;
} }
.order-manage { .order-manage {
.container {
padding: 20px 14px;
}
.table-tips { .table-tips {
height: 48px;
line-height: 48px;
font-size: 14px; font-size: 14px;
color: #333333; color: rgba(0, 0, 0, 0.65);
margin-left: 16px;
} }
.car-no { .car-no {
cursor: pointer; cursor: pointer;
...@@ -1003,7 +1155,31 @@ export default { ...@@ -1003,7 +1155,31 @@ export default {
line-height: 25px; line-height: 25px;
} }
.txt-blue { .txt-blue {
color: #5092ff; color: #5850ff;
}
.list-tips {
background: #e4e3ff;
border-radius: 4px;
border: none;
}
.order-manage-table {
padding: 20px;
border: 1px solid #e5e5e5;
border-radius: 0 4px 4px 4px;
}
.flex-default.tabs {
border-bottom: 1px solid #e5e5e5;
border-bottom: 0;
.el-tabs__item {
background: #fafafa;
border: 1px solid #e5e5e5 !important;
border-radius: 4px 4px 0 0;
border-bottom: 0;
}
.is-active {
border-bottom: 1px solid #fff !important;
font-weight: 500;
}
} }
} }
</style> </style>
<!-- 浏览明细 --> <!-- 明细 -->
<template> <template>
<div class="edit-share marketing edit-box"> <div class="edit-share marketing edit-box">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ routeInfo.activityName }}</p> <p class="edit-title">{{ routeInfo.activityName }}</p>
<div class="p-20"> <div class="p-20">
<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>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <div class="table-title">
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button> 已累计<template v-if="routeInfo.type != 2">{{decodeURI(routeInfo.name)}}</template>
<span>{{routeInfo.count || 0}}</span>
{{routeInfo.type == 2?'位访客':'次'}}
</div>
<el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="browserRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable
<div slot="customerName" class="flex-align" slot-scope="scope"> ref="browserRef"
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> :getListApi="getListApi"
<img class="table-popover-img" :src="scope.scope.customerAvatar" /> :noDataImg="url"
<img class="img-36 pointer" slot="reference" :src="scope.scope.customerAvatar" /> :searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="customerName"
class="flex-align"
slot-scope="scope"
>
<template v-if="scope.scope.customerAvatar">
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.customerAvatar"
/>
<img
class="img-36 pointer"
slot="reference"
:src="scope.scope.customerAvatar"
/>
</el-popover> </el-popover>
</template>
<span class="m-l-10">{{ scope.scope.customerName }}</span> <span class="m-l-10">{{ scope.scope.customerName }}</span>
</div> </div>
<div slot="shareName" class="flex-align" slot-scope="scope"> <div
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> slot="shareName"
<img class="table-popover-img" :src="scope.scope.shareAvatar" /> class="flex-align"
<img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" /> slot-scope="scope"
>
<template v-if="scope.scope.shareAvatar">
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.shareAvatar"
/>
<img
class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar"
/>
</el-popover> </el-popover>
</template>
<span class="m-l-10">{{ scope.scope.shareName }}</span> <span class="m-l-10">{{ scope.scope.shareName }}</span>
<span class="m-l-10">{{ scope.scope.sharePhone }}</span>
</div>
<div
slot="isBuy"
slot-scope="scope"
>
<span :class="['table-circle', 'm-r-8', scope.scope.isBuy == 'Y' ?'back-green': 'back-grey']"></span>
<span>{{{
'Y':'已付款',
'N':'未付款'
}[scope.scope.isBuy] || '--'}}</span>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div
<el-button type="default" @click="handleJump">返回</el-button> class="footer"
:style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type="default"
@click="handleJump"
>返回</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -44,7 +122,7 @@ import url from '@/assets/empty.png' ...@@ -44,7 +122,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
export default { export default {
name: 'browseList', name: 'browseList',
data() { data () {
return { return {
size: 'small', size: 'small',
url: url, url: url,
...@@ -72,15 +150,21 @@ export default { ...@@ -72,15 +150,21 @@ export default {
name: 'mobile', name: 'mobile',
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
},
{
label: '分享人',
name: 'shareName',
type: 'input',
maxlength: 50
} }
], ],
// 表格 // 表格
getListApi: this.$apis.seckillActivity.getBrowseListApi, getListApi: null,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableColumns: [ tableColumns: [
{ {
label: '微信名称', label: '微信昵称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName'
}, },
...@@ -89,66 +173,133 @@ export default { ...@@ -89,66 +173,133 @@ export default {
prop: 'mobile' prop: 'mobile'
}, },
{ {
label: '来源', label: '分享人',
prop: 'shareName', prop: 'shareName',
addHtml: 'shareName' addHtml: 'shareName',
width: 230
}, },
]
}
}
},
created () {
const lastTableColumns = [
{ {
label: '浏览次数', label: '浏览时长',
prop: 'browseCount' prop: 'browserTime',
}, },
{ {
label: '浏览时间', label: '进入页面时间',
prop: 'lastBrowseDate', prop: 'operationDate',
width: '180' width: '180'
},
{
label: '离开页面时间',
prop: 'leaveDate',
width: '180'
},
{
label: '订单状态',
prop: 'isBuy',
addHtml: 'isBuy'
} }
] ], {
} query
} } = this.$route,
name = {
1: '浏览',
2: '访客',
3: '分享',
}[query.type],
[url] = window.location.href.split('%24title')
query.name = name
this.routeInfo = query
this.getListApi = this.$apis.seckillActivity[{
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
}[query.type]]
history.replaceState(null, null, `${url}&$title=${name}明细`)
// listName:
//1 浏览 2 访客 3 分享
if (query.type != 2) {
this.searchFormData.push({
label: '订单状态',
name: 'isBuy',
type: 'select',
width: '215px',
optionList: [
{
confId: '',
confName: '全部'
}, },
{
confId: 'Y',
confName: '已付款'
},
{
confId: 'N',
confName: '未付款'
}
],
optionId: 'confId',
optionLabel: 'confName',
})
if (query.type == 3) this.tableParams.tableColumns.push({
label: '分享时间',
prop: 'sharedTime',
})
this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
} else this.tableParams.tableColumns = [...this.tableParams.tableColumns, {
label: '浏览次数',
prop: 'browseCount',
}, {
label: '最后浏览时间',
prop: 'lastBrowseDate',
}]
created() {
this.routeInfo = this.$route.query
}, },
mounted() { mounted () {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}, },
methods: { methods: {
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm.activityId = this.routeInfo.id this.searchForm.activityId = this.routeInfo.id
resolve() resolve()
}) })
}, },
handleExport () {
handleExport() {
var params = this.$common.utils.deepClone(this.searchForm) var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.routeInfo
params.pageNum = 1 params.pageNum = 1
params.pageSize = 999999 params.pageSize = 999999
this.$apis.seckillActivity.exportBrowseApi(params).then(res => { this.$apis.seckillActivity.exportBrowseApi(params, type).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleJump(path, row = {}) { handleJump (path, row = {}) {
this.$router.push({ this.$router.push({
path: '/seckillActivity/crowdFundList' path: '/seckillActivity/crowdFundList'
}) })
}, },
setTableFinishFun() { setTableFinishFun () {
//接收到的数据为空 //接收到的数据为空
this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun() this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun()
}, },
handleSearch() { handleSearch () {
this.$refs.browserRef.refreshTable() this.$refs.browserRef.refreshTable()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
activityId: this.routeInfo.id, activityId: this.routeInfo.id,
customerName: '', customerName: '',
...@@ -160,4 +311,18 @@ export default { ...@@ -160,4 +311,18 @@ export default {
} }
</script> </script>
<style scoped></style> <style scoped lang="scss">
.edit-container {
.table-title {
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 20px;
display: flex;
align-items: center;
span {
color: #5850ff;
}
}
}
</style>
...@@ -2,36 +2,103 @@ ...@@ -2,36 +2,103 @@
<template> <template>
<div class="marketing"> <div class="marketing">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="handleEdit('add')" fn="新增众筹" mode="el-button">新建众筹</GLButton> <GLButton
<el-button :size="size" type="default" class="default-blue-btn" @click="handleJump">订单管理</el-button> :size="size"
class="default-blue-btn el-icon-plus"
type="default"
@click="handleEdit('add')"
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton>
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
</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>
<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 :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button> <el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable
<div slot="activityImg" class="table-image" slot-scope="scope"> ref="activity"
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> :getListApi="getListApi"
<img class="table-popover-img" :src="scope.scope.activityImg" /> :noDataImg="url"
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" /> :searchForm="tableSearchForm"
: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 slot="viewAmount" slot-scope="scope"> <div
<p class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.viewAmount || 0 }}</p> slot="linkText"
slot-scope="scope"
>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{scope.scope[scope.prop] || 0}}</p>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> class="table-btns"
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>
...@@ -42,7 +109,7 @@ import url from '@/assets/empty.png' ...@@ -42,7 +109,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,
...@@ -69,7 +136,7 @@ export default { ...@@ -69,7 +136,7 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: '状态', label: '活动状态',
name: 'activityStatus', name: 'activityStatus',
type: 'select', type: 'select',
width: '215px', width: '215px',
...@@ -162,6 +229,36 @@ export default { ...@@ -162,6 +229,36 @@ export default {
listeners: { listeners: {
click: this.handleShare click: this.handleShare
} }
},
{
type: 'el-button',
name: '复制',
attrs: {
type: 'text'
},
listeners: {
click: row => {
this.handleEdit('copy', row)
}
}
},
{
type: 'GLButton',
name: '数据看板',
attrs: {
type: 'text',
fn: '数据看板'
},
listeners: {
click: row => {
this.$router.push({
path: '/seckillActivity/dataBoard',
query: {
activityId: row.id
}
})
}
}
} }
], ],
// 表格 // 表格
...@@ -183,7 +280,7 @@ export default { ...@@ -183,7 +280,7 @@ export default {
{ {
label: '浏览量(次)', label: '浏览量(次)',
prop: 'viewAmount', prop: 'viewAmount',
addHtml: 'viewAmount', addHtml: 'linkText',
width: 140 width: 140
}, },
{ {
...@@ -208,12 +305,14 @@ export default { ...@@ -208,12 +305,14 @@ export default {
} }
}, },
{ {
label: '粉丝', label: '访客',
prop: 'fansAmount' prop: 'fansAmount',
addHtml: 'linkText'
}, },
{ {
label: '分享', label: '分享',
prop: 'shareAmount' prop: 'shareAmount',
addHtml: 'linkText'
}, },
{ {
label: '销量', label: '销量',
...@@ -274,16 +373,16 @@ export default { ...@@ -274,16 +373,16 @@ export default {
shareDialog shareDialog
}, },
mounted() { mounted () {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
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
...@@ -291,13 +390,13 @@ export default { ...@@ -291,13 +390,13 @@ export default {
}) })
}, },
handleJump(path, row = {}) { handleJump (path, row = {}) {
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: '取消',
...@@ -320,16 +419,16 @@ export default { ...@@ -320,16 +419,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
...@@ -342,24 +441,29 @@ export default { ...@@ -342,24 +441,29 @@ 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 = {
add: '新建',
edit: '编辑',
copy: '复制'
}[addOrEdit]
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 'add' ? '新建众筹活动' : '编辑众筹活动') $title: encodeURI(txtObj + '众筹活动')
} }
if (addOrEdit != 'add') { if (addOrEdit != 'add') {
params.id = row.id params.id = row.id
...@@ -370,37 +474,56 @@ export default { ...@@ -370,37 +474,56 @@ export default {
query: params query: params
}) })
}, },
test (option) {
console.log(JSON.parse(JSON.stringify(option)))
},
// 明细 // 明细
handleDetail(row) { handleDetail ({ prop, scope }) {
let data = {
viewAmount: {
type: 1,
count: scope.viewAmount
},
fansAmount: {
type: 2,
count: scope.fansAmount
},
shareAmount: {
type: 3,
count: scope.shareAmount
}
}[prop]
this.$router.push({ this.$router.push({
path: '/seckillActivity/browseList', path: '/seckillActivity/browseList',
query: { query: {
id: row.id, id: scope.id,
activityName: row.activityName activityName: scope.activityName,
type: data.type,
count: data.count,
} }
}) })
}, },
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)
...@@ -426,11 +549,11 @@ export default { ...@@ -426,11 +549,11 @@ export default {
} }
}, },
handleSearch() { handleSearch () {
this.$refs.activity.refreshTable() this.$refs.activity.refreshTable()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
activityName: '', activityName: '',
activityStatus: '' activityStatus: ''
...@@ -438,7 +561,7 @@ export default { ...@@ -438,7 +561,7 @@ 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()
} }
......
<template>
<div class="marketing data-board">
<div class="data-board-box">
<p class="edit-title">数据看板</p>
<div class="p-20">
<GLCombiForm
ref="dataRef"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
></GLCombiForm>
<div class="data-view">
<template v-for="(item,index) in dataList">
<div
:key="index"
class="item"
>
<div class="name">
{{item.name}}
<el-popover
class="tips"
placement="top"
width="260"
trigger="hover"
:content="item.tips"
>
<img
slot="reference"
class="tips-icon"
src="@/components/glsx-combi-form/images/icon-tip.png"
/>
</el-popover>
</div>
<div class="value">{{dataBoard[item.key] || 0}}</div>
<template v-if="item.half">
<div class="half">
日环比:
<div :class="['icon',
{'up':dataBoard[item.half]>0},
{'down':dataBoard[item.half]<0}
]"></div>
<span class="num">{{Math.abs(dataBoard[item.half]).toFixed(2) || 0}}%</span>
</div>
</template>
</div>
</template>
</div>
</div>
</div>
<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>
<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"
>导出</el-button>
</div>
<GLTable
ref="dataTableRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:hasNum="false"
>
<div
slot="shareName"
class="flex-align"
slot-scope="scope"
>
<template v-if="scope.scope.shareAvatar">
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.shareAvatar"
/>
<img
class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar"
/>
</el-popover>
</template>
<span class="m-l-10">{{ scope.scope.shareName }}</span>
<span class="m-l-10">{{ scope.scope.sharePhone || '' }}</span>
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { exportFn } from '@/common/constant'
import url from '@/assets/empty.png'
const dataList = [
{ name: '新增浏览量', key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
], optionList = [
{ confId: '1', confName: '转发次数' },
{ confId: '2', confName: '访客总数' },
{ confId: '3', confName: '浏览总数' },
{ confId: '4', confName: '成交单量' },
{ confId: '5', confName: '转化率' }
]
export default {
name: 'ScrmMicroMarketingDataBoard',
data () {
return {
url,
dataList,
searchForm: {
statDate: dayjs().format('YYYY-MM-DD')
},
searchFormData: [
{
label: '统计日期',
name: 'statDate',
type: 'datePicker',
dateType: 'date',
pickerOptions: 'beforeRangePickerOptions'
}
],
searchRankForm: {
statDimension: '1'
},
searchFormRankData: [
{
label: '统计维度',
name: 'statDimension',
type: 'select',
width: '215px',
optionList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
}
],
getListApi: this.$apis.seckillActivity.getRankListApi,
tableSearchForm: {},
tableParams: {
listName: 'list',
tableColumns: [
{
label: '排名',
prop: 'rankNumber',
},
{
label: '员工',
prop: 'shareName',
addHtml: 'shareName',
width: 220
},
{
label: '转发次数',
prop: 'shareCount',
},
{
label: '访客总数',
prop: 'fansCount',
width: 140
},
{
label: '浏览总数',
prop: 'browseCount',
},
{
label: '成交单量',
prop: 'orderCount',
},
{
label: '转化率',
prop: 'conversionRate',
formatter: cellValue => {
return `${cellValue.conversionRate.toFixed(2)}%`
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
dataBoard: {}
}
},
created () {
this.getDataBoardApi()
},
mounted () {
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'
},
methods: {
getDataBoardApi () {
let { activityId } = this.$route.query,
{ statDate } = this.searchForm
this.$apis.seckillActivity.getDataBoardApi({ activityId, statDimension: dayjs(statDate).format('YYYY-MM-DD') }).then(res => {
this.dataBoard = res || {}
})
},
getParams () {
let { activityId } = this.$route.query,
params = JSON.parse(JSON.stringify(this.searchRankForm))
params.activityId = activityId
return params
},
handleSearch () {
this.getDataBoardApi()
},
handleSearchRank () {
this.$refs.dataTableRef.refreshTable()
},
handleExport () {
let params = this.getParams()
this.$apis.seckillActivity.exportRankListApi(params).then(res => {
exportFn(res)
})
},
beforeSearchFn () {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
setTableFinishFun () {
//接收到的数据为空
this.$refs.dataTableRef.data.length ? (this.$refs.dataTableRef.tableHeightValues = '') : this.$refs.dataTableRef.setTableHeightFun()
}
},
};
</script>
<style lang="scss" scoped>
.data-board {
&-box {
background: #ffffff;
&:last-of-type {
margin-top: 16px;
}
.data-view {
max-width: 854px;
display: flex;
flex-wrap: wrap;
gap: 16px;
padding-bottom: 12px;
.item {
width: 274px;
height: 128px;
background: #f9fafc;
border-radius: 4px;
box-sizing: border-box;
padding: 10px;
.name {
font-size: 14px;
color: #333333;
display: flex;
align-items: center;
height: 21px;
.tips {
margin-left: 4px;
}
}
.value {
padding: 20px 0;
font-size: 26px;
color: #333333;
line-height: 26px;
font-weight: bold;
}
.half {
font-size: 14px;
color: #666666;
line-height: 21px;
display: flex;
align-items: center;
.icon {
width: 16px;
height: 16px;
background-image: url(../../assets/dataBoard/icon-half-default.png);
background-size: 16px 16px;
}
.up {
background-image: url(../../assets/dataBoard/icon-half-up.png);
}
.down {
background-image: url(../../assets/dataBoard/icon-half-down.png);
}
.num {
margin-left: 4px;
}
}
}
}
}
}
</style>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker> <el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</template> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button> <el-button type="default" class="default-blue-btn el-icon-plus" v-if="!isDisabled" :disabled="apear == 'see'" @click="handleRelateProClose">选择商品</el-button>
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px"> <div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px">
<p> <p>
<img class="img-60" :src="selectedProInfo.goodsImage" /> <img class="img-60" :src="selectedProInfo.goodsImage" />
...@@ -371,6 +371,9 @@ export default { ...@@ -371,6 +371,9 @@ export default {
}, },
getGoodInfo(id) { getGoodInfo(id) {
if (!id) {
this.isDisabled = false
} else {
this.$apis.proManage.getProInfoApi({ id: id }).then(res => { this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
this.selectedProInfo = this.$common.utils.deepClone(res) this.selectedProInfo = this.$common.utils.deepClone(res)
if (this.selectedProInfo.specificationDetailList.length) { if (this.selectedProInfo.specificationDetailList.length) {
...@@ -383,6 +386,7 @@ export default { ...@@ -383,6 +386,7 @@ export default {
this.specificationDetailList = [] this.specificationDetailList = []
} }
}) })
}
}, },
// 规格值解构 // 规格值解构
......
<!-- 众筹活动 --> <!-- 众筹活动 -->
<template> <template>
<div v-loading="loading" class="edit-activity"> <div
v-loading="loading"
class="edit-activity"
>
<!-- 导航 --> <!-- 导航 -->
<el-tabs :tab-position="tabPosition" v-model="tabName" class="nav-tabs" @tab-click="whereToGo(tabName)"> <el-tabs
<el-tab-pane label="基本信息" name="basic"></el-tab-pane> :tab-position="tabPosition"
<el-tab-pane label="活动配置" name="config"></el-tab-pane> v-model="tabName"
class="nav-tabs"
@tab-click="whereToGo(tabName)"
>
<el-tab-pane
label="基本信息"
name="basic"
></el-tab-pane>
<el-tab-pane
label="活动配置"
name="config"
></el-tab-pane>
<el-tab-pane name="activityServices"> <el-tab-pane name="activityServices">
<span class="p-l-23" slot="label">服务说明</span> <span
class="p-l-23"
slot="label"
>服务说明</span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="activityCommoditys"> <el-tab-pane name="activityCommoditys">
<span class="p-l-23" slot="label">商品答疑</span> <span
class="p-l-23"
slot="label"
>商品答疑</span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="activityExperienceDTOs"> <el-tab-pane name="activityExperienceDTOs">
<span class="p-l-23" slot="label">玩家心得</span> <span
class="p-l-23"
slot="label"
>玩家心得</span>
</el-tab-pane>
<el-tab-pane name="live">
<span
class="p-l-23"
slot="label"
>直播配置</span>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="marketing edit-box"> <div class="marketing edit-box">
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="container edit-container" style="min-height: 520px !important;"> <div
<p class="edit-title" id="basic">基本信息</p> class="container edit-container"
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> style="min-height: 520px !important;"
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div> >
<template slot="activityTimeHtml" slot-scope="scope"> <p
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" 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> class="edit-title"
id="basic"
>基本信息</p>
<glsx-combi-form
class="edit-form-container"
ref="editFormRef"
:isEdit="true"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule"
>
<div
slot="activityImg"
class="edit-tips m-t-8"
>展示在首页的活动详情页</div>
<template
slot="activityTimeHtml"
slot-scope="scope"
>
<el-date-picker
v-model="editForm.activityTime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
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> </template>
<div slot="goodsHtml"> <div slot="goodsHtml">
<el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleRelateProClose">选择商品</el-button> <el-button
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px"> type="default"
class="el-icon-plus"
v-if="!isDisabled"
@click="handleRelateProClose"
>选择商品</el-button>
<div
v-if="selectedProInfo.id && !specificationDetailList.length"
style="margin-top: 10px"
>
<p> <p>
<img class="img-60" :src="selectedProInfo.goodsImage" /> <img
class="img-60"
:src="selectedProInfo.goodsImage"
/>
&nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件 &nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件
</p> </p>
<el-form-item label="设置秒杀价:" prop="activityPrice" id="activityPrice"> <el-form-item
<el-input v-model="editForm.activityPrice" style="width: 150px" :disabled="isDisabled"><span slot="append">元</span></el-input> label="设置秒杀价:"
prop="activityPrice"
id="activityPrice"
>
<el-input
v-model="editForm.activityPrice"
style="width: 150px"
:disabled="isDisabled"
><span slot="append">元</span></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动库存:" prop="goodsStock" id="goodsStock"> <el-form-item
<el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"><span slot="append">件</span></el-input> label="活动库存:"
prop="goodsStock"
id="goodsStock"
>
<el-input
v-model="editForm.goodsStock"
style="width: 150px"
:disabled="isDisabled"
><span slot="append">件</span></el-input>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<div slot="specificationsHtml" v-if="specificationDetailList.length" class="flex" style="min-width: 600px" id="specificationDetailList"> <div
slot="specificationsHtml"
v-if="specificationDetailList.length"
class="flex"
style="min-width: 600px"
id="specificationDetailList"
>
<div style="width: calc(100%)"> <div style="width: calc(100%)">
<table class="table-spesc" style="width: calc(100%)"> <table
class="table-spesc"
style="width: calc(100%)"
>
<tbody> <tbody>
<tr> <tr>
<td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td> <td
:style="{ width: specsWidth }"
v-for="(subItem, subIndex) in specificationDetailList"
:key="subIndex"
>{{ subItem.specificationName }}</td>
<td :style="{ width: specsWidth }">零售价(元)</td> <td :style="{ width: specsWidth }">零售价(元)</td>
<td :style="{ width: specsWidth }">库存</td> <td :style="{ width: specsWidth }">库存</td>
<td :style="{ width: specsWidth }">设置秒杀价</td> <td :style="{ width: specsWidth }">设置秒杀价</td>
...@@ -52,31 +152,73 @@ ...@@ -52,31 +152,73 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<table class="table-spesc" style="max-height: 400px"> <table
class="table-spesc"
style="max-height: 400px"
>
<tbody> <tbody>
<tr style="border-bottom: 1px solid rgb(235, 235, 235)" v-for="(item, index) in nameToValSpecsList" :key="index"> <tr
<td :style="{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">{{ n }}</td> style="border-bottom: 1px solid rgb(235, 235, 235)"
v-for="(item, index) in nameToValSpecsList"
:key="index"
>
<td
:style="{ width: specsWidth }"
v-for="(n, idx) in item.specsValueList"
:key="idx"
>{{ n }}</td>
<td :style="{ width: specsWidth }">{{ item.retailPrice }}元</td> <td :style="{ width: specsWidth }">{{ item.retailPrice }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td> <td :style="{ width: specsWidth }">{{ item.stock }}件</td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="秒杀价" style="width: 90%" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)"></el-input> <el-input
:disabled="isDisabled"
placeholder="秒杀价"
style="width: 90%"
v-model="item.activityPrice"
@input="item.activityPrice = activityPrice_input($event, item.retailPrice)"
></el-input>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="活动库存" style="width: 90%" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)"></el-input> <el-input
:disabled="isDisabled"
placeholder="活动库存"
style="width: 90%"
v-model="item.goodsStock"
@input="item.goodsStock = goodsStock_input($event, item.stock)"
></el-input>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<template slot="limitPurchaseFlag" slot-scope="scope"> <template
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleIsLimit"> slot="limitPurchaseFlag"
<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> slot-scope="scope"
>
<el-radio-group
v-model="editForm[scope.scope.name]"
@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>
</el-radio-group> </el-radio-group>
<p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;"> <p
v-if="editForm[scope.scope.name] == 2"
id="limitPurchaseNumber"
style="color: #333333;"
>
每人限购 每人限购
<el-form-item prop="limitPurchaseNumber"> <el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input> <el-input
v-model="editForm.limitPurchaseNumber"
placeholder="请输入限购次数"
:disabled="isDisabled"
></el-input>
</el-form-item> </el-form-item>
件 件
</p> </p>
...@@ -85,35 +227,105 @@ ...@@ -85,35 +227,105 @@
</div> </div>
<!-- 活动配置 --> <!-- 活动配置 -->
<div class="container edit-container crowd-config"> <div class="container edit-container crowd-config">
<p class="edit-title" id="config">活动配置</p> <p
<glsx-combi-form class="edit-form-container" ref="configEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="configEditFormData" :formRules="editRule"> class="edit-title"
<template slot="customerServiceFlag" slot-scope="scope"> id="config"
>活动配置</p>
<glsx-combi-form
class="edit-form-container"
ref="configEditFormRef"
:isEdit="true"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="configEditFormData"
:formRules="editRule"
>
<template
slot="customerServiceFlag"
slot-scope="scope"
>
<el-radio-group v-model="editForm[scope.scope.name]"> <el-radio-group v-model="editForm[scope.scope.name]">
<el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio> <el-radio
v-for="(item, index) in scope.scope.optionList"
:key="index"
:label="item[scope.scope.optionId]"
>{{ item[scope.scope.optionLabel] }}</el-radio>
</el-radio-group> </el-radio-group>
<div class="customer-service" v-if="editForm[scope.scope.name] == 2" id="customerServiceFlag"> <div
<glsx-combi-form class="edit-form-container" ref="customerEditFormRef" :isEdit="true" :isBlock="false" :formRef="editChildRef" :formObj="editForm" :formData="customerEditFormData" :formRules="editRule"></glsx-combi-form> class="customer-service"
v-if="editForm[scope.scope.name] == 2"
id="customerServiceFlag"
>
<glsx-combi-form
class="edit-form-container"
ref="customerEditFormRef"
:isEdit="true"
:isBlock="false"
:formRef="editChildRef"
:formObj="editForm"
:formData="customerEditFormData"
:formRules="editRule"
></glsx-combi-form>
</div> </div>
</template> </template>
<template slot="activityMusic" slot-scope="scope"> <template
slot="activityMusic"
slot-scope="scope"
>
<div class="flex"> <div class="flex">
<div class="music-box flex-center" v-for="(item, index) in musicList" :key="index" @click="handleMusicChange(index)"> <div
<div class="music-icon" @click.stop="handleMusic(item, index)"> class="music-box flex-center"
v-for="(item, index) in musicList"
:key="index"
@click="handleMusicChange(index)"
>
<div
class="music-icon"
@click.stop="handleMusic(item, index)"
>
<div :class="[index != playObj.idx ? 'icon-start' : 'icon-stop']"></div> <div :class="[index != playObj.idx ? 'icon-start' : 'icon-stop']"></div>
<img src="@/assets/seckillActivity/icon-music-default.png" /> <img src="@/assets/seckillActivity/icon-music-default.png" />
</div> </div>
<div class="music-name"> <div class="music-name">
<p class="ellipsis-1" style="max-width: 90%;">{{ item.name }}</p> <p
class="ellipsis-1"
style="max-width: 90%;"
>{{ item.name }}</p>
.mp3 .mp3
</div> </div>
<img v-show="item.isCheck" :class="{ 'icon-check': item.isCheck }" src="@/assets/seckillActivity/icon-check.png" /> <img
v-show="item.isCheck"
:class="{ 'icon-check': item.isCheck }"
src="@/assets/seckillActivity/icon-check.png"
/>
</div> </div>
</div> </div>
<el-upload class="m-t-10" action="" accept="audio/mp3, audio/m4a" :show-file-list="false" :http-request="handleMusicUpload" :before-upload="e => handleMusicBeforeUpload(e, scope.scope)" :file-list="fileList"> <el-upload
<el-button class="el-icon-plus" size="small" type="default">背景音乐</el-button> class="m-t-10"
action=""
accept="audio/mp3, audio/m4a"
:show-file-list="false"
:http-request="handleMusicUpload"
:before-upload="e => handleMusicBeforeUpload(e, scope.scope)"
:file-list="fileList"
>
<el-button
class="el-icon-plus"
size="small"
type="default"
>背景音乐</el-button>
</el-upload> </el-upload>
<audio v-if="playObj.src" style="display: none;" id="music-audio" controls> <audio
<source type="audio/mpeg" :src="playObj.src" /> v-if="playObj.src"
style="display: none;"
id="music-audio"
controls
>
<source
type="audio/mpeg"
:src="playObj.src"
/>
</audio> </audio>
<!-- <div v-if="editForm[scope.scope.name]" class="flex"> <!-- <div v-if="editForm[scope.scope.name]" class="flex">
<audio controls> <audio controls>
...@@ -123,123 +335,383 @@ ...@@ -123,123 +335,383 @@
</div> --> </div> -->
</template> </template>
<template slot="fictitious"> <template slot="fictitious">
<div class="fictitious" id="fictitious"> <div
<el-form-item label="参团:" prop="fictitiousGroupQuantity" labelWidth="60px"> class="fictitious"
<el-input v-model="editForm.fictitiousGroupQuantity" style="width: 90px" maxlength="50" placeholder="参团人数"></el-input> id="fictitious"
>
<el-form-item
label="参团:"
prop="fictitiousGroupQuantity"
labelWidth="60px"
>
<el-input
v-model="editForm.fictitiousGroupQuantity"
style="width: 90px"
maxlength="50"
placeholder="参团人数"
></el-input>
</el-form-item> </el-form-item>
<el-form-item id="fictitiousLadderQuantity" label="阶梯人数:" prop="fictitiousLadderQuantity" labelWidth="90px"> <el-form-item
<el-input v-model="editForm.fictitiousLadderQuantity" style="width: 90px" maxlength="50" placeholder="阶梯人数"></el-input> id="fictitiousLadderQuantity"
label="阶梯人数:"
prop="fictitiousLadderQuantity"
labelWidth="90px"
>
<el-input
v-model="editForm.fictitiousLadderQuantity"
style="width: 90px"
maxlength="50"
placeholder="阶梯人数"
></el-input>
</el-form-item> </el-form-item>
<el-form-item id="fictitiousViewQuantity" label="浏览:" prop="fictitiousViewQuantity" labelWidth="60px"> <el-form-item
<el-input v-model="editForm.fictitiousViewQuantity" style="width: 90px" maxlength="50" placeholder="浏览人数"></el-input> id="fictitiousViewQuantity"
label="浏览:"
prop="fictitiousViewQuantity"
labelWidth="60px"
>
<el-input
v-model="editForm.fictitiousViewQuantity"
style="width: 90px"
maxlength="50"
placeholder="浏览人数"
></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<div slot="activityBigImg" class="edit-tips m-t-8">建议尺寸750*1258</div> <div
<div slot="activityVideos" class="edit-tips m-t-8">最多上传6个视频</div> slot="activityBigImg"
<div slot="posterImg" class="edit-tips m-t-8">建议尺寸640*1008</div> class="edit-tips m-t-8"
<div class="form-describe-box" slot="formDescribe"> >建议尺寸750*1258</div>
<div
slot="activityVideos"
class="edit-tips m-t-8"
>最多上传6个视频</div>
<div
slot="posterImg"
class="edit-tips m-t-8"
>建议尺寸640*1008</div>
<div
class="form-describe-box"
slot="formDescribe"
>
<el-checkbox-group v-model="editForm.formDescribeCheck"> <el-checkbox-group v-model="editForm.formDescribeCheck">
<el-checkbox v-for="(item, index) in formDescribeCheckList" :label="item.value" :key="index">{{ item.label }}</el-checkbox> <el-checkbox
v-for="(item, index) in formDescribeCheckList"
:label="item.value"
:key="index"
>{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div v-for="(item, index) in formDescribeList" :key="index" class="form-describe flex-default"> <div
<el-input class="describe-input" v-model="item.value" placeholder="请输入" maxlength="20"></el-input> v-for="(item, index) in formDescribeList"
:key="index"
class="form-describe flex-default"
>
<el-input
class="describe-input"
v-model="item.value"
placeholder="请输入"
maxlength="20"
></el-input>
<p class="describe-delete"> <p class="describe-delete">
<img v-show="!(index == 0 && formDescribeList.length == 1)" @click="handleDescribeDelete(index)" src="@/assets/icon-delete.png" /> <img
v-show="!(index == 0 && formDescribeList.length == 1)"
@click="handleDescribeDelete(index)"
src="@/assets/icon-delete.png"
/>
</p> </p>
</div> </div>
<el-button class="btn-basic" v-show="formDescribeList.length < describeNum" :size="size" type="text" @click="handleDescribeAdd"> <el-button
<img class="icon-add" src="@/assets/seckillActivity/icon-add.png" /> class="btn-basic"
v-show="formDescribeList.length < describeNum"
:size="size"
type="text"
@click="handleDescribeAdd"
>
<img
class="icon-add"
src="@/assets/seckillActivity/icon-add.png"
/>
新增表单 新增表单
</el-button> </el-button>
</div> </div>
<div slot="showAvatarNicknameFlag">
<el-radio-group v-model="editForm.showAvatarNicknameFlag">
<el-radio :label="1">隐藏</el-radio>
<el-radio :label="2">显示</el-radio>
</el-radio-group>
</div>
<!-- 服务说明 --> <!-- 服务说明 -->
<div slot="activityServices" id="activityServices" class="flex-default"> <div
<span class="custom-label arrow" slot="label" @click="handleArrow('activityServices')" :style="{ width: defaultLabelWidth }"> slot="activityServices"
id="activityServices"
class="flex-default"
>
<span
class="custom-label arrow"
slot="label"
@click="handleArrow('activityServices')"
:style="{ width: defaultLabelWidth }"
>
<i :class="[arrowFlagObj.activityServices == 'open' ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></i> <i :class="[arrowFlagObj.activityServices == 'open' ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></i>
服务说明: 服务说明:
</span> </span>
<div class="form-show-box"> <div class="form-show-box">
<div :class="['btn-box', arrowFlagObj.activityServices == 'open' && editForm.activityServices.length ? 'line' : '']"> <div :class="['btn-box', arrowFlagObj.activityServices == 'open' && editForm.activityServices.length ? 'line' : '']">
<el-button :class="[editForm.activityServices.length < 9 ? 'btn-basic' : 'btn-disable']" :size="size" type="text" @click="handleAddItem('services', 'activityServices', 9)"> <el-button
<img class="icon-add" src="@/assets/seckillActivity/icon-add.png" /> :class="[editForm.activityServices.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size"
type="text"
@click="handleAddItem('services', 'activityServices', 9)"
>
<img
class="icon-add"
src="@/assets/seckillActivity/icon-add.png"
/>
新增一项 新增一项
</el-button> </el-button>
</div> </div>
<div :class="['form-show-block', arrowFlagObj.activityServices == 'close' ? 'form-close' : 'form-open']"> <div :class="['form-show-block', arrowFlagObj.activityServices == 'close' ? 'form-close' : 'form-open']">
<div v-for="(item, index) in editForm.activityServices" :key="index" :class="['form-show-item', editForm.activityServices.length > index + 1 ? 'line' : '']"> <div
<glsx-combi-form class="p-t-20" ref="serviceEditFormRef" :formRef="editChildRef" :isEdit="true" :isBlock="true" :formObj="item" :formData="serviceEditFormData" :formRules="serviceEditRule"></glsx-combi-form> v-for="(item, index) in editForm.activityServices"
<el-button :class="['btn-basic', 'btn-delete', index == editForm.activityServices.length - 1 ? 'last-btn-delete' : '']" :size="size" type="text" @click="handleDeleteItem('services', 'activityServices', index)"> :key="index"
<img class="icon-add" src="@/assets/icon-delete.png" /> :class="['form-show-item', editForm.activityServices.length > index + 1 ? 'line' : '']"
>
<glsx-combi-form
class="p-t-20"
ref="serviceEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="serviceEditFormData"
:formRules="serviceEditRule"
></glsx-combi-form>
<el-button
:class="['btn-basic', 'btn-delete', index == editForm.activityServices.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('services', 'activityServices', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button> </el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 商品答疑 --> <!-- 商品答疑 -->
<div slot="activityCommoditys" id="activityCommoditys" class="flex-default"> <div
<span class="custom-label arrow" slot="label" @click="handleArrow('activityCommoditys')" :style="{ width: defaultLabelWidth }"> slot="activityCommoditys"
id="activityCommoditys"
class="flex-default"
>
<span
class="custom-label arrow"
slot="label"
@click="handleArrow('activityCommoditys')"
:style="{ width: defaultLabelWidth }"
>
<i :class="[arrowFlagObj.activityCommoditys == 'open' ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></i> <i :class="[arrowFlagObj.activityCommoditys == 'open' ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></i>
商品答疑: 商品答疑:
</span> </span>
<div class="form-show-box"> <div class="form-show-box">
<div :class="['btn-box', arrowFlagObj.activityCommoditys == 'open' && editForm.activityCommoditys.length ? 'line' : '']"> <div :class="['btn-box', arrowFlagObj.activityCommoditys == 'open' && editForm.activityCommoditys.length ? 'line' : '']">
<el-button :class="[editForm.activityCommoditys.length < 9 ? 'btn-basic' : 'btn-disable']" :size="size" type="text" @click="handleAddItem('commoditys', 'activityCommoditys', 9)"> <el-button
<img class="icon-add" src="@/assets/seckillActivity/icon-add.png" /> :class="[editForm.activityCommoditys.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size"
type="text"
@click="handleAddItem('commoditys', 'activityCommoditys', 9)"
>
<img
class="icon-add"
src="@/assets/seckillActivity/icon-add.png"
/>
新增一项 新增一项
</el-button> </el-button>
</div> </div>
<div :class="['form-show-block', arrowFlagObj.activityCommoditys == 'close' ? 'form-close' : 'form-open']"> <div :class="['form-show-block', arrowFlagObj.activityCommoditys == 'close' ? 'form-close' : 'form-open']">
<div v-for="(item, index) in editForm.activityCommoditys" :key="index" :class="['form-show-item', editForm.activityCommoditys.length > index + 1 ? 'line' : '']"> <div
<glsx-combi-form class="p-t-20" ref="commoditysEditFormRef" :formRef="editChildRef" :isEdit="true" :isBlock="true" :formObj="item" :formData="commoditysEditFormData" :formRules="commoditysEditRule"></glsx-combi-form> v-for="(item, index) in editForm.activityCommoditys"
<el-button :class="['btn-basic', 'btn-delete', index == editForm.activityCommoditys.length - 1 ? 'last-btn-delete' : '']" :size="size" type="text" @click="handleDeleteItem('commoditys', 'activityCommoditys', index)"> :key="index"
<img class="icon-add" src="@/assets/icon-delete.png" /> :class="['form-show-item', editForm.activityCommoditys.length > index + 1 ? 'line' : '']"
>
<glsx-combi-form
class="p-t-20"
ref="commoditysEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="commoditysEditFormData"
:formRules="commoditysEditRule"
></glsx-combi-form>
<el-button
:class="['btn-basic', 'btn-delete', index == editForm.activityCommoditys.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('commoditys', 'activityCommoditys', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button> </el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 玩家心得 --> <!-- 玩家心得 -->
<div slot="activityExperienceDTOs" id="activityExperienceDTOs" class="flex-default"> <div
<span class="custom-label arrow" slot="label" @click="handleArrow('activityExperienceDTOs')" :style="{ width: defaultLabelWidth }"> slot="activityExperienceDTOs"
id="activityExperienceDTOs"
class="flex-default"
>
<span
class="custom-label arrow"
slot="label"
@click="handleArrow('activityExperienceDTOs')"
:style="{ width: defaultLabelWidth }"
>
<i :class="[arrowFlagObj.activityExperienceDTOs == 'open' ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></i> <i :class="[arrowFlagObj.activityExperienceDTOs == 'open' ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></i>
玩家心得: 玩家心得:
</span> </span>
<div class="form-show-box"> <div class="form-show-box">
<div :class="['btn-box', arrowFlagObj.activityExperienceDTOs == 'open' && editForm.activityExperienceDTOs.length ? 'line' : '']"> <div :class="['btn-box', arrowFlagObj.activityExperienceDTOs == 'open' && editForm.activityExperienceDTOs.length ? 'line' : '']">
<el-button :class="[editForm.activityExperienceDTOs.length < 9 ? 'btn-basic' : 'btn-disable']" :size="size" type="text" @click="handleAddItem('experiences', 'activityExperienceDTOs', 9)"> <el-button
<img class="icon-add" src="@/assets/seckillActivity/icon-add.png" /> :class="[editForm.activityExperienceDTOs.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size"
type="text"
@click="handleAddItem('experiences', 'activityExperienceDTOs', 9)"
>
<img
class="icon-add"
src="@/assets/seckillActivity/icon-add.png"
/>
新增一项 新增一项
</el-button> </el-button>
</div> </div>
<div :class="['form-show-block', arrowFlagObj.activityExperienceDTOs == 'close' ? 'form-close' : 'form-open']"> <div :class="['form-show-block', arrowFlagObj.activityExperienceDTOs == 'close' ? 'form-close' : 'form-open']">
<div v-for="(item, index) in editForm.activityExperienceDTOs" :key="index" :class="['form-show-item', editForm.activityExperienceDTOs.length > index + 1 ? 'line' : '']"> <div
v-for="(item, index) in editForm.activityExperienceDTOs"
:key="index"
:class="['form-show-item', editForm.activityExperienceDTOs.length > index + 1 ? 'line' : '']"
>
<div class="head-box"> <div class="head-box">
<img class="icon-head" src="@/assets/seckillActivity/icon-default-head.png" /> <img
class="icon-head"
src="@/assets/seckillActivity/icon-default-head.png"
/>
<span>虚拟人物{{ index + 1 }}</span> <span>虚拟人物{{ index + 1 }}</span>
</div> </div>
<glsx-combi-form class="p-t-20" :formRef="editChildRef" :isEdit="true" :isBlock="true" :formObj="item" :formData="experiencesEditFormData" :formRules="editRule"> <glsx-combi-form
<div slot="activityExperienceImgs" class="edit-tips m-t-8">建议尺寸:图片大小不超过5m,最多可添加9张图片</div> class="p-t-20"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="experiencesEditFormData"
:formRules="editRule"
>
<div
slot="activityExperienceImgs"
class="edit-tips m-t-8"
>建议尺寸:图片大小不超过5m,最多可添加9张图片</div>
</glsx-combi-form> </glsx-combi-form>
<el-button :class="['btn-basic', 'btn-delete', index == editForm.activityExperienceDTOs.length - 1 ? 'last-btn-delete' : '']" :size="size" type="text" @click="handleDeleteItem('experiences', 'activityExperienceDTOs', index)"> <el-button
<img class="icon-add" src="@/assets/icon-delete.png" /> :class="['btn-basic', 'btn-delete', index == editForm.activityExperienceDTOs.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('experiences', 'activityExperienceDTOs', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button> </el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 直播配置 -->
<div slot="live">
<el-switch v-model="editForm.liveFlag"></el-switch>
<div
class="customer-service"
v-if="editForm.liveFlag"
id="liveFlag"
>
<glsx-combi-form
class="edit-form-container"
ref="liveEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="false"
:formObj="editForm"
:formData="liveEditFormData"
:formRules="liveEditRule"
>
<div
slot="groupQrCode"
class="edit-tips m-t-8"
>建议尺寸:284*284</div>
<div
v-if="!editForm.floatingMaskDiagram"
slot="defaultImg"
class="default-live-img"
>
<img :src="defaultFloatingMaskDiagram" />
</div>
<div
slot="floatingMaskDiagram"
class="edit-tips m-t-8"
>建议格式:GIF,尺寸228*346</div>
</glsx-combi-form>
</div>
</div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<GLFooter> <GLFooter>
<el-button @click="handleCancel" size="medium">{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}</el-button> <el-button
<el-button @click="handleWechat" size="medium">预览</el-button> @click="handleCancel"
<el-button v-if="routeInfo.addOrEdit != 'detail'" type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button> size="medium"
>{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}</el-button>
<el-button
@click="handleWechat"
size="medium"
>预览</el-button>
<el-button
v-if="routeInfo.addOrEdit != 'detail'"
type="primary"
@click="handleConfirm"
size="medium"
:loading="loading"
>提交</el-button>
</GLFooter> </GLFooter>
<!-- 展示 --> <!-- 展示 -->
<GLDialog bigTitle="预览" mode="big" :visible.sync="wechatVisible" @onOk="handleWechat" @onCancel="handleWechat"> <GLDialog
<crowdEditWechat ref="crowdEditWechat" :editForm="editForm" :countDownObj="countDownObj"></crowdEditWechat> bigTitle="预览"
mode="big"
:visible.sync="wechatVisible"
@onOk="handleWechat"
@onCancel="handleWechat"
>
<crowdEditWechat
ref="crowdEditWechat"
:editForm="editForm"
:countDownObj="countDownObj"
></crowdEditWechat>
</GLDialog> </GLDialog>
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose(true)"></select-single-pro-dialog> <select-single-pro-dialog
v-if="isSingleSelectVisible"
:isSingleSelectVisible="isSingleSelectVisible"
:selectedProInfo="selectedProInfo"
@handleSingleSelectConfirm="handleSingleSelectConfirm"
@handleSingleSelectClose="handleSingleSelectClose(true)"
></select-single-pro-dialog>
</div> </div>
</div> </div>
</template> </template>
...@@ -252,7 +724,7 @@ export default { ...@@ -252,7 +724,7 @@ export default {
components: { components: {
crowdEditWechat crowdEditWechat
}, },
data() { data () {
var validatorPhone = function (rule, value, callback) { var validatorPhone = function (rule, value, callback) {
if (value && !/^(0|86|17951)?(13[0-9]|15[0123456789]|17[678]|18[0-9]|14[57])[0-9]{8}$/.test(value)) { if (value && !/^(0|86|17951)?(13[0-9]|15[0123456789]|17[678]|18[0-9]|14[57])[0-9]{8}$/.test(value)) {
callback(new Error('手机号格式错误')) callback(new Error('手机号格式错误'))
...@@ -273,7 +745,7 @@ export default { ...@@ -273,7 +745,7 @@ export default {
// }, // },
routeInfo: { routeInfo: {
// 1-新增;2-编辑;3-查看 // 1-新增;2-编辑;3-查看
// add-新增;edit-编辑;detail-详情 // add-新增;edit-编辑;detail-详情;copy-复制
addOrEdit: 'add', addOrEdit: 'add',
id: '', id: '',
activityStatus: '' activityStatus: ''
...@@ -341,13 +813,19 @@ export default { ...@@ -341,13 +813,19 @@ export default {
// 1-否,2-是 // 1-否,2-是
selectCarNumberFlag: 2, selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2, selectVehicleTypeFlag: 2,
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag'], selectPhoneNumberFlag: 2,
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'],
activityServices: [], activityServices: [],
activityCommoditys: [], activityCommoditys: [],
activityExperienceDTOs: [] activityExperienceDTOs: [],
// formDescribeFirst: '', // formDescribeFirst: '',
// formDescribeSecond: '', // formDescribeSecond: '',
// formDescribeThird: '' // formDescribeThird: '',
showAvatarNicknameFlag: 1,
liveFlag: false,
liveBroadcastRoomId: '',
groupQrCode: '',
floatingMaskDiagram: ''
}, },
//商品列表 //商品列表
tableParams: { tableParams: {
...@@ -429,6 +907,10 @@ export default { ...@@ -429,6 +907,10 @@ export default {
{ {
label: '品牌车型', label: '品牌车型',
value: 'selectVehicleTypeFlag' value: 'selectVehicleTypeFlag'
},
{
label: '手机号',
value: 'selectPhoneNumberFlag'
} }
], ],
describeNum: 2, describeNum: 2,
...@@ -805,7 +1287,8 @@ export default { ...@@ -805,7 +1287,8 @@ export default {
name: 'activityDetail', name: 'activityDetail',
tips: '展示活动的详细内容', tips: '展示活动的详细内容',
type: 'textBox', type: 'textBox',
excludeMenus: ['video', 'code'] excludeMenus: ['video', 'code'],
boxHeight: 240
}, },
{ {
label: '音乐文件', label: '音乐文件',
...@@ -862,6 +1345,11 @@ export default { ...@@ -862,6 +1345,11 @@ export default {
addHtml: 'formDescribe' addHtml: 'formDescribe'
}, },
{ {
label: '头像昵称',
name: 'showAvatarNicknameFlag',
addHtml: 'showAvatarNicknameFlag'
},
{
label: '', label: '',
name: 'activityServices', name: 'activityServices',
addHtml: 'activityServices', addHtml: 'activityServices',
...@@ -876,12 +1364,89 @@ export default { ...@@ -876,12 +1364,89 @@ export default {
label: '', label: '',
name: 'activityExperienceDTOs', name: 'activityExperienceDTOs',
addHtml: 'activityExperienceDTOs' addHtml: 'activityExperienceDTOs'
},
{
label: '直播配置',
name: 'live',
addHtml: 'live'
} }
] ],
//直播配置
liveEditFormData: [
{
label: '选择直播',
name: 'liveBroadcastRoomId',
type: 'select',
tips: '暂无直播,请到运营平台直播间管理创建新的直播',
maxlength: 30,
optionLabel: 'label',
optionId: 'value',
optionList: []
},
{
label: '加群二维码',
name: 'groupQrCode',
type: 'upload',
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
suffixSlot: 'groupQrCode',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.loading = true
this.$apis.common
.uploadImgApi({ file: base64, fileType: 'image' })
.then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
.finally(() => {
this.loading = false
})
}
},
{
label: '运营浮窗动图',
name: 'floatingMaskDiagram',
type: 'upload',
width: '320px',
limitSize: 5,
maxPhotoNum: 1,
supportGif: true,
prefixSlot: 'defaultImg',
suffixSlot: 'floatingMaskDiagram',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result,
target = file.type == 'image/gif' ? 'uploadVideoApi' : 'uploadImgApi'
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.loading = true
this.$apis.common[target]({ file: base64 })
.then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
.finally(() => {
this.loading = false
})
}
}
],
liveEditRule: {
liveBroadcastRoomId: [{ required: true, message: '请选择直播', trigger: 'change' }],
groupQrCode: [{ required: true, message: '请选择加群二维码', trigger: 'change' }],
floatingMaskDiagram: [{
required: true, validator: (rule, value, callback) => {
callback()
}
}]
},
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif'
} }
}, },
mounted() { mounted () {
this.getLiveList()
this.setMinHeight('.crowd-config') this.setMinHeight('.crowd-config')
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 'add' ? this.getInfo() : this.getMerchantInfo() this.routeInfo.addOrEdit != 'add' ? this.getInfo() : this.getMerchantInfo()
...@@ -905,42 +1470,45 @@ export default { ...@@ -905,42 +1470,45 @@ export default {
watch: { watch: {
editForm: { editForm: {
handler(val) { handler (val) {
this.editStatus = true this.editStatus = true
}, },
deep: true deep: true
}, },
'editForm.activityPrice'(newValue, oldValue) { 'editForm.activityPrice' (newValue, oldValue) {
this.editForm.activityPrice = limitPrice(newValue, oldValue, 5, 2, 0) this.editForm.activityPrice = limitPrice(newValue, oldValue, 5, 2, 0)
}, },
'editForm.goodsStock'(newValue, oldValue) { 'editForm.goodsStock' (newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 5, 0, 0) this.editForm.goodsStock = limitPrice(newValue, oldValue, 5, 0, 0)
}, },
'editForm.activityTime'(newValue) { 'editForm.activityTime' (newValue) {
newValue && newValue.length && this.countDown() newValue && newValue.length && this.countDown()
}, },
'editForm.predictVolume'(newValue, oldValue) { 'editForm.predictVolume' (newValue, oldValue) {
this.editForm.predictVolume = limitPrice(newValue, oldValue, 7, 2, 0, 1000000) this.editForm.predictVolume = limitPrice(newValue, oldValue, 7, 2, 0, 1000000)
}, },
'editForm.fictitiousGroupQuantity'(newValue, oldValue) { 'editForm.fictitiousGroupQuantity' (newValue, oldValue) {
this.editForm.fictitiousGroupQuantity = limitPrice(newValue, oldValue, 3, 0, 0, 100) this.editForm.fictitiousGroupQuantity = limitPrice(newValue, oldValue, 3, 0, 0, 100)
}, },
'editForm.fictitiousLadderQuantity'(newValue, oldValue) { 'editForm.fictitiousLadderQuantity' (newValue, oldValue) {
this.editForm.fictitiousLadderQuantity = limitPrice(newValue, oldValue, 7, 0, 0) this.editForm.fictitiousLadderQuantity = limitPrice(newValue, oldValue, 7, 0, 0)
}, },
'editForm.fictitiousViewQuantity'(newValue, oldValue) { 'editForm.fictitiousViewQuantity' (newValue, oldValue) {
this.editForm.fictitiousViewQuantity = limitPrice(newValue, oldValue, 7, 0, 0) this.editForm.fictitiousViewQuantity = limitPrice(newValue, oldValue, 7, 0, 0)
},
'editForm.liveBroadcastRoomId' (newValue, oldValue) {
this.editForm.liveFlag = newValue ? true : false
} }
}, },
methods: { methods: {
changeFormAttr(formName, attrName, labelList, attrValue) { changeFormAttr (formName, attrName, labelList, attrValue) {
labelList.forEach(item => { labelList.forEach(item => {
let idx = this[formName].findIndex(k => k.label == item) let idx = this[formName].findIndex(k => k.label == item)
this[formName][idx][attrName] = attrValue this[formName][idx][attrName] = attrValue
}) })
}, },
limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) { limitPriceForInput (val, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var _regRule = regRule || 'priceReg' var _regRule = regRule || 'priceReg'
if (val && this.reg[_regRule].test(val + '')) { if (val && this.reg[_regRule].test(val + '')) {
maxValue = typeof maxValue == 'string' ? parseFloat(maxValue) : maxValue maxValue = typeof maxValue == 'string' ? parseFloat(maxValue) : maxValue
...@@ -964,12 +1532,12 @@ export default { ...@@ -964,12 +1532,12 @@ export default {
} }
}, },
addZero(i) { addZero (i) {
return i < 10 ? `0${i}` : `${i}` return i < 10 ? `0${i}` : `${i}`
}, },
findCountDownTime() { findCountDownTime () {
let startTime = new Date(this.editForm.activityTime[0]) let startTime = new Date(this.editForm.activityTime[0])
let endTime = new Date(this.editForm.activityTime[1]) let endTime = new Date(this.editForm.activityTime[1])
let currentTime = new Date() let currentTime = new Date()
...@@ -982,7 +1550,7 @@ export default { ...@@ -982,7 +1550,7 @@ export default {
} }
}, },
countDown() { countDown () {
if (this.editForm.activityTime && this.editForm.activityTime.length) { if (this.editForm.activityTime && this.editForm.activityTime.length) {
let { activityStatus, startTime, endTime } = this.findCountDownTime() let { activityStatus, startTime, endTime } = this.findCountDownTime()
let lefttime = parseInt((endTime.getTime() - startTime.getTime()) / 1000) let lefttime = parseInt((endTime.getTime() - startTime.getTime()) / 1000)
...@@ -1021,25 +1589,25 @@ export default { ...@@ -1021,25 +1589,25 @@ export default {
} }
}, },
handleTimeChange(value, targetItem) { handleTimeChange (value, targetItem) {
!value && (this.editForm[targetItem.name] = []) !value && (this.editForm[targetItem.name] = [])
}, },
handleIsLimit(val) { handleIsLimit (val) {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1' this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1 this.editRule.limitPurchaseNumber[0].required = val != 1
}, },
handleRelateProChange(val) { handleRelateProChange (val) {
this.editRule.goodsId[0].required = val == 2 this.editRule.goodsId[0].required = val == 2
var idx = this.editFormData.findIndex(item => item.name == 'goodsId') var idx = this.editFormData.findIndex(item => item.name == 'goodsId')
this.editFormData[idx].isHide = val != 2 this.editFormData[idx].isHide = val != 2
}, },
handleRelateProClose(targetItem) { handleRelateProClose (targetItem) {
this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {} this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
this.handleSingleSelectClose() this.handleSingleSelectClose()
}, },
handleSingleSelectConfirm(selectedProInfo) { handleSingleSelectConfirm (selectedProInfo) {
this.editForm.activityPrice = '' this.editForm.activityPrice = ''
this.editForm.goodsStock = '' this.editForm.goodsStock = ''
this.handleSingleSelectClose() this.handleSingleSelectClose()
...@@ -1048,15 +1616,16 @@ export default { ...@@ -1048,15 +1616,16 @@ export default {
this.getGoodInfo(selectedProInfo.id) this.getGoodInfo(selectedProInfo.id)
} }
}, },
handleSingleSelectClose(isCancel = false) { handleSingleSelectClose (isCancel = false) {
if (isCancel) { if (isCancel) {
this.selectedProInfo.id && this.getGoodInfo(this.selectedProInfo.id) this.selectedProInfo.id && this.getGoodInfo(this.selectedProInfo.id)
} }
this.isSingleSelectVisible = !this.isSingleSelectVisible this.isSingleSelectVisible = !this.isSingleSelectVisible
}, },
getGoodInfo(id) { getGoodInfo (id) {
this.$apis.proManage.getProInfoApi({ id: id }).then(res => { if (!id) this.isDisabled = false
else this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
this.selectedProInfo = this.$common.utils.deepClone(res) this.selectedProInfo = this.$common.utils.deepClone(res)
if (this.selectedProInfo.specificationDetailList.length) { if (this.selectedProInfo.specificationDetailList.length) {
this.changeFormAttr('editFormData', 'isHide', ['规格明细'], false) this.changeFormAttr('editFormData', 'isHide', ['规格明细'], false)
...@@ -1068,10 +1637,11 @@ export default { ...@@ -1068,10 +1637,11 @@ export default {
this.specificationDetailList = [] this.specificationDetailList = []
} }
}) })
}, },
// 规格值解构 // 规格值解构
changeSpecs(isRecovery) { changeSpecs (isRecovery) {
this.specsWidth = 100 / (this.specificationDetailList.length + 4) + '%' this.specsWidth = 100 / (this.specificationDetailList.length + 4) + '%'
this.nameToValSpecsList = [] this.nameToValSpecsList = []
var markIdx = 0 var markIdx = 0
...@@ -1140,7 +1710,7 @@ export default { ...@@ -1140,7 +1710,7 @@ export default {
} }
// console.log(this.nameToValSpecsList) // console.log(this.nameToValSpecsList)
}, },
setLocaleCompare(params) { setLocaleCompare (params) {
let keys = [] let keys = []
let obj = [] let obj = []
Object.keys(params).forEach(item => { Object.keys(params).forEach(item => {
...@@ -1153,24 +1723,24 @@ export default { ...@@ -1153,24 +1723,24 @@ export default {
return obj.join('&').replace(/,/g, '-') return obj.join('&').replace(/,/g, '-')
}, },
// 恢复规格值 // 恢复规格值
recoverySpec() { recoverySpec () {
this.changeSpecs(true) this.changeSpecs(true)
}, },
//规格-秒杀价输入控制 //规格-秒杀价输入控制
activityPrice_input(val, maxValue) { activityPrice_input (val, maxValue) {
return this.limitPriceForInput(val, 5, 2, 0, maxValue) return this.limitPriceForInput(val, 5, 2, 0, maxValue)
}, },
//规格-活动库存输入控制 //规格-活动库存输入控制
goodsStock_input(val, maxValue) { goodsStock_input (val, maxValue) {
return this.limitPriceForInput(val, 5, 0, 0, maxValue) return this.limitPriceForInput(val, 5, 0, 0, maxValue)
}, },
// 音乐 // 音乐
handleMusicUpload() { }, handleMusicUpload () { },
musicUpload(e, targetItem) { musicUpload (e, targetItem) {
var reader = new FileReader() var reader = new FileReader()
var file = e var file = e
// 默认1MB // 默认1MB
...@@ -1209,7 +1779,7 @@ export default { ...@@ -1209,7 +1779,7 @@ export default {
}, },
// 音乐 // 音乐
handleMusic(targetItem, idx) { handleMusic (targetItem, idx) {
// stop-音频结束;play-音频播放 // stop-音频结束;play-音频播放
var playFlag = this.playObj.idx != -1 && this.playObj.idx == idx ? 'stop' : 'play' var playFlag = this.playObj.idx != -1 && this.playObj.idx == idx ? 'stop' : 'play'
var audioDom = document.getElementById('music-audio') var audioDom = document.getElementById('music-audio')
...@@ -1229,12 +1799,12 @@ export default { ...@@ -1229,12 +1799,12 @@ export default {
}) })
}, },
stopMusic() { stopMusic () {
this.playObj.idx = -1 this.playObj.idx = -1
this.playObj.src = '' this.playObj.src = ''
}, },
handleMusicChange(idx) { handleMusicChange (idx) {
this.musicList.forEach((item, index) => { this.musicList.forEach((item, index) => {
if (index != idx) { if (index != idx) {
item.isCheck = false item.isCheck = false
...@@ -1244,23 +1814,23 @@ export default { ...@@ -1244,23 +1814,23 @@ export default {
this.editForm.activityMusic = this.musicList[idx].isCheck ? this.musicList[idx].addr : '' this.editForm.activityMusic = this.musicList[idx].isCheck ? this.musicList[idx].addr : ''
}, },
handleMusicBeforeUpload(file, targetItem) { handleMusicBeforeUpload (file, targetItem) {
this.stopMusic() this.stopMusic()
this.musicUpload(file, targetItem) this.musicUpload(file, targetItem)
}, },
handleMusicDelete(targetItem) { handleMusicDelete (targetItem) {
this.$set(this.editForm, targetItem.name, '') this.$set(this.editForm, targetItem.name, '')
this.fileList = [] this.fileList = []
}, },
// 表单设置 // 表单设置
handleDescribeAdd() { handleDescribeAdd () {
this.formDescribeList.push({ this.formDescribeList.push({
value: '' value: ''
}) })
}, },
handleDescribeDelete(idx) { handleDescribeDelete (idx) {
this.$messageBox.confirm('是否删除该表单设置?', '删除', { this.$messageBox.confirm('是否删除该表单设置?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -1273,13 +1843,13 @@ export default { ...@@ -1273,13 +1843,13 @@ export default {
}) })
}, },
listAddIdx(list) { listAddIdx (list) {
list.forEach((item, index) => { list.forEach((item, index) => {
item.idx = index item.idx = index
}) })
}, },
dealItem(attr, formAttr) { dealItem (attr, formAttr) {
switch (attr) { switch (attr) {
case 'services': case 'services':
break break
...@@ -1292,7 +1862,7 @@ export default { ...@@ -1292,7 +1862,7 @@ export default {
}, },
// 服务说明,商品答疑,玩家心得 // 服务说明,商品答疑,玩家心得
handleAddItem(attr, formAttr, limitNum) { handleAddItem (attr, formAttr, limitNum) {
if (this.editForm[formAttr].length >= limitNum) { if (this.editForm[formAttr].length >= limitNum) {
return true return true
} }
...@@ -1301,7 +1871,7 @@ export default { ...@@ -1301,7 +1871,7 @@ export default {
this.dealItem(attr, formAttr) this.dealItem(attr, formAttr)
}, },
handleDeleteItem(attr, formAttr, idx) { handleDeleteItem (attr, formAttr, idx) {
this.$confirm('是否删除该项?', '删除', { this.$confirm('是否删除该项?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -1315,7 +1885,7 @@ export default { ...@@ -1315,7 +1885,7 @@ export default {
}) })
}, },
getMerchantInfo() { getMerchantInfo () {
this.loading = true this.loading = true
let merchantId = this.$globalState.session.merchantId let merchantId = this.$globalState.session.merchantId
this.$apis.common this.$apis.common
...@@ -1344,7 +1914,7 @@ export default { ...@@ -1344,7 +1914,7 @@ export default {
}) })
}, },
getInfo() { getInfo () {
this.loading = true this.loading = true
this.$apis.seckillActivity this.$apis.seckillActivity
.getActivityDetailApi({ id: this.routeInfo.id }) .getActivityDetailApi({ id: this.routeInfo.id })
...@@ -1353,7 +1923,7 @@ export default { ...@@ -1353,7 +1923,7 @@ export default {
this.editForm = this.$common.utils.deepClone(res) this.editForm = this.$common.utils.deepClone(res)
this.activityInfo = info this.activityInfo = info
this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime]) this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime])
this.getGoodInfo(info.goodsId) this.routeInfo.addOrEdit == 'edit' && this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) { if (info.activityPrice != null && info.goodsStock != null) {
this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2) this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
this.editForm.goodsStock = info.goodsStock + '' this.editForm.goodsStock = info.goodsStock + ''
...@@ -1395,7 +1965,8 @@ export default { ...@@ -1395,7 +1965,8 @@ export default {
this.editForm.formDescribeCheck = [] this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1 this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
this.editForm.selectVehicleTypeFlag = this.editForm.selectVehicleTypeFlag || 1 this.editForm.selectVehicleTypeFlag = this.editForm.selectVehicleTypeFlag || 1
var checkList = ['selectCarNumberFlag', 'selectVehicleTypeFlag'] this.editForm.selectPhoneNumberFlag = this.editForm.selectPhoneNumberFlag || 1
var checkList = ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag']
checkList.forEach(item => { checkList.forEach(item => {
if (this.editForm[item] == 2) { if (this.editForm[item] == 2) {
this.editForm.formDescribeCheck.push(item) this.editForm.formDescribeCheck.push(item)
...@@ -1420,6 +1991,11 @@ export default { ...@@ -1420,6 +1991,11 @@ export default {
item.activityExperienceImgs = item.activityExperienceImgs.map(item => item.imageUrl) item.activityExperienceImgs = item.activityExperienceImgs.map(item => item.imageUrl)
}) })
} }
// 复制
if (this.routeInfo.addOrEdit == 'copy') {
let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'goodsId' }, { name: 'activityPrice' }, { name: 'goodsStock' }]
this.copyReset(resetArr)
}
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
...@@ -1429,7 +2005,18 @@ export default { ...@@ -1429,7 +2005,18 @@ export default {
}) })
}, },
validateRules() { copyReset (arr) {
let val = {
array: [],
Object: {},
'': ''
}[arr.type || '']
arr.forEach(item => {
this.editForm[item.name] = val
})
},
validateRules () {
if (this.specificationDetailList.length) { if (this.specificationDetailList.length) {
this.editRule.activityPrice[0].required = false this.editRule.activityPrice[0].required = false
this.editRule.goodsStock[0].required = false this.editRule.goodsStock[0].required = false
...@@ -1439,12 +2026,12 @@ export default { ...@@ -1439,12 +2026,12 @@ export default {
} }
}, },
getCouponInfoParams() { getCouponInfoParams () {
var _this = this var _this = this
var param = this.$common.utils.deepClone(this.editForm) var param = this.$common.utils.deepClone(this.editForm)
param.marketingType = 3 param.marketingType = 3
param.activityPrice = (param.activityPrice * 100).toFixed(0) //存的分,需乘100 param.activityPrice = (param.activityPrice * 100).toFixed(0) //存的分,需乘100
if (this.routeInfo.id) { if (this.routeInfo.id && this.routeInfo.addOrEdit != 'copy') {
param.id = this.routeInfo.id param.id = this.routeInfo.id
} }
const d = param.activityTime const d = param.activityTime
...@@ -1484,29 +2071,38 @@ export default { ...@@ -1484,29 +2071,38 @@ export default {
// 1-否,2-是 // 1-否,2-是
param.selectCarNumberFlag = param.formDescribeCheck.findIndex(item => item == 'selectCarNumberFlag') != -1 ? 2 : 1 param.selectCarNumberFlag = param.formDescribeCheck.findIndex(item => item == 'selectCarNumberFlag') != -1 ? 2 : 1
param.selectVehicleTypeFlag = param.formDescribeCheck.findIndex(item => item == 'selectVehicleTypeFlag') != -1 ? 2 : 1 param.selectVehicleTypeFlag = param.formDescribeCheck.findIndex(item => item == 'selectVehicleTypeFlag') != -1 ? 2 : 1
param.selectPhoneNumberFlag = param.formDescribeCheck.findIndex(item => item == 'selectPhoneNumberFlag') != -1 ? 2 : 1
delete param.formDescribeCheck delete param.formDescribeCheck
Object.values(this.describeIdxToAttr).forEach((item, idx) => { Object.values(this.describeIdxToAttr).forEach((item, idx) => {
param['formDescribe' + item] = this.formDescribeList.length > idx ? this.formDescribeList[idx].value : '' param['formDescribe' + item] = this.formDescribeList.length > idx ? this.formDescribeList[idx].value : ''
}) })
//直播
if (param.liveFlag) {
if (!param.floatingMaskDiagram) param.floatingMaskDiagram = this.defaultFloatingMaskDiagram
} else {
param.liveBroadcastRoomId = ''
param.groupQrCode = ''
param.floatingMaskDiagram = ''
}
delete param.liveFlag
return param return param
}, },
// 服务说明 // 服务说明
handleArrow(attr) { handleArrow (attr) {
this.arrowFlagObj[attr] = this.arrowFlagObj[attr] == 'open' ? 'close' : 'open' this.arrowFlagObj[attr] = this.arrowFlagObj[attr] == 'open' ? 'close' : 'open'
}, },
handleWechat() { handleWechat () {
this.wechatVisible = !this.wechatVisible this.wechatVisible = !this.wechatVisible
}, },
// 跳转 // 跳转
whereToGo(id) { whereToGo (id) {
document.getElementById(id).scrollIntoView() document.getElementById(id).scrollIntoView()
}, },
checkValid(validList) { checkValid (validList) {
for (let i = 0; i < validList.length; i++) { for (let i = 0; i < validList.length; i++) {
let item = validList[i] let item = validList[i]
if (item.valid) { if (item.valid) {
...@@ -1517,10 +2113,9 @@ export default { ...@@ -1517,10 +2113,9 @@ export default {
return true return true
}, },
addOrUpdate() { addOrUpdate () {
this.loading = true this.loading = true
var params = this.getCouponInfoParams() var params = this.getCouponInfoParams()
this.$apis.seckillActivity this.$apis.seckillActivity
.addOrUpdateActivityApi(params) .addOrUpdateActivityApi(params)
.then(res => { .then(res => {
...@@ -1538,7 +2133,7 @@ export default { ...@@ -1538,7 +2133,7 @@ export default {
}, },
// 去掉list空值 // 去掉list空值
delListAllEmpty(listName, attrParamsList) { delListAllEmpty (listName, attrParamsList) {
if (!this.editForm[listName].length) { if (!this.editForm[listName].length) {
return this.editForm[listName] return this.editForm[listName]
} }
...@@ -1561,7 +2156,7 @@ export default { ...@@ -1561,7 +2156,7 @@ export default {
return list return list
}, },
handleConfirm() { handleConfirm () {
this.stopMusic() this.stopMusic()
this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content']) this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content'])
this.editForm.activityCommoditys = this.delListAllEmpty('activityCommoditys', ['question', 'answer']) this.editForm.activityCommoditys = this.delListAllEmpty('activityCommoditys', ['question', 'answer'])
...@@ -1622,6 +2217,14 @@ export default { ...@@ -1622,6 +2217,14 @@ export default {
}) })
}) })
} }
if (this.$refs.liveEditFormRef) {
this.$refs.liveEditFormRef.$refs[this.editChildRef].validate((liveValid, liveErrorObj) => {
if (!liveValid) {
validFlag = false
this.whereToGo('liveFlag')
}
})
}
if (this.$refs.commoditysEditFormRef) { if (this.$refs.commoditysEditFormRef) {
this.$refs.commoditysEditFormRef.forEach(item => { this.$refs.commoditysEditFormRef.forEach(item => {
item.$refs[this.editChildRef].validate((commoditysValid, commoditysErrorObj) => { item.$refs[this.editChildRef].validate((commoditysValid, commoditysErrorObj) => {
...@@ -1643,12 +2246,12 @@ export default { ...@@ -1643,12 +2246,12 @@ export default {
}) })
}) })
}, },
cancelJump() { cancelJump () {
this.$router.push({ this.$router.push({
path: '/seckillActivity/crowdFundList' path: '/seckillActivity/crowdFundList'
}) })
}, },
handleCancel() { handleCancel () {
if (this.editStatus) { if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -1662,7 +2265,23 @@ export default { ...@@ -1662,7 +2265,23 @@ export default {
} else { } else {
this.cancelJump() this.cancelJump()
} }
},
//获取跟进员工
getLiveList () {
this.$apis.seckillActivity.getLiveListApi({}).then(res => {
if (res.length == 0) return ''
const index = this.liveEditFormData.findIndex(item => {
return item.name == 'liveBroadcastRoomId'
})
const staff = res.map(item => {
return {
label: item.name + ' - ' + item.code,
value: item.id
} }
})
this.liveEditFormData.find(item => item.name == 'liveBroadcastRoomId').optionList = staff
})
},
} }
} }
</script> </script>
...@@ -1893,6 +2512,29 @@ export default { ...@@ -1893,6 +2512,29 @@ export default {
width: auto !important; width: auto !important;
} }
} }
.el-switch {
.el-switch__core {
width: 44px !important;
&::before {
content: '关';
right: 8px;
color: #999;
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
}
}
}
.el-switch.is-checked {
.el-switch__core {
&::before {
content: '开';
left: 8px;
color: #fff;
}
}
}
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
...@@ -1906,4 +2548,46 @@ export default { ...@@ -1906,4 +2548,46 @@ export default {
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
} }
.default-live-img {
width: 80px;
height: 80px;
border: 1px solid #e5e5e5;
display: inline-block;
border-radius: 4px;
cursor: pointer;
margin-right: 8px;
position: relative;
&::after {
position: absolute;
right: 0;
left: 0;
width: 59px;
height: 22px;
line-height: 22px;
text-align: center;
background: rgba(0, 0, 0, 0.5);
border-radius: 4px 0 4px 0;
font-size: 14px;
color: #ffffff;
content: '默认gif';
}
img {
width: 100%;
height: 100%;
vertical-align: top;
}
& ~ div {
position: absolute;
left: 88px;
top: 0;
.muti-imgs {
margin: 0;
}
}
& ~ .edit-tips {
display: block;
position: relative;
left: 0;
}
}
</style> </style>
...@@ -6,7 +6,7 @@ const resolve = dir => path.join(__dirname, dir) ...@@ -6,7 +6,7 @@ const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/' const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = { const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`], css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, `${CDN_DOMAIN}ajax/libs/moment/2.24.0/moment.js`] js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, `${CDN_DOMAIN}ajax/libs/moment/2.24.0/moment.js`, 'https://webapi.amap.com/loader.js']
} }
module.exports = { module.exports = {
outputDir: `../dist/${packageName}`, outputDir: `../dist/${packageName}`,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!