|
|
@@ -17,6 +17,8 @@
|
|
|
full-height="calc(100vh - 115px)"
|
|
|
tool-class="ele-toolbar-form"
|
|
|
cache-key="systemOrgUserTable"
|
|
|
+ @select="selectChange"
|
|
|
+ @select-all="changeSelectAll"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
@@ -59,6 +61,27 @@
|
|
|
>
|
|
|
设置使用单位
|
|
|
</el-button> -->
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ :disabled="checkRadioData.length == 0"
|
|
|
+ icon="el-icon-s-tools"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ type="danger"
|
|
|
+ @click="setStatus(1)"
|
|
|
+ v-if="$hasPermission('main:substance:stop')"
|
|
|
+ >
|
|
|
+ 批量停机
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ :disabled="checkRadioData.length == 0"
|
|
|
+ icon="el-icon-setting"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="setStatus(2)"
|
|
|
+ v-if="$hasPermission('main:substance:run')"
|
|
|
+ >
|
|
|
+ 批量运行
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<!-- 编码列 -->
|
|
|
<template v-slot:code="{ row }">
|
|
|
@@ -100,7 +123,9 @@
|
|
|
import {
|
|
|
getBoatList,
|
|
|
downloadCategory,
|
|
|
- getAssetList
|
|
|
+ getAssetList,
|
|
|
+ batchStop,
|
|
|
+ batchRun
|
|
|
} from '@/api/ledgerAssets';
|
|
|
import batchSetDialog from '@/views/ledgerAssets/equipment/components/batchSetDialog.vue';
|
|
|
import DialogMoveto from '@/views/ledgerAssets/equipment/components/DialogMoveTo.vue';
|
|
|
@@ -122,6 +147,7 @@
|
|
|
businessStatus,
|
|
|
assetLevel: [],
|
|
|
isConsumer: false,
|
|
|
+ checkRadioData: [],
|
|
|
// 表格列配置
|
|
|
columns: [
|
|
|
{
|
|
|
@@ -295,6 +321,15 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'runStatus',
|
|
|
+ label: '运行状态',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: (_row) => {
|
|
|
+ return _row.runStatus == 5 ? '停机' : '运行';
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'pathName',
|
|
|
label: '位置',
|
|
|
@@ -408,6 +443,29 @@
|
|
|
rootCategoryLevelId: this.rootId
|
|
|
};
|
|
|
downloadCategory(params, '原料台账导出数据');
|
|
|
+ },
|
|
|
+ // 全选
|
|
|
+ changeSelectAll(arr) {
|
|
|
+ console.log(arr);
|
|
|
+ if (arr.length != 0) {
|
|
|
+ this.checkRadioData = arr;
|
|
|
+ } else {
|
|
|
+ this.checkRadioData = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectChange(selection, row) {
|
|
|
+ if (selection.length != 0) {
|
|
|
+ this.checkRadioData = selection;
|
|
|
+ } else {
|
|
|
+ this.checkRadioData = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setStatus(type) {
|
|
|
+ let api = type == 1 ? batchStop : batchRun;
|
|
|
+ api(this.checkRadioData.map((item) => item.id)).then((res) => {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.sucesstion(true);
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
watch: {
|