opt: 路由同步,设备监控优化
This commit is contained in:
@@ -36,6 +36,20 @@
|
||||
<el-option v-for="item in device_types" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('device.device_table_title.region')">
|
||||
<el-select
|
||||
v-model="query.region"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
:placeholder="$t('device.device_table_title.region')"
|
||||
class="filter-item"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in regions" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<el-table-column prop="start_point_code" :label="$t('Inst.table.start_point_code')" :min-width="flexWidth('start_point_code',crud.data,$t('Inst.table.start_point_code'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('Inst.table.next_point_code')" :min-width="flexWidth('next_point_code',crud.data,$t('Inst.table.next_point_code'))" />
|
||||
<el-table-column prop="start_point_code2" :label="$t('Inst.table.start_point_code2')" :min-width="flexWidth('start_point_code2',crud.data,$t('Inst.table.start_point_code2'))" />
|
||||
<el-table-column prop="next_point_code2" :label="$t('Inst.table.next_point_code2')" :min-width="flexWidth('next_point_code2',crud.data,$t('Inst.table.snext_point_code2'))" />
|
||||
<el-table-column prop="next_point_code2" :label="$t('Inst.table.next_point_code2')" :min-width="flexWidth('next_point_code2',crud.data,$t('Inst.table.next_point_code2'))" />
|
||||
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')" :min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))" />
|
||||
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')" :min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))" />
|
||||
<el-table-column prop="carno" :label="$t('Inst.table.carno')" :min-width="flexWidth('carno',crud.data,$t('Inst.table.carno'))" />
|
||||
@@ -180,21 +180,11 @@
|
||||
<el-table-column
|
||||
v-permission="['admin','instruction:edit','instruction:del']"
|
||||
:label="$t('auto.common.Operate')"
|
||||
width="250px"
|
||||
width="150px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<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')">{{ $t('Inst.table.Finish') }}</el-dropdown-item>-->
|
||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">{{ $t('auto.common.Cancel') }}</el-dropdown-item>-->
|
||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">{{ $t('auto.common.Forced_cancellation') }}</el-dropdown-item>-->
|
||||
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">{{ $t('auto.common.Initialize') }}</el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </el-dropdown>-->
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-finished"
|
||||
@@ -202,27 +192,20 @@
|
||||
>
|
||||
{{ $t('Inst.table.Finish') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-circle-close"
|
||||
@click="handleCommand(scope.$index, scope.row,'b')"
|
||||
>
|
||||
{{ $t('auto.common.Cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-error"
|
||||
@click="handleCommand(scope.$index, scope.row,'c')"
|
||||
>
|
||||
{{ $t('auto.common.Forced_cancellation') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-refresh"
|
||||
@click="handleCommand(scope.$index, scope.row,'d')"
|
||||
>
|
||||
{{ $t('auto.common.Initialize') }}
|
||||
</el-button>
|
||||
<el-dropdown size="mini">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">{{ $t('user.other.More') }}</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-circle-close"><span @click="handleCommand(scope.$index, scope.row,'b')">
|
||||
{{ $t('auto.common.Cancel') }}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-error"><span @click="handleCommand(scope.$index, scope.row,'c')">
|
||||
{{ $t('auto.common.Forced_cancellation') }}</span></el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
icon="el-icon-refresh"
|
||||
><span @click="handleCommand(scope.$index, scope.row,'d')">{{ $t('auto.common.Initialize') }}</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
slot="right"
|
||||
v-permission="['admin','task:synchronous']"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@@ -60,7 +61,7 @@
|
||||
@click="reload"
|
||||
>
|
||||
{{ $t('auto.common.synchronous') }}
|
||||
</el-button> -->
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:visible.sync="crud.status.cu"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
@@ -67,7 +67,6 @@
|
||||
<script>
|
||||
import crudStage from '@/api/acs/stage/stage'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
@@ -86,7 +85,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Stage',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div style="overflow: hidden">
|
||||
<el-select v-model="value" :placeholder="$t('auto.common.please')" @change="initStageData">
|
||||
<el-select v-model="value" :placeholder="$t('auto.common.please')" @change="initStageData(value)">
|
||||
<el-option
|
||||
v-for="item in stageParam"
|
||||
:key="item.value"
|
||||
@@ -259,12 +259,12 @@ export default {
|
||||
dialogFormVisible10: false,
|
||||
stageParam: [{// 舞台参数
|
||||
value: 'age',
|
||||
label: 'age'
|
||||
label: '一楼监控'
|
||||
}, {
|
||||
value: 'stage_code',
|
||||
label: 'stage_code'
|
||||
label: '二楼监控'
|
||||
}],
|
||||
value: '',
|
||||
value: 'age',
|
||||
stage_code: '',
|
||||
form: {
|
||||
device_code: '',
|
||||
@@ -364,6 +364,10 @@ export default {
|
||||
initStageData(var1) {
|
||||
// 获取舞台数据
|
||||
this.stage_code = var1
|
||||
if (!this.stage_code) {
|
||||
// 可以在这里设置一个默认的stage_code,或者直接返回
|
||||
this.stage_code = 'age'
|
||||
}
|
||||
crudStage.getNewStageDataByCode(this.stage_code).then(res => { // 通过舞台编码获取舞台数据并且赋值到lf对象
|
||||
data = JSON.parse(res.stage_data)
|
||||
lf.render(data)
|
||||
|
||||
Reference in New Issue
Block a user