清单编辑日期问题

This commit is contained in:
宋伟佳
2021-12-23 15:02:21 +08:00
parent 21e70e2d06
commit 2c2e9a32bb
7 changed files with 244 additions and 165 deletions
@@ -1287,35 +1287,66 @@ export default {
this.fileInfoList = []
}
this.ListModel = false;
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById",
{ id: this.selectedList[0].id, page: this.page, Size: this.pageSize }, {
_this: this
}, res => {
if (res.data === null) {
this.dataList = [];
}
this.dataList = res.data.records;
this.dataList.forEach(item => {
if(item.xcxssrqgj === 'undefined' ||item.xcxssrqgj === '-' || item.xcxssrqgj === 'null'){
item.xcxssrqgj = ''
}else{
this.$set(item, "XCXSSRQ", item.xcxssrqgj)
}
if(item.zccssrqgj === 'undefined' || item.zccssrqgj === '-'|| item.zccssrqgj === 'null'){
item.zccssrqgj = ''
}else{
this.$set(item, "ZCCSSRQ", item.zccssrqgj)
}
})
this.listForm.dataList = this.dataList;
let formId = [];
this.dataList.map(item => {
formId.push(item.id);
//如果是国家地区清单传入types字段对日期进行区分
if(this.listType === 'country'){
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById",
{ id: this.selectedList[0].id, types: '1', page: this.page, Size: this.pageSize }, {
_this: this
}, res => {
if (res.data === null) {
this.dataList = [];
}
this.dataList = res.data.records;
this.dataList.forEach(item => {
if(item.xcxssrqgj === 'undefined' ||item.xcxssrqgj === '-' || item.xcxssrqgj === 'null'){
item.xcxssrqgj = ''
}else{
this.$set(item, "XCXSSRQ", item.xcxssrqgj)
}
if(item.zccssrqgj === 'undefined' || item.zccssrqgj === '-'|| item.zccssrqgj === 'null'){
item.zccssrqgj = ''
}else{
this.$set(item, "ZCCSSRQ", item.zccssrqgj)
}
})
this.listForm.dataList = this.dataList;
let formId = [];
this.dataList.map(item => {
formId.push(item.id);
});
this.listForm.inforlist = formId.join(",");
}, e => {
});
this.listForm.inforlist = formId.join(",");
}, e => {
});
}else{
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById",
{ id: this.selectedList[0].id, page: this.page, Size: this.pageSize }, {
_this: this
}, res => {
if (res.data === null) {
this.dataList = [];
}
this.dataList = res.data.records;
this.dataList.forEach(item => {
if(item.xcxssrqgj === 'undefined' ||item.xcxssrqgj === '-' || item.xcxssrqgj === 'null'){
item.xcxssrqgj = ''
}else{
this.$set(item, "XCXSSRQ", item.xcxssrqgj)
}
if(item.zccssrqgj === 'undefined' || item.zccssrqgj === '-'|| item.zccssrqgj === 'null'){
item.zccssrqgj = ''
}else{
this.$set(item, "ZCCSSRQ", item.zccssrqgj)
}
})
this.listForm.dataList = this.dataList;
let formId = [];
this.dataList.map(item => {
formId.push(item.id);
});
this.listForm.inforlist = formId.join(",");
}, e => {
});
}
this.$refs.detailedSelection.clearSelection()
} else {
this.$message.warning("请选择一条数据进行带入");
@@ -40,7 +40,7 @@
<el-form-item label="附件" prop="fileName" class="add-form-item form-item-disabled">
<div class="file-box" v-if="fileList.length > 0">
<p v-for="item in fileList"
:key="item.id"> {{ item.name }}
:key="item.id" @click="clickButtonToUpload2(item.id)"> {{ item.name }}
<i
title="下载"
@click="downloadFile(item.id)"
@@ -372,6 +372,10 @@ export default {
}, e => {
});
},
clickButtonToUpload2(file) {
const attId = file
this.$preview(attId)
},
/**
* @Description: 点击下载
*/
@@ -40,7 +40,7 @@
<el-form-item label="附件" prop="fileName" class="add-form-item form-item-disabled">
<div class="file-box" v-if="fileList.length > 0">
<p v-for="item in fileList"
:key="item.id"> {{ item.name }}
:key="item.id" @click="clickButtonToUpload2(item.id)"> {{ item.name }}
<i
title="下载"
@click="downloadFile(item.id)"
@@ -441,6 +441,11 @@ export default {
}, e => {
});
},
//点击预览
clickButtonToUpload2(file) {
const attId = file
this.$preview(attId)
},
/**
* @Description: 点击下载
*/
@@ -40,7 +40,8 @@
<el-form-item label="附件" prop="fileName" class="add-form-item form-item-disabled">
<div class="file-box" v-if="fileList.length > 0">
<p v-for="item in fileList"
:key="item.id"> {{ item.name }}
:key="item.id" @click="clickButtonToUpload2(item.id)">
{{ item.name }}
<i
title="下载"
@click="downloadFile(item.id)"
@@ -382,6 +383,11 @@ export default {
}, e => {
});
},
//点击预览
clickButtonToUpload2(file) {
const attId = file
this.$preview(attId)
},
/**
* @Description: 点击下载
*/