This commit is contained in:
2025-09-09 19:18:09 +08:00
70 changed files with 2932 additions and 532 deletions

View File

@ -5,7 +5,8 @@ VITE_APP_TITLE = 煤科建管平台
VITE_APP_ENV = 'development'
# 开发环境
VITE_APP_BASE_API = 'http://192.168.110.180:8899'
VITE_APP_BASE_API = 'http://192.168.110.209:8899'
# 李陈杰 209
# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
# 曾涛

BIN
public/xx.xlsx Normal file

Binary file not shown.

View File

@ -0,0 +1,13 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
/**
* 查询企业关键指标
*/
export const keyIndex = () => {
return request({
url: '/enterprise/big/screen/keyIndex',
method: 'get'
});
};

View File

@ -98,3 +98,18 @@ export const cashTotal = () => {
method: 'get'
});
};
//安全天数
export const getSafetyDay = (projectId) => {
return request({
url: '/money/big/screen/safetyDay/' + projectId,
method: 'get'
});
};
//安全天数
export const getWeather = (projectId) => {
return request({
url: '/money/big/screen/weather/' + projectId,
method: 'get'
});
};

View File

@ -61,3 +61,22 @@ export const delSupplierInput = (id: string | number | Array<string | number>) =
method: 'delete'
});
};
//导入供商入库
export const leadingIn = (formData: FormData, projectId) => {
return request({
url: '/supplierInput/supplierInput/import?projectId=' + projectId,
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
}
});
};
//导入供商出库
export const leadingOut = () => {
return request({
url: '/supplierInput/supplierInput/export',
method: 'post'
});
};

View File

@ -31,3 +31,20 @@ export function delOss(ossId: string | number | Array<string | number>) {
export function downLoadOss(ossId: { id?: string | number; idList?: string | number | Array<string | number> }, url: string, fileName: string) {
return download(url, ossId, fileName);
}
//识别身份证
export function recognizeidCard(data: any, type: any) {
return request({
url: '/contractor/constructionUser/idCard?idCardSide=' + type,
method: 'post',
data: data
});
}
//识别银行卡
export function recognizeBankCard(data: any) {
return request({
url: '/contractor/constructionUser/bankCard',
method: 'post',
data: data
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
src/assets/images/break.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -41,7 +41,7 @@
</template>
<script setup lang="ts">
import { listByIds, delOss } from '@/api/system/oss';
import { listByIds, delOss, recognizeidCard, recognizeBankCard } from '@/api/system/oss';
import { OssVO } from '@/api/system/oss/types';
import { propTypes } from '@/utils/propTypes';
import { globalHeaders } from '@/utils/request';
@ -69,11 +69,15 @@ const props = defineProps({
default: false
},
// 压缩目标大小单位KB。默认300KB以上文件才压缩并压缩至300KB以内
compressTargetSize: propTypes.number.def(300)
compressTargetSize: propTypes.number.def(300),
idCardType: {
type: String,
default: false
}
});
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const emit = defineEmits(['update:modelValue']);
const emit = defineEmits(['update:modelValue', 'success']);
const number = ref(0);
const uploadList = ref<any[]>([]);
const dialogImageUrl = ref('');
@ -121,7 +125,7 @@ watch(
);
/** 上传前loading加载 */
const handleBeforeUpload = (file: any) => {
const handleBeforeUpload = async (file: any) => {
let isImg = false;
if (props.fileType.length) {
let fileExtension = '';
@ -169,10 +173,32 @@ const handleExceed = () => {
};
// 上传成功回调
const handleUploadSuccess = (res: any, file: UploadFile) => {
const handleUploadSuccess = async (res: any, file: UploadFile) => {
if (res.code === 200) {
uploadList.value.push({ name: res.data.fileName, url: res.data.url, ossId: res.data.ossId });
uploadedSuccessfully();
if (props.idCardType) {
const formData = new FormData();
formData.append('file', file.raw); // 假设后端接收的字段名为file
if (props.idCardType === 'front' || props.idCardType === 'back') {
const res = await recognizeidCard(formData, props.idCardType);
if (res.code === 200) {
proxy?.$modal.msgSuccess('身份证识别成功');
emit('success', res.data);
} else {
proxy?.$modal.msgError('身份证识别失败');
}
}
if (props.idCardType === 'bank') {
const res = await recognizeBankCard(formData);
if (res.code === 200) {
proxy?.$modal.msgSuccess('银行卡识别成功');
emit('success', res.data);
} else {
proxy?.$modal.msgError('银行卡识别失败');
}
}
}
} else {
number.value--;
proxy?.$modal.closeLoading();
@ -201,8 +227,7 @@ const uploadedSuccessfully = () => {
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value);
uploadList.value = [];
number.value = 0;
console.log(fileList.value);
console.log(listToString(fileList.value));
emit('update:modelValue', listToString(fileList.value));
proxy?.$modal.closeLoading();
}

View File

@ -9,7 +9,7 @@ import animate from '@/animate';
import { download as dl } from '@/utils/request';
import { useDict } from '@/utils/dict';
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi';
import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels,formatPrice } from '@/utils/ruoyi';
import { downloadFile } from '@/utils/useFileDownload';
import { App } from 'vue';
@ -42,4 +42,5 @@ export default function installPlugin(app: App) {
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.config.globalProperties.animate = animate;
app.config.globalProperties.downloadFile = downloadFile;
app.config.globalProperties.formatPrice = formatPrice;
}

View File

@ -72,9 +72,15 @@ export const constantRoutes: RouteRecordRaw[] = [
component: () => import('@/views/error/401.vue'),
hidden: true
},
{
path: '/ProjectScreen',
component: () => import('@/views/ProjectScreen/index.vue'),
component: () => import('@/views/projectLarge/ProjectScreen/index.vue'),
hidden: true
},
{
path: '/digitalizationScreen',
component: () => import('@/views/enterpriseLarge/digitalizationScreen/index.vue'),
hidden: true
},
{

View File

@ -62,7 +62,23 @@ export const addDateRange = (params: any, dateRange: any[], propName?: string) =
}
return search;
};
// 价格格式化函数
export const formatPrice = (price, show = true) => {
if ((!show && price == 0) || price == '' || price == undefined || price == null) return '';
if (!price && price !== 0) return '0.0000';
// 转换为数字并保留四位小数
const num = Number(price);
if (isNaN(num)) return '0.0000';
const fixedNum = num.toFixed(4);
const [integer, decimal] = fixedNum.split('.');
// 千分位处理
const formattedInteger = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${formattedInteger}.${decimal}`;
};
// 回显数据字典
export const selectDictLabel = (datas: any, value: number | string) => {
if (value === undefined) {

View File

@ -62,14 +62,14 @@
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="quantity" label="数量" align="center" />
<el-table-column prop="specification" label="规格" align="center" />
<el-table-column prop="remark" label="单价" align="center">
<el-table-column label="单价" align="center">
<template #default="scope">
<span>{{ scope.row.unitPrice }}</span>
{{ proxy.formatPrice(scope.row.unitPrice) }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price }}
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<!-- <el-table-column prop="price" label="操作" align="center">
@ -92,7 +92,7 @@
<script setup lang="ts">
import { useUserStoreHook } from '@/store/modules/user';
import { BiddingImportExcelFile, getTreeLimit, biddingLimitListUpdate, sheetList, obtainAllVersionNumbers } from '@/api/bidding/biddingLimit';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);

View File

@ -77,8 +77,8 @@
changePrice(scope.row);
}
"
:precision="2"
:step="0.1"
:min="0"
:precision="4"
:controls="false"
v-if="scope.row.quantity && scope.row.quantity != 0"
/>
@ -86,7 +86,7 @@
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<el-table-column prop="operate" label="操作" align="center">

View File

@ -25,7 +25,11 @@
</el-table-column>
<el-table-column prop="name" label="名称" align="center" />
<el-table-column prop="content" label="内容" align="center" />
<el-table-column prop="price" label="限价" align="center" />
<el-table-column prop="price" label="限价" align="center">
<template #default="scope">
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<el-table-column prop="plannedBiddingTime" align="center">
<template #header> <span style="color: red">*</span>计划招标时间 </template>
<template #default="scope">
@ -158,22 +162,28 @@
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ proxy.formatPrice(scope.row.unitPrice) }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{
proxy.formatPrice(
((scope.row.quantity ? Number(scope.row.quantity) : 0) -
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice) ==
0
? ''
: (
((scope.row.quantity ? Number(scope.row.quantity) : 0) -
: ((scope.row.quantity ? Number(scope.row.quantity) : 0) -
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice)
).toFixed(2)
Number(scope.row.unitPrice),
false
)
}}
</template>
</el-table-column>
@ -207,6 +217,7 @@ import { useUserStoreHook } from '@/store/modules/user';
import { getDicts } from '@/api/system/dict/data';
import { Plus } from '@element-plus/icons-vue';
import { FormInstance } from 'element-plus';
const { proxy } = getCurrentInstance();
import {
treeList,
sheetList,

View File

@ -79,8 +79,8 @@
changePrice(scope.row);
}
"
:precision="2"
:step="0.1"
:min="0"
:precision="4"
:controls="false"
v-if="scope.row.quantity && scope.row.quantity != 0"
/>
@ -88,9 +88,7 @@
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
<!-- {{ scope.row.children.length > 0 ? scope.row.children.reduce((sum, child) => sum + child.price, 0) : scope.row.price }} -->
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
<!-- {{ scope.row.price }} -->
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<el-table-column prop="operate" label="操作" align="center">

View File

@ -41,10 +41,14 @@
<el-table-column prop="specification" label="规格" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="price" label="总价" align="center">
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
{{ proxy.formatPrice(scope.row.unitPrice, false) }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center" width="150">
<template #default="scope">
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
</el-table>
@ -70,8 +74,12 @@
</div>
<template #footer>
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors">取消</el-button>
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors">确认</el-button>
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>取消</el-button
>
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
>确认</el-button
>
</div>
</template>
</el-dialog>

View File

@ -14,8 +14,7 @@
</el-form-item>
<el-form-item label="合同类型" prop="contractType">
<el-select v-model="form.contractType" placeholder="请选择合同类型">
<el-option v-for="item in income_contract_type" :key="item.value" :label="item.label"
:value="item.value" />
<el-option v-for="item in income_contract_type" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="业主单位" prop="contractOwner">
@ -28,15 +27,17 @@
<editor v-model="form.contractedContent" :min-height="192" />
</el-form-item>
<el-form-item label="合同金额" prop="amount">
<el-input v-model="form.amount" placeholder="请输入合同金额"
oninput="value=value.replace(/[^0-9.]/g,'').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" />
<el-input
v-model="form.amount"
placeholder="请输入合同金额"
oninput="value=value.replace(/[^0-9.]/g,'').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="附件">
<FileUpload :multiple="true" :fileType="['pdf']" :onUploadSuccess="onUploadSuccess"
:ref="fileRef" :defaultFileList="tempFileList" />
<FileUpload :multiple="true" :fileType="['pdf']" :onUploadSuccess="onUploadSuccess" :ref="fileRef" :defaultFileList="tempFileList" />
</el-form-item>
</el-form>
<div>
@ -212,11 +213,11 @@ onMounted(async () => {
if (id) {
const { data } = await getIncomeContract(id);
form.value.id = data.id;
form.value.contractOwner = data.contractOwner
form.value.contractOwner = data.contractOwner;
} else {
router.push('/ctr/incomeContract');
}
})
});
</script>
<style scoped lang="scss">
.container {

View File

@ -145,7 +145,13 @@
></el-col>
<el-col :span="12">
<el-form-item label="费用" prop="costEstimation">
<el-input min="0" v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
<el-input-number
:min="0"
:precision="4"
v-model="form.costEstimation"
:controls="false"
placeholder="请输入费用"
/> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="变更费用估算表" label-width="110px" prop="costEstimationFile">

View File

@ -0,0 +1,327 @@
<template>
<div class="header">
<div class="header_left">
<div class="header_left_img">
<img src="@/assets/large/secure.png" style="width: 100%; height: 100%" />
</div>
<div style="font-size: 12px; padding-left: 10px">安全生产天数</div>
<div class="header_left_text">
{{ safetyDay }}
<span style="font-size: 12px"></span>
</div>
</div>
<div class="title">
<div>煤科建管-新能源项目数智化管理平台</div>
<div>Coal Science Construction Management - New Energy Project Digital Intelligent Management Platform</div>
</div>
<div class="header_right">
<div class="top-bar">
<!-- 左侧天气图标 + 日期文字 -->
<div class="left-section">
<div class="weather-list" @mouseenter="requestPause" @mouseleave="resumeScroll">
<div
v-for="(item, i) in weatherList"
:key="i"
class="weather-item"
:style="{ transform: `translateY(-${offsetY}px)`, transition: transition }"
>
<img :src="`../../../src/assets/images/${item.icon}.png`" alt="" />
<div>{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°</div>
<div>{{ item.week }}({{ item.date }})</div>
</div>
</div>
</div>
<!-- 分割线 -->
<div class="divider">
<div class="top-block"></div>
<div class="bottom-block"></div>
</div>
<!-- 右侧管理系统图标 + 文字 -->
<div class="right-section">
<img src="@/assets/large/setting.png" alt="设置图标" />
<span>管理系统</span>
</div>
<!-- 分割线 -->
<div class="divider">
<div class="top-block"></div>
<div class="bottom-block"></div>
</div>
<!-- -->
<div class="change" @click="emit('changePage')">
<el-icon size="20" v-if="!isFull">
<Expand />
</el-icon>
<el-icon size="20" v-else>
<Fold />
</el-icon>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue';
import { getScreenSafetyDay, getScreenWeather } from '@/api/projectScreen';
interface Weather {
week: string;
date: string;
icon: string;
weather: string;
tempMax: string;
tempMin: string;
}
const props = defineProps({
projectId: {
type: String,
default: ''
},
isFull: {
type: Boolean,
default: false
}
});
const emit = defineEmits(['changePage']);
const safetyDay = ref<number>(0);
const weatherList = ref<Weather[]>([]);
const timer = ref<number | null>(0);
const offsetY = ref<number>(0);
const curIndex = ref(0);
const transition = ref('transform 0.5s ease');
const pendingPause = ref(false);
/**
* 判断当前时间是白天/夜晚
*/
function judgeDayOrNight(sunRise: string, sunSet: string) {
// 将 "HH:MM" 格式转为分钟数(便于计算)
const timeToMinutes = (timeStr: any) => {
const [hours, minutes] = timeStr.split(':').map(Number);
return isNaN(hours) || isNaN(minutes) ? 0 : hours * 60 + minutes;
};
// 转换日出、日落时间为分钟数
const sunRiseMinutes = timeToMinutes(sunRise);
const sunSetMinutes = timeToMinutes(sunSet);
// 获取当前时间并转为分钟数
const now = new Date();
const currentMinutes = now.getHours() * 60 + now.getMinutes();
// true 白天 false 夜晚
return currentMinutes >= sunRiseMinutes && currentMinutes <= sunSetMinutes ? true : false;
}
/**
* 设置天气周期滑动
*/
const setWeatherScroll = () => {
curIndex.value += 1;
transition.value = 'transform 0.3s ease';
offsetY.value = curIndex.value * 60;
if (curIndex.value === weatherList.value.length - 1) {
setTimeout(() => {
transition.value = 'none';
curIndex.value = 0;
offsetY.value = 0;
}, 350);
}
};
function startScroll() {
if (timer.value) clearInterval(timer.value);
timer.value = window.setInterval(setWeatherScroll, 5000);
}
function requestPause() {
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
pendingPause.value = true;
}
function resumeScroll() {
console.log('resumeScroll');
pendingPause.value = false;
startScroll();
}
onMounted(() => {
/**
* 获取安全生产天数
*/
getScreenSafetyDay(props.projectId).then((res) => {
const { data, code } = res;
if (code === 200) {
safetyDay.value = data.safetyDay;
}
});
/**
* 获取近三天天气
*/
getScreenWeather(props.projectId).then((res) => {
const { data, code } = res;
if (code === 200) {
data.forEach((item) => {
if (judgeDayOrNight(item.sunRise, item.sunSet)) {
item.weather = item.dayStatus;
item.icon = item.dayIcon;
} else {
item.weather = item.nightStatus;
item.icon = item.nightIcon;
}
});
weatherList.value = data;
// 多添加第一项 实现无缝衔接
weatherList.value = [...weatherList.value, weatherList.value[0]];
startScroll();
}
});
});
onUnmounted(() => {
if (timer.value) {
clearInterval(timer.value);
}
});
</script>
<style scoped lang="scss">
.header {
width: 100%;
height: 80px;
box-sizing: border-box;
padding: 10px;
display: grid;
grid-template-columns: 1fr 2fr 1fr;
color: #fff;
}
.header_left {
display: flex;
align-items: center;
.header_left_img {
width: 48px;
height: 48px;
box-sizing: border-box;
// padding-right: 10px;
}
.header_left_text {
font-weight: 500;
text-shadow: 0px 1.24px 6.21px rgba(25, 179, 250, 1);
}
}
.header_right {
width: 100%;
height: 100%;
display: flex;
}
.title {
color: #fff;
font-family: 'AlimamaShuHeiTi', sans-serif;
text-align: center;
}
.title > div:first-child {
/* 第一个子元素的样式 */
font-size: 38px;
letter-spacing: 0.1em;
}
.title > div:last-child {
/* 最后一个子元素的样式 */
font-size: 14px;
}
/* 顶部栏容器Flex 水平布局 + 垂直居中 */
.top-bar {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
color: #fff;
padding: 8px 16px;
font-size: 14px;
}
/* 左侧区域(天气 + 日期):自身也用 Flex 水平排列,确保元素在一行 */
.left-section {
height: 100%;
display: flex;
align-items: center;
.weather-list {
height: 60px;
overflow: hidden;
.weather-item {
height: 60px;
line-height: 60px;
display: flex;
align-items: center;
& > div:last-child {
margin-left: 10px;
}
img {
width: 50px;
height: 50px;
}
}
}
}
/* 分割线(视觉分隔,可根据需求调整样式) */
.divider {
display: grid;
grid-template-rows: 1fr 1fr;
gap: 2px;
padding: 14px 10px;
}
.divider .top-block {
width: 2px;
height: 7px;
background: #19b5fb;
align-self: start;
}
.divider .bottom-block {
width: 2px;
height: 7px;
background: #19b5fb;
align-self: end;
}
/* 右侧区域(管理系统):图标 + 文字水平排列 */
.right-section {
display: flex;
align-items: center;
font-family: 'AlimamaShuHeiTi', sans-serif;
font-size: 20px;
cursor: pointer;
}
.right-section img {
width: 20px;
height: 20px;
margin-right: 6px;
/* 图标与文字间距 */
}
.change {
display: grid;
place-items: center;
margin-right: 10px;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,540 @@
<template>
<div class="leftPage">
<div class="topPage">
<Title style="font-size: 22px" title="企业关键指标" />
<div class="indicators">
<div class="indicator-card" v-for="indicator in indicators" :key="indicator.id">
<div style="display: flex; align-items: baseline; gap: 4px; margin-bottom: 5px">
<div class="indicator-value">{{ indicator.value }}</div>
<div class="indicator-unit">{{ indicator.unit }}</div>
</div>
<div class="indicator-name">{{ indicator.name }}</div>
<div class="indicator-icon">
<img :src="indicator.iconPath" :alt="indicator.name" v-if="indicator.iconPath" style="width: 50px; height: 50px" />
</div>
</div>
</div>
</div>
<div class="endPage">
<Title style="font-size: 22px" title="人员情况" />
<div class="map">
<div class="project_attendance_chart">
<Title style="font-size: 22px" title="各项目人员出勤率" />
<div class="chart_content" ref="attendanceChartRef"></div>
</div>
<div class="attendance_tag">
<div class="tag_item">
<img src="@/assets/projectLarge/people.svg" alt="" />
<div class="tag_title">出勤人</div>
<div class="tag_info">
{{ attendanceCount }}
<span style="font-size: 14px"></span>
</div>
</div>
<div class="tag_item">
<img src="@/assets/projectLarge/people.svg" alt="" />
<div class="tag_title">在岗人</div>
<div class="tag_info">
{{ peopleCount }}
<span style="font-size: 14px"></span>
</div>
</div>
<div class="tag_item">
<img src="@/assets/projectLarge/people.svg" alt="" />
<div class="tag_title">出勤率</div>
<div class="tag_info">
{{ attendanceRate }}
<span style="font-size: 14px">%</span>
</div>
</div>
</div>
</div>
<div class="attendance_tag"></div>
</div>
<!-- 项目出勤率柱状图 -->
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Title from './title.vue';
import { getScreenNews, getScreenPeople } from '@/api/projectScreen';
import { keyIndex } from '@/api/enterpriseLarge/index';
import { mapOption } from './optionList';
import * as echarts from 'echarts';
const props = defineProps({
projectId: {
type: String,
default: ''
}
});
let mapChart = null;
const mapChartRef = ref<HTMLDivElement | null>(null);
const indicators = ref([
{
id: '1',
name: '在建项目',
value: '28',
unit: '个',
iconPath: '/src/assets/images/beUnder.png'
},
{
id: '2',
name: '合同总额',
value: '288.88',
unit: '亿元',
iconPath: '/src/assets/images/contract.png'
},
{
id: '3',
name: '总容量',
value: '158.88',
unit: '个',
iconPath: '/src/assets/images/totalCapacity.png'
},
{
id: '4',
name: '今日施工',
value: '18',
unit: '个',
iconPath: '/src/assets/images/todayConstruction.png'
}
]);
const news = ref([]);
const newDetail = ref({
title: '',
content: ''
});
const newId = ref('');
const attendanceCount = ref(0);
const attendanceRate = ref(0);
const peopleCount = ref(0);
const teamAttendanceList = ref([{ id: '', teamName: '', attendanceNumber: 0, allNumber: 0, attendanceRate: 0, attendanceTime: '' }]);
// 项目出勤率数据
const projectAttendanceData = ref([
{ name: 'A项目', value: 62 },
{ name: 'B项目', value: 56 },
{ name: 'C项目', value: 95 },
{ name: 'D项目', value: 64 },
{ name: 'E项目', value: 97.5 }
]);
let attendanceChart = null;
const attendanceChartRef = ref<HTMLDivElement | null>(null);
/**
* 获取项目人员出勤数据
*/
const getPeopleData = async () => {
const res = await getScreenPeople(props.projectId);
const { data, code } = res;
if (code === 200) {
attendanceCount.value = data.attendanceCount;
attendanceRate.value = data.attendanceRate;
peopleCount.value = data.peopleCount;
teamAttendanceList.value = data.teamAttendanceList;
}
};
/**
* 获取企业关键指标数据
*/
const getKeyIndexData = async () => {
const res = await keyIndex();
const { data, code } = res;
if (code === 200) {
// 更新指标数据,使用接口返回的指定字段
indicators.value[0].value = data.ongoingProject || 0;
indicators.value[1].value = data.totalContractAmount || 0;
indicators.value[2].value = data.totalCapacity || 0;
indicators.value[3].value = data.todayProject || 0;
}
};
/**
* 初始化项目出勤率柱状图(美化版)
*/
const initAttendanceChart = () => {
if (!attendanceChartRef.value) {
return;
}
attendanceChart = echarts.init(attendanceChartRef.value);
const option = {
backgroundColor: 'transparent',
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
shadowStyle: {
color: 'rgba(29, 214, 255, 0.1)'
}
},
backgroundColor: 'rgba(10, 24, 45, 0.8)',
borderColor: 'rgba(29, 214, 255, 0.3)',
borderWidth: 1,
textStyle: {
color: '#e6f7ff'
},
formatter: (params) => {
const data = params[0];
return `${data.name}<br/>出勤率: ${data.value}%`;
}
},
grid: {
top: 40,
right: 30,
bottom: 40,
left: 30,
containLabel: true,
backgroundColor: 'rgba(10, 24, 45, 0.1)',
borderColor: 'rgba(29, 214, 255, 0.1)',
borderWidth: 1
},
xAxis: {
type: 'category',
data: projectAttendanceData.value.map((item) => item.name),
axisLine: {
lineStyle: {
color: 'rgba(29, 214, 255, 0.3)'
}
},
axisLabel: {
color: '#e6f7ff',
fontSize: 14,
interval: 0,
fontWeight: 'bold',
padding: [10, 0, 0, 0]
},
axisTick: {
show: true,
length: 5,
lineStyle: {
color: 'rgba(29, 214, 255, 0.5)'
}
}
},
yAxis: {
type: 'value',
min: 0,
max: 100,
interval: 20,
axisLine: {
show: true,
lineStyle: {
color: 'rgba(29, 214, 255, 0.3)'
}
},
axisLabel: {
color: '#e6f7ff',
fontSize: 12,
formatter: '{value}%',
padding: [0, 10, 0, 0]
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(29, 214, 255, 0.15)',
type: 'dashed'
}
},
axisTick: {
show: false
}
},
series: [
{
data: projectAttendanceData.value.map((item) => item.value),
type: 'bar',
itemStyle: {
color: function (params) {
// 根据数值动态调整渐变效果
const value = params.value;
const baseColor = new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(29, 214, 255, 1)' },
{ offset: 1, color: 'rgba(10, 120, 200, 0.8)' }
]);
return baseColor;
},
borderRadius: [5, 5, 0, 0],
borderColor: 'rgba(255, 255, 255, 0.3)',
borderWidth: 1
},
barWidth: '45%',
label: {
show: true,
position: 'top',
color: '#e6f7ff',
fontSize: 14,
fontWeight: 'bold',
formatter: '{c}%',
offset: [0, -10]
},
emphasis: {
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(29, 214, 255, 1)' },
{ offset: 1, color: 'rgba(10, 120, 200, 1)' }
]),
shadowBlur: 10,
shadowColor: 'rgba(29, 214, 255, 0.5)',
borderColor: 'rgba(255, 255, 255, 0.5)'
},
label: {
color: '#ffffff',
textShadowBlur: 2,
textShadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
animationDelay: function (idx) {
// 动画延迟,使柱子依次出现
return idx * 100;
}
}
],
// 添加动画效果
animationEasing: 'elasticOut',
animationDelayUpdate: function (idx) {
return idx * 5;
},
// 添加单位标签
graphic: [
{
type: 'text',
left: 10,
top: 10,
style: {
text: '单位: %',
fill: '#8ab2ff',
fontSize: 12
}
}
]
};
attendanceChart.setOption(option);
// 添加窗口大小变化时的图表更新
const handleResize = () => {
if (attendanceChart) {
attendanceChart.resize();
}
};
window.addEventListener('resize', handleResize);
// 清理函数
onUnmounted(() => {
window.removeEventListener('resize', handleResize);
});
};
/**
* 初始化地图
*/
const initMapChart = () => {
if (!mapChartRef.value) {
return;
}
mapChart = echarts.init(mapChartRef.value);
mapChart.setOption(mapOption);
};
onMounted(() => {
// nextTick(() => {
// initMapChart();
// });
getPeopleData();
getKeyIndexData();
// 初始化项目出勤率柱状图
setTimeout(() => {
initAttendanceChart();
}, 100);
});
onUnmounted(() => {
// if (mapChart) {
// mapChart.dispose();
// mapChart = null;
// }
if (attendanceChart) {
attendanceChart.dispose();
attendanceChart = null;
}
});
</script>
<style scoped lang="scss">
.leftPage {
display: flex;
flex-direction: column;
height: 100%;
.topPage,
.endPage {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 15px 0;
border: 1px solid rgba(29, 214, 255, 0.1);
box-sizing: border-box;
}
.endPage {
flex: 1;
margin-top: 23px;
}
.project_attendance_chart {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 15px 0;
border: 1px solid rgba(29, 214, 255, 0.1);
box-sizing: border-box;
.chart_title {
font-size: 16px;
color: #e6f7ff;
margin-bottom: 15px;
text-align: left;
}
.chart_content {
width: 100%;
height: 200px;
position: relative;
}
}
}
.indicators {
width: 100%;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
margin-top: 15px;
padding: 0 15px;
box-sizing: border-box;
}
.indicator-card {
position: relative;
width: 100%;
height: 100px;
background: rgba(10, 24, 45, 0.7);
border: 1px solid rgba(29, 214, 255, 0.2);
border-radius: 4px;
padding: 15px;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
}
.indicator-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, rgba(29, 214, 255, 0.2) 0%, rgba(29, 214, 255, 0.6) 50%, rgba(29, 214, 255, 0.2) 100%);
}
.indicator-value {
font-size: 24px;
font-weight: bold;
color: #e6f7ff;
margin-bottom: 5px;
}
.indicator-unit {
font-size: 14px;
color: #8ab2ff;
margin-bottom: 8px;
}
.indicator-name {
font-size: 14px;
color: #e6f7ff;
}
.indicator-icon {
position: absolute;
bottom: 10px;
right: 10px;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.indicator-icon img {
width: 100%;
height: 100%;
object-fit: contain;
}
.map {
margin-top: 15px;
}
.attendance_tag {
width: 100%;
display: flex;
justify-content: space-between;
padding: 0 30px;
margin-top: 15px;
.tag_item {
width: 28%;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
border: 1px dashed rgba(29, 214, 255, 0.3);
padding: 10px;
.tag_info {
font-size: 20px;
font-weight: 700;
color: rgba(230, 247, 255, 1);
text-shadow: 0px 1.24px 6.21px rgba(0, 190, 247, 1);
}
.tag_title {
font-size: 14px;
font-weight: 400;
color: rgba(230, 247, 255, 1);
}
}
}
.attendance_list {
padding: 0px 30px;
font-size: 14px;
.attendance_item {
display: grid;
grid-template-columns: 3fr 2fr 2fr 3fr;
margin-top: 20px;
}
}
.subfont {
color: rgba(138, 149, 165, 1);
}
</style>

View File

@ -0,0 +1,46 @@
<template>
<div class="title">
<div class="title_icon">
<img src="@/assets/projectLarge/section.svg" alt="" />
<img src="@/assets/projectLarge/border.svg" alt="" />
</div>
<div>
<slot></slot>
</div>
<div>{{ title }}</div>
</div>
</template>
<script setup lang="ts">
defineProps({
title: {
type: String,
default: '标题'
},
prefix: {
type: Boolean,
default: false
}
});
</script>
<style scoped lang="scss">
.title {
width: 100%;
display: flex;
align-items: center;
gap: 3px;
font-family: 'AlimamaShuHeiTi', sans-serif;
.title_icon {
position: relative;
& > img:last-child {
position: absolute;
bottom: 4px;
left: 0;
}
}
}
</style>

View File

@ -22,11 +22,10 @@ import leftPage from './components/leftPage.vue';
import centerPage from './components/centerPage.vue';
import rightPage from './components/rightPage.vue';
import { useUserStoreHook } from '@/store/modules/user';
const userStore = useUserStoreHook();
const projectId = computed(() => userStore.selectedProject.id);
const isFull = ref(false)
const isHideOther = ref(false)
const isFull = ref(false);
const isHideOther = ref(false);
/**
* 切换中心页面全屏
@ -41,7 +40,7 @@ const handleChangePage = () => {
isFull.value = true;
isHideOther.value = true;
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -140,9 +140,9 @@ const createEarth = () => {
// 加载底图
loadBaseMap(earthInstance.viewer);
// 可以取消注释以下代码来设置初始视角
// // 可以取消注释以下代码来设置初始视角
// YJ.Global.flyTo(earthInstance, view);
// YJ.Global.setDefaultView(earthInstance.viewer, view)
// YJ.Global.setDefaultView(earthInstance.viewer, view);
// 地球创建完成后获取并渲染轨迹数据
getTrajectoryData();

View File

@ -1,7 +1,6 @@
<template>
<div class="p-2">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
:leave-active-class="proxy?.animate.searchAnimate.leave">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="100px">
@ -12,15 +11,25 @@
<el-input v-model="queryParams.formalitiesId" placeholder="请输入手续办理清单模板id" clearable @keyup.enter="handleQuery" />
</el-form-item> -->
<el-form-item label="计划开始时间" prop="planTheStartTime">
<el-date-picker clearable v-model="queryParams.planTheStartTime" type="date" value-format="YYYY-MM-DD"
placeholder="请选择计划开始时间" />
<el-date-picker
clearable
v-model="queryParams.planTheStartTime"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择计划开始时间"
/>
</el-form-item>
<el-form-item label="负责人" prop="head">
<el-input v-model="queryParams.head" placeholder="请输入负责人" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="实际完成时间" prop="actualCompletionTime">
<el-date-picker clearable v-model="queryParams.actualCompletionTime" type="date" value-format="YYYY-MM-DD"
placeholder="请选择实际完成时间" />
<el-date-picker
clearable
v-model="queryParams.actualCompletionTime"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择实际完成时间"
/>
</el-form-item>
<!-- <el-form-item label="手续材料" prop="formalitiesUrl">
<el-input v-model="queryParams.formalitiesUrl" placeholder="请输入手续材料" clearable @keyup.enter="handleQuery" />
@ -38,13 +47,15 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd()"
v-hasPermi="['formalities:formalitiesAreConsolidated:getTree']">新增</el-button>
<span style="margin-left: 10px"><el-tooltip class="box-item" effect="dark" content="从原有模板列表选择新增"
placement="top">
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['formalities:formalitiesAreConsolidated:getTree']"
>新增</el-button
>
<span style="margin-left: 10px"
><el-tooltip class="box-item" effect="dark" content="从原有模板列表选择新增" placement="top">
<el-icon color="#409efc">
<WarningFilled />
</el-icon> </el-tooltip></span>
</el-icon> </el-tooltip
></span>
</el-col>
<el-col :span="1.5" v-hasPermi="['formalities:listOfFormalities:list']">
<el-button type="primary" plain icon="Plus" @click="addTemplate()">新增数据</el-button>
@ -71,11 +82,13 @@
</el-row>
</template>
<el-table v-loading="loading" :data="formalitiesAreConsolidatedList" @selection-change="handleSelectionChange"
row-key="id" default-expand-all>
<el-table v-loading="loading" :data="formalitiesAreConsolidatedList" @selection-change="handleSelectionChange" row-key="id" default-expand-all>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="手续办理清单模板父级" align="center" prop="formalitiesPname" /> -->
<el-table-column label="手续办理清单" align="left" prop="formalitiesName" />
<el-table-column label="手续办理清单" align="left" prop="formalitiesName">
<template #default="scope">
<span style="white-space: nowrap">{{ scope.row.formalitiesName }}</span>
</template>
</el-table-column>
<el-table-column label="计划开始时间" align="center" prop="planTheStartTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.planTheStartTime, '{y}-{m}-{d}') }}</span>
@ -95,52 +108,58 @@
<el-table-column label="办理状态" align="center" prop="processingStatus" />
<el-table-column label="手续材料" align="center" prop="formalitiesUrl" width="180">
<template #default="scope">
<div style="display: flex; justify-content: center; align-items: center;">
<div style="display: flex; justify-content: center; align-items: center">
<div>
<el-link type="primary" :underline="false" @click="handlePreview(scope.row)" target="_blank"
v-if="scope.row.formalitiesPid">查看</el-link>
<el-link type="primary" :underline="false" @click="handlePreview(scope.row)" target="_blank" v-if="scope.row.formalitiesPid"
>查看</el-link
>
</div>
<div>
<el-badge v-if="scope.row.fileCount" :value="scope.row.fileCount" class="item" type="danger">
</el-badge>
<el-badge v-if="scope.row.fileCount" :value="scope.row.fileCount" class="item" type="danger"> </el-badge>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" fixed="right">
<template #default="scope">
<div v-if="scope.row.formalitiesPid">
<el-button link type="primary" icon="Edit" v-if="scope.row.processingStatus != '已完成'"
<el-button
link
type="primary"
icon="Edit"
v-if="scope.row.processingStatus != '已完成'"
@click="handleUpdate(scope.row)"
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']">修改</el-button>
<el-button link type="primary" icon="Upload" v-if="scope.row.processingStatus != '已完成'"
@click="handleUpload(scope.row)">上传</el-button>
<el-button link type="primary" icon="EditPen" @click="handleUpdateStatus(scope.row)"
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']">修改状态</el-button>
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']"
>修改</el-button
>
<el-button link type="primary" icon="Upload" v-if="scope.row.processingStatus != '已完成'" @click="handleUpload(scope.row)"
>上传</el-button
>
<el-button
link
type="primary"
icon="EditPen"
@click="handleUpdateStatus(scope.row)"
v-hasPermi="['formalities:formalitiesAreConsolidated:edit']"
>修改状态</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<!-- 添加或修改合规性手续合账对话框 -->
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
<el-form ref="formalitiesAreConsolidatedFormRef" :model="form" :rules="rules" label-width="160px">
<el-form-item label="计划开始时间" prop="planTheStartTime">
<el-date-picker clearable v-model="form.planTheStartTime" type="date" value-format="YYYY-MM-DD"
placeholder="请选择计划开始时间">
<el-date-picker clearable v-model="form.planTheStartTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择计划开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="计划完成时间" prop="planTheStartTime">
<el-date-picker clearable v-model="form.planTheEndTime" type="date" value-format="YYYY-MM-DD"
placeholder="请选择计划完成时间">
<el-date-picker clearable v-model="form.planTheEndTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择计划完成时间">
</el-date-picker>
</el-form-item>
<el-form-item label="负责人" prop="head">
@ -162,8 +181,7 @@
<el-table :data="fileList" style="width: 100%" border v-loading="fileLoading">
<el-table-column prop="fileName" label="文件" align="center">
<template #default="scope">
<el-link :key="scope.row.annexUrl" :href="scope.row.annexUrl" target="_blank" type="primary"
:underline="false">
<el-link :key="scope.row.annexUrl" :href="scope.row.annexUrl" target="_blank" type="primary" :underline="false">
{{ scope.row.fileName || '查看文件' }}
</el-link>
</template>
@ -174,8 +192,13 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="fileTotal > 0" :total="fileTotal" v-model:page="fileParams.pageNum"
v-model:limit="fileParams.pageSize" @pagination="getFileList" />
<pagination
v-show="fileTotal > 0"
:total="fileTotal"
v-model:page="fileParams.pageNum"
v-model:limit="fileParams.pageSize"
@pagination="getFileList"
/>
<template #footer>
<span>
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
@ -185,9 +208,18 @@
<!-- 上传文件对话框 -->
<el-dialog draggable title="上传文件" v-model="fileVisible" width="450">
<el-form-item label="上传文件" prop="processingStatus">
<file-upload v-model="file" ref="uploadRef" uploadUrl="/formalities/formalitiesAnnex"
v-hasPermi="['formalities:formalitiesAnnex:add']" :data="{ formalitiesId: form.id }" :fileType="['pdf']"
:auto-upload="false" showFileList method="put" :onUploadSuccess="handleUploadSuccess" />
<file-upload
v-model="file"
ref="uploadRef"
uploadUrl="/formalities/formalitiesAnnex"
v-hasPermi="['formalities:formalitiesAnnex:add']"
:data="{ formalitiesId: form.id }"
:fileType="['pdf']"
:auto-upload="false"
showFileList
method="put"
:onUploadSuccess="handleUploadSuccess"
/>
</el-form-item>
<template #footer>
<span>
@ -215,14 +247,18 @@
</el-dialog>
<el-dialog title="新增合规性手续合账" v-model="templateVisbile" width="450">
<el-form-item label="合规性手续模板">
<el-cascader v-model="tempValue" :options="tempTreeList" :props="{
<el-cascader
v-model="tempValue"
:options="tempTreeList"
:props="{
multiple: true,
value: 'id',
label: 'name',
disabled: (node: any) => {
return (node.pid == 0 && !node.children.length) || node.status == 1; // 有 parent 的是二级,没有 parent 的是一级,禁用一级
}
}" />
}"
/>
<div style="margin-left: 10px; display: flex; justify-content: center; align-items: center">
<el-tooltip class="box-item" effect="dark" content="列表上已选择得模版不可再选" placement="top">
<el-icon>
@ -248,8 +284,7 @@
<el-option v-for="item in listOfFormalitiesList" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="名称" prop="formalitiesName"
:rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
<el-form-item label="名称" prop="formalitiesName" :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
<el-input v-model="formTemplate.formalitiesName" placeholder="请输入名称" />
</el-form-item>
</el-form>

View File

@ -6,7 +6,7 @@
</div>
<div style="font-size: 12px; padding-left: 10px">安全生产天数</div>
<div class="header_left_text">
1,235
{{ safetyDay }}
<span style="font-size: 12px"></span>
</div>
</div>
@ -16,14 +16,20 @@
</div>
<div class="right">
<div class="top-bar">
<!-- 左侧天气图标 + 日期文字 -->
<!-- 左侧天气轮播区域 -->
<div class="left-section">
<img src="@/assets/large/weather.png" alt="天气图标" />
<span>
<span>多云 9°/18°</span>
<span style="padding-left: 20px"> {{ week[date.week] }} ({{ date.ymd }})</span>
</span>
<div class="weather-list" @mouseenter="requestPause" @mouseleave="resumeScroll">
<div
v-for="(item, i) in weatherList"
:key="i"
class="weather-item"
:style="{ transform: `translateY(-${offsetY}px)`, transition: transition }"
>
<img :src="`../../../src/assets/images/${item.icon}.png`" alt="" />
<div>{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°</div>
<div>{{ item.week }}({{ item.date }})</div>
</div>
</div>
</div>
<!-- 分割线 -->
<div class="divider">
@ -41,38 +47,164 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
import { getSafetyDay, getWeather } from '@/api/largeScreen/index';
interface WeatherData {
date: string;
week: string;
tempMax: string;
tempMin: string;
sunRise: string;
sunSet: string;
dayStatus: string;
dayIcon: string;
nightStatus: string;
nightIcon: string;
}
// 星期映射
const week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
// 日期数据
const date = ref({
ymd: '',
hms: '',
week: 0
});
// 安全生产天数
const safetyDay = ref('');
// 用户存储
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);
// 天气轮播相关变量
const weatherList = ref<WeatherData[]>([]);
const offsetY = ref<number>(0);
const curIndex = ref(0);
const transition = ref('transform 0.5s ease');
const timer = ref<number | null>(0);
const pendingPause = ref(false);
// 判断当前时间是白天/夜晚
function judgeDayOrNight(sunRise: string, sunSet: string) {
const timeToMinutes = (timeStr: string) => {
const [hours, minutes] = timeStr.split(':').map(Number);
return isNaN(hours) || isNaN(minutes) ? 0 : hours * 60 + minutes;
};
const sunRiseMinutes = timeToMinutes(sunRise);
const sunSetMinutes = timeToMinutes(sunSet);
const now = new Date();
const currentMinutes = now.getHours() * 60 + now.getMinutes();
return currentMinutes >= sunRiseMinutes && currentMinutes <= sunSetMinutes;
}
// 天气轮播逻辑每5秒切换一次
const setWeatherScroll = () => {
curIndex.value += 1;
transition.value = 'transform 0.3s ease';
offsetY.value = curIndex.value * 60; // 每个天气项高度60px需和样式一致
// 轮播到最后一项时,无缝衔接回第一项
if (curIndex.value === weatherList.value.length - 1) {
setTimeout(() => {
transition.value = 'none';
curIndex.value = 0;
offsetY.value = 0;
}, 350);
}
};
// 启动轮播定时器
function startScroll() {
if (timer.value) clearInterval(timer.value);
timer.value = window.setInterval(setWeatherScroll, 5000) as unknown as number;
}
// 鼠标悬浮暂停轮播
function requestPause() {
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
pendingPause.value = true;
}
// 鼠标离开恢复轮播
function resumeScroll() {
pendingPause.value = false;
startScroll();
}
// 设置实时时间
const setTime = () => {
let date1 = new Date();
let year: any = date1.getFullYear();
let month: any = date1.getMonth() + 1;
let day: any = date1.getDate();
let hours: any = date1.getHours();
if (hours < 10) {
hours = '0' + hours;
}
let minutes: any = date1.getMinutes();
if (minutes < 10) {
minutes = '0' + minutes;
}
let seconds: any = date1.getSeconds();
if (seconds < 10) {
seconds = '0' + seconds;
}
date.value.ymd = year + '-' + month + '-' + day;
date.value.hms = hours + ':' + minutes + ':' + seconds;
const date1 = new Date();
const year = date1.getFullYear();
const month = date1.getMonth() + 1;
const day = date1.getDate();
const hours = date1.getHours().toString().padStart(2, '0');
const minutes = date1.getMinutes().toString().padStart(2, '0');
const seconds = date1.getSeconds().toString().padStart(2, '0');
date.value.ymd = `${year}-${month}-${day}`;
date.value.hms = `${hours}:${minutes}:${seconds}`;
date.value.week = date1.getDay();
};
// 添加定时器,每秒更新一次时间
const timer = setInterval(setTime, 1000);
// 获取天气数据
const getWeatherData = async () => {
try {
if (currentProject.value?.id) {
const res = await getWeather(currentProject.value.id);
if (res.code === 200 && res.data && res.data.length > 0) {
weatherList.value = res.data;
// 处理每一天的天气(白天/夜晚切换图标和状态)
weatherList.value.forEach((item) => {
const isDay = judgeDayOrNight(item.sunRise, item.sunSet);
item.status = isDay ? item.dayStatus : item.nightStatus;
item.icon = isDay ? item.dayIcon : item.nightIcon;
item.tempRange = `${item.tempMin}°/${item.tempMax}°`;
});
// 复制第一项实现无缝轮播
weatherList.value = [...weatherList.value, weatherList.value[0]];
startScroll(); // 数据加载后启动轮播
}
}
} catch (error) {
console.error('获取天气数据失败:', error);
}
};
// 获取安全生产天数
const getSafetyDays = async () => {
try {
if (currentProject.value?.id) {
const res = await getSafetyDay(currentProject.value.id);
if (res.code === 200 && res.data) {
safetyDay.value = res.data.safetyDay.toString();
}
}
} catch (error) {
console.error('获取安全生产天数失败:', error);
}
};
// 组件挂载时初始化
onMounted(() => {
setTime(); // 初始化时间
getSafetyDays();
getWeatherData();
// 时间定时器(每秒更新)
window.setInterval(setTime, 1000);
});
// 组件卸载时清除定时器
onUnmounted(() => {
clearInterval(timer);
if (timer.value) {
clearInterval(timer.value);
}
});
</script>
@ -86,41 +218,47 @@ onUnmounted(() => {
grid-template-columns: 1fr 1fr 1fr;
color: #fff;
}
.header_left {
display: flex;
align-items: center;
.header_left_img {
width: 48px;
height: 48px;
box-sizing: border-box;
// padding-right: 10px;
}
.header_left_text {
font-weight: 500;
text-shadow: 0px 1.24px 6.21px rgba(25, 179, 250, 1);
}
}
.header_right {
width: 100%;
height: 100%;
display: flex;
}
.title {
color: #fff;
font-family: 'AlimamaShuHeiTi', sans-serif;
text-align: center;
}
.title > div:first-child {
/* 第一个子元素的样式 */
font-size: 38px;
// font-weight: 300;
letter-spacing: 0.1em;
}
.title > div:last-child {
/* 最后一个子元素的样式 */
font-size: 14px;
letter-spacing: 0.3em; /* 调整这个值来控制间距大小 */
}
.right {
width: 100%;
height: 100%;
display: flex;
}
/* 顶部栏容器Flex 水平布局 + 垂直居中 */
.top-bar {
width: 100%;
@ -128,27 +266,44 @@ onUnmounted(() => {
display: flex;
align-items: center;
justify-content: flex-end;
// background-color: #1e2128;
color: #fff;
padding: 8px 16px;
font-size: 14px;
}
/* 左侧区域(天气 + 日期):自身也用 Flex 水平排列,确保元素在一行 */
.left-section {
height: 100%;
display: flex;
align-items: center;
// margin-right: auto; /* 让右侧元素(管理系统)居右 */
.weather-list {
height: 60px;
overflow: hidden;
.weather-item {
height: 60px;
line-height: 60px;
display: flex;
align-items: center;
& > div:last-child {
margin-left: 10px;
}
.left-section img {
width: 32px;
height: 32px;
margin-right: 8px; /* 图标与文字间距 */
img {
width: 50px;
height: 50px;
}
}
}
}
/* 分割线(视觉分隔,可根据需求调整样式) */
.divider {
display: grid;
grid-template-rows: 1fr 1fr;
height: 100%; /* 根据需要调整高度 */
gap: 2px;
padding: 14px 10px;
}
@ -165,16 +320,27 @@ onUnmounted(() => {
background: #19b5fb;
align-self: end;
}
/* 右侧区域(管理系统):图标 + 文字水平排列 */
.right-section {
display: flex;
align-items: center;
font-family: 'AlimamaShuHeiTi', sans-serif;
font-size: 20px;
cursor: pointer;
}
.right-section img {
width: 20px;
height: 20px;
margin-right: 6px; /* 图标与文字间距 */
margin-right: 6px;
/* 图标与文字间距 */
}
.change {
display: grid;
place-items: center;
margin-right: 10px;
cursor: pointer;
}
</style>

View File

@ -228,8 +228,13 @@ const getMaterialsListData = async () => {
label: item.materialsName + '_' + item.createTime,
children: []
}));
if (TreeData.value.length > 0) {
queryParams.value.materialsId = TreeData.value[0].id;
getList();
} else {
queryParams.value.materialsId = '';
getList();
}
}
};
@ -453,7 +458,7 @@ const listeningProject: WatchStopHandle = watch(
Object.values(childRowStates.value).forEach((state) => {
state.queryParams.projectId = newId;
});
getList();
getMaterialsListData();
}
);

View File

@ -38,7 +38,6 @@
</template>
</el-card>
<!-- 本地数据懒加载表格 -->
<el-table
:data="state.tableData"
v-loading="state.loading.list"
@ -52,15 +51,16 @@
:load="loadLocalChildNodes"
@expand-change="handleExpandChange"
>
<!-- 1. 普通列添加 align="center" 实现表头+单元格居中 -->
<el-table-column align="center" prop="num" label="编号" />
<el-table-column prop="name" label="工程或费用名称" width="180" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="specification" label="规格型号" width="80" />
<el-table-column prop="quantity" label="数量" width="100" />
<el-table-column prop="batchNumber" label="批次号" width="200" />
<el-table-column align="center" prop="name" label="工程或费用名称" width="180" />
<el-table-column align="center" prop="unit" label="单位" />
<el-table-column align="center" prop="specification" label="规格型号" width="80" />
<el-table-column align="center" prop="quantity" label="数量" width="100" />
<el-table-column align="center" prop="batchNumber" label="批次号" width="200" />
<!-- 优化的输入框列 -->
<el-table-column prop="brand" label="品牌">
<!-- 2. 带输入框的列添加 align="center" + 输入框内联样式 text-align: center -->
<el-table-column align="center" prop="brand" label="品牌">
<template #default="{ row }">
<el-input
v-model.lazy="row.brand"
@ -70,11 +70,12 @@
clearable
:key="`brand-${row.id}`"
@change="handleInputChange(row, 'brand')"
style="text-align: center"
/>
</template>
</el-table-column>
<el-table-column prop="texture" label="材质">
<el-table-column align="center" prop="texture" label="材质">
<template #default="{ row }">
<el-input
v-model.lazy="row.texture"
@ -84,6 +85,7 @@
clearable
:key="`texture-${row.id}`"
@change="handleInputChange(row, 'texture')"
style="text-align: center"
/>
</template>
</el-table-column>

View File

@ -73,12 +73,12 @@
</el-row>
</el-form> -->
<el-table :data="tableData" v-loading="loading" row-key="id" border>
<el-table-column prop="num" label="编号" />
<el-table-column prop="name" label="名称" />
<el-table-column prop="specification" label="规格" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="remark" label="备注" />
<el-table-column align="center" prop="num" label="编号" />
<el-table-column align="center" prop="name" label="名称" />
<el-table-column align="center" prop="specification" label="规格" />
<el-table-column align="center" prop="unit" label="单位" />
<el-table-column align="center" prop="quantity" label="数量" />
<el-table-column align="center" prop="remark" label="备注" />
</el-table>
</div>
</el-card>
@ -214,7 +214,7 @@ const getInfo = () => {
console.log('res.data', masterDataRes);
Object.assign(form.value, masterDataRes?.data[0]);
// console.log('form', form.value);
tableData.value = res.rows.reverse();//翻转
tableData.value = res.rows; //正序显示
loading.value = false;
buttonLoading.value = false;
});
@ -319,9 +319,7 @@ onMounted(() => {
.el-input__inner,
.el-select .el-input__inner {
border-radius: 4px;
transition:
border-color 0.2s,
box-shadow 0.2s;
transition: border-color 0.2s, box-shadow 0.2s;
&:focus {
border-color: var(--primary-light);
@ -331,9 +329,7 @@ onMounted(() => {
.el-textarea__inner {
border-radius: 4px;
transition:
border-color 0.2s,
box-shadow 0.2s;
transition: border-color 0.2s, box-shadow 0.2s;
&:focus {
border-color: var(--primary-light);

View File

@ -19,9 +19,9 @@
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:constructionValue:add']">新增</el-button>
</el-col>
</el-col> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
@ -39,8 +39,16 @@
<el-table-column label="人工填报数量" align="center" prop="artificialNum" />
<el-table-column label="无人机识别数量" align="center" prop="uavNum" />
<el-table-column label="确认数量" align="center" prop="confirmNum" />
<el-table-column label="对乙产值" align="center" prop="outValue" />
<el-table-column label="对甲产值" align="center" prop="ownerValue" />
<el-table-column label="对乙产值" align="center" prop="outValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.outValue) }}
</template>
</el-table-column>
<el-table-column label="对甲产值" align="center" prop="ownerValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.ownerValue) }}
</template>
</el-table-column>
<el-table-column label="流程状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.auditStatus" />

View File

@ -24,9 +24,21 @@
<el-table v-loading="loading" :data="monthPlanList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column label="计划月份" align="center" prop="planMonth" />
<el-table-column label="计划产值" align="center" prop="planValue" />
<el-table-column label="完成产值" align="center" prop="completeValue" />
<el-table-column label="差额" align="center" prop="differenceValue" />
<el-table-column label="计划产值" align="center" prop="planValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.planValue) }}
</template>
</el-table-column>
<el-table-column label="完成产值" align="center" prop="completeValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.completeValue) }}
</template>
</el-table-column>
<el-table-column label="差额" align="center" prop="differenceValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.differenceValue) }}
</template>
</el-table-column>
<el-table-column label="类型" align="center">
<template #default="scope">
<span v-if="scope.row.type == '1'">对甲</span>

View File

@ -40,9 +40,21 @@
<el-table v-loading="loading" :data="monthPlanList">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="计划月份" align="center" prop="planMonth" />
<el-table-column label="计划产值(元)" align="center" prop="planValue" />
<el-table-column label="完成产值(元)" align="center" prop="completeValue" />
<el-table-column label="差额(元)" align="center" prop="differenceValue" />
<el-table-column label="计划产值(元)" align="center" prop="planValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.planValue) }}
</template>
</el-table-column>
<el-table-column label="完成产值(元)" align="center" prop="completeValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.completeValue) }}
</template>
</el-table-column>
<el-table-column label="差额(元)" align="center" prop="differenceValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.differenceValue) }}
</template>
</el-table-column>
<el-table-column label="产值类型" align="center" prop="valueType">
<template #default="scope">
<dict-tag :options="out_value_type" :value="scope.row.valueType" />
@ -104,7 +116,7 @@
<script setup name="MonthPlan" lang="ts">
import { listMonthPlan, getMonthPlan, delMonthPlan, addMonthPlan, updateMonthPlan } from '@/api/out/monthPlan';
import { MonthPlanVO } from '@/api/out/monthPlan/types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const { out_value_type } = toRefs<any>(proxy?.useDict('out_value_type'));
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));

View File

@ -31,11 +31,27 @@
</template>
<el-table v-loading="loading" :data="monthPlanAuditList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="设计产值(元)" align="center" prop="designValue" />
<el-table-column label="采购产值(元)" align="center" prop="purchaseValue" />
<el-table-column label="施工产值(元)" align="center" prop="constructionValue" />
<el-table-column label="总产值(元)" align="center" prop="totalValue" />
<el-table-column type="index" width="55" label="序号" align="center" />
<el-table-column label="设计产值(元)" align="center" prop="designValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.designValue) }}
</template>
</el-table-column>
<el-table-column label="采购产值(元)" align="center" prop="purchaseValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.purchaseValue) }}
</template>
</el-table-column>
<el-table-column label="施工产值(元)" align="center" prop="constructionValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.constructionValue) }}
</template>
</el-table-column>
<el-table-column label="总产值(元)" align="center" prop="totalValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalValue) }}
</template>
</el-table-column>
<el-table-column label="计划月份" align="center" prop="planMonth" />
</el-table>

View File

@ -26,12 +26,32 @@
<el-table v-loading="loading" :data="valueAllocationList">
<el-table-column label="项目" align="center" prop="projectName" />
<el-table-column label="月预计产值" align="center" prop="monthEstimatedValue" />
<el-table-column label="完成产值月合计" align="center" prop="monthCompletionValue" />
<el-table-column label="产值差额" align="center" prop="valueDifference" />
<el-table-column label="项目总产值" align="center" prop="totalValue" />
<el-table-column label="累计完成产值" align="center" prop="accumulatedCompletionValue" />
<el-table-column label="项目完成率" align="center" prop="projectCompletionRate" />
<el-table-column label="月预计产值" align="center" prop="monthEstimatedValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.monthEstimatedValue) }}
</template>
</el-table-column>
<el-table-column label="完成产值月合计" align="center" prop="monthCompletionValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.monthCompletionValue) }}
</template></el-table-column
>
<el-table-column label="产值差额" align="center" prop="valueDifference">
<template #default="scope">
{{ proxy.formatPrice(scope.row.valueDifference) }}
</template></el-table-column
>
<el-table-column label="项目总产值" align="center" prop="totalValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalValue) }}
</template></el-table-column
>
<el-table-column label="累计完成产值" align="center" prop="accumulatedCompletionValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.accumulatedCompletionValue) }}
</template></el-table-column
>
<el-table-column label="项目完成率" align="center" prop="projectCompletionRate"></el-table-column>
</el-table>
<pagination
v-show="total > 0"
@ -48,7 +68,7 @@
<script setup name="ValueAllocation" lang="ts">
import { listOutTable } from '@/api/out/outDesignTable';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
import { useUserStoreHook } from '@/store/modules/user';
import { dayjs } from 'element-plus';
// 获取用户 store

View File

@ -23,9 +23,21 @@
<el-card shadow="never">
<el-table v-loading="loading" :data="tableData" v-if="activeTab == '1' || activeTab == '2'">
<el-table-column label="项目" align="center" prop="projectName" />
<el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue" />
<el-table-column label="累计结算产值" align="center" prop="totalSettlementOutputValue" />
<el-table-column label="完工未结算额" align="center" prop="completionUnsettledAmount" />
<el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalCompletionOutputValue) }}
</template>
</el-table-column>
<el-table-column label="累计结算产值" align="center" prop="totalSettlementOutputValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalSettlementOutputValue) }}
</template></el-table-column
>
<el-table-column label="完工未结算额" align="center" prop="completionUnsettledAmount">
<template #default="scope">
{{ proxy.formatPrice(scope.row.completionUnsettledAmount) }}
</template></el-table-column
>
<el-table-column label="完工未结算比例" align="center" prop="completionUnsettledRatio" />
<!-- <el-table-column label="操作" align="center">
<template #default="scope">
@ -36,9 +48,21 @@
<el-table v-loading="loading" :data="tableData" v-if="activeTab == '3'">
<el-table-column label="项目" align="center" prop="projectName" />
<!-- <el-table-column label="累计完工产值" align="center" prop="totalCompletionOutputValue" /> -->
<el-table-column label="分包累计结算产值" align="center" prop="subTotalSettlementOutputValue" />
<el-table-column label="业主累计结算产值" align="center" prop="ownerTotalSettlementOutputValue" />
<el-table-column label="差额" align="center" prop="differenceValue" />
<el-table-column label="分包累计结算产值" align="center" prop="subTotalSettlementOutputValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.subTotalSettlementOutputValue) }}
</template>
</el-table-column>
<el-table-column label="业主累计结算产值" align="center" prop="ownerTotalSettlementOutputValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.ownerTotalSettlementOutputValue) }}
</template></el-table-column
>
<el-table-column label="差额" align="center" prop="differenceValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.differenceValue) }}
</template></el-table-column
>
<!-- <el-table-column label="操作" align="center">
<template #default="scope">
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
@ -47,12 +71,36 @@
</el-table>
<el-table v-loading="loading" :data="tableData" v-if="activeTab == '4'">
<el-table-column label="项目" align="center" prop="projectName" />
<el-table-column label="对甲计划总产值" align="center" prop="ownerTotal" />
<el-table-column label="对乙计划总产值" align="center" prop="subTotal" />
<el-table-column label="对甲月计划产值" align="center" prop="ownerPlanTotal" />
<el-table-column label="对乙月计划产值" align="center" prop="subPlanTotal" />
<el-table-column label="对甲月实际产值" align="center" prop="ownerActualTotal" />
<el-table-column label="对乙月实际产值" align="center" prop="subActualTotal" />
<el-table-column label="对甲计划总产值" align="center" prop="ownerTotal">
<template #default="scope">
{{ proxy.formatPrice(scope.row.ownerTotal) }}
</template></el-table-column
>
<el-table-column label="对乙计划总产值" align="center" prop="subTotal">
<template #default="scope">
{{ proxy.formatPrice(scope.row.subTotal) }}
</template></el-table-column
>
<el-table-column label="对甲月计划产值" align="center" prop="ownerPlanTotal">
<template #default="scope">
{{ proxy.formatPrice(scope.row.ownerPlanTotal) }}
</template></el-table-column
>
<el-table-column label="对乙月计划产值" align="center" prop="subPlanTotal">
<template #default="scope">
{{ proxy.formatPrice(scope.row.subPlanTotal) }}
</template></el-table-column
>
<el-table-column label="对甲月实际产值" align="center" prop="ownerActualTotal">
<template #default="scope">
{{ proxy.formatPrice(scope.row.ownerActualTotal) }}
</template></el-table-column
>
<el-table-column label="对乙月实际产值" align="center" prop="subActualTotal">
<template #default="scope">
{{ proxy.formatPrice(scope.row.subActualTotal) }}
</template></el-table-column
>
<!-- <el-table-column label="操作" align="center">
<template #default="scope">
<el-button type="primary" @click="handleEdit(scope.row)" link icon="Position">联查分包结算</el-button>
@ -75,7 +123,7 @@
<script setup lang="ts">
import { useUserStoreHook } from '@/store/modules/user';
import { listOutTable, comparisonOfOutputValue, comparisonOfSettlementValue } from '@/api/out/outDesignTableVS/index';
const { proxy } = getCurrentInstance();
import { dayjs } from 'element-plus';
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);

View File

@ -16,18 +16,66 @@
<el-card shadow="never">
<el-table v-loading="loading" :data="tableData">
<el-table-column label="项目" align="center" prop="projectName" />
<el-table-column label="项目总产值" align="center" prop="totalValue" />
<el-table-column label="月预计产值" align="center" prop="monthlyEstimatedValue" />
<el-table-column label="完成产值(第一周)" align="center" prop="firstWeekCompletionValue" />
<el-table-column label="完成产值(第二周)" align="center" prop="secondWeekCompletionValue" />
<el-table-column label="完成产值(第三周)" align="center" prop="thirdWeekCompletionValue" />
<el-table-column label="完成产值(第四周)" align="center" prop="fourthWeekCompletionValue" />
<el-table-column label="完成产值(第五周)" align="center" prop="fifthWeekCompletionValue" />
<el-table-column label="完成产值月合计" align="center" prop="totalCompletionValue" />
<el-table-column label="产值差额" align="center" prop="valueDifference" />
<el-table-column label="预计累计产值" align="center" prop="estimatedAccumulatedValue" />
<el-table-column label="累计完成产值" align="center" prop="accumulatedCompletionValue" />
<el-table-column label="产值差额" align="center" prop="valueDifferenceAccumulation" />
<el-table-column label="项目总产值" align="center" prop="totalValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalValue) }}
</template>
</el-table-column>
<el-table-column label="月预计产值" align="center" prop="monthlyEstimatedValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.monthlyEstimatedValue) }}
</template></el-table-column
>
<el-table-column label="完成产值(第一周)" align="center" prop="firstWeekCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.firstWeekCompletionValue) }}
</template></el-table-column
>
<el-table-column label="完成产值(第二周)" align="center" prop="secondWeekCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.secondWeekCompletionValue) }}
</template></el-table-column
>
<el-table-column label="完成产值(第三周)" align="center" prop="thirdWeekCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.thirdWeekCompletionValue) }}
</template></el-table-column
>
<el-table-column label="完成产值(第四周)" align="center" prop="fourthWeekCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.fourthWeekCompletionValue) }}
</template></el-table-column
>
<el-table-column label="完成产值(第五周)" align="center" prop="fifthWeekCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.fifthWeekCompletionValue) }}
</template></el-table-column
>
<el-table-column label="完成产值月合计" align="center" prop="totalCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.totalCompletionValue) }}
</template></el-table-column
>
<el-table-column label="产值差额" align="center" prop="valueDifference"
><template #default="scope">
{{ proxy.formatPrice(scope.row.valueDifference) }}
</template></el-table-column
>
<el-table-column label="预计累计产值" align="center" prop="estimatedAccumulatedValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.estimatedAccumulatedValue) }}
</template></el-table-column
>
<el-table-column label="累计完成产值" align="center" prop="accumulatedCompletionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.accumulatedCompletionValue) }}
</template></el-table-column
>
<el-table-column label="产值差额" align="center" prop="valueDifferenceAccumulation"
><template #default="scope">
{{ proxy.formatPrice(scope.row.valueDifferenceAccumulation) }}
</template></el-table-column
>
<el-table-column label="项目完成总进度" align="center" prop="totalCompletionProgress" />
</el-table>
<pagination
@ -50,6 +98,7 @@ import { listOutTable } from '@/api/out/outTable';
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);
const activeTab = ref('1');
const { proxy } = getCurrentInstance() as any;
const queryParams = ref({
month: '',
pageNum: 1,
@ -110,7 +159,7 @@ const resetMonth=()=>{
// 形成"YYYY-M"格式
const formattedDate = `${year}-${String(month).padStart(2, '0')}`;
queryParams.value.month = formattedDate;
}
};
onMounted(() => {
resetMonth();

View File

@ -12,7 +12,11 @@
<el-table-column label="规格" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="接收数量" align="center" prop="acceptedQuantity" />
<el-table-column label="价格" align="center" prop="unitPrice"> </el-table-column>
<el-table-column label="价格" align="center" prop="unitPrice">
<template #default="scope">
{{ proxy.formatPrice(scope.row.unitPrice) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark"> </el-table-column>
<el-table-column label="操作" align="center" prop="remark" v-if="queryParams.type == '1'">
<template #default="scope">

View File

@ -48,7 +48,11 @@
<span>{{ parseTime(scope.row.settlementDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结算产值" align="center" prop="settlementValue" />
<el-table-column label="结算产值" align="center" prop="settlementValue" >
<template #default="scope">
<span>{{ proxy.formatPrice(scope.row.settlementValue) }}</span>
</template>
</el-table-column>
<el-table-column label="说明" align="center" prop="remark" />
<el-table-column label="合同编码" align="center" prop="contractCode" />
<el-table-column label="合同名称" align="center" prop="contractName" />

View File

@ -17,14 +17,46 @@
<el-table v-loading="loading" :data="valueAllocationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="对甲总产值" align="center" prop="ownerTotalValue" />
<el-table-column label="对甲设计产值" align="center" prop="ownerDesignValue" />
<el-table-column label="对甲采购产值" align="center" prop="ownerPurchaseValue" />
<el-table-column label="对甲施工产值" align="center" prop="ownerConstructionValue" />
<el-table-column label="对乙总产值" align="center" prop="subTotalValue" />
<el-table-column label="对设计产值" align="center" prop="subDesignValue" />
<el-table-column label="对乙采购产值" align="center" prop="subPurchaseValue" />
<el-table-column label="对乙施工产值" align="center" prop="subConstructionValue" />
<el-table-column label="对甲总产值" align="center" prop="ownerTotalValue">
<template #default="scope">
{{ proxy.formatPrice(scope.row.ownerTotalValue) }}
</template>
</el-table-column>
<el-table-column label="对设计产值" align="center" prop="ownerDesignValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.ownerDesignValue) }}
</template></el-table-column
>
<el-table-column label="对甲采购产值" align="center" prop="ownerPurchaseValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.ownerPurchaseValue) }}
</template></el-table-column
>
<el-table-column label="对甲施工产值" align="center" prop="ownerConstructionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.ownerConstructionValue) }}
</template></el-table-column
>
<el-table-column label="对乙总产值" align="center" prop="subTotalValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.subTotalValue) }}
</template></el-table-column
>
<el-table-column label="对乙设计产值" align="center" prop="subDesignValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.subDesignValue) }}
</template></el-table-column
>
<el-table-column label="对乙采购产值" align="center" prop="subPurchaseValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.subPurchaseValue) }}
</template></el-table-column
>
<el-table-column label="对乙施工产值" align="center" prop="subConstructionValue"
><template #default="scope">
{{ proxy.formatPrice(scope.row.subConstructionValue) }}
</template></el-table-column
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">

View File

@ -69,22 +69,22 @@
</el-table-column>
<el-table-column label="综合单价(业主)" align="center" prop="ownerPrice">
<template #default="{ row }">
{{ row.unitType == 0 ? '' : row.ownerPrice }}
{{ row.unitType == 0 ? '' : proxy.formatPrice(row.ownerPrice) }}
</template>
</el-table-column>
<el-table-column label="综合单价(分包)" align="center" prop="constructionPrice">
<template #default="{ row }">
{{ row.unitType == 0 ? '' : row.constructionPrice }}
{{ row.unitType == 0 ? '' : proxy.formatPrice(row.constructionPrice) }}
</template>
</el-table-column>
<el-table-column label="产值金额(业主)" align="center" prop="ownerOutputValue">
<template #default="{ row }">
{{ row.unitType == 0 ? '' : row.ownerOutputValue }}
{{ row.unitType == 0 ? '' : proxy.formatPrice(row.ownerOutputValue) }}
</template>
</el-table-column>
<el-table-column label="产值金额(分包)" align="center" prop="constructionOutputValue">
<template #default="{ row }">
{{ row.unitType == 0 ? '' : row.constructionOutputValue }}
{{ row.unitType == 0 ? '' : proxy.formatPrice(row.constructionOutputValue) }}
</template>
</el-table-column>
<el-table-column label="总数量" align="center" prop="total">
@ -192,7 +192,7 @@ import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from
import { getTabList } from '@/api/progress/progressCategoryTemplate';
import { useUserStoreHook } from '@/store/modules/user';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const { progress_unit_type, progress_work_type } = toRefs<any>(proxy?.useDict('progress_unit_type', 'progress_work_type'));
const activeTab = ref('0');
const relevancyStructure = ref('1');

View File

@ -148,7 +148,7 @@
<el-table-column label="薪水" align="center" min-width="180">
<template #default="scope">
<span class="flex justify-center">
{{ scope.row.salary ? scope.row.salary : scope.row.standardSalary }}
{{ proxy.formatPrice(scope.row.salary ? scope.row.salary : scope.row.standardSalary) }}
(<dict-tag :options="wage_measure_unit_type" :value="scope.row.wageMeasureUnit"></dict-tag>)
</span>
<div class="text-blue text-sm cursor-pointer" @click="openSalaryDialog(scope.row)">{{ scope.row.salary ? '取消变更' : '变更' }}</div>
@ -516,7 +516,7 @@ import { AttendanceMonthVO } from '@/api/project/attendance/types';
import { parseTime } from '@/utils/ruoyi';
const calendar = ref<CalendarInstance>();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_status_type, wage_measure_unit_type } = toRefs<any>(
proxy?.useDict('type_of_work', 'user_sex_type', 'user_clock_type', 'user_file_type', 'user_status_type', 'wage_measure_unit_type')
);

View File

@ -22,7 +22,7 @@
<div>
<div>
<span>租金</span>
<span>{{ detailInfo.rentSum / 1000 }} 万元</span>
<span>{{ proxy.formatPrice(detailInfo.rentSum) / 1000 }} 万元</span>
</div>
<el-icon :size="50" color="#3176ff">
<Postcard />
@ -74,18 +74,30 @@
<el-table-column label="设计面积(亩)" align="center" prop="designArea" width="180" />
<el-table-column label="责任人" align="center" prop="responsiblePerson" />
<el-table-column label="预计完成时间" align="center" prop="expectedFinishDate" width="180"> </el-table-column>
<el-table-column label="流转状态" align="center" prop="transferStatusName" />
<el-table-column label="流转状态" align="center" prop="type" />
<el-table-column label="已流转面积(亩)" align="center" prop="transferArea" width="180" />
<el-table-column label="不流转数据" align="center" prop="noTrans" width="180" />
<el-table-column label="未流转数据" align="center" prop="noTransferAea" width="180" />
<el-table-column label="不流转面积(亩)" align="center" prop="noTrans" width="180" />
<el-table-column label="未流转面积(亩)" align="center" prop="noTransferAea" width="180" />
<el-table-column label="流转比例(%)" align="center" width="180">
<template #default="scope">
{{ scope.row.transferArea && scope.row.designArea ? ((scope.row.transferArea / scope.row.designArea) * 100).toFixed(2) : '0.00' }}
</template>
</el-table-column>
<el-table-column label="土地租金(元)" align="center" prop="landRentAll" width="180" />
<el-table-column label="青苗赔偿(元)" align="center" prop="seedlingCompensationAll" width="180" />
<el-table-column label="总金额(元)" align="center" prop="totalAmountAll" width="150" />
<el-table-column label="土地租金(元)" align="center" prop="landRentAll" width="180">
<template #default="scope">
{{ proxy.formatPrice(scope.row.landRentAll) }}
</template></el-table-column
>
<el-table-column label="青苗赔偿(元)" align="center" prop="seedlingCompensationAll" width="180">
<template #default="scope">
{{ proxy.formatPrice(scope.row.seedlingCompensationAll) }}
</template></el-table-column
>
<el-table-column label="总金额(元)" align="center" prop="totalAmountAll" width="150">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalAmountAll) }}
</template></el-table-column
>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template #default="scope">
@ -120,7 +132,7 @@
</div>
<div class="summary-item transfer-area">
<div class="summary-content">
<span class="summary-label">已流转面积</span>
<span class="summary-label">已流转面积()</span>
<span class="summary-value">{{ sonSummaryInfo.totalTransferArea }} </span>
</div>
<el-icon class="summary-icon" :size="50" color="#3176ff">
@ -129,7 +141,7 @@
</div>
<div class="summary-item non-transfer-area">
<div class="summary-content">
<span class="summary-label">不流转面积</span>
<span class="summary-label">不流转面积()</span>
<span class="summary-value">{{ sonSummaryInfo.totalNonTransferArea }} </span>
</div>
<el-icon class="summary-icon" :size="50" color="#3176ff">
@ -138,7 +150,7 @@
</div>
<div class="summary-item remaining-area">
<div class="summary-content">
<span class="summary-label">未流转面积</span>
<span class="summary-label">未流转面积()</span>
<span class="summary-value">{{ sonSummaryInfo.remainingArea }} </span>
</div>
<el-icon class="summary-icon" :size="50" color="#3176ff">
@ -168,9 +180,21 @@
<el-table-column label="流转状态" align="center" prop="transferStatusName" />
<el-table-column label="已流转面积(亩)" align="center" prop="areaValue" width="180" />
<el-table-column label="流转比例(%)" align="center" prop="transferRatio" width="180" />
<el-table-column label="土地租金(元)" align="center" prop="landRent" width="180" />
<el-table-column label="青苗赔偿(元)" align="center" prop="seedlingCompensation" width="180" />
<el-table-column label="总金额(元)" align="center" prop="totalAmount" width="150" />
<el-table-column label="土地租金(元)" align="center" prop="landRent" width="180">
<template #default="scope">
{{ proxy.formatPrice(scope.row.landRent) }}
</template></el-table-column
>
<el-table-column label="青苗赔偿(元)" align="center" prop="seedlingCompensation" width="180">
<template #default="scope">
{{ proxy.formatPrice(scope.row.seedlingCompensation) }}
</template></el-table-column
>
<el-table-column label="总金额(元)" align="center" prop="totalAmount" width="150">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalAmount) }}
</template></el-table-column
>
<el-table-column label="状态说明" align="center" prop="statusDescription" />
<el-table-column label="问题总结" align="center" prop="issueSummary" />
<el-table-column label="下一步策略" align="center" prop="nextStrategy" width="180" />
@ -180,7 +204,7 @@
<!-- 不流转子项 -->
<div v-if="sonTransferLedgerList2.length > 0">
<h4 style="margin-top: 20px; margin-bottom: 10px; color: #ff6b6b">不流转</h4>
<el-table v-loading="sonLoading" :data="sonTransferLedgerList2" @selection-change="handleSonSelectionChange">
<el-table v-loading="sonLoading" :data="sonTransferLedgerList2" @selection-change="handleSonSelectionChange" width="100%">
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column label="土地类型" align="center" prop="landTypeName" />
<el-table-column label="地块" align="center" prop="landName" />
@ -221,8 +245,8 @@
</el-dialog>
<!-- 新增子项对话框 -->
<el-dialog draggable :title="sonFormDialog.title" v-model="sonFormDialog.visible" width="600px" append-to-body>
<el-form ref="sonLandTransferLedgerFormRef" :model="sonForm" :rules="sonRules" label-width="120px">
<el-dialog draggable :title="sonFormDialog.title" v-model="sonFormDialog.visible" width="650px" append-to-body>
<el-form ref="sonLandTransferLedgerFormRef" :model="sonForm" :rules="sonRules" label-width="150px">
<el-row>
<el-col :span="24">
<el-form-item label="对应地块" prop="landBlockId">
@ -292,7 +316,7 @@
<el-form-item label="已流转面积(亩)" prop="areaValue">
<el-input v-model="sonForm.areaValue" type="number" placeholder="请输入已流转面积" @input="calcSonTransferRatio" />
<div style="color: #ff4d4f; font-size: 12px; margin-top: 4px">
{{ sonForm.areaValue && sonForm.transferStatus == '1' ? `提示:已流转面积不能超过设计面积 ${sonForm.designArea}` : '' }}
{{ sonForm.areaValue && sonForm.transferStatus == '1' ? `提示:当前剩余${sonSummaryInfo.remainingArea}` : '' }}
</div>
</el-form-item>
</el-col>
@ -325,11 +349,11 @@
<el-form-item label="不流转面积(亩)" prop="areaValue">
<el-input v-model="sonForm.areaValue" type="number" placeholder="请输入不流转面积" />
<div style="color: #ff4d4f; font-size: 12px; margin-top: 4px">
{{ sonForm.areaValue && sonForm.transferStatus == '2' ? `提示:不流转面积不能超过设计面积 ${sonForm.designArea}` : '' }}
{{ sonForm.areaValue && sonForm.transferStatus == '2' ? `提示:当前剩余 ${sonSummaryInfo.remainingArea}` : '' }}
</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="sonForm.transferStatus == '2'">
<el-col :span="24" v-if="sonForm.transferStatus == '2'" style="">
<el-form-item label="不签合同面积(亩)" prop="noContractArea">
<el-input v-model="sonForm.noContractArea" type="number" placeholder="请输入不签合同面积" />
</el-form-item>
@ -557,7 +581,7 @@ interface PageData<T, Q> {
rules: Record<string, any[]>;
}
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
@ -751,6 +775,16 @@ const sonRules = {
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
parentId: [{ required: true, message: '父级ID不能为空', trigger: 'blur' }],
landType: [{ required: true, message: '土地类型不能为空', trigger: 'change' }],
landRent: [{ required: true, message: '土地租金不能为空', trigger: 'blur' }],
seedlingCompensation: [{ required: true, message: '青苗赔偿不能为空', trigger: 'blur' }],
totalAmount: [{ required: true, message: '总金额不能为空', trigger: 'blur' }],
statusDescription: [{ required: true, message: '状态说明不能为空', trigger: 'blur' }],
issueSummary: [{ required: true, message: '问题总结不能为空', trigger: 'blur' }],
nextStrategy: [{ required: true, message: '下一步策略不能为空', trigger: 'blur' }],
noContractArea: [{ required: true, message: '不签约面积不能为空', trigger: 'blur' }],
noSurveyArea: [{ required: true, message: '不测量面积不能为空', trigger: 'blur' }],
noContractReason: [{ required: true, message: '不签约原因不能为空', trigger: 'blur' }],
nonTransferReason: [{ required: true, message: '不流转原因不能为空', trigger: 'blur' }],
transferRatio: [
{
required: true,

View File

@ -50,9 +50,21 @@
<el-table-column label="流转状态" align="center" prop="transferStatusName" />
<el-table-column label="已流转面积(亩)" align="center" prop="transferAea" width="180" />
<el-table-column label="流转比例(%)" align="center" prop="transferRatio" width="180" />
<el-table-column label="土地租金(元)" align="center" prop="landRent" width="180" />
<el-table-column label="青苗赔偿(元)" align="center" prop="seedlingCompensation" width="180" />
<el-table-column label="总金额(元)" align="center" prop="totalAmount" width="150" />
<el-table-column label="土地租金(元)" align="center" prop="landRent" width="180">
<template #default="scope">
{{ proxy.formatPrice(scope.row.landRent) }}
</template></el-table-column
>
<el-table-column label="青苗赔偿(元)" align="center" prop="seedlingCompensation" width="180">
<template #default="scope">
{{ proxy.formatPrice(scope.row.seedlingCompensation) }}
</template></el-table-column
>
<el-table-column label="总金额(元)" align="center" prop="totalAmount" width="150">
<template #default="scope">
{{ proxy.formatPrice(scope.row.totalAmount) }}
</template>
</el-table-column>
<el-table-column label="状态说明" align="center" prop="statusDescription" />
<el-table-column label="问题总结" align="center" prop="issueSummary" />
<el-table-column label="下一步策略" align="center" prop="nextStrategy" width="180" />
@ -162,7 +174,7 @@ import { listEnterRoad } from '@/api/system/landTransfer/enterRoad';
import { LandTransferLedgerVO, LandTransferLedgerQuery, LandTransferLedgerForm } from '@/api/system/landTransfer/landTransferLedger/types';
import { useUserStoreHook } from '@/store/modules/user';
import { listLandBlock } from '@/api/system/landTransfer/landBlock';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目

View File

@ -152,7 +152,7 @@
<el-table-column label="薪水" align="center" min-width="180">
<template #default="scope">
<span class="flex justify-center">
{{ scope.row.salary ? scope.row.salary : scope.row.standardSalary }}
{{ proxy.formatPrice(scope.row.salary ? scope.row.salary : scope.row.standardSalary) }}
(<dict-tag :options="wage_measure_unit_type" :value="scope.row.wageMeasureUnit"></dict-tag>)
</span>
<div class="text-blue text-sm cursor-pointer" @click="openSalaryDialog(scope.row)">{{ scope.row.salary ? '取消变更' : '变更' }}</div>
@ -217,12 +217,12 @@
</div>
<div class="el-col el-col-12">
<el-form-item label="身份证正面图片" prop="sfzFrontPic">
<image-upload v-model="form.sfzFrontPic" :limit="1" :is-show-tip="false" />
<image-upload v-model="form.sfzFrontPic" :limit="1" :is-show-tip="false" :idCardType="'front'" @success="handleUploadSuccess" />
</el-form-item>
</div>
<div class="el-col el-col-12">
<el-form-item label="身份证背面图片" prop="sfzBackPic">
<image-upload v-model="form.sfzBackPic" :limit="1" :is-show-tip="false" />
<image-upload v-model="form.sfzBackPic" :limit="1" :is-show-tip="false" :idCardType="'back'" @success="handleUploadSuccessBack" />
</el-form-item>
</div>
<div class="el-col el-col-12">
@ -284,7 +284,7 @@
<div class="el-row">
<div class="el-col el-col-24">
<el-form-item label="银行图片" prop="yhkPic">
<image-upload v-model="form.yhkPic" :limit="1" :is-show-tip="false" />
<image-upload v-model="form.yhkPic" :limit="1" :is-show-tip="false" :idCardType="'bank'" @success="handleUploadSuccessBank" />
</el-form-item>
</div>
<div class="el-col el-col-12">
@ -551,7 +551,7 @@ import { AttendanceMonthVO } from '@/api/project/attendance/types';
import { parseTime } from '@/utils/ruoyi';
const calendar = ref<CalendarInstance>();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_status_type, wage_measure_unit_type, user_post_type } = toRefs<any>(
proxy?.useDict('type_of_work', 'user_sex_type', 'user_clock_type', 'user_file_type', 'user_status_type', 'wage_measure_unit_type', 'user_post_type')
);
@ -731,7 +731,35 @@ const uploadPath = computed(() => {
console.log(list);
return list;
});
//身份证正面上传成功
const handleUploadSuccess = (data: any) => {
console.log('上传成功返回的数据:', data);
// 这里可以处理返回的数据
form.value.userName = data.name;
form.value.sex = data.gender == '男' ? 2 : 3;
form.value.nation = data.nation;
form.value.sfzNumber = data.citizenIdentification;
form.value.sfzSite = data.address;
form.value.sfzBirth = formatDate(data.birth);
};
//身份证反面面上传成功
const handleUploadSuccessBack = (data: any) => {
console.log('上传成功返回的数据:', data);
form.value.sfzStart = formatDate(data.issuingDate);
form.value.sfzEnd = formatDate(data.expiryDate);
};
//银行卡上传成功
const handleUploadSuccessBank = (data: any) => {
console.log('上传成功返回的数据:', data);
form.value.yhkNumber = data.bankCardNumber;
};
//格式化时间
const formatDate = (date: any) => {
const year = date.substring(0, 4);
const month = date.substring(4, 6);
const day = date.substring(6, 8);
return `${year}-${month}-${day}`;
};
// 获取项目列表
const getProjectList = async () => {
const res = await ProjectList({});

View File

@ -16,7 +16,7 @@
<el-popover placement="top-start" title="" :width="200" trigger="hover" :content="DetailMoney + '元'">
<template #reference>
<el-tag class="m-2" size="large"
><span style="font-size: 20px; cursor: pointer">金额:{{ totalMoney }}</span></el-tag
><span style="font-size: 20px; cursor: pointer">金额:{{ totalMoney ? proxy.formatPrice(totalMoney) : 0 }}</span></el-tag
>
</template>
</el-popover>
@ -25,7 +25,9 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" min-width="50px" />
<el-table-column label="标题" align="center" prop="title" min-width="120px" />
<el-table-column label="金额" align="center" prop="money" min-width="100px" />
<el-table-column label="金额" align="center" prop="money" min-width="100px">
<template #default="scope"> {{ proxy.formatPrice(scope.row.money) }} </template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding" min-width="200px" fixed="right">
<template #default="scope">
<el-button type="primary" link @click="handleView(scope.row)"

View File

@ -147,7 +147,7 @@
<el-table-column label="薪水" align="center" min-width="180">
<template #default="scope">
<span class="flex justify-center">
{{ scope.row.salary ? scope.row.salary : scope.row.standardSalary }}
{{ proxy.formatPrice(scope.row.salary ? scope.row.salary : scope.row.standardSalary) }}
(<dict-tag :options="wage_measure_unit_type" :value="scope.row.wageMeasureUnit"></dict-tag>)
</span>
<div class="text-blue text-sm cursor-pointer" @click="openSalaryDialog(scope.row)">{{ scope.row.salary ? '取消变更' : '变更' }}</div>
@ -513,7 +513,7 @@ import { AttendanceMonthVO } from '@/api/project/attendance/types';
import { parseTime } from '@/utils/ruoyi';
const calendar = ref<CalendarInstance>();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_status_type, wage_measure_unit_type } = toRefs<any>(
proxy?.useDict('type_of_work', 'user_sex_type', 'user_clock_type', 'user_file_type', 'user_status_type', 'wage_measure_unit_type')
);

View File

@ -59,7 +59,11 @@
<dict-tag :options="subcontract_type" :value="scope.row.contractType" />
</template>
</el-table-column>
<el-table-column label="合同金额" align="center" prop="contractAmount" />
<el-table-column label="合同金额" align="center" prop="contractAmount">
<template #default="scope">
<span>{{ proxy.formatPrice(scope.row.contractAmount) }}</span>
</template>
</el-table-column>
<el-table-column label="合同时间" align="center" prop="contractTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.contractTime, '{y}-{m}-{d}') }}</span>
@ -133,7 +137,7 @@ import { SubcontractVO, SubcontractQuery, SubcontractForm } from '@/api/project/
import { listContractor } from '@/api/project/contractor';
import { useUserStoreHook } from '@/store/modules/user';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
// 获取用户 store
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);

View File

@ -71,7 +71,11 @@
{{ scope.row.wageCalculationType == 1 ? '计时' : '计件' }}
</template>
</el-table-column>
<el-table-column label="工资标准" align="center" prop="wage" />
<el-table-column label="工资标准" align="center" prop="wage">
<template #default="scope">
{{ proxy.formatPrice(scope.row.wage) }}
</template>
</el-table-column>
<el-table-column label="工资计量单位" align="center" prop="wageMeasureUnit">
<template #default="scope">
<dict-tag :options="wage_measure_unit_type" :value="scope.row.wageMeasureUnit" />
@ -141,7 +145,7 @@ import { listWorkWage, getWorkWage, delWorkWage, addWorkWage, updateWorkWage } f
import { WorkWageVO, WorkWageQuery, WorkWageForm, SpecialType } from '@/api/project/workWage/types';
import { useUserStoreHook } from '@/store/modules/user';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const { type_of_work, wage_measure_unit_type } = toRefs<any>(proxy?.useDict('type_of_work', 'wage_measure_unit_type'));
console.log(type_of_work);

View File

@ -0,0 +1,275 @@
<template>
<div class="centerPage">
<div class="topPage">
<div id="earth" style="width: 100%;height: 100%;"></div>
</div>
<div class="endPage" :class="{ 'slide-out-down': isHide }">
<Title title="AI安全巡检">
<img src="@/assets/projectLarge/robot.svg" alt="" height="20px" width="20px">
</Title>
<div class="swiper" v-if="inspectionList.length">
<div class="arrow" :class="{ 'canUse': canLeft }" @click="swiperClick('left')">
<el-icon size="16" :color="canLeft ? 'rgba(29, 214, 255, 1)' : 'rgba(29, 214, 255, 0.3)'">
<ArrowLeft />
</el-icon>
</div>
<div class="swiper_content" ref="swiperContent">
<div class="swiper_item" v-for="(item, i) in inspectionList" :key="i">
<img :src="item.picture" alt="安全巡检" class="swiper_img">
<div class="swiper_date">{{ item.createTime.slice(5) }}</div>
<div class="swiper_tip">{{ item.label }}</div>
</div>
</div>
<div class="arrow" :class="{ 'canUse': canRight }" @click="swiperClick('right')">
<el-icon size="16" :color="canRight ? 'rgba(29, 214, 255, 1)' : 'rgba(29, 214, 255, 0.3)'">
<ArrowRight />
</el-icon>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, toRefs, getCurrentInstance } from "vue"
import Title from './title.vue'
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'
import { getScreenSafetyInspection } from '@/api/projectScreen'
const { proxy } = getCurrentInstance();
const { violation_level_type } = toRefs(proxy?.useDict('violation_level_type'));
const props = defineProps({
isHide: {
type: Boolean,
default: false
},
projectId: {
type: String,
default: ""
}
})
const inspectionList = ref([{
id: "",
label: "",
picture: "",
createTime: ""
}])
const swiperContent = ref()
const swiperItemWidth = ref(100)
const canLeft = ref(false)
const canRight = ref(true)
const swiperClick = (direction) => {
if (!swiperContent.value) return
if (direction === 'right') {
if (swiperContent.value.scrollLeft >= swiperContent.value.scrollWidth - swiperContent.value.clientWidth) {
canRight.value = false
canLeft.value = true
return
}
swiperContent.value.scrollLeft += swiperItemWidth.value
} else {
if (swiperContent.value.scrollLeft <= 0) {
canLeft.value = false
canRight.value = true
return
}
swiperContent.value.scrollLeft -= swiperItemWidth.value
}
// 更新箭头状态
canLeft.value = swiperContent.value.scrollLeft > 0
canRight.value = swiperContent.value.scrollLeft < swiperContent.value.scrollWidth - swiperContent.value.clientWidth
}
const getInspectionList = async () => {
const res = await getScreenSafetyInspection(props.projectId)
const { code, data } = res
if (code === 200) {
data.map(item => {
item.label = violation_level_type.value.find((i) => i.value === item.violationType)?.label
})
inspectionList.value = data
}
}
// 创建地球
const createEarth = () => {
window.YJ.on({
ws: true,
// host: getIP(), //资源所在服务器地址
// username: this.loginForm.username, //用户名 可以不登录(不填写用户名),不登录时无法加载服务端的数据
// password: md5pass, //密码 生成方式md5(用户名_密码)
}).then((res) => {
let earth = new YJ.YJEarth("earth");
window.Earth1 = earth;
YJ.Global.openRightClick(window.Earth1);
YJ.Global.openLeftClick(window.Earth1);
let view = {
"position": {
"lng": 102.03643298211526,
"lat": 34.393586474501,
"alt": 11298179.51993155
},
"orientation": {
"heading": 360,
"pitch": -89.94481747201486,
"roll": 0
}
}
loadBaseMap(earth.viewer)
YJ.Global.CesiumContainer(window.Earth1, {
compass: false, //罗盘
});
// YJ.Global.flyTo(earth, view);
// YJ.Global.setDefaultView(earth.viewer, view)
})
}
// 加载底图
const loadBaseMap = (viewer) => {
// 创建瓦片提供器
const imageryProvider = new Cesium.UrlTemplateImageryProvider({
url: 'https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
// 可选:设置瓦片的格式
fileExtension: 'png',
// 可选:设置瓦片的范围和级别
minimumLevel: 0,
maximumLevel: 18,
// 可选设置瓦片的投影默认为Web Mercator
projection: Cesium.WebMercatorProjection,
// 可选:如果瓦片服务需要跨域请求,设置请求头部
credit: new Cesium.Credit('卫星图数据来源')
});
// 添加图层到视图
const layer = viewer.imageryLayers.addImageryProvider(imageryProvider);
}
onMounted(() => {
getInspectionList()
createEarth()
if (swiperContent.value && swiperContent.value.children.length > 0) {
swiperItemWidth.value = swiperContent.value.children[0].clientWidth + 20
}
})
</script>
<style scoped lang="scss">
.centerPage {
display: flex;
flex-direction: column;
height: 100%;
}
.topPage,
.endPage {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
padding: 15px 0;
border: 1px solid rgba(230, 247, 255, 0.1);
box-sizing: border-box;
}
.topPage {
flex: 1;
margin-bottom: 23px;
transition: flex 0.5s ease;
}
.endPage {
max-height: 300px;
opacity: 1;
transition: all 0.5s ease;
}
/* 向下滑出动画 */
.slide-out-down {
transform: translateY(100%);
opacity: 0;
max-height: 0;
padding: 0;
margin: 0;
border: none;
}
.swiper {
width: 100%;
display: flex;
align-items: center;
gap: 20px;
padding: 20px 20px 10px 20px;
.swiper_content {
width: 100%;
display: flex;
gap: 20px;
transition: all 0.3s ease-in-out;
overflow-x: auto;
&::-webkit-scrollbar {
display: none;
}
}
.swiper_item {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
width: 133px;
height: 84px;
.swiper_img {
width: 133px;
height: 84px;
object-fit: cover;
}
.swiper_date {
position: absolute;
top: 4px;
right: 4px;
font-size: 14px;
font-weight: 400;
color: rgba(230, 247, 255, 1);
}
.swiper_tip {
position: absolute;
bottom: 0;
width: 100%;
padding: 5px 0;
text-align: center;
font-size: 12px;
font-weight: 400;
color: rgba(230, 247, 255, 1);
background-color: rgba(0, 0, 0, 0.5);
}
}
}
.arrow {
display: grid;
place-items: center;
width: 24px;
height: 24px;
border-radius: 50%;
border: 1px solid rgba(29, 214, 255, 0.3);
color: skyblue;
cursor: pointer;
transition: all 0.3s ease;
&.canUse {
border: 1px solid rgba(29, 214, 255, 1);
}
&:hover:not(.canUse) {
opacity: 0.7;
}
}
</style>

View File

@ -19,8 +19,12 @@
<!-- 左侧天气图标 + 日期文字 -->
<div class="left-section">
<div class="weather-list" @mouseenter="requestPause" @mouseleave="resumeScroll">
<div v-for="(item, i) in weatherList" :key="i" class="weather-item"
:style="{ transform: `translateY(-${offsetY}px)`, transition: transition }">
<div
v-for="(item, i) in weatherList"
:key="i"
class="weather-item"
:style="{ transform: `translateY(-${offsetY}px)`, transition: transition }"
>
<img :src="`../../../src/assets/images/${item.icon}.png`" alt="" />
<div>{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°</div>
<div>{{ item.week }}({{ item.date }})</div>
@ -78,15 +82,15 @@ const props = defineProps({
type: Boolean,
default: false
}
})
});
const emit = defineEmits(['changePage'])
const emit = defineEmits(['changePage']);
const safetyDay = ref<number>(0);
const weatherList = ref<Weather[]>([])
const timer = ref<number | null>(0)
const offsetY = ref<number>(0)
const curIndex = ref(0)
const weatherList = ref<Weather[]>([]);
const timer = ref<number | null>(0);
const offsetY = ref<number>(0);
const curIndex = ref(0);
const transition = ref('transform 0.5s ease');
const pendingPause = ref(false);
@ -106,18 +110,16 @@ function judgeDayOrNight(sunRise: string, sunSet: string) {
const now = new Date();
const currentMinutes = now.getHours() * 60 + now.getMinutes();
// true false
return currentMinutes >= sunRiseMinutes && currentMinutes <= sunSetMinutes
? true
: false;
return currentMinutes >= sunRiseMinutes && currentMinutes <= sunSetMinutes ? true : false;
}
/**
* 设置天气周期滑动
*/
const setWeatherScroll = () => {
curIndex.value += 1
curIndex.value += 1;
transition.value = 'transform 0.3s ease';
offsetY.value = curIndex.value * 60
offsetY.value = curIndex.value * 60;
if (curIndex.value === weatherList.value.length - 1) {
setTimeout(() => {
@ -126,7 +128,7 @@ const setWeatherScroll = () => {
offsetY.value = 0;
}, 350);
}
}
};
function startScroll() {
if (timer.value) clearInterval(timer.value);
@ -135,57 +137,56 @@ function startScroll() {
function requestPause() {
if (timer.value) {
clearInterval(timer.value)
timer.value = null
clearInterval(timer.value);
timer.value = null;
}
pendingPause.value = true;
}
function resumeScroll() {
console.log('resumeScroll')
console.log('resumeScroll');
pendingPause.value = false;
startScroll();
}
onMounted(() => {
/**
* 获取安全生产天数
*/
getScreenSafetyDay(props.projectId).then(res => {
const { data, code } = res
getScreenSafetyDay(props.projectId).then((res) => {
const { data, code } = res;
if (code === 200) {
safetyDay.value = data.safetyDay;
}
})
});
/**
* 获取近三天天气
*/
getScreenWeather(props.projectId).then(res => {
const { data, code } = res
getScreenWeather(props.projectId).then((res) => {
const { data, code } = res;
if (code === 200) {
data.forEach(item => {
data.forEach((item) => {
if (judgeDayOrNight(item.sunRise, item.sunSet)) {
item.weather = item.dayStatus
item.icon = item.dayIcon
item.weather = item.dayStatus;
item.icon = item.dayIcon;
} else {
item.weather = item.nightStatus
item.icon = item.nightIcon
item.weather = item.nightStatus;
item.icon = item.nightIcon;
}
})
weatherList.value = data
});
weatherList.value = data;
//
weatherList.value = [...weatherList.value, weatherList.value[0]]
startScroll()
weatherList.value = [...weatherList.value, weatherList.value[0]];
startScroll();
}
})
});
});
onUnmounted(() => {
if (timer.value) {
clearInterval(timer.value)
clearInterval(timer.value);
}
})
});
</script>
<style scoped lang="scss">

View File

@ -0,0 +1,153 @@
export let pieOption = {
// 定义中心文字
graphic: [
{
type: 'text',
left: 'center',
top: '40%',
style: {
// 需要从接口替换
text: '70%',
fontSize: 24,
fontWeight: 'bold',
fill: '#fff'
}
},
{
type: 'text',
left: 'center',
top: '50%',
style: {
text: '总进度',
fontSize: 14,
fill: '#fff'
}
},
],
legend: {
show: true,
type: 'plain',
bottom: 20,
itemWidth: 12,
itemHeight: 12,
textStyle: {
color: '#fff'
}
},
series: {
type: 'pie',
data: [],
radius: [50, 80],
center: ['50%', '45%'],
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{percent|{c} %}',
minMargin: 10,
edgeDistance: 20,
lineHeight: 15,
rich: {
name: {
fontSize: 12,
color: '#fff'
},
percent: {
fontSize: 12,
color: '#fff'
}
}
},
legend: {
top: 'bottom'
},
}
};
export let barOption = {
legend: {
icon: 'rect',
itemWidth: 12,
itemHeight: 12,
// 调整文字与图标间距
data: ['计划流转面积', '已流转面积'],
top: 0,
right: 20,
textStyle: {
color: '#fff',
}
},
xAxis: {
type: 'category',
data: ['地块1', '地块2', '地块3', '地块4', '地块5', '地块6'],
axisLabel: {
color: '#fff'
},
axisLine: {
show: false
},
splitLine: {
show: false
}
},
yAxis: {
name: '单位m²',
type: 'value',
axisLabel: {
formatter: '{value}'
}
},
grid: {
bottom: 0, // 距离容器底部的距离
containLabel: true // 确保坐标轴标签不被裁剪
},
series: [
{
name: '计划流转面积',
type: 'bar',
data: [],
barWidth: '20%',
itemStyle: {
color: 'rgb(29, 253, 253)'
},
},
{
name: '已流转面积',
type: 'bar',
data: [],
barWidth: '20%',
itemStyle: {
color: 'rgb(25, 181, 251)'
},
}
]
};
export let mapOption = {
geo: {
map: 'ch',
roam: true,
aspectScale: Math.cos((47 * Math.PI) / 180),
},
series: [
{
type: 'graph',
coordinateSystem: 'geo',
data: [
{ name: 'a', value: [7.667821250000001, 46.791734269956265] },
{ name: 'b', value: [7.404848750000001, 46.516308805996054] },
{ name: 'c', value: [7.376673125000001, 46.24728858538375] },
{ name: 'd', value: [8.015320625000001, 46.39460918238572] },
{ name: 'e', value: [8.616400625, 46.7020608630855] },
{ name: 'f', value: [8.869981250000002, 46.37539345234199] },
{ name: 'g', value: [9.546196250000001, 46.58676648282309] },
{ name: 'h', value: [9.311399375, 47.182454114178896] },
{ name: 'i', value: [9.085994375000002, 47.55395822835779] },
{ name: 'j', value: [8.653968125000002, 47.47709530818285] },
{ name: 'k', value: [8.203158125000002, 47.44506909144329] }
],
}
]
};

View File

@ -0,0 +1,221 @@
<template>
<div class="leftPage">
<div class="topPage">
<Title title="项目概况" />
<div class="content" v-html="generalize"></div>
</div>
<div class="endPage">
<Title title="形象进度" />
<div class="chart_container">
<div ref="pieChartRef" class="echart" />
<div ref="lineChartRef" class="echart" />
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted, nextTick } from "vue"
import Title from './title.vue'
import * as echarts from 'echarts';
import { pieOption, barOption } from './optionList';
import { getScreenLand, getScreenImgProcess, getScreenGeneralize } from '@/api/projectScreen';
const props = defineProps({
projectId: {
type: String,
default: 0
}
})
const generalize = ref()
// 饼图相关
const pieChartRef = ref<HTMLDivElement | null>(null);
let pieChart: any = null;
const totalPercent = ref(0)
// 折线图相关
const lineChartRef = ref<HTMLDivElement | null>(null);
let lineChart: any = null;
// 土地数据 折线图
const designAreaData = ref([])
const transferAreaData = ref([])
// 饼图数据
const pieData = [
{ label: 'areaPercentage', name: '厂区', value: 0 },
{ label: 'roadPercentage', name: '道路', value: 0 },
{ label: 'collectorLinePercentage', name: '集电线路', value: 0 },
{ label: 'exportLinePercentage', name: '送出线路', value: 0 },
{ label: 'substationPercentage', name: '升压站', value: 0 },
{ label: 'boxTransformerPercentage', name: '箱变', value: 0 },
]
// 初始化饼图
const initPieChart = () => {
if (!pieChartRef.value) {
console.error('未找到饼图容器元素');
return;
}
pieOption.series.data = pieData
pieOption.graphic[0].style.text = totalPercent.value + '%'
pieChart = echarts.init(pieChartRef.value, null, {
renderer: 'canvas',
useDirtyRect: false
});
pieChart.setOption(pieOption);
}
// 初始化折线图
const initLineChart = () => {
if (!lineChartRef.value) {
console.error('未找到折线图容器元素');
return;
}
barOption.series[0].data = designAreaData.value
barOption.series[1].data = transferAreaData.value
lineChart = echarts.init(lineChartRef.value, null, {
renderer: 'canvas',
useDirtyRect: false
});
lineChart.setOption(barOption);
}
// 响应窗口大小变化
const handleResize = () => {
if (pieChart) pieChart.resize();
if (lineChart) lineChart.resize();
};
/**
* 获取项目土地统计数据
*/
const getScreenLandData = async () => {
const res = await getScreenLand(props.projectId);
const { data, code } = res
if (code === 200) {
designAreaData.value = data.map((item: any) => Number(item.designArea))
transferAreaData.value = data.map((item: any) => Number(item.transferArea))
initLineChart();
}
}
/**
* 获取项目形象进度数据
*/
const getScreenImgProcessData = async () => {
const res = await getScreenImgProcess(props.projectId);
const { data, code } = res
if (code === 200) {
totalPercent.value = data.totalPercentage
pieData.forEach((item: any) => {
item.value = data[item.label]
})
initPieChart()
}
}
/**
* 获取项目概况数据
*/
const getScreenGeneralizeData = async () => {
const res = await getScreenGeneralize(props.projectId);
const { data, code } = res
if (code === 200) {
generalize.value = data
}
}
// 组件挂载时初始化图表
onMounted(() => {
getScreenLandData()
getScreenImgProcessData()
getScreenGeneralizeData()
nextTick(() => {
initPieChart();
window.addEventListener('resize', handleResize);
});
});
// 组件卸载时清理
onUnmounted(() => {
window.removeEventListener('resize', handleResize);
if (pieChart) {
pieChart.dispose();
pieChart = null;
}
if (lineChart) {
lineChart.dispose();
lineChart = null;
}
});
</script>
<style scoped lang="scss">
.leftPage {
display: flex;
flex-direction: column;
height: 100%;
.topPage,
.endPage {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 15px 0;
border: 1px solid rgba(29, 214, 255, 0.1);
box-sizing: border-box;
}
.endPage {
flex: 1;
margin-top: 23px;
.chart_container {
display: flex;
flex-direction: column;
gap: 5px;
width: 100%;
height: 100%;
}
.echart {
height: 48%;
width: 100%;
}
}
}
.content {
height: 100px;
margin: 0 15px;
padding: 0 10px;
margin-top: 15px;
box-sizing: border-box;
overflow-y: auto;
&::-webkit-scrollbar-track {
background: rgba(204, 204, 204, 0.1);
border-radius: 10px;
}
&::-webkit-scrollbar-thumb {
background: rgba(29, 214, 255, 0.78);
border-radius: 10px;
}
.content_item {
font-size: 14px;
font-weight: 400;
color: rgba(230, 247, 255, 1);
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
}
.subfont {
color: rgba(138, 149, 165, 1);
}
</style>

View File

@ -0,0 +1,107 @@
<template>
<div class="large_screen">
<Header :projectId="projectId" :isFull="isFull" @changePage="handleChangePage" />
<div class="nav">
<div class="nav_left" :style="{ left: isHideOther ? '-25vw' : '0' }">
<leftPage :projectId="projectId" />
</div>
<div class="nav_center" :style="{ width: isFull ? '100%' : 'calc(50vw - 30px)' }">
<centerPage :projectId="projectId" :isHide="isFull" />
</div>
<div class="nav_right" :style="{ right: isHideOther ? '-25vw' : '0' }">
<rightPage :projectId="projectId" />
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import Header from './components/header.vue';
import leftPage from './components/leftPage.vue';
import centerPage from './components/centerPage.vue';
import rightPage from './components/rightPage.vue';
import { useUserStoreHook } from '@/store/modules/user';
const userStore = useUserStoreHook();
const projectId = computed(() => userStore.selectedProject.id);
const isFull = ref(false);
const isHideOther = ref(false);
/**
* 切换中心页面全屏
*/
const handleChangePage = () => {
if (isFull.value) {
isFull.value = false;
setTimeout(() => {
isHideOther.value = false;
}, 500);
} else {
isFull.value = true;
isHideOther.value = true;
}
};
</script>
<style lang="scss" scoped>
.large_screen {
width: 100vw;
height: 100vh;
background: url('@/assets/large/bg.png') no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
background-color: rgba(4, 7, 17, 1);
overflow: hidden;
}
.nav {
position: relative;
display: grid;
place-items: center;
width: calc(100vw - 30px);
height: calc(100vh - 90px);
margin: 0 auto;
box-sizing: border-box;
color: #fff;
}
.nav_left,
.nav_right {
position: absolute;
width: calc(25vw - 15px);
height: 100%;
transition: all 0.5s ease;
}
.nav_left {
top: 0;
left: 0;
}
.nav_right {
top: 0;
right: 0;
}
.nav_center {
height: 100%;
transition: all 0.5s ease;
}
/* 中间面板全屏动画 */
.full-width {
/* 取消flex增长使用固定宽度 */
width: calc(100vw - 30px);
flex: none;
}
.slide_left {
left: -25vw;
opacity: 0;
}
.slide_right {
right: -25vw;
opacity: 0;
}
</style>

View File

@ -46,16 +46,16 @@
:load="loadChildren"
:has-children="hasChildren"
>
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column prop="icon" label="图标" align="center" width="100">
<el-table-column align="center" prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column align="center" prop="icon" label="图标" width="100">
<template #default="scope">
<svg-icon :icon-class="scope.row.icon" />
</template>
</el-table-column>
<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="status" label="状态" width="80">
<el-table-column align="center" prop="orderNum" label="排序" width="60"></el-table-column>
<el-table-column align="center" prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
<el-table-column align="center" prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
<el-table-column align="center" prop="status" label="状态" width="80">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
@ -65,7 +65,7 @@
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="180">
<el-table-column align="center" fixed="right" label="操作" width="180">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-button v-hasPermi="['system:menu:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)" />

View File

@ -81,8 +81,8 @@
changePrice(scope.row);
}
"
:precision="2"
:step="0.1"
:precision="4"
:min="0"
:controls="false"
v-if="scope.row.quantity && scope.row.quantity != 0"
:disabled="versionsData.status != 'draft'"
@ -91,7 +91,7 @@
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率" width="100" align="center">
@ -154,7 +154,7 @@ interface VersionItem {
}
// 实例与状态初始化
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as any;
const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);

View File

@ -41,10 +41,14 @@
<el-table-column prop="specification" label="规格" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ proxy.formatPrice(scope.row.unitPrice) }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
</el-table>

View File

@ -41,10 +41,14 @@
<el-table-column prop="specification" label="规格" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ proxy.formatPrice(scope.row.unitPrice) }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price != 0 ? Number(scope.row.price).toFixed(2) : null }}
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
</el-table>

View File

@ -25,7 +25,11 @@
</el-table-column>
<el-table-column prop="name" label="名称" align="center" />
<el-table-column prop="content" label="内容" align="center" />
<el-table-column prop="price" label="限价" align="center" />
<el-table-column prop="price" label="限价" align="center">
<template #default="scope">
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<el-table-column prop="bidd" align="center">
<template #header> <span style="color: red">*</span>招标文件 </template>
<template #default="scope">
@ -75,8 +79,8 @@
changeContractPrice(val, scope.row);
}
"
:precision="2"
:step="1"
:precision="4"
:min="0"
:controls="false"
:disabled="scope.row.bidStatus == 1"
v-hasPermi="['tender:biddingPlan:edit']"
@ -226,22 +230,27 @@
/>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ scope.row.unitPrice ? proxy.formatPrice(scope.row.unitPrice) : '' }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{
proxy.formatPrice(
((scope.row.quantity ? Number(scope.row.quantity) : 0) -
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice) ==
0
? ''
: (
((scope.row.quantity ? Number(scope.row.quantity) : 0) -
: ((scope.row.quantity ? Number(scope.row.quantity) : 0) -
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice)
).toFixed(2)
Number(scope.row.unitPrice),
false
)
}}
</template>
</el-table-column>
@ -259,10 +268,14 @@
<el-table-column prop="name" label="工程或费用名称" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ scope.row.unitPrice ? proxy.formatPrice(scope.row.unitPrice) : '' }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price }}
{{ scope.row.price ? proxy.formatPrice(scope.row.price) : '' }}
</template>
</el-table-column>
</el-table>
@ -294,12 +307,14 @@
</template>
<script setup lang="ts">
import { getCurrentInstance, ComponentInternalInstance } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
import { getDicts } from '@/api/system/dict/data';
import { Plus } from '@element-plus/icons-vue';
import { FormInstance } from 'element-plus';
import winTheBid from './comm/winTheBid.vue';
import information from './comm/planPage.vue';
const { proxy } = getCurrentInstance();
import {
sheetList,

View File

@ -31,9 +31,12 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['supplierInput:supplierInput:add']">新增</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['supplierInput:supplierInput:export']"></el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="Upload" @click="handleImport" v-hasPermi="['supplierInput:supplierInput:import']"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['supplierInput:supplierInput:export']">导出模板</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
@ -223,8 +226,8 @@
<!-- 第十行安全生产许可证有效期仅劳务类型显示 -->
<el-row :gutter="20" class="mb-4" v-if="form.supplierType === '劳务'">
<el-col :span="12">
<el-form-item label="安全生产许可证发证日期" prop="safeCertificateValidity">
<el-date-picker v-model="form.safeCertificateValidity" type="date" placeholder="请选择发证日期" />
<el-form-item label="安全生产许可证有效期" prop="safeCertificateValidity">
<el-date-picker v-model="form.safeCertificateValidity" type="date" placeholder="请选择有效期" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -243,7 +246,7 @@
<el-form-item label="注册造价工程师" prop="registeredEngineerNumber">
<el-input v-model="form.registeredEngineerNumber" placeholder="请输入注册造价工程师数量" clearable />
</el-form-item>
<el-form-item label="其他(分别写)" prop="otherBuildingNumber">
<el-form-item label="其他人员数量" prop="otherBuildingNumber">
<el-input v-model="form.otherBuildingNumber" placeholder="请输入其他人员数量" clearable />
</el-form-item>
</el-col>
@ -309,7 +312,14 @@
<script setup name="SupplierInput" lang="ts">
import { ComponentInternalInstance, getCurrentInstance, onMounted, ref, reactive, toRefs, computed } from 'vue';
import { ElFormInstance } from 'element-plus';
import { listSupplierInput, getSupplierInput, delSupplierInput, updateSupplierInput } from '@/api/supplierInput/supplierInput/index';
import {
listSupplierInput,
getSupplierInput,
delSupplierInput,
updateSupplierInput,
leadingIn,
leadingOut
} from '@/api/supplierInput/supplierInput/index';
import { SupplierInputVO, SupplierInputQuery, SupplierInputForm, PageData, DialogOption } from '@/api/supplierInput/supplierInput/types';
import Pagination from '@/components/Pagination/index.vue';
import RightToolbar from '@/components/RightToolbar/index.vue';
@ -690,7 +700,75 @@ const handleDelete = async (row?: SupplierInputVO) => {
/** 导出操作 */
const handleExport = () => {
proxy?.download('supplierInput/supplierInput/export', { ...queryParams.value }, `supplierInput_${new Date().getTime()}.xlsx`);
try {
// 创建a标签并直接下载public目录下的静态文件
const link = document.createElement('a');
link.href = '/assets/files/供应商导入模板.xlsx'; // 使用public目录下现有的Excel文件作为模板
link.download = '供应商导入模板.xlsx';
document.body.appendChild(link);
link.click();
// 清理DOM元素
setTimeout(() => {
document.body.removeChild(link);
}, 100);
} catch (error) {
proxy?.$modal.msgError('模板下载失败,请重试');
}
};
/** 导入操作 */
const handleImport = () => {
// 创建一个隐藏的input[type=file]元素
const input = document.createElement('input');
input.type = 'file';
input.accept = '.xlsx,.xls'; // 限定只能导入excel文件
input.style.display = 'none';
// 监听文件选择事件
input.onchange = async (e: Event) => {
const target = e.target as HTMLInputElement;
const file = target.files?.[0];
if (file) {
// 检查文件类型是否为Excel
const isValidType = file.name.endsWith('.xlsx') || file.name.endsWith('.xls');
if (!isValidType) {
proxy?.$modal.msgError('请选择Excel文件(.xlsx或.xls)');
return;
}
// 创建FormData并添加文件
const formData = new FormData();
formData.append('file', file);
try {
// 显示加载状态
loading.value = true;
// 调用导入接口
const res = await leadingIn(formData, queryParams.value.projectId);
console.log("111111111111",queryParams.value.projectId);
if (res.code === 200) {
proxy?.$modal.msgSuccess('导入成功');
// 刷新列表
getList();
} else {
proxy?.$modal.msgError(res.msg || '导入失败');
}
} catch (error) {
proxy?.$modal.msgError('导入失败,请重试');
} finally {
loading.value = false;
}
}
// 清除input元素
input.remove();
};
// 触发文件选择对话框
document.body.appendChild(input);
input.click();
};
//调用projectId并获取列表
onMounted(() => {