linwenxin 4 месяцев назад
Родитель
Сommit
301b712cdb

+ 12 - 4
src/api/networkNotification.js

@@ -9,10 +9,10 @@ export function noticeWebsitList(data) {
 }
 
 export function noticeWebsitListExport(data) {
-  return request({
-    url: `/noticeWebsit/list/export?moduleId=${data.moduleId}`,
-    method: 'post',
-    data
+  return postBlob({
+    url: '/noticeWebsit/list/export',
+    data,
+    name
   })
 }
 
@@ -55,3 +55,11 @@ export function noticeWebsitListWebsit(data) {
     data
   })
 }
+
+export function noticeWebsitListWebsitExport(data) {
+  return postBlob({
+    url: '/noticeWebsit/listWebsit/export',
+    data,
+    name
+  })
+}

+ 82 - 7
src/views/setting/notification/networkNotification/index.vue

@@ -10,7 +10,7 @@
     :operation="operation()"
   >
     <div class="cartographer_big">
-      <el-dialog title="配置" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
+      <el-dialog title="添加网点通知" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
         <zj-page-container v-if="formBool">
           <zj-page-fill class="neibuview">
             <zj-form-container
@@ -33,6 +33,31 @@
         </zj-page-container>
       </el-dialog>
     </div>
+    <div class="cartographer_big">
+      <el-dialog
+        title="网点通知详情"
+        width="100%"
+        :modal="false"
+        :visible.sync="formBoolXQ"
+        :before-close="handleClose"
+      >
+        <zj-page-container v-if="formBoolXQ">
+          <zj-page-fill class="neibuview">
+            <div class="nlnlknmlkmkl" style="width: 100%; height: 550px" v-if="formBoolXQ">
+              <template-page ref="pageRef2" :getList="getList2" :exportList="exportList2"></template-page>
+            </div>
+            <zj-form-container
+              ref="formRef"
+              :form-data="formData"
+              :form-rules="formRules"
+              :form-attributes="{ size: 'mini' }"
+            >
+              <zj-form-module title="基础信息" :form-data="formData" :form-items="items" />
+            </zj-form-container>
+          </zj-page-fill>
+        </zj-page-container>
+      </el-dialog>
+    </div>
   </template-page>
 </template>
 
@@ -46,7 +71,9 @@ import {
   noticeWebsitAdd,
   noticeWebsitUpdate,
   noticeWebsitDetail,
-  noticeWebsitOfOrSend
+  noticeWebsitOfOrSend,
+  noticeWebsitListWebsit,
+  noticeWebsitListWebsitExport
 } from '@/api/networkNotification'
 import operation_mixin from '@/components/template/operation_mixin.js'
 import { required } from '@/components/template/rules_verify.js'
@@ -68,6 +95,7 @@ export default {
       },
       recordSelected: [],
       formBool: false,
+      formBoolXQ: false,
       formType: 0,
       formData: {
         adminCompanyId: '',
@@ -115,6 +143,7 @@ export default {
     items() {
       return [
         {
+          isShow: this.formType == 0,
           name: 'el-select',
           md: 12,
           name: 'el-radio',
@@ -126,6 +155,7 @@ export default {
             { label: '资讯', value: 'ZX' }
           ],
           attributes: {
+            disabled: this.formType == 2,
             placeholder: '请输入'
           },
           formItemAttributes: {
@@ -135,9 +165,11 @@ export default {
           }
         },
         {
+          isShow: this.formType == 0,
           name: 'el-input',
           md: 12,
           attributes: {
+            disabled: this.formType == 2,
             placeholder: '请输入'
           },
           formItemAttributes: {
@@ -147,9 +179,11 @@ export default {
           }
         },
         {
+          isShow: this.formType == 0,
           name: 'el-input',
           md: 12,
           attributes: {
+            disabled: this.formType == 2,
             placeholder: '请输入'
           },
           formItemAttributes: {
@@ -159,9 +193,11 @@ export default {
           }
         },
         {
+          isShow: this.formType == 0,
           name: 'el-input',
           md: 12,
           attributes: {
+            disabled: this.formType == 2,
             placeholder: '请输入'
           },
           formItemAttributes: {
@@ -198,7 +234,14 @@ export default {
           },
           render: (h, { props, onInput }) => {
             var { value } = props
-            return <ImageUpload fileList={this.formData.file} uid="idcardUpUrl_drawg_FUJIAN" limit={100} />
+            return (
+              <ImageUpload
+                fileList={this.formData.file}
+                uid="idcardUpUrl_drawg_FUJIAN"
+                limit={100}
+                isEdit={this.formType == 0}
+              />
+            )
           }
         }
       ]
@@ -299,6 +342,17 @@ export default {
     getList: noticeWebsitList,
     // 导出
     exportList: noticeWebsitListExport,
+    // 列表请求函数
+    getList2(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        pam.params.push({ param: 'a.notice_websit_id', compare: '=', value: this.formData.noticeWebsitId })
+        cb && cb(pam)
+        return noticeWebsitListWebsit(pam)
+      } catch (err) {}
+    },
+    // 导出
+    exportList2: noticeWebsitListWebsitExport,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -312,6 +366,7 @@ export default {
       this.$data.formData = this.$options.data().formData
       this.formType = 0
       this.formBool = false
+      this.formBoolXQ = false
     },
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
@@ -334,9 +389,16 @@ export default {
           click: ({ row, index, column }) => {
             this.openWindow(() => {
               noticeWebsitDetail({
-                id: row.id
+                id: row.noticeWebsitId
               }).then(res => {
-                this.formData = { ...res.data }
+                this.formData = {
+                  ...res.data,
+                  file: res.data.file ? res.data.file.split(',').map(url => ({ url })) : []
+                }
+                this.formType = 2
+                this.openWindow(() => {
+                  this.formBoolXQ = true
+                })
               })
             })
           }
@@ -348,7 +410,7 @@ export default {
           },
           click: ({ row, index, column }) => {
             noticeWebsitOfOrSend({
-              id: row.id,
+              id: row.noticeWebsitId,
               status: 'SEND'
             }).then(res => {
               this.$message({
@@ -366,7 +428,7 @@ export default {
           },
           click: ({ row, index, column }) => {
             noticeWebsitOfOrSend({
-              id: row.id,
+              id: row.noticeWebsitId,
               status: 'OFF'
             }).then(res => {
               this.$message({
@@ -405,7 +467,20 @@ export default {
 }
 </script>
 
+<style lang="scss">
+.nlnlknmlkmkl {
+  .zj-page-template {
+    padding: 0px !important;
+  }
+}
+</style>
+
 <style lang="scss" scoped>
+.nlnlknmlkmkl {
+  ::v-deep .zj-page-template {
+    padding: none !important;
+  }
+}
 .neibuview {
   box-sizing: border-box;
   padding-left: 16px;