From 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期五, 23 二月 2024 12:19:55 +0800 Subject: [PATCH] 修改 --- web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue | 695 ++++++++++++++++++++++++++++++++------------------------- 1 files changed, 391 insertions(+), 304 deletions(-) diff --git a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue index cace7e2..2b11436 100644 --- a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue +++ b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue @@ -1,5 +1,5 @@ <template> - <zt-dialog ref="dialog" column="2" @confirm="formSubmit" > + <zt-dialog ref="dialog" column="2" @confirm="formSubmit"> <el-form ref="form" :inline="true" :model="dataForm" :disabled="dataForm.disabled" label-width="93px" class="weiTuoDanAuto" style="padding-top: 0"> <div class="DManageForm"> @@ -58,7 +58,7 @@ </div> </div> <div class="el-flex el-border-bottom"> - <div class="DWidth-Unt DAlign DHold"> + <div class="DWidth-Unt DAlign DHold"> 琚祴浠朵俊鎭� </div> <div class="DOldForm el-border-left"> @@ -86,15 +86,24 @@ <div style="width:88px !important;" class="DWidth DAlign DHold"> 琚祴浠跺強鍏朵粬鐩稿叧鐗╁搧娓呭崟 </div> - <div style="width: calc(100% - 120px);padding: 5px"> - <el-table class="el-software" height="230" border :data="dataForm.measuredList" + <div class="table-container" style="width: calc(100% - 120px);padding: 5px"> + <el-table ref="tableMeasuredList" class="el-software" border :data="dataForm.measuredList" @cell-click="handleCellClick" stripe> - <el-table-column prop="no" align="center" width="80" label="搴忓彿"/> - <el-table-column prop="name" min-width="300" label="鍚嶇О"/> + <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="name" min-width="300" label="鍚嶇О"> + <template v-slot="{ row }"> + <el-input v-model="row.name" placeholder="鍚嶇О"></el-input> + </template> + </el-table-column> <el-table-column align="center" prop="identify" width="180" label="鏍囪瘑/鐗堟湰"> <template slot-scope="scope"> - <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> + <span + v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> <el-input ref="editInput" v-model="scope.row.identify" placeholder="鏍囪瘑/鐗堟湰"></el-input> </span> <span v-else>{{ scope.row.identify }}</span> @@ -105,8 +114,18 @@ <zt-dict v-model="scope.row.isMeasured" dict="is_or_not" :radio="true"></zt-dict> </template> </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" align="center"> + <template slot-scope="scope"> + <zt-table-button @click="deleteMeasuredRow(scope.$index,scope.row.id)">鍒犻櫎</zt-table-button> + </template> + </el-table-column> </el-table> + <div v-if="!dataForm.disabled" class="icon-container" @click="addMeasuredRow()"> + <!-- 鏀剧疆鍥哄畾鐨勫浘鏍� --> + <i class="el-icon-plus"></i> + </div> </div> + </div> <div class="el-flex" style="height: 40px;"> <div class="DWidth DAlign DHold"> @@ -130,7 +149,8 @@ <div class="el-border-left" style="width: 98%"> <el-form-item style="width: 20%;padding-left:5%;margin-bottom: 0"> <zt-dict v-model="dataForm.softwareTestOrder.testBasis" :radio="true" dict="test_basis" - clearable :inputName="dataForm.softwareTestOrder.otherBasis" origin="otherBasis" @getChangeInputData="getChangeInputData"></zt-dict> + clearable :inputName="dataForm.softwareTestOrder.otherBasis" origin="otherBasis" + @getChangeInputData="getChangeInputData"></zt-dict> </el-form-item> </div> </div> @@ -139,11 +159,12 @@ 娴嬭瘯绫诲瀷 </div> <div class="el-border-left test-type-line-height" style="width: 98%"> - <el-form-item style="width: 40%;padding-left:5%;margin-bottom: 0"> + <el-form-item style="width: 40%;padding-left:5%;margin-bottom: 0"> <zt-dict-checkbox v-model="dataForm.softwareTestOrder.testType1" column="2" dict="test_type1" clearable></zt-dict-checkbox> </el-form-item> - <el-form-item style="width: 60%;padding-left: 15%;border-left: 1px solid rgba(0,0,0,.2);margin-bottom: 0"> + <el-form-item + style="width: 60%;padding-left: 15%;border-left: 1px solid rgba(0,0,0,.2);margin-bottom: 0"> <zt-dict-checkbox v-model="dataForm.softwareTestOrder.testType2" dict="test_type2" clearable></zt-dict-checkbox> </el-form-item> @@ -155,9 +176,9 @@ </div> <div class="el-border-left" style="width: 98%"> <el-form-item style="width: 20%;padding-left:5%;margin-bottom: 0"> - <zt-dict v-model="dataForm.softwareTestOrder.testStandard" :radio="true" - origin="otherStandard" @getChangeInputData="getChangeInputData" - dict="test_standard" :inputName="dataForm.softwareTestOrder.otherStandard"> + <zt-dict v-model="dataForm.softwareTestOrder.testStandard" :radio="true" + origin="otherStandard" @getChangeInputData="getChangeInputData" + dict="test_standard" :inputName="dataForm.softwareTestOrder.otherStandard"> </zt-dict> </el-form-item> </div> @@ -177,7 +198,7 @@ 寮�濮嬫棩鏈� </div> <div class="el-border-left startDate" style="width: 45%;"> - <el-form-item style="width: 100%;padding-left:20px;margin:0;"> + <el-form-item style="width: 100%;padding-left:20px;margin:0;"> <el-date-picker v-model="dataForm.softwareTestOrder.startDate" type="date" @@ -189,13 +210,13 @@ 缁撴潫鏃ユ湡 </div> <div class="el-border-left endDate" style="width: 42%"> - <el-form-item style="width: 100%;padding-left:20px;margin:0;"> - <el-date-picker - v-model="dataForm.softwareTestOrder.endDate" - type="date" - placeholder="閫夋嫨鏃ユ湡"> - </el-date-picker> - </el-form-item> + <el-form-item style="width: 100%;padding-left:20px;margin:0;"> + <el-date-picker + v-model="dataForm.softwareTestOrder.endDate" + type="date" + placeholder="閫夋嫨鏃ユ湡"> + </el-date-picker> + </el-form-item> </div> </div> <div class="el-flex el-border-bottom"> @@ -203,9 +224,9 @@ 娴嬭瘯鍦哄湴 </div> <div class="el-border-left testVenue" style="width: 98%"> - <el-form-item style="width: 98%;padding-left:20px;margin:0;"> - <el-input v-model="dataForm.softwareTestOrder.testVenue" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�"></el-input> - </el-form-item> + <el-form-item style="width: 98%;padding-left:20px;margin:0;"> + <el-input v-model="dataForm.softwareTestOrder.testVenue" placeholder="璇疯緭鍏ユ祴璇曞満鍦�"></el-input> + </el-form-item> </div> </div> <div class="el-flex"> @@ -216,7 +237,8 @@ <el-form-item label="鏄惁鐩朇NAS绔�" label-width="130px" style="padding-left:5%;margin-bottom:0"> <zt-dict v-model="dataForm.softwareTestOrder.otherRequire" :radio="true" dict="is_or_not"></zt-dict> - <span>鍏朵粬:<el-input class="requireOther" v-model="dataForm.softwareTestOrder.requireOther"></el-input></span> + <span>鍏朵粬:<el-input class="requireOther" + v-model="dataForm.softwareTestOrder.requireOther"></el-input></span> </el-form-item> </div> </div> @@ -230,7 +252,7 @@ <div class="el-flex " style="height: 40px"> <div style="width: 60%"> <span>{{ dataForm.softwareTestOrder.entrustSign }}</span> -<!-- <zt-select v-model="dataForm.softwareTestOrder.entrustSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="濮旀墭鏂逛汉鍛�"/>--> + <!-- <zt-select v-model="dataForm.softwareTestOrder.entrustSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="濮旀墭鏂逛汉鍛�"/>--> </div> <div class="el-flex" style="margin-left: 10%"> <el-date-picker @@ -238,7 +260,7 @@ type="date" placeholder="閫夋嫨鏃ユ湡"> </el-date-picker> -<!-- {{ dataForm.softwareTestOrder.entrustSignDate | filterTime('YYYY骞碝M鏈圖D鏃�') }}--> + <!-- {{ dataForm.softwareTestOrder.entrustSignDate | filterTime('YYYY骞碝M鏈圖D鏃�') }}--> </div> </div> </div> @@ -260,7 +282,7 @@ 娴嬭瘯鏃ユ湡 </div> <div class="el-border-left startDate" style="width: 45%;"> - <el-form-item style="width: 100%;padding-left:20px;margin:0;"> + <el-form-item style="width: 100%;padding-left:20px;margin:0;"> <el-date-picker v-model="dataForm.softwareTestOrder.testDate" type="date" @@ -272,7 +294,7 @@ 浜や粯鏃ユ湡 </div> <div class="el-border-left endDate" style="width: 42%"> - <el-form-item style="width: 100%;padding-left:20px;margin:0;"> + <el-form-item style="width: 100%;padding-left:20px;margin:0;"> <el-date-picker v-model="dataForm.softwareTestOrder.deliveryDate" type="date" @@ -286,7 +308,7 @@ 妫�娴嬭垂鐢� </div> <div class="el-border-left testCost" style="width: 98%"> - <el-form-item style="width: 98%;padding-left:20px;margin:0;"> + <el-form-item style="width: 98%;padding-left:20px;margin:0;"> <el-input v-model="dataForm.softwareTestOrder.testCost" placeholder="璇疯緭鍏ユ娴嬭垂鐢�"></el-input> </el-form-item> </div> @@ -296,7 +318,7 @@ 鐗╁搧鎬ц川 </div> <div class="el-border-left" style="width: 98%"> - <el-form-item style="width: 20%;padding-left:20px;margin:0;"> + <el-form-item style="width: 20%;padding-left:20px;margin:0;"> <zt-dict v-model="dataForm.softwareTestOrder.articleNature" :radio="true" origin="otherNature" @getChangeInputData="getChangeInputData" dict="article_nature" :inputName="dataForm.softwareTestOrder.otherNature"></zt-dict> @@ -318,13 +340,34 @@ <div style="width:88px !important;" class="DWidth DAlign DHold"> 浜や粯鐗╂竻鍗� </div> - <div style="width: calc(100% - 120px);padding: 5px"> - <el-table class="el-software" height="100" border :data="dataForm.deliverableList" + <div class="table-container" style="width: calc(100% - 120px);padding: 5px"> + <el-table ref="tableDeliverableList" class="el-software" border :data="dataForm.deliverableList" stripe> - <el-table-column type="index" align="center" width="80" label="搴忓彿"/> - <el-table-column prop="name" min-width="300" label="鍚嶇О"></el-table-column> - <el-table-column prop="identify" align="center" width="380" label="鏍囪瘑/鐗堟湰"></el-table-column> + <el-table-column type="index" align="center" width="80" label="搴忓彿"> + <template slot-scope="scope"> + <span v-html="indexFormat(scope.$index)"></span> + </template> + </el-table-column> + <el-table-column prop="name" min-width="300" label="鍚嶇О"> + <template v-slot="{ row }"> + <el-input v-model="row.name" placeholder="鍚嶇О"></el-input> + </template> + </el-table-column> + <el-table-column prop="identify" align="center" width="380" label="鏍囪瘑/鐗堟湰"> + <template v-slot="{ row }"> + <el-input v-model="row.identify" placeholder="鏍囪瘑/鐗堟湰"></el-input> + </template> + </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" align="center"> + <template slot-scope="scope"> + <zt-table-button @click="deleteDeliverableRow(scope.$index,scope.row.id)">鍒犻櫎</zt-table-button> + </template> + </el-table-column> </el-table> + <div v-if="!dataForm.disabled" class="icon-container" @click="addDeliverableRow()"> + <!-- 鏀剧疆鍥哄畾鐨勫浘鏍� --> + <i class="el-icon-plus"></i> + </div> </div> </div> </div> @@ -376,11 +419,12 @@ <div class="" style="width: 100%;"> <div class="el-flex" style="height: 40px"> <div style="width: 60%"> - <zt-select v-model="dataForm.softwareTestOrder.contractSign" url="/sys/userEx/getUsersList" placeholder="鎵挎墭鏂逛汉鍛�"/> -<!-- <span>{{ dataForm.contractSign }}</span>--> + <zt-select v-model="dataForm.softwareTestOrder.contractSign" :datas="usersList" + placeholder="鎵挎墭鏂逛汉鍛�"/> + <!-- <span>{{ dataForm.contractSign }}</span>--> </div> <div class="el-flex" style="margin-left: 10%"> -<!-- {{ dataForm.softwareTestOrder.contractSignDate | filterTime('YYYY骞碝M鏈圖D鏃�') }}--> + <!-- {{ dataForm.softwareTestOrder.contractSignDate | filterTime('YYYY骞碝M鏈圖D鏃�') }}--> <el-date-picker v-model="dataForm.softwareTestOrder.contractSignDate" type="date" @@ -410,13 +454,10 @@ </div> </div> <div class="el-flex order-sc" style="height: 60px"> -<!-- <div class="DPadding3 DAlign DHold">--> -<!-- 濮旀墭鍗曚笂浼�--> -<!-- </div>--> - <el-form-item class="marginTopAndMarginBottom" style="width: 100%"> - <config-uploader :lineHeight="true" busi-type="test_order" model-name="dataForm" :dataForm="dataForm" - v-model="dataForm.files"/> - </el-form-item> + <el-form-item class="marginTopAndMarginBottom" style="width: 100%"> + <config-uploader :lineHeight="true" busi-type="test_order" model-name="dataForm" :dataForm="dataForm" + v-model="dataForm.files"/> + </el-form-item> </div> </div> @@ -430,296 +471,342 @@ <script> import Cookies from 'js-cookie' import qs from 'qs' -export default { - data() { - return { - // inputName:'', - eventIndex:'', - editingCell:null, - dataForm: { - id: null, - projectId: null, - softwareTestOrder: { - code:'', - optEnviron:'', - programLang:'', - testBasis:'', - testType1:'', - testType2:'', - testStandard:'', - startDate:'', - endDate:'', - testVenue:'', - otherRequire:'', - testDate:'', - deliveryDate:'', - testCost:'', - articleNature:'', - sampleStatus:'', - entrustSign:'', - entrustSignDate:'', - contractSign:'', - contractSignDate:'', - otherBasis:'otherBasis', - otherStandard:'otherStandard', - requireOther:'requireOther', - otherNature:'otherNature', - }, - project: { - code: '', - creator: '', - criticalLevel: '', - developUnitAddress: '', - developUnitContWay: '', - developUnitContact: '', - developUnitName: '', - entrustUnitAddress: '', - entrustUnitContWay: '', - entrustUnitContact: '', - entrustUnitName: '', - softwareIdentity: '', - isContract: '', - projectLeader: '', - projectReviewer: '', - projectTesters: '', - secretClass: '', - softwareName: '', - softwareType: '', - tenantId: '', - testLevel: '', - }, - testAgencyInfo: { - agencyName:'', - site:'', - businContact:'', - businComplaint:'', - laborContact:'', - labContactNum:'', - postalCode:'', - fax:'' - }, - deliverableList: [], - measuredList: [], - } - } - }, - methods: { - // getDictLabel(event,name){ - // if(name.indexOf("鍏朵粬")!=-1){ - // console.log(name,'瀛楀吀鍚嶅瓧q34567') - // this.eventIndex = event - // this.inputName='q14eeff' - // } - // }, - getChangeInputData(data,ogn){ - // console.log(ogn) - this.$set(this.dataForm.softwareTestOrder, ogn, data); - console.log(this.dataForm.softwareTestOrder[ogn]); - // console.log(this.dataForm.softwareTestOrder[ogn]) - }, - handleCellClick(row, column) { - this.editingCell = {row, column} - this.$nextTick(() => { - if(this.$refs.editInput){ - this.$refs.editInput.focus() - } - }) - console.log(this.editingCell, 'this.editingCell') - }, - init(id,row){ - this.dataForm.id = row.id - this.dataForm.projectId = row.projectId - // this.dataForm.disabled - this.getInfo() - console.log(this.dataForm.id,this.dataForm.projectId,'params params') - }, - // 鑾峰彇淇℃伅 - async getInfo() { - let params = { - orderId: this.dataForm.id, - projectId: this.dataForm.projectId + export default { + data() { + return { + // inputName:'', + eventIndex: '', + editingCell: null, + dataForm: { + id: null, + projectId: null, + softwareTestOrder: { + code: '', + optEnviron: '', + programLang: '', + testBasis: '', + testType1: '', + testType2: '', + testStandard: '', + startDate: '', + endDate: '', + testVenue: '', + otherRequire: '', + testDate: '', + deliveryDate: '', + testCost: '', + articleNature: '', + sampleStatus: '', + entrustSign: '', + entrustSignDate: '', + contractSign: '', + contractSignDate: '', + otherBasis: 'otherBasis', + otherStandard: 'otherStandard', + requireOther: 'requireOther', + otherNature: 'otherNature', + }, + project: { + code: '', + creator: '', + criticalLevel: '', + developUnitAddress: '', + developUnitContWay: '', + developUnitContact: '', + developUnitName: '', + entrustUnitAddress: '', + entrustUnitContWay: '', + entrustUnitContact: '', + entrustUnitName: '', + softwareIdentity: '', + isContract: '', + projectLeader: '', + projectReviewer: '', + projectTesters: '', + secretClass: '', + softwareName: '', + softwareType: '', + tenantId: '', + testLevel: '', + }, + testAgencyInfo: { + agencyName: '', + site: '', + businContact: '', + businComplaint: '', + laborContact: '', + labContactNum: '', + postalCode: '', + fax: '' + }, + deliverableList: [], + measuredList: [], + }, + usersList:[] } - console.log(this.dataForm, "this.dataForm") - let res = await this.$http.get(`/project/SoftwareTestOrder/getDto`, {params: params}) - if (res.data) { - this.dataForm = { - ...this.dataForm, - ...res.data - } - if(this.dataForm.softwareTestOrder){ - if(this.dataForm.softwareTestOrder.testType1){ - this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',') - console.log(this.dataForm.softwareTestOrder.testType1) + }, + methods: { + getChangeInputData(data, ogn) { + // console.log(ogn) + this.$set(this.dataForm.softwareTestOrder, ogn, data); + console.log(this.dataForm.softwareTestOrder[ogn]); + // console.log(this.dataForm.softwareTestOrder[ogn]) + }, + handleCellClick(row, column) { + this.editingCell = {row, column} + this.$nextTick(() => { + if (this.$refs.editInput) { + this.$refs.editInput.focus() } - if(this.dataForm.softwareTestOrder.testType2){ - this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',') - console.log(this.dataForm.softwareTestOrder.testType2) + }) + console.log(this.editingCell, 'this.editingCell') + }, + + init(id, row) { + this.dataForm.id = row.id + this.dataForm.projectId = row.projectId + // this.dataForm.disabled + this.getInfo() + console.log(this.dataForm.id, this.dataForm.projectId, 'params params') + }, + // 鑾峰彇淇℃伅 + async getInfo() { + let params = { + orderId: this.dataForm.id, + projectId: this.dataForm.projectId + } + console.log(this.dataForm, "this.dataForm") + let res = await this.$http.get(`/project/SoftwareTestOrder/getDto`, {params: params}) + if (res.data) { + this.dataForm = { + ...this.dataForm, + ...res.data + } + if (this.dataForm.softwareTestOrder) { + if (this.dataForm.softwareTestOrder.testType1) { + this.dataForm.softwareTestOrder.testType1 = this.dataForm.softwareTestOrder.testType1.split(',') + console.log(this.dataForm.softwareTestOrder.testType1) + } + if (this.dataForm.softwareTestOrder.testType2) { + this.dataForm.softwareTestOrder.testType2 = this.dataForm.softwareTestOrder.testType2.split(',') + console.log(this.dataForm.softwareTestOrder.testType2) + } + } + if (this.dataForm.project === null) { + this.dataForm.project = {} + } + if (this.dataForm.softwareTestOrder === null) { + this.dataForm.softwareTestOrder = {} + } + if (this.dataForm.testAgencyInfo === null) { + this.dataForm.testAgencyInfo = {} } } - if(this.dataForm.project === null){ - this.dataForm.project={} + await this.getusersList() + // console.log(this.dataForm, "this.dataForm") + console.log(this.dataForm, "getInfo this.dataForm") + }, + indexFormat(index) { + return index += 1 + }, + addDeliverableRow() { + this.dataForm.deliverableList.push({}) + this.$nextTick(() => { + const tableBody = this.$refs.tableDeliverableList.$el.querySelector('.el-table__body-wrapper') + tableBody.scrollTop = tableBody.scrollHeight + }) + }, + async getusersList() { + let res = await this.$http.get(`/sys/userEx/getUsersList`) + if (res.success) { + this.usersList = res.data; } - if(this.dataForm.softwareTestOrder === null){ - this.dataForm.softwareTestOrder={} + }, + async deleteDeliverableRow(index,id) { + if (await this.$tip.confirm(this.$t('prompt.info', {'handle': this.$t('delete')}))) { + if (id != null) { + let res = await this.$http.delete('/project/SoftwareTestOrderDeliverable/', {data: [id]}) + } + this.dataForm.deliverableList.splice(index, 1) } - if(this.dataForm.testAgencyInfo === null){ - this.dataForm.testAgencyInfo={} + }, + addMeasuredRow() { + this.dataForm.measuredList.push({}) + this.$nextTick(() => { + const tableBody = this.$refs.tableMeasuredList.$el.querySelector('.el-table__body-wrapper') + tableBody.scrollTop = tableBody.scrollHeight + }) + }, + async deleteMeasuredRow(index, id) { + if (await this.$tip.confirm(this.$t('prompt.info', {'handle': this.$t('delete')}))) { + if (id != null) { + let res = await this.$http.delete('/project/SoftwareTestOrderMeasured/', {data: [id]}) + } + this.dataForm.measuredList.splice(index, 1) } - } - // console.log(this.dataForm, "this.dataForm") - console.log(this.dataForm,"getInfo this.dataForm") - }, - async print(){ - var params = qs.stringify({ - token: Cookies.get('token'), - id:this.dataForm.id - }) - let apiURL = `/project/SoftwareTestOrder/exportWord/` - window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` - }, - // 琛ㄥ崟鎻愪氦 - async formSubmit() { - console.log(this.dataForm, 'formSubmit this.dataForm') - if(this.dataForm.softwareTestOrder.testType1){ - this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.join(',') - } - if(this.dataForm.softwareTestOrder.testType2){ - this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.join(',') - } - console.log(this.dataForm.softwareTestOrder.testType1) - let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/project/SoftwareTestOrder/', this.dataForm) - if (res.success) { - await this.$tip.success() - this.$refs.dialog.close() - this.$emit('refreshDataList') - }else{ - if(this.dataForm.softwareTestOrder.testType1){ - this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',') + }, + async print() { + var params = qs.stringify({ + token: Cookies.get('token'), + id: this.dataForm.id + }) + let apiURL = `/project/SoftwareTestOrder/exportWord/` + window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` + }, + // 琛ㄥ崟鎻愪氦 + async formSubmit() { + console.log(this.dataForm, 'formSubmit this.dataForm') + if (this.dataForm.softwareTestOrder.testType1) { + this.dataForm.softwareTestOrder.testType1 = this.dataForm.softwareTestOrder.testType1.join(',') } - if(this.dataForm.softwareTestOrder.testType2){ - this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',') + if (this.dataForm.softwareTestOrder.testType2) { + this.dataForm.softwareTestOrder.testType2 = this.dataForm.softwareTestOrder.testType2.join(',') + } + console.log(this.dataForm.softwareTestOrder.testType1) + let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/project/SoftwareTestOrder/', this.dataForm) + if (res.success) { + await this.$tip.success() + this.$refs.dialog.close() + this.$emit('refreshDataList') + } else { + if (this.dataForm.softwareTestOrder.testType1) { + this.dataForm.softwareTestOrder.testType1 = this.dataForm.softwareTestOrder.testType1.split(',') + } + if (this.dataForm.softwareTestOrder.testType2) { + this.dataForm.softwareTestOrder.testType2 = this.dataForm.softwareTestOrder.testType2.split(',') + } } } } } -} </script> <style> -.weiTuoDanAuto { - width: 70%; -//border: 1px solid; margin: 0 auto; -} + .weiTuoDanAuto { + width: 70%; + /*border: 1 px solid;*/ + margin: 0 auto; + } -.weiTuoDanAuto .el-radio { - padding: 5px; - margin-right: 10px; -} + .weiTuoDanAuto .el-radio { + padding: 5px; + margin-right: 10px; + } -.zt .weiTuoDanAuto .el-form-item.el-form-item--default { - margin-right: 0; -} + .zt .weiTuoDanAuto .el-form-item.el-form-item--default { + margin-right: 0; + } -.el-flex { - display: flex; - align-items: center; -} + .el-flex { + display: flex; + align-items: center; + } -.DWidth { - width: 100px; -} + .DWidth { + width: 100px; + } -.DWidth-Unt { - width: 100px; -} + .DWidth-Unt { + width: 100px; + } -.DPadding1 { - padding: 6px; -} + .DPadding1 { + padding: 6px; + } -.DPadding2 { - padding: 7px; -} + .DPadding2 { + padding: 7px; + } -.DPadding3 { - padding: 4px; -} + .DPadding3 { + padding: 4px; + } -.DAlign { - text-align: center; -} + .DAlign { + text-align: center; + } -.el-border-left { - border-left: 1px solid rgba(0, 0, 0, .2); -} + .el-border-left { + border-left: 1px solid rgba(0, 0, 0, .2); + } -.DOldForm { - width: 100%; -} + .DOldForm { + width: 100%; + } -.el-border-top-and-bottom { - border-top: 1px solid rgba(0, 0, 0, .2); - border-bottom: 1px solid rgba(0, 0, 0, .2); -} + .el-border-top-and-bottom { + border-top: 1px solid rgba(0, 0, 0, .2); + border-bottom: 1px solid rgba(0, 0, 0, .2); + } -.DOldForm > .el-form-item > .el-form-item__content { - width: calc(100% - 120px); -} -.startDate > .el-form-item > .el-form-item__content { - width: 95%; -} -.endDate > .el-form-item > .el-form-item__content { - width: 95%; -} -.testCost > .el-form-item > .el-form-item__content { - width: 100%; -} -.testVenue > .el-form-item > .el-form-item__content { - width: 100%; -} -.el-border-bottom { - border-bottom: 1px solid rgba(0, 0, 0, .2); -} + .DOldForm > .el-form-item > .el-form-item__content { + width: calc(100% - 120px); + } -.zt .el-table.el-software th { - background: transparent; -} + .startDate > .el-form-item > .el-form-item__content { + width: 95%; + } -.zt .el-table.el-software th > .cell { - font-weight: 500; -} + .endDate > .el-form-item > .el-form-item__content { + width: 95%; + } -.DHold { - font-weight: 600; -} + .testCost > .el-form-item > .el-form-item__content { + width: 100%; + } -.zt .el-table.el-software { - font-size: 14px; -} + .testVenue > .el-form-item > .el-form-item__content { + width: 100%; + } -.weiTuoDanAuto .marginTopAndMarginBottom { - margin-top: 10px !important; - margin-bottom: 0 !important; -} + .el-border-bottom { + border-bottom: 1px solid rgba(0, 0, 0, .2); + } -.weiTuoDanAuto .marginTopAndMarginBottom2 { - margin-top: -10px !important; - margin-bottom: 10px !important; -} -.weiTuoDanAuto .marginTopAndMarginBottom3 { - margin-top: 0 !important; - margin-bottom: 10px !important; -} -.csjgxx > .el-form-item > .el-form-item__content { - width: calc(100% - 130px); -} -.order-sc > .el-form-item > .el-form-item__content { - width:100%; -} -.test-type-line-height>.el-form-item>.el-form-item__content{ - line-height: 30px; -} -.requireOther.el-input{ - position: absolute; -} + .zt .el-table.el-software th { + background: transparent; + } + + .zt .el-table.el-software th > .cell { + font-weight: 500; + } + + .DHold { + font-weight: 600; + } + + .zt .el-table.el-software { + font-size: 14px; + } + + .weiTuoDanAuto .marginTopAndMarginBottom { + margin-top: 10px !important; + margin-bottom: 0 !important; + } + + .weiTuoDanAuto .marginTopAndMarginBottom2 { + margin-top: -10px !important; + margin-bottom: 10px !important; + } + + .weiTuoDanAuto .marginTopAndMarginBottom3 { + margin-top: 0 !important; + margin-bottom: 10px !important; + } + + .csjgxx > .el-form-item > .el-form-item__content { + width: calc(100% - 130px); + } + + .order-sc > .el-form-item > .el-form-item__content { + width: 100%; + } + + .test-type-line-height > .el-form-item > .el-form-item__content { + line-height: 30px; + } + + .requireOther.el-input { + position: absolute; + } </style> -- Gitblit v1.9.1