国内外政策-列表修改
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -64,9 +64,9 @@
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.issueTime }}</a>
|
||||
<a v-else-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.issueTime }}</a>
|
||||
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.issueTime }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ formatDate(scope.row.issueTime) }}</a>
|
||||
<a v-else-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ formatDate(scope.row.issueTime) }}</a>
|
||||
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ formatDate(scope.row.issueTime) }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -77,9 +77,9 @@
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.SSRQLAWS }}</a>
|
||||
<a v-else-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.SSRQLAWS }}</a>
|
||||
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.SSRQLAWS }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ formatDate(scope.row.SSRQLAWS) }}</a>
|
||||
<a v-else-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ formatDate(scope.row.SSRQLAWS) }}</a>
|
||||
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ formatDate(scope.row.SSRQLAWS) }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -89,9 +89,9 @@
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsSycx }}</a>
|
||||
<a v-else-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsSycx }}</a>
|
||||
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsSycx }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ convert(scope.row.lawsSycx, 'lawsSycxOptions') }}</a>
|
||||
<a v-else-if="scope.row.standStatusShow === '参考' " style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ convert(scope.row.lawsSycx, 'lawsSycxOptions') }}</a>
|
||||
<a v-else style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ convert(scope.row.lawsSycx, 'lawsSycxOptions') }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -238,7 +238,8 @@ export default {
|
||||
total: 0,
|
||||
loading: false,
|
||||
selectedList: [],
|
||||
formFieldListData: []
|
||||
formFieldListData: [],
|
||||
dict: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -254,7 +255,7 @@ export default {
|
||||
selectSarMenu: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectedList: {
|
||||
@@ -266,6 +267,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getBussionStandTable()
|
||||
this.getDicTypeListCode()
|
||||
},
|
||||
mounted() {
|
||||
// 加载动态表单数据
|
||||
@@ -653,6 +655,29 @@ export default {
|
||||
}
|
||||
}, e => {})
|
||||
},
|
||||
convert(value, dict) {
|
||||
if (this.dict[dict]) {
|
||||
return this.dict[dict].find(item => item.value === value)?.label || value
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
},
|
||||
formatDate (dateStr) {
|
||||
if (dateStr && dateStr!== '') {
|
||||
let dateArr = dateStr.split(',')
|
||||
return dateArr.map(date => date.slice(0,10)).join(',')
|
||||
}
|
||||
return dateStr
|
||||
},
|
||||
getDicTypeListCode () {
|
||||
this.$http.get('sys/dictype/getDicTypeListCode', '', {
|
||||
_this: this
|
||||
}, res => {
|
||||
// this.dict.lawsSycxOptions = res.data.lawsSycx// 政策_适用车型
|
||||
this.$set(this.dict, 'lawsSycxOptions', res.data.lawsSycx)
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user