马宇豪
2024-02-04 67ff22602500a4dae22e638ec4e04f0a287c7c31
src/views/Admin/notice.vue
@@ -55,6 +55,14 @@
               <a-textarea v-model="form.content" placeholder="请输入短信通知内容部分"
                  :auto-size="{ minRows: 3, maxRows: 5 }" />
            </a-form-model-item>
        <a-row v-if="userInfo.unittype == 1">
          <a-col :span="24" style="display: flex;align-items: center">
            <b style="margin-bottom: 24px">直览附件URL:</b>
            <a-form-model-item prop="directViewUrl" style="width: 50%">
              <a-textarea v-model="form.directViewUrl" placeholder="请输入url信息" :auto-size="{ minRows: 1, maxRows: 3 }"/>
            </a-form-model-item>
          </a-col>
        </a-row>
            <a-row>
               <a-col :span="12">
                  <a-upload :action="uploadUrl" :file-list="fileList" @change="fileChange" :headers="header"
@@ -122,7 +130,7 @@
                  </a-form-model-item>
               </a-col>
               <a-col :span="12" style="text-align: right">
                  <a-button type="primary" style="width: 250px;" @click="confirmSend()"
                  <a-button type="primary" style="width: 250px;" @click="confirmSend()" v-preventReClick="1500"
                     :disabled="userInfo.role.id==1?true:false">
                     确认并提交审核
                  </a-button>
@@ -175,6 +183,7 @@
               disasterType: undefined,
               warningLevel: undefined,
               content: '',
          directViewUrl: '',
               publishingUnit: '',
               districtId: null,
               attachments: [],
@@ -202,15 +211,11 @@
                  value: 1
               },
               {
                  name: '洪涝',
                  value: 2
               },
               {
                  name: '气象',
                  value: 3
               },
               {
                  name: '泥石流',
                  name: '地质灾害',
                  value: 4
               },
               {
@@ -296,6 +301,8 @@
      components: {},
      created() {
         const t = this
      t.getAreaUsers()
      t.areaUsers = JSON.parse(localStorage.getItem('areaUsers'))
         const {
            baseUrl
         } = require('../../../config/env.' + process.env.NODE_ENV)
@@ -305,7 +312,6 @@
         t.form.districtId = t.userInfo.districtId
         t.form.publishingUnit = t.userInfo.company
         t.getSameLevel()
         t.getAreaUsers()
         t.getLeaders()
      },
      computed: {},
@@ -331,11 +337,9 @@
            let res = await getAreaWithUserIfo()
            if (res.data.code == 100) {
               if (res.data.data) {
                  // const treeD = []
                  t.userTitTree(res.data.data)
                  // treeD.push(t.findNodeById(res.data.data,t.userInfo.districtId))
                  const treeD = t.findNodeById(res.data.data, t.userInfo.districtId)
                  t.areaUsers = treeD.children
                  // t.areaUsers = treeD.children
                  t.unittype = treeD.type
               } else {
                  console.log('暂无数据')
@@ -474,7 +478,6 @@
               if (valid) {
                  this.form.acceptingUnitIds = []
                  this.form.peerRecipientIds = []
                  const aList = this.form.receiver.map(item => this.findNodeById(this.areaUsers, item.value)
                     ?.users)
                  if (aList.includes(null)) {
@@ -490,6 +493,7 @@
                        phone: recipienterPhone,
                        company: receiveUnit,
                        realName: recipienterRealName,
                registrationId: registrationId,
                        ...rest
                     } = i
                     const obj = {
@@ -498,6 +502,7 @@
                        recipienterRealName,
                        recipienterPhone,
                        receiveUnit,
                registrationId,
                        ...rest
                     }
                     this.form.acceptingUnitIds.push(obj)