From f71832a6389efa2f851b8b7bd7a615ed2d3250e4 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 28 三月 2024 13:16:16 +0800
Subject: [PATCH] 完成模具页面
---
src/views/quality/processInspect/index.vue | 64 ++++++++++++++++++++------------
1 files changed, 40 insertions(+), 24 deletions(-)
diff --git a/src/views/quality/processInspect/index.vue b/src/views/quality/processInspect/index.vue
index 952ef6c..210b8f1 100644
--- a/src/views/quality/processInspect/index.vue
+++ b/src/views/quality/processInspect/index.vue
@@ -2,7 +2,7 @@
<div class="content-main">
<div class="rawPage">
<basic-container>
- <ttable
+ <ttable
:table="table"
@handleSelectionChange="handleSelectionChange"
:prelang="prelang"
@@ -21,6 +21,7 @@
import * as fecha from 'element-ui/lib/utils/date'
import processInspectForm from './processInspect-form'
import { transform } from '@/util/fileTransform'
+ import { mapGetters } from 'vuex'
import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect'
export default {
components: {
@@ -73,6 +74,14 @@
},
{
minWidth: '120',
+ prop: 'materialCode',
+ label: '浜у搧缂栧彿',
+ isTrue: true,
+ isSearch: true,
+ searchInfoType: 'text'
+ },
+ {
+ minWidth: '120',
prop: 'material',
label: '浜у搧鍚嶇О',
isTrue: true,
@@ -81,7 +90,6 @@
},
{
minWidth: '130',
- width: '150',
prop: 'specs',
label: '瑙勬牸鍨嬪彿',
sort: true,
@@ -154,23 +162,8 @@
}
},
],
- toolbar: [
- {
- text: '鏂板',
- type: 'primary',
- fun: this.addOrUpdateHandle
- },
- {
- text: '瀵煎嚭',
- fun: this.exportExcel
- }
- ],
- operator: [{
- text: '浣滃簾',
- type: 'text',
- size: 'small',
- fun: this.deleteHandle
- }],
+ toolbar: [],
+ operator: null,
operatorConfig: {
fixed: 'right',
label: '鎿嶄綔',
@@ -180,12 +173,30 @@
},
}
},
- created() { },
+ computed: {
+ ...mapGetters(['permissions'])
+ },
+ created() {
+ if(this.permissions.quality_processInspect_add){
+ this.table.toolbar.push({
+ text: '鏂板',
+ type: 'primary',
+ fun: this.addOrUpdateHandle
+ })
+ }
+ if(this.permissions.quality_processInspect_del){
+ this.table.operator = [{
+ text: '浣滃簾',
+ type: 'text',
+ size: 'small',
+ fun: this.deleteHandle
+ }]
+ }
+ },
methods: {
exportExcel(){
let queryParam=this.$refs.processInspect.getQueryParam();
delete queryParam.criteria
- console.log(queryParam);
exportProcessInsProduct(queryParam).then((res)=>{
transform(res)
})
@@ -208,10 +219,15 @@
},
// 鏂板 / 淇敼
addOrUpdateHandle(row) {
+ if(!this.permissions.quality_processInspect_edit && row){
+ this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+ return
+ }
this.$router.push({
name: 'processInspectForm',
- query: { id: row == null ? null : row.id,resultVal : row == null ? null : row.result },
- })
+ query: { id: row == null ? null : row.id },
+ params: { resultVal : row == null ? null : row.result }
+ })
},
formatResult(row, column, cellValue){
if(cellValue != undefined || cellValue != null){
@@ -313,4 +329,4 @@
.rawPage .content-body {
flex: 1;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3