Commit 49ce8679 by 杨明

fixed

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