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/zzmx/gxdy.vue | 35 ++++++++++++++++-------------------
1 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/src/views/zzmx/gxdy.vue b/src/views/zzmx/gxdy.vue
index d295912..8f6b991 100644
--- a/src/views/zzmx/gxdy.vue
+++ b/src/views/zzmx/gxdy.vue
@@ -116,7 +116,12 @@
label="宸ュ簭鎻忚堪"
min-width="180"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.descr">{{ row.descr }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="enable"
label="鍚敤鐘舵��"
@@ -124,8 +129,8 @@
width="110"
>
<template slot-scope="{row}">
- <div v-if="row.enable==='Y'">鏄�</div>
- <div v-if="row.enable==='N'">鍚�</div>
+ <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />鏄�</div>
+ <div v-if="row.enable==='N'"> <svg-icon icon-class="circleNo" style="margin-right: 2px" />鍚�</div>
</template>
</el-table-column>
<el-table-column
@@ -194,12 +199,11 @@
</div>
<!--鍒嗛〉-->
<pagination
- v-show="total>0"
:total="total"
: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="getStepSearch"
/>
@@ -402,25 +406,14 @@
StepSearch
} from '@/api/zzmx'
import $ from 'jquery'
+import { validateCode } from '@/utils/global'
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'GXDY',
components: {
Pagination
},
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 {
isIpad: false,
mainHeight: 0,
@@ -460,7 +453,7 @@
operation: '',
dialogFormRules: {
stepcode: [
- { required: true, validator: validateName, trigger: ['blur', 'change'] }
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
],
stepname: [
{ required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
@@ -569,6 +562,9 @@
DeleteStep({ stepcode: row.stepcode }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getStepSearch()
}
})
@@ -633,7 +629,8 @@
this.workDialogForm.stepcode = row.stepcode
this.workDialogForm.stepname = row.stepname
const { data: res } = await StepAssociationEqp({ stepcode: this.workDialogForm.stepcode })
- this.workDialogForm.workArr = res
+ this.workDialogForm.workArr = res.filter(item => item.children.length !== 0)
+
let workGatherArr = []
if (row.flwtype === 'W') { // 澶栧崗鎯呭喌涓�
workGatherArr = this.workDialogForm.workArr.filter(item => item.type === 'W')
--
Gitblit v1.9.3