Merge pull request 'dj' (#147) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/147
This commit is contained in:
2024-05-12 11:40:00 +00:00
4 changed files with 64 additions and 26 deletions

View File

@@ -13,25 +13,25 @@
>
<el-button color="#DED0B2" :loading="loading">上传文件</el-button>
</el-upload>
<div v-if="showTable||fileList.length!==0">
<el-table :data="fileList" style="width: 100%">
<el-table-column label="序号" type="index" align="center" width="80"/>
<el-table-column prop="originalFilename" label="文件名" align="center"/>
<el-table-column prop="size" label="文件大小" align="center">
<template #default="scope">
{{ parseInt(scope.row.size / 1024) }}KB
<!-- {{ parseInt(scope.row.size / 1024) > 1024 ? 'MB' : 'KB' }}-->
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template #default="scope">
<el-button link type="primary" size="small" @click="beforeRemove(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- <div v-if="showTable||fileList.length!==0">-->
<!-- <el-table :data="fileList" style="width: 100%">-->
<!-- <el-table-column label="序号" type="index" align="center" width="80"/>-->
<!-- <el-table-column prop="originalFilename" label="文件名" align="center"/>-->
<!-- <el-table-column prop="size" label="文件大小" align="center">-->
<!-- <template #default="scope">-->
<!-- {{ parseInt(scope.row.size / 1024) }}KB-->
<!-- &lt;!&ndash; {{ parseInt(scope.row.size / 1024) > 1024 ? 'MB' : 'KB' }}&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="操作">-->
<!-- <template #default="scope">-->
<!-- <el-button link type="primary" size="small" @click="beforeRemove(scope.row)">-->
<!-- 删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
</template>
<script setup>
@@ -124,7 +124,7 @@ const handleRemove = (row) => {
<style lang="scss" scoped>
a {
font-size: 12px;
font-size: 14px;
color: #2a99ff;
}
</style>

View File

@@ -39,9 +39,27 @@
</div>
</el-form>
<baseTitle title="征集说明"></baseTitle>
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300"/>
<baseTitle title="申请文件"></baseTitle>
<file-upload @getFile="getFile"/>
<el-table :data="formData.fileList" style="width: 100%" v-if="showTable">
<el-table-column label="序号" type="index" align="center" width="80"/>
<el-table-column prop="fileName" label="文件名" align="center"/>
<el-table-column prop="tag" label="标签" align="center"/>
<el-table-column prop="size" label="文件大小" align="center">
<template #default="scope">
{{ parseInt(scope.row.size / 1024) }}KB
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template #default="scope">
<a :href="scope.row.url">
下载
</a>
</template>
</el-table-column>
</el-table>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
@@ -76,6 +94,7 @@ const formData = ref({
deadline: '',
collectExplain: ''
})
const showTable = ref(false)
const processDiagramViewer = ref(false)
const typeOption = ref([
@@ -102,11 +121,23 @@ const form = ref(null)
const fileList = ref(null)
const menuTree = ref(null)
const loading = ref(false)
const localData = reactive({
affiliatedCompany: []
})
const processStore = useProcessStore()
const processInstanceData = ref()
const getFile = (val) => {
console.log('val', val)
console.log('val', val, route.query.isAdd)
if(route.query.isAdd==undefined){
showTable.value=true
val.forEach(item => {
formData.value.fileList.push(item)
})
fileList.value=formData.value.fileList
console.log('fileList.value',fileList.value)
}
let fileObj = {}
let newFileArray = []
val.forEach(item => {
@@ -136,7 +167,6 @@ const init = async () => {
}
const handleSubmit = () => {
console.log(formData.value, "formData.value")
addRequirement({
...formData.value,
requirementId: 0,
@@ -158,6 +188,9 @@ const getDetailInfo = async () => {
if (res.code === 1000) {
ElMessage.success(res.msg)
formData.value = res.data.formData
if(route.query.isAdd==undefined){
showTable.value=true
}
} else {
ElMessage.error(res.msg)
}
@@ -184,12 +217,17 @@ onMounted(async () => {
</script>
<style lang="scss" scoped>
.add-block {
//display: flex;
//justify-content: space-between;
overflow-x: hidden;
overflow-y: auto;
a {
cursor: pointer;
font-size: 14px;
color: #2a99ff;
}
.approval-record {
position: relative;
}

View File

@@ -142,7 +142,7 @@ init()
<style lang="scss" scoped>
a {
cursor: pointer;
font-size: 12px;
font-size: 14px;
color: #2a99ff;
}
.detail-block {

View File

@@ -69,8 +69,8 @@ export default defineConfig({
open: true,
proxy: {
'/api/workflow': {
// target: 'http://frp.feashow.cn:31800/',
target: 'http://clay.frp.feashow.cn/',
target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/',
// target: 'http://192.168.31.175:8000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')