Преглед на файлове

消息通知和学习中心权限添加

songxy преди 1 година
родител
ревизия
9a5850f3e1

+ 3 - 1
client/src/views/OaSystem/home/indexOne.vue

@@ -17,7 +17,8 @@
               <i class="arrowRight"><ArrowRightBold /> </i>
             </span>
           </div>
-          <div class="content"> <CardItemOne /></div>
+          <div class="content" v-if="sevenType === 0"> <CardItemOne /></div>
+          <div class="content" v-else> <CardItemSeven3 :type="sevenType" /></div>
         </div>
         <div>
           <div class="header">
@@ -115,6 +116,7 @@ import CardItemFour from './components/CardItemFour.vue'
 import CardItemFive from './components/CardItemFive1.vue'
 import CardItemSix from './components/CardItemSix.vue'
 import CardItemSeven from './components/CardItemSeven.vue'
+import CardItemSeven3 from './components/CardItemSeven3.vue'
 
 defineOptions({ name: 'IndexOne' })
 

+ 27 - 10
client/src/views/OaSystem/officeCenter/learnCenter/index.vue

@@ -20,7 +20,11 @@
         </el-form-item>
         <el-form-item>
           <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
-          <el-button type="primary" :icon="UploadFilled" @click="onAddEditorHandle()"
+          <el-button
+            type="primary"
+            v-hasPermi="['adm:learnCenter:add']"
+            :icon="UploadFilled"
+            @click="onAddEditorHandle()"
             >新增</el-button
           >
         </el-form-item>
@@ -46,17 +50,24 @@
         </el-table-column>
         <el-table-column label="发布时间" prop="createTime" width="200" />
         <el-table-column label="阅读次数" prop="readNum" width="100" />
-        <el-table-column label="操作" width="180" align="left">
+        <el-table-column
+          label="操作"
+          width="180"
+          align="left"
+          v-hasPermi="['adm:learnCenter:edit', 'adm:learnCenter:del']"
+        >
           <template #default="scope">
             <div class="operationBox">
-              <span @click="onAddEditorHandle(scope.row.id)">编辑</span>
+              <span v-hasPermi="['adm:learnCenter:edit']" @click="onAddEditorHandle(scope.row.id)"
+                >编辑</span
+              >
               <el-popconfirm
                 title="确定要删除该条数据?"
                 width="180px"
                 @confirm="deleteHandle(scope.row)"
               >
                 <template #reference>
-                  <span>删除</span>
+                  <span v-hasPermi="['adm:learnCenter:del']">删除</span>
                 </template>
               </el-popconfirm>
             </div>
@@ -165,17 +176,23 @@ const handleCurrentChange = (page: number): void => {
 
 <style lang="scss" scoped>
 .newsSetting {
-  margin-top: 20px;
-  height: calc(100% - 20px);
+  height: 100%;
   background-color: #fff;
   border-radius: 20px;
   padding: 20px;
   position: relative;
-  > .title {
-    padding-bottom: 20px;
-    font-size: 20px;
-  }
+  display: flex;
+  flex-direction: column;
   > .tableBox {
+    width: 100%;
+    overflow-y: auto;
+    flex-grow: 1;
+    height: 0px;
+  }
+  > .pageBox {
+    padding-top: 15px;
+    display: flex;
+    justify-content: flex-end;
   }
   :deep {
     .el-table th.el-table__cell {

+ 42 - 21
client/src/views/OaSystem/officeCenter/notice/index.vue

@@ -20,14 +20,27 @@
         </el-form-item>
         <el-form-item>
           <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
-          <el-button type="primary" :icon="UploadFilled" @click="onAddEditorHandle()"
+          <el-button
+            type="primary"
+            v-hasPermi="['adm:notice:add']"
+            :icon="UploadFilled"
+            @click="onAddEditorHandle()"
             >新增</el-button
           >
         </el-form-item>
       </el-form>
     </div>
     <div class="tableBox">
-      <el-table :data="tableData" style="width: 100%">
+      <el-table
+        :data="tableData"
+        style="width: 100%; height: 100%"
+        :style="{ height: tableHeight + 'px' }"
+        :header-cell-style="{
+          background: '#E5F0FB',
+          color: '#233755',
+          height: '50px'
+        }"
+      >
         <el-table-column type="index" label="序号" width="100" />
         <el-table-column prop="title" label="标题">
           <template #default="scope">
@@ -46,17 +59,24 @@
         </el-table-column>
         <el-table-column label="发布时间" prop="createTime" width="200" />
         <el-table-column label="阅读次数" prop="readNum" width="100" />
-        <el-table-column label="操作" width="180" align="left">
+        <el-table-column
+          label="操作"
+          width="180"
+          align="left"
+          v-hasPermi="['adm:notice:edit', 'adm:notice:del']"
+        >
           <template #default="scope">
             <div class="operationBox">
-              <span @click="onAddEditorHandle(scope.row.id)">编辑</span>
+              <span @click="onAddEditorHandle(scope.row.id)" v-hasPermi="['adm:notice:edit']">
+                编辑
+              </span>
               <el-popconfirm
                 title="确定要删除该条数据?"
                 width="180px"
                 @confirm="deleteHandle(scope.row)"
               >
                 <template #reference>
-                  <span>删除</span>
+                  <span v-hasPermi="['adm:notice:del']">删除</span>
                 </template>
               </el-popconfirm>
             </div>
@@ -107,7 +127,7 @@ const formData = ref<{
   title: '',
   readType: 2
 })
-const queryArticleByPage = async (): Promise<void> => {
+const queryListByPage = async (): Promise<void> => {
   const urlApi = `/adm/noticeAndLearn/query/page`
   const sendData = {
     pageNo: pageNo.value,
@@ -132,13 +152,13 @@ const deleteHandle = async (row): Promise<void> => {
       message: '删除成功.',
       type: 'success'
     })
-    queryArticleByPage()
+    queryListByPage()
   }
 }
-queryArticleByPage()
+queryListByPage()
 const onSearchHandle = (): void => {
   pageNo.value = 1
-  queryArticleByPage()
+  queryListByPage()
 }
 const onAddEditorHandle = (idStr = null): void => {
   if (idStr) {
@@ -158,23 +178,29 @@ const toLookDetail = (row: any): void => {
 }
 const handleCurrentChange = (page: number): void => {
   pageNo.value = page
-  queryArticleByPage()
+  queryListByPage()
 }
 </script>
 
 <style lang="scss" scoped>
 .newsSetting {
-  margin-top: 20px;
-  height: calc(100% - 20px);
+  height: 100%;
   background-color: #fff;
   border-radius: 20px;
   padding: 20px;
   position: relative;
-  > .title {
-    padding-bottom: 20px;
-    font-size: 20px;
-  }
+  display: flex;
+  flex-direction: column;
   > .tableBox {
+    width: 100%;
+    overflow-y: auto;
+    flex-grow: 1;
+    height: 0px;
+  }
+  > .pageBox {
+    padding-top: 15px;
+    display: flex;
+    justify-content: flex-end;
   }
   :deep {
     .el-table th.el-table__cell {
@@ -182,11 +208,6 @@ const handleCurrentChange = (page: number): void => {
       color: #4c525b;
     }
   }
-  > .pageBox {
-    padding: 20px 0px 10px 0px;
-    display: flex;
-    justify-content: right;
-  }
   .line-primary {
     text-decoration: none;
     color: #4c525b;