Compare commits

..

2 Commits

Author SHA1 Message Date
userName f9821911f6 Merge branch 'main' of http://123.132.248.154:10000/gitY/LinYeFangHuo 2025-03-24 16:45:22 +08:00
userName 18b0f1f13f 组件完善 2025-03-24 16:45:13 +08:00
6 changed files with 297 additions and 219 deletions

View File

@ -70,7 +70,6 @@ useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
<style lang="scss" scoped>
@include go('title-03') {
height: v-bind('h');
overflow: auto;
position: relative;
padding-top:10px;
scrollbar-width: none;
@ -138,7 +137,9 @@ useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
}
.sectionBox{
width: 92%;
height: calc(100% - 40px);
margin-left: 4%;
overflow: auto;
img{
width: 21px;
height: 21px;

View File

@ -13,7 +13,7 @@ export const option = {
"scene3DOnly": false,
"shadows": false,
"removeDblClick": true,
"sceneMode": 3,
"sceneMode": 2,
"showSun": true,
"showMoon": true,
"showSkyBox": true,
@ -36,7 +36,7 @@ export const option = {
"cameraController": {
"zoomFactor": 3.0,
"minimumZoomDistance": 1,
"maximumZoomDistance": 50000000,
"maximumZoomDistance": 500000,
"enableRotate": true,
"enableTranslate": true,
"enableTilt": true,
@ -63,9 +63,11 @@ export const option = {
},
"mouseDownView": false,
"zoom": {
"enabled": false,
"insertIndex": 1
},
"compass": {
"enabled": false,
"bottom": "toolbar",
"left": "5px"
},
@ -87,7 +89,7 @@ export const option = {
},
"terrain": {
"url": "//data.mars3d.cn/terrain",
"show": true,
"show": false,
"clip": true
},
"basemaps": [

View File

@ -5,15 +5,8 @@ import { TaskReceivPersonConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'
export const option = {
navsArr: [
{ label: 'APP接收', value: '1'},
{ label: '短信接收人', value: '2'}
],
navsSize: 10,
navsColor: ['#02633C','#055738','#099860','#0D2822'],
navsBackground: ['#34FFE0','#18FFBE'],
secBackground: ['#0A3629', '#00611A'],
textColor: ['#16D49D','#FFFFFF'],
textColor: ['#16D49D', '#FFFFFF', '#FFFFFF','#000000'],
textSize: 10,
InpBackgroundColor: '#0C2411',
InpBorderColor: '#00611A',
@ -21,50 +14,22 @@ export const option = {
InpTextSize: 10,
treeColor: '#CBE6CD',
treeSize: 10,
treedatas: [
unitsOptions: [],
TableColumns:[
{
key: 1,
label: '默认用户组',
children: [
{
key: 1-1,
label: '用户一组',
children: [
{
key: 1-1-1,
label: '用户1'
type: 'selection',
},
{
key: 1-1-2,
label: '用户2'
},
{
key: 1-1-3,
label: '用户3'
},
{
key: 1-1-4,
label: '用户4'
}
]
}
]
title: '姓名',
key: 'name'
}
],
treedatas1: [
{ key: 1, label: '用户1' },
{ key: 2, label: '用户2' },
{ key: 3, label: '用户3' },
{ key: 4, label: '用户4' },
{ key: 5, label: '用户5' },
{ key: 6, label: '用户6' },
],
treedatas2: []
TableDatas: []
}
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = TaskReceivPersonConfig.key
public attr = { ...chartInitConfig, w: 515, h: 273, zIndex: 1 }
public attr = { ...chartInitConfig, w: 515, h: 310, zIndex: 1 }
public chartConfig = cloneDeep(TaskReceivPersonConfig)
public option = cloneDeep(option)
}

View File

@ -1,59 +1,4 @@
<template>
<CollapseItem name="标题样式" :expanded="true">
<SettingItemBox
:name="`颜色-${index + 1}`"
v-for="(item, index) in optionData.navsColor"
:key="index"
>
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.navsColor[index]"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button
size="small"
@click="optionData.navsColor[index] = option.navsColor[index]"
>
恢复默认
</n-button>
</SettingItem>
</SettingItemBox>
</CollapseItem>
<CollapseItem name="标题样式" :expanded="true">
<SettingItemBox
:name="`颜色-${index + 1}`"
v-for="(item, index) in optionData.navsBackground"
:key="index"
>
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.navsBackground[index]"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button
size="small"
@click="optionData.navsBackground[index] = option.navsBackground[index]"
>
恢复默认
</n-button>
</SettingItem>
</SettingItemBox>
</CollapseItem>
<CollapseItem name="标题样式" :expanded="true">
<SettingItem name="文字大小">
<n-input-number
size="small"
v-model:value="optionData.navsSize"
:min="10"
/>
</SettingItem>
</CollapseItem>
<CollapseItem name="样式" :expanded="true">
<SettingItemBox
:name="`颜色-${index + 1}`"
@ -100,7 +45,7 @@
</SettingItem>
</SettingItemBox>
</CollapseItem>
<CollapseItem name="样式" :expanded="true">
<CollapseItem name="样式" :expanded="true">
<SettingItem name="文字大小">
<n-input-number
size="small"
@ -177,7 +122,7 @@
</CollapseItem>
<CollapseItem name="样式" :expanded="true">
<SettingItemBox>
<SettingItem name="文字颜色">
<SettingItem name="表格文字颜色">
<n-color-picker
size="small"
:modes="['hex']"
@ -193,15 +138,15 @@
</n-button>
</SettingItem>
</SettingItemBox>
</CollapseItem>
<CollapseItem name="样式" :expanded="true">
<SettingItem name="树文字大小">
<SettingItemBox>
<SettingItem name="表格文字大小">
<n-input-number
size="small"
v-model:value="optionData.treeSize"
:min="10"
/>
</SettingItem>
</SettingItemBox>
</CollapseItem>
</template>

View File

@ -1,9 +1,15 @@
<template>
<div class="go-title-03">
<div class="flex ai-c jc-sb max-w navsbox">
<div class="flex navsli ai-c jc-c" v-for="(item,index) in navsArr" :class="index==navsIndex?'navsliactive':''" @click="navsClick(index)">
{{ item.label }}
</div>
<div class="contbox max-w">
<el-row style="margin-top:20px;">
<el-col :span="4">
<span class="labspan">任务详情</span>
</el-col>
<el-col :span="20">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="taskContent"></el-input>
</el-col>
</el-row>
</div>
<div class="flex jc-sb sectionbox">
<div class="sectionboxleftli secli">
@ -13,91 +19,177 @@
v-model:value="taskUserName"
:minlength="1"
type="text"
placeholder="用户组名称"
placeholder="人员姓名"
>
</n-input>
<div class="selectbox">
<n-tree
block-line
cascade
default-expand-all
:selectable="false"
:data="treedatas"
<n-select
clearable
size="small"
@change="selectChange"
placeholder="请选择单位"
key="id"
label-field="unitName"
value-field="unitName"
v-model:value="unitsValue"
:options="unitsOptions"
/>
</div>
<div class="btnbox">
<n-button type="info" @click="getPeopleList"></n-button>
</div>
<div class="btnbox">
<n-button type="success" @click="sendClick"></n-button>
</div>
</div>
<div class="sectionboxrightli secli">
<div class="flex jc-sb max-w">
<div class="sectitle">待选择人员4/9</div>
<div class="sectext">包含下级</div>
</div>
<div class="selectBox">
<n-tree
block-line
cascade
checkable
:selectable="false"
:data="treedatas1"
:on-update:selected-keys="updateTreeHandle1"
/>
</div>
</div>
<div class="sectionboxrightli secli">
<div class="flex jc-sb max-w">
<div class="sectitle">已选择人员4/9</div>
<div class="sectext tpclearbtn">清空</div>
</div>
<div class="selectBox">
<n-tree
block-line
cascade
checkable
:selectable="false"
:data="treedatas2"
/>
</div>
<el-table
ref="multipleTable"
size="mini"
:data="TableDatas"
tooltip-effect="dark"
:reserve-selection="true"
class="tabbox"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
>
<!-- <template slot-scope="scope">
<span style="color:#ffffff;">{{scope.row.name}}</span> &nbsp;
<el-tag size="mini" v-show="scope.row.unitName">{{ scope.row.unitName }}</el-tag>
<el-tag size="mini" type="success" v-show="scope.row.online == 1" style="margin-left:12px;">线</el-tag>
</template> -->
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { PropType, toRefs, ref } from 'vue'
import { PropType, toRefs, ref, onMounted, defineComponent } from 'vue'
import { CreateComponentType } from '@/packages/index.d'
import axios from 'axios'
import { ElMessage } from 'element-plus'
import { EventBus } from '@/utils/eventBus'
import { getAppEnvConfig } from '@/utils/env'
var { VITE_GLOB_API_URL } = getAppEnvConfig();
const props = defineProps({
chartConfig: {
type: Object as PropType<CreateComponentType>,
required: true
}
})
const navsIndex = ref(0)
const taskUserName = ref('')
const taskUserName = ref()
const unitsValue = ref()
const taskContent = ref()
const receivePeople = ref()
const lng = ref()
const lat = ref()
const { w, h } = toRefs(props.chartConfig.attr)
const {
textColor,
textSize,
navsArr,
navsColor,
navsBackground,
navsSize,
secBackground,
InpBackgroundColor,
InpBorderColor,
InpTextColor,
InpTextSize,
treedatas,
unitsOptions,
treeSize,
treeColor,
treedatas1,
treedatas2
TableColumns,
TableDatas
} = toRefs(props.chartConfig.option)
const navsClick = function(index){
navsIndex.value = index
onMounted(() => {
getReceiveGroup()
getPeopleList()
// eventBus
EventBus.on(props.chartConfig.id + 'taskGraphic', (data) => {
lng.value = data.lng
lat.value = data.lat
});
})
const getReceiveGroup = ()=>{
axios({
method: "get",
url: VITE_GLOB_API_URL + '/api/FireManagement/GetUserUnit',
data: {
pageIndex: 1,
pageSize: 999,
},
headers: {
'X-Token': localStorage.getItem("X-Token")
}
}).then(res => {
props.chartConfig.option.unitsOptions = res.data.result
})
}
const updateTreeHandle1 = function(node){
console.log('dddnode',node)
const getPeopleList = ()=>{
let srcs = '/api/FireManagement/LoadFireClueUser?username='+taskUserName.value+'&unitname='+unitsValue.value
axios({
method: "get",
url: VITE_GLOB_API_URL + '/api/FireManagement/LoadFireClueUser',
params: {
username: taskUserName.value,
unitname: unitsValue.value
},
headers: {
'X-Token': localStorage.getItem("X-Token")
}
}).then(res => {
props.chartConfig.option.TableDatas = res.data.result
})
}
const selectChange = (e)=>{
unitsValue.value = e
}
const handleSelectionChange = (val)=> {
receivePeople.value = val
}
const sendClick = ()=>{
let querys = {
content: taskContent.value,
lng: lng.value,
lat: lat.value,
recipientUsers: receivePeople.value.map(e => e.id)
}
axios({
method: "post",
url: VITE_GLOB_API_URL + '/api/FireManagement/IssuedFireClueTask',
data: querys,
headers: {
'X-Token': localStorage.getItem("X-Token")
}
}).then(res => {
if (res.data.code == 200) {
ElMessage({
message: res.data.message,
type: 'success',
})
} else {
ElMessage({
message: res.data.message,
type: 'error',
})
}
if(!res){
ElMessage({
message: res,
type: 'error',
})
}
})
}
</script>
@ -105,6 +197,9 @@ const updateTreeHandle1 = function(node){
@include go('title-03') {
position: relative;
height: v-bind('h');
.contbox{
margin-bottom: 15px;
}
.max-w{
width: 100%;
}
@ -126,44 +221,26 @@ const updateTreeHandle1 = function(node){
.ai-c{
align-items: center;
}
.navsbox{
width: 30%;
height: 24px;
background: v-bind('navsColor[1]');
border-radius: 1px;
margin-bottom: 10px;
border: 1px solid v-bind('navsColor[0]');
}
.navsli{
width: 50%;
height: 100%;
color: v-bind('navsColor[2]');
font-size: v-bind('navsSize+"px"');
cursor: pointer;
position: relative;
}
.navsliactive{
color: v-bind('navsColor[3]');
background: linear-gradient( 158deg, v-bind('navsBackground[0]') 0%, v-bind('navsBackground[1]') 100%);
border-radius: 2px 0px 0px 2px;
}
.sectionbox{
height: calc(100% - 51px);
}
.btnbox{
margin-top: 10px;
margin-right: 30px;
text-align: right;
}
.labspan{
color: v-bind('textColor[3]');
}
.secli{
background: v-bind('secBackground[0]');
border: 1px solid v-bind('secBackground[1]');
height: 100%;
padding-top: 10px;
font-size: v-bind('textSize+"px"');
.sectitle{
margin: 0 10px 10px;
margin: 10px 10px 10px;
color: v-bind('textColor[0]');
}
.sectext{
color: v-bind('textColor[1]');
padding-right: 10px;
}
.tpclearbtn{
height: 16px;
line-height: 14px;
@ -172,22 +249,17 @@ const updateTreeHandle1 = function(node){
border: 1px solid v-bind('secBackground[1]');
cursor: pointer;
}
.selectbox{
height: calc(100% - 75px);
overflow: auto;
}
}
.sectionboxleftli{
width: 30%;
width: 55%;
}
.sectionboxrightli{
width: 34%;
.selectBox{
height: calc(100% - 30px);
overflow: auto;
width: 44%;
overflow: hidden;
}
.tabbox{
height: 100%;
}
:deep(.n-input){
margin-bottom: 15px;
width: 90%;
@ -201,18 +273,111 @@ const updateTreeHandle1 = function(node){
:deep(.n-input__state-border){
border-color: v-bind('InpBorderColor');
}
:deep(.n-tree-node-content){
:deep(.n-base-selection){
width: 90%;
margin-left: 5%;
margin-bottom: 15px;
font-size: v-bind('treeSize+"px"');
}
:deep(.n-base-selection .n-base-selection-label){
background: v-bind('InpBackgroundColor');
}
:deep(.n-base-selection .n-base-selection-label .n-base-selection-input){
color: v-bind('treeColor');
}
:deep(.n-base-select-menu){
background: v-bind('InpBackgroundColor');
}
:deep(.n-base-select-menu .n-base-select-option){
color: v-bind('treeColor');
font-size: v-bind('treeSize+"px"');
}
:deep(.n-tree-node:hover){
background: v-bind('secBackground[1]') !important;
}
:deep(.n-tree-node--checkable:has(.n-checkbox--checked)){
background: linear-gradient( 253deg, #15D5A0 0%, rgba(49,189,73,0.9) 100%);
:deep(.n-base-selection .n-base-selection__border, .n-base-selection .n-base-selection__state-border){
border-color: v-bind('InpBorderColor');
}
::v-deep .el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, .25);
background-color: rgba(0, 0, 0, .1)
}
::v-deep .el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb:active {
-webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .1);
background-color: rgba(0, 0, 0, .1)
}
::v-deep .el-table th{
padding:0px!important;
color: v-bind('textColor[1]');
font-size: v-bind('treeSize+"px"');
}
::v-deep table thead th{
text-align: left!important;
text-indent:1px;
}
::v-deep .el-table td.el-table__cell, .el-table th.el-table__cell{
border-bottom:0px!important;
border:0px !important;
}
/*最外层透明*/
::v-deep .el-table,
::v-deep .el-table__expanded-cell {
background-color: transparent !important;
color: v-bind('textColor[2]');
font-size: v-bind('textSize+"px"');
}
/* 表格内背景颜色 */
::v-deep .el-table th,
::v-deep .el-table tr,
::v-deep .el-table td {
background-color: transparent !important;
}
::v-deep .el-table td.el-table__cell, .el-table th.el-table__cell{
border:0px!important;
}
::v-deep .el-table__body-wrapper{
width:100%;
border:0px!important;
}
::v-deep .el-input__inner {
background: v-bind('InpBackgroundColor');
border-color: v-bind('InpBorderColor');
color: v-bind('InpTextColor');
font-size: v-bind('InpTextSize+"px"');
}
::v-deep .el-textarea__inner {
background: v-bind('InpBackgroundColor');
border-color: v-bind('InpBorderColor');
color: v-bind('InpTextColor');
font-size: v-bind('InpTextSize+"px"');
box-shadow: none;
}
/* 滑道样式 */
::v-deep .el-table__body-wrapper::-webkit-scrollbar{
width:10px;
background:#304156;
border-radius: 6px;
}
/* 定义滑块的样式 */
::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb{
border-radius: 10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
background-color:rgba(0,0,0,0.3);
}
/* 定义滑块鼠标移入时的样式 */
::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover{
border-radius: 10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
background-color:rgba(0,0,0,0.4);
}
/* 整个滚动条的样式 */
::-webkit-scrollbar {

View File

@ -18,7 +18,7 @@ const option = {
color: [],
legend: {
left: 'right',
data: ['路网规划率', '信息处置率'],
data: ['上报个数', '处理个数'],
textStyle:{
fontSize: 12
}
@ -42,7 +42,7 @@ const option = {
series: [
{
type: 'line',
name: '路网规划率',
name: '上报个数',
smooth: false,
symbolSize: 10, //设定实心点的大小
itemStyle: {
@ -78,7 +78,7 @@ const option = {
},
{
type: 'line',
name: '信息处置率',
name: '处理个数',
smooth: false,
symbolSize: 10, //设定实心点的大小
itemStyle: {