Browse Source

首页人员接口更改

all 5 years ago
parent
commit
9391fec337

+ 1 - 1
backend/src/dashoo.cn/modi_webapi/router/router.go

@@ -89,7 +89,7 @@ func init() {
 		LoginBeforeFunc:  loginFunc,
 		LogoutPath:       "/logout",
 		AuthPaths:        g.SliceStr{"/api"},                                                                                                                                                          // 这里是按照前缀拦截,拦截/api
-		AuthExcludePaths: g.SliceStr{"/api/class/*", "/api/student/*", "/api/micro/*", "/api/item/*", "/api/itemdetail/*", "/api/information/*", "/api/duty/*", "/api/course/*", "/api/itemdetail/*"}, // 不拦截路径
+		AuthExcludePaths: g.SliceStr{"/api/class/*", "/api/student/*", "/api/micro/*", "/api/item/*", "/api/itemdetail/*", "/api/information/*", "/api/duty/*", "/api/course/*", "/api/itemdetail/*", "/api/personnel/*"}, // 不拦截路径
 	}
 	gfToken.Start()
 }

+ 16 - 4
frontend_web/src/views/demo/page1/components/dutyInfoDialog.vue

@@ -68,6 +68,7 @@
 import DutyApi from '@/api/duty'
 import itemDetailApi from '@/api/sysadmin/itemdetail'
 import { searchmanagingroomdata } from '@/api/instrumentroom'
+import PersonnelApi from '@/api/personnel'
 export default {
   name: 'informationDialog',
   props: {
@@ -149,12 +150,23 @@ export default {
         }
       }
     },
+    // // 获取字典表值班人员
+    // getPeople () {
+    //   let _this = this
+    //   itemDetailApi.getItemDetailByItemCode({ ItemCode: 'People' })
+    //     .then(res => {
+    //       _this.PeopleList = res
+    //     })
+    //     .catch(err => {
+    //       console.error(err)
+    //     })
+    // },
     // 获取字典表值班人员
     getPeople () {
       let _this = this
-      itemDetailApi.getItemDetailByItemCode({ ItemCode: 'People' })
+      PersonnelApi.getAllPersonnel({ current: 1, size: 999 })
         .then(res => {
-          _this.PeopleList = res
+          _this.PeopleList = res.records
         })
         .catch(err => {
           console.error(err)
@@ -163,8 +175,8 @@ export default {
     formatPerson (row, column, cellValue, index) {
       let label = '休息'
       for (var i = 0; i < this.PeopleList.length; i++) {
-        if (this.PeopleList[i].ItemValue == cellValue) {
-          return this.PeopleList[i].ItemName
+        if (this.PeopleList[i].Id == cellValue) {
+          return this.PeopleList[i].PersonnelName
         }
       }
       return label

+ 3 - 3
frontend_web/src/views/demo/page1/index.vue

@@ -51,7 +51,7 @@
                            label="发布时间"
                            show-overflow-tooltip></el-table-column>
         </el-table>
-        <el-pagination style="margin: 10px;"
+        <el-pagination style="margin: 10px;float:right;"
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="search.page.current"
@@ -148,7 +148,7 @@
                            label="创建时间"
                            show-overflow-tooltip></el-table-column>
         </el-table>
-        <el-pagination style="margin: 10px;"
+        <el-pagination style="margin: 10px;float:right;"
                        @size-change="handleSizeChange_course"
                        @current-change="handleCurrentChange_course"
                        :current-page="searchcourse.page.current"
@@ -236,7 +236,7 @@
                            min-width="120px"
                            show-overflow-tooltip></el-table-column>
         </el-table>
-        <el-pagination style="margin: 10px;"
+        <el-pagination style="margin: 10px;float:right;"
                        @size-change="handleSizeChangeduty"
                        @current-change="handleCurrentChangeduty"
                        :current-page="searchduty.page.current"