diff --git a/components.d.ts b/components.d.ts index dca3074..761092b 100644 --- a/components.d.ts +++ b/components.d.ts @@ -14,6 +14,7 @@ declare module 'vue' { ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] ElCarousel: typeof import('element-plus/es')['ElCarousel'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] ElCascader: typeof import('element-plus/es')['ElCascader'] @@ -22,11 +23,13 @@ declare module 'vue' { ElCollapse: typeof import('element-plus/es')['ElCollapse'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] + ElCountdown: typeof import('element-plus/es')['ElCountdown'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] @@ -34,14 +37,22 @@ declare module 'vue' { ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] + ElProgress: typeof import('element-plus/es')['ElProgress'] + ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElStep: typeof import('element-plus/es')['ElStep'] + ElSteps: typeof import('element-plus/es')['ElSteps'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTag: typeof import('element-plus/es')['ElTag'] + ElUpload: typeof import('element-plus/es')['ElUpload'] Empty: typeof import('./src/components/Empty/index.vue')['default'] EquipCard: typeof import('./src/components/equipCard.vue')['default'] EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default'] diff --git a/src/assets/img/screen/bg-old.png b/src/assets/img/screen/bg-old.png new file mode 100644 index 0000000..0c1e30d Binary files /dev/null and b/src/assets/img/screen/bg-old.png differ diff --git a/src/assets/img/screen/bg.png b/src/assets/img/screen/bg.png index 0c1e30d..50952c3 100644 Binary files a/src/assets/img/screen/bg.png and b/src/assets/img/screen/bg.png differ diff --git a/src/assets/img/screen/bg_1-1.png b/src/assets/img/screen/bg_1-1.png new file mode 100644 index 0000000..ed7e520 Binary files /dev/null and b/src/assets/img/screen/bg_1-1.png differ diff --git a/src/assets/img/screen/bg_1.png b/src/assets/img/screen/bg_1.png index ed7e520..2a7d63b 100644 Binary files a/src/assets/img/screen/bg_1.png and b/src/assets/img/screen/bg_1.png differ diff --git a/src/assets/img/screen/bg_2.png b/src/assets/img/screen/bg_2.png new file mode 100644 index 0000000..0432308 Binary files /dev/null and b/src/assets/img/screen/bg_2.png differ diff --git a/src/assets/img/screen/center1_1-1.png b/src/assets/img/screen/center1_1-1.png new file mode 100644 index 0000000..2d7a4e4 Binary files /dev/null and b/src/assets/img/screen/center1_1-1.png differ diff --git a/src/assets/img/screen/center1_1.png b/src/assets/img/screen/center1_1.png index 2d7a4e4..db51a5b 100644 Binary files a/src/assets/img/screen/center1_1.png and b/src/assets/img/screen/center1_1.png differ diff --git a/src/assets/img/screen/center1_2-1.png b/src/assets/img/screen/center1_2-1.png new file mode 100644 index 0000000..fe6a3f1 Binary files /dev/null and b/src/assets/img/screen/center1_2-1.png differ diff --git a/src/assets/img/screen/center1_2.png b/src/assets/img/screen/center1_2.png index fe6a3f1..88efea5 100644 Binary files a/src/assets/img/screen/center1_2.png and b/src/assets/img/screen/center1_2.png differ diff --git a/src/assets/img/screen/center1_3-1.png b/src/assets/img/screen/center1_3-1.png new file mode 100644 index 0000000..305ed6b Binary files /dev/null and b/src/assets/img/screen/center1_3-1.png differ diff --git a/src/assets/img/screen/center1_3.png b/src/assets/img/screen/center1_3.png index 305ed6b..88e3407 100644 Binary files a/src/assets/img/screen/center1_3.png and b/src/assets/img/screen/center1_3.png differ diff --git a/src/assets/img/screen/center1_4-1.png b/src/assets/img/screen/center1_4-1.png new file mode 100644 index 0000000..ebfe110 Binary files /dev/null and b/src/assets/img/screen/center1_4-1.png differ diff --git a/src/assets/img/screen/center1_4.png b/src/assets/img/screen/center1_4.png index ebfe110..1f639ef 100644 Binary files a/src/assets/img/screen/center1_4.png and b/src/assets/img/screen/center1_4.png differ diff --git a/src/assets/img/screen/title_bg-1.png b/src/assets/img/screen/title_bg-1.png new file mode 100644 index 0000000..b888dd9 Binary files /dev/null and b/src/assets/img/screen/title_bg-1.png differ diff --git a/src/assets/img/screen/title_bg.png b/src/assets/img/screen/title_bg.png index b888dd9..6286b77 100644 Binary files a/src/assets/img/screen/title_bg.png and b/src/assets/img/screen/title_bg.png differ diff --git a/src/assets/img/screen/装备上架-1.png b/src/assets/img/screen/装备上架-1.png new file mode 100644 index 0000000..2f66158 Binary files /dev/null and b/src/assets/img/screen/装备上架-1.png differ diff --git a/src/assets/img/screen/装备上架.png b/src/assets/img/screen/装备上架.png index 2f66158..d61288b 100644 Binary files a/src/assets/img/screen/装备上架.png and b/src/assets/img/screen/装备上架.png differ diff --git a/src/assets/img/screen/装备上架1.png b/src/assets/img/screen/装备上架1.png deleted file mode 100644 index 95dcb85..0000000 Binary files a/src/assets/img/screen/装备上架1.png and /dev/null differ diff --git a/src/assets/img/screen/装备租赁-1.png b/src/assets/img/screen/装备租赁-1.png new file mode 100644 index 0000000..5fe4f85 Binary files /dev/null and b/src/assets/img/screen/装备租赁-1.png differ diff --git a/src/assets/img/screen/装备租赁.png b/src/assets/img/screen/装备租赁.png index 5fe4f85..327bab0 100644 Binary files a/src/assets/img/screen/装备租赁.png and b/src/assets/img/screen/装备租赁.png differ diff --git a/src/assets/img/screen/装备需求-1.png b/src/assets/img/screen/装备需求-1.png new file mode 100644 index 0000000..427164d Binary files /dev/null and b/src/assets/img/screen/装备需求-1.png differ diff --git a/src/assets/img/screen/装备需求.png b/src/assets/img/screen/装备需求.png index 427164d..145dbed 100644 Binary files a/src/assets/img/screen/装备需求.png and b/src/assets/img/screen/装备需求.png differ diff --git a/src/views/big-screen/index.vue b/src/views/big-screen/index.vue index 5ed4b2c..1a7aeb3 100644 --- a/src/views/big-screen/index.vue +++ b/src/views/big-screen/index.vue @@ -56,7 +56,7 @@ import CenterModel from './model-components/center-model.vue' .screen-title { position: absolute; - top: 4%; + top: 2%; left: 50%; color: #fff; font-size: 30px; diff --git a/src/views/big-screen/model-components/center-model.vue b/src/views/big-screen/model-components/center-model.vue index b0407bf..f14ae9f 100644 --- a/src/views/big-screen/model-components/center-model.vue +++ b/src/views/big-screen/model-components/center-model.vue @@ -3,7 +3,7 @@
- +
@@ -51,7 +51,7 @@
- +
@@ -97,7 +97,7 @@
- +
diff --git a/src/views/big-screen/model-components/left-three-model.vue b/src/views/big-screen/model-components/left-three-model.vue index 4eee5a4..51f237e 100644 --- a/src/views/big-screen/model-components/left-three-model.vue +++ b/src/views/big-screen/model-components/left-three-model.vue @@ -1,8 +1,7 @@ @@ -12,31 +11,35 @@ import ScreenTitle from 'components/ScreenTitle/index.vue' import { getLeaseCouplesApi } from 'http/api/screen/index' import IconImg from '@/assets/img/screen/999.svg' import * as echarts from 'echarts' +import { ElMessage } from 'element-plus' const echartsRef = ref(null) const secondsTimer: any = ref(null) const oneArr: any = ref([]) const erArr: any = ref([]) +const companyId: any = ref(241) const getLeaseCouplesData = async () => { - const res: any = await getLeaseCouplesApi() - // console.log(res, '装备租赁互联') + const res: any = await getLeaseCouplesApi({ companyId: companyId.value }) + console.log(res, '装备租赁互联') + if (res.data.length == 0) { + ElMessage.error('暂无装备租赁互联数据') + return + } const arr = res.data.map((item: any, index: any) => { - if ((index = 0)) { - item.type = 0 - } - item.type = 1 - item.symbol = 'image://' + IconImg - item.symbolSize = 45 - item.name = item.companyName + // item.type = 1 + // item.symbol = 'image://' + IconImg + // item.symbolSize = 45 + // item.name = item.companyName return { - type: item.type, + type: 1, symbol: 'image://' + IconImg, + symbolSize: 45, name: item.companyName, orderNum: item.orderNum, + companyId: item.companyId, } }) // console.log('🚀 ~ getLeaseCouplesData ~ arr:', arr) - oneArr.value = [arr[0]] - // oneArr.value[0].type = 0 + oneArr.value.push(arr[0]) // console.log('🚀 ~ getLeaseCouplesData ~ oneArr.value:', oneArr.value) erArr.value = arr.slice(1) // console.log('🚀 ~ getLeaseCouplesData ~ erArr.value:', erArr.value) @@ -46,51 +49,53 @@ getLeaseCouplesData() // 重置 const reset = () => { console.log('重置') + // 刷新页面 + location.reload() } onMounted(() => { setTimeout(() => { const myChart = echarts.init(echartsRef.value) // 添加点击事件监听器 - myChart.on('click', function (params) { + myChart.on('click', function (params: any) { if (params.componentType === 'series' && params.seriesType === 'graph') { - // console.log('点击了项:', params, allArr) - allArr.forEach((item: any) => { - // console.log('🚀 ~ allArr.forEach ~ item:', item) - item.type = 1 - if (item.name == params.name) { - if (item.type == 0) { - item.type = 1 - } else { - item.type = 0 - } - } - }) - // 获取 type 为 0 的数据 - let oneArr = allArr.filter((item: any) => { - return item.type == 0 - }) - // console.log('🚀 ~ oneArr ~ oneArr:', oneArr) - // 获取 type 为 1 的数据 - let erArr = allArr.filter((item: any) => { - return item.type == 1 - }) - // console.log('🚀 ~ erArr ~ erArr:', erArr) - oneArr = group(oneArr, 0) - erArr = group(erArr, 40) - allArr = [...oneArr, ...erArr] - // console.log('🚀 ~ allArr:', allArr) + console.log('点击了项:', params, allArr) + companyId.value = params.data.companyId - // 更新数据 - myChart.setOption({ - // tooltip: { - // trigger: 'item', // 触发类型为数据项 - // formatter: function (params: any) { - // // 显示完整的公司名称和订单数 - // return `公司名称: ${params.name}
订单数: ${params.data.orderNum}` - // }, - // }, - }) // true 表示合并更新 + getLeaseCouplesApi({ companyId: companyId.value }).then((res: any) => { + console.log(res, '装备租赁互联') + if (res.data.length === 0) { + // 提示无数据 + ElMessage.error('暂无关联数据') + return + } + const arr = res.data.map((item: any, index: any) => { + // item.type = 1 + // item.symbol = 'image://' + IconImg + // item.symbolSize = 45 + // item.name = item.companyName + return { + type: 1, + symbol: 'image://' + IconImg, + symbolSize: 45, + name: item.companyName, + orderNum: item.orderNum || 0, + companyId: item.companyId, + } + }) + console.log('🚀 ~ arr ~ arr:', arr) + let oneArr2 = [arr[0]] + console.log('🚀 ~ myChart.on ~ oneArr:', oneArr2) + let erArr2 = arr.slice(1) + console.log('🚀 ~ myChart.on ~ erArr:', erArr2) + oneArr2 = group(oneArr2, 0) + erArr2 = group(erArr2, 40) + allArr = [...oneArr2, ...erArr2] + // linesConfig(allArr) + console.log('🚀 ~ allArr:', allArr) + forAllArr() + myChart.setOption({}) // true 表示合并更新 + }) } }) @@ -101,42 +106,49 @@ onMounted(() => { let allArr = [...oneArr.value, ...erArr.value], dataArr: any = [] // 点 - allArr.forEach((el, ind) => { - if (el.type > 0) { - el.symbolSize = 45 - el.symbol = 'image://' + uploadImg2 - el.itemStyle = { - color: color[el.type], - } - } - el.label = { - show: true, - position: 'bottom', - distance: -30, - color: color[el.type], - formatter: function (params: any) { - // console.log('🚀 ~ allArr.forEach ~ params:', params) - const maxLength = 6 // 设置最大显示长度 - const name = - params.data.name.length > maxLength - ? params.data.name.substring(0, maxLength) + '...' - : params.data.name + function forAllArr() { + if (!allArr || allArr.length == 0) return + allArr.forEach((el, ind) => { + console.log('🚀 ~ allArr.forEach ~ el111:', el) + // if (el.type > 0) { + // el.symbolSize = 45 + // el.symbol = 'image://' + uploadImg2 + // el.itemStyle = { + // color: '#fff', + // } + // } + el.label = { + show: true, + position: 'bottom', + distance: -30, + color: '#fff', + formatter: function (params: any) { + // console.log('🚀 ~ allArr.forEach ~ params:', params) + const maxLength = 6 // 设置最大显示长度 + const name = + params.data.name.length > maxLength + ? params.data.name.substring(0, maxLength) + '...' + : params.data.name - // 如果是 '亳州分公司',显示名称并加上租赁数 - return [ - `{c|订单数:${params.data.orderNum}}`, - `{b|${name}}`, // 显示名称 - ].join('\n') // 换行显示 - }, - rich: { - b: { - fontSize: 12, + // 如果是 '亳州分公司',显示名称并加上租赁数 + return [ + `{c|订单数:${params.data.orderNum}}`, + `{b|${name}}`, // 显示名称 + ].join('\n') // 换行显示 }, - c: { - fontSize: 12, + rich: { + b: { + fontSize: 12, + }, + c: { + fontSize: 12, + }, }, - }, - } + } + }) + } + nextTick(() => { + forAllArr() }) // 圆形分区 @@ -164,38 +176,42 @@ onMounted(() => { // 线配置 function linesConfig(arr: any) { + if (!arr || arr.length == 0) return const [dataArr, targetCoord] = [[], [0, 0]] arr.forEach((el: any) => { + console.log('🚀 ~ arr.forEach ~ el222:', el) function getFormatItem(start: any, end: any) { let item = [ { coord: el.twoPoint[start] }, // 起点 { coord: el.twoPoint[end], lineStyle: { - color: color[el.type], - curveness: el.type === 3 ? 0.1 : 0, + color: '#fff', + // curveness: el.type === 3 ? 0.1 : 0, + curveness: 0, }, effect: { - color: color[el.type], + color: '#fff', }, }, // 终点 ] return item } - switch (el.type) { - case 0: - break - case 1: - dataArr.push(getFormatItem(0, 1)) - break - case 2: - dataArr.push(getFormatItem(1, 0)) - break - case 3: - dataArr.push(getFormatItem(0, 1)) - dataArr.push(getFormatItem(1, 0)) - break - } + dataArr.push(getFormatItem(0, 1)) + // switch (el.type) { + // case 0: + // break + // case 1: + // dataArr.push(getFormatItem(0, 1)) + // break + // case 2: + // dataArr.push(getFormatItem(1, 0)) + // break + // case 3: + // dataArr.push(getFormatItem(0, 1)) + // dataArr.push(getFormatItem(1, 0)) + // break + // } }) return dataArr } @@ -244,10 +260,10 @@ onMounted(() => { trigger: 'item', // 触发类型为数据项 formatter: function (params: any) { // 显示完整的公司名称和订单数 - return `公司名称: ${params.name}
订单数: ${params.data.orderNum}` + return `公司名称: ${params.data.name}
订单数: ${params.data.orderNum}` }, }, - backgroundColor: '#081c47', + backgroundColor: '', xAxis: { show: false, type: 'value', diff --git a/src/views/big-screen/model-components/right-one-model.vue b/src/views/big-screen/model-components/right-one-model.vue index 4153222..1a80086 100644 --- a/src/views/big-screen/model-components/right-one-model.vue +++ b/src/views/big-screen/model-components/right-one-model.vue @@ -66,7 +66,7 @@ const initEChart = () => { return `${companyName} ${params[0].value} 台` }, }, - backgroundColor: 'rgb(20,28,52)', + backgroundColor: '', xAxis: { show: false, type: 'value', @@ -245,7 +245,7 @@ onMounted(() => { .content { width: 100%; flex: 1; - + padding: 0 8px; .item { width: 30%; height: 100%; diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 202ca74..df48448 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -36,6 +36,16 @@ import { downLoadTemplate, //模班下载 } from 'http/api/usercenter/goodsmang' +const batchAddVisible: any = ref(false) // 批量新增 +const batchAddData: any = ref([]) // 批量新增 +const batchAddColumn: any = ref([ + { label: '文件名称', prop: 'fileName' }, + { label: '上传位置', prop: 'position' }, + { label: '装备唯一标识', prop: 'code' }, + { label: '装备名称', prop: 'deviceName' }, + { label: '装备型号', prop: 'deviceType' }, +]) + // 注册地址拼装 const AssemblyRegisterAddress: any = reactive([]) const deviceType: any = reactive([]) @@ -66,8 +76,8 @@ const getTypeTreeData = async () => { } //装备类目-change const deviceTypeChange = (val: any) => { - console.log("ssssssssssssssssssssssssss",val) - if (val!=null && val.length > 0) { + console.log('ssssssssssssssssssssssssss', val) + if (val != null && val.length > 0) { queryParams.value.typeId = val[3] } else { queryParams.value.typeId = '' @@ -520,12 +530,12 @@ const dialogTypeChange = async () => { // } console.log('deviceTypeList', deviceTypeList[0].data) warningDays.value = deviceTypeList[0].data.maintenanceAlarmDay - if(deviceTypeList[0].data.manageType == 0){ - addAndEditForm.deviceCount = 1 - typeDisabled.value = true - }else{ - addAndEditForm.deviceCount = 1 - typeDisabled.value = false + if (deviceTypeList[0].data.manageType == 0) { + addAndEditForm.deviceCount = 1 + typeDisabled.value = true + } else { + addAndEditForm.deviceCount = 1 + typeDisabled.value = false } if (deviceTypeList[0].data.maTypeProperties == null) { propertyNames.value = [] @@ -632,7 +642,6 @@ const equipRules = ref({ message: '请输入日租金', trigger: 'blur', }, - ], person: [{ required: true, message: '联系人不能为空', trigger: 'blur' }], @@ -703,70 +712,9 @@ const descriptionRules = ref({ // 弹框保存提交 const submitBtn = async () => { submitFun(isEditForm.value ? 3 : 1) - // ruleFormRef.value.validate(async (valid: any) => { - // if (valid) { - // if ( - // equipmentDeploymentParams.value.deviceTypeList && - // equipmentDeploymentParams.value.deviceTypeList.length > 0 - // ) { - // equipmentDeploymentParams.value.typeId = - // equipmentDeploymentParams.value.deviceTypeList[3] - // } else { - // equipmentDeploymentParams.value.typeId = '' - // } - // if (mainFileList.value.length == 0 || mainFileList.value.length > 6) { - // ElMessage({ type: 'error', message: '主展示图不得少于1张,不得多于6张' }) - // return - // } - // if (detailsFileList.value.length == 0 || detailsFileList.value.length > 6) { - // ElMessage({ type: 'error', message: '详情展示图不得少于1张,不得多于6张' }) - // return - // } - // let param = { - // ...equipmentDeploymentParams.value, - // mainFileList: mainFileList.value, //主展示 - // detailsFileList: detailsFileList.value, //详情展示 - // insurancePdf: insurancePdf.value, //合格证 - // examinationPdf: examinationPdf.value, //检测证明 - // } - // param.maStatus == 0 ? (param.maStatus = 1) : param.maStatus - // if ( - // equipmentDeploymentParams.value.maId && - // equipmentDeploymentParams.value.maId != '' - // ) { - // const res: any = await equipmentEditApi(param) - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: '保存成功', - // }) - // dialogFormVisibleSettlein.value = false - // getList() - // } - // } else { - // const res: any = await equipmentAddApi(param) - // if (res.code === 200) { - // ElMessage({ - // type: 'success', - // message: '保存成功', - // }) - // dialogFormVisibleSettlein.value = false - // getList() - // } - // } - // } - // }) } const submitFun = (type: any) => { // type 1 提交(新增时) 2 存草稿(新增时) 3 编辑时的提交 4 编辑时存草稿 - // addAndEditForm.mainFileList = [ - // ...addAndEditForm.mainFileList, - // ...addAndEditForm.mainFileTempList, - // ] - // addAndEditForm.detailsFileList = [ - // ...addAndEditForm.detailsFileList, - // ...addAndEditForm.detailsFileTempList, - // ] if (isAdd.value) { addAndEditForm.mainFileList = Array.from( new Set([...addAndEditForm.mainFileList, ...addAndEditForm.mainFileTempList]), @@ -1453,24 +1401,23 @@ const changeNextDate = (row: any) => { } } - const getUpdateTimeBgColor = (row: any) => { - // 将字符串日期转换为 Date 对象 - const checkDate = new Date(); - const nextCheckDate = new Date(row.nextCheckDate); + // 将字符串日期转换为 Date 对象 + const checkDate = new Date() + const nextCheckDate = new Date(row.nextCheckDate) - // 计算两个日期之间的差值(以毫秒为单位) - const diffTime = Math.abs(nextCheckDate - checkDate); - // 将差值转换为天数 - const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); + // 计算两个日期之间的差值(以毫秒为单位) + const diffTime = Math.abs(nextCheckDate - checkDate) + // 将差值转换为天数 + const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)) - if (checkDate < nextCheckDate && diffDays <= 30) { - return '#FFFFCC'; // 黄色背景 - } else if (checkDate > nextCheckDate) { - return '#FFCCCC'; // 红色背景 - } - return ''; // 返回空字符串,让背景色保持默认 -}; + if (checkDate < nextCheckDate && diffDays <= 30) { + return '#FFFFCC' // 黄色背景 + } else if (checkDate > nextCheckDate) { + return '#FFCCCC' // 红色背景 + } + return '' // 返回空字符串,让背景色保持默认 +} - - + +