Compare commits
No commits in common. "d44f76b641f18a1ea30c08082398372a2265766b" and "151df54032eac7e9685f71f17c0bff0dceec6f82" have entirely different histories.
d44f76b641
...
151df54032
2
.env.dev
2
.env.dev
@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2024-03-01 20:40:47
|
||||
# @LastEditTime: 2024-02-29 15:53:50
|
||||
# @LastEditors: DY
|
||||
# @Description:
|
||||
###
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-02-29 15:48:47
|
||||
* @LastEditTime: 2024-02-23 16:11:33
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -715,7 +715,6 @@ export default {
|
||||
qualityMonthTableProps,
|
||||
modelMonth: '',
|
||||
qualityList1,
|
||||
// logoutTime: 43200000,
|
||||
qualityTableProps2,
|
||||
qualityList2,
|
||||
dateType: '0',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 16:50:26
|
||||
* @LastEditTime: 2024-02-29 15:48:11
|
||||
* @LastEditTime: 2024-02-23 16:11:40
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -341,9 +341,7 @@ export default {
|
||||
// offsetWidth: null,
|
||||
cxNameList,
|
||||
cxDataList,
|
||||
// time:12,
|
||||
cutProps,
|
||||
// logoutTime: 43200000,
|
||||
cutTableDataList:[],
|
||||
clientWidth: 0,
|
||||
containerWidth: 111111,
|
||||
@ -434,15 +432,36 @@ export default {
|
||||
this.beilv2 = _this.clientWidth / 1920
|
||||
})()
|
||||
}
|
||||
// logoutInterval = setInterval(() => {
|
||||
// this.logoutTime -= 1000
|
||||
// }, 1000)
|
||||
// if (this.logoutTime === 0) {
|
||||
// this.SJGInitWebSocket()
|
||||
// this.CutInitWebSocket()
|
||||
// this.funInitWebSocket()
|
||||
// this.logoutTimeReset()
|
||||
// let obj = {
|
||||
// 'a': 11111,
|
||||
// 'b': 22222,
|
||||
// 'c': 33333,
|
||||
// 'd': 44444,
|
||||
// 'e': 55555,
|
||||
// }
|
||||
// let index = 0
|
||||
// for (let i in obj) {
|
||||
// index++,
|
||||
// console.log(index);
|
||||
// }
|
||||
// this.getList()
|
||||
// const _this = this;
|
||||
// window.onresize = () => {
|
||||
// return (() => {
|
||||
// _this.clientWidth = `${document.documentElement.clientWidth}`
|
||||
// this.beilv2 = _this.clientWidth / 1920
|
||||
// })()
|
||||
// }
|
||||
// this.beilv2 = window.innerWidth / 1920
|
||||
// addEventListener('resize', resizeFun = () => {
|
||||
// this.beilv2 = window.innerWidth / 1920
|
||||
// })
|
||||
// erd.listenTo(document, (element) => {
|
||||
// this.beilv2 = element.offsetWidth / 1920
|
||||
|
||||
// // var width = element.offsetWidth;
|
||||
// // var height = element.offsetHeight;
|
||||
// });
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// //离开页面删除检测器和所有侦听器
|
||||
@ -450,16 +469,13 @@ export default {
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
// logoutTimeReset() {
|
||||
// this.logoutTime = this.time * 60 * 60 * 1000
|
||||
// },
|
||||
CutWebsocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
},
|
||||
SJGWebsocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
},
|
||||
funWebSocketClose(e) {
|
||||
funInitWebSocket(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
},
|
||||
formatTime(time, option) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-01 19:52:55
|
||||
* @LastEditTime: 2024-02-18 13:53:09
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -33,13 +33,14 @@
|
||||
<el-select
|
||||
v-model="dataForm.roomNameDict"
|
||||
filterable
|
||||
:disabled="isdetail || isedit"
|
||||
style="width: 100%"
|
||||
placeholder="请选择车间名称">
|
||||
<el-option
|
||||
v-for="(dict, index) in getDictDatas('workshop')"
|
||||
:key="index"
|
||||
:label="dict.label"
|
||||
:value="Number(dict.value)" />
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -124,26 +125,6 @@ export default {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data
|
||||
// this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async getDict() {
|
||||
// 工厂列表
|
||||
const factoryRes = await getFactoryList();
|
||||
|
@ -38,7 +38,7 @@
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { getworkerAll } from '@/api/base/materialUseLog';
|
||||
import Editor from '@/components/Editor';
|
||||
import DialogForm from './DialogForm';
|
||||
import DialogForm from '@/components/DialogForm';
|
||||
|
||||
export default {
|
||||
name: 'AlarmHandle',
|
||||
|
@ -1,520 +0,0 @@
|
||||
<!--
|
||||
filename: dialogForm.vue
|
||||
author: liubin
|
||||
date: 2023-08-15 10:32:36
|
||||
description: 弹窗的表单组件
|
||||
-->
|
||||
|
||||
<template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:label-width="`${labelWidth}px`"
|
||||
:size="size"
|
||||
:label-position="labelPosition"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
|
||||
<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
|
||||
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
|
||||
<el-input
|
||||
v-if="col.input"
|
||||
v-model="form[col.prop]"
|
||||
@change="$emit('update', form)"
|
||||
:placeholder="`请输入${col.label}`"
|
||||
:disabled="disabled"
|
||||
v-bind="col.bind" />
|
||||
<el-input
|
||||
v-if="col.textarea"
|
||||
type="textarea"
|
||||
v-model="form[col.prop]"
|
||||
:disabled="disabled"
|
||||
@change="$emit('update', form)"
|
||||
:placeholder="`请输入${col.label}`"
|
||||
v-bind="col.bind" />
|
||||
<el-select
|
||||
v-if="col.select"
|
||||
v-model="form[col.prop]"
|
||||
:placeholder="`请选择${col.label}`"
|
||||
:disabled="disabled"
|
||||
@change="$emit('update', form)"
|
||||
v-bind="col.bind">
|
||||
<el-option
|
||||
v-for="opt in optionListOf[col.prop]"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-if="col.datetime"
|
||||
v-model="form[col.prop]"
|
||||
type="datetime"
|
||||
:disabled="disabled"
|
||||
:placeholder="`请选择${col.label}`"
|
||||
value-format="timestamp"
|
||||
@change="$emit('update', form)"
|
||||
v-bind="col.bind"></el-date-picker>
|
||||
<el-switch
|
||||
v-if="col.switch"
|
||||
v-model="form[col.prop]"
|
||||
:disabled="disabled"
|
||||
active-color="#0b58ff"
|
||||
inactive-color="#e1e1e1"
|
||||
@change="$emit('update', form)"
|
||||
v-bind="col.bind"></el-switch>
|
||||
<component
|
||||
v-if="col.subcomponent"
|
||||
:key="col.key"
|
||||
:disabled="disabled"
|
||||
:read-only="disabled"
|
||||
:is="col.subcomponent"
|
||||
v-model="form[col.prop]"
|
||||
:inlineStyle="col.style"
|
||||
@on-change="$emit('update', form)"
|
||||
v-bind="col.bind"></component>
|
||||
|
||||
<div
|
||||
class="upload-area"
|
||||
:class="uploadOpen ? '' : 'height-48'"
|
||||
ref="uploadArea"
|
||||
:key="col.prop"
|
||||
v-if="col.upload">
|
||||
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-arrow-right"
|
||||
@click="handleFilesOpen" />
|
||||
</span>
|
||||
<!-- :file-list="uploadedFileList" -->
|
||||
<el-upload
|
||||
v-if="col.upload"
|
||||
class="upload-in-dialog"
|
||||
:key="col.prop + '__el-upload'"
|
||||
:action="uploadUrl"
|
||||
:headers="uploadHeaders"
|
||||
:show-file-list="false"
|
||||
icon="el-icon-upload2"
|
||||
:disabled="disabled"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="
|
||||
(response, file, fileList) => {
|
||||
handleUploadSuccess(response, file, col.prop);
|
||||
}
|
||||
"
|
||||
v-bind="col.bind">
|
||||
<el-button
|
||||
size="mini"
|
||||
:disabled="disabled || col.bind?.disabled || false">
|
||||
<svg-icon
|
||||
icon-class="icon-upload"
|
||||
style="color: inherit"></svg-icon>
|
||||
上传文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
|
||||
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
<uploadedFile
|
||||
class="file"
|
||||
v-for="file in form[col.prop]"
|
||||
:file="file"
|
||||
:key="file.fileUrl"
|
||||
:disabled="disabled"
|
||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAccessToken } from '@/utils/auth';
|
||||
import tupleImg from '@/assets/images/tuple.png';
|
||||
import cache from '@/utils/cache';
|
||||
|
||||
/**
|
||||
* 找到最长的label
|
||||
* @param {*} options
|
||||
*/
|
||||
function findMaxLabelWidth(rows) {
|
||||
let max = 0;
|
||||
rows.forEach((row) => {
|
||||
row.forEach((opt) => {
|
||||
// debugger;
|
||||
if (!opt.label) return 0;
|
||||
if (opt.label.length > max) {
|
||||
max = opt.label.length;
|
||||
if (opt.label.includes('(')) {
|
||||
max = max - 3;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
return max;
|
||||
}
|
||||
|
||||
const uploadedFile = {
|
||||
name: 'UploadedFile',
|
||||
props: ['file', 'disabled'],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
handleDelete() {
|
||||
this.$emit('delete', this.file);
|
||||
},
|
||||
async handleDownload() {
|
||||
const data = await this.$axios({
|
||||
url: this.file.fileUrl,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
});
|
||||
|
||||
await this.$message.success('开始下载');
|
||||
// create download link
|
||||
const url = window.URL.createObjectURL(data);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = this.file.fileName;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
render: function (h) {
|
||||
return (
|
||||
<div
|
||||
title={this.file.fileName}
|
||||
onClick={this.handleDownload}
|
||||
style={{
|
||||
background: `url(${tupleImg}) no-repeat`,
|
||||
backgroundSize: '14px',
|
||||
backgroundPosition: '0 55%',
|
||||
paddingLeft: '20px',
|
||||
paddingRight: '24px',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
cursor: 'pointer',
|
||||
display: 'inline-block',
|
||||
}}>
|
||||
{this.file.fileName}
|
||||
{!this.disabled && (
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
style="float: right; position: relative; top: 2px; left: 8px; z-index: 100"
|
||||
class="dialog__upload_component__close"
|
||||
onClick={this.handleDelete}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'DialogForm',
|
||||
model: {
|
||||
prop: 'dataForm',
|
||||
event: 'update',
|
||||
},
|
||||
emits: ['update'],
|
||||
components: { uploadedFile },
|
||||
props: {
|
||||
rows: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
dataForm: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hasFiles: {
|
||||
type: Boolean | Array,
|
||||
default: false,
|
||||
},
|
||||
labelPosition: {
|
||||
type: String,
|
||||
default: 'right',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadOpen: false,
|
||||
form: {},
|
||||
formLoading: true,
|
||||
optionListOf: {},
|
||||
uploadedFileList: [],
|
||||
dataLoaded: false,
|
||||
uploadHeaders: { Authorization: 'Bearer ' + getAccessToken() },
|
||||
uploadUrl: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 上传有关的headers,url都是固定的
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
labelWidth() {
|
||||
let max = findMaxLabelWidth(this.rows);
|
||||
// 每个汉字占20px
|
||||
return max * 20;
|
||||
// return max * 20 + 'px';
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
rows: {
|
||||
handler() {
|
||||
this.$nextTick(() => {
|
||||
this.handleOptions('watch');
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
immediate: false,
|
||||
},
|
||||
dataForm: {
|
||||
handler(val) {
|
||||
this.form = JSON.parse(JSON.stringify(val));
|
||||
if (this.hasFiles) {
|
||||
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
|
||||
this.form.files = this.form.files ?? [];
|
||||
} else if (Array.isArray(this.hasFiles)) {
|
||||
this.hasFiles.forEach((prop) => {
|
||||
this.form[prop] = this.form[prop] ?? [];
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// 处理 options
|
||||
this.handleOptions();
|
||||
},
|
||||
methods: {
|
||||
/** 模拟透传 ref */
|
||||
validate(cb) {
|
||||
return this.$refs.form.validate(cb);
|
||||
},
|
||||
resetFields(args) {
|
||||
return this.$refs.form.resetFields(args);
|
||||
},
|
||||
// getCode
|
||||
async getCode(url) {
|
||||
const response = await this.$axios(url);
|
||||
return response.data;
|
||||
},
|
||||
async handleOptions(trigger = 'monuted') {
|
||||
console.log('[dialogForm:handleOptions]');
|
||||
const promiseList = [];
|
||||
this.rows.forEach((cols) => {
|
||||
cols.forEach((opt) => {
|
||||
if (opt.value && !this.form[opt.prop]) {
|
||||
// 默认值
|
||||
this.form[opt.prop] = opt.value;
|
||||
}
|
||||
|
||||
if (opt.options) {
|
||||
this.$set(this.optionListOf, opt.prop, opt.options);
|
||||
} else if (opt.url) {
|
||||
// 如果有 depends,则暂时先不获取,注册一个watcher
|
||||
if (opt.depends) {
|
||||
this.$watch(
|
||||
() => this.form[opt.depends],
|
||||
(id) => {
|
||||
console.log('<', opt.depends, '>', 'changed', id);
|
||||
if (id == null) return;
|
||||
// 清空原有选项
|
||||
this.form[opt.prop] = null;
|
||||
// 获取新的选项
|
||||
this.$axios({
|
||||
url: `${opt.url}?id=${id}`,
|
||||
}).then((res) => {
|
||||
this.$set(
|
||||
this.optionListOf,
|
||||
opt.prop,
|
||||
res.data.map((item) => ({
|
||||
label: item[opt.labelKey ?? 'name'],
|
||||
value: item[opt.valueKey ?? 'id'],
|
||||
}))
|
||||
);
|
||||
});
|
||||
},
|
||||
{
|
||||
immediate: false,
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
// 如果是下拉框,或者新增模式下的输入框,才去请求
|
||||
if (opt.select || (opt.input && !this.form?.id)) {
|
||||
promiseList.push(async () => {
|
||||
const response = await this.$axios(opt.url, {
|
||||
method: opt.method ?? 'get',
|
||||
// data: opt.method == 'post' ? opt.queryParams : null
|
||||
});
|
||||
// console.log('[dialogForm:handleOptions:response]', response);
|
||||
if (opt.select) {
|
||||
// 处理下拉框选项
|
||||
const list =
|
||||
'list' in response.data
|
||||
? response.data.list
|
||||
: response.data;
|
||||
|
||||
if (opt.cache) {
|
||||
cache.store(opt.cache, list);
|
||||
}
|
||||
|
||||
this.$set(
|
||||
this.optionListOf,
|
||||
opt.prop,
|
||||
list.map((item) => ({
|
||||
label: item[opt.labelKey ?? 'name'],
|
||||
value: item[opt.valueKey ?? 'id'],
|
||||
}))
|
||||
);
|
||||
} else if (opt.input) {
|
||||
console.log('setting code: ', response.data);
|
||||
// 处理输入框数据
|
||||
this.form[opt.prop] = response.data;
|
||||
// 更新下外部的 dataForm,防止code字段有数据也报空的bug
|
||||
this.$emit('update', this.form);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
console.log('[dialogForm:handleOptions] done!');
|
||||
|
||||
// 如果是 watch 触发的,不需要执行进一步的请求
|
||||
if (trigger == 'watch') {
|
||||
this.formLoading = false;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await Promise.all(promiseList.map((fn) => fn()));
|
||||
this.formLoading = false;
|
||||
this.dataLoaded = true;
|
||||
// console.log("[dialogForm:handleOptions:optionListOf]", this.optionListOf)
|
||||
} catch (error) {
|
||||
console.log('[dialogForm:handleOptions:error]', error);
|
||||
this.formLoading = false;
|
||||
}
|
||||
if (!promiseList.length) this.formLoading = false;
|
||||
},
|
||||
|
||||
// 上传成功的特殊处理
|
||||
beforeUpload(file) {
|
||||
const checkFileSize = () => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||
}
|
||||
return isLt2M;
|
||||
};
|
||||
const checkFileType = () => {
|
||||
const isJPG =
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/png' ||
|
||||
file.type === 'image/jpg';
|
||||
return isJPG;
|
||||
};
|
||||
// return checkFileSize() && checkFileType();
|
||||
return checkFileSize();
|
||||
},
|
||||
|
||||
// 上传前的验证规则可通过 bind 属性传入
|
||||
handleUploadSuccess(response, file, prop) {
|
||||
console.log('[handleUploadSuccess]', response, file, prop);
|
||||
this.form[prop].push({
|
||||
fileName: file.name,
|
||||
fileUrl: response.data,
|
||||
fileType: prop == 'files' ? 2 : 1,
|
||||
});
|
||||
this.$modal.msgSuccess('上传成功');
|
||||
this.$emit('update', this.form);
|
||||
},
|
||||
|
||||
getFileName(fileUrl) {
|
||||
return fileUrl.split('/').pop();
|
||||
},
|
||||
|
||||
handleFilesOpen() {
|
||||
this.uploadOpen = !this.uploadOpen;
|
||||
},
|
||||
|
||||
handleDeleteFile(file, prop) {
|
||||
this.form[prop] = this.form[prop].filter(
|
||||
(item) => item.fileUrl != file.fileUrl
|
||||
);
|
||||
this.$emit('update', this.form);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-date-editor,
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.upload-area {
|
||||
// background: #ccc;
|
||||
// display: grid;
|
||||
// grid-auto-rows: 34px;
|
||||
// grid-template-columns: repeat(6, minmax(32px, max-content));
|
||||
// gap: 8px;
|
||||
// align-items: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: height 0.3s ease-out;
|
||||
}
|
||||
|
||||
.upload-in-dialog {
|
||||
// display: inline-block;
|
||||
margin-right: 24px;
|
||||
// background: #ccc;
|
||||
position: relative;
|
||||
// top: -13px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
// background: #ccc;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 12px;
|
||||
z-index: 100;
|
||||
transition: transform 0.3s ease-out;
|
||||
}
|
||||
|
||||
.close-icon.open {
|
||||
transform: rotateZ(90deg);
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.dialog__upload_component__close {
|
||||
color: #ccc;
|
||||
}
|
||||
.dialog__upload_component__close:hover {
|
||||
/* color: #777; */
|
||||
color: red;
|
||||
}
|
||||
|
||||
.height-48 {
|
||||
height: 35px !important;
|
||||
}
|
||||
</style>
|
@ -218,9 +218,9 @@ export default {
|
||||
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||
prop: 'collection',
|
||||
bind: {
|
||||
'active-value': 1,
|
||||
'active-value': 1,
|
||||
'inactive-value': 0,
|
||||
value: 1,
|
||||
value: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -294,7 +294,7 @@ export default {
|
||||
name: undefined,
|
||||
enName: undefined,
|
||||
description: undefined,
|
||||
collection: 1,
|
||||
collection: undefined,
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-04 11:14:28
|
||||
* @LastEditTime: 2024-02-29 14:59:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -78,7 +78,7 @@
|
||||
v-for="opt in inspectorOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.label" />
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -418,7 +418,7 @@ export default {
|
||||
});
|
||||
},
|
||||
getConfirmed() {
|
||||
return this.$confirm('是否直接确认巡检单', '提示', {
|
||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
@ -431,16 +431,10 @@ export default {
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.getConfirmed().then(confirm => {
|
||||
// let checkPersonParam = '';
|
||||
// if (!this.dataForm.checkPerson || this.dataForm.checkPerson.trim() == '') {
|
||||
// /** 如有必要,更新巡检人 */
|
||||
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||
// } else {
|
||||
// checkPersonParam = `&checkPerson=${this.dataForm.checkPerson}`
|
||||
// }
|
||||
this.$axios({
|
||||
url:
|
||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
||||
this.$store.getters.userId,
|
||||
method: 'put',
|
||||
data: [this.dataForm.id],
|
||||
}).then(res =>{
|
||||
|
@ -179,14 +179,8 @@ export default {
|
||||
this.$modal
|
||||
.confirm('是否确认所有选中巡检单"?')
|
||||
.then(() => {
|
||||
// let checkPersonParam = '';
|
||||
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||
// /** 如有必要,更新巡检人 */
|
||||
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||
// }
|
||||
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}`,
|
||||
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
@ -400,17 +394,11 @@ export default {
|
||||
this.$modal
|
||||
.confirm('是否确认巡检单"' + row.name + '"?')
|
||||
.then(() => {
|
||||
// let checkPersonParam = '';
|
||||
// const nickname = this.$store.getters.nickname;
|
||||
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||
// /** 如有必要,更新巡检人 */
|
||||
// checkPersonParam = `&checkPerson=${nickname}`;
|
||||
// } else {
|
||||
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
||||
// }
|
||||
return this.$axios({
|
||||
url:
|
||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
||||
this.$store.getters.userId,
|
||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||
method: 'put',
|
||||
data: [row.id],
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-01 19:44:59
|
||||
* @LastEditTime: 2024-02-29 14:58:37
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -11,18 +11,24 @@
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="150px">
|
||||
label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
placeholder="请输入巡检单名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="巡检单编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="请输入巡检单编码" />
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
placeholder="请输入巡检单编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="部门"
|
||||
@ -51,13 +57,8 @@
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="巡检频率(天/次)" prop="checkPeriod">
|
||||
<el-input
|
||||
v-model="dataForm.checkPeriod"
|
||||
placeholder="请输入巡检频率(天/次)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
||||
<el-input
|
||||
@ -82,6 +83,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
||||
@ -93,14 +96,9 @@
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../../../core/mixins/basic-add';
|
||||
import {
|
||||
getCheckOrder,
|
||||
getOrderCode,
|
||||
createCheckOrder,
|
||||
updateCheckOrder,
|
||||
} from '@/api/equipment/base/inspection/settings';
|
||||
import { getCoreDepartmentList } from '@/api/base/coreDepartment';
|
||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
|
||||
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
|
||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||
import { getDictDataLabel } from '@/utils/dict';
|
||||
// import { getEquipmentAll } from '@/api/base/equipment'
|
||||
|
||||
@ -109,141 +107,118 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getOrderCode,
|
||||
isGetCode: true,
|
||||
codeURL: getOrderCode,
|
||||
createURL: createCheckOrder,
|
||||
updateURL: updateCheckOrder,
|
||||
infoURL: getCheckOrder,
|
||||
},
|
||||
dataForm: {
|
||||
id: null,
|
||||
id: null,
|
||||
code: null,
|
||||
name: null,
|
||||
departmentId: null,
|
||||
planCheckTime: null,
|
||||
confirmTimeLimit: null,
|
||||
groupClass: null,
|
||||
remark: null,
|
||||
checkPeriod: null
|
||||
remark: null
|
||||
},
|
||||
groupOptions: [],
|
||||
departmentOptions: [],
|
||||
dataRule: {
|
||||
confirmTimeLimit: [
|
||||
{ required: true, message: '确认时限不能为空', trigger: 'blur' },
|
||||
{ required: true, message: '确认时限不能为空', trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' },
|
||||
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' },
|
||||
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
planCheckTime: [
|
||||
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
checkPeriod: [
|
||||
{ required: true, message: '巡检频率不能为空', trigger: 'blur' },
|
||||
{
|
||||
type: 'number',
|
||||
message: '请输入正确的数字类型',
|
||||
trigger: 'blur',
|
||||
transform: (val) => Number(val),
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const currenttime = new Date();
|
||||
this.dataForm.planCheckTime = new Date(
|
||||
currenttime.getFullYear(),
|
||||
currenttime.getMonth(),
|
||||
currenttime.getDate(),
|
||||
8,
|
||||
0,
|
||||
0
|
||||
).getTime();
|
||||
const currenttime = new Date()
|
||||
this.dataForm.planCheckTime = new Date(currenttime.getFullYear(), currenttime.getMonth(), currenttime.getDate(), 8, 0, 0).getTime()
|
||||
console.log('11', this.dataForm.planCheckTime, currenttime)
|
||||
},
|
||||
mounted() {
|
||||
this.getDict();
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || '';
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr();
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
if (response.data?.groupClass === '') {
|
||||
this.dataForm.groupClass = [];
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data
|
||||
if (response.data.groupClass === '') {
|
||||
this.dataForm.groupClass = []
|
||||
} else {
|
||||
this.dataForm.groupClass =
|
||||
response.data?.groupClass?.split(',') || undefined;
|
||||
this.dataForm.groupClass = response.data?.groupClass.split(',') || undefined
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
async getDict() {
|
||||
// 部门列表
|
||||
const res = await getCoreDepartmentList();
|
||||
this.departmentOptions = res.data || [];
|
||||
const res1 = await groupClassesListAll();
|
||||
this.groupOptions =
|
||||
res1.data.map((item) => {
|
||||
item.label =
|
||||
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict);
|
||||
return item;
|
||||
}) || [];
|
||||
this.groupOptions = res1.data.map((item) => {
|
||||
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
|
||||
return item
|
||||
}) || [];
|
||||
// const res = await getEquipmentAll()
|
||||
// this.eqList = res.data
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions
|
||||
.updateURL({
|
||||
...this.dataForm,
|
||||
special: false,
|
||||
status: 0,
|
||||
groupClass: this.dataForm.groupClass?.join(','),
|
||||
})
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions
|
||||
.createURL({
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL({
|
||||
...this.dataForm,
|
||||
special: false,
|
||||
status: 0,
|
||||
groupClass: this.dataForm.groupClass?.join(','),
|
||||
})
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
});
|
||||
},
|
||||
groupClass: this.dataForm.groupClass.join(',')
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL({
|
||||
...this.dataForm,
|
||||
special: false,
|
||||
status: 0,
|
||||
groupClass: this.dataForm.groupClass.join(',')
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -37,7 +37,9 @@
|
||||
@close="cancel"
|
||||
@cancel="cancel"
|
||||
@confirm="handleConfirm">
|
||||
<add ref="add" @refreshDataList="successSubmit" />
|
||||
<add
|
||||
ref="add"
|
||||
@refreshDataList="successSubmit" />
|
||||
</base-dialog>
|
||||
<!-- 添加巡检,查看详情 -->
|
||||
<addOrUpdata
|
||||
@ -50,7 +52,7 @@
|
||||
<script>
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import addOrUpdata from './add-or-updata.vue';
|
||||
import add from './add.vue';
|
||||
import add from './add.vue'
|
||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||
// import { publicFormatter } from '@/utils/dict';
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
@ -69,14 +71,14 @@ export default {
|
||||
? {
|
||||
type: 'add',
|
||||
btnName: '添加',
|
||||
showTip: '添加巡检',
|
||||
}
|
||||
showTip: '添加巡检'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:check-setting:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
// this.$auth.hasPermi('equipment:check-setting:update')
|
||||
// ? {
|
||||
@ -88,44 +90,20 @@ export default {
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: '巡检单名称',
|
||||
width: 110,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '巡检单编码',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
|
||||
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'department', label: '部门', showOverflowtooltip: true },
|
||||
{
|
||||
prop: 'planCheckTime',
|
||||
label: '计划巡检时间',
|
||||
width: 150,
|
||||
filter: parseTime,
|
||||
},
|
||||
{
|
||||
prop: 'confirmTimeLimit',
|
||||
label: '确认时限',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{ prop: 'planCheckTime', label: '计划巡检时间', width: 150, filter: parseTime },
|
||||
{ prop: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
|
||||
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
||||
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
width: 150,
|
||||
filter: parseTime,
|
||||
},
|
||||
{ prop: 'createTime', label: '创建时间', width: 150, filter: parseTime },
|
||||
// { prop: 'responsible', label: '负责人' },
|
||||
{ prop: 'remark', label: '备注' }, // TODO: 操作 选项,四个,群里询问
|
||||
{ prop: 'remark', label: '备注' } // TODO: 操作 选项,四个,群里询问
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -158,7 +136,7 @@ export default {
|
||||
name: 'add',
|
||||
plain: true,
|
||||
color: 'success',
|
||||
},
|
||||
}
|
||||
// {
|
||||
// type: this.$auth.hasPermi('equipment:check-setting:export')
|
||||
// ? 'button'
|
||||
@ -199,11 +177,7 @@ export default {
|
||||
clearable: true,
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '设备名称不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
{ required: true, message: '设备名称不能为空', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -222,13 +196,13 @@ export default {
|
||||
equipmentId: null,
|
||||
name: null,
|
||||
special: false,
|
||||
status: 0,
|
||||
status: 0
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
basePath: '/base/equipment-check-order',
|
||||
mode: null,
|
||||
groupList: [],
|
||||
groupList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -238,12 +212,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleConfirm() {
|
||||
this.$refs.add.dataFormSubmit();
|
||||
},
|
||||
this.$refs.add.dataFormSubmit()
|
||||
},
|
||||
successSubmit() {
|
||||
this.cancel();
|
||||
this.getList();
|
||||
},
|
||||
this.cancel()
|
||||
this.getList()
|
||||
},
|
||||
initSearchBar() {
|
||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||
this.$set(
|
||||
@ -257,9 +231,9 @@ export default {
|
||||
});
|
||||
},
|
||||
getGroup() {
|
||||
groupClassesListAll().then((res) => {
|
||||
this.groupList = res.data || [];
|
||||
});
|
||||
groupClassesListAll().then(res => {
|
||||
this.groupList = res.data || []
|
||||
})
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
@ -273,9 +247,9 @@ export default {
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.$refs.add.formClear();
|
||||
this.$refs.add.formClear()
|
||||
this.open = false;
|
||||
this.title = '';
|
||||
this.title = ''
|
||||
// this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
|
@ -160,7 +160,6 @@ import Editor from "@/components/Editor";
|
||||
import { getDictDatas } from "@/utils/dict";
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import { getDictDataLabel } from '@/utils/dict';
|
||||
import tupleImg from '@/assets/images/tuple.png';
|
||||
|
||||
const uploadedFile = {
|
||||
name: 'UploadedFile',
|
||||
|
@ -29,7 +29,7 @@
|
||||
</el-col>
|
||||
|
||||
<!-- 产线名 -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产线名" prop="lineId">
|
||||
<el-select
|
||||
v-model="formFilters.lineId"
|
||||
@ -45,10 +45,10 @@
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
|
||||
<!-- 工段名 -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工段名" prop="sectionId">
|
||||
<el-select
|
||||
v-model="formFilters.sectionId"
|
||||
@ -64,7 +64,7 @@
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
|
||||
<!-- 设备名称 -->
|
||||
<el-col :span="8">
|
||||
@ -234,7 +234,7 @@
|
||||
v-for="opt in workerOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.label" />
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -597,9 +597,9 @@ export default {
|
||||
/** 设置默认维修工为用户自己 */
|
||||
setInitWorker() {
|
||||
/** 获取用户自身id */
|
||||
const nickname = this.$store.getters.nickname;
|
||||
const userId = this.$store.getters.userId;
|
||||
this.$nextTick(() => {
|
||||
this.form.repairman = [nickname];
|
||||
this.form.repairman = [userId];
|
||||
});
|
||||
},
|
||||
|
||||
@ -630,8 +630,8 @@ export default {
|
||||
/** 获取设备 */
|
||||
async initEquipment() {
|
||||
const response = await this.$axios('/base/core-equipment/listAll');
|
||||
this.equipmentList = response.data.filter(item => item.special === false) || [];
|
||||
this.equipmentOptions = response.data.filter(item => item.special === false) || [];
|
||||
this.equipmentList = response.data || [];
|
||||
this.equipmentOptions = response.data || [];
|
||||
// this.allSpeicalEquipments = equipmentOptions;
|
||||
},
|
||||
/** 获取维修工 - 同时从用户表和员工表拉取数据 */
|
||||
@ -737,7 +737,6 @@ export default {
|
||||
fileType: prop == 'files' ? 2 : 1,
|
||||
});
|
||||
this.$modal.msgSuccess('上传成功');
|
||||
console.log('为我', this.form.files)
|
||||
this.$emit('update', this.form);
|
||||
},
|
||||
|
||||
|
@ -60,7 +60,14 @@
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="包装要求" prop="packReq">
|
||||
<el-input v-model="form.packReq"></el-input>
|
||||
<el-select v-model="form.packReq" placeholder="请选择" style="width: 100%;" clearable>
|
||||
<el-option
|
||||
v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -120,7 +127,7 @@ export default {
|
||||
this.form.customerId = res.data.customerId
|
||||
this.form.planQuantity = res.data.planQuantity
|
||||
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
||||
this.form.packReq = res.data.packReq
|
||||
this.form.packReq = res.data.packReq ? res.data.packReq+'' : ''
|
||||
this.form.remark = res.data.remark
|
||||
setTimeout(() => {
|
||||
this.getSpecifications(this.form.planProductId)
|
||||
|
@ -125,7 +125,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'packReq',
|
||||
label: '包装要求',
|
||||
// filter: publicFormatter('pack_spec'),
|
||||
filter: publicFormatter('pack_spec'),
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
|
@ -51,16 +51,8 @@ export default {
|
||||
label: '用户名称',
|
||||
selectOptions: [],
|
||||
labelField: 'name',
|
||||
valueField: 'name',
|
||||
valueField: 'id',
|
||||
param: 'userName',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '用户昵称',
|
||||
selectOptions: [],
|
||||
labelField: 'name',
|
||||
valueField: 'name',
|
||||
param: 'nickName',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -151,16 +143,10 @@ export default {
|
||||
}).then((res) => {
|
||||
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
id: item.username,
|
||||
id: item.id,
|
||||
name:item.username
|
||||
}
|
||||
})
|
||||
this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
id: item.nickname,
|
||||
name: item.nickname
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getDataList() {
|
||||
@ -220,9 +206,7 @@ export default {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.userName = val.userName ? val.userName : undefined;
|
||||
this.listQuery.nickName = val.nickName ? val.nickName : undefined;
|
||||
|
||||
this.listQuery.inspectionDetContent = val.inspectionDetContent ? val.inspectionDetContent : undefined;
|
||||
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
||||
this.getDataList()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-08 13:46:17
|
||||
* @LastEditTime: 2024-03-01 15:22:06
|
||||
* @LastEditTime: 2024-01-22 15:29:53
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -80,9 +80,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量"
|
||||
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
|
||||
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
|
||||
style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue'
|
||||
v-model.number="dataForm.checkValueList[index].checkValue"
|
||||
<el-input :disabled="isdetail" style="width: 90%;margin-right: 10px;" :max="item.maxValue"
|
||||
:min='item.minValue' v-model="dataForm.checkValueList[index].checkValue"
|
||||
@change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input>
|
||||
<span v-if="dataForm.checkValueList[index].showIcon">
|
||||
<!-- <i class="el-icon-success"></i> -->
|
||||
@ -92,12 +91,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值"
|
||||
>
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值">
|
||||
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值"
|
||||
>
|
||||
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-03-01 10:33:48
|
||||
* @LastEditTime: 2024-02-28 09:58:34
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -130,7 +130,7 @@ export default {
|
||||
mounted() {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
// this.getCurrentTime()
|
||||
this.getCurrentTime()
|
||||
this.getWorksectionById()
|
||||
},
|
||||
methods: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-03-01 10:18:39
|
||||
* @LastEditTime: 2024-02-28 10:13:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -75,7 +75,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from './basic-add';
|
||||
import basicAdd from '../../../core/mixins/basic-add';
|
||||
import {
|
||||
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
||||
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
|
||||
@ -151,8 +151,8 @@ export default {
|
||||
// this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||
console.log(this.dataForm.logTime);
|
||||
},
|
||||
async getDict() {
|
||||
// 物料列表
|
||||
async getDict() {
|
||||
// 物料列表
|
||||
const res = await getList()
|
||||
this.typeList = res.data
|
||||
getWorkOrderList().then((res) => {
|
||||
@ -182,15 +182,16 @@ export default {
|
||||
getDetList().then((res) => {
|
||||
console.log(res);
|
||||
// console.log(response);
|
||||
this.detList = res.data.map((item) => {
|
||||
this.workOrderList = res.data.map((item) => {
|
||||
return {
|
||||
name: item.content,
|
||||
name: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
// console.log(this.formConfig[0].selectOptions);
|
||||
// this.listQuery.total = response.data.total;
|
||||
})
|
||||
|
||||
getTeamList().then((res) => {
|
||||
console.log(res);
|
||||
// console.log(response);
|
||||
@ -200,12 +201,29 @@ export default {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
this.$axios({
|
||||
url: '/base/core-workshop-section/listAll',
|
||||
method: 'get',
|
||||
// params: {
|
||||
// id: lineId,
|
||||
// },
|
||||
}).then((res) => {
|
||||
// console.log(data)
|
||||
this.sectionList = res.data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
})
|
||||
// if (code == 0) {
|
||||
|
||||
// }
|
||||
// console.log(this.formConfig[0].selectOptions);
|
||||
// this.listQuery.total = response.data.total;
|
||||
})
|
||||
},
|
||||
async getWorksectionById(lineId) {
|
||||
if (lineId) {
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/base/core-workshop-section/listByParentId',
|
||||
method: 'get',
|
||||
@ -222,24 +240,7 @@ export default {
|
||||
};
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$axios({
|
||||
url: '/base/core-workshop-section/listAll',
|
||||
method: 'get',
|
||||
// params: {
|
||||
// id: lineId,
|
||||
// },
|
||||
}).then((res) => {
|
||||
// console.log(data)
|
||||
this.sectionList = res.data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-03-01 10:27:29
|
||||
* @LastEditTime: 2024-02-23 09:16:24
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -124,8 +124,8 @@ export default {
|
||||
label: '工单',
|
||||
selectOptions: [],
|
||||
labelField: 'name',
|
||||
valueField: 'name',
|
||||
param: 'workOrderName'
|
||||
valueField: 'id',
|
||||
param: 'workOrderId'
|
||||
},
|
||||
// {
|
||||
// type: 'datePicker',
|
||||
@ -233,7 +233,7 @@ export default {
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
if (val.btnName === 'search') {
|
||||
this.listQuery.workOrderName = val.workOrderName ? val.workOrderName :undefined
|
||||
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId :undefined
|
||||
// this.queryParams.status = val.status
|
||||
// if (val.timeVal && val.timeVal.length != 0 ) {
|
||||
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-03-01 15:26:38
|
||||
* @LastEditTime: 2024-01-24 16:53:41
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -9,7 +9,7 @@
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item label="日" prop="reportTime">
|
||||
<el-date-picker v-model="dataForm.reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
|
@ -121,11 +121,6 @@ export default {
|
||||
showOverflowtooltip: true,
|
||||
filter: parseTime,
|
||||
},
|
||||
{
|
||||
prop: 'checkPeriod',
|
||||
label: '巡检频率(天/次)',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
width: 144,
|
||||
prop: 'confirmTimeLimit',
|
||||
|
@ -50,31 +50,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="巡检人" prop="checkPerson">
|
||||
<el-select
|
||||
v-model="dataForm.checkPerson"
|
||||
:placeholder="`请选择巡检人`"
|
||||
multiple
|
||||
clearable
|
||||
filterable>
|
||||
<el-option
|
||||
v-for="opt in inspectorOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="巡检时间" prop="planCheckTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planCheckTime"
|
||||
type="datetime"
|
||||
placeholder="请选择计划开始时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
||||
@ -96,9 +71,7 @@ export default {
|
||||
id: null,
|
||||
name: null,
|
||||
departmentId: null,
|
||||
groupClass: [],
|
||||
checkPerson: [],
|
||||
planCheckTime: null,
|
||||
groupClass: null,
|
||||
// special: true,
|
||||
},
|
||||
dataRule: {
|
||||
@ -109,7 +82,6 @@ export default {
|
||||
equipmentOptions: [],
|
||||
groupOptions: [],
|
||||
departmentOptions: [],
|
||||
inspectorOptions: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@ -121,9 +93,7 @@ export default {
|
||||
id: null,
|
||||
name: null,
|
||||
departmentId: null,
|
||||
groupClass: [],
|
||||
checkPerson: [],
|
||||
planCheckTime: null,
|
||||
groupClass: null,
|
||||
// special: true,
|
||||
};
|
||||
},
|
||||
@ -150,31 +120,6 @@ export default {
|
||||
value: item.id,
|
||||
}));
|
||||
}
|
||||
/** get user list and worker list */
|
||||
let inspectorList = [];
|
||||
const userlist = await this.$axios({
|
||||
url: '/system/user/page',
|
||||
params: { pageNo: 1, pageSize: 100 },
|
||||
});
|
||||
if (userlist.code == 0) {
|
||||
inspectorList = inspectorList.concat(
|
||||
(userlist.data?.list || []).map((item) => ({
|
||||
label: item.nickname,
|
||||
value: item.nickname,
|
||||
}))
|
||||
);
|
||||
}
|
||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
||||
if (workerlist.code == 0) {
|
||||
inspectorList = inspectorList.concat(
|
||||
workerlist.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.name,
|
||||
}))
|
||||
);
|
||||
}
|
||||
this.inspectorOptions = inspectorList;
|
||||
/** endget */
|
||||
this.formLoading = false;
|
||||
} catch (err) {
|
||||
this.formLoading = false;
|
||||
@ -184,8 +129,6 @@ export default {
|
||||
|
||||
async init(row) {
|
||||
if (!row || !row.id) {
|
||||
/** 新增 */
|
||||
this.dataForm.checkPerson = [this.$store.getters.nickname];
|
||||
return;
|
||||
}
|
||||
const res = await this.$axios({
|
||||
@ -233,7 +176,7 @@ export default {
|
||||
status: 1,
|
||||
// status: confirmed ? 2 : 1,
|
||||
groupClass: this.dataForm.groupClass?.join(','),
|
||||
checkPerson: this.dataForm.checkPerson?.join(','),
|
||||
checkPerson: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
if (res.code == 0) {
|
||||
|
@ -496,9 +496,6 @@ export default {
|
||||
this.form[key] = res.data[key];
|
||||
}
|
||||
});
|
||||
if (!res.data.checkPerson || res.data.checkPerson.trim() == '') {
|
||||
this.form.checkPerson = [this.$store.getters.nickname];
|
||||
}
|
||||
this.formLoading = false;
|
||||
}
|
||||
this.formLoading = false;
|
||||
@ -553,7 +550,7 @@ export default {
|
||||
inspectorList = inspectorList.concat(
|
||||
workerlist.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.name,
|
||||
value: item.id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'detail',
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
@ -257,15 +257,10 @@ export default {
|
||||
this.$message.warning('请选择待确认的巡检单');
|
||||
return;
|
||||
}
|
||||
//let checkPersonParam = '';
|
||||
//if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||
//}
|
||||
|
||||
const res = this.$axios({
|
||||
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
// +checkPersonParam,
|
||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||
const res = await this.$axios({
|
||||
url:
|
||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
||||
this.$store.getters.userId,
|
||||
method: 'put',
|
||||
data: this.$refs['check-order-list-table'].selectedOrder.map(
|
||||
(item) => item.id
|
||||
@ -306,11 +301,7 @@ export default {
|
||||
/** 按钮、选择权限 */
|
||||
checkConfirmPermission(row) {
|
||||
const isAdmin = false; // 后续再修改
|
||||
return (
|
||||
!row.confirmDueTime ||
|
||||
row.confirmDueTime >= new Date().getTime() ||
|
||||
isAdmin
|
||||
);
|
||||
return !row.confirmDueTime || row.confirmDueTime >= new Date().getTime() || isAdmin;
|
||||
},
|
||||
|
||||
/** 编辑 */
|
||||
@ -327,16 +318,10 @@ export default {
|
||||
this.$modal
|
||||
.confirm('是否确认巡检单"' + row.name + '"?')
|
||||
.then(() => {
|
||||
let checkPersonParam = '';
|
||||
if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||
/** 如有必要,更新巡检人 */
|
||||
checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||
}
|
||||
|
||||
return this.$axios({
|
||||
url:
|
||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
// + checkPersonParam,
|
||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
||||
this.$store.getters.nickname,
|
||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||
method: 'put',
|
||||
data: [id],
|
||||
|
@ -30,37 +30,37 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
<div style="">{{ form.name }}</div>
|
||||
{{ form.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="department">
|
||||
<div style="">{{ form.department }}</div>
|
||||
{{ form.department }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班次" prop="groupClass">
|
||||
<div style="">{{ form.groupClass || '---' }}</div>
|
||||
{{ form.groupClass }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巡检人" prop="checkPerson">
|
||||
<div style="">{{ form.checkPerson || '---' }}</div>
|
||||
{{ form.checkPerson }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="巡检时间" prop="planCheckTime">
|
||||
<div style="">{{ form.planCheckTime | parseTime }}</div>
|
||||
{{ form.planCheckTime | parseTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认人" prop="confirmPerson">
|
||||
<div style="">{{ form.confirmPerson || '---' }}</div>
|
||||
{{ form.confirmPerson }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -15,35 +15,21 @@
|
||||
v-loading="formLoading"
|
||||
label-position="top">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-col>
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col>
|
||||
<el-form-item label="巡检单编码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="请输入巡检单编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划巡检时间" prop="planCheckTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planCheckTime"
|
||||
type="datetime"
|
||||
:placeholder="`请选择计划巡检时间`"
|
||||
value-format="timestamp" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="巡检频率(天/次)" prop="checkPeriod">
|
||||
<el-input
|
||||
v-model="dataForm.checkPeriod"
|
||||
placeholder="请输入巡检频率(天/次)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门" prop="departmentId">
|
||||
<el-col>
|
||||
<el-form-item
|
||||
label="部门"
|
||||
prop="departmentId"
|
||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="dataForm.departmentId"
|
||||
:placeholder="`请选择部门`">
|
||||
@ -55,6 +41,27 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="计划巡检时间" prop="planCheckTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planCheckTime"
|
||||
type="datetime"
|
||||
:placeholder="`请选择计划巡检时间`"
|
||||
value-format="timestamp" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
||||
<el-input
|
||||
v-model="dataForm.confirmTimeLimit"
|
||||
:placeholder="`请输入确认时限`" />
|
||||
<!-- <el-date-picker
|
||||
v-model="dataForm.confirmTimeLimit"
|
||||
type="datetime"
|
||||
:placeholder="`请选择确认时限`"
|
||||
value-format="timestamp" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班次" prop="groupClass">
|
||||
<el-select
|
||||
@ -72,20 +79,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
||||
<el-input
|
||||
v-model="dataForm.confirmTimeLimit"
|
||||
:placeholder="`请输入确认时限`" />
|
||||
<!-- <el-date-picker
|
||||
v-model="dataForm.confirmTimeLimit"
|
||||
type="datetime"
|
||||
:placeholder="`请选择确认时限`"
|
||||
value-format="timestamp" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
||||
@ -132,15 +125,6 @@ export default {
|
||||
planCheckTime: [
|
||||
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' },
|
||||
],
|
||||
checkPeriod: [
|
||||
{ required: true, message: '巡检频率不能为空', trigger: 'blur' },
|
||||
{
|
||||
type: 'number',
|
||||
message: '请输入正确的数字类型',
|
||||
trigger: 'blur',
|
||||
transform: (val) => Number(val),
|
||||
},
|
||||
],
|
||||
},
|
||||
equipmentOptions: [],
|
||||
groupOptions: [],
|
||||
@ -161,7 +145,6 @@ export default {
|
||||
confirmTimeLimit: null,
|
||||
groupClass: null,
|
||||
remark: null,
|
||||
checkPeriod: null
|
||||
// special: true,
|
||||
};
|
||||
},
|
||||
|
@ -123,7 +123,7 @@
|
||||
type: 'number',
|
||||
message: '请输入正确的数字',
|
||||
trigger: 'blur',
|
||||
transform: (val) => Number(val) && parseInt(val) === Number(val),
|
||||
transform: (val) => Number(val),
|
||||
},
|
||||
{ required: true, message: '保养频率不能为空', trigger: 'blur' },
|
||||
]">
|
||||
|
@ -409,8 +409,7 @@ const uploadedFile = {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
handleDelete(e) {
|
||||
e.stopPropagation();
|
||||
handleDelete() {
|
||||
this.$emit('delete', this.file);
|
||||
},
|
||||
async handleDownload() {
|
||||
@ -611,8 +610,7 @@ export default {
|
||||
const response = await this.$axios('/base/core-equipment/listAll');
|
||||
this.equipmentList = response.data || [];
|
||||
const equipmentOptions = (response.data || [])
|
||||
// .filter((item) => (type == 'special-equipment' ? item.special : true))
|
||||
.filter((item) => item.special == true)
|
||||
.filter((item) => (type == 'special-equipment' ? item.special : true))
|
||||
.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
|
Loading…
Reference in New Issue
Block a user