Compare commits
No commits in common. "eba9d2ba60cc55ad4d0a8e1c8ce0cc314d928c46" and "0256306c0e0347ecbd565ea49e54b72f8c70bd66" have entirely different histories.
eba9d2ba60
...
0256306c0e
@ -1,10 +1,10 @@
|
||||
import axios from 'axios'
|
||||
import { Message, MessageBox, Notification, Loading } from 'element-ui'
|
||||
import {Message, MessageBox, Notification, Loading} from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getAccessToken, getRefreshToken, getTenantId, setToken } from '@/utils/auth'
|
||||
import {getAccessToken, getRefreshToken, getTenantId, setToken} from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import { getPath, getTenantEnable } from "@/utils/ruoyi";
|
||||
import { refreshToken } from "@/api/login";
|
||||
import {getPath, getTenantEnable} from "@/utils/ruoyi";
|
||||
import {refreshToken} from "@/api/login";
|
||||
|
||||
// 需要忽略的提示。忽略后,自动 Promise.reject('error')
|
||||
const ignoreMsgs = [
|
||||
@ -42,7 +42,7 @@ const service = axios.create({
|
||||
let loadingInstance = null
|
||||
function startLoading() {
|
||||
loadingInstance = Loading.service({
|
||||
fullscreen: true,
|
||||
fullscreen: false,
|
||||
text: '拼命加载中...',
|
||||
background: 'rgba(0, 0, 0, 0.1)'
|
||||
})
|
||||
@ -86,7 +86,7 @@ service.interceptors.request.use(config => {
|
||||
for (const propName of Object.keys(config.params)) {
|
||||
const value = config.params[propName];
|
||||
const part = encodeURIComponent(propName) + '='
|
||||
if (value !== null && typeof (value) !== "undefined") {
|
||||
if (value !== null && typeof(value) !== "undefined") {
|
||||
if (typeof value === 'object') {
|
||||
for (const key of Object.keys(value)) {
|
||||
let params = propName + '[' + key + ']';
|
||||
@ -104,9 +104,9 @@ service.interceptors.request.use(config => {
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
tryHideFullScreenLoading()
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
tryHideFullScreenLoading()
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
|
||||
// 响应拦截器
|
||||
@ -189,23 +189,23 @@ service.interceptors.response.use(async res => {
|
||||
return res.data
|
||||
}
|
||||
}, error => {
|
||||
tryHideFullScreenLoading()
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message === "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
} else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
} else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
tryHideFullScreenLoading()
|
||||
console.log('err' + error)
|
||||
let {message} = error;
|
||||
if (message === "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
} else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
} else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export function getBaseHeader() {
|
||||
@ -219,10 +219,10 @@ function handleAuthorized() {
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
).then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch('LogOut').then(() => {
|
||||
|
@ -2,7 +2,11 @@
|
||||
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
||||
<el-form-item label="员工" prop="workerId" v-if='!isEdit'>
|
||||
<el-select v-model="form.workerId" placeholder="请选择" filterable style="width: 100%;" @change="selectWorker()">
|
||||
<el-option v-for="item in workerList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-option
|
||||
v-for="item in workerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -44,12 +48,12 @@ export default {
|
||||
this.form.teamId = param.teamId
|
||||
this.form.majorName = param.majorName
|
||||
this.workName = param.workName
|
||||
otherWorkerList({ teamId: this.form.teamId }).then(res => {
|
||||
otherWorkerList({teamId:this.form.teamId}).then(res => {
|
||||
this.workerList = res.data || []
|
||||
if (param.id) {
|
||||
this.isEdit = true
|
||||
this.form.id = param.id
|
||||
groupTeamDet({ id: this.form.id }).then((res) => {
|
||||
groupTeamDet({id: this.form.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form.workerId = res.data.workerId
|
||||
this.form.remark = res.data.remark
|
||||
@ -68,7 +72,7 @@ export default {
|
||||
this.form.majorName = item.majorName
|
||||
}
|
||||
})
|
||||
} else {
|
||||
}else{
|
||||
this.form.majorName = ''
|
||||
}
|
||||
},
|
||||
|
@ -9,15 +9,18 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<p class="boldTitle">车间名称</p>
|
||||
<p class="lightText">{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ?
|
||||
getDictDataLabel('workshop', queryParams.roomNameDict) : '-' }}</p>
|
||||
<p class="lightText">{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ? getDictDataLabel('workshop',queryParams.roomNameDict) : '-' }}</p>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<p class="boldTitle">班组名称</p>
|
||||
<p class="lightText">{{ queryParams.teamName ? queryParams.teamName : '-' }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<base-table :table-props="tableProps" :table-data="tableData" :max-height="tableH" :page="1" :limit="1000000" />
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:table-data="tableData"
|
||||
:max-height="tableH"
|
||||
/>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
@ -44,7 +47,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'workTime',
|
||||
label: '工作时长(h)'
|
||||
label: '工作时长'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
@ -80,24 +83,21 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
padding: 0 32px;
|
||||
|
||||
.topBox {
|
||||
padding-bottom: 30px;
|
||||
margin-bottom: 30px;
|
||||
border-bottom: 1px solid #E9E9E9;
|
||||
|
||||
.boldTitle {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
color: rgba(0,0,0,0.85);
|
||||
margin: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.lightText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(102, 102, 102, 0.75);
|
||||
color: rgba(102,102,102,0.75);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
@ -2,20 +2,28 @@
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
<span class="blue-block"></span>
|
||||
<el-form-item label="班次信息">
|
||||
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable
|
||||
filterable>
|
||||
<el-option v-for="item in classesArr" :key="item.id"
|
||||
:label="(item.roomName ? item.roomName : '') + '-' + item.name" :value="item.id">
|
||||
<span>{{ item.roomName }}-{{ item.name }}</span>
|
||||
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in classesArr"
|
||||
:key="item.id"
|
||||
:label="(item.roomName?item.roomName:'')+'-'+item.name"
|
||||
:value="item.id">
|
||||
<span>{{ item.roomName }}-{{item.name}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组信息">
|
||||
<el-input v-model="queryParams.teamName" placeholder="班组信息" style="width: 200px;" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="上班日期">
|
||||
<el-date-picker v-model="queryParams.tiemStr" type="daterange" format='yyyy-MM-dd' value-format='yyyy-MM-dd'
|
||||
range-separator='-' style="width: 250px;" size="small">
|
||||
<el-form-item label="上班时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.tiemStr"
|
||||
type="daterange"
|
||||
format='yyyy-MM-dd'
|
||||
value-format='yyyy-MM-dd'
|
||||
range-separator='-'
|
||||
style="width: 250px;"
|
||||
size="small">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -61,7 +69,6 @@ export default {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
}
|
||||
|
||||
.el-input__prefix .el-icon-date {
|
||||
font-size: 16px;
|
||||
color: #0B58FF;
|
||||
@ -76,7 +83,6 @@ export default {
|
||||
background: #E8E8E8;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.demo-form-inline {
|
||||
.blue-block {
|
||||
display: inline-block;
|
||||
|
@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-drawer title="生产情况" :visible.sync="visible" size="70%" @closed="closeDrawer" :show-close='false'>
|
||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :wrapperClosable='false' @closed="closeDrawer">
|
||||
<div class="box">
|
||||
<base-table :table-props="tableProps" :table-data="tableData" :max-height="tableH" />
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:table-data="tableData"
|
||||
:max-height="tableH"
|
||||
/>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
@ -49,7 +53,7 @@ export default {
|
||||
init(params) {
|
||||
this.visible = true
|
||||
// console.log(params)
|
||||
getByScheduling({ id: params.id }).then(res => {
|
||||
getByScheduling({id:params.id}).then(res => {
|
||||
let dataList1 = []
|
||||
let dataList2 = []
|
||||
if (res.data.nameData && res.data.nameData.length > 0) {
|
||||
@ -86,11 +90,11 @@ export default {
|
||||
timeArr.push(this.parseTime(item.name))
|
||||
tablePropsObj.prop = item.name
|
||||
tablePropsObj.label = this.parseTime(item.name)
|
||||
tablePropsObj.children[0].prop = item.name + 'sumInput'
|
||||
tablePropsObj.children[1].prop = item.name + 'sumOutput'
|
||||
tablePropsObj.children[2].prop = item.name + 'goodArea'
|
||||
tablePropsObj.children[3].prop = item.name + 'dynamicValue'
|
||||
tablePropsObj.children[4].prop = item.name + 'dynamicRatio'
|
||||
tablePropsObj.children[0].prop = item.name+'sumInput'
|
||||
tablePropsObj.children[1].prop = item.name+'sumOutput'
|
||||
tablePropsObj.children[2].prop = item.name+'goodArea'
|
||||
tablePropsObj.children[3].prop = item.name+'dynamicValue'
|
||||
tablePropsObj.children[4].prop = item.name+'dynamicRatio'
|
||||
this.tableProps.push(tablePropsObj)
|
||||
})
|
||||
getSchedulingMonitoringRecord({
|
||||
@ -107,15 +111,15 @@ export default {
|
||||
obj.workOrderList = dataList1.data[i].workOrderList
|
||||
let subData1 = dataList1.data[i].data
|
||||
for (let ii = 0; ii < subData1.length; ii++) {
|
||||
obj[subData1[ii].dynamicName + 'sumInput'] = subData1[ii].dynamicValue.sumInput
|
||||
obj[subData1[ii].dynamicName + 'sumOutput'] = subData1[ii].dynamicValue.sumOutput
|
||||
obj[subData1[ii].dynamicName + 'goodArea'] = subData1[ii].dynamicValue.goodArea
|
||||
obj[subData1[ii].dynamicName+'sumInput'] = subData1[ii].dynamicValue.sumInput
|
||||
obj[subData1[ii].dynamicName+'sumOutput'] = subData1[ii].dynamicValue.sumOutput
|
||||
obj[subData1[ii].dynamicName+'goodArea'] = subData1[ii].dynamicValue.goodArea
|
||||
}
|
||||
for (let j = 0; j < dataList2.data.length; j++) {
|
||||
let subData2 = dataList2.data[j].data
|
||||
for (let jj = 0; jj < subData2.length; jj++) {
|
||||
obj[subData2[jj].dynamicName + 'dynamicValue'] = subData2[jj].dynamicValue
|
||||
obj[subData2[jj].dynamicName + 'dynamicRatio'] = obj[subData2[jj].dynamicName + 'dynamicValue'] / obj[subData2[jj].dynamicName + 'sumOutput']
|
||||
obj[subData2[jj].dynamicName+'dynamicValue'] = subData2[jj].dynamicValue
|
||||
obj[subData2[jj].dynamicName+'dynamicRatio'] = obj[subData2[jj].dynamicName+'dynamicValue'] / obj[subData2[jj].dynamicName+'sumOutput']
|
||||
}
|
||||
}
|
||||
this.tableData.push(obj)
|
||||
|
@ -1,22 +1,37 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area @submit="buttonClick" />
|
||||
<search-area @submit="buttonClick"/>
|
||||
<!-- <search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick"
|
||||
/> -->
|
||||
<!-- 列表 -->
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||
:max-height="tableH">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="80"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 查看生产情况 -->
|
||||
<team-production-detail v-if='paramVisible' ref='schedulingMonitoringDetail' />
|
||||
<team-production-detail v-if='paramVisible' ref='schedulingMonitoringDetail'/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -71,6 +86,38 @@ export default {
|
||||
name: 'GroupTeamScheduling',
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '班次信息',
|
||||
selectOptions: [],
|
||||
param: 'classesId'
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '班组信息',
|
||||
placeholder: '班组信息',
|
||||
param: 'teamName'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '上班日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd',
|
||||
rangeSeparator: '-',
|
||||
// valueFormat: "timestamp",
|
||||
param: 'tiemStr',
|
||||
defaultSelect: '',
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
}
|
||||
],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
@ -81,12 +128,11 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:team-production:detail')
|
||||
this.$auth.hasPermi('base:team-production:detail')
|
||||
? {
|
||||
type: 'productionDetail',
|
||||
btnName: '查看',
|
||||
showTip: '生产情况'
|
||||
}
|
||||
type: 'detail',
|
||||
btnName: '详情'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
list: [],
|
||||
@ -112,7 +158,7 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
groupTeamSchedulingPage({ ...this.queryParams }).then(res => {
|
||||
groupTeamSchedulingPage({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
this.list = res.data.list || []
|
||||
this.total = res.data.total || 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-03-14 13:46:39
|
||||
* @LastEditTime: 2024-03-12 11:17:14
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -9,7 +9,9 @@
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||
<el-date-picker clearable v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
||||
size="small" style='width:350px;' @change="timeSelect">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
@ -429,8 +431,7 @@ export default {
|
||||
// explainText: undefined,
|
||||
// remark: undefined,
|
||||
// },
|
||||
// 查询参数
|
||||
reportTime:'',
|
||||
// 查询参数
|
||||
dataForm: {
|
||||
// pageSize: 100,
|
||||
// pageNo:1,
|
||||
@ -448,41 +449,10 @@ export default {
|
||||
// this.getProductLineList();
|
||||
},
|
||||
mounted() {
|
||||
this.getTodayStartTimeAndEndTime()
|
||||
this.getDataList()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
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
|
||||
},
|
||||
getTodayStartTimeAndEndTime() {
|
||||
this.reportTime = new Date()
|
||||
this.changeTime(this.reportTime)
|
||||
},
|
||||
changeTime(val) {
|
||||
console.log(val)
|
||||
if (val) {
|
||||
// console.log(val)
|
||||
// console.log(val.setHours(7, 0, 0))
|
||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||
// let time = this.format(val.setHours(7, 0, 0))
|
||||
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.dataForm.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
console.log(this.dataForm.reportTime);
|
||||
} else {
|
||||
this.dataForm.reportTime = []
|
||||
}
|
||||
},
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
const res = await getCorePLList()
|
||||
@ -560,7 +530,18 @@ export default {
|
||||
}
|
||||
},
|
||||
async getDataList() {
|
||||
this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
|
||||
if (this.monthValue.length > 0) {
|
||||
console.log(this.monthValue)
|
||||
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
|
||||
// this.queryParams.startTime = this.monthValue[0]
|
||||
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
|
||||
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
||||
console.log(this.timeTips);
|
||||
} else {
|
||||
// this.$modal.msgError('月范围不能为空')
|
||||
// return false
|
||||
}
|
||||
|
||||
console.log(this.dataForm);
|
||||
const res = await this.$axios({
|
||||
url: 'base/report-auto-delive/listPlus',
|
||||
|
@ -117,12 +117,12 @@
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import EquipmentDrawer from '../components/firefightingDrawer';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
import {
|
||||
createEquipment,
|
||||
updateEquipment,
|
||||
deleteEquipment,
|
||||
getEquipment,
|
||||
getEquipmentPage,
|
||||
exportEquipmentExcel,
|
||||
} from '@/api/base/equipment';
|
||||
@ -134,7 +134,6 @@ export default {
|
||||
components: {
|
||||
Editor,
|
||||
EquipmentDrawer,
|
||||
BaseDialog: BaseDialogWrapper
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
|
@ -116,12 +116,12 @@
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import EquipmentDrawer from '../components/manageDrawer';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
import {
|
||||
createEquipment,
|
||||
updateEquipment,
|
||||
deleteEquipment,
|
||||
getEquipment,
|
||||
getEquipmentPage,
|
||||
exportEquipmentExcel,
|
||||
} from '@/api/base/equipment';
|
||||
@ -133,7 +133,6 @@ export default {
|
||||
components: {
|
||||
Editor,
|
||||
EquipmentDrawer,
|
||||
BaseDialog: BaseDialogWrapper
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
|
@ -126,14 +126,12 @@ import {
|
||||
} from '@/api/base/equipment';
|
||||
import Editor from '@/components/Editor';
|
||||
import AssetsUpload from '../components/AssetsUpload.vue';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentForSafety',
|
||||
components: {
|
||||
Editor,
|
||||
EquipmentDrawer,
|
||||
BaseDialog: BaseDialogWrapper,
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
|
@ -51,8 +51,7 @@
|
||||
<addOrUpdata
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getList"
|
||||
@destroy="addOrUpdateVisible = false" />
|
||||
@refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -61,11 +60,10 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import addOrUpdata from './add-or-updata.vue';
|
||||
import add from './add.vue';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentCheckConfig',
|
||||
components: { addOrUpdata, add, BaseDialog: BaseDialogWrapperVue },
|
||||
components: { addOrUpdata, add },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
@ -190,7 +188,6 @@ export default {
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
status: 0,
|
||||
special: true,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -9,9 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
:before-close="handleConfirmClose"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -173,7 +171,7 @@
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button v-if="!disableEdit" @click="handleCancel">
|
||||
<el-button style="" @click="handleCancel">
|
||||
{{ disableEdit ? '返回' : '取消' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -208,11 +206,35 @@
|
||||
<script>
|
||||
import DialogForm from '../../../components/DialogForm/index.vue';
|
||||
import { groupConnectWorkshop } from '@/utils/equipment-module';
|
||||
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
|
||||
import SmallTitle from '../components/SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapperVue },
|
||||
components: { SmallTitle, DialogForm },
|
||||
props: ['dataId'], // dataId 作为一个通用的存放id的字段
|
||||
data() {
|
||||
return {
|
||||
@ -389,35 +411,6 @@ export default {
|
||||
this.getList('inspector');
|
||||
},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
if (this.disableEdit) return this.handleCancel();
|
||||
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.handleCancel();
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick(btn) {
|
||||
switch (btn.btnName) {
|
||||
case 'search':
|
||||
|
@ -64,18 +64,10 @@ import { parseTime } from '../../core/mixins/code-filter';
|
||||
import CheckOrderListTable from './CheckOrderListTable.vue';
|
||||
import edit from './Content-edit.vue';
|
||||
import AddCheckDet from './Content-add_detail.vue';
|
||||
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentCheckConfig',
|
||||
components: {
|
||||
addOrUpdata,
|
||||
add,
|
||||
edit,
|
||||
AddCheckDet,
|
||||
BaseDialog: BaseDialogWrapperVue,
|
||||
CheckOrderListTable,
|
||||
},
|
||||
components: { addOrUpdata, add, edit, AddCheckDet, CheckOrderListTable },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
@ -94,7 +86,7 @@ export default {
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
@ -104,7 +96,7 @@ export default {
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
@ -342,8 +334,9 @@ export default {
|
||||
}
|
||||
|
||||
return this.$axios({
|
||||
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
// + checkPersonParam,
|
||||
url:
|
||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
// + checkPersonParam,
|
||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||
method: 'put',
|
||||
data: [id],
|
||||
|
@ -7,10 +7,9 @@
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="true"
|
||||
:close-on-click-modal="true"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -31,13 +30,13 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
<div style="">{{ form.name || '---' }}</div>
|
||||
<div style="">{{ form.name }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="department">
|
||||
<div style="">{{ form.department || '---' }}</div>
|
||||
<div style="">{{ form.department }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -112,7 +111,7 @@
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button v-if="!disableEdit" @click="handleCancel">
|
||||
<el-button style="" @click="handleCancel">
|
||||
{{ disableEdit ? '返回' : '取消' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -147,11 +146,35 @@
|
||||
<script>
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import DialogForm from '../../../components/DialogForm/index.vue';
|
||||
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
|
||||
import SmallTitle from '../components/SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapperVue },
|
||||
components: { SmallTitle, DialogForm },
|
||||
props: ['dataId'], // dataId 作为一个通用的存放id的字段
|
||||
filters: { parseTime },
|
||||
data() {
|
||||
|
@ -9,9 +9,7 @@
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
@closed="$emit('destroy')"
|
||||
:wrapper-closable="true"
|
||||
class="drawer"
|
||||
size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
@ -39,12 +37,12 @@
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
{{ dataForm.name || '---' }}
|
||||
{{ dataForm.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="department">
|
||||
{{ dataForm.department || '---' }}
|
||||
{{ dataForm.department }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -96,7 +94,7 @@
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- <div class="drawer-body__footer">
|
||||
<el-button type="primary" @click="goback()">返回</el-button>
|
||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
@ -113,7 +111,7 @@
|
||||
<script>
|
||||
import SmallTitle from './SmallTitle';
|
||||
import attrAdd from './attr-add';
|
||||
// import { DICT_TYPE, getDictDatas } from '@/utils/dict';
|
||||
import { DICT_TYPE, getDictDatas } from '@/utils/dict';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
|
||||
const tableBtn = [
|
||||
@ -185,33 +183,6 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.visible = false;
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
initData() {
|
||||
this.checkDetList.splice(0);
|
||||
this.checkDetList.total = 0;
|
||||
@ -274,7 +245,7 @@ export default {
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
// this.$emit('refreshDataList');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
// this.initData();
|
||||
},
|
||||
|
@ -51,7 +51,7 @@
|
||||
|
||||
<el-row style="text-align: right">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -1,59 +0,0 @@
|
||||
<!--
|
||||
filename: BaseDialogWrapper.vue
|
||||
author: liubin
|
||||
date: 2024-03-13 13:51:14
|
||||
description: 对BaseDialog的封装,自定义保存、取消按钮
|
||||
-->
|
||||
|
||||
<template>
|
||||
<base-dialog
|
||||
:dialogTitle="dialogTitle"
|
||||
:dialogVisible="dialogVisible"
|
||||
:width="width"
|
||||
:custom-class="customClass"
|
||||
:append-to-body="appendToBody"
|
||||
@close="$emit('close')">
|
||||
<slot />
|
||||
<template #footer>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="24">
|
||||
<el-button size="small" class="btnTextStyle" @click="$emit('cancel')">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="btnTextStyle"
|
||||
size="small"
|
||||
@click="$emit('confirm')">
|
||||
保存
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</base-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseDialogWrapper',
|
||||
components: {},
|
||||
props: [
|
||||
'dialogTitle',
|
||||
'dialogVisible',
|
||||
'appendToBody',
|
||||
'width',
|
||||
'customClass',
|
||||
],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.baseDialog .btnTextStyle {
|
||||
letter-spacing: 6px;
|
||||
padding: 9px 10px 9px 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
@ -1,32 +0,0 @@
|
||||
// <!--
|
||||
// filename: SmallTitle.js
|
||||
// author: liubin
|
||||
// date: 2024-03-13 14:21:01
|
||||
// description:
|
||||
// -->
|
||||
|
||||
export default {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
@ -121,16 +121,35 @@
|
||||
<script>
|
||||
import DialogForm from './DialogForm';
|
||||
import EquipmentInfoForm from './EquipmentInfoForm.vue';
|
||||
import BaseDialogWrapper from './BaseDialogWrapper.vue';
|
||||
import SmallTitle from './SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SmallTitle,
|
||||
DialogForm,
|
||||
EquipmentInfoForm,
|
||||
BaseDialog: BaseDialogWrapper,
|
||||
},
|
||||
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
||||
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId 作为一个通用的存放id的字段
|
||||
data() {
|
||||
return {
|
||||
|
@ -5,6 +5,7 @@
|
||||
description:
|
||||
-->
|
||||
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
@ -121,16 +122,35 @@
|
||||
<script>
|
||||
import DialogForm from './DialogForm';
|
||||
import EquipmentInfoForm from './manageDrawerForm.vue';
|
||||
import BaseDialogWrapper from './BaseDialogWrapper.vue';
|
||||
import SmallTitle from './SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SmallTitle,
|
||||
DialogForm,
|
||||
EquipmentInfoForm,
|
||||
BaseDialog: BaseDialogWrapper,
|
||||
},
|
||||
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
||||
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId 作为一个通用的存放id的字段
|
||||
data() {
|
||||
return {
|
||||
|
@ -5,6 +5,7 @@
|
||||
description:
|
||||
-->
|
||||
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
@ -121,16 +122,35 @@
|
||||
<script>
|
||||
import DialogForm from './DialogForm';
|
||||
import EquipmentInfoForm from './EquipmentInfoForm.vue';
|
||||
import BaseDialogWrapper from './BaseDialogWrapper.vue';
|
||||
import SmallTitle from './SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SmallTitle,
|
||||
DialogForm,
|
||||
EquipmentInfoForm,
|
||||
BaseDialog: BaseDialogWrapper,
|
||||
},
|
||||
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
||||
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId 作为一个通用的存放id的字段
|
||||
data() {
|
||||
return {
|
||||
|
@ -9,9 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
:before-close="handleConfirmClose"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -117,7 +115,7 @@
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<!-- <el-button style="" @click="cancel">返回</el-button> -->
|
||||
<el-button style="" @click="cancel">返回</el-button>
|
||||
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||
编辑
|
||||
</el-button>
|
||||
@ -145,7 +143,32 @@
|
||||
|
||||
<script>
|
||||
import DialogForm from '@/components/DialogForm';
|
||||
import SmallTitle from '../components/SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'PlanConfig--addContent',
|
||||
@ -240,35 +263,6 @@ export default {
|
||||
this.loadEquipments();
|
||||
},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
if (this.mode.includes('detail')) return this.cancel();
|
||||
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
show({
|
||||
departmentName,
|
||||
id,
|
||||
|
@ -61,7 +61,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { publicFormatter } from '@/utils/dict';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
// import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record';
|
||||
|
@ -123,8 +123,7 @@
|
||||
type: 'number',
|
||||
message: '请输入正确的数字',
|
||||
trigger: 'blur',
|
||||
transform: (val) =>
|
||||
Number(val) && parseInt(val) === Number(val) && Number(val),
|
||||
transform: (val) => Number(val) && parseInt(val) === Number(val),
|
||||
},
|
||||
{ required: true, message: '保养频率不能为空', trigger: 'blur' },
|
||||
]">
|
||||
|
@ -2,16 +2,14 @@
|
||||
filename: PlanConfig--addContent.vue
|
||||
author: liubin
|
||||
date: 2024-02-04 09:40:04
|
||||
description: 计划配置-添加内容
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
:before-close="handleConfirmClose"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -21,7 +19,7 @@
|
||||
mode.includes('detail')
|
||||
? '详情'
|
||||
: mode.includes('edit')
|
||||
? '添加内容'
|
||||
? '编辑'
|
||||
: '新增'
|
||||
}}
|
||||
</SmallTitle>
|
||||
@ -40,37 +38,37 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保养计划名称" prop="name">
|
||||
<span>{{ form.name || '---' }}</span>
|
||||
<span>{{ form.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="departmentName">
|
||||
<span>{{ form.departmentName || '---' }}</span>
|
||||
<span>{{ form.departmentName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产线名" prop="lineName">
|
||||
<span>{{ form.lineName || '---' }}</span>
|
||||
<span>{{ form.lineName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保养频率" prop="maintenancePeriod">
|
||||
<span>{{ form.maintenancePeriod || '---' }}</span>
|
||||
<span>{{ form.maintenancePeriod }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保养时长" prop="maintainDuration">
|
||||
<span>{{ form.maintainDuration || '---' }}</span>
|
||||
<span>{{ form.maintainDuration }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划保养人员" prop="maintainer">
|
||||
<span>{{ form.maintainer || '---' }}</span>
|
||||
<span>{{ form.maintainer }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -145,12 +143,36 @@
|
||||
|
||||
<script>
|
||||
import DialogForm from '@/components/DialogForm';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
|
||||
import SmallTitle from '../components/SmallTitle.js';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'PlanConfig--addContent',
|
||||
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapper },
|
||||
components: { SmallTitle, DialogForm },
|
||||
props: ['maintainData'],
|
||||
data() {
|
||||
return {
|
||||
@ -241,35 +263,6 @@ export default {
|
||||
this.loadEquipments();
|
||||
},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
if (this.mode.includes('detail')) return this.cancel();
|
||||
if (document.querySelector('.small-title').innerText.includes('添加内容')) return this.cancel();
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
show({
|
||||
departmentName,
|
||||
id,
|
||||
|
@ -65,15 +65,10 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record';
|
||||
import PlanConfigAdd from './PlanConfig--add.vue';
|
||||
import PlanConfigAddContent from './PlanConfig--addContent.vue';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentPlanConfig',
|
||||
components: {
|
||||
BaseDialog: BaseDialogWrapper,
|
||||
DialogForm: PlanConfigAdd,
|
||||
PlanConfigAddContent,
|
||||
},
|
||||
components: { DialogForm: PlanConfigAdd, PlanConfigAddContent },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
const t = new Date();
|
||||
@ -103,7 +98,7 @@ export default {
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'name', label: '保养计划名称' },
|
||||
{ prop: 'name', label: '计划名称' },
|
||||
{ prop: 'departmentName', label: '部门' },
|
||||
{ width: 144, prop: 'lineName', label: '产线名' },
|
||||
{ width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
|
||||
|
@ -9,9 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
:before-close="handleConfirmClose"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -86,7 +84,7 @@
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<!-- <el-button style="" @click="cancel">返回</el-button> -->
|
||||
<el-button style="" @click="cancel">返回</el-button>
|
||||
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||
编辑
|
||||
</el-button>
|
||||
@ -114,12 +112,36 @@
|
||||
|
||||
<script>
|
||||
import DialogForm from '@/components/DialogForm';
|
||||
import SmallTitle from '../components/SmallTitle.js';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper';
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'PlanConfig--addContent',
|
||||
components: { SmallTitle, DialogForm, BaseDialog: BaseDialogWrapper },
|
||||
components: { SmallTitle, DialogForm },
|
||||
props: ['maintainData'],
|
||||
data() {
|
||||
return {
|
||||
@ -207,35 +229,6 @@ export default {
|
||||
this.loadEquipments();
|
||||
},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
if (this.mode.includes('detail')) return this.cancel();
|
||||
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
show({ planMaintainWorker, id, maintainWorker }) {
|
||||
this.form = Object.assign(
|
||||
{},
|
||||
@ -312,14 +305,17 @@ export default {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await this.$axios('/base/equipment-maintain-log-det/page', {
|
||||
params: {
|
||||
pageNo: this.detailTableQuery.pageNo,
|
||||
pageSize: this.detailTableQuery.pageSize,
|
||||
// planId: this.form.id,
|
||||
logId: this.form.id,
|
||||
},
|
||||
});
|
||||
const res = await this.$axios(
|
||||
'/base/equipment-maintain-log-det/page',
|
||||
{
|
||||
params: {
|
||||
pageNo: this.detailTableQuery.pageNo,
|
||||
pageSize: this.detailTableQuery.pageSize,
|
||||
// planId: this.form.id,
|
||||
logId: this.form.id,
|
||||
},
|
||||
}
|
||||
);
|
||||
this.detailList = res.data?.list || [];
|
||||
this.detailTotal = res.data?.total || 0;
|
||||
this.detailLoading = false;
|
||||
|
@ -70,11 +70,10 @@ import {
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import htmls from './htmls.vue';
|
||||
import DialogForm from './Repair--add.vue';
|
||||
import BaseDialogWrapperVue from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentRepair',
|
||||
components: { DetailDrawer, DialogForm, BaseDialog: BaseDialogWrapperVue },
|
||||
components: { DetailDrawer, DialogForm },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
|
@ -97,39 +97,42 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import DialogFormUnplanned from './WaitingList--add--unplanned.vue';
|
||||
import UnplannedEditDrawer from './WaitingListUnplanned--edit.vue';
|
||||
import PlannedEditDrawer from './WaitingListPlanned--edit.vue';
|
||||
import UnplannedAddDet from './WaitingListUnplanned--add_detail.vue';
|
||||
import { exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
|
||||
import {
|
||||
exportMaintainLogExcel,
|
||||
} from '@/api/equipment/base/maintain/record';
|
||||
import WaitingListTable from './WaitingListTable.vue';
|
||||
import RecordDetail from './Record--detail.vue';
|
||||
import BaseDialogWrapper from '../components/BaseDialogWrapper.vue';
|
||||
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
// const btn = {
|
||||
// name: 'tableBtn',
|
||||
// props: ['injectData'],
|
||||
// data() {
|
||||
// return {};
|
||||
// },
|
||||
// methods: {
|
||||
// handleClick() {
|
||||
// this.$emit('emitData', {
|
||||
// action: this.injectData.label,
|
||||
// value: this.injectData,
|
||||
// });
|
||||
// },
|
||||
// },
|
||||
// render: function (h) {
|
||||
// return (
|
||||
// <el-button type="text" onClick={this.handleClick}>
|
||||
// {this.injectData.name}
|
||||
// </el-button>
|
||||
// );
|
||||
// },
|
||||
// };
|
||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
const btn = {
|
||||
name: 'tableBtn',
|
||||
props: ['injectData'],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.$emit('emitData', {
|
||||
action: this.injectData.label,
|
||||
value: this.injectData,
|
||||
});
|
||||
},
|
||||
},
|
||||
render: function (h) {
|
||||
return (
|
||||
<el-button type="text" onClick={this.handleClick}>
|
||||
{this.injectData.name}
|
||||
</el-button>
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentMaintainRecord',
|
||||
@ -140,7 +143,6 @@ export default {
|
||||
UnplannedEditDrawer,
|
||||
UnplannedAddDet,
|
||||
PlannedEditDrawer,
|
||||
BaseDialog: BaseDialogWrapper,
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
|
@ -9,9 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
:before-close="handleConfirmClose"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -484,33 +482,6 @@ export default {
|
||||
this.getList('line');
|
||||
},
|
||||
methods: {
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.handleCancel();
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick(btn) {
|
||||
switch (btn.btnName) {
|
||||
case 'search':
|
||||
|
@ -9,9 +9,7 @@
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapperClosable="true"
|
||||
:close-on-click-modal="true"
|
||||
:before-close="handleConfirmClose"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@ -421,34 +419,6 @@ export default {
|
||||
this.getList('line');
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 确认是否关闭 */
|
||||
async handleConfirmClose() {
|
||||
try {
|
||||
if (
|
||||
await this.$confirm(
|
||||
<div style="position: relative; margin-bottom: 26px; overflow: visible;">
|
||||
<h1 style="font-size: 16px; font-weight: bold; color: #000c;">
|
||||
确认要关闭页面吗?
|
||||
</h1>
|
||||
<p style="font-size: 14px; color: #0008; position: absolute; top: 24px;">
|
||||
确定关闭将不保留编辑内容
|
||||
</p>
|
||||
</div>,
|
||||
{
|
||||
confirmButtonText: '确 定',
|
||||
cancelButtonText: '取 消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
) {
|
||||
this.handleCancel();
|
||||
}
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
handleSearchBarBtnClick(btn) {
|
||||
console.log('btn', btn);
|
||||
switch (btn.btnName) {
|
||||
|
Loading…
Reference in New Issue
Block a user