Merge branch 'main' of https://dd3skj.picp.vip/JyuHsin/zhgh_cug_v4
This commit is contained in:
@@ -65,22 +65,10 @@ module.exports = {
|
||||
let ids = []
|
||||
if (this.complete_result) {
|
||||
if (Array.isArray(val)) {
|
||||
ids = val.map((item) => {
|
||||
if (item.response.data.includes("=")) {
|
||||
return item?.response?.data.substring(item?.response?.data.lastIndexOf("=") + 1)
|
||||
} else {
|
||||
return item?.response?.data
|
||||
}
|
||||
})
|
||||
ids = val.map((item) => this.resolveFileId(item)).filter((id) => id)
|
||||
} else {
|
||||
try {
|
||||
ids = JSON.parse(val).map((item) => {
|
||||
if (item.response.data.includes("=")) {
|
||||
return item?.response?.data.substring(item?.response?.data.lastIndexOf("=") + 1)
|
||||
} else {
|
||||
return item?.response?.data
|
||||
}
|
||||
})
|
||||
ids = JSON.parse(val).map((item) => this.resolveFileId(item)).filter((id) => id)
|
||||
} catch (err) {
|
||||
this.fileList = []
|
||||
}
|
||||
@@ -100,6 +88,18 @@ module.exports = {
|
||||
this.requestFullFile(ids)
|
||||
},
|
||||
|
||||
// 新版上传组件保存 response.data,迁移的历史附件保留原文件主键 id。
|
||||
resolveFileId(item) {
|
||||
if (!item) {
|
||||
return ""
|
||||
}
|
||||
const fileValue = item.response && item.response.data ? item.response.data : item.id
|
||||
if (typeof fileValue !== "string" || !fileValue) {
|
||||
return ""
|
||||
}
|
||||
return fileValue.includes("=") ? fileValue.substring(fileValue.lastIndexOf("=") + 1) : fileValue
|
||||
},
|
||||
|
||||
requestFullFile(ids) {
|
||||
this.$axios.post("/platform/sys/file/previewFileData", {ids: JSON.stringify(ids)}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
|
||||
@@ -65,22 +65,10 @@ module.exports = {
|
||||
let ids = []
|
||||
if (this.complete_result) {
|
||||
if (Array.isArray(val)) {
|
||||
ids = val.map((item) => {
|
||||
if (item.response.data.includes("=")) {
|
||||
return item?.response?.data.substring(item?.response?.data.lastIndexOf("=") + 1)
|
||||
} else {
|
||||
return item?.response?.data
|
||||
}
|
||||
})
|
||||
ids = val.map((item) => this.resolveFileId(item)).filter((id) => id)
|
||||
} else {
|
||||
try {
|
||||
ids = JSON.parse(val).map((item) => {
|
||||
if (item.response.data.includes("=")) {
|
||||
return item?.response?.data.substring(item?.response?.data.lastIndexOf("=") + 1)
|
||||
} else {
|
||||
return item?.response?.data
|
||||
}
|
||||
})
|
||||
ids = JSON.parse(val).map((item) => this.resolveFileId(item)).filter((id) => id)
|
||||
} catch (err) {
|
||||
this.fileList = []
|
||||
}
|
||||
@@ -100,6 +88,18 @@ module.exports = {
|
||||
this.requestFullFile(ids)
|
||||
},
|
||||
|
||||
// 新版上传组件保存 response.data,迁移的历史附件保留原文件主键 id。
|
||||
resolveFileId(item) {
|
||||
if (!item) {
|
||||
return ""
|
||||
}
|
||||
const fileValue = item.response && item.response.data ? item.response.data : item.id
|
||||
if (typeof fileValue !== "string" || !fileValue) {
|
||||
return ""
|
||||
}
|
||||
return fileValue.includes("=") ? fileValue.substring(fileValue.lastIndexOf("=") + 1) : fileValue
|
||||
},
|
||||
|
||||
requestFullFile(ids) {
|
||||
this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify(ids) }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
|
||||
@@ -198,7 +198,8 @@ const branchUnionUserManage = {
|
||||
initJSearch() {
|
||||
const optionTask = this.jOptions.length ? $.Deferred().resolve().promise() : this.loadJOptions()
|
||||
$.when(optionTask, this.loadUsedJCodes()).then(() => {
|
||||
this.pageForm.j = this.getHighestUsedJ()
|
||||
// 页面初始化时不限定届次,默认展示该分工会所有届次的干部。
|
||||
this.pageForm.j = ""
|
||||
this.pageData()
|
||||
})
|
||||
},
|
||||
@@ -225,6 +226,8 @@ const branchUnionUserManage = {
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "partySecretaryUnitOptions", res.data || [])
|
||||
// 新增二级党委书记时,默认授权当前分工会下的全部二级单位。
|
||||
this.$set(this.formData, "unitIds", this.partySecretaryUnitOptions.map(item => item.id))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
<el-descriptions-item label="办理用户">{{ getTaskFormValue(task, "userName", "tf_userName")
|
||||
}}({{ getTaskFormValue(task, "loginName", "tf_loginName") }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
@@ -114,7 +114,7 @@
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
getTaskFormValue(task, "opinion", "tf_opinion") }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -125,7 +125,7 @@
|
||||
<el-descriptions border class="flow-task-form" :column="3">
|
||||
<el-descriptions-item label="办理用户">{{ record.userName }}({{ record.loginName }})</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ record.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">{{ record.auditPass ? "审核通过" : "审核不通过" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">{{ getLegacyAuditResult(record) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" span="3">{{ record.auditOpinion }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -140,7 +140,14 @@
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
viewData: {
|
||||
changeUserNum: [],
|
||||
detailedList: [],
|
||||
incomeCensus: [],
|
||||
jgUser: [],
|
||||
plans: [],
|
||||
yearActivityList: []
|
||||
},
|
||||
activeName: "1",
|
||||
row: {},
|
||||
doneTasks: [],
|
||||
@@ -165,37 +172,99 @@
|
||||
getAuditDisplayName(displayName) {
|
||||
return displayName === "协会审核" ? "会长审核" : displayName
|
||||
},
|
||||
// 历史流程任务使用tf_前缀保存表单字段,正常流程继续优先读取标准字段。
|
||||
getTaskFormValue(task, fieldName, legacyFieldName) {
|
||||
const formData = task.taskFormData || {}
|
||||
return formData[fieldName] || formData[legacyFieldName] || "—"
|
||||
},
|
||||
// 旧审核表的auditPass可能为空,不能按false错误展示为审核不通过。
|
||||
getLegacyAuditResult(record) {
|
||||
if (record.auditPass === true || record.auditPass === 1) {
|
||||
return "审核通过"
|
||||
}
|
||||
if (record.auditPass === false || record.auditPass === 0) {
|
||||
return "审核不通过"
|
||||
}
|
||||
return "—"
|
||||
},
|
||||
async onOpen(row) {
|
||||
this.row = row
|
||||
const resp = await this.$axios.post("/platform/club/examine/common/findOne", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.$set(this, "legacyAuditRecords", resp.data.legacyAuditRecords || [])
|
||||
await this.getClubUserNum(resp.data.clubId)
|
||||
await this.getJgUser(resp.data.clubId)
|
||||
this.$set(this, "row", row)
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$set(this, "legacyAuditRecords", [])
|
||||
try {
|
||||
const resp = await this.$axios.post("/platform/club/examine/common/findOne", { id: row.id })
|
||||
if (resp.code !== 0) {
|
||||
this.$message.error(resp.msg || "查询年审详情失败")
|
||||
return
|
||||
}
|
||||
const viewData = resp.data || {}
|
||||
this.$set(this, "viewData", viewData)
|
||||
this.$set(this, "legacyAuditRecords", viewData.legacyAuditRecords || [])
|
||||
// 三类补充数据独立加载,成员变化统计失败不能阻断成员和审核记录显示。
|
||||
await Promise.all([
|
||||
this.getClubUserNum(viewData.clubId),
|
||||
this.getJgUser(viewData.clubId),
|
||||
this.getDoneTasks()
|
||||
])
|
||||
} catch (error) {
|
||||
this.$message.error("查询年审详情失败")
|
||||
}
|
||||
this.getDoneTasks()
|
||||
},
|
||||
async getClubUserNum(clubId) {
|
||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", {
|
||||
clubId: clubId,
|
||||
year: this.row.year
|
||||
})
|
||||
this.$set(this.viewData, "changeUserNum", resp.data)
|
||||
if (!clubId) {
|
||||
this.$set(this.viewData, "changeUserNum", [])
|
||||
return
|
||||
}
|
||||
try {
|
||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", {
|
||||
clubId: clubId,
|
||||
year: this.row.year
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$set(this.viewData, "changeUserNum", resp.data || [])
|
||||
} else {
|
||||
this.$set(this.viewData, "changeUserNum", [])
|
||||
this.$message.warning(resp.msg || "查询社团成员变化情况失败")
|
||||
}
|
||||
} catch (error) {
|
||||
this.$set(this.viewData, "changeUserNum", [])
|
||||
this.$message.warning("查询社团成员变化情况失败")
|
||||
}
|
||||
},
|
||||
async getJgUser(clubId) {
|
||||
const respUser = await this.$axios.post("/platform/club/examine/apply/getJgUser", {
|
||||
clubId: clubId
|
||||
})
|
||||
this.$set(this.viewData, "jgUser", respUser.data)
|
||||
if (!clubId) {
|
||||
this.$set(this.viewData, "jgUser", [])
|
||||
return
|
||||
}
|
||||
try {
|
||||
const respUser = await this.$axios.post("/platform/club/examine/apply/getJgUser", {
|
||||
clubId: clubId
|
||||
})
|
||||
if (respUser.code === 0) {
|
||||
this.$set(this.viewData, "jgUser", respUser.data || [])
|
||||
} else {
|
||||
this.$set(this.viewData, "jgUser", [])
|
||||
this.$message.warning(respUser.msg || "查询社团成员失败")
|
||||
}
|
||||
} catch (error) {
|
||||
this.$set(this.viewData, "jgUser", [])
|
||||
this.$message.warning("查询社团成员失败")
|
||||
}
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
async getDoneTasks() {
|
||||
try {
|
||||
const res = await this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id})
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "doneTasks", res.data || [])
|
||||
} else {
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$message.warning(res.msg || "查询审核记录失败")
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$message.warning("查询审核记录失败")
|
||||
}
|
||||
},
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
|
||||
@@ -103,6 +103,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-button
|
||||
type="primary"
|
||||
block
|
||||
:class="answerRecord.isFinish ? 'vote-finished-button' : ''"
|
||||
:disabled="answerRecord.isFinish || isEnd"
|
||||
@click="onSubmit">
|
||||
<i :class="answerRecord.isFinish ? 'fa fa-check-circle' : 'fa fa-paper-plane'"></i>
|
||||
@@ -1980,6 +1981,13 @@ layout("/layouts/platform_h5.html"){
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 已完成投票状态使用浅蓝色,与投票结束状态保持区分。 */
|
||||
.vote-bottom .van-button.vote-finished-button,
|
||||
.vote-bottom .van-button.vote-finished-button.van-button--disabled {
|
||||
color: #ffffff;
|
||||
background: #86a8f7;
|
||||
}
|
||||
|
||||
.vote-bottom .van-button .fa {
|
||||
display: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user