| | |
| | | v-hasPermi="['system:records:export']" |
| | | >批量提交</el-button> |
| | | </el-col> |
| | | |
| | | <el-col v-if="userId==1" :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleGivePermission" |
| | | v-hasPermi="['system:materials:edit']" |
| | | >批量授权</el-button> |
| | | </el-col> |
| | | <el-col v-if="userId==1" :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | |
| | | @click="handleInfo(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >编辑卷内目录</el-button> |
| | | <el-button |
| | | v-if="userId===1" |
| | | |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="CheckInfo(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >查看卷内目录</el-button> |
| | | <el-button |
| | | v-if="userId===1" |
| | | |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="backInfo(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >导出备考表</el-button> |
| | | |
| | | <el-button |
| | | v-if="userId===1" |
| | | |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="JuanInfo(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >导出卷内目录</el-button> |
| | | |
| | | |
| | | <el-button |
| | | v-if="userId===1" |
| | | |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="pageInfo(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >导出案卷封面</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | |
| | | @click="handleSubmit(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >提交案卷</el-button> |
| | | |
| | | <el-button |
| | | v-if="scope.row.ownData||userId===1" |
| | | |
| | |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 授权用户 --> |
| | | <el-dialog title="选择用户" :visible.sync="visibleUser" width="800px" top="5vh" append-to-body> |
| | | |
| | | <el-row> |
| | | <el-table @row-click="clickRow" ref="table" :data="userList" @selection-change="handleSingleSelection" |
| | | height="260px"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" /> |
| | | <!-- <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | v-show="totalUser>0" |
| | | :total="totalUser" |
| | | :page.sync="queryParamsUser.pageNum" |
| | | :limit.sync="queryParamsUser.pageSize" |
| | | @pagination="getUserList" |
| | | /> |
| | | </el-row> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="handleSelectUser">确 定</el-button> |
| | | <el-button @click="visibleUser = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { listAllCategory } from "@/api/system/category" |
| | | import { listAllProjectName } from "@/api/system/projectName" |
| | | import { listPlaceName, listAllPlaceName } from "@/api/system/placeName" |
| | | import { judge } from "@/api/system/materials" |
| | | import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role" |
| | | import {authManyRecordsToUsers} from "@/api/system/archiverecordstouser" |
| | | |
| | | export default { |
| | | components: { |
| | | VueOfficeExcel |
| | |
| | | name: "Records", |
| | | data() { |
| | | return { |
| | | totalUser: 0, |
| | | visibleUser:false, |
| | | userList:[], |
| | | // 选中数组值 |
| | | userIds: [], |
| | | queryParamsUser: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | roleId: undefined, |
| | | archiveRecordsId: undefined, |
| | | |
| | | }, |
| | | showExcelPreview: false, |
| | | excel: 'http://localhost:8080/profile/upload/12.xls', //设置文档网络地址,可以是相对地址 |
| | | |
| | |
| | | this.fetchProjectOptions() |
| | | this.fetchProjectCompanyOptions() |
| | | this.getList() |
| | | |
| | | }, |
| | | watch: { |
| | | 'form.constructionUnit': { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | /** 选择授权用户操作 */ |
| | | handleSelectUser() { |
| | | // const archiveRecordsId = this.queryParams.archiveRecordsId |
| | | const userIds = this.userIds.join(",") |
| | | // const aids = this.ids.join(",") |
| | | // alert(aids) |
| | | if (userIds == "") { |
| | | this.$modal.msgError("请选择要分配的用户") |
| | | return |
| | | } |
| | | |
| | | // 创建转换后的参数,确保recordId是数字类型 |
| | | // const convertedRecordId = !isNaN(Number(archiveRecordsId)) ? Number(archiveRecordsId) : 0 |
| | | const convertedRecordId = this.ids.join(",") |
| | | if (convertedRecordId == "") { |
| | | this.$modal.msgError("请选择相应的案卷") |
| | | return |
| | | } |
| | | authManyRecordsToUsers({ recordIds: convertedRecordId, userIds: userIds }).then(res => { |
| | | if(res.code === 200) { |
| | | this.$modal.msgSuccess(res.msg) |
| | | this.visibleUser = false |
| | | // this.$emit("ok") |
| | | } else { |
| | | this.$modal.msgError(res.msg || "授权失败,已经授权过了") |
| | | } |
| | | }) |
| | | }, |
| | | clickRow(row) { |
| | | this.$refs.table.clearSelection(); |
| | | this.$refs.table.toggleRowSelection(row); |
| | | }, |
| | | // 替换原有的handleSelectionChange方法 |
| | | handleSingleSelection(selection) { |
| | | if (selection.length > 1) { |
| | | this.$refs.table.clearSelection(); |
| | | this.$refs.table.toggleRowSelection(selection[selection.length - 1]); |
| | | } |
| | | else |
| | | this.userIds = selection.map(item => item.userId); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.userIds = selection.map(item => item.userId) |
| | | }, |
| | | // 查询表数据 |
| | | getUserList() { |
| | | this.queryParamsUser.roleId = 2 |
| | | UserRoleIdList(this.queryParamsUser).then(res => { |
| | | console.log("=------00000000009") |
| | | console.log(res) |
| | | |
| | | this.userList = res.rows |
| | | this.totalUser = res.total |
| | | }) |
| | | }, |
| | | /** Excel渲染完成处理 */ |
| | | renderedHandler() { |
| | | console.log("Excel渲染完成"); |
| | |
| | | this.vis = false; |
| | | this.title = "添加档案记录" |
| | | }, |
| | | |
| | | /*查看详情*/ |
| | | CheckInfo(row) |
| | | { |
| | | |
| | | var mid = row.id |
| | | const roleId = 2 |
| | | // alert(mid) |
| | | |
| | | var recordId = mid |
| | | var pageCount = row.pageCount |
| | | var sho = false |
| | | // this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId) |
| | | this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho) |
| | | |
| | | }, |
| | | /*导出备考表*/ |
| | | backInfo(row) |
| | | { |
| | | |
| | | var id = row.id |
| | | |
| | | id = Number(id) |
| | | |
| | | var recordId = row.recordId |
| | | this.download('/system/materials/exportBack/'+id+'/'+recordId, { |
| | | |
| | | }, `备考表_${new Date().getTime()}.pdf`) |
| | | }, |
| | | |
| | | /*导出卷内目录*/ |
| | | JuanInfo(row) |
| | | { |
| | | var id = row.id |
| | | |
| | | id = Number(id) |
| | | |
| | | var recordId = row.recordId |
| | | this.download('/system/materials/exportJuan/'+id, { |
| | | |
| | | }, `卷内目录_${new Date().getTime()}.xls`) |
| | | }, |
| | | /*导出案卷封面*/ |
| | | pageInfo(row) |
| | | { |
| | | var id = row.id |
| | | |
| | | id = Number(id) |
| | | |
| | | var recordId = row.recordId |
| | | this.download('/system/materials/exportPageInfo/'+id+'/'+recordId, { |
| | | |
| | | }, `案卷封面_${new Date().getTime()}.xls`) |
| | | }, |
| | | handleInfo(row) |
| | | { |
| | | |
| | |
| | | |
| | | var recordId = mid |
| | | var pageCount = row.pageCount |
| | | var sho = true |
| | | // this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId) |
| | | this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount) |
| | | this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho) |
| | | |
| | | }, |
| | | // |
| | |
| | | { |
| | | //alert(row.id) |
| | | var id = row.id |
| | | var status = '录入完成' |
| | | updateStatusById(status, id).then(response=>{ |
| | | this.$modal.msgSuccess("提交成功") |
| | | this.getList() |
| | | // 在提交之前,调用后端接口检查是否已经上传附件 |
| | | judge(id).then(response => { |
| | | // console.log(response) |
| | | // alert(response.data) |
| | | if (response.data===undefined||response.data === false) { |
| | | // 如果文件数量为0,提示用户先上传附件 |
| | | this.$modal.msgWarning('请先上传附件,再进行提交操作') |
| | | } else { |
| | | // 如果已经上传了附件,继续提交操作 |
| | | var status = '录入完成' |
| | | updateStatusById(status, id).then(response=>{ |
| | | this.$modal.msgSuccess("提交成功") |
| | | this.getList() |
| | | }) |
| | | } |
| | | }).catch(error => { |
| | | console.error('检查附件数量失败:', error) |
| | | this.$modal.msgError('检查附件数量失败,请稍后重试') |
| | | }) |
| | | }, |
| | | /** 修改按钮操作 */ |
| | |
| | | if(this.recordTypeOptions.length > 0) { |
| | | const recordParts = response.data.recordId.split('-') |
| | | this.$set(this.form, 'recordType', recordParts[0]) |
| | | if(this.recordTypeOptions.length==4) |
| | | if(recordParts.length==4) |
| | | { |
| | | this.$set(this.form, 'recordZone', recordParts[1]) |
| | | |
| | |
| | | this.open = true |
| | | this.title = "修改档案记录" |
| | | }) |
| | | }, |
| | | /*批量授权*/ |
| | | handleGivePermission() |
| | | { |
| | | if (this.ids.length === 0) { |
| | | this.$modal.msgWarning('请选择要授权的档案记录') |
| | | return |
| | | } |
| | | this.visibleUser = true |
| | | this.getUserList() |
| | | }, |
| | | /** 批量提交 */ |
| | | handleBatchSubmit() { |
| | |
| | | this.form = response.data |
| | | if(this.recordTypeOptions.length > 0) { |
| | | const recordParts = response.data.recordId.split('-') |
| | | |
| | | this.$set(this.form, 'recordType', recordParts[0]) |
| | | if(this.recordTypeOptions.length==4) |
| | | if(recordParts.length==4) |
| | | { |
| | | this.$set(this.form, 'recordZone', recordParts[1]) |
| | | |
| | |
| | | /** 分配用户操作 */ |
| | | handleAuthUser: function(row) { |
| | | const roleId = 2 |
| | | var archiveRecordsId = row.recordId |
| | | |
| | | var archiveRecordsId = row.id |
| | | this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId) |
| | | }, |
| | | /** 删除按钮操作 */ |
| | |
| | | // 只导出选中的记录 |
| | | this.download('system/records/export', { |
| | | ids: this.ids.join(',') // 将选中的ID数组转换为逗号分隔的字符串 |
| | | }, `records_${new Date().getTime()}.xlsx`) |
| | | }, `records_${new Date().getTime()}.xls`) |
| | | } else { |
| | | // 没有选中记录时,导出符合查询条件的所有记录 |
| | | this.download('system/records/export', { |
| | | ...this.queryParams |
| | | }, `records_${new Date().getTime()}.xlsx`) |
| | | }, `records_${new Date().getTime()}.xls`) |
| | | } |
| | | }, |
| | | |
| | |
| | | // if (selectedAnnotations.length > 0) { |
| | | // filename += `_anno${selectedAnnotations.join('')}`; |
| | | // } |
| | | filename += `_${new Date().getTime()}.xlsx`; |
| | | filename += `_${new Date().getTime()}.xls`; |
| | | |
| | | link.download = filename; |
| | | |
| | |
| | | // 直接下载 |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = `${prefix}_${new Date().getTime()}.xlsx`; |
| | | link.download = `${prefix}_${new Date().getTime()}.xls`; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = `record_${id}_${new Date().getTime()}.xlsx`; |
| | | link.download = `record_${id}_${new Date().getTime()}.xls`; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | |
| | | { |
| | | this.download('/system/records/model', { |
| | | |
| | | }, `records_${new Date().getTime()}.xlsx`) |
| | | }, `records_${new Date().getTime()}.xls`) |
| | | }, |
| | | handleExportTemplateOther() |
| | | { |
| | | this.download('/system/records/modelOther', { |
| | | |
| | | }, `records_${new Date().getTime()}.xlsx`) |
| | | }, `records_${new Date().getTime()}.xls`) |
| | | }, |
| | | /** 导入操作*/ |
| | | async handleImportData({file}){ |