参数收集自定义表头
This commit is contained in:
@@ -768,7 +768,7 @@
|
|||||||
if (this.$route.query.it === undefined) {
|
if (this.$route.query.it === undefined) {
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
paramsManifestid = this.$route.query.id
|
paramsManifestid = this.$route.query.id
|
||||||
url = this.url.tableHeader
|
url = 'head/headCustomEO/list'
|
||||||
} else {
|
} else {
|
||||||
// 历史版本
|
// 历史版本
|
||||||
paramsManifestid = this.$route.query.it
|
paramsManifestid = this.$route.query.it
|
||||||
@@ -779,9 +779,18 @@
|
|||||||
projectName:this.$route.query.projectName,
|
projectName:this.$route.query.projectName,
|
||||||
flag: '7'
|
flag: '7'
|
||||||
}
|
}
|
||||||
|
var jsonHead = []
|
||||||
getAction(url, params).then((res) => {
|
getAction(url, params).then((res) => {
|
||||||
if (res.success) {
|
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 = []
|
this.columns = []
|
||||||
let num = 0
|
let num = 0
|
||||||
this.content = []
|
this.content = []
|
||||||
@@ -863,6 +872,11 @@
|
|||||||
this.colIndexs.forEach((item)=>{
|
this.colIndexs.forEach((item)=>{
|
||||||
this.minWidthColumns.push([this.columns[item],500])
|
this.minWidthColumns.push([this.columns[item],500])
|
||||||
})
|
})
|
||||||
|
let checkedList = []
|
||||||
|
this.columns.forEach((item) => {
|
||||||
|
checkedList.push(item.dataIndex)
|
||||||
|
})
|
||||||
|
this.$emit('getcustomizeList',checkedList)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -283,7 +283,7 @@
|
|||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
<a-checkbox-group @change="onChange" v-model="checkedList" class="customize-text">
|
<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"
|
<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>
|
||||||
</a-checkbox-group>
|
</a-checkbox-group>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
@@ -559,7 +559,6 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
<JLoading :loading="textLoading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
|
<JLoading :loading="textLoading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||||
<batchUpdateDeadline ref="batchUpdateDeadlineRef" @batchUpdateDeadlineForm="batchUpdateDeadlineForm"/>
|
<batchUpdateDeadline ref="batchUpdateDeadlineRef" @batchUpdateDeadlineForm="batchUpdateDeadlineForm"/>
|
||||||
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -747,106 +746,107 @@
|
|||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
selectedValue: [],
|
selectedValue: [],
|
||||||
checkedList: ['NiONumber', 'ParameterName', 'operation'],
|
checkedList: ['nio_number', 'params_name', 'operation'],
|
||||||
customizeList: [
|
// customizeList: [
|
||||||
{
|
// {
|
||||||
sort: '1',
|
// sort: '1',
|
||||||
name: this.$t('NiONumber'),
|
// name: this.$t('NiONumber'),
|
||||||
disabled: true,
|
// disabled: true,
|
||||||
headFieldCn: 'NIO编号',
|
// headFieldCn: 'NIO编号',
|
||||||
headFieldEn: 'NiONumber',
|
// headFieldEn: 'NiONumber',
|
||||||
field: 'NiONumber',
|
// field: 'nioNumber',
|
||||||
key: 1,
|
// key: 1,
|
||||||
moduleFlag: '参数收集',
|
// moduleFlag: '参数收集',
|
||||||
status: 1
|
// status: 1
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '2',
|
// sort: '2',
|
||||||
disabled: true,
|
// disabled: true,
|
||||||
name: this.$t('ParameterName'),
|
// name: this.$t('ParameterName'),
|
||||||
headFieldCn: '参数名称',
|
// headFieldCn: '参数名称',
|
||||||
headFieldEn: 'Parameter Name',
|
// headFieldEn: 'Parameter Name',
|
||||||
field: 'ParameterName',
|
// field: 'paramsName',
|
||||||
key: 2,
|
// key: 2,
|
||||||
moduleFlag: '参数收集',
|
// moduleFlag: '参数收集',
|
||||||
status: 2
|
// status: 2
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '3',
|
||||||
name: this.$t('ParameterDescription'),
|
// name: this.$t('ParameterDescription'),
|
||||||
headFieldCn: '参数说明',
|
// headFieldCn: '参数说明',
|
||||||
headFieldEn: 'Parameter Description',
|
// headFieldEn: 'Parameter Description',
|
||||||
field: 'ParameterDescription',
|
// field: 'description',
|
||||||
key: 3,
|
// key: 3,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
name: this.$t('status'),
|
// name: this.$t('status'),
|
||||||
headFieldCn: '状态',
|
// headFieldCn: '状态',
|
||||||
headFieldEn: 'status',
|
// headFieldEn: 'status',
|
||||||
field: 'status',
|
// field: 'state',
|
||||||
key: 4,
|
// key: 4,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
name: this.$t('areaOfResponsibility'),
|
// name: this.$t('areaOfResponsibility'),
|
||||||
headFieldCn: '责任领域',
|
// headFieldCn: '责任领域',
|
||||||
headFieldEn: 'Responsible Field',
|
// headFieldEn: 'Responsible Field',
|
||||||
field: 'areaOfResponsibility',
|
// field: 'dutyTerritory',
|
||||||
key: 5,
|
// key: 5,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
name: this.$t('engineeringInterfacePerson'),
|
// name: this.$t('engineeringInterfacePerson'),
|
||||||
headFieldCn: '工程接口人',
|
// headFieldCn: '工程接口人',
|
||||||
headFieldEn: 'Eng. Interface',
|
// headFieldEn: 'Eng. Interface',
|
||||||
field: 'engineeringInterfacePerson',
|
// field: 'sdt',
|
||||||
key: 6,
|
// key: 6,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
name: this.$t('completedBy'),
|
// name: this.$t('completedBy'),
|
||||||
headFieldCn: '填写人',
|
// headFieldCn: '填写人',
|
||||||
headFieldEn: 'Filled by',
|
// headFieldEn: 'Filled by',
|
||||||
field: 'completedBy',
|
// field: 'dre',
|
||||||
key: 15,
|
// key: 15,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
name: this.$t('Deadline'),
|
// name: this.$t('Deadline'),
|
||||||
headFieldCn: '截止时间',
|
// headFieldCn: '截止时间',
|
||||||
headFieldEn: 'Due Date',
|
// headFieldEn: 'Due Date',
|
||||||
field: 'designDueDate',
|
// field: 'deadline',
|
||||||
key: 23,
|
// key: 23,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
name: this.$t('databasereportingtime'),
|
// name: this.$t('databasereportingtime'),
|
||||||
headFieldCn: '同步上报库时间',
|
// headFieldCn: '同步上报库时间',
|
||||||
headFieldEn: 'database reporting time',
|
// headFieldEn: 'database reporting time',
|
||||||
field: 'databasereportingtime',
|
// field: 'reportTime',
|
||||||
key: 23,
|
// key: 23,
|
||||||
moduleFlag: '参数收集'
|
// moduleFlag: '参数收集'
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
{
|
// {
|
||||||
sort: '',
|
// sort: '',
|
||||||
disabled: true,
|
// disabled: true,
|
||||||
name: this.$t('operation'),
|
// name: this.$t('operation'),
|
||||||
headFieldCn: '操作',
|
// headFieldCn: '操作',
|
||||||
headFieldEn: 'Operation',
|
// headFieldEn: 'Operation',
|
||||||
key: 35,
|
// key: 35,
|
||||||
field: 'operation',
|
// field: 'operation',
|
||||||
moduleFlag: '参数收集',
|
// moduleFlag: '参数收集',
|
||||||
status: 2
|
// status: 2
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
|
customizeList:[],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
textLoading: false,
|
textLoading: false,
|
||||||
formInline: {},
|
formInline: {},
|
||||||
@@ -932,6 +932,7 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.handleClick()
|
this.handleClick()
|
||||||
|
this.getcustomizeList()
|
||||||
window.addEventListener('keyup', this.handleKeyup)
|
window.addEventListener('keyup', this.handleKeyup)
|
||||||
window.addEventListener('click', this.handleClick)
|
window.addEventListener('click', this.handleClick)
|
||||||
this.GetgetLoginUserType()
|
this.GetgetLoginUserType()
|
||||||
@@ -1724,11 +1725,39 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onCheckAllChange(e) {
|
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.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : selectedValue
|
||||||
this.selectedValue = this.checkedList
|
this.selectedValue = this.checkedList
|
||||||
this.indeterminate = false
|
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() {
|
onChange() {
|
||||||
this.selectedValue = this.checkedList
|
this.selectedValue = this.checkedList
|
||||||
},
|
},
|
||||||
@@ -1746,7 +1775,7 @@
|
|||||||
uniqueArray.forEach(item => {
|
uniqueArray.forEach(item => {
|
||||||
this.customizeList.forEach((val, index) => {
|
this.customizeList.forEach((val, index) => {
|
||||||
if (item == val.field) {
|
if (item == val.field) {
|
||||||
val.sort = index + 1
|
// val.sort = index + 1
|
||||||
list.push(val)
|
list.push(val)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user