From cdf29a8f6fb9990f82ccc1d3f47bfba48cfaf4fc Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期三, 10 一月 2024 17:24:53 +0800 Subject: [PATCH] 修改 --- web/src/views/modules/configAuditReport/ConfigAuditReport-AddOrUpdate.vue | 178 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 166 insertions(+), 12 deletions(-) diff --git a/web/src/views/modules/configAuditReport/ConfigAuditReport-AddOrUpdate.vue b/web/src/views/modules/configAuditReport/ConfigAuditReport-AddOrUpdate.vue index b67de3d..3c0d894 100644 --- a/web/src/views/modules/configAuditReport/ConfigAuditReport-AddOrUpdate.vue +++ b/web/src/views/modules/configAuditReport/ConfigAuditReport-AddOrUpdate.vue @@ -1,15 +1,127 @@ <template> <zt-dialog ref="dialog" @confirm="formSubmit"> - <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> - <zt-form-item label="缂栧彿" prop="code" rules="required"> - <el-input v-model="dataForm.code"></el-input> - </zt-form-item> - <zt-form-item label="瀹℃牳浜�" prop="auditor" rules="required"> - <el-input v-model="dataForm.auditor"></el-input> - </zt-form-item> - <zt-form-item label="瀹℃牳鏃堕棿" prop="auditorDate" rules="required"> - <el-input v-model="dataForm.auditorDate"></el-input> - </zt-form-item> + <el-form :model="dataForm" :inline="true" ref="dataForm" style="padding-top: 0" :disabled="dataForm.disabled" + label-width="120px" class="configAuditFormAuto"> + <div> + <el-form-item label-width="60px" label="缂栧彿:" style="width:100%;margin-bottom: -5px"> + <span>{{dataForm.auditReport.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="configAuditContentWidth"> + <el-form-item class="marginTopAndMarginBottom" label="椤圭洰鍚嶇О" style="width: 48%"> + <el-input v-model="dataForm.project.softwareName" placeholder="椤圭洰鍚嶇О"></el-input> + </el-form-item> + <el-form-item class="marginTopAndMarginBottom" label="椤圭洰鏍囪瘑" style="width: 48%"> + <el-input v-model="dataForm.project.softwareIdentity" placeholder="椤圭洰鏍囪瘑"></el-input> + </el-form-item> + </div> + <div style="border-bottom: 1px solid rgba(0,0,0,.2);"> + <div> + <div style="text-align: center;font-weight: 600;border-bottom:1px solid rgba(0,0,0,.2);height: 40px;line-height: 40px;font-size: 18px">瀹℃牳鍐呭</div> + <el-form-item label="鐘舵�佹爣璁�" label-width="150px" style="width:100%;padding-left:20px;margin-bottom:0"> + 鈭氬悎鏍� 脳涓嶅悎鏍� NA涓嶉�傜敤 + </el-form-item> + <div class="table-container"> + <el-table ref="tableConfigAuditList" class="el-software el-margin-top-bot" border + :data="dataForm.contentList" + stripe> + <el-table-column prop="no" align="center" width="60" label="搴忓彿"> + <template slot-scope="scope"> + <span v-html="indexFormat(scope.$index)"></span> + </template> + </el-table-column> + <el-table-column prop="auditContent" min-width="180" label="瀹℃牳鍐呭"> + <template v-slot="{ row }"> + <el-input v-model="row.auditContent" placeholder="瀹℃牳鍐呭"></el-input> + </template> + </el-table-column> + <el-table-column prop="auditResult" align="center" width="150" label="瀹℃牳缁撴灉"> + <template v-slot="{ row }"> + <zt-dict v-model="row.auditResult" placeholder="瀹℃牳缁撴灉" dict="status_tag" + clearable></zt-dict> + </template> + </el-table-column> + <el-table-column prop="remark" label="澶囨敞" width="100" align="center"> + <template v-slot="{ row }"> + <el-input v-model="row.remark" placeholder="澶囨敞"></el-input> + </template> + </el-table-column> + </el-table> + </div> + </div> + <div> + <div style="text-align: center;font-weight: 600;height: 40px;line-height: 40px;font-size: 18px">鍙戠幇鐨勯棶棰�</div> + <div class="table-container"> + <el-table ref="tableConfigAuditList" class="el-software el-margin-top-bot" border + :data="dataForm.problemList" + stripe> + <el-table-column prop="no" align="center" width="60" label="搴忓彿"> + <template slot-scope="scope"> + <span v-html="indexFormat(scope.$index)"></span> + </template> + </el-table-column> + <el-table-column prop="problemDescription" min-width="180" label="闂鎻忚堪"> + <template v-slot="{ row }"> + <el-input v-model="row.problemDescription" placeholder="闂鎻忚堪"></el-input> + </template> + </el-table-column> + <el-table-column prop="isNotTrue" align="center" width="150" label="鏄惁涓轰笉绗﹀悎椤�"> + <template v-slot="{ row }"> + <zt-dict v-model="row.isNotTrue" placeholder="鏄惁涓轰笉绗﹀悎椤�" dict="is_or_not" :radio="true" + clearable></zt-dict> + </template> + </el-table-column> + <el-table-column prop="problemRectification" label="闂鏁存敼鎯呭喌" width="100" align="center"> + <template v-slot="{ row }"> + <el-input v-model="row.problemRectification" placeholder="闂鏁存敼鎯呭喌"></el-input> + </template> + </el-table-column> + <el-table-column prop="discoveryPhase" label="鍙戠幇闃舵" width="100" align="center"> + <template v-slot="{ row }"> + <el-input v-model="row.discoveryPhase" placeholder="鍙戠幇闃舵"></el-input> + </template> + </el-table-column> + </el-table> + <div class="icon-container" @click="addConfigAuditRow()"> + <!-- 鏀剧疆鍥哄畾鐨勫浘鏍� --> + <i class="el-icon-plus"></i> + </div> + </div> + </div> + </div> + <div class="el-flexConfigAuditDialog"> + <div style="width: 112px;text-align: center;font-weight: 600"> + 瀹℃牳浜哄憳锛� + </div> + <div class="el-border-left-right" style="width: 20%;height: 40px;"> + <el-form-item style="width: 100%;padding-left:20px;margin:0;"> + <el-input type="textarea" :rows="1" placeholder="璇疯緭鍏ュ鏍镐汉鍛�" + v-model="dataForm.auditReport.auditor"></el-input> + <!--{{dataForm.configAuditReport.auditor}}--> + </el-form-item> + </div> + <div style="width: 52px;text-align: center;font-weight: 600"> + 鏃� 鏈� + </div> + <div class="el-border-left" style="width: 20%;height: 40px;"> + <el-form-item style="width: 100%;padding-left:20px;margin:0;"> + <el-date-picker + v-model="dataForm.auditReport.auditorDate" + type="date" + placeholder="璇烽�夋嫨鏃ユ湡"> + </el-date-picker> + <!--{{ dataForm.configAuditReport.auditorDate | filterTime('YYYY骞碝M鏈圖D鏃�') }}--> + </el-form-item> + </div> + </div> + </div> + <div class="el-flex report-sc" style="height: 60px"> + <el-form-item class="marginTopAndMarginBottom" style="width: 100%"> + <config-uploader :lineHeight="true" busi-type="config_audit_report" model-name="dataForm" :dataForm="dataForm" + v-model="dataForm.files"/> + </el-form-item> + </div> </el-form> <template v-slot:footer> <el-button v-if="dataForm.disabled" type="primary" @click="print()">鎵撳嵃</el-button> @@ -26,7 +138,7 @@ return { dataForm: { id: '', - configAuditReport:{ + auditReport:{ code: '', auditor: '', auditorDate: '', @@ -72,16 +184,24 @@ } console.log(this.dataForm, "getInfo this.dataForm") }, + addConfigAuditRow() { + this.dataForm.problemList.push({}) + this.$nextTick(() => { + const tableBody = this.$refs.tableConfigAuditList.$el.querySelector('.el-table__body-wrapper') + tableBody.scrollTop = tableBody.scrollHeight; + }) + }, async print(){ var params = qs.stringify({ token: Cookies.get('token'), id:this.dataForm.id }) - let apiURL = `/configAuditReport/ConfigAuditReport/exportReport` + let apiURL = `/configAuditReport/ConfigAuditReport/exportConfigAudit` window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` }, // 琛ㄥ崟鎻愪氦 async formSubmit() { + console.log(this.dataForm,"formSubmit") let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/configAuditReport/ConfigAuditReport/', this.dataForm) if (res.success) { await this.$tip.success() @@ -92,3 +212,37 @@ } } </script> +<style> +.el-flexConfigAuditDialog{ + display: flex; + align-items: center +} +.configAuditContentWidth > .el-form-item > .el-form-item__content { + width: calc(100% - 120px); +} +.configAuditFormAuto .marginTopAndMarginBottom { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.configAuditFormAuto .marginTopAndMarginBottom2 { + margin-top: -10px !important; + margin-bottom: 10px !important; +} + +.configAuditFormAuto .marginTopAndMarginBottom3 { + margin-top: 0 !important; + margin-bottom: 10px !important; +} + +.acceptDate > .el-form-item > .el-form-item__content { + line-height: 80px; +} + +.configAuditFormAuto .el-radio { + margin-right: 10px; +} +.report-sc > .el-form-item > .el-form-item__content { + width:100%; +} +</style> -- Gitblit v1.9.1