From f8f4b4d42f1a6997a6e1a1d329f2296eb37a2a62 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 26 九月 2022 14:31:15 +0800
Subject: [PATCH] 1.工艺路线备份
---
src/views/zzmx/gxdy.vue | 49 ++++++++++++++++++++++++++++---------------------
1 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/src/views/zzmx/gxdy.vue b/src/views/zzmx/gxdy.vue
index d295912..356e76e 100644
--- a/src/views/zzmx/gxdy.vue
+++ b/src/views/zzmx/gxdy.vue
@@ -58,7 +58,7 @@
<el-input v-model="form.createuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
</div>
- <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
+ <div class="bodySearchReset">
<el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
<el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
@@ -67,6 +67,8 @@
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="tableData"
:height="tableHeight"
border
@@ -116,7 +118,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 +131,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 +201,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 +408,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 +455,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 +564,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()
}
})
@@ -624,6 +622,7 @@
this.tableHeight = this.tableHeight - 40
}
this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.$refs.tableDataRef.doLayout()
})
},
/* 鍏宠仈宸ヤ綔绔欐ā鍧�*/
@@ -633,7 +632,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')
@@ -1117,7 +1117,14 @@
.userDialogVisible ::v-deep .el-form-item {
margin-bottom: 0;
}
-
+.tableFixed{
+ ::v-deep .el-table__fixed-right{
+ height: 100% !important;
+ }
+ ::v-deep .el-table__fixed{
+ height: 100% !important;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3