Pārlūkot izejas kodu

学习中心和通知公告查看页面

songxy 1 gadu atpakaļ
vecāks
revīzija
c4ce86f7ed

+ 16 - 0
client/src/router/modules/remaining.ts

@@ -160,6 +160,22 @@ const remainingRouter: AppRouteRecordRaw[] = [
           title: '新闻详情'
         }
       },
+      {
+        path: 'noticeLook',
+        component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/noticeLook.vue'),
+        name: 'noticeLook',
+        meta: {
+          title: '通知公告查看'
+        }
+      },
+      {
+        path: 'learnCenterLook',
+        component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/learnCenterLook.vue'),
+        name: 'learnCenterLook',
+        meta: {
+          title: '学习中心查看'
+        }
+      },
       {
         path: 'noticeAdd',
         component: () => import('@/views/OaSystem/officeCenter/noticeAndLearn/addoreditor.vue'),

+ 1 - 1
client/src/views/OaSystem/home/homeLeader.vue

@@ -75,7 +75,7 @@ const newsTabs = [
   {
     label: '通知公告',
     type: 1,
-    path: 'oaSystem/officeCenter/notice'
+    path: '/noticeLook'
   }
 ]
 

+ 1 - 1
client/src/views/OaSystem/home/homeStaff.vue

@@ -60,7 +60,7 @@ const moreHandle = () => {
   router.push({ path: '/newsLook' })
 }
 const moreAnnounceClick = () => {
-  router.push({ path: '/oaSystem/officeCenter/notice' })
+  router.push({ path: '/noticeLook' })
 }
 const barListData = [
   {

+ 0 - 1
client/src/views/OaSystem/officeCenter/notice/index.vue

@@ -34,7 +34,6 @@
       <el-table
         :data="tableData"
         style="width: 100%; height: 100%"
-        :style="{ height: tableHeight + 'px' }"
         :header-cell-style="{
           background: '#E5F0FB',
           color: '#233755',

+ 169 - 0
client/src/views/OaSystem/officeCenter/noticeAndLearn/learnCenterLook.vue

@@ -0,0 +1,169 @@
+<template>
+  <div class="newsSetting">
+    <div class="searchBox">
+      <el-form :inline="true" :model="formData" class="demo-form-inline">
+        <el-form-item label="发布人:">
+          <el-input placeholder="请输入发布人" v-model="formData.nickname" />
+        </el-form-item>
+        <el-form-item label="发布时间:">
+          <el-date-picker v-model="formData.createTime" type="date" placeholder="请选择发布时间" />
+        </el-form-item>
+        <el-form-item label="标题:">
+          <el-input placeholder="请输入标题" v-model="formData.title" />
+        </el-form-item>
+        <el-form-item label="已读未读:">
+          <el-select placeholder="" v-model="formData.readType">
+            <el-option :value="2" label="全部" />
+            <el-option :value="1" label="已读" />
+            <el-option :value="0" label="未读" />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="tableBox">
+      <el-table :data="tableData" style="width: 100%">
+        <el-table-column type="index" label="序号" width="100" />
+        <el-table-column prop="title" label="标题">
+          <template #default="scope">
+            <a
+              :class="{ 'line-primary': true, active: !scope.row['readState'] }"
+              href="javascript:void(0)"
+              @click="toLookDetail(scope.row)"
+              >{{ scope.row['title'] }}</a
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="发布人" prop="creator" width="120">
+          <template #default="scope">
+            <span>{{ userMap[scope.row.creator] }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="发布时间" prop="createTime" width="200" />
+        <el-table-column label="阅读次数" prop="readNum" width="100" />
+      </el-table>
+    </div>
+    <div class="pageBox">
+      <el-pagination
+        v-model:current-page="pageNo"
+        :page-size="10"
+        background
+        layout="total, prev, pager, next, jumper"
+        :total="total"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref } from 'vue'
+import { useRouter } from 'vue-router'
+import request from '@/config/axios'
+import { Search } from '@element-plus/icons-vue'
+import { getSimpleUserMap } from '@/api/system/user'
+
+defineOptions({ name: 'LearnCenter' })
+
+const userMap = ref<any>({})
+async function initSimpleUserMap() {
+  userMap.value = await getSimpleUserMap()
+}
+initSimpleUserMap()
+const pageNo = ref<number>(1)
+const tableData = ref<any>([])
+const total = ref<number>()
+
+const router = useRouter()
+const formData = ref<{
+  nickname: string
+  createTime: any
+  title: string
+  readType: number
+}>({
+  nickname: '',
+  createTime: null,
+  title: '',
+  readType: 2
+})
+const queryArticleByPage = async (): Promise<void> => {
+  const urlApi = `/adm/noticeAndLearn/query/page`
+  const sendData = {
+    pageNo: pageNo.value,
+    pageSize: 10,
+    type: 2,
+    ...formData.value
+  }
+  const result = await request.post({ url: urlApi, data: sendData })
+  tableData.value = result['list']
+  total.value = result['total']
+}
+queryArticleByPage()
+const onSearchHandle = (): void => {
+  pageNo.value = 1
+  queryArticleByPage()
+}
+const toLookDetail = (row: any): void => {
+  router.push({
+    path: '/learnCenterDetail',
+    query: { id: row['id'] } as { id: number }
+  })
+}
+const handleCurrentChange = (page: number): void => {
+  pageNo.value = page
+  queryArticleByPage()
+}
+</script>
+
+<style lang="scss" scoped>
+.newsSetting {
+  height: 100%;
+  background-color: #fff;
+  border-radius: 20px;
+  padding: 20px;
+  position: relative;
+  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 {
+      background-color: #edf2fc;
+      color: #4c525b;
+    }
+  }
+  > .pageBox {
+    padding: 20px 0px 10px 0px;
+    display: flex;
+    justify-content: right;
+  }
+  .line-primary {
+    text-decoration: none;
+    color: #4c525b;
+    &.active {
+      font-weight: bold;
+    }
+    &:hover {
+      color: #409eff;
+    }
+  }
+  .operationBox {
+    > span {
+      color: #409eff;
+      margin-right: 15px;
+      cursor: pointer;
+    }
+  }
+}
+</style>

+ 171 - 0
client/src/views/OaSystem/officeCenter/noticeAndLearn/noticeLook.vue

@@ -0,0 +1,171 @@
+<template>
+  <div class="newsSetting">
+    <div class="searchBox">
+      <el-form :inline="true" :model="formData" class="demo-form-inline">
+        <el-form-item label="发布人:">
+          <el-input placeholder="请输入发布人" v-model="formData.nickname" />
+        </el-form-item>
+        <el-form-item label="发布时间:">
+          <el-date-picker v-model="formData.createTime" type="date" placeholder="请选择发布时间" />
+        </el-form-item>
+        <el-form-item label="标题:">
+          <el-input placeholder="请输入标题" v-model="formData.title" />
+        </el-form-item>
+        <el-form-item label="已读未读:">
+          <el-select placeholder="" v-model="formData.readType">
+            <el-option :value="2" label="全部" />
+            <el-option :value="1" label="已读" />
+            <el-option :value="0" label="未读" />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="tableBox">
+      <el-table
+        :data="tableData"
+        style="width: 100%; height: 100%"
+        :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">
+            <a
+              :class="{ 'line-primary': true, active: !scope.row['readState'] }"
+              href="javascript:void(0)"
+              @click="toLookDetail(scope.row)"
+              >{{ scope.row['title'] }}</a
+            >
+          </template>
+        </el-table-column>
+        <el-table-column label="发布人" prop="creator" width="120">
+          <template #default="scope">
+            <span>{{ userMap[scope.row.creator] }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="发布时间" prop="createTime" width="200" />
+        <el-table-column label="阅读次数" prop="readNum" width="100" />
+      </el-table>
+    </div>
+    <div class="pageBox">
+      <el-pagination
+        v-model:current-page="pageNo"
+        :page-size="10"
+        background
+        layout="total, prev, pager, next, jumper"
+        :total="total"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref } from 'vue'
+import { useRouter } from 'vue-router'
+import request from '@/config/axios'
+import { Search } from '@element-plus/icons-vue'
+import { getSimpleUserMap } from '@/api/system/user'
+
+defineOptions({ name: 'Notice' })
+
+const userMap = ref<any>({})
+async function initSimpleUserMap() {
+  userMap.value = await getSimpleUserMap()
+}
+initSimpleUserMap()
+const pageNo = ref<number>(1)
+const tableData = ref<any>([])
+const total = ref<number>()
+const router = useRouter()
+const formData = ref<{
+  nickname: string
+  createTime: any
+  title: string
+  readType: number
+}>({
+  nickname: '',
+  createTime: null,
+  title: '',
+  readType: 2
+})
+const queryListByPage = async (): Promise<void> => {
+  const urlApi = `/adm/noticeAndLearn/query/page`
+  const sendData = {
+    pageNo: pageNo.value,
+    pageSize: 10,
+    type: 1,
+    ...formData.value
+  }
+  const result = await request.post({ url: urlApi, data: sendData })
+  tableData.value = result['list']
+  total.value = result['total']
+}
+queryListByPage()
+const onSearchHandle = (): void => {
+  pageNo.value = 1
+  queryListByPage()
+}
+const toLookDetail = (row: any): void => {
+  router.push({
+    path: '/noticeDetail',
+    query: { id: row['id'] } as { id: number }
+  })
+}
+const handleCurrentChange = (page: number): void => {
+  pageNo.value = page
+  queryListByPage()
+}
+</script>
+
+<style lang="scss" scoped>
+.newsSetting {
+  height: 100%;
+  background-color: #fff;
+  border-radius: 20px;
+  padding: 20px;
+  position: relative;
+  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 {
+      background-color: #edf2fc;
+      color: #4c525b;
+    }
+  }
+  .line-primary {
+    text-decoration: none;
+    color: #4c525b;
+    &.active {
+      font-weight: bold;
+    }
+    &:hover {
+      color: #409eff;
+    }
+  }
+  .operationBox {
+    > span {
+      color: #409eff;
+      margin-right: 15px;
+      cursor: pointer;
+    }
+  }
+}
+</style>

+ 13 - 3
client/src/views/OaSystem/projectCenter/projectDetail/components/xmxx/index.vue

@@ -54,7 +54,7 @@
                     :disabled="!editor"
                   />
                 </td>
-                <td class="th">责任部门</td>
+                <td class="th">责任部门</td>
                 <td>
                   <DeptTree
                     class="form-item-disable-style"
@@ -130,7 +130,7 @@
                   />
                 </td>
               </tr>
-              <tr>
+              <tr v-show="isMaster">
                 <td class="th">预估工期(天):</td>
                 <td>
                   <el-input
@@ -148,6 +148,16 @@
                   />
                 </td>
               </tr>
+              <tr v-show="!isMaster">
+                <td class="th">预估工期(天):</td>
+                <td colspan="3">
+                  <el-input
+                    class="form-item-disable-style"
+                    v-model="projectDetail['yggq']"
+                    :disabled="!editor"
+                  />
+                </td>
+              </tr>
             </table>
           </div>
           <div class="tableBox" v-show="isMaster">
@@ -175,7 +185,7 @@
                 <td>{{ projectDetail?.['outputValue'] }}</td>
                 <td class="th">利益分成(公司/部门):</td>
                 <td>
-                  <RatioInput v-model="projectDetail.shareRatio" />
+                  <RatioInput :disabled="!editor" v-model="projectDetail.shareRatio" />
                 </td>
               </tr>
             </table>