修复bug

This commit is contained in:
宋伟佳
2021-07-26 18:05:14 +08:00
parent 2202ec4ce5
commit ed3ccd21f1
7 changed files with 197 additions and 142 deletions
@@ -48,27 +48,27 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="附件" prop="fileId" class="add-form-item form-item-disabled">
<el-upload
v-if="listForm.fileId == null || this.listForm.fileId== 'undefined' || this.listForm.fileId == '' "
:action="uploadFileListPath"
show-file-list
:file-list="fileInfoList"
name="file"
accept=".PDF, .pdf, .doc, .DOC, .docx, .DOCX, .xls, .xlsx, .ppt, .pptx, .PPT, .PPTX, .JPG, .JPEG, .PNG, .jpg, .jpeg, .png"
:on-remove="delFileInfo"
:on-success="uploadBackSuccess"
:before-upload="beforeUpload"
>
<el-button class="common-button-default" size="mini">
点击上传
</el-button>
</el-upload>
<el-input
v-else
v-model="listForm.fileId"
placeholder=""
></el-input>
<el-form-item label="附件" prop="fileName" class="add-form-item form-item-disabled">
<div class="file-box" v-if="listForm.fileName">
<p>{{listForm.fileName}}
</p>
</div>
<div v-else>
<el-upload
:action="uploadFileListPath"
show-file-list
:file-list="fileInfoList"
name="file"
accept=".PDF, .pdf, .doc, .DOC, .docx, .DOCX, .xls, .xlsx, .ppt, .pptx, .PPT, .PPTX, .JPG, .JPEG, .PNG, .jpg, .jpeg, .png"
:on-remove="delFileInfo"
:on-success="uploadBackSuccess"
:before-upload="beforeUpload"
>
<el-button class="common-button-default" size="mini">
点击上传
</el-button>
</el-upload>
</div>
</el-form-item>
<el-form-item label="会签" prop="sign" class="add-form-item form-item-disabled">
<el-radio-group v-model="signFlag" @change="selectSign">
@@ -128,15 +128,21 @@
label="发布日期">
</el-table-column>
<el-table-column
prop="xcxssrq"
prop="xcxssrqgj"
align="center"
label="新车型实施日期">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
align="center"
label="在产车实施日期">
<template slot-scope="scope">
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
@@ -318,26 +324,13 @@
}}</span>
</template>
</el-table-column>
<el-table-column
prop="applicationScope"
label="适用领域"
align="center">
<template slot-scope="scope">
<span
v-if="scope.row.applicationScope != null && scope.row.applicationScope !== ''">{{ scope.row.applicationScope
}}</span>
</template>
</el-table-column>
<el-table-column
prop="updateTime"
label="更新时间"
sortable
align="center">
<template slot-scope="scope">
<div>
{{ scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-DD hh:mm:ss") : scope.row.updateTime
}}
</div>
<span>{{ scope.row.updateTime ? $moment(scope.row.updateTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
@@ -617,17 +610,26 @@
prop="issueTime"
align="center"
label="发布日期">
<template slot-scope="scope">
<span>{{ scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="xcxssrq"
prop="xcxssrqgj"
align="center"
label="新车型实施日期">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrq"
prop="zccssrqgj"
align="center"
label="在产车实施日期">
<template slot-scope="scope">
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
@@ -718,7 +720,7 @@ export default {
// 查询选择清单相关参数
sarSarAccessEOSearch: {
countryArea: "",
detailedListName: "",
detailedListName: ""
},
//查询添加标准相关数据
standardSearch: {
@@ -809,8 +811,8 @@ export default {
code: "", //标准号
standName: "", //标准名称
issueTime: "", //发布日期
xcxssrq: "", //新车型实施日期
zccssrq: "", //在产车实施日期
xcxssrqgj: "", //新车型实施日期
zccssrqgj: "", //在产车实施日期
textStatus: "", //文本状态
id: ""
}]
@@ -895,9 +897,9 @@ export default {
this.listForm.signFlag = 2;
}
},
queryDetailsData(){
this.page = 1
this.selectionList()
queryDetailsData() {
this.page = 1;
this.selectionList();
},
// //判断当前选中的是哪个清单
selectionList(type) {
@@ -950,7 +952,7 @@ export default {
};
this.selectionList();
},
clearStandSearch(){
clearStandSearch() {
this.standardSearch = {
standType: "",
standNumber: ""
@@ -968,6 +970,10 @@ export default {
_this: this
}, res => {
this.standardData = res.data.list;
this.standardData.forEach(item => {
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQGJ)
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQGJ)
})
this.totalNo = res.data.count;
}, e => {
});
@@ -1002,30 +1008,30 @@ export default {
},
//保存事件
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '4')
_formData.append('json', JSON.stringify({
this.saveLoading = true;
let _formData = new FormData();
_formData.append("id", this.bpnId || "");
_formData.append("createUser", this.$store.getters.userInfo.userId);
_formData.append("createUserName", this.$store.getters.userInfo.userName);
_formData.append("prcType", "4");
_formData.append("json", JSON.stringify({
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}));
saveTaskFirst(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功");
this.bpnId = res.result;
}).catch(e => {
this.saveLoading = false
})
this.saveLoading = false;
});
},
//提交事件
handleSubmit() {
if(this.dataList.length < 1){
this.$message.warning('标准不能为空')
}else{
if (this.dataList.length < 1) {
this.$message.warning("标准不能为空");
} else {
let json = this.listForm;
this.listForm.fileId = this.fileIds.join(",");
this.listForm.fileName = this.fileListName.join(",");
@@ -1094,7 +1100,7 @@ export default {
});
this.fileListName = middle;
this.fileIds.push(file.response.data.id);
this.$message.success('上传成功')
this.$message.success("上传成功");
} else {
this.$message.error(res.message);
fileList.pop();
@@ -1180,33 +1186,6 @@ export default {
}
return true;
},
// beginImportFile (file) {
// var filename = file.name
// var index1 = filename.lastIndexOf('.')
// var index2 = filename.length
// var fileSuffix = filename.substring(index1, index2)
// // const fileSuffix = file.name.split('.')[1] // 后缀名
// // 判断上传文件格式
// // 判断上传文件格式
// if (fileSuffix === '.PDF' || fileSuffix === '.DOC' || fileSuffix === '.DOCX' || fileSuffix === '.PPT'
// || fileSuffix === '.PPTX'|| fileSuffix === '.XLS'|| fileSuffix === '.XLSX'
// || fileSuffix === '.PNG'|| fileSuffix === '.JPG'|| fileSuffix === '.JPEG') {
// return true
// } else {
// this.spinShow = false
// this.$message.error('文件' + file.name + '格式不正确,请上传pdf、doc、docx、ppt、pptx、xls、xlsx、png、jpg、jpeg等文件')
// return false
// }
// // 判断文件上传大小
// // eslint-disable-next-line no-unreachable
// if (file.size / 1024 / 1024 <= 200) {
// return true
// } else {
// this.$message.error('文件' + file.name + '大小不超过200M')
// return false
// }
// return true
// },
//选择清单取消事件
closeDrawer() {
this.ListModel = false;
@@ -1220,26 +1199,25 @@ export default {
},
//添加标准确定事件
okStand() {
let _this = this;
if (this.standList.length < 1) {
_this.$message.warning("请选择需要添加进清单的数据");
this.$message.warning("请选择需要添加进清单的数据");
} else {
_this.standList.map(item => {
this.standList.map(item => {
let newStand = false;
for (let itemKey of _this.dataList) {
for (let itemKey of this.dataList) {
if (item.id == itemKey.id) {
newStand = true;
break;
}
}
if (newStand) {
_this.$message.warning("请勿重复添加数据");
this.$message.warning("请勿重复添加数据");
} else {
_this.dataList.push(item);
this.dataList.push(item);
}
});
this.standardData = [];
_this.standModel = false;
this.standModel = false;
}
},
//选择清单确定事件
@@ -1257,23 +1235,24 @@ export default {
this.listForm.listName = bringData[0].detailedListName;
this.listForm.descriptionList = bringData[0].remark;
this.listForm.fileId = bringData[0].fileIds;
this.listForm.fileName = bringData[0].fileName;
this.ListModel = false;
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById",
{ id: bringData[0].id, page: this.page, Size:this.pageSize}, {
_this: this
}, res => {
if (res.data == null) {
res.data = [];
}
this.dataList = res.data;
this.listForm.dataList = res.data;
let formId = [];
this.dataList.map(item => {
formId.push(item.id);
{ id: bringData[0].id, page: this.page, Size: this.pageSize }, {
_this: this
}, res => {
if (res.data == null) {
res.data = [];
}
this.dataList = res.data;
this.listForm.dataList = res.data;
let formId = [];
this.dataList.map(item => {
formId.push(item.id);
});
this.listForm.inforlist = formId.join(",");
}, e => {
});
this.listForm.inforlist = formId.join(",");
}, e => {
});
} else if (this.selectedList.length > 1) {
this.$message.warning("只能选择一条数据进行带入");
} else {
@@ -1365,7 +1344,36 @@ export default {
padding: 0 20px 0;
}
}
.fileClass {
cursor: pointer;
}
.fileClass:hover{
color: #0c91e5;
}
p {
& > a {
cursor: pointer;
}
& > i {
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
}
.icon-download {
background-image: url("~assets/images/shangqi/img/download.png");
}
.icon-download2 {
background-image: url("~assets/images/shangqi/img/download2.png");
}
}
.choiceBtn {
.el-button--primary {
width: 150px;
@@ -104,8 +104,8 @@
width="180px"
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}</a>
<p v-if="scope.row.standYear" >{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</p>
<p v-else >{{ scope.row.standSortShow }} {{ scope.row.standNumber }}</p>
</template>
</el-table-column>
<el-table-column
@@ -77,6 +77,10 @@
fixed="left"
width="180px"
label="标准号">
<template slot-scope="scope">
<p v-if="scope.row.standYear" >{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</p>
<p v-else >{{ scope.row.standSortShow }} {{ scope.row.standNumber }}</p>
</template>
</el-table-column>
<el-table-column
prop="standName"
@@ -64,7 +64,7 @@
</process-title>
<div class="tableTitle">
<div class="tableButton">
<el-button plain class="common-button-primary" size="mini" @click="addList">新增</el-button>
<el-button plain class="common-button-primary" size="mini" @click="addList">添加</el-button>
<el-button plain class="common-button-primary" size="mini" @click="deleteList">批量删除</el-button>
</div>
</div>
@@ -226,7 +226,6 @@
</el-table-column>
<el-table-column
prop="code"
fixed="left"
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump"
@@ -290,7 +289,7 @@
tooltip-effect="dark"
style="width: 100%"
border
ref="table"
ref="projectTable"
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@@ -540,9 +539,10 @@ export default {
leading() {
},
//点击新增事件
//点击添加事件
addList() {
this.standModel = true;
this.$refs.projectTable.clearSelection()
},
// 点击批量删除事件
deleteList() {
@@ -575,13 +575,30 @@ export default {
},
//确认添加事件
okStand() {
if (this.standList.length >= 1) {
this.dataList = this.standList;
this.roleForm.directorUser = this.dataList[0].uname;
this.listForm.dataList = this.standList;
let proData = [];
if(this.dataList.length >= 1){
this.dataList.forEach(item => {
if(proData.length === 0){
proData.push(item.productLine)
}else if(!proData.includes(item.productLine)){
proData.push(item.productLine)
}
})
this.standList.forEach(items => {
if(!proData.includes(items.productLine)){
this.dataList.push(items)
}
})
this.standModel = false;
} else {
this.$message.warning("请选择一条数据进行添加");
}else{
if (this.standList.length >= 1) {
this.dataList = this.standList;
this.roleForm.directorUser = this.dataList[0].uname;
this.listForm.dataList = this.standList;
this.standModel = false;
} else {
this.$message.warning("请选择一条数据进行添加");
}
}
},
//保存事件
@@ -656,6 +673,17 @@ export default {
closeDrawer() {
this.ListModel = false;
},
// 点击查看
handlePreview(item) {
let routeUrl = this.$router.resolve({
name: "OtherStandardDetails",
params: {
id: item.id,
pageType: "INLAND_STAND"
}
});
window.open(routeUrl.href, "_blank");
},
//选择拆分标准确定事件
OkDrawer() {
@@ -51,6 +51,7 @@
row-key="standId"
height="70%"
border
ref="myTable"
@selection-change="selectStandChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@@ -82,12 +83,7 @@
</el-table-column>
<el-table-column label="责任人" prop="workPeople" align="center">
<template slot-scope="scope">
<div v-if="scope.row.workPeople == undefined">
{{ "请选择责任人" }}
</div>
<div v-else class="fileClass">
{{ scope.row.workPeople || "-" }}
</div>
<div :class="{'fileClass': !scope.row.workPeople}">{{ scope.row.workPeople ? scope.row.workPeople: '请选择责任人' }}</div>
</template>
</el-table-column>
</el-table>
@@ -358,39 +354,47 @@ export default {
}
},
checkedRole(data) {
console.log(data[0].name)
// 选取负责人时的操作
let deposit = new Map();
let mis2 = new Map();
this.selectList.forEach(item => {
item.workPeople = data[0].name;
item.workPeopleId = data[0].id;
if (item.children !== undefined) {
if (item.children) {
item.children.forEach(items => {
deposit.set(items.standId, items);
});
}
mis2.set(item.standId, item);
});
this.dataList.forEach(item => {
if (undefined !== mis2.get(item.standId)) {
if (undefined !== item.children) {
this.dataList.forEach((item, index) => {
if (mis2.get(item.standId)) {
if (item.children) {
item.children.forEach(i => {
i.workPeopleId = undefined;
i.workPeople = undefined;
});
} else {
const newItem = JSON.parse(JSON.stringify(item))
newItem.workPeopleId = data[0].id
newItem.workPeople = data[0].name
this.$set(this.dataList, index, newItem)
}
} else {
if (item.children !== undefined) {
item.children.forEach(items => {
if (undefined !== deposit.get(items.standId)) {
items = deposit.get(items.standId);
if (item.children) {
item.children.forEach((items, childIndex) => {
if (deposit.get(items.standId)) {
const childItems = JSON.parse(JSON.stringify(items))
childItems.workPeopleId = deposit.get(items.standId).workPeopleId;
childItems.workPeople = deposit.get(items.standId).workPeople;
this.$set(this.dataList[index].children, childIndex, childItems)
}
});
}
}
});
this.$refs.selection.clearSelection();
this.$refs.myTable.clearSelection();
this.modalshowflag = false;
},
cancleUserInfo() {
@@ -200,6 +200,15 @@ export default {
if (prcType === '1') {
// 标准入库流程数据
this.toProcessDetail('bzrkStep5',row)
}else if(prcType === '4'){
//标准清单发布流程数据
this.toProcessDetail('bzqdfbStep4',row)
}else if (prcType === '5'){
//标准项目合规评估 标准维度
this.toProcessDetail('xmpgStep7',row)
}else if(prcType === '6'){
//标准项目合规评估 项目维度
this.toProcessDetail('xmpg2Step12',row)
}
} else {
this.$message.warning('当前流程未全部办理完成,无法查看')
+4 -2
View File
@@ -7,8 +7,10 @@
// const devIp = '39.98.140.126'
// const devInterfacePORT = '10005'
// const devIp = '192.168.10.248'
const devIp = '101.36.227.25'
const devInterfacePORT = '8038'
// const devIp = '101.36.227.25'
// const devInterfacePORT = '8038'
const devIp = '10.96.170.156'
const devInterfacePORT = '9999'
// 云端端口号
const DEV_CLOUD_RES_INTERFACE_PORT = '7777'
const simpleFilePath = 'att/attFile/upload'