From d3b33741326d9e6cfc1b0e113e9cc5ec33abec11 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期四, 07 十二月 2023 11:31:14 +0800
Subject: [PATCH] 配置表
---
web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue | 89 +++++++++++++++++++++++++-------------------
1 files changed, 51 insertions(+), 38 deletions(-)
diff --git a/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue b/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
index ca96bf9..2526e2b 100644
--- a/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
+++ b/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
@@ -45,40 +45,37 @@
<span v-html="indexFormat(scope.$index)"></span>
</template>
</el-table-column>
- <el-table-column prop="itemName" min-width="200" label="閰嶇疆椤瑰悕绉�">
+ <el-table-column prop="itemName" width="200" label="閰嶇疆椤瑰悕绉�">
<template v-slot="{ row }">
- <el-input v-model="row.itemName" placeholder="閰嶇疆椤瑰悕绉�"></el-input>
+ <el-input v-if="showAddAndEdit" v-model="row.itemName" placeholder="閰嶇疆椤瑰悕绉�"></el-input>
+ <span v-else>{{row.itemName}}</span>
</template>
</el-table-column>
- <el-table-column prop="itemDentify" align="center" width="220" label="閰嶇疆椤规爣璇�">
+ <el-table-column prop="itemDentify" align="center" min-width="290" label="閰嶇疆椤规爣璇�">
<template v-slot="{ row }">
- <el-input v-model="row.itemIdentify" placeholder="閰嶇疆椤规爣璇�"></el-input>
+ <el-input v-if="showAddAndEdit" v-model="row.itemIdentify" placeholder="閰嶇疆椤规爣璇�"></el-input>
+ <span v-else>{{row.itemIdentify}}</span>
</template>
</el-table-column>
<el-table-column prop="version" align="center" width="120" label="鐗堟湰">
<template v-slot="{ row }">
- <el-input v-model="row.version" placeholder="鐗堟湰"></el-input>
+ <el-input v-if="showAddAndEdit" v-model="row.version" placeholder="鐗堟湰"></el-input>
+ <span v-else>{{row.version}}</span>
</template>
</el-table-column>
<el-table-column prop="retrospectVersion" label="涓婃函鐗�" width="120" align="center">
<template v-slot="{ row }">
- <el-input v-model="row.retrospectVersion" placeholder="涓婃函鐗�"></el-input>
+ <el-input v-if="showAddAndEdit" v-model="row.retrospectVersion" placeholder="涓婃函鐗�"></el-input>
+ <span v-else>{{row.retrospectVersion}}</span>
</template>
</el-table-column>
<el-table-column prop="secretClass" label="瀵嗙骇" width="100" align="center">
<template v-slot="{ row }">
- <zt-dict v-model="row.secretClass" placeholder="瀵嗙骇" dict="secret_class"
+ <zt-dict :disabled="!showAddAndEdit" v-model="row.secretClass" placeholder="瀵嗙骇" dict="secret_class"
clearable></zt-dict>
</template>
</el-table-column>
- <el-table-column fixed="right" prop="files" label="涓婁紶闄勪欢" width="300" align="center">
- <template v-slot="{ row }">
- <!-- <zt-table-button @click="files(row.id)">涓婁紶闄勪欢</zt-table-button>-->
- <table-uploader busi-type="config_item_warehouse" model-name="row" :dataForm="row"
- v-model="row.files"/>
- </template>
- </el-table-column>
- <el-table-column fixed="right" label="绠$悊" width="120" align="center">
+ <el-table-column v-if="showColumn" fixed="right" label="绠$悊" width="100" align="center">
<template v-slot="{ row }">
<zt-table-button v-if="row.checkId"
@click="openCheckOrderWin(row)">淇敼妫�鏌ュ崟
@@ -86,12 +83,17 @@
<zt-table-button v-else-if="',杞欢娴嬭瘯璁″垝锛岃蒋浠舵祴璇曡鏄庯紝杞欢娴嬭瘯璁板綍锛岃蒋浠舵祴璇曟姤鍛�'.indexOf(row.itemName)>0"
@click="openCheckOrderWin(row)">鏂板妫�鏌ュ崟
</zt-table-button>
- <!-- <table-uploader busi-type="config_item_warehouse" model-name="row" :dataForm="row"-->
- <!-- v-model="row.files"/>-->
+ </template>
+ </el-table-column>
+ <el-table-column fixed="right" prop="files" label="涓婁紶闄勪欢" width="240" align="center">
+ <template v-slot="{ row }">
+ <!-- <zt-table-button @click="files(row.id)">涓婁紶闄勪欢</zt-table-button>-->
+ <table-uploader busi-type="config_item_warehouse" model-name="row" :dataForm="row"
+ v-model="row.files"/>
</template>
</el-table-column>
</el-table>
- <div class="icon-container">
+ <div v-if="showAddAndEdit" class="icon-container">
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link">
<i class="el-icon-plus"></i>
@@ -120,21 +122,21 @@
<el-table-column prop="examineItem" min-width="300" label="妫�鏌ラ」"></el-table-column>
<el-table-column label="妫�鏌ョ粨鏋�" width="250" align="center">
<template slot-scope="scope">
- <zt-dict :disabled="stepMarker!=='wplz_qash'" v-model="scope.row.examineResult" placeholder="妫�鏌ョ粨鏋�"
+ <zt-dict :disabled="stepMarker!=='pzxrk_qash'" v-model="scope.row.examineResult" placeholder="妫�鏌ョ粨鏋�"
dict="tristate2" :radio="true"
clearable></zt-dict>
</template>
</el-table-column>
<el-table-column align="center" width="120" label="涓嶉�傜敤璇存槑">
<template v-slot="{ row }">
- <el-input v-if="stepMarker=='wplz_qash'" v-model="row.notApplyExplan" placeholder="涓嶉�傜敤璇存槑"></el-input>
+ <el-input v-if="stepMarker=='pzxrk_qash'" v-model="row.notApplyExplan" placeholder="涓嶉�傜敤璇存槑"></el-input>
<span v-else>{{row.notApplyExplan}}</span>
</template>
</el-table-column>
</el-table>
<div class="el-border-top">
<el-form-item label="瀹℃牳缁撴灉" style="width: 99%">
- <zt-dict :disabled="stepMarker!=='wplz_qash'" v-model="dataForm.configItemWarehouse.qaAuditResults"
+ <zt-dict :disabled="stepMarker!=='pzxrk_qash'" v-model="dataForm.configItemWarehouse.qaAuditResults"
dict="is_pass" :radio="true"
clearable></zt-dict>
</el-form-item>
@@ -159,21 +161,21 @@
<el-table-column prop="examineItem" min-width="300" label="妫�鏌ラ」"></el-table-column>
<el-table-column label="妫�鏌ョ粨鏋�" width="250" align="center">
<template slot-scope="scope">
- <zt-dict :disabled="stepMarker!=='wplz_cmsh'" v-model="scope.row.examineResult" placeholder="妫�鏌ョ粨鏋�"
+ <zt-dict :disabled="stepMarker!=='pzxrk_cmsh'" v-model="scope.row.examineResult" placeholder="妫�鏌ョ粨鏋�"
dict="tristate2" :radio="true"
clearable></zt-dict>
</template>
</el-table-column>
<el-table-column prop="notApplyExplan" align="center" width="120" label="涓嶉�傜敤璇存槑">
<template v-slot="{ row }">
- <el-input v-if="stepMarker=='wplz_cmsh'" v-model="row.notApplyExplan" placeholder="涓嶉�傜敤璇存槑"></el-input>
+ <el-input v-if="stepMarker=='pzxrk_cmsh'" v-model="row.notApplyExplan" placeholder="涓嶉�傜敤璇存槑"></el-input>
<span v-else>{{row.notApplyExplan}}</span>
</template>
</el-table-column>
</el-table>
<div class="el-border-top">
<el-form-item label="瀹℃牳缁撴灉" style="width: 99%">
- <zt-dict :disabled="stepMarker!=='wplz_cmsh'" v-model="dataForm.configItemWarehouse.cmAuditResults"
+ <zt-dict :disabled="stepMarker!=='pzxrk_cmsh'" v-model="dataForm.configItemWarehouse.cmAuditResults"
placeholder="瀹℃牳缁撴灉" dict="is_pass" :radio="true"
clearable></zt-dict>
</el-form-item>
@@ -192,7 +194,7 @@
</div>
<div style="width: calc(100% - 120px)" class="el-border-left">
<el-form-item class="el-wt-form-item-margin" label-width="20px" style="width: 85%">
- <zt-dict :disabled="stepMarker!=='wplz_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions"
+ <zt-dict :disabled="stepMarker!=='pzxrk_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions"
dict="is_pass" :radio="true"
clearable></zt-dict>
</el-form-item>
@@ -210,7 +212,7 @@
</div>
<div style="width: calc(100% - 120px)" class="el-border-left">
<el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px">
- <el-input v-if="stepMarker=='wplz_cmcz'" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�"
+ <el-input v-if="stepMarker=='pzxrk_cmcz'" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�"
v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input>
<span v-else>{{dataForm.configItemWarehouse.projectCmOperations}}</span>
</el-form-item>
@@ -248,14 +250,16 @@
disabled: true,
stepMarker: '',
title: '鏌ョ湅',
+ showColumn:false,
+ showAddAndEdit:false,
menuOptions: [
- {pageCode: 'plan', name: '杞欢娴嬭瘯璁″垝'},
+ {pageCode: 'plan', name: '杞欢娴嬭瘯璁″垝',itemIdentify:''},
{pageCode: 'explain', name: '杞欢娴嬭瘯璇存槑'},
{pageCode: 'record', name: '杞欢娴嬭瘯璁板綍'},
{pageCode: 'report', name: '杞欢娴嬭瘯鎶ュ憡'},
{pageCode: 'other', name: '鍏朵粬'}
],
- pageNameCode: {杞欢娴嬭瘯璁″垝:'plan', 杞欢娴嬭瘯璇存槑: 'explain', 杞欢娴嬭瘯璁板綍: 'record', 杞欢娴嬭瘯鎶ュ憡: 'report'},
+ pageNameCode: {'杞欢娴嬭瘯璁″垝':'plan', '杞欢娴嬭瘯璇存槑': 'explain', '杞欢娴嬭瘯璁板綍': 'record', '杞欢娴嬭瘯鎶ュ憡': 'report'},
dataForm: {
id: '',
configItemWarehouse: {
@@ -289,11 +293,17 @@
}
}
},
+ created() {
+ const roleName = localStorage.getItem('roleName')
+ if (roleName && roleName.includes('QA')) {
+ this.showColumn = true;
+ }
+ if (roleName && roleName.includes('娴嬭瘯鍛�')) {
+ this.showAddAndEdit = true;
+ }
+ },
computed: {
- getRoleName() {
- console.log(this.$store.state.user.roleName, 'this.$store.state.user.roleName')
- return this.$store.state.user.roleName || ''
- },
+
},
components: {
AddOrUpdateCheck
@@ -382,13 +392,16 @@
},
// 琛ㄥ崟鎻愪氦
async formSubmit(submitType) {
-/* if (this.stepMarker=='wplz_first' && submitType == 'bl') {
- for(666)
- if (this.pageNameCode[row.itemName] && !row.isCheck) {
- alert(444)
- return
+ if (this.showColumn && submitType == 'bl') {
+ for (let item of this.dataForm.configItemList) {
+ if (item) {
+ if (this.pageNameCode[item.itemName] && !item.checkId) {
+ this.$alert("鏈夋湭鎻愪氦鐨勬鏌ュ崟")
+ return
+ }
+ }
}
- }*/
+ }
if (submitType == 'tj' || submitType == 'bl') {
let flowInfo = {
flowCode: 'pzxrk',
--
Gitblit v1.9.1