Merge branch 'master' of http://git.feashow.cn/clay/mosr-web
This commit is contained in:
@@ -211,7 +211,7 @@ const getFundOptions = async () => {
|
||||
specialFundOption.value = res.data
|
||||
}
|
||||
|
||||
const getDataSourceOptionItem = (val) => {
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
@@ -237,7 +237,7 @@ const init = async () => {
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
formData.value = data.formData;
|
||||
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
if(data.formData.specialFund){
|
||||
specialFundOption.value.forEach(item => {
|
||||
if(data.formData.specialFund==item.value){
|
||||
|
||||
@@ -115,9 +115,9 @@ const tableConfig = reactive({
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("report")) {
|
||||
if (buttons.has("report")) {
|
||||
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
// }
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
|
||||
11
src/views/project-demand/requirement/upload.vue
Normal file
11
src/views/project-demand/requirement/upload.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<tag-and-file-upload />
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -38,3 +38,11 @@ export const resubmitReported = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const getCollectAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<steps :active="1" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
|
||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||
@@ -21,34 +21,20 @@ import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const active = ref(route.query.state)
|
||||
const showActive = ref()
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getInfo = async (state) => {
|
||||
const projectId = route.query.projectId
|
||||
if(showActive == '00'){
|
||||
await getCompanyOption()
|
||||
}
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if(data===undefined)return;
|
||||
if(code===1000){
|
||||
summaryData.value = data;
|
||||
@@ -62,24 +48,15 @@ const getInfo = async (state) => {
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
// const back = () => {
|
||||
// switch (route.name) {
|
||||
// case 'Summary/detail':
|
||||
// setDetail('1')
|
||||
// break;
|
||||
// case 'Initiation/detail':
|
||||
// setDetail('2')
|
||||
// break;
|
||||
// case 'Implementation/detail':
|
||||
// setDetail('3')
|
||||
// break;
|
||||
// case 'Filing/detail':
|
||||
// setDetail('4')
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getInfo(active)
|
||||
@@ -89,7 +66,6 @@ const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
getInfo(data.active)
|
||||
}
|
||||
// back()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
11
src/views/project-demand/summary/upload.vue
Normal file
11
src/views/project-demand/summary/upload.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<tag-and-file-upload />
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,103 +1,204 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form-item label="关键词" prop="tag">
|
||||
<el-input v-model="attachment.tag" placeholder="请输入" clearable filterable style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
<el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>-->
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="需求征集" name="0">
|
||||
<search-files-by-tag @search="searchRequirement" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="需求上报" name="1">
|
||||
<search-files-by-tag @search="searchReport" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目立项" name="2">
|
||||
<search-files-by-tag @search="searchInitiation" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目实施" name="3">
|
||||
<search-files-by-tag type="3" @search="searchImplementation" @upload="upload" ref="implementation"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目归档" name="4">
|
||||
<search-files-by-tag @search="searchFiling" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getImplementationAttachment} from "@/api/project-manage";
|
||||
import {getRequirementAttachment} from "@/api/project-demand";
|
||||
import {getCollectAttachment} from "@/views/project-demand/summary/api";
|
||||
import {getFilingAttachment, getInitiationAttachment} from "@/api/project-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '关键词',
|
||||
prop: 'collectType',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
const activeName = ref('3')
|
||||
const attachment = ref({})
|
||||
const showTable = ref(true)
|
||||
const implementation = ref()
|
||||
const otherFileList = ref([])
|
||||
const handleClick = (tab) => {
|
||||
let name = {}
|
||||
switchSearch(name, tab.index)
|
||||
}
|
||||
const getParams = (param, type) => {
|
||||
let targetId
|
||||
let params
|
||||
if (type === 1) {
|
||||
targetId = route.query.requirementId
|
||||
params = {
|
||||
targetId: targetId,
|
||||
...param
|
||||
}
|
||||
}
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '自定义标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '内置标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '上传时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
} else if (type === 2){
|
||||
targetId = route.query.id
|
||||
if(JSON.stringify(param) !== '{}'){
|
||||
if (param.tag &&!param.name) {
|
||||
implementation.value.tagsOption?.forEach(item => {
|
||||
if (item.value === param.tag) {
|
||||
param.tag = item.label
|
||||
}
|
||||
})
|
||||
params = {
|
||||
targetId: targetId,
|
||||
tag:param.tag
|
||||
}
|
||||
}else if(!param.tag &¶m.name){
|
||||
params = {
|
||||
targetId: targetId,
|
||||
...param
|
||||
}
|
||||
} else if (!param.tag &&!param.name) {
|
||||
params = {
|
||||
targetId: targetId,
|
||||
}
|
||||
}
|
||||
}else {
|
||||
params = {
|
||||
targetId: targetId
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable=ref(true)
|
||||
const otherFileList = ref([])
|
||||
const handleUpload = () => {
|
||||
}else {
|
||||
targetId = route.query.id
|
||||
params = {
|
||||
targetId: targetId,
|
||||
...param
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
const searchRequirement = async (param) => {
|
||||
await search(param)
|
||||
}
|
||||
const search = async (param, type) => {
|
||||
const res = await getRequirementAttachment(getParams(param, type))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchReport = async (param) => {
|
||||
const res = await getCollectAttachment(getParams(param))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchInitiation = async (param) => {
|
||||
const res = await getInitiationAttachment(getParams(param))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchImplementation = async (param) => {
|
||||
const res = await getImplementationAttachment(getParams(param,2))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchFiling = async (param) => {
|
||||
const res = await getFilingAttachment(getParams(param))
|
||||
changeFileList(res)
|
||||
}
|
||||
const changeFileList = (res) => {
|
||||
showTable.value = false
|
||||
if (res.code === 1000) {
|
||||
otherFileList.value = res.data
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const upload = () => {
|
||||
router.push({
|
||||
name: 'Filing/upload',
|
||||
name: switchUpload(activeName.value),
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
const switchUpload=(index)=>{
|
||||
switch (index) {
|
||||
case '0':
|
||||
return 'Requirement/upload';
|
||||
case '1':
|
||||
return 'Summary/upload';
|
||||
case '2':
|
||||
return 'Initiation/upload';
|
||||
case '3':
|
||||
return 'Implementation/upload';
|
||||
case '4':
|
||||
return 'Filing/upload';
|
||||
}
|
||||
}
|
||||
const switchSearch = (name, index) => {
|
||||
switch (index) {
|
||||
case '0':
|
||||
search(name, 1)
|
||||
break
|
||||
case '1':
|
||||
searchReport(name)
|
||||
break
|
||||
case '2':
|
||||
searchInitiation(name)
|
||||
break
|
||||
case '3':
|
||||
searchImplementation(name)
|
||||
break
|
||||
case '4':
|
||||
searchFiling(name)
|
||||
break
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
if (activeName.value === '4') {
|
||||
let name = {
|
||||
name: ''
|
||||
}
|
||||
searchFiling(name)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-tabs__header) {
|
||||
margin: 15px 0 30px 0;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
//background-color: #DED0B2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
@@ -24,52 +23,35 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import {ElLoading} from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const showActive = ref()
|
||||
const loading = ref(false)
|
||||
|
||||
const processStore = useProcessStore()
|
||||
const activeName = ref('first')
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if (tab.index.value === 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
|
||||
const commonForm = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && (await getCompanyOption())
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const {data, code} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
// if(state == '00') {
|
||||
// collectionData.value = data;
|
||||
// } else if(state == '10') {
|
||||
// summaryData.value = data;
|
||||
// }
|
||||
const {data, code,msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
if(data===undefined)return;
|
||||
commonForm.value = data
|
||||
@@ -80,18 +62,14 @@ const getAllInfo = async (state) => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
// summaryProcessViewer.value = true
|
||||
commonProvessViewer.value = true
|
||||
})
|
||||
loading.close()
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getAllInfo(active)
|
||||
|
||||
@@ -207,14 +207,9 @@ const tableConfig = reactive({
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({
|
||||
label: '附件',
|
||||
prem: ['mosr:requirement:resubmit'],
|
||||
func: () => handleAttachment(row),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
// if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("entry")) {
|
||||
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
||||
}
|
||||
@@ -270,8 +265,8 @@ const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/attachment',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
id: row.projectId,
|
||||
requirementId:row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
11
src/views/project-management/filing/upload.vue
Normal file
11
src/views/project-management/filing/upload.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<tag-and-file-upload />
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form :model="attachment" inline style="margin-top: 15px">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getImplementationAttachment,getTags} from "@/api/project-manage";
|
||||
import {getTags,getImplementationAttachment} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
@@ -80,7 +80,10 @@ const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
let params={
|
||||
projectId: route.query.id
|
||||
}
|
||||
getTags(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -94,13 +97,18 @@ const getTagsOption = () => {
|
||||
const handleSearch = () => {
|
||||
let params
|
||||
if (attachment.tag) {
|
||||
tagsOption.value.forEach(item => {
|
||||
if (item.value === attachment.tag) {
|
||||
attachment.tag = item.label
|
||||
}
|
||||
})
|
||||
params = {
|
||||
projectId: route.query.id,
|
||||
targetId: route.query.id,
|
||||
tag: attachment.tag
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
projectId: route.query.id
|
||||
targetId: route.query.id
|
||||
}
|
||||
}
|
||||
getImplementationAttachment(params).then(res => {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
@@ -21,65 +20,41 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||
import { ElLoading } from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
// const activeName = ref('first')
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if(tab.index.value === 0){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const summaryData = ref({})
|
||||
const loading = ref(false)
|
||||
const collectionProcessViewer = ref(true)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const cuurentStep = ref()
|
||||
route.query.step == '10' && (cuurentStep.value = 1)
|
||||
route.query.step == '20' && (cuurentStep.value = 2)
|
||||
route.query.step == '40' && (cuurentStep.value = 3)
|
||||
route.query.step == '50' && (cuurentStep.value = 4)
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
|
||||
const showActive = ref()
|
||||
const commonForm = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
}
|
||||
const { data, code ,msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
if(data===undefined)return;
|
||||
commonForm.value = data
|
||||
@@ -90,17 +65,14 @@ const getAllInfo = async (state) => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
// summaryProcessViewer.value = true
|
||||
commonProvessViewer.value = true
|
||||
})
|
||||
loading.close()
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
|
||||
@@ -218,9 +218,9 @@ const tableConfig = reactive({
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("standing")) {
|
||||
if (buttons.has("standing")) {
|
||||
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||
// }
|
||||
}
|
||||
// if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||
// }
|
||||
|
||||
@@ -2,20 +2,21 @@
|
||||
<baseTitle title="标签名称"></baseTitle>
|
||||
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
||||
<el-form-item label="标签名称" prop="tagName">
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px" v-if="showInput"/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 200px" v-else>
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput"/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button type="primary" link @click="changeInput">{{showInput? '选择': '输入'}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="其他文件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile"/>
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -86,9 +87,16 @@ const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const changeInput=()=>{
|
||||
showInput.value=!showInput.value;
|
||||
formData.value.tagName='';
|
||||
}
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
let params={
|
||||
projectId: route.query.id
|
||||
}
|
||||
getTags(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -102,6 +110,11 @@ const getTagsOption = () => {
|
||||
}
|
||||
|
||||
const compositeParam = (item) => {
|
||||
tagsOption.value.forEach(item => {
|
||||
if (item.value == formData.value.tagName) {
|
||||
formData.value.tagName = item.label
|
||||
}
|
||||
})
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
@@ -22,101 +21,38 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||
import { ElLoading } from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const summaryData = ref({})
|
||||
const collectionProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const active = ref(route.query.state)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
const getDemandCollectionInfo = async () => {
|
||||
if (!route.query.id) return
|
||||
await getCompanyOption()
|
||||
collectionProcessViewer.value = false
|
||||
getInfo(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
collectionData.value = data;
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
collectionProcessViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
const getDemandSummaryInfo = async () => {
|
||||
if (!route.query.id) return
|
||||
// await getCompanyOption()
|
||||
summaryProcessViewer.value = false
|
||||
getInfo(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
summaryData.value = data;
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if (tab.props.name === 'first') {
|
||||
getDemandCollectionInfo()
|
||||
} else if (tab.props.name === 'second') {
|
||||
getDemandSummaryInfo()
|
||||
}
|
||||
}
|
||||
// getDemandCollectionInfo()
|
||||
|
||||
const showActive = ref()
|
||||
const commonForm = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
}
|
||||
const { data, code,msg } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
console.log(data, 'data--22');
|
||||
if(data===undefined)return;
|
||||
commonForm.value = data
|
||||
processStore.setDesign(data)
|
||||
@@ -126,17 +62,14 @@ const getAllInfo = async (state) => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
// summaryProcessViewer.value = true
|
||||
commonProvessViewer.value = true
|
||||
})
|
||||
loading.close()
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
|
||||
@@ -212,9 +212,9 @@ const tableConfig = reactive({
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("apply")) {
|
||||
if (buttons.has("apply")) {
|
||||
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
|
||||
// }
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<tag-and-file-upload :showInput="true"/>
|
||||
<tag-and-file-upload />
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
|
||||
Reference in New Issue
Block a user