6/22完善引入,
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Echarts from '@/components/Echarts/index.vue';
|
||||
import { workSpaceIncomeTrendListApi, workSpaceOutcomeTrendListApi } from '@/api/workflow';
|
||||
import { getLast7Days } from '@/utils/time';
|
||||
import { EChartsOption } from 'echarts';
|
||||
@@ -114,8 +115,8 @@ async function changeChartConfig(val: number) {
|
||||
|
||||
try {
|
||||
// 1. 定义请求 Promise,如果不需请求则 resolve 空数组
|
||||
const incomePromise = val === 0 || val === 1 ? workSpaceIncomeTrendListApi(id) : Promise.resolve([]);
|
||||
const outcomePromise = val === 0 || val === 2 ? workSpaceOutcomeTrendListApi(id) : Promise.resolve([]);
|
||||
const incomePromise = val === 0 || val === 1 ? await workSpaceIncomeTrendListApi(id) : [];
|
||||
const outcomePromise = val === 0 || val === 2 ? await workSpaceOutcomeTrendListApi(id) : [];
|
||||
// 2. 并行等待,确保顺序一致:[收入数据, 支出数据]
|
||||
const [incomeRes, outcomeRes] = await Promise.all([incomePromise, outcomePromise]);
|
||||
console.log(incomeRes, outcomeRes);
|
||||
|
||||
@@ -5,17 +5,7 @@
|
||||
<svg-icon :icon-class="item.menuIcon" />
|
||||
</div>
|
||||
<div class="quickly_item_content">{{ item.menuName }}</div>
|
||||
<!-- <div class="actionsbox">
|
||||
<div class="routeactions">
|
||||
<el-icon><Position /></el-icon>
|
||||
<span style="padding-left: 0.1rem">跳转</span>
|
||||
</div>
|
||||
<div class="deleteaction">
|
||||
<el-icon><Delete /></el-icon>
|
||||
<span style="padding-left: 0.1rem">删除</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="deleteaction" @click="delteRoute(item.id)">
|
||||
<div class="deleteaction" @click="delteRoute($event, item.id)">
|
||||
<el-icon class="icons"><Remove /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,14 +17,7 @@
|
||||
<!-- 添加快捷入口 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="repairProjectFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<!-- <el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="图标" prop="icon">
|
||||
<el-input v-model="form.icon" placeholder="请输入" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="展示页面" prop="path">
|
||||
<!-- <el-input v-model="form.path" placeholder="请输入" /> -->
|
||||
<el-cascader
|
||||
@change="handleCascader"
|
||||
clearable
|
||||
@@ -59,6 +42,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { addQuicklyshortcut, delQuicklyshortcut, getQuicklyshortcut } from '@/api/workflow';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { Plus, Remove } from '@element-plus/icons-vue';
|
||||
|
||||
// ! 快捷入口
|
||||
const quickBox = ref<
|
||||
@@ -106,7 +90,7 @@ function addQuieckDialog() {
|
||||
dialog.visible = true;
|
||||
}
|
||||
function getquicklist() {
|
||||
getQuicklyshortcut().then((res) => {
|
||||
getQuicklyshortcut({}).then((res) => {
|
||||
quickBox.value = res.data;
|
||||
});
|
||||
}
|
||||
@@ -116,10 +100,13 @@ function handleroutestoshowlist(rotues) {
|
||||
if (!Array.isArray(rotues)) {
|
||||
return [];
|
||||
}
|
||||
const arr = rotues.map((ele) => _hanle(null, ele, 1)).filter((item) => item);
|
||||
quicklylist.value = arr;
|
||||
quicklylist.value = rotues.map((ele) => _handle(null, ele, 1)).filter((item) => item);
|
||||
}
|
||||
function _hanle(parentRoute, currentRoute, level) {
|
||||
function _handle(
|
||||
parentRoute: { name?: any; icon?: any; path: any; level?: any; children?: any[] },
|
||||
currentRoute: { hidden: any; path: string; meta: { title: any; icon: any }; children: any[] },
|
||||
level: number
|
||||
) {
|
||||
// 非页面路由
|
||||
if (currentRoute.hidden && level === 1) {
|
||||
return null;
|
||||
@@ -156,7 +143,7 @@ function _hanle(parentRoute, currentRoute, level) {
|
||||
}
|
||||
// 4. 递归处理子节点
|
||||
if (level < 2 && currentRoute.children && Array.isArray(currentRoute.children)) {
|
||||
obj.children = currentRoute.children.map((item) => _hanle(obj, item, level + 1)).filter((item) => item !== null); // 过滤掉 null 值
|
||||
obj.children = currentRoute.children.map((item) => _handle(obj, item, level + 1)).filter((item) => item !== null); // 过滤掉 null 值
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
@@ -184,7 +171,8 @@ function submitQuick() {
|
||||
getquicklist();
|
||||
});
|
||||
}
|
||||
function delteRoute(id: string) {
|
||||
function delteRoute(e: MouseEvent, id: string) {
|
||||
e.stopPropagation();
|
||||
delQuicklyshortcut(id).then(() => {
|
||||
getquicklist();
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script name="repairEcharts" setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { onMounted } from 'vue';
|
||||
import { workSpaceRepairTrendListApi } from '@/api/workflow';
|
||||
import Echarts from '@/components/Echarts/index.vue';
|
||||
import type { EChartsOption } from 'echarts';
|
||||
|
||||
@@ -21,81 +21,77 @@ import repairEcharts from './repairEcharts.vue';
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// echarts
|
||||
.echartsbox {
|
||||
height: inherit;
|
||||
.echarts {
|
||||
margin-right: 20px;
|
||||
.echarts {
|
||||
margin-right: 20px;
|
||||
flex: 1;
|
||||
height: 450px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 70%);
|
||||
border: 2px solid #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.nav {
|
||||
.ecarts_title {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
color: #303133;
|
||||
line-height: 25px;
|
||||
}
|
||||
.echarts_units {
|
||||
margin-left: 10px;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #98a4b2;
|
||||
line-height: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
.echarts_all_baoxiu {
|
||||
height: 18px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #98a4b2;
|
||||
line-height: 18px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.echarts_all_arrow {
|
||||
display: block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: 1px solid #ccc;
|
||||
transform: rotateZ(45deg);
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.actions {
|
||||
width: 60px;
|
||||
height: 22px;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
background-color: #f6f7fb;
|
||||
color: #99a5b3;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
&:hover {
|
||||
color: #036aff;
|
||||
background-color: #036cff25;
|
||||
}
|
||||
}
|
||||
.actions.active {
|
||||
color: white;
|
||||
background-color: #036aff;
|
||||
}
|
||||
}
|
||||
.echartsbody {
|
||||
flex: 1;
|
||||
height: 450px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 70%);
|
||||
border: 2px solid #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.nav {
|
||||
.ecarts_title {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
color: #303133;
|
||||
line-height: 25px;
|
||||
}
|
||||
.echarts_units {
|
||||
margin-left: 10px;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #98a4b2;
|
||||
line-height: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
.echarts_all_baoxiu {
|
||||
height: 18px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #98a4b2;
|
||||
line-height: 18px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.echarts_all_arrow {
|
||||
display: block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: 1px solid #ccc;
|
||||
transform: rotateZ(45deg);
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.actions {
|
||||
width: 60px;
|
||||
height: 22px;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
background-color: #f6f7fb;
|
||||
color: #99a5b3;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
&:hover {
|
||||
color: #036aff;
|
||||
background-color: #036cff25;
|
||||
}
|
||||
}
|
||||
.actions.active {
|
||||
color: white;
|
||||
background-color: #036aff;
|
||||
}
|
||||
}
|
||||
.echartsbody {
|
||||
flex: 1;
|
||||
margin-top: 20px;
|
||||
}
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
import { addHandleLog, uploadAttachments } from '@/api/system/HandleLog';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { UploadFiles, UploadProps, UploadUserFile } from 'element-plus';
|
||||
import { Upload } from '@element-plus/icons-vue';
|
||||
|
||||
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/handleLog/uploadAttachments';
|
||||
const noticForm = ref({
|
||||
|
||||
@@ -47,7 +47,7 @@ const props = defineProps<{
|
||||
margin-right: 10px;
|
||||
min-height: 109px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, #ffffff 100%);
|
||||
box-shadow: 0px 4px 8px 0px rgba(0, 104, 255, 0.06);
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 104, 255, 0.06);
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
border: 1px solid #ffffff;
|
||||
padding-left: 20px;
|
||||
@@ -56,7 +56,7 @@ const props = defineProps<{
|
||||
.icon {
|
||||
width: 40px;
|
||||
height: 46px;
|
||||
box-shadow: inset 0px 0px 20px 0px #ffffff;
|
||||
box-shadow: inset 0 0 20px 0 #ffffff;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
border: 1px solid #ffffff;
|
||||
margin-right: 15px;
|
||||
|
||||
@@ -17,7 +17,13 @@
|
||||
<div class="villageinfo flex-1">
|
||||
<div class="villagename">{{ props.villageinfo.villageName }}</div>
|
||||
<div class="week">
|
||||
<span style="padding-right: 10px">{{ new Date().toLocaleDateString().replaceAll('/', '-') }}</span>
|
||||
<span style="padding-right: 10px">{{
|
||||
new Intl.DateTimeFormat('zh-cn', {
|
||||
year: 'numeric',
|
||||
month: 'numeric',
|
||||
day: 'numeric'
|
||||
}).format(new Date())
|
||||
}}</span>
|
||||
<span>{{ numToWeek2(new Date().getDay()) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,11 +87,11 @@ const weather_icon = ref({
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
text-align: center;
|
||||
margin-right: 20px;
|
||||
font-size: 60px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
cursor: default;
|
||||
margin-right: 20px;
|
||||
margin: 0 auto;
|
||||
|
||||
.icon_box_text {
|
||||
|
||||
Reference in New Issue
Block a user