国内外政策-列表修改

This commit is contained in:
zyn
2023-09-21 10:58:52 +08:00
parent 6ff1ae6e15
commit c4bc87705c
2 changed files with 64 additions and 29 deletions
@@ -347,7 +347,7 @@
v-model="sarLawsStandEO['TGDWLAWS']"
placeholder="选择投稿单位"
readonly
@click.native="choiceZRBM('dep', '选择投稿单位', sarLawsStandEO.TGDWLAWSId)">
@click.native="choiceZRBM('dep', '选择投稿单位', sarLawsStandEO.TGDWLAWSID)">
</el-input>
</el-form-item>
<el-form-item v-if="field.attrField === 'ZRBMLAWS'"
@@ -362,7 +362,7 @@
v-model="sarLawsStandEO['ZRBMLAWS']"
placeholder="选择责任部门"
readonly
@click.native="choiceZRBM('dep', '选择责任部门', sarLawsStandEO.ZRBMLAWSId)">
@click.native="choiceZRBM('dep', '选择责任部门', sarLawsStandEO.ZRBMLAWSID)">
</el-input>
</el-form-item>
</template>
@@ -1066,14 +1066,27 @@ export default {
if(res.data){
const item = res.data || {}
this.sarLawsStandEO = JSON.parse(JSON.stringify(item))
this.sarLawsStandEO['lawsSyqy'] = this.filterObj(this.sarLawsStandEO['lawsSyqy'])
Object.keys(item.attrInfoMap || {}).forEach((key) => {
if (item.attrInfoMap[key]) {
this.$set(this.sarLawsStandEO, key, item.attrInfoMap[key])
}
})
// 适用区域
// this.sarLawsStandEO['lawsSyqy'] = this.filterObj(this.sarLawsStandEO['lawsSyqy'])
// 适用车型
this.sarLawsStandEO['lawsSycx'] = this.filterObj(this.sarLawsStandEO['lawsSycx'])
// 标签
this.sarLawsStandEO['lawsLabel'] = this.filterObj(this.sarLawsStandEO['lawsLabel'])
this.sarLawsStandEO['YYRZLAWS'] = this.filterObj(this.sarLawsStandEO['YYRZLAWS'])
this.sarLawsStandEO['NYLXLAWS'] = this.filterObj(this.sarLawsStandEO['NYLXLAWS'])
this.sarLawsStandEO['TGRLAWS'] = this.filterObj(this.sarLawsStandEO['TGRLAWS'])
this.sarLawsStandEO['ZRBMLAWS'] = this.filterObj(this.sarLawsStandEO['ZRBMLAWS'])
// this.sarLawsStandEO['YYRZLAWS'] = this.filterObj(this.sarLawsStandEO['YYRZLAWS'])
// this.sarLawsStandEO['NYLXLAWS'] = this.filterObj(this.sarLawsStandEO['NYLXLAWS'])
//投稿人
// this.sarLawsStandEO['TGRLAWS'] = this.filterObj(this.sarLawsStandEO['TGRLAWS'])
// 投稿单位
this.sarLawsStandEO['TGDWLAWS'] = this.filterObj(this.sarLawsStandEO['TGDWLAWS'])
this.sarLawsStandEO['TGDWLAWSID'] = this.filterObj(this.sarLawsStandEO['TGDWLAWSID'])
// 责任部门
this.sarLawsStandEO['ZRBMLAWS'] = this.filterObj(this.sarLawsStandEO['ZRBMLAWS'])
this.sarLawsStandEO['ZRBMLAWSID'] = this.filterObj(this.sarLawsStandEO['ZRBMLAWSID'])
const dateArr = []
if(this.sarLawsStandEO.commentCycleStart && this.sarLawsStandEO.commentCycleEnd){
dateArr[0] = this.sarLawsStandEO.commentCycleStart
@@ -1081,20 +1094,14 @@ export default {
this.commentCycleDate2 = dateArr
}
this.sarLawsStandEO["XCSJBUSS"] = this.dateFormatter()
let subClass = item.standSubclass
this.sarLawsStandEO.standSubclass = subClass
// let subClass = item.standSubclass
// this.sarLawsStandEO.standSubclass = subClass
if (this.sarLawsStandEO.issueTime != null && this.sarLawsStandEO.issueTime !== '') {
this.sarLawsStandEO.issueTime = new Date(this.sarLawsStandEO.issueTime)
}
if (this.sarLawsStandEO.putTime != null && this.sarLawsStandEO.putTime !== '') {
this.sarLawsStandEO.putTime = new Date(this.sarLawsStandEO.putTime)
}
Object.keys(item.attrInfoMap || {}).forEach((key) => {
if (item.attrInfoMap[key]) {
// this.sarStandardsInfoEO[key] = item.attrInfoMap[key]
this.$set(this.sarLawsStandEO, key, item.attrInfoMap[key])
}
})
this.sarLawsStandEO['id'] = item.id
this.drawerTitle = '修改政策标准'
this.modalshowflag = true
@@ -1488,6 +1495,7 @@ export default {
console.log("-----------------------------")
console.log(attrField)
},
// 字符串转数组
filterObj(obj){
if(obj && obj !== ''){
if(obj instanceof Array){
@@ -1628,6 +1636,8 @@ export default {
})
},
choice(type, title, nameId) {
console.log(nameId)
// 管理员(admin),张兰英(zhanglanying) => ['admin', 'zhanglanying']
this.nodeList = []
if (nameId) {
let nameId1 = nameId.split(',')
@@ -1674,7 +1684,7 @@ export default {
}
this.$set(this.sarLawsStandEO, field, nameList)
if (this.choiceTitle === '选择投稿人') {
this.sarLawsStandEO.TGDWLAWSId = this.unique(data.map(item => item.topUnitId)).join(",")
this.sarLawsStandEO.TGDWLAWSID = this.unique(data.map(item => item.topUnitId)).join(",")
this.sarLawsStandEO.TGDWLAWS = this.unique(data.map(item => item.topUnit)).join(",")
}
},
@@ -1697,12 +1707,12 @@ export default {
let id = ''
switch (this.choiceTitle) {
case '选择投稿单位':
id = 'TGDWLAWSId'
id = 'TGDWLAWSID'
field = 'TGDWLAWS'
break
case '选择责任部门':
field = 'ZRBMLAWS'
id = 'ZRBMLAWSId'
id = 'ZRBMLAWSID'
break
}
this.sarLawsStandEO[id] = idList;