|
@@ -45,27 +45,27 @@
|
|
|
<label>通知条件:</label>
|
|
|
<el-tooltip
|
|
|
effect="dark"
|
|
|
- content="任务事件 开始开发 1天前开始提醒"
|
|
|
+ :content="item.copywriter.noticeConditionList.join(';')"
|
|
|
placement="bottom"
|
|
|
popper-class="item-span-tooltip"
|
|
|
>
|
|
|
- <span>任务事件 开始开发 1天前开始提醒</span>
|
|
|
+ <span>{{ item.copywriter.noticeConditionList.join(';') }}</span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div class="item-span">
|
|
|
<label>通知方式:</label>
|
|
|
- <span>{{ item.noticeType }}</span>
|
|
|
+ <span>{{ item.copywriter.noticeType }}</span>
|
|
|
</div>
|
|
|
<div class="item-span">
|
|
|
<label>通知时刻:</label>
|
|
|
- <span>{{ item.noticeTime }}</span>
|
|
|
+ <span>{{ item.copywriter.noticeTime }}</span>
|
|
|
</div>
|
|
|
- <el-button size="small" class="item-link">点击查看详情</el-button>
|
|
|
+ <el-button size="small" class="item-link" @click="showDetail(item)">点击查看详情</el-button>
|
|
|
</div>
|
|
|
<div class="item-bottom">
|
|
|
<div v-show="item.isEnable" class="item-status show"><span />启用中</div>
|
|
|
<div v-show="!item.isEnable" class="item-status hidden"><span />未启用</div>
|
|
|
- <div class="item-creater"><span>朱晓菲</span>创建于2020-06-06</div>
|
|
|
+ <div class="item-creater"><span>{{ item.creator }}</span>{{ item.gmtCreate }}</div>
|
|
|
<i class="el-icon-edit-outline" @click="editNotice(item)" />
|
|
|
<el-popover
|
|
|
placement="bottom"
|
|
@@ -74,7 +74,8 @@
|
|
|
popper-class="notice-item-popper"
|
|
|
>
|
|
|
<ul class="add-require-task">
|
|
|
- <li @click="enableNotice(item)">停用</li>
|
|
|
+ <li v-show="item.isEnable === 1" @click="enableNotice(item)">停用</li>
|
|
|
+ <li v-show="item.isEnable === 0" @click="enableNotice(item)">启用</li>
|
|
|
<li @click="editNotice(item,true)">复制</li>
|
|
|
<li @click="deleteNotice(item)">删除</li>
|
|
|
</ul>
|
|
@@ -101,7 +102,9 @@
|
|
|
:type="modifyType"
|
|
|
:data="modifyData"
|
|
|
:disabled="disabled"
|
|
|
+ :copy="copy"
|
|
|
@confirm="confirmModify"
|
|
|
+ @cancel="disabled = false;copy = false"
|
|
|
/>
|
|
|
<normal-dialog
|
|
|
:show-dialog.sync="controlShow"
|
|
@@ -152,7 +155,7 @@ export default {
|
|
|
},
|
|
|
total: 0,
|
|
|
controlShow: false, // 操作弹框
|
|
|
- controlId: null, // 当前操作的id
|
|
|
+ nowItem: null, // 当前操作的id
|
|
|
controlType: 0 // 0 删除 1停用
|
|
|
}
|
|
|
},
|
|
@@ -174,7 +177,7 @@ export default {
|
|
|
pageSize: this.pages.pageSize
|
|
|
}
|
|
|
if (this.activeTab !== -1) {
|
|
|
- params.status = this.activeTab
|
|
|
+ params.isEnable = this.activeTab
|
|
|
}
|
|
|
const res = await getBizNoticeSettingList(params)
|
|
|
if (res.code === 200) {
|
|
@@ -182,6 +185,11 @@ export default {
|
|
|
this.total = res.total
|
|
|
}
|
|
|
},
|
|
|
+ showDetail(item) { // 查看详情
|
|
|
+ this.modifyData = item
|
|
|
+ this.disabled = true
|
|
|
+ this.visibleModify = true
|
|
|
+ },
|
|
|
editNotice(item, copy = false) { // 编辑通知
|
|
|
if (item.requireOrientIdList.length > 0) {
|
|
|
this.modifyType = 'require'
|
|
@@ -193,30 +201,37 @@ export default {
|
|
|
this.visibleModify = true
|
|
|
},
|
|
|
deleteNotice(item) { // 删除弹框
|
|
|
- this.controlId = item.id
|
|
|
+ this.modifyData = item
|
|
|
this.controlShow = true
|
|
|
this.controlType = 0
|
|
|
},
|
|
|
enableNotice(item) { // 停用/启用 弹框
|
|
|
- this.controlId = item.id
|
|
|
- this.controlShow = true
|
|
|
- this.controlType = 1
|
|
|
+ this.modifyData = item
|
|
|
+ if (this.modifyData.isEnable === 0) {
|
|
|
+ this.enableBizNoticeSetting()
|
|
|
+ } else {
|
|
|
+ this.controlShow = true
|
|
|
+ this.controlType = 1
|
|
|
+ }
|
|
|
},
|
|
|
confirmControl() { // 操作确认
|
|
|
if (this.controlType === 0) this.deleteBizNoticeSetting()
|
|
|
if (this.controlType === 1) this.enableBizNoticeSetting()
|
|
|
},
|
|
|
async deleteBizNoticeSetting() { // 删除请求
|
|
|
- const res = await deleteBizNoticeSetting(this.controlId)
|
|
|
+ const res = await deleteBizNoticeSetting(this.modifyData.id)
|
|
|
if (res.code === 200) {
|
|
|
this.$message({ message: '删除成功', type: 'success', duration: 1000, offset: 150 })
|
|
|
+ this.modifyData = null
|
|
|
this.getBizNoticeSettingList()
|
|
|
}
|
|
|
},
|
|
|
async enableBizNoticeSetting() { // 停用/启用
|
|
|
- const res = await enableBizNoticeSetting(this.controlId)
|
|
|
+ const status = Number(!this.modifyData.isEnable)
|
|
|
+ const res = await enableBizNoticeSetting(this.modifyData.id, status)
|
|
|
if (res.code === 200) {
|
|
|
this.$message({ message: '操作成功', type: 'success', duration: 1000, offset: 150 })
|
|
|
+ this.modifyData = null
|
|
|
this.getBizNoticeSettingList()
|
|
|
}
|
|
|
},
|