From a65112ecf7580c7d5a2ae60d05150cac34e59f5d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 26 九月 2022 16:30:33 +0800
Subject: [PATCH] 1.工艺路线工艺设置下拉选中之后自动回车2.工序定义检验人员选中默认当前登录人员
---
src/views/jcsz/yhqd.vue | 71 ++++++++++++++++++++++-------------
1 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/src/views/jcsz/yhqd.vue b/src/views/jcsz/yhqd.vue
index 043fc47..5718c68 100644
--- a/src/views/jcsz/yhqd.vue
+++ b/src/views/jcsz/yhqd.vue
@@ -1,10 +1,14 @@
<template>
<div>
<div class="body" :style="{height:mainHeight+'px'}">
- <div class="bodyTopButtonGroup">
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
+
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <el-button icon="el-icon-menu" @click="workingTramClick">鐢熶骇鐝粍</el-button>
- <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+
+ <div style="display: flex">
+ <el-button icon="el-icon-menu" @click="workingTramClick">鐢熶骇鐝粍</el-button>
+ <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+ </div>
</div>
<div class="bodyTopFormGroup">
@@ -67,7 +71,7 @@
</el-select>
</el-form-item>
</div>
- <div style="display: flex;align-items: flex-start;margin-top: 3px">
+ <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>
@@ -76,7 +80,9 @@
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
:data="tableData"
+ class="tableFixed"
:height="tableHeight+'px'"
highlight-current-row
:style="{width: 100+'%',height:tableHeight+'px'}"
@@ -119,13 +125,23 @@
label="鎵�灞炵粍缁�"
min-width="110"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.org_name">{{ row.org_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="group_name"
label="鐢熶骇鐝粍"
min-width="110"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.group_name">{{ row.group_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="wagetype"
label="宸ヨ祫绫诲瀷"
@@ -382,7 +398,7 @@
show-checkbox
node-key="code"
default-expand-all
- style="height: 300px"
+ style="height: 300px;overflow-y: scroll"
:props="defaultPropsOfRoleTree"
@check="checkBoxClick"
/>
@@ -444,7 +460,7 @@
sortable="custom"
>
<template slot-scope="{row}">
- <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="璇疯緭鍏�" />
+ <el-input v-if="row.isVisible===1" v-model="row.group_code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="璇疯緭鍏�" />
<div v-else> {{ row.group_code }}</div>
</template>
</el-table-column>
@@ -520,27 +536,15 @@
} from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import $ from 'jquery'
-import clearAllChildren from '@/utils/global'
+import clearAllChildren, { validateCode } from '@/utils/global'
import { MesOrderStepReportSelectUserGroup } from '@/api/scgl'
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'YYQD',
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()
- }
- }
- }
const validateMobile = (rule, value, callback) => {
if (!value) {
callback()
@@ -570,7 +574,6 @@
}
}
}
-
return {
isIpad: false,
mainHeight: 0,
@@ -623,7 +626,7 @@
operation: '',
dialogFormRules: {
UserCode: [
- { required: true, validator: validateName, trigger: ['blur', 'change'] }
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
],
UserName: [
{ required: true, message: '璇疯緭鍏ョ敤鎴峰悕绉�', trigger: ['blur', 'change'] }
@@ -808,6 +811,9 @@
DeleteUser({ Userid: id }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getUserSearch()
}
})
@@ -875,6 +881,7 @@
this.tableHeight = this.tableHeight - 40
}
this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.$refs.tableDataRef.doLayout()
})
},
// 鍏宠仈瑙掕壊鐐瑰嚮浜嬩欢
@@ -886,10 +893,10 @@
this.dialogFormRoles.username = row.username
this.dialogFormRoles.usercode = row.usercode
const { data: res } = await UserAssociationRole({ usercode: row.usercode })
- this.rolesAll = res
+ this.rolesAll = res.filter(item => item.children.length !== 0)
const nodeKey = []// 鏍戝舰鍥炴樉key
- res.forEach((item, index) => {
+ this.rolesAll.forEach((item, index) => {
this.dialogFormRoles.rolesArr.push({
code: item.code,
name: item.name,
@@ -916,8 +923,6 @@
}
}
})
- console.log(this.dialogFormRoles.roleTreeSelectedArr, 11)
- console.log(this.dialogFormRoles.rolesArr, 888)
this.dialogFormRoles.rolesArr[0].isSelected1 = true// 榛樿閫変腑绗竴涓�
// this.dialogFormRoles.rolesArr[0].name = '鍏ㄩ儴'
@@ -1220,6 +1225,9 @@
UserGroupDelete({ UserGrupCode: row.group_code }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.formWorking.page > 1 && this.workingTableData.length === 1) {
+ this.formWorking.page--
+ }
this.getUserGroupSearch()
}
})
@@ -1428,6 +1436,15 @@
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