|
|
@@ -254,19 +254,31 @@ export default {
|
|
|
this.search()
|
|
|
break
|
|
|
case 'markRead': // 标记为已读
|
|
|
- try {
|
|
|
- data.forEach(el => {
|
|
|
- if(el.subject='文件发放通知'){
|
|
|
- throw new Error('所选数据存在文件发放通知,文件发放通知请勿点击已读。')
|
|
|
+ try {
|
|
|
+ if(data == undefined){
|
|
|
+ throw new Error('请选择数据再标记已读。')
|
|
|
+ }
|
|
|
+ let fitDatas=[]
|
|
|
+ data.forEach(el => {
|
|
|
+ if(el.subject !=='文件发放通知'){
|
|
|
+ fitDatas.push(el.id)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(fitDatas.length !== data.length){
|
|
|
+ const comfirm = confirm('文件发放通知并不会被标记为已读')
|
|
|
+ if(comfirm){
|
|
|
+ ActionUtils.selectedMultiRecord(fitDatas).then(id => {
|
|
|
+ this.handleAlreadyRead(id)
|
|
|
+ }).catch(() => { })
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ ActionUtils.selectedMultiRecord(fitDatas).then(id => {
|
|
|
+ this.handleAlreadyRead(id)
|
|
|
+ }).catch(() => { })
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ActionUtils.warning(error.message)
|
|
|
}
|
|
|
- ActionUtils.selectedMultiRecord(selection).then(id => {
|
|
|
- this.handleAlreadyRead(id)
|
|
|
- // this.isEnvelope = false
|
|
|
- }).catch(() => { })
|
|
|
- });
|
|
|
- } catch (error) {
|
|
|
- ActionUtils.warning(error.message)
|
|
|
- }
|
|
|
break
|
|
|
case 'reply': // 回复
|
|
|
ActionUtils.selectedRecord(selection).then(id => {
|