Merge pull request 'dj' (#261) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/261
This commit is contained in:
@@ -90,3 +90,10 @@ export const getRequirementAttachment = (params) => {
|
|||||||
params:params
|
params:params
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const uploadRequirementAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ export const getInitiationAttachment = (params) => {
|
|||||||
params:params
|
params:params
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const uploadInitiationAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
//项目实施
|
//项目实施
|
||||||
export const getCheckDetail = (projectId) => {
|
export const getCheckDetail = (projectId) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -126,3 +133,10 @@ export const getFilingAttachment = (params) => {
|
|||||||
params:params
|
params:params
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const uploadFilingAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
||||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :maxSize="0" @delete="deleteAttachment"/>
|
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1" :disabled="isSingleFile" @delete="deleteAttachment"/>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -63,20 +63,21 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// prop: 'oper',
|
prop: 'oper',
|
||||||
// label: '操作',
|
label: '操作',
|
||||||
// align: 'center',
|
align: 'center',
|
||||||
// showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
// currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
// return (
|
return (
|
||||||
// <div>
|
<div>
|
||||||
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
</div>
|
||||||
// </div>
|
)
|
||||||
// )
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
@@ -84,6 +85,7 @@ const rules = reactive({
|
|||||||
})
|
})
|
||||||
const applyForm = ref()
|
const applyForm = ref()
|
||||||
const singleFile = ref()
|
const singleFile = ref()
|
||||||
|
const isSingleFile = ref(false)
|
||||||
const allFileList = ref([])
|
const allFileList = ref([])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
showFileList: {
|
showFileList: {
|
||||||
@@ -110,12 +112,17 @@ watch(() => props.showTable, (newVal) => {
|
|||||||
props.showTable = newVal
|
props.showTable = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.otherFileList, (newVal) => {
|
watch(() => props.otherFileList, (newVal) => {
|
||||||
console.log('new',newVal)
|
console.log('newotherFileList',newVal)
|
||||||
// newVal?.forEach(item => {
|
if (props.preview) {
|
||||||
|
newVal?.forEach(item => {
|
||||||
|
allFileList.value.push(item)
|
||||||
|
})
|
||||||
|
}else {
|
||||||
allFileList.value=newVal
|
allFileList.value=newVal
|
||||||
// })
|
}
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.formData.fileList, (newVal) => {
|
watch(() => props.formData.fileList, (newVal) => {
|
||||||
|
console.log('newVal-fileList',newVal)
|
||||||
if (props.preview) {
|
if (props.preview) {
|
||||||
newVal?.forEach(item => {
|
newVal?.forEach(item => {
|
||||||
allFileList.value.push(item)
|
allFileList.value.push(item)
|
||||||
@@ -127,6 +134,7 @@ watch(() => props.formData.singleFile, (newVal) => {
|
|||||||
singleFile.value = newVal
|
singleFile.value = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
|
isSingleFile.value=true
|
||||||
emit('getAttachment', val)
|
emit('getAttachment', val)
|
||||||
}
|
}
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
@@ -135,7 +143,12 @@ const getOtherFile = (val) => {
|
|||||||
const deleteAttachment = (val) => {
|
const deleteAttachment = (val) => {
|
||||||
deleteFile(val).then(res => {
|
deleteFile(val).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success("删除成功");
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message:"删除成功",
|
||||||
|
type:'success'
|
||||||
|
})
|
||||||
|
isSingleFile.value=false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ const schema = computed(() => {
|
|||||||
props: {
|
props: {
|
||||||
placeholder: '请输入审核意见',
|
placeholder: '请输入审核意见',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
// maxlength: 140,
|
rows: 3
|
||||||
rows:3
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -52,7 +51,13 @@ const back = () => {
|
|||||||
router.push({name: 'Filing'})
|
router.push({name: 'Filing'})
|
||||||
break;
|
break;
|
||||||
case 'Implementation/detail':
|
case 'Implementation/detail':
|
||||||
router.push({name: 'Implementation'})
|
if (route.query.step === '20') {
|
||||||
|
router.push({name: 'Initiation'})
|
||||||
|
} else if (route.query.step === '40') {
|
||||||
|
router.push({name: 'Implementation'})
|
||||||
|
} else if (route.query.step === '50') {
|
||||||
|
router.push({name: 'Filing'})
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'Summary/detail':
|
case 'Summary/detail':
|
||||||
router.push({name: 'Summary'})
|
router.push({name: 'Summary'})
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
:headers="headers"
|
:headers="headers"
|
||||||
:limit="maxSize"
|
:limit="maxSize"
|
||||||
with-credentials
|
with-credentials
|
||||||
:multiple="maxSize > 0"
|
:multiple="multiple"
|
||||||
:data="uploadParams"
|
:data="uploadParams"
|
||||||
:show-file-list="showFileList"
|
:show-file-list="showFileList"
|
||||||
:auto-upload="true"
|
:auto-upload="true"
|
||||||
@@ -19,8 +19,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ElMessage,ElMessageBox} from "element-plus";
|
import { ElMessageBox, ElNotification} from "element-plus";
|
||||||
import {getToken} from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
|
|
||||||
const baseURL = import.meta.env.VITE_BASE_URL
|
const baseURL = import.meta.env.VITE_BASE_URL
|
||||||
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
||||||
const headers = reactive({
|
const headers = reactive({
|
||||||
@@ -43,13 +44,16 @@ const props = defineProps({
|
|||||||
showFileList: {
|
showFileList: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},disabled: {
|
}, disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
}, multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(["input", "getFile","delete"])
|
const emit = defineEmits(["input", "getFile", "delete"])
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const _value = computed({
|
const _value = computed({
|
||||||
get() {
|
get() {
|
||||||
@@ -59,7 +63,7 @@ const _value = computed({
|
|||||||
emit("input", val);
|
emit("input", val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const beforeRemove = (file, fileList) => {
|
const beforeRemove = (file) => {
|
||||||
return ElMessageBox.confirm(`确认删除名称为${file.name}的文件吗?`, '系统提示', {
|
return ElMessageBox.confirm(`确认删除名称为${file.name}的文件吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@@ -67,38 +71,32 @@ const beforeRemove = (file, fileList) => {
|
|||||||
}).then(() => true)
|
}).then(() => true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRemove = (file, fileList) => {
|
const handleRemove = (file) => {
|
||||||
emit("delete",file.response.data.id)
|
emit("delete", file.response.data.id)
|
||||||
}
|
}
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = () => {
|
||||||
// const FileExt = file.name.replace(/.+\./, "");
|
|
||||||
// if (['zip', 'rar', 'pdf', 'doc', 'docx', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
|
|
||||||
// ElMessage.warning('请上传后缀名为pdf、doc、docx、xlsx、zip或rar的文件!');
|
|
||||||
// return false;
|
|
||||||
// } else
|
|
||||||
// if (props.maxSize > 0 && file.size / 1024 / 1024 > props.maxSize) {
|
|
||||||
// ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`)
|
|
||||||
// } else {
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
return true
|
return true
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
const handleUploadSuccess = (res, file) => {
|
const handleUploadSuccess = (res) => {
|
||||||
if (res.code !== 1000) {
|
ElNotification({
|
||||||
loading.value = false
|
title: '提示',
|
||||||
ElMessage.error("上传失败")
|
message: res.code === 1000 ? '上传成功' : '上传失败',
|
||||||
} else {
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
loading.value = false
|
})
|
||||||
ElMessage.success("上传成功")
|
loading.value = false
|
||||||
}
|
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
let data = res.data
|
let data = res.data
|
||||||
fileList.value.push(data)
|
fileList.value.push(data)
|
||||||
emit("getFile", res.data)
|
emit("getFile", res.data)
|
||||||
}
|
}
|
||||||
const uploadError=(err)=>{
|
const uploadError = () => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
ElMessage.error("上传失败,请稍后再试!")
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: "上传失败,请稍后再试!",
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -108,6 +106,7 @@ a {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #2a99ff;
|
color: #2a99ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-upload-list) {
|
:deep(.el-upload-list) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<div class="fv-table-btn" v-if="tableConfig.btns">
|
<div class="fv-table-btn" v-if="tableConfig.btns">
|
||||||
<div class="table-head-btn">
|
<div class="table-head-btn">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="btn in tableConfig.btns"
|
v-for="btn in tableConfig.btns"
|
||||||
:key="btn.key"
|
:key="btn.key"
|
||||||
:type="btn.type || ''"
|
:type="btn.type || ''"
|
||||||
:color="btn.color || ''"
|
:color="btn.color || ''"
|
||||||
v-perm="btn.auth || ['*:*:*']"
|
v-perm="btn.auth || ['*:*:*']"
|
||||||
@click="handleClickBtns(btn.key)"
|
@click="handleClickBtns(btn.key)"
|
||||||
>
|
>
|
||||||
{{ btn.name }}
|
{{ btn.name }}
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -19,7 +19,9 @@
|
|||||||
<div v-if="isSettingCol" style="float: right">
|
<div v-if="isSettingCol" style="float: right">
|
||||||
<el-tooltip effect="dark" content="列配置" placement="bottom">
|
<el-tooltip effect="dark" content="列配置" placement="bottom">
|
||||||
<el-button ref="buttonRef" link>
|
<el-button ref="buttonRef" link>
|
||||||
<el-icon size="18"><Setting /></el-icon>
|
<el-icon size="18">
|
||||||
|
<Setting/>
|
||||||
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-popover
|
<el-popover
|
||||||
@@ -30,7 +32,8 @@
|
|||||||
virtual-triggering
|
virtual-triggering
|
||||||
trigger="click">
|
trigger="click">
|
||||||
<div class="col-setting-checkall">
|
<div class="col-setting-checkall">
|
||||||
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate" @change="changeIsShowAll"></el-checkbox>
|
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate"
|
||||||
|
@change="changeIsShowAll"></el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-setting-list">
|
<div class="col-setting-list">
|
||||||
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
||||||
@@ -49,19 +52,19 @@
|
|||||||
<!-- 表格部分 -->
|
<!-- 表格部分 -->
|
||||||
<div class="fv-table">
|
<div class="fv-table">
|
||||||
<el-table
|
<el-table
|
||||||
:data="localData.list"
|
:data="localData.list"
|
||||||
v-loading="localData.loading"
|
v-loading="localData.loading"
|
||||||
:row-key="tableConfig?.rowKey || 'id'"
|
:row-key="tableConfig?.rowKey || 'id'"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
table-layout="auto"
|
table-layout="auto"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
@row-dblclick="rowDblclick"
|
@row-dblclick="rowDblclick"
|
||||||
@cell-click="cellClick"
|
@cell-click="cellClick"
|
||||||
v-tabh
|
v-tabh
|
||||||
ref="tableInstance"
|
ref="tableInstance"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<fvTableColumn v-for="column in localData.columns" :key="column.prop" :columns="column">
|
<fvTableColumn v-for="column in localData.columns" :key="column.prop" :columns="column">
|
||||||
@@ -82,22 +85,22 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<fvPagination
|
<fvPagination
|
||||||
v-if="pagination"
|
v-if="pagination"
|
||||||
:current-page="localData.query.pageNum"
|
:current-page="localData.query.pageNum"
|
||||||
:page-size="localData.query.pageSize"
|
:page-size="localData.query.pageSize"
|
||||||
:page-sizes="[10, 20, 30, 40,50]"
|
:page-sizes="[10, 20, 30, 40,50]"
|
||||||
:total="localData.total"
|
:total="localData.total"
|
||||||
@changeSize="handleSizeChange"
|
@changeSize="handleSizeChange"
|
||||||
@goPage="handleCurrentChange"
|
@goPage="handleCurrentChange"
|
||||||
>
|
>
|
||||||
</fvPagination>
|
</fvPagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ElMessage } from 'element-plus';
|
import {ElNotification} from 'element-plus';
|
||||||
import { requestList } from '../../api/common';
|
import {requestList} from '../../api/common';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
//表格配置
|
//表格配置
|
||||||
@@ -148,8 +151,8 @@ const handleClickBtns = (key) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const filterColumns = () => {
|
const filterColumns = () => {
|
||||||
localData.columns = props.tableConfig.columns.map(item=>{
|
localData.columns = props.tableConfig.columns.map(item => {
|
||||||
if(item.prop) {
|
if (item.prop) {
|
||||||
return {
|
return {
|
||||||
...item
|
...item
|
||||||
}
|
}
|
||||||
@@ -158,10 +161,10 @@ const filterColumns = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeIsShowAll = (val) => {
|
const changeIsShowAll = (val) => {
|
||||||
if(val) {
|
if (val) {
|
||||||
filterColumns()
|
filterColumns()
|
||||||
localData.indeterminate = false
|
localData.indeterminate = false
|
||||||
localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
|
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||||
} else {
|
} else {
|
||||||
localData.columns.length = 0
|
localData.columns.length = 0
|
||||||
localData.checkGroup.length = 0
|
localData.checkGroup.length = 0
|
||||||
@@ -170,10 +173,10 @@ const changeIsShowAll = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeColShow = (val) => {
|
const changeColShow = (val) => {
|
||||||
if(val.length == props.tableConfig.columns.length) {
|
if (val.length == props.tableConfig.columns.length) {
|
||||||
localData.indeterminate = false
|
localData.indeterminate = false
|
||||||
localData.allColShow = true
|
localData.allColShow = true
|
||||||
} else if(val.length !== props.tableConfig.columns.length && val.length != 0) {
|
} else if (val.length !== props.tableConfig.columns.length && val.length != 0) {
|
||||||
localData.allColShow = false
|
localData.allColShow = false
|
||||||
localData.indeterminate = true
|
localData.indeterminate = true
|
||||||
} else {
|
} else {
|
||||||
@@ -181,9 +184,9 @@ const changeColShow = (val) => {
|
|||||||
localData.allColShow = false
|
localData.allColShow = false
|
||||||
}
|
}
|
||||||
const template = []
|
const template = []
|
||||||
props.tableConfig.columns.forEach(item=>{
|
props.tableConfig.columns.forEach(item => {
|
||||||
val.forEach(v=>{
|
val.forEach(v => {
|
||||||
if(item.prop == v) {
|
if (item.prop == v) {
|
||||||
template.push(item)
|
template.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -194,22 +197,31 @@ const changeColShow = (val) => {
|
|||||||
filterColumns()
|
filterColumns()
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const { api, params } = props.tableConfig
|
const {api, params} = props.tableConfig
|
||||||
const queryParmas = {...localData.query, ...params}
|
const queryParmas = {...localData.query, ...params}
|
||||||
if(api) {
|
if (api) {
|
||||||
localData.loading = true
|
localData.loading = true
|
||||||
try {
|
try {
|
||||||
const { code, data, msg } = await requestList(api, queryParmas)
|
const {code, data, msg} = await requestList(api, queryParmas)
|
||||||
if ( code === 1000 ) {
|
|
||||||
|
if (code === 1000) {
|
||||||
localData.list = data.rows
|
localData.list = data.rows
|
||||||
localData.total = data.total
|
localData.total = data.total
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(msg)
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('请求数据失败')
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请求数据失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -246,13 +258,13 @@ const handleCurrentChange = (val) => {
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
watchEffect(()=>{
|
watchEffect(() => {
|
||||||
if(localData.allColShow) {
|
if (localData.allColShow) {
|
||||||
localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
|
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//刷新
|
//刷新
|
||||||
const refresh = ({resetPage=false}={}) => {
|
const refresh = ({resetPage = false} = {}) => {
|
||||||
resetPage ? localData.query.pageNum = 1 : null
|
resetPage ? localData.query.pageNum = 1 : null
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
@@ -265,7 +277,7 @@ const getQuery = () => {
|
|||||||
return localData.query
|
return localData.query
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ refresh, updateLoading, getQuery, tableInstance })
|
defineExpose({refresh, updateLoading, getQuery, tableInstance})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
@@ -277,20 +289,24 @@ onMounted(() => {
|
|||||||
.col-setting-checkall {
|
.col-setting-checkall {
|
||||||
border-bottom: 1px solid rgb(210, 210, 213);
|
border-bottom: 1px solid rgb(210, 210, 213);
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-setting-list {
|
.col-setting-list {
|
||||||
max-height: 45vh;
|
max-height: 45vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-head-btn {
|
.table-head-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fv-table-btn {
|
.fv-table-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fv-table {
|
.fv-table {
|
||||||
:deep(.el-tooltip) {
|
:deep(.el-tooltip) {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
|
|||||||
@@ -89,21 +89,18 @@ const tableConfig = reactive({
|
|||||||
if(row.buttons){
|
if(row.buttons){
|
||||||
buttons = new Set(Array.from(row.buttons))
|
buttons = new Set(Array.from(row.buttons))
|
||||||
}
|
}
|
||||||
// if (buttons.has("details")) {
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("delete")) {
|
if (buttons.has("report")) {
|
||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
|
||||||
// }
|
|
||||||
// if (buttons.has("report")) {
|
|
||||||
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("report")) {
|
if (buttons.has("report")) {
|
||||||
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
{
|
{
|
||||||
@@ -119,11 +116,11 @@ const tableConfig = reactive({
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// buttons.has("delete") ?
|
buttons.has("delete") ?
|
||||||
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
||||||
perm={['mosr:requirement:del']}
|
perm={['mosr:requirement:del']}
|
||||||
onDelete={() => handleDelete(row)}/>
|
onDelete={() => handleDelete(row)}/>
|
||||||
// : ''
|
: ''
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
v-model:value="formData.collectExplain" />
|
v-model:value="formData.collectExplain" />
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 650px;" v-if="showTable"
|
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable"
|
||||||
:tableConfig="tableConfig" :data="formData.fileList"
|
:tableConfig="tableConfig" :data="formData.fileList"
|
||||||
:isSettingCol="false" :pagination="false">
|
:isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
@@ -236,11 +236,6 @@ const init = async () => {
|
|||||||
const resFund = await getFundOption()
|
const resFund = await getFundOption()
|
||||||
specialFundOption.value = resFund.data
|
specialFundOption.value = resFund.data
|
||||||
getWorkflowInfo().then(res => {
|
getWorkflowInfo().then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
processInstanceData.value = data
|
processInstanceData.value = data
|
||||||
@@ -256,7 +251,12 @@ const init = async () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
} else {
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -367,7 +367,7 @@ onMounted(async () => {
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
:deep(.el-table--fit ){
|
:deep(.el-table--fit ){
|
||||||
height: 400px;
|
height: 600px;
|
||||||
}
|
}
|
||||||
.add-block {
|
.add-block {
|
||||||
//display: flex;
|
//display: flex;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<baseTitle title="附件列表"></baseTitle>
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
: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"/>
|
||||||
@@ -86,7 +86,7 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
|
|||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
import {ElMessage} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
import {matterTree} from '@/utils/matterTree.js';
|
import {matterTree} from '@/utils/matterTree.js';
|
||||||
import {getFundOption} from "@/api/special-fund";
|
import {getFundOption} from "@/api/special-fund";
|
||||||
@@ -170,14 +170,16 @@ const handleSubmit = () => {
|
|||||||
formData: formData.value
|
formData: formData.value
|
||||||
}
|
}
|
||||||
agreeTask(approve).then(res => {
|
agreeTask(approve).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Requirement'
|
name: 'Requirement'
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -190,14 +192,16 @@ const handleReject = (instance) => {
|
|||||||
auditOpinion: formData.value.auditOpinion,
|
auditOpinion: formData.value.auditOpinion,
|
||||||
}
|
}
|
||||||
rejectTask(approve).then(res => {
|
rejectTask(approve).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Requirement'
|
name: 'Requirement'
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -268,7 +272,9 @@ onMounted(async () => {
|
|||||||
:deep(.el-empty__description) {
|
:deep(.el-empty__description) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
:deep(.el-table--fit ){
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
.detail-block {
|
.detail-block {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
import {useAuthStore} from '@/stores/userstore.js'
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import Tag from '@/components/Tag.vue'
|
import Tag from '@/components/Tag.vue'
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {ElMessage, ElNotification} from "element-plus";
|
import { ElNotification} from "element-plus";
|
||||||
import {deleteDemand} from "@/api/project-demand";
|
import {deleteDemand} from "@/api/project-demand";
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -112,9 +112,6 @@ const tableConfig = reactive({
|
|||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
// 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'})
|
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
@@ -173,12 +170,12 @@ const handleEdit = (row) => {
|
|||||||
}
|
}
|
||||||
const handleDelete = (row) => {
|
const handleDelete = (row) => {
|
||||||
deleteDemand(row.requirementId).then(res => {
|
deleteDemand(row.requirementId).then(res => {
|
||||||
if (res.code === 1000) {
|
ElNotification({
|
||||||
ElMessage.success(res.msg)
|
title: '提示',
|
||||||
tableIns.value.refresh()
|
message: res.msg,
|
||||||
} else {
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
ElMessage.error(res.msg)
|
})
|
||||||
}
|
tableIns.value.refresh()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
|
|||||||
@@ -1,9 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<tag-and-file-upload />
|
<!-- <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: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile" />
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadRequirementAttachment} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag:'需求征集'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await uploadRequirementAttachment(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: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -46,3 +46,10 @@ export const getCollectAttachment = (params) => {
|
|||||||
params:params
|
params:params
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const uploadCollectAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/collect/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,9 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<tag-and-file-upload />
|
<!-- <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: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadCollectAttachment} from "./api";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag:'需求上报',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await uploadCollectAttachment(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: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import {getFilingAttachment, getInitiationAttachment} from "@/api/project-manage
|
|||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const activeName = ref('3')
|
const activeName = ref('4')
|
||||||
const attachment = ref({})
|
const attachment = ref({})
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const implementation = ref()
|
const implementation = ref()
|
||||||
@@ -127,12 +127,22 @@ const changeFileList = (res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const upload = () => {
|
const upload = () => {
|
||||||
router.push({
|
if(activeName.value==='3'){
|
||||||
name: switchUpload(activeName.value),
|
router.push({
|
||||||
query: {
|
name: 'Implementation/upload',
|
||||||
id: route.query.id
|
query: {
|
||||||
}
|
id: route.query.id,
|
||||||
})
|
type:'3'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
router.push({
|
||||||
|
name: switchUpload(activeName.value),
|
||||||
|
query: {
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const switchUpload=(index)=>{
|
const switchUpload=(index)=>{
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ const tableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.state !== null) {
|
if (row.state !== null) {
|
||||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||||
} else {
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
@@ -207,9 +207,9 @@ const tableConfig = reactive({
|
|||||||
if (buttons.has("details")) {
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
// if (buttons.has("attachments")) {
|
if (buttons.has("attachments")) {
|
||||||
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
if (buttons.has("entry")) {
|
if (buttons.has("entry")) {
|
||||||
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,129 @@
|
|||||||
<template>
|
<template>
|
||||||
<tag-and-file-upload />
|
<!-- <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: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile" />
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadFilingAttachment} from "@/api/project-manage";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: '项目归档',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
let res = await uploadFilingAttachment(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: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -221,9 +221,9 @@ const tableConfig = reactive({
|
|||||||
if (buttons.has("standing")) {
|
if (buttons.has("standing")) {
|
||||||
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
// if (buttons.has("attachments")) {
|
if (buttons.has("attachments")) {
|
||||||
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
if (buttons.has("viewAllocation")) {
|
if (buttons.has("viewAllocation")) {
|
||||||
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,12 +160,21 @@ const handleSubmit = async (instance) => {
|
|||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
await router.push({
|
if(route.query.type=='3'){
|
||||||
name: 'Implementation/attachment',
|
await router.push({
|
||||||
query:{
|
name: 'Filing/attachment',
|
||||||
id: route.query.id
|
query:{
|
||||||
}
|
id: route.query.id
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
await router.push({
|
||||||
|
name: 'Implementation/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ const tableConfig = reactive({
|
|||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
// 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'})
|
btn.push({label: '立项',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
|
|||||||
@@ -1,9 +1,129 @@
|
|||||||
<template>
|
<template>
|
||||||
<tag-and-file-upload />
|
<!-- <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: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadInitiationAttachment} from "@/api/project-manage";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: '项目立项',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
let res = await uploadInitiationAttachment(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: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
<!-- <form-design ref="formDesign"/>-->
|
<!-- <form-design ref="formDesign"/>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="validVisible" title="设置项检查">
|
<el-dialog v-model="validVisible" title="设置项检查">
|
||||||
<el-steps align-center :active="validStep" finish-status="success">
|
<el-steps align-center :active="validStep" finish-status="success">
|
||||||
@@ -89,7 +87,10 @@ const validOptions = ref([
|
|||||||
{title: '审批流程', description: '', icon: '', status: ''},
|
{title: '审批流程', description: '', icon: '', status: ''},
|
||||||
// {title: '扩展设置', description: '', icon: '', status: ''}
|
// {title: '扩展设置', description: '', icon: '', status: ''}
|
||||||
])
|
])
|
||||||
|
onActivated(()=>{
|
||||||
|
activeSelect.value = 'processDesign'
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
|
||||||
const errTitle = computed(() => {
|
const errTitle = computed(() => {
|
||||||
if (validResult.finished && !validResult.success) {
|
if (validResult.finished && !validResult.success) {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ const processData = computed(() => {
|
|||||||
return processStore.getDesign()
|
return processStore.getDesign()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user