From c041523ff100a6a43ebc4411125a3e566e19f193 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 24 十一月 2023 14:16:16 +0800
Subject: [PATCH] Changes
---
web/src/views/modules/project/Environ-AddOrUpdate.vue | 166 +++++++++++++++++++++++++++++++++++++------------------
1 files changed, 111 insertions(+), 55 deletions(-)
diff --git a/web/src/views/modules/project/Environ-AddOrUpdate.vue b/web/src/views/modules/project/Environ-AddOrUpdate.vue
index 1b7dd98..343c843 100644
--- a/web/src/views/modules/project/Environ-AddOrUpdate.vue
+++ b/web/src/views/modules/project/Environ-AddOrUpdate.vue
@@ -1,6 +1,6 @@
<template>
<zt-dialog ref="dialog" column="2" @confirm="formSubmit" append-to-body title="娴嬭瘯鐜寤虹珛纭琛�">
- <el-form :model="dataForm" style="padding: 0" :inline="true" ref="dataForm" :disabled="dataForm.disabled" label-width="130px" class="confirmFormAuto">
+ <el-form :model="dataForm" style="padding-top: 0" :inline="true" ref="dataForm" :disabled="dataForm.disabled" label-width="130px" class="confirmFormAuto">
<div class="DConfirmForm">
<el-form-item label-width="60px" label="缂栧彿:" style="width:100%;margin-bottom: 0">
<span>{{dataForm.environ.code}}</span>
@@ -8,16 +8,16 @@
</div>
<div style="border: 1px solid rgba(0,0,0,.2);width: 99%" class="confirmDAuto DConfirmForm">
<el-form-item class="marginTopAndMarginBottom" label="涓撲笟瀹為獙瀹ゅ悕绉�" style="width: 49%">
- <el-input v-model="dataForm.environ.agencyName" placeholder="涓撲笟瀹為獙瀹ゅ悕绉�"></el-input>
+ <el-input v-model="dataForm.testAgencyInfo.agencyName" placeholder="涓撲笟瀹為獙瀹ゅ悕绉�"></el-input>
</el-form-item>
<el-form-item class="marginTopAndMarginBottom" label="娴嬭瘯鍦扮偣" style="width: 49%">
- <el-input v-model="dataForm.environ.site" placeholder="娴嬭瘯鍦扮偣"></el-input>
+ <el-input v-model="dataForm.testAgencyInfo.site" placeholder="娴嬭瘯鍦扮偣"></el-input>
</el-form-item>
<el-form-item label="琚祴杞欢" style="width: 49%">
- <el-input v-model="dataForm.environ.softwareName" placeholder="琚祴杞欢"></el-input>
+ <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.environ.softwareIdentity" placeholder="鐗堟湰"></el-input>
+ <el-input v-model="dataForm.project.softwareIdentity" placeholder="鐗堟湰"></el-input>
</el-form-item>
<div class="el-flexConfigDialog el-form-border">
<div class="DFormWidth DAlign DHold">
@@ -26,9 +26,9 @@
<div class="el-wt-border-left" style="padding-left:5px;width: calc(100% - 130px)">
<div style="padding: 5px">杞欢璧勬簮锛�</div>
<div class="table-container">
- <el-table class="el-software el-margin-top-bot" height="150" border :data="dataForm.softwareResourcesList"
+ <el-table ref="tableSoftwareList" class="el-software el-margin-top-bot" border :data="dataForm.softwareResourcesList"
stripe>
- <el-table-column prop="code" align="center" width="80" label="搴忓彿">
+ <el-table-column prop="no" align="center" width="80" label="搴忓彿">
<template slot-scope="scope">
<span v-html="indexFormat(scope.$index)"></span>
</template>
@@ -43,9 +43,9 @@
<el-input v-model="row.version" placeholder="鐗堟湰"></el-input>
</template>
</el-table-column>
- <el-table-column prop="use" align="center" width="180" label="鐢ㄩ��">
+ <el-table-column prop="purposes" align="center" width="180" label="鐢ㄩ��">
<template v-slot="{ row }">
- <el-input v-model="row.usage" placeholder="鐢ㄩ��"></el-input>
+ <el-input v-model="row.purposes" placeholder="鐢ㄩ��"></el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="鎻愪緵鍗曚綅" width="180" align="center">
@@ -61,14 +61,38 @@
</div>
<div style="padding: 5px">纭欢璧勬簮锛�</div>
<div class="table-container">
- <el-table class="el-software el-margin-top-bot" height="150" border :data="dataForm.hardwareResourcesList"
+ <el-table ref="tableHardwareList" class="el-software el-margin-top-bot" border :data="dataForm.hardwareResourcesList"
stripe>
- <el-table-column prop="code" align="center" width="80" label="搴忓彿"></el-table-column>
- <el-table-column prop="itemName" min-width="300" label="纭欢鍜屽浐浠堕」鐩悕绉�"></el-table-column>
- <el-table-column prop="usage" align="center" width="180" label="鐢ㄩ��"></el-table-column>
- <el-table-column prop="number" align="center" width="80" label="鏁伴噺"></el-table-column>
- <el-table-column prop="state" align="center" width="120" label="鐘舵��"></el-table-column>
- <el-table-column prop="provideUnit" align="center" width="180" label="鎻愪緵鍗曚綅"></el-table-column>
+ <el-table-column prop="no" align="center" width="80" label="搴忓彿">
+ <template slot-scope="scope">
+ <span v-html="indexFormat(scope.$index)"></span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="itemName" min-width="300" label="纭欢鍜屽浐浠堕」鐩悕绉�">
+ <template v-slot="{ row }">
+ <el-input v-model="row.itemName" placeholder="纭欢鍜屽浐浠堕」鐩悕绉�"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="purposes" align="center" width="180" label="鐢ㄩ��">
+ <template v-slot="{ row }">
+ <el-input v-model="row.purposes" placeholder="鐢ㄩ��"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="number" align="center" width="80" label="鏁伴噺">
+ <template v-slot="{ row }">
+ <el-input v-model="row.number" placeholder="鏁伴噺"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="state" align="center" width="120" label="鐘舵��">
+ <template v-slot="{ row }">
+ <el-input v-model="row.state" placeholder="鐘舵��"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="provideUnit" align="center" width="180" label="鎻愪緵鍗曚綅">
+ <template v-slot="{ row }">
+ <el-input v-model="row.provideUnit" placeholder="鎻愪緵鍗曚綅"></el-input>
+ </template>
+ </el-table-column>
</el-table>
<div class="icon-container" @click="addHardwareRow()">
<!-- 鏀剧疆鍥哄畾鐨勫浘鏍� -->
@@ -82,8 +106,14 @@
鍔ㄦ�佹祴璇曠幆澧冨浘
</div>
<div style="width: calc(100% - 120px);">
- <div style="height:150px" class="el-wt-border-left">
+ <div class="el-wt-border-left">
<span>{{dataForm.environ.testEnvirontDiagram}}</span>
+ <config-uploader busi-type="test_environt_diagram" model-name="dataForm" :dataForm="dataForm"
+ @getImageUrl="getImageUrl"
+ v-model="dataForm.files"/>
+ <div v-if="dataForm.url">
+ <el-image :src="dataForm.url"></el-image>
+ </div>
</div>
</div>
</div>
@@ -93,14 +123,38 @@
</div>
<div class="el-wt-border-left" style="padding-left:5px;width: calc(100% - 130px)">
<div class="table-container">
- <el-table class="el-software el-margin-top-bot" height="150" border :data="dataForm.environAnalysisList"
+ <el-table ref="tableEnvironeList" class="el-software el-margin-top-bot" border :data="dataForm.environAnalysisList"
stripe>
- <el-table-column prop="code" align="center" width="80" label="搴忓彿"></el-table-column>
- <el-table-column prop="realEnviron" min-width="300" label="鐪熷疄鐜"></el-table-column>
- <el-table-column prop="testEnviron" align="center" width="100" label="娴嬭瘯鐜"></el-table-column>
- <el-table-column prop="environDifference" align="center" width="100" label="鐜宸紓"></el-table-column>
- <el-table-column prop="resultImpact" align="center" width="160" label="瀵规祴璇曠粨鏋滃奖鍝�"></el-table-column>
- <el-table-column prop="measure" align="center" width="180" label="鎺柦"></el-table-column>
+ <el-table-column prop="no" align="center" width="80" label="搴忓彿">
+ <template slot-scope="scope">
+ <span v-html="indexFormat(scope.$index)"></span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="realEnviron" min-width="300" label="鐪熷疄鐜">
+ <template v-slot="{ row }">
+ <el-input v-model="row.realEnviron" placeholder="鐪熷疄鐜"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="testEnviron" align="center" width="100" label="娴嬭瘯鐜">
+ <template v-slot="{ row }">
+ <el-input v-model="row.testEnviron" placeholder="娴嬭瘯鐜"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="environDifference" align="center" width="100" label="鐜宸紓">
+ <template v-slot="{ row }">
+ <el-input v-model="row.environDifference" placeholder="鐜宸紓"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="resultImpact" align="center" width="160" label="瀵规祴璇曠粨鏋滃奖鍝�">
+ <template v-slot="{ row }">
+ <el-input v-model="row.resultImpact" placeholder="瀵规祴璇曠粨鏋滃奖鍝�"></el-input>
+ </template>
+ </el-table-column>
+ <el-table-column prop="measure" align="center" width="180" label="鎺柦">
+ <template v-slot="{ row }">
+ <el-input v-model="row.measure" placeholder="鎺柦"></el-input>
+ </template>
+ </el-table-column>
</el-table>
<div class="icon-container" @click="addDiscrepancyRow()">
<!-- 鏀剧疆鍥哄畾鐨勫浘鏍� -->
@@ -162,12 +216,9 @@
return {
dataForm: {
id: '',
+ url:'',
environ:{
- code: '',
- agencyName:'',
- site:'',
- softwareName:'',
- softwareIdentity:'',
+ code: '1',
hardSoftwareRes: '',
testEnvirontDiagram: '',
establishStaff:'',
@@ -179,6 +230,14 @@
confirmatDate: '',
isVirusScan: '',
virusDatabaseVersion: '',
+ },
+ project: {
+ softwareIdentity: '',
+ softwareName: '',
+ },
+ testAgencyInfo: {
+ agencyName:'',
+ site:'',
},
softwareResourcesList:[],
hardwareResourcesList:[],
@@ -211,10 +270,30 @@
return index += 1
},
addSoftwareRow(){
- this.dataForm.softwareData.push({})
+ this.dataForm.softwareResourcesList.push({})
+ this.$nextTick(()=>{
+ const tableBody=this.$refs.tableSoftwareList.$el.querySelector('.el-table__body-wrapper')
+ tableBody.scrollTop = tableBody.scrollHeight
+ })
},
- addHardwareRow(){},
- addDiscrepancyRow(){},
+ addHardwareRow(){
+ this.dataForm.hardwareResourcesList.push({})
+ this.$nextTick(()=>{
+ const tableBody=this.$refs.tableHardwareList.$el.querySelector('.el-table__body-wrapper')
+ tableBody.scrollTop = tableBody.scrollHeight;
+ })
+ },
+ addDiscrepancyRow(){
+ this.dataForm.environAnalysisList.push({})
+ this.$nextTick(()=>{
+ const tableBody=this.$refs.tableEnvironeList.$el.querySelector('.el-table__body-wrapper')
+ tableBody.scrollTop = tableBody.scrollHeight;
+ })
+ },
+ getImageUrl(url){
+ this.image.url = url
+ console.log(this.image.url,' this.image.url')
+ },
// 琛ㄥ崟鎻愪氦
async formSubmit() {
let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/project/Environ/', this.dataForm)
@@ -244,11 +323,6 @@
.DFormWidth {
width: 120px;
}
-
-.DAlign {
- text-align: center;
-}
-
.DConfirmForm {
/*border-left: 1px solid;*/
width: 100%;
@@ -300,23 +374,5 @@
margin-top: 0 !important;
margin-bottom: 10px !important;
}
-.table-container {
- position: relative;
-}
-.icon-container {
- z-index: 1;
- position: absolute;
- bottom: -20px;
- left: 50%;
- width: 40px;
- height: 30px;
- text-align: center;
- line-height: 30px;
- transform: translateX(-50%);
- border: 1px solid #EBEEF5;
- background-color: #fafafa;
- box-shadow: 0 3px 6px 0 rgba(72, 119, 232, 0.14);
- border-radius: 2px;
-}
</style>
--
Gitblit v1.9.1