feat: There is no way the, bug xx

This commit is contained in:
super_liu
2022-04-04 20:46:14 +08:00
parent 3d4d1ddc52
commit ec401d0c19
3 changed files with 127 additions and 83 deletions
@@ -40,27 +40,26 @@
<template v-if = "item.label === '基础信息'">
<div class="details-content-modular basic-information" style="margin-bottom: 0;border: none">
<div class="basic-information-content">
<p style="color: #C42626;" class="half"><label style=" margin-right: 157px;">政策编号</label><span>{{ sarStandardsInfoEO.lawsNumber }}</span></p>
<p style="" class="half"><label style=" margin-right: 157px;">政策编号</label><span>{{ sarStandardsInfoEO.lawsNumber }}</span></p>
<p class="half"><label style=" margin-right: 157px;">政策文号</label><span>{{ sarStandardsInfoEO.lawsNo || '-' }}</span></p>
<p><label style=" margin-right: 157px;">中文名称</label><span>{{ sarStandardsInfoEO.lawsName || '-' }}</span></p>
<p v-if="activeState" style=""><label style=" margin-right: 157px;">英文名称</label><span>{{ sarStandardsInfoEO.lawsEnName || '-' }}</span></p>
<p class="half"><label style=" margin-right: 157px;">发文日期</label><span>{{ sarStandardsInfoEO.issueTime || '-' }}</span></p>
<p class="half"><label style=" margin-right: 157px;">发文单位</label><span>{{ sarStandardsInfoEO.issueCompany || '-' }}</span></p>
<p class="half"><label style=" margin-right: 157px;">发文单位</label><span>{{ sarStandardsInfoEO.issueCompany || '-' }}</span></p>
<p class="half"><label style=" margin-right: 120px;">征集意见周期</label><span>{{ sarStandardsInfoEO.commentCycleStart || '' }} - {{sarStandardsInfoEO.commentCycleEnd || ''}}</span></p>
<p class="half"><label style=" margin-right: 125px;">征集意见周期</label><span>{{ formatDateFunc(sarStandardsInfoEO.commentCycleStart) || '' }} - {{formatDateFunc(sarStandardsInfoEO.commentCycleEnd) || ''}}</span></p>
<p class="half">
<label style=" margin-right: 156px;"
title="“修订中”为现行有效版本;“已修订”标准的有效性需根据实际实施情况判定"
>文本状态</label><span style="color: #409EFF;">{{ sarStandardsInfoEO.standStatusShow || '-' }}</span>
title=""
>文本状态</label><span style="">{{ sarStandardsInfoEO.standStatusShow || '-' }}</span>
</p>
<p class="half"><label style=" margin-right: 157px;">信息简报</label><span>{{ sarStandardsInfoEO.lawsBulletin || '-' }}</span></p>
<p class="half"><label style=" margin-right: 157px;">适用区域</label><span>{{ sarStandardsInfoEO.lawsSyqy || '-' }}</span></p>
<p class="half"><label style=" margin-right: 157px;">适用车型</label><span>{{ sarStandardsInfoEO.lawsSycx || '-' }}</span></p>
<p class="half"><label style=" margin-right: 97px;">是否纳入认证清单</label><span>{{ sarStandardsInfoEO.isRelateAccess === '1' ? '是' : (sarStandardsInfoEO.isRelateAccess ? '否':'-')}}</span></p>
<p class="half"><label style=" margin-right: 97px;">福田转发通知文号</label><span>{{ sarStandardsInfoEO.lawsNotisyncNum || '-' }}</span></p>
<p class="half"><label style=" margin-right: 192px;">年度</label><span>{{ sarStandardsInfoEO.lawsYear || '-' }}</span></p>
<p class="half"><label style=" margin-right: 192px;">标签</label><span>{{ sarStandardsInfoEO.lawsLabel || '-' }}</span></p>
<p class="half"><label style=" margin-right: 192px;">备注</label><span>{{ sarStandardsInfoEO.lawsRemark || '-' }}</span></p>
<p class="half"><label style=" margin-right: 95px;">是否纳入认证清单</label><span>{{ sarStandardsInfoEO.isRelateAccess === '1' ? '是' : (sarStandardsInfoEO.isRelateAccess ? '否':'-')}}</span></p>
<p class="half"><label style=" margin-right: 95px;">福田转发通知文号</label><span>{{ sarStandardsInfoEO.lawsNotisyncNum || '-' }}</span></p>
<p class="half"><label style=" margin-right: 190px;">年度</label><span>{{ sarStandardsInfoEO.lawsYear || '-' }}</span></p>
<p class="half"><label style=" margin-right: 190px;">标签</label><span>{{ sarStandardsInfoEO.lawsLabel || '-' }}</span></p>
<p class="half"><label style=" margin-right: 190px;">备注</label><span>{{ sarStandardsInfoEO.lawsRemark || '-' }}</span></p>
<template v-for="(child, childIndex) in item.child2">
<p class="half">
<label style=" margin-right: 156px;">{{child.attrName}}</label>
@@ -1119,6 +1118,13 @@ export default {
watch: {
},
methods: {
formatDateFunc(date){
let result = ""
if(date){
result = this.$moment(date).format('YYYY-MM-DD')
}
return result
},
handleChange(val) {
console.log(val)
},
@@ -2392,7 +2398,7 @@ export default {
min-height: 50px;
line-height: 50px;
font-size: 16px;
color: #999999;
/*color: #999999;*/
word-break: break-all;
//overflow: hidden;
//white-space: nowrap;
@@ -1068,6 +1068,10 @@
this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion
const json = JSON.stringify(this.form);
if(this.commentCycleDate && this.commentCycleDate.length > 0){
json.commentCycleStart = this.commentCycleDate[0]
json.commentCycleEnd = this.commentCycleDate[1]
}
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
@@ -417,14 +417,14 @@
placeholder="请输入发文单位"
clearable></el-input>
</el-form-item>
<el-form-item label="征集意见周期" prop="commentCycleDate" label-width="150px" class="add-form-item">
<el-form-item label="征集意见周期" prop="commentCycleDate2" label-width="150px" class="add-form-item">
<el-date-picker
v-model="sarLawsStandEO.commentCycleDate"
type="datetimerange"
v-model="commentCycleDate2"
:picker-options="pickerOptions"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
start-placeholder="起始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd"
align="right">
</el-date-picker>
@@ -1030,11 +1030,11 @@
<el-form-item label="征集意见周期" title="征集意见周期" class="add-form-item form-item-disabled">
<el-date-picker
v-model="commentCycleDate"
type="datetimerange"
:picker-options="pickerOptions"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
start-placeholder="起始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd"
align="right">
</el-date-picker>
@@ -1921,6 +1921,7 @@
goSearch: '',
SarExportSearchEo: {},
commentCycleDate:'',
commentCycleDate2:'',
lawsStandInfoSearch: {
orgName: '', // 部门名称
page: 1,
@@ -2855,77 +2856,102 @@
})
window.open(routeUrl.href, '_blank')
},
filterObj(obj){
if(obj && obj !== ''){
if(obj instanceof Array){
return obj;
}else {
return obj.split(",")
}
}
return "";
},
// 编辑
selectStandardPro (row, state) {
this.$http.get('lawss/sarLawsInfo/getStandInfoUpdateById', {id: row.id}, {
_this: this
}, res => {
const item = res.data || {}
this.sarLawsStandEO = JSON.parse(JSON.stringify(item))
console.log(this.sarLawsStandEO)
this.sarLawsStandEO["XCSJBUSS"] = this.dateFormatter()
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
this.resolveFormFieldList(true)
this.$nextTick(() => {
Promise.all([this.queryDisplayLocation()]).then((values) => {
const [displayLocation] = values
const dynamicFormField = this.sarLawsStandEO
const formFieldList = this.formFieldList
formFieldList.forEach((field) => {
displayLocation.forEach((location) => {
let value = dynamicFormField[field.attrField]
let valueName = ''
if (value && typeof value === 'number') {
value = this.$dateFormat(value, 'yyyy-MM-dd')
if(res.data){
const item = res.data || {}
this.sarLawsStandEO = JSON.parse(JSON.stringify(item))
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['TGDWLAWS'] = this.filterObj(this.sarLawsStandEO['TGDWLAWS'])
const dateArr = []
if(this.sarLawsStandEO.commentCycleStart && this.sarLawsStandEO.commentCycleEnd){
dateArr[0] = this.sarLawsStandEO.commentCycleStart
dateArr[1] = this.sarLawsStandEO.commentCycleEnd
this.commentCycleDate2 = dateArr
}
this.sarLawsStandEO["XCSJBUSS"] = this.dateFormatter()
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])
}
field['value'] = value
// 追加用户名称和部门名称
if (field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS') {
let attrFieldName = field.attrField + 'Name'
valueName = dynamicFormField[attrFieldName]
}
field['valueName'] = valueName
if (field.showRegionId === location.value) {
if (!location.child) {
location['child'] = []
}
location['child'].push(field)
}
})
})
this.dynamicFormField = displayLocation
this.loading = false
})
if (state === 'show') {
this.formdisableflag = true
} else {
// this.standGeneraSelectChange() // 负责细类初始化
// this.getOrgTreeSource()
this.addOrUPdateFlag = 2
this.formdisableflag = false
this.saveOldNum = item.standCode // 记录修改之前的标准编号
this.saveOldReplaceNum = item.replaceStandNum // 记录修改之前的代替标准编号
// let selectNode = this.getTreeNameByid(this.sarLawsStandEO.responsibleUnit)
this.sarLawsStandEO.orgName = item.responsibleUnitShow
}
})
console.log(this.sarLawsStandEO)
this.sarLawsStandEO['id'] = item.id
this.drawerTitle = '修改政策标准'
this.modalshowflag = true
this.resolveFormFieldList(true)
this.$nextTick(() => {
Promise.all([this.queryDisplayLocation()]).then((values) => {
const [displayLocation] = values
const dynamicFormField = this.sarLawsStandEO
const formFieldList = this.formFieldList
formFieldList.forEach((field) => {
displayLocation.forEach((location) => {
let value = dynamicFormField[field.attrField]
let valueName = ''
if (value && typeof value === 'number') {
value = this.$dateFormat(value, 'yyyy-MM-dd')
}
field['value'] = value
// 追加用户名称和部门名称
if (field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS') {
let attrFieldName = field.attrField + 'Name'
valueName = dynamicFormField[attrFieldName]
}
field['valueName'] = valueName
if (field.showRegionId === location.value) {
if (!location.child) {
location['child'] = []
}
location['child'].push(field)
}
})
})
this.dynamicFormField = displayLocation
this.loading = false
})
if (state === 'show') {
this.formdisableflag = true
} else {
// this.standGeneraSelectChange() // 负责细类初始化
// this.getOrgTreeSource()
this.addOrUPdateFlag = 2
this.formdisableflag = false
this.saveOldNum = item.standCode // 记录修改之前的标准编号
this.saveOldReplaceNum = item.replaceStandNum // 记录修改之前的代替标准编号
// let selectNode = this.getTreeNameByid(this.sarLawsStandEO.responsibleUnit)
this.sarLawsStandEO.orgName = item.responsibleUnitShow
}
})
this.$forceUpdate()
}
})
},
// 部门树结构,通过id,查出对应的树节点
@@ -3024,6 +3050,10 @@
}else {
nowstandinfo["lawsLabel"] = "";
}
if(this.commentCycleDate2 && this.commentCycleDate2.length > 0){
nowstandinfo.commentCycleStart = this.commentCycleDate2[0]
nowstandinfo.commentCycleEnd = this.commentCycleDate2[1]
}
this.$http.postData('lawss/sarLawsInfo/updateSarLawsStandInfo', nowstandinfo, {
_this: this,
loading: 'isSubmit'
@@ -3061,6 +3091,10 @@
}else {
nowstandinfo["lawsLabel"] = "";
}
if(this.commentCycleDate2 && this.commentCycleDate2.length > 0){
nowstandinfo.commentCycleStart = this.commentCycleDate2[0]
nowstandinfo.commentCycleEnd = this.commentCycleDate2[1]
}
this.$http.postData('lawss/sarLawsInfo/updateSarLawsStandInfo', nowstandinfo, {
_this: this,
loading: 'isSubmit'