|
|
|
|
@ -1,5 +1,12 @@ |
|
|
|
|
<template> |
|
|
|
|
<el-dialog :title="title" append-to-body :modelValue="openShow" width="80%" @close="closeDialog" fullscreen> |
|
|
|
|
<el-dialog |
|
|
|
|
:title="title" |
|
|
|
|
append-to-body |
|
|
|
|
:modelValue="openShow" |
|
|
|
|
width="80%" |
|
|
|
|
@close="closeDialog" |
|
|
|
|
fullscreen |
|
|
|
|
> |
|
|
|
|
<el-form :model="detailForm" :rules="executeRules" ref="executeForm" label-width="100"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
@ -101,8 +108,9 @@ |
|
|
|
|
<el-form-item |
|
|
|
|
label="附件:" |
|
|
|
|
v-if="subTitle == '执行' || subTitle == '核查' || subTitle == '核准'" |
|
|
|
|
prop="attachList" |
|
|
|
|
> |
|
|
|
|
<el-upload |
|
|
|
|
<!-- <el-upload |
|
|
|
|
class="upload-demo" |
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/" |
|
|
|
|
:on-preview="handlePreview" |
|
|
|
|
@ -113,9 +121,32 @@ |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:file-list="fileList" |
|
|
|
|
> |
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button> |
|
|
|
|
<div slot="tip" class="el-upload__tip">不能上传 exe 附件,且不超过 20M</div> |
|
|
|
|
<el-button type="primary">点击上传</el-button> |
|
|
|
|
<div>不能上传 exe 附件,且不超过 20M</div> |
|
|
|
|
</el-upload> --> |
|
|
|
|
<el-upload |
|
|
|
|
class="upload-demo" |
|
|
|
|
action="/api/blade-resource/oss/endpoint/put-file-attach" |
|
|
|
|
:on-success="handleSuccess" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
multiple |
|
|
|
|
:limit="1" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:file-list="fileList" |
|
|
|
|
accept=".pdf,.doc,.docx" |
|
|
|
|
> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary">点击上传</el-button> |
|
|
|
|
<div |
|
|
|
|
|
|
|
|
|
slot="tip" |
|
|
|
|
class="el-upload__tip" |
|
|
|
|
> |
|
|
|
|
支持扩展名:.pdf.doc.docx |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-upload> |
|
|
|
|
|
|
|
|
|
<div v-if="subTitle == '核查' || subTitle == '核准'" class="attachment-list"> |
|
|
|
|
<h4>附件下载</h4> |
|
|
|
|
<ul> |
|
|
|
|
@ -131,13 +162,6 @@ |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="14"> |
|
|
|
|
<el-form-item label="核查人:" v-if="subTitle == '执行'"> |
|
|
|
|
<!-- <el-select v-model="detailForm.userId" clearable filterable @change="handleUserChange"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in memberList" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> --> |
|
|
|
|
<jhSelect |
|
|
|
|
:value="detailForm.userId" |
|
|
|
|
@input="val => (detailForm.userId = val)" |
|
|
|
|
@ -183,13 +207,6 @@ |
|
|
|
|
search-key="id" |
|
|
|
|
:debounce-time="500" |
|
|
|
|
/> |
|
|
|
|
<!-- <el-select v-model="detailForm.userId" clearable filterable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in memberList" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> --> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<div v-if="subTitle == '核准'" style="color: #ffc300; margin-bottom: 10px"> |
|
|
|
|
@ -232,10 +249,14 @@ |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { getRoleUserList } from '@/api/processManagement/taskDispatch'; |
|
|
|
|
import { projectExecute, projectCheck, projectApprove,getProcessDetail } from '@/api/flowManagement/index'; |
|
|
|
|
import { |
|
|
|
|
projectExecute, |
|
|
|
|
projectCheck, |
|
|
|
|
projectApprove, |
|
|
|
|
getProcessDetail, |
|
|
|
|
} from '@/api/flowManagement/index'; |
|
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
|
import jhSelect from '@/components/jh-select/index.vue'; |
|
|
|
|
import { id } from 'element-plus/es/locales.mjs'; |
|
|
|
|
export default { |
|
|
|
|
components: { jhSelect }, |
|
|
|
|
props: { |
|
|
|
|
@ -261,15 +282,37 @@ export default { |
|
|
|
|
loadingShow: false, |
|
|
|
|
openShow: false, |
|
|
|
|
memberList: [], |
|
|
|
|
executeForm: {}, |
|
|
|
|
executeForm: { |
|
|
|
|
attachList:[] |
|
|
|
|
}, |
|
|
|
|
executeRules: { |
|
|
|
|
executeType: [{ required: true, message: '请选择执行类型', trigger: 'blur' }], |
|
|
|
|
milestoneMemo: [{ required: true, message: '请填写里程碑描述', trigger: 'blur' }], |
|
|
|
|
evolve: [{ required: true, message: '请填写里程碑进展', trigger: 'blur' }], |
|
|
|
|
lastPlan: [{ required: true, message: '请填写下一步计划', trigger: 'blur' }], |
|
|
|
|
attachList: [ |
|
|
|
|
{required: true, |
|
|
|
|
validator: (rule, value, callback) => { |
|
|
|
|
// 如果 subTitle 是 '执行',则附件必填 |
|
|
|
|
if (this.subTitle === '执行') { |
|
|
|
|
// 检查 fileList 是否为空 |
|
|
|
|
if (!this.fileList || this.fileList.length === 0) { |
|
|
|
|
callback(new Error('请上传附件')); |
|
|
|
|
} else { |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 其他状态可选填或不校验 |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
trigger: 'change', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
subTitle: '', |
|
|
|
|
executeResultList: [], |
|
|
|
|
fileList:[], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -282,9 +325,20 @@ export default { |
|
|
|
|
this.getRoleUserList(); |
|
|
|
|
this.getExecuteResult(); |
|
|
|
|
this.getDetails(); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
handleRemove(file, fileList) { |
|
|
|
|
this.fileList = []; |
|
|
|
|
}, |
|
|
|
|
handleSuccess(response, file, fileList) { |
|
|
|
|
console.log(response.data, 'response.data.link'); |
|
|
|
|
// this.ruleForm.attachId = response.data.attachId; |
|
|
|
|
|
|
|
|
|
this.fileList.push(response.data.link); |
|
|
|
|
}, |
|
|
|
|
handleExceed(files, fileList) { |
|
|
|
|
this.$message.error('标准文件只能上传一份'); |
|
|
|
|
}, |
|
|
|
|
// 获取详情数据 |
|
|
|
|
getDetails() { |
|
|
|
|
getProcessDetail(this.rowItem.paId).then(res => { |
|
|
|
|
@ -310,8 +364,11 @@ export default { |
|
|
|
|
executeTypeChange() { |
|
|
|
|
this.detailForm.delayTime = ''; |
|
|
|
|
}, |
|
|
|
|
handleUserChange(value,item) { |
|
|
|
|
this.detailForm.checkMan =item.realName |
|
|
|
|
handleUserChange(value, item) { |
|
|
|
|
if(item){ |
|
|
|
|
this.detailForm.checkMan = item.realName; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
getExecuteResult() { |
|
|
|
|
getDictionary({ code: 'flow_project_executeResult' }).then(res => { |
|
|
|
|
@ -339,16 +396,15 @@ export default { |
|
|
|
|
fmProjectApplication: { |
|
|
|
|
// ...this.executeForm, |
|
|
|
|
id: this.executeForm.id, |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
attachList: this.existingFiles, |
|
|
|
|
attachList: this.fileList, |
|
|
|
|
}; |
|
|
|
|
query_.checkResult = 1; |
|
|
|
|
// query_.fmProjectApplication.delayTime = |
|
|
|
|
// query_.fmProjectApplication.delayTime + ' 00:00:00'; |
|
|
|
|
|
|
|
|
|
query_.delayTime=query_.delayTime==''?null:query_.delayTime+ ' 00:00:00'; |
|
|
|
|
query_.okTime = query_.okTime==''?null:query_.okTime; |
|
|
|
|
query_.delayTime = query_.delayTime == '' ? null : query_.delayTime + ' 00:00:00'; |
|
|
|
|
query_.okTime = query_.okTime == '' ? null : query_.okTime; |
|
|
|
|
projectExecute(query_) |
|
|
|
|
.then(res => { |
|
|
|
|
this.$message.success('操作成功!'); |
|
|
|
|
|