From ef9633e0d1689fd8869170f3aa0af6c90c2e5e7f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 07 九月 2022 16:18:24 +0800
Subject: [PATCH] 1.优化项目2.搜索栏多行的变为一行可展开
---
src/views/zzmx/jpgj.vue | 100 ++++++++++++++++++++++++++++---------------------
1 files changed, 57 insertions(+), 43 deletions(-)
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 1f7c250..90f6db1 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -2,9 +2,9 @@
<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 type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
+ <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
</div>
<div class="bodyTopFormGroup">
@@ -134,7 +134,12 @@
label="浜у搧瑙勬牸"
min-width="110"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partspec">{{ row.partspec }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="wksp_name"
label="鐢熶骇杞﹂棿"
@@ -164,13 +169,23 @@
label="璁惧鑺傛媿"
width="110"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.eqp_value">{{ row.eqp_value }} <span style="margin-left: 2px">绉�</span></div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="stand_value"
label="鐢熶骇鑺傛媿"
width="110"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.stand_value">{{ row.stand_value }} <span style="margin-left: 2px">绉�</span></div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="cavity_qty"
label="鍨嬭厰鏁�"
@@ -194,7 +209,7 @@
<el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
<i class="el-icon-edit-outline" @click="edit('edit',row)" />
</el-tooltip>
- <el-tooltip v-del-tab-index class="item" effect="dark" content="缂栬緫" placement="top">
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
<i class="el-icon-delete" @click="del(row)" />
</el-tooltip>
</div>
@@ -204,12 +219,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="getBeatRateSearch"
/>
@@ -424,7 +438,7 @@
:limit.sync="eqpTable.rows"
align="right"
style="padding-top: 20px;"
- layout="prev, pager, next,sizes"
+ layout="total,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getEqpTable"
/>
@@ -439,6 +453,16 @@
</div>
</span>
</el-dialog>
+
+ <!--瀵煎叆缁勪欢-->
+ <import-picker
+ ref="importPickerFunc"
+ class="importPickerClass"
+ :shows.sync="shows"
+ :title="title_value"
+ :colos="colos"
+ :code="code"
+ />
</div>
</template>
@@ -452,32 +476,14 @@
StepSelectEqp,
StepSelectEqpList
} from '@/api/zzmx'
+import ImportPicker from '@/components/ImportPicker'
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'JPGJ',
components: {
- Pagination
+ 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 validateTypeCode = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇烽�夋嫨涓婄骇'))
- } else {
- callback()
- }
- }
return {
isIpad: false,
mainHeight: 0,
@@ -529,21 +535,18 @@
editRouteName: '', // 缂栬緫鏃跺伐鑹鸿矾绾垮悕绉�
editStepName: '', // 缂栬緫鏃跺姞宸ュ伐搴忓悕绉�
operation: '',
- dialogFormRules: {
- OrgType: [
- { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
- ],
- OrgCode: [
- { required: true, validator: validateName, trigger: ['blur', 'change'] }
- ],
- OrgName: [
- { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
- ],
- SupUnit: [
- { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] }
- ]
- }
+ dialogFormRules: {},
+ title_value: '鏁版嵁瀵煎叆 / 鑺傛媿宸ヤ环',
+ code: '24',
+ shows: false
+ }
+ },
+ watch: {
+ shows() {
+ if (!this.shows) {
+ this.getBeatRateSearch()
+ }
}
},
created() {
@@ -795,6 +798,9 @@
DeleteBeatRate(data).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getBeatRateSearch()
}
})
@@ -846,6 +852,14 @@
// }
// })
// },
+ // 瀵煎叆鎸夐挳
+ upload() {
+ this.shows = true
+ this.$refs.importPickerFunc.newDataFunc()
+ },
+ colos() {
+ this.shows = false
+ },
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
--
Gitblit v1.9.3