From 8a0d7e5ebfe667aefc1e3746c5cd5b49302b2ffb Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Wed, 27 Oct 2021 17:58:00 +0800 Subject: [PATCH] commit --- .../pages/creatProcess/zcch/step1-1.vue | 903 ++++++++++++++++++ .../pages/creatProcess/zcch/step1.vue | 582 ++++++++++- .../pages/creatProcess/zcch/step2.vue | 433 +++++++++ .../pages/creatProcess/zcch/step3.vue | 408 ++++++++ .../pages/creatProcess/zchh/step1.vue | 2 +- .../pages/creatProcess/zcrh/step1-1.vue | 9 +- .../pages/creatProcess/zcrh/step1.vue | 4 +- .../pages/creatProcess/zcrh/step2.vue | 12 +- .../pages/creatProcess/zcrh/step3.vue | 12 +- .../pages/creatProcess/zcrh/step4.vue | 12 +- .../tabComponents/processCenter/index.vue | 36 + src/router/index.js | 27 + src/sysConfig/index.js | 8 +- 13 files changed, 2381 insertions(+), 67 deletions(-) create mode 100644 src/pages/processCenter/pages/creatProcess/zcch/step1-1.vue create mode 100644 src/pages/processCenter/pages/creatProcess/zcch/step2.vue create mode 100644 src/pages/processCenter/pages/creatProcess/zcch/step3.vue diff --git a/src/pages/processCenter/pages/creatProcess/zcch/step1-1.vue b/src/pages/processCenter/pages/creatProcess/zcch/step1-1.vue new file mode 100644 index 000000000..26ed1e131 --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/zcch/step1-1.vue @@ -0,0 +1,903 @@ + + + + + + + diff --git a/src/pages/processCenter/pages/creatProcess/zcch/step1.vue b/src/pages/processCenter/pages/creatProcess/zcch/step1.vue index d9b6940eb..ab63262d7 100644 --- a/src/pages/processCenter/pages/creatProcess/zcch/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zcch/step1.vue @@ -11,7 +11,7 @@
- + + placeholder="请选择参会时间"> @@ -66,12 +66,26 @@ > - - 点击上传 - + +
+
+ {{ item.name }} +
+
+
+ + 点击上传 + +
- {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} + {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} - +
- + 添加 - + 批量删除
@@ -109,36 +123,49 @@ row-key="id"> + + + + - +
- + 添加 - + 批量删除
@@ -153,48 +180,103 @@ row-key="id"> + + + + + + + + + + +
+ + +
+
+
@@ -207,44 +289,33 @@ class="label-input-form"> - +

流程发起人

- - + +
- + - +

法规认证部部长

- - -
-
-
-
- - - -

法规认证部副总监

-
- - + +
- +

公司副总

- - + +
@@ -262,6 +333,55 @@ @submit="handleSubmit" > + + +
+ +

点击或拖拽上传文件

+
+
+
+ + +
+ +

点击或拖拽上传文件

+
+
+
+
@@ -280,6 +400,7 @@ }, data() { return { + commentText: '', isSubmit: false, saveLoading: false, active: "1", //默认显示 @@ -291,16 +412,250 @@ time2: '', place: '', Company: '', + modelNameList: '', + modelList: [] + }, + formRules: { + title: [ + { required: true, message: '请输入课题名称', trigger: 'blur' }, + ], + content: [ + { required: true, message: '请输入主要议题', trigger: 'blur' }, + ], + price: [ + { required: true, message: '请输入费用', trigger: 'blur' }, + ], + time: [ + { required: true, message: '请选择课题研究周期', trigger: 'change' }, + ], + time2: [ + { required: true, message: '请选择参会时间', trigger: 'change' }, + ], + place: [ + { required: true, message: '请输入参会地点', trigger: 'blur' }, + ], + Company: [ + { required: true, message: '请输入承办单位', trigger: 'blur' }, + ], + modelNameList: [ + { required: true, message: '请上传课题组通知', trigger: 'blur' }, + ] }, - formRules: {}, foldFormFlag: true, data1: [], data2: [], - roleForm: {}, - roleFormRules: {} + roleForm: { + revisionId: this.$store.getters.userInfo.userId, + revisionIdName: this.$store.getters.userInfo.userName, + ministerId: '', + ministerIdName: '', + presidentId: '', + presidentIdName: '', + }, + roleFormRules: { + ministerIdName: [ + {required: true, message: '请选择法规认证部部长', trigger: 'change'}, + ], + inspectorIdName: [ + {required: true, message: '请选择法规认证部总监', trigger: 'change'}, + ], + presidentIdName: [ + {required: true, message: '请选择公司副总', trigger: 'change'}, + ] + }, + fileMadel: false, + fileMadel2: false, + fileUrl: 'api/att/attFile/upload', + idList1: [], + idList2: [], + fileIndex: '', + fileList: [], + nodeList: [], + type: '', + drawerTitle: '', + modalshowflag: false, } }, methods: { + add1() { + var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); + var json = { + ContactPerson: '', + Company: '', + Telephone: '', + Email: '', + id: id + } + this.data1.push(json) + }, + add2() { + var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); + var json = { + Sindex: '', + Member: '', + Company: '', + Email: '', + id: id, + Department: '', + Telephone: '', + Identity: '', + dataName: '', + data: [], + } + this.data2.push(json) + }, + addDelete1() { + if (this.idList1.length > 0) { + this.$confirm('删除选中数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + for (let a = 0; a < this.data1.length; a++) { + this.idList1.forEach(item => { + if (this.data1[a].id === item) { + this.data1.splice(a, 1) + } + }) + } + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }); + }); + } else { + this.$message.warning('请选择要删除的数据') + } + }, + addDelete2() { + if (this.idList2.length > 0) { + this.$confirm('删除选中数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + for (let a = 0; a < this.data2.length; a++) { + this.idList2.forEach(item => { + if (this.data2[a].id === item) { + this.data2.splice(a, 1) + } + }) + } + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }); + }); + } else { + this.$message.warning('请选择要删除的数据') + } + }, + // 导入按钮 上传之前的钩子 + 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 === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx') { + return true + } else { + this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS文件') + 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 + }, + importFileSuccess(response, file) { + if (response.ok) { + this.rhform.modelList.push(response.data) + let list = '' + this.rhform.modelList.forEach(item => { + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.rhform.modelNameList = list + this.$message({ + showClose: true, + message: response.message, + type: 'success' + }) + } else { + this.$message.error('程序异常,上传失败') + } + }, + importFileRemove(file, fileList) { + let list = '' + this.rhform.modelList = [] + fileList.forEach(item => { + this.rhform.modelList.push(item) + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.rhform.modelNameList = list + }, + importFileSuccess2(response, file) { + if (response.ok) { + this.data2[this.fileIndex].data.push(response.data) + let list = '' + this.data2[this.fileIndex].data.forEach(item => { + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.data2[this.fileIndex].dataName = list + this.$message({ + showClose: true, + message: response.message, + type: 'success' + }) + } else { + this.$message.error('程序异常,上传失败') + } + }, + importFileRemove2(file, fileList) { + let list = '' + this.data2[this.fileIndex].data = [] + fileList.forEach(item => { + this.data2[this.fileIndex].data.push(item) + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.data2[this.fileIndex].dataName = list + }, + fileUpload() { + this.fileMadel = true + }, + fileUpload2(index) { + this.fileIndex = index + this.fileList = this.data2[this.fileIndex].data + this.fileMadel2 = true + }, handleTabs(type) { this.active = type; }, // 切换tabs @@ -310,14 +665,139 @@ handleSave() { }, // 保存事件 handleSubmit() { - console.log(this.rhform); + this.$refs['rhForm'].validate((valid) => { + if (valid) { + if (this.data1.length) { + if (this.data2.length) { + let ContactPerson = 0,Company = 0,Telephone = 0,Email = 0,Sindex = 0,Member = 0,Telephone2 = 0,Email2 = 0, Company2 = 0,Department = 0,Identity = 0 + this.data1.forEach((item, index) =>{ + if (!item.ContactPerson) { + ContactPerson++ + } else if (!item.Company) { + Company++ + } else if (!item.Telephone) { + Telephone++ + } else if (!item.Email) { + Email++ + } + }) + this.data2.forEach((item, index) =>{ + if (!item.Sindex) { + Sindex++ + } else if (!item.Member) { + Member++ + } else if (!item.Telephone) { + Telephone2++ + } else if (!item.Email) { + Email2++ + } else if (!item.Company) { + Company2++ + } else if (!item.Department) { + Department++ + } else if (!item.Identity) { + Identity++ + } + }) + if (ContactPerson > 0) { + return this.$message.warning('请输入联络人') + } else if (Company > 0) { + return this.$message.warning('请输入课题组联络人单位') + } else if (Telephone > 0) { + return this.$message.warning('请输入课题组联络人电话') + } else if (Email > 0) { + return this.$message.warning('请输入课题组联络人邮箱') + } else if (Sindex > 0) { + return this.$message.warning('请输入工作组排名顺序') + } else if (Member > 0) { + return this.$message.warning('请输入我司成员') + } else if (Telephone2 > 0) { + return this.$message.warning('请输入内部参与人员电话') + } else if (Email2 > 0) { + return this.$message.warning('请输入内部参与人员油邮箱') + } else if (Company2 > 0) { + return this.$message.warning('请输入内部参与人员单位') + } else if (Department > 0) { + return this.$message.warning('请输入内部参与人员部门') + } else if (Identity > 0) { + return this.$message.warning('请输入内部参与人员身份') + } else { + this.$refs['Form'].validate((valid) => { + if (valid) { + this.isSubmit = true + this.$http.get('lawss/activiti/startProcess', { + type: '18' + }, {}, res => { + if (res.ok) { + var json = Object.assign(this.rhform, this.roleForm) + json.commentText = this.commentText + json.data1 = this.data1 + json.data2 = this.data2 + this.$http.post('lawss/activiti/completeTask', { + json: JSON.stringify(json), + taskId: res.data, + userId: this.$store.getters.userInfo.userId + }, {}, res => { + if (res.success) { + this.$message.success('流程发起成功') + this.$router.push('/processCenter') + this.isSubmit = false + } else { + this.$message.warning('流程启动失败') + this.isSubmit = false + } + }) + } else { + this.$message.warning('流程启动失败') + this.isSubmit = false + } + }) + } else { + return this.$message.warning('请完善人员信息') + } + }) + } + } else { + return this.$message.warning('请添加集团内部参与人员') + } + } else { + return this.$message.warning('请添加课题组人员') + } + } else { + return this.$message.warning('请完善基础信息') + } + }) }, // 提交事件 - handleSelectionChange1() { + handleSelectionChange1(val) { + this.idList1 = [] + val.forEach(item => { + this.idList1.push(item.id) + }) }, // table1选中change事件 - handleSelectionChange2() { + handleSelectionChange2(val) { + this.idList2 = [] + val.forEach(item => { + this.idList2.push(item.id) + }) }, // table2选中change事件 - choiceZRR() { + choiceZRR(type, title, id) { + this.nodeList = [] + this.nodeList.push(id) + this.type = type + this.drawerTitle = title + this.modalshowflag = true }, // 点击人员input事件 + checkedRole(data) { + if (this.type === 'ministerId') { + this.roleForm.ministerId = data[0].id + this.roleForm.ministerIdName = data[0].name + } else if (this.type === 'inspectorId') { + this.roleForm.inspectorId = data[0].id + this.roleForm.inspectorIdName = data[0].name + } else if (this.type === 'presidentId') { + this.roleForm.presidentId = data[0].id + this.roleForm.presidentIdName = data[0].name + } + }, // 选择人员确认事件 }, mounted() {} }; diff --git a/src/pages/processCenter/pages/creatProcess/zcch/step2.vue b/src/pages/processCenter/pages/creatProcess/zcch/step2.vue new file mode 100644 index 000000000..0242c64f2 --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/zcch/step2.vue @@ -0,0 +1,433 @@ + + + + + + + diff --git a/src/pages/processCenter/pages/creatProcess/zcch/step3.vue b/src/pages/processCenter/pages/creatProcess/zcch/step3.vue new file mode 100644 index 000000000..fdf0fe27f --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/zcch/step3.vue @@ -0,0 +1,408 @@ + + + + + + + diff --git a/src/pages/processCenter/pages/creatProcess/zchh/step1.vue b/src/pages/processCenter/pages/creatProcess/zchh/step1.vue index 930ba594e..1d7dd9a29 100644 --- a/src/pages/processCenter/pages/creatProcess/zchh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zchh/step1.vue @@ -99,7 +99,7 @@ - {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} + {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} diff --git a/src/pages/processCenter/pages/creatProcess/zcrh/step1-1.vue b/src/pages/processCenter/pages/creatProcess/zcrh/step1-1.vue index 49d6f6d84..464d47d12 100644 --- a/src/pages/processCenter/pages/creatProcess/zcrh/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/zcrh/step1-1.vue @@ -78,7 +78,7 @@ - {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} + {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }} @@ -223,7 +223,7 @@