Commit 2fa53520 authored by erichsieh's avatar erichsieh

feat: 埋點

parent eabd9e23
Pipeline #4602 passed with stage
in 6 seconds
...@@ -5,6 +5,7 @@ import purpUI from '../packages' ...@@ -5,6 +5,7 @@ import purpUI from '../packages'
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import '@src/styles/theme/index.css'
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.config.productionTip = false Vue.config.productionTip = false
......
{ {
"name": "@purplevin/component", "name": "@purplevin/component",
"version": "0.1.21", "version": "0.1.22",
"private": false, "private": false,
"main": "lib/index.umd.min.js", "main": "lib/index.umd.min.js",
"scripts": { "scripts": {
......
import convertTool from './src' import convertTool from './src'
convertTool.install = function (Vue) { convertTool.install = function (Vue) {
Vue.component(convertTool.name, convertTool) Vue.component(convertTool.name, convertTool)
} }
......
...@@ -73,6 +73,7 @@ export default { ...@@ -73,6 +73,7 @@ export default {
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
}) })
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', 'CN稿转成PCT稿'])
const res = await fetchCnToCpc(this.baseUrl, formData) const res = await fetchCnToCpc(this.baseUrl, formData)
if (res.status === 200) { if (res.status === 200) {
this.fileList = [] this.fileList = []
......
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
}) })
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', 'CN稿转成PCT稿'])
const res = await fetchCntToPct(this.baseUrl,formData) const res = await fetchCntToPct(this.baseUrl,formData)
if (res.status === 200) { if (res.status === 200) {
this.fileList = [] this.fileList = []
......
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
}) })
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', 'PCT槁转CN稿'])
const res = await fetchPctToCn(this.baseUrl,formData) const res = await fetchPctToCn(this.baseUrl,formData)
if (res.status === 200) { if (res.status === 200) {
this.fileList = [] this.fileList = []
......
...@@ -132,6 +132,7 @@ export default { ...@@ -132,6 +132,7 @@ export default {
this.$message.error('请先选择需要上传的文件!') this.$message.error('请先选择需要上传的文件!')
return false return false
} }
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '公式转换图片'])
const formData = new FormData() const formData = new FormData()
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
</template> </template>
<script> <script>
import '@src/styles/theme/index.css'
import Cn2CpcForm from './components/Cn2CpcForm' import Cn2CpcForm from './components/Cn2CpcForm'
import Cn2PctForm from './components/Cn2PctForm' import Cn2PctForm from './components/Cn2PctForm'
import VisioForm from './components/VisioForm' import VisioForm from './components/VisioForm'
......
...@@ -151,6 +151,7 @@ export default { ...@@ -151,6 +151,7 @@ export default {
this.$message.error('请先选择需要上传的文件!') this.$message.error('请先选择需要上传的文件!')
return false return false
} }
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '分割工具'])
const formData = new FormData() const formData = new FormData()
const { form } = this const { form } = this
formData.append('file', this.fileList[0].raw) formData.append('file', this.fileList[0].raw)
......
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
this.$message.error('请先选择需要上传的文件!') this.$message.error('请先选择需要上传的文件!')
return false return false
} }
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '分割文件(根据书籤)'])
const formData = new FormData() const formData = new FormData()
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
......
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
}) })
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '分割文件(根据分页符号)'])
const response = await splitDocxByPageBreak(this.baseUrl, formData) const response = await splitDocxByPageBreak(this.baseUrl, formData)
if (response) { if (response) {
this.fileList = [] this.fileList = []
......
...@@ -81,6 +81,7 @@ export default { ...@@ -81,6 +81,7 @@ export default {
this.$message.error('请先选择需要上传的文件!') this.$message.error('请先选择需要上传的文件!')
return false return false
} }
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '分割文件(根据页码)'])
const formData = new FormData() const formData = new FormData()
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
......
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('file', e.raw) formData.append('file', e.raw)
}) })
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '分割文件(识别标题)'])
const response = await splitDocx(this.baseUrl, formData) const response = await splitDocx(this.baseUrl, formData)
if (response) { if (response) {
this.fileList = [] this.fileList = []
......
<template> <template>
<div> <div>
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="分割文件(識別標題)"> <el-tab-pane label="分割文件(识别标题)">
<SplitWordForm :baseUrl="baseUrl" /> <SplitWordForm :baseUrl="baseUrl" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分割文件(根據頁碼)"> <el-tab-pane label="分割文件(根据页码)">
<SplitRangeWordForm :baseUrl="baseUrl" /> <SplitRangeWordForm :baseUrl="baseUrl" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分割文件(根據分頁符號)"> <el-tab-pane label="分割文件(根据分页符号)">
<SplitPageBreakWordForm :baseUrl="baseUrl" /> <SplitPageBreakWordForm :baseUrl="baseUrl" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分割文件(根據書籤)"> <el-tab-pane label="分割文件(根据书籤)">
<SplitBookMarkWordForm :baseUrl="baseUrl" /> <SplitBookMarkWordForm :baseUrl="baseUrl" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
......
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
this.activeName = tab.name this.activeName = tab.name
}, },
// 上传到服务器 // 上传到服务器
async submitUpload() { async submitUpload() {
console.log(this.fileList) console.log(this.fileList)
if (this.fileList.length <= 0) { if (this.fileList.length <= 0) {
this.$message.error('请先选择需要上传的文件!') this.$message.error('请先选择需要上传的文件!')
...@@ -174,6 +174,7 @@ export default { ...@@ -174,6 +174,7 @@ export default {
this.$message.error('请输入合同号') this.$message.error('请输入合同号')
return false return false
} }
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '华星请款单(横表)'])
formData.append('contractNumber', this.contractNumber) formData.append('contractNumber', this.contractNumber)
this.fileList.forEach(e => { this.fileList.forEach(e => {
formData.append('fileList', e.raw) formData.append('fileList', e.raw)
...@@ -205,6 +206,7 @@ export default { ...@@ -205,6 +206,7 @@ export default {
this.$message.error('请先选择需要上传的文件!') this.$message.error('请先选择需要上传的文件!')
return false return false
} }
window._paq && window._paq.push(['trackEvent', 'Obtain', 'Click', '华星请款单(横表)'])
let excelFileName = '' let excelFileName = ''
const formData = new FormData() const formData = new FormData()
this.detailFileList2.forEach(e => { this.detailFileList2.forEach(e => {
......
...@@ -76,6 +76,7 @@ export default { ...@@ -76,6 +76,7 @@ export default {
}) })
}, },
inputHandler() { inputHandler() {
window._paq && window._paq.push(['trackEvent', 'Tool', 'Click', '武汉服务团队名称'])
this.levelKeys.forEach(level => { this.levelKeys.forEach(level => {
console.log(`=====================${level.value}======================`) console.log(`=====================${level.value}======================`)
this.tableData this.tableData
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -25,6 +25,7 @@ module.exports = { ...@@ -25,6 +25,7 @@ module.exports = {
.set('@utils', path.resolve('utils')) .set('@utils', path.resolve('utils'))
.set('@config', path.resolve('config')) .set('@config', path.resolve('config'))
.set('@api', path.resolve('api')) .set('@api', path.resolve('api'))
.set('@src', path.resolve('src'))
// 把 packages 和 examples 加入编译,因为新增的文件默认是不被 webpack 处理的 // 把 packages 和 examples 加入编译,因为新增的文件默认是不被 webpack 处理的
config.module config.module
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment