Merge branch 'master' of http://47.93.189.255:8099/r/archiveFrontEnd
# Conflicts:
# src/views/archiveManager/index.vue
| | |
| | | import {UserRoleIdList, allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role" |
| | | import selectUser from "./seleUser" |
| | | import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,getArchiverecordstouserByReIdAndUid } from "@/api/system/materials" |
| | | import {listArchiverecordstouser,addArchiverecordstouser,delArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser" |
| | | import {listArchiverecordstouser,addArchiverecordstouser,delArchiverecordstouserByReIdAndUid,getArchiverecordstouser} from "@/api/system/archiverecordstouser" |
| | | export default { |
| | | name: "AuthUser1", |
| | | dicts: ['sys_normal_disable'], |
| | |
| | | const roleId = this.$route.params && this.$route.params.roleId |
| | | const recordId = this.$route.params && this.$route.params.archiveRecordsId |
| | | |
| | | if (roleId&&recordId) { |
| | | if (roleId && recordId) { |
| | | this.queryParams.roleId = roleId |
| | | this.queryParams.archiveRecordsId = recordId |
| | | // 进行类型转换 |
| | | this.queryParams.archiveRecordsId = !isNaN(Number(recordId)) ? Number(recordId) : 0 |
| | | this.getList() |
| | | } |
| | | }, |
| | | methods: { |
| | | // 修改 getList 方法 |
| | | /** 查询授权用户列表 */ |
| | | getList() { |
| | | this.loading = true |
| | | console.log(this.queryParams) |
| | | console.log("------------") |
| | | listArchiverecordstouser(this.queryParams).then(response => { |
| | | console.log(response) |
| | | this.userList = response.data.data |
| | | this.total = response.data.total |
| | | this.loading = false |
| | | } |
| | | ) |
| | | // 创建一个新对象,将字符串类型的archiveRecordsId转换为数字类型 |
| | | const params = { |
| | | ...this.queryParams, |
| | | archiveRecordsId: !isNaN(Number(this.queryParams.archiveRecordsId)) ? |
| | | Number(this.queryParams.archiveRecordsId) : 0 |
| | | } |
| | | listArchiverecordstouser(params).then(response => { |
| | | this.userList = response.data.data |
| | | this.total = response.data.total |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | /** 打开授权用户表弹窗 */ |
| | | openSelectUser() { |
| | | // 确保传递给select组件的recordId是数字类型 |
| | | const recordId = !isNaN(Number(this.queryParams.archiveRecordsId)) ? |
| | | Number(this.queryParams.archiveRecordsId) : 0 |
| | | this.$refs.select.show(recordId) |
| | | }, |
| | | // 返回按钮 |
| | | handleClose() { |
| | |
| | | >导出</el-button> |
| | | </el-col> |
| | | |
| | | <el-col v-if="userId!=1" :span="1.5"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | |
| | | <el-table-column label="备注" align="center" prop="remarks" /> |
| | | <el-table-column label="历史相关发文号" align="center" prop="historicalReferenceNumber" /> |
| | | |
| | | <el-table-column label="状态" align="center" width="105" prop="recordStatus"> |
| | | <el-table-column label="状态" align="center" prop="recordStatus"> |
| | | <template slot-scope="scope"> |
| | | <el-button :type="scope.row.recordStatus === '未录入' ? 'danger' : 'success'" size="mini"> |
| | | {{ scope.row.recordStatus }} |
| | |
| | | @click="handleCheck(scope.row)" |
| | | >查看</el-button> |
| | | <el-button |
| | | v-if="userId!==1&&scope.row.ownData&&scope.row.recordStatus!=='录入完成'" |
| | | v-if="userId!==1&&scope.row.ownData" |
| | | |
| | | size="mini" |
| | | type="text" |
| | |
| | | { |
| | | // alert(row.id) |
| | | var id = row.id |
| | | var status = '录入完成' |
| | | updateStatusById(status, id).then(response=>{ |
| | | updateStatusById(id).then(response=>{ |
| | | this.$modal.msgSuccess("提交成功") |
| | | this.getList() |
| | | }) |
| | |
| | | if(this.recordTypeOptions.length > 0) { |
| | | const recordParts = response.data.recordId.split('-') |
| | | this.$set(this.form, 'recordType', recordParts[0]) |
| | | if(recordParts.length==4) |
| | | if(this.recordTypeOptions.length==4) |
| | | { |
| | | this.$set(this.form, 'recordZone', recordParts[1]) |
| | | |
| | |
| | | if(this.recordTypeOptions.length > 0) { |
| | | const recordParts = response.data.recordId.split('-') |
| | | this.$set(this.form, 'recordType', recordParts[0]) |
| | | if(recordParts.length==4) |
| | | if(this.recordTypeOptions.length==4) |
| | | { |
| | | this.$set(this.form, 'recordZone', recordParts[1]) |
| | | |
| | |
| | | /** 分配用户操作 */ |
| | | handleAuthUser: function(row) { |
| | | const roleId = 2 |
| | | // row.i |
| | | var archiveRecordsId = row.id |
| | | // alert(roleId) |
| | | var archiveRecordsId = row.recordId |
| | | alert(roleId) |
| | | this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId) |
| | | }, |
| | | /** 删除按钮操作 */ |
| | |
| | | // 显示弹框 |
| | | show(archiveRecordsId) { |
| | | if (archiveRecordsId) { |
| | | this.archiveRecordsId = archiveRecordsId |
| | | } |
| | | // 进行类型转换 |
| | | this.archiveRecordsId = !isNaN(Number(archiveRecordsId)) ? Number(archiveRecordsId) : 0 |
| | | } |
| | | this.queryParams.roleId = this.roleId |
| | | this.queryParams.archiveRecordsId = this.archiveRecordsId |
| | | |
| | | |
| | | this.getList() |
| | | this.visible = true |
| | | }, |
| | |
| | | handleSelectUser() { |
| | | const archiveRecordsId = this.queryParams.archiveRecordsId |
| | | const userIds = this.userIds.join(",") |
| | | |
| | | |
| | | |
| | | if (userIds == "") { |
| | | this.$modal.msgError("请选择要分配的用户") |
| | | return |
| | | } |
| | | authRecordToUser({ recordId: archiveRecordsId, userIds: userIds }).then(res => { |
| | | |
| | | // 创建转换后的参数,确保recordId是数字类型 |
| | | const convertedRecordId = !isNaN(Number(archiveRecordsId)) ? Number(archiveRecordsId) : 0 |
| | | |
| | | authRecordToUser({ recordId: convertedRecordId, userIds: userIds }).then(res => { |
| | | if(res.code === 200) { |
| | | this.$modal.msgSuccess(res.msg) |
| | | this.visible = false |
| | | this.$emit("ok") |
| | | } else { |
| | | this.$modal.msgError(res.msg || "授权失败,已经授权过了") |
| | | } |
| | | this.$modal.msgSuccess(res.msg) |
| | | this.visible = false |
| | | this.$emit("ok") |
| | | } else { |
| | | this.$modal.msgError(res.msg || "授权失败,已经授权过了") |
| | | } |
| | | }) |
| | | } |
| | | } |