修改台账树
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" :key="tableKey" @sort-change="handleSortChange"></Table>
|
||||
|
||||
<FactoryForm ref="factoryFormRef" :user-list="userList" :engineering-list="engineeringList"
|
||||
<FactoryForm ref="factoryFormRef" :engineering-list="engineeringList"
|
||||
:dev-type-options="devTypeOptions" :dev-type-options2="devTypeOptions2" :dev-model-options="devModelOptions"
|
||||
:dev-model-options2="devModelOptions2" @success="onFormSuccess" />
|
||||
|
||||
@@ -131,12 +131,10 @@ import html2canvas from 'html2canvas'
|
||||
import { fullUrl } from '@/utils/common'
|
||||
import JSZip from 'jszip'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { getList } from '@/api/cs-harmonic-boot/recruitment'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/manage/factory'
|
||||
})
|
||||
const userList: any = ref([])
|
||||
const showQrCode = ref(false)
|
||||
const devTypeOptions: any = ref([])
|
||||
const devTypeOptions2: any = ref([])
|
||||
@@ -255,30 +253,6 @@ const tableStore = new TableStore({
|
||||
},
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '治理类型',
|
||||
field: 'governType',
|
||||
minWidth: 100,
|
||||
formatter: row => {
|
||||
return row.cellValue === 'event' ? '暂态' : row.cellValue === 'harmonic' ? '稳态' : (row.cellValue || '/')
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '治理方法',
|
||||
field: 'governMethod',
|
||||
minWidth: 100,
|
||||
formatter: row => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '敏感用户',
|
||||
field: 'monitorUser',
|
||||
minWidth: 120,
|
||||
formatter: row => {
|
||||
return userList.value.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '通讯协议',
|
||||
field: 'devAccessMethod',
|
||||
@@ -829,15 +803,6 @@ const onFormSuccess = () => {
|
||||
tableStore.onTableAction('search', {})
|
||||
}
|
||||
|
||||
const getUserList = () => {
|
||||
return getList({
|
||||
pageNum: 1,
|
||||
pageSize: 2000
|
||||
}).then(res => {
|
||||
userList.value = res.data.records
|
||||
})
|
||||
}
|
||||
|
||||
const getEngineeringList = () => {
|
||||
return engineeringProject().then(res => {
|
||||
engineeringList.value = res.data.filter(item => {
|
||||
@@ -849,26 +814,19 @@ const getEngineeringList = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 页面被 keep-alive 缓存后,从敏感用户/工程页返回时刷新下拉列表
|
||||
// 页面被 keep-alive 缓存后,从工程页返回时刷新下拉列表
|
||||
onActivated(() => {
|
||||
// if (sessionStorage.getItem('factoryNeedRefreshUserList')) {
|
||||
// sessionStorage.removeItem('factoryNeedRefreshUserList')
|
||||
getUserList()
|
||||
// }
|
||||
|
||||
// if (sessionStorage.getItem('factoryNeedRefreshEngineeringList')) {
|
||||
// sessionStorage.removeItem('factoryNeedRefreshEngineeringList')
|
||||
if (sessionStorage.getItem('factoryNeedRefreshEngineeringList')) {
|
||||
sessionStorage.removeItem('factoryNeedRefreshEngineeringList')
|
||||
getEngineeringList()
|
||||
// }
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
queryTheDictionary()
|
||||
// getUserList()
|
||||
// getEngineeringList()
|
||||
|
||||
getEngineeringList()
|
||||
setTimeout(() => { }, 100)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user