微调
This commit is contained in:
@@ -42,15 +42,15 @@ import { useDictStore } from '@/stores/modules/dict'
|
||||
import { getPqDevList, deletePqDev, exportPqDev, downloadTemplate, importPqDev } from '@/api/device/device/index.ts'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
||||
import { useModeStore , useAppSceneStore} from '@/stores/modules/mode'; // 引入模式 store
|
||||
|
||||
const modeStore = useModeStore();
|
||||
const dictStore = useDictStore()
|
||||
const appSceneStore = useAppSceneStore()
|
||||
// ProTable 实例
|
||||
const proTable = ref<ProTableInstance>()
|
||||
const devicePopup = ref()
|
||||
// 定义包含和排除的单位
|
||||
|
||||
const ConditionsIsShow = ref(false)
|
||||
|
||||
const boundPqDevList=ref<Device.ReqPqDevParams[]>([])//根据检测计划id查询出所有已绑定的设备
|
||||
|
||||
@@ -71,7 +71,11 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
{
|
||||
prop: 'name',
|
||||
label: '名称',
|
||||
search: { el: 'input' },
|
||||
isShow: appSceneStore.currentScene != '1',
|
||||
...(appSceneStore.currentScene != '1' ? {
|
||||
search: { el: 'input' },
|
||||
} : {}),
|
||||
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
@@ -121,8 +125,11 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
prop: 'manufacturer',
|
||||
label: '设备厂家',
|
||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||
search: { el: 'select', props: { filterable: true }, order: 1 },
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
isShow: appSceneStore.currentScene != '1',
|
||||
...(appSceneStore.currentScene != '1' ? {
|
||||
search: { el: 'select', props: { filterable: true }, order: 1 },
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
} : {}),
|
||||
minWidth: 200,
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||
@@ -138,7 +145,7 @@ const handleDateChange = (startDateTemp: string, endDateTemp: string) => {
|
||||
}
|
||||
// 打开 drawer(新增、编辑)
|
||||
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
||||
devicePopup.value?.open(titleType, row,modeStore.currentMode)
|
||||
devicePopup.value?.open(titleType, row,modeStore.currentMode,appSceneStore.currentScene)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user