报告列表接口对接
This commit is contained in:
@@ -691,61 +691,12 @@ export default {
|
||||
this.labelList();
|
||||
})
|
||||
},
|
||||
// 标签列表
|
||||
labelList() {
|
||||
// this.$api.report.labelList().then(({data}) => {
|
||||
// if(!data.labelOne.childList.length){
|
||||
// data.labelOne.childList = [{name: '', id: '', parentId: this.tagsForm.tags01.id, type: '1'}]
|
||||
// }
|
||||
// if(!data.labelTwo.childList.length){
|
||||
// data.labelTwo.childList = [{name: '', id: '', parentId: this.tagsForm.tags02.id, type: '2'}]
|
||||
// }
|
||||
// if(!data.labelThree.childList.length){
|
||||
// data.labelThree.childList = [{name: '', id: '', parentId: this.tagsForm.tags03.id, type: '3'}]
|
||||
// }
|
||||
// this.tagsForm.tags01 = data.labelOne;
|
||||
// this.tagsForm.tags02 = data.labelTwo;
|
||||
// this.tagsForm.tags03 = data.labelThree;
|
||||
// })
|
||||
},
|
||||
handleTagsClose() {
|
||||
this.dialogTags = false;
|
||||
this.labelList();
|
||||
this.reset();
|
||||
},
|
||||
// 保存标签
|
||||
// saveTags() {
|
||||
// let tagsForm = JSON.parse(JSON.stringify(this.tagsForm));
|
||||
// let params = {
|
||||
// labelList: [
|
||||
// tagsForm.tags01,
|
||||
// tagsForm.tags02,
|
||||
// tagsForm.tags03
|
||||
// ]
|
||||
// }
|
||||
// let isSave = true;
|
||||
// params.labelList.forEach(item => {
|
||||
// if(!item.name || item.name === '-'){
|
||||
// isSave = false;
|
||||
// return
|
||||
// }
|
||||
// item.childList.forEach(ele => {
|
||||
// if(!ele.name || item.name === '-'){
|
||||
// isSave = false;
|
||||
// return
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// if(!isSave){
|
||||
// return this.$message.warning('标签名称不能为空');
|
||||
// }
|
||||
// this.$api.report.labelSave(params).then(_ => {
|
||||
// this.$message.success('操作成功');
|
||||
// this.dialogTags = false;
|
||||
// this.labelList();
|
||||
// this.reset();
|
||||
// })
|
||||
// },
|
||||
|
||||
/* =============================================== 报告上传 =============================================== */
|
||||
// 打开报告上传
|
||||
openReportAdd() {
|
||||
@@ -763,29 +714,8 @@ export default {
|
||||
labelList:[] //标签
|
||||
};
|
||||
this.tags = [] // 关键词
|
||||
// this.labelOne = {};
|
||||
// this.labelTwo = {};
|
||||
// this.labelThree = {};
|
||||
// this.labelList();
|
||||
this.dialogReport = true;
|
||||
},
|
||||
// 选择标签
|
||||
// handleSelectTag(val, type) {
|
||||
// switch (type) {
|
||||
// case 1:
|
||||
// this.reportF.labelOneId = val.id;
|
||||
// this.reportF.labelOneName = val.name;
|
||||
// break;
|
||||
// case 2:
|
||||
// this.reportF.labelTwoId = val.id;
|
||||
// this.reportF.labelTwoName = val.name;
|
||||
// break;
|
||||
// case 3:
|
||||
// this.reportF.labelThreeId = val.id;
|
||||
// this.reportF.labelThreeName = val.name;
|
||||
// break;
|
||||
// }
|
||||
// },
|
||||
// 必填项
|
||||
checkReportF() {
|
||||
if (!this.reportF.name) {
|
||||
@@ -857,25 +787,27 @@ export default {
|
||||
},
|
||||
// 打开报告上传
|
||||
openReportModify(mode, row) {
|
||||
this.reportF = {
|
||||
name: '', // 报告名称
|
||||
mainContent: '', // 内容摘要
|
||||
department: '', // 报告所属部门
|
||||
fileName: '', // 文件上传
|
||||
fileId: '',
|
||||
year: '', // 报告年份
|
||||
privacyLevel: undefined, //报告隐私等级
|
||||
reportUserIdList: [], // 权限
|
||||
confidentialLevel:undefined, //涉密等级
|
||||
labelList:[] //标签
|
||||
};
|
||||
this.tags = []
|
||||
this.mode = mode;
|
||||
// this.labelList();
|
||||
let rowData = JSON.parse(JSON.stringify(row));
|
||||
// if (rowData.labelOneName !== '-') {
|
||||
// this.labelOne = { id: rowData.labelOneId, rowData: rowData.labelOneName };
|
||||
// } else {
|
||||
// this.labelOne = {};
|
||||
// }
|
||||
// if (rowData.labelTwoName !== '-') {
|
||||
// this.labelTwo = { id: rowData.labelTwoId, name: rowData.labelTwoName };
|
||||
// } else {
|
||||
// this.labelTwo = {};
|
||||
// }
|
||||
// if (rowData.labelThreeName !== '-') {
|
||||
// this.labelThree = { id: rowData.labelThreeId, name: rowData.labelThreeName };
|
||||
// } else {
|
||||
// this.labelThree = {};
|
||||
// }
|
||||
console.log('rowData',rowData);
|
||||
this.reportF = rowData;
|
||||
// this.reportF.tags=JSON.parse(rowData.keyContent)
|
||||
this.tags=JSON.parse(rowData.keyContent)
|
||||
this.$forceUpdate()
|
||||
this.dialogReport = true;
|
||||
},
|
||||
// 获取所有用户
|
||||
|
||||
Reference in New Issue
Block a user