'del_parseInt'
This commit is contained in:
commit
b0e38a378b
3
.env.dev
3
.env.dev
@ -1,7 +1,7 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2024-01-30 16:17:03
|
# @LastEditTime: 2024-02-01 16:49:38
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
@ -22,6 +22,7 @@ VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
|
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-04 14:10:37
|
* @Date: 2023-12-04 14:10:37
|
||||||
* @LastEditTime: 2024-01-30 18:06:48
|
* @LastEditTime: 2024-01-31 09:56:09
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -28,7 +28,7 @@ export function updateQualityInspectionBoxBtn(data) {
|
|||||||
// 删除安灯按钮16键对应
|
// 删除安灯按钮16键对应
|
||||||
export function deleteQualityInspectionBoxBtn(id) {
|
export function deleteQualityInspectionBoxBtn(id) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/quality-inspection-box-btn-auth/delete?id=' + id,
|
url: 'base/quality-inspection-box-btn-auth/delete?userId=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ export function deleteQualityInspectionBoxBtn(id) {
|
|||||||
// 获得安灯按钮16键对应
|
// 获得安灯按钮16键对应
|
||||||
export function getQualityInspectionBoxBtn(id) {
|
export function getQualityInspectionBoxBtn(id) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/quality-inspection-box-btn-auth/get?id=' + id,
|
url: 'base/quality-inspection-box-btn-auth/get?userId=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-19 16:31:53
|
* @LastEditTime: 2024-02-01 15:35:10
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -881,6 +881,7 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
word-spacing:8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
.unit{
|
.unit{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 16:50:26
|
* @Date: 2024-01-29 16:50:26
|
||||||
* @LastEditTime: 2024-01-29 17:06:50
|
* @LastEditTime: 2024-02-01 15:35:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -882,6 +882,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
.visual-container {
|
.visual-container {
|
||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 1080px;
|
height: 1080px;
|
||||||
@ -895,7 +896,7 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: rgba(0, 255, 247, 1);
|
color: rgba(0, 255, 247, 1);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
word-spacing: 8px;
|
||||||
.unit {
|
.unit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 260px;
|
left: 260px;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: gtz
|
* @Author: gtz
|
||||||
* @Date: 2022-01-19 15:58:17
|
* @Date: 2022-01-19 15:58:17
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-29 15:35:37
|
* @LastEditTime: 2024-02-01 15:25:14
|
||||||
* @Description: file content
|
* @Description: file content
|
||||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||||
-->
|
-->
|
||||||
@ -250,12 +250,12 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
padding: 0.67em;
|
padding: 0.67em 0.67em 0.3em 0.67em;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar-content {
|
.bar-content {
|
||||||
padding: 1em;
|
padding: .5em 1em 1em 1em;
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-01-29 15:14:40
|
* @LastEditTime: 2024-02-01 15:52:41
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="height: 400px;">
|
||||||
<div :id="id" class="productChart" :style="{ height: '390px', width: width }" />
|
<div :id="id" class="productChart" :style="{ height: '420px', width: width }" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import 'echarts/theme/macarons' // echarts theme
|
import 'echarts/theme/macarons' // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize'
|
||||||
|
// import resize from './../mixins/resize'
|
||||||
export default {
|
export default {
|
||||||
name: 'OverviewBar',
|
name: 'OverviewBar',
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -67,12 +67,18 @@ export default {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// mounted() {
|
||||||
|
// console.log('mounted')
|
||||||
|
// console.log('borderRadius: ', this.borderRadius)
|
||||||
|
// // this.$nextTick(() => {
|
||||||
|
// // this.initChart()
|
||||||
|
// // })
|
||||||
|
// },
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted')
|
this.$el.addEventListener('resize', () => {
|
||||||
console.log('borderRadius: ', this.borderRadius)
|
console.log('resziing.....');
|
||||||
// this.$nextTick(() => {
|
});
|
||||||
// this.initChart()
|
this.initChart()
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
@ -149,15 +155,11 @@ export default {
|
|||||||
type: 'cross'
|
type: 'cross'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: { top: 90, right: 60, bottom: 20, left: 90 },
|
||||||
left: "6%",
|
|
||||||
right: "6%",
|
|
||||||
bottom: "3%",
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
legend: {
|
||||||
itemWidth: 10,
|
itemWidth: 10,
|
||||||
itemHeight: 10,
|
itemHeight: 10,
|
||||||
|
top: '0%',
|
||||||
right: '20px',
|
right: '20px',
|
||||||
data: ['产线产量', '产线良品率'],
|
data: ['产线产量', '产线良品率'],
|
||||||
textStyle: {
|
textStyle: {
|
||||||
@ -175,9 +177,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
color: "#fff",
|
||||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
fontSize: 12,
|
||||||
}
|
// formatter: '{value}'
|
||||||
|
// textStyle: {
|
||||||
|
// color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -215,10 +220,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
color: "#fff",
|
||||||
color: '#ced1d5', // 坐标值得具体的颜色
|
fontSize: 12,
|
||||||
|
// formatter: '{value}'
|
||||||
formatter: '{value}%'
|
formatter: '{value}%'
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -242,7 +248,7 @@ export default {
|
|||||||
// },
|
// },
|
||||||
scale: true,
|
scale: true,
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '产量/㎡', // y轴上方的单位
|
name: '产量/片', // y轴上方的单位
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
// fontSize: 10,
|
// fontSize: 10,
|
||||||
@ -259,10 +265,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
// textStyle: {
|
||||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
// color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||||
|
color: "#fff",
|
||||||
|
fontSize: 12,
|
||||||
|
// formatter: '{value}'
|
||||||
formatter: '{value} 片'
|
formatter: '{value} 片'
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -286,6 +295,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.productChart{
|
.productChart{
|
||||||
top: -40px;
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
top: -30px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -150,9 +150,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
color: "#fff",
|
||||||
color: 'rgba(255,255,255,1)' // 坐标值得具体的颜色
|
fontSize: 12,
|
||||||
}
|
// formatter: '{value}'
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -162,25 +162,29 @@ export default {
|
|||||||
data: this.nameList
|
data: this.nameList
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
axisLine: {
|
name: '单位kwh',
|
||||||
lineStyle: {
|
nameTextStyle: {
|
||||||
type: 'solid',
|
color: '#fff',
|
||||||
color: '#213259', // 左边线的颜色
|
fontSize: 10,
|
||||||
width: '1' // 坐标线的宽度
|
align: 'right',
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true, // 是否显示 y 轴
|
color: "#fff",
|
||||||
textStyle: {
|
fontSize: 12,
|
||||||
color: 'rgba(255,255,255,1)' // 坐标值得具体的颜色
|
formatter: '{value}/kwh'
|
||||||
}
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: "#213259",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#213259'
|
color: "#213259a0",
|
||||||
}
|
|
||||||
},
|
},
|
||||||
type: 'value'
|
}
|
||||||
},
|
},
|
||||||
// legend: {
|
// legend: {
|
||||||
// itemHeight: 10,
|
// itemHeight: 10,
|
||||||
|
62
src/views/OperationalOverview/components/resize.js
Normal file
62
src/views/OperationalOverview/components/resize.js
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-02-01 15:39:22
|
||||||
|
* @LastEditTime: 2024-02-01 15:39:23
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
$_sidebarElm: null,
|
||||||
|
$_resizeHandler: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$_resizeHandler = debounce(() => {
|
||||||
|
if (this.chart) {
|
||||||
|
this.chart.resize()
|
||||||
|
}
|
||||||
|
}, 100)
|
||||||
|
this.$_initResizeEvent()
|
||||||
|
this.$_initSidebarResizeEvent()
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.$_destroyResizeEvent()
|
||||||
|
this.$_destroySidebarResizeEvent()
|
||||||
|
},
|
||||||
|
// to fixed bug when cached by keep-alive
|
||||||
|
// https://github.com/PanJiaChen/vue-element-admin/issues/2116
|
||||||
|
activated() {
|
||||||
|
this.$_initResizeEvent()
|
||||||
|
this.$_initSidebarResizeEvent()
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.$_destroyResizeEvent()
|
||||||
|
this.$_destroySidebarResizeEvent()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// use $_ for mixins properties
|
||||||
|
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||||
|
$_initResizeEvent() {
|
||||||
|
window.addEventListener('resize', this.$_resizeHandler)
|
||||||
|
},
|
||||||
|
$_destroyResizeEvent() {
|
||||||
|
window.removeEventListener('resize', this.$_resizeHandler)
|
||||||
|
},
|
||||||
|
$_sidebarResizeHandler(e) {
|
||||||
|
if (e.propertyName === 'width') {
|
||||||
|
this.$_resizeHandler()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
$_initSidebarResizeEvent() {
|
||||||
|
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
||||||
|
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||||
|
},
|
||||||
|
$_destroySidebarResizeEvent() {
|
||||||
|
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-01-30 17:19:32
|
* @LastEditTime: 2024-02-01 15:35:29
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -109,7 +109,7 @@
|
|||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||||
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="359" :show-legend="true" />
|
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="390" :show-legend="true" />
|
||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -993,6 +993,7 @@ export default {
|
|||||||
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
|
word-spacing: 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.unit {
|
.unit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
<el-form ref="updateAssigneeForm" :model="updateAssignee.form" :rules="updateAssignee.rules" label-width="110px">
|
<el-form ref="updateAssigneeForm" :model="updateAssignee.form" :rules="updateAssignee.rules" label-width="110px">
|
||||||
<el-form-item label="新审批人" prop="assigneeUserId">
|
<el-form-item label="新审批人" prop="assigneeUserId">
|
||||||
<el-select v-model="updateAssignee.form.assigneeUserId" clearable style="width: 100%">
|
<el-select v-model="updateAssignee.form.assigneeUserId" clearable style="width: 100%">
|
||||||
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
<el-option v-for="item in userOptions" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === 10" label="指定角色" prop="roleIds">
|
<el-form-item v-if="form.type === 10" label="指定角色" prop="roleIds">
|
||||||
<el-select v-model="form.roleIds" multiple clearable style="width: 100%">
|
<el-select v-model="form.roleIds" multiple clearable style="width: 100%">
|
||||||
<el-option v-for="item in roleOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in roleOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === 20 || form.type === 21" label="指定部门" prop="deptIds">
|
<el-form-item v-if="form.type === 20 || form.type === 21" label="指定部门" prop="deptIds">
|
||||||
@ -50,17 +50,17 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === 22" label="指定岗位" prop="postIds">
|
<el-form-item v-if="form.type === 22" label="指定岗位" prop="postIds">
|
||||||
<el-select v-model="form.postIds" multiple clearable style="width: 100%">
|
<el-select v-model="form.postIds" multiple clearable style="width: 100%">
|
||||||
<el-option v-for="item in postOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === 30 || form.type === 31 || form.type === 32" label="指定用户" prop="userIds">
|
<el-form-item v-if="form.type === 30 || form.type === 31 || form.type === 32" label="指定用户" prop="userIds">
|
||||||
<el-select v-model="form.userIds" multiple clearable style="width: 100%">
|
<el-select v-model="form.userIds" multiple clearable style="width: 100%">
|
||||||
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
<el-option v-for="item in userOptions" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === 40" label="指定用户组" prop="userGroupIds">
|
<el-form-item v-if="form.type === 40" label="指定用户组" prop="userGroupIds">
|
||||||
<el-select v-model="form.userGroupIds" multiple clearable style="width: 100%">
|
<el-select v-model="form.userGroupIds" multiple clearable style="width: 100%">
|
||||||
<el-option v-for="item in userGroupOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in userGroupOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === 50" label="指定脚本" prop="scripts">
|
<el-form-item v-if="form.type === 50" label="指定脚本" prop="scripts">
|
||||||
|
@ -246,9 +246,7 @@ export default {
|
|||||||
.map((_, index) => {
|
.map((_, index) => {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
||||||
return `${currentMonth < 10?'0'+currentMonth:currentMonth }.${new Date(
|
return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse()
|
||||||
dtimestamp
|
|
||||||
).getDate()}`;}).reverse()
|
|
||||||
}else if (this.chartTime == "月") {
|
}else if (this.chartTime == "月") {
|
||||||
if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
|
if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
|
||||||
days = 31;
|
days = 31;
|
||||||
|
@ -51,7 +51,7 @@ export default {
|
|||||||
list: {
|
list: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
console.log(val);
|
// console.log(val);
|
||||||
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -61,6 +61,7 @@ export default {
|
|||||||
currentSelect: {
|
currentSelect: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
// val: string
|
// val: string
|
||||||
|
console.log(val)
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
this.randomKey = Math.random();
|
this.randomKey = Math.random();
|
||||||
// 更新选中状态
|
// 更新选中状态
|
||||||
|
@ -119,7 +119,9 @@ export default {
|
|||||||
console.log('value', val);
|
console.log('value', val);
|
||||||
if (val) {
|
if (val) {
|
||||||
this.selectedEquipments = val.map((item) => item.equipmentId);
|
this.selectedEquipments = val.map((item) => item.equipmentId);
|
||||||
this.selected = val;
|
this.selected = val
|
||||||
|
console.log(this.materialsBomList)
|
||||||
|
// console.log(this.selectedEquipments)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
@ -262,6 +262,7 @@ export default {
|
|||||||
// 设置设备id
|
// 设置设备id
|
||||||
eq.materialsBom.equipmentId = eq.id;
|
eq.materialsBom.equipmentId = eq.id;
|
||||||
eq.valuesBom.equipmentId = eq.id;
|
eq.valuesBom.equipmentId = eq.id;
|
||||||
|
console.log(this.selectedBoms)
|
||||||
return eq;
|
return eq;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -32,7 +32,7 @@ SOFTWARE.
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -33,7 +33,7 @@ SOFTWARE.
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -31,7 +31,7 @@ SOFTWARE.
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -33,7 +33,7 @@ SOFTWARE.
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -32,7 +32,7 @@ SOFTWARE.
|
|||||||
<el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="accountId" placeholder="请选择公众号">
|
<el-select v-model="accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- TODO 等待处理 -->
|
<!-- TODO 等待处理 -->
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<el-form ref="queryForm" size="small" :inline="true" label-width="68px">
|
<el-form ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="accountId" @change="getSummary">
|
<el-select v-model="accountId" @change="getSummary">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时间范围" prop="date">
|
<el-form-item label="时间范围" prop="date">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标签名称" prop="name">
|
<el-form-item label="标签名称" prop="name">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="公众号" prop="accountId">
|
<el-form-item label="公众号" prop="accountId">
|
||||||
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
<el-select v-model="queryParams.accountId" placeholder="请选择公众号">
|
||||||
<el-option v-for="item in accounts" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
<el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户标识" prop="openid">
|
<el-form-item label="用户标识" prop="openid">
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:54:51
|
* @Date: 2024-01-30 10:54:51
|
||||||
* @LastEditTime: 2024-01-30 16:53:35
|
* @LastEditTime: 2024-02-01 14:46:19
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="bom-selection" v-for="item in list__inner" :key="item.id + randomKey">
|
<div class="bom-selection" v-for="item in list__inner" :key="item.id + randomKey">
|
||||||
<el-checkbox :label="item.name" :checked="item.id === selected" @change="(e) => handleChange(item, e)"
|
<el-checkbox :label="item.name" :checked="item.choose" @change="(e) => handleChange(item, e)"
|
||||||
class="sl__body-item"></el-checkbox>
|
class="sl__body-item"></el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,8 +25,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
props: {
|
props: {
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
type: String | Number,
|
type: Array,
|
||||||
default: null,
|
default: ()=>[],
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@ -47,8 +47,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
list: {
|
list: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
console.log(val)
|
||||||
if (val) {
|
if (val) {
|
||||||
this.list__inner = val.map((item) => ({ ...item, disabled: false }));
|
this.list__inner = val.map((item) => ({ ...item, choose: false }));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
@ -56,14 +57,18 @@ export default {
|
|||||||
},
|
},
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
console.log(val)
|
||||||
// val: string
|
// val: string
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
this.randomKey = Math.random();
|
this.randomKey = Math.random();
|
||||||
// 更新选中状态
|
// 更新选中状态
|
||||||
if (val) {
|
if (val) {
|
||||||
this.list__inner.forEach((item) => {
|
this.list__inner.forEach((item,index) => {
|
||||||
if (item.id == val) item.disabled = false;
|
val.forEach((ele) => {
|
||||||
else item.disabled = true;
|
console.log(ele)
|
||||||
|
if (item.id == ele.id) item.choose = true;console.log(ele.id)
|
||||||
|
// else item.choose = false;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:53:32
|
* @Date: 2024-01-30 10:53:32
|
||||||
* @LastEditTime: 2024-01-30 17:51:13
|
* @LastEditTime: 2024-02-01 14:47:03
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
||||||
:list="materialsBomList" :equipment-id="materialsBomList.equipmentId"
|
:list="materialsBomList" :equipment-id="materialsBomList.equipmentId"
|
||||||
:current-select="currentSelectedMaterialBomId" @change="handleMaterialBomChange" />
|
:current-select="currentSelectedIdList" @change="handleMaterialBomChange" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="8" style="border-left: 1px solid #ccc">
|
<!-- <el-col :span="8" style="border-left: 1px solid #ccc">
|
||||||
@ -79,6 +79,10 @@ export default {
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
chooseList: {
|
||||||
|
type: Array,
|
||||||
|
default:() => []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -87,10 +91,10 @@ export default {
|
|||||||
selected: [],
|
selected: [],
|
||||||
bomArr:[],
|
bomArr:[],
|
||||||
materialsBomList: [],
|
materialsBomList: [],
|
||||||
valuesBomList: [],
|
// valuesBomList: [],
|
||||||
|
|
||||||
refreshKey: Math.random(),
|
refreshKey: Math.random(),
|
||||||
currentSelectedMaterialBomId: null,
|
currentSelectedIdList: [],
|
||||||
currentSelectedValueBomId: null,
|
currentSelectedValueBomId: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -99,7 +103,8 @@ export default {
|
|||||||
handler(val) {
|
handler(val) {
|
||||||
console.log('value', val);
|
console.log('value', val);
|
||||||
if (val) {
|
if (val) {
|
||||||
this.selectedEquipments = val.map((item) => item.equipmentId);
|
this.selectedEquipments = val.map((item) => item.equipmentId)
|
||||||
|
console.log(this.selectedEquipments)
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -110,34 +115,54 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
filteredBomList() {
|
filteredBomList() {
|
||||||
return this.bomList.filter((item) => {
|
return this.bomList.filter((item) => {
|
||||||
|
// console.log(item)
|
||||||
return item.name.includes(this.searchText);
|
return item.name.includes(this.searchText);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
// this.getList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
commit() {
|
commit() {
|
||||||
this.$emit('update', this.selected);
|
this.$emit('update', this.selected);
|
||||||
},
|
},
|
||||||
|
// getList() {
|
||||||
|
// this.selectedEquipments = this.chooseList
|
||||||
|
// console.log(this.selectedEquipments)
|
||||||
|
// console.log(this.chooseList);
|
||||||
|
// },
|
||||||
handleLoadDom(eq) {
|
handleLoadDom(eq) {
|
||||||
// 只显示 dom 列表
|
// 只显示 dom 列表
|
||||||
this.currentEquipment = eq.id;
|
this.currentEquipment = eq.id;
|
||||||
this.materialsBomList = eq.materialsBom;
|
this.materialsBomList = eq.materialsBom;
|
||||||
this.valuesBomList = eq.valuesBom;
|
console.log(this.materialsBomList)
|
||||||
|
// this.valuesBomList = eq.valuesBom;
|
||||||
// 回复选中的bom信息
|
// 回复选中的bom信息
|
||||||
if (this.selectedEquipments.includes(eq.id)) {
|
if (this.selectedEquipments.includes(eq.id)) {
|
||||||
const selectedItem = this.selected.find(
|
const selectedItem = this.selected.find(
|
||||||
(item) => item.equipmentId == eq.id
|
(item) => item.equipmentId == eq.id
|
||||||
);
|
)
|
||||||
this.currentSelectedMaterialBomId =
|
// console.log(selectedItem)
|
||||||
selectedItem.equMaterialBomId ?? null;
|
|
||||||
this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
|
let arr = []
|
||||||
|
console.log(selectedItem.children);
|
||||||
|
selectedItem.children.forEach((ele) => {
|
||||||
|
console.log(ele)
|
||||||
|
arr.push({ id: ele.id })
|
||||||
|
})
|
||||||
|
// console.log(arr)
|
||||||
|
this.currentSelectedIdList = arr
|
||||||
|
console.log(this.currentSelectedIdList);
|
||||||
|
// selectedItem.equMaterialBomId ?? null;
|
||||||
|
// this.currentSelectedValueBomId = selectedItem.equValueBomId ?? null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEquipmentChange(eq, selected) {
|
handleEquipmentChange(eq, selected) {
|
||||||
this.currentEquipment = eq.id;
|
this.currentEquipment = eq.id;
|
||||||
this.materialsBomList = eq.materialsBom;
|
this.materialsBomList = eq.materialsBom
|
||||||
|
console.log(this.value)
|
||||||
this.valuesBomList = eq.valuesBom;
|
this.valuesBomList = eq.valuesBom;
|
||||||
if (selected) {
|
if (selected) {
|
||||||
console.log(selected)
|
console.log(selected)
|
||||||
@ -165,6 +190,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleMaterialBomChange(equipmentId, bomId, selected) {
|
handleMaterialBomChange(equipmentId, bomId, selected) {
|
||||||
|
// console.log(this.chooseList)
|
||||||
const selectedItem = this.selected.find(
|
const selectedItem = this.selected.find(
|
||||||
(item) => item.equipmentId == equipmentId
|
(item) => item.equipmentId == equipmentId
|
||||||
);
|
);
|
||||||
@ -178,7 +204,7 @@ export default {
|
|||||||
this.selectedEquipments.push(equipmentId);
|
this.selectedEquipments.push(equipmentId);
|
||||||
console.log(this.selected.indexOf(equipmentId))
|
console.log(this.selected.indexOf(equipmentId))
|
||||||
this.selected.forEach((ele,index) => {
|
this.selected.forEach((ele,index) => {
|
||||||
if (ele.equipmentId === equipmentId) {
|
if (ele.equipmentId === equipmentId ) {
|
||||||
this.selected[index].children.push({ id: bomId })
|
this.selected[index].children.push({ id: bomId })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -192,8 +218,10 @@ export default {
|
|||||||
// this.$emit('update', this.selected);
|
// this.$emit('update', this.selected);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
console.log(selected);
|
||||||
this.selected.forEach((ele, index) => {
|
this.selected.forEach((ele, index) => {
|
||||||
ele.children.forEach((e, i) => {
|
ele.children.forEach((e, i) => {
|
||||||
|
console.log(e)
|
||||||
if (ele.equipmentId === equipmentId && e.id == bomId) {
|
if (ele.equipmentId === equipmentId && e.id == bomId) {
|
||||||
this.selected[index].children.splice(i,1)
|
this.selected[index].children.splice(i,1)
|
||||||
}
|
}
|
||||||
@ -201,8 +229,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// this.$emit('getData', this.dataForm)
|
// this.$emit('getData', this.dataForm)
|
||||||
selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
|
// selectedItem && (selectedItem.equMaterialBomId = selected ? bomId : null);
|
||||||
this.currentSelectedMaterialBomId = selected ? bomId : null;
|
// this.currentSelectedMaterialBomId = selected ? bomId : null;
|
||||||
console.log(this.selected)
|
console.log(this.selected)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:52:01
|
* @Date: 2024-01-30 10:52:01
|
||||||
* @LastEditTime: 2024-01-30 18:03:08
|
* @LastEditTime: 2024-02-01 14:43:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -100,8 +100,18 @@
|
|||||||
<script>
|
<script>
|
||||||
import BomSelector from './BomSelector.vue';
|
import BomSelector from './BomSelector.vue';
|
||||||
import {
|
import {
|
||||||
getUserList
|
getUserList,
|
||||||
|
getQualityInspectionBoxBtn,
|
||||||
} from '@/api/base/qualityInspectionBoxPermissions';
|
} from '@/api/base/qualityInspectionBoxPermissions';
|
||||||
|
// import {
|
||||||
|
// createQualityInspectionBoxBtn,
|
||||||
|
// updateQualityInspectionBoxBtn,
|
||||||
|
// deleteQualityInspectionBoxBtn,
|
||||||
|
|
||||||
|
// getPage,
|
||||||
|
// exportQualityInspectionBoxBtnExcel,
|
||||||
|
// getUserList
|
||||||
|
// } from '@/api/base/qualityInspectionBoxPermissions';
|
||||||
export default {
|
export default {
|
||||||
name: 'ProcessBom',
|
name: 'ProcessBom',
|
||||||
components: { BomSelector },
|
components: { BomSelector },
|
||||||
@ -128,6 +138,7 @@ export default {
|
|||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
tableBtn: [],
|
tableBtn: [],
|
||||||
|
chooseList:[],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -159,10 +170,6 @@ export default {
|
|||||||
// deep: true,
|
// deep: true,
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
mounted () {
|
|
||||||
this.getData()
|
|
||||||
this.getDict()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getDict() {
|
getDict() {
|
||||||
getUserList({
|
getUserList({
|
||||||
@ -209,11 +216,11 @@ export default {
|
|||||||
eq.materialsBom.chosen
|
eq.materialsBom.chosen
|
||||||
// eq.valuesBom.chosen
|
// eq.valuesBom.chosen
|
||||||
) {
|
) {
|
||||||
this.selectedBoms.push({
|
// this.selectedBoms.push({
|
||||||
equipmentId: eq.id,
|
// equipmentId: eq.id,
|
||||||
equMaterialBomId: eq.materialsBom.chosen,
|
// equMaterialBomId: eq.materialsBom.chosen,
|
||||||
// equValueBomId: eq.valuesBom.chosen,
|
// // equValueBomId: eq.valuesBom.chosen,
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
// 设置设备id
|
// 设置设备id
|
||||||
eq.materialsBom.equipmentId = eq.id;
|
eq.materialsBom.equipmentId = eq.id;
|
||||||
@ -222,7 +229,6 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.bomList.splice(0);
|
this.bomList.splice(0);
|
||||||
this.selectedBoms = [];
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@ -278,7 +284,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.dataForm);
|
console.log(this.dataForm);
|
||||||
if (this.selectedBoms.length) {
|
if (!this.dataForm.userId) {
|
||||||
const { code, data } = await this.http(
|
const { code, data } = await this.http(
|
||||||
'base/quality-inspection-box-btn-auth/create',
|
'base/quality-inspection-box-btn-auth/create',
|
||||||
'post',
|
'post',
|
||||||
@ -294,6 +300,22 @@ export default {
|
|||||||
this.btnLoading = false;
|
this.btnLoading = false;
|
||||||
this.$message.error('操作失败');
|
this.$message.error('操作失败');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
const { code, data } = await this.http(
|
||||||
|
'base/quality-inspection-box-btn-auth/update',
|
||||||
|
'put',
|
||||||
|
this.dataForm
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.$message.success('操作成功');
|
||||||
|
// this.getList(this.currentDet);
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.$emit('getList')
|
||||||
|
this.cancel();
|
||||||
|
} else {
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.$message.error('操作失败');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -362,11 +384,46 @@ export default {
|
|||||||
// // this.selectedBoms = [];
|
// // this.selectedBoms = [];
|
||||||
// // });
|
// // });
|
||||||
// },
|
// },
|
||||||
async handleAddEquipment() {
|
async handleAddEquipment(userId) {
|
||||||
this.open = true;
|
this.open = true
|
||||||
|
this.selectedBoms = []
|
||||||
|
this.getData()
|
||||||
|
this.getDict()
|
||||||
|
if (userId) {
|
||||||
|
getQualityInspectionBoxBtn(userId).then((res) => {
|
||||||
|
// console.log(res)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.dataForm.userId = userId
|
||||||
|
this.dataForm.nickname = res.data.nickName
|
||||||
|
this.dataList = res.data.datas
|
||||||
|
let arr = []
|
||||||
|
res.data.datas.forEach((item) => {
|
||||||
|
// console.log(item.children);
|
||||||
|
// item.children.forEach((ele) => {
|
||||||
|
// console.log(ele)
|
||||||
|
this.selectedBoms.push({
|
||||||
|
equipmentId: item.id,
|
||||||
|
children: Object.keys(item).length > 0 ? item.children.map((ele) => {
|
||||||
|
console.log(ele)
|
||||||
|
return {
|
||||||
|
id: ele.id
|
||||||
|
}
|
||||||
|
}) : []
|
||||||
|
})
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// console.log(arr)
|
||||||
|
// this.chooseList = arr
|
||||||
|
// console.log(this.chooseList)
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false
|
||||||
|
this.bomList = []
|
||||||
|
this.selectedBoms = []
|
||||||
|
this.$refs.dataForm.resetFields();
|
||||||
},
|
},
|
||||||
clearList() {
|
clearList() {
|
||||||
this.list = [];
|
this.list = [];
|
||||||
|
@ -25,10 +25,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
createQualityInspectionBoxBtn,
|
|
||||||
updateQualityInspectionBoxBtn,
|
|
||||||
deleteQualityInspectionBoxBtn,
|
deleteQualityInspectionBoxBtn,
|
||||||
getQualityInspectionBoxBtn,
|
|
||||||
getPage,
|
getPage,
|
||||||
exportQualityInspectionBoxBtnExcel,
|
exportQualityInspectionBoxBtnExcel,
|
||||||
getUserList
|
getUserList
|
||||||
@ -157,9 +154,10 @@ export default {
|
|||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
this.tableData = res.data.list.map((item) => {
|
this.tableData = res.data.list.map((item) => {
|
||||||
return {
|
return {
|
||||||
// datas: item.strList.toString(),
|
datas: item.strList.toString(),
|
||||||
nickName: item.nickName,
|
nickName: item.nickName,
|
||||||
userName: item.userName,
|
userName: item.userName,
|
||||||
|
userId: item.userId
|
||||||
// sectionId: item.sectionId,
|
// sectionId: item.sectionId,
|
||||||
// sectionName: item.sectionName
|
// sectionName: item.sectionName
|
||||||
}
|
}
|
||||||
@ -182,6 +180,7 @@ export default {
|
|||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
deleteHandle(id, name, index, data) {
|
deleteHandle(id, name, index, data) {
|
||||||
|
console.log(data)
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
|
this.$confirm(`确认要删除产线名为${data.userName}的数据项?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<div class="itemBox">
|
<div class="itemBox">
|
||||||
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
|
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
|
||||||
<div class="itemSub">
|
<div class="itemSub">
|
||||||
<p class="itemNum">{{item.checkValue}}</p>
|
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
|
||||||
<p class="itemDescribe">
|
<p class="itemDescribe" :title="item.name">
|
||||||
<img src="./../../../../../assets/images/detectionData.png" alt="">
|
<img src="./../../../../../assets/images/detectionData.png" alt="">
|
||||||
{{item.name}}</p>
|
{{item.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
@ -123,6 +123,9 @@ export default {
|
|||||||
.itemDescribe {
|
.itemDescribe {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
white-space: nowrap; /* 防止换行 */
|
||||||
|
overflow: hidden; /* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis; /* 添加省略号 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<div class="itemBox">
|
<div class="itemBox">
|
||||||
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
|
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
|
||||||
<div class="itemSub">
|
<div class="itemSub">
|
||||||
<p class="itemNum">{{item.checkValue}}</p>
|
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
|
||||||
<p class="itemDescribe">
|
<p class="itemDescribe" :title="item.name">
|
||||||
<img src="./../../../../../assets/images/detectionData.png" alt="">
|
<img src="./../../../../../assets/images/detectionData.png" alt="">
|
||||||
{{item.name}}</p>
|
{{item.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
@ -123,6 +123,9 @@ export default {
|
|||||||
.itemDescribe {
|
.itemDescribe {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
white-space: nowrap; /* 防止换行 */
|
||||||
|
overflow: hidden; /* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis; /* 添加省略号 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<div class="itemBox">
|
<div class="itemBox">
|
||||||
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
|
<div class="itemClass" v-for="(item, index) in realtimeList" :key='index'>
|
||||||
<div class="itemSub">
|
<div class="itemSub">
|
||||||
<p class="itemNum">{{item.checkValue}}</p>
|
<p class="itemNum">{{item.checkValue ? (item.checkValue).toFixed(2) : '-'}}</p>
|
||||||
<p class="itemDescribe">
|
<p class="itemDescribe" :title="item.name">
|
||||||
<img src="./../../../../../assets/images/detectionData.png" alt="">
|
<img src="./../../../../../assets/images/detectionData.png" alt="">
|
||||||
{{item.name}}</p>
|
{{item.name}}</p>
|
||||||
</div>
|
</div>
|
||||||
@ -120,6 +120,9 @@ export default {
|
|||||||
.itemDescribe {
|
.itemDescribe {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
white-space: nowrap; /* 防止换行 */
|
||||||
|
overflow: hidden; /* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis; /* 添加省略号 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="负责人" prop="leaderUserId">
|
<el-form-item label="负责人" prop="leaderUserId">
|
||||||
<el-select v-model="form.leaderUserId" placeholder="请输入负责人" clearable style="width: 100%">
|
<el-select v-model="form.leaderUserId" placeholder="请输入负责人" clearable style="width: 100%">
|
||||||
<el-option v-for="item in users" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
<el-option v-for="item in users" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="接收人" prop="userId">
|
<el-form-item label="接收人" prop="userId">
|
||||||
<el-select v-model="sendNotifyForm.userId" placeholder="请输入接收人" clearable style="width: 100%">
|
<el-select v-model="sendNotifyForm.userId" placeholder="请输入接收人" clearable style="width: 100%">
|
||||||
<el-option v-for="item in users" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
<el-option v-for="item in users" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-for="param in sendNotifyForm.params" :key="param" :label="'参数 {' + param + '}'" :prop="'templateParams.' + param">
|
<el-form-item v-for="param in sendNotifyForm.params" :key="param" :label="'参数 {' + param + '}'" :prop="'templateParams.' + param">
|
||||||
|
@ -415,9 +415,9 @@
|
|||||||
<el-select v-model="form.roleIds" multiple placeholder="请选择">
|
<el-select v-model="form.roleIds" multiple placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
:key="parseInt(item.id)"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="parseInt(item.id)"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
Loading…
Reference in New Issue
Block a user