Commit 83c3c025 by xionglin

dbioit页面修改

parent 89663ee2
......@@ -19,3 +19,8 @@ export function edit(data) {
export function deleteById(data) {
return Api.post('/service/oit/deleteById', data)
}
export function queryByTable(data) {
return Api.post('/service/oit/queryByTable', data)
}
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="关联的表名" prop="objtyp">
<c-select
v-model="model.objtyp"
placeholder="请输入关联的表名"
:code="getCodesByKey('objtypcodetable')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item
label="key"
prop="ownref"
>
<c-fullbox>
<c-input
v-model="model.ownref"
maxlength="16"
placeholder="请输入"
@keyup.enter.native="queryKeyByObj"
>
</c-input>
</c-fullbox>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="nam" prop="nam">
<c-input
v-model="model.nam"
placeholder="请输入nam"
disabled
>
</c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="子类型" prop="subtyp">
<c-select
v-model="model.subtyp"
placeholder="请输入子类型"
:code="getCodesByKey('subtypcodetable')"
>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="交易简称" prop="subbus">
<c-input
v-model="model.subbus"
placeholder="请输入交易简称"
disabled
>
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="提示信息级别" prop="inflev">
<c-select
v-model="model.inflev"
placeholder="请输入提示信息级别"
:code="getCodesByKey('inflevcodetable')"
>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<el-form-item label="提示信息" prop="inftxt">
<c-input
type="textarea"
v-model="model.inftxt"
placeholder="请输入提示信息"
>
</c-input>
</el-form-item>
</c-col>
<el-dialog :visible.sync="centerDialogVisible">
<el-table :data="oitData" :columns="oitColumns" style="width:100%" @row-dblclick="checkData">
<el-table-column
v-for="(item, key) in oitColumns"
:key="key"
:label="item.label"
:prop="item.prop"
>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import codes from '~/config/CodeTable'
import { queryByTable } from '~/service/test/oit.js'
export default {
name: '',
props: ['model'],
data() {
return {
centerDialogVisible:false,
oitData:[],
oitColumns: [
{ label: 'Key', prop: 'ownref', width: '120' },
{ label: 'Name', prop: 'nam', width: '120' },
],
}
},
computed: {
isDisabled() {
//return this.type === 'edit'
return false
},
},
methods: {
getCodesByKey(key) {
return codes[key] ?? []
},
queryKeyByObj(){
if(this.model.objtyp == ''){
this.$message.error("表名不能为空")
return
}
this.centerDialogVisible=true;
queryByTable(this.model).then((res)=>{
this.oitData = res;
})
},
checkData(row){
this.centerDialogVisible = false
console.log("=========")
console.log(row)
this.model.ownref = row.ownref
this.model.nam = row.nam;
}
},
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -55,12 +55,14 @@ import Oit, { Pattern } from '../../model/Oit'
import OitInfo from './OitInfo.vue'
import Oitp1 from './Oitp1.vue'
import Oitp2 from './Oitp2.vue'
import Oitp3 from './Oitp3.vue'
import { queryById, add, edit, deleteById } from '~/service/test/oit.js'
import Oitp3Vue from './Oitp3.vue'
export default {
name: 'StaticsDbioit',
components: {
'm-oitp0': OitInfo,
'm-oitp0': Oitp3,
'm-oitp1': Oitp1,
'm-oitp2': Oitp2,
},
......
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