Просмотр исходного кода

同步master授权人员相关内容

cyy 13 часов назад
Родитель
Сommit
a36eac0dfd

+ 13 - 0
src/api/platform/device/device.js

@@ -151,3 +151,16 @@ export function queryEquipmentPvRecord(data) {
     data: data
   })
 }
+
+/**
+ * 授权人员列表,设备使用授权, 人员岗位授权
+ * @param {*} data
+ * @returns
+ */
+export function queryPersonRecord(data) {
+  return request({
+    url: BUSINESS_BASE_URL() + '/equipment/authorization/query',
+    method: 'post',
+    data: data
+  })
+}

+ 129 - 0
src/views/component/device/authorizedPersonRecord.vue

@@ -0,0 +1,129 @@
+<!-- 授权人员 -->
+<template>
+  <div v-loading="loading" class="table">
+      <el-table :data="listData">
+          <el-table-column
+              prop=""
+              label="序号"
+              width="50"
+              type="index"
+              :index="showIndex"
+          />
+          <el-table-column prop="bianZhiShiJian" label="授权日期">
+              <template slot-scope="{row}">
+                  {{ formatDate(row.bianZhiShiJian) }}
+              </template>
+          </el-table-column>
+          <el-table-column prop="bianZhiBuMen" label="专业组">
+              <template slot-scope="{row}">
+                  <ibps-user-selector
+                      :value="row.bianZhiBuMen"
+                      type="position"
+                      readonly-text="text"
+                      :disabled="true"
+                      :multiple="true"
+                      size="mini"
+                  />
+              </template>
+          </el-table-column>
+          <el-table-column prop="renYuanMing" label="姓名" />
+      </el-table>
+      <el-pagination
+          style="margin-top: 5px; padding-bottom: 10px"
+          :current-page="requestPage.pageNo"
+          :page-sizes="[10, 20,30, 50]"
+          :page-size="requestPage.limit"
+          layout="prev,pager,next,jumper,sizes,->,total"
+          :total="total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+      />
+  </div>
+</template>
+
+<script>
+import ibpsUserSelector from '@/business/platform/org/selector'
+import { queryPersonRecord } from '@/api/platform/device/device'
+export default {
+  components: {
+      ibpsUserSelector
+  },
+  props: {
+      params: {
+          type: Object,
+          default: () => {}
+      }
+  },
+  data () {
+      return {
+          pkValue: '',
+          DialogVisible: false,
+          iframeVisible: false,
+          srcUrl: '',
+          loading: false,
+          listData: [],
+          total: 0,
+          requestPage: {
+              limit: 10,
+              pageNo: 1
+          }
+      }
+  },
+  mounted () {
+      this.getData()
+  },
+  methods: {
+      async getData () {
+          this.loading = true
+          const { data: { dataResult, pageResult }} = await queryPersonRecord({
+              requestPage: this.requestPage,
+              parameters: [
+                  { key: 'Q^she_bei_ming_chen^S', value: this.params.id }
+              ]
+          })
+          this.listData = dataResult
+          this.total = pageResult.totalCount
+          this.loading = false
+      },
+      // 当前页码改变
+      handleCurrentChange (val) {
+          this.requestPage.pageNo = val
+          this.getData()
+      },
+      // 页码选择器改变
+      handleSizeChange (val) {
+          this.requestPage.limit = val
+          this.requestPage.pageNo = 1
+          this.getData()
+      },
+      // 分页连续序号
+      showIndex (index) {
+          return index + 1 + (this.requestPage.pageNo - 1) * this.requestPage.limit
+      },
+      formatDate (date) {
+          if (!date) return ''
+
+          const d = new Date(date)
+
+          // 检查日期是否有效
+          if (isNaN(d.getTime())) return date
+
+          const year = d.getFullYear()
+          const month = String(d.getMonth() + 1).padStart(2, '0')
+          const day = String(d.getDate()).padStart(2, '0')
+
+          return `${year}-${month}-${day}`
+      }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.table{
+  .button{
+      margin-bottom: 5px;
+      display: flex;
+      justify-content: flex-end;
+  }
+}
+</style>

+ 16 - 3
src/views/component/device/deviceDialog.vue

@@ -1137,7 +1137,8 @@ export default {
     RepairRecord: () => import('./repairRecord.vue'),
     CalibrationCheckRecord: () => import('./calibrationCheckRecord.vue'),
     ConfirmationRecord: () => import('./ConfirmationRecord.vue'),
-    performanceVerificationRecord: () => import('./performanceVerificationRecord.vue'),
+    performanceVerificationRecord: () =>
+      import('./performanceVerificationRecord.vue'),
     PvRecord: () => import('./pvRecord.vue'),
     SelectType: () => import('@/views/component/selectType.vue'),
     IbpsCustomDialog: () => ({
@@ -1153,6 +1154,10 @@ export default {
     IbpsImage: () => ({
       component: import('@/business/platform/file/image'),
       delay: 200
+    }),
+    AuthorizedPersonRecord: () => ({
+      component: import('./authorizedPersonRecord.vue'),
+      delay: 200
     })
   },
   props: {
@@ -1269,7 +1274,7 @@ export default {
           data: 'perfVerificationRecordPoList',
           component: 'performanceVerificationRecord',
           isKeepAlive: false
-        },
+        }
         // 同步与深圳三院分支,后端暂未同步对应接口,不开放
         // { label: '性能验证记录', name: 'nine', component: 'PvRecord', isKeepAlive: true }
       ],
@@ -1773,6 +1778,14 @@ export default {
       }
       this.isEdit = !!(this.params && this.params.id)
       this.isSheKou = this.deptList[0].positionId === '1166372468122714112' // 判断是否是蛇口医院
+      if (deviceres?.authorization) {
+        this.tabItems.push({
+          label: '授权人员',
+          name: 'nine',
+          component: 'AuthorizedPersonRecord',
+          isKeepAlive: true
+        })
+      }
 
       // 根据全局配置动态生成tab
       const newTab = []
@@ -1918,4 +1931,4 @@ export default {
     }
   }
 }
-</style>
+</style>