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

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

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