Commit ed5d49d7 by 前端

Merge branch 'xuyl_dev_v3.3.0' into 'master'

合并3.3.0代码到主干

See merge request !396
2 parents aec657b2 38cf76c6
......@@ -2083,17 +2083,6 @@
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
......@@ -2135,13 +2124,6 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
......@@ -2183,28 +2165,6 @@
"ansi-regex": "^5.0.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
},
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
......@@ -2556,6 +2516,11 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.8.6",
"resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.6.tgz",
"integrity": "sha512-uRjjusqpoqfmRkTaNuLJ2VohVr67Q5YwDATW3VU7PfzTj6IRaihGrYI7zckGZjxQPBIp63nfvJbM+Yu5ICh0Bg=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
......@@ -4417,6 +4382,14 @@
"resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cos-js-sdk-v5": {
"version": "1.4.14",
"resolved": "https://registry.npmmirror.com/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.14.tgz",
"integrity": "sha512-nw4kQijqyXSzRElL9HAKGWA96SQk6Sfx/SvJrGra2cXo2L4ipL3Y0wNnH+Wga1f7iigun85+nIk9BrL5+iBJOg==",
"requires": {
"@xmldom/xmldom": "^0.8.6"
}
},
"cosmiconfig": {
"version": "5.2.1",
"resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
......@@ -5897,8 +5870,7 @@
"eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
"dev": true
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"events": {
"version": "3.3.0",
......@@ -7935,6 +7907,11 @@
"integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==",
"dev": true
},
"js-sha1": {
"version": "0.6.0",
"resolved": "https://registry.npmmirror.com/js-sha1/-/js-sha1-0.6.0.tgz",
"integrity": "sha512-01gwBFreYydzmU9BmZxpVk6svJJHrVxEN3IOiGl6VO93bVKYETJ0sIth6DASI6mIFdt7NmfX9UiByRzsYHGU9w=="
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
......@@ -12701,6 +12678,18 @@
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
"dev": true
},
"vod-js-sdk-v6": {
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/vod-js-sdk-v6/-/vod-js-sdk-v6-1.5.0.tgz",
"integrity": "sha512-WkMtV9MDxO//6SDQgw+QsbO3dskJwE8nmch2Wn3e4Oub5/eav6DMedFAHRjar+tt9WDLveO0YLxa3yVBQ2DHbQ==",
"requires": {
"axios": "^0.21.1",
"cos-js-sdk-v5": "^1.3.7",
"eventemitter3": "^4.0.7",
"js-sha1": "^0.6.0",
"uuid": "^3.3.2"
}
},
"vue": {
"version": "2.6.14",
"resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
......@@ -12809,6 +12798,75 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.5.4",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
......
......@@ -16,6 +16,7 @@
"glsx-components": "^1.5.3",
"lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vod-js-sdk-v6": "^1.5.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuedraggable": "^2.24.3",
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-28 10:12:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-28 10:25:09
* @FilePath: \live\src\components\big-view\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="view-panel">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</div>
</template>
<script>
export default {
name: 'view',
data() {
return {
dialogVisibleImg: true
}
},
props: {
dialogType: String,
dialogSrc: String
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ message: { from: 11, message: '11111' } })
}
}
}
</script>
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-24 14:42:00
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-24 17:18:31
* @FilePath: \live\src\mixins\upload.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export default {
data() {
return {}
},
methods: {
getImgUrl(url, multiple = 3) {
return new Promise((resolve, reject) => {
var canvas = document.createElement('canvas') // 获取 canvas 对象
const ctx = canvas.getContext('2d') // 绘制2d
let video = document.getElementById('video')
video.src = url
video.crossOrigin = 'anonymous' // 解决跨域问题,也就是提示污染资源无法转换视频
video.currentTime = 1 // 第一帧
video.oncanplay = async () => {
canvas.width = video.clientWidth * multiple // 获取视频宽度
canvas.height = video.clientHeight * multiple // 获取视频高度
// 利用canvas对象方法绘图
ctx.drawImage(video, 0, 0, video.clientWidth * multiple, video.clientHeight * multiple)
console.log(canvas, 'canvas')
// 转换成base64形式
var oGrayImg = canvas.toDataURL('image/png') // 截取后的视频封面
const file = this.dataURLtoFile(oGrayImg)
const imgUrl = await this.uploadImg(file)
resolve(imgUrl)
}
})
},
//将base64转换为文件
dataURLtoFile(dataurl, filename = 'file.png') {
var arr = dataurl.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n)
while (n--) {
u8arr[n] = bstr.charCodeAt(n)
}
return new File([u8arr], filename, { type: mime })
},
// // 图片上传
uploadImg(fileInfo) {
return new Promise((resolve, reject) => {
var reader = new FileReader()
reader.readAsDataURL(fileInfo)
reader.onload = e => {
const imgFile = e.target.result
const base64 = fileInfo.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
resolve(res)
})
}
})
}
}
}
<template>
<div class="container marketing">
<el-form ref="materialAddForm" :model="materialAddForm" :label-width="defaultLabelWidth" :rules="materialAddFormRules">
<div class="container marketing" v-loading="loading">
<el-form ref="materialAddForm" :model="materialAddForm" :label-width="defaultLabelWidth"
:rules="materialAddFormRules">
<div class="creat-material">
<h4>{{ title }}</h4>
<el-divider></el-divider>
<div class="m-l-20">
<el-form-item v-if="routeInfo.addOrEdit == 1" label="选择素材组:" prop="groupId">
<el-form-item v-if="!notDisplayProperties" label="选择素材组:" prop="groupId">
<el-select v-model="materialAddForm.groupId" placeholder="全部" :size="size">
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item v-else label="选择素材组:" prop="selectMaterialGroupName">
<el-select v-model="materialAddForm.groupName" placeholder="全部" :size="size" disabled>
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName" :value="item.id"></el-option>
<el-option v-for="item in groupCounter" :key="item.id" :label="item.materialGroupName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="素材名称:" prop="materialName">
<el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称" maxlength="30"></el-input>
<el-input v-model="materialAddForm.materialName" :size="size" placeholder="请输入素材名称"
maxlength="30" :disabled="notDisplayProperties"></el-input>
</el-form-item>
<el-form-item label="素材类型:" prop="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">
<el-form-item label="素材类型:" prop="materialType" class="materialType">
<el-radio-group v-model="materialAddForm.materialType" @change="radioChange"
:disabled="routeInfo.addOrEdit != 1">
<el-radio :label="1">PDF文件</el-radio>
<!-- <el-radio :label="2">自定义链接</el-radio> -->
<el-radio :label="3">图文</el-radio>
......@@ -27,8 +32,11 @@
<!-- 选择PDF -->
<div v-show="materialAddForm.materialType == 1">
<div class="pdf-show">
<input type="file" style="opacity: 0" accept=".pdf" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)" />
<el-button icon="el-icon-plus" :size="size" :disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件</el-button>
<input type="file" style="opacity: 0" accept=".pdf"
:disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1" @change="e => handlePdfChange(e)"/>
<el-button icon="el-icon-plus" :size="size"
:disabled="routeInfo.addOrEdit == 2 && routeInfo.status != 1">选择文件
</el-button>
</div>
<!-- <div v-if="pdfUrl">{{ pdfUrl }}</div> -->
<ul v-if="pdfName || materialAddForm.materialUrl">
......@@ -49,6 +57,59 @@
<!-- 选择图文 -->
<div v-show="materialAddForm.materialType == 3">
<textBox @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
<el-form-item label="图片:" class="photoWrap">
<div class="img-div">
<div class="put-img" v-for="(item,index) in materialAddForm.imageUrlList" :key="item"
v-show="materialAddForm.imageUrlList[index]">
<img :src="item" alt=""/>
<div class="mask" v-if="item">
<h3>
<el-popover placement="top" trigger="click">
<div>
<img class="img-plus" :src="item" alt=""/>
</div>
<img slot="reference" src="@/assets/material/view.png" alt=""/>
</el-popover>
<img v-if="!notDisplayProperties" class="del-img" src="@/assets/material/dele.png" alt=""
@click="deleteImg('imageUrlList',item)"/>
</h3>
</div>
</div>
<div class="avatar-uploader-desc">
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div>
<input :class="{disableUpload:notDisplayProperties}"
:disabled="notDisplayProperties" type="file" style="opacity: 0" accept=".jpg, .jpeg, .png"
@change="e => handleImgChange(e,'imageUrlList')"/>
</div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div>
</el-form-item>
<el-form-item label="视频:" class="photoWrap">
<div class="img-div">
<div class="put-img" v-if="materialAddForm.videoUrl">
<video :src="materialAddForm.videoUrl" id="video" width="100%" height="100%" preload loop muted>
<!-- <source :src="materialAddForm.videoUrl" type="video/mp4"/>-->
</video>
<div class="mask">
<h3>
<img slot="reference" src="@/assets/material/view.png" alt="" @click="viewVideo"/>
<img v-if="!notDisplayProperties" class="del-img"
src="@/assets/material/dele.png" alt="" @click="deleteImg('videoUrl')"/>
</h3>
</div>
</div>
<div class="avatar-uploader-desc">
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传视频</div>
<input :class="{disableUpload:notDisplayProperties}"
:disabled="notDisplayProperties" type="file" style="opacity: 0"
accept="video/*"
@change="e =>handleVideoChange(e,'videoUrl')"/>
</div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div>
</el-form-item>
</div>
<div class="space"></div>
</el-form-item>
......@@ -62,35 +123,43 @@
<span slot="label">
<span class="label-word">
业务类型
<el-popover placement="top-start" width="200" trigger="hover" content="给素材添加业务类型,客户可根据业务类型筛选,也可在客户浏览了该素材时能及时提醒跟进员工,以提高客户成单率。">
<img slot="reference" src="@/assets/question.png" alt="" />
<el-popover placement="top-start" width="200" trigger="hover"
content="给素材添加业务类型,客户可根据业务类型筛选,也可在客户浏览了该素材时能及时提醒跟进员工,以提高客户成单率。">
<img slot="reference" src="@/assets/question.png" alt=""/>
</el-popover>
:
</span>
</span>
<el-checkbox-group v-model="materialAddForm.businessType">
<el-checkbox v-for="value in businessTypes" :key="value.businessName" :label="value.id">{{ value.businessName }}</el-checkbox>
<el-checkbox-group v-model="materialAddForm.businessType"
:disabled="notDisplayProperties">
<el-checkbox v-for="value in businessTypes" :key="value.businessName" :label="value.id">
{{ value.businessName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item prop="isNotifySender">
<span slot="label">
<span class="label-word">
动态通知
<el-popover placement="top-start" width="200" trigger="hover" content="有效浏览:指客户在页面的停留时间超过15秒并且有交互行为,非完全静止">
<img slot="reference" src="@/assets/question.png" alt="" />
<el-popover placement="top-start" width="200" trigger="hover"
content="有效浏览:指客户在页面的停留时间超过15秒并且有交互行为,非完全静止">
<img slot="reference" src="@/assets/question.png" alt=""/>
</el-popover>
:
</span>
</span>
<el-checkbox :value="materialAddForm.isNotifySender" :checked="checked" @change="notifyChange">客户打开素材链接时通知发送人</el-checkbox>
<el-checkbox :disabled="notDisplayProperties" :value="materialAddForm.isNotifySender" :checked="checked" @change="notifyChange">
客户打开素材链接时通知发送人
</el-checkbox>
<span class="track-tips track-info">(客户不包括本商户的员工)</span>
</el-form-item>
<el-form-item prop="tagJson">
<span slot="label">
<span class="label-word">
行为标签
<el-popover placement="top-start" width="200" trigger="hover" content="标签失效后在客户信息中看不到此标签,但是在素材效果统计的记录仍然存在">
<img slot="reference" src="@/assets/question.png" alt="" />
<el-popover placement="top-start" width="200" trigger="hover"
content="标签失效后在客户信息中看不到此标签,但是在素材效果统计的记录仍然存在">
<img slot="reference" src="@/assets/question.png" alt=""/>
</el-popover>
:
</span>
......@@ -101,10 +170,11 @@
<div class="tag-show">
<div v-show="tagging.length != 0" :key="key" class="input-tag-wrapper">
<span v-for="(tag, idx) in tagging" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag>
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable
:disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag>
</span>
</div>
<el-button :size="size" @click="openLabel">
<el-button :size="size" @click="openLabel" :disabled="notDisplayProperties">
<i class="el-icon-plus"></i>
选择标签
</el-button>
......@@ -134,31 +204,39 @@
<div class="share-desc" v-show="descVisible">
<div class="share-desc-left m-l-20">
<el-form-item label="分享标题:">
<el-input v-model="materialAddForm.materialTitle" :size="size" maxlength="30" show-word-limit placeholder="请输入自定义标题"></el-input>
<el-input v-model="materialAddForm.materialTitle" :size="size" maxlength="30" show-word-limit
placeholder="请输入自定义标题"
:disabled="notDisplayProperties"></el-input>
</el-form-item>
<el-form-item label="描述:">
<el-input type="textarea" v-model="materialAddForm.description" :size="size" maxlength="30" show-word-limit placeholder="请输入自定义描述"></el-input>
<el-input type="textarea" v-model="materialAddForm.description" :size="size" maxlength="30"
show-word-limit placeholder="请输入自定义描述"
:disabled="notDisplayProperties"></el-input>
</el-form-item>
<el-form-item label="封面:">
<div class="img-div">
<div class="put-img" v-show="materialAddForm.titleUrl">
<img :src="materialAddForm.titleUrl" alt="" />
<img :src="materialAddForm.titleUrl" alt=""/>
<div class="mask" v-if="materialAddForm.titleUrl">
<h3>
<el-popover placement="top" trigger="click">
<div>
<img class="img-plus" :src="materialAddForm.titleUrl" alt="" />
<img class="img-plus" :src="materialAddForm.titleUrl" alt=""/>
</div>
<img slot="reference" src="@/assets/material/view.png" alt="" />
<img slot="reference" src="@/assets/material/view.png" alt=""/>
</el-popover>
<img class="del-img" src="@/assets/material/dele.png" alt="" @click="deleteImg" />
<img v-if="!notDisplayProperties" class="del-img"
src="@/assets/material/dele.png" alt="" @click="deleteImg('titleUrl')"/>
</h3>
</div>
</div>
<div class="avatar-uploader-desc">
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div>
<input type="file" style="opacity: 0" accept=".jpg, .jpeg, .png" @change="e => handleImgChange(e)" />
<input type="file" style="opacity: 0" accept=".jpg, .jpeg, .png"
:class="{disableUpload:notDisplayProperties}"
:disabled="notDisplayProperties"
@change="e => handleImgChange(e,'titleUrl')"/>
</div>
<!-- <div @click="phoneVisible = !phoneVisible" class="view-phone">查看效果></div> -->
</div>
......@@ -166,14 +244,14 @@
</div>
<div class="share-desc-right">
<div class="share-desc-right-box">
<img class="share-desc-right-box-phone" src="@/assets/material/phone.png" alt="" />
<img class="share-desc-right-box-phone" src="@/assets/material/phone.png" alt=""/>
<div class="content-show">
<div>
<div class="content-title">{{ materialAddForm.materialTitle }}</div>
<div class="content-word">{{ materialAddForm.description }}</div>
</div>
<div class="content-show-img" v-show="materialAddForm.titleUrl">
<img :src="materialAddForm.titleUrl" alt="" />
<img :src="materialAddForm.titleUrl" alt=""/>
</div>
</div>
</div>
......@@ -186,20 +264,28 @@
<GLFooter class="gl-footer">
<el-button @click="onSave" v-if="this.routeInfo.addOrEdit == 1">存草稿</el-button>
<el-button @click="handleCancel" class="btn-cancle">取消</el-button>
<el-button @click="handleSubmit" type="primary">确定</el-button>
<el-button @click="handleSubmit" v-if="this.routeInfo.addOrEdit !== 3" type="primary">确定</el-button>
</GLFooter>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view>
</el-dialog>
</div>
</template>
<script>
import textBox from '@/views/material/components/textBox'
import SelectLabel from '@/views/material/components/selectLable'
import bigView from '@/components/big-view'
// import upload from '@/api/uploadApi'
import uploadMixin from '@/mixins/upload'
// import pdfReviewDia from './components/pdfReviewDia.vue'
export default {
name: 'addMaterialForm',
mixins: [uploadMixin],
components: {
textBox,
SelectLabel
SelectLabel,
bigView
// pdfReviewDia
},
data() {
......@@ -209,6 +295,11 @@ export default {
1: '创建营销素材',
2: '编辑营销素材'
},
notDisplayProperties:'',
loading: false,
dialogVisibleImg: false,
dialogSrc: '',
dialogType: '',
routeInfo: {},
dialogVisible: false,
tagging: [],
......@@ -228,7 +319,9 @@ export default {
tagJson: [], // 行为标签
materialTitle: '', // 分享标题
description: '', // 描述
titleUrl: '' // 封面
titleUrl: '',// 封面
imageUrlList: [],
videoUrl: ''
},
groupCounter: [],
// 分享设置显示
......@@ -237,18 +330,18 @@ export default {
// phoneVisible: false,
businessTypes: [],
materialAddFormRules: {
groupId: [{ required: true, message: '请选择素材组', trigger: 'change' }],
groupId: [{required: true, message: '请选择素材组', trigger: 'change'}],
materialName: [
{ required: true, message: '请输入素材名称', trigger: 'change' },
{ max: 30, message: '素材名称长度不能超过30', trigger: 'blur' }
{required: true, message: '请输入素材名称', trigger: 'change'},
{max: 30, message: '素材名称长度不能超过30', trigger: 'blur'}
],
materialType: [{ required: true, message: '请选择素材类型', trigger: 'change' }],
businessType: [{ required: true, message: '请选择业务类型', trigger: 'change' }]
materialType: [{required: true, message: '请选择素材类型', trigger: 'change'}],
businessType: [{required: true, message: '请选择业务类型', trigger: 'change'}]
},
linkRules: {
link: [
{ required: true, message: '请输入链接地址', trigger: 'change' },
{ max: 150, message: '链接地址长度不能超过30', trigger: 'blur' }
{required: true, message: '请输入链接地址', trigger: 'change'},
{max: 150, message: '链接地址长度不能超过30', trigger: 'blur'}
]
}
}
......@@ -256,16 +349,46 @@ export default {
mounted() {
this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 1 ? this.getMaterialInfo() : ''
this.routeInfo.addOrEdit != 1 ? (this.routeInfo.status != 1 ? this.forbidEdit() : '') : ''
this.routeInfo.addOrEdit == 3 ? this.forbidEdit() : ''
this.title = this.titleObj[this.routeInfo.addOrEdit]
// this.notDisplayProperties = this.routeInfo.addOrEdit == 3 && this.routeInfo.status != 1
this.notDisplayProperties = this.routeInfo.addOrEdit == 3
console.log(this.routeInfo.status)
console.log(this.routeInfo.addOrEdit)
console.log(this.notDisplayProperties)
this.materialInsert()
this.getMaterialList()
// this.findAllDictData('business_type')
this.getListEntBusinessType()
},
methods: {
viewVideo() {
this.dialogVisibleImg = true
this.dialogSrc = this.materialAddForm.videoUrl
},
handleVideoChange(e) {
let file = e.srcElement.files[0]
let reader = new FileReader()
// // 默认1MB
const limitSize = 20
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadVideoApi({file: base64}).then(res => {
if (res) {
this.materialAddForm.videoUrl = res
}
})
}
},
getParams() {
var params = JSON.parse(JSON.stringify(this.materialAddForm))
let params = JSON.parse(JSON.stringify(this.materialAddForm))
let tagging = this.tagging.map(item => {
let tagIds = item.labelList.map(tag => {
return tag.id
......@@ -306,6 +429,8 @@ export default {
if (videoHtml && videoHtml.length && !imgHtml && !html.length) params.materialType = 4
if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6
if (this.materialAddForm.vedioUrl && !this.materialAddForm.imageUrlList.length) params.materialType = 4
if (this.materialAddForm.imageUrlList.length) params.materialType = 3
this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent
}
......@@ -313,14 +438,15 @@ export default {
},
// 获取素材详情
getMaterialInfo() {
var params = {}
let params = {}
params.id = this.routeInfo.id
if (this.routeInfo.status == -1) {
params.flag = 0
}
params.flag = 0
// if (this.routeInfo.status == -1) {
// params.flag = 0
// }
this.$apis.material.materialDetail(params).then(res => {
this.materialAddForm = res
if (res.businessType) {
if (res && res.businessType) {
const businessTypeArr = this.materialAddForm.businessType.split(',')
this.materialAddForm.businessType = businessTypeArr.map(item => parseInt(item))
} else {
......@@ -422,7 +548,7 @@ export default {
const imgFile = e.target.result
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.slice(-3) + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
this.$apis.common.pictureUpload({file: base64}).then(res => {
if (res) {
this.pdfUrl = res
this.pdfName = file.name
......@@ -436,7 +562,7 @@ export default {
}
},
// 上传图片
handleImgChange(e) {
handleImgChange(e, params) {
var file = e.srcElement.files[0]
var reader = new FileReader()
// 默认1MB
......@@ -450,10 +576,23 @@ export default {
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
this.$apis.common.pictureUpload({file: base64}).then(res => {
if (res) {
// console.log(res)
this.materialAddForm.titleUrl = res
if (Array.isArray(this.materialAddForm[params]) || this.materialAddForm[params] == null) {
if (this.materialAddForm[params] && this.materialAddForm[params].length > 8) {
this.$message.error('图片最多可上传9张')
return
} else {
if (!this.materialAddForm[params]) {
this.materialAddForm[params] = []
this.materialAddForm[params][0] = res
} else {
this.materialAddForm[params].push(res)
}
}
} else {
this.materialAddForm[params] = res
}
}
})
}
......@@ -508,6 +647,7 @@ export default {
}
// status 状态 0 启用 -1 禁用 1 存草稿
params.status = 0
params.createdType = 2
let material
if (params.id) {
material = 'materialEdit'
......@@ -590,8 +730,12 @@ export default {
this.isUpdate = true
},
// 删除上传图片
deleteImg() {
this.materialAddForm.titleUrl = ''
deleteImg(params, content) {
if (Array.isArray(this.materialAddForm[params])) {
this.materialAddForm[params] = this.materialAddForm[params].filter((item) => item !== content);
} else {
this.materialAddForm[params] = ''
}
},
// 删除pdf
delPdf() {
......@@ -607,6 +751,16 @@ export default {
</script>
<style lang="scss" scoped>
.materialType{
/deep/.el-form-item__content{
max-width: 85%;
}
}
.disableUpload {
cursor: not-allowed;
cursor: no-drop;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
......@@ -621,18 +775,21 @@ export default {
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
margin-bottom: 5px;
}
.tag-input {
background: transparent;
border: none !important;
......@@ -642,6 +799,7 @@ export default {
padding-left: 0;
width: 100px;
}
.creat-material,
.track,
.share,
......@@ -652,6 +810,81 @@ export default {
.creat-material,
.track {
margin-bottom: -10px;
.dis-in-block {
margin-left: -154px;
.activity-img {
width: 104px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
cursor: pointer;
position: relative;
input {
cursor: pointer;
font-size: 0;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
.add-border {
text-align: center;
color: rgba(0, 0, 0, 0.45);
.add-icon {
margin-top: 20px;
height: 20px;
font-size: 17px;
}
.add-text {
height: 30px;
font-size: 12px;
}
}
}
.img-btns,
img {
width: 100%;
height: 100%;
}
.video-panel {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
video {
position: absolute;
object-fit: fill;
}
.el-icon-video-play {
z-index: 10;
font-size: 20px;
color: #fff;
cursor: pointer;
}
.el-icon-close {
position: absolute;
top: 0px;
right: 0px;
background: #000000;
color: #fff;
}
}
}
}
.container {
......@@ -661,12 +894,19 @@ export default {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
margin: 17px 0 17px 20px;
&:first-child {
padding-top: 17px;
margin-top: 0;
}
}
}
.photoWrap {
margin-top: 20px;
margin-left: -154px;
}
.space {
margin-bottom: 32px;
}
......@@ -676,9 +916,11 @@ export default {
font-size: 14px;
color: #999999;
}
&-info {
margin-left: 8px;
}
&-behavior {
color: #606266;
}
......@@ -686,9 +928,11 @@ export default {
.share {
margin-bottom: 20px;
&-container {
display: flex;
justify-content: space-between;
.share-unfold {
span {
font-size: 12px;
......@@ -697,6 +941,7 @@ export default {
}
}
}
&-tips {
color: #999999;
font-size: 14px;
......@@ -707,10 +952,12 @@ export default {
.material-bottom {
height: 78px;
position: relative;
.el-form-item {
position: absolute;
top: 25%;
left: 40%;
.el-form-item__content {
margin-left: 0;
}
......@@ -722,31 +969,37 @@ export default {
.el-select--small {
width: 432px;
}
.btn-cancle {
border-color: #5850ff;
color: #5850ff;
}
.put-img,
.avatar-uploader-desc,
.view-phone {
float: left;
margin-right: 8px;
.task {
width: 104px;
height: 104px;
border-radius: 10px;
}
}
.put-img {
width: 104px;
height: 104px;
border-radius: 10px;
display: inline-block;
position: relative;
img {
width: 104px;
height: 104px;
}
.mask {
position: absolute;
background: rgba(101, 101, 101, 0.6);
......@@ -757,34 +1010,42 @@ export default {
width: 100%;
height: 100%;
border-radius: 10px;
h3 {
text-align: center;
margin-top: 40%;
img {
width: 16px;
height: 16px;
}
.del-img {
padding-left: 12px;
}
}
}
}
.tag-show {
margin-right: 8px;
margin-top: 20px;
.el-button {
display: inline-flex;
color: #5850ff;
}
}
.put-img:hover .mask {
opacity: 1;
}
.pdf-show {
display: inline-flex;
position: relative;
height: 32px;
input {
position: absolute;
top: 0;
......@@ -793,12 +1054,14 @@ export default {
height: 100%;
}
}
.avatar-uploader-desc {
width: 104px;
height: 104px;
border-radius: 4px;
border: 1px dashed rgba(0, 0, 0, 0.15);
position: relative;
&-icon {
width: 16px;
height: 16px;
......@@ -806,12 +1069,14 @@ export default {
top: 28px;
left: 44px;
}
&-word {
position: absolute;
top: 58px;
left: 24px;
color: #666666;
}
input {
position: absolute;
top: 0;
......@@ -820,28 +1085,34 @@ export default {
height: 100%;
}
}
.view-phone {
margin-top: 85px;
color: #5850ff;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
.share-desc {
padding-bottom: 30px;
display: flex;
justify-content: space-between;
&-right-box {
margin-right: 50px;
width: 290px;
height: 566px;
position: relative;
&-phone {
width: 290px;
height: 566px;
}
.content-show {
background-color: #fff;
width: 160px;
......@@ -853,14 +1124,17 @@ export default {
left: 71px;
display: flex;
justify-content: space-between;
&-img {
width: 30px;
height: 30px;
img {
width: 30px;
height: 30px;
}
}
.content-title {
color: #333333;
max-width: 100px;
......@@ -870,6 +1144,7 @@ export default {
font-size: 13px;
margin-bottom: 4px;
}
.content-word {
color: #999999;
line-height: 14px;
......@@ -885,49 +1160,63 @@ export default {
}
}
}
.img-plus {
width: 200px;
height: 200px;
}
.gl-footer {
z-index: 999;
}
.form-item-container {
margin-top: 32px !important;
}
.el-form-item {
margin-bottom: 20px !important;
}
/deep/ .el-form-item__label {
line-height: 25px;
}
/deep/ .el-form-item__content {
line-height: 25px;
}
.label-word {
display: inline-block;
img {
vertical-align: middle;
}
}
ul {
margin-top: 5px;
.pdf-show {
// width: 200px;
list-style: none;
align-items: center;
position: relative;
padding: 0 8px;
.pdf-name {
margin-right: 20px;
&:hover {
color: #5850ff;
}
}
&:hover {
cursor: pointer;
background-color: rgba(88, 80, 255, 0.2) !important;
}
i {
position: absolute;
right: 5px;
......@@ -935,4 +1224,40 @@ ul {
}
}
}
.video-dsialog {
z-index: 2001;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
background: rgba($color: #000000, $alpha: 0.5);
&-panel {
background: #000000;
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
height: calc(100% - 200px);
width: auto;
box-sizing: border-box;
padding: 10px 20px 20px;
overflow: hidden;
.video-close {
display: flex;
justify-content: flex-end;
height: 40px;
i {
cursor: pointer;
font-size: 25px;
color: #5850ff;
}
}
}
}
</style>
......@@ -3,7 +3,7 @@
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">素材组</el-button>
<div class="all-group">
<div @click="getList">
<img src="@/assets/material/groupIcon.png" alt="" />
<img src="@/assets/material/groupIcon.png" alt=""/>
全部素材组 ({{ groupCounter.length }})
</div>
<div @click="groupVisible = !groupVisible">
......@@ -12,9 +12,10 @@
</div>
</div>
<ul v-show="groupVisible" :style="{ height: groupHeight - 110 + 'px' }">
<li class="group-list" v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''" :key="index" @click="handleGroup(item, index)">
<li class="group-list" v-for="(item, index) in groupCounter" :class="index === currentIndex ? 'active' : ''"
:key="index" @click="handleGroup(item, index)">
<div>
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle;height:24px;width:24px" />
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle;height:24px;width:24px"/>
<div class="group-name">{{ item.materialGroupName }}</div>
</div>
<div>
......@@ -23,12 +24,17 @@
<!-- <GLButton class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</GLButton>
<GLButton class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</GLButton> -->
<el-button class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</el-button>
<el-button class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改</el-button>
<el-button class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1" @click="handleDeleteGroup(item.id)">删除</el-button>
<el-button class="group-btn" :size="size" type="text" fn="置顶" @click="handleStick(item)">
{{ item.orderTime ? '取消置顶' : '置顶' }}
</el-button>
<el-button class="group-btn" :size="size" type="text" fn="修改" @click="handleAddGroup(2, item)">修改
</el-button>
<el-button class="group-btn" :size="size" type="text" fn="删除" v-if="item.isDefault == -1"
@click="handleDeleteGroup(item.id)">删除
</el-button>
</div>
<div slot="reference">
<img class="more-icon" src="@/assets/material/more.png" alt="" />
<img class="more-icon" src="@/assets/material/more.png" alt=""/>
</div>
</el-popover>
</div>
......@@ -39,9 +45,10 @@
<script>
import * as dayjs from 'dayjs'
export default {
name: 'materialGroup',
props: { eventBus: Object, groupHeight: Number },
props: {eventBus: Object, groupHeight: Number},
data() {
return {
// 素材组数量
......@@ -102,6 +109,7 @@ export default {
params.groupId = item.id
params.pageNum = 1
params.pageSize = 1000
params.createdType = 2
this.$emit('getList', params, item)
},
// 打开1-新增, 2-编辑 素材组弹框
......@@ -133,7 +141,7 @@ export default {
cancelButtonText: '否',
type: 'warning'
}).then(() => {
this.$apis.material.deleteMaterialList({ id: rowId }).then(res => {
this.$apis.material.deleteMaterialList({id: rowId}).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
......@@ -181,13 +189,16 @@ export default {
.status-words {
margin-left: 5px;
}
.material-group {
/deep/.el-popover {
/deep/ .el-popover {
min-width: 50px;
&:hover {
cursor: pointer;
}
}
.all-group {
font-size: 16px;
height: 44px;
......@@ -196,17 +207,21 @@ export default {
display: flex;
justify-content: space-between;
cursor: pointer;
img {
width: 24px;
height: 24px;
vertical-align: middle;
}
i {
color: #999999;
}
}
ul {
overflow: auto;
.group-list {
cursor: pointer;
text-align: left;
......@@ -214,38 +229,46 @@ export default {
margin: 0 10px;
display: flex;
justify-content: space-between;
&.active {
background-color: #ebeaff;
}
.more-icon {
vertical-align: middle;
padding-top: 3px;
}
&:hover {
background-color: #ebeaff;
}
}
}
}
.add_btn {
color: #5850ff;
border-color: #5850ff;
margin: 20px 0 12px 16px;
}
.group-name {
display: inline-flex;
margin-left: 8px;
}
.group-btn {
color: #333333;
display: block;
padding: 8px 0px;
text-align: left;
width: 100%;
&:hover {
background-color: #ebeaff;
}
}
.el-button + .el-button {
margin-left: 0;
}
......
......@@ -18,7 +18,7 @@ export default {
props: {
excludeMenus: {
type: Array,
default: () => ['code']
default: () => ['code','video']
},
boxHeight:{
type: Number,
......
......@@ -5,7 +5,9 @@
<i class="el-icon-plus"></i>
创建营销素材
</el-button> -->
<GLButton :size="size" type="primary" fn="新增营销素材" class="el-icon-plus" @click="addMaterial(1)">创建营销素材</GLButton>
<GLButton :size="size" type="primary" fn="新增营销素材" class="el-icon-plus" @click="addMaterial(1)">
创建营销素材
</GLButton>
</div>
<span @click="showIntroductionDialog" class="introduc-word">
功能介绍
......@@ -13,58 +15,64 @@
</span>
<div class="container">
<div class="search-form">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData"
@handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="tabelList">
<el-row>
<el-col :span="5">
<div class="left">
<MaterialGroup ref="materialGroup" @openAddDialog="addDialogShow" :groupHeight="boxHeight" :eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
<MaterialGroup ref="materialGroup" @openAddDialog="addDialogShow" :groupHeight="boxHeight"
:eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
</div>
</el-col>
<el-col :span="19">
<div class="right" :style="{ height: boxHeight + 'px' }">
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div>
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout"
:searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData"
:pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true"
:customHeadShowList="customHeadShowList">
<!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<div slot="materialContentRpcResponse" slot-scope="scope">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
<!-- 素材为PDF -->
<span v-if="scope.scope.materialType == 1" class="material-content">
<img src="@/assets/material/pdf.png" style="margin-right:8px" alt="" />
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 12">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
</span>
<!-- <span v-if="scope.scope.materialType == 1" class="material-content">-->
<!-- <img src="@/assets/material/pdf.png" style="margin-right:8px" alt="" />-->
<!-- <el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 12">-->
<!-- <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>-->
<!-- </el-tooltip>-->
<!-- </span>-->
<!-- 素材为自定义链接 -->
<span v-if="scope.scope.materialType == 2"></span>
<!-- <span v-if="scope.scope.materialType == 2"></span>-->
<!-- 素材为图文 -->
<span v-if="scope.scope.materialType == 3 || scope.scope.materialType == 4 || scope.scope.materialType == 5 || scope.scope.materialType == 6" class="material-content">
<!-- 图片 -->
<el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">
<div>
<img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />
</div>
<div slot="reference" class="urlContent">
<img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />
<div class="videoMask" v-if="scope.scope.imgCount > 1">
<img src="@/assets/material/multi.png" alt="" />
<span>{{ scope.scope.imgCount }}</span>
</div>
</div>
</el-popover>
<!-- 视频 -->
<div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">
<video preload loop muted width="36" height="36">
<source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" />
</video>
<div class="videoMask">
<img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" />
</div>
</div>
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 14">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
</span>
<!-- <span v-if="scope.scope.materialType == 3 || scope.scope.materialType == 4 || scope.scope.materialType == 5 || scope.scope.materialType == 6" class="material-content">-->
<!-- 图片 -->
<!-- <el-popover placement="top" trigger="hover" v-if="scope.scope.urlType == 'img'">-->
<!-- <div>-->
<!-- <img class="img-plus" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />-->
<!-- </div>-->
<!-- <div slot="reference" class="urlContent">-->
<!-- <img style="margin-right:8px" :src="scope.scope.materialContentRpcResponse.materialUrl" alt="" />-->
<!-- <div class="videoMask" v-if="scope.scope.imgCount > 1">-->
<!-- <img src="@/assets/material/multi.png" alt="" />-->
<!-- <span>{{ scope.scope.imgCount }}</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-popover>-->
<!-- 视频 -->
<!-- <div class="urlContent" v-if="scope.scope.urlType == 'video'" @click="videoOpen(scope.scope)">-->
<!-- <video preload loop muted width="36" height="36">-->
<!-- <source :src="scope.scope.materialContentRpcResponse.materialUrl" type="video/mp4" />-->
<!-- </video>-->
<!-- <div class="videoMask">-->
<!-- <img src="@/assets/material/videoIcon.png" style="width: 22px;height: 22px;" alt="" />-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 14">-->
<!-- <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>-->
<!-- </el-tooltip>-->
<!-- </span>-->
</div>
<!-- 状态 -->
<div slot="status" class="dot" slot-scope="scope">
......@@ -91,8 +99,10 @@
</el-row>
</div>
</div>
<AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog" :eventBus="eventBus"></AddMaterialGroupDia>
<FunctionIntroduc :introductionDialog="introductionDialog" @closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog"
:eventBus="eventBus"></AddMaterialGroupDia>
<FunctionIntroduc :introductionDialog="introductionDialog"
@closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<VideoShowDia ref="VideoShowDia" :dialogVisible="dialogVisibleImg"></VideoShowDia>
</div>
</template>
......@@ -110,6 +120,7 @@ import AddMaterialGroupDia from '@/views/material/components/addMaterialGroupDia
import MaterialGroup from '@/views/material/components/materialGroup'
import FunctionIntroduc from '@/views/material/components/functionIntroduc'
import VideoShowDia from './components/videoDia.vue'
export default {
name: 'materialList',
components: {
......@@ -129,9 +140,10 @@ export default {
materialType: '', // 素材类型
businessType: '', // 业务类型
status: '', // 状态
materialName: '' // 素材名称
materialName: '', // 素材名称
createdType:'2'
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
layout: 'sizes, prev, pager, next, jumper, ->, total',
// 表格数据
materialTableData: [],
......@@ -146,6 +158,7 @@ export default {
businessTypes: [],
// 素材组名称
materialGroupName: '',
changeName: '编辑',
materialFormData: [
{
label: '业务类型',
......@@ -245,13 +258,15 @@ export default {
},
{
type: 'GLButton',
name: '编辑',
name: row => {
return row.createdType == 1 ? '查看' : '编辑'
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addMaterial(2, row)
click: row => row.createdType == 1 ? this.addMaterial(3, row) : this.addMaterial(2, row)
}
},
{
......@@ -284,7 +299,7 @@ export default {
tableOption: true,
tableColumns: [
{
label: '素材内容',
label: '素材名称',
prop: 'materialContentRpcResponse',
addHtml: 'materialContentRpcResponse',
width: 270
......@@ -309,43 +324,43 @@ export default {
formatter: cellVal => {
return cellVal.sendNum
},
renderHeader: (h, { column, $index }) => {
renderHeader: (h, {column, $index}) => {
return h(
'div',
{
style: {
display: 'inline-flex',
'align-items': 'center',
padding: 0
}
},
[
'发送次数',
h(
'el-popover',
{
attrs: {
placement: 'top-start',
width: '240',
trigger: 'hover',
content: '统计该素材的发送次数(不包含在系统外部的转发次数)'
}
},
[
h('img', {
style: {
width: '17px',
height: '17px',
'vertical-align': 'middle'
},
attrs: {
src: iconUrl
'div',
{
style: {
display: 'inline-flex',
'align-items': 'center',
padding: 0
}
},
[
'发送次数',
h(
'el-popover',
{
attrs: {
placement: 'top-start',
width: '240',
trigger: 'hover',
content: '统计该素材的发送次数(不包含在系统外部的转发次数)'
}
},
slot: 'reference'
})
]
)
]
[
h('img', {
style: {
width: '17px',
height: '17px',
'vertical-align': 'middle'
},
attrs: {
src: iconUrl
},
slot: 'reference'
})
]
)
]
)
}
},
......@@ -357,43 +372,43 @@ export default {
formatter: cellVal => {
return cellVal.readNum
},
renderHeader: (h, { column, $index }) => {
renderHeader: (h, {column, $index}) => {
return h(
'div',
{
style: {
display: 'inline-flex',
'align-items': 'center',
padding: 0
}
},
[
'阅读人数',
h(
'el-popover',
{
attrs: {
placement: 'top-start',
width: '240',
trigger: 'hover',
content: '阅读该素材的人数,内部员工除外。'
}
},
[
h('img', {
style: {
width: '17px',
height: '17px',
'vertical-align': 'middle'
'div',
{
style: {
display: 'inline-flex',
'align-items': 'center',
padding: 0
}
},
[
'阅读人数',
h(
'el-popover',
{
attrs: {
placement: 'top-start',
width: '240',
trigger: 'hover',
content: '阅读该素材的人数,内部员工除外。'
}
},
attrs: {
src: iconUrl
},
slot: 'reference'
})
]
)
]
[
h('img', {
style: {
width: '17px',
height: '17px',
'vertical-align': 'middle'
},
attrs: {
src: iconUrl
},
slot: 'reference'
})
]
)
]
)
}
},
......@@ -446,7 +461,8 @@ export default {
materialType: '',
businessType: '',
status: '',
materialName: ''
materialName: '',
createdType:'2'
}
this.getListApi()
this.$refs.materialGroup.currentIndex = null
......@@ -512,13 +528,13 @@ export default {
},
// 素材删除
handleDelete(scope) {
this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', { id: scope.id })
this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', {id: scope.id})
},
// 1-新增素材,2-编辑素材
addMaterial(addOrEdit, scope) {
var params = {
addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 1 ? '创建营销素材' : '编辑营销素材')
$title: encodeURI(addOrEdit == 1 ? '创建营销素材' : addOrEdit == 2 ? '编辑营销素材' : '查看营销素材')
}
addOrEdit != 1 && (params.id = scope.id)
addOrEdit != 1 && (params.status = scope.status)
......@@ -622,35 +638,43 @@ export default {
right: 0;
width: 100%;
height: 100%;
img {
position: relative;
align-self: center;
margin: auto;
}
span {
position: absolute;
top: 12px;
right: 15px;
}
}
.urlContent {
margin-right: 8px;
position: relative;
width: 36px;
height: 36px;
}
.search-form,
.left,
.right {
background-color: #fff;
}
.el-popover {
min-width: 100px;
}
.main-container {
height: 100%;
.top {
display: inline-flex;
span {
margin-left: 16px;
font-size: 16px;
......@@ -658,44 +682,55 @@ export default {
}
}
}
ul {
text-align: center;
li {
list-style: none;
&:first-child {
padding-bottom: 10px;
}
}
}
.container {
margin-top: 10px;
height: 100%;
.search-form {
padding: 20px 0 0 20px;
}
.tabelList {
margin-top: 10px;
height: 100%;
.left {
height: 100%;
position: relative;
border-right: 1px solid #e8e8ea;
}
.right {
// overflow: auto;
.groupTitle {
padding: 20px 0 16px 19px;
font-weight: 600;
}
.glsx-table {
margin: 0 20px;
}
}
}
}
.btn-more {
margin-left: 10px;
}
.material-content {
display: flex;
align-items: center;
......@@ -709,39 +744,49 @@ ul {
overflow: hidden;
white-space: nowrap;
}
img {
width: 36px;
height: 36px;
}
}
.img-plus {
width: 200px;
height: 200px;
}
.introduc-word {
font-size: 14px;
margin-left: 16px;
color: #5850ff;
}
.pdf-title {
text-align: right !important;
}
/deep/ .el-table .ascending .sort-caret.ascending {
border-bottom-color: #5850ff;
}
/deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff;
}
.select-pro {
display: inline-block;
padding-bottom: 20px;
}
/deep/ .el-switch__core {
width: 32px !important;
}
/deep/ .el-table::before {
background-color: transparent;
}
/deep/ .el-table__fixed-right::before {
background-color: transparent;
}
......
......@@ -2,8 +2,10 @@
<template>
<div class="marketing order-manage">
<div class="list-tips m-b-10">
<img class="tips-img"
src="@/assets/icon-info.png" />
<img
class="tips-img"
src="@/assets/icon-info.png"
/>
<span class="table-tips">
已生成有效订单
<span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
......@@ -16,113 +18,160 @@
</div>
<div class="container">
<div class="sticky">
<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">
<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 v-if="!isSpecialMerchat"
label="已付款"
name="1"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat"
label="未付款"
name="2"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat"
label="已退款"
name="3"></el-tab-pane>
<el-tab-pane v-if="!isSpecialMerchat"
label="售后订单"
name="4"></el-tab-pane>
<el-tabs
v-model="searchForm.requestSource"
@tab-click="handleTabClick"
>
<el-tab-pane
label="全部订单"
name="0"
></el-tab-pane>
<el-tab-pane
v-if="!isSpecialMerchat"
label="已付款"
name="1"
></el-tab-pane>
<el-tab-pane
v-if="!isSpecialMerchat"
label="未付款"
name="2"
></el-tab-pane>
<el-tab-pane
v-if="!isSpecialMerchat"
label="已退款"
name="3"
></el-tab-pane>
<el-tab-pane
v-if="!isSpecialMerchat"
label="售后订单"
name="4"
></el-tab-pane>
</el-tabs>
</div>
<el-button class="default-blue-btn"
:size="size"
type="default"
@click="handleExport">导出</el-button>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div class="order-manage-table">
<GLTable 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" />
<GLTable
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 v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span>
</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 }}
<el-popover popper-class="order-table-popover"
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
popper-class="order-table-popover"
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>
</template>
<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>
<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>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div>
<div slot="shareStaffName"
class="table-image"
slot-scope="scope">
<div
slot="shareStaffName"
class="table-image"
slot-scope="scope"
>
<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>{{ scope.scope.shareStaffName }}</span>
<span class="txt-green"
v-if="scope.scope.shareStaffSource == 1">@微信</span>
<span class="txt-orange"
v-if="scope.scope.shareStaffSource == 2">@企微</span>
<span class="txt-blue"
v-if="scope.scope.shareStaffSource == 3">@员工</span>
<span
class="txt-green"
v-if="scope.scope.shareStaffSource == 1"
>@微信</span>
<span
class="txt-orange"
v-if="scope.scope.shareStaffSource == 2"
>@企微</span>
<span
class="txt-blue"
v-if="scope.scope.shareStaffSource == 3"
>@员工</span>
</span>
</div>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span>
</div>
<div slot="assignName"
slot-scope="scope">
<div
slot="assignName"
slot-scope="scope"
>
<div>
<template v-if="scope.scope.assignStaffName">
<img class="img-36 pointer img-circle"
v-if="scope.scope.assignStaffImageUrl"
:src="scope.scope.assignStaffImageUrl" />
<img
class="img-36 pointer img-circle"
v-if="scope.scope.assignStaffImageUrl"
:src="scope.scope.assignStaffImageUrl"
/>
<span class="m-l-10">
<span>{{ scope.scope.assignStaffName }}</span>
</span>
</template>
<template v-else-if="scope.scope.shareStaffName">
<img class="img-36 pointer img-circle"
v-if="scope.scope.shareStaffImageUrl"
:src="scope.scope.shareStaffImageUrl" />
<img
class="img-36 pointer img-circle"
v-if="scope.scope.shareStaffImageUrl"
:src="scope.scope.shareStaffImageUrl"
/>
<span class="m-l-10">
<span>{{ scope.scope.shareStaffName }}</span>
</span>
......@@ -134,61 +183,75 @@
class="assignLabel">指派</span> -->
</div>
</div>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</div>
</GLTable>
</div>
<!-- 表格区域 - 全部订单/售后订单 - end -->
</div>
<!-- 快递信息 -->
<GLDialog 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
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 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
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 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-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span>
......@@ -203,11 +266,15 @@
<span>{{ orderInfo.remark || '-' }}</span>
</el-form-item>
<el-form-item v-if="orderInfo.imgUrls">
<span v-for="(item, index) in orderInfo.imgUrls"
:key="index">
<el-image class="img-60"
:src="item"
:preview-src-list="[item]"></el-image>
<span
v-for="(item, index) in orderInfo.imgUrls"
:key="index"
>
<el-image
class="img-60"
:src="item"
:preview-src-list="[item]"
></el-image>
</span>
</el-form-item>
<el-form-item label="审核是否通过">
......@@ -217,24 +284,28 @@
</el-radio-group>
</el-form-item>
<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>
</el-form>
</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-item label="售后类型">
<span>{{ orderInfo.refundTypeName }}</span>
......@@ -266,7 +337,7 @@ import { utils } from 'glsx-common'
import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default {
name: 'orderManage',
data() {
data () {
return {
size: 'small',
isSpecialMerchat: true,
......@@ -477,6 +548,14 @@ export default {
optionsName: 'testSheetTypeList'
},
{
label: '退款类型',
prop: 'afterSaleType',
width: 100,
formatter: cellValue => {
return { 1: '退订单', 2: '退定金' }[cellValue.afterSaleType] || '-'
}
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
......@@ -593,7 +672,7 @@ export default {
fn: '退款'
},
condition: row => {
return !this.isSpecialMerchat && row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus)
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus) && row.isOffline != 0
},
listeners: {
click: row => {
......@@ -859,21 +938,53 @@ export default {
{ confId: '0', confName: '否' },
{ confId: '1', confName: '是' }
],
isOffSheetTypeList: [
{ confId: '0', confName: '是' },
{ confId: '1', confName: '否' }
],
businessTypeList: utils.deepClone(businessType)
}
}
},
created() {
created () {
this.checkMerchant()
if (window.__POWERED_BY_QIANKUN__) {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
if (this.merchantModel == 2 && this.accountLevel == 4) {
this.initParams()
}
}
},
mounted() {
mounted () {
// this.getCount()
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
initParams () {
const cell = {
label: '线下订单',
prop: 'isOffline',
width: 120,
formatter: cellValue => {
return cellValue.isOffline == 1 ? '否' : cellValue.isOffline == 0 ? '是' : '-'
}
}
const searchCell = {
label: '线下订单',
name: 'isOffline',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'isOffSheetTypeList'
}
this.tableParams.tableColumns.splice(12, 0, cell)
this.searchFormData.splice(17, 0, searchCell)
},
getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.createdStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
......@@ -884,7 +995,7 @@ export default {
return params
},
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
......@@ -892,7 +1003,7 @@ export default {
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
getOptionsList (formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
......@@ -918,12 +1029,12 @@ export default {
}
},
showOrHideAttr(formName, label, isHide) {
showOrHideAttr (formName, label, isHide) {
let idx = this[formName].findIndex(item => item.label == label)
this[formName][idx].isHide = isHide
},
deleteAttr(labelList) {
deleteAttr (labelList) {
labelList.forEach(i => {
console.log(i)
let idx = this.tableParams.tableColumns.findIndex(item => item.label == i)
......@@ -931,7 +1042,7 @@ export default {
})
},
checkMerchant() {
checkMerchant () {
this.$apis.orderManage.checkMerchartApi({}).then(res => {
this.isSpecialMerchat = res
var hideList = ['售后状态', '订单类型', '结算方式', '商户订单号', '车架号', '推荐人', '推荐人类型', '手机号', '推荐人手机号']
......@@ -944,7 +1055,7 @@ export default {
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
secondConfirm (title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -966,7 +1077,7 @@ export default {
})
},
getCount() {
getCount () {
var params = this.getParams()
delete params.createDate
// if(params.orderStatuses.includes('3')) return
......@@ -975,7 +1086,7 @@ export default {
})
},
handleDetail(row) {
handleDetail (row) {
this.$router.push({
path: '/orderManage/orderDetail',
query: {
......@@ -985,7 +1096,7 @@ export default {
},
// 输入快递信息 - start
handleExpressClose() {
handleExpressClose () {
this.isExpressVisible = !this.isExpressVisible
this.orderCode = ''
this.expressForm = {
......@@ -994,7 +1105,7 @@ export default {
}
},
handleExpressConfirm() {
handleExpressConfirm () {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.expressForm)
......@@ -1014,14 +1125,14 @@ export default {
})
},
handleExpressInfo(row) {
handleExpressInfo (row) {
this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode
},
// 输入快递信息 - end
// 订单核销 - start
handleWriteOffClose() {
handleWriteOffClose () {
this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = ''
this.writeOffForm = {
......@@ -1029,7 +1140,7 @@ export default {
}
},
handleWriteOffConfirm() {
handleWriteOffConfirm () {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.writeOffForm)
......@@ -1049,7 +1160,7 @@ export default {
})
},
handleWriteOff(row) {
handleWriteOff (row) {
if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
return true
......@@ -1060,7 +1171,7 @@ export default {
// 订单核销 - end
// 退款审核 - start
handleExamineClose() {
handleExamineClose () {
this.isExamineVisible = !this.isExamineVisible
this.orderCode = ''
this.orderInfo = {}
......@@ -1072,7 +1183,7 @@ export default {
}
},
submitExamine(params) {
submitExamine (params) {
this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
......@@ -1086,7 +1197,7 @@ export default {
})
},
handleExamineConfirm() {
handleExamineConfirm () {
var params = {
id: this.orderInfo.id
}
......@@ -1105,7 +1216,7 @@ export default {
}
},
handleExamine(row) {
handleExamine (row) {
this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {}
......@@ -1117,13 +1228,13 @@ export default {
// 退款审核 - end
// 确认收货 - start
handleReceivingClose() {
handleReceivingClose () {
this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = ''
this.orderInfo = {}
},
handleReceivingConfirm() {
handleReceivingConfirm () {
var params = {
id: this.orderInfo.id
}
......@@ -1140,7 +1251,7 @@ export default {
})
},
handleReceiving(row) {
handleReceiving (row) {
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(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 : '-'
......@@ -1150,7 +1261,7 @@ export default {
},
// 确认收货 - end
setTableFinishFun() {
setTableFinishFun () {
this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
})
......@@ -1159,25 +1270,25 @@ export default {
this.getCount()
},
handleSearch() {
handleSearch () {
this.$refs.allOrderRef.refreshTable()
},
handleTabClick() {
handleTabClick () {
if (this.isSpecialMerchat) {
return true
}
this.handleSearch()
},
handleExport(row) {
handleExport (row) {
var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => {
exportFn(res)
})
},
handleReset() {
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
}
......
<template>
<div class="glsx-table">
<el-table id="initTable"
class="hightline"
:key="componentKey"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data="getListApi ? data : tableData"
:row-class-name="tableParams.rowClassName"
:row-style="tableParams.rowStyle"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
:height="tableHeightValues"
:border="border"
:tableId="tableId"
@sort-change="sortChange"
@selection-change="handleSelect"
:size="size"
:header-cell-style="headerStyle"
:show-summary="tableParams.showSummary"
:summary-method="tableParams.summaryMethod"
v-bind="$attrs"
v-on="$listeners">
<!-- //实现高亮竖线 -->
<el-table-column fixed="left"
width="5">
<template slot-scope="scope">
<span :scope="scope"></span>
</template>
</el-table-column>
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
class-name="select-column"
type="selection"
width="48"
:selectable="checkSelectable"
:reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum"
:fixed="numHasFixed"
align="left"
width="74"
label="序号"
class-name="select-index"
type="index"
:index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1">
</el-table-column>
<el-table-column v-for="(item, index) in tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:fixed="item.fixed"
:align="item.align || 'left'"
:sortable="item.sortable"
:render-header="item.renderHeader"
v-bind="item.columnattrs ? item.columnattrs : {}"
v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope">
<slot v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"></slot>
<template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="item.formatter(scope.row)">
<span slot="reference"
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ item.formatter(scope.row) | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ item.formatter(scope.row) || '--' }} -->
{{ item.formatter(scope.row) | tableCellFormat }}
</span>
</template>
<template v-else-if="getListApi">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.row[item.prop]">
<span slot="reference"
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ scope.row[item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ scope.row[item.prop] || '--' }} -->
{{ scope.row[item.prop] | tableCellFormat }}
</span>
</template>
<template v-else>
<!-- 大于10或 20个字节长度 宽度160px -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="tableData[scope.$index][item.prop]">
<span slot="reference"
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ tableData[scope.$index][item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ tableData[scope.$index][item.prop] || '--' }} -->
{{ tableData[scope.$index][item.prop] | tableCellFormat }}
</span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children"
:data="item.children"
:tableData="tableData"
:getListApi="getListApi"></sub-el-table-column>
</el-table-column>
<el-table-column class-name="gl-btns"
v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align || 'left'"
:width="tableParams.tableOption.width || '200'"
fixed="right">
<template slot-scope="scope">
<slot name="auth-button"
:scope="scope.row"></slot>
</template>
</el-table-column>
<template slot="empty">
<div class="emptyBg">
<img class="noDataImg"
:src="noDataImg"
v-if="noDataImg"
alt="" />
<div class="noDataText">{{ noDataText }}</div>
<slot name="additionalContent"></slot>
</div>
</template>
</el-table>
<!-- hasPageComputed -->
<el-pagination v-if="hasPageComputed"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page[this.pageConf.pageNum]"
:page-sizes="pageSizes"
:page-size="page[this.pageConf.pageSize]"
:total="getListApi ? total : tableTotal"
:layout="layout"
v-bind="paginationattrs"
v-on="paginationlisteners"></el-pagination>
</div>
</template>
<script>
import noDataImgUrl from '@/assets/empty.png'
import SubElTableColumn from './sub-el-table-column.vue'
// import GlSubTableColumn from '../../GlSubTableColumn'
// import GlSubTable from '../../GlSubTable'
export default {
name: 'GLTable',
components: {
SubElTableColumn
// GlSubTableColumn,
// GlSubTable
},
props: {
// `medium` / `small` / `mini`
size: {
type: String,
default: 'medium'
},
// height: {
// type: String,
// default: ''
// },
// maxHeight:{
// type:String,
// default:'3000'
// },
noDataImg: {
type: String,
default: noDataImgUrl
},
noDataText: {
type: String,
default: '暂无数据'
},
border: {
type: Boolean,
default: false
},
headerStyle: {
type: Object,
default: () => { }
},
//表格需要多传入一个id的情况
tableId: {
type: String,
default: ''
},
// 搜索条件
searchForm: {
type: Object,
default: () => { }
},
// 是否定制表头
isCustomHead: {
type: Boolean,
default: false
},
// 表头展示
customHeadShowList: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 0
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
// 默认值是:Function
default: () => {
return new Promise((resolve, reject) => {
resolve()
})
}
},
pageSizes: {
type: Array,
default: () => [10, 20, 30, 40]
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true
},
pageConf: {
type: Object,
default: () => ({
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'totalCount'
})
},
// 分页组件配置
layout: {
type: String,
default: 'total,sizes,prev,pager,next,jumper'
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true
},
// table的配置项参数
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// },
// 多选-唯一标识-行数据的key
// mutiSelectUniqueKey: {
// type: String,
// default: ''
// },
// 设置禁止选中的行数据
checkSelectKey: {
type: String,
default: ''
},
// 设置禁止选中的值
checkSelectVal: {
type: Array,
default: () => []
},
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
},
// 表格项属性穿透
columnattrs: {
type: Object,
default: () => ({})
},
// 表格项事件穿透
columnlisteners: {
type: Object,
default: () => ({})
}
}
}
},
// el分页组件属性透传
paginationattrs: {
type: Object,
default: () => ({})
},
// el分页组件事件透传
paginationlisteners: {
type: Object,
default: () => ({})
}
},
data() {
return {
loading: false,
data: [],
// 页码
page: {},
total: 10,
// 多选数组
mutiSelectArr: {},
tableColumns: [],
showClass: false,
tableHeightValues: null,
bAntiShike: false, //防抖
componentKey: Date.now(), //用于更新组件
hightCell: ''
}
},
watch: {
customHeadShowList(val) {
this.isCustomHead && this.findShowHeadCol()
},
'tableParams.tableColumns'(newVal, oldVal) {
// console.log('newVal',newVal)
this.tableColumns = newVal
}
// data: {
// immediate: true,
// handler(val) {
// this.showClass = val.length > 0 ? true : false
// },
// deep: true
// }
},
computed: {
// 分页计算属性
hasPageComputed() {
if (!this.hasPage) {
return false
}
// 没有数据的时候隐藏分页 api
if (this.getListApi) {
if (this.data.length == 0) {
return false
}
} else {
// 直接传数据的情况
if (this.tableData.length == 0) {
return false
}
}
// //直接传数据的情况
// if (this.tableTotal && this.tableTotal > this.page[this.pageConf.pageSize]) {
// return true
// }
// //传list api的情况 总数 一页多少条
// if(this.total <= this.page[this.pageConf.pageSize]){
// return false
// }
// if (this.page[this.pageConf.pageNum] <= 1) {
// return false
// }
return true
},
numHasFixed() {
return this.tableParams.tableColumns.some(item => {
return item.fixed == 'left'
})
}
},
methods: {
findShowHeadCol() {
// findShowHeadCol事件
this.tableColumns = []
this.tableParams.tableColumns.forEach(item => {
let isCustomCol = item.hasOwnProperty('isCustomCol')
if (!isCustomCol || (isCustomCol && this.customHeadShowList.includes(item.label))) {
this.tableColumns.push(item)
}
})
},
// @vuese
// 设置表格禁用
// @arg row 每一行表格内容
checkSelectable(row) {
// 设置禁止选中的行数据
if (this.tableParams.checkSelectKey && this.tableParams.checkSelectVal.length > 0) {
return this.tableParams.checkSelectVal.indexOf(row[this.tableParams.checkSelectKey]) == -1
} else {
return true
}
},
sortChange({ column, prop, order }) {
// 排序
// @arg column \ prop \ order
this.$emit('sortChange', { column, prop, order })
},
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
// 多选
this.$emit('selectionTable', val)
},
clearMutiSelect() {
// 清空多选
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.clearSelection()
},
// @vuese
// 设置表格高度
// @arg 1.navHeight,这个减值,2.addHeight是增值, 默认都为0
setTableHeightFun(navHeight = 0, addHeight = 0) {
// 设置表格高度
//navHeight 传值底部高度
var baseNavEle = document.querySelector('.scrm-base-nav')
var baseSubNavEle = document.querySelector('.scrm-base-sub-nav')
var baseNavEleHeight = baseNavEle ? baseNavEle.clientHeight : 0
var baseSubNavEleHeight = baseSubNavEle ? baseSubNavEle.clientHeight : 0
let paginationHeight
if (document.querySelector('.el-pagination')) {
paginationHeight = document.querySelector('.el-pagination').clientHeight + 20
} else {
paginationHeight = 0
}
let offsettop = document.getElementById('initTable').offsetTop
let clientHeight = document.documentElement.clientHeight
// document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
// document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
// let tableHeight = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - 10 - 30 - 20
let tableHeight = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - navHeight + 10 + addHeight
// console.log('tableHeight: ', tableHeight, clientHeight, offsettop, paginationHeight, baseNavEleHeight, baseSubNavEleHeight, navHeight)
if (tableHeight < 240) {
tableHeight = 240
}
this.tableHeightValues = tableHeight
},
refreshTable(isResetPageNum = true, isClearMuti = true) {
// 刷新table
this.beforeSearchFn().then(res => {
// 清空多选
isClearMuti && this.clearMutiSelect()
this.loading = true
isResetPageNum && (this.page[this.pageConf.pageNum] = 1)
var params = {
...this.page,
...this.searchForm
}
if (this.tableId) {
params.id = this.tableId
}
this.getListApi(params)
.then(res => {
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
this.$nextTick(() => {
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.doLayout()
})
// 表格请求到数据
// console.log('表格请求到数据this.data',this.data)
this.$emit('setTableFinishFun', this.data)
})
.catch(() => {
this.loading = false
})
})
},
findVal(res, rankStr) {
// 找返回值
var rankList = rankStr.split('.')
if (!rankStr) {
return res
}
return this.findVal(res[rankList[0]], rankList.splice(1).join('.'))
},
handleSizeChange(value) {
// 每页条数
let offsettop = document.getElementById('initTable').offsetTop
this.page[this.pageConf.pageSize] = value
// 刷新表格
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
handleCurrentChange(value) {
// 页码
this.page[this.pageConf.pageNum] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
//原table mounted要做的要做的事情
tableInit() {
this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns)
this.page = {}
this.page[this.pageConf.pageSize] = this.pageSizes[0]
this.page[this.pageConf.pageNum] = 1
this.getListApi && this.refreshTable()
setTimeout(() => {
// console.log('123456doLayout')
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.doLayout()
}, 100)
}
},
mounted() {
this.tableInit()
// 注册事件 -- 防抖
window.onresize = () => {
if (!this.bAntiShike) {
this.bAntiShike = true
setTimeout(() => {
// console.log('组件跟新时间')
this.bAntiShike = false
this.componentKey = Date.now()
}, 300)
}
}
},
beforeDestroy() {
// 事件注销
window.onresize = null
}
}
</script>
<style lang="scss">
// @import '@/theme/global.scss';
.a-click {
cursor: pointer;
}
.el-table .cell {
line-height: 1.2;
}
.gl-btns .el-button + .el-button {
margin-left: 10px;
}
.glsx-table p {
margin: 10px 0;
}
// .glsx-table .line-ellipsis {
// display: -webkit-box;
// width: 100%;
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-line-clamp: 2;
// -webkit-box-orient: vertical;
// }
.el-table-column--selection .cell {
padding-left: 14px !important;
padding-right: 14px !important;
}
.glsx-table {
// .select-column{
// .cell{
// }
// }
// .select-index{
// .cell{
// }
// }
.el-table__empty-text {
line-height: 1;
}
.emptyBg {
padding-top: 4px;
padding-bottom: 4px;
.noDataImg {
margin-bottom: 12px;
width: 64px;
height: 40px;
}
}
// .emptyBg {
// display: flex;
// flex-direction: column;
// justify-content: center;
// align-items: center;
// height: 100%;
// }
}
.el-table__body-wrapper::-webkit-scrollbar {
width: 8px;
height: 8px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 8px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: rgba(144, 147, 153, 0.3);
border-radius: 8px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 8px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
/* .hasTableContent .el-table__body{
height: 100%;
} */
/* .hasTableContent .el-table__body-wrapper{
height: 100%;
} */
/* 样式新增光亮tr */
/* .el-table */
//处理闪的问题
.el-table--enable-row-transition .el-table__body td.el-table__cell {
transition: background-color 0s ease !important;
}
.el-table--enable-row-transition .el-table__body td {
transition: background-color 0s ease !important;
}
.el-table .el-table__body tr.hover-row {
transform: translate3d(0, 0, 0);
box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
.el-table__body tr.hover-row > td {
background-color: #f4f4fc !important;
// box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
.el-table .el-table__body tr.hover-row > td.el-table__cell {
background-color: #f4f4fc !important;
// box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
.el-table tbody tr:hover {
transform: translate3d(0, 0, 0);
box-shadow: 0px 3px 10px rgba(114, 112, 151, 0.25);
}
// 去掉滚动条的上边框
.el-table tbody tr:last-child td {
border-bottom: 1px solid #fff;
}
//添加高亮行的竖线
.el-table.hightline .el-table__body tr.hover-row {
// background-color: #f4f4fc !important;
td:first-child {
position: relative;
// // background-color: #5850ff !important;
// background-color: #f4f4fc !important;
&:after {
position: absolute;
top: 0;
left: 0;
display: block;
content: '';
width: 5px;
height: 100%;
// background-color: $color-primary;
background-color: #5850ff;
}
}
}
.el-table.hightline tbody tr:hover {
// background-color: #f4f4fc !important;
td:first-child {
position: relative;
// // background-color: #5850ff !important;
// background-color: #f4f4fc !important;
&:after {
position: absolute;
top: 0;
left: 0;
display: block;
content: '';
width: 5px;
height: 100%;
// background-color: $color-primary;
background-color: #5850ff;
}
}
}
//除去左边fixed的阴影,添加竖线的时候
.el-table.hightline .el-table__fixed {
box-shadow: none !important;
}
//切换table后 el_table 固定列下方多了一条线
.glsx-table {
/deep/ .el-table__fixed,
/deep/ .el-table__fixed-right {
height: 100% !important; //设置高优先,以覆盖内联样式
}
// 滚动条上边头部栏的背景色
.el-table__fixed-right-patch {
background: #f4f6fc;
border-bottom: 1px solid #ebeef5;
}
}
/* 样式新增光亮tr */
/* 多级表头的样式调整 */
.el-table.hightline .el-table__fixed .el-table__row td:first-child {
border-right: none;
}
.el-table.hightline .el-table__fixed th.is-leaf:first-child {
border: none;
}
</style>
<template>
<div class="sub-el-table-column">
<el-table-column v-for="(item, index) in reverseData" :key="index + 'child'" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'" :sortable="item.sortable" :render-header="item.renderHeader" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ item.formatter(scope.row) | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ item.formatter(scope.row) || '--' }} -->
{{ item.formatter(scope.row) | tableCellFormat }}
</span>
</template>
<template v-else-if="getListApi">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="scope.row[item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ scope.row[item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ scope.row[item.prop] || '--' }} -->
{{ scope.row[item.prop] | tableCellFormat }}
</span>
</template>
<template v-else>
<!-- 大于10或 20个字节长度 -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" width="200" trigger="hover" :content="tableData[scope.$index][item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
{{ tableData[scope.$index][item.prop] | lineEllipsis(item.width, item.line) }}
</span>
</el-popover>
<!-- <span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="tableData[scope.$index][item.prop]"></span> -->
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
<!-- {{ tableData[scope.$index][item.prop] || '--' }} -->
{{ tableData[scope.$index][item.prop] | tableCellFormat }}
</span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
</div>
</template>
<script>
// import GlSubTableColumn from '../../GlSubTableColumn'
export default {
name: 'sub-el-table-column',
props: {
data: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
// 获取列表接口
getListApi: {
type: Function,
default: null
}
},
computed: {
reverseData() {
let arr = [...this.data]
let temp = arr.pop()
arr.unshift(temp)
return arr
}
},
// components: {
// GlSubTableColumn
// }
// created(){
// // console.log('data',this.data)
// }
}
</script>
<style lang="scss">
// .sub-el-table-column {
// }
</style>
......@@ -10,102 +10,81 @@
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton> -->
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
<el-button :size="size"
type="default"
class="default-blue-btn"
@click="handleJump">订单管理</el-button>
</div>
<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">
<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>
<!-- 表格区域 开始 -->
<GLTable
ref="activity"
:getListApi="getListApi"
:noDataImg="url"
: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"
/>
<single-gltable ref="activity"
:getListApi="getListApi"
:noDataImg="url"
: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>
</div>
<div
slot="linkText"
slot-scope="scope"
>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{scope.scope[scope.prop] || 0}}</p>
<div slot="linkText"
slot-scope="scope">
<p class="cursor-pointer"
@click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
</div>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div>
</GLTable>
</single-gltable>
<!-- 表格区域 end -->
</div>
<!-- 众筹分享 -->
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></crowdFundingShare>
<crowdFundingShare :isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"></crowdFundingShare>
</div>
</template>
<script>
import crowdFundingShare from '../productGroup/components/crowdFundingShareDialog.vue'
import GLTable from './components/table/index'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'crowdFundList',
data () {
data() {
return {
size: 'small',
url: url,
......@@ -273,7 +252,14 @@ export default {
{
label: '活动名称',
prop: 'activityName',
width: 220
width: 220,
fixed: 'left'
},
{
label: '门店',
prop: 'merchantName',
width: 220,
fixed: 'left'
},
{
label: '缩略图',
......@@ -281,6 +267,20 @@ export default {
addHtml: 'activityImg'
},
{
label: '收款模式',
prop: 'payMentModel',
width: 220,
formatter: cellValue => {
const model = {
1: '广联收定金和尾款',
2: '广联收定金门店收尾款',
3: '广联收定金门店收全款退定金',
4: '门店收定金和尾款'
}
return model[cellValue.paymentModel] || '--'
}
},
{
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
......@@ -373,19 +373,20 @@ export default {
},
components: {
crowdFundingShare
crowdFundingShare,
singleGltable: GLTable
},
mounted () {
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams () {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
beforeSearchFn () {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate
......@@ -393,13 +394,13 @@ export default {
})
},
handleJump (path, row = {}) {
handleJump(path, row = {}) {
this.$router.push({
path: '/orderManage/index'
})
},
secondConfirm (title, txt, apiModule, apiName, apiParams, fn) {
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -425,16 +426,16 @@ export default {
},
//开始
start (item) {
start(item) {
this.startOrEndConfirm('开始', item)
},
//结束
end (item) {
end(item) {
this.startOrEndConfirm('结束', item)
},
startOrEndConfirm (txt, row) {
startOrEndConfirm(txt, row) {
var title = txt
var params = {}
params.id = row.id
......@@ -447,25 +448,26 @@ export default {
},
//置顶
topping (row) {
topping(row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
},
//删除
del (row) {
del(row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
},
// 1-新增;2-编辑
handleEdit (addOrEdit, row) {
handleEdit(addOrEdit, row) {
var txtObj = {
add: '新建',
edit: '编辑',
copy: '复制'
copy: '复制',
detail: '编辑'
}[addOrEdit]
var params = {
addOrEdit: addOrEdit,
......@@ -484,7 +486,7 @@ export default {
// console.log(JSON.parse(JSON.stringify(option)))
// },
// 明细
handleDetail ({ prop, scope }) {
handleDetail({ prop, scope }) {
let data = {
viewAmount: {
type: 1,
......@@ -505,30 +507,30 @@ export default {
id: scope.id,
activityName: scope.activityName,
type: data.type,
count: data.count,
count: data.count
}
})
},
handleExport () {
handleExport() {
var params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res)
})
},
handleShare (row) {
handleShare(row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
this.shareForm = res
this.handleShareClose()
})
},
handleShareClose () {
handleShareClose() {
this.isShareVisible = !this.isShareVisible
},
getOptionsList (formName, hasAll = true, refreshSigle) {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
......@@ -554,11 +556,11 @@ export default {
}
},
handleSearch () {
handleSearch() {
this.$refs.activity.refreshTable()
},
handleReset () {
handleReset() {
this.searchForm = {
activityName: '',
activityStatus: ''
......@@ -566,7 +568,7 @@ export default {
this.handleSearch()
},
setTableFinishFun () {
setTableFinishFun() {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
}
......
......@@ -46,7 +46,8 @@
:rowNumber="1"
:formObj="searchRankForm"
:formData="searchFormRankData"
@handleOk="handleSearchRank"></GLCombiForm>
@handleOk="handleSearchRank"
@handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button :size="size"
......@@ -358,10 +359,10 @@ export default {
this.getLiveData()
},
mounted() {
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'),
[rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default')
// [rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
if (dataResetBtn) dataResetBtn.style.display = 'none'
if (rankResetBtn) rankResetBtn.style.display = 'none'
// if (rankResetBtn) rankResetBtn.style.display = 'none'
},
methods: {
......@@ -386,6 +387,11 @@ export default {
// 直播间数据统计
// this.getLiveBroadcastRoomDataStatistics()
},
handleReset() {
this.searchRankForm = this.$options.data.call(this).searchRankForm
// this.$refs.rankRef.refreshTable()
// this.handleSearch()
},
getDailyOrderQuantityStatistics() {
this.$apis.seckillActivity
.getDailyOrderQuantityStatistics({ id: this.activityId })
......
......@@ -4,21 +4,29 @@
<div class="sop-base-info">
<div class="container m-b-20">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="labelWidth"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData"
:formRules="editRule">
<div slot="startDate">
<el-input class="w432" :placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')" disabled></el-input>
<el-input class="w432"
:placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')"
disabled></el-input>
</div>
<div slot="customerInfoList" slot-scope="scope">
<div v-if="!scope.scope.isDisabled">
<!-- <el-button class="default-blue-btn" :size="size" @click="handleSelectCustomer">选择客户</el-button>
<el-button v-show="editForm.customerInfoList.length" :size="size" @click="handleResetCustomer">重置客户</el-button> -->
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleCustTypeChange">
<el-radio v-for="(item, index) in scope.scope.customerRadioList" :key="index" :label="item.confId">{{ item.confName }}</el-radio>
<el-radio v-for="(item, index) in scope.scope.customerRadioList" :key="index" :label="item.confId">
{{ item.confName }}
</el-radio>
</el-radio-group>
</div>
<div v-for="(item, pIdx) in customerDataList" :key="pIdx">
<div v-show="item.confId == editForm[scope.scope.name]">
<el-button v-show="item.list.length == 0" class="default-blue-btn el-icon-plus" :size="size" @click="handleSelectCustomer(pIdx)">去选择</el-button>
<el-button v-show="item.list.length == 0" class="default-blue-btn el-icon-plus" :size="size"
@click="handleSelectCustomer(pIdx)">去选择
</el-button>
<!-- <div v-show="editForm.customerInfoList.length != 0" class="customer-box m-t-10"> -->
<div v-show="item.list.length != 0">
<div class="customer-box m-t-10">
......@@ -26,13 +34,17 @@
<div :key="key" class="el-input-tag input-tag-wrapper">
<template v-if="item.confName == '标签'">
<div v-for="(subItem, subIdx) in item.list" :key="subIdx">
<el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(n, subIdx, item.confName)">
<el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" :size="size"
type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false"
@close="handleDeleteCustomer(n, subIdx, item.confName)">
<span>{{ subItem.labelGroup.name }}:{{ k.name }}</span>
</el-tag>
</div>
</template>
<template v-else>
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(subIdx)">
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size"
type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false"
@close="handleDeleteCustomer(subIdx)">
<!-- <i class="el-icon-user-solid"></i> -->
<span>{{ subItem[item.listConf.confName] || subItem[item.listConf.otherConfName] }}</span>
</el-tag>
......@@ -50,14 +62,17 @@
<div class="container edit-container">
<div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p>
<el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark" content="请先完善sop名称和营销对象" placement="top">
<el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark"
content="请先完善sop名称和营销对象" placement="top">
<div>
<el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size" type="primary" @click="handleEventEdit('add')">添加事件</el-button>
<el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size"
type="primary" @click="handleEventEdit('add')">添加事件
</el-button>
</div>
</el-tooltip>
</div>
<div v-show="!editForm.eventList.length" class="event-empty">
<img class="empty-img" :src="url" />
<img class="empty-img" :src="url"/>
<p class="empty-txt">暂无营销事件</p>
</div>
<div v-show="editForm.eventList.length" class="event-box">
......@@ -66,27 +81,39 @@
<p class="m-r-10">{{ item.eventStartDate }}</p>
<p class="m-r-20">{{ item.eventTime }}</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 1">每天重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{ item.repeatTime }}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 3">每月{{ item.repeatTime }}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 3">每月{{
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p>
<p class="m-r-20 txt-blue">{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p>
<p class="m-r-20 txt-blue">
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p>
</div>
<div class="event-content">{{ item.eventContent }}</div>
<div class="event-link" v-if="item.object">
<img class="m-r-10" v-if="item.object.additionalType && item.object.additionalType != 4" :src="require(`@/assets/sop/icon-${imgIcon[item.object.additionalType]}.png`)" alt />
<img class="m-r-10" v-if="item.object.additionalType && item.object.additionalType != 4"
:src="require(`@/assets/sop/icon-${imgIcon[item.object.additionalType]}.png`)" alt/>
<div v-if="item.object.additionalType == 4">
<div v-if="item.object.showVideoContent.length">
<video class="model-item-img" :src="item.object.showVideoContent[0].attContent" controls="controls" />
<video class="model-item-img" :src="item.object.showVideoContent[0].attContent" controls="controls"/>
</div>
<div v-if="!item.object.showVideoContent.length && item.object.showImgContent.length">
<img class="model-item-img" :src="item.object.showImgContent[0].attContent" />
<img class="model-item-img" :src="item.object.showImgContent[0].attContent"/>
</div>
</div>
<span v-else>{{ item.object.objectName }}</span>
</div>
<div v-if="new Date(item.eventStartDate) > new Date()" class="event-btns">
<el-button class="default" :size="size" @click="handleEventDelete(index)">删除</el-button>
<el-button class="default-blue-btn" :size="size" @click="handleEventEdit('edit', item, index)">编辑</el-button>
<div v-if="new Date(item.eventStartDate) > new Date() || routeInfo.addOrEdit =='copy'" class="event-btns">
<el-button class="default newBtnSty" :size="size" @click="handleEventDelete(index)">删除</el-button>
<el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark"
content="请先完善sop名称和营销对象" placement="top">
<div>
<el-button class="default-blue-btn" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size" @click="handleEventEdit('edit', item, index)">编辑
</el-button>
</div>
</el-tooltip>
</div>
</div>
</div>
......@@ -97,9 +124,15 @@
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter>
<select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible"
:selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))"
@handleCrowdCustClose="handleCrowdCustClose"
@handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :parentSelectedCustomerList="customerDataList[2].list" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible"
:parentSelectedCustomerList="customerDataList[2].list"
@handleAppointCustClose="handleAppointCustClose"
@handleAppointCustConfirm="handleDialogConfirm"></select-customer>
</div>
</template>
......@@ -107,6 +140,7 @@
import url from '@/assets/empty.png'
import selectCustomer from './components/selectCustomer'
import selectCrowd from './components/selectCrowd'
export default {
name: 'baseInfo',
data() {
......@@ -188,10 +222,10 @@ export default {
eventList: []
},
editRule: {
sopName: [{ required: true, message: '请输入SOP名称', trigger: 'change' }],
customerOptUpdate: [{ required: true, message: '请选择更新人群', trigger: 'change' }],
customerOptType: [{ required: true, message: '请选择有效对象', trigger: 'change' }],
customerInfoList: [{ required: true, message: '请选择营销对象', trigger: 'change' }]
sopName: [{required: true, message: '请输入SOP名称', trigger: 'change'}],
customerOptUpdate: [{required: true, message: '请选择更新人群', trigger: 'change'}],
customerOptType: [{required: true, message: '请选择有效对象', trigger: 'change'}],
customerInfoList: [{required: true, message: '请选择营销对象', trigger: 'change'}]
},
isEdit: true,
editFormData: [
......@@ -297,7 +331,8 @@ export default {
mounted() {
this.setMinHeight('.sop-base-info')
if (this.routeInfo.addOrEdit == 'edit') {
// this.routeInfo.addOrEdit == 'edit'
if (['edit', 'copy'].includes(this.routeInfo.addOrEdit)) {
this.getInfo()
} else if (this.routeInfo.info) {
this.setCustomer()
......@@ -407,43 +442,75 @@ export default {
},
getInfo() {
this.$apis.sop.getSopInfoDetailApi({ sopId: this.routeInfo.id }).then(res => {
this.editForm = res
this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType)
this.recoverCustomerList()
this.editForm.customerOptUpdate = this.editForm.customerOptUpdate + ''
// this.editForm.customerInfoList = this.editForm.customerInfoList || []
// this.editForm.customerInfoList.forEach(item => {
// item.id = item.customerId
// })
// this.editForm.customerInfoList.length && this.recoveryCondLimit()
this.editForm.eventList.forEach(item => {
if (item.object) {
item.object.objectId = item.objectId
item.object.objectType = item.objectType
// item.object.objectName = item.object.packageName
item.object.objectName = item.objectName
item.object.additionalType = item.additionalType
}
if (item.additionalType == 4) {
// attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// attContent 附件内容
// 文字
let txtObj = item.object.attachmentList.find(k => k.attType == 1)
item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// 图片
let imgList = item.object.attachmentList.filter(k => k.attType == 2)
item.object.showImgContent = imgList || []
// 视频
let videoList = item.object.attachmentList.filter(k => k.attType == 3)
item.object.showVideoContent = videoList || []
}
})
this.editDisabled = new Date(this.editForm.startDate) < new Date()
this.editDisabled && this.judgeDisable()
this.$nextTick(() => {
this.editStatus = false
})
this.$apis.sop.getSopInfoDetailApi({sopId: this.routeInfo.id}).then(res => {
if (this.routeInfo.addOrEdit == 'copy') {
this.copyForm = res
this.copyForm.eventList.forEach(item => {
item.eventStartDate = ''
item.eventTime = ''
if (item.object) {
item.object.objectId = item.objectId
item.object.objectType = item.objectType
item.object.objectName = item.objectName
item.object.additionalType = item.additionalType
}
if (item.additionalType == 4) {
// attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// attContent 附件内容
// 文字
let txtObj = item.object.attachmentList.find(k => k.attType == 1)
item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// 图片
let imgList = item.object.attachmentList.filter(k => k.attType == 2)
item.object.showImgContent = imgList || []
// 视频
let videoList = item.object.attachmentList.filter(k => k.attType == 3)
item.object.showVideoContent = videoList || []
}
})
console.log(this.copyForm.eventList)
this.editForm.eventList = this.copyForm.eventList
this.$nextTick(() => {
this.editStatus = false
})
} else {
this.editForm = res
this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType)
this.recoverCustomerList()
this.editForm.customerOptUpdate = this.editForm.customerOptUpdate + ''
// this.editForm.customerInfoList = this.editForm.customerInfoList || []
// this.editForm.customerInfoList.forEach(item => {
// item.id = item.customerId
// })
// this.editForm.customerInfoList.length && this.recoveryCondLimit()
this.editForm.eventList.forEach(item => {
if (item.object) {
item.object.objectId = item.objectId
item.object.objectType = item.objectType
// item.object.objectName = item.object.packageName
item.object.objectName = item.objectName
item.object.additionalType = item.additionalType
}
if (item.additionalType == 4) {
// attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// attContent 附件内容
// 文字
let txtObj = item.object.attachmentList.find(k => k.attType == 1)
item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// 图片
let imgList = item.object.attachmentList.filter(k => k.attType == 2)
item.object.showImgContent = imgList || []
// 视频
let videoList = item.object.attachmentList.filter(k => k.attType == 3)
item.object.showVideoContent = videoList || []
}
})
this.editDisabled = new Date(this.editForm.startDate) < new Date()
this.editDisabled && this.judgeDisable()
this.$nextTick(() => {
this.editStatus = false
})
}
})
},
......@@ -466,18 +533,18 @@ export default {
tagLists: []
}
this.customerDataList[this.currentCustomerIdx].list &&
this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
this.$apis.sop.getCustomerByTagListApi(params).then(res => {
this.customerDataList[this.currentCustomerIdx].customerCount = res.count
})
......@@ -648,7 +715,13 @@ export default {
item.isJoin == 1 && this.parentCustomerObj.parentPredictObj.qiwei++
})
}
this.$emit('handleTabChange', { activeName: 'editEvent', addOrEdit: addOrEdit, eventIndex: addOrEdit == 'add' ? '-1' : idx, parentCustomerObj: this.parentCustomerObj, info: { ...row, sopName: this.editForm.sopName } })
this.$emit('handleTabChange', {
activeName: 'editEvent',
addOrEdit: addOrEdit,
eventIndex: addOrEdit == 'add' ? '-1' : idx,
parentCustomerObj: this.parentCustomerObj,
info: {...row, sopName: this.editForm.sopName}
})
},
reqCrowdAttrs() {
......@@ -760,6 +833,7 @@ export default {
}
})
} else {
console.log('1111111')
params.eventList = []
this.editForm.eventList.forEach((item, index) => {
params.eventList.push(JSON.parse(JSON.stringify(item)))
......@@ -784,7 +858,7 @@ export default {
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'编辑sop事件',params}))
this.$tracker.track(Object.assign({}, {pageName: '营销SOP', name: '编辑sop事件', params}))
if (res.code == '0') {
this.cancelJump()
}
......@@ -797,7 +871,7 @@ export default {
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$tracker.track(Object.assign({},{pageName:'营销SOP',name:'创建sop事件',params}))
this.$tracker.track(Object.assign({}, {pageName: '营销SOP', name: '创建sop事件', params}))
if (res.code == '0') {
this.cancelJump()
}
......@@ -819,10 +893,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => { })
.then(() => {
this.cancelJump()
})
.catch(() => {
})
} else {
this.cancelJump()
}
......@@ -838,6 +913,7 @@ export default {
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
.customer-title {
box-sizing: border-box;
height: 39px;
......@@ -845,6 +921,7 @@ export default {
padding: 0 10px;
// border-bottom: 1px solid #dcdfe6;
}
.input-tag-wrapper {
max-height: 227px;
overflow: auto;
......@@ -860,13 +937,16 @@ export default {
display: flex;
align-items: center;
font-size: 14px;
.el-tag.el-tag--info .el-tag__close {
color: #909399 !important;
background: transparent !important;
}
.customer-tag {
margin: 4px;
}
i {
color: #75acff;
margin-right: 3px;
......@@ -874,50 +954,65 @@ export default {
}
}
}
.event-empty {
height: 234px;
text-align: center;
.empty-img {
margin: 80px 0 12px;
}
.empty-txt {
color: #000000;
font-size: 14px;
opacity: 0.65;
}
}
.event-box {
padding: 32px 20px;
.event-item {
position: relative;
padding: 16px;
background: #f7f7f7;
border: 1px solid rgba(220, 223, 230, 1);
margin-bottom: 20px;
.event-title {
height: 32px;
line-height: 32px;
margin-bottom: 12px;
}
.model-item-img {
width: 90px;
height: 78px;
margin-right: 5px;
}
.event-link {
margin-top: 12px;
display: flex;
align-items: center;
}
.event-content {
line-height: 24px;
}
.event-btns {
position: absolute;
top: 16px;
right: 16px;
display: flex;
.newBtnSty{
margin-right: 8px;
}
}
}
.event-item:last-child {
margin-bottom: 0;
}
......
......@@ -105,7 +105,6 @@
<nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model>
</div>
</template>
<script>
import { limitPrice } from '@/common/constant'
import ActivityModel from './components/activityModel'
......@@ -391,7 +390,6 @@ export default {
}
}
},
props: {
eventObj: {
type: Object,
......@@ -419,13 +417,11 @@ export default {
}
}
},
components: {
ActivityModel,
materialModel,
nicknameModel
},
watch: {
editForm: {
handler(val) {
......@@ -443,14 +439,12 @@ export default {
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
}
},
created() {
this.getDay('weekList', 7)
this.getDay('monthList', 31)
this.predictCountObj = JSON.parse(JSON.stringify(this.parentCustomerObj.parentPredictObj))
// this.limitQwPhone()
},
mounted() {
Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList()
......@@ -459,7 +453,6 @@ export default {
})
this.eventObj.addOrEdit != 'add' ? this.getInfo() : ''
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
......@@ -486,18 +479,15 @@ export default {
})
}
},
handleResetMaxSet() {
this.maxReachesTypeSet = ''
},
getStaffTypeList() {
this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
})
},
getDay(attrName, day) {
let weekNameList = ['一', '二', '三', '四', '五', '六', '日']
for (var i = 0; i < day; i++) {
......@@ -507,7 +497,6 @@ export default {
})
}
},
recoveryRepeat() {
var idx = this.editFormDataRepeat.findIndex(item => item.name == 'repeatMode')
this.editFormDataRepeat[idx].isHide = this.editForm.repeatFlag == 'N'
......@@ -522,7 +511,6 @@ export default {
this.editForm.reachesTypeSet = 1
}
},
recoveryEndTime() {
var idx = this.editFormDataTime.findIndex(item => item.name == 'eventEndDate')
var startTime = new Date(this.editForm.eventStartDate)
......@@ -536,7 +524,6 @@ export default {
}
}
},
getInfo() {
this.editForm.eventStartDate = moment(this.editForm.eventStartDate).format('YYYY-MM-DD')
this.editForm.eventEndDate = this.editForm.eventEndDate ? moment(this.editForm.eventEndDate).format('YYYY-MM-DD') : ''
......@@ -545,11 +532,9 @@ export default {
this.recoveryEndTime()
this.getCustomerNum()
},
handleReachesType(val) {
this.editForm.reachesTypeSet = val == 1 ? 1 : ''
},
// 素材
handleMaterialConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
......@@ -565,11 +550,9 @@ export default {
]
this.handleMaterialClose()
},
handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible
},
// 朋友圈模板
handleNicknameConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
......@@ -588,11 +571,9 @@ export default {
]
this.handleNicknameClose()
},
handleNicknameClose() {
this.isNicknameVisible = !this.isNicknameVisible
},
// 营销内容
handleFun(name) {
if (name == 'material') {
......@@ -605,7 +586,6 @@ export default {
this.handleNicknameClose()
}
},
close(index) {
this.previewList.splice(index, 1)
if (this.editForm.object.additionalType == 4) {
......@@ -614,7 +594,6 @@ export default {
}
this.editForm.object = {}
},
selectActivity(val) {
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true
......@@ -627,7 +606,6 @@ export default {
]
},
// 营销内容
getCustomerNum() {
switch (this.parentCustomerObj.currentCustomerTypeName) {
case '人群':
......@@ -640,7 +618,6 @@ export default {
break
}
},
getCustomerByCrowdList() {
var params = {
pageSize: 1,
......@@ -653,7 +630,6 @@ export default {
this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] = res.count
})
},
getCustomerByTagList() {
var params = {
combineType: 2,
......@@ -662,18 +638,18 @@ export default {
tagLists: []
}
this.parentCustomerObj.list &&
this.parentCustomerObj.list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
this.parentCustomerObj.list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
// 1-企业微信;2-短信;3-微信朋友圈
this.editForm.pushChannelType == 2 ? (params.customerPhone = '1') : (params.isJoin = 1)
this.$apis.sop.getCustomerByTagListApi(params).then(res => {
......@@ -684,7 +660,6 @@ export default {
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
handleConfirm() {
var countParams = {
eventStartDate: this.editForm.eventStartDate,
......@@ -746,10 +721,10 @@ export default {
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => { })
.then(() => {
this.cancelJump()
})
.catch(() => { })
} else {
this.cancelJump()
}
......@@ -849,4 +824,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -7,7 +7,6 @@
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
......@@ -18,7 +17,6 @@
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
......@@ -173,11 +171,9 @@ export default {
}
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
handleJump(path, row = {}) {
this.$router.push({
......@@ -185,7 +181,6 @@ export default {
query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : ''
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
......@@ -220,16 +215,13 @@ export default {
query: params
})
},
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id })
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......@@ -255,22 +247,18 @@ export default {
})
}
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.sopListRef.data.length ? (this.$refs.sopListRef.tableHeightValues = '') : this.$refs.sopListRef.setTableHeightFun()
},
handleBack() {
this.$router.push({
path: '/sop/index'
})
},
handleSearch() {
this.$refs.sopListRef.refreshTable()
},
handleReset() {
this.searchForm = {
sopName: '',
......@@ -281,7 +269,6 @@ export default {
}
}
</script>
<style scoped>
.sop-list .sop-back-btn {
position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!