提交 467e6a2a 编写于 作者: 刘英杰's avatar 刘英杰

修复审批界面样式乱、增加审批附件在线预览

上级 cf955569
......@@ -19,7 +19,7 @@
<div style="display: flex;align-items: center;justify-content: center">
竞赛等级:
<Select v-model="search.level" style="width: 10vw;">
<Option v-for="(item,index) in search.levelArray" :value="item.value" :key="index"> {{ item.label }}
<Option v-for="(item,index) in search.levelArray" :value="item.id" :key="index"> {{ item.name }}
</Option>
</Select>
</div>
......@@ -458,9 +458,10 @@ export default {
{value: 3, label: '审批不通过'},
],
levelArray: [
{value: 1, label: '国家级'},
{value: 2, label: '省一级'},
{value: 3, label: '省二级'},
/*
{value: 1, label: '国家级'},
{value: 2, label: '省一级'},
{value: 3, label: '省二级'},*/
],
wayArray: [
{value: 0, label: '团队'},
......@@ -490,8 +491,13 @@ export default {
},
mounted() {
this.getCompetitionSignList()
this.GetLevelBySelect()
},
methods: {
async GetLevelBySelect() {
const res = await api.GetLevelBySelect()
this.search.levelArray = res.response
},
importButton(row) {
window.open(row, '_blank')
},
......@@ -629,7 +635,7 @@ export default {
}
</script>
<style scoped>
<style scoped lang="less">
.tableList {
display: flex;
justify-content: center;
......
......@@ -26,7 +26,10 @@
<Table :columns="columns" :data="data" :loading="loading">
<template #dept="{row}">
<Tooltip :content="row.dept" placement="right-end" :transfer="false">
<Tooltip placement="right-end" :transfer="false" :max-width="500">
<template #content>
<div> {{ row.dept }}</div>
</template>
<Ellipsis v-if="row.dept" :text="row.dept" :length="18"/>
</Tooltip>
</template>
......
......@@ -8,8 +8,9 @@
<div class="h_content">
<template v-if="!flowInfo">
<!-- <Button @click="cancelFlow" type="error" style="margin-right: 20px">取消流程</Button>-->
<Button @click="revocationFlow" type="warning" style="margin-right: 20px">撤回流程</Button>
<Button @click="passFlow" type="primary">通过审批</Button>
<Button @click="$router.back()" type="primary" style="margin-right: 20px;width: 12vw;">返回</Button>
<Button @click="passFlow" type="primary" style="width: 12vw;margin-right: 20px;">通过审批</Button>
<Button @click="revocationFlow" type="warning" style="width: 12vw;">撤回流程</Button>
</template>
<template v-else-if="flowInfo==='流程详细信息'">
<h1>{{ flowInfo }}</h1>
......@@ -83,6 +84,7 @@
<Card style="width: 50%;margin-top: 20px;border-radius: 20px;" v-if="form_name === 'CompetitionSign'">
<div class="tableList">
<h1 style="display: flex;justify-content: center"> {{ data.Object.module }}</h1>
<table border="1" class="container1">
......@@ -120,7 +122,8 @@
<tr>
<th>附件:</th>
<td class="colContent">
<a :href="ite.path" class="aText" style="display: flex;flex-wrap: wrap;justify-content: center"
<!-- :href="ite.path"-->
<a class="aText" style="display: flex;flex-wrap: wrap;justify-content: center" @click="viewFile(ite)"
v-for="(ite,inde) in data.Object.file_list"
:key="inde">
{{ ite.file_name }}
......@@ -381,6 +384,33 @@
<!-- </template>-->
</Table>
</Drawer>
<Drawer width="90" closable v-model="drawerPreview">
<template #header>
<div style="width: 100%;mix-height:35px;max-height:auto;position: relative">
<h3 style="margin-bottom: 5px">附件预览</h3>
<a class="aText" style="margin-right: 3vw;" @click="updateViewFile(ite)"
v-for="(ite,inde) in data.Object.file_list"
:key="inde">
{{ ite.file_name }}
</a>
</div>
</template>
<VueDocPreview
:key="viewFileUpdataKeys"
v-if="src && fileType ==='office'"
:value="src"
:url="src"
language="JavaScript"
type="office">
</VueDocPreview>
<!-- v-if="src && fileType ==='image'"-->
<i-frame
:key="viewFileUpdataKeys"
v-if="src && fileType ==='image'"
:src="src"
></i-frame>
</Drawer>
</div>
</template>
......@@ -396,6 +426,11 @@ export default {
data() {
//这里存放数据",
return {
viewFileUpdataKeys: 1,
split: 0.7,
drawerPreview: false,
fileType: '',
src: '',
columnsStudent: [
{
title: '参赛学生',
......@@ -537,6 +572,34 @@ export default {
watch: {},
//方法集合",
methods: {
updateViewFile(e) {
const fun = (e, url) => {
this.src = window.location.protocol + '//' + window.location.host + url.path
// this.src = 'https://asc.hnasct.cn/' + url.path
this.fileType = e
this.viewFileUpdataKeys++
}
if (e.suffix === '.jpg' || e.suffix === '.jpeg' || e.suffix === '.png' || e.suffix === '.pdf') {
fun('image', e)
} else if (e.suffix === '.doc' || e.suffix === '.docx' || e.suffix === '.xls'
|| e.suffix === '.xlsx') {
fun('office', e)
}
},
viewFile(e) {
const fun = (e, url) => {
this.src = window.location.protocol + '//' + window.location.host + url.path
// this.src = 'https://asc.hnasct.cn/' + url.path
this.fileType = e
this.drawerPreview = true
}
if (e.suffix === '.jpg' || e.suffix === '.jpeg' || e.suffix === '.png' || e.suffix === '.pdf') {
fun('image', e)
} else if (e.suffix === '.doc' || e.suffix === '.docx' || e.suffix === '.xls'
|| e.suffix === '.xlsx') {
fun('office', e)
}
},
GetFlowLogList(form_id) {
hook.getInitListRequest(() => {
api.GetFlowLogList({form_id: form_id}).then((res) => {
......@@ -675,7 +738,8 @@ export default {
]
cur.push(array[index])
})
hook.publicMessage(res)
this.$Spin.hide()
// hook.publicMessage(res)
break;
case "CompetitionSign":
this.$Spin.show()
......@@ -688,7 +752,6 @@ export default {
this.data.Object = res1.response
this.data.competitionsignid = res1.response.competition_sign.competitionsignid
api.TeamAndMemberSel({signid: res1.response.competition_sign.competitionsignid}).then(res => {
console.log("🚀🚀🚀,", res)
this.competitionsignTeam = res.response
})
let keys = [
......@@ -708,7 +771,6 @@ export default {
Object.keys(res1.response.competition_sign).map(cur => {
if (keys.indexOf(cur) === -1) delete res1.response.competition_sign[cur]
})
this.data.keyValueArray = Object.entries(res1.response.competition_sign)
this.data.keyValueArray.map((cur, index) => {
let array1 = [
......@@ -726,7 +788,8 @@ export default {
]
cur.push(array1[index])
})
hook.publicMessage(res1)
this.$Spin.hide()
// hook.publicMessage(res1)
break;
case 'Certificate':
this.$Spin.show()
......@@ -770,7 +833,8 @@ export default {
]
cur.push(array2[index])
})
hook.publicMessage(res2)
this.$Spin.hide()
// hook.publicMessage(res2)
break;
case 'Bursary':
......@@ -815,7 +879,8 @@ export default {
]
cur.push(array3[index])
})
hook.publicMessage(res3)
this.$Spin.hide()
// hook.publicMessage(res3)
break;
case 'Notice':
this.$Spin.show()
......@@ -831,7 +896,6 @@ export default {
delete res4.response.notice.createtime
// delete res3.response.bursary.approval_remark
delete res4.response.notice.competitionreportid
this.data.keyValueArray = Object.entries(res4.response.notice)
this.data.keyValueArray.map((cur, index) => {
let array4 = [
......@@ -849,7 +913,8 @@ export default {
]
cur.push(array4[index])
})
hook.publicMessage(res4)
this.$Spin.hide()
// hook.publicMessage(res4)
break;
}
......@@ -902,7 +967,7 @@ export default {
</script>
<style scoped>
<style scoped lang="less">
.container {
height: 100vh;
width: 100vw;
......@@ -914,7 +979,6 @@ export default {
width: 100%;
height: 8%;
.h_left, .h_right {
width: 20%;
height: 100%;
......@@ -939,13 +1003,11 @@ export default {
align-content: flex-start;
justify-content: center;
.tableList {
display: flex;
justify-content: center;
flex-wrap: wrap;
.container1 {
border-collapse: collapse;
box-sizing: border-box;
......@@ -960,11 +1022,9 @@ export default {
text-align: center;
width: 30%;
height: 50px;
}
.colContent {
height: 50px;
text-align: center;
}
......
......@@ -309,14 +309,14 @@ export default {
},
// 修改
approvalLisFun(row) {
const url = this.$router.resolve({
this.$router.push({
name: 'awaitDoneInformation',
query: {
runid: row.runid,
form_name: row.form_name,
}
})
window.open(url.href, '_blank')
// window.open(url.href, '_blank')
// this.approvalDrawer = true
console.log("🚀🚀🚀,", row)
},
......
......@@ -125,7 +125,7 @@
>
<div style="padding: 20px 30px; width: 100%;">
<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
<p>培训计划</p>
<p>培训方案</p>
</div>
</Upload>
<Upload
......@@ -139,7 +139,7 @@
action="">
<div style="padding: 20px 30px; width: 100%;">
<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
<p>竞赛方案</p>
<p>参赛文件</p>
</div>
</Upload>
</div>
......
......@@ -196,7 +196,6 @@
</div>
</template>
<template #close>
<Button type="text" style="color: #1e93ff" @click="downFile">下载</Button>
<Button type="text" @click="drawerPreview=false">关闭</Button>
</template>
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或