联调 技术监督 所有流程删除功能
This commit is contained in:
@@ -115,6 +115,7 @@
|
||||
<el-select
|
||||
v-model="form.monitoringTerminalCode"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
filterable
|
||||
placeholder="请选择关联终端"
|
||||
@@ -520,7 +521,7 @@ const userNameList = ref([])
|
||||
//查询干扰源列表获取可选数据
|
||||
const projectList = ref([])
|
||||
|
||||
const monitoringTerminalList:any = ref([])
|
||||
const monitoringTerminalList: any = ref([])
|
||||
//获取关联终端
|
||||
const findAllMonitoringTerminalList = () => {
|
||||
getDeviceList().then(res => {
|
||||
@@ -605,8 +606,8 @@ const resetForm = async () => {
|
||||
changeUserName()
|
||||
}
|
||||
})
|
||||
if(title.value != '编辑'){
|
||||
changevoltageDeviationLimit()
|
||||
if (title.value != '编辑') {
|
||||
changevoltageDeviationLimit()
|
||||
}
|
||||
}
|
||||
//根据检测点电压等级切换电压偏差上限/下限
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
@@ -43,6 +44,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelMointorPointFormData } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
@@ -61,6 +63,10 @@ const tableStore = new TableStore({
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
// { field: 'orgName', title: '填报部门名称', minWidth: 170 },
|
||||
{
|
||||
@@ -132,7 +138,7 @@ const tableStore = new TableStore({
|
||||
showDisabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||
},
|
||||
|
||||
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
@@ -218,6 +224,31 @@ const cancelLeave = async (row: any) => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteTempLineReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate">模板下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
@@ -52,6 +53,7 @@ import { cancelTerminalFormData } from '@/api/supervision-boot/terminal/index'
|
||||
import uploadATemplate from './uploadATemplate.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
@@ -72,6 +74,10 @@ const tableStore = new TableStore({
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
field: 'orgName',
|
||||
@@ -252,6 +258,30 @@ const cancelLeave = async (row: any) => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//导出模板
|
||||
const exportExcelTemplate = () => {
|
||||
|
||||
Reference in New Issue
Block a user