فهرست منبع

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

zangkai 5 سال پیش
والد
کامیت
71541764f5

+ 3 - 3
backend/src/dashoo.cn/modi_webapi/app/api/information/information.go

@@ -1,9 +1,9 @@
 package information
 
 import (
-	"dashoo.cn/micro_libary/response"
 	"dashoo.cn/modi_webapi/app/model/information"
 	service "dashoo.cn/modi_webapi/app/service/information"
+	"dashoo.cn/modi_webapi/library/response"
 	"github.com/gogf/gf/net/ghttp"
 	"github.com/gogf/gf/os/glog"
 )
@@ -88,7 +88,7 @@ func (c *Controller) GetDetailById(r *ghttp.Request) {
 	if information, err := servcie.GetByID(id); err != nil {
 		response.Json(r, -1, err.Error())
 	} else {
-		response.Json(r, 0, "ok", information)
+		response.Json(r, 0, "", information)
 	}
 
 }
@@ -118,6 +118,6 @@ func (c *Controller) GetPageList(r *ghttp.Request) {
 			records.Total = total
 			records.Records = informationList
 		}
-		response.Json(r, 0, "ok", records)
+		response.Json(r, 0, "", records)
 	}
 }

+ 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"