fix: 完善年度考核签字展示及文化活动编辑与权限处理
- 补充年度考核审核记录的签字结果展示,兼容历史记录 - 修复文化活动编辑时联系人为空导致加载中断的问题 - 修复活动列表异步组件挂载时的节点查询异常 - 修正全局 jQuery 请求回调的错误提示 - 增加人员范围设置及人员调整的入口权限校验 - 修复设置活动人员失败后错误未提示、持续加载的问题
This commit is contained in:
@@ -11,25 +11,25 @@
|
||||
$.ajaxSetup({
|
||||
contentType: "application/x-www-form-urlencoded;charset=utf-8",
|
||||
success: function (response, textStatus, jqXHR) {
|
||||
if (response.code !== 0) {
|
||||
this.$message.error(response.msg)
|
||||
if (response && typeof response === "object" && response.code !== undefined && response.code !== 0) {
|
||||
Vue.prototype.$message.error(response.msg)
|
||||
} else {
|
||||
return response
|
||||
}
|
||||
},
|
||||
error: function (v1) {
|
||||
this.$message.error(v1.status + " " + v1.statusText)
|
||||
Vue.prototype.$message.error(v1.status + " " + v1.statusText)
|
||||
},
|
||||
complete: function (XMLHttpRequest, textStatus) {
|
||||
var sessionstatus = XMLHttpRequest.getResponseHeader("loginStatus") //通过XMLHttpRequest取得响应头,sessionstatus,
|
||||
if (sessionstatus == "accessDenied") {
|
||||
this.$message({
|
||||
Vue.prototype.$message({
|
||||
message: "\u767b\u5f55\u5931\u6548\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u65b0\u767b\u5f55",
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
if (sessionstatus == "unauthorized") {
|
||||
this.$message({
|
||||
Vue.prototype.$message({
|
||||
message: "\u6ca1\u6709\u6743\u9650",
|
||||
type: "error"
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div style="padding: 0px 16px" class="clearfix">
|
||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="userScopeDialog = false">返回</el-button>
|
||||
</div>
|
||||
<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick" style="margin: 20px">
|
||||
<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick" :before-leave="beforeTabLeave" style="margin: 20px">
|
||||
<el-tab-pane label="人员设置" name="1">
|
||||
<template>
|
||||
<user-scope ref="userScope" @group_change="group_change" :group_id.sync="groupId"></user-scope>
|
||||
@@ -12,7 +12,7 @@
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="人员调整" name="2">
|
||||
<user-data-scope @group_change="group_change" ref="userDataScope"></user-data-scope>
|
||||
<user-data-scope v-if="activeName === '2'" @group_change="group_change" ref="userDataScope"></user-data-scope>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
@@ -32,9 +32,19 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
beforeTabLeave(name) {
|
||||
const permission = name === "2" ? "activity.basic.user" : "activity.basic.scope"
|
||||
if (!this.$auth.hasRole("SYSADMIN") && !this.$auth.hasPermission(permission)) {
|
||||
this.$message.error("无此权限:" + permission)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
handleClick() {
|
||||
if (this.activeName === "2") {
|
||||
this.$refs.userDataScope.getActivityGroup()
|
||||
if (this.$refs.userDataScope) {
|
||||
this.$refs.userDataScope.getActivityGroup()
|
||||
}
|
||||
} else {
|
||||
this.$refs.userScope.getActivityGroup()
|
||||
}
|
||||
|
||||
@@ -680,6 +680,10 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
doSetActivityUser() {
|
||||
if (!this.$auth.hasRole("SYSADMIN") && !this.$auth.hasPermission("activity.basic.scope")) {
|
||||
this.$message.error("无此权限:activity.basic.scope")
|
||||
return
|
||||
}
|
||||
// 方法级状态保护与整页遮罩共同阻止慢请求期间的重复确认。
|
||||
if (this.settingLoading) {
|
||||
return
|
||||
@@ -711,11 +715,15 @@ module.exports = {
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(255, 255, 255, 0.65)"
|
||||
})
|
||||
const pageForm = this.normalizePageForm(this.pageForm)
|
||||
Object.assign(pageForm, this.formData)
|
||||
|
||||
$.post("/platform/activity/basic/scope/doSetActivityUser", {
|
||||
data: JSON.stringify(pageForm)
|
||||
Promise.resolve().then(() => {
|
||||
const pageForm = this.normalizePageForm(this.pageForm)
|
||||
Object.assign(pageForm, this.formData)
|
||||
return $.ajax({
|
||||
url: "/platform/activity/basic/scope/doSetActivityUser",
|
||||
type: "POST",
|
||||
data: { data: JSON.stringify(pageForm) },
|
||||
success: () => {}
|
||||
})
|
||||
}).then((resp) => {
|
||||
if (resp.code !== 0) {
|
||||
// 将后端业务错误转入统一失败分支,直接展示接口返回的真实原因。
|
||||
@@ -741,7 +749,7 @@ module.exports = {
|
||||
? error.message
|
||||
: "设置活动人员失败"
|
||||
this.$message.error(errorMessage)
|
||||
}).always(() => {
|
||||
}).finally(() => {
|
||||
this.settingLoading = false
|
||||
loading.close()
|
||||
})
|
||||
|
||||
@@ -171,7 +171,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
@click="openUserScope"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -370,12 +370,14 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :span="24">
|
||||
<el-form-item label="报名表单" prop="formConfig"
|
||||
v-if="formData.isEnrollSystem&&formData.signUpMethod===1">
|
||||
<custom-form-field v-model="formData.formConfig"></custom-form-field>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-->
|
||||
|
||||
<el-col :span="24" v-if="formData.signUpMethod!=null&&formData.isEnrollSystem">
|
||||
<el-form-item label="封面图" prop="cover">
|
||||
@@ -977,13 +979,20 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
this.$set(this.formData, "time", val)
|
||||
},
|
||||
userChang(id) {
|
||||
const userList = this.$refs.userData.options
|
||||
this.$set(this.formData, "mobile", id ? userList.find((v) => v.id === id).mobile : null)
|
||||
const user = (this.userList || []).find((v) => v.userId === id)
|
||||
this.$set(this.formData, "mobile", id && user ? user.mobile : null)
|
||||
},
|
||||
async getActivityTwoLevelType(code) {
|
||||
const {data} = await this.$axios.post("/platform/activity/basic/settings/getActivityTwoLevelType", {code: code})
|
||||
return data
|
||||
},
|
||||
openUserScope() {
|
||||
if (!this.$auth.hasRole("SYSADMIN") && !this.$auth.hasPermission("activity.basic.scope")) {
|
||||
this.$message.error("无此权限:activity.basic.scope")
|
||||
return
|
||||
}
|
||||
this.$refs.drawerUserScope.userScopeDialog = true
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const {data} = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = data
|
||||
@@ -1048,9 +1057,16 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
async findOne(id) {
|
||||
const {data, code, msg} = await this.$axios.post("/platform/activity/culture/infoManage/findOne", {id})
|
||||
if (code === 0) {
|
||||
this.userList = []
|
||||
if (data.userId) {
|
||||
const user = await this.queryUserByIds([data.userId])
|
||||
await this.remoteMethod(user[0].loginname)
|
||||
let loginName = data.loginname
|
||||
if (!loginName) {
|
||||
const users = await this.queryUserByIds([data.userId])
|
||||
loginName = users && users.length > 0 ? users[0].loginname : null
|
||||
}
|
||||
if (loginName) {
|
||||
await this.remoteMethod(loginName)
|
||||
}
|
||||
}
|
||||
if (data.goods) data.goods = JSON.parse(data.goods)
|
||||
if (data.billFiles && data.billFiles.length > 0) data.billFiles = JSON.parse(data.billFiles)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
template: /*language=HTML*/`
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" @hook:mounted="initTableResize">
|
||||
<template>
|
||||
<div class="culture-info-manage-layout">
|
||||
<el-card class="culture-info-query-card" shadow="never">
|
||||
@@ -55,45 +55,49 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns">
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='time2'">
|
||||
{{row.applyStartTime}}-{{row.applyEndTime}}
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">
|
||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
<template slot-scope="{row}">
|
||||
<template v-if="column.prop=='time2'">
|
||||
{{row.applyStartTime}}-{{row.applyEndTime}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='projectTypeName'">
|
||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40001">校工会</span>
|
||||
<template v-else-if="column.prop=='tussueName'">
|
||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40001">校工会</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='isUnseal'">
|
||||
<el-switch
|
||||
@change="(val)=>{activityStatusChange(row.id,row.isUnseal)}"
|
||||
active-color="#13ce66"
|
||||
:disabled="isUnsealDisabled(row)"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isUnseal">
|
||||
</el-switch>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='taskName'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
{{row.taskName}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='instanceState'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template v-else>{{ row[column.prop] }}</template>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='isUnseal'">
|
||||
<el-switch
|
||||
@change="(val)=>{activityStatusChange(row.id,row.isUnseal)}"
|
||||
active-color="#13ce66"
|
||||
:disabled="isUnsealDisabled(row)"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isUnseal">
|
||||
</el-switch>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='taskName'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
{{row.taskName}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作"
|
||||
@@ -214,6 +218,19 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
|
||||
},
|
||||
methods: {
|
||||
initTableResize() {
|
||||
if (!this.isTemplateManagedActivity) {
|
||||
return
|
||||
}
|
||||
const listCardBody = this.$refs.guava.$el.querySelector(".culture-info-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
activityStatusChange(id, isUnseal) {
|
||||
this.$axios.post("/platform/activity/culture/infoManage/activityStatusChange", {
|
||||
id: id,
|
||||
@@ -264,7 +281,11 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
|
||||
const root = this.$refs.guava && this.$refs.guava.$el
|
||||
if (!root || typeof root.querySelector !== "function") {
|
||||
return
|
||||
}
|
||||
const cardBody = root.querySelector(".culture-info-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
@@ -408,19 +429,6 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
mounted() {
|
||||
if (!this.isTemplateManagedActivity) {
|
||||
return
|
||||
}
|
||||
const listCardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
|
||||
@@ -113,6 +113,9 @@
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审批签字" :span="3" v-if="task.taskFormData && (task.taskFormData.userSign || task.taskFormData.tf_userSign)">
|
||||
<el-image :src="task.taskFormData.userSign || task.taskFormData.tf_userSign" style="height: 80px" fit="contain"></el-image>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
getTaskFormValue(task, "opinion", "tf_opinion") }}
|
||||
</el-descriptions-item>
|
||||
@@ -126,6 +129,9 @@
|
||||
<el-descriptions-item label="办理用户">{{ record.userName }}({{ record.loginName }})</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ record.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">{{ getLegacyAuditResult(record) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审批签字" :span="3" v-if="record.auditSign">
|
||||
<el-image :src="record.auditSign" style="height: 80px" fit="contain"></el-image>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" span="3">{{ record.auditOpinion }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user