Commit 49ce8679 by 杨明

fixed

1 parent 88272207
<template>
<div
class="journey"
v-loading="loading"
>
<div class="journey" v-loading="loading">
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="2"
:formObj="searchForm"
:formData="searchFormData"
:searchSelectObj="searchSelectObj"
@handleOk="handleSearch"
@handleRest="handleReset"
:key="FormKey"
></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="searchFormData" :searchSelectObj="searchSelectObj" @handleOk="handleSearch" @handleRest="handleReset" :key="FormKey"></GLCombiForm>
<div :class="['sticky-btns', { hiddenExport: viewType == 1 }]">
<div class="btns">
<el-button
type="default"
@click="refreshInst"
plain
>状态刷新</el-button>
<el-button
type="default"
@click="changeViewType"
>切换为{{viewType == 1?'列表':'看板'}}视图</el-button>
<el-button
type="default"
@click="handleExport"
>导出</el-button>
<el-button type="default" @click="refreshInst" plain>状态刷新</el-button>
<el-button type="default" @click="changeViewType">切换为{{ viewType == 1 ? '列表' : '看板' }}视图</el-button>
<el-button type="default" @click="handleExport">导出</el-button>
</div>
</div>
</div>
<template v-if="viewType == 1">
<div class="journey-data-view">
<data-view
:params="tableSearchForm"
ref="dataView"
:stageList="stageList"
></data-view>
<data-view :params="tableSearchForm" ref="dataView" :stageList="stageList"></data-view>
</div>
</template>
<template v-else>
......@@ -48,11 +22,7 @@
<template v-if="stageList && stageList.length">
<template v-for="(i, index) in stageList">
<template>
<div
:class="['tab', { active: searchForm.sopJourneyStage == i.value }]"
:key="index"
@click="changeTab(i.value)"
>
<div :class="['tab', { active: searchForm.sopJourneyStage == i.value }]" :key="index" @click="changeTab(i.value)">
{{ i.label }}
</div>
</template>
......@@ -61,11 +31,7 @@
</div>
</div>
<div class="journey-table">
<journey-table
ref="table"
:params="tableSearchForm"
:stageList="stageList"
></journey-table>
<journey-table ref="table" :params="tableSearchForm" :stageList="stageList"></journey-table>
</div>
</template>
</div>
......@@ -132,7 +98,8 @@ export default {
}
})
this.searchFormData[0].optionList = this.journeyList
this.searchForm.sopJourneyId = this.journeyList[0].instId
const {instId} = this.$route.query
this.searchForm.sopJourneyId = instId?instId:this.journeyList[0].instId
this.getStage(this.searchForm.sopJourneyId)
this.handleSearch()
})
......
......@@ -2,14 +2,14 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-10 14:47:39
* @LastEditTime: 2023-10-12 13:50:55
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="journey-main">
<div class="bg-fff p20">
<GLCombiForm ref="formSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="formSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="byGroupIdSop" @handleRest="handleReset"></GLCombiForm>
<div class="journey-body" v-if="journeyList.length">
<div class="journey-item" v-for="item in journeyList" :key="item.id">
<div class="journey-item-head flex-column-center ">
......@@ -62,10 +62,10 @@ export default {
searchFormData: [
{
label: '旅程',
name: 'instName',
name: 'instId',
type: 'select',
optionList: [],
optionId: 'instName',
optionId: 'instId',
optionLabel: 'instName'
},
{
......@@ -126,30 +126,27 @@ export default {
this.byGroupIdSop()
},
methods: {
byGroupIdSop() {
//this.$globalState.session.merchantId
this.$apis.journeyConfig.byGroupIdSop({ groupId: this.$globalState.session.merchantId, pageNumber: 1 }).then(res => {
this.journeyAllList = res.list || []
this.journeyAllList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
let process = 0
for (let k in stages) {
process++
item.journeyItem.push({
label: stages[k].value,
process
})
}
})
console.log(this.journeyAllList)
this.searchFormData[0].optionList = this.journeyAllList
async byGroupIdSop() {
const res = await this.$apis.journeyConfig.byGroupIdSop({ groupId: this.$globalState.session.merchantId, pageNumber: 1 })
this.journeyAllList = res.list || []
this.journeyAllList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
let process = 0
for (let k in stages) {
process++
item.journeyItem.push({
label: stages[k].value,
process
})
}
this.searchFormData[0].optionList = this.$common.utils.deepClone(this.journeyAllList)
this.handleSearch()
})
},
//状态值映射
getStatusValue(val, prop) {
console.log(val)
if (!val || !prop) return
return STATUS.find(item => item.value == val.instStatus)[prop]
},
handleEdit(item) {
......@@ -161,12 +158,11 @@ export default {
}
})
},
handleSearch() {
const { instStatus, instName } = this.searchForm
async handleSearch() {
const { instStatus, instId } = this.searchForm
this.journeyList = this.journeyAllList
console.log(instStatus, instName)
if (instName) {
this.journeyList = this.journeyList.filter(item => item.instName == instName)
if (instId) {
this.journeyList = this.journeyList.filter(item => item.instId == instId)
}
if (instStatus && instStatus.length) {
this.journeyList = this.journeyList.filter(item => instStatus.includes(item.instStatus))
......@@ -174,7 +170,7 @@ export default {
},
handleReset() {
this.searchForm = {}
this.handleSearch()
this.byGroupIdSop()
}
}
}
......@@ -184,7 +180,7 @@ export default {
font-size: 16px;
color: #999999;
text-align: center;
height: calc(100vh - 240px);
height: calc(100vh - 290px);
.empty-img {
width: 268px;
height: 88;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!