From 2aa05e09b21af76f4803f0f33174453db72b9433 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 11 Jul 2023 13:07:29 +0800
Subject: [PATCH] 修改
---
src/views/Admin/components/msgEditMod.vue | 32 ++++++++-------
src/views/Admin/callRecord.vue | 4 +-
src/views/Admin/massSend.vue | 7 ++-
src/views/Admin/msgRecord.vue | 2
config/env.production.js | 1
src/components/Home/Dynamic.vue | 2
src/views/Admin/notice.vue | 30 ++++++++-------
7 files changed, 42 insertions(+), 36 deletions(-)
diff --git a/config/env.production.js b/config/env.production.js
index 1ee261b..ae16e7a 100644
--- a/config/env.production.js
+++ b/config/env.production.js
@@ -1,4 +1,5 @@
module.exports = {
NODE_ENV: "production",
baseUrl: 'http://121.239.169.30:13001',
+ // baseUrl: 'http://192.168.0.52:13001',
}
\ No newline at end of file
diff --git a/src/components/Home/Dynamic.vue b/src/components/Home/Dynamic.vue
index c4422a9..6a98088 100644
--- a/src/components/Home/Dynamic.vue
+++ b/src/components/Home/Dynamic.vue
@@ -6,7 +6,7 @@
<a-list-item-meta
:description="item.responseTime | filterTime"
>
- <a slot="title" href="#" @click="openDetails(item.warnInfoId)">{{item.receiveUnit}} 的 {{ item.recipienterName }} 在 {{item.title}} 进行了“已安排部署”叫应</a>
+ <a slot="title" href="#" @click="openDetails(item.warnInfoId)">{{item.receiveUnit}} 的 {{ item.responseRealName }} 在 {{item.title}} 进行了“已安排部署”叫应</a>
<a-avatar
slot="avatar"
:src="userImg"
diff --git a/src/views/Admin/callRecord.vue b/src/views/Admin/callRecord.vue
index 1b8e387..7c40087 100644
--- a/src/views/Admin/callRecord.vue
+++ b/src/views/Admin/callRecord.vue
@@ -104,10 +104,10 @@
},
{
title: '接收人',
- dataIndex: 'recipienterName',
+ dataIndex: 'responseRealName',
width: '20%',
scopedSlots: {
- customRender: 'recipienterName'
+ customRender: 'responseRealName'
}
},
{
diff --git a/src/views/Admin/components/msgEditMod.vue b/src/views/Admin/components/msgEditMod.vue
index ab7eba6..cefb82c 100644
--- a/src/views/Admin/components/msgEditMod.vue
+++ b/src/views/Admin/components/msgEditMod.vue
@@ -65,7 +65,7 @@
:file-list="fileList"
@change="fileChange"
:headers="header"
- accept=".doc, .docx, .word, .pdf, .zip, .xlsx, .rar"
+ accept=".doc, .docx, .word, .pdf, .zip, .xlsx, .rar, .jpg, .jpeg, .png"
:data="{module: 'naturalDisasterPath'}"
@download="downloadFile"
:remove="(file)=>{removeFile(file)}"
@@ -460,16 +460,18 @@
let fileList = [...info.fileList];
// 2. read from response and show file link
fileList = fileList.map(file => {
- if(file.status == 'done'){
- if (file.response) {
- const res = file.response
- if(res.code == 100){
- this.$message.success('文件上传成功')
- }else{
- this.$message.error('文件上传失败')
+ if (file.uid === info.file.uid) {
+ if (file.status == 'done') {
+ if (file.response) {
+ const res = file.response
+ if (res.code == 100) {
+ this.$message.success('文件上传成功')
+ } else {
+ this.$message.error('文件上传失败')
+ }
+ // Component will show file.url as link
+ file.url = res.data.fileUrl
}
- // Component will show file.url as link
- file.url = res.data.fileUrl
}
}
return file;
@@ -478,7 +480,7 @@
},
removeFile(file){
- this.delList.push(file.uid)
+ this.delList.push(file.response.data.id)
},
async deleteFile(){
@@ -506,9 +508,9 @@
}
const newAList = [].concat(...aList)
for(let i of newAList){
- const {realName,...data} = i
- const {id:recipienterId,name: recipienterName,phone: recipienterPhone,company: receiveUnit,...rest} = data
- const obj = { recipienterId, recipienterName, recipienterPhone, receiveUnit,...rest}
+ // const {realName,...data} = i
+ const {id:recipienterId,name: recipienterName,phone: recipienterPhone,company: receiveUnit,realName: recipienterRealName,...rest} = i
+ const obj = { recipienterId, recipienterName, recipienterRealName, recipienterPhone, receiveUnit,...rest}
this.form.acceptingUnitIds.push(obj)
}
this.form.acceptingUnitIds = [...this.form.acceptingUnitIds,...this.sendLeaders]
@@ -516,7 +518,7 @@
const bList = this.form.recipient.map(item => this.filteredOptions.find(i=>i.id == item))
for(let i of bList){
const {id:recipienterId,recipientName: recipienterName,phone: recipienterPhone, company: receiveUnit,...rest} = i
- const obj = {recipienterId, recipienterName,recipienterPhone,receiveUnit,unittype:this.unittype,...rest}
+ const obj = {recipienterId, recipienterName,recipienterPhone,receiveUnit,unittype:this.unittype,recipienterRealName:recipienterName,...rest}
this.form.peerRecipientIds.push(obj)
}
}
diff --git a/src/views/Admin/massSend.vue b/src/views/Admin/massSend.vue
index 63287c7..bea7eff 100644
--- a/src/views/Admin/massSend.vue
+++ b/src/views/Admin/massSend.vue
@@ -308,7 +308,7 @@
}
const newAList = [].concat(...aList)
for(let i of newAList){
- const {realName,id,roleId,...data} = i
+ const {id,roleId,...data} = i
const {company: recipientUnit,...rest} = data
const obj = {recipientUnit,recipientType:1,...rest}
this.form.verticalRecipient.push(obj)
@@ -317,7 +317,7 @@
const bList = this.form.recipient.map(item => this.filteredOptions.find(i=>i.id == item))
for(let i of bList){
const {recipientName: name, company: recipientUnit,...rest} = i
- const obj = {name,recipientUnit,recipientType:2,...rest}
+ const obj = {name,recipientUnit,recipientType:2,realName: name,...rest}
const {id,...noId} = obj
this.form.horizontalRecipient.push(noId)
}
@@ -329,7 +329,8 @@
this.$refs.ruleForm.clearValidate()
this.$refs.ruleForm.resetFields()
this.form.recipient = []
-
+ this.checkAll = false
+ this.checkSlAll = false
}else{
this.$message.error(res.data.msg)
this.$refs.ruleForm.clearValidate()
diff --git a/src/views/Admin/msgRecord.vue b/src/views/Admin/msgRecord.vue
index 87c3624..15daf6b 100644
--- a/src/views/Admin/msgRecord.vue
+++ b/src/views/Admin/msgRecord.vue
@@ -33,7 +33,7 @@
</p>
<template #actions>
<div>
- 接收号码:<span>{{item.recipients.map(i=>i.name + '(' + i.phone + ')').join('、')}}</span>
+ 接收号码:<span>{{item.recipients.map(i=>i.realName + '(' + i.phone + ')').join('、')}}</span>
</div>
<div>
<a-button type="primary" @click="viewDetails(item)">查看详情</a-button>
diff --git a/src/views/Admin/notice.vue b/src/views/Admin/notice.vue
index f1e84a9..a61a8ab 100644
--- a/src/views/Admin/notice.vue
+++ b/src/views/Admin/notice.vue
@@ -355,16 +355,18 @@
fileChange(info) {
let fileList = [...info.fileList];
fileList = fileList.map(file => {
- if(file.status == 'done'){
- if (file.response) {
- const res = file.response
- if(res.code == 100){
- this.$message.success('文件上传成功')
- }else{
- this.$message.error('文件上传失败')
+ if (file.uid === info.file.uid) {
+ if (file.status == 'done') {
+ if (file.response) {
+ const res = file.response
+ if (res.code == 100) {
+ this.$message.success('文件上传成功')
+ } else {
+ this.$message.error('文件上传失败')
+ }
+ // Component will show file.url as link
+ file.url = res.data.fileUrl
}
- // Component will show file.url as link
- file.url = res.data.fileUrl
}
}
return file;
@@ -373,7 +375,7 @@
},
removeFile(file){
- this.delList.push(file.uid)
+ this.delList.push(file.response.data.id)
},
async deleteFile(){
@@ -401,9 +403,9 @@
}
const newAList = [].concat(...aList)
for(let i of newAList){
- const {realName,...data} = i
- const {id:recipienterId,name: recipienterName,phone: recipienterPhone,company: receiveUnit,...rest} = data
- const obj = { recipienterId, recipienterName, recipienterPhone, receiveUnit,...rest}
+ // const {realName,...data} = i
+ const {id:recipienterId,name: recipienterName,phone: recipienterPhone,company: receiveUnit,realName: recipienterRealName,...rest} = i
+ const obj = { recipienterId, recipienterName,recipienterRealName, recipienterPhone, receiveUnit,...rest}
this.form.acceptingUnitIds.push(obj)
}
this.form.acceptingUnitIds = [...this.form.acceptingUnitIds,...this.sendLeaders]
@@ -411,7 +413,7 @@
const bList = this.form.recipient.map(item => this.filteredOptions.find(i=>i.id == item))
for(let i of bList){
const {id:recipienterId,recipientName: recipienterName,phone: recipienterPhone, company: receiveUnit,...rest} = i
- const obj = {recipienterId, recipienterName,recipienterPhone,receiveUnit,unittype:this.unittype,...rest}
+ const obj = {recipienterId, recipienterName,recipienterPhone,receiveUnit,unittype:this.unittype,recipienterRealName:recipienterName,...rest}
this.form.peerRecipientIds.push(obj)
}
}
--
Gitblit v1.9.2