参数收集自定义表头
This commit is contained in:
@@ -779,8 +779,11 @@
|
||||
projectName:this.$route.query.projectName,
|
||||
flag: '7'
|
||||
}
|
||||
let paramscm = {
|
||||
moduleFlag:'参数项收集清单'
|
||||
}
|
||||
var jsonHead = []
|
||||
getAction(url, params).then((res) => {
|
||||
getAction(url, paramscm).then((res) => {
|
||||
if (res.success) {
|
||||
if(res.result && res.result.length > 0){
|
||||
jsonHead = res.result
|
||||
@@ -874,7 +877,7 @@
|
||||
})
|
||||
let checkedList = []
|
||||
this.columns.forEach((item) => {
|
||||
checkedList.push(item.dataIndex)
|
||||
checkedList.push(item.field)
|
||||
})
|
||||
this.$emit('getcustomizeList',checkedList)
|
||||
this.$forceUpdate()
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
if (this.$route.query.it === undefined) {
|
||||
// 页面跳转
|
||||
paramsManifestid = this.$route.query.id
|
||||
url = this.url.tableHeader
|
||||
url = 'head/headCustomEO/list'
|
||||
} else {
|
||||
// 历史版本
|
||||
paramsManifestid = this.$route.query.it
|
||||
@@ -573,9 +573,18 @@
|
||||
paramsManifestId: paramsManifestid,
|
||||
flag: '8'
|
||||
}
|
||||
var jsonHead = []
|
||||
getAction(url, params).then((res) => {
|
||||
if (res.success) {
|
||||
var jsonHead = res.result
|
||||
if (res.success) {
|
||||
if(res.result && res.result.length > 0){
|
||||
jsonHead = res.result
|
||||
}else{
|
||||
getAction(this.url.tableHeader, params).then((val) => {
|
||||
if (val.success) {
|
||||
jsonHead = val.result
|
||||
}
|
||||
})
|
||||
}
|
||||
this.columns = []
|
||||
let num = 0
|
||||
this.content = []
|
||||
@@ -653,6 +662,11 @@
|
||||
this.columns = [...this.columns]
|
||||
this.colIndexs.forEach((item)=>{
|
||||
this.minWidthColumns.push([this.columns[item],500])
|
||||
let checkedList = []
|
||||
this.columns.forEach((item) => {
|
||||
checkedList.push(item.field)
|
||||
})
|
||||
this.$emit('getcustomizeList',checkedList)
|
||||
})
|
||||
},300)
|
||||
console.log(this.columns)
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</a-checkbox>
|
||||
<a-checkbox-group @change="onChange" v-model="checkedList" class="customize-text">
|
||||
<a-checkbox class="customize-text-title" :disabled="item.disabled" v-for="(item, key) in customizeList"
|
||||
:key="key" :value="item.field">{{ item.name }}
|
||||
:key="key" :value="item.field">{{ item.db_field_txt }}
|
||||
</a-checkbox>
|
||||
</a-checkbox-group>
|
||||
<div class="drawer-bootom-button">
|
||||
@@ -137,6 +137,7 @@
|
||||
:formInline='formInline' :currentPersonRole='currentPersonRole'
|
||||
@getDataSource="getDataSource"
|
||||
@handlePreservation="handlePreservation"
|
||||
@getcustomizeList="getcustomizeList"
|
||||
@value='value'
|
||||
@listReset='listReset' @LoginUserType='LoginUserType'/>
|
||||
</div>
|
||||
@@ -268,120 +269,150 @@
|
||||
indeterminate: false,
|
||||
checkAll: false,
|
||||
selectedValue: [],
|
||||
checkedList: ['NiONumber', 'ParameterName', 'operation'],
|
||||
customizeList: [
|
||||
{
|
||||
sort: '1',
|
||||
name: this.$t('NiONumber'),
|
||||
disabled: true,
|
||||
headFieldCn: 'NIO编号',
|
||||
headFieldEn: 'NiONumber',
|
||||
field: 'NiONumber',
|
||||
key: 1,
|
||||
moduleFlag: '上报库',
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
sort: '2',
|
||||
disabled: true,
|
||||
name: this.$t('ParameterName'),
|
||||
headFieldCn: '参数名称',
|
||||
headFieldEn: 'Parameter Name',
|
||||
field: 'ParameterName',
|
||||
key: 2,
|
||||
moduleFlag: '上报库',
|
||||
status: 2
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('ParameterDescription'),
|
||||
headFieldCn: '参数说明',
|
||||
headFieldEn: 'Parameter Description',
|
||||
field: 'ParameterDescription',
|
||||
key: 3,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('status'),
|
||||
headFieldCn: '状态',
|
||||
headFieldEn: 'status',
|
||||
field: 'status',
|
||||
key: 4,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('areaOfResponsibility'),
|
||||
headFieldCn: '责任领域',
|
||||
headFieldEn: 'Responsible Field',
|
||||
field: 'areaOfResponsibility',
|
||||
key: 5,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('engineeringInterfacePerson'),
|
||||
headFieldCn: '工程接口人',
|
||||
headFieldEn: 'Eng. Interface',
|
||||
field: 'engineeringInterfacePerson',
|
||||
key: 6,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('completedBy'),
|
||||
headFieldCn: '填写人',
|
||||
headFieldEn: 'Filled by',
|
||||
field: 'completedBy',
|
||||
key: 15,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('Version'),
|
||||
headFieldCn: '版本',
|
||||
headFieldEn: 'Version',
|
||||
field: 'Version',
|
||||
key: 23,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('synchronizationtime'),
|
||||
headFieldCn: '同步时间',
|
||||
headFieldEn: 'Synchronization time',
|
||||
field: 'synchronizationtime',
|
||||
key: 21,
|
||||
moduleFlag: '上报库'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
disabled: true,
|
||||
name: this.$t('operation'),
|
||||
headFieldCn: '操作',
|
||||
headFieldEn: 'Operation',
|
||||
key: 35,
|
||||
field: 'operation',
|
||||
moduleFlag: '上报库',
|
||||
status: 2
|
||||
}
|
||||
],
|
||||
checkedList: ['nio_number', 'params_name', 'operation'],
|
||||
customizeList:[],
|
||||
// customizeList: [
|
||||
// {
|
||||
// sort: '1',
|
||||
// name: this.$t('NiONumber'),
|
||||
// disabled: true,
|
||||
// headFieldCn: 'NIO编号',
|
||||
// headFieldEn: 'NiONumber',
|
||||
// field: 'NiONumber',
|
||||
// key: 1,
|
||||
// moduleFlag: '上报库',
|
||||
// status: 1
|
||||
// },
|
||||
// {
|
||||
// sort: '2',
|
||||
// disabled: true,
|
||||
// name: this.$t('ParameterName'),
|
||||
// headFieldCn: '参数名称',
|
||||
// headFieldEn: 'Parameter Name',
|
||||
// field: 'ParameterName',
|
||||
// key: 2,
|
||||
// moduleFlag: '上报库',
|
||||
// status: 2
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('ParameterDescription'),
|
||||
// headFieldCn: '参数说明',
|
||||
// headFieldEn: 'Parameter Description',
|
||||
// field: 'ParameterDescription',
|
||||
// key: 3,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('status'),
|
||||
// headFieldCn: '状态',
|
||||
// headFieldEn: 'status',
|
||||
// field: 'status',
|
||||
// key: 4,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('areaOfResponsibility'),
|
||||
// headFieldCn: '责任领域',
|
||||
// headFieldEn: 'Responsible Field',
|
||||
// field: 'areaOfResponsibility',
|
||||
// key: 5,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('engineeringInterfacePerson'),
|
||||
// headFieldCn: '工程接口人',
|
||||
// headFieldEn: 'Eng. Interface',
|
||||
// field: 'engineeringInterfacePerson',
|
||||
// key: 6,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('completedBy'),
|
||||
// headFieldCn: '填写人',
|
||||
// headFieldEn: 'Filled by',
|
||||
// field: 'completedBy',
|
||||
// key: 15,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('Version'),
|
||||
// headFieldCn: '版本',
|
||||
// headFieldEn: 'Version',
|
||||
// field: 'Version',
|
||||
// key: 23,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('synchronizationtime'),
|
||||
// headFieldCn: '同步时间',
|
||||
// headFieldEn: 'Synchronization time',
|
||||
// field: 'synchronizationtime',
|
||||
// key: 21,
|
||||
// moduleFlag: '上报库'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// disabled: true,
|
||||
// name: this.$t('operation'),
|
||||
// headFieldCn: '操作',
|
||||
// headFieldEn: 'Operation',
|
||||
// key: 35,
|
||||
// field: 'operation',
|
||||
// moduleFlag: '上报库',
|
||||
// status: 2
|
||||
// }
|
||||
// ],
|
||||
}
|
||||
},
|
||||
props: {},
|
||||
mounted() {
|
||||
// this.Getlist()
|
||||
this.getTableList()
|
||||
this.getcustomizeList()
|
||||
document.title = this.$t('ParameterViewPage')
|
||||
},
|
||||
methods: {
|
||||
onCheckAllChange(e) {
|
||||
let selectedValue = ['NiONumber', 'ParameterName', 'operation']
|
||||
let selectedValue = ['nio_number', 'params_name', 'operation']
|
||||
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : selectedValue
|
||||
this.selectedValue = this.checkedList
|
||||
this.indeterminate = false
|
||||
},
|
||||
getcustomizeList(item){
|
||||
let params = {
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectName:this.$route.query.projectName,
|
||||
flag: '7'
|
||||
}
|
||||
getAction('params/collectManifest/getHeader', params).then((res) => {
|
||||
if (res.success) {
|
||||
let List = []
|
||||
res.result.forEach((item,index) => {
|
||||
if(!item.isLock){
|
||||
if(item.headFieldCn == '操作'){
|
||||
item.field = 'operation'
|
||||
item.disabled = true
|
||||
}else if(item.headFieldCn == 'NIO编号' || item.headFieldCn == '参数名称'){
|
||||
item.disabled = true
|
||||
}
|
||||
List.push(item)
|
||||
}
|
||||
})
|
||||
this.customizeList = List
|
||||
}
|
||||
})
|
||||
if(item){
|
||||
console.log(item)
|
||||
this.checkedList = item
|
||||
}
|
||||
},
|
||||
onChange() {
|
||||
this.selectedValue = this.checkedList
|
||||
},
|
||||
@@ -399,7 +430,8 @@
|
||||
uniqueArray.forEach(item => {
|
||||
this.customizeList.forEach((val, index) => {
|
||||
if (item == val.field) {
|
||||
val.sort = index + 1
|
||||
// val.sort = index + 1
|
||||
val.dbFieldName = val.db_field_name
|
||||
list.push(val)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -314,6 +314,7 @@
|
||||
@getDataSource="getDataSource"
|
||||
@handlePreservation="handlePreservation"
|
||||
@value='value'
|
||||
@getcustomizeList="getcustomizeList"
|
||||
@listReset='listReset' @LoginUserType='LoginUserType'/>
|
||||
</div>
|
||||
</a-card>
|
||||
@@ -1776,6 +1777,7 @@
|
||||
this.customizeList.forEach((val, index) => {
|
||||
if (item == val.field) {
|
||||
// val.sort = index + 1
|
||||
val.dbFieldName = val.db_field_name
|
||||
list.push(val)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user