mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 03:16:47 +08:00
feat:合并
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 17:28:10
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-22 12:54:09
|
||||
* @LastEditTime: 2022-12-11 20:19:39
|
||||
* @FilePath: /fe-stu/src/App.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
@@ -40,6 +40,10 @@ export default defineComponent({
|
||||
|
||||
const currentRouteName = computed(() => route.name);
|
||||
|
||||
localStorage.setItem(
|
||||
"token",
|
||||
"eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzA3NjExNzIsImV4cCI6MTY3MDc2ODM3MiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.9e8c4d3933c3a6d9b660e0b849940c813e1c245b3d17646ff7a793100640bc42"
|
||||
);
|
||||
return {
|
||||
routes,
|
||||
name: currentRouteName,
|
||||
@@ -63,8 +67,8 @@ export default defineComponent({
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: rgba(242, 245, 247, 1);
|
||||
// background-color: #ccc;
|
||||
// background-color: rgba(242, 245, 247, 1);
|
||||
background-color: #ccc;
|
||||
#nav {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
export const BASE = 'http://localhost:3000'
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-12-11 16:57:58
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-11 19:15:07
|
||||
* @FilePath: /fe-stu/src/api/api.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
export const BASE = 'http://111.231.196.214:30001/manageApi'
|
||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||
export const FILE_UPLOAD = '/file/upload'
|
||||
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||
@@ -27,3 +35,6 @@ export const DISCUSS_LIKE = '/discussSubmit/clickDiscussLikeCountOr POST'
|
||||
export const DISCUSS_LIST = '/discussSubmit/queryDiscussSubmitDetailByDiscussId'
|
||||
export const DISCUSS_DETAIL = '/discuss/getDiscussDetail'
|
||||
export const DISCUSS_SUBMIT_REVIEW_LIST = '/discussSubmit/queryDiscussSubmitAndReview'
|
||||
|
||||
//投票
|
||||
export const VOTE_DETAIL2 = '/vote/queryStemByStemId POST'
|
||||
@@ -1,5 +1,5 @@
|
||||
import router from "@/router";
|
||||
import {ref, watch} from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
import axios from 'axios';
|
||||
|
||||
export function useRequest(_url, params = {}) {
|
||||
@@ -49,20 +49,20 @@ export async function request(_url, params) {
|
||||
method,
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('token'),
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
...method !== 'get' ? { 'Content-Type': 'application/json' } : {}
|
||||
},
|
||||
baseURL: '',
|
||||
...method !== 'get' ? {data: JSON.stringify(body)} : {}
|
||||
}).then(resp=>resp.data).then(response => {
|
||||
...method !== 'get' ? { data: JSON.stringify(body) } : {}
|
||||
}).then(resp => resp.data).then(response => {
|
||||
if (response.code !== 200 && response.code !== 0) {
|
||||
if (response.code === 3 || response.code === 4 || response.code === 100) {
|
||||
// router.push({path: '/login'})
|
||||
// router.push({path: '/login'})
|
||||
return
|
||||
} else {
|
||||
// response.showMsg && notification.open({
|
||||
// message: response.showMsg,
|
||||
// duration: 2,
|
||||
// });
|
||||
// response.showMsg && notification.open({
|
||||
// message: response.showMsg,
|
||||
// duration: 2,
|
||||
// });
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<div class="left">
|
||||
<div class="title">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
<div class="text">参与情况</div>
|
||||
<div class="box"></div>
|
||||
@@ -34,24 +34,30 @@
|
||||
<!-- <div style="display: flex; align-items: center"></div> -->
|
||||
<div class="all">
|
||||
<div class="item allbox1">
|
||||
<div class="item1" style="color: #089dff">{{ data.accessCnt }}</div>
|
||||
<!-- <div class="item1" style="color: #089dff">
|
||||
{{ data.accessCnt }}
|
||||
</div> -->
|
||||
<div class="item2">参与数</div>
|
||||
</div>
|
||||
<div class="item allbox2">
|
||||
<div class="item1" style="color: #387df7">{{ data.voteCnt }}</div>
|
||||
<!-- <div class="item1" style="color: #387df7">
|
||||
{{ data.voteCnt }}
|
||||
</div> -->
|
||||
<div class="item2">总票数</div>
|
||||
</div>
|
||||
<div class="item allbox3">
|
||||
<div class="item1" style="color: #00c6ff">{{ data.viewCnt }}</div>
|
||||
<!-- <div class="item1" style="color: #00c6ff">
|
||||
{{ data.viewCnt }}
|
||||
</div> -->
|
||||
<div class="item2">浏览数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
<div class="text">参与投票</div>
|
||||
<div class="box"></div>
|
||||
@@ -65,23 +71,23 @@
|
||||
<!-- todo #投票任务 参与投票下面这段文字是固定的么-->
|
||||
<div class="ontitle">
|
||||
通过对各级人员的软件平台培训,使其能够了解如何运用乾元坤和智能信息管理系统来提升企业管理水平,最大限度发挥软件产品在企业中的作用;
|
||||
<br/>
|
||||
<br/>
|
||||
<br />
|
||||
<br />
|
||||
● 培训目标
|
||||
<br/>
|
||||
<br/>
|
||||
<br />
|
||||
<br />
|
||||
1.使企业不同部门人员掌握便捷、有效的系统平台操作方法;
|
||||
<br/>
|
||||
<br/>
|
||||
<br />
|
||||
<br />
|
||||
2.通过系统平台的培训提高员工对企业的管理理念认识与提升。
|
||||
<br/>
|
||||
<br/>
|
||||
<br />
|
||||
<br />
|
||||
3.通过系统平台培训加强沟通,统一部署,协同工作,提高效率。
|
||||
<br/>
|
||||
<br/>
|
||||
<br />
|
||||
<br />
|
||||
●培训对象
|
||||
<br/>
|
||||
<br/>
|
||||
<br />
|
||||
<br />
|
||||
集团领导、各相关部门领导、总经理、车间主管、车间操作员等;
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,40 +95,52 @@
|
||||
<div class="right">
|
||||
<div class="righttitle">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
<div class="text">投票时间</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="timebox clearfix">
|
||||
<div class="innertime">
|
||||
<!-- <div class="innertime">
|
||||
{{
|
||||
data.detail?.voteStartTime
|
||||
}} 至 {{ data.detail?.voteEndTime }}
|
||||
</div>
|
||||
}} 至 {{
|
||||
data.detail?.voteEndTime
|
||||
}}
|
||||
</div> -->
|
||||
<div class="endtime clearfix">
|
||||
<div class="endtimetext">
|
||||
距离结束还有
|
||||
<span class="te">{{ parseInt(dayjs(data.detail?.voteEndTime).diff(dayjs(), 'minute') / 60) }}</span>
|
||||
小时 <span
|
||||
class="te">{{ dayjs(data.detail?.voteEndTime).diff(dayjs(), 'minute') % 60 }}</span> 分钟
|
||||
<!-- <span class="te">{{
|
||||
parseInt(
|
||||
dayjs(data.detail?.voteEndTime).diff(dayjs(), "minute") /
|
||||
60
|
||||
)
|
||||
}}</span
|
||||
> 小时 <span class="te">{{
|
||||
dayjs(data.detail?.voteEndTime).diff(dayjs(), "minute") % 60
|
||||
}}</span
|
||||
> 分钟 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="righttitle">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
width="20px"
|
||||
height="20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
|
||||
<div class="text">投票说明</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="explain clearfix">
|
||||
<div class="explaincontent" v-html="data.detail?.voteExplain"></div>
|
||||
<!-- <div
|
||||
class="explaincontent"
|
||||
v-html="data.detail?.voteExplain"
|
||||
></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,16 +151,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useRequest} from "@/api/request";
|
||||
import {ROUTER_CHAPTER_LIST, ROUTER_LIST, TASK_VOTE_DETAIL} from "@/api/api";
|
||||
import { useRequest } from "@/api/request";
|
||||
import {
|
||||
ROUTER_CHAPTER_LIST,
|
||||
ROUTER_LIST,
|
||||
TASK_VOTE_DETAIL,
|
||||
VOTE_DETAIL2,
|
||||
} from "@/api/api";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const {data} = useRequest(TASK_VOTE_DETAIL, {})
|
||||
|
||||
// const { data } = useRequest(TASK_VOTE_DETAIL, {});
|
||||
// console.log("datadatadata", data);
|
||||
const { dataInfo } = useRequest(VOTE_DETAIL2, { ballotId: 3 });
|
||||
console.log("dataInfo", dataInfo);
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
@@ -342,26 +366,26 @@ const handleClick = (tab, event) => {
|
||||
.allbox1 {
|
||||
margin-right: 22px;
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
rgba(160, 193, 230, 0) 0%,
|
||||
rgba(161, 195, 231, 0.2) 100%
|
||||
0deg,
|
||||
rgba(160, 193, 230, 0) 0%,
|
||||
rgba(161, 195, 231, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.allbox2 {
|
||||
margin-right: 22px;
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
rgba(177, 219, 229, 0) 0%,
|
||||
rgba(172, 216, 227, 0.2) 100%
|
||||
0deg,
|
||||
rgba(177, 219, 229, 0) 0%,
|
||||
rgba(172, 216, 227, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.allbox3 {
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
rgba(195, 209, 234, 0) 0%,
|
||||
rgba(191, 206, 231, 0.2) 100%
|
||||
0deg,
|
||||
rgba(195, 209, 234, 0) 0%,
|
||||
rgba(191, 206, 231, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user