Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-05-09 18:38:16 +08:00
16 changed files with 282 additions and 113 deletions
@@ -1051,7 +1051,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
fileTemplateName = fileTemplateName.replace(",",","); fileTemplateName = fileTemplateName.replace(",",",");
for (String fileName : fileTemplateName.split(",")) { for (String fileName : fileTemplateName.split(",")) {
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName); List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName,null,null,null,null,null);
if (nowFileList.size() == 0) { if (nowFileList.size() == 0) {
if(CutEnum.CN.getValue().equals(cut)) { if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += "附件模板压缩包中没有" + fileName + "文件; "; errorMsg += "附件模板压缩包中没有" + fileName + "文件; ";
@@ -4342,7 +4342,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (StringUtils.isNotBlank(value)) { if (StringUtils.isNotBlank(value)) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (String fileName : value.split(",")) { for (String fileName : value.split(",")) {
List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName); List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,cut,errorMsg,null,key,key);
if (nowFileList.size() == 0) { if (nowFileList.size() == 0) {
if(CutEnum.CN.getValue().equals(cut)){ if(CutEnum.CN.getValue().equals(cut)){
errorMsg += key + "压缩包中没有" + fileName + "文件; "; errorMsg += key + "压缩包中没有" + fileName + "文件; ";
@@ -856,6 +856,13 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
} }
//编号 //编号
String serialNumber = dummyInventoryInfoEO.getSerialNumber(); String serialNumber = dummyInventoryInfoEO.getSerialNumber();
//子标题
String subtitle = dummyInventoryInfoEO.getSubtitle();
//wvtaId
String wvtaId = dummyInventoryInfoEO.getWvtaId();
//备注remark
String remark = dummyInventoryInfoEO.getRemark();
//认证级别 //认证级别
String attestationRank = dummyInventoryInfoEO.getAttestationRank(); String attestationRank = dummyInventoryInfoEO.getAttestationRank();
//责任领域 //责任领域
@@ -890,6 +897,43 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
//编号(输入框必填) //编号(输入框必填)
flag = must(dummyInventoryInfoEO, errorMsg, msgList, serialNumber, "编号", "serial number"); flag = must(dummyInventoryInfoEO, errorMsg, msgList, serialNumber, "编号", "serial number");
//子标题
if(StringUtils.isNotBlank(subtitle)){
if(subtitle.length() > 100){
String message = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEOTemp.getCut())){
message = errorMsg + "子标题不能超过100个字符";
}else{
message = errorMsg + " Subheadings cannot be checked more than 100 characters";
}
msgList.add(message);
}
}
//WVTA ID
if(StringUtils.isNotBlank(wvtaId)){
if(wvtaId.length() > 100){
String message = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEOTemp.getCut())){
message = errorMsg + "WVTA ID不能超过100个字符";
}else{
message = errorMsg + " The WVTA ID cannot contain more than 100 characters";
}
msgList.add(message);
}
}
//备注 remark
if(StringUtils.isNotBlank(remark)){
if(remark.length() > 300){
String message = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEOTemp.getCut())){
message = errorMsg + "备注不能超过300个字符";
}else{
message = errorMsg + " Note The value cannot exceed 300 characters";
}
msgList.add(message);
}
}
//实施类别(单选不必填) //实施类别(单选不必填)
value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, implementType,msgList,"实施类别","implementation category","implement_type"); value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, implementType,msgList,"实施类别","implementation category","implement_type");
@@ -897,17 +941,6 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
dummyInventoryInfoEO.setImplementType(value); dummyInventoryInfoEO.setImplementType(value);
} }
//新车实施日期 xin1Che1Xing2Shi2Shi1Ri4Qi1
// flag = dateVerify(dummyInventoryInfoEO, errorMsg, xin1Che1Xing2Shi2Shi1Ri4Qi1,msgList,"新车实施日期","new car implementation date");
// if(flag){
// dummyInventoryInfoEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1(xin1Che1Xing2Shi2Shi1Ri4Qi1);
// }
//在产车实施日期 implementTime
// flag = dateVerify(dummyInventoryInfoEO, errorMsg, implementTime,msgList,"在产车实施日期","on the production vehicle implementation date");
// if(flag){
// dummyInventoryInfoEO.setImplementTime(implementTime);
// }
//认证类型(单选不必填) //认证类型(单选不必填)
value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, attestationType,msgList,"认证类型","certification type","attestation_type"); value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, attestationType,msgList,"认证类型","certification type","attestation_type");
if(StringUtils.isNotBlank(value)){ if(StringUtils.isNotBlank(value)){
@@ -1087,14 +1120,14 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
if (StringUtils.isNotBlank(designDeliverableTemplate)) { if (StringUtils.isNotBlank(designDeliverableTemplate)) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (String fileName : designDeliverableTemplate.split(",")) { for (String fileName : designDeliverableTemplate.split(",")) {
List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName); List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,dummyInventoryInfoEO.getCut(),errorMsg,msgList,nameCn,nameEn);
if (nowFileList.size() == 0) { if (nowFileList.size() == 0) {
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){ // if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
errorMsg += "压缩包中没有" + fileName + "文件; "; // errorMsg += "压缩包中没有" + fileName + "文件; ";
}else{ // }else{
errorMsg += " Not in the zip package" + fileName + "file; "; // errorMsg += " Not in the zip package" + fileName + "file; ";
} // }
msgList.add(errorMsg); // msgList.add(errorMsg);
} else { } else {
try { try {
FileInputStream input = new FileInputStream(nowFileList.get(0)); FileInputStream input = new FileInputStream(nowFileList.get(0));
@@ -2309,14 +2309,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if (StringUtils.isNotBlank(designDeliverableTemplate)) { if (StringUtils.isNotBlank(designDeliverableTemplate)) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (String fileName : designDeliverableTemplate.split(",")) { for (String fileName : designDeliverableTemplate.split(",")) {
List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName); List<File> nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,projectLawsInventoryEO.getCut(),errorMsg,msgList,nameCn,nameEn);
if (nowFileList.size() == 0) { if (nowFileList.size() == 0) {
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){ // if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
errorMsg += "压缩包中没有" + fileName + "文件; "; // errorMsg += "压缩包中没有" + fileName + "文件; ";
}else{ // }else{
errorMsg += " Not in the zip package" + fileName + "file; "; // errorMsg += " Not in the zip package" + fileName + "file; ";
} // }
msgList.add(errorMsg); // msgList.add(errorMsg);
} else { } else {
try { try {
FileInputStream input = new FileInputStream(nowFileList.get(0)); FileInputStream input = new FileInputStream(nowFileList.get(0));
@@ -1,12 +1,18 @@
package com.jero.modules.split.common; package com.jero.modules.split.common;
import com.jero.common.constant.enums.CutEnum;
import com.xkcoding.http.util.StringUtil; import com.xkcoding.http.util.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.tools.zip.ZipEntry; import org.apache.tools.zip.ZipEntry;
import org.apache.tools.zip.ZipFile; import org.apache.tools.zip.ZipFile;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.io.*; import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.List; import java.util.List;
@@ -114,9 +120,18 @@ public class FileUnZip {
* gaoyan * gaoyan
* @param filename * @param filename
*/ */
public static List<File> readFileByFilename(String path,String filename) { public static List<File> readFileByFilename(String path,
String filename,
String cut,
String errorMsg,
List<String> msgList,
String nameCn,
String nameEn) {
String filenameOne = "";
String filenameTwo = "";
if(filename.contains("/")){ if(filename.contains("/")){
filename = filename.split("/")[1]; filenameOne = filename.split("/")[0];
filenameTwo = filename.split("/")[1];
} }
List<File> resultlist = new ArrayList<>(); List<File> resultlist = new ArrayList<>();
if (StringUtil.isNotEmpty(path)){ if (StringUtil.isNotEmpty(path)){
@@ -128,20 +143,35 @@ public class FileUnZip {
File[] filesTemp = fi.listFiles(); File[] filesTemp = fi.listFiles();
for (File fileTemp : filesTemp) { for (File fileTemp : filesTemp) {
// 对文件进行过滤 // 对文件进行过滤
if (fileTemp.getName().equals(filename)) { if (fileTemp.getName().equals(filenameTwo) && fileTemp.getPath().contains(filenameOne) && StringUtils.isNotBlank(filenameOne)) {
resultlist.add(fileTemp); resultlist.add(fileTemp);
} }
} }
}else{ }else{
// 对文件进行过滤 // 对文件进行过滤
if (fi.getName().equals(filename)) { if (fi.getName().equals(filenameTwo) && fi.getPath().contains(filenameOne) && StringUtils.isNotBlank(filenameOne)) {
resultlist.add(fi); resultlist.add(fi);
} }
} }
} }
} }
} }
if(resultlist.size() == 0){
String name = "";
if(filename.contains("/")){
name = filenameTwo;
}else{
name = filename;
}
if(CutEnum.CN.getValue().equals(cut)){
errorMsg += nameCn + name + "格式不正确或者压缩包中没有" + name + "文件,请参考模板下载中的说明";
}else{
errorMsg += nameEn + name + " Incorrect format or not present in compressed package " + name + " file please refer to the description in template download;";
}
if(msgList != null){
msgList.add(errorMsg);
}
}
return resultlist; return resultlist;
} }
// public static List<File> readFileByFilename(String path,String filename) { // public static List<File> readFileByFilename(String path,String filename) {
@@ -1217,7 +1217,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} }
} }
} }
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
if (nowfilelist != null && !nowfilelist.isEmpty()) { if (nowfilelist != null && !nowfilelist.isEmpty()) {
String url = nowfilelist.get(0).getPath(); String url = nowfilelist.get(0).getPath();
MultipartFile multipartFile = createMfileByPath(url); MultipartFile multipartFile = createMfileByPath(url);
@@ -1262,7 +1262,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} }
} }
} }
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
if (nowfilelist != null && !nowfilelist.isEmpty()) { if (nowfilelist != null && !nowfilelist.isEmpty()) {
String url = nowfilelist.get(0).getPath(); String url = nowfilelist.get(0).getPath();
MultipartFile multipartFile = createMfileByPath(url); MultipartFile multipartFile = createMfileByPath(url);
@@ -1311,7 +1311,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} }
} }
} }
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
if (nowfilelist != null && !nowfilelist.isEmpty()) { if (nowfilelist != null && !nowfilelist.isEmpty()) {
String url = nowfilelist.get(0).getPath(); String url = nowfilelist.get(0).getPath();
MultipartFile multipartFile = createMfileByPath(url); MultipartFile multipartFile = createMfileByPath(url);
@@ -2223,7 +2223,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
value = value.replace(",",","); value = value.replace(",",",");
for (String fileName : value.split(",")) { for (String fileName : value.split(",")) {
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName); List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName,null,null,null,null,null);
if (nowFileList.size() == 0) { if (nowFileList.size() == 0) {
if(CutEnum.CN.getValue().equals(cut)) { if(CutEnum.CN.getValue().equals(cut)) {
errorMsg += fieldName + "压缩包中没有" + fileName + "文件; "; errorMsg += fieldName + "压缩包中没有" + fileName + "文件; ";
@@ -993,7 +993,7 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
} }
} }
} }
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
if (nowfilelist != null && !nowfilelist.isEmpty()) { if (nowfilelist != null && !nowfilelist.isEmpty()) {
OSSFile ossFile = new OSSFile(); OSSFile ossFile = new OSSFile();
ossFile.setFileName(nowfilelist.get(0).getName()); ossFile.setFileName(nowfilelist.get(0).getName());
@@ -1030,7 +1030,7 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
} }
} }
} }
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
if (nowfilelist != null && !nowfilelist.isEmpty()) { if (nowfilelist != null && !nowfilelist.isEmpty()) {
OSSFile ossFile = new OSSFile(); OSSFile ossFile = new OSSFile();
ossFile.setFileName(nowfilelist.get(0).getName()); ossFile.setFileName(nowfilelist.get(0).getName());
@@ -1069,7 +1069,7 @@ public class SarFileSplitItemsEOServiceImpl extends ServiceImpl<SarFileSplitItem
} }
} }
} }
List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i]); List<File> nowfilelist = FileUnZip.readFileByFilename(filepath, valArr[i],null,null,null,null,null);
if (nowfilelist != null && !nowfilelist.isEmpty()) { if (nowfilelist != null && !nowfilelist.isEmpty()) {
OSSFile ossFile = new OSSFile(); OSSFile ossFile = new OSSFile();
ossFile.setFileName(nowfilelist.get(0).getName()); ossFile.setFileName(nowfilelist.get(0).getName());
@@ -67,6 +67,12 @@
export default { export default {
name: 'circulationHistory', name: 'circulationHistory',
props: {
url: {
type: String,
default: '/workFlow/get_list_by_instance'
}
},
data() { data() {
return { return {
dataSource: [], dataSource: [],
@@ -140,9 +146,10 @@
methods: { methods: {
getList() { getList() {
let query = { let query = {
prcNum: this.$route.query.prcNum prcNum: this.$route.query.prcNum,
prcId: this.$route.query.actiProcInstId
} }
getAction('/workFlow/get_list_by_instance', query).then((res) => { getAction(this.url, query).then((res) => {
this.dataSource = res this.dataSource = res
}) })
}, },
@@ -41,6 +41,7 @@
<span slot="operation" slot-scope="result"> <span slot="operation" slot-scope="result">
<a class="text" <a class="text"
v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'" v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'"
:disabled="!result.createUser"
@click="edit(result,$t('edit'))"> @click="edit(result,$t('edit'))">
{{$t('edit')}} {{$t('edit')}}
</a> </a>
@@ -55,6 +56,7 @@
</a> </a>
<a class="text" <a class="text"
v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'" v-if="$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'dreDispose'"
:disabled="!result.createUser"
@click="deleted(result)"> @click="deleted(result)">
{{$t('deleteLib')}} {{$t('deleteLib')}}
</a> </a>
@@ -52,6 +52,7 @@
<script> <script>
export default { export default {
name: 'reviewedByThePersonInCharge', name: 'reviewedByThePersonInCharge',
props: ['queryBy'],
data() { data() {
return { return {
formInline: {}, formInline: {},
@@ -75,6 +76,11 @@
} }
}, },
mounted() { mounted() {
if (this.queryBy) {
this.formInline.reviewResult = this.queryBy.reviewResult || undefined
this.formInline.approvalOpinion = this.queryBy.approvalOpinion || ''
this.formInline = { ...this.formInline }
}
}, },
methods: { methods: {
submit(callBack) { submit(callBack) {
@@ -12,30 +12,30 @@
<div class="detail-box"> <div class="detail-box">
<div class="detail-content"> <div class="detail-content">
<projectInformation <projectInformation
v-if="!loading" v-if="isDisplay"
:projectInformationList="projectInformationList" :projectInformationList="projectInformationList"
:url="url" :url="url"
:projectInformationId="this.queryBy.projectLibraryId" :projectInformationId="this.queryBy.projectLibraryId"
/> />
<standardContent <standardContent
v-if="!loading" v-if="isDisplay"
:standardContentList="standardContentList" :standardContentList="standardContentList"
:url="url" :url="url"
:standardContentQuery="queryProject" :standardContentQuery="queryProject"
/> />
<standardContentListTable <standardContentListTable
v-if="!loading" v-if="isDisplay"
:standardContentListQuery="queryProject" :standardContentListQuery="queryProject"
:url="url :url="url
"/> "/>
<examineInformation <examineInformation
:isFlag="isFlag" :isFlag="isFlag"
v-if="!loading" v-if="isDisplay"
isViewUploadedFiles isViewUploadedFiles
isApprovalOpinion isApprovalOpinion
ref="examineInformationRef" ref="examineInformationRef"
:url="url"/> :url="url"/>
<circulationHistory v-if="!loading" :url="url"/> <circulationHistory v-if="isDisplay"/>
</div> </div>
</div> </div>
<JLoading :loading="loading">{{textLoading}}</JLoading> <JLoading :loading="loading">{{textLoading}}</JLoading>
@@ -156,13 +156,15 @@
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds' queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds'
}, },
queryBy: {}, queryBy: {},
isDisplay: false,
queryProject: {}, queryProject: {},
loading: false, loading: false,
textLoading:this.$t('dataLoading') textLoading: this.$t('dataLoading')
} }
}, },
mounted() { mounted() {
let _this = this let _this = this
this.isDisplay = false
this.queryTaskDetailByTask(function() { this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo() _this.queryProjectLawsInventoryInfo()
}) })
@@ -243,11 +245,13 @@
} }
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => { getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) { if (res.success) {
this.queryProject = res.result || {} this.queryProject = res.result[0] || {}
this.loading = false this.loading = false
this.isDisplay = true
} else { } else {
this.queryProject = {} this.queryProject = {}
this.loading = false this.loading = false
this.isDisplay = true
} }
}) })
} }
@@ -14,25 +14,28 @@
<div class="detail-box"> <div class="detail-box">
<div class="detail-content"> <div class="detail-content">
<projectInformation <projectInformation
v-if="!loading" v-if="isDisplay"
:projectInformationList="projectInformationList" :projectInformationList="projectInformationList"
:url="url" :url="url"
:projectInformationId="this.queryBy.projectLibraryId" :projectInformationId="this.queryBy.projectLibraryId"
/> />
<standardContent <standardContent
v-if="!loading" v-if="isDisplay"
:standardContentList="standardContentList" :standardContentList="standardContentList"
:url="url" :url="url"
:standardContentQuery="queryProject" :standardContentQuery="queryProject"
/> />
<engineeringConfirmation <engineeringConfirmation
v-if="!loading" v-if="isDisplay"
/> />
<reviewedByThePersonInCharge <reviewedByThePersonInCharge
v-if="(!loading && $route.query.TaskKey == 'zrrclrw') || ref="reviewedByThePersonInChargeRef"
(!loading && $route.query.TaskKey == 'fqrsh')" :queryBy="queryBy"
v-if="(isDisplay && $route.query.TaskKey == 'zrrclrw') ||
(isDisplay && $route.query.TaskKey == 'fqrsh')"
/> />
<circulationHistory v-if="!loading" :url="url"/> <circulationHistory v-if="isDisplay"
:url="'/workFlow/queryProcessHistoryByPrcId'"/>
</div> </div>
</div> </div>
<JLoading :loading="loading">{{textLoading}}</JLoading> <JLoading :loading="loading">{{textLoading}}</JLoading>
@@ -71,6 +74,7 @@
queryBy: {}, queryBy: {},
queryProject: {}, queryProject: {},
loading: false, loading: false,
isDisplay: false,
textLoading: this.$t('dataLoading'), textLoading: this.$t('dataLoading'),
projectInformationList: [ projectInformationList: [
{ {
@@ -202,11 +206,13 @@
mounted() { mounted() {
let _this = this let _this = this
if (this.$route.query.taskIds) { if (this.$route.query.taskIds) {
this.isDisplay = false
this.queryTaskDetailByTask(function() { this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo() _this.queryProjectLawsInventoryInfo()
}) })
} else { } else {
this.loading = true this.loading = true
this.isDisplay = false
this.queryBy.projectLibraryId = this.$route.query.projectLibraryId this.queryBy.projectLibraryId = this.$route.query.projectLibraryId
this.queryBy.id = this.$route.query.projectTaskInventoryId this.queryBy.id = this.$route.query.projectTaskInventoryId
this.queryProjectLawsInventoryInfo() this.queryProjectLawsInventoryInfo()
@@ -215,13 +221,50 @@
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
terminationProcess() { terminationProcess() {
this.textLoading = this.$t('terminationProcessing')
this.loading = true
this.completeTask({ flag: 2 })
}, },
adopt() { adopt() {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
this.completeTask(res)
})
}, },
sendBack() { sendBack() {
this.textLoading = this.$t('Returning')
this.loading = true
this.completeTask({ flag: 1 })
},
submit() {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
this.completeTask(res)
})
},
completeTask(value) {
let json = Object.assign(this.queryBy, value)
let data = JSON.stringify(json).replace(/\"/g, '\'')
let query = {
userid: this.userInfo().id,
taskId: this.$route.query.taskId || this.$route.query.taskIds,
json: data
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loading = false
this.$router.push({
path: '/ProjectDetails',
query: this.$route.query
})
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}, },
queryTaskDetailByTask(callback) { queryTaskDetailByTask(callback) {
this.loading = true this.loading = true
@@ -242,11 +285,13 @@
} }
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => { getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) { if (res.success) {
this.queryProject = res.result || {} this.queryProject = res.result[0] || {}
this.loading = false this.loading = false
this.isDisplay = true
} else { } else {
this.queryProject = {} this.queryProject = {}
this.loading = false this.loading = false
this.isDisplay = true
} }
}) })
} }
@@ -52,7 +52,7 @@
<ProjectDetailsName v-if="textTitle === '项目详情'"/> <ProjectDetailsName v-if="textTitle === '项目详情'"/>
<listOfRegulations v-else-if="textTitle === '法规清单'"/> <listOfRegulations v-else-if="textTitle === '法规清单'"/>
<TaskList v-else-if="textTitle === '任务清单'"/> <TaskList v-else-if="textTitle === '任务清单'"/>
<ParameterItemCollectionList item collection v-else-if="textTitle === '认证参数收集'"/> <ParameterItemCollectionList v-else-if="textTitle === '认证参数收集'" :paramsManifest='paramsManifest'/>
<nonConformance v-else-if="textTitle === '未符合项'"/> <nonConformance v-else-if="textTitle === '未符合项'"/>
</div> </div>
</div> </div>
@@ -92,11 +92,13 @@ export default {
url: { url: {
logList: '', logList: '',
historicalVersionUrl: '' historicalVersionUrl: ''
} },
paramsManifest: {},
} }
}, },
mounted() { mounted() {
this.textColor() this.textColor()
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
}, },
methods: { methods: {
textColor() { textColor() {
@@ -113,22 +113,22 @@
/> />
</div> </div>
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null"> <a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
<parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle' <!-- <parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'-->
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template> <!-- :selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template>-->
</a-modal> </a-modal>
<configure ref="configureRef" :url='url' :itemId='itemId'/> <!-- <configure ref="configureRef" :url='url' :itemId='itemId'/>-->
</a-card> </a-card>
</template> </template>
<script> <script>
// import ImportFile from '@/components/ImportFile/index' // import ImportFile from '@/components/ImportFile/index'
// import ParameterTemplate from '../dialog/ParameterTemplate' // import ParameterTemplate from '../dialog/ParameterTemplate'
// import { getAction,postAction } from '../../../api/manage' import { getAction,postAction } from '../../../api/manage'
// import Configure from '../dialog/configure' // import Configure from '../dialog/configure'
import axios from 'axios' import axios from 'axios'
export default { export default {
name: 'TaskParameterCollection', name: 'ParameterItemCollectionList',
// components:{ // components:{
// ImportFile, // ImportFile,
// ParameterTemplate, // ParameterTemplate,
@@ -184,14 +184,15 @@ export default {
selectedRowKeys: [], selectedRowKeys: [],
queryParam: {}, queryParam: {},
url: { url: {
list: 'params/manifest/page', getHeader: 'params/collectManifest/getHeader',
add: 'params/manifest/add', list: 'params/collectManifest/list',
edit: 'params/manifest/edit', // add: 'params/manifest/add',
queryById: 'params/manifest/queryById', // edit: 'params/manifest/edit',
deleteBatch: 'params/manifest/delete', // queryById: 'params/manifest/queryById',
deleteAll: 'params/manifest/deleteBatch', // deleteBatch: 'params/manifest/delete',
conAdd: 'params/config/addBatch', // deleteAll: 'params/manifest/deleteBatch',
conList: 'params/config/list', // conAdd: 'params/config/addBatch',
// conList: 'params/config/list',
}, },
loading: false, loading: false,
dataSource: [], dataSource: [],
@@ -208,8 +209,14 @@ export default {
itemId: '' itemId: ''
} }
}, },
props: {
paramsManifest: {
type: Object,
default: {},
require: true
}
},
mounted() { mounted() {
this.getlist()
}, },
methods:{ methods:{
paramsManifestClick(item) { paramsManifestClick(item) {
@@ -224,14 +231,14 @@ export default {
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmDelete'), content: _this.$t('ConfirmDelete'),
onOk() { onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => { // getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) { // if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) // _this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist() // _this.getlist()
} else { // } else {
_this.$message.warning(_this.$t('operationFailed')) // _this.$message.warning(_this.$t('operationFailed'))
} // }
}) // })
} }
}) })
}, },
@@ -268,9 +275,9 @@ export default {
this.areaVisible = true this.areaVisible = true
let _this = this let _this = this
let query = { let query = {
id: edit.id paramsManifestId: this.paramsManifest.id
} }
getAction(_this.url.queryById, query).then((res) => { getAction(_this.url.getHeader, query).then((res) => {
if (res.success) { if (res.success) {
console.log(res,'res..') console.log(res,'res..')
this.templatetitle = res.result.title this.templatetitle = res.result.title
@@ -326,15 +333,32 @@ export default {
}, },
getlist() { getlist() {
let query = { let query = {
pageSize: this.pageSize, paramsManifestId: this.paramsManifest.id,
pageNo: this.pageNo, flag: '7'
...this.queryParam
} }
console.log(this.$route.query,'this.query') console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifestthis.paramsManifest')
getAction(this.url.list, query).then((res) => { getAction(this.url.getHeader, query).then((res) => {
if(res.success) { if(res.success) {
this.total = res.result.total console.log(res,'头部,,,')
this.dataSource = res.result.records || [] // this.total = res.result.total
// this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
// let query = {
// pageSize: this.pageSize,
// pageNo: this.pageNo,
// ...this.queryParam
// }
// console.log(this.paramsManifest,'this.paramsManifestthis.paramsManifest')
// // console.log(this.$route.query,'this.query')
getAction(this.url.list, {}).then((res) => {
if(res.success) {
console.log(res,'oooo')
// this.total = res.result.total
// this.dataSource = res.result.records || []
this.loading = false this.loading = false
} else { } else {
this.loading = false this.loading = false
@@ -342,6 +366,11 @@ export default {
}) })
} }
}, },
watch: {
paramsManifest(newVal, oldVal) {
this.getlist()
}
}
} }
</script> </script>
@@ -218,13 +218,17 @@
actiProcInstId: val.designPId, actiProcInstId: val.designPId,
projectTaskInventoryId: val.projectLawsInventoryId, projectTaskInventoryId: val.projectLawsInventoryId,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
id: this.$route.query.id,
studioEngineer:this.$route.query.studioEngineer,
serialNumber: val.serialNumber, serialNumber: val.serialNumber,
TaskKey:val.designTaskDefinitionKey, TaskKey: val.designTaskDefinitionKey,
flowType:2, flowType: 2,
Sponsor:'designInitiatorName', Sponsor: 'designInitiatorName',
personLiable:'designDutyName', personLiable: 'designDutyName',
typeOfDeliverables:'designDeliverableType_dictText', typeOfDeliverables: 'designDeliverableType_dictText',
deliverableTemplate:'designDeliverableTemplate', deliverableTemplate: 'designDeliverableTemplate',
projectName:this.$route.query.projectName,
projectNameId:this.$route.query.projectNameId,
} }
break break
case 2: case 2:
@@ -232,30 +236,37 @@
taskIds: val.prehomoTaskId, taskIds: val.prehomoTaskId,
actiProcInstId: val.prehomoPId, actiProcInstId: val.prehomoPId,
projectTaskInventoryId: val.projectLawsInventoryId, projectTaskInventoryId: val.projectLawsInventoryId,
studioEngineer:this.$route.query.studioEngineer,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
serialNumber: val.serialNumber, serialNumber: val.serialNumber,
TaskKey:val.prehomoTaskDefinitionKey, TaskKey: val.prehomoTaskDefinitionKey,
flowType:3, flowType: 3,
Sponsor:'prehomoInitiatorName', id: this.$route.query.id,
personLiable:'prehomoDutyName', Sponsor: 'prehomoInitiatorName',
typeOfDeliverables:'prehomoDeliverableType_dictText', personLiable: 'prehomoDutyName',
deliverableTemplate:'prehomoDeliverableTemplate', typeOfDeliverables: 'prehomoDeliverableType_dictText',
deliverableTemplate: 'prehomoDeliverableTemplate',
projectName:this.$route.query.projectName,
projectNameId:this.$route.query.projectNameId,
} }
break break
case 3: case 3:
query = { query = {
taskIds: val.verifyTaskId, taskIds: val.verifyTaskId,
actiProcInstId: val.verifyPId, actiProcInstId: val.verifyPId,
id: val.id, id: this.$route.query.id,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
studioEngineer:this.$route.query.studioEngineer,
serialNumber: val.serialNumber, serialNumber: val.serialNumber,
projectTaskInventoryId: val.projectLawsInventoryId, projectTaskInventoryId: val.projectLawsInventoryId,
TaskKey:val.verifyTaskDefinitionKey, TaskKey: val.verifyTaskDefinitionKey,
flowType:4, flowType: 4,
Sponsor:'verifyInitiatorName', Sponsor: 'verifyInitiatorName',
personLiable:'verifyDutyName', personLiable: 'verifyDutyName',
typeOfDeliverables:'verifyDeliverableType_dictText', typeOfDeliverables: 'verifyDeliverableType_dictText',
deliverableTemplate:'verifyDeliverableTemplate', deliverableTemplate: 'verifyDeliverableTemplate',
projectName:this.$route.query.projectName,
projectNameId:this.$route.query.projectNameId,
} }
break break
} }
@@ -173,10 +173,10 @@
}, },
methods:{ methods:{
paramsManifestClick(item) { paramsManifestClick(item) {
let Obj = {...item, ...this.$route.query} localStorage.setItem('paramsManifest',JSON.stringify(item))
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/ParameterItemCollection', path: '/ParameterItemCollection',
query: Obj, query: this.$route.query,
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
}, },