refactor: 使用mybatis-plus重构运输公司基本信息
This commit is contained in:
@@ -20,13 +20,14 @@
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand">
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
:key="item.class_id"
|
||||
:label="item.class_name"
|
||||
:value="item.class_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
@@ -102,7 +103,7 @@
|
||||
<el-table-column prop="class_desc" label="分类简要描述" />
|
||||
<el-table-column prop="update_name" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" />
|
||||
<el-table-column prop="is_modify" :formatter="modifyFormat" label="是否可修改" />
|
||||
<el-table-column prop="is_modify" label="是否可修改" />
|
||||
<el-table-column
|
||||
v-permission="['admin','Classstandard:edit','Classstandard:del']"
|
||||
label="操作"
|
||||
@@ -185,7 +186,11 @@ export default {
|
||||
return {
|
||||
classes: [],
|
||||
classNames: [],
|
||||
permission: {},
|
||||
permission: {
|
||||
add: ['admin', 'Classstandard:add'],
|
||||
edit: ['admin', 'Classstandard:edit'],
|
||||
del: ['admin', 'Classstandard:del']
|
||||
},
|
||||
rules: {
|
||||
class_id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
|
||||
@@ -181,8 +181,8 @@
|
||||
v-model="scope.row.is_used"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
||||
/>
|
||||
</template>
|
||||
@@ -206,7 +206,7 @@
|
||||
<el-table-column prop="update_optname" width="120px" label="修改人姓名" :min-width="flexWidth('update_optname',crud.data,'修改人姓名')" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<el-table-column v-permission="['admin','Trans:edit','Trans:del']" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
@@ -284,6 +284,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'Trans:add'],
|
||||
edit: ['admin', 'Trans:edit'],
|
||||
del: ['admin', 'Trans:del']
|
||||
},
|
||||
rules: {
|
||||
cust_id: [
|
||||
@@ -304,13 +307,15 @@ export default {
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(data, val) {
|
||||
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.unit_name + ', 是否继续?', '提示', {
|
||||
const tipA = val ? '启用' : '停用'
|
||||
console.log(data)
|
||||
this.$confirm('此操作将 "' + tipA + '" ' + data.cust_name + ', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudTransportationbase.edit(data).then(res => {
|
||||
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.notify(tipA + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
if (data.is_used === '0') {
|
||||
data.is_used = '1'
|
||||
|
||||
Reference in New Issue
Block a user