fix:演示后的首次除流程外修改
This commit is contained in:
parent
7ab7835178
commit
9190eabe59
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,146 +0,0 @@
|
||||
{
|
||||
"entry": "index.js",
|
||||
"copyAssets": ["public/custom/apaas-custom-mydemo"],
|
||||
"router": {
|
||||
"apaas-custom-modalContorl":{
|
||||
"name": "apaas-custom-modalContorl",
|
||||
"path": "apaas-custom-modalContorl",
|
||||
"meta": {
|
||||
"title": "模板管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-selfEnginedata":{
|
||||
"name": "apaas-custom-selfEnginedata",
|
||||
"path": "apaas-custom-selfEnginedata",
|
||||
"meta": {
|
||||
"title": "玉柴发动机数据"
|
||||
}
|
||||
},
|
||||
"apaas-custom-otherEnginedata":{
|
||||
"name": "apaas-custom-otherEnginedata",
|
||||
"path": "apaas-custom-otherEnginedata",
|
||||
"meta": {
|
||||
"title": "竞品发动机数据"
|
||||
}
|
||||
},
|
||||
"apaas-custom-checkData":{
|
||||
"name": "apaas-custom-checkData",
|
||||
"path": "apaas-custom-checkData",
|
||||
"meta": {
|
||||
"title": "数据检查"
|
||||
}
|
||||
},
|
||||
"apaas-custom-report":{
|
||||
"name": "apaas-custom-report",
|
||||
"path": "apaas-custom-report",
|
||||
"meta": {
|
||||
"title": "对标报告"
|
||||
}
|
||||
},
|
||||
"apaas-custom-reportList":{
|
||||
"name": "apaas-custom-reportList",
|
||||
"path": "apaas-custom-reportList",
|
||||
"meta": {
|
||||
"title": "报告列表"
|
||||
}
|
||||
},
|
||||
"apaas-custom-reportDetail":{
|
||||
"name": "apaas-custom-reportDetail",
|
||||
"path": "apaas-custom-reportDetail",
|
||||
"meta": {
|
||||
"title": "报告详情"
|
||||
}
|
||||
},
|
||||
"apaas-custom-reportCheck":{
|
||||
"name": "apaas-custom-reportCheck",
|
||||
"path": "apaas-custom-reportCheck",
|
||||
"meta": {
|
||||
"title": "报告检查"
|
||||
}
|
||||
},
|
||||
"apaas-custom-modelDetail":{
|
||||
"name": "apaas-custom-modelDetail",
|
||||
"path": "apaas-custom-modelDetail",
|
||||
"meta": {
|
||||
"title": "系统参数管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-engineDetail":{
|
||||
"name": "apaas-custom-engineDetail",
|
||||
"path": "apaas-custom-engineDetail",
|
||||
"meta": {
|
||||
"title": "发动机参数详情"
|
||||
}
|
||||
},
|
||||
"apaas-custom-approvalManagement":{
|
||||
"name": "apaas-custom-approvalManagement",
|
||||
"path": "apaas-custom-approvalManagement",
|
||||
"meta": {
|
||||
"title": "模板审批管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-toDoList":{
|
||||
"name": "apaas-custom-toDoList",
|
||||
"path": "apaas-custom-toDoList",
|
||||
"meta": {
|
||||
"title": "数据待办"
|
||||
}
|
||||
},
|
||||
"apaas-custom-myDone":{
|
||||
"name": "apaas-custom-myDone",
|
||||
"path": "apaas-custom-myDone",
|
||||
"meta": {
|
||||
"title": "我的已办"
|
||||
}
|
||||
},
|
||||
"apaas-custom-mySend":{
|
||||
"name": "apaas-custom-mySend",
|
||||
"path": "apaas-custom-mySend",
|
||||
"meta": {
|
||||
"title": "我发起的"
|
||||
}
|
||||
},
|
||||
"apaas-custom-selfEngineCheck":{
|
||||
"name": "apaas-custom-selfEngineCheck",
|
||||
"path": "apaas-custom-selfEngineCheck",
|
||||
"meta": {
|
||||
"title": "玉柴发动机审核"
|
||||
}
|
||||
},
|
||||
"apaas-custom-otherEngineCheck":{
|
||||
"name": "apaas-custom-otherEngineCheck",
|
||||
"path": "apaas-custom-otherEngineCheck",
|
||||
"meta": {
|
||||
"title": "竞品发动机审核"
|
||||
}
|
||||
},
|
||||
"apaas-custom-managerData":{
|
||||
"name": "apaas-custom-managerData",
|
||||
"path": "apaas-custom-managerData",
|
||||
"meta": {
|
||||
"title": "责任人管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-fillerData":{
|
||||
"name": "apaas-custom-fillerData",
|
||||
"path": "apaas-custom-fillerData",
|
||||
"meta": {
|
||||
"title": "填写人管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-permissionManagement":{
|
||||
"name": "apaas-custom-permissionManagement",
|
||||
"path": "apaas-custom-permissionManagement",
|
||||
"meta": {
|
||||
"title": "权限管理"
|
||||
}
|
||||
}
|
||||
},
|
||||
"customWidgetList": [
|
||||
{
|
||||
"code": "mydemo",
|
||||
"text": "mydemo"
|
||||
}
|
||||
],
|
||||
"outputName": "apaas-custom-mydemo"
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<meta charset="utf-8">
|
||||
<title>apaas-custom-mydemo demo</title>
|
||||
<script src="./apaas-custom-mydemo.umd.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="./apaas-custom-mydemo.css">
|
||||
|
||||
|
||||
<script>
|
||||
console.log(apaas-custom-mydemo)
|
||||
</script>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@ -442,8 +442,24 @@ export default {
|
||||
url: '/custom/todoTaskPojo/selectByresPersonCompletedPage',
|
||||
method: 'post'
|
||||
},
|
||||
GET_MODEL_QUERT_TABLE_BY_VERSION: {
|
||||
url: '/custom/dataEntryEngineModel/selectVersionByPage',
|
||||
method: 'get'
|
||||
},
|
||||
GET_MODEL_QUERT_DETAIL: {
|
||||
url: '/custom/tcDataQuery/tcDataSelectByVersion',
|
||||
method: 'post'
|
||||
},
|
||||
DOWNLOAD_MANAGER_DATA: {
|
||||
url: '/custom/responsible/export',
|
||||
method: 'get'
|
||||
},
|
||||
UPLOAD_MANAGER_DATA: {
|
||||
url: '/custom/responsible/import',
|
||||
method: 'post'
|
||||
},
|
||||
DOWNLOAD_DEMO_MANAGER_DATA: {
|
||||
url: '/custom/responsible/getImportTemplate',
|
||||
method: 'get'
|
||||
},
|
||||
}
|
||||
|
||||
@ -334,8 +334,8 @@ export default {
|
||||
result = 'PASS'
|
||||
status = 'PASS'
|
||||
} else if (node.result === '待审批') {
|
||||
result = 'STAY'
|
||||
status = 'STAY'
|
||||
result = '待审批'
|
||||
status = '待审批'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
:modalVisible.sync="visible"
|
||||
:wrapper-class="'batch-modify-responsible-modal'"
|
||||
:title="modalTitle"
|
||||
:width="600"
|
||||
:width="680"
|
||||
>
|
||||
<div class="batch-modify-content">
|
||||
<el-form
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div v-if="shouldShowButtons" class="header-right">
|
||||
<el-button size="small" @click="handleReject">
|
||||
退回
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -48,7 +48,7 @@
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">发起人</span>
|
||||
<span class="value">{{ progressDetail.applicant || '--' }}</span>
|
||||
<span class="value">{{ progressDetail.applicant|| progressDetail.createBy || '--' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -165,7 +165,6 @@
|
||||
<el-form
|
||||
ref="approvalForm"
|
||||
:model="approvalFormData"
|
||||
:rules="approvalFormRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item
|
||||
@ -664,11 +663,12 @@ export default {
|
||||
},
|
||||
handleReject() {
|
||||
this.approvalActionType = 'reject'
|
||||
this.approvalDialogTitle = '退回'
|
||||
this.approvalDialogTitle = '拒绝'
|
||||
this.approvalFormData = {
|
||||
operator: '拒绝',
|
||||
comment: ''
|
||||
}
|
||||
this.approvalFormData.comment = '拒绝'
|
||||
this.approvalDialogVisible = true
|
||||
// 清除表单验证
|
||||
this.$nextTick(() => {
|
||||
@ -684,6 +684,7 @@ export default {
|
||||
operator: '同意',
|
||||
comment: ''
|
||||
}
|
||||
this.approvalFormData.comment = '同意'
|
||||
this.approvalDialogVisible = true
|
||||
// 清除表单验证
|
||||
this.$nextTick(() => {
|
||||
@ -695,9 +696,6 @@ export default {
|
||||
handleApprovalSubmit() {
|
||||
// 表单验证
|
||||
this.$refs.approvalForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
if (!this.detail || !this.detail.id) {
|
||||
this.$message.error('缺少审批数据')
|
||||
return
|
||||
|
||||
@ -2,9 +2,20 @@
|
||||
<div class="manager-data-page custom-page">
|
||||
<div class="page-content">
|
||||
<div class="header-section">
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
新增
|
||||
</el-button>
|
||||
<div>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button @click="handleImport">
|
||||
导入
|
||||
</el-button>
|
||||
<el-button @click="handleDownloadTemplate">
|
||||
下载导入模板
|
||||
</el-button>
|
||||
<el-button @click="handleExport">
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- <el-button
|
||||
icon="el-icon-refresh"
|
||||
size="small"
|
||||
@ -204,6 +215,44 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 导入弹窗 -->
|
||||
<el-dialog
|
||||
title="导入"
|
||||
:visible.sync="importDialogVisible"
|
||||
width="400px"
|
||||
append-to-body
|
||||
@close="handleImportDialogClose"
|
||||
>
|
||||
<el-upload
|
||||
ref="importUpload"
|
||||
class="import-uploader"
|
||||
drag
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
accept=".xls,.xlsx"
|
||||
:file-list="importFileList"
|
||||
:on-change="handleImportFileChange"
|
||||
:on-remove="handleImportFileRemove"
|
||||
:disabled="importing"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或<em>点击上传</em>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
仅支持Excel模板文件
|
||||
</div>
|
||||
</el-upload>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="importing" @click="handleImportDialogClose">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" :loading="importing" @click="handleImportSubmit">
|
||||
开始导入
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -255,7 +304,12 @@ export default {
|
||||
departmentTreeFilterText: '', // 部门树搜索文本
|
||||
selectedDepartmentId: '', // 选中的部门ID
|
||||
selectedDepartmentName: '', // 选中的部门名称
|
||||
selectedDepartmentNode: null // 选中的部门节点
|
||||
selectedDepartmentNode: null, // 选中的部门节点
|
||||
// 导入相关
|
||||
importDialogVisible: false, // 导入弹窗显示状态
|
||||
importFileList: [], // 导入文件列表
|
||||
selectedImportFile: null, // 选中的导入文件
|
||||
importing: false // 导入中状态
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -784,7 +838,10 @@ export default {
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('删除失败:', err)
|
||||
this.$message.error('删除失败')
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '删除失败'
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
@ -822,6 +879,298 @@ export default {
|
||||
}
|
||||
// 否则显示全部
|
||||
return normalizedDept
|
||||
},
|
||||
// 下载导入模板
|
||||
handleDownloadTemplate() {
|
||||
const { url, method = 'get', headers = {} } = api.DOWNLOAD_DEMO_MANAGER_DATA || {}
|
||||
const requestConfig = {
|
||||
url,
|
||||
method,
|
||||
responseType: 'blob',
|
||||
headers,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
if (!requestConfig.url) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '未配置下载地址'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$axios(requestConfig)
|
||||
.then((response) => {
|
||||
const blobData = response.data
|
||||
if (!blobData) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '下载失败,文件内容为空'
|
||||
})
|
||||
return
|
||||
}
|
||||
const contentType =
|
||||
response.headers &&
|
||||
(response.headers['content-type'] || response.headers['Content-Type'])
|
||||
if (contentType && contentType.includes('application/json')) {
|
||||
try {
|
||||
const reader = new FileReader()
|
||||
reader.onload = () => {
|
||||
try {
|
||||
const errorData = JSON.parse(reader.result)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: errorData.message || '下载失败'
|
||||
})
|
||||
} catch (e) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '下载失败'
|
||||
})
|
||||
}
|
||||
}
|
||||
reader.readAsText(blobData)
|
||||
} catch (err) {
|
||||
console.error('解析下载失败响应异常:', err)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '下载失败'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
const disposition =
|
||||
response.headers &&
|
||||
(response.headers['content-disposition'] || response.headers['Content-Disposition'])
|
||||
let filename = '导入模板.xlsx'
|
||||
if (disposition) {
|
||||
const filenameMatch = /filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(
|
||||
disposition
|
||||
)
|
||||
const matchedName = filenameMatch ? filenameMatch[1] || filenameMatch[2] : ''
|
||||
if (matchedName) {
|
||||
try {
|
||||
filename = decodeURIComponent(matchedName)
|
||||
} catch (err) {
|
||||
filename = matchedName
|
||||
}
|
||||
}
|
||||
}
|
||||
const downloadUrl = window.URL.createObjectURL(blobData)
|
||||
const link = document.createElement('a')
|
||||
link.href = downloadUrl
|
||||
link.download = filename
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
window.URL.revokeObjectURL(downloadUrl)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '下载成功'
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('下载模板失败:', err)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '下载模板失败,请稍后重试'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
handleExport() {
|
||||
const { url, method = 'get', headers = {} } = api.DOWNLOAD_MANAGER_DATA || {}
|
||||
const requestConfig = {
|
||||
url,
|
||||
method,
|
||||
responseType: 'blob',
|
||||
headers,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
if (!requestConfig.url) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '未配置下载地址'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$axios(requestConfig)
|
||||
.then((response) => {
|
||||
const blobData = response.data
|
||||
if (!blobData) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败,文件内容为空'
|
||||
})
|
||||
return
|
||||
}
|
||||
const contentType =
|
||||
response.headers &&
|
||||
(response.headers['content-type'] || response.headers['Content-Type'])
|
||||
if (contentType && contentType.includes('application/json')) {
|
||||
try {
|
||||
const reader = new FileReader()
|
||||
reader.onload = () => {
|
||||
try {
|
||||
const errorData = JSON.parse(reader.result)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: errorData.message || '导出失败'
|
||||
})
|
||||
} catch (e) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败'
|
||||
})
|
||||
}
|
||||
}
|
||||
reader.readAsText(blobData)
|
||||
} catch (err) {
|
||||
console.error('解析导出失败响应异常:', err)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
const disposition =
|
||||
response.headers &&
|
||||
(response.headers['content-disposition'] || response.headers['Content-Disposition'])
|
||||
let filename = '责任人管理数据.xlsx'
|
||||
if (disposition) {
|
||||
const filenameMatch = /filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(
|
||||
disposition
|
||||
)
|
||||
const matchedName = filenameMatch ? filenameMatch[1] || filenameMatch[2] : ''
|
||||
if (matchedName) {
|
||||
try {
|
||||
filename = decodeURIComponent(matchedName)
|
||||
} catch (err) {
|
||||
filename = matchedName
|
||||
}
|
||||
}
|
||||
}
|
||||
const downloadUrl = window.URL.createObjectURL(blobData)
|
||||
const link = document.createElement('a')
|
||||
link.href = downloadUrl
|
||||
link.download = filename
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
window.URL.revokeObjectURL(downloadUrl)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '导出成功'
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('导出失败:', err)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败,请稍后重试'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 打开导入弹窗
|
||||
handleImport() {
|
||||
this.importDialogVisible = true
|
||||
this.importFileList = []
|
||||
this.selectedImportFile = null
|
||||
},
|
||||
// 关闭导入弹窗
|
||||
handleImportDialogClose() {
|
||||
this.importDialogVisible = false
|
||||
this.importFileList = []
|
||||
this.selectedImportFile = null
|
||||
this.importing = false
|
||||
if (this.$refs.importUpload) {
|
||||
this.$refs.importUpload.clearFiles()
|
||||
}
|
||||
},
|
||||
// 导入文件选择变化
|
||||
handleImportFileChange(file, fileList) {
|
||||
// 验证文件类型
|
||||
const allowedTypes = ['.xls', '.xlsx']
|
||||
const fileName = file.name || ''
|
||||
const fileExtension = fileName.substring(fileName.lastIndexOf('.')).toLowerCase()
|
||||
|
||||
if (!allowedTypes.includes(fileExtension)) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: `文件类型不支持,仅支持 ${allowedTypes.join('、')} 格式的文件`
|
||||
})
|
||||
this.selectedImportFile = null
|
||||
this.importFileList = []
|
||||
if (this.$refs.importUpload) {
|
||||
this.$refs.importUpload.clearFiles()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 只保留最后一个文件
|
||||
this.selectedImportFile = file.raw || file
|
||||
this.importFileList = fileList.slice(-1)
|
||||
},
|
||||
// 移除导入文件
|
||||
handleImportFileRemove(file, fileList) {
|
||||
this.selectedImportFile = null
|
||||
this.importFileList = []
|
||||
},
|
||||
// 确认导入
|
||||
handleImportSubmit() {
|
||||
if (!this.selectedImportFile) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请先选择要导入的文件'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('file', this.selectedImportFile)
|
||||
formData.append('userId', getUserId())
|
||||
|
||||
const request = {
|
||||
...api.UPLOAD_MANAGER_DATA,
|
||||
params: formData,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
|
||||
this.importing = true
|
||||
// 显示全屏 loading 提示
|
||||
const loadingInstance = this.$loading({
|
||||
lock: true,
|
||||
text: '正在导入数据,请稍候...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
this.$upload(request, null, false)
|
||||
.then((resp) => {
|
||||
console.log('导入成功:', resp)
|
||||
loadingInstance.close()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '导入成功'
|
||||
})
|
||||
this.handleImportDialogClose()
|
||||
// 导入成功后刷新列表
|
||||
this.loadManagerData()
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('导入失败:', err)
|
||||
loadingInstance.close()
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: err.message || '导入失败,请稍后重试'
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
// 确保 loading 在所有情况下都能关闭
|
||||
if (loadingInstance) {
|
||||
loadingInstance.close()
|
||||
}
|
||||
this.importing = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -920,4 +1269,13 @@ export default {
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
}
|
||||
.import-uploader {
|
||||
width: 100%;
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
}
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,17 @@
|
||||
<div class="title">
|
||||
参数模板管理
|
||||
</div>
|
||||
<div class="operation">
|
||||
<el-button v-if="hasTemplateManagementEditPermission()" type="primary" @click="handleDownloadImportTemplate">
|
||||
下载导入模板
|
||||
</el-button>
|
||||
<el-button v-if="hasTemplateManagementEditPermission()" class="import-btn" @click="handleImportTemplate()">
|
||||
导入参数模板
|
||||
</el-button>
|
||||
<el-button v-if="hasTemplateManagementEditPermission()" type="primary" @click="handleAddTemplate()">
|
||||
添加参数模板
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-search-panel">
|
||||
<div class="search-fields">
|
||||
@ -35,18 +46,6 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
<div class="search-actions">
|
||||
<el-button v-if="hasTemplateManagementEditPermission()" type="primary" @click="handleDownloadImportTemplate">
|
||||
下载导入模板
|
||||
</el-button>
|
||||
<el-button v-if="hasTemplateManagementEditPermission()" class="import-btn" @click="handleImportTemplate()">
|
||||
导入参数模板
|
||||
</el-button>
|
||||
<el-button v-if="hasTemplateManagementEditPermission()" type="primary" @click="handleAddTemplate()">
|
||||
添加参数模板
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -279,7 +278,6 @@ export default {
|
||||
colConfigs: [
|
||||
{
|
||||
prop: 'templateName',
|
||||
showOverflowTooltip: true,
|
||||
label: '模板名称',
|
||||
align: 'center'
|
||||
},
|
||||
|
||||
@ -1432,7 +1432,40 @@ export default {
|
||||
// 处理部门搜索
|
||||
handleDepartmentSearch() {
|
||||
// 搜索文本变化时,computed 属性 filteredDepartmentTreeData 会自动更新
|
||||
// 无需额外操作
|
||||
// 如果有搜索文本,展开所有节点以便查看搜索结果
|
||||
if (this.departmentSearchText && this.departmentSearchText.trim() !== '') {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.departmentTree) {
|
||||
// 获取所有节点的 key
|
||||
const allKeys = this.getAllDepartmentNodeKeys(this.filteredDepartmentTreeData)
|
||||
// 展开所有节点
|
||||
this.$refs.departmentTree.setExpandedKeys(allKeys)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 清空搜索时,收起所有节点
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.departmentTree) {
|
||||
this.$refs.departmentTree.setExpandedKeys([])
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 递归获取所有部门节点的 key
|
||||
getAllDepartmentNodeKeys(nodes) {
|
||||
let keys = []
|
||||
if (!Array.isArray(nodes)) {
|
||||
return keys
|
||||
}
|
||||
nodes.forEach(node => {
|
||||
if (node.id) {
|
||||
keys.push(node.id)
|
||||
}
|
||||
if (node.children && Array.isArray(node.children) && node.children.length > 0) {
|
||||
keys = keys.concat(this.getAllDepartmentNodeKeys(node.children))
|
||||
}
|
||||
})
|
||||
return keys
|
||||
},
|
||||
// 处理树节点点击
|
||||
handleDepartmentTreeNodeClick(data) {
|
||||
|
||||
@ -341,6 +341,10 @@ export default {
|
||||
this.loadUserSelfRole()
|
||||
this.loadData()
|
||||
},
|
||||
mounted() {
|
||||
this.loadUserSelfRole()
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
// 检查是否是管理员(isAdmin === 1)
|
||||
isAdmin() {
|
||||
|
||||
@ -1,19 +1,22 @@
|
||||
<template>
|
||||
<div class="apaas-custom-page-mydemo custom-page">
|
||||
<template v-if="!showReportDetail">
|
||||
<!-- <div class="page-header">
|
||||
<div class="title">
|
||||
报告管理
|
||||
<div class="page-header">
|
||||
<div class="title">
|
||||
对标报告
|
||||
</div>
|
||||
<div class="operation">
|
||||
<el-button v-if="hasReportEditPermission()" type="primary" @click="handleCreate">
|
||||
新增
|
||||
</el-button>
|
||||
<!-- <x-svg-icon
|
||||
:name="'refresh-icon'"
|
||||
class="pointer"
|
||||
style="cursor: pointer;"
|
||||
@click.native="handleRefresh()"
|
||||
></x-svg-icon> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<x-svg-icon
|
||||
:name="'refresh-icon'"
|
||||
class="pointer"
|
||||
style="cursor: pointer;"
|
||||
@click.native="handleRefresh()"
|
||||
></x-svg-icon>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="page-search-panel">
|
||||
<div class="searched-fields">
|
||||
@ -83,12 +86,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toolbar">
|
||||
<el-button v-if="hasReportEditPermission()" type="primary" @click="handleCreate">
|
||||
新增
|
||||
</el-button>
|
||||
<!-- <el-button @click="handleDownloadTemplate">下载模板</el-button> -->
|
||||
</div>
|
||||
<div class="page-data-list">
|
||||
<x-vxe-table
|
||||
ref="vxeTable"
|
||||
@ -338,7 +335,7 @@
|
||||
:on-remove="handleFileRemove"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
accept=".doc,.pdf,.xls,.xlsx,.ppt,.pptx"
|
||||
accept=".doc,.docx,.pdf,.xls,.xlsx,.ppt,.pptx"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload">
|
||||
选择文件
|
||||
@ -677,6 +674,10 @@ export default {
|
||||
this.loadUserSelfRole()
|
||||
this.loadData()
|
||||
},
|
||||
mounted() {
|
||||
this.loadUserSelfRole()
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
// 检查是否是管理员(isAdmin === 1)
|
||||
isAdmin() {
|
||||
@ -1100,12 +1101,12 @@ export default {
|
||||
},
|
||||
handleFileChange(file, fileList) {
|
||||
// 验证文件类型
|
||||
const allowedTypes = ['.doc', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx']
|
||||
const allowedTypes = ['.doc', '.docx', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx']
|
||||
const fileName = file.name.toLowerCase()
|
||||
const isValidType = allowedTypes.some((type) => fileName.endsWith(type))
|
||||
|
||||
if (!isValidType) {
|
||||
this.$message.error('不支持的文件类型,仅支持 .doc .pdf .xls .xlsx .ppt .pptx')
|
||||
this.$message.error('不支持的文件类型,仅支持 .doc .docx .pdf .xls .xlsx .ppt .pptx')
|
||||
this.$refs.upload.handleRemove(file)
|
||||
return false
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<!-- 草稿状态:显示发起和修改按钮 -->
|
||||
<template v-if="(reportDetail.status === 'DRAFT' || reportDetail.status === 'REJECTED')&& !isEditMode">
|
||||
<el-button @click="handleLaunch">
|
||||
发起
|
||||
提交
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleEdit">
|
||||
修改
|
||||
@ -36,14 +36,20 @@
|
||||
保存
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 审批中状态:显示审批按钮 -->
|
||||
<el-button
|
||||
v-if="reportDetail.status === 'APPROVING' && !isEditMode"
|
||||
type="primary"
|
||||
@click="handleApprove"
|
||||
>
|
||||
审批
|
||||
</el-button>
|
||||
<!-- 审批中状态:显示通过和退回按钮 -->
|
||||
<template v-if="reportDetail.status === 'APPROVING' && !isEditMode">
|
||||
<el-button
|
||||
@click="handleApprove('REJECT')"
|
||||
>
|
||||
退回
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleApprove('PASS')"
|
||||
>
|
||||
通过
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content">
|
||||
@ -369,7 +375,7 @@
|
||||
|
||||
<!-- 审批弹窗 -->
|
||||
<el-dialog
|
||||
title="审核"
|
||||
:title="approvalFormData.result === 'PASS' ? '通过' : '退回'"
|
||||
:visible.sync="approvalDialogVisible"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
@ -377,22 +383,12 @@
|
||||
@close="handleApprovalDialogClose"
|
||||
>
|
||||
<el-form ref="approvalForm" :model="approvalFormData" label-width="80px">
|
||||
<el-form-item label="审核">
|
||||
<el-radio-group v-model="approvalFormData.result">
|
||||
<el-radio label="PASS">
|
||||
通过
|
||||
</el-radio>
|
||||
<el-radio label="REJECT">
|
||||
退回
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-form-item label="说明">
|
||||
<el-input
|
||||
v-model="approvalFormData.opinion"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入备注"
|
||||
placeholder="请输入说明(可选)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -513,7 +509,7 @@ export default {
|
||||
operateTime: this.initiateNode.uploadTime,
|
||||
result: 'INITIATE',
|
||||
status: 'INITIATE',
|
||||
opinion: this.initiateNode.opinion || this.initiateNode.remark || this.initiateNode.comment || null
|
||||
opinion: this.initiateNode.opinion || this.initiateNode.remark || this.initiateNode.comment || '无'
|
||||
})
|
||||
}
|
||||
|
||||
@ -773,9 +769,9 @@ export default {
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
},
|
||||
handleApprove() {
|
||||
handleApprove(result) {
|
||||
this.approvalFormData = {
|
||||
result: '',
|
||||
result: result, // 'PASS' 或 'REJECT'
|
||||
opinion: ''
|
||||
}
|
||||
this.approvalDialogVisible = true
|
||||
@ -798,9 +794,9 @@ export default {
|
||||
}
|
||||
},
|
||||
handleApprovalSubmit() {
|
||||
// 验证是否选择了审核结果
|
||||
// 验证是否选择了审核结果(应该总是有值,因为是通过按钮传入的)
|
||||
if (!this.approvalFormData.result) {
|
||||
this.$message.warning('请选择审核结果(通过或退回)')
|
||||
this.$message.error('缺少审批信息')
|
||||
return
|
||||
}
|
||||
|
||||
@ -809,7 +805,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
// 构建提交数据
|
||||
// 构建提交数据(说明可以为空)
|
||||
const submitData = {
|
||||
flowId: this.detail.flowId,
|
||||
userId: getUserId(),
|
||||
|
||||
@ -342,6 +342,10 @@ export default {
|
||||
this.loadUserSelfRole()
|
||||
this.loadData()
|
||||
},
|
||||
mounted() {
|
||||
this.loadUserSelfRole()
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
// 检查是否是管理员(isAdmin === 1)
|
||||
isAdmin() {
|
||||
|
||||
@ -61,6 +61,15 @@
|
||||
>退回</a
|
||||
> -->
|
||||
</div>
|
||||
<div v-if="colConfig.customSlot === 'processTitle'" :key="'pt' + index + '' + rowIndex">
|
||||
<a
|
||||
href="javascript:void(0)"
|
||||
class="el-link el-link--primary"
|
||||
@click.stop="handleRowView(row)"
|
||||
>
|
||||
{{ row.processTitle || '--' }}
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template slot="empty">
|
||||
@ -159,7 +168,7 @@ export default {
|
||||
rowDraggable: false,
|
||||
colConfigs: [
|
||||
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
||||
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160' },
|
||||
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160', customSlot: 'processTitle' },
|
||||
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '140' },
|
||||
// { prop: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
||||
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user