+
+
+
+
+
+
+
+
@@ -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 @@
修改
- handleCommand(command, scope.$index, scope.row)"
- v-hasPermi="['system:user:delete', 'system:user:update-password', 'system:permission:assign-user-role']">
- 更多
-
- 删除
-
- 重置密码
-
- 分配角色
-
-
-
+ 删除
+
@@ -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)
+ },
}
};