参数收集自定义表头
This commit is contained in:
@@ -768,7 +768,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
|
||||
@@ -779,9 +779,18 @@
|
||||
projectName:this.$route.query.projectName,
|
||||
flag: '7'
|
||||
}
|
||||
var jsonHead = []
|
||||
getAction(url, params).then((res) => {
|
||||
if (res.success) {
|
||||
var jsonHead = res.result
|
||||
if(res.result && res.result.length > 0){
|
||||
jsonHead = res.result
|
||||
}else{
|
||||
getAction(url, params).then((val) => {
|
||||
if (val.success) {
|
||||
jsonHead = val.result
|
||||
}
|
||||
})
|
||||
}
|
||||
this.columns = []
|
||||
let num = 0
|
||||
this.content = []
|
||||
@@ -863,6 +872,11 @@
|
||||
this.colIndexs.forEach((item)=>{
|
||||
this.minWidthColumns.push([this.columns[item],500])
|
||||
})
|
||||
let checkedList = []
|
||||
this.columns.forEach((item) => {
|
||||
checkedList.push(item.dataIndex)
|
||||
})
|
||||
this.$emit('getcustomizeList',checkedList)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -283,7 +283,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">
|
||||
@@ -559,7 +559,6 @@
|
||||
</a-modal>
|
||||
<JLoading :loading="textLoading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||
<batchUpdateDeadline ref="batchUpdateDeadlineRef" @batchUpdateDeadlineForm="batchUpdateDeadlineForm"/>
|
||||
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -747,106 +746,107 @@
|
||||
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('Deadline'),
|
||||
headFieldCn: '截止时间',
|
||||
headFieldEn: 'Due Date',
|
||||
field: 'designDueDate',
|
||||
key: 23,
|
||||
moduleFlag: '参数收集'
|
||||
},
|
||||
{
|
||||
sort: '',
|
||||
name: this.$t('databasereportingtime'),
|
||||
headFieldCn: '同步上报库时间',
|
||||
headFieldEn: 'database reporting time',
|
||||
field: 'databasereportingtime',
|
||||
key: 23,
|
||||
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: [
|
||||
// {
|
||||
// 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: 'paramsName',
|
||||
// key: 2,
|
||||
// moduleFlag: '参数收集',
|
||||
// status: 2
|
||||
// },
|
||||
// {
|
||||
// sort: '3',
|
||||
// name: this.$t('ParameterDescription'),
|
||||
// headFieldCn: '参数说明',
|
||||
// headFieldEn: 'Parameter Description',
|
||||
// field: 'description',
|
||||
// key: 3,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('status'),
|
||||
// headFieldCn: '状态',
|
||||
// headFieldEn: 'status',
|
||||
// field: 'state',
|
||||
// key: 4,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('areaOfResponsibility'),
|
||||
// headFieldCn: '责任领域',
|
||||
// headFieldEn: 'Responsible Field',
|
||||
// field: 'dutyTerritory',
|
||||
// key: 5,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('engineeringInterfacePerson'),
|
||||
// headFieldCn: '工程接口人',
|
||||
// headFieldEn: 'Eng. Interface',
|
||||
// field: 'sdt',
|
||||
// key: 6,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('completedBy'),
|
||||
// headFieldCn: '填写人',
|
||||
// headFieldEn: 'Filled by',
|
||||
// field: 'dre',
|
||||
// key: 15,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('Deadline'),
|
||||
// headFieldCn: '截止时间',
|
||||
// headFieldEn: 'Due Date',
|
||||
// field: 'deadline',
|
||||
// key: 23,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
// {
|
||||
// sort: '',
|
||||
// name: this.$t('databasereportingtime'),
|
||||
// headFieldCn: '同步上报库时间',
|
||||
// headFieldEn: 'database reporting time',
|
||||
// field: 'reportTime',
|
||||
// key: 23,
|
||||
// moduleFlag: '参数收集'
|
||||
// },
|
||||
//
|
||||
// {
|
||||
// sort: '',
|
||||
// disabled: true,
|
||||
// name: this.$t('operation'),
|
||||
// headFieldCn: '操作',
|
||||
// headFieldEn: 'Operation',
|
||||
// key: 35,
|
||||
// field: 'operation',
|
||||
// moduleFlag: '参数收集',
|
||||
// status: 2
|
||||
// }
|
||||
// ],
|
||||
customizeList:[],
|
||||
selectedRowKeys: [],
|
||||
textLoading: false,
|
||||
formInline: {},
|
||||
@@ -932,6 +932,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.handleClick()
|
||||
this.getcustomizeList()
|
||||
window.addEventListener('keyup', this.handleKeyup)
|
||||
window.addEventListener('click', this.handleClick)
|
||||
this.GetgetLoginUserType()
|
||||
@@ -1724,11 +1725,39 @@
|
||||
})
|
||||
},
|
||||
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
|
||||
},
|
||||
@@ -1746,7 +1775,7 @@
|
||||
uniqueArray.forEach(item => {
|
||||
this.customizeList.forEach((val, index) => {
|
||||
if (item == val.field) {
|
||||
val.sort = index + 1
|
||||
// val.sort = index + 1
|
||||
list.push(val)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user