Commit dd756a6b authored by 李苏's avatar 李苏 💬

下平库

parent 86f0956e
<template> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;"> <div slot="form" style="display: flex;height: 70vh;">
<Xzgw @saveGw='saveGw' v-if="showDialog" :app='this' />
<BasePage ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> ref="basePage" <BasePage ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> ref="basePage"
:power='power' class="min_full" :config="config"> :power='power' class="min_full" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
import Xzgw from './xzgw.vue'
export default { export default {
props: { props: {
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
}, },
components: { components: {
Xzgw
}, },
data() { data() {
return { return {
...@@ -55,8 +54,8 @@ ...@@ -55,8 +54,8 @@
operateButtons: false, operateButtons: false,
workFlow: false, workFlow: false,
/* 表格 */ /* 表格 */
showSelection: true, showSelection: false,
saveSelected: true saveSelected: false
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
...@@ -168,7 +167,7 @@ ...@@ -168,7 +167,7 @@
}, },
{ {
prop: 'flId', prop: 'flId',
value: 'L' value: 'D'
}, },
] ]
...@@ -182,32 +181,33 @@ ...@@ -182,32 +181,33 @@
} }
}, },
methods: { methods: {
saveGw(form){
let list=this.$refs.basePage.$refs.TablePager.selectedList.map(item=>{ save() {
let ml={ let singleItem = this.$refs.basePage.singleItem
rqid:item.rqid,
kwid:item.kwid if (singleItem.id) {
}
return ml this.$confirm('是否继续操作?', '提示', {
}) confirmButtonText: '确定',
let params={ cancelButtonText: '取消',
datas:list, type: 'warning'
gwid:form.gwid }).then(() => {
} let params = {
this.$post('/lxyl/ckgl/ulkck/saveLkCk',params).then(res=>{ rqid: singleItem.rqid,
if(res.success){ kwid: singleItem.kwid,
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
} }
this.$post('/lxyl/ckgl/ulkck/savePkCk', params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.refresh()
}
})
}) })
},
save() {
let list = this.$refs.basePage.$refs.TablePager.selectedList || []
if (list.length == 0) {
this.$warning('请至少勾选一条数据')
} else { } else {
this.showDialog = true this.$warning('请至少勾选一条数据')
} }
} }
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
}, },
{ {
prop: 'type', prop: 'type',
value: 'L' value: 'D'
} }
], ],
......
<template>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this" class="editRow">
<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-if="(item.show==false)?false:true" :prop='item.prop' :key="item.prop" :type="item.type"
:typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</el-form>
</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>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
/* 初始化数据 */
},
data() {
return {
isLoading: false,
text: '加载中',
readonly: false,
editColItemList: [{
label: '工位',
prop: 'gwid',
span: 24,
required: true,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/jcsj/ugw/query',
transform: {
value: 'id',
label: 'name'
}
}
},
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('saveGw',this.form)
this.app.showDialog=false
}
})
}
}
}
</script>
<style scoped>
</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