|
|
|
@ -4,13 +4,12 @@ |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="24"> |
|
|
|
<basic-container> |
|
|
|
<basic-container> |
|
|
|
<avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" |
|
|
|
<avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" |
|
|
|
v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" |
|
|
|
v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" |
|
|
|
@row-save="rowSave" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" |
|
|
|
:before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
@search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange" |
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
@refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
<el-button v-show="permission.contentAdd" type="primary" size="small" |
|
|
|
<el-button v-show="permission.contentAdd" type="primary" size="small" @click="handleAdd">新建</el-button> |
|
|
|
@click="handleAdd">新建</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template slot-scope="{ row }" slot="isOpen"> |
|
|
|
<template slot-scope="{ row }" slot="isOpen"> |
|
|
|
<el-tag :type="row.isOpen == 0 ? 'danger' : 'success'">{{ row.isOpen == 0 ? '停用' : '启用' |
|
|
|
<el-tag :type="row.isOpen == 0 ? 'danger' : 'success'">{{ row.isOpen == 0 ? '停用' : '启用' |
|
|
|
@ -19,18 +18,16 @@ |
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
<el-button v-show="permission.contentView" @click="handleView(row)">查看</el-button> |
|
|
|
<el-button v-show="permission.contentView" @click="handleView(row)">查看</el-button> |
|
|
|
<el-button v-show="permission.contentEdit" @click="handleEdit(row)">编辑</el-button> |
|
|
|
<el-button v-show="permission.contentEdit" @click="handleEdit(row)">编辑</el-button> |
|
|
|
<el-button @click="startPlan(row)" |
|
|
|
<el-button @click="startPlan(row)" v-show="row.isOpen == 0 && permission.contentSetting">启用</el-button> |
|
|
|
v-show="row.isOpen == 0 && permission.contentSetting">启用</el-button> |
|
|
|
<el-button @click="stopPlan(row)" v-show="row.isOpen == 1 && permission.contentSetting">停用</el-button> |
|
|
|
<el-button @click="stopPlan(row)" |
|
|
|
|
|
|
|
v-show="row.isOpen == 1 && permission.contentSetting">停用</el-button> |
|
|
|
|
|
|
|
<el-button @click="deletePlan(row)" v-show="permission.contentDelete">删除</el-button> |
|
|
|
<el-button @click="deletePlan(row)" v-show="permission.contentDelete">删除</el-button> |
|
|
|
<el-button @click="handleDownload(row)" |
|
|
|
<el-button @click="handleDownload(row)" v-show="permission.contentDelete">下载</el-button> |
|
|
|
v-show="permission.contentDelete">下载</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" @click="handleExportDevice(row)">导出</el-button> |
|
|
|
<el-button type="primary" @click="handleExportDevice(row)">导出</el-button> |
|
|
|
<!-- <el-button @click="handleImport(row)">导入</el-button> --> |
|
|
|
<!-- <el-button @click="handleImport(row)">导入</el-button> --> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :append-to-body="true" width="70%" :close-on-click-modal="false"> |
|
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :append-to-body="true" width="70%" |
|
|
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
<addDialog :unitData="unitData" :title="dialogTitle" :detailForm="detailForm" ref="addDialog"> |
|
|
|
<addDialog :unitData="unitData" :title="dialogTitle" :detailForm="detailForm" ref="addDialog"> |
|
|
|
</addDialog> |
|
|
|
</addDialog> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
@ -142,12 +139,12 @@ export default { |
|
|
|
columnBtn: false, |
|
|
|
columnBtn: false, |
|
|
|
menuWidth: 300, |
|
|
|
menuWidth: 300, |
|
|
|
searchShowBtn: false, // 栏目折叠显隐 |
|
|
|
searchShowBtn: false, // 栏目折叠显隐 |
|
|
|
refreshBtn: false, // 刷新 |
|
|
|
refreshBtn: false, // 刷新 |
|
|
|
columnBtn: false, // 操作列显隐 |
|
|
|
columnBtn: false, // 操作列显隐 |
|
|
|
gridBtn:false, |
|
|
|
gridBtn: false, |
|
|
|
excelBtn: false, // 导出Excel |
|
|
|
excelBtn: false, // 导出Excel |
|
|
|
printBtn: false, // 表格打印导出 |
|
|
|
printBtn: false, // 表格打印导出 |
|
|
|
filterBtn: false, // 筛选 |
|
|
|
filterBtn: false, // 筛选 |
|
|
|
column: [ |
|
|
|
column: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "巡检计划单号", |
|
|
|
label: "巡检计划单号", |
|
|
|
@ -263,6 +260,10 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
deletePlan(row) { |
|
|
|
deletePlan(row) { |
|
|
|
|
|
|
|
if (row.isOpen == 1) { |
|
|
|
|
|
|
|
this.$message.error('请先停用巡检计划!') |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
this.$confirm('确定删除该计划?', '提示', { |
|
|
|
this.$confirm('确定删除该计划?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
|