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

V20240829

上级 5a9e9727
...@@ -81,5 +81,6 @@ declare module 'vue' { ...@@ -81,5 +81,6 @@ declare module 'vue' {
VanTabs: typeof import('vant/es')['Tabs'] VanTabs: typeof import('vant/es')['Tabs']
VanTag: typeof import('vant/es')['Tag'] VanTag: typeof import('vant/es')['Tag']
VanUploader: typeof import('vant/es')['Uploader'] VanUploader: typeof import('vant/es')['Uploader']
ViewFiles: typeof import('./src/components/viewFiles.vue')['default']
} }
} }
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg"/> <link rel="icon" type="image/svg+xml" href="./vite.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>竞赛管理</title> <title>竞赛管理</title>
<script type="module" crossorigin src="./assets/index-peVgPzIl.js"></script> <script type="module" crossorigin src="./assets/index-xOO7CMfG.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-D0GG2GhU.css"> <link rel="stylesheet" crossorigin href="./assets/index-RofWzhxq.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
"name": "occcupancy-management", "name": "occcupancy-management",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11",
"@vue-office/pdf": "^2.0.2",
"@ysx-libs/vue-virtual-tree": "^0.0.5", "@ysx-libs/vue-virtual-tree": "^0.0.5",
"@zeronejs/cli": "^3.3.1", "@zeronejs/cli": "^3.3.1",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
...@@ -32,6 +35,7 @@ ...@@ -32,6 +35,7 @@
"view-ui-plus": "^1.3.15", "view-ui-plus": "^1.3.15",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-cookies": "^1.8.3", "vue-cookies": "^1.8.3",
"vue-demi": "^0.14.10",
"vue-jsonp": "^2.0.0", "vue-jsonp": "^2.0.0",
"vue-qr": "^4.0.9", "vue-qr": "^4.0.9",
"vue-router": "^4.2.4", "vue-router": "^4.2.4",
...@@ -960,6 +964,54 @@ ...@@ -960,6 +964,54 @@
"vue": "^3.2.25" "vue": "^3.2.25"
} }
}, },
"node_modules/@vue-office/docx": {
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
"integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==",
"hasInstallScript": true,
"peerDependencies": {
"@vue/composition-api": "^1.7.1",
"vue": "^2.0.0 || >=3.0.0",
"vue-demi": "^0.14.6"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vue-office/excel": {
"version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@vue-office/excel/-/excel-1.7.11.tgz",
"integrity": "sha512-LF3R9IV573Sf4qTu6Ik5Ee8UMfkrsZQ6HEQE25/2m1c0CMcHX6KanIy6Cz0b0Q+FrLH3TjIsLTm6oPcqAbDGSA==",
"hasInstallScript": true,
"peerDependencies": {
"@vue/composition-api": "^1.7.1",
"vue": "^2.0.0 || >=3.0.0",
"vue-demi": "^0.14.6"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vue-office/pdf": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/@vue-office/pdf/-/pdf-2.0.2.tgz",
"integrity": "sha512-bQFqGxSOnKbvCS7OoJniYoTz1VIm1XOrRD27Msorxny9NFJ8RsQK1A4uhlnISJRFMaUwp1qlcVE9jMAhsiIyjg==",
"hasInstallScript": true,
"peerDependencies": {
"@vue/composition-api": "^1.7.1",
"vue": "^2.0.0 || >=3.0.0",
"vue-demi": "^0.14.6"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vue/compiler-core": { "node_modules/@vue/compiler-core": {
"version": "3.3.4", "version": "3.3.4",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.3.4.tgz", "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
...@@ -3225,28 +3277,6 @@ ...@@ -3225,28 +3277,6 @@
"pinia": "^2.0.0" "pinia": "^2.0.0"
} }
}, },
"node_modules/pinia/node_modules/vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/pinyin": { "node_modules/pinyin": {
"version": "2.11.2", "version": "2.11.2",
"resolved": "https://registry.npmmirror.com/pinyin/-/pinyin-2.11.2.tgz", "resolved": "https://registry.npmmirror.com/pinyin/-/pinyin-2.11.2.tgz",
...@@ -4332,6 +4362,31 @@ ...@@ -4332,6 +4362,31 @@
"resolved": "https://registry.npmmirror.com/vue-cookies/-/vue-cookies-1.8.3.tgz", "resolved": "https://registry.npmmirror.com/vue-cookies/-/vue-cookies-1.8.3.tgz",
"integrity": "sha512-VBRsyRMVdahBgFfh389TMHPmDdr4URDJNMk4FKSCfuNITs7+jitBDhwyL4RJd3WUsfOYNNjPAkfbehyH9AFuoA==" "integrity": "sha512-VBRsyRMVdahBgFfh389TMHPmDdr4URDJNMk4FKSCfuNITs7+jitBDhwyL4RJd3WUsfOYNNjPAkfbehyH9AFuoA=="
}, },
"node_modules/vue-demi": {
"version": "0.14.10",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/vue-jsonp": { "node_modules/vue-jsonp": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
...@@ -5169,6 +5224,21 @@ ...@@ -5169,6 +5224,21 @@
"integrity": "sha512-ciXNIHKPriERBisHFBvnTbfKa6r9SAesOYXeGDzgegcvy9Q4xdScSHAmKbNT0M3O0S9LKhIf5/G+UYG4NnnzYw==", "integrity": "sha512-ciXNIHKPriERBisHFBvnTbfKa6r9SAesOYXeGDzgegcvy9Q4xdScSHAmKbNT0M3O0S9LKhIf5/G+UYG4NnnzYw==",
"dev": true "dev": true
}, },
"@vue-office/docx": {
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
"integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ=="
},
"@vue-office/excel": {
"version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@vue-office/excel/-/excel-1.7.11.tgz",
"integrity": "sha512-LF3R9IV573Sf4qTu6Ik5Ee8UMfkrsZQ6HEQE25/2m1c0CMcHX6KanIy6Cz0b0Q+FrLH3TjIsLTm6oPcqAbDGSA=="
},
"@vue-office/pdf": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/@vue-office/pdf/-/pdf-2.0.2.tgz",
"integrity": "sha512-bQFqGxSOnKbvCS7OoJniYoTz1VIm1XOrRD27Msorxny9NFJ8RsQK1A4uhlnISJRFMaUwp1qlcVE9jMAhsiIyjg=="
},
"@vue/compiler-core": { "@vue/compiler-core": {
"version": "3.3.4", "version": "3.3.4",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.3.4.tgz", "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
...@@ -6954,13 +7024,6 @@ ...@@ -6954,13 +7024,6 @@
"requires": { "requires": {
"@vue/devtools-api": "^6.5.0", "@vue/devtools-api": "^6.5.0",
"vue-demi": ">=0.14.5" "vue-demi": ">=0.14.5"
},
"dependencies": {
"vue-demi": {
"version": "0.14.7",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz",
"integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA=="
}
} }
}, },
"pinia-plugin-persistedstate": { "pinia-plugin-persistedstate": {
...@@ -7799,6 +7862,11 @@ ...@@ -7799,6 +7862,11 @@
"resolved": "https://registry.npmmirror.com/vue-cookies/-/vue-cookies-1.8.3.tgz", "resolved": "https://registry.npmmirror.com/vue-cookies/-/vue-cookies-1.8.3.tgz",
"integrity": "sha512-VBRsyRMVdahBgFfh389TMHPmDdr4URDJNMk4FKSCfuNITs7+jitBDhwyL4RJd3WUsfOYNNjPAkfbehyH9AFuoA==" "integrity": "sha512-VBRsyRMVdahBgFfh389TMHPmDdr4URDJNMk4FKSCfuNITs7+jitBDhwyL4RJd3WUsfOYNNjPAkfbehyH9AFuoA=="
}, },
"vue-demi": {
"version": "0.14.10",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg=="
},
"vue-jsonp": { "vue-jsonp": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11",
"@vue-office/pdf": "^2.0.2",
"@ysx-libs/vue-virtual-tree": "^0.0.5", "@ysx-libs/vue-virtual-tree": "^0.0.5",
"@zeronejs/cli": "^3.3.1", "@zeronejs/cli": "^3.3.1",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
...@@ -33,6 +36,7 @@ ...@@ -33,6 +36,7 @@
"view-ui-plus": "^1.3.15", "view-ui-plus": "^1.3.15",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-cookies": "^1.8.3", "vue-cookies": "^1.8.3",
"vue-demi": "^0.14.10",
"vue-jsonp": "^2.0.0", "vue-jsonp": "^2.0.0",
"vue-qr": "^4.0.9", "vue-qr": "^4.0.9",
"vue-router": "^4.2.4", "vue-router": "^4.2.4",
......
...@@ -84,24 +84,15 @@ export default class common { ...@@ -84,24 +84,15 @@ export default class common {
GetApplicationType() { GetApplicationType() {
//获取赛事目录申请类别 //获取赛事目录申请类别
return new Promise(resolve => { return new Promise(resolve => {
return resolve([ return resolve([{
{ text: '教师赛事申请', value: 112,
text: '教师赛事申请', }, {
value: 112, text: '教师赛事调整', value: 114,
}, }, {
{ text: '学生赛事申请', value: 101,
text: '教师赛事调整', }, {
value: 114, text: '学生赛事调整', value: 113,
}, },])
{
text: '学生赛事申请',
value: 101,
},
{
text: '学生赛事调整',
value: 113,
},
])
}) })
} }
......
...@@ -26,8 +26,8 @@ const props = defineProps({ ...@@ -26,8 +26,8 @@ const props = defineProps({
</div> </div>
<div class="w-full h-full flex items-center"> <div class="w-full h-full flex items-center">
<div v-font:{size:14,color:`#323233`}>{{ props.item.dept }}</div> <div v-font:{size:14,color:`#323233`}>{{ props.item.dept }}</div>
<div v-show="props.item.sfzh " class="mx-1">|</div> <!-- <div v-show="props.item.sfzh " class="mx-1">|</div>
<div v-show="props.item.sfzh " v-font:{size:14,color:`#323233`}>{{ props.item.sfzh }}</div> <div v-show="props.item.sfzh " v-font:{size:14,color:`#323233`}>{{ props.item.sfzh }}</div>-->
<div v-show="props.item.phone" class="mx-1">|</div> <div v-show="props.item.phone" class="mx-1">|</div>
<div v-show="props.item.phone" v-font:{size:14,color:`#323233`}>{{ props.item.phone }}</div> <div v-show="props.item.phone" v-font:{size:14,color:`#323233`}>{{ props.item.phone }}</div>
</div> </div>
......
...@@ -16,7 +16,7 @@ const props = defineProps({ ...@@ -16,7 +16,7 @@ const props = defineProps({
<div class="w-[80%] h-full "> <div class="w-[80%] h-full ">
<div class="w-full h-full flex items-center"> <div class="w-full h-full flex items-center">
<div v-font:{size:18,color:`#323233`} class="w-[fit] ">{{ props.item.name }}</div> <div v-font:{size:18,color:`#323233`} class="w-[fit] ">{{ props.item.name }}</div>
<van-icon name="contact" :color="['#0099ff','#f80c72'][props.item.gender_name ==='男'? 0:1]" class="mb-3 mx-1"/> <van-icon name="contact" :color="['#0099ff','#f80c72'][props.item.gender ==='男'? 0:1]" class="mb-3 mx-1"/>
<div v-font:{size:12,color:`#323233`} class="w-[fit-content] "> <div v-font:{size:12,color:`#323233`} class="w-[fit-content] ">
{{ props.item.card_name }} {{ props.item.card_name }}
</div> </div>
...@@ -27,8 +27,8 @@ const props = defineProps({ ...@@ -27,8 +27,8 @@ const props = defineProps({
<div class="w-full h-full flex items-center"> <div class="w-full h-full flex items-center">
<div v-font:{size:14,color:`#323233`}>{{ props.item.dept }}</div> <div v-font:{size:14,color:`#323233`}>{{ props.item.dept }}</div>
<div v-show="props.item.sfzh " class="mx-1">|</div> <div v-show="props.item.sfzh " class="mx-1">|</div>
<div v-show="props.item.sfzh " v-font:{size:14,color:`#323233`}>{{ props.item.sfzh }}</div> <!-- <div v-show="props.item.sfzh " v-font:{size:14,color:`#323233`}>{{ props.item.sfzh }}</div>
<div v-show="props.item.phone" class="mx-1">|</div> <div v-show="props.item.phone" class="mx-1">|</div>-->
<div v-show="props.item.phone" v-font:{size:14,color:`#323233`}>{{ props.item.phone }}</div> <div v-show="props.item.phone" v-font:{size:14,color:`#323233`}>{{ props.item.phone }}</div>
</div> </div>
</div> </div>
......
...@@ -11,6 +11,7 @@ const props = defineProps({ ...@@ -11,6 +11,7 @@ const props = defineProps({
nmb: Boolean, nmb: Boolean,
}) })
import {showImagePreview} from 'vant'; import {showImagePreview} from 'vant';
import viewFiles from "@/components/viewFiles.vue";
const init = reactive({ const init = reactive({
team: { team: {
...@@ -53,121 +54,65 @@ function onClickLeft() { ...@@ -53,121 +54,65 @@ function onClickLeft() {
} }
} }
const viewFilesObj = reactive({
show: false,
fileItem: {}
})
function viewFeliFunction(fileItem) {
//查看附件方法
viewFilesObj.show = true
viewFilesObj.fileItem = fileItem
console.log("🚀🚀🚀,", viewFilesObj.fileItem)
}
onMounted(() => { onMounted(() => {
}) })
</script> </script>
<template> <template>
<div v-font:{color:`#515A6E`,size:18} class="w-full h-[calc(100%-116px)] overflow-y-auto "> <!-- 附件预览 -->
<div v-for="(item,index) in props.array" :key="index" :style="{marginTop:item.mt}" <van-popup v-model:show="viewFilesObj.show" :style="{ height: '85%'}" closeable position="bottom"
class="w-full h-auto bg-white"> round>
<div class=" w-full min-h-[50px] flex p-3 "> <div class="w-full h-full bg-white overflow-y-auto relative ">
<!--header-->
<!-- 标题--> <div class="w-full h-[50px] z-100 sticky top-0 ">
<div class="w-[30%] h-full flex items-center text-wrap box-border"> <div class="flex justify-between items-center w-full h-[50px]">
<span>{{ item.label }}</span> <div class="w-full h-full ccFlex text-[18px]">
附件预览
</div> </div>
<!-- 内容为文字-->
<div v-if="item.value" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">{{ item.value }}</span>
</div> </div>
<!-- 内容为图片-->
<div v-else-if="item.image" class="w-[70%] h-full flex items-center text-wrap box-border">
<div class=" w-full min-h-[80px] flex justify-start">
<div v-for="(ite,inde) in item.image" :key="inde"
class="m-1 w-[70px] h-[60px] border border-dashed border-gray-300"
@click="imagePreview(item.image,inde)">
<img :src="ite.path" class="w-full h-full">
</div> </div>
<!--content-->
<div class="w-full h-[calc(100%-114px)] z-40 pt-3 bg-[#F3F4F6] relative overflow-y-auto">
<viewFiles :fileObj="viewFilesObj.fileItem"/>
</div> </div>
<!--footer-->
<div
class="w-full h-[70px] px-3 flex justify-between items-center sticky bottom-0 border border-t-[1px] border-solid ">
<van-button class="w-full " native-type="submit" round @click="viewFilesObj.show = false">关闭
</van-button>
</div> </div>
<!-- 内容为星级-->
<div v-else-if="item.level" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">
<van-rate
v-model="item.level"
:count="5"
:size="25"
color="#FE9E0B"
readonly
void-color="#eee"
void-icon="star"
/>
</span>
</div> </div>
</van-popup>
<!-- 内容为标签-->
<div v-else-if="item.tag" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">
<van-tag size="large" type="success">
<span>
{{ item.tag }}
</span>
</van-tag>
</span>
</div>
<!-- 内容为时间线-->
<div v-else-if="item.record" class="w-[70%] h-full flex items-center text-wrap box-border">
<van-steps active="99" active-color="#07c160" class="ml-1 w-full" direction="vertical"
inactive-color="#07c160">
<van-step v-for="(ite,index) in item.record" :key="index">
<h3>【同行人】{{ ite.name }}</h3>
<p v-if="ite.position">职位:{{ ite.position }}</p>
<p v-if="ite.identity_num"> 身份证号:{{ ite.identity_num }}</p>
<p>手机号码:{{ ite.mobile }}</p>
<!-- <div v-for="(ite,inde) in [item.file_info]" :key="inde" @click="imagePreview([item.file_info],inde)"
class="m-1 w-[70px] h-[60px] border border-dashed border-gray-300">
<img :src="ite.path" class="w-full h-full">
</div>-->
</van-step>
</van-steps>
</div>
</div>
</div>
</div>
<div v-font:{color:`#515A6E`,size:18} class="w-full overflow-y-auto ">
<!-- <div class="w-screen h-screen bg-gray-100 box-border relative">
&lt;!&ndash; 顶部栏目 &ndash;&gt;
<div class="sticky top-0 w-full h-[46px] z-50">
<van-nav-bar
left-arrow
left-text="返回"
title="详情"
@click-left="onClickLeft"
>
<template #left>
<div class="w-[13%] text-gray-600 h-full flex
justify-center items-center text-[30px]" @click="onClickLeft">
<van-icon color="#4B5568" name="arrow-left"/>
</div>
</template>
</van-nav-bar>
</div>
content
<div v-font:{color:`#515A6E`,size:18} class="w-full h-[calc(100%-116px)] overflow-y-auto ">
<div v-for="(item,index) in props.array" :key="index" :style="{marginTop:item.mt}" <div v-for="(item,index) in props.array" :key="index" :style="{marginTop:item.mt}"
class="w-full h-auto bg-white"> class="w-full h-auto bg-white">
<div class=" w-full min-h-[50px] flex p-3 "> <div class=" w-full min-h-[50px] flex p-3 ">
&lt;!&ndash; 标题&ndash;&gt; <!-- 标题-->
<div class="w-[30%] h-full flex items-center text-wrap box-border"> <div class="w-[30%] h-full flex items-center text-wrap box-border">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
</div> </div>
&lt;!&ndash; 内容为文字&ndash;&gt; <!-- 内容为文字-->
<div v-if="item.value" class="w-[70%] h-full flex items-center text-wrap box-border"> <div v-if="item.value" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">{{ item.value }}</span> <span class="ml-1">{{ item.value }}</span>
</div> </div>
&lt;!&ndash; 内容为图片&ndash;&gt; <!-- 内容为图片-->
<div v-else-if="item.image" class="w-[70%] h-full flex items-center text-wrap box-border"> <div v-else-if="item.image" class="w-[70%] h-full flex items-center text-wrap box-border">
<div class=" w-full min-h-[80px] flex justify-start"> <div class=" w-full min-h-[80px] flex justify-start">
<div v-for="(ite,inde) in item.image" :key="inde" <div v-for="(ite,inde) in item.image" :key="inde"
...@@ -178,7 +123,7 @@ onMounted(() => { ...@@ -178,7 +123,7 @@ onMounted(() => {
</div> </div>
</div> </div>
&lt;!&ndash; 内容为星级&ndash;&gt; <!-- 内容为星级-->
<div v-else-if="item.level" class="w-[70%] h-full flex items-center text-wrap box-border"> <div v-else-if="item.level" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1"> <span class="ml-1">
<van-rate <van-rate
...@@ -193,7 +138,7 @@ onMounted(() => { ...@@ -193,7 +138,7 @@ onMounted(() => {
</span> </span>
</div> </div>
&lt;!&ndash; 内容为标签&ndash;&gt; <!-- 内容为标签-->
<div v-else-if="item.tag" class="w-[70%] h-full flex items-center text-wrap box-border"> <div v-else-if="item.tag" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1"> <span class="ml-1">
<van-tag size="large" type="success"> <van-tag size="large" type="success">
...@@ -204,7 +149,7 @@ onMounted(() => { ...@@ -204,7 +149,7 @@ onMounted(() => {
</span> </span>
</div> </div>
&lt;!&ndash; 内容为时间线&ndash;&gt; <!-- 内容为时间线-->
<div v-else-if="item.record" class="w-[70%] h-full flex items-center text-wrap box-border"> <div v-else-if="item.record" class="w-[70%] h-full flex items-center text-wrap box-border">
<van-steps active="99" active-color="#07c160" class="ml-1 w-full" direction="vertical" <van-steps active="99" active-color="#07c160" class="ml-1 w-full" direction="vertical"
inactive-color="#07c160"> inactive-color="#07c160">
...@@ -213,21 +158,22 @@ onMounted(() => { ...@@ -213,21 +158,22 @@ onMounted(() => {
<p v-if="ite.position">职位:{{ ite.position }}</p> <p v-if="ite.position">职位:{{ ite.position }}</p>
<p v-if="ite.identity_num"> 身份证号:{{ ite.identity_num }}</p> <p v-if="ite.identity_num"> 身份证号:{{ ite.identity_num }}</p>
<p>手机号码:{{ ite.mobile }}</p> <p>手机号码:{{ ite.mobile }}</p>
&lt;!&ndash; <div v-for="(ite,inde) in [item.file_info]" :key="inde" @click="imagePreview([item.file_info],inde)"
class="m-1 w-[70px] h-[60px] border border-dashed border-gray-300">
<img :src="ite.path" class="w-full h-full">
</div>&ndash;&gt;
</van-step> </van-step>
</van-steps> </van-steps>
</div> </div>
<!-- 内容为附件-->
<div v-else-if="item.files" class="w-[70%] h-full flex flex-wrap items-center text-wrap box-border">
<span @click="viewFeliFunction(ite)" class="ml-1 " v-for="(ite,index) in item.files" :key="index">
<a>
{{ ite.file_name }}
</a>
</span>
</div> </div>
</div> </div>
</div> </div>
<div class=" w-full h-[70px] z-50 flex justify-between items-center p-2 shadow shadow-gray-600">
<slot name="default"></slot>
</div> </div>
</div>-->
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -14,6 +14,7 @@ import teacherMember from '@/components/card/people/teacherMember.vue' ...@@ -14,6 +14,7 @@ import teacherMember from '@/components/card/people/teacherMember.vue'
import teamPeopleStudentListCard from '@/components/card/people/teamPeopleStudentListCard.vue' import teamPeopleStudentListCard from '@/components/card/people/teamPeopleStudentListCard.vue'
import teamPeopleGuideTeacherCard from '@/components/card/people/teamPeopleGuideTeacherCard.vue' import teamPeopleGuideTeacherCard from '@/components/card/people/teamPeopleGuideTeacherCard.vue'
import teamPeopleContestantTeacherCard from '@/components/card/people/teamPeopleContestantTeacherCard.vue' import teamPeopleContestantTeacherCard from '@/components/card/people/teamPeopleContestantTeacherCard.vue'
import viewFiles from '@/components/viewFiles.vue'
export function useComponents(app) { export function useComponents(app) {
...@@ -35,4 +36,7 @@ export function useComponents(app) { ...@@ -35,4 +36,7 @@ export function useComponents(app) {
app.component('teamPeopleStudentListCard', teamPeopleStudentListCard) app.component('teamPeopleStudentListCard', teamPeopleStudentListCard)
app.component('teamPeopleGuideTeacherCard', teamPeopleGuideTeacherCard) app.component('teamPeopleGuideTeacherCard', teamPeopleGuideTeacherCard)
app.component('teamPeopleContestantTeacherCard', teamPeopleContestantTeacherCard) app.component('teamPeopleContestantTeacherCard', teamPeopleContestantTeacherCard)
app.component('viewFiles', viewFiles)
} }
...@@ -71,10 +71,17 @@ onMounted(() => { ...@@ -71,10 +71,17 @@ onMounted(() => {
<template> <template>
<div class=" flex items-center w-full h-[50px] rounded-[8px] "> <div class=" flex items-center w-full h-[50px] rounded-[8px] ">
<div class="w-1/2 h-full mt-1 ml-1"> <!-- <div class="w-1/2 h-full mt-1 ml-1">
<div @click="back" style="background: white" class="child flex justify-center items-center"> <div @click="back" style="background: white" class="child flex justify-center items-center">
<van-icon style="font-size: 30px;font-weight: bold" name="wap-home-o"/> <van-icon style="font-size: 30px;font-weight: bold" name="wap-home-o"/>
</div> </div>
</div>-->
<div class="w-1/2 mt-1 ml-1 h-[50px] ">
<div class=" flex w-12 bg-white h-full justify-center items-center text-[18px] text-[#323233]"
style="height: 50px;border-radius: 8px"
@click="back">
<van-icon name="wap-home-o"/>
</div>
</div> </div>
<div @click="init.userInfo.show = true" class="w-1/2 h-full flex justify-end items-center"> <div @click="init.userInfo.show = true" class="w-1/2 h-full flex justify-end items-center">
<div class="mx-2"> <div class="mx-2">
......
<template>
<div class="file-preview">
<!-- <div v-if="renderedLoading" style="width: 100%; height: 100%;">
<Spin fix>
<span style="font-size: 24px;">加载中...</span>
</Spin>
</div> -->
<div style="height: 100%;">
<template v-if="errorShow">
<van-empty>
<template #description>
<p>加载失败,请尝试下载预览</p>
</template>
</van-empty>
</template>
<!-- word文件预览 -->
<vue-office-docx v-if="previewType == 'docx'" v-show="!renderedLoading" :src="fileObj.path"
:style="{ height: '100%', }" @rendered="rendered"/>
<!-- excel文件预览 -->
<vue-office-excel v-if="previewType == 'excel'" v-show="!renderedLoading" :src="fileObj.path"
:style="{ height: 'calc(100vh - 80px)', }" @rendered="rendered" @error="errorHandler"/>
<!-- pdf文件预览 -->
<div v-if="previewType == 'pdf'">
<!-- <object @load="rendered" :data="fileObj.path" type="application/pdf" width="100%"
style="height: calc(100vh - 80px);">
<p>抱歉,您的浏览器不支持在页面中显示 PDF 文件。</p>
</object>
-->
<vue-office-pdf v-show="!renderedLoading" :src="fileObj.path" @rendered="rendered"
@error="errorHandler" :style="{ height: 'calc(100vh - 80px)', }"/>
</div>
<!-- 视频文件预览 -->
<div v-if="previewType == 'video'"
style="display: flex; flex-direction: column; align-items: center; justify-content: center;">
<div style="margin-bottom: 10px; font-size: 20px; color: #000; ">{{ fileObj.file_name }}</div>
<video :src="fileObj.path" controls @loadeddata="rendered" style="width: 80%; ">
<p>抱歉,您的浏览器不支持视频标签。</p>
</video>
</div>
<!-- 音频文件预览 -->
<div v-if="previewType == 'audio'"
style="display: flex; flex-direction: column; align-items: center; justify-content: center;">
<div style="margin-bottom: 10px; font-size: 20px; color: #000; ">{{ fileObj.file_name }}</div>
<audio :src="fileObj.path" controls @loadeddata="rendered">
<p>抱歉,您的浏览器不支持音频标签。</p>
</audio>
</div>
<!-- 图片文件预览 -->
<div v-if="previewType == 'image'" @click="viewImage(fileObj.path)"
style="display: flex; flex-direction: column; align-items: center; justify-content: center;">
<img :src="fileObj.path" alt="" style="max-width: 100%; max-height: 100%; " @load="rendered">
</div>
<!-- txt文件预览 -->
<div v-if="previewType == 'txt'" style="height: 100%;">
<iframe :src="fileObj.path" width="100%" height="100%" @load="rendered">
<p>抱歉,您的浏览器不支持在页面中显示 txt 文件。</p>
</iframe>
</div>
<!-- 自定义文件预览 -->
<div v-if="previewType == 'custom'">
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center;">
<!-- <div style="margin-bottom: 10px; font-size: 20px; color: #000; ">{{ fileObj.file_name }}</div> -->
<a style="margin-bottom: 10px; font-size: 20px;"
@click="clickDownload(fileObj.path, fileObj.file_name)">{{ fileObj.file_name }}</a>
<p>抱歉,暂不支持预览该类型文件,请点击下载后自行预览。</p>
</div>
</div>
</div>
</div>
</template>
<script>
//引入VueOfficeDocx组件 及 相关样式
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'
//引入VueOfficeExcel组件 及 相关样式
import VueOfficeExcel from '@vue-office/excel'
import '@vue-office/excel/lib/index.css'
import VueOfficePdf from '@vue-office/pdf'
import {ImagePreview} from 'vant';
export default {
name: 'filePreview',
components: {
VueOfficeDocx, //预览docx文件
VueOfficeExcel, //预览excel文件
VueOfficePdf, //预览pdf文件
},
props: {
fileObj: {
type: Object,
default: () => {
return {}
}
},
},
data() {
return {
src: 'http://static.shanhuxueyuan.com/test6.docx',
renderedLoading: true,
previewType: '',
errorShow: false
}
},
mounted() {
console.log("fileObj1111111", this.fileObj)
this.previewType = this.getPreviewType()
// this.previewType = 'txt'
},
methods: {
getPreviewType() {
//根据文件后缀名判断文件类型
let fileExt = this.fileObj.file_name.split('.').pop()
let type = ''
switch (fileExt) {
case 'doc':
case 'docx':
type = 'docx'
break;
case 'xls':
case 'xlsx':
type = 'excel'
break;
case 'ppt':
case 'pptx':
type = 'ppt'
break;
case 'pdf':
type = 'pdf'
break;
case 'jpg':
case 'jpeg':
case 'png':
case 'gif':
type = 'image'
break;
// case 'zip':
// case 'rar':
// case '7z':
// type = 'zip'
// break;
//视频文件
case 'mp4':
case 'ogg':
case 'webm':
type = 'video'
break;
//音频文件
case 'mp3':
case 'wav':
// case 'ogg':
type = 'audio'
break
//txt文件
case 'txt':
type = 'txt'
break
default:
type = 'custom'
this.renderedLoading = false
break;
}
return type
},
rendered() {
console.log("渲染完成", this.fileObj)
this.renderedLoading = false
},
errorHandler(e) {
console.log("渲染失败", e)
this.errorShow = true
},
//文件下载
clickDownload(path, file_name) {
const link = document.createElement('a');
link.href = path; // 替换为文件的实际路径
link.download = file_name; // 替换为要下载的文件名和扩展名
link.target = '_blank';
link.dispatchEvent(new MouseEvent('click'));
},
viewImage(src) {
ImagePreview([src]);
}
},
}
</script>
<style lang="less" scoped>
.file-preview {
height: 100%;
}
</style>
...@@ -80,9 +80,17 @@ class ConfigDict { ...@@ -80,9 +80,17 @@ class ConfigDict {
'1': '运行中', '1': '运行中',
'2': '已结束', '2': '已结束',
} }
// 操作类型0-待办 1-发送,2-退回,3-驳回,4-结束,5-退回到发起人
this.flowActionType = { this.flowActionType = {
/* '1': 'fs',
'2': 'th',
'4': 'js',
'5': 'qx',
'6': 'tzfqr',*/
'0': 'fs',
'1': 'fs', '1': 'fs',
'2': 'th', '2': 'th',
'3': 'js',
'4': 'js', '4': 'js',
'5': 'qx', '5': 'qx',
'6': 'tzfqr', '6': 'tzfqr',
......
...@@ -271,6 +271,11 @@ const addTeamPeople = reactive({ ...@@ -271,6 +271,11 @@ const addTeamPeople = reactive({
} }
}) })
function back() {
//返回上级
router.back();
}
function onConfirm_academicInstitution(value) { function onConfirm_academicInstitution(value) {
//教学单位 //教学单位
const info = value.selectedOptions[0]; const info = value.selectedOptions[0];
...@@ -374,7 +379,7 @@ function onSubmit(strategyKey) { ...@@ -374,7 +379,7 @@ function onSubmit(strategyKey) {
if (init.formData.files_list.find(cur => cur.module === 'Project')) { if (init.formData.files_list.find(cur => cur.module === 'Project')) {
if (init.formData.competition_sign.is_specialist == 1 && init.formData.files_list.find(cur => cur.module === 'SupportingMaterial')) { if (init.formData.competition_sign.is_specialist == 1 && init.formData.files_list.find(cur => cur.module === 'SupportingMaterial') || init.formData.competition_sign.is_specialist == 0) {
hooks.myEncapsulationFunction(() => { hooks.myEncapsulationFunction(() => {
return api.postApiFlowApiFlowFlowSignSubmit({ return api.postApiFlowApiFlowFlowSignSubmit({
"flowid": "102", "flowid": "102",
...@@ -1383,7 +1388,7 @@ onMounted(() => { ...@@ -1383,7 +1388,7 @@ onMounted(() => {
</van-popup> </van-popup>
<!--学生赛事申请--> <!--学生赛事报名-->
<div class="w-screen h-screen"> <div class="w-screen h-screen">
<div class="w-full h-[calc(100%-70px)] bg-gray-100 overflow-y-auto relative "> <div class="w-full h-[calc(100%-70px)] bg-gray-100 overflow-y-auto relative ">
<!-- all header--> <!-- all header-->
...@@ -1394,7 +1399,7 @@ onMounted(() => { ...@@ -1394,7 +1399,7 @@ onMounted(() => {
<van-icon class="" name="arrow-left"/> <van-icon class="" name="arrow-left"/>
</div> </div>
<div class=" w-[87%] h-full flex items-center justify-center"> <div class=" w-[87%] h-full flex items-center justify-center">
<span class="mr-8 text-[18px]">学生赛事申请</span> <span class="mr-8 text-[18px]">学生赛事报名</span>
</div> </div>
</div> </div>
......
...@@ -134,10 +134,6 @@ const init = reactive({ ...@@ -134,10 +134,6 @@ const init = reactive({
value: '1', value: '1',
text: '参赛教师' text: '参赛教师'
}, },
{
value: '2',
text: '参赛学生'
},
], ],
value: '0' value: '0'
}, },
...@@ -176,7 +172,7 @@ const init = reactive({ ...@@ -176,7 +172,7 @@ const init = reactive({
show: false, show: false,
}, },
paramsCode: { paramsCode: {
competition_method: 0, competition_method: 1,
competitionbatch_id: '', competitionbatch_id: '',
condition: '', condition: '',
page_index: 1, page_index: 1,
...@@ -206,7 +202,7 @@ const init = reactive({ ...@@ -206,7 +202,7 @@ const init = reactive({
}, },
formData: { formData: {
"changecommitid": "", "changecommitid": "",
"flowid": "102", "flowid": "110",
"module_id": "", "module_id": "",
"module": "CompetitionSign", "module": "CompetitionSign",
"certificate": '', "certificate": '',
...@@ -242,14 +238,14 @@ const init = reactive({ ...@@ -242,14 +238,14 @@ const init = reactive({
"approval_remark": "", "approval_remark": "",
"competitionreportid": "", "competitionreportid": "",
"sign_name": "", "sign_name": "",
"competition_method": 0, "competition_method": 1,
"competitionbatch_id": "", "competitionbatch_id": "",
"competitionbatch_name": "", "competitionbatch_name": "",
"is_del": 0, "is_del": 0,
"createby": "", "createby": "",
"create_name": "", "create_name": "",
"course": "", "course": "",
"is_specialist": 0
}, },
}, },
}) })
...@@ -271,6 +267,11 @@ const addTeamPeople = reactive({ ...@@ -271,6 +267,11 @@ const addTeamPeople = reactive({
} }
}) })
function back() {
//返回上级
router.back();
}
function onConfirm_academicInstitution(value) { function onConfirm_academicInstitution(value) {
//教学单位 //教学单位
const info = value.selectedOptions[0]; const info = value.selectedOptions[0];
...@@ -371,13 +372,11 @@ function onSubmit(strategyKey) { ...@@ -371,13 +372,11 @@ function onSubmit(strategyKey) {
}) })
}, },
'signForm': function () { 'signForm': function () {
//提交报名表单
if (init.formData.files_list.find(cur => cur.module === 'Project')) { if (init.formData.files_list.find(cur => cur.module === 'Project')) {
if (init.formData.competition_sign.is_specialist == 1 && init.formData.files_list.find(cur => cur.module === 'SupportingMaterial')) {
hooks.myEncapsulationFunction(() => { hooks.myEncapsulationFunction(() => {
return api.postApiFlowApiFlowFlowSignSubmit({ return api.postApiFlowApiFlowFlowSignSubmit({
"flowid": "102", "flowid": "110",
"runid": "", "runid": "",
"module_id": init.formData.module_id, "module_id": init.formData.module_id,
"module": "CompetitionSign", "module": "CompetitionSign",
...@@ -393,11 +392,6 @@ function onSubmit(strategyKey) { ...@@ -393,11 +392,6 @@ function onSubmit(strategyKey) {
return res return res
}) })
}) })
} else {
showSuccessToast({
message: '邀请专家,需上传专家佐证材料'
})
}
} else { } else {
showSuccessToast({ showSuccessToast({
message: '请上传培训方案' message: '请上传培训方案'
...@@ -1383,7 +1377,7 @@ onMounted(() => { ...@@ -1383,7 +1377,7 @@ onMounted(() => {
</van-popup> </van-popup>
<!--学生赛事申请--> <!--教师赛事报名-->
<div class="w-screen h-screen"> <div class="w-screen h-screen">
<div class="w-full h-[calc(100%-70px)] bg-gray-100 overflow-y-auto relative "> <div class="w-full h-[calc(100%-70px)] bg-gray-100 overflow-y-auto relative ">
<!-- all header--> <!-- all header-->
...@@ -1394,15 +1388,13 @@ onMounted(() => { ...@@ -1394,15 +1388,13 @@ onMounted(() => {
<van-icon class="" name="arrow-left"/> <van-icon class="" name="arrow-left"/>
</div> </div>
<div class=" w-[87%] h-full flex items-center justify-center"> <div class=" w-[87%] h-full flex items-center justify-center">
<span class="mr-8 text-[18px]">学生赛事申请</span> <span class="mr-8 text-[18px]">教师赛事报名</span>
</div> </div>
</div> </div>
<div class="w-full h-[63px] border-solid border-[1px] border-gray-50"> <div class="w-full h-[63px] border-solid border-[1px] border-gray-50">
<van-steps :active="init.active.value" active-icon="circle" finish-icon="success" inactive-icon="circle"> <van-steps :active="init.active.value" active-icon="circle" finish-icon="success" inactive-icon="circle">
<van-step>基础信息</van-step> <van-step>基础信息</van-step>
<!-- -->
<van-step v-if="init.formData.competition_sign.is_specialist == 1">专家信息</van-step>
<van-step>团队信息</van-step> <van-step>团队信息</van-step>
</van-steps> </van-steps>
</div> </div>
...@@ -1584,42 +1576,13 @@ onMounted(() => { ...@@ -1584,42 +1576,13 @@ onMounted(() => {
placeholder="请输入计划培训量" placeholder="请输入计划培训量"
required required
/> />
<!--关联课程-->
<van-field
v-model="init.formData.competition_sign.course"
:rules="[{ required: true, message: '请输入关联课程' }]"
clickable
label="关联课程"
name="sponsor"
placeholder="请输入关联课程"
required
/>
</van-cell-group>
<van-cell-group class="mt-3">
<!--是否邀请专家-->
<van-field
label="是否邀请专家"
placeholder="是否邀请专家"
show-word-limit
>
<template #input>
<Switch v-model="init.formData.competition_sign.is_specialist" :false-value="0" :true-value="1"
size="large">
<template #open>
<span>是</span>
</template>
<template #close>
<span>否</span>
</template>
</Switch>
</template>
</van-field>
</van-cell-group> </van-cell-group>
<van-cell-group class="mt-3"> <van-cell-group class="mt-3">
<!-- 培训方案 --> <!-- 培训方案 -->
<van-field label="培训方案" name="uploader"> <van-field required label="培训方案" name="uploader">
<template #input> <template #input>
<!-- vant 拍照--> <!-- vant 拍照-->
<van-uploader <van-uploader
...@@ -1681,27 +1644,6 @@ onMounted(() => { ...@@ -1681,27 +1644,6 @@ onMounted(() => {
</van-uploader> </van-uploader>
</template> </template>
</van-field> </van-field>
<!-- 佐证材料(附件) -->
<van-field label="佐证材料(附件)" name="uploader">
<template #input>
<!-- vant 拍照-->
<van-uploader
:before-read="beforeReadSupportingMaterial"
accept=""
max-size="50000000"
@delete="deleteImage"
>
<template #default>
<div class="curs">
<van-icon color="#DCDEE0" name="plus" size="30"/>
</div>
</template>
<template #preview-cover="{ file }">
<div class="preview-cover van-ellipsis">{{ file.name }}</div>
</template>
</van-uploader>
</template>
</van-field>
</van-cell-group> </van-cell-group>
<!--附件回显--> <!--附件回显-->
<van-field <van-field
...@@ -1713,6 +1655,7 @@ onMounted(() => { ...@@ -1713,6 +1655,7 @@ onMounted(() => {
> >
<template #input> <template #input>
<div style="display: flex;justify-content: space-between;width: 100%;"> <div style="display: flex;justify-content: space-between;width: 100%;">
<!-- 图片-->
<!-- <van-image <!-- <van-image
:src="url + item.show_file_path" :src="url + item.show_file_path"
class="fileStyle" class="fileStyle"
...@@ -1810,8 +1753,7 @@ onMounted(() => { ...@@ -1810,8 +1753,7 @@ onMounted(() => {
</div> </div>
<p>(指导教师<span <p>(指导教师<span
v-font:{color:`#369CEF`}>{{ item.guide_teacher_list.length }}</span>位,参赛教师<span v-font:{color:`#369CEF`}>{{ item.guide_teacher_list.length }}</span>位,参赛教师<span
v-font:{color:`#369CEF`}>{{ item.contestant_teacher_list.length }}</span>位,参赛学生<span v-font:{color:`#369CEF`}>{{ item.contestant_teacher_list.length }}</span>位)</p>
v-font:{color:`#369CEF`}>{{ item.student_list.length }}</span>位)</p>
</div> </div>
</template> </template>
<template #right-icon> <template #right-icon>
...@@ -1895,6 +1837,7 @@ onMounted(() => { ...@@ -1895,6 +1837,7 @@ onMounted(() => {
</div> </div>
<!-- all footer --> <!-- all footer -->
<!-- 基础信息-->
<div v-if="init.active.value === '0'" <div v-if="init.active.value === '0'"
class="w-full h-[70px] flex items-center justify-between p-3 shadow-gray-600 shadow"> class="w-full h-[70px] flex items-center justify-between p-3 shadow-gray-600 shadow">
<van-button class="w-[28%] " plain round type="primary" @click="save">保存</van-button> <van-button class="w-[28%] " plain round type="primary" @click="save">保存</van-button>
...@@ -1908,12 +1851,14 @@ onMounted(() => { ...@@ -1908,12 +1851,14 @@ onMounted(() => {
}">下一步 }">下一步
</van-button> </van-button>
</div> </div>
<!-- 专家信息-->
<div v-if="init.active.value === '1'" <div v-if="init.active.value === '1'"
class="w-full h-[70px] flex items-center justify-between p-3 shadow-gray-600 shadow"> class="w-full h-[70px] flex items-center justify-between p-3 shadow-gray-600 shadow">
<van-button class="w-[32%] " plain round type="primary" @click="save">保存</van-button> <van-button class="w-[32%] " plain round type="primary" @click="save">保存</van-button>
<van-button class="w-[32%] " plain round type="primary" @click="init.active.value = '0'">上一步</van-button> <van-button class="w-[32%] " plain round type="primary" @click="init.active.value = '0'">上一步</van-button>
<van-button class="w-[32%] " round type="primary" @click="init.active.value = '2'">下一步</van-button> <van-button class="w-[32%] " round type="primary" @click="init.active.value = '2'">下一步</van-button>
</div> </div>
<!-- 团队信息-->
<div v-if="init.active.value === '2'" <div v-if="init.active.value === '2'"
class="w-full h-[70px] flex items-center justify-between p-3 shadow-gray-600 shadow"> class="w-full h-[70px] flex items-center justify-between p-3 shadow-gray-600 shadow">
<van-button class="w-[32%] " plain round type="primary" @click="save">保存</van-button> <van-button class="w-[32%] " plain round type="primary" @click="save">保存</van-button>
......
<!--活动数据-->
<!--dtCard 三种值 value、tag、image-->
<script setup>
import {onMounted, defineEmits, defineProps, getCurrentInstance, reactive, nextTick, ref} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {showNotify} from "vant";
import {useRouter} from "vue-router";
import router from "@/router/index.js";
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
const competitionFormInfo = useCompetitionFormInfo()
const offset = ref({x: 0, y: 400})
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
runid: {
type: String
},
flowid: {
type: String
},
showButton: {
type: Boolean,
}
})
const emit = defineEmits(['getInitObject'])
const init = reactive({
info: {},
key: {
show: false,
src: '',
},
data: {
keys: [
//决定插入数据顺序
],
respObject: {},
values: [],
},
array: [
//处理完的完整数组
]
})
class CommonDetailsRequest {
/*
* 详情请求对象
**/
constructor(runid) {
this.runid = runid
}
11() {
}
}
function getData() {
hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowInfo({runid: props.runid}).then(res => {
//获取流程信息
let info = res.response.competition_report
competitionFormInfo.setFormData(info)
init.array = [
{label: '赛事名称', value: info.competitionname, mt: '10px'},
{label: '赛事编号', value: info.competitionname,},
{label: '赛项名称', value: info.competitionname,},
{label: '主办单位', value: info.competitionname,},
{label: '赛事级别', value: info.competitionname,},
{label: '赛事类别', value: info.competitionname,},
{label: '竞赛形式', value: info.competitionname,},
{label: '比赛开始时间', value: info.competitionname,},
{label: '比赛结束时间', value: info.competitionname,},
{label: '经费预算', value: info.competitionname,},
{label: '计划培训课时', value: info.competitionname,},
{label: '关联课程', value: info.competitionname,},
{label: '是否邀请专家', value: info.competitionname,},
]
})
}, true, '加载中...')
}
onMounted(() => {
getData()
})
</script>
<template>
<div class="
w-full
h-full
flex content-start
flex-wrap
bg-[#F5F6F8]
">
<publicDetails :array="init.array"/>
</div>
</template>
<style scoped>
</style>
<!--活动详情 钥匙-->
<template>
<div class="
h-full
w-full
flex content-start
flex-wrap
bg-[#F5F6F8]
px-2
py-2
justify-center
">
<specialistCard v-for="(item,index) in init.array" :key="index" :item="item"></specialistCard>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
const competitionFormInfo = useCompetitionFormInfo()
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
id: {
type: String
},
})
const init = reactive({
data: {
initDataKeys: [
//决定插入数据顺序
],
values: [],
title: [],
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
/* hooks.myEncapsulationFunction(() => {
api.getApiExpertGetExpertTrackList({
sign_id: competitionFormInfo.getFormData().competitionsignid,
}).then(res => {
if (res.response) {
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
}
})
}, true, '加载中...')*/
}
onMounted(() => {
getData()
})
</script>
<style scoped>
</style>
<!--活动详情 钥匙-->
<template>
<div
class="
w-full
h-full
flex content-start
flex-wrap
bg-[#F5F6F8]
py-2
justify-center
">
<van-collapse ref="collapse" v-model="activeNames" class="w-full bg-[#F5F6F8]">
<van-collapse-item v-for="(item,index) in [...init.array,...init.array]" :key="index" :name="index"
title="标题1"
@click.stop="collapseChange">
<template #title>
<div v-font:{color:`#323233`,size:14} class="w-full min-h-[50px] ">
<div class="w-full flex items-center">
<div class="w-[2px] h-[15px] mr-1 bg-[#1989fa]"></div>
<h2 v-font:{size:16,color:`#323233`} class="font-black">这是团队名称-1组</h2>
</div>
<p>(指导教师<span v-font:{color:`#369CEF`}>2</span>位,参赛教师<span v-font:{color:`#369CEF`}>2</span>位,参赛学生<span
v-font:{color:`#369CEF`}>2</span>位)</p>
</div>
</template>
<template #right-icon>
<!-- 展开/收缩单个折叠板使用-->
<!-- <img v-if="activeNames.includes(index)" :src="hooks.getImage('xs')" width="40" height="40"/>
<img v-else :src="hooks.getImage('xs')" class="rotate-180" height="40"
width="40"/>-->
<!-- 展开/收缩所有折叠板使用-->
<img v-if="init.collapse.flag" :src="hooks.getImage('xs')" height="40" width="40"/>
<img v-else :src="hooks.getImage('xs')" class="rotate-180" height="40"
width="40"/>
</template>
<template #default>
<div class="
bg-[#F5F6F8]
w-full
px-2"
@click.stop>
<RadioGroup v-model="init.radio.value" class="mt-4 mb-2">
<Radio v-for="item in init.radio.columns" :key="item.value" :label="item.value" border>{{ item.text }}
</Radio>
</RadioGroup>
<teamPeopleCard v-for="(item,index) in init.array" :key="index" :item="item"></teamPeopleCard>
</div>
</template>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive, ref} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
import {Radio, RadioGroup} from "view-ui-plus";
const competitionFormInfo = useCompetitionFormInfo()
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
id: {
type: String
},
})
const activeNames = ref(['1']);
const init = reactive({
collapse: {
flag: false,
},
radio: {
columns: [
{
value: '0',
text: '指导教师'
},
{
value: '1',
text: '参赛教师'
},
{
value: '2',
text: '参赛学生'
},
],
value: '0'
},
data: {
initDataKeys: [
//决定插入数据顺序
],
values: [],
title: [],
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
const collapse = ref()
function collapseChange() {
//折叠板变化 全部展开/收起
init.collapse.flag = !init.collapse.flag
if (init.collapse.flag) {
collapse.value.toggleAll(true)
} else {
collapse.value.toggleAll(false)
}
}
function getData() {
//初始化数据
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
/* hooks.myEncapsulationFunction(() => {
api.getApiExpertGetExpertTrackList({
sign_id: competitionFormInfo.getFormData().competitionsignid,
}).then(res => {
if (res.response) {
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
}
})
}, true, '加载中...')*/
}
onMounted(() => {
getData()
})
</script>
<style lang="less" scoped>
/deep/ .van-collapse-item__content {
padding: 0 !important;
color: var(--van-collapse-item-content-text-color);
font-size: var(--van-collapse-item-content-font-size);
line-height: var(--van-collapse-item-content-line-height);
background: var(--van-collapse-item-content-background);
}
/deep/ .ivu-radio {
display: none;
margin-right: 4px;
white-space: nowrap;
position: relative;
line-height: 1;
vertical-align: middle;
cursor: pointer;
}
/deep/ .ivu-radio-wrapper-checked.ivu-radio-border {
border-color: #2d8cf0;
color: #2d8cf0;
border: 1px solid #2d8cf0;
border-radius: 20px;
}
/deep/ .ivu-radio-border {
border: 1px solid #dcdee2;
border-radius: 20px;
height: 32px;
line-height: 30px;
padding: 0 15px;
transition: border .2s ease-in-out;
}
/deep/ .ivu-radio-wrapper {
font-size: 14px;
vertical-align: middle;
display: inline-block;
position: relative;
white-space: nowrap;
margin-right: 8px;
cursor: pointer;
background-color: white;
}
</style>
<!--轨迹-->
<template>
<div class="bg-[#F5F6F8] w-full h-[10px]"></div>
<div
class="
w-full
h-full
flex content-start
flex-wrap
bg-white
">
<van-steps :active="0" class="w-full" direction="vertical">
<van-step v-for="(item,index) in init.array " :key="index" class="ax ">
<h2 v-font:{color:`#323233`,size:18}>{{ item.node_name }}</h2>
<p>用户名:<span v-font:{color:`#5295FF`}>{{ item.name }}</span></p>
<p>审批动作:<span v-font:{color:`#5295FF`}>{{ item.action_name }}</span></p>
<p>审批意见:<span>{{ item.comment }}</span></p>
<p>处理时间:<span>{{ item.approver_time }}</span></p>
<p>耗时时间:<span>{{ item.elapsed_time }}</span></p>
</van-step>
</van-steps>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
id: {
type: String
},
})
const init = reactive({
data: {
initDataKesy: [
//决定插入数据顺序
],
values: [],
title: []
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowLogList({form_id: props.id}).then(res => {
if (res.response) {
//获取处理完的数组
// init.array = res.response
init.array = [
{
"logid": "886f1772-0671-4ac2-83fe-d15174e31daf",
"run_id": "39f9879a-d458-449f-95bc-9fa99c996d64",
"node_name": "二级学院",
"action_name": "发送",
"comment": "审批通过",
"createby": "syjs516",
"approver_time": "2024-08-02 09:47:37",
"elapsed_time": "00时04分24秒",
"name": "asc666"
},
{
"logid": "7c4891e1-7fa4-47f0-b72d-47b96f2eb6fb",
"run_id": "39f9879a-d458-449f-95bc-9fa99c996d64",
"node_name": "学校审批",
"action_name": "发送",
"comment": "审批通过",
"createby": "asc666",
"approver_time": "2024-08-02 09:47:44",
"elapsed_time": "00时00分06秒",
"name": "asc666"
}
]
}
})
}, true, '加载中...')
}
onMounted(() => {
getData()
})
</script>
<style scoped lang="less">
/deep/ .van-step--vertical .van-step__circle-container {
position: absolute;
top: 19px;
left: -15px;
z-index: 1;
line-height: 1;
transform: translate(-50%, -50%);
font-size: 18px;
}
/deep/ .van-step--vertical {
display: block;
font-size: 16px;
float: none;
padding: 10px 10px 10px 0;
line-height: var(--van-line-height-sm);
}
.ax {
/deep/ .van-step__title--active, .van-step__icon--finish, .van-step__title--finish {
color: #808695;
}
}
</style>
<!--
赛事目录申请 详情界面
-->
<template>
<div class="container1 ">
<!-- content-->
<div class="w-screen h-[calc(100vh)] overflow-y-auto relative">
<!--header-->
<div class="w-full h-[108px] bg-white z-50 sticky top-0">
<div class="w-full h-[54px] flex">
<div class="w-[13%] bg-white h-full text-[28px] text-gray-400 flex items-center justify-center" @click="back">
<van-icon class="" name="arrow-left"/>
</div>
<div v-font:{color:`#323233`,size:18}
class="w-[87%] h-full ccFlex pr-4 text-nowrap overflow-hidden overflow-ellipsis">
<!-- <van-text-ellipsis content="赛事名称赛事名称赛事名称赛事名称赛事名称"/>-->
查看信息
</div>
</div>
<div class="w-full h-[54px]">
<van-tabs v-model:active="active" swipeable @change="tabChange">
<van-tab v-for="(item,index) in tabArray" :key="index" :title="item.text"/>
</van-tabs>
</div>
</div>
<!--content_content-->
<div class="w-full min-h-[calc(100%-108px)] overflow-y-auto">
<activityData
v-if="active === 0"
:flowid="init.formData.flowid"
:runid="init.formData.runid"
:showButton="init.formData.show"
@getInitObject="getInitObject"
/>
<teamInfo v-if="active ===1" :id="init.formData.runid"/>
<specialistInfo v-if="active ===2" :id="init.formData.runid" :activityPeopleCard="activityPeopleCard"/>
<trackList v-if="active ===3" :id="init.formData.runid"/>
</div>
<!-- <div class="w-full h-[108px] bg-red-400"></div>-->
</div>
</div>
</template>
<script setup>
import {getCurrentInstance, reactive, defineAsyncComponent, ref, onMounted, provide, inject, nextTick} from "vue";
import * as hooks from '@/hooks/index.js'
import router from "@/router/index.js";
import route from '@/router/routes.js'
const trackList = defineAsyncComponent(() => import('./components/track.vue'))
const activityData = defineAsyncComponent(() => import('./components/activityData.vue'))
const specialistInfo = defineAsyncComponent(() => import('./components/specialistInfo.vue'))
const teamInfo = defineAsyncComponent(() => import('./components/teamInfo.vue'))
const asc = getCurrentInstance().appContext.config.globalProperties
const active = ref(0)
const tabArray = ref([
{text: '基础数据', value: '0'},
{text: '团队信息', value: '1'},
{text: '专家信息', value: '2'},
{text: '审批节点', value: '3'},
])
const init = reactive({
formData: {}
})
const back = () => {
if (init.formData.pushMessage !== void 0) {
//消息推送 进入 需返回 主页
hooks.go2Router('myActivity')
} else {
//正常返回上一级
router.back()
}
}
const tabChange = (e) => {
active.value = e
}
const activityPeopleCard = ref('')
function getInitObject(card) {
//获取活动基础数据 用户参与人列表
activityPeopleCard.value = card
}
onMounted(() => {
init.formData = router.currentRoute.value.query
})
</script>
<style scoped>
</style>
<!--活动数据-->
<!--dtCard 三种值 value、tag、image-->
<script setup>
import {onMounted, defineEmits, defineProps, getCurrentInstance, reactive, nextTick, ref} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {showNotify} from "vant";
import {useRouter} from "vue-router";
import router from "@/router/index.js";
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
const competitionFormInfo = useCompetitionFormInfo()
const offset = ref({x: 0, y: 400})
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
runid: {
type: String
},
flowid: {
type: String
},
showButton: {
type: Boolean,
}
})
const emit = defineEmits(['getInitObject'])
const init = reactive({
info: {},
key: {
show: false,
src: '',
},
data: {
keys: [
//决定插入数据顺序
],
respObject: {},
values: [],
},
array: [
//处理完的完整数组
]
})
class CommonDetailsRequest {
/*
* 详情请求对象
**/
constructor(runid) {
this.runid = runid
}
11() {
}
}
function getData() {
hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowInfo({runid: props.runid}).then(res => {
//获取流程信息
let info = res.response.competition_report
competitionFormInfo.setFormData(info)
init.array = [
{label: '赛事名称', value: info.competitionname, mt: '10px'},
{label: '赛事编号', value: info.competitionname,},
{label: '赛项名称', value: info.competitionname,},
{label: '主办单位', value: info.competitionname,},
{label: '赛事级别', value: info.competitionname,},
{label: '赛事类别', value: info.competitionname,},
{label: '竞赛形式', value: info.competitionname,},
{label: '比赛开始时间', value: info.competitionname,},
{label: '比赛结束时间', value: info.competitionname,},
{label: '经费预算', value: info.competitionname,},
{label: '计划培训课时', value: info.competitionname,},
{label: '关联课程', value: info.competitionname,},
{label: '是否邀请专家', value: info.competitionname,},
]
})
}, true, '加载中...')
}
onMounted(() => {
getData()
})
</script>
<template>
<div class="
w-full
h-full
flex content-start
flex-wrap
bg-[#F5F6F8]
">
<publicDetails :array="init.array"/>
</div>
</template>
<style scoped>
</style>
<!--活动详情 钥匙-->
<template>
<div class="
h-full
w-full
flex content-start
flex-wrap
bg-[#F5F6F8]
px-2
py-2
justify-center
">
<specialistCard v-for="(item,index) in init.array" :key="index" :item="item"></specialistCard>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
const competitionFormInfo = useCompetitionFormInfo()
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
id: {
type: String
},
})
const init = reactive({
data: {
initDataKeys: [
//决定插入数据顺序
],
values: [],
title: [],
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
/* hooks.myEncapsulationFunction(() => {
api.getApiExpertGetExpertTrackList({
sign_id: competitionFormInfo.getFormData().competitionsignid,
}).then(res => {
if (res.response) {
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
}
})
}, true, '加载中...')*/
}
onMounted(() => {
getData()
})
</script>
<style scoped>
</style>
<!--活动详情 钥匙-->
<template>
<div
class="
w-full
h-full
flex content-start
flex-wrap
bg-[#F5F6F8]
py-2
justify-center
">
<van-collapse ref="collapse" v-model="activeNames" class="w-full bg-[#F5F6F8]">
<van-collapse-item v-for="(item,index) in [...init.array,...init.array]" :key="index" :name="index"
title="标题1"
@click.stop="collapseChange">
<template #title>
<div v-font:{color:`#323233`,size:14} class="w-full min-h-[50px] ">
<div class="w-full flex items-center">
<div class="w-[2px] h-[15px] mr-1 bg-[#1989fa]"></div>
<h2 v-font:{size:16,color:`#323233`} class="font-black">这是团队名称-1组</h2>
</div>
<p>(指导教师<span v-font:{color:`#369CEF`}>2</span>位,参赛教师<span v-font:{color:`#369CEF`}>2</span>位,参赛学生<span
v-font:{color:`#369CEF`}>2</span>位)</p>
</div>
</template>
<template #right-icon>
<!-- 展开/收缩单个折叠板使用-->
<!-- <img v-if="activeNames.includes(index)" :src="hooks.getImage('xs')" width="40" height="40"/>
<img v-else :src="hooks.getImage('xs')" class="rotate-180" height="40"
width="40"/>-->
<!-- 展开/收缩所有折叠板使用-->
<img v-if="init.collapse.flag" :src="hooks.getImage('xs')" height="40" width="40"/>
<img v-else :src="hooks.getImage('xs')" class="rotate-180" height="40"
width="40"/>
</template>
<template #default>
<div class="
bg-[#F5F6F8]
w-full
px-2"
@click.stop>
<RadioGroup v-model="init.radio.value" class="mt-4 mb-2">
<Radio v-for="item in init.radio.columns" :key="item.value" :label="item.value" border>{{ item.text }}
</Radio>
</RadioGroup>
<teamPeopleCard v-for="(item,index) in init.array" :key="index" :item="item"></teamPeopleCard>
</div>
</template>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive, ref} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
import {Radio, RadioGroup} from "view-ui-plus";
const competitionFormInfo = useCompetitionFormInfo()
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
id: {
type: String
},
})
const activeNames = ref(['1']);
const init = reactive({
collapse: {
flag: false,
},
radio: {
columns: [
{
value: '0',
text: '指导教师'
},
{
value: '1',
text: '参赛教师'
},
{
value: '2',
text: '参赛学生'
},
],
value: '0'
},
data: {
initDataKeys: [
//决定插入数据顺序
],
values: [],
title: [],
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
const collapse = ref()
function collapseChange() {
//折叠板变化 全部展开/收起
init.collapse.flag = !init.collapse.flag
if (init.collapse.flag) {
collapse.value.toggleAll(true)
} else {
collapse.value.toggleAll(false)
}
}
function getData() {
//初始化数据
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
/* hooks.myEncapsulationFunction(() => {
api.getApiExpertGetExpertTrackList({
sign_id: competitionFormInfo.getFormData().competitionsignid,
}).then(res => {
if (res.response) {
init.array = [
{
"id": "1818584584846184448",
"name": "机械专家",
"specialty": "机械",
"unit": "阿瓦啊啊啊",
"job": "晚班",
"phone": "1231231231",
"track_id": "1818924810680537089"
},
{
"id": "1818585418153725952",
"name": "美容专家",
"specialty": "美容专家",
"unit": "阿斗啊我记得哦啊哈我i和",
"job": "但我能",
"phone": "123123123123",
"track_id": "1818924810680537088"
}
]
}
})
}, true, '加载中...')*/
}
onMounted(() => {
getData()
})
</script>
<style lang="less" scoped>
/deep/ .van-collapse-item__content {
padding: 0 !important;
color: var(--van-collapse-item-content-text-color);
font-size: var(--van-collapse-item-content-font-size);
line-height: var(--van-collapse-item-content-line-height);
background: var(--van-collapse-item-content-background);
}
/deep/ .ivu-radio {
display: none;
margin-right: 4px;
white-space: nowrap;
position: relative;
line-height: 1;
vertical-align: middle;
cursor: pointer;
}
/deep/ .ivu-radio-wrapper-checked.ivu-radio-border {
border-color: #2d8cf0;
color: #2d8cf0;
border: 1px solid #2d8cf0;
border-radius: 20px;
}
/deep/ .ivu-radio-border {
border: 1px solid #dcdee2;
border-radius: 20px;
height: 32px;
line-height: 30px;
padding: 0 15px;
transition: border .2s ease-in-out;
}
/deep/ .ivu-radio-wrapper {
font-size: 14px;
vertical-align: middle;
display: inline-block;
position: relative;
white-space: nowrap;
margin-right: 8px;
cursor: pointer;
background-color: white;
}
</style>
<!--轨迹-->
<template>
<div class="bg-[#F5F6F8] w-full h-[10px]"></div>
<div
class="
w-full
h-full
flex content-start
flex-wrap
bg-white
">
<van-steps :active="0" class="w-full" direction="vertical">
<van-step v-for="(item,index) in init.array " :key="index" class="ax ">
<h2 v-font:{color:`#323233`,size:18}>{{ item.node_name }}</h2>
<p>用户名:<span v-font:{color:`#5295FF`}>{{ item.name }}</span></p>
<p>审批动作:<span v-font:{color:`#5295FF`}>{{ item.action_name }}</span></p>
<p>审批意见:<span>{{ item.comment }}</span></p>
<p>处理时间:<span>{{ item.approver_time }}</span></p>
<p>耗时时间:<span>{{ item.elapsed_time }}</span></p>
</van-step>
</van-steps>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
id: {
type: String
},
})
const init = reactive({
data: {
initDataKesy: [
//决定插入数据顺序
],
values: [],
title: []
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowLogList({form_id: props.id}).then(res => {
if (res.response) {
//获取处理完的数组
// init.array = res.response
init.array = [
{
"logid": "886f1772-0671-4ac2-83fe-d15174e31daf",
"run_id": "39f9879a-d458-449f-95bc-9fa99c996d64",
"node_name": "二级学院",
"action_name": "发送",
"comment": "审批通过",
"createby": "syjs516",
"approver_time": "2024-08-02 09:47:37",
"elapsed_time": "00时04分24秒",
"name": "asc666"
},
{
"logid": "7c4891e1-7fa4-47f0-b72d-47b96f2eb6fb",
"run_id": "39f9879a-d458-449f-95bc-9fa99c996d64",
"node_name": "学校审批",
"action_name": "发送",
"comment": "审批通过",
"createby": "asc666",
"approver_time": "2024-08-02 09:47:44",
"elapsed_time": "00时00分06秒",
"name": "asc666"
}
]
}
})
}, true, '加载中...')
}
onMounted(() => {
getData()
})
</script>
<style scoped lang="less">
/deep/ .van-step--vertical .van-step__circle-container {
position: absolute;
top: 19px;
left: -15px;
z-index: 1;
line-height: 1;
transform: translate(-50%, -50%);
font-size: 18px;
}
/deep/ .van-step--vertical {
display: block;
font-size: 16px;
float: none;
padding: 10px 10px 10px 0;
line-height: var(--van-line-height-sm);
}
.ax {
/deep/ .van-step__title--active, .van-step__icon--finish, .van-step__title--finish {
color: #808695;
}
}
</style>
<!--
赛事目录申请 详情界面
-->
<template>
<div class="container1 ">
<!-- content-->
<div class="w-screen h-[calc(100vh)] overflow-y-auto relative">
<!--header-->
<div class="w-full h-[108px] bg-white z-50 sticky top-0">
<div class="w-full h-[54px] flex">
<div class="w-[13%] bg-white h-full text-[28px] text-gray-400 flex items-center justify-center" @click="back">
<van-icon class="" name="arrow-left"/>
</div>
<div v-font:{color:`#323233`,size:18}
class="w-[87%] h-full ccFlex pr-4 text-nowrap overflow-hidden overflow-ellipsis">
<!-- <van-text-ellipsis content="赛事名称赛事名称赛事名称赛事名称赛事名称"/>-->
查看信息
</div>
</div>
<div class="w-full h-[54px]">
<van-tabs v-model:active="active" swipeable @change="tabChange">
<van-tab v-for="(item,index) in tabArray" :key="index" :title="item.text"/>
</van-tabs>
</div>
</div>
<!--content_content-->
<div class="w-full min-h-[calc(100%-108px)] overflow-y-auto">
<activityData
v-if="active === 0"
:flowid="init.formData.flowid"
:runid="init.formData.runid"
:showButton="init.formData.show"
@getInitObject="getInitObject"
/>
<teamInfo v-if="active ===1" :id="init.formData.runid"/>
<specialistInfo v-if="active ===2" :id="init.formData.runid" :activityPeopleCard="activityPeopleCard"/>
<trackList v-if="active ===3" :id="init.formData.runid"/>
</div>
<!-- <div class="w-full h-[108px] bg-red-400"></div>-->
</div>
</div>
</template>
<script setup>
import {getCurrentInstance, reactive, defineAsyncComponent, ref, onMounted, provide, inject, nextTick} from "vue";
import * as hooks from '@/hooks/index.js'
import router from "@/router/index.js";
import route from '@/router/routes.js'
const trackList = defineAsyncComponent(() => import('./components/track.vue'))
const activityData = defineAsyncComponent(() => import('./components/activityData.vue'))
const specialistInfo = defineAsyncComponent(() => import('./components/specialistInfo.vue'))
const teamInfo = defineAsyncComponent(() => import('./components/teamInfo.vue'))
const asc = getCurrentInstance().appContext.config.globalProperties
const active = ref(0)
const tabArray = ref([
{text: '基础数据', value: '0'},
{text: '团队信息', value: '1'},
{text: '专家信息', value: '2'},
{text: '审批节点', value: '3'},
])
const init = reactive({
formData: {}
})
const back = () => {
if (init.formData.pushMessage !== void 0) {
//消息推送 进入 需返回 主页
hooks.go2Router('myActivity')
} else {
//正常返回上一级
router.back()
}
}
const tabChange = (e) => {
active.value = e
}
const activityPeopleCard = ref('')
function getInitObject(card) {
//获取活动基础数据 用户参与人列表
activityPeopleCard.value = card
}
onMounted(() => {
init.formData = router.currentRoute.value.query
})
</script>
<style scoped>
</style>
<!--活动数据-->
<!--dtCard 三种值 value、tag、image-->
<script setup>
import {onMounted, defineEmits, defineProps, getCurrentInstance, reactive, nextTick, ref} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {showNotify} from "vant";
import {useRouter} from "vue-router";
import router from "@/router/index.js";
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
const competitionFormInfo = useCompetitionFormInfo()
const offset = ref({x: 0, y: 400})
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
runid: {
type: String
},
flowid: {
type: String
},
flowType: {
type: String
},
showButton: {
type: Boolean,
}
})
const emit = defineEmits(['getInitObject'])
const init = reactive({
info: {},
key: {
show: false,
src: '',
},
data: {
keys: [
//决定插入数据顺序
],
respObject: {},
values: [],
},
array: [
//处理完的完整数组
]
})
class CommonDetailsRequest {
/*
* 详情请求对象
**/
constructor(runid) {
this.runid = runid
}
11() {
}
}
function getData() {
hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowInfo({runid: props.runid}).then(res => {
//获取流程信息
let info = res.response.competition_report
competitionFormInfo.setFormData(res.response)
init.array = [
{label: '赛事名称', value: info.competitionname, mt: '10px'},
{label: '赛事编号', value: info.report_code,},
{label: '赛项名称', value: info.competitionsubitem_name,},
{label: '批次', value: info.competitionbatch_name, mt: '10px'},
{label: '主办单位', value: info.sponsor,},
{label: '院系', value: info.dept,},
{label: '赛事级别', value: info.competition_level_name,},
{label: '赛事类别', value: info.competition_type_name,},
{
label: '附件',
files: res.response.file_list,
mt: '10px'
},
]
})
}, true, '加载中...')
}
onMounted(() => {
getData()
})
</script>
<template>
<div
:class="`${props.flowType ==='await' ? 'h-[calc(100%-64px)]':'h-full'}`"
class="
w-full
h-full
flex
content-start
flex-wrap
bg-[#F5F6F8]
">
<publicDetails :array="init.array"/>
</div>
</template>
<style scoped>
</style>
<!--轨迹-->
<template>
<div class="bg-[#F5F6F8] w-full h-[10px]"></div>
<div
:class="`${props.flowType ==='await' ? 'h-[calc(100%-74px)]':'h-[calc(100%-10px)]'}`"
class="
w-full
flex content-start
flex-wrap
bg-white
">
<van-steps :active="0" class="w-full" direction="vertical" active-icon="circle" finish-icon="success"
inactive-icon="success">
<van-step v-for="(item,index) in init.array " :key="index" class="ax ">
<h2 v-font:{color:`#323233`,size:18}>{{ item.node_name }}</h2>
<p>用户名:<span v-font:{color:`#5295FF`}>{{ item.name }}</span></p>
<p>审批动作:<span v-font:{color:`#5295FF`}>{{ item.action_name }}</span></p>
<p>审批意见:<span>{{ item.comment }}</span></p>
<p>处理时间:<span>{{ item.approver_time }}</span></p>
<p>耗时时间:<span>{{ item.elapsed_time }}</span></p>
</van-step>
</van-steps>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({
form_id: {
type: String
},
flowType: {
type: String
},
})
const init = reactive({
data: {
initDataKesy: [
//决定插入数据顺序
],
values: [],
title: []
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowLogList({form_id: props.form_id}).then(res => {
if (res.response) {
//获取处理完的数组
init.array = res.response
/* init.array = [
{
"logid": "886f1772-0671-4ac2-83fe-d15174e31daf",
"run_id": "39f9879a-d458-449f-95bc-9fa99c996d64",
"node_name": "二级学院",
"action_name": "发送",
"comment": "审批通过",
"createby": "syjs516",
"approver_time": "2024-08-02 09:47:37",
"elapsed_time": "00时04分24秒",
"name": "asc666"
},
{
"logid": "7c4891e1-7fa4-47f0-b72d-47b96f2eb6fb",
"run_id": "39f9879a-d458-449f-95bc-9fa99c996d64",
"node_name": "学校审批",
"action_name": "发送",
"comment": "审批通过",
"createby": "asc666",
"approver_time": "2024-08-02 09:47:44",
"elapsed_time": "00时00分06秒",
"name": "asc666"
}
]*/
}
})
}, true, '加载中...')
}
onMounted(() => {
getData()
})
</script>
<style scoped lang="less">
/deep/ .van-step--vertical .van-step__circle-container {
position: absolute;
top: 19px;
left: -15px;
z-index: 1;
line-height: 1;
transform: translate(-50%, -50%);
font-size: 18px;
}
/deep/ .van-step--vertical {
display: block;
font-size: 16px;
float: none;
padding: 10px 10px 10px 0;
line-height: var(--van-line-height-sm);
}
.ax {
/deep/ .van-step__title--active, .van-step__icon--finish, .van-step__title--finish {
color: #808695;
}
}
</style>
<!--
赛事目录申请 详情界面
-->
<template>
<!--审批 -->
<van-dialog v-model:show="init.approval.show" title="审批">
<div class="flex flex-wrap justify-center items-center w-full min-h-[160px]">
<van-tabs v-model:active="init.approval.active">
<van-tab title="审批通过">
<template #default>
<div class="w-full h-full flex flex-wrap justify-center items-center">
<van-cell-group>
<!--团队名称-->
<van-field
v-model="init.approval.formData.remark"
rows="3"
autosize
label="备注"
type="textarea"
maxlength="50"
placeholder="请输入备注"
show-word-limit
/>
</van-cell-group>
</div>
</template>
</van-tab>
<van-tab title="退回发起人">
<template #default>
<van-cell-group>
<!--是否备选-->
<van-field
v-model="init.approval.value"
:rules="[{ required: true, message: '请选择是否备选' }]"
clickable
is-link
label="是否备选"
name="createTeam"
placeholder="请选择是否备选"
readonly
required
@click="init.approval.showPopup = true"
/>
<!--备注-->
<van-field
v-model="init.approval.formData.remark"
rows="3"
autosize
label="备注"
type="textarea"
maxlength="50"
placeholder="请输入备注"
show-word-limit
/>
</van-cell-group>
</template>
</van-tab>
</van-tabs>
</div>
<template #footer>
<div class="w-full h-[60px] flex justify-between items-center border border-solid px-2">
<div class="w-[30%]">
<van-button block round @click="init.approval.show = false;">关闭</van-button>
</div>
<div class="w-[65%]">
<van-button block round type="primary" @click="submitApproval"> 确认</van-button>
</div>
</div>
</template>
</van-dialog>
<!-- 1-退回到上个节点 // 2-退回到发起人-->
<van-popup v-model:show="init.approval.showPopup" position="bottom">
<van-picker
:columns="init.approval.columns"
show-toolbar
@cancel="init.approval.showPopup = false"
@confirm="onConfirm_approval"
/>
</van-popup>
<div class="container1 ">
<!--content-->
<div class="w-screen h-screen overflow-y-auto relative">
<!--header-->
<div class="w-full h-[108px] bg-white z-50 sticky top-0">
<div class="w-full h-[54px] flex">
<div class="w-[13%] bg-white h-full text-[28px] text-gray-400 flex items-center justify-center" @click="back">
<van-icon class="" name="arrow-left"/>
</div>
<div v-font:{color:`#323233`,size:18}
class="w-[87%] h-full ccFlex pr-4 text-nowrap overflow-hidden overflow-ellipsis">
<!-- <van-text-ellipsis content="赛事名称赛事名称赛事名称赛事名称赛事名称"/>-->
查看信息
</div>
</div>
<div class="w-full h-[54px]">
<van-tabs v-model:active="active" swipeable @change="tabChange">
<van-tab v-for="(item,index) in tabArray" :key="index" :title="item.text"/>
</van-tabs>
</div>
</div>
<!--content_content-->
<div :class="`${init.formData.flowType ==='await' ? 'h-[calc(100%-172px)]':'h-[calc(100%-108px)]'}`"
class="w-full overflow-y-auto relative">
<activityData
v-if="active === 0"
:flowid="init.formData.flowid"
:runid="init.formData.runid"
:flowType="init.formData.flowType"
:showButton="init.formData.show"
@getInitObject="getInitObject"
/>
<trackList v-if="active ===1" :form_id="init.formData.form_id" :flowType="init.formData.flowType"/>
</div>
<!--审批-->
<div v-if="init.formData.flowType === 'await'"
class="w-full h-[64px] flex justify-between items-center sticky bottom-0 px-2 bg-white">
<van-button round class="w-[35%]" @click="back">返回</van-button>
<van-button type="primary" round class="w-[60%]" @click="init.approval.show = true">审批</van-button>
</div>
</div>
</div>
</template>
<script setup>
import {reactive, defineAsyncComponent, ref, onMounted, provide, inject, nextTick} from "vue";
import * as hooks from '@/hooks/index.js'
import * as api from '@/api/dist/controller/index.js'
import router from "@/router/index.js";
import route from '@/router/routes.js'
import {useCompetitionFormInfo} from "@/store/modules/formInfo.js";
const competitionFormInfo = useCompetitionFormInfo()
const trackList = defineAsyncComponent(() => import('./components/track.vue'))
const activityData = defineAsyncComponent(() => import('./components/activityData.vue'))
const active = ref(0)
const tabArray = ref([
{text: '基础数据', value: '0'},
{text: '审批节点', value: '3'},
])
const init = reactive({
formData: {},
approval: {
active: '0',
showPopup: false,
show: false,
columns: [
{value: 1, text: "退回到上个节点"},
{value: 2, text: "退回到发起人"},
],
formData: {
taskid: '',
remark: '',
action: '',
},
}
})
const back = () => {
if (init.formData.pushMessage !== void 0) {
//消息推送 进入 需返回 主页
hooks.go2Router('myActivity')
} else {
//正常返回上一级
router.back()
}
}
const tabChange = (e) => {
active.value = e
}
const activityPeopleCard = ref('')
function getInitObject(card) {
//获取活动基础数据 用户参与人列表
activityPeopleCard.value = card
}
function onConfirm_approval(value) {
//创建团队》是否备用
const info = value.selectedOptions[0];
init.approval.formData.action = info.value;
init.approval.value = info.text;
init.approval.showPopup = false;
}
function submitApproval() {
//审批
let info = competitionFormInfo.getFormData()
if (init.approval.active == 0) {
//通过
hooks.myEncapsulationFunction(() => {
return api.getApiFlowApiFlowFlowApproval({
taskid: info.taskid,
action: init.approval.formData.action,
remark: init.approval.formData.remark,
}).then(res => {
hooks.responseSuccessAction(res, () => back())
return res
})
})
} else {
hooks.myEncapsulationFunction(() => {
//退回
return api.getApiFlowApiFlowFlowRevocation({
taskid: info.taskid,
action: init.approval.formData.action,
remark: init.approval.formData.remark,
}).then(res => {
hooks.responseSuccessAction(res, () => back())
return res
})
})
}
}
onMounted(() => {
init.formData = router.currentRoute.value.query
})
</script>
<style scoped>
</style>
<script setup>
import {defineAsyncComponent, getCurrentInstance, onMounted, reactive, ref} from 'vue'
import router from "@/router/index.js";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {getImage} from "@/hooks/index.js";
import ConfigDict from '@/config/modules/dict.js'
const reserveASeat = defineAsyncComponent(() => import('@/components/card/reserveASeat.vue'))
const props = defineProps({
array: Array,
nmt: Boolean,
nmb: Boolean,
})
import {showImagePreview} from 'vant';
const init = reactive({
array: [],
params: {
id: '',
type: ''
}
})
function imagePreview(All, index) {
//获取评价图片数组 遍历得到预览结构
let image = []
All.map((cur, inde) => {
image.push(window.location.origin + cur.path)
})
showImagePreview({
images: image,
startPosition: index,
});
}
function getData() {
//详情
let strategy = {
'record': () => {
hooks.myEncapsulationFunction(() => {
return api.getApiRecordGetRecordInfo({id: init.params.id}).then(async res => {
//获取活动信息
let info = res.response
init.array = [
{label: '房间名称', value: info.room_name, mt: '10px'},
{label: '房间地址', value: info.room_address},
{label: '房间类型', value: info.room_type_name},
{label: '占座人', value: info.name, mt: '10px'},
{
label: '占座时间',
value: `${info.begin_time}-${info.end_time.split(' ')[1]} ${hooks.calculateTimeDifference(info.begin_time.split(' ')[1], info.end_time.split(' ')[1])}小时`,
},
{label: '座位', value: info.seat_code_name + '号', mt: '10px'},
{label: '活动状态', tag: ConfigDict.activityStatus[info.state]},
{label: '签到状态', tag: info.sign_state_name},
]
info.leave_state !== 0 ? init.array.push({
label: '暂离状态',
tag: ConfigDict.transientState[info.leave_state],
mt: '10px'
},
{label: '归位时间', value: info.leave_time},) : ''
await api.getApiRecordGetRecordTrackDetailsList({id: init.params.id}).then(re => {
//获取活动的签到记录
init.array.push({label: '签到记录', record: re.response, mt: '10px'})
return re
})
return res
})
}, true, '加载中...')
}
}
strategy[init.params.type]()
}
function onClickLeft() {
//返回指定路径或上一级
let back = router.currentRoute.value.query.name
if (back) {
router.replace({name: back})
} else {
router.back()
}
}
onMounted(() => {
init.params = {
id: router.currentRoute.value.query.id,
type: router.currentRoute.value.query.type,
}
getData()
})
</script>
<template>
<div class="w-screen h-screen bg-gray-100 box-border relative">
<!-- 顶部栏目 -->
<div class="sticky top-0 w-full h-[46px] z-50">
<van-nav-bar
left-text="返回"
left-arrow
@click-left="onClickLeft"
title="详情"
>
</van-nav-bar>
</div>
<!-- content-->
<div class="w-full h-[calc(100%-116px)] overflow-y-auto " v-font:{color:`#515A6E`,size:18}>
<div v-for="(item,index) in init.array" :key="index" :style="{marginTop:item.mt}"
class="w-full h-auto bg-white">
<div class=" w-full min-h-[50px] flex p-3 ">
<!-- 标题-->
<div class="w-[30%] h-full flex items-center text-wrap box-border">
<span>{{ item.label }}</span>
</div>
<!-- 内容为文字-->
<div v-if="item.value" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">{{ item.value }}</span>
</div>
<!-- 内容为图片-->
<div v-else-if="item.image" class="w-[70%] h-full flex items-center text-wrap box-border">
<div class=" w-full min-h-[80px] flex justify-start">
<div v-for="(ite,inde) in item.image" :key="inde" @click="imagePreview(item.image,inde)"
class="m-1 w-[70px] h-[60px] border border-dashed border-gray-300">
<img :src="ite.path" class="w-full h-full">
</div>
</div>
</div>
<!-- 内容为星级-->
<div v-else-if="item.level" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">
<van-rate
readonly
v-model="item.level"
:size="25"
:count="5"
color="#FE9E0B"
void-icon="star"
void-color="#eee"
/>
</span>
</div>
<!-- 内容为标签-->
<div v-else-if="item.tag" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">
<van-tag size="large" type="success">
<span>
{{ item.tag }}
</span>
</van-tag>
</span>
</div>
<!-- 内容为时间线-->
<div v-else-if="item.record" class="w-[70%] h-full flex items-center text-wrap box-border">
<van-steps class="ml-1 w-full" direction="vertical" :active="0">
<van-step v-for="(item,index) in item.record" :key="index">
<h3>【{{ ConfigDict.signOrSignOutStatus[item.sign_state] }}】</h3>
<p>地址:{{ item.address }}</p>
<p>时间:{{ item.createtime }}</p>
<div v-for="(ite,inde) in [item.file_info]" :key="inde" @click="imagePreview([item.file_info],inde)"
class="m-1 w-[70px] h-[60px] border border-dashed border-gray-300">
<img :src="ite.path" class="w-full h-full">
</div>
</van-step>
</van-steps>
</div>
</div>
</div>
</div>
<div class=" w-full h-[70px] z-50 ccFlex p-2 shadow shadow-gray-600">
<van-button @click="onClickLeft" round block>返 回</van-button>
</div>
</div>
</template>
<style scoped lang="less">
.page {
--van-pagination-height: 55px
}
</style>
<style lang="less" scoped>
.flexRight {
width: 100%;
height: 20px;
display: flex;
justify-content: flex-end;
align-items: center;
.posi {
position: absolute;
right: 16px;
bottom: 16px;
}
}
table {
border-collapse: collapse;
border-spacing: 0;
border: 1px solid;
}
td {
border: 1px solid;
}
.cardList {
padding: 125px 15px 15px 15px;
}
.list {
border-radius: 12px;
overflow: hidden;
margin-bottom: 15px;
.pending {
color: #1988f9;
background: #e6f7ff;
border: 1px solid #91d5ff;
border-radius: 6px;
}
.pass {
color: #3fab41;
background: #f6ffed;
border: 1px solid #b7eb8f;
border-radius: 6px;
}
.nopass {
color: #f5222d;
background: #fff1f0;
border: 1px solid #ffa39e;
border-radius: 6px;
}
.cellStyle_up {
padding: 10px 16px 1px;
font-size: 15px;
.van-cell__title {
color: #818283;
}
}
.cellStyle_down {
padding: 1px 16px 0px;
font-size: 15px;
.van-cell__title {
color: #818283;
}
}
.cellStyle_centre {
padding: 1px 16px 0px;
font-size: 15px;
.van-cell__title {
color: #818283;
}
}
.van-cell__value {
font-size: 16px;
color: #525252;
min-width: 200px;
}
}
.top {
position: fixed;
top: 0px;
height: 50px;
width: 100%;
background: #fff;
left: 0;
z-index: 11;
.van-row {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
text-align: center;
height: 100%;
.checkedstyle {
color: #238efa;
}
.icon {
margin-right: 5px;
}
}
}
.bottom {
position: fixed;
bottom: 0;
height: 60px;
width: 100%;
background: #fff;
left: 0;
z-index: 11;
.count {
margin-left: 18px;
}
.van-row {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
text-align: center;
height: 100%;
.checkedstyle {
color: #238efa;
}
.icon {
margin-right: 5px;
}
}
}
.sexIcon {
width: 16px;
margin: 0 13px;
}
.title-filter {
text-align: center;
padding: 10px;
border-bottom: 1px solid rgb(235, 237, 240);
.icon {
position: absolute;
right: 22px;
}
}
.form-field {
.van-cell {
font-size: 16px;
line-height: 34px;
}
/deep/ .van-field__value {
background: #f2f3f5;
}
/deep/ .van-field__right-icon {
margin-right: 0px;
}
/deep/ input {
padding-left: 10px;
}
}
.btn {
margin: 20px;
}
.aes {
width: 100%;
height: 100%;
}
.paymentVoucher {
position: relative;
width: 100%;
height: 100%;
padding: 16px;
box-sizing: border-box;
}
.accepted {
position: relative;
width: 100%;
height: 100%;
padding: 16px;
box-sizing: border-box;
}
/deep/ .van-cell {
font-size: 16px !important;
line-height: 24px !important;
}
/deep/ .van-cell__title {
font-size: 16px !important;
}
</style>
...@@ -15,7 +15,10 @@ const competitionFormInfo = useCompetitionFormInfo() ...@@ -15,7 +15,10 @@ const competitionFormInfo = useCompetitionFormInfo()
const offset = ref({x: 0, y: 400}) const offset = ref({x: 0, y: 400})
const asc = getCurrentInstance().appContext.config.globalProperties const asc = getCurrentInstance().appContext.config.globalProperties
const props = defineProps({ const props = defineProps({
id: { runid: {
type: String
},
flowid: {
type: String type: String
}, },
showButton: { showButton: {
...@@ -43,10 +46,23 @@ const init = reactive({ ...@@ -43,10 +46,23 @@ const init = reactive({
] ]
}) })
class CommonDetailsRequest {
/*
* 详情请求对象
**/
constructor(runid) {
this.runid = runid
}
11() {
}
}
function getData() { function getData() {
hooks.myEncapsulationFunction(() => { hooks.myEncapsulationFunction(() => {
return api.getApiFlowViewApiFlowViewGetFlowInfo({runid: router.currentRoute.value.query.id}).then(res => { return api.getApiFlowViewApiFlowViewGetFlowInfo({runid: props.runid}).then(res => {
//获取流程信息 //获取流程信息
let info = res.response.competition_report let info = res.response.competition_report
competitionFormInfo.setFormData(info) competitionFormInfo.setFormData(info)
...@@ -78,8 +94,7 @@ onMounted(() => { ...@@ -78,8 +94,7 @@ onMounted(() => {
<template> <template>
<div class=" <div class="
w-full w-full
min-h-[calc(100%-108px)] h-full
overflow-y-auto
flex content-start flex content-start
flex-wrap flex-wrap
bg-[#F5F6F8] bg-[#F5F6F8]
......
<!--活动详情 钥匙--> <!--活动详情 钥匙-->
<template> <template>
<div class=" <div class="
h-full
w-full w-full
min-h-[calc(100%-108px)]
overflow-y-auto
flex content-start flex content-start
flex-wrap flex-wrap
bg-[#F5F6F8] bg-[#F5F6F8]
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
<div <div
class=" class="
w-full w-full
min-h-[calc(100%-108px)] h-full
overflow-y-auto
flex content-start flex content-start
flex-wrap flex-wrap
bg-[#F5F6F8] bg-[#F5F6F8]
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<div <div
class=" class="
w-full w-full
min-h-[calc(100%-108px)] h-full
overflow-y-auto
flex content-start flex content-start
flex-wrap flex-wrap
bg-white bg-white
......
...@@ -2,45 +2,48 @@ ...@@ -2,45 +2,48 @@
<div class="container1 "> <div class="container1 ">
<!-- content--> <!-- content-->
<div class="w-screen h-[calc(100vh)] overflow-y-auto relative"> <div class="w-screen h-[calc(100vh)] overflow-y-auto relative">
<!-- header--> <!--header-->
<div class="w-full h-[108px] bg-white z-50 sticky top-0"> <div class="w-full h-[108px] bg-white z-50 sticky top-0">
<div class="w-full h-[54px] flex"> <div class="w-full h-[54px] flex">
<div class="w-[13%] bg-white h-full text-[28px] text-gray-400 flex items-center justify-center" @click="back"> <div class="w-[13%] bg-white h-full text-[28px] text-gray-400 flex items-center justify-center" @click="back">
<van-icon class="" name="arrow-left"/> <van-icon class="" name="arrow-left"/>
</div> </div>
<div v-font:{color:`#323233`,size:20} <div v-font:{color:`#323233`,size:18}
class="w-[87%] h-full ccFlex pr-4 font-black text-nowrap overflow-hidden overflow-ellipsis"> class="w-[87%] h-full ccFlex pr-4 text-nowrap overflow-hidden overflow-ellipsis">
<!-- <van-text-ellipsis content="赛事名称赛事名称赛事名称赛事名称赛事名称"/>--> <!-- <van-text-ellipsis content="赛事名称赛事名称赛事名称赛事名称赛事名称"/>-->
赛事名称赛事名称赛 查看信息
</div> </div>
</div> </div>
<div class="w-[87%] h-[54px]"> <div class="w-full h-[54px]">
<van-tabs v-model:active="active" swipeable @change="tabChange"> <van-tabs v-model:active="active" swipeable @change="tabChange">
<van-tab v-for="(item,index) in tabArray" :key="index" :title="item"></van-tab> <van-tab v-for="(item,index) in tabArray" :key="index" :title="item.text"/>
</van-tabs> </van-tabs>
</div> </div>
</div> </div>
<!--content_content-->
<!-- content_content--> <div class="w-full min-h-[calc(100%-108px)] overflow-y-auto">
<activityData <activityData
v-if="active === 0" v-if="active === 0"
:id="asc.$route.query.id" :flowid="init.formData.flowid"
:showButton="asc.$route.query.show" :runid="init.formData.runid"
:showButton="init.formData.show"
@getInitObject="getInitObject" @getInitObject="getInitObject"
/> />
<teamInfo v-if="active ===1" :id="asc.$route.query.id"/> <teamInfo v-if="active ===1" :id="init.formData.runid"/>
<specialistInfo v-if="active ===2" :id="asc.$route.query.id" :activityPeopleCard="activityPeopleCard"/> <specialistInfo v-if="active ===2" :id="init.formData.runid" :activityPeopleCard="activityPeopleCard"/>
<trackList v-if="active ===3" :id="asc.$route.query.id"/> <trackList v-if="active ===3" :id="init.formData.runid"/>
</div>
<!-- <div class="w-full h-[108px] bg-red-400"></div>-->
</div> </div>
<!-- footer-->
<!-- <cs-page></cs-page>-->
</div> </div>
</template> </template>
<script setup> <script setup>
import {getCurrentInstance, defineAsyncComponent, ref, onMounted, provide, inject, nextTick} from "vue"; import {getCurrentInstance, reactive, defineAsyncComponent, ref, onMounted, provide, inject, nextTick} from "vue";
import * as hooks from '@/hooks/index.js' import * as hooks from '@/hooks/index.js'
import router from "@/router/index.js";
import route from '@/router/routes.js'
const trackList = defineAsyncComponent(() => import('./components/track.vue')) const trackList = defineAsyncComponent(() => import('./components/track.vue'))
const activityData = defineAsyncComponent(() => import('./components/activityData.vue')) const activityData = defineAsyncComponent(() => import('./components/activityData.vue'))
...@@ -50,21 +53,25 @@ const teamInfo = defineAsyncComponent(() => import('./components/teamInfo.vue')) ...@@ -50,21 +53,25 @@ const teamInfo = defineAsyncComponent(() => import('./components/teamInfo.vue'))
const asc = getCurrentInstance().appContext.config.globalProperties const asc = getCurrentInstance().appContext.config.globalProperties
const active = ref(0) const active = ref(0)
const tabArray = ref([ const tabArray = ref([
'基础数据', {text: '基础数据', value: '0'},
'团队信息', {text: '团队信息', value: '1'},
'专家信息', {text: '专家信息', value: '2'},
'审批节点', {text: '审批节点', value: '3'},
]) ])
const init = reactive({
formData: {}
})
const back = () => { const back = () => {
if (asc.$route.query.pushMessage !== void 0) { if (init.formData.pushMessage !== void 0) {
//消息推送 进入 需返回 主页 //消息推送 进入 需返回 主页
hooks.go2Router('myActivity') hooks.go2Router('myActivity')
} else { } else {
//正常返回上一级 //正常返回上一级
asc.back() router.back()
} }
} }
const tabChange = (e) => { const tabChange = (e) => {
active.value = e active.value = e
} }
...@@ -73,11 +80,10 @@ const activityPeopleCard = ref('') ...@@ -73,11 +80,10 @@ const activityPeopleCard = ref('')
function getInitObject(card) { function getInitObject(card) {
//获取活动基础数据 用户参与人列表 //获取活动基础数据 用户参与人列表
activityPeopleCard.value = card activityPeopleCard.value = card
} }
onMounted(() => { onMounted(() => {
init.formData = router.currentRoute.value.query
}) })
</script> </script>
......
<script setup> <script setup>
import {defineAsyncComponent, getCurrentInstance, onMounted, reactive, ref} from 'vue' import {defineAsyncComponent, onMounted, reactive, ref} from 'vue'
import router from "@/router/index.js"; import router from "@/router/index.js";
import * as api from '@/api/dist/controller/index.js' import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js' import * as hooks from '@/hooks/index.js'
import {getImage} from "@/hooks/index.js"; import {getImage} from "@/hooks/index.js";
import ConfigDict from '@/config/modules/dict.js' import ConfigDict from '@/config/modules/dict.js'
import dayjs from "dayjs";
import commonDataRequest from "@/api/commonDataRequest/index.js"; import commonDataRequest from "@/api/commonDataRequest/index.js";
const card = defineAsyncComponent(() => import('@/pages/flowApproval/components/card.vue')) const card = defineAsyncComponent(() => import('@/pages/flowApproval/components/card.vue'))
...@@ -59,7 +59,6 @@ const init = reactive({ ...@@ -59,7 +59,6 @@ const init = reactive({
columns: [], columns: [],
showPicker: false, showPicker: false,
}, },
data: { data: {
array: [] array: []
}, },
...@@ -298,9 +297,12 @@ function recordAction(key, item) { ...@@ -298,9 +297,12 @@ function recordAction(key, item) {
function details(item) { function details(item) {
//详情 //详情
router.push({ router.push({
path: '/flowDetails', path: '/eventCatalogDetails',
query: { query: {
id: item.runid, runid: item.runid, //基础信息
flowid: item.flow_id,
flowType: 'await', //鉴别是否审批
form_id: item.form_id, //日志轨迹
} }
}) })
} }
...@@ -629,7 +631,7 @@ onMounted(() => { ...@@ -629,7 +631,7 @@ onMounted(() => {
</template> </template>
<template v-slot:default> <template v-slot:default>
<div class="w-full h-full flex items-center justify-end"> <div class="w-full h-full flex items-center justify-end">
<div class="w-[30%] mx-2"> <div class="w-full mx-2">
<van-button <van-button
class="w-full " class="w-full "
plain plain
...@@ -657,10 +659,8 @@ onMounted(() => { ...@@ -657,10 +659,8 @@ onMounted(() => {
</div> </div>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
<div class="w-full h-[60px] bg-gray-100"></div> <!-- <div class="w-full h-[60px] bg-gray-100"></div>-->
</div> </div>
</div> </div>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -6,6 +6,11 @@ export const datails = [ ...@@ -6,6 +6,11 @@ export const datails = [
path: '/flowDetails', path: '/flowDetails',
component: () => import('@/pages/flowApproval/await/detail/index.vue'), component: () => import('@/pages/flowApproval/await/detail/index.vue'),
}, },
{
//详情页
name: 'eventCatalogDetails',
path: '/eventCatalogDetails',
component: () => import('@/pages/details/eventCatalog/index.vue'),
},
] ]
...@@ -44,12 +44,12 @@ const routes = [ ...@@ -44,12 +44,12 @@ const routes = [
path: '/adminNoGoodRecord', path: '/adminNoGoodRecord',
component: () => import('@/pages/welcome/userOrAdmin/adminFlow.vue'), component: () => import('@/pages/welcome/userOrAdmin/adminFlow.vue'),
}, },
{ /* {
// 详情 // 详情
name: 'details', name: 'details',
path: '/details', path: '/details',
component: () => import('@/pages/details/index.vue'), component: () => import('@/pages/details/index.vue'),
}, },*/
{ {
// 扫瞄房间 // 扫瞄房间
name: 'scanRoomQrcode', name: 'scanRoomQrcode',
......
import axios from 'axios'; import axios from 'axios';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import {showToast, showNotify, closeToast} from 'vant'; import {showToast, showNotify, closeToast, showFailToast} from 'vant';
import 'vant/es/notify/style'; import 'vant/es/notify/style';
import 'vant/es/toast/style'; import 'vant/es/toast/style';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
...@@ -40,7 +42,10 @@ axiosInstance.interceptors.response.use((response) => { ...@@ -40,7 +42,10 @@ axiosInstance.interceptors.response.use((response) => {
//鉴别 code 是否定义 定义则接口报错 无code表示微信初始化接口数据 //鉴别 code 是否定义 定义则接口报错 无code表示微信初始化接口数据
case true: case true:
// 危险通知 // 危险通知
showNotify({type: 'danger', message: response.data.msg_detail}); showFailToast({
message: response.data.msg_detail
})
/* showNotify({type: 'danger', message: response.data.msg_detail});*/
closeToast(); closeToast();
break; break;
case false: case false:
...@@ -93,7 +98,10 @@ axiosInstance.interceptors.response.use((response) => { ...@@ -93,7 +98,10 @@ axiosInstance.interceptors.response.use((response) => {
msg = '网络出了小差~'; msg = '网络出了小差~';
break; break;
} }
showToast(msg); showFailToast({
message: msg
})
// showToast(msg);
} }
return Promise.reject(error); return Promise.reject(error);
}); });
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或