From 5eeb8864bebb1dc4f97f2feef32b742d8a9a10d5 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 14 九月 2022 15:43:04 +0800
Subject: [PATCH] 1.新增报表管理菜单
---
src/views/sbgl/djbw.vue | 56 +++++++++++++++++++++++++++++++++-----------------------
1 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/src/views/sbgl/djbw.vue b/src/views/sbgl/djbw.vue
index 77b6130..6fcfd53 100644
--- a/src/views/sbgl/djbw.vue
+++ b/src/views/sbgl/djbw.vue
@@ -71,6 +71,7 @@
<el-table-column
prop="RowNum"
width="50"
+ fixed
label="搴忓彿"
/>
<el-table-column
@@ -86,16 +87,28 @@
<el-table-column
prop="description"
label="鐐规瑕佹眰"
+ show-tooltip-when-overflow
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.description">{{ row.description }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="isscan"
label="閫夋嫨鎵爜"
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.isscan==='Y'">鏄�</div>
- <div v-if="row.isscan==='N'">鍚�</div>
+ <div v-if="row.isscan==='Y'">
+ <svg-icon icon-class="circleYes" style="margin-right: 2px" />
+ 鏄�
+ </div>
+ <div v-if="row.isscan==='N'">
+ <svg-icon icon-class="circleNo" style="margin-right: 2px" />
+ 鍚�
+ </div>
</template>
</el-table-column>
<el-table-column
@@ -142,7 +155,7 @@
:page.sync="form.page"
:limit.sync="form.rows"
align="right"
- layout="prev, pager, next,sizes"
+ layout="total,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getDeviceCheckItemSearch"
/>
@@ -207,36 +220,30 @@
</el-dialog>
<!--瀵煎叆缁勪欢-->
- <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
+ <import-picker
+ ref="importPickerFunc"
+ class="importPickerClass"
+ :shows.sync="shows"
+ :title="title_value"
+ :colos="colos"
+ :code="code"
+ />
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
-import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
-import { getCookie } from '@/utils/auth'
import { AddUpdateDeviceCheckItem, DeleteDeviceCheckItem, DeviceCheckItemSearch } from '@/api/sbgl'
import ImportPicker from '@/components/ImportPicker'
+import { validateCode } from '@/utils/global'
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'Zzjg',
components: {
Pagination, ImportPicker
},
data() {
- const validateName = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇疯緭鍏ョ紪鐮�'))
- } else {
- if (SER_HZ.test(value)) {
- return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
- } else {
- callback()
- }
- }
- }
return {
mainHeight: 0,
tableHeight: 0,
@@ -268,13 +275,13 @@
checkitemname: '', // 璁惧鐐规閮ㄤ綅鍚嶇О
checkitemdescr: '', // 璁惧鐐规閮ㄤ綅瑕佹眰
cycle: 'D', // 璁惧鐐规閮ㄤ綅鍛ㄦ湡
- isqrcode: 'Y', // 鏄惁鎵爜
+ isqrcode: 'N', // 鏄惁鎵爜
OperType: '' // 鎿嶄綔绫诲瀷
},
operation: '',
dialogFormRules: {
checkitemcode: [
- { required: true, validator: validateName, trigger: ['blur', 'change'] }
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
],
checkitemname: [
{ required: true, message: '璇疯緭鍏ラ儴浣嶅悕绉�', trigger: ['blur', 'change'] }
@@ -353,7 +360,7 @@
this.$nextTick(() => {
this.dialogForm.id = row.id
this.dialogForm.cycle = row.cycle
- this.dialogForm.isscan = row.isqrcode
+ this.dialogForm.isqrcode = row.isscan
this.dialogForm.checkitemcode = row.code
this.dialogForm.checkitemname = row.name
this.dialogForm.checkitemdescr = row.description
@@ -369,6 +376,9 @@
DeleteDeviceCheckItem({ checkitemcode: row.code }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getDeviceCheckItemSearch()
}
})
@@ -383,7 +393,7 @@
this.dialogForm.checkitemname = ''
this.dialogForm.checkitemdescr = ''
this.dialogForm.cycle = 'D'
- this.dialogForm.isqrcode = 'Y'
+ this.dialogForm.isqrcode = 'N'
this.$refs.dialogForm.clearValidate()
},
// 瀵硅瘽妗嗗彇娑�
--
Gitblit v1.9.3