Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3c0fb535
authored
Mar 29, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sop-代码精简
1 parent
b52c89fe
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
172 deletions
src/views/sop/editSop.vue
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/editEvent.vue
src/views/sop/sopAnalysis/completeList.vue
src/views/sop/sopAnalysis/staffList.vue
src/views/sop/sopAnalysis/touchList.vue
src/views/sop/sopList.vue
src/views/sop/editSop.vue
View file @
3c0fb53
...
...
@@ -14,7 +14,6 @@ export default {
data
()
{
return
{
activeName
:
'baseInfo'
,
// activeName: 'editEvent',
routeInfo
:
{
// add-新增;edit-编辑;look-查看
addOrEdit
:
'add'
,
...
...
@@ -48,8 +47,6 @@ export default {
this
.
activeName
=
obj
.
activeName
},
handleInfoConfirm
(
info
)
{
// console.log(info)
// console.log(this.$refs.baseInfoRef.editForm.eventList)
this
.
eventObj
.
addOrEdit
==
'add'
?
this
.
$refs
.
baseInfoRef
.
editForm
.
eventList
.
push
(
info
.
baseInfo
)
:
this
.
$set
(
this
.
$refs
.
baseInfoRef
.
editForm
.
eventList
,
this
.
eventIndex
,
info
.
baseInfo
)
console
.
log
(
this
.
$refs
.
baseInfoRef
.
editForm
)
this
.
$refs
.
baseInfoRef
.
dealSopTime
()
...
...
src/views/sop/editSop/baseInfo.vue
View file @
3c0fb53
...
...
@@ -94,10 +94,6 @@ export default {
size
:
'small'
,
title
:
'基本信息'
,
url
:
url
,
// titleObj: {
// add: '新增信息',
// edit: '编辑信息'
// },
footerLeft
:
'0'
,
footerWidth
:
'0'
,
editChildRef
:
'editChildRef'
,
...
...
@@ -137,7 +133,6 @@ export default {
},
editRule
:
{
sopName
:
[{
required
:
true
,
message
:
'请输入SOP名称'
,
trigger
:
'change'
}],
// sopTime: [{ required: true, message: '请选择营销时间', trigger: 'change' }],
customerInfoList
:
[{
required
:
true
,
message
:
'请选择营销对象'
,
trigger
:
'change'
}]
},
isEdit
:
true
,
...
...
@@ -226,8 +221,7 @@ export default {
},
getInfo
()
{
this
.
$apis
.
sop
.
getSopInfoDetailApi
({
sopId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
// this.editForm.sopName = res.sopName
console
.
log
(
res
)
// console.log(res)
this
.
editForm
=
res
this
.
editForm
.
customerInfoList
=
this
.
editForm
.
customerInfoList
||
[]
this
.
editForm
.
customerInfoList
.
forEach
(
item
=>
{
...
...
@@ -301,12 +295,8 @@ export default {
})
})
this
.
taggingList
=
arr
// console.log(this.taggingList)
// this.taggingList = obj
// console.log(obj, '1')
this
.
key
=
new
Date
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
'customerInfoList'
)
// console.log(this.tagging, '2')
},
handleSelectCustomer
()
{
...
...
@@ -327,7 +317,6 @@ export default {
this
.
isTagVisible
=
!
this
.
isTagVisible
this
.
$refs
.
selectLabel
.
init
({
condLimitObj
:
this
.
condLimitObj
,
tagList
:
this
.
tagging
,
customerInfoList
:
this
.
editForm
.
customerInfoList
,
activeName
:
'customer'
})
}
// console.log(this.isTagVisible)
},
handleResetCustomer
()
{
...
...
@@ -405,8 +394,6 @@ export default {
},
handleEventEdit
(
addOrEdit
,
row
,
idx
)
{
// console.log(row)
// console.log(this.editForm.sopName)
this
.
$emit
(
'handleTabChange'
,
{
activeName
:
'editEvent'
,
addOrEdit
:
addOrEdit
,
eventIndex
:
addOrEdit
==
'add'
?
'-1'
:
idx
,
condLimitObj
:
this
.
condLimitObj
,
info
:
{
...
row
,
sopName
:
this
.
editForm
.
sopName
}
})
},
...
...
@@ -466,7 +453,6 @@ export default {
})
}
console
.
log
(
params
)
// var apiName = this.editDisabled ? 'insertOrUpdateSopEventApi' : 'insertOrUpdateSopApi'
if
(
this
.
editDisabled
)
{
var
batchEditParams
=
{
sopId
:
params
.
id
,
...
...
src/views/sop/editSop/editEvent.vue
View file @
3c0fb53
...
...
@@ -41,7 +41,6 @@
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRefContent"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormDataContent"
:formRules=
"editRule"
>
<div
slot=
"eventContent"
class=
"content"
>
<div
class=
"content-bg"
>
<!--
<wTextarea
ref=
"textContent"
v-model=
"textValue"
@
updateText=
"updateText"
></wTextarea>
-->
<el-input
type=
"textarea"
:disabled=
"editForm.object ? editForm.object.additionalType == '4' : false"
:rows=
"9"
maxlength=
"280"
show-word-limit
v-model=
"editForm.eventContent"
@
input=
"textInput"
style=
"-webkit-user-modify: read-write-plaintext-only !important; width: 656px"
placeholder=
"请输入营销文案"
></el-input>
<div
v-for=
"(itm, index) in previewList"
:key=
"itm.id"
>
<!-- additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) -->
...
...
@@ -56,7 +55,6 @@
<div
v-if=
"!itm.attContent.showVideoContent.length && itm.attContent.showImgContent.length"
>
<!--
<img
class=
"model-item-img"
:src=
"itm.attContent.showImgContent[0].attContent"
/>
-->
<el-image
v-for=
"(subItem, subIndex) in itm.attContent.showImgContent"
class=
"model-item-img"
:key=
"subIndex"
:src=
"subItem.attContent"
:preview-src-list=
"[subItem.attContent]"
></el-image>
<!--
<img
:key=
"subIndex"
:src=
"subItem.attContent"
/>
-->
</div>
</div>
<span
v-else
:title=
"itm.attContent.objectName"
>
{{
itm
.
attContent
.
objectName
}}
</span>
...
...
@@ -66,12 +64,8 @@
</div>
<div
class=
"btn-group"
>
<div
class=
"add-btn"
v-for=
"item in btnList"
:key=
"item.id"
>
<!-- <img :src="require(`@/assets/sop/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" /> -->
<img
class=
"event-icon"
:src=
"require(`@/assets/sop/add-${item.type}.png`)"
alt
/>
<!-- <span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span> -->
<span>
{{ item.name }}
</span>
<!-- <input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" /> -->
<el-link
style=
"opacity: 0"
@
click=
"handleFun(item.funName)"
>
{{ item.name }}
</el-link>
</div>
</div>
...
...
@@ -91,20 +85,10 @@
<ActivityModel
ref=
"activity"
@
selectActivity=
"selectActivity"
></ActivityModel>
<material-model
v-if=
"isMaterialVisible"
:isMaterialVisible
.
sync=
"isMaterialVisible"
@
handleMaterialConfirm=
"handleMaterialConfirm"
@
handleMaterialClose=
"handleMaterialClose"
></material-model>
<nickname-model
v-if=
"isNicknameVisible"
:isNicknameVisible
.
sync=
"isNicknameVisible"
@
handleNicknameConfirm=
"handleNicknameConfirm"
@
handleNicknameClose=
"handleNicknameClose"
></nickname-model>
<!-- <MessageModel ref="message" @selectItem="selectMessage"></MessageModel> -->
</div>
</template>
<
script
>
// const ATT_TYPE = {
// TEXT: 1,
// IMAGE: 2,
// VEDIO: 3,
// URL: 4,
// MINIPROGRAM: 5,
// FILE: 6,
// ACTIVITY: 7
// }
import
ActivityModel
from
'./components/activityModel'
import
materialModel
from
'./components/materialModel'
import
nicknameModel
from
'./components/nicknameModel'
...
...
@@ -119,11 +103,6 @@ export default {
editChildRef
:
'editChildRef'
,
isMaterialVisible
:
false
,
isNicknameVisible
:
false
,
// routeInfo: {
// // add-新增;edit-编辑;look-查看
// addOrEdit: 'add',
// id: ''
// },
editStatus
:
false
,
labelWidth
:
'144px'
,
editForm
:
{
...
...
@@ -144,20 +123,6 @@ export default {
// 营销内容
previewList
:
[],
btnList
:
[
// {
// id: 1,
// name: '表情',
// funcName: '',
// type: 'expression',
// limitSize: 10
// },
// {
// id: 2,
// name: '图片',
// funcName: '',
// type: 'img',
// limitSize: 10
// },
{
id
:
1
,
name
:
'素材'
,
...
...
@@ -405,20 +370,17 @@ export default {
created
()
{
this
.
getDay
(
'weekList'
,
7
)
this
.
getDay
(
'monthList'
,
31
)
// console.log(this.condLimitObj)
this
.
limitQwPhone
()
},
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
// this.editForm = JSON.parse(JSON.stringify(this.eventObj.info))
Object
.
assign
(
this
.
editForm
,
this
.
eventObj
.
info
)
console
.
log
(
this
.
editForm
)
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
// console.log(this.eventObj.addOrEdit)
this
.
eventObj
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
''
},
...
...
@@ -522,9 +484,6 @@ export default {
// 营销内容
handleFun
(
name
)
{
// if (name == 'nickname') {
// this.$refs.textContent.addTag('@昵称')
// } else
if
(
name
==
'material'
)
{
this
.
handleMaterialClose
()
}
...
...
@@ -534,9 +493,6 @@ export default {
if
(
name
==
'nickname'
)
{
this
.
handleNicknameClose
()
}
// else if (name == 'message') {
// this.$refs.message.init()
// }
},
close
(
index
)
{
...
...
@@ -546,7 +502,6 @@ export default {
this
.
editRule
.
eventContent
[
0
].
required
=
true
}
this
.
editForm
.
object
=
{}
// this.eventBus.$emit('update', this.previewList)
},
selectActivity
(
val
)
{
...
...
@@ -568,9 +523,7 @@ export default {
},
handleConfirm
()
{
console
.
log
(
this
.
editForm
)
// this.dealRepeatEventTotal()
// console.log(this.editForm)
var
countParams
=
{
eventStartDate
:
this
.
editForm
.
eventStartDate
,
eventEndDate
:
this
.
editForm
.
eventEndDate
,
...
...
src/views/sop/sopAnalysis/completeList.vue
View file @
3c0fb53
...
...
@@ -42,7 +42,6 @@
<
script
>
import
*
as
echarts
from
'echarts'
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
pieOption
}
from
'./pieOption'
export
default
{
...
...
@@ -174,10 +173,6 @@ export default {
option
&&
myChart
.
setOption
(
option
)
}
// handleSearch() {
// this.$refs.completeListRef.refreshTable()
// }
}
}
</
script
>
...
...
src/views/sop/sopAnalysis/staffList.vue
View file @
3c0fb53
...
...
@@ -40,7 +40,6 @@
<
script
>
import
*
as
echarts
from
'echarts'
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
pieOption
}
from
'./pieOption'
export
default
{
...
...
@@ -98,28 +97,6 @@ export default {
},
methods
:
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
()
}
})
}
}
})
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchForm
.
sopId
=
this
.
sopId
...
...
@@ -151,7 +128,6 @@ export default {
let
chartDom
=
document
.
getElementById
(
'completePie'
)
let
myChart
=
echarts
.
init
(
chartDom
)
let
option
=
JSON
.
parse
(
JSON
.
stringify
(
pieOption
))
// console.log(this.sopInfo.sopStatistics.issuedTaskCount)
option
.
series
[
0
].
data
=
[
{
value
:
this
.
sopInfo
.
sopStatistics
.
finishTaskCount
,
...
...
src/views/sop/sopAnalysis/touchList.vue
View file @
3c0fb53
...
...
@@ -42,12 +42,7 @@
<p
class=
"m-b-10"
>
客户触达明细
</p>
<!-- 表格区域 开始 -->
<GLTable
ref=
"touchListRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLButton
type=
"text"
fn=
"编辑"
@
click=
"handleEdit('edit', scope.scope)"
>
编辑
</GLButton>
<GLButton
type=
"text"
fn=
"删除"
@
click=
"handleDelete(scope.scope)"
>
删除
</GLButton>
</div>
</GLTable>
<GLTable
ref=
"touchListRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
<!-- 表格区域 end -->
</div>
</div>
...
...
@@ -186,55 +181,6 @@ export default {
})
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
// this.handleSearch()
}
})
}
}
})
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该礼包?'
,
'giftBag'
,
'deleteGiftApi'
,
{
id
:
row
.
id
})
},
// 查看
handleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/giftBag/giftDetail'
,
query
:
{
id
:
row
.
id
}
})
},
// add-新增;edit-编辑
handleEdit
(
addOrEdit
,
row
)
{
var
params
=
{
addOrEdit
:
addOrEdit
,
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增礼包'
:
'编辑礼包'
)
}
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
this
.
$router
.
push
({
path
:
'/giftBag/editGift'
,
query
:
params
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
...
...
@@ -287,10 +233,6 @@ export default {
option
&&
myChart
.
setOption
(
option
)
}
}
// handleSearch() {
// this.$refs.touchListRef.refreshTable()
// }
}
}
</
script
>
...
...
src/views/sop/sopList.vue
View file @
3c0fb53
...
...
@@ -42,7 +42,6 @@ export default {
sopName
:
''
,
sopStatus
:
''
},
// tableSearchForm: {},
// 搜索
searchFormData
:
[
{
...
...
@@ -139,22 +138,6 @@ export default {
query
:
row
?
{
id
:
row
.
id
,
fromPage
:
'sopList'
}
:
''
})
},
// getParams() {
// var params = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchForm.createDate.length) {
// params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
// params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
// }
// delete params.createDate
// return params
// },
// beforeSearchFn() {
// return new Promise(resolve => {
// this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate
// resolve()
// })
// },
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
...
...
@@ -179,7 +162,6 @@ export default {
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var
params
=
{
addOrEdit
:
addOrEdit
,
fromPage
:
'sopList'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment