Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-04-07 10:28:17 +08:00
2 changed files with 346 additions and 173 deletions
+174 -88
View File
@@ -780,6 +780,7 @@
flag: '7'
}
let paramscm = {
paramsManifestId: paramsManifestid,
moduleFlag:'参数项收集清单'
}
var jsonHead = []
@@ -787,98 +788,183 @@
if (res.success) {
if(res.result && res.result.length > 0){
jsonHead = res.result
this.columns = []
let num = 0
this.content = []
let checkedList = []
jsonHead.forEach((res, index) => {
// console.log(res)
// 配置列
checkedList.push(res.dataIndex)
if (res.type) {
// console.log('配置')
this.columns.push({
dataIndex: res.db_field_name,
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 600
})
num++
this.content.push(res)
this.columns[index].scopedSlots = {
customRender: 'detailClick',
title: 'titleName' + num
}
console.log( this.content," this.content this.content this.content this.content this.content")
// 非配置列
} else {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'left',
// ellipsis: true,
fixed: res.click5 ? 'left' : '',
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName'
}
if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 120
}
if (res.click1) {
this.columns[index].scopedSlots = {
customRender: 'operationzr'
}
}
if (res.click2) {
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
if (res.click3) {
this.columns[index].scopedSlots = {
customRender: 'paramsNameDescription'
}
}
if (res.click6) {
this.columns[index].scopedSlots = {
customRender: 'Operation'
}
}
if (res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
if (res.db_field_name == 'paramsName') {
this.columns[index].width = 300
this.columns[index].scopedSlots = {
customRender: 'paramsName'
}
}
}
if(res.isLock && res.isLock === '0'){
this.colIndexs.push(index)
}
})
this.columns = [...this.columns]
this.colIndexs.forEach((item)=>{
this.minWidthColumns.push([this.columns[item],500])
})
this.$emit('getcustomizeList',checkedList)
this.$forceUpdate()
}else{
getAction(this.url.tableHeader, params).then((val) => {
if (val.success) {
jsonHead = val.result
jsonHead = val.result
this.columns = []
let num = 0
this.content = []
let checkedList = []
jsonHead.forEach((res, index) => {
// console.log(res)
// 配置列
checkedList.push(res.dataIndex)
if (res.type) {
// console.log('配置')
this.columns.push({
dataIndex: res.db_field_name,
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 600
})
num++
this.content.push(res)
this.columns[index].scopedSlots = {
customRender: 'detailClick',
title: 'titleName' + num
}
console.log( this.content," this.content this.content this.content this.content this.content")
// 非配置列
} else {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'left',
// ellipsis: true,
fixed: res.click5 ? 'left' : '',
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName'
}
if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 120
}
if (res.click1) {
this.columns[index].scopedSlots = {
customRender: 'operationzr'
}
}
if (res.click2) {
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
if (res.click3) {
this.columns[index].scopedSlots = {
customRender: 'paramsNameDescription'
}
}
if (res.click6) {
this.columns[index].scopedSlots = {
customRender: 'Operation'
}
}
if (res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
if (res.db_field_name == 'paramsName') {
this.columns[index].width = 300
this.columns[index].scopedSlots = {
customRender: 'paramsName'
}
}
}
if(res.isLock && res.isLock === '0'){
this.colIndexs.push(index)
}
})
this.columns = [...this.columns]
this.colIndexs.forEach((item)=>{
this.minWidthColumns.push([this.columns[item],500])
})
this.$emit('getcustomizeList',checkedList)
this.$forceUpdate()
}
})
}
this.columns = []
let num = 0
this.content = []
let checkedList = []
jsonHead.forEach((res, index) => {
// console.log(res)
// 配置列
checkedList.push(res.dataIndex)
if (res.type) {
// console.log('配置')
this.columns.push({
dataIndex: res.db_field_name,
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 600
})
num++
this.content.push(res)
this.columns[index].scopedSlots = {
customRender: 'detailClick',
title: 'titleName' + num
}
console.log( this.content," this.content this.content this.content this.content this.content")
// 非配置列
} else {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'left',
// ellipsis: true,
fixed: res.click5 ? 'left' : '',
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName'
}
if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 120
}
if (res.click1) {
this.columns[index].scopedSlots = {
customRender: 'operationzr'
}
}
if (res.click2) {
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
if (res.click3) {
this.columns[index].scopedSlots = {
customRender: 'paramsNameDescription'
}
}
if (res.click6) {
this.columns[index].scopedSlots = {
customRender: 'Operation'
}
}
if (res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
if (res.db_field_name == 'paramsName') {
this.columns[index].width = 300
this.columns[index].scopedSlots = {
customRender: 'paramsName'
}
}
}
if(res.isLock && res.isLock === '0'){
this.colIndexs.push(index)
}
})
this.columns = [...this.columns]
this.colIndexs.forEach((item)=>{
this.minWidthColumns.push([this.columns[item],500])
})
this.$emit('getcustomizeList',checkedList)
this.$forceUpdate()
}
})
},
@@ -1043,8 +1129,8 @@
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) => {
console.log(item)
console.log(this.currentPersonRole)
// console.log(item)
// console.log(this.currentPersonRole)
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
itemLi.isLock = 0
}else{
@@ -573,101 +573,188 @@
paramsManifestId: paramsManifestid,
flag: '8'
}
let paramscm = {
paramsManifestId: paramsManifestid,
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
this.columns = []
let num = 0
this.content = []
let checkedList = []
jsonHead.forEach((res, index) => {
checkedList.push(res.dataIndex)
// 配置列
if (res.type) {
this.columns.push({
dataIndex: res.db_field_name,
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 500
})
num++
this.content.push(res)
this.columns[index].scopedSlots = {
customRender: 'detailClick',
title: 'titleName' + num
}
// 非配置列
} else {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'left',
// ellipsis: true,
fixed: res.fixedLeft ? 'left' : '',
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName'
}
if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 120
}
if (res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
if (res.click2) {
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
if (res.click3) {
this.columns[index].scopedSlots = {
customRender: 'RemarkDescription'
}
}
if (res.click4) {
this.columns[index].scopedSlots = {
customRender: 'Operation'
}
}
if (res.db_field_name == 'paramsName') {
this.columns[index].width = 300
this.columns[index].ellipsis = false
this.columns[index].scopedSlots = {
customRender: 'paramsName'
}
}
}
if(res.type){
this.colIndexs.push(index)
}
})
this.isTrue = false
setTimeout(()=>{
this.isTrue = true
this.columns = [...this.columns]
this.colIndexs.forEach((item)=>{
this.minWidthColumns.push([this.columns[item],500])
this.$emit('getcustomizeList',checkedList)
})
},300)
console.log(this.columns)
}else{
getAction(this.url.tableHeader, params).then((val) => {
if (val.success) {
jsonHead = val.result
}
})
}
this.columns = []
let num = 0
this.content = []
let checkedList = []
jsonHead.forEach((res, index) => {
checkedList.push(res.dataIndex)
// 配置列
if (res.type) {
this.columns.push({
dataIndex: res.db_field_name,
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 500
})
num++
this.content.push(res)
this.columns[index].scopedSlots = {
customRender: 'detailClick',
title: 'titleName' + num
}
// 非配置列
} else {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'left',
// ellipsis: true,
fixed: res.fixedLeft ? 'left' : '',
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName'
}
if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 120
}
if (res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
if (res.click2) {
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
if (res.click3) {
this.columns[index].scopedSlots = {
customRender: 'RemarkDescription'
}
}
if (res.click4) {
this.columns[index].scopedSlots = {
customRender: 'Operation'
}
}
if (res.db_field_name == 'paramsName') {
this.columns[index].width = 300
this.columns[index].ellipsis = false
this.columns[index].scopedSlots = {
customRender: 'paramsName'
}
}
}
this.columns = []
let num = 0
this.content = []
let checkedList = []
jsonHead.forEach((res, index) => {
checkedList.push(res.dataIndex)
// 配置列
if (res.type) {
this.columns.push({
dataIndex: res.db_field_name,
align: 'left',
ellipsis: true,
sorter: res.sort,
width: 500
})
num++
this.content.push(res)
this.columns[index].scopedSlots = {
customRender: 'detailClick',
title: 'titleName' + num
}
// 非配置列
} else {
this.columns.push({
title: res.db_field_txt,
dataIndex: res.db_field_name,
align: 'left',
// ellipsis: true,
fixed: res.fixedLeft ? 'left' : '',
sorter: res.sort,
width: 160
})
this.columns[index].scopedSlots = {
customRender: 'titleName'
}
if (res.db_field_name == 'nioNumber') {
this.columns[index].width = 120
}
if (res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
if (res.click2) {
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
if (res.click3) {
this.columns[index].scopedSlots = {
customRender: 'RemarkDescription'
}
}
if (res.click4) {
this.columns[index].scopedSlots = {
customRender: 'Operation'
}
}
if (res.db_field_name == 'paramsName') {
this.columns[index].width = 300
this.columns[index].ellipsis = false
this.columns[index].scopedSlots = {
customRender: 'paramsName'
}
}
}
if(res.type){
this.colIndexs.push(index)
}
})
if(res.type){
this.colIndexs.push(index)
}
})
this.isTrue = false
setTimeout(()=>{
this.isTrue = true
this.columns = [...this.columns]
this.colIndexs.forEach((item)=>{
this.minWidthColumns.push([this.columns[item],500])
this.$emit('getcustomizeList',checkedList)
})
},300)
console.log(this.columns)
this.isTrue = false
setTimeout(()=>{
this.isTrue = true
this.columns = [...this.columns]
this.colIndexs.forEach((item)=>{
this.minWidthColumns.push([this.columns[item],500])
this.$emit('getcustomizeList',checkedList)
})
},300)
console.log(this.columns)
}
})
}
}
})
},