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>
<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-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>
</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>
<script>
import {
editMixin
} from 'common'
import gjxx from '@/views/auxinput/gjxx'
export default {
mixins: [editMixin],
mounted() {
this.$nextTick(() => {
this.form.mid = this.app.queryParams.mid
if (!this.form.mid) {
this.$warning('请选择一条检修内容')
this.$refs.RelDialog.closeAll()
props: {
app: {
type: Object,
default: () => {
return {}
}
})
}
},
mixins: [editMixin],
async mounted() {
},
data() {
return {
readonly: false,
editColItemList: [{
label: '检修工具',
prop: 'gjxxid',
......@@ -42,16 +54,53 @@
transform: {
value: 'id',
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: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('save', this.form)
}
})
}
}
}
</script>
<style scoped>
</style>
<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-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>
</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>
<script>
import {
editMixin
} from 'common'
import wlxx from '@/views/auxinput/wlxx'
export default {
mixins: [editMixin],
mounted() {
this.$nextTick(() => {
this.form.mid = this.app.queryParams.mid
if (!this.form.mid) {
this.$warning('请选择一条检修内容')
this.$refs.RelDialog.closeAll()
props: {
app: {
type: Object,
default: () => {
return {}
}
})
}
},
mixins: [editMixin],
async mounted() {
},
data() {
return {
editColItemList: [{
label: '物料名称',
prop: 'wlid',
span: 24,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
dynamic: true,
code: true,
component: wlxx,
label: 'wlxxName',
transform: {
value: 'id',
label: 'name'
}
}
}
readonly: false,
editColItemList: [
{
label: '耗材名称',
prop: 'hcName',
span: 12,
type: 'input',
},
{
label: '耗材规格/型号',
prop: 'hzgg',
span: 12,
type: 'input',
},
{
label: '耗材材质',
prop: 'hccz',
span: 12,
type: 'input',
},
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('save', this.form)
}
})
}
}
}
</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>
<div class="min_full" style="border-top: 0px;height: 140vh;">
<div style="height:477px;width: 100%;">
<BasePage @getRow='getRow' class="min_full" style="height: 477px;border: 0px;border-bottom: 5px solid #eee;"
ref="basePage" :config="config">
<template #dialog="ctx">
</template>
<template #toolbar="ctx">
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :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>
<BasePage class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
import Jxgj from './jxgj'
import Jxwl from './jxwl'
export default {
name: 'sbjxxx',
data() {
return {
activeName: 'jxgj',
config: {
/* 基本配置*/
url: 'jxgl/usbjx',
tableTitle: [
{
tableTitle: [{
title: "设备名称",
field: "sbxxName",
width: 180
......@@ -63,7 +38,7 @@
fieldType: "checkbox"
},
{
title: "大修码",
title: "大修码",
field: "dxdm",
width: 350
},
......@@ -158,12 +133,12 @@
value: ''
},
{
label: '设备编码',
prop: 'sbxxCode',
span: 6,
type: 'input',
value: ''
}
label: '设备编码',
prop: 'sbxxCode',
span: 6,
type: 'input',
value: ''
}
]
],
......@@ -176,34 +151,18 @@
methods: {
/* 示例*/
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: {
Edit,
Jxgj,
Jxwl
}
}
</script>
<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>
<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