From 2b9764c0b294169c9070c24626fab36c5d8e341f Mon Sep 17 00:00:00 2001
From: yuejiayang <146344614+YangLei105@users.noreply.github.com>
Date: Mon, 4 Nov 2024 12:33:37 +0800
Subject: [PATCH] =?UTF-8?q?2024.11.4=20=E6=96=87=E6=A1=A3=E6=94=B6?=
=?UTF-8?q?=E9=9B=86=E6=9B=B4=E6=96=B0=20=E5=AE=A1=E6=89=B9=E4=B8=9A?=
=?UTF-8?q?=E5=8A=A1=E7=B1=BB=E5=9E=8B=E3=80=81=E6=98=AF=E5=90=A6=E5=90=8C?=
=?UTF-8?q?=E6=97=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/auth/authRule.vue | 71 +++++++++++--------
.../modules/eam/eamProjectInfoForUploads.vue | 18 +++--
2 files changed, 54 insertions(+), 35 deletions(-)
diff --git a/src/views/modules/auth/authRule.vue b/src/views/modules/auth/authRule.vue
index d05a35c..655aa1e 100644
--- a/src/views/modules/auth/authRule.vue
+++ b/src/views/modules/auth/authRule.vue
@@ -171,8 +171,14 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{ scope.row[item.columnProp] }}
-
+
+ 启用
+ 禁用
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
-
-
-
-
-
-
-
-
+
+ 是否同时
+
+
+
+
+
+
+
+
+
+
@@ -398,6 +408,7 @@ export default {
userName: this.$store.state.user.name,
buNo: '',
recordType: '',
+ isSimultaneous: false,
authRuleId: '',
ruleNo: '',
ruleDesc: '',
@@ -1034,6 +1045,13 @@ export default {
handler: function (newV, oldV) {
this.ruleStepModalData.authGroupNo = this.ruleStepModalData.authGroupNo.toUpperCase()
}
+ },
+ // 监听 modalData.recordType 的变化,动态设置 isSimultaneous
+ 'modalData.recordType': function (newVal) {
+ if (this.modalData.flag === '1') {
+ // 根据 recordType 的值设置 isSimultaneous
+ this.modalData.isSimultaneous = newVal === 2 && newVal !== undefined;
+ }
}
},
mounted () {
@@ -1167,6 +1185,7 @@ export default {
priority: 1,
phaseInDate: new Date(),
active: 'Y',
+ isSimultaneous: false,
createBy: this.$store.state.user.name,
}
this.modalDisableFlag = false
@@ -1209,13 +1228,6 @@ export default {
* @param row
*/
updateModal (row) {
- if (row.active) {
- if (row.active === '启用') {
- row.active = 'Y'
- } else {
- row.active = 'N'
- }
- }
this.modalData = {
flag: '2',
title: '审批规则编辑',
@@ -1233,6 +1245,7 @@ export default {
phaseOutDate: row.phaseOutDate,
remark: row.remark,
active: row.active,
+ isSimultaneous: row.isSimultaneous,
createBy: row.createBy,
createDate: row.createDate,
updateBy: this.$store.state.user.name,
@@ -1400,17 +1413,19 @@ export default {
}
if (this.ruleStepDataList != null && this.ruleStepDataList.length > 0) {
for (let i = 0; i < this.ruleStepDataList.length; i++) {
- if(this.ruleStepModalData.firstStepFlag === 'Y' && this.ruleStepDataList[i].firstStepFlag === 'Y') {
- this.$alert('该审批步骤下已存在首步骤!', '提示', {
- confirmButtonText: '确定'
- })
- return
- }
- if(this.ruleStepModalData.lastStepFlag === 'Y' && this.ruleStepDataList[i].lastStepFlag === 'Y') {
- this.$alert('该审批步骤下已存在末步骤!', '提示', {
- confirmButtonText: '确定'
- })
- return
+ if (this.ruleStepModalData.stepNo !== this.ruleStepDataList[i].stepNo) {
+ if(this.ruleStepModalData.firstStepFlag === 'Y' && this.ruleStepDataList[i].firstStepFlag === 'Y') {
+ this.$alert('该审批步骤下已存在首步骤!', '提示', {
+ confirmButtonText: '确定'
+ })
+ return
+ }
+ if(this.ruleStepModalData.lastStepFlag === 'Y' && this.ruleStepDataList[i].lastStepFlag === 'Y') {
+ this.$alert('该审批步骤下已存在末步骤!', '提示', {
+ confirmButtonText: '确定'
+ })
+ return
+ }
}
}
}
diff --git a/src/views/modules/eam/eamProjectInfoForUploads.vue b/src/views/modules/eam/eamProjectInfoForUploads.vue
index 23dd8ec..f855ae2 100644
--- a/src/views/modules/eam/eamProjectInfoForUploads.vue
+++ b/src/views/modules/eam/eamProjectInfoForUploads.vue
@@ -153,7 +153,7 @@
v-if="this.$route.query.flag !== '2' && this.$route.query.flag !== '1'"
:fields="fields()"
:data="exportData"
- type="xls"
+ type="xlsx"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
@@ -270,9 +270,10 @@ export default {
return {
// 导出
exportData: [],
- exportName: '待上传文件' + this.dayjs().format('YYYYMMDDHHmmss'),
+ exportName: '待上传文件' + this.dayjs().format('YYYYMMDDHHmmss') + '.xlsx',
exportHeader: ['待上传文件'],
exportFooter: [],
+ exportList:[],
folder: '',
dataList: [],
allDataList: [],
@@ -1266,9 +1267,12 @@ export default {
// 获取数据列表
getDataList (params) {
+ console.log(this.searchData.projectLeader)
this.selectTypeFlag = params
- this.searchData.limit = 20
- this.searchData.page = 1
+ // 如果this.pageSize/10为整数
+
+ this.searchData.limit = this.pageSize % 10 === 0 ? this.pageSize : 20
+ this.searchData.page = this.pageIndex
if (this.$route.query.flag === '2') {
searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => {
if (data.code === 0) {
@@ -1392,7 +1396,7 @@ export default {
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
- this.pageSize = -1
+ this.pageSize = this.dataList.length + 1
this.totalPage = this.dataList.length + 1
}
}
@@ -1522,7 +1526,7 @@ export default {
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
- this.pageSize = -1
+ this.pageSize = this.dataList.length + 1
this.totalPage = this.dataList.length + 1
}
}
@@ -1663,7 +1667,7 @@ export default {
}
this.dataList = this.dataList.filter(item => item.projectLeader === this.searchData.projectLeader);
this.pageIndex = 1
- this.pageSize = -1
+ this.pageSize = this.dataList.length + 1
this.totalPage = this.dataList.length + 1
}
} else {