update
1.新疆大屏新需求
This commit is contained in:
+192
-11
@@ -1,17 +1,17 @@
|
||||
import * as echarts from 'echarts';
|
||||
import { legend1, legend2, legend3, legend4, legend5 } from '/@/components/xianMap/xianMapHooks.ts';
|
||||
import { checkTypeList, initatorTypee, isTrueOfFalse, normalTypeList, SexType, sexTypeList, sexTypeListNew } from '/@/utils/settings.ts';
|
||||
import { getDictByCode, getDictByCode2 } from '/@/views/index.api.ts';
|
||||
import { get } from '/@/api/request';
|
||||
import { initatorTypee, isTrueOfFalse, SexType, sexTypeList, sexTypeListNew } from '/@/utils/settings.ts';
|
||||
import { getDictByCode2 } from '/@/views/index.api.ts';
|
||||
import dayjs from 'dayjs';
|
||||
export const legend1 = new URL('/@/assets/img/legend1.png', import.meta.url).href;
|
||||
export const legend2 = new URL('/@/assets/img/legend5.png', import.meta.url).href;
|
||||
export const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href;
|
||||
export const legend4 = new URL('/@/assets/img/legend4.png', import.meta.url).href;
|
||||
|
||||
export const checkData = await (async () => {
|
||||
return await getDictByCode2({ dictCode: 'xj_check_type' });
|
||||
})();
|
||||
|
||||
export function getClassCharts(dx, dy, m) {
|
||||
export function getClassCharts(dx: any, dy: any, m: any) {
|
||||
return {
|
||||
grid: {
|
||||
top: 40,
|
||||
@@ -61,14 +61,14 @@ export function getClassCharts(dx, dy, m) {
|
||||
min: 0, // 起始 - 设置y轴刻度的最小值
|
||||
axisLabel: {
|
||||
color: '#65C6E7',
|
||||
formatter: function (value, index) {
|
||||
formatter: function (value: any) {
|
||||
return value;
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: dy.map((item) => {
|
||||
data: dy.map((item: any) => {
|
||||
return {
|
||||
value: item,
|
||||
itemStyle: {
|
||||
@@ -99,7 +99,8 @@ export function getClassCharts(dx, dy, m) {
|
||||
export enum TabType {
|
||||
all = '', //所有资源
|
||||
youTianYiYuan = '1', //油田医院
|
||||
jianKangXiaoWu = '2', //健康小屋
|
||||
jianKangXiaoWu = '3', //健康小屋
|
||||
aed = '4', //AED
|
||||
jiuHuChe = '5', //救护车
|
||||
}
|
||||
export const tabList = [
|
||||
@@ -119,6 +120,10 @@ export const tabList = [
|
||||
name: '救护车',
|
||||
type: TabType.jiuHuChe,
|
||||
},
|
||||
{
|
||||
name: 'AED',
|
||||
type: TabType.aed,
|
||||
},
|
||||
{
|
||||
name: '急救路线',
|
||||
},
|
||||
@@ -127,9 +132,10 @@ export const legendList = [
|
||||
{ img: legend2, text: '健康小屋', color: '#1BEFF6' },
|
||||
{ img: legend1, text: '油田医院', color: '#D86AF7' },
|
||||
{ img: legend3, text: '救护车', color: '#EE7E31' },
|
||||
{ img: legend4, text: 'AED', color: '#F23F3D' },
|
||||
];
|
||||
|
||||
export function infoContent(res) {
|
||||
export function infoContent(res: any) {
|
||||
return `
|
||||
<div class="modal-box">
|
||||
<div class="modal-item">
|
||||
@@ -149,7 +155,7 @@ export function infoContent(res) {
|
||||
</div>
|
||||
</div> `;
|
||||
}
|
||||
export function infoContent1(res) {
|
||||
export function infoContent1(res: any) {
|
||||
return `
|
||||
<div class="modal-box modal-box-normal">
|
||||
<div class="modal-item">
|
||||
@@ -162,6 +168,53 @@ export function infoContent1(res) {
|
||||
</div>
|
||||
</div> `;
|
||||
}
|
||||
export function infoContent4(res: any) {
|
||||
return `
|
||||
<div class="modal-box modal-box-normal">
|
||||
<div class="modal-item">
|
||||
<span class="item-one">AED名称:</span>
|
||||
<span class="item-two">${res.name ? res.name : '--'}</span>
|
||||
</div>
|
||||
<div class="modal-item">
|
||||
<div class="item-one">地点:</div>
|
||||
<div class="item-two" style="text-align: right">${res.address || '--'}</div>
|
||||
</div>
|
||||
</div> `;
|
||||
}
|
||||
export function infoContentSpecial(res: any) {
|
||||
return `
|
||||
<div class="modal-box" style="width: 400px !important;height: auto !important;line-height: 2.5">
|
||||
<div style="text-align: center;color: #5CFBFF;display: flex;align-items: center;justify-content: center">
|
||||
<div class="top-left-a-right" style="transform: rotate(180deg)"></div>
|
||||
<div style="margin: 0 10px;font-size: 16px">${res.type === '1' ? '油田医院' : res.type === '4' ? 'AED' : '健康小屋'}</div>
|
||||
<div class="top-left-a-right"></div>
|
||||
</div>
|
||||
<div class="modal-item" style="justify-content: flex-start">
|
||||
<div class="item-one" style="width: auto !important;">地址:</div>
|
||||
<div class="item-two" style="text-align: left: color: #5CFBFF; flex: 1">${res.address || '--'}</div>
|
||||
</div>
|
||||
<div class="modal-item" style="justify-content: flex-start">
|
||||
<div style="display: flex; flex: 1">
|
||||
<div class="item-one" style="width: auto !important;">相距:</div>
|
||||
<div class="item-two" style="text-align: left: color: #5CFBFF; flex: 1">${res.distance > 1000 ? (res.distance / 1000).toFixed(2) + 'km' : parseInt(res.distance) + 'm' || '--'}</div>
|
||||
</div>
|
||||
<div style="display: flex; flex: 1">
|
||||
<div class="item-one" style="width: auto !important;">${res.distance > 2000 ? '驾车' : '步行'}:</div>
|
||||
<div class="item-two" style="text-align: left: color: #5CFBFF; flex: 1">${res.driveTime || '--'}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-item" style="justify-content: flex-start">
|
||||
<div style="display: flex; flex: 1">
|
||||
<div class="item-one" style="width: auto !important;">联系人:</div>
|
||||
<div class="item-two" style="text-align: left: color: #5CFBFF; flex: 1">${res.manageName || '--'}</div>
|
||||
</div>
|
||||
<div style="display: flex; flex: 1">
|
||||
<div class="item-one" style="width: auto !important;">联系电话:</div>
|
||||
<div class="item-two" style="text-align: left: color: #5CFBFF; flex: 1">${res.managePhone || '--'}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> `;
|
||||
}
|
||||
const columns1 = [
|
||||
{
|
||||
title: '姓名',
|
||||
@@ -517,7 +570,7 @@ const towRcolumn3 = [
|
||||
key: 'inputDate',
|
||||
},
|
||||
];
|
||||
export function twoRform(type) {
|
||||
export function twoRform(type: any) {
|
||||
return [
|
||||
{
|
||||
label: '员工姓名',
|
||||
@@ -635,3 +688,131 @@ export const centerMapFromList = [
|
||||
defaultValue: '',
|
||||
},
|
||||
];
|
||||
|
||||
export const twoRNewColumns = [
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'workUnit',
|
||||
key: 'workUnit',
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
dataIndex: 'sex',
|
||||
key: 'sex',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '年龄',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
customRender: ({ text }) => {
|
||||
if (text == '1') {
|
||||
return '女';
|
||||
} else {
|
||||
return '男';
|
||||
}
|
||||
},
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '身高',
|
||||
dataIndex: 'height',
|
||||
key: 'height',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '体重',
|
||||
dataIndex: 'weight',
|
||||
key: 'weight',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: 'BMI',
|
||||
dataIndex: 'bmi',
|
||||
key: 'bmi',
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
title: '肥胖人员',
|
||||
dataIndex: 'flagFat',
|
||||
key: 'flagFat',
|
||||
customRender: ({ text }) => {
|
||||
if (text == '1') {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '高血压',
|
||||
dataIndex: 'hypertension',
|
||||
key: 'hypertension',
|
||||
customRender: ({ text }) => {
|
||||
if (text == '1') {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '糖尿病',
|
||||
dataIndex: 'diabetes',
|
||||
key: 'diabetes',
|
||||
customRender: ({ text }) => {
|
||||
if (text == '1') {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '关爱状态',
|
||||
dataIndex: 'dataLevel',
|
||||
key: 'dataLevel',
|
||||
customRender: ({ text }) => {
|
||||
if (text == '1') {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '填报日期',
|
||||
dataIndex: 'updateDate',
|
||||
key: 'updateDate',
|
||||
customRender: ({ text, record }) => {
|
||||
return text ? dayjs(text).format('YYYY-MM-DD') : dayjs(record.createDate).format('YYYY-MM-DD');
|
||||
},
|
||||
width: 90,
|
||||
},
|
||||
];
|
||||
|
||||
export const twoRNewForm = [
|
||||
{
|
||||
label: '姓名',
|
||||
field: 'name',
|
||||
type: 'input',
|
||||
placeholder: '请输入姓名',
|
||||
defaultValue: '',
|
||||
},
|
||||
{
|
||||
label: '单位',
|
||||
field: 'orgName',
|
||||
type: 'input',
|
||||
placeholder: '请输入单位',
|
||||
defaultValue: '',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user