This commit is contained in:
张江玮
2023-04-14 10:18:48 +08:00
parent 71c1dedd18
commit 18b3f9b31f
161 changed files with 6167 additions and 9030 deletions

View File

@@ -8,16 +8,24 @@
@close="close"
@open="open"
>
<el-row style="margin-bottom: 10px;">
<el-col :span="22">
<el-form :inline="true" class="demo-form-inline">
<el-form-item :inline="true" label="模糊搜索:">
<el-input v-model="query.search" placeholder="请输入编码、名称"/>
</el-form-item>
<rrOperation/>
</el-form>
</el-col>
</el-row>
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="编码名称">
<el-input
v-model="query.search"
clearable
size="mini"
placeholder="编码名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
<!--表格渲染-->
<el-table
ref="table"
@@ -26,25 +34,29 @@
style="width: 100%;"
size="mini"
border
:cell-style="{'text-align':'center'}"
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@select="handleSelectionChange"
@select-all="onSelectAll"
@current-change="clickChange"
>
<el-table-column v-if="!isSingle" type="selection" width="55"/>
<el-table-column v-if="!isSingle" type="selection" width="55" />
<el-table-column v-if="isSingle" label="选择" width="55">
<template slot-scope="scope">
<el-radio v-model="tableRadio" :label="scope.row"><i/></el-radio>
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
</template>
</el-table-column>
<el-table-column prop="point_code" label="设备编码" show-overflow-tooltip/>
<el-table-column prop="point_name" label="设备名称" show-overflow-tooltip/>
<!-- <el-table-column prop="extend_code" label="外部编码" show-overflow-tooltip/>-->
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
<el-table-column prop="device_model" label="设备型号" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.pdm_device_type[scope.row.device_model] }}
</template>
</el-table-column>
<el-table-column prop="extend_code" label="外部编码" show-overflow-tooltip />
</el-table>
<!--分页组件-->
<pagination/>
<pagination />
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
@@ -58,20 +70,16 @@
import CRUD, { header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import crudPoint from '@/api/wms/sch/point'
import crudDevice from '@/api/wms/pdm/device'
import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import crudClassstandard from '@/api/wms/basedata/classstandard'
export default {
name: 'EndPointDialog',
dicts: ['pdm_device_type'],
components: { rrOperation, pagination },
cruds() {
return CRUD({
title: '点位', url: 'api/point', crudMethod: { ...crudPoint },
query: {
is_have_workder: '1'
},
optShow: {}
})
return CRUD({ title: '设备', url: 'api/device', crudMethod: { ...crudDevice }, optShow: {}})
},
mixins: [presenter(), header()],
props: {
@@ -90,34 +98,26 @@ export default {
},
data() {
return {
formInline: {
search: ''
},
tableRadio: '',
tableData: [],
dialogVisible: false,
material: {}
classes: [],
tableRadio: null,
class_idStr: null,
checkrow: null,
rows: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
handler(newValue) {
this.dialogVisible = newValue
}
}
},
methods: {
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
clickChange(item) {
this.tableRadio = item
},
open() {
debugger
this.query.region_id = this.openParam
this.crud.toQuery()
},
close() {
@@ -151,11 +151,23 @@ export default {
onSelectAll() {
this.$refs.table.clearSelection()
},
clickChange(item) {
this.tableRadio = item
},
hand(value) {
this.crud.toQuery()
},
loadClass({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
setTimeout(() => {
callback()
}, 100)
})
}
}
}
}
@@ -173,7 +185,7 @@ export default {
margin-left: auto;
}
.el-table_body tr.current-row > td {
.el-table_body tr.current-row>td {
background-color: #e9e500;
}
</style>