解决冲突
This commit is contained in:
commit
4569d047d7
2
.env.dev
2
.env.dev
@ -1,7 +1,7 @@
|
|||||||
###
|
###
|
||||||
# @Author: zhp
|
# @Author: zhp
|
||||||
# @Date: 2024-04-28 13:42:51
|
# @Date: 2024-04-28 13:42:51
|
||||||
# @LastEditTime: 2024-05-29 11:03:03
|
# @LastEditTime: 2024-05-29 17:06:55
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 08:54:59
|
* @Date: 2024-05-07 08:54:59
|
||||||
* @LastEditTime: 2024-05-20 14:56:56
|
* @LastEditTime: 2024-05-22 16:31:08
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -105,6 +105,32 @@ export function delTarget(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导入铜铟镓硒工厂
|
||||||
|
export function importToTarget(data) {
|
||||||
|
return request({
|
||||||
|
url: '/ip/prod-target/to-target-import-excel',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导入碲化镉工厂
|
||||||
|
export function importDiTarget(data) {
|
||||||
|
return request({
|
||||||
|
url: '/ip/prod-target/di-target-import-excel',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// export function cockpitDataMonitor(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/ip/prod-output/cockpitDataMonitor',
|
||||||
|
// method: 'post',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
export function cockpitDataMonitor(data) {
|
export function cockpitDataMonitor(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ip/prod-output/cockpitDataMonitor',
|
url: '/ip/prod-output/cockpitDataMonitor',
|
||||||
|
@ -139,3 +139,15 @@ export function getDictDataLabel(dictType, value) {
|
|||||||
const dict = getDictData(dictType, value);
|
const dict = getDictData(dictType, value);
|
||||||
return dict ? dict.label : '';
|
return dict ? dict.label : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// table中用来过滤字典
|
||||||
|
export function publicFormatter(dictTable) {
|
||||||
|
const dictDatas = getDictDatas(dictTable)
|
||||||
|
return function (val) {
|
||||||
|
const arr = {}
|
||||||
|
dictDatas.map((item) => {
|
||||||
|
arr[item.value] = item.label
|
||||||
|
})
|
||||||
|
return arr?.[val]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-05-13 15:43:45
|
* @LastEditTime: 2024-05-20 18:02:10
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -111,7 +111,7 @@
|
|||||||
<!-- <p class="text">{{ dataForm.productName }}</p> -->
|
<!-- <p class="text">{{ dataForm.productName }}</p> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件人均产量</p>
|
<p class="title">标准组件平均功率</p>
|
||||||
<!-- <p class="text">{{ dataForm.productName }}</p> -->
|
<!-- <p class="text">{{ dataForm.productName }}</p> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-05-16 14:15:46
|
* @LastEditTime: 2024-05-22 15:25:11
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -15,7 +15,7 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="listQuery.date === 0" label="时间范围" prop="reportTime">
|
<el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime">
|
||||||
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="至"
|
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="至"
|
||||||
start-placeholder="开始日期" value-format="timestamp" @change="changeDayTime" end-placeholder="结束日期">
|
start-placeholder="开始日期" value-format="timestamp" @change="changeDayTime" end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -38,11 +38,11 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime">
|
<el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime">
|
||||||
<el-date-picker size="small" clearable v-model="listQuery.start" value-format="timestamp" type="year"
|
<el-date-picker size="small" clearable v-model="listQuery.start" format="yyyy-MM-dd" value-format="timestamp" type="year"
|
||||||
placeholder="开始时间">
|
placeholder="开始时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
~
|
~
|
||||||
<el-date-picker size="small" clearable v-model="listQuery.end" value-format="timestamp" type="year" placeholder="结束时间"
|
<el-date-picker size="small" clearable v-model="listQuery.end" format="yyyy-MM-dd" value-format="timestamp" type="year" placeholder="结束时间"
|
||||||
@change="getYear">
|
@change="getYear">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -132,7 +132,9 @@ export default {
|
|||||||
// reportType: 2,
|
// reportType: 2,
|
||||||
beginTime: undefined,
|
beginTime: undefined,
|
||||||
endTime:undefined,
|
endTime:undefined,
|
||||||
reportTime: []
|
reportTime: [],
|
||||||
|
start: undefined,
|
||||||
|
end: undefined
|
||||||
},
|
},
|
||||||
detailOrUpdateVisible:false,
|
detailOrUpdateVisible:false,
|
||||||
date1: undefined,
|
date1: undefined,
|
||||||
@ -283,19 +285,18 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
xAxis: []
|
||||||
// proLineList: [],
|
// proLineList: [],
|
||||||
// all: {}
|
// all: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
weekNum() {
|
weekNum() {
|
||||||
return Math.round((this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 60 * 60 * 1000 * 7)) + 1
|
return Math.round((this.listQuery.end - this.listQuery.start) / (24 * 60 * 60 * 1000 * 7)) + 1
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDataList()
|
||||||
// this.getCurrentYearFirst()
|
|
||||||
// this.getDataList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
otherMethods(val) {
|
otherMethods(val) {
|
||||||
@ -309,25 +310,27 @@ export default {
|
|||||||
|
|
||||||
// },
|
// },
|
||||||
getYear(e) {
|
getYear(e) {
|
||||||
if (this.listQuery.reportTime[1] - this.listQuery.reportTime[0] > 10*365*24*60*60*1000) {
|
if (this.listQuery.end - this.listQuery.start > 10*365*24*60*60*1000) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '年份起止时间不能超过十年',
|
message: '年份起止时间不能超过十年',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
this.listQuery.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
|
this.listQuery.start = undefined
|
||||||
|
this.listQuery.end = undefined
|
||||||
// console.log();
|
// console.log();
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
this.listQuery.beginTime = this.listQuery.start
|
||||||
this.listQuery.endTime = this.listQuery.reportTime[1]
|
this.listQuery.endTime = this.listQuery.end
|
||||||
}
|
}
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
},
|
},
|
||||||
onValueChange(picker, k) { // 选中近k周后触发的操作
|
onValueChange(picker, k) { // 选中近k周后触发的操作
|
||||||
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
|
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
|
||||||
if (this.listQuery.reportTime[0] && this.listQuery.reportTime[1]) {
|
if (this.listQuery.start && this.listQuery.end) {
|
||||||
console.log(this.listQuery.reportTime)
|
console.log(this.listQuery.reportTime)
|
||||||
this.date1 = moment(this.listQuery.reportTime[0].getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
|
this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.date2 = moment(this.listQuery.reportTime[1].getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
|
this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
|
||||||
const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
|
const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
|
||||||
if (numDays > 168) {
|
if (numDays > 168) {
|
||||||
console.log(numDays)
|
console.log(numDays)
|
||||||
@ -336,8 +339,8 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.beginTime = this.listQuery.reportTime[0].getTime() - 24 * 60 * 60 * 1000
|
this.listQuery.beginTime = this.listQuery.start.getTime() - 24 * 60 * 60 * 1000
|
||||||
this.listQuery.endTime = this.listQuery.reportTime[1].getTime() + 5 * 24 * 60 * 60 * 1000
|
this.listQuery.endTime = this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -377,12 +380,11 @@ export default {
|
|||||||
console.log(this.listQuery.reportTime[0])
|
console.log(this.listQuery.reportTime[0])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDict() {
|
// async getDict() {
|
||||||
this.$refs.lineChart.initChart()
|
|
||||||
// 产线列表
|
// 产线列表
|
||||||
// const res = await getCorePLList();
|
// const res = await getCorePLList();
|
||||||
// this.proLineList = res.data;
|
// this.proLineList = res.data;
|
||||||
},
|
// },
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
multipliedByHundred(str) {
|
multipliedByHundred(str) {
|
||||||
console.log(str);
|
console.log(str);
|
||||||
@ -411,33 +413,43 @@ export default {
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
this.tableData.forEach(item => {
|
this.tableData.forEach(item => {
|
||||||
item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '年' + item.reportDate[1] + '月' + item.reportDate[2] + '日' : '--'
|
item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '-' + item.reportDate[1] + '-' + item.reportDate[2] : '--'
|
||||||
})
|
})
|
||||||
this.listQuery.total = res.data.total
|
this.listQuery.total = res.data.total
|
||||||
|
this.buildChart(this.tableData)
|
||||||
},
|
},
|
||||||
add0(m) {
|
buildChart(list) {
|
||||||
return m < 10 ? '0' + m : m
|
const chartList = Object.groupBy(list, (item) => item.tableTime)
|
||||||
|
this.xAxis = []
|
||||||
|
this.seriesList = []
|
||||||
|
for (const keyIndex in chartList) {
|
||||||
|
// X坐标轴数据
|
||||||
|
this.xAxis.push(keyIndex)
|
||||||
|
}
|
||||||
|
// y轴数据
|
||||||
|
for (const y of this.factoryList) {
|
||||||
|
// y: {name: , id: }
|
||||||
|
const seriesItem = {
|
||||||
|
name: y.name,
|
||||||
|
type: 'bar',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: Array(this.xAxis.length).fill(0)
|
||||||
|
}
|
||||||
|
for (const a in chartList) {
|
||||||
|
for (const z of chartList[a]) {
|
||||||
|
this.xAxis.forEach((item, index) => {
|
||||||
|
if (z.factory === y.id && a === item) {
|
||||||
|
seriesItem.data[index] = z.goodNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.seriesList.push(seriesItem)
|
||||||
|
}
|
||||||
|
this.$refs.lineChart.initChart(this.xAxis, this.seriesList)
|
||||||
},
|
},
|
||||||
format(shijianchuo) {
|
|
||||||
//shijianchuo是整数,否则要parseInt转换
|
|
||||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
// console.log(time)
|
|
||||||
// var y = time.getFullYear();
|
|
||||||
// var m = time.getMonth() + 1;
|
|
||||||
// var d = time.getDate();
|
|
||||||
// var h = time.getHours();
|
|
||||||
// var mm = time.getMinutes();
|
|
||||||
// var s = time.getSeconds();
|
|
||||||
return time
|
|
||||||
},
|
|
||||||
//时间戳转为yy-mm-dd hh:mm:ss
|
|
||||||
timeFun(unixtimestamp) {
|
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
|
||||||
var date = "0" + unixtimestamp.getDate();
|
|
||||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
|
||||||
},
|
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-01-21 14:43:06
|
* @Date: 2022-01-21 14:43:06
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-04-17 10:03:39
|
* @LastEditTime: 2024-05-22 13:48:58
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -58,11 +58,11 @@ export default {
|
|||||||
chart: null
|
chart: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
// mounted() {
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.initChart()
|
// this.initChart()
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
@ -71,8 +71,7 @@ export default {
|
|||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart(xAxis, seriesList) {
|
||||||
console.log(1111)
|
|
||||||
this.chart = echarts.init(document.getElementById(this.id))
|
this.chart = echarts.init(document.getElementById(this.id))
|
||||||
console.log(this.$parent);
|
console.log(this.$parent);
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
@ -85,7 +84,7 @@ export default {
|
|||||||
},
|
},
|
||||||
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
|
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
|
||||||
legend: {
|
legend: {
|
||||||
data: ['工厂1', '工厂2'],
|
// data: ['工厂1', '工厂2'],
|
||||||
right: '90px',
|
right: '90px',
|
||||||
top: '0%',
|
top: '0%',
|
||||||
icon: 'rect',
|
icon: 'rect',
|
||||||
@ -107,7 +106,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
data: xAxis
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
@ -122,39 +121,8 @@ export default {
|
|||||||
bottom: "1%",
|
bottom: "1%",
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
series: [
|
series: seriesList
|
||||||
{
|
}, true)
|
||||||
name: '工厂1',
|
|
||||||
type: 'bar',
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: 'rgba(99, 189, 255, 1)', //改变折线点的颜色
|
|
||||||
lineStyle: {
|
|
||||||
color: 'rgba(99, 189, 255, 1)' //改变折线颜色
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: [
|
|
||||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '工厂2',
|
|
||||||
type: 'bar',
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: 'rgba(142, 240, 171, 1)', //改变折线点的颜色
|
|
||||||
lineStyle: {
|
|
||||||
color: 'rgba(142, 240, 171, 1)' //改变折线颜色
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: [
|
|
||||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-17 16:31:51
|
* @Date: 2024-04-17 16:31:51
|
||||||
* @LastEditTime: 2024-05-17 14:48:57
|
* @LastEditTime: 2024-05-20 18:09:09
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -75,14 +75,20 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24" style="padding: 0 32px;">
|
<el-row :gutter="24" style="padding: 0 32px;">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="FTO投入量" prop="ftoInput">
|
<el-form-item v-if="ftype === 0" label="FTO投入量" prop="ftoInput">
|
||||||
<el-input-number v-model="dataForm.ftoInput" :precision="0" controls-position="right" placeholder="请输入FTO投入量" style="width: 100%" />
|
<el-input-number v-model="dataForm.ftoInput" :precision="0" controls-position="right" placeholder="请输入FTO投入量" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-else label="钼电极投入量" prop="molybdenumElectrodeInput">
|
||||||
|
<el-input-number v-model="dataForm.molybdenumElectrodeInput" :precision="0" controls-position="right" placeholder="请输入钼电极投入量" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="CSS稼动率" prop="chipCssMarriageRate">
|
<el-form-item v-if="ftype === 0" label="CSS稼动率" prop="chipCssMarriageRate">
|
||||||
<el-input-number v-model="dataForm.chipCssMarriageRate" :precision="2" controls-position="right" placeholder="请输入CSS稼动率" style="width: 100%" />
|
<el-input-number v-model="dataForm.chipCssMarriageRate" :precision="2" controls-position="right" placeholder="请输入CSS稼动率" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-else label="PID6稼动率" prop="chipCssMarriageRate">
|
||||||
|
<el-input-number v-model="dataForm.chipCssMarriageRate" :precision="2" controls-position="right" placeholder="请输入PID6稼动率" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="芯片段OEE" prop="chipOee">
|
<el-form-item label="芯片段OEE" prop="chipOee">
|
||||||
@ -316,7 +322,8 @@ export default {
|
|||||||
bipvChipUtilizationRate: undefined,
|
bipvChipUtilizationRate: undefined,
|
||||||
bipvInsideMaterialCost: undefined,
|
bipvInsideMaterialCost: undefined,
|
||||||
bipvOeeMaterialCost: undefined,
|
bipvOeeMaterialCost: undefined,
|
||||||
bipvComprehensiveMaterialCost: undefined
|
bipvComprehensiveMaterialCost: undefined,
|
||||||
|
molybdenumElectrodeInput: undefined
|
||||||
},
|
},
|
||||||
// materialList: [],
|
// materialList: [],
|
||||||
dataRule: {
|
dataRule: {
|
||||||
@ -330,7 +337,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.dataForm.factoryType = this.ftype
|
|
||||||
// this.getCurrentTime()
|
// this.getCurrentTime()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -388,6 +394,7 @@ export default {
|
|||||||
},
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || undefined
|
this.dataForm.id = id || undefined
|
||||||
|
this.dataForm.factoryType = this.ftype
|
||||||
this.visible = true
|
this.visible = true
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
getProduceTargetDetail(this.dataForm.id).then(res => {
|
getProduceTargetDetail(this.dataForm.id).then(res => {
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-04-17 16:40:01
|
* @LastEditTime: 2024-05-22 15:29:18
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer class="drawer" :visible.sync="visible" size="50%">
|
<el-drawer class="drawer" :visible.sync="visible" size="58%" @closed="$emit('destroy')">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ '碲化镉工厂生产数据详情' }}
|
{{ ftype === 0 ? '碲化镉工厂生产数据详情' : '铜铟镓硒工厂生产数据详情' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="detailBox">
|
<div class="detailBox">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<p class="title">工厂名称</p>
|
<p class="title">工厂名称</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ factoryList[dataForm.factory] }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<p class="title">时间维度</p>
|
<p class="title">时间维度</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.targetType === 0 ? '月' : '年' }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<p class="title">时间</p>
|
<p class="title">时间</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.targetType === 1 ? dataForm.targetYear + '年' : dataForm.targetYear + '年' + dataForm.targetMonth + '月'}}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
@ -32,47 +32,47 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片产量</p>
|
<p class="title">芯片产量</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ dataForm.chipYield }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片良率</p>
|
<p class="title">芯片良率</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.chipYieldRate }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片良率</p>
|
<p class="title">芯片BOM</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.chipBom }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片总功率</p>
|
<p class="title">芯片总功率</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.chipTotalPower }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">FTO投入量</p>
|
<p class="title">{{ ftype === 0 ? 'FTO投入量' : '钼电极投入量' }}</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ ftype === 0 ? dataForm.ftoInput : dataForm.molybdenumElectrodeInput }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">CSS稼动率</p>
|
<p class="title">{{ ftype === 0 ? 'CSS稼动率' : 'PID6稼动率' }}</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.chipCssMarriageRate }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片段OEE</p>
|
<p class="title">芯片段OEE</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.chipOee }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片平均功率</p>
|
<p class="title">芯片平均功率</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.chipAveragePower }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片人均产量</p>
|
<p class="title">芯片人均产量</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ dataForm.chipAnnualAverageProduction }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片产能利用率</p>
|
<p class="title">芯片产能利用率</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.chipCapacityUtilizationRate }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
||||||
@ -81,37 +81,37 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">封装BOM</p>
|
<p class="title">封装BOM</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ dataForm.componentBom }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">封装线OEE</p>
|
<p class="title">封装线OEE</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.componentOee }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件良率</p>
|
<p class="title">标准组件良率</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.componentYieldRate }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件产量</p>
|
<p class="title">标准组件产量</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.componentYield }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件总功率</p>
|
<p class="title">标准组件总功率</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ dataForm.componentTotalPower }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">封装产能利用率</p>
|
<p class="title">封装产能利用率</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.componentCapacityUtilizationRate }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件人均产量</p>
|
<p class="title">标准组件人均产量</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.componentAnnualAverageProduction }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">标准组件人均产量</p>
|
<p class="title">标准组件平均功率</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.componentAveragePower }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
||||||
@ -120,33 +120,33 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">产品产量</p>
|
<p class="title">产品产量</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ dataForm.bipvProductOutput }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">人均产量</p>
|
<p class="title">人均产量</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.bipvAnnualAverageProduction }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片使用量</p>
|
<p class="title">芯片使用量</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.bipvChipUsage }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">芯片使用量</p>
|
<p class="title">芯片利用率</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.bipvChipUtilizationRate }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">内部材料成本</p>
|
<p class="title">内部材料成本</p>
|
||||||
<p class="text">{{ }}</p>
|
<p class="text">{{ dataForm.bipvInsideMaterialCost }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">内部材料成本</p>
|
<p class="title">OEM及委外材料成本</p>
|
||||||
<p class="text">{{ dataForm.code }}</p>
|
<p class="text">{{ dataForm.bipvOeeMaterialCost }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<p class="title">内部材料成本</p>
|
<p class="title">综合材料成本</p>
|
||||||
<p class="text">{{ dataForm.productName }}</p>
|
<p class="text">{{ dataForm.bipvComprehensiveMaterialCost }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -155,20 +155,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicAdd from './basic-add';
|
import { getProduceTargetDetail } from '@/api/produceData';
|
||||||
// import {
|
|
||||||
// createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
|
||||||
// getTeamList, getDetList, getLineList
|
|
||||||
// } from "@/api/base/qualityScrapLog";
|
|
||||||
// import { getList, } from "@/api/base/qualityScrapType";
|
|
||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
|
import { factoryList } from "@/utils/constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
SmallTitle,
|
SmallTitle,
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
ftype: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
// mixins: [basicAdd],
|
// mixins: [basicAdd],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
factoryList,
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
isGetCode: false,
|
isGetCode: false,
|
||||||
// codeURL: getCode,
|
// codeURL: getCode,
|
||||||
@ -223,8 +227,14 @@ export default {
|
|||||||
// this.getCurrentTime()
|
// this.getCurrentTime()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init(id) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
console.log('打印', id)
|
||||||
|
if (id) {
|
||||||
|
getProduceTargetDetail(id).then(res => {
|
||||||
|
this.dataForm = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// getCurrentTime() {
|
// getCurrentTime() {
|
||||||
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-05-17 17:54:54
|
* @LastEditTime: 2024-05-22 16:22:57
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -92,26 +92,38 @@
|
|||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList"
|
@pagination="getDataList"
|
||||||
/>
|
/>
|
||||||
<detail-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" @destroy="detailOrUpdateVisible = false" />
|
<detail-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :ftype="facType" @destroy="detailOrUpdateVisible = false" />
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :ftype="facType" @refreshDataList="getDataList" @destroy="addOrUpdateVisible = false" />
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :ftype="facType" @refreshDataList="getDataList" @destroy="addOrUpdateVisible = false" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 用户导入对话框 -->
|
<!-- 用户导入对话框 -->
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||||
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls"
|
||||||
:action="upload.url" :disabled="upload.isUploading"
|
:headers="upload.headers"
|
||||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
:action="upload.url"
|
||||||
|
:file-list="fileList"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:auto-upload="false" drag>
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload"></i>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
<div class="el-upload__tip text-center" slot="tip">
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
<!-- <div class="el-upload__tip" slot="tip">
|
|
||||||
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
|
||||||
</div> -->
|
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
<!-- <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link> -->
|
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
<!-- <el-upload
|
||||||
|
ref="upload"
|
||||||
|
class="upload-demo"
|
||||||
|
action="#"
|
||||||
|
:limit="1"
|
||||||
|
:file-list="fileList"
|
||||||
|
:auto-upload="false"
|
||||||
|
:http-request="handleFileSuccess"> -->
|
||||||
|
<!-- <el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
<div slot="tip" class="el-upload__tip">只能上传.xlsx, .xls文件,且不超过500kb</div>
|
||||||
|
</el-upload> -->
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
@ -130,7 +142,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { parseTime } from '@/utils/ruoyi';
|
import { parseTime } from '@/utils/ruoyi';
|
||||||
import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget } from '@/api/produceData';
|
import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget, importToTarget, importDiTarget } from '@/api/produceData';
|
||||||
// import inputTable from './inputTable.vue';
|
// import inputTable from './inputTable.vue';
|
||||||
import lineChart from './lineChart';
|
import lineChart from './lineChart';
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
@ -153,6 +165,7 @@ export default {
|
|||||||
dhgfactoryList,
|
dhgfactoryList,
|
||||||
tyjxfactoryList,
|
tyjxfactoryList,
|
||||||
currentMenu: '碲化镉工厂',
|
currentMenu: '碲化镉工厂',
|
||||||
|
fileList: [],
|
||||||
start: undefined,
|
start: undefined,
|
||||||
end: undefined,
|
end: undefined,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
@ -182,7 +195,7 @@ export default {
|
|||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: getBaseHeader(),
|
headers: getBaseHeader(),
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + '/ip/prod-target/di-target-import-excel'
|
url: process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
|
||||||
},
|
},
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
{
|
{
|
||||||
@ -332,8 +345,8 @@ export default {
|
|||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'molybdenumElectrodeInput',
|
prop: 'ftoInput',
|
||||||
label: '钼电极投入量(片)',
|
label: 'FTO投入量(片)',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
@ -405,26 +418,85 @@ export default {
|
|||||||
// all: {}
|
// all: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
// computed: {
|
||||||
weekNum() {
|
// weekNum() {
|
||||||
return Math.round((this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 60 * 60 * 1000 * 7)) + 1
|
// return Math.round((this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 60 * 60 * 1000 * 7)) + 1
|
||||||
},
|
// },
|
||||||
|
// },
|
||||||
|
watch: {
|
||||||
|
facType(value) {
|
||||||
|
if (value === 0) {
|
||||||
|
this.$set(this.tableProps, 3, {
|
||||||
|
prop: 'ftoInput',
|
||||||
|
label: 'FTO投入量(片)',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
|
})
|
||||||
|
this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
|
||||||
|
} else {
|
||||||
|
this.$set(this.tableProps, 3, {
|
||||||
|
prop: 'molybdenumElectrodeInput',
|
||||||
|
label: '钼电极投入量(片)',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
|
})
|
||||||
|
this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
|
||||||
|
}
|
||||||
|
console.log(112, this.tableProps)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.getDict()
|
// this.getDict()
|
||||||
// this.getCurrentYearFirst()
|
// this.getCurrentYearFirst()
|
||||||
// this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.upload.title = "生产目标导入";
|
this.upload.title = "生产目标导入";
|
||||||
this.upload.open = true;
|
this.upload.open = true;
|
||||||
|
this.fileList = []
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
this.upload.isUploading = true;
|
this.upload.isUploading = true;
|
||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
|
// handleFileSuccess(param, type) {
|
||||||
|
// console.log('带的', param.file)
|
||||||
|
// const formData = new FormData()
|
||||||
|
// formData.append('multipartFile', param.file)
|
||||||
|
// console.log('送送', param)
|
||||||
|
// importDiTarget(formData).then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
// if (res.code !== 0) {
|
||||||
|
// this.$modal.msgError(response.msg)
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// this.upload.open = false;
|
||||||
|
// this.upload.isUploading = false;
|
||||||
|
// this.$refs.upload.clearFiles();
|
||||||
|
// }).catch(() => {
|
||||||
|
// this.upload.open = false
|
||||||
|
// this.upload.isUploading = false
|
||||||
|
// })
|
||||||
|
// // 拼接提示语
|
||||||
|
// // let data = response.data;
|
||||||
|
// // let text = '创建成功数量:' + data.createUsernames.length;
|
||||||
|
// // for (const username of data.createUsernames) {
|
||||||
|
// // text += '<br /> ' + username;
|
||||||
|
// // }
|
||||||
|
// // text += '<br />更新成功数量:' + data.updateUsernames.length;
|
||||||
|
// // for (const username of data.updateUsernames) {
|
||||||
|
// // text += '<br /> ' + username;
|
||||||
|
// // }
|
||||||
|
// // text += '<br />更新失败数量:' + Object.keys(data.failureUsernames).length;
|
||||||
|
// // for (const username in data.failureUsernames) {
|
||||||
|
// // text += '<br /> ' + username + ':' + data.failureUsernames[username];
|
||||||
|
// // }
|
||||||
|
// this.$message.success('导入成功!');
|
||||||
|
// this.getDataList();
|
||||||
|
// },
|
||||||
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
if (response.code !== 0) {
|
if (response.code !== 0) {
|
||||||
this.$modal.msgError(response.msg)
|
this.$modal.msgError(response.msg)
|
||||||
@ -433,22 +505,8 @@ export default {
|
|||||||
this.upload.open = false;
|
this.upload.open = false;
|
||||||
this.upload.isUploading = false;
|
this.upload.isUploading = false;
|
||||||
this.$refs.upload.clearFiles();
|
this.$refs.upload.clearFiles();
|
||||||
// 拼接提示语
|
this.$message.success('导入成功!')
|
||||||
// let data = response.data;
|
this.getDataList()
|
||||||
// let text = '创建成功数量:' + data.createUsernames.length;
|
|
||||||
// for (const username of data.createUsernames) {
|
|
||||||
// text += '<br /> ' + username;
|
|
||||||
// }
|
|
||||||
// text += '<br />更新成功数量:' + data.updateUsernames.length;
|
|
||||||
// for (const username of data.updateUsernames) {
|
|
||||||
// text += '<br /> ' + username;
|
|
||||||
// }
|
|
||||||
// text += '<br />更新失败数量:' + Object.keys(data.failureUsernames).length;
|
|
||||||
// for (const username in data.failureUsernames) {
|
|
||||||
// text += '<br /> ' + username + ':' + data.failureUsernames[username];
|
|
||||||
// }
|
|
||||||
this.$message.success('导入成功!');
|
|
||||||
this.getDataList();
|
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
@ -463,6 +521,11 @@ export default {
|
|||||||
changeFactory($event) {
|
changeFactory($event) {
|
||||||
this.currentMenu = $event
|
this.currentMenu = $event
|
||||||
this.facType = this.currentMenu === '碲化镉工厂' ? 0 : 1
|
this.facType = this.currentMenu === '碲化镉工厂' ? 0 : 1
|
||||||
|
// if (this.facType === 0) {
|
||||||
|
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
|
||||||
|
// } else {
|
||||||
|
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
|
||||||
|
// }
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
|
38
src/views/system/components/statusBtn2.vue
Normal file
38
src/views/system/components/statusBtn2.vue
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span class="dot" :class="injectData.status === 1 ? 'red' : 'green'"></span>
|
||||||
|
<span>{{ state }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "StatusBtn2",
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
state() {
|
||||||
|
return this.injectData.status === 1 ? "关闭" : "开启";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.dot {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.green {
|
||||||
|
background: #10dc76;
|
||||||
|
}
|
||||||
|
.red {
|
||||||
|
background: #ff5656;
|
||||||
|
}
|
||||||
|
</style>
|
41
src/views/system/components/statusBtn3.vue
Normal file
41
src/views/system/components/statusBtn3.vue
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span
|
||||||
|
class="dot"
|
||||||
|
:class="injectData.resultCode === 0 ? 'green' : 'red'"
|
||||||
|
></span>
|
||||||
|
<span>{{ state }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "StatusBtn3",
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
state() {
|
||||||
|
return this.injectData.resultCode === 0 ? "成功" : "失败";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.dot {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.green {
|
||||||
|
background: #10dc76;
|
||||||
|
}
|
||||||
|
.red {
|
||||||
|
background: #ff5656;
|
||||||
|
}
|
||||||
|
</style>
|
38
src/views/system/components/statusBtn4.vue
Normal file
38
src/views/system/components/statusBtn4.vue
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span class="dot" :class="injectData.result === 0 ? 'green' : 'red'"></span>
|
||||||
|
<span>{{ state }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "StatusBtn3",
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
state() {
|
||||||
|
return this.injectData.result === 0 ? "成功" : "失败";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.dot {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.green {
|
||||||
|
background: #10dc76;
|
||||||
|
}
|
||||||
|
.red {
|
||||||
|
background: #ff5656;
|
||||||
|
}
|
||||||
|
</style>
|
39
src/views/system/components/statusBtn5.vue
Normal file
39
src/views/system/components/statusBtn5.vue
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<el-switch
|
||||||
|
v-model="status"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@change="changeHandler"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
status: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.mapToState();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
mapToState() {
|
||||||
|
this.status = this.injectData.status === 0 ? true : false;
|
||||||
|
},
|
||||||
|
changeHandler() {
|
||||||
|
let params = {};
|
||||||
|
params.id = this.injectData.id;
|
||||||
|
params.status = this.status ? "0" : "1";
|
||||||
|
params.username = this.injectData.username;
|
||||||
|
this.$emit("emitData", params);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -1,137 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<doc-alert title="系统日志" url="https://doc.iocoder.cn/system-log/" />
|
<!-- <doc-alert title="系统日志" url="https://doc.iocoder.cn/system-log/" /> -->
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<search-bar
|
||||||
:model="queryParams"
|
:formConfigs="formConfig"
|
||||||
ref="queryForm"
|
ref="searchBarForm"
|
||||||
size="small"
|
@headBtnClick="buttonClick"
|
||||||
:inline="true"
|
/>
|
||||||
v-show="showSearch"
|
|
||||||
label-width="68px"
|
|
||||||
>
|
|
||||||
<el-form-item label="登录地址" prop="userIp">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userIp"
|
|
||||||
placeholder="请输入登录地址"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户名称" prop="username">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.username"
|
|
||||||
placeholder="请输入用户名称"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.status"
|
|
||||||
placeholder="结果"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option :key="true" label="成功" :value="true" />
|
|
||||||
<el-option :key="false" label="失败" :value="false" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="登录时间" prop="createTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.createTime"
|
|
||||||
style="width: 240px"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="-"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<!-- 列表 -->
|
||||||
<el-col :span="1.5">
|
<base-table
|
||||||
<el-button
|
:page="queryParams.pageNo"
|
||||||
type="warning"
|
:limit="queryParams.pageSize"
|
||||||
icon="el-icon-download"
|
:table-props="tableProps"
|
||||||
size="mini"
|
:table-data="list"
|
||||||
@click="handleExport"
|
:max-height="tableH"
|
||||||
:loading="exportLoading"
|
/>
|
||||||
v-hasPermi="['system:login-log:export']"
|
|
||||||
>导出</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar
|
|
||||||
:showSearch.sync="showSearch"
|
|
||||||
@queryTable="getList"
|
|
||||||
></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="list">
|
|
||||||
<el-table-column label="访问编号" align="center" prop="id" />
|
|
||||||
<el-table-column
|
|
||||||
label="日志类型"
|
|
||||||
align="center"
|
|
||||||
prop="logType"
|
|
||||||
width="120"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
|
||||||
<dict-tag
|
|
||||||
:type="DICT_TYPE.SYSTEM_LOGIN_TYPE"
|
|
||||||
:value="scope.row.logType"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="用户名称" align="center" prop="username" />
|
|
||||||
<el-table-column
|
|
||||||
label="登录地址"
|
|
||||||
align="center"
|
|
||||||
prop="userIp"
|
|
||||||
width="130"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="userAgent"
|
|
||||||
align="center"
|
|
||||||
prop="userAgent"
|
|
||||||
width="400"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column label="结果" align="center" prop="status">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<dict-tag
|
|
||||||
:type="DICT_TYPE.SYSTEM_LOGIN_RESULT"
|
|
||||||
:value="scope.row.result"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="登录日期"
|
|
||||||
align="center"
|
|
||||||
prop="loginTime"
|
|
||||||
width="180"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
:page.sync="queryParams.pageNo"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -139,17 +28,117 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list, exportLoginLog } from "@/api/system/loginlog";
|
import { list, exportLoginLog } from "@/api/system/loginlog";
|
||||||
|
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
||||||
|
import { parseTime } from "@/utils/ruoyi";
|
||||||
|
import { DICT_TYPE, publicFormatter } from "@/utils/dict";
|
||||||
|
import statusBtn4 from "./../components/statusBtn4.vue";
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: "id",
|
||||||
|
label: "访问编号",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "logType",
|
||||||
|
label: "日志类型",
|
||||||
|
filter: publicFormatter(DICT_TYPE.SYSTEM_LOGIN_TYPE),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "username",
|
||||||
|
label: "用户名称",
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "userIp",
|
||||||
|
label: "登录地址",
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "userAgent",
|
||||||
|
label: "userAgent",
|
||||||
|
minWidth: 300,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "result",
|
||||||
|
label: "结果",
|
||||||
|
minWidth: 80,
|
||||||
|
// filter: publicFormatter(DICT_TYPE.SYSTEM_LOGIN_RESULT),
|
||||||
|
subcomponent: statusBtn4,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "createTime",
|
||||||
|
label: "登录日期",
|
||||||
|
minWidth: 150,
|
||||||
|
filter: parseTime,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
export default {
|
export default {
|
||||||
name: "SystemLoginLog",
|
name: "SystemLoginLog",
|
||||||
|
mixins: [tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
formConfig: [
|
||||||
loading: true,
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "登录地址",
|
||||||
|
placeholder: "登录地址",
|
||||||
|
param: "userIp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "用户名称",
|
||||||
|
placeholder: "用户名称",
|
||||||
|
param: "username",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "select",
|
||||||
|
label: "状态",
|
||||||
|
selectOptions: [
|
||||||
|
{ id: true, name: "成功" },
|
||||||
|
{ id: false, name: "失败" },
|
||||||
|
],
|
||||||
|
param: "status",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "datePicker",
|
||||||
|
label: "登录时间",
|
||||||
|
dateType: "daterange",
|
||||||
|
format: "yyyy-MM-dd",
|
||||||
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||||
|
rangeSeparator: "-",
|
||||||
|
startPlaceholder: "开始日期",
|
||||||
|
endPlaceholder: "结束日期",
|
||||||
|
param: "createTime",
|
||||||
|
defaultSelect: [],
|
||||||
|
defaultTime: ["00:00:00", "23:59:59"],
|
||||||
|
width: 250,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "查询",
|
||||||
|
name: "search",
|
||||||
|
color: "primary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:login-log:export")
|
||||||
|
? "separate"
|
||||||
|
: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:login-log:export") ? "button" : "",
|
||||||
|
btnName: "导出",
|
||||||
|
name: "export",
|
||||||
|
color: "primary",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableProps,
|
||||||
// 导出遮罩层
|
// 导出遮罩层
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 表格数据
|
// 表格数据
|
||||||
@ -157,7 +146,7 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
userIp: undefined,
|
userIp: undefined,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
@ -171,22 +160,22 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 查询登录日志列表 */
|
/** 查询登录日志列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
|
||||||
list(this.queryParams).then((response) => {
|
list(this.queryParams).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
buttonClick(val) {
|
||||||
handleQuery() {
|
this.queryParams.userIp = val.userIp;
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.username = val.username;
|
||||||
this.getList();
|
this.queryParams.status = val.status;
|
||||||
},
|
this.queryParams.createTime = val.createTime;
|
||||||
/** 重置按钮操作 */
|
if (val.btnName === "search") {
|
||||||
resetQuery() {
|
this.queryParams.pageNo = 1;
|
||||||
this.resetForm("queryForm");
|
this.getList();
|
||||||
this.handleQuery();
|
} else {
|
||||||
|
this.handleExport();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
@ -1,49 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<doc-alert
|
<!-- <doc-alert
|
||||||
title="功能权限"
|
title="功能权限"
|
||||||
url="https://doc.iocoder.cn/resource-permission"
|
url="https://doc.iocoder.cn/resource-permission"
|
||||||
/>
|
/>
|
||||||
<doc-alert title="菜单路由" url="https://doc.iocoder.cn/vue2/route/" />
|
<doc-alert title="菜单路由" url="https://doc.iocoder.cn/vue2/route/" /> -->
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<search-bar
|
||||||
:model="queryParams"
|
:formConfigs="formConfig"
|
||||||
ref="queryForm"
|
ref="searchBarForm"
|
||||||
size="small"
|
@headBtnClick="buttonClick"
|
||||||
:inline="true"
|
/>
|
||||||
v-show="showSearch"
|
|
||||||
>
|
|
||||||
<el-form-item label="菜单名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入菜单名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.status"
|
|
||||||
placeholder="菜单状态"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in statusDictDatas"
|
|
||||||
:key="parseInt(dict.value)"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="parseInt(dict.value)"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<!-- 列表 -->
|
||||||
|
<base-table
|
||||||
|
v-if="refreshTable"
|
||||||
|
v-loading="loading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:table-data="menuList"
|
||||||
|
:row-key="'id'"
|
||||||
|
:default-expand-all="isExpandAll"
|
||||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
|
:max-height="tableH"
|
||||||
|
>
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick"
|
||||||
|
/>
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
<!-- <el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -69,9 +59,9 @@
|
|||||||
:showSearch.sync="showSearch"
|
:showSearch.sync="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
|
|
||||||
<el-table
|
<!-- <el-table
|
||||||
v-if="refreshTable"
|
v-if="refreshTable"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="menuList"
|
:data="menuList"
|
||||||
@ -143,10 +133,10 @@
|
|||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table> -->
|
||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -173,7 +163,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">
|
||||||
<el-form-item v-if="form.type !== 3" label="菜单图标">
|
<el-form-item v-if="form.type !== 3" label="菜单图标">
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
@ -203,7 +193,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="菜单名称" prop="name">
|
<el-form-item label="菜单名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入菜单名称" />
|
<el-input v-model="form.name" placeholder="请输入菜单名称" />
|
||||||
@ -344,7 +334,7 @@
|
|||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -361,14 +351,113 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|||||||
import IconSelect from "@/components/IconSelect";
|
import IconSelect from "@/components/IconSelect";
|
||||||
|
|
||||||
import { SystemMenuTypeEnum, CommonStatusEnum } from "@/utils/constants";
|
import { SystemMenuTypeEnum, CommonStatusEnum } from "@/utils/constants";
|
||||||
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
|
import { getDictDatas, DICT_TYPE, publicFormatter } from "@/utils/dict";
|
||||||
import { isExternal } from "@/utils/validate";
|
import { isExternal } from "@/utils/validate";
|
||||||
|
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
||||||
|
import statusBtn2 from "./../components/statusBtn2.vue";
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: "name",
|
||||||
|
label: "菜单名称",
|
||||||
|
minWidth: 200,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "sort",
|
||||||
|
label: "排序",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "permission",
|
||||||
|
label: "权限标识",
|
||||||
|
minWidth: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "component",
|
||||||
|
label: "组件路径",
|
||||||
|
minWidth: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "componentName",
|
||||||
|
label: "组件名称",
|
||||||
|
minWidth: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "status",
|
||||||
|
label: "状态",
|
||||||
|
// filter: publicFormatter(DICT_TYPE.COMMON_STATUS),
|
||||||
|
subcomponent: statusBtn2,
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SystemMenu",
|
name: "SystemMenu",
|
||||||
|
mixins: [tableHeightMixin],
|
||||||
components: { Treeselect, IconSelect },
|
components: { Treeselect, IconSelect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "菜单名称",
|
||||||
|
placeholder: "菜单名称",
|
||||||
|
param: "name",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "select",
|
||||||
|
label: "菜单状态",
|
||||||
|
selectOptions: this.getDictDatas(this.DICT_TYPE.COMMON_STATUS),
|
||||||
|
labelField: "label",
|
||||||
|
valueField: "value",
|
||||||
|
param: "status",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "查询",
|
||||||
|
name: "search",
|
||||||
|
color: "primary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "separate",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:menu:create") ? "button" : "",
|
||||||
|
btnName: "新增",
|
||||||
|
name: "addNew",
|
||||||
|
color: "success",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "展开/折叠",
|
||||||
|
name: "expandAll",
|
||||||
|
color: "primary",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi("system:menu:update")
|
||||||
|
? {
|
||||||
|
type: "edit",
|
||||||
|
btnName: "编辑",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:menu:delete")
|
||||||
|
? {
|
||||||
|
type: "delete",
|
||||||
|
btnName: "删除",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:menu:create")
|
||||||
|
? {
|
||||||
|
type: "add",
|
||||||
|
btnName: "新增",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
].filter((v) => v),
|
||||||
|
tableProps,
|
||||||
|
heightNum: 210,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
@ -388,7 +477,7 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
name: undefined,
|
name: undefined,
|
||||||
visible: undefined,
|
status: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -418,6 +507,27 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(val) {
|
||||||
|
console.log(val);
|
||||||
|
if (val.type === "edit") {
|
||||||
|
this.handleUpdate(val.data);
|
||||||
|
} else if (val.type === "delete") {
|
||||||
|
this.handleDelete(val.data);
|
||||||
|
} else {
|
||||||
|
this.handleAdd(val.data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonClick(val) {
|
||||||
|
this.queryParams.name = val.name;
|
||||||
|
this.queryParams.status = val.status;
|
||||||
|
if (val.btnName === "search") {
|
||||||
|
this.getList();
|
||||||
|
} else if (val.btnName === "addNew") {
|
||||||
|
this.handleAdd();
|
||||||
|
} else {
|
||||||
|
this.toggleExpandAll();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 选择图标
|
// 选择图标
|
||||||
selected(name) {
|
selected(name) {
|
||||||
this.form.icon = name;
|
this.form.icon = name;
|
||||||
@ -471,15 +581,6 @@ export default {
|
|||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 展开/折叠操作 */
|
/** 展开/折叠操作 */
|
||||||
toggleExpandAll() {
|
toggleExpandAll() {
|
||||||
this.refreshTable = false;
|
this.refreshTable = false;
|
||||||
|
@ -7,96 +7,6 @@
|
|||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick"
|
@headBtnClick="buttonClick"
|
||||||
/>
|
/>
|
||||||
<!-- <el-form
|
|
||||||
:model="queryParams"
|
|
||||||
ref="queryForm"
|
|
||||||
size="small"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
label-width="68px"
|
|
||||||
>
|
|
||||||
<el-form-item label="系统模块" prop="module">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.module"
|
|
||||||
placeholder="请输入系统模块"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作人员" prop="userNickname">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userNickname"
|
|
||||||
placeholder="请输入操作人员"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="类型" prop="type">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.type"
|
|
||||||
placeholder="操作类型"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_OPERATE_TYPE)"
|
|
||||||
:key="parseInt(dict.value)"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="parseInt(dict.value)"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.success"
|
|
||||||
placeholder="操作状态"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option :key="true" label="成功" :value="true" />
|
|
||||||
<el-option :key="false" label="失败" :value="false" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作时间" prop="startTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.startTime"
|
|
||||||
style="width: 240px"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="-"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form> -->
|
|
||||||
|
|
||||||
<!-- <el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
:loading="exportLoading"
|
|
||||||
v-hasPermi="['system:operate-log:export']"
|
|
||||||
>导出</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar
|
|
||||||
:showSearch.sync="showSearch"
|
|
||||||
@queryTable="getList"
|
|
||||||
></right-toolbar>
|
|
||||||
</el-row> -->
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table
|
||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
@ -108,62 +18,12 @@
|
|||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="230"
|
:width="80"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick"
|
@clickBtn="handleClick"
|
||||||
/>
|
/>
|
||||||
</base-table>
|
</base-table>
|
||||||
<!-- <el-table v-loading="loading" :data="list">
|
|
||||||
<el-table-column label="日志编号" align="center" prop="id" />
|
|
||||||
<el-table-column label="操作模块" align="center" prop="module" />
|
|
||||||
<el-table-column label="操作名" align="center" prop="name" width="180" />
|
|
||||||
<el-table-column label="操作类型" align="center" prop="type">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<dict-tag
|
|
||||||
:type="DICT_TYPE.SYSTEM_OPERATE_TYPE"
|
|
||||||
:value="scope.row.type"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作人" align="center" prop="userNickname" />
|
|
||||||
<el-table-column label="操作结果" align="center" prop="status">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ scope.row.resultCode === 0 ? "成功" : "失败" }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作日期"
|
|
||||||
align="center"
|
|
||||||
prop="startTime"
|
|
||||||
width="180"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ parseTime(scope.row.startTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="执行时长" align="center" prop="startTime">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{ scope.row.duration }} ms</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-view"
|
|
||||||
@click="handleView(scope.row, scope.index)"
|
|
||||||
v-hasPermi="['system:operate-log:query']"
|
|
||||||
>详细</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table> -->
|
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
:page.sync="queryParams.pageNo"
|
:page.sync="queryParams.pageNo"
|
||||||
@ -173,11 +33,11 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 操作日志详细 -->
|
<!-- 操作日志详细 -->
|
||||||
<el-dialog
|
<base-dialog
|
||||||
title="访问日志详细"
|
dialogTitle="访问日志详细"
|
||||||
:visible.sync="open"
|
:dialogVisible="open"
|
||||||
width="700px"
|
width="50%"
|
||||||
append-to-body
|
@close="open = false"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -238,36 +98,46 @@
|
|||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="open = false">关 闭</el-button>
|
<el-button @click="open = false">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOperateLog, exportOperateLog } from "@/api/system/operatelog";
|
import { listOperateLog, exportOperateLog } from "@/api/system/operatelog";
|
||||||
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
||||||
|
import statusBtn3 from "./../components/statusBtn3.vue";
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: "code",
|
prop: "id",
|
||||||
label: "角色编码",
|
label: "日志编号",
|
||||||
minWidth: 140,
|
},
|
||||||
|
{
|
||||||
|
prop: "module",
|
||||||
|
label: "操作模块",
|
||||||
|
minWidth: 150,
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "name",
|
prop: "name",
|
||||||
label: "角色名称",
|
label: "操作名",
|
||||||
minWidth: 140,
|
minWidth: 200,
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// prop: "status",
|
|
||||||
// label: "状态",
|
|
||||||
// minWidth: 100,
|
|
||||||
// subcomponent: statusBtn,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
prop: "remark",
|
prop: "userNickname",
|
||||||
label: "角色描述",
|
label: "操作人",
|
||||||
minWidth: 140,
|
minWidth: 80,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "resultCode",
|
||||||
|
label: "操作结果",
|
||||||
|
subcomponent: statusBtn3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "duration",
|
||||||
|
label: "执行时长",
|
||||||
|
minWidth: 80,
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -327,10 +197,14 @@ export default {
|
|||||||
color: "primary",
|
color: "primary",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "separate",
|
type: this.$auth.hasPermi("system:operate-log:export")
|
||||||
|
? "separate"
|
||||||
|
: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "button",
|
type: this.$auth.hasPermi("system:operate-log:export")
|
||||||
|
? "button"
|
||||||
|
: "",
|
||||||
btnName: "导出",
|
btnName: "导出",
|
||||||
name: "export",
|
name: "export",
|
||||||
color: "primary",
|
color: "primary",
|
||||||
@ -338,8 +212,6 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableProps,
|
tableProps,
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 导出遮罩层
|
// 导出遮罩层
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
@ -378,11 +250,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 查询登录日志 */
|
/** 查询登录日志 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
|
||||||
listOperateLog(this.queryParams).then((response) => {
|
listOperateLog(this.queryParams).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -390,11 +260,6 @@ export default {
|
|||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 详细按钮操作 */
|
/** 详细按钮操作 */
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
@ -419,12 +284,13 @@ export default {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
|
this.queryParams.module = val.module;
|
||||||
|
this.queryParams.userNickname = val.userNickname;
|
||||||
|
this.queryParams.type = val.type;
|
||||||
|
this.queryParams.success = val.success;
|
||||||
|
this.queryParams.startTime = val.startTime;
|
||||||
if (val.btnName === "search") {
|
if (val.btnName === "search") {
|
||||||
this.queryParams.module = val.module;
|
this.queryParams.pageNo = 1;
|
||||||
this.queryParams.userNickname = val.userNickname;
|
|
||||||
this.queryParams.type = val.type;
|
|
||||||
this.queryParams.success = val.success;
|
|
||||||
this.queryParams.startTime = val.startTime;
|
|
||||||
this.getList();
|
this.getList();
|
||||||
} else {
|
} else {
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
|
@ -124,10 +124,10 @@ export default {
|
|||||||
color: "primary",
|
color: "primary",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "separate",
|
type: this.$auth.hasPermi("system:role:create") ? "separate" : "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "button",
|
type: this.$auth.hasPermi("system:role:create") ? "button" : "",
|
||||||
btnName: "新增",
|
btnName: "新增",
|
||||||
name: "add",
|
name: "add",
|
||||||
color: "success",
|
color: "success",
|
||||||
@ -142,25 +142,32 @@ export default {
|
|||||||
tableProps,
|
tableProps,
|
||||||
list: [],
|
list: [],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
{
|
this.$auth.hasPermi("system:permission:assign-role-menu")
|
||||||
type: "menuAuth",
|
? {
|
||||||
btnName: "菜单权限",
|
type: "menuAuth",
|
||||||
// showTip: "新增工单",
|
btnName: "菜单权限",
|
||||||
},
|
}
|
||||||
{
|
: undefined,
|
||||||
type: "dataAuth",
|
this.$auth.hasPermi("system:permission:assign-role-data-scope")
|
||||||
btnName: "数据权限",
|
? {
|
||||||
// showTip: "新增工单",
|
type: "dataAuth",
|
||||||
},
|
btnName: "数据权限",
|
||||||
{
|
// showTip: "新增工单",
|
||||||
type: "edit",
|
}
|
||||||
btnName: "编辑",
|
: undefined,
|
||||||
},
|
this.$auth.hasPermi("system:role:update")
|
||||||
{
|
? {
|
||||||
type: "delete",
|
type: "edit",
|
||||||
btnName: "删除",
|
btnName: "编辑",
|
||||||
},
|
}
|
||||||
],
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:role:delete")
|
||||||
|
? {
|
||||||
|
type: "delete",
|
||||||
|
btnName: "删除",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
].filter((v) => v),
|
||||||
addOrEditTitle: "",
|
addOrEditTitle: "",
|
||||||
centervisible: false,
|
centervisible: false,
|
||||||
// 菜单权限
|
// 菜单权限
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
|
<!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
|
||||||
<doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" />
|
<doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" />
|
||||||
<doc-alert
|
<doc-alert
|
||||||
title="Excel 导入导出"
|
title="Excel 导入导出"
|
||||||
url="https://doc.iocoder.cn/excel-import-and-export/"
|
url="https://doc.iocoder.cn/excel-import-and-export/"
|
||||||
/>
|
/> -->
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<!--部门数据-->
|
<!--部门数据-->
|
||||||
<el-col :span="4" :xs="24">
|
<el-col :span="4" :xs="24">
|
||||||
@ -35,7 +36,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
<el-col :span="20" :xs="24">
|
<el-col :span="20" :xs="24">
|
||||||
<el-form
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick"
|
||||||
|
/>
|
||||||
|
<!-- <el-form
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
size="small"
|
size="small"
|
||||||
@ -96,9 +102,9 @@
|
|||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form> -->
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<!-- <el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -136,9 +142,27 @@
|
|||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="userList">
|
<!-- 列表 -->
|
||||||
|
<base-table
|
||||||
|
:page="queryParams.pageNo"
|
||||||
|
:limit="queryParams.pageSize"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:table-data="userList"
|
||||||
|
:max-height="tableH"
|
||||||
|
@emitFun="handleStatusChange"
|
||||||
|
>
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="220"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick"
|
||||||
|
/>
|
||||||
|
</base-table>
|
||||||
|
<!-- <el-table v-loading="loading" :data="userList">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="用户编号"
|
label="用户编号"
|
||||||
align="center"
|
align="center"
|
||||||
@ -262,20 +286,19 @@
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table> -->
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
:page.sync="queryParams.pageNo"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -344,7 +367,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户性别">
|
<el-form-item label="用户性别">
|
||||||
<el-select v-model="form.sex" placeholder="请选择">
|
<el-select
|
||||||
|
v-model="form.sex"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in sexDictDatas"
|
v-for="dict in sexDictDatas"
|
||||||
:key="parseInt(dict.value)"
|
:key="parseInt(dict.value)"
|
||||||
@ -356,7 +383,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="岗位">
|
<el-form-item label="岗位">
|
||||||
<el-select v-model="form.postIds" multiple placeholder="请选择">
|
<el-select
|
||||||
|
v-model="form.postIds"
|
||||||
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in postOptions"
|
v-for="item in postOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -383,14 +415,13 @@
|
|||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 用户导入对话框 -->
|
<!-- 用户导入对话框 -->
|
||||||
<el-dialog
|
<base-dialog
|
||||||
:title="upload.title"
|
:dialogTitle="upload.title"
|
||||||
:visible.sync="upload.open"
|
:dialogVisible="upload.open"
|
||||||
width="400px"
|
width="400px"
|
||||||
append-to-body
|
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
@ -425,15 +456,10 @@
|
|||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 分配角色 -->
|
<!-- 分配角色 -->
|
||||||
<el-dialog
|
<base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px">
|
||||||
title="分配角色"
|
|
||||||
:visible.sync="openRole"
|
|
||||||
width="500px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-form :model="form" label-width="80px">
|
<el-form :model="form" label-width="80px">
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="form.username" :disabled="true" />
|
<el-input v-model="form.username" :disabled="true" />
|
||||||
@ -456,7 +482,7 @@
|
|||||||
<el-button type="primary" @click="submitRole">确 定</el-button>
|
<el-button type="primary" @click="submitRole">确 定</el-button>
|
||||||
<el-button @click="cancelRole">取 消</el-button>
|
<el-button @click="cancelRole">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -483,12 +509,161 @@ import { DICT_TYPE, getDictDatas } from "@/utils/dict";
|
|||||||
import { assignUserRole, listUserRoles } from "@/api/system/permission";
|
import { assignUserRole, listUserRoles } from "@/api/system/permission";
|
||||||
import { listSimpleRoles } from "@/api/system/role";
|
import { listSimpleRoles } from "@/api/system/role";
|
||||||
import { getBaseHeader } from "@/utils/request";
|
import { getBaseHeader } from "@/utils/request";
|
||||||
|
import tableHeightMixin from "@/mixins/tableHeightMixin";
|
||||||
|
import { parseTime } from "@/utils/ruoyi";
|
||||||
|
import statusBtn5 from "./../components/statusBtn5.vue";
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: "id",
|
||||||
|
label: "用户编号",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "username",
|
||||||
|
label: "用户名称",
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "nickname",
|
||||||
|
label: "用户昵称",
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "deptName",
|
||||||
|
label: "部门",
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "mobile",
|
||||||
|
label: "手机号码",
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "status",
|
||||||
|
label: "状态",
|
||||||
|
minWidth: 80,
|
||||||
|
// filter: publicFormatter(DICT_TYPE.SYSTEM_OPERATE_TYPE),
|
||||||
|
subcomponent: statusBtn5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "createTime",
|
||||||
|
label: "创建时间",
|
||||||
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
export default {
|
export default {
|
||||||
name: "SystemUser",
|
name: "SystemUser",
|
||||||
|
mixins: [tableHeightMixin],
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "用户名称",
|
||||||
|
placeholder: "用户名称",
|
||||||
|
param: "username",
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: "手机号码",
|
||||||
|
placeholder: "手机号码",
|
||||||
|
param: "mobile",
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "select",
|
||||||
|
label: "状态",
|
||||||
|
selectOptions: this.getDictDatas(this.DICT_TYPE.COMMON_STATUS),
|
||||||
|
labelField: "label",
|
||||||
|
valueField: "value",
|
||||||
|
param: "status",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "datePicker",
|
||||||
|
label: "创建时间",
|
||||||
|
dateType: "daterange",
|
||||||
|
format: "yyyy-MM-dd",
|
||||||
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||||
|
rangeSeparator: "-",
|
||||||
|
startPlaceholder: "开始日期",
|
||||||
|
endPlaceholder: "结束日期",
|
||||||
|
param: "createTime",
|
||||||
|
defaultSelect: [],
|
||||||
|
defaultTime: ["00:00:00", "23:59:59"],
|
||||||
|
width: 250,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "查询",
|
||||||
|
name: "search",
|
||||||
|
color: "primary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermiOr([
|
||||||
|
"system:user:create",
|
||||||
|
"system:user:import",
|
||||||
|
"system:user:export",
|
||||||
|
])
|
||||||
|
? "separate"
|
||||||
|
: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
|
||||||
|
btnName: "新增",
|
||||||
|
name: "addNew",
|
||||||
|
color: "success",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:user:import") ? "button" : "",
|
||||||
|
btnName: "导入",
|
||||||
|
name: "import",
|
||||||
|
color: "warning",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi("system:user:export") ? "button" : "",
|
||||||
|
btnName: "导出",
|
||||||
|
name: "export",
|
||||||
|
color: "primary",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi("system:user:update")
|
||||||
|
? {
|
||||||
|
type: "edit",
|
||||||
|
btnName: "修改",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:user:delete")
|
||||||
|
? {
|
||||||
|
type: "delete",
|
||||||
|
btnName: "删除",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:user:update-password")
|
||||||
|
? {
|
||||||
|
type: "reset",
|
||||||
|
btnName: "重置密码",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi("system:permission:assign-user-role")
|
||||||
|
? {
|
||||||
|
type: "role",
|
||||||
|
btnName: "分配角色",
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
].filter((v) => v),
|
||||||
|
tableProps,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 导出遮罩层
|
// 导出遮罩层
|
||||||
@ -498,7 +673,7 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 用户表格数据
|
// 用户表格数据
|
||||||
userList: null,
|
userList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 部门树选项
|
// 部门树选项
|
||||||
@ -607,6 +782,37 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(val) {
|
||||||
|
switch (val.type) {
|
||||||
|
case "edit":
|
||||||
|
this.handleUpdate(val.data);
|
||||||
|
break;
|
||||||
|
case "delete":
|
||||||
|
this.handleDelete(val.data);
|
||||||
|
break;
|
||||||
|
case "reset":
|
||||||
|
this.handleResetPwd(val.data);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.handleRole(val.data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonClick(val) {
|
||||||
|
console.log(val);
|
||||||
|
switch (val.btnName) {
|
||||||
|
case "search":
|
||||||
|
this.handleQuery();
|
||||||
|
break;
|
||||||
|
case "addNew":
|
||||||
|
this.handleAdd();
|
||||||
|
break;
|
||||||
|
case "import":
|
||||||
|
this.handleImport();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.handleExport();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 更多操作
|
// 更多操作
|
||||||
handleCommand(command, index, row) {
|
handleCommand(command, index, row) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
@ -660,21 +866,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 用户状态修改
|
// 用户状态修改
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
changeUserStatus(row.id, row.status).then((res) => {
|
||||||
this.$modal
|
this.$modal.msgSuccess("操作成功");
|
||||||
.confirm('确认要"' + text + '""' + row.username + '"用户吗?')
|
});
|
||||||
.then(function () {
|
|
||||||
return changeUserStatus(row.id, row.status);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.$modal.msgSuccess(text + "成功");
|
|
||||||
})
|
|
||||||
.catch(function () {
|
|
||||||
row.status =
|
|
||||||
row.status === CommonStatusEnum.ENABLE
|
|
||||||
? CommonStatusEnum.DISABLE
|
|
||||||
: CommonStatusEnum.ENABLE;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -709,11 +903,6 @@ export default {
|
|||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
45
yarn.lock
45
yarn.lock
@ -975,20 +975,13 @@
|
|||||||
"resolved" "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz"
|
"resolved" "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz"
|
||||||
"version" "0.8.0"
|
"version" "0.8.0"
|
||||||
|
|
||||||
"@babel/runtime@^7.11.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.8.4":
|
"@babel/runtime@^7.11.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4":
|
||||||
"integrity" "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ=="
|
"integrity" "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ=="
|
||||||
"resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.1.tgz"
|
"resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.1.tgz"
|
||||||
"version" "7.24.1"
|
"version" "7.24.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"regenerator-runtime" "^0.14.0"
|
"regenerator-runtime" "^0.14.0"
|
||||||
|
|
||||||
"@babel/runtime@^7.5.5":
|
|
||||||
version "7.24.5"
|
|
||||||
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c"
|
|
||||||
integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==
|
|
||||||
dependencies:
|
|
||||||
regenerator-runtime "^0.14.0"
|
|
||||||
|
|
||||||
"@babel/template@^7.22.15", "@babel/template@^7.23.9", "@babel/template@^7.24.0":
|
"@babel/template@^7.22.15", "@babel/template@^7.23.9", "@babel/template@^7.24.0":
|
||||||
"integrity" "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA=="
|
"integrity" "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA=="
|
||||||
"resolved" "https://registry.npmmirror.com/@babel/template/-/template-7.24.0.tgz"
|
"resolved" "https://registry.npmmirror.com/@babel/template/-/template-7.24.0.tgz"
|
||||||
@ -1082,16 +1075,16 @@
|
|||||||
"wrap-ansi-cjs" "npm:wrap-ansi@^7.0.0"
|
"wrap-ansi-cjs" "npm:wrap-ansi@^7.0.0"
|
||||||
|
|
||||||
"@jiaminghi/bezier-curve@*":
|
"@jiaminghi/bezier-curve@*":
|
||||||
version "0.0.9"
|
"integrity" "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw=="
|
||||||
resolved "https://registry.npmmirror.com/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz#5196aca93c8b061a612b4c3eabcedf9490cef6ee"
|
"resolved" "https://registry.npmmirror.com/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz"
|
||||||
integrity sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==
|
"version" "0.0.9"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
|
|
||||||
"@jiaminghi/c-render@^0.4.3":
|
"@jiaminghi/c-render@^0.4.3":
|
||||||
version "0.4.3"
|
"integrity" "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q=="
|
||||||
resolved "https://registry.npmmirror.com/@jiaminghi/c-render/-/c-render-0.4.3.tgz#982ebd8f71b443bb9507834227834973ebd9b6d8"
|
"resolved" "https://registry.npmmirror.com/@jiaminghi/c-render/-/c-render-0.4.3.tgz"
|
||||||
integrity sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==
|
"version" "0.4.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
"@jiaminghi/bezier-curve" "*"
|
"@jiaminghi/bezier-curve" "*"
|
||||||
@ -1099,30 +1092,30 @@
|
|||||||
"@jiaminghi/transition" "*"
|
"@jiaminghi/transition" "*"
|
||||||
|
|
||||||
"@jiaminghi/charts@*":
|
"@jiaminghi/charts@*":
|
||||||
version "0.2.18"
|
"integrity" "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA=="
|
||||||
resolved "https://registry.npmmirror.com/@jiaminghi/charts/-/charts-0.2.18.tgz#63ded95200789fc1a1fd04b7fd9e56f58d22d90f"
|
"resolved" "https://registry.npmmirror.com/@jiaminghi/charts/-/charts-0.2.18.tgz"
|
||||||
integrity sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==
|
"version" "0.2.18"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
"@jiaminghi/c-render" "^0.4.3"
|
"@jiaminghi/c-render" "^0.4.3"
|
||||||
|
|
||||||
"@jiaminghi/color@*":
|
"@jiaminghi/color@*":
|
||||||
version "1.1.3"
|
"integrity" "sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg=="
|
||||||
resolved "https://registry.npmmirror.com/@jiaminghi/color/-/color-1.1.3.tgz#a2336750d1266155ffe80375c58c26fdec495611"
|
"resolved" "https://registry.npmmirror.com/@jiaminghi/color/-/color-1.1.3.tgz"
|
||||||
integrity sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg==
|
"version" "1.1.3"
|
||||||
|
|
||||||
"@jiaminghi/data-view@^2.10.0":
|
"@jiaminghi/data-view@^2.10.0":
|
||||||
version "2.10.0"
|
"integrity" "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA=="
|
||||||
resolved "https://registry.npmmirror.com/@jiaminghi/data-view/-/data-view-2.10.0.tgz#2146d8fc71b9f24be808238ca050ddb7a4c8949f"
|
"resolved" "https://registry.npmmirror.com/@jiaminghi/data-view/-/data-view-2.10.0.tgz"
|
||||||
integrity sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==
|
"version" "2.10.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
"@jiaminghi/charts" "*"
|
"@jiaminghi/charts" "*"
|
||||||
|
|
||||||
"@jiaminghi/transition@*":
|
"@jiaminghi/transition@*":
|
||||||
version "1.1.11"
|
"integrity" "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg=="
|
||||||
resolved "https://registry.npmmirror.com/@jiaminghi/transition/-/transition-1.1.11.tgz#576d8af092434b34201eba5eaecc79dd33c8ad8c"
|
"resolved" "https://registry.npmmirror.com/@jiaminghi/transition/-/transition-1.1.11.tgz"
|
||||||
integrity sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==
|
"version" "1.1.11"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.5.5"
|
"@babel/runtime" "^7.5.5"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user