@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ktg-mes-ui",
|
||||
"version": "3.8.2",
|
||||
"description": "苦糖果MES",
|
||||
"description": "智造大师",
|
||||
"author": "YinJinLu",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
53
src/api/ownerContract.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 机构合同基本信息新增
|
||||
export function addOwnerContBase(data) {
|
||||
return request({
|
||||
url: `/owner/contract/addOwnerContBase`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 机构合同基本信息修改
|
||||
export function modifyOwnerContBaseById(data) {
|
||||
return request({
|
||||
url: `/updateOrganInfo`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据ID查看合同基本信息详情
|
||||
export function findOwnById(id) {
|
||||
return request({
|
||||
url: `/owner/contract/findById/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据ID查看合同基本信息详情
|
||||
export function findByOrganId(organId) {
|
||||
return request({
|
||||
url: `/owner/contract/findByOrganId/${organId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取登录用户机构信息
|
||||
export function getOrganInfo(params) {
|
||||
return request({
|
||||
url: `/getOrganInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function updateLogoImg(params) {
|
||||
return request({
|
||||
url: ``,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
BIN
src/assets/font/Ayuthaya.ttf
Normal file
7
src/assets/font/font.css
Normal file
@ -0,0 +1,7 @@
|
||||
/* // 这是 font.css 可设置多种字体; */
|
||||
/* // 注意:font-family: 'XXX'; 将字体名字自定义为 XXX,使用时要用这个名字 */
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ayuthaya';
|
||||
src: url('./Ayuthaya.ttf');
|
||||
}
|
BIN
src/assets/images/close.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
src/assets/images/fuwei-02.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.6 KiB |
BIN
src/assets/images/machine.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
src/assets/images/open.png
Normal file
After Width: | Height: | Size: 209 B |
BIN
src/assets/images/robotic.png
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
src/assets/images/shangdian.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/images/weishangdian.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
@ -130,7 +130,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -1,14 +1,41 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
<hamburger
|
||||
id="hamburger-container"
|
||||
:is-active="sidebar.opened"
|
||||
class="hamburger-container"
|
||||
@toggleClick="toggleSideBar"
|
||||
/>
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
<breadcrumb
|
||||
id="breadcrumb-container"
|
||||
class="breadcrumb-container"
|
||||
v-if="!topNav"
|
||||
/>
|
||||
|
||||
<!--图片-->
|
||||
<div
|
||||
style="
|
||||
display: inline-block;
|
||||
width: 66%;
|
||||
margin-left: 30px;
|
||||
line-height: 40px;
|
||||
"
|
||||
>
|
||||
<!--<el-image src="/images/logo.png" style="width:100%;height:40px"></el-image>-->
|
||||
<el-image
|
||||
v-show="this.companyImg != null || this.companyImg !=''"
|
||||
:src="this.companyImg"
|
||||
style="width: 100%; height: 46px"
|
||||
></el-image>
|
||||
</div>
|
||||
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<template v-if="device !== 'mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
|
||||
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
|
||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
@ -22,12 +49,14 @@
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
</template>
|
||||
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<el-dropdown
|
||||
class="avatar-container right-menu-item hover-effect"
|
||||
trigger="click"
|
||||
>
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar">
|
||||
<img :src="avatar" class="user-avatar" />
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@ -47,15 +76,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import RuoYiGit from '@/components/RuoYi/Git'
|
||||
import RuoYiDoc from '@/components/RuoYi/Doc'
|
||||
import { mapGetters } from "vuex";
|
||||
import Breadcrumb from "@/components/Breadcrumb";
|
||||
import TopNav from "@/components/TopNav";
|
||||
import Hamburger from "@/components/Hamburger";
|
||||
import Screenfull from "@/components/Screenfull";
|
||||
import SizeSelect from "@/components/SizeSelect";
|
||||
import Search from "@/components/HeaderSearch";
|
||||
import RuoYiGit from "@/components/RuoYi/Git";
|
||||
import RuoYiDoc from "@/components/RuoYi/Doc";
|
||||
|
||||
import * as ownerServer from "@/api/ownerContract";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -66,48 +97,63 @@ export default {
|
||||
SizeSelect,
|
||||
Search,
|
||||
RuoYiGit,
|
||||
RuoYiDoc
|
||||
RuoYiDoc,
|
||||
},
|
||||
created() {
|
||||
this.getOwnInfo();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
companyImg: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'device'
|
||||
]),
|
||||
...mapGetters(["sidebar", "avatar", "device"]),
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
return this.$store.state.settings.showSettings;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'showSettings',
|
||||
value: val
|
||||
})
|
||||
}
|
||||
this.$store.dispatch("settings/changeSetting", {
|
||||
key: "showSettings",
|
||||
value: val,
|
||||
});
|
||||
},
|
||||
},
|
||||
topNav: {
|
||||
get() {
|
||||
return this.$store.state.settings.topNav
|
||||
}
|
||||
}
|
||||
return this.$store.state.settings.topNav;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
this.$store.dispatch("app/toggleSideBar");
|
||||
},
|
||||
getOwnInfo() {
|
||||
ownerServer.getOrganInfo().then((res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
this.companyImg = res.data.picture;
|
||||
console.log(companyImg);
|
||||
this.isEdit = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
this.$confirm("确定注销并退出系统吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$store.dispatch("LogOut").then(() => {
|
||||
location.href = "/index";
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -116,18 +162,18 @@ export default {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
transition: background 0.3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,10 +210,10 @@ export default {
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
transition: background 0.3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,13 @@ import DictData from '@/components/DictData'
|
||||
import webSite from '@/config/website'
|
||||
Vue.prototype.website = webSite
|
||||
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css' // 默认主题
|
||||
|
||||
//全局修改默认配置,点击空白处不能关闭弹窗
|
||||
ElementUI.Dialog.props.closeOnClickModal.default = false
|
||||
Vue.use(ElementUI)
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
|
@ -260,3 +260,8 @@ export default new Router({
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes,
|
||||
});
|
||||
|
||||
export function resetRouter() {
|
||||
const newRouter = createRouter()
|
||||
Router.matcher = newRouter.matcher // 重制 router
|
||||
}
|
||||
|
19
src/store/modules/companyImg.js
Normal file
@ -0,0 +1,19 @@
|
||||
const state = {
|
||||
companyImg:localStorage.getItem("logo"),
|
||||
isLogo:false
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
SET_LOGO(state,img){
|
||||
state.companyImg = img
|
||||
},
|
||||
SET_IS_LOGO(state,isLogo) {
|
||||
state.isLogo = isLogo;
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
}
|
@ -17,7 +17,7 @@ const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 30000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
519
src/views/abnormalityAlarm/AGValarm/abnormalAGV.vue
Normal file
@ -0,0 +1,519 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="" prop="subjectCode">
|
||||
<el-input
|
||||
v-model="queryParams.subjectCode"
|
||||
placeholder="请输入设备编码/名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="异常报警类型" label-width="100px" prop="subjectType">
|
||||
<el-select
|
||||
v-model="queryParams.subjectType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_alarm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="处理状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusArr"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col style="width: 90%">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:dv:dvsubject:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dvsubjectList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:header-cell-style="{
|
||||
background: '#eef1f6',
|
||||
color: '#606266',
|
||||
'text-align': 'center',
|
||||
}"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
align="center"
|
||||
prop="machineryCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="machineryName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备类别"
|
||||
align="center"
|
||||
prop="machineryTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警类型"
|
||||
align="center"
|
||||
prop="warnType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警内容"
|
||||
align="center"
|
||||
prop="message"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警时间"
|
||||
align="center"
|
||||
prop="warnTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="处理状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span class="el-table-column-span" v-if="scope.row.status == '0'"
|
||||
>未处理</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '1'"
|
||||
>已处理未解决</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '2'"
|
||||
>已处理已完成</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleExportArr(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:edit']"
|
||||
>处理</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:remove']"
|
||||
>置顶</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
center
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="abnormal" label="设备是否异常:">
|
||||
<el-radio-group v-model="form.abnormal">
|
||||
<el-radio :label="1">异常</el-radio>
|
||||
<el-radio :label="2">无异常</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="status" label="是否解决:">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">已解决</el-radio>
|
||||
<el-radio :label="2">未解决</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 置顶 -->
|
||||
<el-dialog
|
||||
title="置顶"
|
||||
:visible.sync="openTop"
|
||||
center
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="top" label="设备是否异常:">
|
||||
<el-radio-group v-model="form.top">
|
||||
<el-radio :label="0">不置顶</el-radio>
|
||||
<el-radio :label="1">置顶</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleForm">确 定</el-button>
|
||||
<el-button @click="openopenTop">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openQuery"
|
||||
center
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="formQuery" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="设备编码:">
|
||||
{{ formQuery.machineryCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="设备名称:">
|
||||
{{ formQuery.machineryName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="设备类型:">
|
||||
{{ formQuery.machineryTypeName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="异常报警类型:">
|
||||
{{ formQuery.warnType }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="异常报警内容:">
|
||||
{{ formQuery.message }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="异常报警时间:">
|
||||
{{ formQuery.warnTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancelQuery">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list, edit } from "@/api/abnormalityAlarm/machineTool";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
// name: "Dvsubject",
|
||||
dicts: ["sys_yes_no", "mes_alarm_type"],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
autoGenFlag: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组s
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查看
|
||||
openQuery: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
// 查看
|
||||
formQuery: {},
|
||||
//置顶弹框
|
||||
openTop: false,
|
||||
|
||||
statusArr: [
|
||||
{
|
||||
label: "未处理",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已处理未解决",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "已处理已完成",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
abnormal: [
|
||||
{ required: true, message: "设备是否异常不能为空", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "是否解决不能为空", trigger: "blur" },
|
||||
],
|
||||
top: [{ required: true, message: "是否置顶不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检保养项目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
console.log(response);
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮
|
||||
cancelQuery() {
|
||||
this.openQuery = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
openopenTop() {
|
||||
this.openTop = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
};
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.codeId);
|
||||
console.log(this.ids);
|
||||
|
||||
this.queryParams.ids = this.ids.join(",");
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 查看 **/
|
||||
handleExportArr(row) {
|
||||
console.log(row);
|
||||
this.formQuery = row;
|
||||
this.openQuery = true;
|
||||
this.title = "查看";
|
||||
},
|
||||
/** 处理 */
|
||||
handleUpdate(row) {
|
||||
console.log(row);
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "处理";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
title: "处理成功",
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 置顶操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
this.reset();
|
||||
this.openTop = true;
|
||||
},
|
||||
|
||||
/** 置顶提交按钮 */
|
||||
handleForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
title: "处理成功",
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/cad/code/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`calplan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-card .el-card__header {
|
||||
padding: 10px 20px;
|
||||
background: #f3f2f2;
|
||||
}
|
||||
::v-deep .el-table {
|
||||
.cell {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
366
src/views/abnormalityAlarm/AGValarm/historicalAGV.vue
Normal file
@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="" prop="subjectCode">
|
||||
<el-input
|
||||
v-model="queryParams.subjectCode"
|
||||
placeholder="请输入设备编码/名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="异常报警类型" label-width="100px" prop="subjectType">
|
||||
<el-select
|
||||
v-model="queryParams.subjectType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_alarm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col style="width: 90%">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:dv:dvsubject:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dvsubjectList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:header-cell-style="{
|
||||
background: '#eef1f6',
|
||||
color: '#606266',
|
||||
'text-align': 'center',
|
||||
}"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
align="center"
|
||||
prop="machineryCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="machineryName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备类别"
|
||||
align="center"
|
||||
prop="machineryTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警类型"
|
||||
align="center"
|
||||
prop="warnType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警内容"
|
||||
align="center"
|
||||
prop="message"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警时间"
|
||||
align="center"
|
||||
prop="warnTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="处理状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span class="el-table-column-span" v-if="scope.row.status == '0'"
|
||||
>未处理</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '1'"
|
||||
>已处理未解决</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '2'"
|
||||
>已处理已完成</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleExportArr(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 查看 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openQuery"
|
||||
center
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="formQuery" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备编码:">
|
||||
{{ formQuery.machineryCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备名称:">
|
||||
{{ formQuery.machineryName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备类型:">
|
||||
{{ formQuery.machineryTypeName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警类型:">
|
||||
{{ formQuery.warnType }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警内容:">
|
||||
{{ formQuery.message }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警时间:">
|
||||
{{ formQuery.warnTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancelQuery">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list, edit } from "@/api/abnormalityAlarm/machineTool";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
// name: "Dvsubject",
|
||||
dicts: ["sys_yes_no", "mes_alarm_type"],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
autoGenFlag: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组s
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 查看
|
||||
openQuery: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
// 查看
|
||||
formQuery: {},
|
||||
|
||||
statusArr: [
|
||||
{
|
||||
label: "未处理",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已处理未解决",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "已处理已完成",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
abnormal: [
|
||||
{ required: true, message: "设备是否异常不能为空", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "是否解决不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检保养项目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
console.log(response);
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancelQuery() {
|
||||
this.openQuery = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
};
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.codeId);
|
||||
console.log(this.ids);
|
||||
|
||||
this.queryParams.ids = this.ids.join(",");
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 查看 **/
|
||||
handleExportArr(row) {
|
||||
console.log(row);
|
||||
this.formQuery = row;
|
||||
this.openQuery = true;
|
||||
this.title = "查看";
|
||||
},
|
||||
/** 置顶操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/cad/code/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`calplan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-card .el-card__header {
|
||||
padding: 10px 20px;
|
||||
background: #f3f2f2;
|
||||
}
|
||||
::v-deep .el-table {
|
||||
.cell {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
41
src/views/abnormalityAlarm/AGValarm/index.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 切换 -->
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="异常报警" name="1">
|
||||
<abnormalAGV />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="历史异常报警" name="2">
|
||||
<historicalAGV />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import abnormalAGV from "./abnormalAGV.vue";
|
||||
import historicalAGV from "./historicalAGV.vue";
|
||||
|
||||
export default {
|
||||
components: { abnormalAGV, historicalAGV },
|
||||
data() {
|
||||
return {
|
||||
//默认tab切换为1
|
||||
activeName: "1",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//点击tab切换
|
||||
handleClick() {
|
||||
this.activeName = "2";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
@ -221,6 +221,32 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 置顶 -->
|
||||
<el-dialog
|
||||
title="置顶"
|
||||
:visible.sync="openTop"
|
||||
center
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="top" label="设备是否异常:">
|
||||
<el-radio-group v-model="form.top">
|
||||
<el-radio :label="0">不置顶</el-radio>
|
||||
<el-radio :label="1">置顶</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleForm">确 定</el-button>
|
||||
<el-button @click="openopenTop">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -232,36 +258,36 @@
|
||||
<el-form ref="form" :model="formQuery" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备编码:">
|
||||
<el-form-item prop="" label="设备编码:">
|
||||
{{ formQuery.machineryCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备名称:">
|
||||
<el-form-item prop="" label="设备名称:">
|
||||
{{ formQuery.machineryName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备类型:">
|
||||
<el-form-item prop="" label="设备类型:">
|
||||
{{ formQuery.machineryTypeName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警类型:">
|
||||
<el-form-item prop="" label="异常报警类型:">
|
||||
{{ formQuery.warnType }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警内容:">
|
||||
<el-form-item prop="" label="异常报警内容:">
|
||||
{{ formQuery.message }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警时间:">
|
||||
<el-form-item prop="" label="异常报警时间:">
|
||||
{{ formQuery.warnTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -299,26 +325,7 @@ export default {
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [
|
||||
{
|
||||
machineryCode: 1,
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
{
|
||||
machineryCode: 2,
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
{
|
||||
machineryCode: 3,
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
],
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -329,7 +336,6 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
status: 1,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
@ -339,6 +345,8 @@ export default {
|
||||
},
|
||||
// 查看
|
||||
formQuery: {},
|
||||
//置顶弹框
|
||||
openTop: false,
|
||||
|
||||
statusArr: [
|
||||
{
|
||||
@ -362,6 +370,7 @@ export default {
|
||||
status: [
|
||||
{ required: true, message: "是否解决不能为空", trigger: "blur" },
|
||||
],
|
||||
top: [{ required: true, message: "是否置顶不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -374,7 +383,7 @@ export default {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
console.log(response);
|
||||
// this.dvsubjectList = response.rows;
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -389,14 +398,19 @@ export default {
|
||||
this.openQuery = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
openopenTop() {
|
||||
this.openTop = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -435,35 +449,56 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
// this.$refs["form"].validate((valid) => {
|
||||
// if (valid) {
|
||||
// edit(this.form).then((response) => {
|
||||
// if (response.code === 200) {
|
||||
// this.$notify({
|
||||
// title: "处理成功",
|
||||
// message: response.msg,
|
||||
// type: "success",
|
||||
// });
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
title: "处理成功",
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 置顶操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
this.reset();
|
||||
this.openTop = true;
|
||||
},
|
||||
|
||||
/** 置顶提交按钮 */
|
||||
handleForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
title: "处理成功",
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download(
|
||||
// "/cad/code/export",
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// },
|
||||
// `calplan_${new Date().getTime()}.xlsx`
|
||||
// );
|
||||
this.download(
|
||||
"/cad/code/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`calplan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -233,26 +233,7 @@ export default {
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [
|
||||
{
|
||||
machineryCode: 1,
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
{
|
||||
machineryCode: 2,
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
{
|
||||
machineryCode: 3,
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
],
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 查看
|
||||
@ -305,7 +286,7 @@ export default {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
console.log(response);
|
||||
// this.dvsubjectList = response.rows;
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@ -322,7 +303,7 @@ export default {
|
||||
status: "",
|
||||
top: 0,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -358,13 +339,13 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download(
|
||||
// "/cad/code/export",
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// },
|
||||
// `calplan_${new Date().getTime()}.xlsx`
|
||||
// );
|
||||
this.download(
|
||||
"/cad/code/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`calplan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
366
src/views/abnormalityAlarm/robotic/historicalAlarm.vue
Normal file
@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="" prop="subjectCode">
|
||||
<el-input
|
||||
v-model="queryParams.subjectCode"
|
||||
placeholder="请输入设备编码/名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="异常报警类型" label-width="100px" prop="subjectType">
|
||||
<el-select
|
||||
v-model="queryParams.subjectType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_alarm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col style="width: 90%">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:dv:dvsubject:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dvsubjectList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:header-cell-style="{
|
||||
background: '#eef1f6',
|
||||
color: '#606266',
|
||||
'text-align': 'center',
|
||||
}"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
align="center"
|
||||
prop="machineryCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="machineryName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备类别"
|
||||
align="center"
|
||||
prop="machineryTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警类型"
|
||||
align="center"
|
||||
prop="warnType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警内容"
|
||||
align="center"
|
||||
prop="message"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警时间"
|
||||
align="center"
|
||||
prop="warnTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="处理状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span class="el-table-column-span" v-if="scope.row.status == '0'"
|
||||
>未处理</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '1'"
|
||||
>已处理未解决</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '2'"
|
||||
>已处理已完成</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleExportArr(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 查看 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openQuery"
|
||||
center
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="formQuery" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备编码:">
|
||||
{{ formQuery.machineryCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备名称:">
|
||||
{{ formQuery.machineryName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="设备类型:">
|
||||
{{ formQuery.machineryTypeName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警类型:">
|
||||
{{ formQuery.warnType }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警内容:">
|
||||
{{ formQuery.message }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="abnormal" label="异常报警时间:">
|
||||
{{ formQuery.warnTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancelQuery">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list, edit } from "@/api/abnormalityAlarm/machineTool";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
// name: "Dvsubject",
|
||||
dicts: ["sys_yes_no", "mes_alarm_type"],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
autoGenFlag: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组s
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 查看
|
||||
openQuery: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
// 查看
|
||||
formQuery: {},
|
||||
|
||||
statusArr: [
|
||||
{
|
||||
label: "未处理",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已处理未解决",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "已处理已完成",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
abnormal: [
|
||||
{ required: true, message: "设备是否异常不能为空", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "是否解决不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检保养项目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
console.log(response);
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancelQuery() {
|
||||
this.openQuery = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
};
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.codeId);
|
||||
console.log(this.ids);
|
||||
|
||||
this.queryParams.ids = this.ids.join(",");
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 查看 **/
|
||||
handleExportArr(row) {
|
||||
console.log(row);
|
||||
this.formQuery = row;
|
||||
this.openQuery = true;
|
||||
this.title = "查看";
|
||||
},
|
||||
/** 置顶操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/cad/code/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`calplan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-card .el-card__header {
|
||||
padding: 10px 20px;
|
||||
background: #f3f2f2;
|
||||
}
|
||||
::v-deep .el-table {
|
||||
.cell {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
41
src/views/abnormalityAlarm/robotic/index.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 切换 -->
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="异常报警" name="1">
|
||||
<roboticAlarm />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="历史异常报警" name="2">
|
||||
<historicalAlarm />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import roboticAlarm from "./roboticAlarm.vue";
|
||||
import historicalAlarm from "./historicalAlarm.vue";
|
||||
|
||||
export default {
|
||||
components: { roboticAlarm, historicalAlarm },
|
||||
data() {
|
||||
return {
|
||||
//默认tab切换为1
|
||||
activeName: "1",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//点击tab切换
|
||||
handleClick() {
|
||||
this.activeName = "2";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
519
src/views/abnormalityAlarm/robotic/roboticAlarm.vue
Normal file
@ -0,0 +1,519 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="" prop="subjectCode">
|
||||
<el-input
|
||||
v-model="queryParams.subjectCode"
|
||||
placeholder="请输入设备编码/名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="异常报警类型" label-width="100px" prop="subjectType">
|
||||
<el-select
|
||||
v-model="queryParams.subjectType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_alarm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="处理状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in statusArr"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col style="width: 90%">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:dv:dvsubject:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dvsubjectList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:header-cell-style="{
|
||||
background: '#eef1f6',
|
||||
color: '#606266',
|
||||
'text-align': 'center',
|
||||
}"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
align="center"
|
||||
prop="machineryCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="machineryName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备类别"
|
||||
align="center"
|
||||
prop="machineryTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警类型"
|
||||
align="center"
|
||||
prop="warnType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警内容"
|
||||
align="center"
|
||||
prop="message"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="异常报警时间"
|
||||
align="center"
|
||||
prop="warnTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="处理状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span class="el-table-column-span" v-if="scope.row.status == '0'"
|
||||
>未处理</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '1'"
|
||||
>已处理未解决</span
|
||||
>
|
||||
<span class="el-table-column-span-1" v-if="scope.row.status == '2'"
|
||||
>已处理已完成</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleExportArr(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:edit']"
|
||||
>处理</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:dv:dvsubject:remove']"
|
||||
>置顶</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
center
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="abnormal" label="设备是否异常:">
|
||||
<el-radio-group v-model="form.abnormal">
|
||||
<el-radio :label="1">异常</el-radio>
|
||||
<el-radio :label="2">无异常</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="status" label="是否解决:">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">已解决</el-radio>
|
||||
<el-radio :label="2">未解决</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 置顶 -->
|
||||
<el-dialog
|
||||
title="置顶"
|
||||
:visible.sync="openTop"
|
||||
center
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="top" label="设备是否异常:">
|
||||
<el-radio-group v-model="form.top">
|
||||
<el-radio :label="0">不置顶</el-radio>
|
||||
<el-radio :label="1">置顶</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleForm">确 定</el-button>
|
||||
<el-button @click="openopenTop">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openQuery"
|
||||
center
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="formQuery" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="设备编码:">
|
||||
{{ formQuery.machineryCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="设备名称:">
|
||||
{{ formQuery.machineryName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="设备类型:">
|
||||
{{ formQuery.machineryTypeName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="异常报警类型:">
|
||||
{{ formQuery.warnType }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="异常报警内容:">
|
||||
{{ formQuery.message }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="" label="异常报警时间:">
|
||||
{{ formQuery.warnTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancelQuery">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { list, edit } from "@/api/abnormalityAlarm/machineTool";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
// name: "Dvsubject",
|
||||
dicts: ["sys_yes_no", "mes_alarm_type"],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
autoGenFlag: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组s
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查看
|
||||
openQuery: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
top: 0,
|
||||
},
|
||||
// 查看
|
||||
formQuery: {},
|
||||
//置顶弹框
|
||||
openTop: false,
|
||||
|
||||
statusArr: [
|
||||
{
|
||||
label: "未处理",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已处理未解决",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "已处理已完成",
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
abnormal: [
|
||||
{ required: true, message: "设备是否异常不能为空", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "是否解决不能为空", trigger: "blur" },
|
||||
],
|
||||
top: [{ required: true, message: "是否置顶不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检保养项目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
console.log(response);
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮
|
||||
cancelQuery() {
|
||||
this.openQuery = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
openopenTop() {
|
||||
this.openTop = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
abnormal: 1,
|
||||
status: "",
|
||||
};
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.codeId);
|
||||
console.log(this.ids);
|
||||
|
||||
this.queryParams.ids = this.ids.join(",");
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 查看 **/
|
||||
handleExportArr(row) {
|
||||
console.log(row);
|
||||
this.formQuery = row;
|
||||
this.openQuery = true;
|
||||
this.title = "查看";
|
||||
},
|
||||
/** 处理 */
|
||||
handleUpdate(row) {
|
||||
console.log(row);
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "处理";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
title: "处理成功",
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 置顶操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
this.reset();
|
||||
this.openTop = true;
|
||||
},
|
||||
|
||||
/** 置顶提交按钮 */
|
||||
handleForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
title: "处理成功",
|
||||
message: response.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/cad/code/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`calplan_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-card .el-card__header {
|
||||
padding: 10px 20px;
|
||||
background: #f3f2f2;
|
||||
}
|
||||
::v-deep .el-table {
|
||||
.cell {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -238,7 +238,7 @@ export default {
|
||||
// // 选中的人员
|
||||
// nowList: [],
|
||||
// 最终选中传给父组件的人员
|
||||
selectList: this.inputValue,
|
||||
selectList: [],
|
||||
// isshow=1,是单选,2是多选
|
||||
isshow: 2,
|
||||
// 遮罩层
|
||||
@ -275,14 +275,14 @@ export default {
|
||||
this.$nextTick(() => {});
|
||||
},
|
||||
mounted() {
|
||||
// this.$nextTick(() => {
|
||||
// this.inputValue.forEach((item) => {
|
||||
// this.selectList.push(item);
|
||||
// });
|
||||
// if (this.show) {
|
||||
// this.isshow = this.show;
|
||||
// }
|
||||
// });
|
||||
this.$nextTick(() => {
|
||||
this.inputValue.forEach((item) => {
|
||||
this.selectList.push(item);
|
||||
});
|
||||
// if (this.show) {
|
||||
// this.isshow = this.show;
|
||||
// }
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
user() {
|
||||
@ -394,7 +394,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.$emit("getSelectList", this.selectList);
|
||||
},
|
||||
//表格全选事件
|
||||
@ -417,7 +416,6 @@ export default {
|
||||
this.selectList.splice(this.selectList.indexOf(item), 1);
|
||||
});
|
||||
}
|
||||
|
||||
this.submit();
|
||||
},
|
||||
submit() {
|
||||
|
721
src/views/deviceConsole/machine/index.vue
Normal file
@ -0,0 +1,721 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple">
|
||||
<div class="grid-content three" style="height: 750px">
|
||||
<!-- 选择设备 -->
|
||||
<el-container style="padding: 0">
|
||||
<el-header
|
||||
class="smallHeader"
|
||||
style="height: 40px; line-height: 40px"
|
||||
>选择设备
|
||||
</el-header>
|
||||
<el-main class="smallmain tableBox">
|
||||
<p v-if="intelligent.length == 0" class="nodata">暂无数据</p>
|
||||
<div class="tagBox" v-else>
|
||||
<el-button
|
||||
style="width: 100%"
|
||||
v-for="item in intelligent"
|
||||
:key="item"
|
||||
@click="handleClose(item)"
|
||||
>{{ item.machineryName }}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="18" class="myfont"
|
||||
><div class="content">
|
||||
<div style="height: 100px">
|
||||
<div style="width: 31px; margin-left: 9%">
|
||||
<el-image
|
||||
v-if="imgdata"
|
||||
:src="img"
|
||||
style="margin-top: 25px"
|
||||
></el-image>
|
||||
<el-image v-else :src="imgs" style="margin-top: 25px"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 440px">
|
||||
<div style="height: 105px">
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 22%">
|
||||
{{ intelligentData.feedSpeed }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 25%">
|
||||
{{ intelligentData.spindleSpeed }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 6px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 22%">
|
||||
{{ intelligentData.rapidOverride }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 25%">
|
||||
{{ intelligentData.spindle }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 7px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 22%">
|
||||
{{ intelligentData.feedRate }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 25%">
|
||||
{{ intelligentData.handWheel }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div style="height: 158px">
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.relativeX }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.machineX }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 10px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.relativeY }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.machineY }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 15px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.relativeZ }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.machineZ }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 12px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.relativeA }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.machineA }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.absoluteX }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.residualX }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 10px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.absoluteY }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.residualY }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 15px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.absoluteZ }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.residualZ }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-top: 12px; height: 18px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 60%">
|
||||
{{ intelligentData.absoluteA }}
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 65%">
|
||||
{{ intelligentData.residualA }}
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 350px">
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-bottom: 15px; height: 50px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 40%">
|
||||
<!-- {{1}} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 20%"
|
||||
>
|
||||
<!-- {{ 2 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 35%">
|
||||
<!-- {{ 3 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 8%"
|
||||
>
|
||||
<!-- {{ 4 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-bottom: 15px; height: 50px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 40%">
|
||||
<!-- {{ 1 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 20%"
|
||||
>
|
||||
<!-- {{ 2 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 35%">
|
||||
<!-- {{ 3 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 8%"
|
||||
>
|
||||
<!-- {{ 4 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-bottom: 15px; height: 50px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 40%">
|
||||
<!-- {{ 1 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 20%"
|
||||
>
|
||||
<!-- {{ 2 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 35%">
|
||||
<!-- {{ 3 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 8%"
|
||||
>
|
||||
<!-- {{ 4 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-bottom: 15px; height: 50px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 40%">
|
||||
<!-- {{ 1 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 20%"
|
||||
>
|
||||
<!-- {{ 2 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 35%">
|
||||
<!-- {{ 3 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 8%"
|
||||
>
|
||||
<!-- {{ 4 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
|
||||
<el-row
|
||||
type="flex"
|
||||
class="row-bg"
|
||||
justify="center"
|
||||
style="margin-bottom: 15px; height: 50px"
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple" style="margin-left: 40%">
|
||||
<!-- {{ 1 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 20%"
|
||||
>
|
||||
<!-- {{ 2 }} -->
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 35%"
|
||||
></div
|
||||
></el-col>
|
||||
<el-col :span="12"
|
||||
><div
|
||||
class="grid-content bg-purple-light"
|
||||
style="margin-left: 59%"
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
style="margin-top: 17%; height: 40px"
|
||||
@click="off"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
style="margin-top: 17%; height: 40px; margin-left: 18%"
|
||||
@click="on"
|
||||
></el-button></div
|
||||
></el-col>
|
||||
</el-row>
|
||||
</div></div
|
||||
></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMachinery } from "@/api/mes/dv/machinery";
|
||||
import { listMachinerytype } from "@/api/mes/dv/machinerytype";
|
||||
import axios from "axios";
|
||||
import "@/assets/font/font.css";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
intelligent: [],
|
||||
intelligentData: {},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
id: "",
|
||||
imgdata: true,
|
||||
timer: null,
|
||||
img: require("../../../assets/images/close.png"),
|
||||
imgs: require("../../../assets/images/open.png"),
|
||||
machineryTypeOptions: [],
|
||||
machinerydata: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
machineryTypeId: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
// 定时刷新
|
||||
this.timer = setInterval(() => {
|
||||
if (this.id != "") {
|
||||
this.setInterval();
|
||||
}
|
||||
}, 1500);
|
||||
// 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
|
||||
this.$once("hook:beforeDestroy", () => {
|
||||
clearInterval(this.timer);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// axios
|
||||
// .get("http://192.168.3.53:8077/manage/device/devices")
|
||||
// .then((res) => {
|
||||
// this.intelligent = res.data.data;
|
||||
// this.loading = false;
|
||||
// });
|
||||
|
||||
listMachinerytype().then((response) => {
|
||||
var data = "";
|
||||
response.data.forEach((item) => {
|
||||
if (item.machineryTypeCode == "M_TYPE_001") {
|
||||
data = item.machineryTypeId;
|
||||
}
|
||||
});
|
||||
this.machinerydata.machineryTypeId = data;
|
||||
this.listMachineryitem();
|
||||
});
|
||||
},
|
||||
|
||||
listMachineryitem() {
|
||||
listMachinery(this.machinerydata).then((response) => {
|
||||
response.rows.forEach((item) => {
|
||||
if (item.ip != null) {
|
||||
this.intelligent.push(item);
|
||||
}
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
handleClose(item) {
|
||||
this.id = item.machineryId;
|
||||
this.setInterval();
|
||||
},
|
||||
|
||||
setInterval() {
|
||||
axios
|
||||
.get("http://192.168.3.53:8077/manage/modbus/data", {
|
||||
params: {
|
||||
id: this.id,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
this.intelligentData = res.data.data;
|
||||
});
|
||||
},
|
||||
|
||||
off() {
|
||||
if (this.id != "") {
|
||||
axios
|
||||
.get("http://192.168.3.53:8077/manage/modbus/operate", {
|
||||
params: {
|
||||
id: this.id,
|
||||
type: 2,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
this.imgdata = true;
|
||||
this.$modal.msgSuccess("停止成功");
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: "请选择设备",
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
},
|
||||
on() {
|
||||
if (this.id != "") {
|
||||
axios
|
||||
.get("http://192.168.3.53:8077/manage/modbus/operate", {
|
||||
params: {
|
||||
id: this.id,
|
||||
type: 1,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
this.imgdata = false;
|
||||
this.$modal.msgSuccess("启动成功");
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: "请选择设备",
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.myfont {
|
||||
font-family: "Ayuthaya"; // 这里的 Ayuthaya 是引入时的自定义名字
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.el-button + .el-button {
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.app-containers ::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.one,
|
||||
.three,
|
||||
.two {
|
||||
height: 510px;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
border: solid 1px #dadada;
|
||||
}
|
||||
.one {
|
||||
width: 95%;
|
||||
}
|
||||
.two {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.three {
|
||||
width: 99%;
|
||||
box-sizing: border-box;
|
||||
margin-left: 5%;
|
||||
}
|
||||
.title {
|
||||
line-height: 24px;
|
||||
font-size: 18px;
|
||||
color: #302933;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: solid 1px #dadada;
|
||||
margin-bottom: 15px;
|
||||
margin-top: -23px;
|
||||
}
|
||||
.el-main,
|
||||
.smallmain {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.smallHeader {
|
||||
background-color: #e0e8f0;
|
||||
position: relative;
|
||||
color: #7a8289;
|
||||
font-weight: 700;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
width: 70%;
|
||||
margin: 0 auto 20px;
|
||||
background: url("../../../assets/images/machine.png") no-repeat center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.but1 {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 4px;
|
||||
}
|
||||
.open,
|
||||
.smallmain >>> .el-tree-node:focus > .el-tree-node__content {
|
||||
background-color: #83bff8 !important;
|
||||
}
|
||||
.smallmain >>> .el-tree-node__content:hover {
|
||||
background-color: #dadada;
|
||||
}
|
||||
.smallmain
|
||||
>>> .el-tree--highlight-current
|
||||
.el-tree-node.is-current
|
||||
> .el-tree-node__content {
|
||||
background-color: #83bff8;
|
||||
}
|
||||
.tableBox >>> .el-table {
|
||||
margin: 0;
|
||||
}
|
||||
.radio {
|
||||
position: relative;
|
||||
}
|
||||
.nodata {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.tagBox {
|
||||
width: 100%;
|
||||
}
|
||||
.tag {
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
}
|
||||
.tagItem {
|
||||
display: inline-block;
|
||||
width: calc(100% / 3.2);
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
/* 单行文本溢出省略号 */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
::v-deep .el-tag .el-icon-close {
|
||||
top: -9px;
|
||||
}
|
||||
.wrapBox >>> .el-table__body tr.current-row > td {
|
||||
background-color: #83bff8 !important;
|
||||
}
|
||||
.wrapBox >>> .el-table tbody tr:hover > td {
|
||||
background-color: #dadada;
|
||||
}
|
||||
::v-deep .el-tag {
|
||||
margin-left: 0px;
|
||||
}
|
||||
</style>
|
407
src/views/deviceConsole/robotic/index.vue
Normal file
@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple">
|
||||
<div class="grid-content three" style="height: 750px">
|
||||
<!-- 选择设备 -->
|
||||
<el-container style="padding: 0">
|
||||
<el-header
|
||||
class="smallHeader"
|
||||
style="height: 40px; line-height: 40px"
|
||||
>选择设备
|
||||
</el-header>
|
||||
<el-main class="smallmain tableBox">
|
||||
<p v-if="intelligent.length == 0" class="nodata">暂无数据</p>
|
||||
<div class="tagBox" v-else>
|
||||
<el-button
|
||||
style="width: 100%"
|
||||
v-for="item in intelligent"
|
||||
:key="item"
|
||||
@click="handleClose(item)"
|
||||
>{{ item.machineryName }}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="14"
|
||||
><div class="grid-content bg-purple">
|
||||
<div>
|
||||
<el-image :src="img"></el-image>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
border: 1px solid rgb(217 216 216);
|
||||
height: 60px;
|
||||
width: 30%;
|
||||
border-radius: 30px;
|
||||
margin-left: 32%;
|
||||
"
|
||||
></div>
|
||||
<div
|
||||
style="
|
||||
border: 1px solid rgb(217, 216, 216);
|
||||
height: 100px;
|
||||
width: 30%;
|
||||
border-radius: 50px;
|
||||
margin-left: 32%;
|
||||
margin-top: 2%;
|
||||
background: rgba(204, 204, 221, 0.2);
|
||||
"
|
||||
>
|
||||
<div style="margin-top: 9%">
|
||||
<el-row type="flex" class="row-bg" justify="center">
|
||||
<el-col :span="4"
|
||||
><div class="grid-content bg-purple">
|
||||
<div v-if="elimage">
|
||||
<el-button @click="elbutton"
|
||||
><el-image
|
||||
:src="sd"
|
||||
style="width: 20px; height: 20px"
|
||||
></el-image
|
||||
></el-button>
|
||||
<p
|
||||
style="
|
||||
margin: auto;
|
||||
margin-left: 25%;
|
||||
font-size: 14px;
|
||||
color: #9e9e9e;
|
||||
"
|
||||
>
|
||||
上电
|
||||
</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-button @click="buttonto">
|
||||
<el-image
|
||||
:src="xd"
|
||||
style="width: 20px; height: 20px"
|
||||
></el-image>
|
||||
</el-button>
|
||||
<p
|
||||
style="
|
||||
margin: auto;
|
||||
margin-left: 25%;
|
||||
font-size: 14px;
|
||||
color: #9e9e9e;
|
||||
"
|
||||
>
|
||||
下电
|
||||
</p>
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="6"
|
||||
><div class="grid-content bg-purple-light"></div
|
||||
></el-col>
|
||||
<el-col :span="5"
|
||||
><div class="grid-content bg-purple">
|
||||
<div>
|
||||
<el-button>
|
||||
<el-image
|
||||
:src="fw"
|
||||
style="width: 20px; height: 20px"
|
||||
></el-image>
|
||||
</el-button>
|
||||
<p
|
||||
style="
|
||||
margin: auto;
|
||||
margin-left: 25%;
|
||||
font-size: 14px;
|
||||
color: #9e9e9e;
|
||||
"
|
||||
>
|
||||
复位
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="4"><div class="grid-content bg-purple">2</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMachinery } from "@/api/mes/dv/machinery";
|
||||
import { listMachinerytype } from "@/api/mes/dv/machinerytype";
|
||||
import axios from "axios";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
intelligent: [],
|
||||
intelligentData: {},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
id: "",
|
||||
imgdata: true,
|
||||
timer: null,
|
||||
machineryTypeOptions: [],
|
||||
machinerydata: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
machineryTypeId: "",
|
||||
},
|
||||
elimage: true,
|
||||
img: require("../../../assets/images/robotic.png"),
|
||||
sd: require("../../../assets/images/shangdian.png"),
|
||||
xd: require("../../../assets/images/weishangdian.png"),
|
||||
fw: require("../../../assets/images/fuwei-02.png"),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
// 定时刷新
|
||||
this.timer = setInterval(() => {
|
||||
if (this.id != "") {
|
||||
this.setInterval();
|
||||
}
|
||||
}, 1500);
|
||||
// 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
|
||||
this.$once("hook:beforeDestroy", () => {
|
||||
clearInterval(this.timer);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// axios
|
||||
// .get("http://192.168.3.53:8077/manage/device/devices")
|
||||
// .then((res) => {
|
||||
// this.intelligent = res.data.data;
|
||||
// this.loading = false;
|
||||
// });
|
||||
|
||||
listMachinerytype().then((response) => {
|
||||
var data = "";
|
||||
response.data.forEach((item) => {
|
||||
if (item.machineryTypeCode == "M_TYPE_002") {
|
||||
data = item.machineryTypeId;
|
||||
}
|
||||
});
|
||||
this.machinerydata.machineryTypeId = data;
|
||||
this.listMachineryitem();
|
||||
});
|
||||
},
|
||||
|
||||
listMachineryitem() {
|
||||
listMachinery(this.machinerydata).then((response) => {
|
||||
response.rows.forEach((item) => {
|
||||
if (item.ip != null) {
|
||||
this.intelligent.push(item);
|
||||
}
|
||||
});
|
||||
console.log(this.intelligent);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
handleClose(item) {
|
||||
this.id = item.machineryId;
|
||||
this.setInterval();
|
||||
},
|
||||
|
||||
setInterval() {
|
||||
// axios
|
||||
// .get("http://192.168.3.53:8077/manage/modbus/data", {
|
||||
// params: {
|
||||
// id: this.id,
|
||||
// },
|
||||
// })
|
||||
// .then((res) => {
|
||||
// console.log(res.data.data);
|
||||
// this.intelligentData = res.data.data;
|
||||
// });
|
||||
},
|
||||
|
||||
elbutton() {
|
||||
this.elimage = false;
|
||||
},
|
||||
|
||||
buttonto() {
|
||||
this.elimage = true;
|
||||
},
|
||||
|
||||
off() {
|
||||
// if (this.id != "") {
|
||||
// axios
|
||||
// .get("http://192.168.3.53:8077/manage/modbus/operate", {
|
||||
// params: {
|
||||
// id: this.id,
|
||||
// type: 2,
|
||||
// },
|
||||
// })
|
||||
// .then((res) => {
|
||||
// this.imgdata = true;
|
||||
// this.$modal.msgSuccess("停止成功");
|
||||
// });
|
||||
// } else {
|
||||
// this.$message({
|
||||
// message: "请选择设备",
|
||||
// type: "warning",
|
||||
// });
|
||||
// }
|
||||
},
|
||||
on() {
|
||||
// if (this.id != "") {
|
||||
// axios
|
||||
// .get("http://192.168.3.53:8077/manage/modbus/operate", {
|
||||
// params: {
|
||||
// id: this.id,
|
||||
// type: 1,
|
||||
// },
|
||||
// })
|
||||
// .then((res) => {
|
||||
// this.imgdata = false;
|
||||
// this.$modal.msgSuccess("启动成功");
|
||||
// });
|
||||
// } else {
|
||||
// this.$message({
|
||||
// message: "请选择设备",
|
||||
// type: "warning",
|
||||
// });
|
||||
// }
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-containers ::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.el-button + .el-button {
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.one,
|
||||
.three,
|
||||
.two {
|
||||
height: 510px;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
border: solid 1px #dadada;
|
||||
}
|
||||
.one {
|
||||
width: 95%;
|
||||
}
|
||||
.two {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.three {
|
||||
width: 99%;
|
||||
box-sizing: border-box;
|
||||
margin-left: 5%;
|
||||
}
|
||||
.title {
|
||||
line-height: 24px;
|
||||
font-size: 18px;
|
||||
color: #302933;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: solid 1px #dadada;
|
||||
margin-bottom: 15px;
|
||||
margin-top: -23px;
|
||||
}
|
||||
.el-main,
|
||||
.smallmain {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.smallHeader {
|
||||
background-color: #e0e8f0;
|
||||
position: relative;
|
||||
color: #7a8289;
|
||||
font-weight: 700;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
width: 70%;
|
||||
margin: 0 auto 20px;
|
||||
background: url("../../../assets/images/machine.png") no-repeat center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.but1 {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 4px;
|
||||
}
|
||||
.open,
|
||||
.smallmain >>> .el-tree-node:focus > .el-tree-node__content {
|
||||
background-color: #83bff8 !important;
|
||||
}
|
||||
.smallmain >>> .el-tree-node__content:hover {
|
||||
background-color: #dadada;
|
||||
}
|
||||
.smallmain
|
||||
>>> .el-tree--highlight-current
|
||||
.el-tree-node.is-current
|
||||
> .el-tree-node__content {
|
||||
background-color: #83bff8;
|
||||
}
|
||||
.tableBox >>> .el-table {
|
||||
margin: 0;
|
||||
}
|
||||
.radio {
|
||||
position: relative;
|
||||
}
|
||||
.nodata {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.tagBox {
|
||||
width: 100%;
|
||||
}
|
||||
.tag {
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
}
|
||||
.tagItem {
|
||||
display: inline-block;
|
||||
width: calc(100% / 3.2);
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
/* 单行文本溢出省略号 */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
::v-deep .el-tag .el-icon-close {
|
||||
top: -9px;
|
||||
}
|
||||
.wrapBox >>> .el-table__body tr.current-row > td {
|
||||
background-color: #83bff8 !important;
|
||||
}
|
||||
.wrapBox >>> .el-table tbody tr:hover > td {
|
||||
background-color: #dadada;
|
||||
}
|
||||
::v-deep .el-tag {
|
||||
margin-left: 0px;
|
||||
}
|
||||
</style>
|
@ -411,7 +411,7 @@ export default {
|
||||
machineryIds: "",
|
||||
machineryTypeName: "",
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -461,7 +461,7 @@ export default {
|
||||
url: null,
|
||||
originalName: null,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -296,7 +296,7 @@ export default {
|
||||
active: 0,
|
||||
remark: null,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -191,7 +191,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -294,6 +294,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加班组";
|
||||
this.optType = "add";
|
||||
genCode('CAL_TEAM_CODE').then(response =>{
|
||||
this.form.teamCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -386,7 +386,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -329,6 +329,40 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="ip地址" prop="ip">
|
||||
<el-input
|
||||
v-model="form.ip"
|
||||
maxlength="255"
|
||||
readonly="readonly"
|
||||
v-if="optType == 'view'"
|
||||
/>
|
||||
<el-input
|
||||
v-model="form.ip"
|
||||
placeholder="请输入ip地址"
|
||||
maxlength="255"
|
||||
v-else
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="端口号" prop="port">
|
||||
<el-input
|
||||
v-model="form.port"
|
||||
maxlength="255"
|
||||
readonly="readonly"
|
||||
v-if="optType == 'view'"
|
||||
/>
|
||||
<el-input
|
||||
v-model="form.port"
|
||||
placeholder="请输入端口号"
|
||||
maxlength="255"
|
||||
v-else
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格型号" prop="machinerySpec">
|
||||
@ -612,6 +646,8 @@ export default {
|
||||
|
||||
inputName: "",
|
||||
|
||||
queryParamsdata:{},
|
||||
|
||||
// 表单校验
|
||||
rules: {
|
||||
machineryCode: [
|
||||
@ -690,6 +726,7 @@ export default {
|
||||
handleNodeClick(data) {
|
||||
console.log(data);
|
||||
this.queryParams.machineryTypeId = data.machineryTypeId;
|
||||
this.queryParamsdata = data;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 取消按钮
|
||||
@ -719,7 +756,7 @@ export default {
|
||||
updateTime: null,
|
||||
idList: "",
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -758,17 +795,19 @@ export default {
|
||||
this.getWorkshops();
|
||||
this.userName = "";
|
||||
this.inputName = "";
|
||||
if (this.queryParams.machineryTypeId != 0) {
|
||||
this.form.machineryTypeId = this.queryParams.machineryTypeId;
|
||||
if (this.queryParamsdata.machineryTypeId != 0) {
|
||||
this.form = this.queryParamsdata;
|
||||
}
|
||||
this.optType = "add";
|
||||
this.open = true;
|
||||
this.title = "新增设备";
|
||||
genCode("MACHINERY_CODE").then((response) => {
|
||||
this.form.machineryCode = response;
|
||||
});
|
||||
},
|
||||
|
||||
saveInvolvedUserId() {
|
||||
this.addInvolvedUserIdVisible = false;
|
||||
|
||||
// this.$emit("getSelectList", this.selectList);
|
||||
},
|
||||
|
||||
@ -901,7 +940,6 @@ export default {
|
||||
|
||||
//子组件传的数据
|
||||
getSelectList(value) {
|
||||
console.log(value);
|
||||
this.userName = "";
|
||||
this.userName = value.map((item) => item.nickName);
|
||||
this.UserAdd.userIds = value.map((item) => item.userId);
|
||||
|
@ -294,7 +294,7 @@ export default {
|
||||
components: {Repairline,MachinerySelectSingle},
|
||||
data() {
|
||||
return {
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -427,6 +427,9 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备维修单";
|
||||
genCode('REPAIR_CODE').then(response =>{
|
||||
this.form.repairCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -281,7 +281,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -464,7 +464,7 @@ export default {
|
||||
maxStock: 0,
|
||||
remark: undefined
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -353,7 +353,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -485,7 +485,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -510,6 +510,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加客户";
|
||||
this.optType = "add";
|
||||
genCode('CLIENT_CODE').then(response =>{
|
||||
this.form.clientCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -531,7 +531,7 @@ export default {
|
||||
optType: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -572,6 +572,9 @@ export default {
|
||||
this.optType = "add";
|
||||
this.open = true;
|
||||
this.title = "新增物料/产品";
|
||||
genCode('ITEM_CODE').then(response =>{
|
||||
this.form.itemCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
7
src/views/mes/md/vendor/index.vue
vendored
@ -346,7 +346,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -459,7 +459,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -484,6 +484,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加供应商";
|
||||
this.optType = "add";
|
||||
genCode('VENDOR_CODE').then(response =>{
|
||||
this.form.vendorCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -188,7 +188,7 @@ export default {
|
||||
dicts: ['sys_yes_no'],
|
||||
data() {
|
||||
return {
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -271,7 +271,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -296,6 +296,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加车间";
|
||||
this.optType = "add";
|
||||
genCode('WORKSHOP_CODE').then(response =>{
|
||||
this.form.workshopCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -301,7 +301,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -454,7 +454,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -497,6 +497,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加工作站";
|
||||
this.optType = "add";
|
||||
genCode('WORKSTATION_CODE').then(response =>{
|
||||
this.form.workstationCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -202,7 +202,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -278,7 +278,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -303,6 +303,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加生产工序";
|
||||
this.optType = "add";
|
||||
genCode('PROCESS_CODE').then(response =>{
|
||||
this.form.processCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -210,7 +210,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -287,7 +287,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -312,6 +312,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加工艺路线";
|
||||
this.optType = "add";
|
||||
genCode('ROUTE_CODE').then(response =>{
|
||||
this.form.routeCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -119,10 +119,10 @@
|
||||
<el-form-item label="与下一道工序关系" prop="linkType">
|
||||
<el-tooltip effect="dark" placement="right">
|
||||
<div slot="content">
|
||||
S-to-S:当前工序开始生产,下一道工序才可开始生产 </br>
|
||||
F-to-F:当前工序结束生产,下一道工序才可结束生产 </br>
|
||||
F-to-S:当前工序结束生产,下一道工序才可开始生产 </br>
|
||||
S-to-F:当前工序开始生产,下一道工序才可结束生产 </br>
|
||||
F-to-S:当前工序结束生产,下一道工序才可开始生产
|
||||
F-to-F:当前工序结束生产,下一道工序才可结束生产 </br>
|
||||
S-to-S:当前工序开始生产,下一道工序才可开始生产 </br>
|
||||
</div>
|
||||
<el-select v-model="form.linkType" placeholder="请选择与下一道工序关系">
|
||||
<el-option
|
||||
@ -359,6 +359,8 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加工艺组成";
|
||||
var arr = Object.values(this.routeprocessList).pop()
|
||||
this.form.orderNum = arr.orderNum + 1;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -261,7 +261,7 @@
|
||||
</el-step>
|
||||
</el-steps>
|
||||
<el-card v-for=" (item,index) in processOptions " :key="index" v-if="activeProcess == index && form.workorderId !=null">
|
||||
<ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType"></ProTask>
|
||||
<ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType" :recordId="item.recordId"></ProTask>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
@ -293,7 +293,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
activeProcess: 0,
|
||||
// 遮罩层
|
||||
@ -437,7 +437,7 @@ export default {
|
||||
updateTime: null
|
||||
};
|
||||
this.activeProcess =0;
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
//甘特图按钮点击
|
||||
@ -491,6 +491,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加生产工单";
|
||||
this.optType="add";
|
||||
genCode('WORKORDER_CODE').then(response =>{
|
||||
this.form.workorderCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -245,7 +245,8 @@ export default {
|
||||
colorCode: null,
|
||||
routeId: null,
|
||||
processId: null,
|
||||
optType: null
|
||||
optType: null,
|
||||
recordId:null
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
@ -295,6 +296,7 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
taskId: null,
|
||||
recordId: this.recordId,
|
||||
taskCode: null,
|
||||
taskName: null,
|
||||
workorderId: this.workorderId,
|
||||
|
@ -431,7 +431,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -581,7 +581,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -627,6 +627,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加生产工单";
|
||||
this.optType="add";
|
||||
genCode('WORKORDER_CODE').then(response =>{
|
||||
this.form.workorderCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -394,7 +394,7 @@ export default {
|
||||
dicts: ['mes_ipqc_type','mes_qc_result','mes_order_status'],
|
||||
data() {
|
||||
return {
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -544,7 +544,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -569,6 +569,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加过程检验单";
|
||||
this.optType = "add";
|
||||
genCode('IPQC_CODE').then(response =>{
|
||||
this.form.ipqcCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -413,7 +413,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
acceptImg: require('@/assets/images/accept.png'),
|
||||
rejectImg: require('@/assets/images/reject.png'),
|
||||
@ -563,7 +563,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -588,6 +588,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加来料检验单";
|
||||
this.optType = 'add';
|
||||
genCode('QC_IQC_CODE').then(response =>{
|
||||
this.form.iqcCode = response;
|
||||
});
|
||||
},
|
||||
//查看明细
|
||||
handleView(row){
|
||||
|
@ -388,7 +388,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -531,7 +531,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -567,6 +567,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加出货检验单";
|
||||
this.optType = "add";
|
||||
genCode('OQC_CODE').then(response =>{
|
||||
this.form.oqcCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -95,7 +95,7 @@
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
|
@ -286,7 +286,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
@ -196,7 +196,7 @@ export default {
|
||||
data(){
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -277,7 +277,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
@ -320,7 +320,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
@ -186,7 +186,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -267,7 +267,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -292,6 +292,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加检测项";
|
||||
this.optType = "add";
|
||||
genCode('QC_INDEX_CODE').then(response =>{
|
||||
this.form.indexCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -225,7 +225,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -305,7 +305,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -330,6 +330,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加检测模板";
|
||||
this.optType = "add";
|
||||
genCode('QC_TEMPLATE_CODE').then(response =>{
|
||||
this.form.templateCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -313,7 +313,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -415,7 +415,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
onToolTypeChanged(){
|
||||
@ -460,6 +460,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加工装夹具清单";
|
||||
this.optType = "add";
|
||||
genCode('TOOL_CODE').then(response =>{
|
||||
this.form.toolCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -223,7 +223,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -302,7 +302,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -327,6 +327,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加工装夹具类型";
|
||||
this.optType = "add";
|
||||
genCode('TOOL_TYPE_CODE').then(response =>{
|
||||
this.form.toolTypeCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -253,7 +253,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
locationId: undefined,
|
||||
// 遮罩层
|
||||
@ -345,7 +345,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -370,6 +370,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加库位";
|
||||
this.optType = "add";
|
||||
genCode('AREA_CODE').then(response =>{
|
||||
this.form.areaCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -272,7 +272,7 @@ export default {
|
||||
components: {Issueline,WorkstationSelect,WorkorderSelect},
|
||||
data() {
|
||||
return {
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -420,7 +420,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -445,6 +445,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加生产领料单";
|
||||
this.optType = "add";
|
||||
genCode('ISSUE_CODE').then(response =>{
|
||||
this.form.issueCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -266,7 +266,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -407,7 +407,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -433,6 +433,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加物料入库单";
|
||||
this.optType = "add";
|
||||
genCode('ITEMRECPT_CODE').then(response =>{
|
||||
this.form.recptCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -157,7 +157,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseId: undefined,
|
||||
// 遮罩层
|
||||
@ -242,7 +242,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -267,6 +267,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加库区设置";
|
||||
this.optType = "add";
|
||||
genCode('LOCATION_CODE').then(response =>{
|
||||
this.form.locationCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -250,7 +250,7 @@ export default {
|
||||
components: {Issueline,WorkorderSelect},
|
||||
data() {
|
||||
return {
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -376,7 +376,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -401,6 +401,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加外协发料单头";
|
||||
this.optType = "add";
|
||||
genCode('OUTSOURCE_ISSUE_CODE').then(response =>{
|
||||
this.form.issueCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -258,7 +258,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -347,7 +347,7 @@ export default {
|
||||
areaId: null, areaCode: null, areaName: null, recptDate: new Date(),
|
||||
status: "PREPARE", remark: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -372,6 +372,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加外协入库单";
|
||||
this.optType = "add";
|
||||
genCode('OUTSOURCE_RECPT_CODE').then(response =>{
|
||||
this.form.recptCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -290,7 +290,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -430,7 +430,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -467,6 +467,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加装箱单";
|
||||
this.optType="add";
|
||||
genCode('PACKAGE_CODE').then(response =>{
|
||||
this.form.packageCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -223,7 +223,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -359,7 +359,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -383,6 +383,9 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加产品入库单";
|
||||
genCode('PRODUCTRECPT_CODE').then(response =>{
|
||||
this.form.recptCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -253,7 +253,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -403,7 +403,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -442,6 +442,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加销售出库单";
|
||||
this.optType = "add";
|
||||
genCode('PRODUCTSALSE_CODE').then(response =>{
|
||||
this.form.salseCode = response;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -220,7 +220,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -349,7 +349,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -374,6 +374,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加生产退料单头";
|
||||
this.optType = "add";
|
||||
genCode('RTISSUE_CODE').then(response =>{
|
||||
this.form.rtCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -276,7 +276,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
warehouseInfo:[],
|
||||
warehouseOptions:[],
|
||||
@ -434,7 +434,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -471,6 +471,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加产品销售退货单";
|
||||
this.optType = "add";
|
||||
genCode('RTSALSE_CODE').then(response =>{
|
||||
this.form.rtCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -249,7 +249,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -363,6 +363,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加供应商退货";
|
||||
this.optType = "add";
|
||||
genCode('WM_RTVENDOR_CODE').then(response =>{
|
||||
this.form.rtCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -297,7 +297,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -401,7 +401,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -426,6 +426,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加转移单";
|
||||
this.optType = "add";
|
||||
genCode('TRANSFER_CODE').then(response =>{
|
||||
this.form.transferCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -182,7 +182,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag:true,
|
||||
optType: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -262,7 +262,7 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.autoGenFlag = true;
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -287,6 +287,9 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加仓库设置";
|
||||
this.optType = "add";
|
||||
genCode('WAREHOUSE_CODE').then(response =>{
|
||||
this.form.warehouseCode = response;
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">苦糖果MES</h3>
|
||||
<h3 class="title">智造大师</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
|
234
src/views/system/FactoryInformation/index.vue
Normal file
@ -0,0 +1,234 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card header="工厂信息维护" shadow="never" style="min-height:600px">
|
||||
<div style="width: 98%;margin:0 auto">
|
||||
<el-form ref="contractForm" :model="contractForm" :rules="contractRules" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="organName" label="工厂名称:" label-width="165px">
|
||||
<el-input v-model="contractForm.organName" :disabled="isEdit" maxlength="20" style="width: 350pxpx" placeholder="请录入工厂名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="organJurPerson" label="法定代表人:">
|
||||
<el-input v-model="contractForm.organJurPerson" style="width: 350pxpx" maxlength="10" placeholder="请录入法人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="organPhone" label="工厂联系方式:" label-width="165px">
|
||||
<el-input v-model="contractForm.organPhone" style="width: 350pxpx" maxlength="15" placeholder="请录入工厂联系方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item prop="userName" label="用户名:" >
|
||||
<el-input v-model="contractForm.userName" style="width: 350pxpx" maxlength="30" placeholder="请录入用户名" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="taxNumber" label="统一社会信用代码:" label-width="165px">
|
||||
<el-input v-model="contractForm.taxNumber" :disabled="isEdit" style="width: 350pxpx" maxlength="20" placeholder="请录入统一社会信用代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工厂顶图:" label-width="165px">
|
||||
<el-upload
|
||||
class="inline-block"
|
||||
action="/prod-api/common/uploadMinio"
|
||||
list-type="picture-card"
|
||||
:headers="headers"
|
||||
:auto-upload="false"
|
||||
:on-success="handlerSuccess"
|
||||
:on-change="changeLogo"
|
||||
:on-remove="showLogo"
|
||||
accept="jpeg,jpg,png"
|
||||
name="file"
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
>
|
||||
<img
|
||||
v-show="isShow"
|
||||
width="100%"
|
||||
:src="this.contractForm.picture"
|
||||
/>
|
||||
<!-- <i slot="default" class="el-icon-plus"></i> -->
|
||||
</el-upload>
|
||||
<span style="display:inline-block;position: relative;top: 60px;left:20px"><el-button plain @click="uploadImg" >上传</el-button></span>
|
||||
<div style="color: red">注 :您最多只能上传一张图片,图片尺寸为1000px*40px,并且图片大小不能超过2M</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" style="text-align:center;">
|
||||
<el-button type="primary" @click="confirm"> 保 存 </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ownerServer from '@/api/ownerContract'
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken()
|
||||
},
|
||||
isShow:true,
|
||||
contractForm: {
|
||||
id: '',
|
||||
organName: '',
|
||||
contControlId: 'HT001',
|
||||
address: '',
|
||||
postCode: '',
|
||||
jurPerson: '',
|
||||
agentPerson: '',
|
||||
telFax: '',
|
||||
bankName: '',
|
||||
bankNo: '',
|
||||
taxNumber: ''
|
||||
},
|
||||
isEdit: false,
|
||||
contractRules: {
|
||||
organName: [{ required: true, message: '请录入工厂名称', trigger: 'blur' }],
|
||||
organJurPerson: [{ required: true, message: '请录入法定代表人', trigger: 'blur' }],
|
||||
organPhone: [{ required: true, message: '请录入工厂联系方式', trigger: 'blur' }],
|
||||
userName: [{ required: true, message: '请录入用户名', trigger: 'blur' }],
|
||||
},
|
||||
fileFormats:["jpep","png","jpg"],
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getOwnInfo()
|
||||
},
|
||||
methods: {
|
||||
changeLogo(file){
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
let suffixFile=file.name.substring(file.name.lastIndexOf("\.")+1);
|
||||
if (!this.fileFormats.includes(suffixFile)){
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$message.error('上传图片格式只能是.jpg,.jpeg,.png');
|
||||
}else if(!isLt2M){
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!');
|
||||
}else{
|
||||
let vue=this;
|
||||
let url = window.URL || window.webkitURL;
|
||||
let img = new Image();
|
||||
img.src = url.createObjectURL(file.raw);
|
||||
img.onload=function () {
|
||||
if(!(this.width==1000&&this.height==40)){
|
||||
vue.$refs.upload.clearFiles();
|
||||
vue.$message.error('图片尺寸必须是1000*40的图片');
|
||||
}else{
|
||||
vue.isShow=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
showLogo(){
|
||||
this.isShow=true;
|
||||
},
|
||||
handlerSuccess(companyImg) {
|
||||
console.log(companyImg);
|
||||
this.contractForm.picture = companyImg.fileName;
|
||||
},
|
||||
uploadImg() {
|
||||
if (this.$refs.upload.uploadFiles.length>0){
|
||||
this.$refs.upload.submit()
|
||||
}else{
|
||||
this.$message.error('请先选择图片');
|
||||
}
|
||||
},
|
||||
beforeLogoUpload(file) {
|
||||
// console.log(file);
|
||||
// const isJPG = file.type === 'image/jpeg';
|
||||
// const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
//
|
||||
// if (!isJPG) {
|
||||
// this.$message.error('上传头像图片只能是 JPG 格式!');
|
||||
// }
|
||||
// if (!isLt2M) {
|
||||
// this.$message.error('上传头像图片大小不能超过 2MB!');
|
||||
// }
|
||||
// return isJPG && isLt2M;
|
||||
},
|
||||
getOwnInfo() {
|
||||
ownerServer.getOrganInfo().then(res => {
|
||||
if (res.code === 200 && res.data) {
|
||||
this.contractForm = res.data;
|
||||
this.$store.commit("companyImg/SET_LOGO",this.$store.getters.sysBaseUrl + '/reportImg/' + this.contractForm.picture);
|
||||
this.$store.commit("companyImg/SET_IS_LOGO",true);
|
||||
this.isEdit = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.contractForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.contractForm.contControlId = 'HT001'
|
||||
if (!this.isEdit) {
|
||||
ownerServer.modifyOwnerContBaseById(this.contractForm).then(result => {
|
||||
if (result.code === 200) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: result.message,
|
||||
type: 'success'
|
||||
})
|
||||
this.getOwnInfo()
|
||||
} else {
|
||||
this.$notify({
|
||||
title: '失败',
|
||||
message: result.message,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ownerServer.modifyOwnerContBaseById(this.contractForm).then(result => {
|
||||
console.log(this.contractForm);
|
||||
if (result.code === 200) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: result.msg,
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
this.$notify({
|
||||
title: '失败',
|
||||
message: result.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请录入完整信息')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
::v-deep .el-card .el-card__header {
|
||||
padding: 15px 20px;
|
||||
background: #F3F2F2;
|
||||
}
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
/*border: 1px solid black;*/
|
||||
}
|
||||
|
||||
/*::v-deep .el-upload{*/
|
||||
/*width: 500px;*/
|
||||
/*}*/
|
||||
</style>
|