Browse Source

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 years ago
parent
commit
424a1f19bd

+ 109 - 7
src/HManagement/notice/index.vue

@@ -9,7 +9,10 @@
       :options="options"
       >
     >
-    <div slot="custom">
+    <div slot="titleRight">
+      <el-button style="margin-left:10px" type="primary" size="small" @click="$store.dispatch('DrawerShowChange',true),$router.push('/noticeclass')">设置板块</el-button>
+    </div>
+    <div slot="custom" style="display:flex">
       <div class="label_center">
         <p class="search__label">状态:</p>
         <el-select
@@ -28,6 +31,28 @@
           ></el-option>
         </el-select>
       </div>
+      <div class="label_center">
+        <p class="search__label">板块:</p>
+        <el-select
+          class="inline-16"
+          size="small"
+          v-model="classname"
+          placeholder="请选择板块"
+          @change="classChange"
+          clearable
+        >
+          <el-option
+            v-for="(item,index) in classList"
+            :label="item.classname"
+            :value="item.sat_notice_classid"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </div>
+      <div class="label_center">
+        <p class="search__label">发布时间:</p>
+        <time-select class="inline-16" @clearSelect="clearTime" @timeChange="timeChange"></time-select>
+      </div>
     </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'status'">
@@ -45,40 +70,117 @@
         <message class="inline-16" v-if="tool.checkAuth($route.name,'read')" :data="scope.data.data.sat_noticeid" @onSuccess="onSuccess"></message>
       </template>
     </basicLayout>
+    <el-drawer
+      title="我是标题"
+      :visible.sync="drawer"
+      :with-header="false"
+      direction="rtl"
+      size="70%"
+      append-to-body
+      @close="closeDrawer">
+      <div class="detail__panel">
+        <router-view v-if = "drawer"/>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
-
+import {mapGetters} from 'vuex'
 
 import message from './list/modules/message.vue'
 import edit from './list/modules/edit'
-import { log } from '@antv/g2plot/lib/utils'
-
-
+import TimeSelect from '@/HDrpManagement/projectChange/components/TimeSelect'
 export default {
   data(){
     return {
       status:'',
+      classname:'',
       options:[],
+      accountType:'',
       statusList:[
         {label:'全部',value:''},
         {label:'新建',value:'新建'},
         {label:'发布',value:'发布'},
-      ]
+      ],
+      classList:[],
+      drawer:false
     }
   },
   components:{
     message,
-    edit
+    edit,
+    TimeSelect
+  },
+  provide () {
+    return {
+      accountType: () => this.accountType
+    }
+  },
+  computed: {
+    ...mapGetters({
+      DrawerShow:'DrawerShow'
+    })
+  },
+  watch: {
+    $route (val) {
+      if (val.path == '/notice_mag_list') {
+        this.$refs.list.listData()
+      }
+    },
+    DrawerShow (val) {
+      val ? this.drawer = true : this.drawer = false
+    }
+  },
+  created () {
+    this.getClassList()
+    this.getAccountType()
   },
   methods:{
+    closeDrawer () {
+      this.$router.push('/notice_mag_list')
+      this.$store.dispatch('DrawerShowChange',false)
+    },
     onSuccess () {
       this.$refs.list.listData()
     },
     handleSelectChange () {
       this.$refs.list.param.content.where.status = this.status
       this.$refs.list.listData()
+    },
+    /* 用户类型 */
+    async getAccountType () {
+      let res = await this.$store.dispatch('optiontypeselect','accounttype')
+      this.accountType = res.data
+      console.log(this.accountType);
+      
+    },
+    async getClassList () {
+      let res = await this.$api.requested({
+        'id':20221101094603,
+        'content': {
+          'where': {
+
+          }
+        }
+      })
+      res.data.unshift({'classname':'全部','sat_notice_classid':''})
+      this.classList = res.data
+      console.log(res);
+    },
+    classChange () {
+      this.$refs['list'].param.content.where.sat_notice_classid = this.classname
+      this.$refs['list'].listData()
+    },
+    clearTime () {
+      this.$refs['list'].param.content.where.startdate = ''
+      this.$refs['list'].param.content.where.enddate = ''
+      this.$refs['list'].listData()
+    },
+    timeChange (time) {
+      this.$refs['list'].param.content.where.startdate = time[0]
+      this.$refs['list'].param.content.where.enddate = time[1]
+      this.$refs['list'].listData()
     }
   }
 }

+ 1 - 12
src/HManagement/notice/list/modules/add.vue

@@ -2,18 +2,6 @@
   <div>
     <el-button size="small" type="primary"  @click="show(drawer=true)">新 建</el-button>
     <!--    <p>创建通告中....</p>-->
-    <el-drawer
-        title="我是标题"
-        :visible.sync="drawer"
-        :with-header="false"
-        :wrapper-closable="false"
-        direction="rtl"
-        size="90%"
-        append-to-body>
-      <div class="detail__panel">
-
-      </div>
-    </el-drawer>
   </div>
 </template>
 
@@ -46,6 +34,7 @@ export default {
         "id": "20221101094803",
         "content": this.form
       })
+      this.$store.dispatch('DrawerShowChange',true)
       res.code === 1?this.$router.push({path:'/notice_add',query:{id:res.data.sat_noticeid}}):''
     },
     show(){

+ 1 - 4
src/HManagement/notice/list/modules/add_notice.vue

@@ -148,9 +148,6 @@ export default {
         sat_notice_classid: [
           { required: true, message: '请选择版块', trigger: 'change' }
         ],
-        summary: [
-          { required: true, message: '请输入导语', trigger: 'blur' },
-        ],
       },
       form: {
         "title": "",
@@ -195,7 +192,7 @@ export default {
             "sat_noticeids":[res.data.sat_noticeid]
           }
         })
-        this.drawer = false
+        this.$store.dispatch('DrawerShowChange',false)
         this.$emit("updateSuccess")
       });
     },

+ 23 - 6
src/HManagement/notice/list/modules/edit.vue

@@ -93,7 +93,7 @@
                 </attachmentList>
               </div>
               <div class="container normal-panel normal-margin">
-                <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
+                <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid" :disabled="!save"></myEditor>
               </div>
             </el-col>
             <el-col :span="11">
@@ -138,6 +138,24 @@ export default {
   },
   props:["id"],
   data() {
+    var checkTime = (rule, value, callback) => {
+      if (this.form.enddate) {
+        if (new Date(value).getTime() > new Date(this.form.enddate).getTime()) {
+          callback(new Error('生效日期不能大于截止日期'));
+        } else {
+          callback()
+        }
+      }     
+    };
+    var checkTime2 = (rule, value, callback) => {
+      if (this.form.begdate) {
+        if (new Date(value).getTime() < new Date(this.form.begdate).getTime()) {
+          callback(new Error('截止日期不能小于生效日期'));
+        } else {
+          callback()
+        }
+      }     
+    };
     return {
       store,
       edit:true,
@@ -149,17 +167,16 @@ export default {
           { required: true, message: '请输入课程名称', trigger: 'blur' },
         ],
         begdate: [
-          { required: true, message: '请选择生效日期', trigger: 'change' }
+          { required: true, message: '请选择生效日期', trigger: 'change' },
+          { required: true, validator: checkTime, trigger: 'change' },
         ],
         enddate: [
-          { required: true, message: '请选择截止日期', trigger: 'change' }
+          { required: true, message: '请选择截止日期', trigger: 'change' },
+          { required: true, validator: checkTime2, trigger: 'change' },
         ],
         sat_notice_classid: [
           { required: true, message: '请选择版块', trigger: 'change' }
         ],
-        summary: [
-          { required: true, message: '请输入导语', trigger: 'blur' },
-        ],
       },
       form: {
         "title": "",

+ 46 - 3
src/HManagement/notice/list/modules/message.vue

@@ -8,12 +8,37 @@
         direction="rtl"
         size="60%"
         append-to-body>
-      <div class="container normal-panel normal-margin" style="width: 200px">
+        <div class="container normal-panel">
+          <p style="font-size:16px;font-weight:bold">留言明细</p>
+        </div>
+      <div class="container normal-panel" style="padding-top:0;display:flex">
+        <div class="label_center">
+          <p class="search__label">用户类型:</p>
+          <el-select
+            class="inline-16"
+            size="small"
+            v-model="status"
+            placeholder="请选择用户类型"
+            @change="handleSelectChange"
+            clearable
+          >
+            <el-option
+              v-for="(item,index) in accountType()"
+              :label="item.value"
+              :value="item.remarks"
+              :key="index"
+            ></el-option>
+          </el-select>
+        </div>
+        <div class="label_center">
+        <p class="search__label">留言时间:</p>
+          <time-select class="inline-16" @clearSelect="clearTime" @timeChange="timeChange"></time-select>
+        </div>
         <el-input
             placeholder="请输入搜索内容"
             suffix-icon="el-icon-search"
             v-model="search"
-            @keyup.native.enter="queryClick()"
+            @keyup.native.enter="queryClick(params.content.pageNumber=1)"
             @clear="clearData()"
             style="width:200px"
             size="small"
@@ -52,8 +77,10 @@
 </template>
 
 <script>
+import TimeSelect from '@/HDrpManagement/projectChange/components/TimeSelect'
 export default {
   props:['data'],
+  inject:['accountType'],
   data () {
     return {
       dialogTableVisible:false,
@@ -74,12 +101,28 @@ export default {
           }
         }
       },
+      classList:[],
+      status:''
     }
   },
   components:{
-
+    TimeSelect
   },
   methods:{
+    handleSelectChange () {
+      this.params.content.where.usertype = this.status
+      this.query_message()
+    },
+    clearTime () {
+      this.params.content.where.startdate = ''
+      this.params.content.where.enddate = ''
+      this.query_message()
+    },
+    timeChange (time) {
+      this.params.content.where.startdate = time[0]
+      this.params.content.where.enddate = time[1]
+      this.query_message()
+    },
     async query_message() {
       this.dialogTableVisible = true
       this.params.content.sat_noticeid = this.data

+ 7 - 80
src/HManagement/notice/pate/index.vue

@@ -1,44 +1,14 @@
 <template>
   <div>
-    <basicLayout
-        ref="list"
-        :oldFormPath="{add:'HManagement/notice/pate/modules'}"
-        tableName="tablePate"
-        idName="sat_notice_classid"
-        :apiId="{query:20221101094603,del:20221101094703}"
-    >
-      <template v-slot:tbList="scope">
-        <div v-if="scope.data.column.columnname === 'classname'">
-          <el-input v-if="act_cus === scope.data.column.data.sat_notice_classid" size="mini" v-model="scope.data.column.data.classname" placeholder="输入版块名称"></el-input>
-          <p v-else>{{ scope.data.column.data.classname }} <i class="el-icon-edit"></i></p>
-        </div>
-        <div v-else-if="scope.data.column.columnname === 'issecret'">
-          <el-switch
-              :disabled="act_cus !== scope.data.column.data.sat_notice_classid"
-              v-model="scope.data.column.data.issecret"
-              active-color="#ff4949"
-              inactive-color="#ccc"
-              :active-value="1"
-              :inactive-value="0">
-          </el-switch>
-        </div>
-        <div v-else>
-          {{scope.data.column.data[[scope.data.column.columnname]]}}
-        </div>
-      </template>
-      <template v-slot:tbOpreation="scope">
-        <edit class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.listData" @onEdit="onEdit"></edit>
-      </template>
-    </basicLayout>
-<!--    <list ref="list">
-      <add v-if="tool.checkAuth($route.name,'insert')" slot="add" @addClick="addClick"></add>
+    <list ref="list">
+      <add v-if="tool.checkAuth($route.name,'insert')" slot="add" @addClick="addClick" style="margin-bottom:10px"></add>
       <template v-if="tool.checkAuth($route.name,'delete')" v-slot:del="scope">
         <ondel :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()"></ondel>
       </template>
       <template v-if="tool.checkAuth($route.name,'update')" v-slot:edit="scope">
         <edit class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()" @onEdit="onEdit"></edit>
       </template>
-    </list>-->
+    </list>
   </div>
 </template>
 
@@ -47,65 +17,22 @@ import list from './modules/list.vue'
 import add from './modules/add.vue'
 import edit from './modules/edit.vue'
 
+import ondel from './modules/del.vue'
 
 export default {
-  data(){
-    return {
-      act_cus:0,
-      pateList:[],
-      params:{
-        "id": "20221101094603",
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 10,
-          "where":{
-            "condition":""
-          }
-        }
-      },
-    }
-  },
   components:{
     list,
     add,
     edit,
+    ondel
   },
   methods: {
     addClick () {
       this.$refs.list.addPate()
     },
     onEdit (data) {
-      this.cellClick(data)
-    },
-    cellClick (row) {
-      this.act_cus = row.sat_notice_classid
-    },
-    // 新增或更新版块
-    updatePate (row) {
-      this.$api.requested({
-        /*"classname": "webmanage.saletool.notice.noticeclass",
-        "method": "insertormodify_noticeclass",*/
-        "id":"20221101094503",
-        "content": row
-      }).then((res)=>{
-        this.tool.showMessage(res)
-        res.code === 1?this.act_cus = 0:''
-        this.$refs.list.listData()
-      })
-    },
-    // 插入新增行
-    addPate () {
-      this.act_cus = 0
-      this.pateList.unshift({
-        sat_notice_classid:0,
-        classname:"",
-        // issystem:0,
-        // fisused:1,
-        issecret:0,
-        fcolor:'#ccc',
-      })
-    },
-
+      this.$refs.list.cellClick(data)
+    }
   }
 }
 

+ 115 - 0
src/HManagement/notice/pate/index2.vue

@@ -0,0 +1,115 @@
+<template>
+  <div>
+    <basicLayout
+        ref="list"
+        :oldFormPath="{add:'HManagement/notice/pate/modules'}"
+        tableName="tablePate"
+        idName="sat_notice_classid"
+        :apiId="{query:20221101094603,del:20221101094703}"
+        customTitle="通告板块"
+    >
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname === 'classname'">
+          <el-input v-if="act_cus === scope.data.column.data.sat_notice_classid" size="mini" v-model="scope.data.column.data.classname" placeholder="输入版块名称"></el-input>
+          <p v-else>{{ scope.data.column.data.classname }} <i class="el-icon-edit"></i></p>
+        </div>
+        <!-- <div v-else-if="scope.data.column.columnname === 'issecret'">
+          <el-switch
+              :disabled="act_cus !== scope.data.column.data.sat_notice_classid"
+              v-model="scope.data.column.data.issecret"
+              active-color="#ff4949"
+              inactive-color="#ccc"
+              :active-value="1"
+              :inactive-value="0">
+          </el-switch>
+        </div> -->
+        <div v-else>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <edit class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.listData" @onEdit="onEdit"></edit>
+      </template>
+    </basicLayout>
+<!--    <list ref="list">
+      <add v-if="tool.checkAuth($route.name,'insert')" slot="add" @addClick="addClick"></add>
+      <template v-if="tool.checkAuth($route.name,'delete')" v-slot:del="scope">
+        <ondel :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()"></ondel>
+      </template>
+      <template v-if="tool.checkAuth($route.name,'update')" v-slot:edit="scope">
+        <edit class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()" @onEdit="onEdit"></edit>
+      </template>
+    </list>-->
+  </div>
+</template>
+
+<script>
+import list from './modules/list.vue'
+import add from './modules/add.vue'
+import edit from './modules/edit.vue'
+
+
+export default {
+  data(){
+    return {
+      act_cus:0,
+      pateList:[],
+      params:{
+        "id": "20221101094603",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where":{
+            "condition":""
+          }
+        }
+      },
+    }
+  },
+  components:{
+    list,
+    add,
+    edit,
+  },
+  methods: {
+    addClick () {
+      this.$refs.list.addPate()
+    },
+    onEdit (data) {
+      this.cellClick(data)
+    },
+    cellClick (row) {
+      this.act_cus = row.sat_notice_classid
+    },
+    // 新增或更新版块
+    updatePate (row) {
+      this.$api.requested({
+        /*"classname": "webmanage.saletool.notice.noticeclass",
+        "method": "insertormodify_noticeclass",*/
+        "id":"20221101094503",
+        "content": row
+      }).then((res)=>{
+        this.tool.showMessage(res)
+        res.code === 1?this.act_cus = 0:''
+        this.$refs.list.listData()
+      })
+    },
+    // 插入新增行
+    addPate () {
+      this.act_cus = 0
+      this.pateList.unshift({
+        sat_notice_classid:0,
+        classname:"",
+        // issystem:0,
+        // fisused:1,
+        issecret:0,
+        fcolor:'#ccc',
+      })
+    },
+
+  }
+}
+
+</script>
+<style>
+</style>

+ 0 - 41
src/HManagement/notice/pate/indexCopy.vue

@@ -1,41 +0,0 @@
-<template>
-  <div>
-    <list ref="list">
-      <add v-if="tool.checkAuth($route.name,'insert')" slot="add" @addClick="addClick"></add>
-      <template v-if="tool.checkAuth($route.name,'delete')" v-slot:del="scope">
-        <ondel :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()"></ondel>
-      </template>
-      <template v-if="tool.checkAuth($route.name,'update')" v-slot:edit="scope">
-        <edit class="inline-16" :data="scope.data.data" @onSuccess="$refs.list.queryTypeList()" @onEdit="onEdit"></edit>
-      </template>
-    </list>
-  </div>
-</template>
-
-<script>
-import list from './modules/list.vue'
-import add from './modules/add.vue'
-import edit from './modules/edit.vue'
-
-import ondel from './modules/del.vue'
-
-export default {
-  components:{
-    list,
-    add,
-    edit,
-    ondel
-  },
-  methods: {
-    addClick () {
-      this.$refs.list.addPate()
-    },
-    onEdit (data) {
-      this.$refs.list.cellClick(data)
-    }
-  }
-}
-
-</script>
-<style>
-</style>

+ 2 - 2
src/HManagement/notice/pate/modules/list.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <slot name="add"></slot>
-    <div class="container normal-panel normal-margin">
+    <div class="container normal-panel normal-margin" >
+      <slot name="add"></slot>
       <!-- 表格主题 -->
       <tableLayout :layout="tablecols" :data="pateList" :opwidth="200" :custom="true" :height="tableHieght">
         <template v-slot:customcol="scope">

+ 29 - 2
src/HManagement/submit/index.vue

@@ -7,7 +7,7 @@
         idName="sat_submiteditmodelid"
         :apiId="{query:20221102093602,del:20221102094102}"
     >
-    <div slot="custom">
+    <div slot="custom" style="display:flex">
       <div class="label_center">
         <p class="search__label">状态:</p>
         <el-select
@@ -26,6 +26,24 @@
           ></el-option>
         </el-select>
       </div>
+      <div class="label_center">
+        <p class="search__label">提报类型:</p>
+        <el-select
+          class="inline-16"
+          size="small"
+          v-model="type"
+          placeholder="请选择提报类型"
+          @change="typeChange"
+          clearable
+        >
+          <el-option
+            v-for="(item,index) in typeList"
+            :label="item.label"
+            :value="item.value"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </div>
     </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'status'">
@@ -82,7 +100,12 @@ export default {
         {label:'新建',value:'新建'},
         {label:'发布',value:'发布'},
       ],
-      status:''  
+      typeList:[
+        {label:'一事一报',value:'0'},
+        {label:'一事多报',value:'1'},
+      ],
+      status:'',
+      type:''
     }
   },
   components:{
@@ -98,6 +121,10 @@ export default {
     handleSelectChange () {
       this.$refs.list.param.content.where.status = this.status
       this.$refs.list.listData()
+    },
+    typeChange () {
+      this.$refs.list.param.content.where.onceonly = this.type
+      this.$refs.list.listData()
     }
   }
 }

+ 4 - 4
src/HManagement/submit/list/modules/submit_add.vue

@@ -182,9 +182,6 @@ export default {
         onceonly: [
           { required: true, message: '请选择版块', trigger: 'change' }
         ],
-        notes: [
-          { required: true, message: '请输入提报要求', trigger: 'blur' },
-        ],
         type: [
           { type: 'array', required: true, message: '请至少选择一个提报形式', trigger: 'change' }
         ],
@@ -321,5 +318,8 @@ export default {
 }
 
 </script>
-<style>
+<style scoped>
+/deep/.drawer__panel {
+  padding-top: 0;
+}
 </style>

+ 0 - 3
src/HManagement/submit/list/modules/submit_edit.vue

@@ -140,9 +140,6 @@ export default {
         onceonly: [
           { required: true, message: '请选择版块', trigger: 'change' }
         ],
-        notes: [
-          { required: true, message: '请输入提报要求', trigger: 'blur' },
-        ],
         type: [
           { type: 'array', required: true, message: '请至少选择一个提报形式', trigger: 'change' }
         ],

+ 96 - 0
src/SManagement/notice/index copy.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="normal-card">
+    <search @searchActive="searchActive" @clearData="clearData" v-if="tool.checkAuth($route.name,'read')"></search>
+    <div class="content">
+      <list :list="list" v-if="tool.checkAuth($route.name,'read')"></list>
+      <div class="page">
+        <pagination :total="total"
+                    :pageSize="param.content.pageSize"
+                    :currentPage="param.content.pageNumber"
+                    @pageChange="pageChange">
+        </pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Pagination from '@/components/pagination/Pagination'
+import List from '@/SManagement/notice/compoents/list'
+import search from '@/components/search/index'
+export default {
+  name: "Index",
+  data() {
+    return {
+      param:{
+        "accesstoken": "2686aade24d20b15bbaa177dc35e638c",
+        "classname": "saletool.notice.notice",
+        "method": "queryNoticeList",
+        "content": {
+          "nocache": true,
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where":{
+              "condition":""
+          }
+        }
+      },
+      searchTitle: '',
+      list:[],
+      total:0,
+      currentPage:0,
+    };
+  },
+  components: {
+    Pagination,
+    List,
+    search,
+  },
+  created() {
+    this.getNoticeData()
+  },
+  mounted() {},
+  methods: {
+    //获取通告列表
+    async getNoticeData() {
+      let res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+    },
+    pageChange(val) {
+      this.param.content.pageNumber = val
+      this.getNoticeData()
+    },
+
+    async searchActive(data) {
+      this.param.content.where.condition = data.trim()
+      let res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+    },
+    clearData() {
+      this.param.content.where.condition = ''
+      this.getNoticeData()
+    },
+  }
+};
+</script>
+<style scoped>
+*{
+  box-sizing: border-box;
+}
+.normal-card {
+  min-height: 100%;
+  padding: 20px 0 50px 30px;
+  font-family: PingFang SC-Regular;
+}
+.normal-card .search {
+  width: 320px;
+  height: 36px;
+}
+.el-pagination {
+  position: absolute;
+  right: 16px;
+  bottom: 0;
+}
+</style>

+ 82 - 81
src/SManagement/notice/index.vue

@@ -1,96 +1,97 @@
+
 <template>
-  <div class="normal-card">
-    <search @searchActive="searchActive" @clearData="clearData" v-if="tool.checkAuth($route.name,'read')"></search>
-    <div class="content">
-      <list :list="list" v-if="tool.checkAuth($route.name,'read')"></list>
-      <div class="page">
-        <pagination :total="total"
-                    :pageSize="param.content.pageSize"
-                    :currentPage="param.content.pageNumber"
-                    @pageChange="pageChange">
-        </pagination>
+  <div>
+    <basicLayout 
+      ref="basicLayout" 
+      tableName="noticeListTable" 
+      idName="sat_noticeid" 
+      :apiId="{query:20221111090904}"
+      :options="options"
+      :detailPath="{
+        path:'/notice_detail'
+      }">
+      <div slot="custom">
+        <div class="label_center">
+          <p class="search__label">板块:</p>
+          <el-select
+            class="inline-16"
+            size="small"
+            v-model="type"
+            placeholder="请选择板块"
+            @change="handleSelectChange"
+            clearable
+          >
+            <el-option
+              v-for="(item,index) in typeList"
+              :label="item.classname"
+              :value="item.sat_notice_classid"
+              :key="index"
+            ></el-option>
+          </el-select>
+        </div>
       </div>
-    </div>
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname == 'cover'">
+          <el-image 
+            :src="scope.data.column.data[scope.data.column.columnname] || require('@/assets/notify.png')" 
+            lazy
+            fit="scale-down"
+          ></el-image>
+        </div>
+        <div v-else-if="scope.data.column.columnname == 'readstatus'">
+          <p :style="{'color':scope.data.column.data[scope.data.column.columnname] == '已读' ? '#cccccc' : '#FA8C16'}">{{scope.data.column.data[scope.data.column.columnname]}}</p>
+        </div>
+        <div v-else>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+      </template>
+    </basicLayout>
   </div>
 </template>
 
 <script>
-import Pagination from '@/components/pagination/Pagination'
-import List from '@/SManagement/notice/compoents/list'
-import search from '@/components/search/index'
+/**
+ * @basicLayout 提供this.$ref['basicLayout'].listData()方法查询列表信息
+ * @param {string} formPath 新建,编辑组件所在文件夹名称,以后所有列表新增修改文件统一放入Form文件夹下面,并创建与开发应用相同的名称的子文件夹
+ * @param {string} tableName 开发端配置的表格名称
+ * @param {String} idName 数据主id名称
+ * @param {object} apiId:{query:查询的接口id,del:删除的接口id} 
+ * @param {Array} options:{label:描述,value:值} 
+ */
 export default {
-  name: "Index",
-  data() {
+  data () {
     return {
-      param:{
-        "accesstoken": "2686aade24d20b15bbaa177dc35e638c",
-        "classname": "saletool.notice.notice",
-        "method": "queryNoticeList",
-        "content": {
-          "nocache": true,
-          "pageNumber": 1,
-          "pageSize": 10,
-          "where":{
-              "condition":""
-          }
-        }
-      },
-      searchTitle: '',
-      list:[],
-      total:0,
-      currentPage:0,
-    };
+      options:[],
+      type:'',
+      typeList:[]
+      
+    }
   },
-  components: {
-    Pagination,
-    List,
-    search,
+  created () {
+    this.getBrandList()
   },
-  created() {
-    this.getNoticeData()
-  },
-  mounted() {},
-  methods: {
-    //获取通告列表
-    async getNoticeData() {
-      let res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.total = res.total
-    },
-    pageChange(val) {
-      this.param.content.pageNumber = val
-      this.getNoticeData()
+  methods:{
+    handleSelectChange () {
+      this.$refs.basicLayout.param.content.where.sat_notice_classid = this.type
+      this.$refs.basicLayout.listData()
     },
+    /* 获取板块数据 */
+    async getBrandList () {
+      let res = await this.$api.requested({
+        "id":20221101094603,
+        "content":{
 
-    async searchActive(data) {
-      this.param.content.where.condition = data.trim()
-      let res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.total = res.total
-    },
-    clearData() {
-      this.param.content.where.condition = ''
-      this.getNoticeData()
-    },
+        }
+      })
+      this.typeList = res.data
+      console.log(this.typeList);
+      
+    }
   }
-};
-</script>
-<style scoped>
-*{
-  box-sizing: border-box;
-}
-.normal-card {
-  min-height: 100%;
-  padding: 20px 0 50px 30px;
-  font-family: PingFang SC-Regular;
-}
-.normal-card .search {
-  width: 320px;
-  height: 36px;
-}
-.el-pagination {
-  position: absolute;
-  right: 16px;
-  bottom: 0;
 }
+
+</script>
+<style>
 </style>

+ 21 - 19
src/SManagement/notice/notice_detail/NoticeDetail.vue

@@ -2,19 +2,21 @@
   <div class="normal-card">
     <div class="title-box">
       <div class="title">{{detailData.title}}</div>
-      <div class="descript">{{detailData.summary}}</div>
-      <div class="info">
-        <span class="tag">{{detailData.classname}}</span>
-        <span>{{detailData.createdate}}</span>
+      <div>
+        <div class="descript">{{detailData.summary}}</div>
+        <div class="info">
+          <span class="tag">{{detailData.classname}}</span>
+          <span>{{detailData.createdate}}</span>
+        </div>
       </div>
     </div>
-    <div class="text-content" v-if="tool.checkAuth($route.name,'read')">
+    <div class="text-content" v-if="detailData.content != '<p><br></p>'">
       <div id="fwb"></div>
     </div>
     <div class="file-content"  v-if="detailData.attinfos && detailData.attinfos.length > 0">
       <div class="file-download">
         <p class="title">附件下载</p>
-        <div class="file-list" v-if="tool.checkAuth($route.name,'read')">
+        <div class="file-list">
           <file-item 
                     :isDownLoad="true" 
                     :itemStyle="itemStyle" 
@@ -40,7 +42,7 @@
         <div class="comment-panl">
           <el-input type="textarea" :rows="4" placeholder="请填写留言" resize="none" :disabled="!commentData.leavemessage == false" v-model="send.content.leavemessage">
           </el-input>
-          <el-button type="success" size="small" :disabled="!commentData.leavemessage == false" @click.native="sendComment()" v-if="tool.checkAuth($route.name,'insert')">发表</el-button>
+          <el-button type="success" size="small" :disabled="!commentData.leavemessage == false" @click.native="sendComment()">发表</el-button>
         </div>
       </div>
     </div>
@@ -48,7 +50,7 @@
 </template>
 
 <script>
-import FileItem from '@/components/file-block/index'
+import FileItem from '@/components/file-block/index2'
 export default {
   name: "NoticeDetail",
   data () {
@@ -67,7 +69,7 @@ export default {
         "classname": "saletool.notice.notice",
         "method": "updateReadRecord",
         "content": {
-          "sat_noticeid": this.$route.query.sat_noticeid,
+          "sat_noticeid": this.$route.query.id,
           "score": 0,
           "leavemessage": ""
         }
@@ -113,11 +115,11 @@ export default {
     },
     //获取详情数据
     async getNoticeDetail () {
-      this.param.content.sat_noticeid = this.$route.query.sat_noticeid
+      this.param.content.sat_noticeid = this.$route.query.id
       let res = await this.$api.requested(this.param)
       this.detailData = res.data
       this.detailData.attinfos = this.fileType.fileList(this.detailData.attinfos)
-      this.compileFWB()
+      this.detailData.content != '<p><br></p>' ? this.compileFWB() : ''
     },
     //发表
     async sendComment () { 
@@ -143,7 +145,7 @@ export default {
         "classname": "saletool.notice.notice",
         "method": "queryReadRecord",
         "content": {
-            "sat_noticeid":this.$route.query.sat_noticeid
+            "sat_noticeid":this.$route.query.id
         }
       })
       this.commentData = res.data[0]    
@@ -156,10 +158,9 @@ export default {
         "classname": "saletool.notice.notice",
         "method": "updateDownloadRecord",
         "content": {
-          "sat_noticeid":this.$route.query.sat_noticeid
+          "sat_noticeid":this.$route.query.id
         }
       })
-      this.tool.showMessage(res)
     }
   }
 };
@@ -187,17 +188,21 @@ export default {
 .normal-card .title-box {
   padding-bottom: 20px;
   border-bottom: 1px solid #eeeeee;
+  display: flex;
+  flex-direction: column;
 }
 .normal-card .title-box .title {
   line-height: 24px;
-  margin-bottom: 10px;
+  padding-bottom: 10px;
+  font-size: 25px;
+  border-bottom: 1px solid #eeeeee;
 }
 .normal-card .title-box .descript {
   font-size: 14px;
   font-family: PingFang SC-Bold, PingFang SC;
-  font-weight: bold;
   color: #333333;
   line-height: 24px;
+  padding-top: 10px;
 }
 .normal-card .title-box .info {
   line-height: 16px;
@@ -238,9 +243,6 @@ export default {
 .normal-card .file-content .title {
   margin-bottom: 10px;
 }
-.normal-card .file-content .file-download {
-  margin-top: 20px;
-}
 .normal-card .file-content .file-download .file-list {
   display: flex;
   flex-wrap: wrap;

+ 180 - 0
src/components/file-block/index2.vue

@@ -0,0 +1,180 @@
+<template>
+  <div class="file10" v-if="fileData">
+    <div class="item-file" :style="[{width:(!itemStyle.itemWidth ? '100%' : itemStyle.itemWidth + 'px')},{'margin-right':itemStyle.margin + 'px'}]" v-for="(item,index) in fileData" :key="index">
+      <div class="left">
+        <div class="icon" :style="{width:itemStyle.img.width+'px',height:itemStyle.img.height+'px',}">
+          <img :src="item.cover" alt  />
+        </div>
+        <div class="text">
+          <p>{{item.document}}</p>
+          <p>{{item.createdate}}</p>
+        </div>
+      </div>
+      <div class="right">
+        <p class="see" @click="seeClick(item)">预览</p>
+        <p @click="deleteFile(item)" v-if="isDelete" class="delete">删除</p>
+        <button @click="downLoad(item)" v-if="isDownLoad">下载</button>
+      </div>
+    </div>
+    <see-File ref="seeFile" :fileData="seeFile"></see-File>
+  </div>
+</template>
+
+<script>
+import SeeFile from '@/components/file-block/components/SeeFile'
+
+import removeFile from '@/utils/removeFile'
+export default {
+  name: 'index',
+  data () {
+    return {
+      seeFile: '',
+      isSeeFileShow:false
+    };
+  },
+  props: {
+    isDownLoad: Boolean,
+    itemStyle: Object,
+    isDelete:Boolean,
+    fileData: {
+      default() {
+        return []
+      }
+    },
+    sat_noticeid:''
+  },
+  components: {
+    SeeFile,
+  },
+  computed: {
+  },
+  watch: {
+  },
+  created() {
+  },
+  methods: {
+    deleteFile(item) {
+      let temp = item
+      removeFile.removeFileList([item]).then(res => {
+        this.tool.showMessage(res,() => {
+          this.$emit('deleteSuccess',temp)
+        })
+      })
+    },
+    //预览
+    seeClick(item) {
+      if(item.fileType == 'image' || item.fileType == 'video') {
+        this.seeFile = item
+        this.$refs.seeFile.dialogVisible = true
+      } else {
+        this.$notify({
+          title:'提示',
+          message:'该文件暂不支持',
+          type:'warning'
+        })
+      }
+    },
+    downLoad(item) {
+      this.$emit('updateDownLoadRecord',item)
+      window.open(item.url,'_self')
+    }
+  },
+};
+</script>
+
+<style scoped>
+*{
+  box-sizing: border-box;
+}
+.file10 {
+  display: flex;
+  flex-wrap: wrap;
+}
+.item-file {
+  width: 334px;
+  background: #ffffff;
+  border-radius: 4px 4px 4px 4px;
+  border: 1px solid #cccccc;
+  margin: 0 0 10px 0;
+  padding: 12px 16px;
+  display: flex;
+  justify-content: space-between;
+}
+.item-file .left {
+  display: flex;
+  align-items: center;
+}
+.item-file .left .icon {
+  width: 29px;
+  height: 29px;
+  margin-right: 16px;
+}
+.item-file .left .icon img {
+  width: 100%;
+  height: 100%;
+}
+.item-file .left .text {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.item-file .left .text p:first-child {
+  font-size: 14px;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold;
+  color: #333333;
+  line-height: 22px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  width: 160px;
+}
+.item-file .left .text p:last-child {
+  font-size: 10px;
+  font-family: PingFang SC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #999999;
+  line-height: 22px;
+}
+.item-file .right {
+  display: flex;
+  align-items: center;
+}
+.item-file .right .see {
+  font-size: 14px;
+  font-weight: 400;
+  color: #3874f6;
+  cursor: pointer;
+}
+.item-file .right .delete {
+  font-size: 14px;
+  font-weight: 400;
+  color: #999999;
+  margin-left: 40px;
+  cursor: pointer;
+}
+.item-file .right button {
+  width: 70px;
+  height: 32px;
+  background: #3874f6;
+  border-radius: 52px;
+  border: none;
+  color: #ffffff;
+  margin-left: 16px;
+  cursor: pointer;
+}
+.no-file {
+  display: flex;
+  justify-content: space-around;
+  width: 100%;
+  margin-bottom: 10px;
+}
+.el-empty {
+  height: 150px;
+  transform: scale(70%);
+}
+/deep/.el-dialog__wrapper {
+  z-index: 9999;
+}
+</style>

+ 22 - 16
src/components/my-editor/Editor.vue

@@ -23,24 +23,29 @@ export default Vue.extend({
     components: { Editor, Toolbar },
     data() {
         return {
-            editor: null,
-            html: '',
-            toolbarConfig: { },
-            editorConfig: { 
-              placeholder: '请输入内容...',
-              MENU_CONF:{
-                uploadImage: {
-                  customUpload:this.update
-                },
-                uploadVideo: {
-                  customUpload:this.update
-                }
-              } 
-            },
-            mode: 'default', // or 'simple'
+          editor: null,
+          html: '',
+          toolbarConfig: { },
+          editorConfig: { 
+            placeholder: '请输入内容...',
+            MENU_CONF:{
+              uploadImage: {
+                customUpload:this.update
+              },
+              uploadVideo: {
+                customUpload:this.update
+              }
+            } 
+          },
+          mode: 'default', // or 'simple'
         }
     },
-    props: ['id','content'],
+    props: ['id','content','disabled'],
+    watch: {
+      disabled (val) {
+        val ? this.editor.disable() : this.editor.enable()
+      }
+    },
     methods: {
         onCreated(editor) {
             this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
@@ -112,6 +117,7 @@ export default Vue.extend({
         // 模拟 ajax 请求,异步渲染编辑器
         setTimeout(() => {
           this.html = this.content
+          this.disabled ? this.editor.disable() : this.editor.enable()
         }, 1000)
     },
     beforeDestroy() {

+ 22 - 18
src/router/HManagement.js

@@ -192,16 +192,28 @@ const HManagement = [
       title: '通告发布',
       ast_nav: true
     },
-    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/index.vue')
-  }, {
-    path: '/notice_add',
-    name: 'noticemag',
-    meta: {
-      title: '新增通告',
-      ast_nav:true,
-      keeproute:true
-    },
-    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/list/modules/add_notice')
+    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/index.vue'),
+    children: [
+      {
+        path: '/noticeclass',
+        name: 'noticeclass',
+        meta: {
+          title: '通告板块',
+          ast_nav: true
+        },
+        component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/pate/index')
+      },
+      {
+        path: '/notice_add',
+        name: 'noticemag',
+        meta: {
+          title: '新增通告',
+          ast_nav:true,
+          keeproute:true
+        },
+        component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/list/modules/add_notice')
+      },
+    ]
   }, {
     path: '/notice_edit',
     name: 'noticemag',
@@ -211,14 +223,6 @@ const HManagement = [
       keeproute: true
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/list/modules/edit.vue')
-  }, {
-    path: '/noticeclass',
-    name: 'noticeclass',
-    meta: {
-      title: '通告板块',
-      ast_nav: true
-    },
-    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/pate/index')
   }, {
     path: '/notice_analysis',
     name: 'noticemag',

+ 13 - 10
src/router/SManagement.js

@@ -5,16 +5,19 @@ const SManagement = [{
     title: '通告',
     ast_nav: true
   },
-  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/index.vue')
-}, {
-  path: '/notice_detail',
-  name: 'noticemag',
-  meta: {
-    title: '通告详情',
-    ast_nav: true,
-    keeproute: true
-  },
-  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/notice_detail/NoticeDetail')
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/index.vue'),
+  children: [
+    {
+      path: '/notice_detail',
+      name: 'notice',
+      meta: {
+        title: '通告详情',
+        ast_nav: true,
+        keeproute: true
+      },
+      component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/notice_detail/NoticeDetail')
+    }
+  ]
 }, {
   path: '/archives_list',
   name: 'archives',

+ 1 - 0
src/style/style.css

@@ -187,6 +187,7 @@ ul{
   border-top:1px solid #f1f2f3;
   background-color: #fff;
   box-shadow: 0 -5px 5px rgba(0, 0, 0, .05);
+  z-index: 9999999;
 }
 .drawer__panel{
   border-top:1px solid #eeeeee;