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

View File

@@ -39,9 +39,27 @@
</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"/> <Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300"/>
<baseTitle title="申请文件"></baseTitle> <baseTitle title="申请文件"></baseTitle>
<file-upload @getFile="getFile"/> <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"> <div class="approval-record">
<baseTitle title="流程"></baseTitle> <baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
@@ -76,6 +94,7 @@ const formData = ref({
deadline: '', deadline: '',
collectExplain: '' collectExplain: ''
}) })
const showTable = ref(false)
const processDiagramViewer = ref(false) const processDiagramViewer = ref(false)
const typeOption = ref([ const typeOption = ref([
@@ -102,11 +121,23 @@ const form = ref(null)
const fileList = ref(null) const fileList = ref(null)
const menuTree = ref(null) const menuTree = ref(null)
const loading = ref(false) const loading = ref(false)
const localData = reactive({
affiliatedCompany: []
})
const processStore = useProcessStore() const processStore = useProcessStore()
const processInstanceData = ref() const processInstanceData = ref()
const getFile = (val) => { 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 fileObj = {}
let newFileArray = [] let newFileArray = []
val.forEach(item => { val.forEach(item => {
@@ -136,7 +167,6 @@ const init = async () => {
} }
const handleSubmit = () => { const handleSubmit = () => {
console.log(formData.value, "formData.value")
addRequirement({ addRequirement({
...formData.value, ...formData.value,
requirementId: 0, requirementId: 0,
@@ -158,6 +188,9 @@ const getDetailInfo = async () => {
if (res.code === 1000) { if (res.code === 1000) {
ElMessage.success(res.msg) ElMessage.success(res.msg)
formData.value = res.data.formData formData.value = res.data.formData
if(route.query.isAdd==undefined){
showTable.value=true
}
} else { } else {
ElMessage.error(res.msg) ElMessage.error(res.msg)
} }
@@ -184,12 +217,17 @@ onMounted(async () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.add-block { .add-block {
//display: flex; //display: flex;
//justify-content: space-between; //justify-content: space-between;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
a {
cursor: pointer;
font-size: 14px;
color: #2a99ff;
}
.approval-record { .approval-record {
position: relative; position: relative;
} }

View File

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

View File

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