From 0cb93eb0d2d28ece532ec9ed0f12d1018c5550ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Fri, 24 Jan 2025 16:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/screen/jcBigScreen.vue | 175 ++++++++++++-------- src/views/inspection/staff/index.vue | 157 +++++++++--------- 2 files changed, 178 insertions(+), 154 deletions(-) diff --git a/src/views/inspection/screen/jcBigScreen.vue b/src/views/inspection/screen/jcBigScreen.vue index 4e4ddf5..f431584 100644 --- a/src/views/inspection/screen/jcBigScreen.vue +++ b/src/views/inspection/screen/jcBigScreen.vue @@ -84,19 +84,19 @@
公示价格
-
4090
+
{{ data1.gsAmount || 0 }}
应收
-
4090
+
{{ data1.ysAmount || 0 }}
已收
-
4090
+
{{ data1.yjsAmount || 0 }}
待收
-
4090
+
{{ data1.ysAmount - data1.yjsAmount || 0 }}
@@ -130,7 +130,7 @@
- 检测合格率 + 检测合格率(按车型)
@@ -142,33 +142,33 @@
-
+
-
重型货车
-
{{Progress1}}%
+
{{ item.name }}
+
{{ item.value }}%
-
-
-
-
-
-
3.5以上 轻型货车
-
{{Progress1}}%
-
-
-
-
-
-
-
-
3.5以下 轻型货车
-
{{Progress1}}%
-
-
-
+
+ + + + + + + + + + + + + + + + + +
@@ -179,11 +179,19 @@
-
+ + + + + + + +
-
-
双燃料机油
+
+
双燃料机油
+
278
@@ -216,10 +224,10 @@ import * as echarts from 'echarts'; import * as jcBigScreen from '@/views/inspection/screen/api/jcBigScreen'; import { chartInfoNum, - chartLineInspectionAmount, + chartLineInspectionAmount, chartLineInspectionNum, getfive1, getfive2, - getfive3, hotGoodsList + getfive3, getServerData1, hotGoodsList } from "@/views/inspection/screen/api/jcBigScreen"; export default { @@ -239,6 +247,7 @@ export default { data1: '', data3: '', chartData1: {}, + jchgl:[], params: { unit: this.unit, }, @@ -254,6 +263,8 @@ export default { {text: '年', unit: 'year'}, ], + jcList:[], //检测合格率 + goodsList:[], } }, created() { @@ -303,6 +314,11 @@ export default { var chartDom = document.getElementById('yskje'); var myChart = echarts.init(chartDom); + const params = { + unit: this.unit, + }; + const res = await jcBigScreen.getServerData1(params) + console.log('已收款金额', res) let option = { tooltip: { @@ -311,7 +327,7 @@ export default { xAxis: { type: 'category', - data: ['小型汽车', '中型汽车', '大型汽车'], + data: res.data.categories, //更改坐标轴颜色 axisLine: { lineStyle: { @@ -362,7 +378,7 @@ export default { }, }, series: [{ - data: [6,6,6],//this.PLAN_COUNT, this.ACTUAL_COUNT,this.GAP + data: res.data.series[0].data,//this.PLAN_COUNT, this.ACTUAL_COUNT,this.GAP type: 'bar', barWidth:40, itemStyle: { @@ -414,6 +430,20 @@ export default { * @returns {Promise} */ async getProduct() { + let res = await hotGoodsList() + console.log('检测商品统计',res) + this.goodsList = res.data + //提取出res.data中的goodsName和salesNum 放进数组 + let goodsName = [] + let salesNum = [] + for (let i = 0; i < res.data.length; i++) { + let name = { + value: res.data[i].salesNum, + name: res.data[i].goodsName + } + goodsName.push(name) + salesNum.push(res.data[i].salesNum) + } var chartDom = document.getElementById('jcsptj'); var myChart = echarts.init(chartDom); @@ -455,11 +485,12 @@ export default { labelLine: { show: false }, - data: [ - { value: 1048, name: '单燃料机油' }, - { value: 735, name: '双燃料机油' }, - { value: 580, name: '三燃料机油' } - ] + // [ + // { value: 1000, name: '单燃料机油' }, + // { value: 735, name: '双燃料机油' }, + // { value: 580, name: '三燃料机油' } + // ] + data: goodsName } ] }; @@ -471,6 +502,11 @@ export default { * @returns {Promise} */ async chartInfoNum() { + const params = { + unit: this.unit1, + } + let res = await jcBigScreen.chartInfoNum(params) + console.log('数量统计', res) var chartDom = document.getElementById('sltj'); var myChart = echarts.init(chartDom); @@ -481,7 +517,7 @@ export default { xAxis: { type: 'category', - data: ['小型汽车', '中型汽车', '大型汽车'], + data: res.data.categories, //更改坐标轴颜色 axisLine: { lineStyle: { @@ -532,7 +568,7 @@ export default { }, }, series: [{ - data: [6,6,6],//this.PLAN_COUNT, this.ACTUAL_COUNT,this.GAP + data: res.data.series[0].data,//this.PLAN_COUNT, this.ACTUAL_COUNT,this.GAP type: 'bar', barWidth:40, itemStyle: { @@ -589,31 +625,17 @@ export default { } let res = await jcBigScreen.chartInfoRatio(params) console.log('检测合格率', res) - res.data.series.forEach(item => { - item.type = 'bar' - }) - var chartDom = document.getElementById('jchgl'); - var myChart = echarts.init(chartDom); - var option; - option = { - xAxis: { - type: 'category', - data: res.data.categories - }, - yAxis: { - type: 'value', - axisLabel: { - formatter: '{value}', - textStyle: { - color: '#fff', //更改坐标轴文字颜色 - fontSize: 16, //更改坐标轴文字大小 - fontFamily: 'MicrosoftYaHei' - } - }, - }, - series: res.data.series - }; - option && myChart.setOption(option); + let arrA = res.data.categories + let arrB = res.data.series + let values = [] + for (let i = 0; i < arrA.length; i++) { + let a = { + value: arrB[0].data[i], + name: arrA[i] + } + values.push(a) + } + this.jchgl = values }, /** * 检测数量 @@ -623,7 +645,8 @@ export default { var chartDom = document.getElementById('jcsl'); var myChart = echarts.init(chartDom); var option; - + const res = await chartLineInspectionNum() + console.log('检测数量', res) option = { color: ['#0663f0', '#FFD78B'], legend: { @@ -633,7 +656,7 @@ export default { xAxis: { type: 'category', boundaryGap: false, - data: ['01', '02', '03', '04', '05', '06', '07'], + data: res.data.categories, axisLine: { lineStyle: { color: '#fff' @@ -662,7 +685,7 @@ export default { }, series: [ { - data: [820, 932, 901, 934, 1290, 1330, 1320], + data: res.data.series[0].data, type: 'line', symbolSize: 0, smooth: true, @@ -675,7 +698,7 @@ export default { } }, { - data: [220, 182, 191, 234, 290, 330, 310], + data: res.data.series[1].data, type: 'line', symbolSize: 0, smooth: true, @@ -690,6 +713,8 @@ export default { ] }; + + option && myChart.setOption(option); }, @@ -697,6 +722,11 @@ export default { * 客户来源分析饼图 */ async customerSource() { + const params = { + unit: this.unit, + } + const res = await jcBigScreen.chartLineInspectionAmount(params); + console.log('成交金额', res.data) var chartDom = document.getElementById('khly'); var myChart = echarts.init(chartDom); var option; @@ -707,7 +737,7 @@ export default { }, xAxis: { type: 'category', - data: ['01', '02', '03', '04', '05', '06', '07'], + data: res.data.categories, axisLine: { lineStyle: { color: '#fff' @@ -733,13 +763,12 @@ export default { textStyle: { color: '#fff', fontSize: 16, - } }, }, series: [ { - data: [120, 200, 150, 80, 70, 110, 130], + data: res.data.series[0].data, type: 'line', symbolSize: 10, diff --git a/src/views/inspection/staff/index.vue b/src/views/inspection/staff/index.vue index 5b63e74..4b0e34b 100644 --- a/src/views/inspection/staff/index.vue +++ b/src/views/inspection/staff/index.vue @@ -19,8 +19,8 @@ - - + @@ -33,12 +33,6 @@ :value="parseInt(dict.value)"/> - - - 搜索 重置 @@ -66,7 +60,7 @@ - @@ -90,22 +84,9 @@ 修改 - - 更多 - - 删除 - - 重置密码 - - 分配角色 - - - + 删除 + @@ -120,14 +101,14 @@ - - + + + placeholder="请选择归属部门" /> @@ -145,8 +126,8 @@ - - + + @@ -187,7 +168,8 @@ - + @@ -226,18 +208,6 @@ - - - - - - - - - - - - @@ -247,9 +217,9 @@ - - - + + + @@ -260,6 +230,24 @@ + + + + 点击上传 +
只能上传jpg/png文件,且不超过500kb
+
+
- - - - - - - - - - - - - - - - - -
@@ -384,6 +346,8 @@ export default { children: "children", label: "name" }, + // 文件列表 + fileList: [], // 驾驶证类型 driverLicenseTypeOptions:[], // 用户导入参数 @@ -401,6 +365,19 @@ export default { // 上传的地址 url: process.env.VUE_APP_BASE_API + '/admin-api/system/user/import' }, + //图片 + imageUpload: { + // 是否显示弹出层(用户导入) + open: false, + // 弹出层标题(用户导入) + title: "", + // 是否禁用上传 + isUploading: false, + // 设置上传的请求头部 + headers: getBaseHeader(), + // 上传的地址 + url: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/uploadDetail' + }, // 查询参数 queryParams: { pageNo: 1, @@ -568,6 +545,7 @@ export default { postIds: [], roleIds: [] }; + this.fileList = []; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -593,11 +571,11 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset(); - this.getTreeselect(); + // this.getTreeselect(); const id = row.id; - console.log(id) getUser(id).then(response => { this.form = response.data; + this.fileList = this.form.fileList == null ? [] : this.form.fileList; this.open = true; this.title = "修改用户"; }); @@ -640,6 +618,7 @@ export default { submitForm: function () { this.$refs["form"].validate(valid => { if (valid) { + this.form.fileList = this.fileList if (this.form.id !== undefined) { this.form.userId = this.form.id; console.log(this.form) @@ -741,15 +720,31 @@ export default { // 提交上传文件 submitFileForm() { this.$refs.upload.submit(); + console.log('执行') }, - // 格式化部门的下拉框 - normalizer(node) { - return { - id: node.id, - label: node.name, - children: node.children + handleRemove(file) { + console.log(file); + //在fileList中删除附件 + this.fileList.splice(this.fileList.indexOf(file), 1); + }, + handlePreview(file) { + console.log(file); + }, + handleExceed(files, fileList) { + this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); + }, + beforeRemove(file, fileList) { + return this.$confirm(`确定移除 ${ file.name }?`); + }, + // 文件上传成功处理 + handleFileSuccessAttachments(response, file, fileList) { + if (response.code !== 0) { + this.$modal.msgError(response.msg) + return; } - } + console.log(response) + this.fileList.push(response.data) + }, } };