Commit 39e3b77f by 张立顺

fix bug

1 parent 5ff6c27e
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
<div> <div>
<span class="empTypeBtn" <span class="empTypeBtn"
:class="[item.selectStaffValue.length ? 'select' : '', activeBtnIndex == item.selectStaffType ? 'activeBtn' : '']" :class="[item.selectStaffValue.length ? 'select' : '', activeBtnIndex == item.selectStaffType ? 'activeBtn' : '']"
v-for="(item, index) in empTypeList" :key="index" effect="dark" v-for="(item, index) in empTypeListFilter" :key="index" effect="dark"
@click="activeBtnIndex = item.selectStaffType"> @click="activeBtnIndex = item.selectStaffType">
{{ item.label }} {{ item.label }}
</span> </span>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<span class="radio-box empTypeBtn" @click="addEmp">选择标签</span> <span class="radio-box empTypeBtn" @click="addEmp">选择标签</span>
<div v-loading="customerLoading"> <div v-loading="customerLoading">
<div class="customer-box m-t-10"> <div class="customer-box m-t-10">
<div class="itemLabel" v-for="(item, iemSubIdx) in empTypeList" :key="iemSubIdx"> <div class="itemLabel" v-for="(item, iemSubIdx) in empTypeListFilter" :key="iemSubIdx">
<span v-if="item.selectStaffValue.length"> <span v-if="item.selectStaffValue.length">
{{ item.label }} {{ item.label }}
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
...@@ -745,13 +745,7 @@ export default { ...@@ -745,13 +745,7 @@ export default {
this.$refs.ruleForm.validateField("imageList") this.$refs.ruleForm.validateField("imageList")
}, },
"formData.contentType"(val) { "formData.contentType"(val) {
this.empTypeList = this.empTypeList.map(item => {
item.selectStaffValue = []
return item
})
this.groupVisible = false
this.getCustomerByTagList("filtrate")
// this
if (val == 4 || val == 5) { if (val == 4 || val == 5) {
this.formData.sendChannelType = 2 this.formData.sendChannelType = 2
} }
...@@ -773,13 +767,19 @@ export default { ...@@ -773,13 +767,19 @@ export default {
}, },
filterSopType() { filterSopType() {
return this.configList.map(item => item.selectStaffType) return this.configList.map(item => item.selectStaffType)
} },
},
filters: {
empTypeListFilter(type) { empTypeListFilter(type) {
return this.formData.contentType == 5 ? this.empTypeList.filter((i) => i.selectStaffType != 10) : this.empTypeList const list = deepClone(this.empTypeList)
const filterList = this.empTypeList.filter((i) => i.selectStaffType != 10)
// this.$forceUpdate()
return this.formData.contentType == 5 ? list : filterList
} }
}, },
// filters: {
// empTypeListFilter(type) {
// return this.formData.contentType == 5 ? this.empTypeList.filter((i) => i.selectStaffType != 10) : this.empTypeList
// }
// },
mounted() { mounted() {
const { id, contentType, selectStaffType } = this.$route.query const { id, contentType, selectStaffType } = this.$route.query
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
...@@ -1004,6 +1004,12 @@ export default { ...@@ -1004,6 +1004,12 @@ export default {
this.formData.imageList = [] this.formData.imageList = []
this.formData.content = "" this.formData.content = ""
this.uploading = false this.uploading = false
this.empTypeList = this.empTypeList.map(item => {
item.selectStaffValue = []
return item
})
this.groupVisible = false
this.getCustomerByTagList("filtrate")
}, },
getTaskRecord(taskId) { getTaskRecord(taskId) {
contentManagerTaskRecordPage({ contentManagerTaskRecordPage({
...@@ -1053,6 +1059,7 @@ export default { ...@@ -1053,6 +1059,7 @@ export default {
) )
} else if (key == "extendConfig" && res.extendConfig.deadline) { } else if (key == "extendConfig" && res.extendConfig.deadline) {
// [res.extendConfig.deadline] // [res.extendConfig.deadline]
this.formData.extendConfig = res.extendConfig
this.formData.extendConfig.deadline = Util.dateFormate( this.formData.extendConfig.deadline = Util.dateFormate(
res.extendConfig.deadline, res.extendConfig.deadline,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
......
<template> <template>
<d2-dialog title="选择区域" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="50%" <d2-dialog title="选择区域" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="30%"
@closeDialog="handleClose" @confirmDialog="handleConfirm"> @closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline"> <el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="区域名称:"> <el-form-item label="区域名称:">
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button> <el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="resetChecked">清空</el-button>
<!-- <el-button type="primary" @click="onSearch">查询</el-button> -->
</el-form-item>
</el-form> </el-form>
<div class="content"> <div class="content">
<div class="tree-box"> <div class="tree-box">
...@@ -15,20 +19,20 @@ ...@@ -15,20 +19,20 @@
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" <el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree> show-checkbox @check-change="handleNodeClick"></el-tree>
</div> </div>
<div class="check-box"> <!-- <div class="check-box">
<div class="title">已选区域 <div class="title">已选区域
<el-button type="text" @click="resetChecked">清空</el-button> <el-button type="text" @click="resetChecked">清空</el-button>
</div> </div>
<template v-if="checkList.length == 0"> <template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div> <div class="no-data">暂无数据</div>
</template> </template>
<template v-else> <template v-else>
<div class="check-list"> <div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close" <div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div> @click="closeChecked(item)"></i></div>
</div> </div>
</template> </template>
</div> </div> -->
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -195,7 +199,7 @@ export default { ...@@ -195,7 +199,7 @@ export default {
background: #ffffff; background: #ffffff;
height: 324px; height: 324px;
overflow-y: auto; overflow-y: auto;
width: 50%; width: 100%;
margin-right: 20px; margin-right: 20px;
.tree-title { .tree-title {
......
<template> <template>
<d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="50%" <d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="30%"
@closeDialog="handleClose" @confirmDialog="handleConfirm"> @closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline"> <el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:"> <el-form-item label="品牌名称:">
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button> <el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="resetChecked">清空</el-button>
</el-form-item>
</el-form> </el-form>
<div class="content"> <div class="content">
<div class="tree-box"> <div class="tree-box">
...@@ -15,20 +18,20 @@ ...@@ -15,20 +18,20 @@
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" <el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree> show-checkbox @check-change="handleNodeClick"></el-tree>
</div> </div>
<div class="check-box"> <!-- <div class="check-box">
<div class="title">已选品牌 <div class="title">已选品牌
<el-button type="text" @click="resetChecked">清空</el-button> <el-button type="text" @click="resetChecked">清空</el-button>
</div> </div>
<template v-if="checkList.length == 0"> <template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div> <div class="no-data">暂无数据</div>
</template> </template>
<template v-else> <template v-else>
<div class="check-list"> <div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close" <div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div> @click="closeChecked(item)"></i></div>
</div> </div>
</template> </template>
</div> </div> -->
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -198,7 +201,7 @@ export default { ...@@ -198,7 +201,7 @@ export default {
background: #ffffff; background: #ffffff;
height: 324px; height: 324px;
overflow-y: auto; overflow-y: auto;
width: 50%; width: 100%;
margin-right: 20px; margin-right: 20px;
......
...@@ -161,7 +161,7 @@ export const PUNISH_OPTIONS = [ ...@@ -161,7 +161,7 @@ export const PUNISH_OPTIONS = [
{ {
label: "未触发", label: "未触发",
id: "1", id: "1",
backgroundColor: "##FDB757" backgroundColor: "#FDB757"
}, },
{ {
label: "处罚中", label: "处罚中",
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
</div> </div>
</div> </div>
<div slot="punishStatus" slot-scope="scope"> <div slot="punishStatus" slot-scope="scope">
<!-- PUNISH_OPTIONS -->
<div class="online-status"> <div class="online-status">
<span class="dot" <span class="dot"
:style="{ background: PUNISH_OPTIONS.find(item => item.id == scope.scope.punishStatus).backgroundColor }"></span> :style="{ background: PUNISH_OPTIONS.find(item => item.id == scope.scope.punishStatus).backgroundColor }"></span>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!