Commit 61297a88 authored by 李苏's avatar 李苏 💬

保养项目

parent 429cf904
import request from 'common/src/utils/request'
/* 查询 */
export function doQuery(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/add',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/delete',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/update',
method: 'post',
data: query||{}
})
}
\ No newline at end of file
......@@ -37,3 +37,12 @@ method: 'post',
data: query||{}
})
}
export function querySbbyjl(query) {
return request({
url: '/aqgl/sbgl/sbbymx/querySbbyjl',
method: 'post',
data: query||{}
})
}
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="设备编码" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="制造商" ref="productor" prop="productor">
<el-input :readonly="readonly" v-model="form.productor" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="型号" ref="model" prop="model">
<el-input :readonly="readonly" v-model="form.model" ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="出厂编号" ref="serialno" prop="serialno">
<el-input :readonly="readonly" v-model="form.serialno" ></el-input>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="计量单位" ref="jldw" prop="jldw">
<el-input :readonly="readonly" v-model="form.jldw" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用日期" ref="qyrq" prop="qyrq">
<el-date-picker value-format="timestamp" style="width: 100%;" :readonly="readonly" type="date"
v-model="form.qyrq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="使用地点" ref="sydd" prop="sydd">
<el-input :readonly="readonly" v-model="form.sydd" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用途" ref="yt" prop="yt">
<el-input :readonly="readonly" v-model="form.yt" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" ref="sl" prop="sl">
<el-input :readonly="readonly" v-model="form.sl" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否入档" ref="doc" prop="doc">
<el-switch
v-model="form.doc"
active-color="#13ce66"
active-value="Y" inactive-value="N"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input type="textarea" :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
name: "aqglSbxxEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
systemType: [],
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
//ID
id:'',
//设备编码
code:'',
//档案编号
dabh:'',
//系统分类
xtfl:'0',
//设备分类
flid:'',
//名称
name:'',
//制造商
productor:'',
//型号
model:'',
//出厂编号
serialno:'',
//计量单位
jldw:'',
//启用日期
qyrq:new Date().getTime(),
//停用日期
tyrq:new Date().getTime(),
//停用标志
tybz:'',
//使用地点
sydd:'',
//用途
yt:'',
//数量
sl:'',
//出厂日期
ccrq:new Date().getTime(),
//工作级别
gzjb:'',
//跨度
kd:'',
//提升速度
tssd:'',
//运行速度
yxsd:'',
//吨位
dw:'',
//起升高度
qsgd:'',
//电机功率
djgl:'',
//安装日期
azrq:new Date().getTime(),
//安装地点
azdd:'',
//安装单位
azdw:'',
//注册编号
zcbh:'',
//检验报告编号
jybgbh:'',
//检验周期
jyzq:'',
//上次检验日期
scjyrq:new Date().getTime(),
//下次检验日期
xcjyrq:new Date().getTime(),
//检验前自检结论
jyqzjjl:'',
//实际检验日期
sjjyrq:new Date().getTime(),
//特检机构检验结论
tjjgjyjl:'',
//检验整改情况
jyzgqk:'',
//设备升级
sbsj:'',
//设备资料
sbzl:'',
//设备资料存放地点
sbzldd:'',
//未检原因
wjyy:'',
//系统名称
xtmc:'',
//参数及量程
cslc:'',
//监测因子
jcyz:'',
//类型
lx:'',
//主体材质
ztcz:'',
//容器容积
rqrj:'',
//容器净重
rqjz:'',
//设计压力
sjyl:'',
//设计温度
sjwd:'',
//最高压力
zgyl:'',
//耐压试验压力
nysyyl:'',
//管径与壁厚
gjbh:'',
//管道级别
gdjb:'',
//管道起点
gdqd:'',
//管道终点
gdzd:'',
//压力
yl:'',
//铺设方式
psfs:'',
//工作温度
gzwd:'',
//工作压力
gzyl:'',
//输送介质
ssjz:'',
//焊口数量
hksl:'',
//保温
bw:'',
//防腐方式
fffs:'',
//标识
bs:'',
//公称通径
gctj:'',
//产品编号
cpbh:'',
//整定压力
zdyl:'',
//层站
dtcz:'',
//载重
dtzz:'',
//提升高度
dttsgd:'',
//运行速度
dtyxsd:'',
//车牌号
cph:'',
//发动机型号
fdjxh:'',
//发动机编号
fdjbh:'',
//底盘车架号
dpcjh:'',
//拍照选项
pzxx:'',
//附件数
attachcount:'',
//备注
bz:'',
//维护人编码
whrid:'',
//维护人
whr:'',
//维护时间
whsj:new Date().getTime(),
//创建人编码
cjrid:'',
//创建人
cjr:'',
//创建时间
cjsj:new Date().getTime(),
//系统版本
doc:""
},
/* form提交时的规则,具体规则参考官网*/
rules: {
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<DefaultDialog :app='app'>
<div class="min_full" slot='form' style="height: 550px;border: 0px;">
<Selector :app='this' v-if='showDialog&&DialogName=="ksry"' ></Selector>
<!-- 按钮操作-->
<el-row class="tool-bar">
<!-- <ViewButton ref="view" :app='this'></ViewButton>
<AddButton ref="add" :app='this'></AddButton>
<CopyButton ref="copy" :app='this'></CopyButton>
<EditButton ref="edit" :app='this'></EditButton> -->
<AttachFileShow :app='this' ></AttachFileShow>
<!-- <el-button @click="xzry" size='mini' type="primary">导入项目</el-button> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers" style="height: 380px;">
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :delParams="'mxid'"
@getRow='getRow'>
</TablePager>
</div>
</div>
</DefaultDialog>
</template>
<script>
/* 引入需要的接口*/
import Selector from './selector'
import {
querySbbyjl
} from '@/api/equipment/sbbymx.js';
//
/* edit页面*/
import DtlEdit from './dtlEdit.vue'
import {
tableMixin_noapp
} from 'common'
export default {
props:['app'],
mixins: [tableMixin_noapp],
/* 初始额外赋值*/
async mounted() {
this.queryParams.xmid=this.app.rowItem.xmid
this.queryParams.sbid=this.app.queryParams.mid
this.$nextTick(()=>{
this.$refs['TablePager'].pageQuery()
})
},
data() {
return {
sjdata:{},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogWidth:'85%',
DialogTitle:'',
/* 基础url*/
baseUrl: '/aqgl/sbgl/sbbyjl',
/* 查询参数*/
queryParams: {
// info: '',
// mid:''
},
/* 表格标题对应参数*/
tableTitle: [
// {label: "设备ID", prop: "mid", fieldType: "ftString",width:192},
// {label: "序号", prop: "xh", fieldType: "int"},
// {label: "保养项目", prop: "xmid", fieldType: "ftString",width:192},
{label: "上次保养日期", prop: "scbyrq", fieldType: "ftDateTime"},
{label: "预计下次计划日期", prop: "xcbyrq", fieldType: "ftDateTime"},
{label: "上次保养人", prop: "scbyrName", fieldType: "ftString",width:192},
{label: "保养说明", prop: "bysm", fieldType: "ftString",width:300},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
{label: "创建人", prop: "cjr", fieldType: "ftString"},
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
// {label: "上次保养记录ID", prop: "scbyjlid", fieldType: "ftString",width:192},
]
}
},
methods: {
xzry(){
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle='选择保养项目'
this.showDialog=true
this.DialogName='ksry'
} else {
this.$warning('请选中一行操作');
}
},
drst(){
this.showDialog=true
},
/* 基础查询*/
query: querySbbyjl,
/* 基础增*/
// apiAdd: doDtlAdd,
// /* 基础更新*/
// apiUpdate: doDtlUpdate,
// /* 删除操作*/
// apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
DtlEdit,
Selector
}
}
</script>
<style scoped>
</style>
<template>
<div class="min_full" slot='form' style="height:100%;width:100%">
<CkxmEdit :app='this' v-if='showDialog&&DialogName=="byfk"' ></CkxmEdit>
<Selector :app='this' v-if='showDialog&&DialogName=="ksry"' ></Selector>
<Byjl :app='this' v-if='showDialog&&DialogName=="byjl"' ></Byjl>
<!-- 按钮操作-->
<el-row class="tool-bar">
<el-button @click="xzry" size='mini' type="primary">导入项目</el-button>
<el-button @click="xzry" size='mini' type="primary">保养记录</el-button>
<el-button @click="byfk" size='mini' type="primary">保养反馈</el-button>
<el-button @click="byjl" size='mini' type="primary">保养记录</el-button>
</el-row>
<!-- 表格-->
<div class="tablePagers" style="height: 380px;">
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :delParams="'mxid'"
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
......@@ -20,6 +22,8 @@
<script>
/* 引入需要的接口*/
import Selector from './selector'
import CkxmEdit from './ckxmEdit'
import Byjl from './byjl'
import {
doQuery,
doAdd,
......@@ -73,12 +77,12 @@
},
/* 表格标题对应参数*/
tableTitle: [
{label: "编码", prop: "code", fieldType: "ftString",width:120},
{label: "名称", prop: "name", fieldType: "ftString",width:300},
// {label: "编码", prop: "code", fieldType: "ftString",width:120},
{label: "名称", prop: "byxmName", fieldType: "ftString",width:300},
{label: "保养周期-天", prop: "byzq", fieldType: "int",width:252},
{label: "公司", prop: "gsName", fieldType: "ftString",width:192},
{label: "停用标志", prop: "tybz", fieldType: "ftString",width:100},
{label: "停用日期", prop: "tyrq", ...this.$common('ftDateTime'),width:192},
// {label: "公司", prop: "gsName", fieldType: "ftString",width:192},
// {label: "停用标志", prop: "tybz", fieldType: "ftString",width:100},
// {label: "停用日期", prop: "tyrq", ...this.$common('ftDateTime'),width:192},
{label: "标准工时", prop: "bzgs", fieldType: "float",width:192},
{label: "附件数", prop: "attachcount", fieldType: "int",width:192},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
......@@ -90,18 +94,36 @@
}
},
methods: {
byjl(){
if (this.selectOne || this.clickOne) {
this.DialogTitle='保养记录'
this.showDialog=true
this.DialogName='byjl'
this.DialogWidth='85%'
} else {
this.$warning('请选中一行操作');
}
},
byfk(){
if (this.selectOne || this.clickOne) {
this.DialogTitle='反馈记录'
this.showDialog=true
this.DialogName='byfk'
this.DialogWidth='50%'
} else {
this.$warning('请选中一行操作');
}
},
xzry(){
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle='选择保养项目'
this.showDialog=true
this.DialogName='ksry'
this.DialogWidth='85%'
} else {
this.$warning('请选中一行操作');
}
},
drst(){
this.showDialog=true
},
/* 基础查询*/
query: doQuery,
......@@ -118,7 +140,9 @@
},
components: {
DtlEdit,
Selector
Selector,
CkxmEdit,
Byjl
}
......
<template>
<DefaultDialog :app='app'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="上次保养日期" ref="scbyrq" prop="scbyrq">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.scbyrq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="预计下次计划日期" ref="xcbyrq" prop="xcbyrq">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.xcbyrq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="保养说明" ref="bysm" prop="bysm">
<el-input type="textarea" :readonly="readonly" v-model="form.bysm" ></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="上次保养记录ID" ref="scbyjlid" prop="scbyjlid">
<el-input :readonly="readonly" v-model="form.scbyjlid" ></el-input>
</el-form-item>
</el-col>
</el-row> -->
</el-form>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button type="primary" @click="save()">确 认</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
/* 引入需要的接口*/
import {
doQuery,
doAdd,
// doUpdate,
// doDelete
} from '@/api/equipment/sbbyjl.js';
import {
doSave
} from "@/api/equipment/sbbymx.js"
/* edit页面*/
import {
tableMixin_noapp
} from 'common'
export default {
mixins: [tableMixin_noapp],
props:['app'],
/* 初始额外赋值*/
async mounted() {
this.form.xmid=this.app.rowItem.xmid
this.form.mid=this.app.queryParams.mid
},
data() {
return {
form: {
//ID
id:'',
//设备ID
mid:'',
//序号
//保养项目
xmid:'',
//上次保养日期
scbyrq:new Date().getTime(),
//预计下次计划日期
xcbyrq:new Date().getTime(),
//备注
bz:'',
},
}
},
methods: {
/* 基础查询*/
query: doQuery,
/* treeQuery */
/* 初始化赋值操作*/
init() {
},
save(){
doAdd({...this.form}).then(res=>{
})
}
},
components:{
}
}
</script>
<style scoped>
</style>
......@@ -62,7 +62,7 @@
</div>
<!-- 保养项目详情-->
<div class="min_full" style="height: 60vh;" >
<Ckxm ref='ckxm' :app='this' ></Ckxm>
<Ckxm v-if="tabData.length>0&&singleItem.id" ref='ckxm' :app='this' ></Ckxm>
</div>
</div>
......@@ -155,7 +155,9 @@
},
selectedTree(e){
this.queryParams.gsid=e.id||'root'
this.$refs['TablePager'].pageQuery()
this.$refs['TablePager'].pageQuery({
setFirstCurrent:true
})
},
/* 查看人员*/
byxm(){
......
......@@ -82,7 +82,7 @@ export default {
props:['app'],
/* 初始额外赋值*/
async mounted() {
this.selectedList=_.cloneDeep(this.app.tabData)
this.selectedList=[]
this.getData(this.currentPage, this.pageSize);
},
data() {
......@@ -234,13 +234,29 @@ props:['app'],
},
save(){
/* 查看是否重复*/
let arlList=[]
let iscf=true
this.app.tabData.forEach(item=>{
arlList.push(item.xmid)
})
this.selectedList.forEach(item=>{
if( arlList.indexOf(item.id)!=-1){
iscf=false
}
})
if(iscf==false){
this.$warning('已选保养项目存在')
return
}
let xmList=[]
this.selectedList.forEach(row=>{
row.xmid=row.id
xmList.push({xmid:row.id})
// delete row.id
})
let params={
sbid:this.app.queryParams.mid,
data:this.selectedList
datas:xmList
}
doSave(params).then(res=>{
if(res.success){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment