<template>
|
<zt-dialog ref="dialog" column="2" title="选择配置项" :hasConfirm="true" @confirm="formSubmit" :append-to-body="true">
|
<el-card shadow="never" class="aui-card--fill">
|
<div class="mod-project-project}">
|
<zt-table-wraper :dataForm="dataForm" ref="tableObj" v-slot="{ table }" query-url="/configItemChange/ConfigItemChange/getItemList"
|
@dataLoaded="dataLoaded"
|
>
|
<el-table
|
:data="table.dataList"
|
height="100px"
|
@selection-change="changeRow"
|
v-adaptive="{bottomOffset:150}"
|
border>
|
<el-table-column align="center" type="selection" width="40"/>
|
<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="itemName" width="200" label="配置项名称">
|
</el-table-column>
|
<el-table-column prop="itemIdentify" align="center" min-width="290" label="配置项标识">
|
</el-table-column>
|
<el-table-column prop="version" align="center" width="120" label="版本">
|
</el-table-column>
|
<el-table-column prop="retrospectVersion" label="上溯版" width="120" align="center">
|
</el-table-column>
|
<el-table-column prop="secretClass" label="密级" width="100" align="center">
|
<template v-slot="{ row }">
|
<zt-dict :disabled="true" v-model="row.secretClass" placeholder="密级" dict="secret_class"
|
clearable></zt-dict>
|
</template>
|
</el-table-column>
|
</el-table>
|
</zt-table-wraper>
|
</div>
|
</el-card>
|
</zt-dialog>
|
</template>
|
|
<script>
|
export default {
|
name: 'configItem-list',
|
data() {
|
return {
|
pageCode:'',
|
dataForm: {
|
id:'',
|
projectId:'',
|
configChangeList:[],
|
}
|
}
|
},
|
methods: {
|
init(projectId,id) {
|
this.dataForm.projectId = projectId
|
this.dataForm.id = id
|
console.log(this.dataForm,'this.dataForm.id')
|
this.$nextTick(()=>{
|
this.$refs.tableObj.query()
|
})
|
},
|
indexFormat(index) {
|
return index += 1
|
},
|
dataLoaded(data){
|
console.log(data,'data dataLoaded')
|
},
|
changeRow(selection){
|
this.dataForm.configChangeList = selection
|
console.log(this.dataForm.configChangeList,'this.dataForm.checkList 选中的列表数据')
|
},
|
async formSubmit(){
|
console.log(this.dataForm,'this.dataForm')
|
this.$emit('getChangeItemList',this.dataForm)
|
await this.$tip.success()
|
this.$refs.dialog.close()
|
}
|
},
|
}
|
</script>
|
<style>
|
.form-input-width-1 .el-form-item > .el-form-item__content .el-input {
|
width: 150px;
|
}
|
</style>
|