From 7416356c7658db835e3e47dbb93f49b7e0cd762b Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期二, 05 十二月 2023 17:30:11 +0800
Subject: [PATCH] 6
---
web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue | 136 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 114 insertions(+), 22 deletions(-)
diff --git a/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue b/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
index fbc1277..733caa6 100644
--- a/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
+++ b/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
@@ -1,24 +1,25 @@
<template>
- <zt-dialog ref="dialog" column="2" @confirm="formSubmit">
+ <zt-dialog ref="dialog" column="3" :title="title" :stepMarker="stepMarker" @confirm="formSubmit" >
<el-form ref="dataForm" style="padding-top: 0" :inline="true" :disabled="dataForm.disabled" :model="dataForm" label-width="120px" class="warehouseFormAuto">
<div >
<el-form-item label-width="60px" label="缂栧彿:" style="width:100%;margin-bottom: -5px">
- <span>{{dataForm.configItemWarehouse.code}}</span>
+ <span>{{dataForm.configItemWarehouse.code || '缂栧彿鑷姩鐢熸垚'}}</span>
</el-form-item>
</div>
<div style="border: 1px solid rgba(0,0,0,.2);width: 99%">
<div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="warehouseContentWidth">
- <el-form-item class="marginTopAndMarginBottom" label="椤圭洰缂栧彿" style="width: 49%">
+ <el-form-item class="marginTopAndMarginBottom" label="椤圭洰缂栧彿" style="width: 49%">
<el-input v-model="dataForm.project.code" placeholder="璇疯緭鍏ラ」鐩紪鍙�"></el-input>
</el-form-item>
- <el-form-item class="marginTopAndMarginBottom" label="椤圭洰鍚嶇О" style="width: 49%">
+ <el-form-item class="marginTopAndMarginBottom" label="椤圭洰鍚嶇О" style="width: 49%">
<el-input v-model="dataForm.project.softwareName" placeholder="璇疯緭鍏ラ」鐩悕绉�"></el-input>
</el-form-item>
<el-form-item label="鐢宠浜�" style="width: 49%">
- <el-input v-model="dataForm.configItemWarehouse.applicant" placeholder="璇疯緭鍏ョ敵璇蜂汉"></el-input>
+ <el-input :disabled="stepMarker=='pzxrk_first'"v-model="dataForm.configItemWarehouse.applicant" placeholder="璇疯緭鍏ョ敵璇蜂汉"></el-input>
</el-form-item>
<el-form-item label="鐢宠鏃ユ湡" style="width: 49%">
<el-date-picker
+ :disabled="stepMarker=='pzxrk_first'"
v-model="dataForm.configItemWarehouse.applyDate"
type="date"
placeholder="璇烽�夋嫨鐢宠鏃ユ湡">
@@ -61,7 +62,7 @@
<el-input v-model="row.retrospectVersion" placeholder="涓婃函鐗�"></el-input>
</template>
</el-table-column>
- <el-table-column prop="secretClass" label="瀵嗙骇" width="80" align="center">
+ <el-table-column prop="secretClass" label="瀵嗙骇" width="100" align="center">
<template v-slot="{ row }">
<zt-dict v-model="row.secretClass" placeholder="瀵嗙骇" dict="secret_class"
clearable></zt-dict>
@@ -74,10 +75,28 @@
v-model="row.files"/>
</template>
</el-table-column>
+ <el-table-column fixed="right" label="绠$悊" width="80" align="center">
+ <template v-slot="{ row }">
+ <zt-table-button @click="">绠$悊</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" @click="addConfigItemWarehouseRow()">
+ <div class="icon-container">
+ <el-dropdown @command="handleCommand">
+ <span class="el-dropdown-link">
+ <i class="el-icon-plus"></i>
+ </span>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item v-for="item in menuOptions" :key="item.command" :command="item.command">
+ {{ item.name }}
+ </el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+
<!-- 鏀剧疆鍥哄畾鐨勫浘鏍� -->
- <i class="el-icon-plus"></i>
+<!-- <i class="el-icon-plus"></i>-->
</div>
</div>
</div>
@@ -93,15 +112,20 @@
<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 v-model="scope.row.examineResult" placeholder="妫�鏌ョ粨鏋�" dict="tristate2" :radio="true"
+ <zt-dict :disabled="stepMarker=='wplz_qash'" 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="涓嶉�傜敤璇存槑"></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>
+ <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 v-model="dataForm.configItemWarehouse.qaAuditResults" dict="is_pass" :radio="true"
+ <zt-dict :disabled="stepMarker=='wplz_qash'" v-model="dataForm.configItemWarehouse.qaAuditResults" dict="is_pass" :radio="true"
clearable></zt-dict>
</el-form-item>
<el-form-item label="瀹℃牳浜猴細" style="width: 48%">
@@ -124,15 +148,20 @@
<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 v-model="scope.row.examineResult" placeholder="妫�鏌ョ粨鏋�" dict="tristate2" :radio="true"
+ <zt-dict :disabled="stepMarker=='wplz_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="涓嶉�傜敤璇存槑"></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>
+ <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 v-model="dataForm.configItemWarehouse.cmAuditResults" placeholder="瀹℃牳缁撴灉" dict="is_pass" :radio="true"
+ <zt-dict :disabled="stepMarker=='wplz_cmsh'" v-model="dataForm.configItemWarehouse.cmAuditResults" placeholder="瀹℃牳缁撴灉" dict="is_pass" :radio="true"
clearable></zt-dict>
</el-form-item>
<el-form-item label="瀹℃牳浜猴細" style="width: 48%">
@@ -150,7 +179,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 v-model="dataForm.configItemWarehouse.approvalOpinions" dict="is_pass" :radio="true"
+ <zt-dict :disabled="stepMarker!=='wplz_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions" dict="is_pass" :radio="true"
clearable></zt-dict>
</el-form-item>
<el-form-item label-width="80%" label="绛惧瓧锛�" style="width: 65%">
@@ -167,7 +196,8 @@
</div>
<div style="width: calc(100% - 120px)" class="el-border-left">
<el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px">
- <el-input type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input>
+ <el-input v-if="stepMarker=='wplz_cmcz'" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input>
+ <span v-else>{{dataForm.configItemWarehouse.projectCmOperations}}</span>
</el-form-item>
<el-form-item label-width="80%" label="鎿嶄綔浜猴細" style="width: 65%">
<span>{{dataForm.configItemWarehouse.operator}}</span>
@@ -196,6 +226,16 @@
export default {
data() {
return {
+ disabled:true,
+ stepMarker: '',
+ title: '鏌ョ湅',
+ menuOptions: [
+ { command: 'a', name: '杞欢娴嬭瘯濮旀墭鍗�' },
+ { command: 'b', name: '杞欢闇�姹傝鏍艰鏄�' },
+ { command: 'c', name: '杞欢璁捐璇存槑' },
+ { command: 'd', name: '杞欢鐮斿埗浠诲姟涔�' },
+ { command: 'e', name: '鍏朵粬' }
+ ],
dataForm: {
id: '',
configItemWarehouse:{
@@ -225,22 +265,57 @@
cmAuditList:[],
configItemList:[],
qaAuditList:[],
+ flowInfoDto: {}
}
}
+ },
+ computed:{
+ getRoleName(){
+ console.log(this.$store.state.user.roleName,'this.$store.state.user.roleName')
+ return this.$store.state.user.roleName || ''
+ },
},
methods: {
indexFormat(index){
return index += 1
},
init(id,row){
- this.dataForm.id = row.id
- this.dataForm.projectId = row.projectId
- // this.dataForm.disabled
+ console.log(id,row,'鍏ュ簱鍗曠殑')
+ if (id) {
+ this.dataForm.id = id
+ } else {
+ this.dataForm.id = row.id
+ }
+ if(row.projectId){
+ this.dataForm.projectId =row.projectId
+ }
this.getInfo()
+ if (!this.dataForm.disabled) {
+ if (!row.stepMarker) {
+ this.stepMarker = 'pzxrk_first'
+ this.title = '鍏ュ簱鐢宠'
+ } else {
+ this.title = row.stepName
+ this.stepMarker = row.stepMarker
+ }
+ }
console.log(this.dataForm.id,this.dataForm.projectId,'params params')
},
- addConfigItemWarehouseRow(){
- this.dataForm.configItemList.push({})
+ // addConfigItemWarehouseRow(){
+ // this.dataForm.configItemList.push({})
+ // this.$nextTick(()=>{
+ // const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
+ // tableBody.scrollTop = tableBody.scrollHeight;
+ // })
+ // },
+ handleCommand(command){
+ const selectedItem = this.menuOptions.find(item => item.command === command);
+ if (selectedItem.command === 'e') {
+ this.dataForm.configItemList.push({})
+ }else if(selectedItem){
+ this.dataForm.configItemList.push({itemName:selectedItem.name})
+ }
+
this.$nextTick(()=>{
const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
tableBody.scrollTop = tableBody.scrollHeight;
@@ -257,10 +332,27 @@
...this.dataForm,
...res.data
}
+ if(this.dataForm.project === null){
+ this.dataForm.project={}
+ }
+ if(this.dataForm.configItemWarehouse === null){
+ this.dataForm.circulatOrder={}
+ }
+ if(this.dataForm.flowInfoDto === null){
+ this.dataForm.flowInfoDto={}
+ }
console.log(this.dataForm,"getInfo this.dataForm")
},
// 琛ㄥ崟鎻愪氦
- async formSubmit() {
+ async formSubmit(submitType) {
+ if (submitType == 'tj' || submitType == 'bl') {
+ let flowInfo = {
+ flowCode: 'pzxrk',
+ stepIdMark: this.stepMarker,
+ submitType: submitType
+ }
+ this.dataForm.flowInfoDto = flowInfo;
+ }
let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/configItemWarehouse/ConfigItemWarehouse/', this.dataForm)
if (res.success) {
await this.$tip.success()
--
Gitblit v1.9.1