修改项目库参数收集责任领域

This commit is contained in:
范强强
2023-08-04 09:34:34 +08:00
parent f19f387c90
commit ad5606699c
@@ -75,7 +75,7 @@
</span>
<span slot="detailClick" slot-scope="text,record">
<collection-type :detailDate='text' :recordList = 'record' :columName='content'
<collection-type :detailDate='text' :recordList='record' :columName='content'
:currentPersonRole="currentPersonRole"
@consolidateData="consolidateData"
@collectionForm='collectionForm'/>
@@ -184,28 +184,28 @@
@cancel="handleCancel"
>
<historyTable :columnshistory='columnshistory' :dataSourcehistory='dataSourcehistory'></historyTable>
<!-- <a-table-->
<!-- class="table"-->
<!-- :columns="columnshistory"-->
<!-- :pagination="false"-->
<!-- :scroll="{y: 400}"-->
<!-- :data-source="dataSourcehistory"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <span slot="content" slot-scope="text,record">-->
<!-- <a-tooltip placement="topLeft">-->
<!-- <template slot="title">-->
<!-- <span v-html="text"></span>-->
<!-- </template>-->
<!-- <span v-html="text"></span>-->
<!-- </a-tooltip>-->
<!-- </span>-->
<!-- <span slot="detailText" slot-scope="text,record">-->
<!-- <span class="text" :title="text">-->
<!-- {{text && text.length > 10?text.slice(0,9)+'...':text}}-->
<!-- </span>-->
<!-- </span>-->
<!-- </a-table>-->
<!-- <a-table-->
<!-- class="table"-->
<!-- :columns="columnshistory"-->
<!-- :pagination="false"-->
<!-- :scroll="{y: 400}"-->
<!-- :data-source="dataSourcehistory"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <span slot="content" slot-scope="text,record">-->
<!-- <a-tooltip placement="topLeft">-->
<!-- <template slot="title">-->
<!-- <span v-html="text"></span>-->
<!-- </template>-->
<!-- <span v-html="text"></span>-->
<!-- </a-tooltip>-->
<!-- </span>-->
<!-- <span slot="detailText" slot-scope="text,record">-->
<!-- <span class="text" :title="text">-->
<!-- {{text && text.length > 10?text.slice(0,9)+'...':text}}-->
<!-- </span>-->
<!-- </span>-->
<!-- </a-table>-->
<div class="page" v-if="dataSourcehistory.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
@@ -283,7 +283,7 @@
export default {
name: 'index',
mixins:[ResizeHeader, ResizeColumnProvide],
mixins: [ResizeHeader, ResizeColumnProvide],
props: {
//接口
url: {
@@ -355,8 +355,8 @@
// }
// }
return {
colIndexs:[],
minWidthColumns:[],
colIndexs: [],
minWidthColumns: [],
token: Vue.ls.get(ACCESS_TOKEN),
jsonBody: [],
checkboxList: [],
@@ -417,7 +417,7 @@
seeVisibleView: false,
visible: false,
configDetail: {}, // 查看配置得详细信息
dataSourcehistory:[],
dataSourcehistory: [],
columnshistory: [
{
title: this.$t('OperationDetails'),
@@ -491,9 +491,9 @@
this.areaVisibleView = true
let url = ''
if (this.$route.query.it === undefined) {
if(val.db_field_name == 'referencesCol') {
if (val.db_field_name == 'referencesCol') {
url = `/jero-boot/params/report/queryParamsReportConfigById?id=${val.db_field_id}`
}else{
} else {
url = `/jero-boot/params/config/getById?id=${val.db_field_name}`
}
} else {
@@ -534,7 +534,7 @@
this.getquerySdtId = record.id
getAction(this.url.getquerySdtList, {
projectId: this.$route.query.projectId,
projectVersion:this.$route.query.projectVersion,
projectVersion: this.$route.query.projectVersion,
dutyTerritory: record.dutyTerritory
}).then((res) => {
if (res.success) {
@@ -708,9 +708,9 @@
getAction('paramsCollectManifestLog/paramsCollectManifestLogEO/page', query).then((res) => {
if (res.success) {
this.dataSourcehistory = res.result.records
if(this.dataSourcehistory && this.dataSourcehistory.length > 0){
this.dataSourcehistory.forEach(val=>{
val.logContent = val.logContent.replace(/\"/g,"<span class='textData'>\"</span>")
if (this.dataSourcehistory && this.dataSourcehistory.length > 0) {
this.dataSourcehistory.forEach(val => {
val.logContent = val.logContent.replace(/\"/g, '<span class=\'textData\'>"</span>')
})
}
this.total = res.result.total
@@ -728,11 +728,11 @@
this.pageNohistory = 1
this.visible = false
},
collectionForm(){
collectionForm() {
this.getTableList()
},
consolidateData(){
this.dataSource = [...this.dataSource]
consolidateData() {
this.dataSource = [...this.dataSource]
console.log(this.dataSource)
},
getAndUserId(result) {
@@ -776,18 +776,18 @@
}
let params = {
paramsManifestId: paramsManifestid,
projectName:this.$route.query.projectName,
projectName: this.$route.query.projectName,
flag: '7'
}
let paramscm = {
paramsManifestId: paramsManifestid,
moduleFlag:'参数项收集清单',
moduleFlag: '参数项收集清单',
flag: this.$route.query.it === undefined ? '' : '7'
}
var jsonHead = []
getAction(url, paramscm).then((res) => {
if (res.success) {
if(res.result && res.result.length > 0){
if (res.result && res.result.length > 0) {
jsonHead = res.result
this.columns = []
let num = 0
@@ -812,7 +812,7 @@
customRender: 'detailClick',
title: 'titleName' + num
}
console.log( this.content," this.content this.content this.content this.content this.content")
console.log(this.content, ' this.content this.content this.content this.content this.content')
// 非配置列
} else {
this.columns.push({
@@ -873,17 +873,17 @@
}
}
if(res.isLock && res.isLock === '0'){
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.colIndexs.forEach((item) => {
this.minWidthColumns.push([this.columns[item], 500])
})
this.$emit('getcustomizeList',checkedList)
this.$emit('getcustomizeList', checkedList)
this.$forceUpdate()
}else{
} else {
getAction(this.url.tableHeader, params).then((val) => {
if (val.success) {
jsonHead = val.result
@@ -894,7 +894,7 @@
jsonHead.forEach((res, index) => {
// console.log(res)
// 配置列
if(res.headFieldCn == '操作'){
if (res.headFieldCn == '操作') {
res.field = 'operation'
}
checkedList.push(res.field)
@@ -913,7 +913,7 @@
customRender: 'detailClick',
title: 'titleName' + num
}
console.log( this.content," this.content this.content this.content this.content this.content")
console.log(this.content, ' this.content this.content this.content this.content this.content')
// 非配置列
} else {
this.columns.push({
@@ -965,15 +965,15 @@
}
}
if(res.isLock && res.isLock === '0'){
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.colIndexs.forEach((item) => {
this.minWidthColumns.push([this.columns[item], 500])
})
this.$emit('getcustomizeList',checkedList)
this.$emit('getcustomizeList', checkedList)
this.$forceUpdate()
}
})
@@ -1016,9 +1016,8 @@
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
for (const key in Obj[item].paramsConfigData){
Obj[item].paramsConfigData[key].forEach((itemLi) =>
{
for (const key in Obj[item].paramsConfigData) {
Obj[item].paramsConfigData[key].forEach((itemLi) => {
itemLi.isLock = 1
if (itemLi.type === 'pull_more') {
@@ -1040,12 +1039,12 @@
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
for (const key in Obj[item].paramsConfigData){
for (const key in Obj[item].paramsConfigData) {
Obj[item].paramsConfigData[key].forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',')
}
if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library'){
if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library') {
Obj[item].referencesColFlag = '1'
itemLi.isLock = '1'
}
@@ -1078,11 +1077,11 @@
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'nioNumber'){
if (sorter.columnKey == 'nioNumber') {
sorter.columnKey = 'nio_number'
}else if (sorter.columnKey == 'dutyTerritory'){
} else if (sorter.columnKey == 'dutyTerritory') {
sorter.columnKey = 'duty_territory'
}else if (sorter.columnKey == 'reportTime'){
} else if (sorter.columnKey == 'reportTime') {
sorter.columnKey = 'report_time'
}
this.orderByField = sorter.columnKey
@@ -1103,6 +1102,12 @@
paramsManifestid = this.$route.query.it
url = 'params/collectManifestHistory/list'
}
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
@@ -1110,7 +1115,7 @@
paramsManifestId: paramsManifestid,
orderBy: this.orderBy,
orderByField: this.orderByField,
...this.formInline,
...formInline,
...currentPersonRole,
...this.queryParamQuery
}
@@ -1140,13 +1145,13 @@
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
for (const key in Obj[item].paramsConfigData){
for (const key in Obj[item].paramsConfigData) {
Obj[item].paramsConfigData[key].forEach((itemLi) => {
// console.log(item)
// console.log(this.currentPersonRole)
if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){
if ((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol') {
itemLi.isLock = 0
}else{
} else {
itemLi.isLock = 1
}
if (itemLi.type === 'pull_more') {
@@ -1174,12 +1179,12 @@
res.result.records.forEach((Obj) => {
Object.keys(Obj).forEach((item) => {
if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) {
for (const key in Obj[item].paramsConfigData){
for (const key in Obj[item].paramsConfigData) {
Obj[item].paramsConfigData[key].forEach((itemLi) => {
if (itemLi.type === 'pull_more') {
itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',')
}
if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library'){
if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library') {
itemLi.isLock = '1'
Obj[item].referencesColFlag = '1'
}
@@ -1244,17 +1249,20 @@
.table .ant-table-column-title {
font-weight: bold;
}
.textData{
font-family:cursive;
.textData {
font-family: cursive;
}
</style>
<style scoped lang="less">
@import'~@assets/less/common.less';
@import '~@assets/less/common.less';
.box {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
}
.text {
margin-right: 10px;
}
@@ -1355,7 +1363,7 @@
word-break: break-all
}
::v-deep .ant-table-placeholder{
::v-deep .ant-table-placeholder {
margin-top: 8px !important;
}
</style>