Commit db19ffa0 by 前端

版本第一轮BUG修复

1 parent 37306d8c
...@@ -937,9 +937,9 @@ export const businessOpt = [ ...@@ -937,9 +937,9 @@ export const businessOpt = [
// 预警管理 优先级 // 预警管理 优先级
export const priorityOpt = [ export const priorityOpt = [
{ confId: 1, confValue: "1" }, { confId: 1, confValue: "高" },
{ confId: 2, confValue: "2" }, { confId: 2, confValue: "中" },
{ confId: 3, confValue: "3" } { confId: 3, confValue: "低" }
] ]
// 预警管理 预警阶段 // 预警管理 预警阶段
......
...@@ -87,14 +87,10 @@ export function limitPriceForNegative(newValue) { ...@@ -87,14 +87,10 @@ export function limitPriceForNegative(newValue) {
} }
/** /**
* 时间控件-限制月份 * 时间控件-限制只能选当前及之前的时间
*/ */
export const rangePickerOptions = { export const rangePickerOptions = {
disabledDate(date) { disabledDate(date) {
// console.log(date)
// console.log(new Date())
if (date > new Date()) { if (date > new Date()) {
return true return true
} }
...@@ -103,6 +99,15 @@ export const rangePickerOptions = { ...@@ -103,6 +99,15 @@ export const rangePickerOptions = {
} }
/** /**
* 时间控件-限制只能选当前及之后的时间
*/
export const afterPickerOptions = {
disabledDate(date) {
return date.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
}
}
/**
* 时间控件-(0-30天内的日期) * 时间控件-(0-30天内的日期)
*/ */
export const appointDays = 35 export const appointDays = 35
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<el-form-item label="优先级:" <el-form-item label="优先级:"
class="halfItem"> class="halfItem">
{{ {{
paramsObj.priorityLevel ? paramsObj.priorityLevel : "-" paramsObj.priorityLevel ? priorityShowText[paramsObj.priorityLevel] : "-"
}} }}
</el-form-item> </el-form-item>
</div> </div>
...@@ -205,7 +205,12 @@ export default { ...@@ -205,7 +205,12 @@ export default {
}] }]
}, },
cycleShow: '', // 预警周期显示 cycleShow: '', // 预警周期显示
createTimeShow: ''// 创建时间显示 createTimeShow: '', // 创建时间显示
priorityShowText: {
1: '高',
2: '中',
3: '低'
}
} }
}, },
methods: { methods: {
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
type="datetime" type="datetime"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
placeholder="选择日期时间"> placeholder="选择日期时间"
:picker-options="pickerOption['afterPickerOptions']">
</el-date-picker> </el-date-picker>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -41,11 +42,15 @@ ...@@ -41,11 +42,15 @@
import { saveFollowRecord } from '@api/earlyWarningManager' import { saveFollowRecord } from '@api/earlyWarningManager'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { findMerchantStaffList } from '@api/index' import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions } from '@/common/format'
// import { baseConfig } from '@/main' // import { baseConfig } from '@/main'
export default { export default {
name: 'HandleDialog', name: 'HandleDialog',
data() { data() {
return { return {
pickerOption: {
afterPickerOptions: afterPickerOptions
},
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
followStatus: 1, followStatus: 1,
...@@ -133,6 +138,7 @@ export default { ...@@ -133,6 +138,7 @@ export default {
console.log('this.paramsObj', this.paramsObj) console.log('this.paramsObj', this.paramsObj)
if (this.paramsObj.status) { if (this.paramsObj.status) {
this.infoForm.followStatus = this.paramsObj.status this.infoForm.followStatus = this.paramsObj.status
this.followStatusChange(this.infoForm.followStatus)
} }
this.findMerchantStaffList() this.findMerchantStaffList()
this.getOptionsList('editFormData', false) this.getOptionsList('editFormData', false)
......
<!-- 预警明细 --> <!-- 预警明细 -->
<template> <template>
<div> <!-- <div> -->
<div class="d2-container-content" <d2-container class="m-t-40">
style="padding: 10px 20px;"> <!-- <div class="d2-container-content"
style="padding: 10px 20px;"> -->
<div class="header"
slot="header">
<d2-search ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
...@@ -19,6 +22,7 @@ ...@@ -19,6 +22,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<!-- </div> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
...@@ -71,7 +75,8 @@ ...@@ -71,7 +75,8 @@
v-if="handleVisible" v-if="handleVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeHandleDialog" /> @dialogClose="closeHandleDialog" />
</div> </d2-container>
<!-- </div> -->
</template> </template>
<script> <script>
...@@ -129,6 +134,7 @@ export default { ...@@ -129,6 +134,7 @@ export default {
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'ruleTypeOpt', optionsName: 'ruleTypeOpt',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
console.log('value', value)
this.baseData.warningItemsOpt = [] this.baseData.warningItemsOpt = []
if (value) { if (value) {
var warningItems = this.baseData.ruleTypeOpt.find(item => item.confId == value).items var warningItems = this.baseData.ruleTypeOpt.find(item => item.confId == value).items
...@@ -138,8 +144,11 @@ export default { ...@@ -138,8 +144,11 @@ export default {
confValue: item confValue: item
}) })
}) })
this.getOptionsList() } else { // 清空预警事项选项
this.searchForm.warningItems = ''
this.baseData.warningItemsOpt = []
} }
this.getOptionsList()
} }
}, { }, {
label: '预警事项', label: '预警事项',
...@@ -387,8 +396,7 @@ export default { ...@@ -387,8 +396,7 @@ export default {
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.findAllData() this.findAllData(1)
// this.findAllData(2)
this.findAllPersonRelations(1) this.findAllPersonRelations(1)
this.findAllPersonRelations(2) this.findAllPersonRelations(2)
this.getOptionsList() this.getOptionsList()
...@@ -396,15 +404,22 @@ export default { ...@@ -396,15 +404,22 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
console.log('this.searchForm.warnCycle', this.searchForm.warnCycle)
if (this.searchForm.warnCycle) { if (this.searchForm.warnCycle) {
this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD') this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD')
this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD') this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD')
delete this.searchForm.warnCycle delete this.searchForm.warnCycle
} else {
delete this.searchForm.warningStartDate
delete this.searchForm.warningEndDate
} }
if (this.searchForm.createTime) { if (this.searchForm.createTime) {
this.searchForm.startDate = Util.dateFormate(this.searchForm.createTime[0], 'YYYY-MM-DD') this.searchForm.startDate = Util.dateFormate(this.searchForm.createTime[0], 'YYYY-MM-DD')
this.searchForm.endDate = Util.dateFormate(this.searchForm.createTime[1], 'YYYY-MM-DD') this.searchForm.endDate = Util.dateFormate(this.searchForm.createTime[1], 'YYYY-MM-DD')
delete this.searchForm.createTime delete this.searchForm.createTime
} else {
delete this.searchForm.startDate
delete this.searchForm.endDate
} }
resolve() resolve()
}) })
...@@ -428,13 +443,16 @@ export default { ...@@ -428,13 +443,16 @@ export default {
bussinessType: '', bussinessType: '',
statusList: [] statusList: []
} }
// 清空预警事项选项
this.baseData.warningItemsOpt = []
this.getOptionsList()
this.$refs.detailListTable.refreshTable() this.$refs.detailListTable.refreshTable()
}, },
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '状态'
) { ) {
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = '' temp[this.showFormData[index].optionId] = ''
...@@ -451,7 +469,7 @@ export default { ...@@ -451,7 +469,7 @@ export default {
}, },
findAllData(type) { findAllData(type) {
const params = { Type: type } const params = { type: type }
findAllData(params).then((res) => { findAllData(params).then((res) => {
let obj let obj
for (var key in res) { for (var key in res) {
...@@ -535,6 +553,9 @@ export default { ...@@ -535,6 +553,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
@mixin priorityBase { @mixin priorityBase {
// margin-left: auto; // margin-left: auto;
width: 32px; width: 32px;
......
<!-- 员工预警管理 --> <!-- 员工预警管理 -->
<template> <template>
<d2-container class="staffWarn"> <div class="staffWarn">
<div class="header"
slot="header">
<el-tabs v-model="activeName"
@tab-click="handleClickTabs">
<el-tab-pane label="预警看板"
name="noticeBoard" />
<el-tab-pane label="预警明细"
name="details" />
</el-tabs>
<div>
<notice-board v-if="activeName === 'noticeBoard'"
@gotoDetail="gotoDetail" />
<staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" />
</div>
</div>
</div>
<!-- <d2-container class="staffWarn">
<div class="header" <div class="header"
slot="header"> slot="header">
<el-tabs v-model="activeName" <el-tabs v-model="activeName"
...@@ -17,7 +35,7 @@ ...@@ -17,7 +35,7 @@
<staff-detail v-if="activeName === 'details'" <staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" /> :params-obj="recordInfo" />
</div> </div>
</d2-container> </d2-container> -->
</template> </template>
<script> <script>
...@@ -56,8 +74,14 @@ export default { ...@@ -56,8 +74,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// .staffWarn .el-tabs__header { .staffWarn {
// margin: 0; padding: 0 20px;
// padding: 0 20px;
// } .header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style> </style>
<!-- 预警看板 --> <!-- 预警看板 -->
<template> <template>
<div> <!-- <div> -->
<div class="d2-container-content" <d2-container class="m-t-40">
style="padding: 10px 20px;"> <!-- <div class="d2-container-content"
style="padding: 10px 20px;"> -->
<div class="header"
slot="header">
<d2-search ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
...@@ -19,65 +22,8 @@ ...@@ -19,65 +22,8 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<!-- <div class="mainDiv"> <div class="mainDiv"
<div class="table-box" v-if="resultList.length > 0">
v-for="item in 5"
:key="item">
<div class="name-info">
<span class="name-info-name">李小瑶11111</span>
<span class="name-info-phone">18903205301</span>
<span class="name-info-status">已预约处理</span>
<span class="name-info-type-blue">轻改</span>
</div>
<div class="item-info">
<span class="item-info-label">所属督导:</span>
<span class="item-info-msg">
<el-tooltip class="item"
effect="dark"
:content="testRemark"
placement="right">
<span>
{{ testRemark ? (testRemark.length > 30 ? (testRemark.slice(0, 30) + '...') : testRemark) : '' }}
</span>
</el-tooltip>
</span>
</div>
<div class="item-info">
<span class="item-info-label">所属销售:</span>
<span class="item-info-msg">谢万新/叶雪/叶雪/叶雪/叶雪/叶雪</span>
</div>
<div class="item-info">
<span class="item-info-label">所属门店:</span>
<span class="item-info-msg">山东世纪奔腾汽车销售服务有限公司</span>
</div>
<div class="item-event">
<div class="item-event-big">
<span class="item-event-big-name">打卡日报1111111111</span>
<span class="item-event-big-priority-one">1</span>
<span class="item-event-big-stage-two">第二阶段</span>
</div>
<div class="item-event-small">
连续3天未填写日报 / 2024-01-01至2024-01-07
</div>
</div>
<div class="item-event">
<div class="item-event-big">
<span class="item-event-big-name">打卡日报2222222</span>
<span class="item-event-big-priority-two">2</span>
<span class="item-event-big-stage-one">第一阶段</span>
</div>
<div class="item-event-small">
连续3天未填写日报 / 2024-01-01至2024-01-07
</div>
</div>
<div class="item-statistics">
<span class="item-statistics-msg">共计32项待处理预警</span>
<span class="item-statistics-btn"
@click="handleClickMore">查看更多</span>
</div>
</div>
</div> -->
<div class="mainDiv">
<div class="table-box" <div class="table-box"
v-for="(item,index) in resultList" v-for="(item,index) in resultList"
:key="index"> :key="index">
...@@ -147,7 +93,22 @@ ...@@ -147,7 +93,22 @@
</div> </div>
</div> </div>
</div> </div>
</div> <div class="mainDiv-noData"
v-else>
暂无数据
</div>
<div class="mainDiv-pagination">
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="page.pageSize"
:total="total"
:layout="layout" />
</div>
</d2-container>
<!-- </div> -->
</template> </template>
<script> <script>
...@@ -158,7 +119,12 @@ export default { ...@@ -158,7 +119,12 @@ export default {
name: 'NoticeBoard', name: 'NoticeBoard',
data() { data() {
return { return {
testRemark: '马小铭/刘德康/谢万新/叶雪/马小铭/刘德康/谢万新/叶雪/马小铭/刘德康/谢万新/叶雪', page: {
pageSize: 10,
pageNum: 1
},
layout: "sizes,total,->,prev,pager,next,jumper",
total: 10,
searchForm: { searchForm: {
staffName: '', staffName: '',
staffPhone: '', staffPhone: '',
...@@ -240,17 +206,6 @@ export default { ...@@ -240,17 +206,6 @@ export default {
this.staffWarningMsgListWithPage() this.staffWarningMsgListWithPage()
}, },
// beforeSearchFn() {
// return new Promise(resolve => {
// if (this.searchForm.categoryName) {
// this.searchForm.categoryName = this.baseData.categoryList.find(item => item.id == this.searchForm.categoryName).categoryName
// }
// resolve()
// })
// },
// keyDowmGetList() {
// this.$refs.sceneListTable.refreshTable()
// },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
staffName: '', staffName: '',
...@@ -281,19 +236,18 @@ export default { ...@@ -281,19 +236,18 @@ export default {
}, },
staffWarningMsgListWithPage() { staffWarningMsgListWithPage() {
var params = Util.deepClone(this.searchForm) var params = { ...this.page, ...Util.deepClone(this.searchForm) }
params.pageNum = 1
params.pageSize = 10000
staffWarningMsgListWithPage(params).then((res) => { staffWarningMsgListWithPage(params).then((res) => {
this.resultList = res.list this.resultList = res.list
this.total = res.total
this.resultList.forEach((item) => { this.resultList.forEach((item) => {
if (item.warningMsgs && item.warningMsgs.length > 0) { if (item.warningMsgs && item.warningMsgs.length > 0) {
item.warningMsgs.forEach((item2) => { item.warningMsgs.forEach((item2) => {
item2.starDateShow = item2.starDate item2.starDateShow = item2.starDate
? Util.dateFormate(res.starDate, "YYYY-MM-DD") ? Util.dateFormate(item2.starDate, "YYYY-MM-DD")
: "--" : "--"
item2.endDateShow = item2.endDate item2.endDateShow = item2.endDate
? Util.dateFormate(res.endDate, "YYYY-MM-DD") ? Util.dateFormate(item2.endDate, "YYYY-MM-DD")
: "--" : "--"
}) })
if (item.warningMsgs.length > 2) { if (item.warningMsgs.length > 2) {
...@@ -307,32 +261,66 @@ export default { ...@@ -307,32 +261,66 @@ export default {
handleClickMore(obj) { handleClickMore(obj) {
obj.statusList = [1, 2] obj.statusList = [1, 2]
this.$emit('gotoDetail', obj) this.$emit('gotoDetail', obj)
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.refreshTable()
},
// 页码
handleCurrentChange(value) {
this.page.pageNum = value
this.refreshTable()
},
// 重置请求
refreshTable() {
this.staffWarningMsgListWithPage()
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
.mainDiv { .mainDiv {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background: white; background: white;
margin-top: 20px; margin-top: 20px;
} }
.mainDiv-noData {
background: white;
margin-top: 20px;
min-height: 60px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
}
.mainDiv-pagination {
background: white;
padding: 20px 20px;
}
.table-box { .table-box {
// position: relative; // position: relative;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: column; flex-direction: column;
margin: 20px 0 0 20px; margin: 20px 0 0 20px;
width: 570px; // width: 570px;
width: 520px;
min-height: 306px; min-height: 306px;
border-radius: 8px; border-radius: 8px;
border: 1px solid #0000001a; border: 1px solid #0000001a;
background: #ffffff; background: #ffffff;
box-shadow: 0 0 8px 0 #0000000d; box-shadow: 0 0 8px 0 #0000000d;
.name-info { .name-info {
width: 538px; // width: 538px;
width: 488px;
height: 24px; height: 24px;
margin: 12px 0 0 16px; margin: 12px 0 0 16px;
display: flex; display: flex;
...@@ -385,7 +373,8 @@ export default { ...@@ -385,7 +373,8 @@ export default {
} }
} }
.item-info { .item-info {
width: 538px; // width: 538px;
width: 488px;
height: 20px; height: 20px;
margin: 12px 0 0 16px; margin: 12px 0 0 16px;
.item-info-label { .item-info-label {
...@@ -399,13 +388,12 @@ export default { ...@@ -399,13 +388,12 @@ export default {
} }
.item-event { .item-event {
width: 538px; // width: 538px;
width: 488px;
margin: 12px 0 0 16px; margin: 12px 0 0 16px;
border-bottom: 1px solid #0000001a; border-bottom: 1px solid #0000001a;
.item-event-big { .item-event-big {
// width: 538px;
height: 21px; height: 21px;
// margin: 12px 0 0 16px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -461,9 +449,7 @@ export default { ...@@ -461,9 +449,7 @@ export default {
} }
} }
.item-event-small { .item-event-small {
// width: 538px;
height: 20px; height: 20px;
// margin: 12px 0 0 16px;
margin: 8px 0 8px 0; margin: 8px 0 8px 0;
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
...@@ -473,10 +459,10 @@ export default { ...@@ -473,10 +459,10 @@ export default {
.item-statistics { .item-statistics {
// position: absolute; // position: absolute;
// bottom: 0; // bottom: 0;
width: 538px; // width: 538px;
width: 488px;
height: 20px; height: 20px;
margin: 12px 0 12px 16px; margin: 12px 0 12px 16px;
// padding: 12px 0 12px 12px;
.item-statistics-msg { .item-statistics-msg {
min-width: 129px; min-width: 129px;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
class="detail-content-warn"> class="detail-content-warn">
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<div class="div-title">员工信息</div> <div class="div-title">门店信息</div>
<el-form class="edit-sub-block" <el-form class="edit-sub-block"
label-width="150px" label-width="150px"
:inline="true"> :inline="true">
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
class="halfItem"> class="halfItem">
{{ paramsObj.merchantName4s ? paramsObj.merchantName4s : "-" }} {{ paramsObj.merchantName4s ? paramsObj.merchantName4s : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="手机号:" <el-form-item label="商户号:"
class="halfItem"> class="halfItem">
{{ paramsObj.staffPhone {{ paramsObj.merchantId4s
? paramsObj.staffPhone ? paramsObj.merchantId4s
: "-" }} : "-" }}
</el-form-item> </el-form-item>
</div> </div>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<el-form-item label="优先级:" <el-form-item label="优先级:"
class="halfItem"> class="halfItem">
{{ {{
paramsObj.priorityLevel ? paramsObj.priorityLevel : "-" paramsObj.priorityLevel ? priorityShowText[paramsObj.priorityLevel] : "-"
}} }}
</el-form-item> </el-form-item>
</div> </div>
...@@ -201,7 +201,12 @@ export default { ...@@ -201,7 +201,12 @@ export default {
}] }]
}, },
cycleShow: '', // 预警周期显示 cycleShow: '', // 预警周期显示
createTimeShow: ''// 创建时间显示 createTimeShow: '', // 创建时间显示
priorityShowText: {
1: '高',
2: '中',
3: '低'
}
} }
}, },
methods: { methods: {
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
type="datetime" type="datetime"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
placeholder="选择日期时间"> placeholder="选择日期时间"
:picker-options="pickerOption['afterPickerOptions']">
</el-date-picker> </el-date-picker>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -41,11 +42,15 @@ ...@@ -41,11 +42,15 @@
import { saveFollowRecord } from '@api/earlyWarningManager' import { saveFollowRecord } from '@api/earlyWarningManager'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { findMerchantStaffList } from '@api/index' import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions } from '@/common/format'
// import { baseConfig } from '@/main' // import { baseConfig } from '@/main'
export default { export default {
name: 'HandleDialog', name: 'HandleDialog',
data() { data() {
return { return {
pickerOption: {
afterPickerOptions: afterPickerOptions
},
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
followStatus: 1, followStatus: 1,
...@@ -131,6 +136,10 @@ export default { ...@@ -131,6 +136,10 @@ export default {
mounted() { mounted() {
this.findMerchantStaffList() this.findMerchantStaffList()
if (this.paramsObj.status) {
this.infoForm.followStatus = this.paramsObj.status
this.followStatusChange(this.infoForm.followStatus)
}
this.getOptionsList('editFormData', false) this.getOptionsList('editFormData', false)
}, },
......
<!-- 预警明细 --> <!-- 预警明细 -->
<template> <template>
<div> <!-- <div> -->
<div class="d2-container-content" <d2-container class="m-t-40">
style="padding: 10px 20px;"> <!-- <div class="d2-container-content"
style="padding: 10px 20px;"> -->
<div class="header"
slot="header">
<d2-search ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
...@@ -19,6 +22,7 @@ ...@@ -19,6 +22,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<!-- </div> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
...@@ -71,7 +75,8 @@ ...@@ -71,7 +75,8 @@
v-if="handleVisible" v-if="handleVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeHandleDialog" /> @dialogClose="closeHandleDialog" />
</div> </d2-container>
<!-- </div> -->
</template> </template>
<script> <script>
...@@ -129,8 +134,11 @@ export default { ...@@ -129,8 +134,11 @@ export default {
confValue: item confValue: item
}) })
}) })
this.getOptionsList() } else { // 清空预警事项选项
this.searchForm.warningItems = ''
this.baseData.warningItemsOpt = []
} }
this.getOptionsList()
} }
}, { }, {
label: '预警事项', label: '预警事项',
...@@ -368,7 +376,7 @@ export default { ...@@ -368,7 +376,7 @@ export default {
// ...mapActions('d2admin/user', ['actionSetDownloadList']), // ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.findAllData() this.findAllData(2)
this.findAllPersonRelations(1) this.findAllPersonRelations(1)
this.findAllPersonRelations(2) this.findAllPersonRelations(2)
this.getOptionsList() this.getOptionsList()
...@@ -380,11 +388,17 @@ export default { ...@@ -380,11 +388,17 @@ export default {
this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD') this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD')
this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD') this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD')
delete this.searchForm.warnCycle delete this.searchForm.warnCycle
} else {
delete this.searchForm.warningStartDate
delete this.searchForm.warningEndDate
} }
if (this.searchForm.createTime) { if (this.searchForm.createTime) {
this.searchForm.startDate = Util.dateFormate(this.searchForm.createTime[0], 'YYYY-MM-DD') this.searchForm.startDate = Util.dateFormate(this.searchForm.createTime[0], 'YYYY-MM-DD')
this.searchForm.endDate = Util.dateFormate(this.searchForm.createTime[1], 'YYYY-MM-DD') this.searchForm.endDate = Util.dateFormate(this.searchForm.createTime[1], 'YYYY-MM-DD')
delete this.searchForm.createTime delete this.searchForm.createTime
} else {
delete this.searchForm.startDate
delete this.searchForm.endDate
} }
resolve() resolve()
}) })
...@@ -406,13 +420,16 @@ export default { ...@@ -406,13 +420,16 @@ export default {
bussinessType: '', bussinessType: '',
statusList: [] statusList: []
} }
// 清空预警事项选项
this.baseData.warningItemsOpt = []
this.getOptionsList()
this.$refs.detailListTable.refreshTable() this.$refs.detailListTable.refreshTable()
}, },
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '状态'
) { ) {
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = '' temp[this.showFormData[index].optionId] = ''
...@@ -429,7 +446,7 @@ export default { ...@@ -429,7 +446,7 @@ export default {
}, },
findAllData(type) { findAllData(type) {
const params = { Type: type } const params = { type: type }
findAllData(params).then((res) => { findAllData(params).then((res) => {
console.log(res) console.log(res)
let obj let obj
...@@ -514,6 +531,9 @@ export default { ...@@ -514,6 +531,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
@mixin priorityBase { @mixin priorityBase {
// margin-left: auto; // margin-left: auto;
width: 32px; width: 32px;
......
<!-- 门店预警管理 --> <!-- 门店预警管理 -->
<template> <template>
<d2-container class="staffWarn"> <div class="staffWarn">
<div class="header" <div class="header"
slot="header"> slot="header">
<el-tabs v-model="activeName" <el-tabs v-model="activeName"
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
<el-tab-pane label="预警明细" <el-tab-pane label="预警明细"
name="details" /> name="details" />
</el-tabs> </el-tabs>
<div>
<notice-board v-if="activeName === 'noticeBoard'"
@gotoDetail="gotoDetail" />
<staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" />
</div>
</div> </div>
<div> </div>
<notice-board v-if="activeName === 'noticeBoard'"
@gotoDetail="gotoDetail" />
<staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" />
</div>
</d2-container>
</template> </template>
<script> <script>
...@@ -55,9 +55,15 @@ export default { ...@@ -55,9 +55,15 @@ export default {
} }
</script> </script>
<style > <style lang="scss" scoped>
.staffWarn .el-tabs__header { .staffWarn {
margin: 0;
padding: 0 20px; padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
} }
</style> </style>
<!-- 预警看板 --> <!-- 预警看板 -->
<template> <template>
<div> <!-- <div> -->
<div class="d2-container-content" <d2-container class="m-t-40">
style="padding: 10px 20px;"> <!-- <div class="d2-container-content"
style="padding: 10px 20px;"> -->
<div class="header"
slot="header">
<d2-search ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
...@@ -19,7 +22,9 @@ ...@@ -19,7 +22,9 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="mainDiv"> <!-- </div> -->
<div class="mainDiv"
v-if="resultList.length > 0">
<div class="table-box" <div class="table-box"
v-for="(item,index) in resultList" v-for="(item,index) in resultList"
:key="index"> :key="index">
...@@ -76,7 +81,22 @@ ...@@ -76,7 +81,22 @@
</div> </div>
</div> </div>
</div> </div>
</div> <div class="mainDiv-noData"
v-else>
暂无数据
</div>
<div class="mainDiv-pagination">
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="page.pageSize"
:total="total"
:layout="layout" />
</div>
</d2-container>
<!-- </div> -->
</template> </template>
<script> <script>
...@@ -87,6 +107,12 @@ export default { ...@@ -87,6 +107,12 @@ export default {
name: 'NoticeBoard', name: 'NoticeBoard',
data() { data() {
return { return {
page: {
pageSize: 10,
pageNum: 1
},
layout: "sizes,total,->,prev,pager,next,jumper",
total: 10,
searchForm: { searchForm: {
merchantName: '', merchantName: '',
bussinessType: '' bussinessType: ''
...@@ -190,10 +216,10 @@ export default { ...@@ -190,10 +216,10 @@ export default {
if (item.warningMsgs && item.warningMsgs.length > 0) { if (item.warningMsgs && item.warningMsgs.length > 0) {
item.warningMsgs.forEach((item2) => { item.warningMsgs.forEach((item2) => {
item2.starDateShow = item2.starDate item2.starDateShow = item2.starDate
? Util.dateFormate(res.starDate, "YYYY-MM-DD") ? Util.dateFormate(item2.starDate, "YYYY-MM-DD")
: "--" : "--"
item2.endDateShow = item2.endDate item2.endDateShow = item2.endDate
? Util.dateFormate(res.endDate, "YYYY-MM-DD") ? Util.dateFormate(item2.endDate, "YYYY-MM-DD")
: "--" : "--"
}) })
if (item.warningMsgs.length > 2) { if (item.warningMsgs.length > 2) {
...@@ -207,32 +233,66 @@ export default { ...@@ -207,32 +233,66 @@ export default {
handleClickMore(obj) { handleClickMore(obj) {
obj.statusList = [1, 2] obj.statusList = [1, 2]
this.$emit('gotoDetail', obj) this.$emit('gotoDetail', obj)
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.refreshTable()
},
// 页码
handleCurrentChange(value) {
this.page.pageNum = value
this.refreshTable()
},
// 重置请求
refreshTable() {
this.staffWarningMsgListWithPage()
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
.mainDiv { .mainDiv {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background: white; background: white;
margin-top: 20px; margin-top: 20px;
} }
.mainDiv-noData {
background: white;
margin-top: 20px;
min-height: 60px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
}
.mainDiv-pagination {
background: white;
padding: 20px 20px;
}
.table-box { .table-box {
// position: relative; // position: relative;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: column; flex-direction: column;
margin: 20px 0 0 20px; margin: 20px 0 0 20px;
width: 570px; // width: 570px;
min-height: 306px; width: 520px;
min-height: 278px;
border-radius: 8px; border-radius: 8px;
border: 1px solid #0000001a; border: 1px solid #0000001a;
background: #ffffff; background: #ffffff;
box-shadow: 0 0 8px 0 #0000000d; box-shadow: 0 0 8px 0 #0000000d;
.name-info { .name-info {
width: 538px; // width: 538px;
width: 488px;
height: 24px; height: 24px;
margin: 12px 0 0 16px; margin: 12px 0 0 16px;
display: flex; display: flex;
...@@ -285,7 +345,8 @@ export default { ...@@ -285,7 +345,8 @@ export default {
} }
} }
.item-info { .item-info {
width: 538px; // width: 538px;
width: 488px;
height: 20px; height: 20px;
margin: 12px 0 0 16px; margin: 12px 0 0 16px;
.item-info-label { .item-info-label {
...@@ -299,13 +360,12 @@ export default { ...@@ -299,13 +360,12 @@ export default {
} }
.item-event { .item-event {
width: 538px; // width: 538px;
width: 488px;
margin: 12px 0 0 16px; margin: 12px 0 0 16px;
border-bottom: 1px solid #0000001a; border-bottom: 1px solid #0000001a;
.item-event-big { .item-event-big {
// width: 538px;
height: 21px; height: 21px;
// margin: 12px 0 0 16px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -361,9 +421,7 @@ export default { ...@@ -361,9 +421,7 @@ export default {
} }
} }
.item-event-small { .item-event-small {
// width: 538px;
height: 20px; height: 20px;
// margin: 12px 0 0 16px;
margin: 8px 0 8px 0; margin: 8px 0 8px 0;
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
...@@ -373,7 +431,8 @@ export default { ...@@ -373,7 +431,8 @@ export default {
.item-statistics { .item-statistics {
// position: absolute; // position: absolute;
// bottom: 0; // bottom: 0;
width: 538px; // width: 538px;
width: 488px;
height: 20px; height: 20px;
margin: 12px 0 12px 16px; margin: 12px 0 12px 16px;
// padding: 12px 0 12px 12px; // padding: 12px 0 12px 12px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!