From 127de30d1d5a10ff624cded5c4d9a0b44e38ec04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com>
Date: Tue, 16 Nov 2021 16:29:06 +0800
Subject: [PATCH] commit
---
.../pages/creatProcess/qbfs/step2.vue | 22 ++
.../pages/creatProcess/qbfs/step3.vue | 22 ++
.../pages/creatProcess/qbfs/step4.vue | 203 +++++++++++-------
3 files changed, 173 insertions(+), 74 deletions(-)
diff --git a/src/pages/processCenter/pages/creatProcess/qbfs/step2.vue b/src/pages/processCenter/pages/creatProcess/qbfs/step2.vue
index 5f83570b1..20f6a0243 100644
--- a/src/pages/processCenter/pages/creatProcess/qbfs/step2.vue
+++ b/src/pages/processCenter/pages/creatProcess/qbfs/step2.vue
@@ -419,6 +419,28 @@ export default {
this.qbfsForm.jgUserId = idList;
this.qbfsForm.jgUser = nameList;
},
+ /**
+ * @Description: 点击下载
+ */
+ downloadFile(attId) {
+ if (attId != null && attId !== "") {
+ window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
+ } else {
+ this.$message.error("请选择要下载的文件");
+ }
+ },
+ downloadFileByWater(attId, fileSuffix) {
+ let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
+ if (fileExtension !== "pdf" && fileExtension !== "PDF") {
+ this.$message.error("水印下载仅支持PDF,pdf格式文件");
+ } else {
+ if (attId != null && attId !== "") {
+ window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
+ } else {
+ this.$message.error("请选择要下载的文件");
+ }
+ }
+ },
},
computed: {
listNoDataText() {
diff --git a/src/pages/processCenter/pages/creatProcess/qbfs/step3.vue b/src/pages/processCenter/pages/creatProcess/qbfs/step3.vue
index 9efe35b31..5e132ed8a 100644
--- a/src/pages/processCenter/pages/creatProcess/qbfs/step3.vue
+++ b/src/pages/processCenter/pages/creatProcess/qbfs/step3.vue
@@ -404,6 +404,28 @@ export default {
this.processStep = window.URL.createObjectURL(res.data)
})
},
+ /**
+ * @Description: 点击下载
+ */
+ downloadFile(attId) {
+ if (attId != null && attId !== "") {
+ window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
+ } else {
+ this.$message.error("请选择要下载的文件");
+ }
+ },
+ downloadFileByWater(attId, fileSuffix) {
+ let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
+ if (fileExtension !== "pdf" && fileExtension !== "PDF") {
+ this.$message.error("水印下载仅支持PDF,pdf格式文件");
+ } else {
+ if (attId != null && attId !== "") {
+ window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
+ } else {
+ this.$message.error("请选择要下载的文件");
+ }
+ }
+ },
},
computed: {
listNoDataText() {
diff --git a/src/pages/processCenter/pages/creatProcess/qbfs/step4.vue b/src/pages/processCenter/pages/creatProcess/qbfs/step4.vue
index bae052974..eeee1fbd4 100644
--- a/src/pages/processCenter/pages/creatProcess/qbfs/step4.vue
+++ b/src/pages/processCenter/pages/creatProcess/qbfs/step4.vue
@@ -63,6 +63,16 @@
clearable
>
+
+
+
+
+
+
@@ -119,6 +129,8 @@
暂无数据
+
+
@@ -126,23 +138,13 @@
-
-
-
-
-
-
-
-
-
-
{{ foldFormFlag ? "隐藏基础信息" : "展开基础信息" }}
-
+ @click="foldForm">{{ foldFormFlag ? "隐藏基础信息" : "展开基础信息" }}
+
审核信息
@@ -159,12 +161,12 @@
align="center">
+ label="审核意见">
@@ -283,42 +285,42 @@ import { changeAssigneeNew, inboundLiaisonDetail, saveTaskFirst } from "api/proc
export default {
name: "qbfsStep4",
- components:{
+ components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
},
data() {
return {
- active: '1',
+ active: "1",
isTransfer: false,
isSubmit: false,
saveLoading: false,
drawerModal: false,
- drawerTitle: '',
+ drawerTitle: "",
nodeList: [],
fileList: [],
- commentText: '',
+ commentText: "",
dataList: [],
detailData: [],
loading: false,
foldFormFlag: true,
- qbfsForm:{
- entNumber: '',
- cnName: '',
- enName: '',
- entCategory: '',
- replaceNumber: '',
- replacedNumber: '',
- releaseDate: '',
- implementDate: '',
- reviewDate: '',
- nextStatus: '',
+ qbfsForm: {
+ entNumber: "",
+ cnName: "",
+ enName: "",
+ entCategory: "",
+ replaceNumber: "",
+ replacedNumber: "",
+ releaseDate: "",
+ implementDate: "",
+ reviewDate: "",
+ nextStatus: ""
},
formRules: {
nextStatus: [
- {required: true, message: "请选择下一步状态", trigger: "change"}
- ],
+ { required: true, message: "请选择下一步状态", trigger: "change" }
+ ]
},
associationOptions: [{
value: "修订",
@@ -330,13 +332,13 @@ export default {
value: "有效",
label: "有效"
}]
- }
+ };
},
mounted() {
- this.processTable()
- this.getData()
+ this.processTable();
+ this.getData();
},
- methods:{
+ methods: {
processTable() {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
@@ -346,50 +348,81 @@ export default {
loading: "loading",
_this: this
}, res => {
- this.detailData = res
+ this.detailData = res;
}, e => {
- })
+ });
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.$route.query.taskIds,
- pId: this.$route.query.prcId,
+ pId: this.$route.query.prcId
}).then(res => {
if (res) {
- const processForm = JSON.parse(res.mesg)
- this.getFormFieldList(processForm)
+ const processForm = JSON.parse(res.mesg);
+ this.getFormFieldList(processForm);
}
}).catch(e => {
- })
- })
+ });
+ });
},
/**
* @description: 动态表单读取
*/
- getFormFieldList (item) {
- console.log(item);
+ getFormFieldList(item) {
this.$nextTick(() => {
- this.qbfsForm = JSON.parse(JSON.stringify(item))
- })
+ this.qbfsForm = JSON.parse(JSON.stringify(item));
+ let res = item.res ? item.res.substring(1, item.res.lastIndexOf("]")) : "";
+ res = res.split(",");
+ this.dataList = [];
+ res.forEach(item => {
+ this.dataList.push({
+ opinion: item.split("-")[1],
+ people: item.split("-")[0]
+ });
+ });
+ let list = [];
+ this.dataList.forEach(item => {
+ list.push(item.opinion);
+ this.findMost(list);
+ });
+
+ });
+ },
+ findMost(arr) {
+ if (!arr.length) return;
+ if (arr.length === 1) return 1;
+ let res = {};
+ let maxName, maxNum = 0;
+ // 遍历数组
+ arr.forEach((item) => {
+ res[item] ? res[item] += 1 : res[item] = 1;
+ if (res[item] > maxNum) {
+ maxName = item;
+ maxNum = res[item];
+ }
+ });
+ this.qbfsForm.nextStatus = maxName
+ // return "出现次数最多的元素为:" + maxName + ", 出现次数为:" + maxNum;
},
//流程提交
- handleSubmit(){
- this.isSubmit = true
- this.qbfsForm.commentText = this.commentText
+ handleSubmit() {
+ this.isSubmit = true;
+ this.qbfsForm.commentText = this.commentText;
+ this.qbfsForm.dataList = this.dataList;
let json = JSON.stringify(this.qbfsForm);
- this.$http.post('lawss/activiti/completeTask', {
+ this.$http.post("lawss/activiti/completeTask", {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
- json: json,
+ json: json
}, {
_this: this
}, res => {
if (res.success) {
- this.$message.success(res.message)
- this.$router.push('/processCenter')
+ this.$message.success(res.message);
+ this.$router.push("/processCenter");
}
- this.isSubmit = false
+ this.isSubmit = false;
}, e => {
});
},
@@ -401,52 +434,74 @@ export default {
this.foldFormFlag = !this.foldFormFlag;
},
//转办事件
- handleTransfer(){
- this.drawerModal = true
- this.drawerTitle = '转办处理人'
- this.selectPeople = row
+ handleTransfer() {
+ this.drawerModal = true;
+ this.drawerTitle = "转办处理人";
+ this.selectPeople = row;
},
//确认转办
- checkedRole (data) {
- this.assigneeNewLoading = true
+ checkedRole(data) {
+ this.assigneeNewLoading = true;
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
- this.isTransfer = false
+ this.isTransfer = false;
if (res.success) {
- this.drawerModal = false
- this.$message.success('调整成功')
+ this.drawerModal = false;
+ this.$message.success("调整成功");
this.$router.push("/processCenter");
- this.processNum()
+ this.processNum();
} else {
- this.$message.warning(res.message)
+ this.$message.warning(res.message);
}
- })
+ });
},
// 请求转换流程图
- processNum (row) {
+ processNum(row) {
axios.request({
- url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(),
- responseType: 'blob',
- method: 'get',
+ url: "/api/lawss/activiti/getImg?_t=" + new Date().getTime(),
+ responseType: "blob",
+ method: "get",
params: {
prcNum: this.$route.query.prcNum
}
}).then(res => {
// let blob = new Blob([res.data], {type: 'image/jpg'})
// let url = window.URL.createObjectURL(res.data)
- this.processStep = window.URL.createObjectURL(res.data)
- })
+ this.processStep = window.URL.createObjectURL(res.data);
+ });
},
+ /**
+ * @Description: 点击下载
+ */
+ downloadFile(attId) {
+ if (attId != null && attId !== "") {
+ window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
+ } else {
+ this.$message.error("请选择要下载的文件");
+ }
+ },
+ downloadFileByWater(attId, fileSuffix) {
+ let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
+ if (fileExtension !== "pdf" && fileExtension !== "PDF") {
+ this.$message.error("水印下载仅支持PDF,pdf格式文件");
+ } else {
+ if (attId != null && attId !== "") {
+ window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
+ } else {
+ this.$message.error("请选择要下载的文件");
+ }
+ }
+ }
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
- },
+ }
};