更新
This commit is contained in:
@@ -45,9 +45,6 @@
|
||||
<el-form-item label="值">
|
||||
<el-input v-model="form.value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="操作" prop="description">-->
|
||||
<!-- <el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea" />-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
@@ -74,22 +71,27 @@
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-menu" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">取消</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">强制取消</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">初始化</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button slot="right" size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="dialogFormVisible = true">
|
||||
查询历史
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<!--弹窗设置设备与图标绑定与角度-->
|
||||
<el-dialog title="历史" :visible.sync="dialogFormVisible" width="35%">
|
||||
<el-form :model="form" size="small">
|
||||
<el-form-item label="unified_key" prop="unified_key" label-width="100px">
|
||||
<el-input v-model="form.unified_key" :disabled="true" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="code" prop="key" label-width="100px">
|
||||
<el-input v-model="form.key" :disabled="true" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -102,7 +104,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import { getDicts } from '@/api/system/dict'
|
||||
|
||||
const defaultForm = {
|
||||
unified_key: 'opc_value',
|
||||
unified_key: '',
|
||||
key: null,
|
||||
value: null,
|
||||
last_modify_date: null
|
||||
@@ -142,7 +144,14 @@ export default {
|
||||
],
|
||||
permission: {
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
rules: {
|
||||
},
|
||||
form: {
|
||||
unified_key: 'opc_value',
|
||||
key: null,
|
||||
value: null,
|
||||
last_modify_date: null
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -155,26 +164,7 @@ export default {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
// https://www.cnblogs.com/jdWu-d/p/11898666.html
|
||||
beforeHandleCommand(index, row, command) {
|
||||
return {
|
||||
'index': index,
|
||||
'row': row,
|
||||
'command': command
|
||||
}
|
||||
},
|
||||
handleCommand(command) {
|
||||
switch (command.command) {
|
||||
case 'a':// 完成
|
||||
this.finish(command.index, command.row)
|
||||
break
|
||||
case 'b':// 取消
|
||||
this.cancel(command.index, command.row)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user