Merge pull request 'fix : 重新提交页面初始化' (#216) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/216
This commit is contained in:
@@ -221,7 +221,7 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="router.currentRoute.value.name === 'Summary/edit'"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Summary/edit'"/>
|
||||
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
@@ -250,13 +250,13 @@ const cacheStore = useCacheStore()
|
||||
const processStore = useProcessStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const attachment = ref()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const tagsViewStore = useTagsView()
|
||||
const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const attachment = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
@@ -412,6 +412,7 @@ const handleResubmit = () => {
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params={
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
@@ -421,14 +422,16 @@ const handleResubmit = () => {
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -121,11 +121,11 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '编辑', func: () => handleEdit(row), type: 'primary'},{label: '上报', func: () => handleAdd(row), type: 'primary'}]
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
// if (row.state === '3') {
|
||||
// btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
// } else if (row.state === '0') {
|
||||
// btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -169,7 +169,6 @@ const handleAdd = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/add',
|
||||
query: {
|
||||
isAdd: 1,
|
||||
id:row.requirementId
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="项目结项"></baseTitle>
|
||||
<AttachmentUpload label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
<AttachmentUpload ref="attachment" label="项目结项附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Filing/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
@@ -12,6 +12,7 @@
|
||||
</el-form>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,12 +24,16 @@ import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getProjectConclusionProcess, projectConclusion} from "@/api/project-manage";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const tagsViewStore = useTagsView()
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传项目结项附件', trigger: 'blur'}],
|
||||
})
|
||||
const attachment = ref()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const deploymentId = ref()
|
||||
@@ -37,8 +42,6 @@ const otherFileList = ref([])
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -90,7 +93,7 @@ const handleDownload = (row) => {
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Filing/conclusion') {
|
||||
if (name.value === 'Filing/conclusion'||name.value === 'Filing/edit') {
|
||||
tag = '项目结项'
|
||||
}
|
||||
return {
|
||||
@@ -99,7 +102,6 @@ const compositeParam = (item) => {
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
@@ -119,8 +121,7 @@ const getOtherFile = (val) => {
|
||||
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
type: item.type
|
||||
fileId: item.fileId
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
@@ -165,6 +166,62 @@ const handleSubmit = (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if(name.value === 'Filing/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params={
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
// resubmitReported(params).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// router.push({
|
||||
// name: 'Filing'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
// getDetail(route.query.projectId).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// formData.value = res.data.formData
|
||||
// loading.value=false
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const init = () => {
|
||||
getProjectConclusionProcess().then(res => {
|
||||
processDiagramViewer.value = false
|
||||
@@ -184,7 +241,14 @@ const init = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
init()
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -146,12 +146,13 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '结项', func: () => handleConclusion(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
// if (row.state === '3') {
|
||||
btn.push({label: '附件', func: () => handleCheck(row), type: 'primary'})
|
||||
} else if (row.state === '4') {
|
||||
// } else if (row.state === '4') {
|
||||
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
|
||||
}
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -197,4 +198,13 @@ const handleConclusion = (row) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Filing/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -10,15 +10,16 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
<AttachmentUpload ref="attachment" label="项目验收附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Implementation/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -29,7 +30,13 @@ import {getProjectCheckProcess, projectCheck} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getDetail, resubmitReported} from "../../project-demand/summary/api";
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const attachment = ref()
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const loading = ref(false)
|
||||
const formData = ref({})
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
@@ -39,11 +46,9 @@ const otherFileList = ref([])
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const compositeParam = (item) => {
|
||||
let tag=''
|
||||
if(router.currentRoute.value.name==='Implementation/check'){
|
||||
if(name.value==='Implementation/check'||name.value === 'Implementation/edit'){
|
||||
tag='项目验收'
|
||||
}
|
||||
return {
|
||||
@@ -52,7 +57,6 @@ const compositeParam = (item) => {
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
@@ -72,8 +76,7 @@ const getOtherFile = (val) => {
|
||||
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
type: item.type
|
||||
fileId: item.fileId
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
@@ -88,12 +91,21 @@ const handleSubmit = (instance) => {
|
||||
if (!valid) return
|
||||
let files = []
|
||||
let singleFile={}
|
||||
if(file.value.fileId!==undefined){
|
||||
let fileArray
|
||||
if(name.value === 'Implementation/edit'){
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
}
|
||||
otherFileList.value.forEach(item => {
|
||||
fileArray.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
@@ -118,6 +130,62 @@ const handleSubmit = (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if(name.value === 'Implementation/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
//todo requirementId
|
||||
let params={
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: otherFiles,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('重新提交params',params)
|
||||
// resubmitReported(params).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// router.push({
|
||||
// name: 'Implementation'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
// getDetail(route.query.projectId).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// formData.value = res.data.formData
|
||||
// loading.value=false
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const init = () => {
|
||||
getProjectCheckProcess().then(res => {
|
||||
processDiagramViewer.value = false
|
||||
@@ -137,7 +205,14 @@ const init = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
init()
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -150,15 +150,16 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '验收', func: () => handleCheck(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
// if (row.state === '3') {
|
||||
btn.push(
|
||||
{label: '验收', func: () => handleCheck(row), type: 'primary'},
|
||||
{label: '编辑', func: () => handleEdit(row), type: 'primary'},
|
||||
{label: '台账', func: () => handleStandingBook(row), type: 'primary'},
|
||||
{label: '附件', func: () => handleAttachment(row), type: 'primary'},
|
||||
{label: '查看分摊', func: () => handleShare(row), type: 'primary'}
|
||||
)
|
||||
}
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -207,6 +208,15 @@ const handleCheck = (row) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleStandingBook = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/account',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Initiation/edit'"/>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
@@ -40,6 +40,7 @@ const rules = reactive({
|
||||
})
|
||||
const processStore = useProcessStore()
|
||||
const deploymentId = ref()
|
||||
const attachment = ref()
|
||||
const file = ref({})
|
||||
const applyForm = ref()
|
||||
const showTable = ref(true)
|
||||
@@ -84,21 +85,21 @@ const tableConfig = reactive({
|
||||
// }
|
||||
]
|
||||
})
|
||||
const loading = ref(false)
|
||||
const processInstanceData = ref()
|
||||
const processDiagramViewer = ref(true)
|
||||
const compositeParam = (item, type) => {
|
||||
const name=ref(router.currentRoute.value.name)
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Initiation/apply') {
|
||||
if (name.value === 'Initiation/apply'||name.value === 'Initiation/edit') {
|
||||
tag = '项目立项申请'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
type: type,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag:tag
|
||||
}
|
||||
}
|
||||
@@ -117,8 +118,7 @@ const getOtherFile = (val) => {
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
type: item.type
|
||||
fileId: item.fileId
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
@@ -162,18 +162,59 @@ const handleSubmit = (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
resubmit(submitParam(formData.value)).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Collection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
const handleResubmit =async () => {
|
||||
let files = []
|
||||
let singleFile={}
|
||||
let fileArray
|
||||
if(name.value === 'Initiation/edit'){
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
}
|
||||
fileArray=attachment.value.allFileList
|
||||
}else {
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
fileArray=otherFileList.value
|
||||
}
|
||||
fileArray.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
files: files,
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
console.log('params',params)
|
||||
// let res = await resubmit(params)
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// await router.push({
|
||||
// name: 'Initiation'
|
||||
// })
|
||||
// }
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
// getDetail(route.query.projectId).then(res => {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// formData.value = res.data.formData
|
||||
// loading.value=false
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const init = () => {
|
||||
getProcessInfo().then(res => {
|
||||
@@ -195,6 +236,14 @@ const init = () => {
|
||||
})
|
||||
}
|
||||
init()
|
||||
onMounted(async () => {
|
||||
loading.value=true
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -147,11 +147,11 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
// if (row.state === '3') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
} else if (row.state === '0') {
|
||||
// } else if (row.state === '0') {
|
||||
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
|
||||
}
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -193,7 +193,8 @@ const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/edit',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -201,7 +202,6 @@ const handleApply = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/apply',
|
||||
query: {
|
||||
isAdd: 1,
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user