8 Commits
prod ... master

9 changed files with 36 additions and 14 deletions

View File

@@ -21,7 +21,9 @@ jobs:
run: npm i pnpm -g run: npm i pnpm -g
- name: 安装依赖 - name: 安装依赖
run: pnpm install run: |
git config --global url."https://".insteadOf git://
pnpm install
continue-on-error: false # 依赖安装失败则终止工作流 continue-on-error: false # 依赖安装失败则终止工作流
- name: 构建项目 - name: 构建项目

View File

@@ -248,7 +248,9 @@ onMounted(() => {
}); });
}); });
const trendData = ref<any>({}); const hourTotal = ref<number>();
const dayTotal = ref<number>();
const monthTotal = ref<number>();
async function handleSelectFloor(selectedKeys, info) { async function handleSelectFloor(selectedKeys, info) {
let data = { let data = {
day: currentDay.value.format('YYYY-MM-DD'), day: currentDay.value.format('YYYY-MM-DD'),
@@ -269,6 +271,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新日数据图表 // 更新日数据图表
if (chartInstances.value.day && trend.hour) { if (chartInstances.value.day && trend.hour) {
hourTotal.value = trend.hour.total;
chartInstances.value.day.setOption({ chartInstances.value.day.setOption({
xAxis: { xAxis: {
data: trend.hour.categories || [], data: trend.hour.categories || [],
@@ -284,6 +287,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新月数据图表 // 更新月数据图表
if (chartInstances.value.month && trend.day) { if (chartInstances.value.month && trend.day) {
dayTotal.value = trend.day.total;
chartInstances.value.month.setOption({ chartInstances.value.month.setOption({
xAxis: { xAxis: {
data: trend.day.categories || [], data: trend.day.categories || [],
@@ -299,6 +303,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新年数据图表 // 更新年数据图表
if (chartInstances.value.year && trend.month) { if (chartInstances.value.year && trend.month) {
monthTotal.value = trend.month.total;
chartInstances.value.year.setOption({ chartInstances.value.year.setOption({
xAxis: { xAxis: {
data: trend.month.categories || [], data: trend.month.categories || [],
@@ -332,7 +337,8 @@ async function handleSelectFloor(selectedKeys, info) {
<DatePicker <DatePicker
v-model:value="currentDay" v-model:value="currentDay"
:disabled-date="disabledDay" :disabled-date="disabledDay"
/>当日能耗总值125.04KW.h />
<span>当日能耗总值{{ hourTotal }}KW.h</span>
</div> </div>
</div> </div>
<div id="day" style="height: 100%; width: 100%"></div> <div id="day" style="height: 100%; width: 100%"></div>
@@ -352,7 +358,8 @@ async function handleSelectFloor(selectedKeys, info) {
v-model:value="currentMonth" v-model:value="currentMonth"
:disabled-date="disabledMonth" :disabled-date="disabledMonth"
picker="month" picker="month"
/>当月能耗总值125.04KW.h />
<span>当日能耗总值{{ dayTotal }}KW.h</span>
</div> </div>
</div> </div>
<div id="month" style="height: 100%; width: 100%"></div> <div id="month" style="height: 100%; width: 100%"></div>
@@ -372,7 +379,8 @@ async function handleSelectFloor(selectedKeys, info) {
v-model:value="currentYear" v-model:value="currentYear"
:disabled-date="disabledYear" :disabled-date="disabledYear"
picker="year" picker="year"
/>当年能耗总值125.04KW.h />
<span>当日能耗总值{{ monthTotal }}KW.h</span>
</div> </div>
</div> </div>
<div id="year" style="height: 100%; width: 100%"></div> <div id="year" style="height: 100%; width: 100%"></div>

View File

@@ -37,8 +37,8 @@ const gridOptions: VxeGridProps = {
return await getVisitorList({ return await getVisitorList({
pageNum: page.currentPage, pageNum: page.currentPage,
pageSize: page.pageSize, pageSize: page.pageSize,
begTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[0], begTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[0].format('YYYY-MM-DD'),
endTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[1], endTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[1].format('YYYY-MM-DD'),
personName: typeof formValues.personName === 'undefined' ? '' : formValues.personName, personName: typeof formValues.personName === 'undefined' ? '' : formValues.personName,
recordType: typeof formValues.recordType === 'undefined' ? '' : formValues.recordType, recordType: typeof formValues.recordType === 'undefined' ? '' : formValues.recordType,
}); });

View File

@@ -180,7 +180,8 @@ function doPlayer(nodeData: any, index: number = 0) {
console.log('index=', index); console.log('index=', index);
if (mpegts.isSupported()) { if (mpegts.isSupported()) {
streamProxy(nodeData, (res: AddStreamProxyResult) => { streamProxy(nodeData, (res: AddStreamProxyResult) => {
const url = res.flv; const host = window.location.host;
const url = `http://${host}/${res.app}/${res.streamId}.live.flv`;
// 将url 绑定到 nodeData // 将url 绑定到 nodeData
nodeData.url = url; nodeData.url = url;
closePlayer(index); closePlayer(index);

View File

@@ -144,12 +144,14 @@ async function setupCommunitySelect() {
{ {
componentProps: () => ({ componentProps: () => ({
options: arr, options: arr,
allowClear: true,
}), }),
fieldName: 'bindDeviceId', fieldName: 'bindDeviceId',
}, },
{ {
componentProps: () => ({ componentProps: () => ({
options: arr, options: arr,
allowClear: true,
mode: 'multiple', // 关键属性,启用多选模式 mode: 'multiple', // 关键属性,启用多选模式
}), }),
fieldName: 'devicePoint', fieldName: 'devicePoint',

View File

@@ -103,6 +103,15 @@ test.forEach((item) => {
}); });
export const modalSchema: FormSchemaGetter = () => [ export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{ {
label: '人员标签', label: '人员标签',
fieldName: 'rosterType', fieldName: 'rosterType',

View File

@@ -58,9 +58,9 @@ export const columns: VxeGridProps['columns'] = [
slots: { slots: {
default: ({ row }: any) => { default: ({ row }: any) => {
const levelColors: Record<string, string> = { const levelColors: Record<string, string> = {
1: 'red', 1: 'blue',
2: 'orange', 2: 'orange',
3: 'blue', 3: 'red',
}; };
return h( return h(
'span', 'span',

View File

@@ -58,9 +58,9 @@ export const columns: VxeGridProps['columns'] = [
slots: { slots: {
default: ({ row }: any) => { default: ({ row }: any) => {
const levelColors: Record<string, string> = { const levelColors: Record<string, string> = {
1: 'red', 1: 'blue',
2: 'orange', 2: 'orange',
3: 'blue', 3: 'red',
}; };
return h( return h(
'span', 'span',

View File

@@ -59,9 +59,9 @@ export const columns: VxeGridProps['columns'] = [
slots: { slots: {
default: ({ row }: any) => { default: ({ row }: any) => {
const levelColors: Record<string, string> = { const levelColors: Record<string, string> = {
1: 'red', 1: 'blue',
2: 'orange', 2: 'orange',
3: 'blue', 3: 'red',
}; };
return h( return h(
'span', 'span',