n20-common-lib 2.7.44 → 2.7.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.7.44",
3
+ "version": "2.7.45",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -221,7 +221,7 @@
221
221
  </template>
222
222
  <template v-slot="{ row }">
223
223
  <slot name="handle" :row="row">
224
- <el-button type="text" icon="el-icon-view" :disabled="!row[keys.url]" @click="seeFile(row)" />
224
+ <el-button type="text" icon="el-icon-view" v-if="officeStatus" :disabled="!row[keys.url]" @click="seeFile(row)" />
225
225
  <el-button
226
226
  v-if="readonly"
227
227
  type="text"
@@ -350,6 +350,7 @@ import Dialog from '../Dialog/index.vue'
350
350
  import 'viewerjs/dist/viewer.css'
351
351
  import importG from '../../utils/importGlobal.js'
352
352
  import downloadBlob from '../../utils/downloadBlob.js'
353
+ import {log} from "qrcode/lib/core/galois-field";
353
354
 
354
355
  const ViewerImg = async function () {
355
356
  let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
@@ -459,7 +460,8 @@ export default {
459
460
  chooseVisible: false,
460
461
  typeOptions: [],
461
462
  previewSameOrg: false,
462
- selectionList: []
463
+ selectionList: [],
464
+ officeStatus:false
463
465
  }
464
466
  },
465
467
  watch: {
@@ -528,8 +530,14 @@ export default {
528
530
  if (this.dataProp.bussId && this.dataProp.bussValue) {
529
531
  this.getFileList()
530
532
  }
533
+ this.getOfficeStatus()
531
534
  },
532
535
  methods: {
536
+ async getOfficeStatus() {
537
+ const {data} =await this.$axios.get( this.requestPrefix
538
+ ? `${this.requestPrefix}/neams/eamsBaseFile/getOfficeIsEnable`:`/neams/eamsBaseFile/getOfficeIsEnable`)
539
+ this.officeStatus = data
540
+ },
533
541
  rowStyle({ row, rowIndex }) {
534
542
  if (row.isEnable === '0') {
535
543
  return { 'background-color': '#FF3C2F10' }
@@ -164,7 +164,7 @@
164
164
  <el-table-column :label="'操作' | $lc" align="center" width="90" fixed="right">
165
165
  <slot slot="header" slot-scope="scope" name="handle-header" :column="scope.column">{{ '操作' | $lc }}</slot>
166
166
  <slot slot-scope="{ row }" name="handle" :row="row">
167
- <el-button type="text" icon="el-icon-view" :disabled="!row[keys.url]" @click="seeFile(row)" />
167
+ <el-button type="text" icon="el-icon-view" v-if="getOfficeStatus" :disabled="!row[keys.url]" @click="seeFile(row)" />
168
168
  <el-button
169
169
  v-if="readonly"
170
170
  type="text"
@@ -408,7 +408,8 @@ export default {
408
408
  previewUrl: undefined,
409
409
  previewName: undefined,
410
410
  previewSameOrg: false,
411
- seeRow: {}
411
+ seeRow: {},
412
+ officeStatus:false
412
413
  }
413
414
  },
414
415
  computed: {
@@ -435,6 +436,11 @@ export default {
435
436
  }
436
437
  },
437
438
  methods: {
439
+ async getOfficeStatus() {
440
+ const {data} =await this.$axios.get( this.apiPrefix
441
+ ? `${this.apiPrefix}/neams/eamsBaseFile/getOfficeIsEnable`:`/neams/eamsBaseFile/getOfficeIsEnable`)
442
+ this.officeStatus = data
443
+ },
438
444
  async batchPrint() {
439
445
  if (!this.selectionList.length) {
440
446
  return this.$message({
@@ -49,7 +49,6 @@ const routerBaseRe = new RegExp('^' + routerBase)
49
49
  import { addListener, removeListener } from 'resize-detector'
50
50
 
51
51
  import { getCert } from '../../plugins/Sign'
52
- import auth from '../../utils/auth'
53
52
  import forEachs from '../../utils/forEachs'
54
53
  import { setRela } from '../../utils/relaNo'
55
54
  import asideNav from './AsideNav/index.vue'
@@ -177,11 +176,11 @@ export default {
177
176
 
178
177
  window.addEventListener('beforeunload', this.setTabList)
179
178
 
180
- const { enableCertify,enableTime =60000 } = await getJsonc('/server-config.jsonc')
179
+ const { enableCertify } = await getJsonc('/server-config.jsonc')
181
180
  if (enableCertify) {
182
181
  this.certifyInterval = setInterval(() => {
183
182
  this.getCertify()
184
- }, enableTime)
183
+ }, 60000)
185
184
  }
186
185
  },
187
186
  mounted() {
@@ -206,9 +205,6 @@ export default {
206
205
  const cert = await getCert()
207
206
  if (cert === -1 || ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(cert)) {
208
207
  this.$message.error($lc(`证书验证失败,请重新登录`))
209
- setTimeout(() =>{
210
- auth.removeToken()
211
- },1000)
212
208
  }
213
209
  },
214
210
  setMainTab(ev) {