Commit 9150e2a3 authored by 李苏's avatar 李苏 💬

检修功能合并,scss ,模型 首页等调整

parent 9af6e9b3
This diff is collapsed.
This diff is collapsed.
<template>
<DefaultDialog :app='app'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<!-- 辅助编码-->
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
mixins: [editMixin],
async mounted() {
},
data() {
return {
readonly: false,
editColItemList: [
{
label: '备件名称',
prop: 'bpbjmc',
span: 12,
type: 'input',
},
{
label: '备件编码',
prop: 'bpbjbm',
span: 12,
type: 'input',
},
{
label: '备件规格',
prop: 'bpbjgg',
span: 12,
type: 'input',
},
{
label: '备件材质',
prop: 'bpbjcz',
span: 12,
type: 'input',
},
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('save', this.form)
}
})
}
}
}
</script>
<style scoped>
</style>
<template> <template>
<RelDialog ref="RelDialog" width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <DefaultDialog :app='app'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<!-- 辅助编码-->
<el-row :gutter="20" :app="this"> <el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" /> :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row> </el-row>
</el-form> </el-form>
</RelDialog> <div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template> </template>
<script> <script>
import { import {
editMixin editMixin
} from 'common' } from 'common'
import gjxx from '@/views/auxinput/gjxx' import gjxx from '@/views/auxinput/gjxx'
export default { export default {
mixins: [editMixin],
mounted() { props: {
this.$nextTick(() => { app: {
this.form.mid = this.app.queryParams.mid type: Object,
if (!this.form.mid) { default: () => {
this.$warning('请选择一条检修内容') return {}
this.$refs.RelDialog.closeAll()
} }
}) }
},
mixins: [editMixin],
async mounted() {
}, },
data() { data() {
return { return {
readonly: false,
editColItemList: [{ editColItemList: [{
label: '检修工具', label: '检修工具',
prop: 'gjxxid', prop: 'gjxxid',
...@@ -42,16 +54,53 @@ ...@@ -42,16 +54,53 @@
transform: { transform: {
value: 'id', value: 'id',
label: 'name' label: 'name'
},
give:(row)=>{
this.form.jxgjCode=row.code
this.form.cz=row.cz
this.form.ggxh=row.ggxh
} }
} }
} },
{
label: '工具编码',
readonly:true,
prop: 'jxgjCode',
span: 12,
type: 'input',
},
{
label: '材质',
readonly:true,
prop: 'cz',
span: 12,
type: 'input',
},
{
label: '规格型号',
readonly:true,
prop: 'ggxh',
span: 12,
type: 'input',
},
] ]
} }
}, },
methods: { methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('save', this.form)
}
})
}
} }
} }
</script> </script>
<style scoped>
</style>
<template> <template>
<RelDialog ref="RelDialog" width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <DefaultDialog :app='app'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<!-- 辅助编码-->
<el-row :gutter="20" :app="this"> <el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" /> :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row> </el-row>
</el-form> </el-form>
</RelDialog> <div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template> </template>
<script> <script>
import { import {
editMixin editMixin
} from 'common' } from 'common'
import wlxx from '@/views/auxinput/wlxx'
export default { export default {
mixins: [editMixin],
mounted() { props: {
this.$nextTick(() => { app: {
this.form.mid = this.app.queryParams.mid type: Object,
if (!this.form.mid) { default: () => {
this.$warning('请选择一条检修内容') return {}
this.$refs.RelDialog.closeAll()
} }
}) }
},
mixins: [editMixin],
async mounted() {
}, },
data() { data() {
return { return {
editColItemList: [{ readonly: false,
label: '物料名称', editColItemList: [
prop: 'wlid', {
span: 24, label: '耗材名称',
required: true, prop: 'hcName',
type: 'AuxInput', span: 12,
typeConfig: { type: 'input',
isRequest: false, },
dynamic: true, {
code: true, label: '耗材规格/型号',
component: wlxx, prop: 'hzgg',
label: 'wlxxName', span: 12,
transform: { type: 'input',
value: 'id', },
label: 'name' {
} label: '耗材材质',
prop: 'hccz',
} span: 12,
} type: 'input',
},
] ]
} }
}, },
methods: { methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('save', this.form)
}
})
}
} }
} }
</script> </script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
<template> <template>
<div class="min_full" style="border-top: 0px;height: 140vh;"> <BasePage class="min_full" :config="config">
<div style="height:477px;width: 100%;"> <template #dialog="ctx">
<BasePage @getRow='getRow' class="min_full" style="height: 477px;border: 0px;border-bottom: 5px solid #eee;" <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
ref="basePage" :config="config"> </template>
<template #dialog="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
</template> <!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
<template #toolbar="ctx"> </template>
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh() </BasePage>
}" :url="'sbgl/usbxx/import'" /> -->
<AttachFileShow :app='ctx.basePage' ></AttachFileShow>
</template>
</BasePage>
</div>
<div style="height: calc(100% - 477px);width: 100%;">
<el-tabs class="full" v-model="activeName">
<el-tab-pane class="full" label="检修工具" style="height: 100%;" name="jxgj">
<Jxgj :app='this' class="full" ref='jxgj' />
</el-tab-pane>
<el-tab-pane class="full" label="检修物料" style="height: 100%;" name="jxwl">
<Jxwl :app='this' class="full" ref='jxwl' />
</el-tab-pane>
</el-tabs>
</div>
</div>
</template> </template>
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
import Jxgj from './jxgj'
import Jxwl from './jxwl'
export default { export default {
name: 'sbjxxx', name: 'sbjxxx',
data() { data() {
return { return {
activeName: 'jxgj',
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'jxgl/usbjx', url: 'jxgl/usbjx',
tableTitle: [ tableTitle: [{
{
title: "设备名称", title: "设备名称",
field: "sbxxName", field: "sbxxName",
width: 180 width: 180
...@@ -63,7 +38,7 @@ ...@@ -63,7 +38,7 @@
fieldType: "checkbox" fieldType: "checkbox"
}, },
{ {
title: "大修码", title: "大修码",
field: "dxdm", field: "dxdm",
width: 350 width: 350
}, },
...@@ -158,12 +133,12 @@ ...@@ -158,12 +133,12 @@
value: '' value: ''
}, },
{ {
label: '设备编码', label: '设备编码',
prop: 'sbxxCode', prop: 'sbxxCode',
span: 6, span: 6,
type: 'input', type: 'input',
value: '' value: ''
} }
] ]
], ],
...@@ -176,34 +151,18 @@ ...@@ -176,34 +151,18 @@
methods: { methods: {
/* 示例*/ /* 示例*/
getRow(row) { getRow(row) {
this.$refs.jxgj.$refs.basePage.queryParams.mid = row.id
this.$refs.jxgj.$refs.basePage.refresh()
this.$refs.jxwl.$refs.basePage.queryParams.mid = row.id
this.$refs.jxwl.$refs.basePage.refresh()
} }
}, },
components: { components: {
Edit, Edit,
Jxgj,
Jxwl
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-tabs__content {
height: calc(100% - 60px);
}
::v-deep .el-tabs__nav-scroll {
padding-left: 10px;
}
.hastree {
height: calc(100vh - 84px);
overflow: hidden;
overflow-x: auto;
}
</style> </style>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full"
style="height: 100%;border: 0px;" :autoQuery='false' :config="config">
<template #dialog="ctx">
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'sbdagl/sbxx/bjqd/import'" /> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
data() {
return {
power: {
add: true,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: true,
/* 是否渲染右侧操作按钮 */
operateButtons: true,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'jxgl/ujxgj',
tableTitle: [{
title: "检修工具",
field: "jxgjName",
width: 140
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [],
}
}
},
methods: {
getRow(val) {
this.$emit('getRow', val)
},
demo(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
console.log(ctx.singleItem)
} else {
this.$warning('请选中一条数据')
}
}
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full"
style="height: 100%;border: 0px;" :autoQuery='false' :config="config">
<template #dialog="ctx">
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'sbdagl/sbxx/bjqd/import'" /> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
mounted(){
this.$nextTick(()=>{
setTimeout(()=>{
this.$refs.basePage.$refs.TablePager.czFixed=undefined
},2000)
})
},
data() {
return {
power: {
add: true,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: true,
/* 是否渲染右侧操作按钮 */
operateButtons: true,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'jxgl/ujxwl',
tableTitle: [{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "创建人",
field: "cjr",
width: 140
},
{
title: "创建时间",
field: "cjsj",
fieldType: 'ftDateTime'
},
{
title: "维护人",
field: "whr",
hidden: true
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime',
hidden: true
}
],
queryParams: [],
}
}
},
methods: {
getRow(val) {
this.$emit('getRow', val)
},
demo(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
console.log(ctx.singleItem)
} else {
this.$warning('请选中一条数据')
}
}
},
components: {
Edit
}
}
</script>
<style>
</style>
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