优化
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<el-input v-model.trim="form.class_desc" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="顶级类目">
|
||||
<el-radio-group v-model="form.isTop" style="width: 140px">
|
||||
<el-radio-group v-model="form.isTop" style="width: 140px" @change="mychange">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -187,6 +187,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
base_data_type: null,
|
||||
permission: {},
|
||||
rules: {
|
||||
class_id: [
|
||||
@@ -290,6 +291,18 @@ export default {
|
||||
this.classes = date
|
||||
})
|
||||
},
|
||||
mychange(val) {
|
||||
if (val === '0' && this.form.base_data_type != null) {
|
||||
crudClassstandard.getClass({ base_data_type: this.form.base_data_type }).then(res => {
|
||||
this.classes = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
getClass() {
|
||||
crudClassstandard.getClass({ enabled: true }).then(res => {
|
||||
this.classes = res.content.map(function(obj) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :max-height="590" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<!-- <el-table-column type="selection" width="55" />-->
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="storagevehiclepoint_id" label="载具点位对应标识" />
|
||||
<el-table-column v-if="false" prop="set_type" label="对应类型" />
|
||||
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识" />
|
||||
@@ -74,16 +74,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" prop="point_id" label="点位标识" />
|
||||
<el-table-column v-if="false" prop="area_type" label="所属区域" />
|
||||
<el-table-column prop="update_optname" label="修改者" />
|
||||
<el-table-column prop="update_time" label="修改时间" />
|
||||
<!-- <el-table-column v-permission="['admin','storagevehiclepoint:edit','storagevehiclepoint:del']" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column prop="update_optname2" label="修改者" />
|
||||
<el-table-column prop="update_time2" label="修改时间" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -114,7 +106,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Storagevehiclepoint',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -147,6 +139,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
storageVehicleTypeList: [],
|
||||
checkrows: [],
|
||||
permission: {
|
||||
}}
|
||||
},
|
||||
@@ -156,16 +149,17 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
save() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
const data = {
|
||||
'data': this.$refs.table.data
|
||||
'data': this.checkrows
|
||||
}
|
||||
crudStoragevehiclepoint.save(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
|
||||
Reference in New Issue
Block a user