From 7acba6aaaaab5efc316210bc2168d4fd509dcecf Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Tue, 26 Oct 2021 16:34:07 +0800 Subject: [PATCH] commit --- .../pages/creatProcess/bzzqyj/step3.vue | 1 - .../pages/creatProcess/zcch/step1.vue | 371 ++++++++++- .../pages/creatProcess/zchh/step1.vue | 387 ++++++++++- .../pages/creatProcess/zcrh/step1.vue | 617 +++++++++++++++++- .../processCenter/pages/newProcess/index.vue | 86 +-- src/sysConfig/index.js | 6 +- 6 files changed, 1354 insertions(+), 114 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue index 78047915f..3d0aa2caf 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue @@ -379,7 +379,6 @@ export default { } else { this.$message.warning('请选择要删除的数据') } - }, addModal() { var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); diff --git a/src/pages/processCenter/pages/creatProcess/zcch/step1.vue b/src/pages/processCenter/pages/creatProcess/zcch/step1.vue index bb568704b..d9b6940eb 100644 --- a/src/pages/processCenter/pages/creatProcess/zcch/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zcch/step1.vue @@ -1,18 +1,324 @@ @@ -20,7 +326,62 @@ diff --git a/src/pages/processCenter/pages/creatProcess/zchh/step1.vue b/src/pages/processCenter/pages/creatProcess/zchh/step1.vue index 797f86fb4..930ba594e 100644 --- a/src/pages/processCenter/pages/creatProcess/zchh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zchh/step1.vue @@ -1,18 +1,340 @@ @@ -20,7 +342,62 @@ diff --git a/src/pages/processCenter/pages/creatProcess/zcrh/step1.vue b/src/pages/processCenter/pages/creatProcess/zcrh/step1.vue index e9ecaeb3e..e7e394d54 100644 --- a/src/pages/processCenter/pages/creatProcess/zcrh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zcrh/step1.vue @@ -11,7 +11,7 @@
+ + +
+
+ {{ item.name }} +
+
+
+ + 点击上传 + +
+
@@ -59,8 +81,16 @@ {{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }}
- + +
+ + 添加 + + + 批量删除 + +
+ + + + - + +
+ + 添加 + + + 批量删除 + +
+ + + + + + + + + + +
+ + +
+
+
- 2 +
+ + + + + +

流程发起人

+
+ + +
+
+
+
+ + + +

法规认证部部长

+
+ + +
+
+
+
+ + + +

法规认证部副总监

+
+ + +
+
+
+
+ + + +

公司副总

+
+ + +
+
+
+
+
+
+
+ + +
+ +

点击或拖拽上传文件

+
+
+
+ + +
+ +

点击或拖拽上传文件

+
+
+
+ @@ -182,6 +390,7 @@ }, data() { return { + commentText: '', isSubmit: false, saveLoading: false, active: "1", //默认显示 @@ -189,27 +398,386 @@ title: '', content: '', price: '', - time: '' + time: '', + 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' }, + ], + modelNameList: [ + { required: true, message: '请上传课题组通知', trigger: 'blur' }, + ] }, - formRules: {}, foldFormFlag: true, data1: [], data2: [], + roleForm: { + revisionId: this.$store.getters.userInfo.userId, + revisionIdName: this.$store.getters.userInfo.userName, + ministerId: '', + ministerIdName: '', + inspectorId: '', + inspectorIdName: '', + 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 foldForm() { this.foldFormFlag = !this.foldFormFlag - }, - handleSave() {}, + }, // 基础信息显隐 + handleSave() { + }, // 保存事件 handleSubmit() { - console.log(this.rhform); - }, - handleSelectionChange1() {}, - handleSelectionChange2() {} + 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: '17' + }, {}, 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(val) { + this.idList1 = [] + val.forEach(item => { + this.idList1.push(item.id) + }) + }, // table1选中change事件 + handleSelectionChange2(val) { + this.idList2 = [] + val.forEach(item => { + this.idList2.push(item.id) + }) + }, // table2选中change事件 + 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() {} }; @@ -263,6 +831,15 @@ background: #E6A23C; } } + .label-input-form { + .add-form-item { + /deep/.el-form-item__content { + .el-date-editor { + width: 400px; + } + } + } + } } diff --git a/src/pages/processCenter/pages/newProcess/index.vue b/src/pages/processCenter/pages/newProcess/index.vue index abc990067..132aee081 100644 --- a/src/pages/processCenter/pages/newProcess/index.vue +++ b/src/pages/processCenter/pages/newProcess/index.vue @@ -144,7 +144,7 @@ -
+
@@ -159,7 +159,7 @@ -
+
@@ -174,7 +174,7 @@ -
+
@@ -202,62 +202,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -360,37 +304,19 @@ export default { name:'xmqdqrStep1' }) break - case '12': - // 赵开耀的流程 - this.$router.push({ - name: 'zhaokaiyaoStep1' - }) - break - case '13': - // 严逸舟的流程 - this.$router.push({ - name: 'yanyizhouStep1' - }) - break - case '14': - // 张宇欢的流程 - this.$router.push({ - name: 'zhangyuhuanStep1' - }) - break - case '15': + case '17': //政策课题入会流程 this.$router.push({ name: 'zcrhStep1' }) break - case '16': + case '18': //政策课题参会流程 this.$router.push({ name: 'zcchStep1' }) break - case '17': + case '19': //政策课题会后流程 this.$router.push({ name: 'zchhStep1' diff --git a/src/sysConfig/index.js b/src/sysConfig/index.js index 5d43f6adf..6a5e62254 100644 --- a/src/sysConfig/index.js +++ b/src/sysConfig/index.js @@ -6,9 +6,9 @@ // 服务器地址 // const devIp = '39.98.140.126' // const devInterfacePORT = '10005' -// const devIp = '192.168.10.248' -const devIp = '62.234.136.153' -const devInterfacePORT = '8033' +const devIp = '192.168.10.52' +// const devIp = '62.234.136.153' +const devInterfacePORT = '9999' // 配置 idm 认证 const ssoLogin = 'http://sso.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&response_type=code&redirect_uri=' // 配置 前端服务