| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom2" label="库类型" style="width: 99%"> |
| | | <zt-dict v-model="dataForm.configItemWarehouse.libraryType" :radio="true" dict="library_type"></zt-dict> |
| | | <zt-dict disabled="disabled" v-model="dataForm.configItemWarehouse.libraryType" :radio="true" dict="library_type"></zt-dict> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="el-flexManageDialog el-border-bottom"> |
| | |
| | | <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="itemIdentify" 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 v-if="showColumn" 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)">修改检查单 |
| | |
| | | </zt-table-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" prop="files" label="上传附件" width="300" align="center"> |
| | | <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" |
| | | <table-uploader :disabled="!showAddAndEdit" busi-type="config_item_warehouse" model-name="row" :dataForm="row" |
| | | v-model="row.files"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="stepMarker=='pzxrk_first'" fixed="right" label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <zt-table-button @click="deleteRow(scope.$index,scope.row.id)">删除</zt-table-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="icon-container"> |
| | | <div v-if="showAddAndEdit && !dataForm.disabled" class="icon-container"> |
| | | <el-dropdown @command="handleCommand"> |
| | | <span class="el-dropdown-link"> |
| | | <i class="el-icon-plus"></i> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | </div> |
| | | <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/> |
| | | </el-form> |
| | | <template v-slot:footer> |
| | | <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button> |
| | | </template> |
| | | </zt-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddOrUpdateCheck from '../testCheckOrder/TestCheckOrder-AddOrUpdate' |
| | | import qs from "qs"; |
| | | import Cookies from "js-cookie"; |
| | | import cloneDeep from "lodash/cloneDeep"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | disabled: true, |
| | | stepMarker: '', |
| | | title: '查看', |
| | | showColumn:false, |
| | | 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: { |
| | |
| | | }, |
| | | created() { |
| | | const roleName = localStorage.getItem('roleName') |
| | | if (roleName && roleName.includes('QA')) { |
| | | if (roleName && roleName.includes('审核人员')) { |
| | | this.showColumn = true; |
| | | } |
| | | if (roleName && roleName.includes('检测人员')) { |
| | | this.showAddAndEdit = true; |
| | | } |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | computed: {}, |
| | | components: { |
| | | AddOrUpdateCheck |
| | | }, |
| | |
| | | if (row.projectId) { |
| | | this.dataForm.projectId = row.projectId |
| | | } |
| | | this.getInfo() |
| | | if (row.libraryType) { |
| | | console.log(row.libraryType,"row.libraryType") |
| | | this.dataForm.configItemWarehouse.libraryType = row.libraryType |
| | | } |
| | | this.getInfo2() |
| | | if (!this.dataForm.disabled) { |
| | | if (!row.stepMarker) { |
| | | this.stepMarker = 'pzxrk_first' |
| | |
| | | } |
| | | console.log(this.dataForm.id, this.dataForm.projectId, 'params params') |
| | | }, |
| | | // addConfigItemWarehouseRow(){ |
| | | // this.dataForm.configItemList.push({}) |
| | | // this.$nextTick(()=>{ |
| | | // const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper') |
| | | // tableBody.scrollTop = tableBody.scrollHeight; |
| | | // }) |
| | | // }, |
| | | handleCommand(pageCode) { |
| | | const selectedItem = this.menuOptions.find(item => item.pageCode === pageCode); |
| | | console.log(selectedItem, "handleCommand(pageCode) selectedItem") |
| | |
| | | openCheckOrderWin(row) { |
| | | console.log(row, "openCheckOrderWin(row)") |
| | | row.projectId = this.dataForm.projectId |
| | | if (!row.pageCode){ |
| | | row.pageCode = this.pageNameCode[row.itemName] |
| | | console.log(row.itemName,row.pageCode, "row.itemName,openCheckOrderWin(row) row.pageCode") |
| | | if (!row.checkId) { |
| | | row.checkId = -1 |
| | | } |
| | | // if (!row.pageCode) {//其实这里是没用的 |
| | | // row.pageCode = this.pageNameCode[row.itemName] |
| | | // } |
| | | console.log(row.itemName, row.pageCode, "row.itemName,openCheckOrderWin(row) row.pageCode") |
| | | this.$refs.addOrUpdate.$refs.dialog.init(null, row) |
| | | |
| | | }, |
| | |
| | | this.$set(row, 'checkId', checkId) |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | async getInfo2() { |
| | | let params = { |
| | | warehouseId: this.dataForm.id, |
| | | projectId: this.dataForm.projectId |
| | | projectId: this.dataForm.projectId, |
| | | libraryType:this.dataForm.configItemWarehouse.libraryType |
| | | } |
| | | let res = await this.$http.get(`/configItemWarehouse/ConfigItemWarehouse/getDto`, {params: params}) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | if (this.dataForm.project === null) { |
| | | this.dataForm.project = {} |
| | | } |
| | |
| | | if (this.dataForm.flowInfoDto === null) { |
| | | this.dataForm.flowInfoDto = {} |
| | | } |
| | | setTimeout(()=>{ |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | },100) |
| | | console.log(this.dataForm, "getInfo this.dataForm") |
| | | }, |
| | | async deleteRow(index, id){ |
| | | if (await this.$tip.confirm(this.$t('prompt.info', {'handle': this.$t('delete')}))) { |
| | | if (id != null) { |
| | | let res = await this.$http.delete('/configItemWarehouse/WarehouseConfigItem/', {data: [id]}) |
| | | } |
| | | this.dataForm.configItemList.splice(index, 1) |
| | | } |
| | | }, |
| | | async print(){ |
| | | var params = qs.stringify({ |
| | | token: Cookies.get('token'), |
| | | id:this.dataForm.id |
| | | }) |
| | | let apiURL = `/configItemWarehouse/ConfigItemWarehouse/exportWarehouseOrder` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit(submitType) { |
| | | /* if (this.stepMarker=='wplz_first' && submitType == 'bl') { |
| | | for(666) |
| | | if (this.pageNameCode[row.itemName] && !row.isCheck) { |
| | | alert(444) |
| | | let isFiles = true; |
| | | let flag = true; |
| | | console.log(this.dataForm, "this.dataForm11111") |
| | | this.dataForm.configItemList.forEach(item => { |
| | | if (parseInt(item.secretClass) > localStorage.getItem('userSecretClass')) { |
| | | this.$alert("当前项目设置的密级高于当前用户的密级,请重新设置") |
| | | flag =false |
| | | } |
| | | }) |
| | | if (!flag){ |
| | | 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') { |
| | | this.dataForm.configItemList.forEach(item => { |
| | | console.log(item, "his.dataForm.technicalList.forEach") |
| | | item.files.groups.forEach(groups => { |
| | | groups.fields.forEach(files => { |
| | | if (files.files.length === 0) { |
| | | this.$alert("当前存在未上传附件的配置项,请重新上传") |
| | | isFiles = false |
| | | return isFiles |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | if (!isFiles){ |
| | | return |
| | | } |
| | | }*/ |
| | | if (submitType == 'tj' || submitType == 'bl') { |
| | | let flowInfo = { |
| | | flowCode: 'pzxrk', |
| | | stepIdMark: this.stepMarker, |