Merge pull request 'master' (#180) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/180
This commit is contained in:
@@ -6,10 +6,11 @@
|
|||||||
with-credentials
|
with-credentials
|
||||||
:multiple="maxSize > 0"
|
:multiple="maxSize > 0"
|
||||||
:data="uploadParams"
|
:data="uploadParams"
|
||||||
:show-file-list="false"
|
:show-file-list="showFileList"
|
||||||
:auto-upload="true"
|
:auto-upload="true"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-success="handleUploadSuccess"
|
:on-success="handleUploadSuccess"
|
||||||
|
:on-error="uploadError"
|
||||||
>
|
>
|
||||||
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -37,6 +38,10 @@ const props = defineProps({
|
|||||||
maxSize: {
|
maxSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30
|
default: 30
|
||||||
|
},
|
||||||
|
showFileList: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -75,7 +80,11 @@ const handleUploadSuccess = (res, file) => {
|
|||||||
showTable.value = true
|
showTable.value = true
|
||||||
let data = res.data
|
let data = res.data
|
||||||
fileList.value.push(data)
|
fileList.value.push(data)
|
||||||
emit("getFile", fileList.value)
|
emit("getFile", res.data)
|
||||||
|
}
|
||||||
|
const uploadError=(err)=>{
|
||||||
|
loading.value = false
|
||||||
|
ElMessage.error("上传失败,请稍后再试!")
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -33,10 +33,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300" v-if="showTinymce"/>
|
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300"
|
||||||
|
v-if="showTinymce"/>
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
<file-upload @getFile="getFile"/>
|
<file-upload ref="uploadFile" @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig" :data="formData.fileList" :isSettingCol="false" :pagination="false">
|
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig" :data="formData.fileList"
|
||||||
|
:isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -78,7 +80,8 @@ const formData = ref({
|
|||||||
companyIds: '',
|
companyIds: '',
|
||||||
collectType: '',
|
collectType: '',
|
||||||
deadline: '',
|
deadline: '',
|
||||||
collectExplain: ''
|
collectExplain: '',
|
||||||
|
fileList: []
|
||||||
})
|
})
|
||||||
const showTinymce = ref(true)
|
const showTinymce = ref(true)
|
||||||
const processDiagramViewer = ref(false)
|
const processDiagramViewer = ref(false)
|
||||||
@@ -90,9 +93,9 @@ const typeOption = ref([
|
|||||||
])
|
])
|
||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
const form = ref(null)
|
const form = ref(null)
|
||||||
const fileList = ref(null)
|
const fileList = ref([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const showTable = ref(false)
|
const showTable = ref(true)
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const processInstanceData = ref()
|
const processInstanceData = ref()
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
@@ -136,49 +139,37 @@ const tableConfig = reactive({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
||||||
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
<el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const compositeParam=(item)=>{
|
const compositeParam = (item) => {
|
||||||
return {
|
let tag=''
|
||||||
fileId: item.id,
|
if(!formData.value.collectType&&router.currentRoute.value.name==='Collection/add'){
|
||||||
size: item.size,
|
tag='需求征集'
|
||||||
originalFileName: item.originalFilename,
|
}
|
||||||
fileType: item.fileType,
|
return {
|
||||||
url: item.url,
|
fileId: item.id,
|
||||||
processNodeTag: null,
|
size: item.size,
|
||||||
tag: formData.value.collectType,
|
originalFileName: item.originalFilename,
|
||||||
userId: authStore.userinfo.userId
|
fileType: item.fileType,
|
||||||
}
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
tag: tag,
|
||||||
|
userId: authStore.userinfo.userId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const getFile = (val) => {
|
const getFile = (val) => {
|
||||||
console.log('上传文件',val)
|
console.log('上传文件', val)
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
formData.value.fileList.push(fileObj)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
})
|
})
|
||||||
let fileObj = {}
|
|
||||||
let newFileArray = []
|
|
||||||
if (route.query.isAdd === undefined) {
|
|
||||||
val.forEach(item => {
|
|
||||||
fileObj =compositeParam(item)
|
|
||||||
newFileArray.push(fileObj)
|
|
||||||
formData.value.fileList.push(fileObj)
|
|
||||||
})
|
|
||||||
fileList.value = formData.value.fileList
|
|
||||||
} else {
|
|
||||||
val.forEach(item => {
|
|
||||||
fileObj =compositeParam(item)
|
|
||||||
newFileArray.push(fileObj)
|
|
||||||
})
|
|
||||||
formData.value.fileList = newFileArray
|
|
||||||
fileList.value = newFileArray
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
@@ -198,18 +189,23 @@ const init = async () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const submitParam=()=>{
|
||||||
|
return {
|
||||||
|
collectExplain: formData.value.collectExplain,
|
||||||
|
collectType: formData.value.collectType,
|
||||||
|
companyIds: formData.value.companyIds,
|
||||||
|
deadline: formData.value.deadline,
|
||||||
|
requirementId: formData.value.requirementId?formData.value.requirementId:0,
|
||||||
|
requirementName: formData.value.requirementName,
|
||||||
|
files: formData.value.fileList,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
|
}
|
||||||
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
let params = {
|
let res = await addRequirement(submitParam())
|
||||||
...formData.value,
|
|
||||||
requirementId: 0,
|
|
||||||
files: fileList.value,
|
|
||||||
deploymentId: processInstanceData.value.deploymentId
|
|
||||||
}
|
|
||||||
let res = await addRequirement(params)
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
@@ -222,11 +218,7 @@ const handleSubmit = async (instance) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleResubmit = () => {
|
const handleResubmit = () => {
|
||||||
resubmit({
|
resubmit(submitParam()).then(res => {
|
||||||
...formData.value,
|
|
||||||
files: fileList.value,
|
|
||||||
deploymentId: processInstanceData.value.deploymentId
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
@@ -241,12 +233,13 @@ const handleResubmit = () => {
|
|||||||
const getDetailInfo = async () => {
|
const getDetailInfo = async () => {
|
||||||
getFormInfo(route.query.id).then(res => {
|
getFormInfo(route.query.id).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
console.log(res)
|
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
showTinymce.value = false
|
showTinymce.value = false
|
||||||
|
showTable.value = false
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
showTinymce.value = true
|
showTinymce.value = true
|
||||||
|
showTable.value = true
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg)
|
ElMessage.error(res.msg)
|
||||||
@@ -257,44 +250,38 @@ const getDetailInfo = async () => {
|
|||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
const beforeRemove = (row) => {
|
const handleDelete = (row) => {
|
||||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
handleRemove(row)
|
deleteFile(row.fileId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
ElMessage.warning("用户取消删除! ");
|
ElMessage.warning("用户取消删除! ");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRemove = (row) => {
|
|
||||||
deleteFile(row.fileId).then(res => {
|
|
||||||
if (res.code === 1000) {
|
|
||||||
ElMessage.success("删除成功");
|
|
||||||
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.id), 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await init()
|
await init()
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
await getDetailInfo()
|
await getDetailInfo()
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
|
||||||
showTable.value = true
|
|
||||||
})
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.el-empty__description){
|
:deep(.el-empty__description) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-block {
|
.add-block {
|
||||||
//display: flex;
|
//display: flex;
|
||||||
//justify-content: space-between;
|
//justify-content: space-between;
|
||||||
|
|||||||
13
src/views/project-management/implementation/check.vue
Normal file
13
src/views/project-management/implementation/check.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "check"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
49
src/views/project-management/implementation/detail.vue
Normal file
49
src/views/project-management/implementation/detail.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block">
|
||||||
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
type="card"
|
||||||
|
class="demo-tabs"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
>
|
||||||
|
<el-tab-pane label="需求征集" name="first">
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
|
||||||
|
<el-tab-pane label="项目立项" name="third" ></el-tab-pane>
|
||||||
|
<el-tab-pane label="项目实施" name="third" :disabled="true"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const activeName = ref('first')
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if(tab.index.value === 0){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-block{
|
||||||
|
padding-top: 15px;
|
||||||
|
: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>
|
||||||
@@ -1,15 +1,195 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
项目实施
|
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||||
</div>
|
<template #empty>
|
||||||
|
<el-empty description="暂无数据"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup lang="jsx">
|
||||||
export default {
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
name: "index"
|
import {reactive, shallowRef} from "vue";
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入名称查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目类型',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目影响',
|
||||||
|
prop: 'projectEffect',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择项目影响',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '研发主体',
|
||||||
|
prop: 'collectType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择研发主体',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '起止时间',
|
||||||
|
prop: 'time',
|
||||||
|
component: 'el-date-picker',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择起止时间',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
colProps: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最小金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '最大金额',
|
||||||
|
prop: 'requirementName',
|
||||||
|
component: 'el-input',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入金额查询',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const tableIns = ref()
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
prop: 'selection'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: '名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'company',
|
||||||
|
label: '所属公司',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectType',
|
||||||
|
label: '项目类型',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'productMainBody',
|
||||||
|
label: '研发主体',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'projectEffect',
|
||||||
|
label: '项目影响',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'survey',
|
||||||
|
label: '经营概况',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'time',
|
||||||
|
label: '起止时间',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'status',
|
||||||
|
label: '状态',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
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') {
|
||||||
|
btn.push({label: '台账', func: () => handleStandingBook(row), type: 'primary'})
|
||||||
|
btn.push({label: '附件', func: () => handleAttachment(row), type: 'primary'})
|
||||||
|
btn.push({label: '分摊', func: () => handleShare(row), type: 'primary'})
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
// v-perm={item.auth}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
{name: '生成分摊报表', key: '_export', color: '#DED0B2',auth: ''}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleDetail = (row) => {
|
||||||
|
router.push({
|
||||||
|
name:'Implementation/detail',
|
||||||
|
query: {
|
||||||
|
id: row.requirementId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,23 +1,136 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-block">
|
<div class="apply-block">
|
||||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
<baseTitle title="项目立项-申请"></baseTitle>
|
<baseTitle title="项目立项申请"></baseTitle>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="前置流程">
|
<el-form-item label="前置流程">
|
||||||
<el-input v-model="formData.requirementName" clearable></el-input>
|
<el-input v-model="formData.requirementName" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="项目立项附件" prop="attachment">
|
||||||
|
<file-upload @getFile="getAttachment" :showFileList="true"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其他文件">
|
||||||
|
<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-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import FileUpload from "@/components/FileUpload.vue";
|
||||||
|
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
|
const fileList = ref(null)
|
||||||
|
const applyForm = ref()
|
||||||
|
const showTable = ref(true)
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
||||||
|
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
tag: formData.value.collectType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
console.log('上传文件', val)
|
||||||
|
showTable.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
let fileObj = {}
|
||||||
|
let newFileArray = []
|
||||||
|
if (route.query.isAdd === undefined) {
|
||||||
|
val.forEach(item => {
|
||||||
|
fileObj = compositeParam(item)
|
||||||
|
newFileArray.push(fileObj)
|
||||||
|
formData.value.fileList.push(fileObj)
|
||||||
|
})
|
||||||
|
fileList.value = formData.value.fileList
|
||||||
|
} else {
|
||||||
|
val.forEach(item => {
|
||||||
|
fileObj = compositeParam(item)
|
||||||
|
newFileArray.push(fileObj)
|
||||||
|
})
|
||||||
|
formData.value.fileList = newFileArray
|
||||||
|
fileList.value = newFileArray
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
if (!instance) return
|
||||||
|
instance.validate(async (valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,12 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="detail-block">
|
||||||
项目立项详情
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
type="card"
|
||||||
|
class="demo-tabs"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
>
|
||||||
|
<el-tab-pane label="需求征集" name="first">
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
|
||||||
|
<el-tab-pane label="项目立项" name="third" :disabled="true"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
const activeName = ref('first')
|
||||||
|
const handleClick = (tab, event) => {
|
||||||
|
console.log(tab, event)
|
||||||
|
if(tab.index.value === 0){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
|
.detail-block{
|
||||||
|
padding-top: 15px;
|
||||||
|
: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>
|
</style>
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
项目立项编辑
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -129,7 +129,7 @@ const tableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '发布状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||||
@@ -165,7 +165,7 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '/workflow/mosr/requirement',
|
api: '',
|
||||||
params: {},
|
params: {},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user