fix:修改问题
This commit is contained in:
parent
3e4253d9a9
commit
8e35ac314b
Binary file not shown.
138086
apaas-custom-mydemo/apaas-custom-mydemo.common.js
Normal file
138086
apaas-custom-mydemo/apaas-custom-mydemo.common.js
Normal file
File diff suppressed because one or more lines are too long
1
apaas-custom-mydemo/apaas-custom-mydemo.css
Normal file
1
apaas-custom-mydemo/apaas-custom-mydemo.css
Normal file
File diff suppressed because one or more lines are too long
138096
apaas-custom-mydemo/apaas-custom-mydemo.umd.js
Normal file
138096
apaas-custom-mydemo/apaas-custom-mydemo.umd.js
Normal file
File diff suppressed because one or more lines are too long
19
apaas-custom-mydemo/apaas-custom-mydemo.umd.min.js
vendored
Normal file
19
apaas-custom-mydemo/apaas-custom-mydemo.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
146
apaas-custom-mydemo/apaas.json
Normal file
146
apaas-custom-mydemo/apaas.json
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
10
apaas-custom-mydemo/demo.html
Normal file
10
apaas-custom-mydemo/demo.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<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>
|
||||||
BIN
apaas-custom-mydemo/static/custom/apaas-custom-mydemo/1.jpg
Normal file
BIN
apaas-custom-mydemo/static/custom/apaas-custom-mydemo/1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@ -165,39 +165,43 @@ export default {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
GET_REPORT_LIST: {
|
GET_REPORT_LIST: {
|
||||||
url: '/custom/benchmark/getReportAndTodoByCondition',
|
url: 'http://10.26.81.22:9091/custom/benchmark/getReportAndTodoByCondition',
|
||||||
|
method: 'post'
|
||||||
|
},
|
||||||
|
GET_REPORT_LIST_BY_CONDITION: {
|
||||||
|
url: 'http://10.26.81.22:9091/custom/benchmark/getApprovalList',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
ADD_REPORT: {
|
ADD_REPORT: {
|
||||||
url: '/custom/benchmark/startReportApproval',
|
url: 'http://10.26.81.22:9091/custom/benchmark/startReportApproval',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
SAVE_REPORT: {
|
SAVE_REPORT: {
|
||||||
url: '/custom/benchmark/insertReport',
|
url: 'http://10.26.81.22:9091/custom/benchmark/insertReport',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
EDIT_REPORT: {
|
EDIT_REPORT: {
|
||||||
url: '/custom/benchmark/updateReport',
|
url: 'http://10.26.81.22:9091/custom/benchmark/updateReport',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
RESTART_REPORT_APPROVAL: {
|
RESTART_REPORT_APPROVAL: {
|
||||||
url: '/custom/benchmark/restartReportApproval',
|
url: 'http://10.26.81.22:9091/custom/benchmark/restartReportApproval',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
START_REPORT_APPROVAL: {
|
START_REPORT_APPROVAL: {
|
||||||
url: '/custom/benchmark/handleReportApproval',
|
url: 'http://10.26.81.22:9091/custom/benchmark/handleReportApproval',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
},
|
},
|
||||||
GET_REPORT_DETAIL: {
|
GET_REPORT_DETAIL: {
|
||||||
url: '/custom/benchmark/getReportDetail',
|
url: 'http://10.26.81.22:9091/custom/benchmark/getReportDetail',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
GET_REPORT_DETAIL_PROCESS: {
|
GET_REPORT_DETAIL_PROCESS: {
|
||||||
url: '/custom/benchmark/getReportProcess',
|
url: 'http://10.26.81.22:9091/custom/benchmark/getReportProcess',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
DOWNLOAD_REPORT: {
|
DOWNLOAD_REPORT: {
|
||||||
url: '/custom/benchmark/downloadReport',
|
url: 'http://10.26.81.22:9091/custom/benchmark/downloadReport',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
//权限管理相关接口
|
//权限管理相关接口
|
||||||
|
|||||||
@ -51,13 +51,13 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="部门:" prop="department">
|
<el-form-item v-if="dispatchType !== 'update_param'" label="部门:" prop="department">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.department"
|
v-model="formData.department"
|
||||||
placeholder="请选择部门"
|
placeholder="请选择部门"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="!formData.subsystem || (dispatchType === 'update_param' && !formData.partsName)"
|
:disabled="!formData.subsystem"
|
||||||
@change="handleDepartmentChange"
|
@change="handleDepartmentChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@ -77,13 +77,22 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="dispatchType === 'update_param'" label="现填写人:">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.currentFillerName"
|
||||||
|
disabled
|
||||||
|
placeholder="暂无填写人"
|
||||||
|
readonly
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item :label="dispatchType === 'update_param' ? '填写人:' : '责任人:'" prop="userId">
|
<el-form-item :label="dispatchType === 'update_param' ? '填写人:' : '责任人:'" prop="userId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.userId"
|
v-model="formData.userId"
|
||||||
:placeholder="dispatchType === 'update_param' ? '请输入填写人姓名进行搜索' : '请输入责任人姓名进行搜索'"
|
:placeholder="dispatchType === 'update_param' ? '请输入填写人姓名进行搜索' : '请输入责任人姓名进行搜索'"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
:disabled="!formData.department || (dispatchType === 'update_param' && !formData.partsName)"
|
:disabled="dispatchType === 'update_param' ? !formData.partsName : !formData.department"
|
||||||
filterable
|
filterable
|
||||||
remote
|
remote
|
||||||
reserve-keyword
|
reserve-keyword
|
||||||
@ -155,6 +164,8 @@ export default {
|
|||||||
department: '',
|
department: '',
|
||||||
currentResponsibleId: '', // 现责任人的ID(用于判断是新增还是修改)
|
currentResponsibleId: '', // 现责任人的ID(用于判断是新增还是修改)
|
||||||
currentResponsibleName: '', // 现责任人名称(只读显示)
|
currentResponsibleName: '', // 现责任人名称(只读显示)
|
||||||
|
currentFillerId: '', // 现填写人的ID(用于判断是新增还是修改)
|
||||||
|
currentFillerName: '', // 现填写人名称(只读显示)
|
||||||
userId: '', // 新责任人的userId(用于 el-select 的 v-model)
|
userId: '', // 新责任人的userId(用于 el-select 的 v-model)
|
||||||
userNumber: '', // 新责任人的userNumber(用于提交)
|
userNumber: '', // 新责任人的userNumber(用于提交)
|
||||||
username: '', // 新责任人的username(用于显示)
|
username: '', // 新责任人的username(用于显示)
|
||||||
@ -178,9 +189,6 @@ export default {
|
|||||||
subsystem: [
|
subsystem: [
|
||||||
{ required: true, message: '请选择子系统', trigger: 'change' }
|
{ required: true, message: '请选择子系统', trigger: 'change' }
|
||||||
],
|
],
|
||||||
department: [
|
|
||||||
{ required: true, message: '请选择部门', trigger: 'change' }
|
|
||||||
],
|
|
||||||
userId: [
|
userId: [
|
||||||
{ required: true, message: this.dispatchType === 'update_param' ? '请选择填写人' : '请选择责任人', trigger: 'change' }
|
{ required: true, message: this.dispatchType === 'update_param' ? '请选择填写人' : '请选择责任人', trigger: 'change' }
|
||||||
]
|
]
|
||||||
@ -190,6 +198,11 @@ export default {
|
|||||||
rules.partsName = [
|
rules.partsName = [
|
||||||
{ required: true, message: '请选择零部件名称', trigger: 'change' }
|
{ required: true, message: '请选择零部件名称', trigger: 'change' }
|
||||||
]
|
]
|
||||||
|
} else {
|
||||||
|
// 如果是批量修改责任人,添加部门验证
|
||||||
|
rules.department = [
|
||||||
|
{ required: true, message: '请选择部门', trigger: 'change' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
return rules
|
return rules
|
||||||
}
|
}
|
||||||
@ -219,6 +232,8 @@ export default {
|
|||||||
department: '',
|
department: '',
|
||||||
currentResponsibleId: '',
|
currentResponsibleId: '',
|
||||||
currentResponsibleName: '',
|
currentResponsibleName: '',
|
||||||
|
currentFillerId: '',
|
||||||
|
currentFillerName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userNumber: '',
|
userNumber: '',
|
||||||
username: '',
|
username: '',
|
||||||
@ -250,6 +265,8 @@ export default {
|
|||||||
department: '',
|
department: '',
|
||||||
currentResponsibleId: '',
|
currentResponsibleId: '',
|
||||||
currentResponsibleName: '',
|
currentResponsibleName: '',
|
||||||
|
currentFillerId: '',
|
||||||
|
currentFillerName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userNumber: '',
|
userNumber: '',
|
||||||
username: '',
|
username: '',
|
||||||
@ -304,11 +321,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理子系统选择变化
|
// 处理子系统选择变化
|
||||||
handleSubsystemChange(subsystem) {
|
handleSubsystemChange(subsystem) {
|
||||||
// 清空零部件名称、部门和现责任人
|
// 清空零部件名称、部门和现责任人/现填写人
|
||||||
this.formData.partsName = ''
|
this.formData.partsName = ''
|
||||||
this.formData.department = ''
|
this.formData.department = ''
|
||||||
this.formData.currentResponsibleId = ''
|
this.formData.currentResponsibleId = ''
|
||||||
this.formData.currentResponsibleName = ''
|
this.formData.currentResponsibleName = ''
|
||||||
|
this.formData.currentFillerId = ''
|
||||||
|
this.formData.currentFillerName = ''
|
||||||
this.formData.rowId = ''
|
this.formData.rowId = ''
|
||||||
this.formData.userId = ''
|
this.formData.userId = ''
|
||||||
this.formData.userNumber = ''
|
this.formData.userNumber = ''
|
||||||
@ -329,24 +348,29 @@ export default {
|
|||||||
params.forEach((param) => {
|
params.forEach((param) => {
|
||||||
// 检查参数是否属于选中的子系统
|
// 检查参数是否属于选中的子系统
|
||||||
if (param.subsystemName === subsystem) {
|
if (param.subsystemName === subsystem) {
|
||||||
// 如果是批量修改填写人,收集零部件名称
|
// 如果是批量修改填写人,收集零部件名称(包括 /)
|
||||||
if (this.dispatchType === 'update_param') {
|
if (this.dispatchType === 'update_param') {
|
||||||
const paramPartsName = param.partsName || partsName
|
const paramPartsName = param.partsName || partsName
|
||||||
if (paramPartsName && paramPartsName !== '/') {
|
if (paramPartsName) {
|
||||||
partsNameSet.add(paramPartsName)
|
partsNameSet.add(paramPartsName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 收集部门名称
|
// 收集部门名称(仅用于批量修改责任人)
|
||||||
if (param.department) {
|
if (this.dispatchType !== 'update_param' && param.department) {
|
||||||
departmentSet.add(param.department)
|
departmentSet.add(param.department)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// 如果是批量修改填写人,设置零部件名称列表
|
// 如果是批量修改填写人,设置零部件名称列表(添加 / 作为默认项)
|
||||||
if (this.dispatchType === 'update_param') {
|
if (this.dispatchType === 'update_param') {
|
||||||
this.availablePartsNames = Array.from(partsNameSet).sort()
|
const partsNamesArray = Array.from(partsNameSet).sort()
|
||||||
|
// 如果 / 不在列表中,添加到开头
|
||||||
|
if (!partsNamesArray.includes('/')) {
|
||||||
|
partsNamesArray.unshift('/')
|
||||||
|
}
|
||||||
|
this.availablePartsNames = partsNamesArray
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是批量修改责任人,直接设置部门列表(不依赖零部件名称)
|
// 如果是批量修改责任人,直接设置部门列表(不依赖零部件名称)
|
||||||
@ -363,41 +387,72 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理零部件名称选择变化(仅用于批量修改填写人)
|
// 处理零部件名称选择变化(仅用于批量修改填写人)
|
||||||
handlePartsNameChange(partsName) {
|
handlePartsNameChange(partsName) {
|
||||||
// 清空部门和填写人
|
// 清空现填写人和新填写人
|
||||||
this.formData.department = ''
|
this.formData.currentFillerId = ''
|
||||||
|
this.formData.currentFillerName = ''
|
||||||
this.formData.userId = ''
|
this.formData.userId = ''
|
||||||
this.formData.userNumber = ''
|
this.formData.userNumber = ''
|
||||||
this.formData.username = ''
|
this.formData.username = ''
|
||||||
this.availableDepartments = []
|
|
||||||
this.userOptions = []
|
this.userOptions = []
|
||||||
// 根据子系统和零部件名称筛选部门列表
|
// 根据子系统和零部件名称查找现填写人
|
||||||
if (partsName && this.formData.subsystem) {
|
if (partsName && this.formData.subsystem) {
|
||||||
const departmentSet = new Set()
|
this.findCurrentFiller()
|
||||||
const currentVersionData = this.versionData[this.currentVersionId] || {}
|
|
||||||
|
|
||||||
// 遍历所有零部件名称(partsName)
|
|
||||||
Object.keys(currentVersionData).forEach((dataPartsName) => {
|
|
||||||
const params = currentVersionData[dataPartsName] || []
|
|
||||||
// 遍历该零部件下的所有参数
|
|
||||||
params.forEach((param) => {
|
|
||||||
// 检查参数是否属于选中的子系统和零部件名称
|
|
||||||
const paramPartsName = param.partsName || dataPartsName
|
|
||||||
if (
|
|
||||||
param.subsystemName === this.formData.subsystem &&
|
|
||||||
paramPartsName === partsName &&
|
|
||||||
param.department
|
|
||||||
) {
|
|
||||||
departmentSet.add(param.department)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// 转换为数组格式
|
|
||||||
this.availableDepartments = Array.from(departmentSet).map((dept) => ({
|
|
||||||
department: dept
|
|
||||||
}))
|
|
||||||
} else {
|
} else {
|
||||||
this.availableDepartments = []
|
this.formData.currentFillerId = ''
|
||||||
|
this.formData.currentFillerName = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查找现填写人(根据子系统和零部件名称)
|
||||||
|
findCurrentFiller() {
|
||||||
|
if (!this.formData.subsystem || !this.formData.partsName) {
|
||||||
|
this.formData.currentFillerId = ''
|
||||||
|
this.formData.currentFillerName = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从 versionData 中查找现填写人
|
||||||
|
const currentVersionData = this.versionData[this.currentVersionId] || {}
|
||||||
|
let foundFiller = null
|
||||||
|
|
||||||
|
// 遍历所有零部件名称(partsName)
|
||||||
|
Object.keys(currentVersionData).forEach((dataPartsName) => {
|
||||||
|
const params = currentVersionData[dataPartsName] || []
|
||||||
|
// 遍历该零部件下的所有参数
|
||||||
|
params.forEach((param) => {
|
||||||
|
// 检查参数是否属于选中的子系统和零部件名称
|
||||||
|
const paramPartsName = param.partsName || dataPartsName
|
||||||
|
if (
|
||||||
|
param.subsystemName === this.formData.subsystem &&
|
||||||
|
paramPartsName === this.formData.partsName &&
|
||||||
|
param.filledByUserId
|
||||||
|
) {
|
||||||
|
// 找到第一个有填写人的参数,使用其填写人信息
|
||||||
|
if (!foundFiller) {
|
||||||
|
foundFiller = {
|
||||||
|
userId: param.filledByUserId,
|
||||||
|
username: param.filledBy || ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
if (foundFiller) {
|
||||||
|
// 如果找到了填写人,尝试从 fillerPersons 中获取完整信息
|
||||||
|
const fillerPerson = this.fillerPersons.find(
|
||||||
|
(p) => p.userId === foundFiller.userId || p.id === foundFiller.userId
|
||||||
|
)
|
||||||
|
if (fillerPerson) {
|
||||||
|
this.formData.currentFillerId = fillerPerson.userId || fillerPerson.id || ''
|
||||||
|
this.formData.currentFillerName = fillerPerson.userName || foundFiller.username || ''
|
||||||
|
} else {
|
||||||
|
this.formData.currentFillerId = foundFiller.userId || ''
|
||||||
|
this.formData.currentFillerName = foundFiller.username || ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 没有现填写人
|
||||||
|
this.formData.currentFillerId = ''
|
||||||
|
this.formData.currentFillerName = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 处理部门选择变化
|
// 处理部门选择变化
|
||||||
@ -437,16 +492,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 远程搜索责任人
|
// 远程搜索责任人/填写人
|
||||||
handleRemoteSearch(query) {
|
handleRemoteSearch(query) {
|
||||||
// 如果是批量修改填写人,需要检查零部件名称和部门
|
// 如果是批量修改填写人,只需要检查零部件名称
|
||||||
if (this.dispatchType === 'update_param') {
|
if (this.dispatchType === 'update_param') {
|
||||||
if (!this.formData.partsName || !this.formData.department) {
|
if (!this.formData.partsName) {
|
||||||
this.userOptions = []
|
this.userOptions = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 批量修改责任人,只需要检查部门
|
// 批量修改责任人,需要检查部门
|
||||||
if (!this.formData.department) {
|
if (!this.formData.department) {
|
||||||
this.userOptions = []
|
this.userOptions = []
|
||||||
return
|
return
|
||||||
@ -571,7 +626,6 @@ export default {
|
|||||||
const confirmData = {
|
const confirmData = {
|
||||||
subsystem: this.formData.subsystem,
|
subsystem: this.formData.subsystem,
|
||||||
partsName: this.formData.partsName,
|
partsName: this.formData.partsName,
|
||||||
department: this.formData.department,
|
|
||||||
userId: this.formData.userId, // 确保传递userId
|
userId: this.formData.userId, // 确保传递userId
|
||||||
userNumber: this.formData.userNumber || this.formData.userId, // 如果没有 userNumber,使用 userId
|
userNumber: this.formData.userNumber || this.formData.userId, // 如果没有 userNumber,使用 userId
|
||||||
username: this.formData.username || ''
|
username: this.formData.username || ''
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<el-button type="primary" v-if="detail.statusDescription === '审批中'" size="small" @click="handleApprove">
|
<el-button type="primary" size="small" @click="handleApprove">
|
||||||
审批
|
审批
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1450,9 +1450,9 @@ export default {
|
|||||||
|
|
||||||
// 如果是批量修改填写人,直接更新页面数据
|
// 如果是批量修改填写人,直接更新页面数据
|
||||||
if (this.dispatchType === 'update_param') {
|
if (this.dispatchType === 'update_param') {
|
||||||
const { subsystem, partsName, department, userId, userNumber, username } = change
|
const { subsystem, partsName, userId, userNumber, username } = change
|
||||||
console.log(change, 'change', subsystem, partsName, department, userId, userNumber, username)
|
console.log(change, 'change', subsystem, partsName, userId, userNumber, username)
|
||||||
if (!subsystem || !partsName || !department || !userId) {
|
if (!subsystem || !partsName || !userId) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '缺少必要参数'
|
message: '缺少必要参数'
|
||||||
@ -1460,9 +1460,6 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标准化部门路径(将 · 替换为 -),确保匹配正确
|
|
||||||
const normalizedDepartment = department.replace(/·/g, '-')
|
|
||||||
|
|
||||||
// 获取当前版本的数据
|
// 获取当前版本的数据
|
||||||
const currentData = this.versionData[this.currentVersionId] || {}
|
const currentData = this.versionData[this.currentVersionId] || {}
|
||||||
let updateCount = 0
|
let updateCount = 0
|
||||||
@ -1480,22 +1477,17 @@ export default {
|
|||||||
const params = currentData[dataPartsName] || []
|
const params = currentData[dataPartsName] || []
|
||||||
// 遍历该零部件下的所有参数
|
// 遍历该零部件下的所有参数
|
||||||
params.forEach((param, index) => {
|
params.forEach((param, index) => {
|
||||||
// 标准化参数的部门路径(将 · 替换为 -)
|
|
||||||
const normalizedParamDept = (param.department || '').replace(/·/g, '-')
|
|
||||||
// 获取参数的零部件名称(优先使用param.partsName,否则使用dataPartsName)
|
// 获取参数的零部件名称(优先使用param.partsName,否则使用dataPartsName)
|
||||||
const paramPartsName = param.partsName || dataPartsName
|
const paramPartsName = param.partsName || dataPartsName
|
||||||
|
|
||||||
// 检查参数是否匹配子系统、零部件名称和部门(使用标准化后的部门路径进行匹配)
|
// 检查参数是否匹配子系统和零部件名称(不再匹配部门)
|
||||||
if (
|
if (
|
||||||
param.subsystemName === subsystem &&
|
param.subsystemName === subsystem &&
|
||||||
paramPartsName === partsName &&
|
paramPartsName === partsName
|
||||||
normalizedParamDept === normalizedDepartment
|
|
||||||
) {
|
) {
|
||||||
// 更新填写人信息
|
// 更新填写人信息
|
||||||
param.filledBy = userId // 填写人ID(userId,用于提交)
|
param.filledBy = userId // 填写人ID(userId,用于提交)
|
||||||
param.filledByUserId = userId // 填写人userId(用于 el-select 的 v-model)
|
param.filledByUserId = userId // 填写人userId(用于 el-select 的 v-model)
|
||||||
// 同步更新部门信息
|
|
||||||
param.department = department
|
|
||||||
|
|
||||||
// 使用 Vue.set 确保响应式更新
|
// 使用 Vue.set 确保响应式更新
|
||||||
this.$set(currentData[dataPartsName], index, param)
|
this.$set(currentData[dataPartsName], index, param)
|
||||||
|
|||||||
@ -49,14 +49,14 @@
|
|||||||
下载导入模板
|
下载导入模板
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="shouldShowMaintainButton"
|
|
||||||
class="right-button"
|
class="right-button"
|
||||||
@click="handleMaintainParams"
|
@click="handleMaintainParams"
|
||||||
>
|
>
|
||||||
维护参数
|
维护参数
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="shouldShowMaintainButton"
|
|
||||||
class="right-button-primary"
|
class="right-button-primary"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleInitiateApproval"
|
@click="handleInitiateApproval"
|
||||||
@ -179,8 +179,8 @@
|
|||||||
:pageConfig="approvalTableConfig.pageConfig"
|
:pageConfig="approvalTableConfig.pageConfig"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
class="approval-table"
|
class="approval-table"
|
||||||
@size-change="pageSizeChange"
|
@size-change="approvalPageSizeChange"
|
||||||
@current-page-change="currentChange"
|
@current-page-change="approvalCurrentPageChange"
|
||||||
>
|
>
|
||||||
</x-vxe-table>
|
</x-vxe-table>
|
||||||
</div>
|
</div>
|
||||||
@ -1300,6 +1300,14 @@ export default {
|
|||||||
this.$set(this.pagination, 'currentPage', currentPage)
|
this.$set(this.pagination, 'currentPage', currentPage)
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
|
approvalPageSizeChange(size) {
|
||||||
|
this.$set(this.pagination, 'pageSize', size)
|
||||||
|
this.getApprovalChange()
|
||||||
|
},
|
||||||
|
approvalCurrentPageChange(currentPage) {
|
||||||
|
this.$set(this.pagination, 'currentPage', currentPage)
|
||||||
|
this.getApprovalChange()
|
||||||
|
},
|
||||||
selectDataChange(data) {
|
selectDataChange(data) {
|
||||||
this.$emit('select-data-change', data)
|
this.$emit('select-data-change', data)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apaas-custom-page-mydemo custom-page">
|
<div class="apaas-custom-page-mydemo custom-page">
|
||||||
<template v-if="!showReportDetail">
|
<template v-if="!showReportDetail">
|
||||||
<div class="page-header">
|
<!-- <div class="page-header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
报告管理
|
报告管理
|
||||||
</div>
|
</div>
|
||||||
@ -13,201 +13,210 @@
|
|||||||
@click.native="handleRefresh()"
|
@click.native="handleRefresh()"
|
||||||
></x-svg-icon>
|
></x-svg-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="page-search-panel">
|
<div class="page-search-panel">
|
||||||
<div class="searched-fields">
|
<div class="searched-fields">
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">厂家</span>
|
<span class="fielded-label">厂家</span>
|
||||||
<el-input v-model="searchPanelValue.manufacturerName" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.manufacturerName" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">型号</span>
|
<span class="fielded-label">型号</span>
|
||||||
<el-input v-model="searchPanelValue.modelName" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.modelName" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">产品编号</span>
|
<span class="fielded-label">产品编号</span>
|
||||||
<el-input v-model="searchPanelValue.productNumber" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.productNumber" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">板块</span>
|
<span class="fielded-label">板块</span>
|
||||||
<el-input v-model="searchPanelValue.plate" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.plate" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">平台</span>
|
<span class="fielded-label">平台</span>
|
||||||
<el-input v-model="searchPanelValue.platform" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.platform" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">系列</span>
|
<span class="fielded-label">系列</span>
|
||||||
<el-input v-model="searchPanelValue.series" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.series" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">细分市场</span>
|
<span class="fielded-label">细分市场</span>
|
||||||
<el-input v-model="searchPanelValue.marketSegment" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.marketSegment" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">项目名称</span>
|
<span class="fielded-label">项目名称</span>
|
||||||
<el-input v-model="searchPanelValue.projectName" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.projectName" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">项目编号</span>
|
<span class="fielded-label">项目编号</span>
|
||||||
<el-input v-model="searchPanelValue.projectNumber" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.projectNumber" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">领域/模块</span>
|
<span class="fielded-label">领域/模块</span>
|
||||||
<el-input v-model="searchPanelValue.module" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.module" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">状态</span>
|
<span class="fielded-label">状态</span>
|
||||||
<el-select
|
<el-select v-model="searchPanelValue.status" clearable filterable placeholder="请选择">
|
||||||
v-model="searchPanelValue.status"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusOptions"
|
v-for="item in statusOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">标题</span>
|
<span class="fielded-label">标题</span>
|
||||||
<el-input v-model="searchPanelValue.title" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.title" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="search-actions">
|
<div class="search-actions">
|
||||||
<el-button type="primary" @click="handleSearch">
|
<el-button type="primary" @click="handleSearch">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="resetSearch">
|
<el-button @click="resetSearch">
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<el-button type="primary" @click="handleCreate">新增</el-button>
|
<el-button type="primary" @click="handleCreate">新增</el-button>
|
||||||
<!-- <el-button @click="handleDownloadTemplate">下载模板</el-button> -->
|
<!-- <el-button @click="handleDownloadTemplate">下载模板</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="page-data-list">
|
<div class="page-data-list">
|
||||||
<x-vxe-table
|
<x-vxe-table
|
||||||
ref="vxeTable"
|
ref="vxeTable"
|
||||||
:border="true"
|
:border="true"
|
||||||
:seqWidth="40"
|
:seqWidth="40"
|
||||||
:colConfigs="tableConfig.colConfigs"
|
:colConfigs="tableConfig.colConfigs"
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:rowDraggable="tableConfig.rowDraggable"
|
:rowDraggable="tableConfig.rowDraggable"
|
||||||
:seqType="tableConfig.seqType"
|
:seqType="tableConfig.seqType"
|
||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
:layout="tableConfig.layout"
|
:layout="tableConfig.layout"
|
||||||
:seqConfig="tableConfig.seqConfig"
|
:seqConfig="tableConfig.seqConfig"
|
||||||
:autoSize="tableConfig.autoSize"
|
:autoSize="tableConfig.autoSize"
|
||||||
:pageConfig="tableConfig.pageConfig"
|
:pageConfig="tableConfig.pageConfig"
|
||||||
class="block-table"
|
class="block-table"
|
||||||
@table-row-click="rowClickEvent"
|
@table-row-click="rowClickEvent"
|
||||||
@size-change="pageSizeChange"
|
@size-change="pageSizeChange"
|
||||||
@current-page-change="currentChange"
|
@current-page-change="currentChange"
|
||||||
@select-data-change="selectDataChange"
|
@select-data-change="selectDataChange"
|
||||||
>
|
|
||||||
<template
|
|
||||||
v-for="(colConfig, index) in tableConfig.colConfigs"
|
|
||||||
v-slot:[colConfig.customHeadSlot]="{ column }"
|
|
||||||
>
|
>
|
||||||
<div v-if="colConfig.customHeadSlot" :key="index"> {{ column }} {{ colConfig }} </div>
|
<template
|
||||||
</template>
|
v-for="(colConfig, index) in tableConfig.colConfigs"
|
||||||
|
v-slot:[colConfig.customHeadSlot]="{ column }"
|
||||||
|
>
|
||||||
|
<div v-if="colConfig.customHeadSlot" :key="index"> {{ column }} {{ colConfig }} </div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template
|
<template
|
||||||
v-for="(colConfig, index) in tableConfig.colConfigs"
|
v-for="(colConfig, index) in tableConfig.colConfigs"
|
||||||
v-slot:[colConfig.customSlot]="{ row, rowIndex }"
|
v-slot:[colConfig.customSlot]="{ row, rowIndex }"
|
||||||
>
|
>
|
||||||
<div v-if="colConfig.customSlot === 'status'" :key="index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'status'" :key="index + '' + rowIndex">
|
||||||
<span
|
<span
|
||||||
v-if="row[colConfig.prop] === 'APPROVING'"
|
v-if="row[colConfig.prop] === 'APPROVING'"
|
||||||
style="background: #E6A23C; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #E6A23C; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>审核中</span
|
>审核中</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-else-if="row[colConfig.prop] === 'COMPLETE'"
|
v-else-if="row[colConfig.prop] === 'COMPLETE'"
|
||||||
style="background: #67C23A; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #67C23A; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>已完成</span
|
>已完成</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-else-if="row[colConfig.prop] === 'DRAFT'"
|
v-else-if="row[colConfig.prop] === 'DRAFT'"
|
||||||
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>草稿</span
|
>草稿</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-else-if="row[colConfig.prop] === 'REJECTED'"
|
v-else-if="row[colConfig.prop] === 'REJECTED'"
|
||||||
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>已拒绝</span
|
>已拒绝</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>-</span
|
>-</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
||||||
<a
|
<a
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowView(row)"
|
@click.stop="handleRowView(row)"
|
||||||
>查看</a
|
>查看</a
|
||||||
>
|
>
|
||||||
<span style="width: 6px; display: inline-block"></span>
|
<span style="width: 6px; display: inline-block"></span>
|
||||||
<a
|
<a
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
>修改</a
|
>修改</a
|
||||||
>
|
>
|
||||||
<span style="width: 6px; display: inline-block"></span>
|
<span style="width: 6px; display: inline-block"></span>
|
||||||
<a
|
<a
|
||||||
v-if="row.status === 'APPROVING'"
|
v-if="row.status === 'APPROVING'"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleApprove(row)"
|
@click.stop="handleApprove(row)"
|
||||||
>审批</a
|
>审批</a
|
||||||
>
|
>
|
||||||
<span v-if="row.status === 'APPROVING'" style="width: 6px; display: inline-block"></span>
|
<span
|
||||||
<a
|
v-if="row.status === 'APPROVING'"
|
||||||
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
|
style="width: 6px; display: inline-block"
|
||||||
href="javascript:void(0)"
|
></span>
|
||||||
class="el-link el-link--primary"
|
<a
|
||||||
@click.stop="handleLaunch(row)"
|
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
|
||||||
>发起</a
|
href="javascript:void(0)"
|
||||||
>
|
class="el-link el-link--primary"
|
||||||
<span v-if="!row.status || row.status === '' || row.status === 'DRAFT'" style="width: 6px; display: inline-block"></span>
|
@click.stop="handleLaunch(row)"
|
||||||
<a
|
>发起</a
|
||||||
v-if="row.status === 'REJECTED'"
|
>
|
||||||
href="javascript:void(0)"
|
<span
|
||||||
class="el-link el-link--primary"
|
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
|
||||||
@click.stop="handleRestart(row)"
|
style="width: 6px; display: inline-block"
|
||||||
>重新发起</a
|
></span>
|
||||||
>
|
<a
|
||||||
<span v-if="row.status === 'REJECTED'" style="width: 6px; display: inline-block"></span>
|
v-if="row.status === 'REJECTED'"
|
||||||
<a
|
href="javascript:void(0)"
|
||||||
v-if="row.filePath"
|
class="el-link el-link--primary"
|
||||||
href="javascript:void(0)"
|
@click.stop="handleRestart(row)"
|
||||||
class="el-link el-link--primary"
|
>重新发起</a
|
||||||
@click.stop="handleDownload(row)"
|
>
|
||||||
>下载</a
|
<span
|
||||||
>
|
v-if="row.status === 'REJECTED'"
|
||||||
</div>
|
style="width: 6px; display: inline-block"
|
||||||
</template>
|
></span>
|
||||||
|
<a
|
||||||
|
v-if="row.filePath"
|
||||||
|
href="javascript:void(0)"
|
||||||
|
class="el-link el-link--primary"
|
||||||
|
@click.stop="handleDownload(row)"
|
||||||
|
>下载</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template slot="empty">
|
<template slot="empty">
|
||||||
<div class="table-empty">
|
<div class="table-empty">
|
||||||
<x-empty-page></x-empty-page>
|
<x-empty-page></x-empty-page>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</x-vxe-table>
|
</x-vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<report-detail v-else :detail="currentReportDetail" @close="closeReportDetail" @refresh="handleReportDetailRefresh" />
|
<report-detail
|
||||||
|
v-else
|
||||||
|
:detail="currentReportDetail"
|
||||||
|
@close="closeReportDetail"
|
||||||
|
@refresh="handleReportDetailRefresh"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 新增/修改报告弹窗 -->
|
<!-- 新增/修改报告弹窗 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -228,81 +237,81 @@
|
|||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="标题名称" prop="title">
|
<el-form-item label="标题名称" prop="title">
|
||||||
<el-input v-model="createFormData.title" placeholder="请输入" />
|
<el-input v-model="createFormData.title" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="厂家名称(全称)" prop="manufacturerName">
|
<el-form-item label="厂家名称(全称)" prop="manufacturerName">
|
||||||
<el-input v-model="createFormData.manufacturerName" placeholder="请输入" />
|
<el-input v-model="createFormData.manufacturerName" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产品型号(全称)" prop="modelName">
|
<el-form-item label="产品型号(全称)" prop="modelName">
|
||||||
<el-input v-model="createFormData.modelName" placeholder="请输入" />
|
<el-input v-model="createFormData.modelName" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="厂家简称" prop="manufacturerAbbreviation">
|
<el-form-item label="厂家简称" prop="manufacturerAbbreviation">
|
||||||
<el-input v-model="createFormData.manufacturerAbbreviation" placeholder="请输入" />
|
<el-input v-model="createFormData.manufacturerAbbreviation" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产品型号简称" prop="modelAbbreviation">
|
<el-form-item label="产品型号简称" prop="modelAbbreviation">
|
||||||
<el-input v-model="createFormData.modelAbbreviation" placeholder="请输入" />
|
<el-input v-model="createFormData.modelAbbreviation" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产品编号" prop="productNumber">
|
<el-form-item label="产品编号" prop="productNumber">
|
||||||
<el-input v-model="createFormData.productNumber" placeholder="请输入" />
|
<el-input v-model="createFormData.productNumber" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="领域/模块" prop="module">
|
<el-form-item label="领域/模块" prop="module">
|
||||||
<el-input v-model="createFormData.module" placeholder="请输入" />
|
<el-input v-model="createFormData.module" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="板块" prop="plate">
|
<el-form-item label="板块" prop="plate">
|
||||||
<el-input v-model="createFormData.plate" placeholder="请输入" />
|
<el-input v-model="createFormData.plate" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="平台" prop="platform">
|
<el-form-item label="平台" prop="platform">
|
||||||
<el-input v-model="createFormData.platform" placeholder="请输入" />
|
<el-input v-model="createFormData.platform" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="系列" prop="series">
|
<el-form-item label="系列" prop="series">
|
||||||
<el-input v-model="createFormData.series" placeholder="请输入" />
|
<el-input v-model="createFormData.series" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="细分市场" prop="marketSegment">
|
<el-form-item label="细分市场" prop="marketSegment">
|
||||||
<el-input v-model="createFormData.marketSegment" placeholder="请输入" />
|
<el-input v-model="createFormData.marketSegment" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目名称" prop="projectName">
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
<el-input v-model="createFormData.projectName" placeholder="请输入" />
|
<el-input v-model="createFormData.projectName" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目编号" prop="projectNumber">
|
<el-form-item label="项目编号" prop="projectNumber">
|
||||||
<el-input v-model="createFormData.projectNumber" placeholder="请输入" />
|
<el-input v-model="createFormData.projectNumber" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="附件上传" prop="attachments">
|
<el-form-item label="附件上传" prop="attachments">
|
||||||
@ -318,9 +327,9 @@
|
|||||||
<el-button type="primary" icon="el-icon-upload">
|
<el-button type="primary" icon="el-icon-upload">
|
||||||
选择文件
|
选择文件
|
||||||
</el-button>
|
</el-button>
|
||||||
<div slot="tip" class="el-upload__tip"
|
<div slot="tip" class="el-upload__tip">
|
||||||
>支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件</div
|
支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件
|
||||||
>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="说明" prop="explanation">
|
<el-form-item label="说明" prop="explanation">
|
||||||
@ -366,11 +375,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr
|
<tr v-for="(step, index) in launchWorkflowSteps" :key="index" class="workflow-row">
|
||||||
v-for="(step, index) in launchWorkflowSteps"
|
|
||||||
:key="index"
|
|
||||||
class="workflow-row"
|
|
||||||
>
|
|
||||||
<td class="step-name-cell">
|
<td class="step-name-cell">
|
||||||
<span class="step-name">
|
<span class="step-name">
|
||||||
{{ step.name }}
|
{{ step.name }}
|
||||||
@ -481,6 +486,7 @@ export default {
|
|||||||
status: ''
|
status: ''
|
||||||
},
|
},
|
||||||
statusOptions: [
|
statusOptions: [
|
||||||
|
{ id: 'DRAFT', label: '草稿' },
|
||||||
{ id: 'APPROVING', label: '审批中' },
|
{ id: 'APPROVING', label: '审批中' },
|
||||||
{ id: 'COMPLETE', label: '已完成' },
|
{ id: 'COMPLETE', label: '已完成' },
|
||||||
{ id: 'REJECTED', label: '已拒绝' }
|
{ id: 'REJECTED', label: '已拒绝' }
|
||||||
@ -690,10 +696,12 @@ export default {
|
|||||||
}
|
}
|
||||||
// 如果有文件路径,显示在文件列表中
|
// 如果有文件路径,显示在文件列表中
|
||||||
if (row.fileUrl || row.filePath) {
|
if (row.fileUrl || row.filePath) {
|
||||||
this.fileList = [{
|
this.fileList = [
|
||||||
name: row.title || '文件',
|
{
|
||||||
url: row.fileUrl || row.filePath
|
name: row.title || '文件',
|
||||||
}]
|
url: row.fileUrl || row.filePath
|
||||||
|
}
|
||||||
|
]
|
||||||
} else {
|
} else {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
}
|
}
|
||||||
@ -787,6 +795,7 @@ export default {
|
|||||||
// 构建提交数据
|
// 构建提交数据
|
||||||
const submitData = {
|
const submitData = {
|
||||||
reportId: reportId,
|
reportId: reportId,
|
||||||
|
userId: getUserId(),
|
||||||
proofreadUsers: this.launchWorkflowSteps[0].handlers,
|
proofreadUsers: this.launchWorkflowSteps[0].handlers,
|
||||||
reviewUsers: this.launchWorkflowSteps[1].handlers,
|
reviewUsers: this.launchWorkflowSteps[1].handlers,
|
||||||
countersignUsers: [],
|
countersignUsers: [],
|
||||||
@ -821,9 +830,7 @@ export default {
|
|||||||
if (!query || query.trim() === '') {
|
if (!query || query.trim() === '') {
|
||||||
// 空查询时,只保留已选择的人员在选项中
|
// 空查询时,只保留已选择的人员在选项中
|
||||||
if (step.handlers && step.handlers.length > 0) {
|
if (step.handlers && step.handlers.length > 0) {
|
||||||
const selectedOptions = step.options.filter(opt =>
|
const selectedOptions = step.options.filter((opt) => step.handlers.includes(opt.userId))
|
||||||
step.handlers.includes(opt.userId)
|
|
||||||
)
|
|
||||||
step.options = selectedOptions
|
step.options = selectedOptions
|
||||||
} else {
|
} else {
|
||||||
step.options = []
|
step.options = []
|
||||||
@ -854,24 +861,24 @@ export default {
|
|||||||
}
|
}
|
||||||
// 转换为选项格式
|
// 转换为选项格式
|
||||||
const users = result
|
const users = result
|
||||||
.map(user => ({
|
.map((user) => ({
|
||||||
userId: user.userId || user.id,
|
userId: user.userId || user.id,
|
||||||
username: user.username || user.name,
|
username: user.username || user.name,
|
||||||
userNumber: user.userNumber || user.userId || user.id
|
userNumber: user.userNumber || user.userId || user.id
|
||||||
}))
|
}))
|
||||||
.filter(user => user.userId && user.userNumber)
|
.filter((user) => user.userId && user.userNumber)
|
||||||
const existingIds = new Set(step.handlers || [])
|
const existingIds = new Set(step.handlers || [])
|
||||||
const filteredUsers = users.filter(user => !existingIds.has(user.userId))
|
const filteredUsers = users.filter((user) => !existingIds.has(user.userId))
|
||||||
const selectedOptions = (step.options || []).filter(opt =>
|
const selectedOptions = (step.options || []).filter(
|
||||||
opt.userId && step.handlers && step.handlers.includes(opt.userId)
|
(opt) => opt.userId && step.handlers && step.handlers.includes(opt.userId)
|
||||||
)
|
)
|
||||||
const optionsMap = new Map()
|
const optionsMap = new Map()
|
||||||
selectedOptions.forEach(opt => {
|
selectedOptions.forEach((opt) => {
|
||||||
if (opt.userNumber) {
|
if (opt.userNumber) {
|
||||||
optionsMap.set(opt.userNumber, opt)
|
optionsMap.set(opt.userNumber, opt)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
filteredUsers.forEach(user => {
|
filteredUsers.forEach((user) => {
|
||||||
if (user.userNumber && !optionsMap.has(user.userNumber)) {
|
if (user.userNumber && !optionsMap.has(user.userNumber)) {
|
||||||
optionsMap.set(user.userNumber, user)
|
optionsMap.set(user.userNumber, user)
|
||||||
}
|
}
|
||||||
@ -882,9 +889,7 @@ export default {
|
|||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('搜索人员失败:', err)
|
console.error('搜索人员失败:', err)
|
||||||
if (step.handlers && step.handlers.length > 0) {
|
if (step.handlers && step.handlers.length > 0) {
|
||||||
const selectedOptions = step.options.filter(opt =>
|
const selectedOptions = step.options.filter((opt) => step.handlers.includes(opt.userId))
|
||||||
step.handlers.includes(opt.userId)
|
|
||||||
)
|
|
||||||
step.options = selectedOptions
|
step.options = selectedOptions
|
||||||
} else {
|
} else {
|
||||||
step.options = []
|
step.options = []
|
||||||
@ -1118,11 +1123,9 @@ export default {
|
|||||||
if (!query || query.trim() === '') {
|
if (!query || query.trim() === '') {
|
||||||
// 空查询时,只保留已选择的人员在选项中
|
// 空查询时,只保留已选择的人员在选项中
|
||||||
if (step.handlers && step.handlers.length > 0) {
|
if (step.handlers && step.handlers.length > 0) {
|
||||||
const selectedOptions = step.options.filter(opt =>
|
const selectedOptions = step.options.filter((opt) => step.handlers.includes(opt.userId))
|
||||||
step.handlers.includes(opt.userId)
|
const missingIds = step.handlers.filter(
|
||||||
)
|
(id) => !selectedOptions.some((opt) => opt.userId === id)
|
||||||
const missingIds = step.handlers.filter(id =>
|
|
||||||
!selectedOptions.some(opt => opt.userId === id)
|
|
||||||
)
|
)
|
||||||
if (missingIds.length > 0) {
|
if (missingIds.length > 0) {
|
||||||
step.options = selectedOptions
|
step.options = selectedOptions
|
||||||
@ -1158,30 +1161,30 @@ export default {
|
|||||||
}
|
}
|
||||||
// 转换为选项格式:{userId: user.userId, username: user.username, userNumber: user.userNumber}
|
// 转换为选项格式:{userId: user.userId, username: user.username, userNumber: user.userNumber}
|
||||||
const users = result
|
const users = result
|
||||||
.map(user => ({
|
.map((user) => ({
|
||||||
userId: user.userId || user.id,
|
userId: user.userId || user.id,
|
||||||
username: user.username || user.name,
|
username: user.username || user.name,
|
||||||
userNumber: user.userNumber || user.userId || user.id
|
userNumber: user.userNumber || user.userId || user.id
|
||||||
}))
|
}))
|
||||||
.filter(user => user.userId && user.userNumber) // 过滤掉没有 userId 或 userNumber 的数据
|
.filter((user) => user.userId && user.userNumber) // 过滤掉没有 userId 或 userNumber 的数据
|
||||||
// step.handlers 现在是 userId 数组(因为 el-option 的 value 是 userId)
|
// step.handlers 现在是 userId 数组(因为 el-option 的 value 是 userId)
|
||||||
const existingIds = new Set(step.handlers || [])
|
const existingIds = new Set(step.handlers || [])
|
||||||
// 过滤掉已选择的人员
|
// 过滤掉已选择的人员
|
||||||
const filteredUsers = users.filter(user => !existingIds.has(user.userId))
|
const filteredUsers = users.filter((user) => !existingIds.has(user.userId))
|
||||||
// 合并:已选择的人员信息(从现有 options 中获取)+ 新的搜索结果
|
// 合并:已选择的人员信息(从现有 options 中获取)+ 新的搜索结果
|
||||||
const selectedOptions = (step.options || []).filter(opt =>
|
const selectedOptions = (step.options || []).filter(
|
||||||
opt.userId && step.handlers && step.handlers.includes(opt.userId)
|
(opt) => opt.userId && step.handlers && step.handlers.includes(opt.userId)
|
||||||
)
|
)
|
||||||
// 去重:使用 Map 确保每个 userNumber 只出现一次(使用 userNumber 作为 key 确保唯一性)
|
// 去重:使用 Map 确保每个 userNumber 只出现一次(使用 userNumber 作为 key 确保唯一性)
|
||||||
const optionsMap = new Map()
|
const optionsMap = new Map()
|
||||||
// 先添加已选择的选项
|
// 先添加已选择的选项
|
||||||
selectedOptions.forEach(opt => {
|
selectedOptions.forEach((opt) => {
|
||||||
if (opt.userNumber) {
|
if (opt.userNumber) {
|
||||||
optionsMap.set(opt.userNumber, opt)
|
optionsMap.set(opt.userNumber, opt)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 再添加新的搜索结果
|
// 再添加新的搜索结果
|
||||||
filteredUsers.forEach(user => {
|
filteredUsers.forEach((user) => {
|
||||||
if (user.userNumber && !optionsMap.has(user.userNumber)) {
|
if (user.userNumber && !optionsMap.has(user.userNumber)) {
|
||||||
optionsMap.set(user.userNumber, user)
|
optionsMap.set(user.userNumber, user)
|
||||||
}
|
}
|
||||||
@ -1193,9 +1196,7 @@ export default {
|
|||||||
console.error('搜索人员失败:', err)
|
console.error('搜索人员失败:', err)
|
||||||
// 搜索失败时,保留已选择的人员信息
|
// 搜索失败时,保留已选择的人员信息
|
||||||
if (step.handlers && step.handlers.length > 0) {
|
if (step.handlers && step.handlers.length > 0) {
|
||||||
const selectedOptions = step.options.filter(opt =>
|
const selectedOptions = step.options.filter((opt) => step.handlers.includes(opt.userId))
|
||||||
step.handlers.includes(opt.userId)
|
|
||||||
)
|
|
||||||
step.options = selectedOptions
|
step.options = selectedOptions
|
||||||
} else {
|
} else {
|
||||||
step.options = []
|
step.options = []
|
||||||
@ -1373,7 +1374,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 合并用户输入的搜索值
|
// 合并用户输入的搜索值
|
||||||
Object.keys(searchParams).forEach(key => {
|
Object.keys(searchParams).forEach((key) => {
|
||||||
if (this.searchPanelValue[key] !== undefined && this.searchPanelValue[key] !== null) {
|
if (this.searchPanelValue[key] !== undefined && this.searchPanelValue[key] !== null) {
|
||||||
searchParams[key] = this.searchPanelValue[key]
|
searchParams[key] = this.searchPanelValue[key]
|
||||||
}
|
}
|
||||||
@ -1404,112 +1405,112 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.custom-page {
|
.custom-page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
|
height: 56px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 56px;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
.page-header {
|
.title {
|
||||||
display: flex;
|
color: #303133;
|
||||||
align-items: center;
|
font-weight: 700;
|
||||||
height: 56px;
|
margin-left: 20px;
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 56px;
|
|
||||||
background: #fff;
|
|
||||||
border-bottom: 1px solid #ebeef5;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
color: #303133;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-left: 20px;
|
|
||||||
flex: 1;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.operation {
|
|
||||||
display: flex;
|
|
||||||
min-width: 330px;
|
|
||||||
justify-content: flex-end;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar {
|
|
||||||
background: #fff;
|
|
||||||
padding: 0 20px 12px 20px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-data-list {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
font-size: 12px;
|
||||||
padding: 20px;
|
|
||||||
|
|
||||||
.x-empty-page {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.file-list {
|
.operation {
|
||||||
margin-top: 10px;
|
|
||||||
|
|
||||||
.file-item {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
min-width: 330px;
|
||||||
padding: 8px 0;
|
justify-content: flex-end;
|
||||||
border-bottom: 1px solid #ebeef5;
|
margin-right: 20px;
|
||||||
|
|
||||||
.el-icon-document {
|
|
||||||
color: #909399;
|
|
||||||
font-size: 16px;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.file-name {
|
|
||||||
flex: 1;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #606266;
|
|
||||||
}
|
|
||||||
|
|
||||||
.file-remove {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #909399;
|
|
||||||
margin-left: 10px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: #409eff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-body-wrapper {
|
.toolbar {
|
||||||
|
background: #fff;
|
||||||
|
padding: 0 20px 12px 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-data-list {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 20px;
|
||||||
|
|
||||||
|
.x-empty-page {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-list {
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.file-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8px 0;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
|
||||||
|
.el-icon-document {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-name {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-remove {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #909399;
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-body-wrapper {
|
||||||
|
max-height: 70vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .create-report-dialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 20px 20px 10px 20px;
|
||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding-right: 10px;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .create-report-dialog {
|
::v-deep .el-upload-dragger {
|
||||||
.el-dialog__body {
|
width: 100%;
|
||||||
padding: 20px 20px 10px 20px;
|
height: 180px;
|
||||||
max-height: 70vh;
|
}
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-upload-dragger {
|
::v-deep .el-form-item {
|
||||||
width: 100%;
|
margin-bottom: 18px;
|
||||||
height: 180px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .el-form-item {
|
|
||||||
margin-bottom: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.approval-workflow {
|
.approval-workflow {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1598,66 +1599,66 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.page-search-panel {
|
.page-search-panel {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 16px 24px !important;
|
padding: 16px 24px !important;
|
||||||
border-bottom: 1px solid #ebeef5 !important;
|
border-bottom: 1px solid #ebeef5 !important;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column !important;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
|
.search-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column !important;
|
align-items: center;
|
||||||
gap: 16px;
|
justify-content: flex-end;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
.search-actions {
|
::v-deep .el-button {
|
||||||
display: flex;
|
padding: 0 16px;
|
||||||
align-items: center;
|
font-size: 14px;
|
||||||
justify-content: flex-end;
|
border-radius: 4px;
|
||||||
gap: 12px;
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
::v-deep .el-button {
|
|
||||||
padding: 0 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
border-radius: 4px;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.searched-fields {
|
.searched-fields {
|
||||||
max-height: 200px !important;
|
max-height: 200px !important;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-wrap: wrap !important;
|
flex-wrap: wrap !important;
|
||||||
flex-direction: row !important;
|
flex-direction: row !important;
|
||||||
gap: 16px 32px !important;
|
gap: 16px 32px !important;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
.searched-field {
|
.searched-field {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
gap: 12px !important;
|
gap: 12px !important;
|
||||||
flex: 1 1 calc((100% - 96px) / 4) !important;
|
flex: 1 1 calc((100% - 96px) / 4) !important;
|
||||||
// min-width: 160px !important;
|
// min-width: 160px !important;
|
||||||
max-width: calc(25% - 32px) !important;
|
max-width: calc(25% - 32px) !important;
|
||||||
.fielded-label {
|
.fielded-label {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
min-width: 80px !important;
|
min-width: 80px !important;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
text-align-last: right;
|
text-align-last: right;
|
||||||
text-justify: inter-ideograph;
|
text-justify: inter-ideograph;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input,
|
.el-input,
|
||||||
.el-select {
|
.el-select {
|
||||||
width: 170px;
|
width: 170px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner,
|
::v-deep .el-input__inner,
|
||||||
::v-deep .el-select .el-input__inner {
|
::v-deep .el-select .el-input__inner {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-select-dropdown__item {
|
.el-select-dropdown__item {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
justify-content: space-between !important;
|
justify-content: space-between !important;
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 审批流程 -->
|
<!-- 审批流程 -->
|
||||||
<section class="block-section">
|
<section v-if="reportDetail.status && reportDetail.status !== 'DRAFT'" class="block-section">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
审批流程
|
审批流程
|
||||||
</div>
|
</div>
|
||||||
@ -350,9 +350,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
// 如果已经有完整的详情数据,直接使用
|
// 如果已经有完整的详情数据,直接使用
|
||||||
this.reportDetail = this.detail
|
this.reportDetail = this.detail
|
||||||
// 如果flowId存在,加载审批流程
|
// 如果flowId存在且状态不是草稿,加载审批流程
|
||||||
if (this.detail.flowId) {
|
if (this.detail.flowId && this.reportDetail.status && this.reportDetail.status !== 'DRAFT') {
|
||||||
this.getApprovalSpet()
|
this.getApprovalSpet(this.detail.flowId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -374,8 +374,10 @@ export default {
|
|||||||
this.$request(request)
|
this.$request(request)
|
||||||
.asyncThen((resp) => {
|
.asyncThen((resp) => {
|
||||||
this.reportDetail = resp.data || resp
|
this.reportDetail = resp.data || resp
|
||||||
// 如果flowId存在,加载审批流程
|
// 如果flowId存在且状态不是草稿,加载审批流程
|
||||||
this.getApprovalSpet(flowId)
|
if (flowId && this.reportDetail.status && this.reportDetail.status !== 'DRAFT') {
|
||||||
|
this.getApprovalSpet(flowId)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取报告详情失败:', err)
|
console.error('获取报告详情失败:', err)
|
||||||
@ -529,12 +531,10 @@ export default {
|
|||||||
}
|
}
|
||||||
// 如果审批通过,返回上一级
|
// 如果审批通过,返回上一级
|
||||||
if (approvalResult === 'PASS') {
|
if (approvalResult === 'PASS') {
|
||||||
|
|
||||||
this.$emit('refresh')
|
this.$emit('refresh')
|
||||||
this.handleBack()
|
this.handleBack()
|
||||||
} else {
|
} else {
|
||||||
// 如果退回,只刷新流程数据,不返回
|
// 如果退回,只刷新流程数据,不返回
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -104,8 +104,8 @@
|
|||||||
<span v-else-if="row[colConfig.prop] === '已通过'" class="status-tag status-approved"
|
<span v-else-if="row[colConfig.prop] === '已通过'" class="status-tag status-approved"
|
||||||
>已通过</span
|
>已通过</span
|
||||||
>
|
>
|
||||||
<span v-else-if="row[colConfig.prop] === '已撤回'" class="status-tag status-withdrawn"
|
<span v-else-if="row[colConfig.prop] === '已拒绝'" class="status-tag status-withdrawn"
|
||||||
>已撤回</span
|
>已拒绝</span
|
||||||
>
|
>
|
||||||
<span v-else class="status-tag status-default">{{ row[colConfig.prop] }}</span>
|
<span v-else class="status-tag status-default">{{ row[colConfig.prop] }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -508,7 +508,10 @@ export default {
|
|||||||
// 通过API获取审批详情
|
// 通过API获取审批详情
|
||||||
const flowId = row.flowId || row.id
|
const flowId = row.flowId || row.id
|
||||||
if (!flowId) {
|
if (!flowId) {
|
||||||
this.$message.error('缺少审批ID,无法查看详情')
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '缺少审批ID,无法查看详情'
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.showEngineCheck = true
|
this.showEngineCheck = true
|
||||||
@ -773,8 +776,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.status-withdrawn {
|
&.status-withdrawn {
|
||||||
background: #f5f7fa;
|
background: #f56c6c;
|
||||||
color: #606266;
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user